This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.
Upgrade the system
yum -y update
# 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" |
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; |
function ydlplay($url) { | |
$(youtube-dl -g $url) | ForEach-Object { ffplay -hide_banner $_ } | |
} |
""" | |
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) |
#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() |