作者查詢 / s860134

總覽項目: 發文 | 留言 | 暱稱
作者 s860134 在 PTT [ Python ] 看板的留言(推文), 共1629則
限定看板:Python
看板排序:
全部Gossiping53141Stock15648Tech_Job2965Option2729Python1629HatePolitics1144DMM_GAMES737Soft_Job426WomenTalk307Boy-Girl263C_Chat247LoL211Beauty140FuMouDiscuss102joke99Violation78CFantasy69L_TalkandCha66home-sale65car61PublicIssue57NTU55PublicServan50AllTogether46Salary46RDSS43Finance36Teacher32YOLO32rent-exp27sex23TaichungBun22Militarylife21battlegirlhs20Examination18Kaohsiung18BabyMother17Law-Service17biker16specialman15CodeJob13medstudent13PingTung13Gov_owned12Storage_Zone12Anti-ramp11graduate11CVS10marriage10Ptt-Press10studyteacher10About_Life9HardwareSale9KOTDFansClub9LTK9MuscleBeach9SENIORHIGH9Suckcomic9AfterPhD8CareerPlan8nCoV20198SMSlife8Hsinchu7Employee6LifeSci_936PttLifeLaw6StockPicket6VAPE6AC_In5FiremanLife5historia5HsinChuang5Mechanical5SouthPark5Tainan5THULAW5Baseball4BigBanciao4chocolate4ChungLi4EarthQuake264EarthQuake434ForeignEX4gay4PathofExile4PC_Shopping4SHORTY4Wanhua4Wrong_spell4ck53rd3253Disabled3hardware3HomeTeach3IA3Japan_Travel3Keelung3lesbian3LightNovel3MenTalk3mobilesales3money3NCHUS3pharmacist3ScienceNote3Shu-Lin3ShuangHe3soho3sp_teacher3SuperBike3WorkinChina3Anti-Cancer2Aves2bicycle2BigPeitou2BigSanchung2Bioindustry2Broad_Band2Bunco2ChangHua2Childhood2Christianity2dog2DSLR2Food2GTA2Hiking2HRM2Hualien2ID_Multi2iOS2Lifeismoney2Loan2MdnCNhistory2movie2Nantou2NBA2Nintama2part-time2PttBug2San-Ying2StarCraft2Taoyuan2Test2toberich2TPC_Police2VideoCard2Warfare2Wen-Shan2Yunlin2Aviation1basketballTW1BigShiLin1book1Buddhism1Bus1Calendar1Car-rent1Chan_Mou1China-Drama1consumer1cosplay1Crowd1CYCU_Talk1DotA21EatToDie1Economics1Education1facelift1feminine_sex1FoodDelivery1Free_box1Fund1gallantry1GossipPicket1happy1Hip-Hop1I-Lan1Insurance1Interior1Jay1juniorhigh1kochikame1KoreaStar1L_SecretGard1LAW1LeBronJames1lineageW1Marginalman1MartialArts1Miaoli1Military1Mizuki_Nana1MobileComm1MOD1MonkeyPox1Nanoha1Navy1NBAEasyChat1NCTU_TALK1NCU_Talk1NCYU_Fst_981NewActivity1NTHU_Talk1NUK-APIBM1001PhD1pighead1politics1PunishRecord1speech1STREET_BALL1StupidClown1SuperHeroes1TakahashiRie1TamShui1Tobacco1Wanted1<< 收起看板(216)
[問題] 函數、程式結構如何設計?
[ Python ]18 留言, 推噓總分: +3
作者: wallrose - 發表於 2018/04/02 20:02(7年前)
2Fs860134: 這和軟工比較有關,會有點抽象04/02 22:25
3Fs860134: 盡量做到一個 函數 一個一件事,可變參數拉到引數04/02 22:27
15Fs860134: 你先不要管什麼好處不好處,所有軟工追求不外乎:04/04 02:01
16Fs860134: 1.可再利用(擴充) 2. 易讀 3. 效能04/04 02:02
17Fs860134: 1. 的寫法 F 理面直接用到 G 兩者偶合性很強04/04 02:09
18Fs860134: 2. F 則是取於 G 的運算結果,對於後續修改比較好的04/04 02:10
[問題] 求解有幾個位數不同的問題
[ Python ]17 留言, 推噓總分: +1
作者: Redbeansauce - 發表於 2018/04/03 01:37(7年前)
15Fs860134: 你的思路沒錯阿04/03 12:12
16Fs860134: 轉 str 用 zfill04/03 12:18
17Fs860134: 其實這根本就只是對 python buildin function 記多少而以04/03 12:19
[問題] 爬網頁資料時出現錯誤
[ Python ]4 留言, 推噓總分: +1
作者: kiey - 發表於 2018/04/02 15:46(7年前)
2Fs860134: 我猜是 python 版本過舊04/02 22:15
3Fs860134: 或是檢查一下兩邊pymysql 版本04/02 22:19
[問題] 正則匹配不包含的符號
[ Python ]19 留言, 推噓總分: +2
作者: sagwow - 發表於 2018/04/01 10:03(7年前)
2Fs860134: [^:]04/01 11:30
4Fs860134: 在[]中 ^前墜代表反向匹配... 你可以在再看一下書@@04/01 11:31
5Fs860134: https://regex101.com/#python 這網站玩玩看八04/01 11:33
7Fs860134: 發現這樣會把 123:234 切開 QQ04/01 12:14
8Fs860134: (?:[ ]|^)([^:\s]+)(?!:)\b 取 group(1) 不知道有沒漏04/01 12:39
9Fs860134: 結論上還是像一樓另外篩選比較乾淨簡單04/01 12:40
11Fs860134: (?:[ ]|^)([^:\s]+)(?!:)(?=\s|$)04/01 16:48
12Fs860134: 好像越弄越肥越看不懂惹...04/01 16:48
13Fs860134: (?:[ ]|^)([^:\s]+)(?=\s|$) 斷言找頭找尾好像就可以04/01 16:49
[問題] 請問python能像vbaㄧ樣不安裝額外程式嗎
[ Python ]6 留言, 推噓總分: +1
作者: ggggggh - 發表於 2018/03/28 20:37(7年前)
4Fs860134: csv 有內建模組03/28 22:10
5Fs860134: https://docs.python.org/2.7/library/csv.html03/28 22:10
6Fs860134: 就算十萬八千個 csv 也可以拉03/28 22:11
[問題] Google Play 內容隨機變動問題
[ Python ]2 留言, 推噓總分: 0
作者: chan15 - 發表於 2018/03/20 14:39(7年前)
1Fs860134: 樹狀結構是穩定的,你找固定的文字作定位 xpath 相對路徑03/22 02:27
2Fs860134: 打個比方 <h2 class="Rm6Gwb">評論</h2>03/22 02:28
Re: [問題] 切字串 split
[ Python ]10 留言, 推噓總分: +8
作者: cutekid - 發表於 2018/03/21 15:38(7年前)
5Fs860134: 這才常用03/21 19:42
[問題] python response 問題
[ Python ]8 留言, 推噓總分: +1
作者: fordpines - 發表於 2018/03/08 20:20(7年前)
1Fs860134: 不熟悉爬蟲抓網業流程吧,先把 F12 打開 重新整理網頁03/10 00:52
2Fs860134: 可以發現其實這個頁面總共要了兩次頁面03/10 00:53
3Fs860134: https://imgur.com/CMKKe0f03/10 00:54
4Fs860134: 所以你加什麼 header 都沒有用拉,因為 url 是錯的03/10 00:55
5Fs860134: index.php (X) lbtope.php(O)03/10 00:56
[問題] No module named 'fake_useragent'
[ Python ]7 留言, 推噓總分: +1
作者: levenspiel - 發表於 2018/03/08 22:00(7年前)
4Fs860134: 對症下藥第一招: 在 cmd 下 "where pip"03/10 00:43
5Fs860134: 你會發現你的 pip 的路徑根本和 jupyter 八竿子打不著03/10 00:43
6Fs860134: 隔空抓抓藥你是裝 anaconda 之類的,又灌了官方 python03/10 00:45
7Fs860134: 最後會發現根本就是要用 conda 裝或是 venv 的 pip 裝03/10 00:47
Re: 如何呼叫另一檔案裡def裡的參數
[ Python ]12 留言, 推噓總分: 0
作者: Paudse - 發表於 2018/03/09 18:17(7年前)
4Fs860134: 先理解 import 是甚麼意思,本質上是執行並存到變數03/10 00:15
5Fs860134: 因此你只要在 run.py 裡面 import cal 等同於執行cal.py03/10 00:15
6Fs860134: 裡面所有邏輯,並將所有非雙底線開頭變數黏到 "cal" 這個03/10 00:16
7Fs860134: module object上面03/10 00:17
8Fs860134: 但是你想要的東西確實可以用些方法實踐03/10 00:21
9Fs860134: https://imgur.com/pnUnRjp03/10 00:23
10Fs860134: python 2.7 是 __builtin__ python3.4 是 builtins03/10 00:24
11Fs860134: 我不太喜歡這種寫法就是了,因為這樣你的 cal madule03/10 00:25
12Fs860134: 可被 import 的前提就變成是 buildin 終存在這個變數03/10 00:25