code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/python import sys, os, gzip, StringIO def dump_binary(fn, data): f = open(fn, "wb") f.write(data) f.close() def dec_prx(fn): f = open(fn, "rb") f.seek(0x150) dat = f.read() f.close() temp=StringIO.StringIO(dat) f=gzip.GzipFile(fileobj=temp, mode='rb') dec = f.read(f) f.close() fn = "%s.dec.p...
[ [ 1, 0, 0.0909, 0.0303, 0, 0.66, 0, 509, 0, 4, 0, 0, 509, 0, 0 ], [ 2, 0, 0.197, 0.1212, 0, 0.66, 0.25, 336, 0, 2, 0, 0, 0, 0, 3 ], [ 14, 1, 0.1818, 0.0303, 1, 0.07...
[ "import sys, os, gzip, StringIO", "def dump_binary(fn, data):\n\tf = open(fn, \"wb\")\n\tf.write(data)\n\tf.close()", "\tf = open(fn, \"wb\")", "\tf.write(data)", "\tf.close()", "def dec_prx(fn):\n\tf = open(fn, \"rb\")\n\tf.seek(0x150)\n\tdat = f.read()\n\tf.close()\n\n\ttemp=StringIO.StringIO(dat)\n\tf=...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import sys, os, struct, gzip, hashlib, StringIO gzip.time = FakeTime() def binary_replace(data, newdata, offset): return data[0:offset] + newdata + data[offset+len(newdata):] def prx_compress(output, hdr, input, mod_name="", mod_a...
[ [ 3, 0, 0.0488, 0.0366, 0, 0.66, 0, 425, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.0549, 0.0244, 1, 0.5, 0, 654, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 2, 0.061, 0.0122, 2, 0.07, ...
[ "class FakeTime:\n def time(self):\n return 1225856967.109", " def time(self):\n return 1225856967.109", " return 1225856967.109", "import sys, os, struct, gzip, hashlib, StringIO", "gzip.time = FakeTime()", "def binary_replace(data, newdata, offset):\n\treturn data[0:offset] + ...
#!/usr/bin/python import sys, hashlib def toNID(name): hashstr = hashlib.sha1(name.encode()).hexdigest().upper() return "0x" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2] if __name__ == "__main__": assert(toNID("sceKernelCpuSuspendIntr") == "0x092968F4") for name in sys.argv[1:]: print ("%s: %s"...
[ [ 1, 0, 0.2308, 0.0769, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 2, 0, 0.4615, 0.2308, 0, 0.66, 0.5, 259, 0, 1, 1, 0, 0, 0, 4 ], [ 14, 1, 0.4615, 0.0769, 1, 0.34...
[ "import sys, hashlib", "def toNID(name):\n\thashstr = hashlib.sha1(name.encode()).hexdigest().upper()\n\treturn \"0x\" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2]", "\thashstr = hashlib.sha1(name.encode()).hexdigest().upper()", "\treturn \"0x\" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + ha...
#!/usr/bin/python from hashlib import * import sys, struct def sha512(psid): if len(psid) != 16: return "".encode() for i in range(512): psid = sha1(psid).digest() return psid def get_psid(str): if len(str) != 32: return "".encode() b = "".encode() for i in range(0, len(str), 2): b += struct.pack('B...
[ [ 1, 0, 0.0652, 0.0217, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.66, 0.2, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2065, 0.1739, 0, 0.66...
[ "from hashlib import *", "import sys, struct", "def sha512(psid):\n\tif len(psid) != 16:\n\t\treturn \"\".encode()\n\n\tfor i in range(512):\n\t\tpsid = sha1(psid).digest()\n\n\treturn psid", "\tif len(psid) != 16:\n\t\treturn \"\".encode()", "\t\treturn \"\".encode()", "\tfor i in range(512):\n\t\tpsid =...
#!/usr/bin/python """ pspbtcnf_editor: An script that add modules from pspbtcnf """ import sys, os, re from getopt import * from struct import * BTCNF_MAGIC=0x0F803001 verbose = False def print_usage(): print ("%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]" %(os.path...
[ [ 8, 0, 0.022, 0.0165, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0385, 0.0055, 0, 0.66, 0.0769, 509, 0, 3, 0, 0, 509, 0, 0 ], [ 1, 0, 0.044, 0.0055, 0, 0.66, ...
[ "\"\"\"\npspbtcnf_editor: An script that add modules from pspbtcnf\n\"\"\"", "import sys, os, re", "from getopt import *", "from struct import *", "BTCNF_MAGIC=0x0F803001", "verbose = False", "def print_usage():\n\tprint (\"%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]\" ...
#!/usr/bin/python import os def main(): lists = [ "ISODrivers/Galaxy/galaxy.prx", "ISODrivers/March33/march33.prx", "ISODrivers/March33/march33_620.prx", "ISODrivers/March33/march33_660.prx", "ISODrivers/Inferno/inferno.prx", "Popcorn/popcorn.prx", "Satelite/satelite.prx", "Stargate/stargate....
[ [ 1, 0, 0.1034, 0.0345, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5345, 0.7586, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 3 ], [ 14, 1, 0.431, 0.4828, 1, 0.36,...
[ "import os", "def main():\n\tlists = [\n\t\t\t\"ISODrivers/Galaxy/galaxy.prx\",\n\t\t\t\"ISODrivers/March33/march33.prx\",\n\t\t\t\"ISODrivers/March33/march33_620.prx\",\n\t\t\t\"ISODrivers/March33/march33_660.prx\",\n\t\t\t\"ISODrivers/Inferno/inferno.prx\",\n\t\t\t\"Popcorn/popcorn.prx\",", "\tlists = [\n\t\t...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import os, gzip, StringIO gzip.time = FakeTime() def create_gzip(input, output): f_in=open(input, 'rb') temp=StringIO.StringIO() f=gzip.GzipFile(fileobj=temp, mode='wb') f.writelines(f_in) f.close() f_in.close() fout=open(out...
[ [ 3, 0, 0.0909, 0.0682, 0, 0.66, 0, 425, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.1023, 0.0455, 1, 0.71, 0, 654, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 2, 0.1136, 0.0227, 2, 0.09, ...
[ "class FakeTime:\n def time(self):\n return 1225856967.109", " def time(self):\n return 1225856967.109", " return 1225856967.109", "import os, gzip, StringIO", "gzip.time = FakeTime()", "def create_gzip(input, output):\n\tf_in=open(input, 'rb')\n\ttemp=StringIO.StringIO()\n\tf=g...
#!/usr/bin/python import os, sys, getopt def usage(): print ("Usage: %s [-l size ] basefile input output" % (sys.argv[0])) def write_file(fn, buf): fp = open(fn, "wb") fp.write(buf) fp.close() def main(): inputsize = 0 try: optlist, args = getopt.getopt(sys.argv[1:], 'l:h') except getopt.GetoptError: us...
[ [ 1, 0, 0.0536, 0.0179, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.0982, 0.0357, 0, 0.66, 0.25, 129, 0, 0, 0, 0, 0, 0, 1 ], [ 8, 1, 0.1071, 0.0179, 1, 0.02...
[ "import os, sys, getopt", "def usage():\n\tprint (\"Usage: %s [-l size ] basefile input output\" % (sys.argv[0]))", "\tprint (\"Usage: %s [-l size ] basefile input output\" % (sys.argv[0]))", "def write_file(fn, buf):\n\tfp = open(fn, \"wb\")\n\tfp.write(buf)\n\tfp.close()", "\tfp = open(fn, \"wb\")", "\t...
from sys import stdin a, b, c = map(int, stdin.readline().strip().split()) print "%.3lf" % ((a+b+c)/3.0)
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 256, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "a, b, c = map(int, stdin.readline().strip().split())", "print(\"%.3lf\" % ((a+b+c)/3.0))" ]
from sys import stdin from math import * r, h = map(float, stdin.readline().strip().split()) print "Area = %.3lf" % (pi*r*r*2 + 2*pi*r*h)
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.3333, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 14, 0, 0.75, 0.25, 0, 0.66, 0....
[ "from sys import stdin", "from math import *", "r, h = map(float, stdin.readline().strip().split())", "print(\"Area = %.3lf\" % (pi*r*r*2 + 2*pi*r*h))" ]
from sys import stdin from math import * n, = map(int, stdin.readline().strip().split()) rad = radians(n) print "%.3lf %.3lf" % (sin(rad), cos(rad))
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.25, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.5, ...
[ "from sys import stdin", "from math import *", "n, = map(int, stdin.readline().strip().split())", "rad = radians(n)", "print(\"%.3lf %.3lf\" % (sin(rad), cos(rad)))" ]
from sys import stdin n, = map(int, stdin.readline().strip().split()) print n*(n+1)/2
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 773, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "n, = map(int, stdin.readline().strip().split())", "print(n*(n+1)/2)" ]
from sys import stdin a, b = map(int, stdin.readline().strip().split()) print b, a
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.5, 0.25, 0, 0.66, 0.5, 127, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 0.75, 0.25, 0, 0.66, 1, ...
[ "from sys import stdin", "a, b = map(int, stdin.readline().strip().split())", "print(b, a)" ]
from sys import stdin n, m = map(int, stdin.readline().strip().split()) a = (4*n-m)/2 b = n-a if m % 2 == 1 or a < 0 or b < 0: print "No answer" else: print a, b
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.4, 0.2, 0, 0.66, 0.3333, 51, 3, 2, 0, 0, 53, 10, 4 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.6667,...
[ "from sys import stdin", "n, m = map(int, stdin.readline().strip().split())", "a = (4*n-m)/2", "b = n-a" ]
from sys import stdin n, = map(int, stdin.readline().strip().split()) money = n * 95 if money >= 300: money *= 0.85 print "%.2lf" % money
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.4, 0.2, 0, 0.66, 0.25, 773, 3, 2, 0, 0, 53, 10, 4 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.5, ...
[ "from sys import stdin", "n, = map(int, stdin.readline().strip().split())", "money = n * 95", "if money >= 300: money *= 0.85", "print(\"%.2lf\" % money)" ]
from sys import stdin n, = map(int, stdin.readline().strip().split()) print ["yes", "no"][n % 2]
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 773, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "n, = map(int, stdin.readline().strip().split())", "print [\"yes\", \"no\"][n % 2]" ]
from sys import stdin from math import * x1, y1, x2, y2 = map(float, stdin.readline().strip().split()) print "%.3lf" % hypot((x1-x2), (y1-y2))
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.3333, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 14, 0, 0.75, 0.25, 0, 0.66, 0....
[ "from sys import stdin", "from math import *", "x1, y1, x2, y2 = map(float, stdin.readline().strip().split())", "print(\"%.3lf\" % hypot((x1-x2), (y1-y2)))" ]
from sys import stdin n = stdin.readline().strip().split()[0] print '%c%c%c' % (n[2], n[1], n[0])
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.5, 0.25, 0, 0.66, 0.5, 773, 6, 0, 0, 0, 0, 0, 3 ], [ 8, 0, 0.75, 0.25, 0, 0.66, 1, ...
[ "from sys import stdin", "n = stdin.readline().strip().split()[0]", "print('%c%c%c' % (n[2], n[1], n[0]))" ]
from sys import stdin x, = map(float, stdin.readline().strip().split()) print abs(x)
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 190, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "x, = map(float, stdin.readline().strip().split())", "print(abs(x))" ]
from sys import stdin from calendar import isleap year, = map(int, stdin.readline().strip().split()) if isleap(year): print "yes" else: print "no"
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 917, 0, 1, 0, 0, 917, 0, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "from calendar import isleap", "year, = map(int, stdin.readline().strip().split())" ]
from sys import stdin f, = map(float, stdin.readline().strip().split()) print "%.3lf" % (5*(f-32)/9)
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 899, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "f, = map(float, stdin.readline().strip().split())", "print(\"%.3lf\" % (5*(f-32)/9))" ]
from sys import stdin a, b, c = map(int, stdin.readline().strip().split()) if a*a + b*b == c*c or a*a + c*c == b*b or b*b + c*c == a*a: print "yes" elif a + b <= c or a + c <= b or b + c <= a: print "not a triangle" else: print "no"
[ [ 1, 0, 1, 1, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ] ]
[ "from sys import stdin" ]
from sys import stdin a = map(int, stdin.readline().strip().split()) a.sort() print a[0], a[1], a[2]
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.4, 0.2, 0, 0.66, 0.3333, 475, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 0.6, 0.2, 0, 0.66, 0.6667,...
[ "from sys import stdin", "a = map(int, stdin.readline().strip().split())", "a.sort()", "print(a[0], a[1], a[2])" ]
s = i = 0 while True: term = 1.0 / (i*2+1) s += term * ((-1)**i) if term < 1e-6: break i += 1 print "%.6lf" % s
[ [ 14, 0, 0.1429, 0.1429, 0, 0.66, 0, 553, 1, 0, 0, 0, 0, 1, 0 ], [ 5, 0, 0.5714, 0.7143, 0, 0.66, 0.5, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.4286, 0.1429, 1, 0.09, ...
[ "s = i = 0", "while True:\n term = 1.0 / (i*2+1)\n s += term * ((-1)**i)\n if term < 1e-6: break\n i += 1", " term = 1.0 / (i*2+1)", " if term < 1e-6: break", "print(\"%.6lf\" % s)" ]
from sys import stdin from decimal import * a, b, c = map(int, stdin.readline().strip().split()) getcontext().prec = c print Decimal(a) / Decimal(b)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.25, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.5, ...
[ "from sys import stdin", "from decimal import *", "a, b, c = map(int, stdin.readline().strip().split())", "getcontext().prec = c", "print(Decimal(a) / Decimal(b))" ]
from sys import stdin n = int(stdin.readline().strip()) print "%.3lf" % sum([1.0/x for x in range(1,n+1)])
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 773, 3, 1, 0, 0, 901, 10, 3 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "n = int(stdin.readline().strip())", "print(\"%.3lf\" % sum([1.0/x for x in range(1,n+1)]))" ]
from sys import stdin print len(stdin.readline().strip())
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 1, 0.5, 0, 0.66, 1, 535, 3, 1, 0, 0, 0, 0, 4 ] ]
[ "from sys import stdin", "print(len(stdin.readline().strip()))" ]
from itertools import product from math import * def issqrt(n): s = int(floor(sqrt(n))) return s*s == n aabb = [a*1100+b*11 for a,b in product(range(1,10),range(10))] print ' '.join(map(str, filter(issqrt, aabb)))
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.2222, 0.1111, 0, 0.66, 0.25, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 2, 0, 0.5556, 0.3333, 0, 0....
[ "from itertools import product", "from math import *", "def issqrt(n):\n s = int(floor(sqrt(n)))\n return s*s == n", " s = int(floor(sqrt(n)))", " return s*s == n", "aabb = [a*1100+b*11 for a,b in product(range(1,10),range(10))]", "print(' '.join(map(str, filter(issqrt, aabb))))" ]
from sys import stdin a = map(int, stdin.readline().strip().split()) print "%d %d %.3lf" % (min(a), max(a), float(sum(a)) / len(a))
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 475, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "a = map(int, stdin.readline().strip().split())", "print(\"%d %d %.3lf\" % (min(a), max(a), float(sum(a)) / len(a)))" ]
from sys import stdin def cycle(n): if n == 1: return 0 elif n % 2 == 1: return cycle(n*3+1) + 1 else: return cycle(n/2) + 1 n = int(stdin.readline().strip()) print cycle(n)
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.5, 0.4444, 0, 0.66, 0.3333, 276, 0, 1, 1, 0, 0, 0, 2 ], [ 4, 1, 0.5556, 0.3333, 1, 0.05,...
[ "from sys import stdin", "def cycle(n):\n if n == 1: return 0\n elif n % 2 == 1: return cycle(n*3+1) + 1\n else: return cycle(n/2) + 1", " if n == 1: return 0\n elif n % 2 == 1: return cycle(n*3+1) + 1\n else: return cycle(n/2) + 1", " if n == 1: return 0", " elif n % 2 == 1: return cycle(n*3+1) + 1...
from sys import stdin n = int(stdin.readline().strip()) count = n*2-1 for i in range(n): print ' '*i + '#'*count count -= 2
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.3333, 0.1667, 0, 0.66, 0.3333, 773, 3, 1, 0, 0, 901, 10, 3 ], [ 14, 0, 0.5, 0.1667, 0, ...
[ "from sys import stdin", "n = int(stdin.readline().strip())", "count = n*2-1", "for i in range(n):\n print(' '*i + '#'*count)\n count -= 2", " print(' '*i + '#'*count)" ]
for abc in range(123, 329): big = str(abc) + str(abc*2) + str(abc*3) if(''.join(sorted(big)) == '123456789'): print abc, abc*2, abc*3
[ [ 6, 0, 0.75, 1, 0, 0.66, 0, 38, 3, 0, 0, 0, 0, 0, 4 ], [ 14, 1, 1, 0.5, 1, 0.09, 0, 235, 4, 0, 0, 0, 0, 0, 3 ] ]
[ "for abc in range(123, 329):\n big = str(abc) + str(abc*2) + str(abc*3)", " big = str(abc) + str(abc*2) + str(abc*3)" ]
from sys import stdin n, m = map(int, stdin.readline().strip().split()) print "%.5lf" % sum([1.0/i/i for i in range(n,m+1)])
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 51, 3, 2, 0, 0, 53, 10, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from sys import stdin", "n, m = map(int, stdin.readline().strip().split())", "print(\"%.5lf\" % sum([1.0/i/i for i in range(n,m+1)]))" ]
from sys import stdin data = map(int, stdin.readline().strip().split()) n, m = data[0], data[-1] data = data[1:-1] print len(filter(lambda x: x < m, data))
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.4, 0.2, 0, 0.66, 0.25, 929, 3, 2, 0, 0, 53, 10, 4 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.5, ...
[ "from sys import stdin", "data = map(int, stdin.readline().strip().split())", "n, m = data[0], data[-1]", "data = data[1:-1]", "print(len(filter(lambda x: x < m, data)))" ]
from sys import stdin def solve(a, b, c): for i in range(10, 101): if i % 3 == a and i % 5 == b and i % 7 == c: print i return print 'No answer' a, b, c = map(int, stdin.readline().strip().split()) solve(a, b, c)
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.5, 0.5455, 0, 0.66, 0.3333, 599, 0, 3, 0, 0, 0, 0, 3 ], [ 6, 1, 0.5, 0.3636, 1, 0.19, ...
[ "from sys import stdin", "def solve(a, b, c):\n for i in range(10, 101):\n if i % 3 == a and i % 5 == b and i % 7 == c:\n print(i)\n return\n print('No answer')", " for i in range(10, 101):\n if i % 3 == a and i % 5 == b and i % 7 == c:\n print(i)\n return", " if i % 3 == a and...
from itertools import product sol = [a*100+b*10+c for a,b,c in product(range(1,10), range(10), range(10)) if a**3+b**3+c**3 == a*100+b*10+c] print '\n'.join(map(str, sol))
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 723, 5, 0, 0, 0, 0, 0, 4 ], [ 8, 0, 1, 0.3333, 0, 0.66, ...
[ "from itertools import product", "sol = [a*100+b*10+c for a,b,c in product(range(1,10), range(10), range(10)) if a**3+b**3+c**3 == a*100+b*10+c]", "print('\\n'.join(map(str, sol)))" ]
from sys import stdin from math import * n = int(stdin.readline().strip()) print sum(map(factorial, range(1,n+1))) % (10**6)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.3333, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.6667,...
[ "from sys import stdin", "from math import *", "n = int(stdin.readline().strip())", "print(sum(map(factorial, range(1,n+1))) % (10**6))" ]
#!/usr/bin/python # -*- coding: utf-8 -*- import serial import time import sys import os if len(sys.argv) == 3: avrdude_parameter1 = "-c stk500v2 -p m8 -v -v -P "+sys.argv[1] avrdude_parameter2 = " -e -U "+sys.argv[2] avrdude_command = "avrdude "+avrdude_parameter1+avrdude_parameter2 os.system('cls') pri...
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 601, 0, 1, 0, 0, 601, 0, 0 ], [ 1, 0, 0.2857, 0.1429, 0, 0.66, 0.3333, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.4286, 0.1429, 0, ...
[ "import serial", "import time", "import sys", "import os" ]
#!/usr/bin/python import os def main(): lists = [ "ISODrivers/Galaxy/galaxy.prx", "ISODrivers/March33/march33.prx", "ISODrivers/March33/march33_620.prx", "ISODrivers/Inferno/inferno.prx", "Popcorn/popcorn.prx", "Satelite/satelite.prx", "Stargate/stargate.prx", "SystemControl/systemctrl.prx", ...
[ [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5357, 0.75, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 3 ], [ 14, 1, 0.4286, 0.4643, 1, 0.79, ...
[ "import os", "def main():\n\tlists = [\n\t\t\t\"ISODrivers/Galaxy/galaxy.prx\",\n\t\t\t\"ISODrivers/March33/march33.prx\",\n\t\t\t\"ISODrivers/March33/march33_620.prx\",\n\t\t\t\"ISODrivers/Inferno/inferno.prx\",\n\t\t\t\"Popcorn/popcorn.prx\",\n\t\t\t\"Satelite/satelite.prx\",", "\tlists = [\n\t\t\t\"ISODriver...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import os, gzip, StringIO gzip.time = FakeTime() def create_gzip(input, output): f_in=open(input, 'rb') temp=StringIO.StringIO() f=gzip.GzipFile(fileobj=temp, mode='wb') f.writelines(f_in) f.close() f_in.close() fout=open(out...
[ [ 3, 0, 0.0909, 0.0682, 0, 0.66, 0, 425, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.1023, 0.0455, 1, 0.76, 0, 654, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 2, 0.1136, 0.0227, 2, 0.98, ...
[ "class FakeTime:\n def time(self):\n return 1225856967.109", " def time(self):\n return 1225856967.109", " return 1225856967.109", "import os, gzip, StringIO", "gzip.time = FakeTime()", "def create_gzip(input, output):\n\tf_in=open(input, 'rb')\n\ttemp=StringIO.StringIO()\n\tf=g...
#!/usr/bin/python from hashlib import * import sys, struct def sha512(psid): if len(psid) != 16: return "".encode() for i in range(512): psid = sha1(psid).digest() return psid def get_psid(str): if len(str) != 32: return "".encode() b = "".encode() for i in range(0, len(str), 2): b += struct.pack('B...
[ [ 1, 0, 0.0652, 0.0217, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.66, 0.2, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2065, 0.1739, 0, 0.66...
[ "from hashlib import *", "import sys, struct", "def sha512(psid):\n\tif len(psid) != 16:\n\t\treturn \"\".encode()\n\n\tfor i in range(512):\n\t\tpsid = sha1(psid).digest()\n\n\treturn psid", "\tif len(psid) != 16:\n\t\treturn \"\".encode()", "\t\treturn \"\".encode()", "\tfor i in range(512):\n\t\tpsid =...
#!/usr/bin/python import sys, hashlib def toNID(name): hashstr = hashlib.sha1(name.encode()).hexdigest().upper() return "0x" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2] if __name__ == "__main__": assert(toNID("sceKernelCpuSuspendIntr") == "0x092968F4") for name in sys.argv[1:]: print ("%s: %s"...
[ [ 1, 0, 0.2308, 0.0769, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 2, 0, 0.4615, 0.2308, 0, 0.66, 0.5, 259, 0, 1, 1, 0, 0, 0, 4 ], [ 14, 1, 0.4615, 0.0769, 1, 0.28...
[ "import sys, hashlib", "def toNID(name):\n\thashstr = hashlib.sha1(name.encode()).hexdigest().upper()\n\treturn \"0x\" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2]", "\thashstr = hashlib.sha1(name.encode()).hexdigest().upper()", "\treturn \"0x\" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + ha...
#!/usr/bin/python """ pspbtcnf_editor: An script that add modules from pspbtcnf """ import sys, os, re from getopt import * from struct import * BTCNF_MAGIC=0x0F803001 verbose = False def print_usage(): print ("%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]" %(os.path...
[ [ 8, 0, 0.022, 0.0165, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0385, 0.0055, 0, 0.66, 0.0769, 509, 0, 3, 0, 0, 509, 0, 0 ], [ 1, 0, 0.044, 0.0055, 0, 0.66, ...
[ "\"\"\"\npspbtcnf_editor: An script that add modules from pspbtcnf\n\"\"\"", "import sys, os, re", "from getopt import *", "from struct import *", "BTCNF_MAGIC=0x0F803001", "verbose = False", "def print_usage():\n\tprint (\"%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]\" ...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import sys, os, struct, gzip, hashlib, StringIO gzip.time = FakeTime() def binary_replace(data, newdata, offset): return data[0:offset] + newdata + data[offset+len(newdata):] def prx_compress(output, hdr, input, mod_name="", mod_a...
[ [ 3, 0, 0.0488, 0.0366, 0, 0.66, 0, 425, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.0549, 0.0244, 1, 0.19, 0, 654, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 2, 0.061, 0.0122, 2, 0.6, ...
[ "class FakeTime:\n def time(self):\n return 1225856967.109", " def time(self):\n return 1225856967.109", " return 1225856967.109", "import sys, os, struct, gzip, hashlib, StringIO", "gzip.time = FakeTime()", "def binary_replace(data, newdata, offset):\n\treturn data[0:offset] + ...
#coding:utf8 ''' google appengine album author: smallfish <smallfish.xy@gmail.com> create: 2009-08-04 ''' import os import wsgiref.handlers import logging import web from mako.template import Template from mako.lookup import TemplateLookup import google.appengine.ext import db import google.appengine.api impor...
[ [ 8, 0, 0.1552, 0.2069, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2759, 0.0345, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3103, 0.0345, 0, 0.66...
[ "'''\n google appengine album\n author: smallfish <smallfish.xy@gmail.com>\n create: 2009-08-04\n\n'''", "import os", "import wsgiref.handlers", "import logging", "import web", "from mako.template import Template", "from mako.lookup import TemplateLookup", "BASE_DIR = os.path.dirname(__file__)", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _checkconn.py: Check connect to a specified server. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a cop...
[ [ 14, 0, 0.1806, 0.0139, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2083, 0.0139, 0, 0.66, 0.2, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.2361, 0.0139, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "from PyQt4 import QtCore", "import sys", "sys.path.append(\"..\")", "from util import CommonUtil", "class QSubChkConnection(QtCore.QThread):\n \"\"\"\n QSubChkConnection is a subclass of :class:`PyQt4.QtCore.QThread`. This\n class contains methods...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _update.py: Fetch the latest data file. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy of the GNU...
[ [ 14, 0, 0.0867, 0.0067, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1, 0.0067, 0, 0.66, 0.1111, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1067, 0.0067, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "import socket", "import urllib", "from PyQt4 import QtCore", "from util_ui import _translate", "import sys", "sys.path.append(\"..\")", "from util import CommonUtil", "class QSubFetchUpdate(QtCore.QThread):\n \"\"\"\n QSubFetchUp...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # language.py : Language utilities used in GUI module. # # Copyleft (C) 2013 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have...
[ [ 14, 0, 0.1574, 0.0093, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1759, 0.0093, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 3, 0, 0.6019, 0.8056, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import locale", "class LangUtil(object):\n \"\"\"\n LangUtil contains a set of language tools for Hosts Setup Utility to\n use.\n\n .. note:: All methods from this class are declared as `classmethod`.\n\n :ivar dict language: Supported localized l...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '../pyqt\util_ui.ui' # # Created: Wed Jan 22 13:03:09 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 excep...
[ [ 1, 0, 0.0297, 0.003, 0, 0.66, 0, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 7, 0, 0.0415, 0.0148, 0, 0.66, 0.1667, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 1, 0.0386, 0.003, 1, 0.53,...
[ "from PyQt4 import QtCore, QtGui", "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n def _fromUtf8(s):\n return s", " _fromUtf8 = QtCore.QString.fromUtf8", " def _fromUtf8(s):\n return s", " return s", "try:\n _encoding = QtGui.QApplication.UnicodeUT...
# -*- coding: utf-8 -*- # Resource object code # # Created: 周三 1月 22 13:03:07 2014 # by: The Resource Compiler for PyQt (Qt v4.8.5) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x04\xf8\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48...
[ [ 1, 0, 0.0028, 0.0003, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 14, 0, 0.482, 0.9575, 0, 0.66, 0.1667, 131, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9754, 0.0288, 0, 0...
[ "from PyQt4 import QtCore", "qt_resource_data = \"\\\n\\x00\\x00\\x04\\xf8\\\n\\x89\\\n\\x50\\x4e\\x47\\x0d\\x0a\\x1a\\x0a\\x00\\x00\\x00\\x0d\\x49\\x48\\x44\\x52\\x00\\\n\\x00\\x00\\x20\\x00\\x00\\x00\\x20\\x08\\x06\\x00\\x00\\x00\\x73\\x7a\\x7a\\xf4\\\n\\x00\\x00\\x00\\x19\\x74\\x45\\x58\\x74\\x53\\x6f\\x66\\x7...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # qdialog_slots.py : Qt slots response to signals on the main dialog. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. Yo...
[ [ 14, 0, 0.0491, 0.0029, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0549, 0.0029, 0, 0.66, 0.1, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0578, 0.0029, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import shutil", "import time", "from PyQt4 import QtCore, QtGui", "from language import LangUtil", "from qdialog_d import QDialogDaemon", "from util_ui import _translate", "import sys", "sys.path.append(\"..\")", "from util import RetrieveData", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __list_trans.py : Name of items from the function list to be localized # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3....
[ [ 14, 0, 0.3617, 0.0213, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.4043, 0.0213, 0, 0.66, 0.5, 431, 0, 1, 0, 0, 431, 0, 0 ], [ 14, 0, 0.7553, 0.5106, 0, 0.6...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "from util_ui import _translate", "__list_trans = [\n _translate(\"Util\", \"customize\", None),\n _translate(\"Util\", \"google\", None),\n _translate(\"Util\", \"google-apis\", None),\n _translate(\"Util\", \"google(cn)\", None),\n _translate(\"U...
#!/usr/bin/python # -*- coding: utf-8 -*- # # _pyuic4.py : Tools update the UI code from UI design # # Copyleft (C) 2013 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have rec...
[ [ 1, 0, 0.5312, 0.0312, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.5938, 0.0312, 0, 0.66, 0.5, 131, 1, 0, 0, 0, 0, 3, 0 ], [ 6, 0, 0.8281, 0.375, 0, 0.66,...
[ "import os", "PROJ_DIR = '../'", "for root, dirs, files in os.walk(PROJ_DIR):\n for f in files:\n file_path = os.path.join(root, f)\n out_path = os.path.join(PROJ_DIR, f.rsplit('.', 1)[0])\n if f.endswith('.ui'):\n os.system('pyuic4 -o %s.py -x %s' % (out_path, file_path))\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _pylupdate4.py : Tools to update the language files for UI # # Copyleft (C) 2013 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should ...
[ [ 1, 0, 0.7727, 0.0455, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 6, 0, 0.9318, 0.1818, 0, 0.66, 1, 129, 3, 0, 0, 0, 0, 0, 3 ], [ 6, 1, 0.9545, 0.1364, 1, 0.98, ...
[ "import os", "for root, dirs, files in os.walk('.'):\n for f in files:\n if f.endswith('.pro'):\n os.system('pylupdate4 %s' % f)", " for f in files:\n if f.endswith('.pro'):\n os.system('pylupdate4 %s' % f)", " if f.endswith('.pro'):\n os.system('pyl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # qdialog_d.py : Operations on the main dialog. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have receiv...
[ [ 14, 0, 0.0386, 0.0023, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0432, 0.0023, 0, 0.66, 0.0714, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0455, 0.0023, 0, 0...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "import shutil", "from zipfile import BadZipfile", "from PyQt4 import QtCore, QtGui", "from _checkconn import QSubChkConnection", "from _checkupdate import QSubChkUpdate", "from _make import QSubMakeHosts", "from _update import QSubFetchU...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __doc__.py : Document in reST format of gui module. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a cop...
[ [ 8, 0, 0.5275, 0.9495, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\n.. _gui-module:\n\nGraphical User Interface (GUI)\n==============================\n\nThe following sections describe the objects and methods from the Graphical\nUser Interface (GUI) module of huhamhire-hosts HostsUtil. The methods to make" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # hostsutil.py : Main entrance to GUI module of Hosts Setup Utility. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You...
[ [ 14, 0, 0.1328, 0.0078, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1484, 0.0078, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1641, 0.0078, 0, 0....
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import sys", "from zipfile import BadZipfile", "from qdialog_slots import QDialogSlots", "sys.path.append(\"..\")", "from util import RetrieveData, CommonUtil", "LANG_DIR = \"./gui/lang/\"", "class HostsUtil(QDialogSlots):\n \"\"\"\n HostsUtil cl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # qdialog_ui.py : Draw the Graphical User Interface. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have r...
[ [ 14, 0, 0.0295, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0329, 0.0017, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0364, 0.0017, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "from PyQt4 import QtCore, QtGui", "import sys", "sys.path.append(\"..\")", "from util import RetrieveData, CommonUtil", "from __version__ import __version__, __release__", "from language import LangUtil", "from util_ui import Ui_Util, _t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py : Declare modules to be called in gui module. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received...
[ [ 1, 0, 0.8667, 0.0667, 0, 0.66, 0, 195, 0, 1, 0, 0, 195, 0, 0 ], [ 14, 0, 1, 0.0667, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "from hostsutil import HostsUtil", "__all__ = [\"HostsUtil\"]" ]
# -*- coding: utf-8 -*- # Resource object code # # Created: 周三 1月 22 13:03:07 2014 # by: The Resource Compiler for PyQt (Qt v4.8.5) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x01\x57\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48...
[ [ 1, 0, 0.068, 0.0068, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 14, 0, 0.3878, 0.619, 0, 0.66, 0.1667, 131, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.7925, 0.1769, 0, 0....
[ "from PyQt4 import QtCore", "qt_resource_data = \"\\\n\\x00\\x00\\x01\\x57\\\n\\x89\\\n\\x50\\x4e\\x47\\x0d\\x0a\\x1a\\x0a\\x00\\x00\\x00\\x0d\\x49\\x48\\x44\\x52\\x00\\\n\\x00\\x00\\x09\\x00\\x00\\x00\\x09\\x08\\x06\\x00\\x00\\x00\\xe0\\x91\\x06\\x10\\\n\\x00\\x00\\x00\\x09\\x70\\x48\\x59\\x73\\x00\\x00\\x0e\\xc...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _checkupdate.py: Check update info of the latest data file. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have receiv...
[ [ 14, 0, 0.1688, 0.013, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1948, 0.013, 0, 0.66, 0.1667, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.2078, 0.013, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import json", "import socket", "import urllib", "from PyQt4 import QtCore", "from util_ui import _translate", "class QSubChkUpdate(QtCore.QThread):\n \"\"\"\n QSubChkConnection is a subclass of :class:`PyQt4.QtCore.QThread`. This\n class contain...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _make.py: Make a new hosts file. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy of the GNU Genera...
[ [ 14, 0, 0.0963, 0.0074, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1111, 0.0074, 0, 0.66, 0.1429, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.1185, 0.0074, 0, 0...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import time", "from PyQt4 import QtCore", "import sys", "sys.path.append(\"..\")", "from util import RetrieveData", "from util import MakeHosts", "class QSubMakeHosts(QtCore.QThread, MakeHosts):\n \"\"\"\n QSubMakeHosts is a subclass of :class:`P...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _build.py : Tools to make packages for different platforms # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should ...
[ [ 14, 0, 0.0494, 0.0029, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0552, 0.0029, 0, 0.66, 0.05, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0581, 0.0029, 0, 0.6...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "import sys", "import shutil", "from __version__ import __version__", "SCRIPT = \"hoststool.py\"", "SCRIPT_DIR = os.getcwd() + '/'", "RELEASE_DIR = \"../release/\"", "NAME = \"HostsUtl\"", "VERSION = __version__", "DESCRIPTION = \"Hos...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # retrievedata.py : Retrieve data from the hosts data file. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # ...
[ [ 14, 0, 0.0536, 0.0032, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0599, 0.0032, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0631, 0.0032, 0, 0...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "import sqlite3", "import zipfile", "DATAFILE = \"./hostslist.data\"", "DATABASE = \"./hostslist.s3db\"", "class RetrieveData(object):\n \"\"\"\n RetrieveData class contains a set of tools to retrieve information from\n the hosts dat...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # makehosts.py: Make a hosts file. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy of the GNU Genera...
[ [ 14, 0, 0.0625, 0.0048, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0721, 0.0048, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0769, 0.0048, 0, 0.6...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "import time", "from retrievedata import RetrieveData", "class MakeHosts(object):\n \"\"\"\n MakeHosts class contains methods to make a hosts file with host entries\n from a single data file.\n\n :ivar str make_mode: Operation mode fo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __doc__.py : Document in reST format of util module. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a co...
[ [ 8, 0, 0.6579, 0.7105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\nShared Utilities\n================\n\nThe module described in this chapter provides shared utilities\n\n\nCommonUtil" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py: Declare modules to be called in util module. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received...
[ [ 1, 0, 0.7647, 0.0588, 0, 0.66, 0, 718, 0, 1, 0, 0, 718, 0, 0 ], [ 1, 0, 0.8235, 0.0588, 0, 0.66, 0.3333, 657, 0, 1, 0, 0, 657, 0, 0 ], [ 1, 0, 0.8824, 0.0588, 0, ...
[ "from common import CommonUtil", "from makehosts import MakeHosts", "from retrievedata import RetrieveData", "__all__ = [\"CommonUtil\", \"MakeHosts\", \"RetrieveData\"]" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # common.py : Basic utilities used by Hosts Setup Utility. # # Copyleft (C) 2013 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # h...
[ [ 14, 0, 0.0664, 0.0039, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0742, 0.0039, 0, 0.66, 0.1429, 272, 0, 1, 0, 0, 272, 0, 0 ], [ 1, 0, 0.0781, 0.0039, 0, 0...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import ConfigParser", "import math", "import os", "import sys", "import socket", "import time", "class CommonUtil(object):\n \"\"\"\n CommonUtil class contains a set of basic tools for Hosts Setup Utility to\n use.\n\n .. note:: All methods...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __doc__.py Document in reST format of tui module. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy ...
[ [ 8, 0, 0.6091, 0.8, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\n.. _tui-module:\n\nText-based User Interface (TUI)\n===============================\n\nThe following sections describe the objects and methods from the Text-based\nUser Interface (TUI) module of huhamhire-hosts HostsUtil. The methods to make" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # hostsutil.py: Start a TUI session of `Hosts Setup Utility`. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have receiv...
[ [ 14, 0, 0.0734, 0.0056, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0847, 0.0056, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.096, 0.0056, 0, 0.6...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "from zipfile import BadZipfile", "from curses_d import CursesDaemon", "import sys", "sys.path.append(\"..\")", "from util import CommonUtil, RetrieveData", "class HostsUtil(CursesDaemon):\n \"\"\"\n HostsUtil class in :mod:`tui` modu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # curses_d.py: Operations for TUI window. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy of the GNU...
[ [ 14, 0, 0.0254, 0.002, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0294, 0.002, 0, 0.66, 0.0769, 480, 0, 1, 0, 0, 480, 0, 0 ], [ 1, 0, 0.0313, 0.002, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import curses", "import json", "import os", "import shutil", "import socket", "import urllib", "import sys", "from curses_ui import CursesUI", "from _update import FetchUpdate", "sys.path.append(\"..\")", "from util import CommonUtil, RetrieveD...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py: Declare modules to be called in tui module. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received ...
[ [ 1, 0, 0.8667, 0.0667, 0, 0.66, 0, 195, 0, 1, 0, 0, 195, 0, 0 ], [ 14, 0, 1, 0.0667, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "from hostsutil import HostsUtil", "__all__ = [\"HostsUtil\"]" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # curses_ui.py: Draw TUI using curses. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy of the GNU Ge...
[ [ 14, 0, 0.0223, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0257, 0.0017, 0, 0.66, 0.1429, 480, 0, 1, 0, 0, 480, 0, 0 ], [ 1, 0, 0.0274, 0.0017, 0, 0...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import curses", "import locale", "import sys", "sys.path.append(\"..\")", "from util import CommonUtil", "from __version__ import __version__, __release__", "class CursesUI(object):\n \"\"\"\n CursesUI class contains methods to draw the Text-base...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __version__.py : Version info for Hosts Setup Tool. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have ...
[ [ 14, 0, 0.8947, 0.0526, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9474, 0.0526, 0, 0.66, 0.5, 251, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 1, 0.0526, 0, 0.66, ...
[ "__version__ = \"1.9.8-SE\"", "__release__ = \"beta\"", "__revision__ = \"$Id$\"" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # hoststool.py : Launch the utility. # # Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy o...
[ [ 14, 0, 0.1097, 0.0065, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1226, 0.0065, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1355, 0.0065, 0, 0.66...
[ "__author__ = \"huhamhire <me@huhamhire.com>\"", "import os", "from optparse import OptionParser", "import gui", "import tui", "from __version__ import __version__", "import sys", "sys.path.append(\"..\")", "from util import CommonUtil", "class UtilLauncher(object):\n \"\"\"\n HostsUtil clas...
#! /usr/local/bin/python import os import sys #BASIC SCRIPT PRESETS width = 320 # Width of your game in 'true' pixels (ignoring zoom) height = 240 # Height of your game in 'true' pixels zoom = 2 # How chunky you want your pixels src = 'src/' # Name of the source folder under the project folder (if there ...
[ [ 1, 0, 0.0137, 0.0068, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0205, 0.0068, 0, 0.66, 0.0096, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0411, 0.0068, 0, ...
[ "import os", "import sys", "width = 320\t\t\t\t\t# Width of your game in 'true' pixels (ignoring zoom)", "height = 240\t\t\t\t# Height of your game in 'true' pixels", "zoom = 2\t\t\t\t\t# How chunky you want your pixels", "src = 'src/'\t\t\t\t# Name of the source folder under the project folder (if there ...
#! /usr/local/bin/python import os import sys #BASIC SCRIPT PRESETS width = 320 # Width of your game in 'true' pixels (ignoring zoom) height = 240 # Height of your game in 'true' pixels zoom = 2 # How chunky you want your pixels src = 'src/' # Name of the source folder under the project folder (if there ...
[ [ 1, 0, 0.0137, 0.0068, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0205, 0.0068, 0, 0.66, 0.0096, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0411, 0.0068, 0, ...
[ "import os", "import sys", "width = 320\t\t\t\t\t# Width of your game in 'true' pixels (ignoring zoom)", "height = 240\t\t\t\t# Height of your game in 'true' pixels", "zoom = 2\t\t\t\t\t# How chunky you want your pixels", "src = 'src/'\t\t\t\t# Name of the source folder under the project folder (if there ...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
[ [ 1, 0, 0.3514, 0.0135, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3649, 0.0135, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.3784, 0.0135, 0, ...
[ "import os", "import re", "import tempfile", "import shutil", "ignore_pattern = re.compile('^(.svn|target|bin|classes)')", "java_pattern = re.compile('^.*\\.java')", "annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')", "def process_dir(dir):\n files = os.listdir(dir)\n for...
#!/usr/bin/env python # -*- encoding:utf8 -*- # protoc-gen-erl # Google's Protocol Buffers project, ported to lua. # https://code.google.com/p/protoc-gen-lua/ # # Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com # All rights reserved. # # Use, modification and distribution are subject to the "New BSD License" #...
[ [ 1, 0, 0.0289, 0.0022, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0311, 0.0022, 0, 0.66, 0.0417, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0333, 0.0022, 0, 0....
[ "import sys", "import os.path as path", "from cStringIO import StringIO", "import plugin_pb2", "import google.protobuf.descriptor_pb2 as descriptor_pb2", "_packages = {}", "_files = {}", "_message = {}", "FDP = plugin_pb2.descriptor_pb2.FieldDescriptorProto", "if sys.platform == \"win32\":\n im...
#!/usr/bin/python # # Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.0281, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0347, 0.0017, 0, 0.66, 0.0303, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.0364, 0.0017, 0, 0...
[ "__author__ = 'afshar@google.com (Ali Afshar)'", "import sys", "sys.path.insert(0, 'lib')", "import os", "import httplib2", "import sessions", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp.util import run_wsgi_app", "from google.appengine.ext import db", "from google...
#!/usr/bin/python # # Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.0557, 0.0033, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0689, 0.0033, 0, 0.66, 0.0333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0721, 0.0033, 0, 0...
[ "__author__ = 'afshar@google.com (Ali Afshar)'", "import os", "import httplib2", "import sessions", "from google.appengine.ext import db", "from google.appengine.ext.webapp import template", "from apiclient.discovery import build_from_document", "from apiclient.http import MediaUpload", "from oauth2...
# This is the version of this source code. manual_verstr = "1.5" auto_build_num = "211" verstr = manual_verstr + "." + auto_build_num try: from pyutil.version_class import Version as pyutil_Version __version__ = pyutil_Version(verstr) except (ImportError, ValueError): # Maybe there is no pyutil insta...
[ [ 14, 0, 0.1667, 0.0556, 0, 0.66, 0, 189, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0.66, 0.3333, 295, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.6111, 0.0556, 0, 0...
[ "manual_verstr = \"1.5\"", "auto_build_num = \"211\"", "verstr = manual_verstr + \".\" + auto_build_num", "try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.3, 0.575, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.025, 0, 0.66, 0.3333, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.65, 0.025, 0, 0.66, 0.6...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.2927, 0.561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0.25, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
# Copyright 2011 Google Inc. All Rights Reserved. """Multi-credential file store with lock support. This module implements a JSON credential store where multiple credentials can be stored in one file. That file supports locking both in a single process and across processes. The credential themselves are keyed off o...
[ [ 8, 0, 0.0437, 0.0741, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0847, 0.0026, 0, 0.66, 0.0588, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0899, 0.0026, 0, 0.66,...
[ "\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id", "__author__ = 'jb...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0145, 0.0035, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0176, 0.0009, 0, 0.66, 0.0244, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0193, 0.0009, 0, 0.66,...
[ "\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import base64", "import clientsecrets", "import copy", "import datetime", "import httplib2", "import logging", "import os", "import sys", "im...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1604, 0.0472, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1981, 0.0094, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.217, 0.0094, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import os", "import stat", "import threading", "from anyjson import simplejson", "from client import Storage as BaseStorage", "from clien...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1371, 0.0403, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1694, 0.0081, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1855, 0.0081, 0, 0.66,...
[ "\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import oauth2client", "import base64", "import pickle", "from django.db import models", "from oauth2client.client import St...
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ [ 1, 0, 0.0738, 0.0041, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0779, 0.0041, 0, 0.66, 0.0625, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.082, 0.0041, 0, 0...
[ "import base64", "import hashlib", "import logging", "import time", "from OpenSSL import crypto", "from anyjson import simplejson", "CLOCK_SKEW_SECS = 300 # 5 minutes in seconds", "AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds", "MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds", "cla...
# Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1619, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0095, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2286, 0.0095, 0, 0.66, ...
[ "\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from anyjson import simplejson", "TYPE_WEB = 'web'", "TYPE_INSTALL...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #...
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, ...
[ "import Cookie", "import datetime", "import time", "import email.utils", "import calendar", "import base64", "import hashlib", "import hmac", "import re", "import logging", "class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ...
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
[ [ 8, 0, 0.0814, 0.1105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1453, 0.0058, 0, 0.66, 0.0833, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1512, 0.0058, 0, 0.66...
[ "\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1", "__v...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0342, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0414, 0.0021, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0476, 0.0021, 0, 0.66,...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import copy", "import httplib2", "import logging", "import oauth2 as oauth", "import urllib", "import urlparse", "from anyjson import simplejson", "tr...
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...