Skip to content

Instantly share code, notes, and snippets.

View zenwalk's full-sized avatar
🏠
Working from home

chenn zenwalk

🏠
Working from home
View GitHub Profile
This file has been truncated, but you can view the full file.
阿爸 a1'ba4 18137
阿昌族 a1'chang1'zu2 50849
阿斗 a1'dou3 42632
阿飞 a1'fei1 48603
阿富汗 a1'fu4'han4 3461
阿訇 a1'hong1 34432
阿拉伯数字 a1'la1'bo2'shu4'zi4 35937
阿拉伯语 a1'la1'bo2'yu3 30476
阿妈 a1'ma1 16220
@zenwalk
zenwalk / auto-renwal-subconver.sh
Created April 28, 2023 18:52 — forked from foru17/auto-renwal-subconver.sh
批量更新节点订阅脚本
#!/bin/bash
# 配合定时脚本使用
# 订阅后台接口,建议自己搭建,参考 https://github.com/tindy2013/subconverter
SERVER_API_URL="https://any.sub.domain/subconver"
# 输出的目录位置, nginx 解析目录
OUTPUT_FOLDER="/www/wwwroot/sub.domain.com"
# bark 推动提醒地址
@zenwalk
zenwalk / cfrw.py
Created April 26, 2023 08:33 — forked from sgillies/cfrw.py
Rasterio concurrency example
"""Concurrent read-process-write example"""
import concurrent.futures
from itertools import islice
from time import sleep
import rasterio
CHUNK = 100
@zenwalk
zenwalk / Hitters.csv
Created April 4, 2023 18:08 — forked from keeganhines/Hitters.csv
Hitters dataset from ISLR
AtBat Hits HmRun Runs RBI Walks Years CAtBat CHits CHmRun CRuns CRBI CWalks League Division PutOuts Assists Errors Salary NewLeague
-Andy Allanson 293 66 1 30 29 14 1 293 66 1 30 29 14 A E 446 33 20 NA A
-Alan Ashby 315 81 7 24 38 39 14 3449 835 69 321 414 375 N W 632 43 10 475 N
-Alvin Davis 479 130 18 66 72 76 3 1624 457 63 224 266 263 A W 880 82 14 480 A
-Andre Dawson 496 141 20 65 78 37 11 5628 1575 225 828 838 354 N E 200 11 3 500 N
-Andres Galarraga 321 87 10 39 42 30 2 396 101 12 48 46 33 N E 805 40 4 91.5 N
-Alfredo Griffin 594 169 4 74 51 35 11 4408 1133 19 501 336 194 A W 282 421 25 750 A
-Al Newman 185 37 1 23 8 21 2 214 42 1 30 9 24 N E 76 127 7 70 A
-Argenis Salazar 298 73 0 24 24 7 3 509 108 0 41 37 12 A W 121 283 9 100 A
-Andres Thomas 323 81 6 26 32 8 2 341 86 6 32 34 8 N W 143 290 19 75 N
console.clear();
function saveData(blob, fileName)
{
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
var url = window.URL.createObjectURL(blob);
a.href = url;
@zenwalk
zenwalk / git_proxy_socks5.sh
Created January 14, 2022 09:32 — forked from bluethon/git_proxy_socks5.sh
设置git使用socks5代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
@zenwalk
zenwalk / tqdm_pool.py
Created June 26, 2020 05:16 — forked from alexeygrigorev/tqdm_pool.py
Track progress of ProcessPoolExecutor with tqdm
from glob import glob
import multiprocessing
from concurrent.futures import ProcessPoolExecutor
import cv2
from PIL import Image
import imagehash
from tqdm import tqdm
@zenwalk
zenwalk / crc32.py
Created June 26, 2020 05:15 — forked from matteomattei/crc32.py
Calculate CRC32 of a file in Python
#!/usr/bin/env python
import binascii
def CRC32_from_file(filename):
buf = open(filename,'rb').read()
buf = (binascii.crc32(buf) & 0xFFFFFFFF)
return "%08X" % buf
@zenwalk
zenwalk / comparision.py
Created September 27, 2018 12:11 — forked from dmahugh/comparision.py
comparison of asynchronous HTTP requests (aiohttp/asyncio) and traditional sequential requests (with Requests library)
"""Comparison of fetching web pages sequentially vs. asynchronously
Requirements: Python 3.5+, Requests, aiohttp, cchardet
For a walkthrough see this blog post:
http://mahugh.com/2017/05/23/http-requests-asyncio-aiohttp-vs-requests/
"""
import asyncio
from timeit import default_timer
@zenwalk
zenwalk / Random-string
Created June 7, 2018 01:43 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);