- 微信
- Visual Studio
- Visual Studio Code
- Microsoft Office
- Hashtab
- MPC-HC/PotPlayer/爱奇艺万能播放器
- NetSpeedMonitor、TrafficMonitor
This file contains 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
#coding = utf-8 | |
from selenium import webdriver | |
fp = webdriver.FirefoxProfile('C:/Users/XXX/AppData/Roaming/Mozilla/Firefox/Profiles/i4g2sert.default') | |
driver = webdriver.Firefox(fp) | |
# 或 driver = webdriver.Firefox() | |
driver.get("https://www.bing.com") | |
print "hello" | |
driver.close() |
This file contains 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
""" | |
Simply display the contents of the webcam with optional mirroring using OpenCV | |
via the new Pythonic cv2 interface. Press <esc> to quit. | |
""" | |
import cv2 | |
def show(img): | |
ret, thresh1 = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY) |
This file contains 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
function ydlplay($url) { | |
$(youtube-dl -g $url) | ForEach-Object { ffplay -hide_banner $_ } | |
} |
This file contains 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
struct generator { | |
using array = std::vector<int>; | |
static array gen(int num) { | |
array primes{2}; | |
array visited(num, 0); | |
for (int i=3; i<num; i+=2) { | |
if (visited[i] == 0 && i % primes.back() != 0) { | |
primes.push_back(i); | |
for (int n=i; n<num; n+=i) { | |
visited[n] = 1; |
This file contains 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
# check wsl running | |
wslconfig /l /running | |
if ($LASTEXITCODE -ne 0) { | |
echo "Please open WSL before RUN 'sudo wsl2.ps1'." | |
exit; | |
} | |
# [Config] | |
$wsl_hosts = "wsl.local" | |
$win_hosts = "win.local" |