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
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=True) |
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
from PIL import Image | |
img = Image.open("QQwhite.jpg") | |
width, height = img.size | |
result = Image.new('RGB', (width, height)) | |
data = list(img.getdata()) | |
for i, t in enumerate(data): | |
if set(t) == {255}: |
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 | |
import moviepy.editor as mp | |
import sys | |
def convert(video_file_name, audio_file_name=None): | |
if audio_file_name is None: | |
audio_file_name = video_file_name + '.mp3' | |
try: | |
clip = mp.VideoFileClip(video_file_name) | |
clip.audio.write_audiofile(audio_file_name) |
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
clash |
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
🏆 205 Contributions in year 2020 | |
📦 Used 24 MB in GitHub's Storage | |
📜 7 Public Gists | |
🔑 5 Public Keys | |
💼 Opted to Hire |
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
#!/bin/bash | |
install_ipset() { | |
yum install -y ipset ipvsadm | |
} | |
load_mod() { | |
echo "#!/bin/bash | |
modprobe -- ip_vs | |
modprobe -- ip_vs_rr |
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
{ | |
"configurations":{ | |
"Debug GRPC":{ | |
"adapter":"vscode-go", | |
"configuration":{ | |
"type":"go", | |
"request":"launch", | |
"mode":"debug", | |
"remotePath":"", | |
"port":2345, |
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
import sys | |
import json | |
def filter(har_file, contains): | |
with open(har_file) as f: | |
har = json.load(f) | |
entries = har['log']['entries'] | |
filtered = [e for e in entries if contains in e['request']['url']] |
OlderNewer