Skip to content

Instantly share code, notes, and snippets.

'''
batch change tracker for qbittorrent 4.2-
'''
import sys
import os
import glob
import bencode
if __name__ == '__main__':
@neilzheng
neilzheng / ttc2ttf.py
Created May 2, 2018 04:37 — forked from johnko/ttc2ttf.py
ttc2ttf
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer”
#I thought porting it to Python could be both a challenge and useful
from sys import argv, exit, getsizeof
from struct import pack_into, unpack_from
def ceil4(n):
#!/usr/bin/env python
import sys
import asyncio
import aiohttp
class Server:
def __init__(self, ws_uri, loop=None, **wskwargs):
#!/usr/bin/env python
import sys
import asyncio
from aiohttp import web
class Server:
def __init__(self, host, port, loop=None, **kwargs):
# -*- coding: utf-8 -*-
import glob
def parse_block(f, info):
block = {}
line = f.readline().strip()
if not line:
return None
# -*-: coding: utf-8 -*-
import asyncio
import aiohttp
import traceback
import datetime
import math
def hsize(s):
suffixs = ["B", "KB", "MB", "GB"]
# -*-: coding: utf-8 -*-
import asyncio
import aiohttp
import traceback
import datetime
import math
def hsize(s):
suffixs = ["B", "KB", "MB", "GB"]
#!/usr/bin/env python
import sys
import asyncio
import websockets
class Server:
def __init__(self, host, port, loop=None, **kwargs):
#!/usr/bin/env python
import sys
import asyncio
import websockets
class Server:
def __init__(self, ws_uri, ssl_verify=True, loop=None, **wskwargs):
@neilzheng
neilzheng / server.py
Created October 21, 2017 00:30 — forked from scturtle/server.py
python socks5 proxy server with asyncio (async/await)
#!/usr/bin/env python3.5
import socket
import asyncio
from struct import pack, unpack
class Client(asyncio.Protocol):
def connection_made(self, transport):
self.transport = transport
self.server_transport = None