Skip to content

Instantly share code, notes, and snippets.

View FRex's full-sized avatar

Błażej Roszkowski FRex

View GitHub Profile
get = (sum and __import__ or require)('requests').get
url = "http://translate.googleapis.com/translate_a/single"
params = {}
params['client'] = 'gtx'
params['sl'] = 'en'
params['tl'] = 'de'
params['dt'] = 't'
params['q'] = 'hello!'
import threading
import hashlib
import queue
import sys
def main(argv):
for fname in argv:
try:
with open(fname, "rb") as f:
#!/usr/bin/env python3
import subprocess
import sys
import os
dirs = os.environ["PATH"].split(os.pathsep)
ourdir = os.path.dirname(__file__)
#!/bin/bash
if [[ $# -eq 0 ]]; then
echo "no version argument was given" >/dev/stderr
exit 2
fi
ver="$1" # save version
shift # and remove it form the argument list
"""Detect codepage that UTF-8 data was misinterpreted as."""
# NOTE: list made using Tools/unicode/listcodecs.py
all_codecs = [
"ascii",
"base64_codec",
"big5",
"big5hkscs",
"bz2_codec",
"charmap",