This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| url = 'https://trade.taobao.com/trade/itemlist/asyncSold.htm?event_submit_do_query=1&_input_charset=utf8' | |
| ps = {} | |
| for p in params.splitlines(): | |
| ps[p.split('\t')[0]] = p.split('\t')[1] | |
| mainOrders = data['mainOrders'] | |
| orders = mainOrders[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests, json, re | |
| yourCookie = input('input your Cookie: ') | |
| token = re.search('_tb_token_=(\w+)', yourCookie) | |
| headers = { | |
| 'Cookie': yourCookie, | |
| 'User-agent': 'Mozilla/5.0 (Windows NT 5.01; vi-VN; rv:1.9.1.20) Gecko/2018-01-19 19:36:18 Firefox/3.8' | |
| } | |
| uri = 'https://smf.taobao.com/itemactivity/DetailList.do?' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| `heroku pg:pull postgresql-fitted-54596 zt` | |
| `heroku pg:push zt postgresql-tapered-87070` | |
| ``` | |
| heroku addons:create heroku-postgresql:hobby-dev | |
| heroku pg:credentials:url | |
| heroku pg:psql | |
| ``` | |
| uri = "mongodb://<dbuser>:<dbpassword>@ds050739.mlab.com:50739/goods" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import requests | |
| head = """User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0 | |
| Referer: https://einvoice.taobao.com/index | |
| Cookie: cookie | |
| """ | |
| def getHeaders(head): | |
| headers = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| `XLSX.utils.sheet_to_json(workbook.Sheets[sheet],{defval:""})` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| # 先下载安装思源黑体或宋体 | |
| # MacOS install source han Serif cn then... | |
| plt.rcParams['font.family']=['Source Han Serif CN'] | |
| # simple example | |
| plt.title('中文') | |
| plt.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foods = {'apple': 2, 'pipe': 6, 'orange': 3} | |
| k = 0 | |
| for food, index in foods.items(): | |
| if food == 'apple': | |
| print(1, index, food) | |
| else: | |
| print(k + 1, k + index, food) | |
| k += index | |
| print('sum = ' + str(k)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "emojis": [ | |
| {"emoji": "👩👩👧👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👧", "category": "p", "order": ""}, | |
| {"emoji": "👩👩👧👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👦", "category": "p", "order": ""}, | |
| {"emoji": "👩👩👦👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "👩‍👩‍👦‍👦", "category": "p", "order": ""}, | |
| {"emoji": "👨👩👧👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👧", "category": "p", "order": ""}, | |
| {"emoji": "👨👩👧👦", "name": "family_children", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👦", "category": "p", "order": ""}, | |
| {"emoji": "👨👩👦👦", "name": "family_two_biys", "shortname": "", "unicode": "", "html": "👨&zw |