code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
'''
Module for dealing with resource files (but not their contents).
@author: Rodrigo Damazio
'''
import os.path
from glob import glob
import re
MYTRACKS_RES_DIR = 'MyTracks/res'
ANDROID_MASTER_VALUES = 'values'
ANDROID_VALUES_MASK = 'values-*'
def GetMyTracksDir():
'''
Returns the directory in which the MyTrac... | [
[
8,
0,
0.0667,
0.1111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0.125,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.1556,
0.0222,
0,
0.66,
... | [
"'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''",
"import os.path",
"from glob import glob",
"import re",
"MYTRACKS_RES_DIR = 'MyTracks/res'",
"ANDROID_MASTER_VALUES = 'values'",
"ANDROID_VALUES_MASK = 'values-*'",
"def GetMyTracksDir():\n '''\n... |
#!/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... |
import re
import sys
import math
import os.path
import maya.OpenMaya as om
import maya.cmds as mc
import maya.OpenMayaAnim as omanim
import maya.OpenMayaMPx as OpenMayaMPx
import pymel.core.datatypes
import pyawd
from pyawd.core import *
from pyawd.anim import *
from pyawd.scene import *
from pyawd.geom import *
from... | [
[
1,
0,
0.0014,
0.0014,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0029,
0.0014,
0,
0.66,
0.0476,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0043,
0.0014,
0,
... | [
"import re",
"import sys",
"import math",
"import os.path",
"import maya.OpenMaya as om",
"import maya.cmds as mc",
"import maya.OpenMayaAnim as omanim",
"import maya.OpenMayaMPx as OpenMayaMPx",
"import pymel.core.datatypes",
"import pyawd",
"from pyawd.core import *",
"from pyawd.anim import... |
#!/usr/bin/env python
import sys
import getopt
import struct
import zlib
from pyawd import core
BLOCKS = 0x1
GEOMETRY = 0x2
SCENE = 0x4
ANIMATION = 0x8
include = 0
offset = 0
indent_level = 0
BT_MESH_DATA = 1
BT_MESH_INST = 24
BT_SKELETON = 101
BT_SKELPOSE = 102
BT_SKELANIM = 103
def printl(str=... | [
[
1,
0,
0.0087,
0.0029,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0117,
0.0029,
0,
0.66,
0.0357,
588,
0,
1,
0,
0,
588,
0,
0
],
[
1,
0,
0.0146,
0.0029,
0,
... | [
"import sys",
"import getopt",
"import struct",
"import zlib",
"from pyawd import core",
"BLOCKS = 0x1",
"GEOMETRY = 0x2",
"SCENE = 0x4",
"ANIMATION = 0x8",
"include = 0",
"offset = 0",
"indent_level = 0",
"BT_MESH_DATA = 1",
"BT_MESH_INST = 24",
"BT_SKELETON = 101",
"B... |
#!/usr/bin/env python
import os
import sys
import getopt
from distutils.core import setup, Extension
version_macro = ('PYTHON_VERSION', sys.version_info[0])
source_files = [
'src/util.cc',
'src/bcache.cc',
'src/prepgeom.cc',
'src/prepscene.cc',
'src/prepmaterial.cc',
'src/prepanim.cc',
's... | [
[
1,
0,
0.0625,
0.0208,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0833,
0.0208,
0,
0.66,
0.0833,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1042,
0.0208,
0,
... | [
"import os",
"import sys",
"import getopt",
"from distutils.core import setup, Extension",
"version_macro = ('PYTHON_VERSION', sys.version_info[0])",
"source_files = [\n 'src/util.cc',\n 'src/bcache.cc',\n 'src/prepgeom.cc',\n 'src/prepscene.cc',\n 'src/prepmaterial.cc',\n 'src/prepanim.... |
from pyawd import core
STR_VERTICES = 1
STR_TRIANGLES = 2
STR_UVS = 3
STR_VERTEX_NORMALS = 4
STR_VERTEX_TANGENTS = 5
STR_FACE_NORMALS = 6
STR_JOINT_INDICES = 7
STR_JOINT_WEIGHTS = 8
class AWDSubMesh:
def __init__(self):
self.__data_streams = []
def add_stream(self, type, data):
self.__data_st... | [
[
1,
0,
0.0286,
0.0286,
0,
0.66,
0,
293,
0,
1,
0,
0,
293,
0,
0
],
[
14,
0,
0.0857,
0.0286,
0,
0.66,
0.1,
703,
1,
0,
0,
0,
0,
1,
0
],
[
14,
0,
0.1143,
0.0286,
0,
0.6... | [
"from pyawd import core",
"STR_VERTICES = 1",
"STR_TRIANGLES = 2",
"STR_UVS = 3",
"STR_VERTEX_NORMALS = 4",
"STR_VERTEX_TANGENTS = 5",
"STR_FACE_NORMALS = 6",
"STR_JOINT_INDICES = 7",
"STR_JOINT_WEIGHTS = 8",
"class AWDSubMesh:\n def __init__(self):\n self.__data_streams = []\n\n def ... |
import struct
import sys
class AWDBlockBase(object):
def __init__(self, type=0):
super(AWDBlockBase, self).__init__()
self.__type = 0
def write_block(self, file, addr):
file.write(struct.pack('>IBBI', addr, 0, self.__type, 0))
def write_body(self, file):
pass # To be overr... | [
[
1,
0,
0.0104,
0.0104,
0,
0.66,
0,
399,
0,
1,
0,
0,
399,
0,
0
],
[
1,
0,
0.0208,
0.0104,
0,
0.66,
0.2,
509,
0,
1,
0,
0,
509,
0,
0
],
[
3,
0,
0.0885,
0.1042,
0,
0.6... | [
"import struct",
"import sys",
"class AWDBlockBase(object):\n def __init__(self, type=0):\n super(AWDBlockBase, self).__init__()\n self.__type = 0\n\n def write_block(self, file, addr):\n file.write(struct.pack('>IBBI', addr, 0, self.__type, 0))",
" def __init__(self, type=0):\n ... |
from pyawd import utils
from pyawd import core
class AWDSceneBlockBase(core.AWDBlockBase):
def __init__(self, name='', transform=None):
super(AWDSceneBlockBase, self).__init__()
self.__children = []
self.__parent = None
self.name = name
self.transform = transform
i... | [
[
1,
0,
0.02,
0.02,
0,
0.66,
0,
293,
0,
1,
0,
0,
293,
0,
0
],
[
1,
0,
0.04,
0.02,
0,
0.66,
0.25,
293,
0,
1,
0,
0,
293,
0,
0
],
[
3,
0,
0.41,
0.68,
0,
0.66,
0.5,... | [
"from pyawd import utils",
"from pyawd import core",
"class AWDSceneBlockBase(core.AWDBlockBase):\n def __init__(self, name='', transform=None):\n super(AWDSceneBlockBase, self).__init__()\n self.__children = []\n self.__parent = None\n self.name = name\n self.transform = t... |
class AWDMatrix4x4:
def __init__(self, raw_data=None):
self.raw_data = raw_data
if self.raw_data is None:
self.raw_data = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
class AWDMatrix2x3:
def __init__(self, raw_data=None):
self.raw_data = raw_data
if self.raw_data is None:
... | [
[
3,
0,
0.2692,
0.4615,
0,
0.66,
0,
593,
0,
1,
0,
0,
0,
0,
0
],
[
2,
1,
0.3077,
0.3846,
1,
0.15,
0,
555,
0,
2,
0,
0,
0,
0,
0
],
[
14,
2,
0.2308,
0.0769,
2,
0.14,
... | [
"class AWDMatrix4x4:\n def __init__(self, raw_data=None):\n self.raw_data = raw_data\n\n if self.raw_data is None:\n self.raw_data = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]",
" def __init__(self, raw_data=None):\n self.raw_data = raw_data\n\n if self.raw_data is None:\n ... |
class AWDWriter(object):
def __init__(self):
self.__block_addr = 1
def write(self, awd, file):
def write_blocks(blocks):
for b in blocks:
b.write_block(file, self.__block_addr)
self.__block_addr += 1
write_blocks(awd.texture_blocks)
... | [
[
3,
0,
0.5,
0.9474,
0,
0.66,
0,
924,
0,
3,
0,
0,
186,
0,
9
],
[
2,
1,
0.1316,
0.1053,
1,
0.83,
0,
555,
0,
1,
0,
0,
0,
0,
0
],
[
14,
2,
0.1579,
0.0526,
2,
0.33,
... | [
"class AWDWriter(object):\n def __init__(self):\n self.__block_addr = 1\n\n def write(self, awd, file):\n def write_blocks(blocks):\n for b in blocks:\n b.write_block(file, self.__block_addr)",
" def __init__(self):\n self.__block_addr = 1",
" self.... |
from pyawd import utils
from pyawd import core
class AWDSkeleton(core.AWDBlockBase):
def __init__(self, name=''):
super(AWDSkeleton, self).__init__()
self.name = name
self.root_joint = None
class AWDSkeletonAnimation(core.AWDBlockBase):
def __init__(self, name=''):
su... | [
[
1,
0,
0.0172,
0.0172,
0,
0.66,
0,
293,
0,
1,
0,
0,
293,
0,
0
],
[
1,
0,
0.0345,
0.0172,
0,
0.66,
0.1667,
293,
0,
1,
0,
0,
293,
0,
0
],
[
3,
0,
0.1034,
0.0862,
0,
... | [
"from pyawd import utils",
"from pyawd import core",
"class AWDSkeleton(core.AWDBlockBase):\n def __init__(self, name=''):\n super(AWDSkeleton, self).__init__()\n self.name = name\n self.root_joint = None",
" def __init__(self, name=''):\n super(AWDSkeleton, self).__init__()\... |
__all__ = [ 'core', 'anim', 'geom', 'material', 'scene', 'utils' ]
version = ('PyAWD', 0, 1, 'a')
try:
import pyawd.cio as io
backend = ('libawd',
io.LIBAWD_MAJOR_VERSION,
io.LIBAWD_MINOR_VERSION)
backend_str = '%s v%d.%d' % backend
except:
backend = ('python', None, None)
backen... | [
[
14,
0,
0.0526,
0.0526,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
5,
0
],
[
14,
0,
0.1579,
0.0526,
0,
0.66,
0.3333,
623,
0,
0,
0,
0,
0,
8,
0
],
[
7,
0,
0.5263,
0.5789,
0,
0.... | [
"__all__ = [ 'core', 'anim', 'geom', 'material', 'scene', 'utils' ]",
"version = ('PyAWD', 0, 1, 'a')",
"try:\n import pyawd.cio as io\n\n backend = ('libawd',\n io.LIBAWD_MAJOR_VERSION,\n io.LIBAWD_MINOR_VERSION)\n backend_str = '%s v%d.%d' % backend",
" import pyawd.cio as io",
"... |
from pyawd import core
TEX_EXTERNAL = 0
TEX_EMBED_JPG = 1
class AWDTexture(core.AWDBlockBase):
def __init__(self, type=0, name='', url=None):
super(AWDTexture, self).__init__()
self.type = type
self.name = name
self.url = url
def embed_file(self, path):
with open(path... | [
[
1,
0,
0.0357,
0.0357,
0,
0.66,
0,
293,
0,
1,
0,
0,
293,
0,
0
],
[
14,
0,
0.1071,
0.0357,
0,
0.66,
0.25,
396,
1,
0,
0,
0,
0,
1,
0
],
[
14,
0,
0.1429,
0.0357,
0,
0.... | [
"from pyawd import core",
"TEX_EXTERNAL = 0",
"TEX_EMBED_JPG = 1",
"class AWDTexture(core.AWDBlockBase):\n\n def __init__(self, type=0, name='', url=None):\n super(AWDTexture, self).__init__()\n self.type = type\n self.name = name\n self.url = url",
" def __init__(self, typ... |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | [
[
8,
0,
0.2076,
0.0089,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2188,
0.0045,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2277,
0.0045,
0,
0.66,... | [
"\"\"\"Google Code file uploader script.\n\"\"\"",
"__author__ = 'danderson@google.com (David Anderson)'",
"import httplib",
"import os.path",
"import optparse",
"import getpass",
"import base64",
"import sys",
"def upload(file, project_name, user_name, password, summary, labels=None):\n \"\"\"Uplo... |
#!/usr/bin/env pypy
import os, sys, logging, re
import argparse
import fnmatch
configurations = {'lite', 'pro'}
package_dirs = {
'lite': ('src/cx/hell/android/pdfview',),
'pro': ('src/cx/hell/android/pdfviewpro',)
}
file_replaces = {
'lite': (
'cx.hell.android.pdfview.',
'"cx.hell.an... | [
[
1,
0,
0.014,
0.0047,
0,
0.66,
0,
688,
0,
4,
0,
0,
688,
0,
0
],
[
1,
0,
0.0187,
0.0047,
0,
0.66,
0.0526,
325,
0,
1,
0,
0,
325,
0,
0
],
[
1,
0,
0.0234,
0.0047,
0,
0... | [
"import os, sys, logging, re",
"import argparse",
"import fnmatch",
"configurations = {'lite', 'pro'}",
"package_dirs = {\n 'lite': ('src/cx/hell/android/pdfview',),\n 'pro': ('src/cx/hell/android/pdfviewpro',)\n}",
"file_replaces = {\n 'lite': (\n 'cx.hell.android.pdfview.',\n '\"c... |
#!/usr/bin/python2.6
import MySQLdb
import sys
import time
import hashlib
import fileinput
dbuser="monitor"
dbpass="monitor"
dbname="test"
socket="/u01/mysql/run/mysql.sock"
for lines in fileinput.input("iplist"):
line=lines.split()
ip1=line[0]
ip2=line[1]
sql="""select id,data_id,group_id,content,m... | [
[
1,
0,
0.1429,
0.1429,
0,
0.66,
0,
838,
0,
1,
0,
0,
838,
0,
0
],
[
1,
0,
0.2857,
0.1429,
0,
0.66,
0.25,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.4286,
0.1429,
0,
0.... | [
"import MySQLdb",
"import sys",
"import time",
"import hashlib",
"import fileinput"
] |
#!/usr/bin/python
#
# Lightpack hardware main tests
#
import lightpack, time, re, random, sys
print ('')
print ('Lightpack hardware main tests')
print ('')
print ('WARN: Disable authorization for proper execution of the script.')
print (' Open software, check "Profiles->Expert mode" and off auth on "Dev tab".')... | [
[
1,
0,
0.0547,
0.0078,
0,
0.66,
0,
635,
0,
5,
0,
0,
635,
0,
0
],
[
8,
0,
0.0703,
0.0078,
0,
0.66,
0.0345,
535,
3,
1,
0,
0,
0,
0,
1
],
[
8,
0,
0.0781,
0.0078,
0,
0.... | [
"import lightpack, time, re, random, sys",
"print ('')",
"print ('Lightpack hardware main tests')",
"print ('')",
"print ('WARN: Disable authorization for proper execution of the script.')",
"print (' Open software, check \"Profiles->Expert mode\" and off auth on \"Dev tab\".')",
"print ('')",
"R... |
import socket, time, imaplib, re, sys
class lightpack:
# host = '127.0.0.1' # The remote host
# port = 3636 # The same port as used by the server
# apikey = 'key' # Secure API key which generates by Lightpack software on Dev tab
# ledMap = [1,2,3,4,5,6,7,8,9,10] #mapped LEDs
def __init... | [
[
1,
0,
0.0079,
0.0079,
0,
0.66,
0,
687,
0,
5,
0,
0,
687,
0,
0
],
[
3,
0,
0.5079,
0.9764,
0,
0.66,
1,
635,
0,
19,
0,
0,
0,
0,
55
],
[
2,
1,
0.0945,
0.0394,
1,
0.67,... | [
"import socket, time, imaplib, re, sys",
"class lightpack:\n\n#\thost = '127.0.0.1' # The remote host\n#\tport = 3636 # The same port as used by the server\n#\tapikey = 'key'\t\t # Secure API key which generates by Lightpack software on Dev tab\n#\tledMap = [1,2,3,4,5,6,7,8,9,10] \t#mapped LEDs\n... |
#inaccurate pyLightpack class animation examples for 10 LED Lightpack configuration (3+2+3+2 clockwise from the left edge).
import lightpack, time, re, random
lpack = lightpack.lightpack('127.0.0.1', 3636, [2,3,6,7,8,9,10,4,5,1] )
lpack.connect()
lpack.lock()
first = True
while True :
for k in range (0, 10... | [
[
1,
0,
0.1111,
0.0556,
0,
0.66,
0,
635,
0,
4,
0,
0,
635,
0,
0
],
[
14,
0,
0.2222,
0.0556,
0,
0.66,
0.1667,
117,
3,
3,
0,
0,
635,
10,
1
],
[
8,
0,
0.2778,
0.0556,
0,
... | [
"import lightpack, time, re, random",
"lpack = lightpack.lightpack('127.0.0.1', 3636, [2,3,6,7,8,9,10,4,5,1] )",
"lpack.connect()",
"lpack.lock()",
"first = True",
"while True :\n\tfor k in range (0, 10) :\t\n\t\tif first :\n\t\t\tlpack.setColorToAll(80,0,0)\n\t\telse :\n\t\t\tlpack.setColorToAll(0,0,80)... |
from xml.dom import minidom
from xml.dom import EMPTY_NAMESPACE
try:
import json
except ImportError:
import simplejson as json
import lightpack
import time
import urllib
import urllib2
username = '***********'
password = '*************'
lpack = lightpack.lightpack('127.0.0.1', 3636, [2,3,6,7,8,9,10,... | [
[
1,
0,
0.0127,
0.0127,
0,
0.66,
0,
290,
0,
1,
0,
0,
290,
0,
0
],
[
1,
0,
0.0253,
0.0127,
0,
0.66,
0.0345,
290,
0,
1,
0,
0,
290,
0,
0
],
[
7,
0,
0.057,
0.0506,
0,
0... | [
"from xml.dom import minidom",
"from xml.dom import EMPTY_NAMESPACE",
"try:\n import json\nexcept ImportError:\n import simplejson as json",
" import json",
" import simplejson as json",
"import lightpack",
"import time",
"import urllib",
"import urllib2",
"username = '***********'",
"passwo... |
#Skype contact waiting script. It flashes Lightpack when target buddy in contact list are changed his online status.
#You need Skype4Py module and lightpack.py class for using it.
import Skype4Py, lightpack, time, sys
skype = Skype4Py.Skype() # Create an instance of the Skype class
lpack = lightpack.lightpack('... | [
[
1,
0,
0.1379,
0.0345,
0,
0.66,
0,
279,
0,
4,
0,
0,
279,
0,
0
],
[
14,
0,
0.2069,
0.0345,
0,
0.66,
0.1429,
627,
3,
0,
0,
0,
969,
10,
1
],
[
14,
0,
0.2414,
0.0345,
0,
... | [
"import Skype4Py, lightpack, time, sys",
"skype = Skype4Py.Skype() # Create an instance of the Skype class",
"lpack = lightpack.lightpack('127.0.0.1', 3636, [2,3,6,7,8,9,10,4,5,1] )",
"skype.Attach() # Connect the Skype object to the Skype client",
"targetstat = ['ONLINE', 'DND', 'SKYPEME'] # Array of targe... |
#inaccurate pyLightpack class animation examples for 10 LED Lightpack configuration (3+2+3+2 clockwise from the left edge).
import lightpack, time, re, random
lpack = lightpack.lightpack('127.0.0.1', 3636, [2,3,6,7,8,9,10,4,5,1] )
lpack.connect()
lpack.lock()
print ('***pyLightpack animation examples (read scr... | [
[
1,
0,
0.0169,
0.0085,
0,
0.66,
0,
635,
0,
4,
0,
0,
635,
0,
0
],
[
14,
0,
0.0339,
0.0085,
0,
0.66,
0.1,
117,
3,
3,
0,
0,
635,
10,
1
],
[
8,
0,
0.0424,
0.0085,
0,
0... | [
"import lightpack, time, re, random",
"lpack = lightpack.lightpack('127.0.0.1', 3636, [2,3,6,7,8,9,10,4,5,1] )",
"lpack.connect()",
"lpack.lock()",
"print ('***pyLightpack animation examples (read script header first)***')",
"print ('\t1 -- Basic flash 4 times')",
"print ('\t2 -- \"Snake\"')",
"print ... |
# Gmail checker script. It check you mail thru IMAP and run clockwise "snake" effect if you have unread messages in the box
import lightpack, time, imaplib, re, getpass
def gmail_checker(username,password):
import imaplib,re
i=imaplib.IMAP4_SSL('imap.gmail.com')
try:
i.... | [
[
1,
0,
0.075,
0.025,
0,
0.66,
0,
635,
0,
5,
0,
0,
635,
0,
0
],
[
2,
0,
0.25,
0.275,
0,
0.66,
0.1667,
592,
0,
2,
1,
0,
0,
0,
9
],
[
1,
1,
0.15,
0.025,
1,
0.29,
... | [
"import lightpack, time, imaplib, re, getpass",
"def gmail_checker(username,password):\n import imaplib,re\n i=imaplib.IMAP4_SSL('imap.gmail.com')\n try:\n i.login(username,password)\n x,y=i.status('INBOX','(MESSAGES UNSEEN)')\n messages=int(re.sea... |
import socket, time, imaplib, re, sys
class lightpack:
# host = '127.0.0.1' # The remote host
# port = 3636 # The same port as used by the server
# apikey = 'key' # Secure API key which generates by Lightpack software on Dev tab
# ledMap = [1,2,3,4,5,6,7,8,9,10] #mapped LEDs
def __init... | [
[
1,
0,
0.0079,
0.0079,
0,
0.66,
0,
687,
0,
5,
0,
0,
687,
0,
0
],
[
3,
0,
0.5079,
0.9764,
0,
0.66,
1,
635,
0,
19,
0,
0,
0,
0,
55
],
[
2,
1,
0.0945,
0.0394,
1,
0.91,... | [
"import socket, time, imaplib, re, sys",
"class lightpack:\n\n#\thost = '127.0.0.1' # The remote host\n#\tport = 3636 # The same port as used by the server\n#\tapikey = 'key'\t\t # Secure API key which generates by Lightpack software on Dev tab\n#\tledMap = [1,2,3,4,5,6,7,8,9,10] \t#mapped LEDs\n... |
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | [
[
8,
0,
0.0719,
0.1375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.15,
0.0063,
0,
0.66,
0.1667,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.1562,
0.0063,
0,
0.66,
... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"import cgi",
"import os",
"import re",
"import string",
"def escape(text,... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | [
[
8,
0,
0.2586,
0.431,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0172,
0,
0.66,
0.2,
385,
0,
1,
0,
0,
385,
0,
0
],
[
1,
0,
0.5172,
0.0172,
0,
0.66,
0... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"from connector import FCKeditorConnector",
"from upload import FCKeditorQuickUp... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | [
[
1,
0,
0.0213,
0.0213,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0638,
0.0213,
0,
0.66,
0.2,
630,
0,
1,
0,
0,
630,
0,
0
],
[
1,
0,
0.0851,
0.0213,
0,
0.6... | [
"import os",
"from fckutil import *",
"from fckcommands import * \t# default command's implementation",
"from fckconnector import FCKeditorConnectorBase # import base connector",
"import config as Config",
"class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | [
[
8,
0,
0.1667,
0.2778,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3111,
0.0111,
0,
0.66,
0.1429,
934,
0,
2,
0,
0,
934,
0,
0
],
[
1,
0,
0.3333,
0.0111,
0,
0.66... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"import cgi, os",
"from fckutil import *",
"from fckcommands import * \t# defa... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | [
[
1,
0,
0.0127,
0.0127,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.038,
0.0127,
0,
0.66,
0.1667,
630,
0,
1,
0,
0,
630,
0,
0
],
[
1,
0,
0.0506,
0.0127,
0,
0... | [
"import os",
"from fckutil import *",
"from fckcommands import * \t# default command's implementation",
"from fckoutput import * \t# base http, xml and html output mixins",
"from fckconnector import FCKeditorConnectorBase # import base connector",
"import config as Config",
"class FCKeditorConnector(\tF... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | [
[
8,
0,
0.1176,
0.1933,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2269,
0.0084,
0,
0.66,
0.1429,
654,
0,
2,
0,
0,
654,
0,
0
],
[
1,
0,
0.2353,
0.0084,
0,
0.66... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"from time import gmtime, strftime",
"import string",
"def escape(text, replac... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | [
[
8,
0,
0.1667,
0.2778,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3111,
0.0111,
0,
0.66,
0.1429,
934,
0,
2,
0,
0,
934,
0,
0
],
[
1,
0,
0.3333,
0.0111,
0,
0.66... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"import cgi, os",
"from fckutil import *",
"from fckcommands import * \t# defa... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | [
[
1,
0,
0.0127,
0.0127,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.038,
0.0127,
0,
0.66,
0.1667,
630,
0,
1,
0,
0,
630,
0,
0
],
[
1,
0,
0.0506,
0.0127,
0,
0... | [
"import os",
"from fckutil import *",
"from fckcommands import * \t# default command's implementation",
"from fckoutput import * \t# base http, xml and html output mixins",
"from fckconnector import FCKeditorConnectorBase # import base connector",
"import config as Config",
"class FCKeditorConnector(\tF... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | [
[
8,
0,
0.1176,
0.1933,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2269,
0.0084,
0,
0.66,
0.1429,
654,
0,
2,
0,
0,
654,
0,
0
],
[
1,
0,
0.2353,
0.0084,
0,
0.66... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"from time import gmtime, strftime",
"import string",
"def escape(text, replac... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | [
[
8,
0,
0.2586,
0.431,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0172,
0,
0.66,
0.2,
385,
0,
1,
0,
0,
385,
0,
0
],
[
1,
0,
0.5172,
0.0172,
0,
0.66,
0... | [
"\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:",
"from connector import FCKeditorConnector",
"from upload import FCKeditorQuickUp... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | [
[
1,
0,
0.0213,
0.0213,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0638,
0.0213,
0,
0.66,
0.2,
630,
0,
1,
0,
0,
630,
0,
0
],
[
1,
0,
0.0851,
0.0213,
0,
0.6... | [
"import os",
"from fckutil import *",
"from fckcommands import * \t# default command's implementation",
"from fckconnector import FCKeditorConnectorBase # import base connector",
"import config as Config",
"class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t... |
'''
Module which brings history information about files from Mercurial.
@author: Rodrigo Damazio
'''
import re
import subprocess
REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')
def _GetOutputLines(args):
'''
Runs an external process and returns its output as a list of lines.
@param args: the argume... | [
[
8,
0,
0.0319,
0.0532,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0745,
0.0106,
0,
0.66,
0.1429,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0851,
0.0106,
0,
0.66... | [
"'''\nModule which brings history information about files from Mercurial.\n\n@author: Rodrigo Damazio\n'''",
"import re",
"import subprocess",
"REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')",
"def _GetOutputLines(args):\n '''\n Runs an external process and returns its output as a list of lines... |
#!/usr/bin/python
'''
Entry point for My Tracks i18n tool.
@author: Rodrigo Damazio
'''
import mytracks.files
import mytracks.translate
import mytracks.validate
import sys
def Usage():
print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0]
print 'Commands are:'
print ' cleanup'
print ' translate'
p... | [
[
8,
0,
0.0417,
0.0521,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0833,
0.0104,
0,
0.66,
0.125,
640,
0,
1,
0,
0,
640,
0,
0
],
[
1,
0,
0.0938,
0.0104,
0,
0.66,... | [
"'''\nEntry point for My Tracks i18n tool.\n\n@author: Rodrigo Damazio\n'''",
"import mytracks.files",
"import mytracks.translate",
"import mytracks.validate",
"import sys",
"def Usage():\n print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])\n print('Commands are:')\n print(' cleanup')\n p... |
'''
Module which prompts the user for translations and saves them.
TODO: implement
@author: Rodrigo Damazio
'''
class Translator(object):
'''
classdocs
'''
def __init__(self, language):
'''
Constructor
'''
self._language = language
def Translate(self, string_names):
print string_names | [
[
8,
0,
0.1905,
0.3333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
3,
0,
0.7143,
0.619,
0,
0.66,
1,
229,
0,
2,
0,
0,
186,
0,
1
],
[
8,
1,
0.5238,
0.1429,
1,
0.61,
... | [
"'''\nModule which prompts the user for translations and saves them.\n\nTODO: implement\n\n@author: Rodrigo Damazio\n'''",
"class Translator(object):\n '''\n classdocs\n '''\n\n def __init__(self, language):\n '''\n Constructor",
" '''\n classdocs\n '''",
" def __init__(self, language):\n '''... |
'''
Module which compares languague files to the master file and detects
issues.
@author: Rodrigo Damazio
'''
import os
from mytracks.parser import StringsParser
import mytracks.history
class Validator(object):
def __init__(self, languages):
'''
Builds a strings file validator.
Params:
@para... | [
[
8,
0,
0.0304,
0.0522,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0696,
0.0087,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0783,
0.0087,
0,
0.66,
... | [
"'''\nModule which compares languague files to the master file and detects\nissues.\n\n@author: Rodrigo Damazio\n'''",
"import os",
"from mytracks.parser import StringsParser",
"import mytracks.history",
"class Validator(object):\n\n def __init__(self, languages):\n '''\n Builds a strings file valida... |
'''
Module for dealing with resource files (but not their contents).
@author: Rodrigo Damazio
'''
import os.path
from glob import glob
import re
MYTRACKS_RES_DIR = 'MyTracks/res'
ANDROID_MASTER_VALUES = 'values'
ANDROID_VALUES_MASK = 'values-*'
def GetMyTracksDir():
'''
Returns the directory in which the MyTrac... | [
[
8,
0,
0.0667,
0.1111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0.125,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.1556,
0.0222,
0,
0.66,
... | [
"'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''",
"import os.path",
"from glob import glob",
"import re",
"MYTRACKS_RES_DIR = 'MyTracks/res'",
"ANDROID_MASTER_VALUES = 'values'",
"ANDROID_VALUES_MASK = 'values-*'",
"def GetMyTracksDir():\n '''\n... |
'''
Module which parses a string XML file.
@author: Rodrigo Damazio
'''
from xml.parsers.expat import ParserCreate
import re
#import xml.etree.ElementTree as ET
class StringsParser(object):
'''
Parser for string XML files.
This object is not thread-safe and should be used for parsing a single file at
a time... | [
[
8,
0,
0.0261,
0.0435,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0609,
0.0087,
0,
0.66,
0.3333,
573,
0,
1,
0,
0,
573,
0,
0
],
[
1,
0,
0.0696,
0.0087,
0,
0.66... | [
"'''\nModule which parses a string XML file.\n\n@author: Rodrigo Damazio\n'''",
"from xml.parsers.expat import ParserCreate",
"import re",
"class StringsParser(object):\n '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n... |
#!/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... |
__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.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# 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 import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.1753,
0.0103,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1856,
0.0103,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1959,
0.0103,
0,
0.6... | [
"import sys",
"import os",
"from StringIO import StringIO",
"from PIL import Image",
"import datauri",
"RGBA_BLACK = (0, 0, 0, 255)",
"sign_ = lambda n: -1 if n < 0 else (1 if n > 0 else 0)",
"def find_black_region_(im, sx, sy, ex, ey):\n dx = sign_(ex - sx)\n dy = sign_(ey - sy)\n if abs(dx) == ab... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.3542,
0.0208,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.375,
0.0208,
0,
0.66,
0.1429,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3958,
0.0208,
0,
0... | [
"import sys",
"import os",
"from StringIO import StringIO",
"from PIL import Image",
"import datauri",
"def image_to_data_uri_(im):\n f = StringIO()\n im.save(f, 'PNG')\n uri = datauri.to_data_uri(f.getvalue(), 'foo.png')\n f.close()\n return uri",
" f = StringIO()",
" im.save(f, 'PNG')",
" ... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.2881,
0.0169,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.3051,
0.0169,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.322,
0.0169,
0,
0... | [
"import sys",
"import os",
"import os.path",
"import shutil",
"import zipfile",
"def main():\n params = {}\n params['id'] = sys.argv[1]\n params['displayname'] = sys.argv[2]\n params['description'] = sys.argv[3]\n\n zip_file = zipfile.ZipFile('dist/stencil-%s.zip' % params['id'], 'w',\n zipfile.... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.5,
0.0294,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.5294,
0.0294,
0,
0.66,
0.2,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.5588,
0.0294,
0,
0.66,
... | [
"import base64",
"import sys",
"import mimetypes",
"def to_data_uri(data, file_name):\n '''Takes a file object and returns its data: string.'''\n mime_type = mimetypes.guess_type(file_name)\n return 'data:%(mimetype)s;base64,%(data)s' % dict(mimetype=mime_type[0],\n data=base64.b64encode(data))",
" ... |
#! /usr/bin/env python
# encoding: utf-8
# waf 1.6.10
VERSION='0.3.3'
import sys
APPNAME='p2t'
top = '.'
out = 'build'
CPP_SOURCES = ['poly2tri/common/shapes.cc',
'poly2tri/sweep/cdt.cc',
'poly2tri/sweep/advancing_front.cc',
'poly2tri/sweep/sweep_context.cc',
... | [
[
14,
0,
0.1111,
0.0222,
0,
0.66,
0,
557,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0.0909,
509,
0,
1,
0,
0,
509,
0,
0
],
[
14,
0,
0.1556,
0.0222,
0,
... | [
"VERSION='0.3.3'",
"import sys",
"APPNAME='p2t'",
"top = '.'",
"out = 'build'",
"CPP_SOURCES = ['poly2tri/common/shapes.cc',\n 'poly2tri/sweep/cdt.cc',\n 'poly2tri/sweep/advancing_front.cc',\n 'poly2tri/sweep/sweep_context.cc',\n 'poly2tri/sweep/swee... |
#!/usr/bin/env python
import sys
import os
import glob
def main():
source_folder = os.path.join('bin', 'release')
new_version = None
suggest_string = ''
for testfile in glob.glob( os.path.join(source_folder, 'Duplicati *.zip') ):
version_info = testfile[testfile.rfind('Duplicati ') + ... | [
[
1,
0,
0.025,
0.0083,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0333,
0.0083,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0417,
0.0083,
0,
0.6... | [
"import sys",
"import os",
"import glob",
"def main():\n \n source_folder = os.path.join('bin', 'release')\n \n new_version = None\n suggest_string = ''\n\n for testfile in glob.glob( os.path.join(source_folder, 'Duplicati *.zip') ):",
" source_folder = os.path.join('bin', 'release')",
" new_versi... |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementat... | [
[
8,
0,
0.1875,
0.0081,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1976,
0.004,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2056,
0.004,
0,
0.66,
... | [
"\"\"\"Google Code file uploader script.\n\"\"\"",
"__author__ = 'danderson@google.com (David Anderson)'",
"import httplib",
"import os.path",
"import optparse",
"import getpass",
"import base64",
"import sys",
"def upload(file, project_name, user_name, password, summary, labels=None):\n \"\"\"Uplo... |
#!/usr/bin/env python
"""
This file is a standalone python script that is tested with python 2.7
If Duplicati is producing a backup with the option --upload-verification-file,
it will produce a *-verification.json file on the backend, which can be verified
by this script. Simply run this script with the path to ... | [
[
8,
0,
0.0612,
0.0714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1122,
0.0102,
0,
0.66,
0.0833,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1224,
0.0102,
0,
0.66... | [
"\"\"\"\nThis file is a standalone python script that is tested with python 2.7\nIf Duplicati is producing a backup with the option --upload-verification-file,\nit will produce a *-verification.json file on the backend, which can be verified\nby this script. Simply run this script with the path to the backup\nfolde... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.1753,
0.0103,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1856,
0.0103,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1959,
0.0103,
0,
0.6... | [
"import sys",
"import os",
"from StringIO import StringIO",
"from PIL import Image",
"import datauri",
"RGBA_BLACK = (0, 0, 0, 255)",
"sign_ = lambda n: -1 if n < 0 else (1 if n > 0 else 0)",
"def find_black_region_(im, sx, sy, ex, ey):\n dx = sign_(ex - sx)\n dy = sign_(ey - sy)\n if abs(dx) == ab... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.3542,
0.0208,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.375,
0.0208,
0,
0.66,
0.1429,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3958,
0.0208,
0,
0... | [
"import sys",
"import os",
"from StringIO import StringIO",
"from PIL import Image",
"import datauri",
"def image_to_data_uri_(im):\n f = StringIO()\n im.save(f, 'PNG')\n uri = datauri.to_data_uri(f.getvalue(), 'foo.png')\n f.close()\n return uri",
" f = StringIO()",
" im.save(f, 'PNG')",
" ... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.2881,
0.0169,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.3051,
0.0169,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.322,
0.0169,
0,
0... | [
"import sys",
"import os",
"import os.path",
"import shutil",
"import zipfile",
"def main():\n params = {}\n params['id'] = sys.argv[1]\n params['displayname'] = sys.argv[2]\n params['description'] = sys.argv[3]\n\n zip_file = zipfile.ZipFile('dist/stencil-%s.zip' % params['id'], 'w',\n zipfile.... |
#!/usr/bin/env python
# Copyright 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 la... | [
[
1,
0,
0.5,
0.0294,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.5294,
0.0294,
0,
0.66,
0.2,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.5588,
0.0294,
0,
0.66,
... | [
"import base64",
"import sys",
"import mimetypes",
"def to_data_uri(data, file_name):\n '''Takes a file object and returns its data: string.'''\n mime_type = mimetypes.guess_type(file_name)\n return 'data:%(mimetype)s;base64,%(data)s' % dict(mimetype=mime_type[0],\n data=base64.b64encode(data))",
" ... |
#====================================================================
# 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 pypy
import os, sys, logging, re
import argparse
import fnmatch
configurations = {'lite', 'pro'}
package_dirs = {
'lite': ('src/cx/hell/android/pdfview',),
'pro': ('src/cx/hell/android/pdfviewpro',)
}
file_replaces = {
'lite': (
'cx.hell.android.pdfview.',
'"cx.hell.an... | [
[
1,
0,
0.014,
0.0047,
0,
0.66,
0,
688,
0,
4,
0,
0,
688,
0,
0
],
[
1,
0,
0.0187,
0.0047,
0,
0.66,
0.0526,
325,
0,
1,
0,
0,
325,
0,
0
],
[
1,
0,
0.0234,
0.0047,
0,
0... | [
"import os, sys, logging, re",
"import argparse",
"import fnmatch",
"configurations = {'lite', 'pro'}",
"package_dirs = {\n 'lite': ('src/cx/hell/android/pdfview',),\n 'pro': ('src/cx/hell/android/pdfviewpro',)\n}",
"file_replaces = {\n 'lite': (\n 'cx.hell.android.pdfview.',\n '\"c... |
#!/usr/bin/python
import xml.parsers.expat;
import sys;
import re;
parser=xml.parsers.expat.ParserCreate('UTF-8');
values_en = {}
values_lang = {}
values_hash = {}
name=''
def parse(lang, values):
def start_element(n, attrs):
global name;
if n != u'string': return
name=attrs[u'name']
def end_element(... | [
[
1,
0,
0.0448,
0.0149,
0,
0.66,
0,
573,
0,
1,
0,
0,
573,
0,
0
],
[
1,
0,
0.0597,
0.0149,
0,
0.66,
0.0588,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0746,
0.0149,
0,
... | [
"import xml.parsers.expat;",
"import sys;",
"import re;",
"parser=xml.parsers.expat.ParserCreate('UTF-8');",
"values_en = {}",
"values_lang = {}",
"values_hash = {}",
"name=''",
"def parse(lang, values):\n def start_element(n, attrs):\n global name;\n if n != u'string': return\n name=attrs... |
#!/usr/bin/env python
VERSION = "0.0.1"
import sys, os
try:
import pygtk
pygtk.require("2.0")
except:
print "Could not import pygtk"
try:
import gtk
import gtk.glade
except:
print "Could not import gtk"
sys.exit(1)
class Func:
"""
A pseudo-widget representing an a10 function.
"""
def __init__(self, x, ... | [
[
14,
0,
0.0178,
0.0059,
0,
0.66,
0,
557,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0296,
0.0059,
0,
0.66,
0.125,
509,
0,
2,
0,
0,
509,
0,
0
],
[
7,
0,
0.0473,
0.0296,
0,
0.... | [
"VERSION = \"0.0.1\"",
"import sys, os",
"try:\n\timport pygtk\n\tpygtk.require(\"2.0\")\nexcept:\n\tprint(\"Could not import pygtk\")",
"\timport pygtk",
"\tpygtk.require(\"2.0\")",
"\tprint(\"Could not import pygtk\")",
"try:\n\timport gtk\n\timport gtk.glade\nexcept:\n\tprint(\"Could not import gtk\"... |
#!/usr/bin/env python
VERSION = "0.0.1"
import sys, os
try:
import pygtk
pygtk.require("2.0")
except:
print "Could not import pygtk"
try:
import gtk
import gtk.glade
except:
print "Could not import gtk"
sys.exit(1)
class Func:
"""
A pseudo-widget representing an a10 function.
"""
def __init__(self, x, ... | [
[
14,
0,
0.0178,
0.0059,
0,
0.66,
0,
557,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0296,
0.0059,
0,
0.66,
0.125,
509,
0,
2,
0,
0,
509,
0,
0
],
[
7,
0,
0.0473,
0.0296,
0,
0.... | [
"VERSION = \"0.0.1\"",
"import sys, os",
"try:\n\timport pygtk\n\tpygtk.require(\"2.0\")\nexcept:\n\tprint(\"Could not import pygtk\")",
"\timport pygtk",
"\tpygtk.require(\"2.0\")",
"\tprint(\"Could not import pygtk\")",
"try:\n\timport gtk\n\timport gtk.glade\nexcept:\n\tprint(\"Could not import gtk\"... |
# Copyright (C) 2011 Roger Xu.
# Author: Roger Xu <roger.xu.2007@gmail.com>
#
# pacparser is a library that provides methods to parse proxy auto-config
# (PAC) files. Please read README file included with this package for more
# information about this library.
"""
Python module to parse pac files. Look at project's ho... | [
[
8,
0,
0.3393,
0.1429,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0357,
0,
0.66,
0.1,
892,
0,
1,
0,
0,
892,
0,
0
],
[
14,
0,
0.5357,
0.0357,
0,
0.66,
... | [
"\"\"\"\nPython module to parse pac files. Look at project's homepage\nhttp://code.google.com/p/pacparser for more information.\n\"\"\"",
"import pacparser",
"pac = 'E:/workspace/rogerxu-hg/rules/android.pac'",
"print(pacparser.just_find_proxy(pac, \"https://twitter.com\"))",
"import pacparser",
"pac = 'E... |
import cgi
import datetime
import logging
import urlparse
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import memcache
from google.appengine.api import urlfetch
logging.getLogger().setLevel(logging.DEBUG)
class MainPage(webapp.RequestHan... | [
[
1,
0,
0.0156,
0.0156,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.0312,
0.0156,
0,
0.66,
0.0769,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0469,
0.0156,
0,
... | [
"import cgi",
"import datetime",
"import logging",
"import urlparse",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.api import memcache",
"from google.appengine.api import urlfetch",
"logging.getLogger().setLevel(loggin... |
import cgi
import datetime
import time
import urlparse
import wsgiref.handlers
from google.appengine.api import urlfetch
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
def getOpmServer(index):
opmServers = []
opmServers.... | [
[
1,
0,
0.0185,
0.0185,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.037,
0.0185,
0,
0.66,
0.0769,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0556,
0.0185,
0,
0... | [
"import cgi",
"import datetime",
"import time",
"import urlparse",
"import wsgiref.handlers",
"from google.appengine.api import urlfetch",
"from google.appengine.api import users",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"def getOpmSe... |
import cgi
import urlparse
import wsgiref.handlers
from google.appengine.api import urlfetch
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
def getOpmServer():
opmServers = []
opmServers.append('http://rogerxu-opm.appspo... | [
[
1,
0,
0.0185,
0.0185,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.037,
0.0185,
0,
0.66,
0.0909,
857,
0,
1,
0,
0,
857,
0,
0
],
[
1,
0,
0.0556,
0.0185,
0,
0... | [
"import cgi",
"import urlparse",
"import wsgiref.handlers",
"from google.appengine.api import urlfetch",
"from google.appengine.api import users",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"def getOpmServer():\n opmServers = []\n opmS... |
import cgi
import urlparse
import wsgiref.handlers
from google.appengine.api import urlfetch
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
def getOpmServer():
opmServers = []
opmServers.append('http://rogerxu-opm.appspo... | [
[
1,
0,
0.0185,
0.0185,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.037,
0.0185,
0,
0.66,
0.0909,
857,
0,
1,
0,
0,
857,
0,
0
],
[
1,
0,
0.0556,
0.0185,
0,
0... | [
"import cgi",
"import urlparse",
"import wsgiref.handlers",
"from google.appengine.api import urlfetch",
"from google.appengine.api import users",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"def getOpmServer():\n opmServers = []\n opmS... |
#!/usr/bin/python
import os
virtenv = os.environ['APPDIR'] + '/virtenv/'
os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
pass
#
# IMPORTANT: Put ... | [
[
1,
0,
0.08,
0.04,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.16,
0.04,
0,
0.66,
0.1667,
913,
4,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2,
0.04,
0,
0.66,
0.3... | [
"import os",
"virtenv = os.environ['APPDIR'] + '/virtenv/'",
"os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')",
"virtualenv = os.path.join(virtenv, 'bin/activate_this.py')",
"try:\n execfile(virtualenv, dict(__file__=virtualenv))\nexcept IOError:\n pass",
" e... |
#!/usr/bin/env python
"""
This file is executed from ../setup.py only.
Calculate cumulative version from Revision strings.
Copyright 2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http... | [
[
8,
0,
0.2879,
0.4848,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5758,
0.0303,
0,
0.66,
0.2,
688,
0,
3,
0,
0,
688,
0,
0
],
[
14,
0,
0.6364,
0.0303,
0,
0.66,
... | [
"\"\"\"\n\nThis file is executed from ../setup.py only.\n\nCalculate cumulative version from Revision strings.\n\nCopyright 2000 Pearu Peterson all rights reserved,\nPearu Peterson <pearu@ioc.ee>",
"import os,fileinput,re",
"files=[]",
"for d in ['lib']:\n for f in os.listdir(d):\n if f[-3:]=='.py' ... |
#!/usr/bin/env python
import sys
sys.path = ['..']+sys.path
if sys.version[:3]=='1.5':
from lib152 import *
else:
from lib import *
#from pyvtk import *
structure = PolyData(points=[[0,0,0],[1,0,0],[1,1,0],[0,1,0],
[0,0,1],[1,0,1],[1,1,1],[0,1,1]],
polygons=[... | [
[
1,
0,
0.0789,
0.0263,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
14,
0,
0.1053,
0.0263,
0,
0.66,
0.1111,
909,
4,
0,
0,
0,
0,
0,
0
],
[
4,
0,
0.1711,
0.1053,
0,
0... | [
"import sys",
"sys.path = ['..']+sys.path",
"if sys.version[:3]=='1.5':\n from lib152 import *\nelse:\n from lib import *",
" from lib152 import *",
" from lib import *",
"structure = PolyData(points=[[0,0,0],[1,0,0],[1,1,0],[0,1,0],\n [0,0,1],[1,0,1],[1,1,1],[0,1,1... |
#!/usr/bin/env python
import sys
sys.path = ['..']+sys.path
if sys.version[:3]=='1.5':
from lib152 import *
else:
from lib import *
#from pyvtk import *
points = [[0,0,0],[1,0,0],[2,0,0],[0,1,0],[1,1,0],[2,1,0],
[0,0,1],[1,0,1],[2,0,1],[0,1,1],[1,1,1],[2,1,1],
[0,1,2],[1,1,2],[2,1,2],[0,1... | [
[
1,
0,
0.0682,
0.0227,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
14,
0,
0.0909,
0.0227,
0,
0.66,
0.125,
909,
4,
0,
0,
0,
0,
0,
0
],
[
4,
0,
0.1477,
0.0909,
0,
0.... | [
"import sys",
"sys.path = ['..']+sys.path",
"if sys.version[:3]=='1.5':\n from lib152 import *\nelse:\n from lib import *",
" from lib152 import *",
" from lib import *",
"points = [[0,0,0],[1,0,0],[2,0,0],[0,1,0],[1,1,0],[2,1,0],\n [0,0,1],[1,0,1],[2,0,1],[0,1,1],[1,1,1],[2,1,1],\n ... |
#!/usr/bin/env python
import sys
sys.path = ['..']+sys.path
if sys.version[:3]=='1.5':
from lib152 import *
else:
from lib import *
#from pyvtk import *
vtk = VtkData(StructuredPoints([3,4,6]),
PointData(Scalars([0,0,0,0,0,0,0,0,0,0,0,0,
0,5,10,15,20,25,25,20,15... | [
[
1,
0,
0.0588,
0.0196,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
14,
0,
0.0784,
0.0196,
0,
0.66,
0.0435,
909,
4,
0,
0,
0,
0,
0,
0
],
[
4,
0,
0.1275,
0.0784,
0,
0... | [
"import sys",
"sys.path = ['..']+sys.path",
"if sys.version[:3]=='1.5':\n from lib152 import *\nelse:\n from lib import *",
" from lib152 import *",
" from lib import *",
"vtk = VtkData(StructuredPoints([3,4,6]),\n PointData(Scalars([0,0,0,0,0,0,0,0,0,0,0,0,\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.