I hereby claim:
- I am Sg4Dylan on github.
- I am sg4dylan (https://keybase.io/sg4dylan) on keybase.
- I have a public key whose fingerprint is D83C 52B6 F7F5 CFBE 44C9 8D89 B588 E63E 0BE1 1E57
To claim this, I am signing this object:
#!/usr/bin/env python | |
#coding:utf-8 | |
# Author: Sg4Dylan --<sg4dylan#gmail.com> | |
# Update: 9/5/2017 | |
import requests | |
import ast | |
def sessionPool(pool_connections=2, pool_maxsize=5, max_retries=5): | |
session = requests.Session() |
import os | |
from_e = 'utf-8' | |
to_e = 'gbk' | |
command = "iconv -f %s -t %s " % (from_e, to_e) | |
for i in os.listdir(): | |
if i.endswith('.m3u'): | |
file_s = "\"%s\" > \"%s\"" % (i,to_e+i) | |
os.system(command+file_s) | |
os.remove(i) |
I hereby claim:
To claim this, I am signing this object:
import subprocess | |
import time | |
from datetime import datetime as dt | |
import logging | |
logging.basicConfig(level=logging.DEBUG, | |
format='[%(asctime)s][%(levelname)s][%(funcName)-2s]-> %(message)s', | |
datefmt='%m-%d %H:%M:%S') | |
subprocess.call("nox_adb connect 127.0.0.1:52001",shell=False) |
#!/bin/bash | |
# Raspberry broadcast fm shell | |
# - A believing heart is your magic - | |
# Dependency: | |
# FFmpeg: pacman -S ffmpeg | |
# PiFmRds: https://github.com/ChristopheJacquet/PiFmRds | |
# BBC Radio | |
# livelink="http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p" |
#!/usr/bin/env python | |
#coding:utf-8 | |
# Author: Sg4Dylan --<sg4dylan#gmail.com> | |
# Created: 7/14/2017 | |
from PIL import Image,ImageFont,ImageDraw | |
import render_config as config | |
def auto_poster(text: dict, param: dict): | |
#!/usr/bin/env python | |
#coding:utf-8 | |
# Author: Sg4Dylan --<sg4dylan#gmail.com> | |
# Purpose: A simple script to complete srun's webauth | |
# Created: 03/01/2017 | |
# 配合 crontab 使用 | |
# */5 6-22 * * * /usr/bin/python3 /pathtoyourscript/LoginSrunWebAuth.py | |
import requests |
#!/usr/bin/env python | |
import socket | |
import binascii | |
import threading | |
import time | |
import json | |
reconnect_flag = 0 |
#!/usr/bin/env python | |
#coding:utf-8 | |
# Author: Sg4Dylan --<sg4dylan#gmail.com> | |
# Created: 9/28/2018 | |
# ========================================== | |
# Any>WEBP Any>JPEG 图片原地批量转换 | |
# ========================================== | |
# 使用方法: 把待转换的文件夹拖放到脚本上 | |
import os |
''' | |
E绅士翻译注射器💉Wiki 解析实现 | |
直接用 EhTagBuilder 就能拿到 JSON 格式的数据库 | |
本脚本是为方便集成做的简易版解析实现 | |
参考了 EhTagTranslator 的实现过程 | |
''' | |
import re | |
import json | |
import requests |