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 helium as H | |
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |
def main(): | |
opts = webdriver.ChromeOptions() | |
opts.add_argument("--no-first-run") | |
opts.add_argument("--no-service-autorun") | |
opts.add_argument("--no-default-browser-check") |
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
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |
D = None | |
def google(keyword): | |
D.get(f"https://www.google.com.hk/search?q={keyword}") | |
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
In [17]: from __future__ import braces | |
File "<ipython-input-17-6d5c5b2f0daf>", line 1 | |
from __future__ import braces | |
^ | |
SyntaxError: not a chance |
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 datetime as dt | |
def weeknum(date): | |
# 如果新年的第一天就是星期天的话 | |
# 直接通过天数的差异算 weeknum | |
# 规则是: | |
# 1. 每满 7 天,周数加 1 | |
# 2. 如果有余数,或余数就为 0(本身是 sunady 的情况)也加 1 | |
# 最终数学公式就是:floor division 7, plus 1 |
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 pandas as pd | |
import os | |
os.environ["PYTHONBREAKPOINT"] = "IPython.embed" | |
pd.read_excel("./accounts.xlsx") | |
breakpoint() |
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
def create_any_MB_file(filepath, n): | |
with open(filepath, 'wb+') as f: | |
for _ in range(2**20 * n): | |
f.write(bytes(1)) |
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
// ==UserScript== | |
// @name c | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.zhihu.com/question/* | |
// @match https://www.douban.com/note/* | |
// @grant none | |
// @run-at document-end |
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
// ==UserScript== | |
// @name HideWikiRefer | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Huu | |
// @match https://*.wikipedia.org/wiki/* | |
// @match https://*.wikipedia.org/zh*/* | |
// @grant none | |
// @run-at document-end |
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
// ==UserScript== | |
// @name HideFilesSection | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description I just need to see readme!!! | |
// @author lane | |
// @match https://github.com/* | |
// @exclude https://github.com/*/*/tree/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name b站自动宽屏 | |
// @author Huu Lane | |
// @description auto enable theater mode in bilibili. | |
// @version 3.0.0 | |
// @include *://www.bilibili.com/video/* | |
// @namespace nobody_space | |
// ==/UserScript== | |
;(async function () { |