code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/python -w import subprocess import math # This code does not need to be very fast; it will have maybe 2-3 ops per frame. class Matrix4(object): def __init__(self, coefficients): """Initialize the matrix from the given coefficients""" assert len(coefficients) == 4 for c in coeffic...
[ [ 1, 0, 0.0144, 0.0072, 0, 0.66, 0, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0216, 0.0072, 0, 0.66, 0.2, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 3, 0, 0.259, 0.4388, 0, 0.66...
[ "import subprocess", "import math", "class Matrix4(object):\n def __init__(self, coefficients):\n \"\"\"Initialize the matrix from the given coefficients\"\"\"\n assert len(coefficients) == 4\n for c in coefficients:\n assert len(c) == 4\n self.coeff = tuple(map(tuple,c...
#!/usr/bin/python -w import subprocess import math # This code does not need to be very fast; it will have maybe 2-3 ops per frame. class Matrix4(object): def __init__(self, coefficients): """Initialize the matrix from the given coefficients""" assert len(coefficients) == 4 for c in coeffic...
[ [ 1, 0, 0.0144, 0.0072, 0, 0.66, 0, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0216, 0.0072, 0, 0.66, 0.2, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 3, 0, 0.259, 0.4388, 0, 0.66...
[ "import subprocess", "import math", "class Matrix4(object):\n def __init__(self, coefficients):\n \"\"\"Initialize the matrix from the given coefficients\"\"\"\n assert len(coefficients) == 4\n for c in coefficients:\n assert len(c) == 4\n self.coeff = tuple(map(tuple,c...
'''########################################################################################################################### ### File: Player.py ### Name: Patrick Delaney, Tom WIlliams, John Mannix ### Class: CSE 487 ### Instructor: Dr.Zmuda ### Assignment: Assignment 3 ### Files included: Utilities.py, brickou...
[ [ 8, 0, 0.0724, 0.1316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.2039, 0.0263, 0, 0.66, 0.0526, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2237, 0.0132, 0, 0.66, ...
[ "'''###########################################################################################################################\n### File: Player.py\n### Name: Patrick Delaney, Tom WIlliams, John Mannix\n### Class: CSE 487\n### Instructor: Dr.Zmuda\n### Assignment: Assignment 3\n### Files included: Utilities.py, br...
from pandac.PandaModules import * class Picker: def __init__(self, parent=None, fromMask=BitMask32(0), collideWithGeom=False, intoMask=BitMask32(0)): if (parent==None): parent = camera self.cRay = CollisionRay() self.cNode = CollisionNode('PickRay') self.cNode.ad...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 6, 0, 1, 0, 0, 6, 0, 0 ], [ 3, 0, 0.5375, 0.95, 0, 0.66, 1, 223, 0, 4, 0, 0, 0, 0, 29 ], [ 2, 1, 0.275, 0.375, 1, 0.4, 0, ...
[ "from pandac.PandaModules import *", "class Picker:\n def __init__(self, parent=None, fromMask=BitMask32(0), collideWithGeom=False, intoMask=BitMask32(0)):\n if (parent==None):\n parent = camera\n self.cRay = CollisionRay()\n self.cNode = CollisionNode('PickRay')\n self.c...
'''########################################################################################################################### ### File: Objects.py ### Name: Patrick Delaney, Tom Williams, John Mannix ### Class: CSE 487 ### Instructor: Dr.Zmuda ### Assignment: Assignment 3 ### Files included: Utilities.py, bricko...
[ [ 8, 0, 0.0786, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.2214, 0.0286, 0, 0.66, 0.0833, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2429, 0.0143, 0, 0.66, ...
[ "'''###########################################################################################################################\n### File: Objects.py\n### Name: Patrick Delaney, Tom Williams, John Mannix\n### Class: CSE 487\n### Instructor: Dr.Zmuda\n### Assignment: Assignment 3\n### Files included: Utilities.py, b...
'''########################################################################################################################### ### File: Utilities.py ### Name: Patrick Delaney ### Class: CSE 487 ### Instructor: Dr.Zmuda ### Assignment: Assignment 3 ### Files included: Utilities.py, brickout.py ### Description: T...
[ [ 8, 0, 0.0519, 0.0943, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.1462, 0.0189, 0, 0.66, 0.0455, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1604, 0.0094, 0, 0.66, ...
[ "'''###########################################################################################################################\n### File: Utilities.py\n### Name: Patrick Delaney\n### Class: CSE 487\n### Instructor: Dr.Zmuda\n### Assignment: Assignment 3\n### Files included: Utilities.py, brickout.py\n### Descripti...
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 14, 0, 0.2727, 0.0909, 0, 0.66, 0.1111, 15, 3, 0, 0, 0, 654, 10, 1 ], [ 14, 0, 0.3636, 0.0909, 0, ...
[ "import time", "t = time.time()", "u = time.gmtime(t)", "s = time.strftime('%a, %e %b %Y %T GMT', u)", "print('Content-Type: text/javascript')", "print('Cache-Control: no-cache')", "print('Date: ' + s)", "print('Expires: ' + s)", "print('')", "print('var timeskew = new Date().getTime() - ' + str(t...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
[ [ 1, 0, 0.0588, 0.0118, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0824, 0.0118, 0, 0...
[ "import logging", "import shutil", "import sys", "import urlparse", "import SimpleHTTPServer", "import BaseHTTPServer", "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
[ [ 8, 0, 0.0631, 0.0991, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.1351, 0.009, 0, 0.66, 0....
[ "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD", "import httplib", "import os", "import re", "import sys", "import urllib", "import urllib2", "import urlparse", "import user", "from xml....
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
[ [ 1, 0, 0.0201, 0.0067, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0336, 0.0067, 0, ...
[ "import datetime", "import sys", "import textwrap", "import common", "from xml.dom import pulldom", "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;", "BOOLEAN_STANZA = \"\"\"\\\n } else i...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 1, 0, 0.0526, 0.0088, 0, ...
[ "import logging", "from xml.dom import minidom", "from xml.dom import pulldom", "BOOLEAN = \"boolean\"", "STRING = \"String\"", "GROUP = \"Group\"", "DEFAULT_INTERFACES = ['FoursquareType']", "INTERFACES = {\n}", "DEFAULT_CLASS_IMPORTS = [\n]", "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP...
#==================================================================== # 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...
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.78, ...
[ "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.27,...
[ "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.9, 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.68, ...
[ "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))" ]
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.74, ...
[ "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.71,...
[ "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.75, 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.89, ...
[ "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))" ]
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) # @author Sam Pullara, samp@yahoo-inc.com import logging import wsgiref.handlers import os from google.appengine.ext.webapp import templat...
[ [ 1, 0, 0.0424, 0.0085, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0508, 0.0085, 0, 0.66, 0.0476, 709, 0, 1, 0, 0, 709, 0, 0 ], [ 1, 0, 0.0593, 0.0085, 0, ...
[ "import logging", "import wsgiref.handlers", "import os", "from google.appengine.ext.webapp import template", "from datetime import datetime", "from google.appengine.ext import webapp", "from google.appengine.ext import db", "from google.appengine.api import users", "from yos.boss.ysearch import sea...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) """ A simple text library for normalizing, cleaning, and overlapping strings """ __author__ = "Vik Singh (viksi@yahoo-inc.com)" STOPWORD...
[ [ 8, 0, 0.1316, 0.0263, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1842, 0.0263, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2632, 0.0789, 0, 0.66,...
[ "\"\"\" A simple text library for normalizing, cleaning, and overlapping strings \"\"\"", "__author__ = \"Vik Singh (viksi@yahoo-inc.com)\"", "STOPWORDS = set([\"I\", \"a\", \"about\", \"an\", \"are\", \"as\", \"at\", \"be\", \"by\", \"com\", \"de\", \"en\", \"for\", \"from\",\n \"how\", \"in\",...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __all__ = ["console", "text", "typechecks"]
[ [ 14, 0, 1, 0.25, 0, 0.66, 0, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "__all__ = [\"console\", \"text\", \"typechecks\"]" ]
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __author__ = "Vik Singh (viksi@yahoo-inc.com)" from yos.crawl import object_dict from types import DictType, ListType, TupleType OBJ_DIC...
[ [ 14, 0, 0.2632, 0.0526, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3684, 0.0526, 0, 0.66, 0.1667, 48, 0, 1, 0, 0, 48, 0, 0 ], [ 1, 0, 0.4211, 0.0526, 0, 0.6...
[ "__author__ = \"Vik Singh (viksi@yahoo-inc.com)\"", "from yos.crawl import object_dict", "from types import DictType, ListType, TupleType", "OBJ_DICT_TYPE = type(object_dict.object_dict())", "def is_dict(td):\n return td is DictType or td is OBJ_DICT_TYPE", " return td is DictType or td is OBJ_DICT_TYPE...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __author__ = "Vik Singh (viksi@yahoo-inc.com)" def strfix(msg): """ Copies this recipe: http://aspn.activestate.com/ASPN/Cookbook/Pyt...
[ [ 14, 0, 0.1351, 0.027, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.5541, 0.7568, 0, 0.66, 0.5, 928, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.2568, 0.1081, 1, 0.24, ...
[ "__author__ = \"Vik Singh (viksi@yahoo-inc.com)\"", "def strfix(msg):\n \"\"\"\n Copies this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/523011\n Constants out any characters that spew encoding errors\n \"\"\"\n goodchars = {}\n try:\n return str(msg)", " \"\"\"\n Copies this reci...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __all__ = ["ysearch"]
[ [ 14, 0, 1, 0.25, 0, 0.66, 0, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "__all__ = [\"ysearch\"]" ]
#! /usr/bin/env python # -*- coding: iso-8859-15 -*- """ Dictionary to XML - Library to convert a python dictionary to XML output Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com> Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz Revision 1.0 2007/12/15 11:57:20 Maurizio - ...
[ [ 8, 0, 0.0798, 0.0851, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1383, 0.0106, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1489, 0.0106, 0, 0.66...
[ "\"\"\" Dictionary to XML - Library to convert a python dictionary to XML output\n Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com>\n Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz\n\n Revision 1.0 2007/12/15 11:57:20 Maurizio\n - First stable version\n\n\"\"\"", "__aut...
#!/usr/local/bin/python25 # Thunder Chen<nkchenz@gmail.com> 2007.9.1 # # import xml.etree.ElementTree as ET from object_dict import object_dict def __parse_node(node): tmp = object_dict() # save attrs and text, hope there will not be a child with same name if node.text: tmp['value'] = node.text ...
[ [ 1, 0, 0.0952, 0.0159, 0, 0.66, 0, 902, 0, 1, 0, 0, 902, 0, 0 ], [ 1, 0, 0.1111, 0.0159, 0, 0.66, 0.2, 814, 0, 1, 0, 0, 814, 0, 0 ], [ 2, 0, 0.3175, 0.3651, 0, 0.6...
[ "import xml.etree.ElementTree as ET", "from object_dict import object_dict", "def __parse_node(node):\n tmp = object_dict()\n # save attrs and text, hope there will not be a child with same name\n if node.text:\n tmp['value'] = node.text\n for (k,v) in node.attrib.items():\n tmp[k] = v...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) """ Functions for downloading REST API's and converting their responses into dictionaries """ __author__ = "Vik Singh (viksi@yahoo-inc.co...
[ [ 8, 0, 0.1515, 0.0303, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2121, 0.0303, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2727, 0.0303, 0, 0.66, ...
[ "\"\"\" Functions for downloading REST API's and converting their responses into dictionaries \"\"\"", "__author__ = \"Vik Singh (viksi@yahoo-inc.com)\"", "import logging", "import xml2dict", "from django.utils import simplejson", "from google.appengine.api import urlfetch", "HEADERS = {\"User-Agent\": ...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __all__ = ["dict2xml", "object_dict", "rest", "xml2dict"]
[ [ 14, 0, 1, 0.25, 0, 0.66, 0, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "__all__ = [\"dict2xml\", \"object_dict\", \"rest\", \"xml2dict\"]" ]
# object_dict # Thunder Chen<nkchenz@gmail.com> 2007 # Provided as-is; use at your own risk; no warranty; no promises; enjoy! class object_dict(dict): """object view of dict, you can >>> a = object_dict() >>> a.fish = 'fish' >>> a['fish'] 'fish' >>> a['water'] = 'water' >>> a.water 'wa...
[ [ 3, 0, 0.4634, 0.7073, 0, 0.66, 0, 814, 0, 3, 0, 0, 827, 0, 5 ], [ 8, 1, 0.2927, 0.3171, 1, 0.1, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.5, 0.0976, 1, 0.1, 0.33...
[ "class object_dict(dict):\n \"\"\"object view of dict, you can \n >>> a = object_dict()\n >>> a.fish = 'fish'\n >>> a['fish']\n 'fish'\n >>> a['water'] = 'water'\n >>> a.water", " \"\"\"object view of dict, you can \n >>> a = object_dict()\n >>> a.fish = 'fish'\n >>> a['fish']\n ...
#! /usr/bin/env python # -*- coding: iso-8859-15 -*- """ Dictionary to XML - Library to convert a python dictionary to XML output Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com> Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz Revision 1.0 2007/12/15 11:57:20 Maurizio - ...
[ [ 8, 0, 0.0798, 0.0851, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1383, 0.0106, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1489, 0.0106, 0, 0.66...
[ "\"\"\" Dictionary to XML - Library to convert a python dictionary to XML output\n Copyleft (C) 2007 Pianfetti Maurizio <boymix81@gmail.com>\n Package site : http://boymix81.altervista.org/files/dict2xml.tar.gz\n\n Revision 1.0 2007/12/15 11:57:20 Maurizio\n - First stable version\n\n\"\"\"", "__aut...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __all__ = ["boss", "crawl", "yql"]
[ [ 14, 0, 1, 0.25, 0, 0.66, 0, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "__all__ = [\"boss\", \"crawl\", \"yql\"]" ]
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) """ Some handy user defined functions to plug in db.select """ __author__ = "Vik Singh (viksi@yahoo-inc.com)" from util.typechecks impor...
[ [ 8, 0, 0.2083, 0.0417, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2917, 0.0417, 0, 0.66, 0.3333, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.375, 0.0417, 0, 0.66, ...
[ "\"\"\" Some handy user defined functions to plug in db.select \"\"\"", "__author__ = \"Vik Singh (viksi@yahoo-inc.com)\"", "from util.typechecks import is_dict", "def unnest_value(row):\n \"\"\"\n For data collections which have nested value parameters (like RSS)\n this function will unnest the value to t...
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) __all__ = ["asizeof", "db", "udfs"]
[ [ 14, 0, 1, 0.25, 0, 0.66, 0, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "__all__ = [\"asizeof\", \"db\", \"udfs\"]" ]
# Copyright (c) 2008 Yahoo! Inc. All rights reserved. # Licensed under the Yahoo! Search BOSS Terms of Use # (http://info.yahoo.com/legal/us/yahoo/search/bosstos/bosstos-2317.html) """ Calculate the size of an object in python This code used to be very complicated, and then realized in certain cases it failed Given th...
[ [ 8, 0, 0.5, 0.4706, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.8235, 0.0588, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.9706, 0.1176, 0, 0.66, 1...
[ "\"\"\"\nCalculate the size of an object in python\nThis code used to be very complicated, and then realized in certain cases it failed\nGiven the structures handled in this framework, string'ing it and computing the length works fine\nEspecially since the # of bytes is not important - just need the relative sizes ...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
[ [ 1, 0, 0.0588, 0.0118, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0824, 0.0118, 0, 0...
[ "import logging", "import shutil", "import sys", "import urlparse", "import SimpleHTTPServer", "import BaseHTTPServer", "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
[ [ 8, 0, 0.0631, 0.0991, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.1351, 0.009, 0, 0.66, 0....
[ "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD", "import httplib", "import os", "import re", "import sys", "import urllib", "import urllib2", "import urlparse", "import user", "from xml....
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
[ [ 1, 0, 0.0201, 0.0067, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0336, 0.0067, 0, ...
[ "import datetime", "import sys", "import textwrap", "import common", "from xml.dom import pulldom", "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;", "BOOLEAN_STANZA = \"\"\"\\\n } else i...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 1, 0, 0.0526, 0.0088, 0, ...
[ "import logging", "from xml.dom import minidom", "from xml.dom import pulldom", "BOOLEAN = \"boolean\"", "STRING = \"String\"", "GROUP = \"Group\"", "DEFAULT_INTERFACES = ['FoursquareType']", "INTERFACES = {\n}", "DEFAULT_CLASS_IMPORTS = [\n]", "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
[ [ 1, 0, 0.0588, 0.0118, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0824, 0.0118, 0, 0...
[ "import logging", "import shutil", "import sys", "import urlparse", "import SimpleHTTPServer", "import BaseHTTPServer", "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',...
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
[ [ 1, 0, 0.0201, 0.0067, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0336, 0.0067, 0, ...
[ "import datetime", "import sys", "import textwrap", "import common", "from xml.dom import pulldom", "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;", "BOOLEAN_STANZA = \"\"\"\\\n } else i...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
[ [ 8, 0, 0.0631, 0.0991, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.1351, 0.009, 0, 0.66, 0....
[ "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD", "import httplib", "import os", "import re", "import sys", "import urllib", "import urllib2", "import urlparse", "import user", "from xml....
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 1, 0, 0.0526, 0.0088, 0, ...
[ "import logging", "from xml.dom import minidom", "from xml.dom import pulldom", "BOOLEAN = \"boolean\"", "STRING = \"String\"", "GROUP = \"Group\"", "DEFAULT_INTERFACES = ['FoursquareType']", "INTERFACES = {\n}", "DEFAULT_CLASS_IMPORTS = [\n]", "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP...
#!/usr/bin/python import sys, hashlib def write_file(fn, buf): fp = open(fn, "wb") fp.write(buf) fp.close() def usage(): print ("Usage: " + sys.argv[0] + " infile outfile label") def main(): if( len(sys.argv) != 4): usage() sys.exit() fp = open( sys.argv[1] , "rb") hash_str = has...
[ [ 1, 0, 0.0714, 0.0238, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 2, 0, 0.1548, 0.0952, 0, 0.66, 0.25, 725, 0, 2, 0, 0, 0, 0, 3 ], [ 14, 1, 0.1429, 0.0238, 1, 0.5...
[ "import sys, hashlib", "def write_file(fn, buf):\n\tfp = open(fn, \"wb\")\n\tfp.write(buf)\n\tfp.close()", "\tfp = open(fn, \"wb\")", "\tfp.write(buf)", "\tfp.close()", "def usage():\n\tprint (\"Usage: \" + sys.argv[0] + \" infile outfile label\")", "\tprint (\"Usage: \" + sys.argv[0] + \" infile outfi...
#!/usr/bin/python import sys, re, os def write_file(fn, buf): fp = open(fn, "wb") fp.write(buf) fp.close() def usage(): print ("Usage: " + os.path.split(__file__)[1] + " version outfile") def crete_version_str(ver): base = list("0.00") version = str(ver) ret = [] base[0] = version[0] base...
[ [ 1, 0, 0.0577, 0.0192, 0, 0.66, 0, 509, 0, 3, 0, 0, 509, 0, 0 ], [ 2, 0, 0.125, 0.0769, 0, 0.66, 0.2, 725, 0, 2, 0, 0, 0, 0, 3 ], [ 14, 1, 0.1154, 0.0192, 1, 0.34,...
[ "import sys, re, os", "def write_file(fn, buf):\n\tfp = open(fn, \"wb\")\n\tfp.write(buf)\n\tfp.close()", "\tfp = open(fn, \"wb\")", "\tfp.write(buf)", "\tfp.close()", "def usage():\n\tprint (\"Usage: \" + os.path.split(__file__)[1] + \" version outfile\")", "\tprint (\"Usage: \" + os.path.split(__file...
#!/usr/bin/python """ PRO build script""" import os, shutil, sys NIGHTLY=0 VERSION="B9" PRO_BUILD = [ { "fn": "620PRO-%s.rar", "config": "CONFIG_620=1" }, { "fn": "635PRO-%s.rar", "config": "CONFIG_635=1" }, { "fn": "639PRO-%s.rar", "config": "CONFIG_639=1" }, { "fn": "660PRO-%s.rar", "config": "CONFIG_...
[ [ 8, 0, 0.0297, 0.0099, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0495, 0.0099, 0, 0.66, 0.0909, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0693, 0.0099, 0, 0.6...
[ "\"\"\" PRO build script\"\"\"", "import os, shutil, sys", "NIGHTLY=0", "VERSION=\"B9\"", "PRO_BUILD = [\n\t\t\t{ \"fn\": \"620PRO-%s.rar\", \"config\": \"CONFIG_620=1\" },\n\t\t\t{ \"fn\": \"635PRO-%s.rar\", \"config\": \"CONFIG_635=1\" },\n\t\t\t{ \"fn\": \"639PRO-%s.rar\", \"config\": \"CONFIG_639=1\" },...