code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Useful helpers for adapters. @since: 0.4 """ import __builtin__ if not hasattr(__builtin__, 'set'): from sets import Set as set def to_list(obj, encoder): """ Converts an arbitrary object C{obj} to a C{list}. """ return list...
[ [ 8, 0, 0.12, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2, 0.02, 0, 0.66, 0.1429, 364, 0, 1, 0, 0, 364, 0, 0 ], [ 4, 0, 0.25, 0.04, 0, 0.66, 0.2857, ...
[ "\"\"\"\nUseful helpers for adapters.\n\n@since: 0.4\n\"\"\"", "import __builtin__", "if not hasattr(__builtin__, 'set'):\n from sets import Set as set", " from sets import Set as set", "def to_list(obj, encoder):\n \"\"\"\n Converts an arbitrary object C{obj} to a C{list}.\n \"\"\"\n retu...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ C{django.utils.translation} adapter module. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.4.2 """ from django.utils.translation import ugettext_lazy import pyamf def convert_lazy(l, encoder=None): if l.__class__._delegate_...
[ [ 8, 0, 0.25, 0.2308, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4231, 0.0385, 0, 0.66, 0.25, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.5, 0.0385, 0, 0.66, 0...
[ "\"\"\"\nC{django.utils.translation} adapter module.\n\n@see: U{Django Project<http://www.djangoproject.com>}\n@since: 0.4.2\n\"\"\"", "from django.utils.translation import ugettext_lazy", "import pyamf", "def convert_lazy(l, encoder=None):\n if l.__class__._delegate_unicode:\n return unicode(l)\n\n...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ U{array<http://docs.python.org/library/array.html>} adapter module. Will convert all array.array instances to a python list before encoding. All type information is lost (but degrades nicely). @since: 0.5 """ import array import pyamf from pyamf...
[ [ 8, 0, 0.375, 0.4, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.65, 0.05, 0, 0.66, 0.25, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 1, 0, 0.75, 0.05, 0, 0.66, 0.5, 6...
[ "\"\"\"\nU{array<http://docs.python.org/library/array.html>} adapter module.\n\nWill convert all array.array instances to a python list before encoding. All\ntype information is lost (but degrades nicely).\n\n@since: 0.5\n\"\"\"", "import array", "import pyamf", "from pyamf.adapters import util", "if hasatt...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Django query adapter module. Sets up basic type mapping and class mappings for a Django models. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.1b """ from django.db.models import query import pyamf from pyamf.adapters import uti...
[ [ 8, 0, 0.4, 0.45, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7, 0.05, 0, 0.66, 0.25, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 1, 0, 0.8, 0.05, 0, 0.66, 0.5, 64...
[ "\"\"\"\nDjango query adapter module.\n\nSets up basic type mapping and class mappings for a\nDjango models.\n\n@see: U{Django Project<http://www.djangoproject.com>}\n@since: 0.1b", "from django.db.models import query", "import pyamf", "from pyamf.adapters import util", "pyamf.add_type(query.QuerySet, util....
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ The adapter package provides additional functionality for other Python packages. This includes registering classes, setting up type maps etc. @since: 0.1.0 """ import os.path import glob from pyamf.util import imports adapters_registered = Fals...
[ [ 8, 0, 0.0714, 0.0659, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1209, 0.011, 0, 0.66, 0.125, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.1319, 0.011, 0, 0.66, ...
[ "\"\"\"\nThe adapter package provides additional functionality for other Python\npackages. This includes registering classes, setting up type maps etc.\n\n@since: 0.1.0\n\"\"\"", "import os.path", "import glob", "from pyamf.util import imports", "adapters_registered = False", "class PackageImporter(object...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ C{django.db.models.fields} adapter module. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.4 """ from django.db.models import fields import pyamf def convert_NOT_PROVIDED(x, encoder): """ @rtype: L{Undefined<pyamf.Undefi...
[ [ 8, 0, 0.2826, 0.2609, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4783, 0.0435, 0, 0.66, 0.25, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 1, 0, 0.5652, 0.0435, 0, 0.66, ...
[ "\"\"\"\nC{django.db.models.fields} adapter module.\n\n@see: U{Django Project<http://www.djangoproject.com>}\n@since: 0.4\n\"\"\"", "from django.db.models import fields", "import pyamf", "def convert_NOT_PROVIDED(x, encoder):\n \"\"\"\n @rtype: L{Undefined<pyamf.Undefined>}\n \"\"\"\n return pyamf...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Provides XML support. @since: 0.6 """ #: list of supported third party packages that support the C{etree} #: interface. At least enough for our needs anyway. ETREE_MODULES = [ 'lxml.etree', 'xml.etree.cElementTree', 'cElementTree', ...
[ [ 8, 0, 0.0364, 0.0303, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0909, 0.0424, 0, 0.66, 0.0714, 1, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.1273, 0.0061, 0, 0.66, ...
[ "\"\"\"\nProvides XML support.\n\n@since: 0.6\n\"\"\"", "ETREE_MODULES = [\n 'lxml.etree',\n 'xml.etree.cElementTree',\n 'cElementTree',\n 'xml.etree.ElementTree',\n 'elementtree.ElementTree'\n]", "types = None", "modules = {}", "ET = None", "__all__ = ['set_default_interface']", "def set...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ U{PyAMF<http://pyamf.org>} provides Action Message Format (U{AMF <http://en.wikipedia.org/wiki/Action_Message_Format>}) support for Python that is compatible with the Adobe U{Flash Player <http://en.wikipedia.org/wiki/Flash_Player>}. @since: Octobe...
[ [ 8, 0, 0.0094, 0.0106, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0165, 0.0012, 0, 0.66, 0.0179, 209, 0, 1, 0, 0, 209, 0, 0 ], [ 1, 0, 0.0177, 0.0012, 0, 0.66...
[ "\"\"\"\nU{PyAMF<http://pyamf.org>} provides Action Message Format (U{AMF\n<http://en.wikipedia.org/wiki/Action_Message_Format>}) support for Python that\nis compatible with the Adobe U{Flash Player\n<http://en.wikipedia.org/wiki/Flash_Player>}.\n\n@since: October 2007\n@status: Production/Stable", "import types"...
# -*- coding: utf-8 -*- # # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Provides the pure Python versions of L{BufferedByteStream}. Do not reference directly, use L{pyamf.util.BufferedByteStream} instead. @since: 0.6 """ import struct try: from cStringIO import StringIO except ImportErr...
[ [ 8, 0, 0.0129, 0.01, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.02, 0.0014, 0, 0.66, 0.1, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 7, 0, 0.025, 0.0057, 0, 0.66, 0....
[ "\"\"\"\nProvides the pure Python versions of L{BufferedByteStream}.\n\nDo not reference directly, use L{pyamf.util.BufferedByteStream} instead.\n\n@since: 0.6\n\"\"\"", "import struct", "try:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO", " from cStringIO imp...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ AMF Utilities. @since: 0.1.0 """ import calendar import datetime import inspect import pyamf from pyamf import python try: from cpyamf.util import BufferedByteStream except ImportError: from pyamf.util.pure import BufferedByteStream #:...
[ [ 8, 0, 0.0305, 0.0254, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0508, 0.0051, 0, 0.66, 0.0625, 917, 0, 1, 0, 0, 917, 0, 0 ], [ 1, 0, 0.0558, 0.0051, 0, 0.66...
[ "\"\"\"\nAMF Utilities.\n\n@since: 0.1.0\n\"\"\"", "import calendar", "import datetime", "import inspect", "import pyamf", "from pyamf import python", "try:\n from cpyamf.util import BufferedByteStream\nexcept ImportError:\n from pyamf.util.pure import BufferedByteStream", " from cpyamf.util ...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Tools for doing dynamic imports. @since: 0.3 """ import sys __all__ = ['when_imported'] def when_imported(name, *hooks): """ Call C{hook(module)} when module named C{name} is first imported. C{name} must be a fully qualified (i.e. ...
[ [ 8, 0, 0.0438, 0.0365, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.073, 0.0073, 0, 0.66, 0.1429, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0949, 0.0073, 0, 0.66...
[ "\"\"\"\nTools for doing dynamic imports.\n\n@since: 0.3\n\"\"\"", "import sys", "__all__ = ['when_imported']", "def when_imported(name, *hooks):\n \"\"\"\n Call C{hook(module)} when module named C{name} is first imported. C{name}\n must be a fully qualified (i.e. absolute) module name.\n\n C{hook...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Provides basic functionality for all pyamf.amf?.[De|E]ncoder classes. """ import types import datetime import pyamf from pyamf import util, python, xml __all__ = [ 'IndexedCollection', 'Context', 'Decoder', 'Encoder' ] try: u...
[ [ 8, 0, 0.0096, 0.0058, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0154, 0.0019, 0, 0.66, 0.0833, 209, 0, 1, 0, 0, 209, 0, 0 ], [ 1, 0, 0.0173, 0.0019, 0, 0.66...
[ "\"\"\"\nProvides basic functionality for all pyamf.amf?.[De|E]ncoder classes.\n\"\"\"", "import types", "import datetime", "import pyamf", "from pyamf import util, python, xml", "__all__ = [\n 'IndexedCollection',\n 'Context',\n 'Decoder',\n 'Encoder'\n]", "try:\n unicode\nexcept NameErr...
#!/usr/bin/env python # vim: noexpandtab import commands import os import re import sys from path import path USAGE=""" Usage: copy_gnulinux_libs.py /path/to/some/binary Copies all the necessary .so files for 'binary' to '/path/to/some'. This is useful to gather all files necessary for a nightly tarball. """ # Thi...
[ [ 1, 0, 0.028, 0.0093, 0, 0.66, 0, 760, 0, 1, 0, 0, 760, 0, 0 ], [ 1, 0, 0.0374, 0.0093, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0467, 0.0093, 0, 0.66...
[ "import commands", "import os", "import re", "import sys", "from path import path", "USAGE=\"\"\"\nUsage: copy_gnulinux_libs.py /path/to/some/binary\n\nCopies all the necessary .so files for 'binary' to '/path/to/some'.\nThis is useful to gather all files necessary for a nightly tarball.\n\"\"\"", "IGNO...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # WengoPhone, a voice over Internet phone # Copyright (C) 2004-2007 Wengo # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
[ [ 1, 0, 0.3824, 0.0147, 0, 0.66, 0, 369, 0, 5, 0, 0, 369, 0, 0 ], [ 14, 0, 0.4412, 0.0735, 0, 0.66, 0.25, 952, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.6103, 0.2353, 0, 0.6...
[ "import binary_utilities, os, platform, shutil, sys", "USAGE='''\nusage:\ncopy_missing_libraries.py <dir>\ncopy_missing_libraries.py <file> <output_dir>\n'''", "def copy_missing_libraries_of_file(root, path):\n\t'''\n\tCopy missing libraries of file 'path'.\n\tA library is missing if it is not in 'root' or if i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # WengoPhone, a voice over Internet phone # Copyright (C) 2004-2007 Wengo # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
[ [ 1, 0, 0.3824, 0.0147, 0, 0.66, 0, 369, 0, 5, 0, 0, 369, 0, 0 ], [ 14, 0, 0.4412, 0.0735, 0, 0.66, 0.25, 952, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.6103, 0.2353, 0, 0.6...
[ "import binary_utilities, os, platform, shutil, sys", "USAGE='''\nusage:\ncopy_missing_libraries.py <dir>\ncopy_missing_libraries.py <file> <output_dir>\n'''", "def copy_missing_libraries_of_file(root, path):\n\t'''\n\tCopy missing libraries of file 'path'.\n\tA library is missing if it is not in 'root' or if i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # WengoPhone, a voice over Internet phone # Copyright (C) 2004-2007 Wengo # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
[ [ 1, 0, 0.2917, 0.0104, 0, 0.66, 0, 369, 0, 4, 0, 0, 369, 0, 0 ], [ 14, 0, 0.3542, 0.0938, 0, 0.66, 0.2, 952, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.5208, 0.2188, 0, 0.66...
[ "import binary_utilities, os, re, sys", "USAGE='''\nupdate_links.py <path> [<executable>]\n\\tThis syntax will update all install names in path.\n\\tIf executable is given, install names will be relative to this executable,\n\\totherwise there will be absolute.\n\nupdate_links.py <binary_file> <path_to_binary_fil...
#!/usr/bin/env python # vim: noexpandtab import commands import os import re import sys from path import path USAGE=""" Usage: copy_gnulinux_libs.py /path/to/some/binary Copies all the necessary .so files for 'binary' to '/path/to/some'. This is useful to gather all files necessary for a nightly tarball. """ # Thi...
[ [ 1, 0, 0.028, 0.0093, 0, 0.66, 0, 760, 0, 1, 0, 0, 760, 0, 0 ], [ 1, 0, 0.0374, 0.0093, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0467, 0.0093, 0, 0.66...
[ "import commands", "import os", "import re", "import sys", "from path import path", "USAGE=\"\"\"\nUsage: copy_gnulinux_libs.py /path/to/some/binary\n\nCopies all the necessary .so files for 'binary' to '/path/to/some'.\nThis is useful to gather all files necessary for a nightly tarball.\n\"\"\"", "IGNO...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # WengoPhone, a voice over Internet phone # Copyright (C) 2004-2007 Wengo # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
[ [ 1, 0, 0.2917, 0.0104, 0, 0.66, 0, 369, 0, 4, 0, 0, 369, 0, 0 ], [ 14, 0, 0.3542, 0.0938, 0, 0.66, 0.2, 952, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.5208, 0.2188, 0, 0.66...
[ "import binary_utilities, os, re, sys", "USAGE='''\nupdate_links.py <path> [<executable>]\n\\tThis syntax will update all install names in path.\n\\tIf executable is given, install names will be relative to this executable,\n\\totherwise there will be absolute.\n\nupdate_links.py <binary_file> <path_to_binary_fil...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.0455, 0.0023, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.05, 0.0023, 0, 0.66, 0.0714, 154, 0, 3, 0, 0, 154, 0, 0 ], [ 1, 0, 0.0545, 0.0023, 0, 0....
[ "import os", "from PyQt4 import QtCore, QtGui, uic", "import stats", "import conf", "uidir = 'data/ui'", "ss = dict(\n # Robot subprocess\n subprocess = dict(subproc_python = 's+',\n subproc_main = 's+',\n init_timeout = 'f',\n tic...
# Copyright (c) 2009 John Schember # 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 rights # to use, copy, modify, merge, publish, distri...
[ [ 1, 0, 0.1746, 0.0079, 0, 0.66, 0, 570, 0, 5, 0, 0, 570, 0, 0 ], [ 3, 0, 0.4643, 0.5397, 0, 0.66, 0.5, 650, 0, 4, 0, 0, 317, 0, 42 ], [ 2, 1, 0.2262, 0.0476, 1, 0....
[ "from PyQt4.Qt import QFrame, QWidget, QTextEdit, QHBoxLayout, QPainter", "class NumberBar(QWidget):\n def __init__(self, *args):\n QWidget.__init__(self, *args)\n self.edit = None\n # This is used to update the width of the control.\n # It is the highest line that is currently visi...
from robot import Robot class TheRobot(Robot): '''Strategy: Drive around the edge of the arena, Shoot whatever gets in the way. ''' def respond(self): self.ping() self.turret_forward() self.ping_react() def turret_forward(self): 'keep the turret pointed...
[ [ 1, 0, 0.0227, 0.0227, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.5341, 0.9545, 0, 0.66, 1, 111, 0, 3, 0, 0, 440, 0, 12 ], [ 8, 1, 0.125, 0.0909, 1, 0.69,...
[ "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Drive around the edge of the arena,\n Shoot whatever gets in the way.\n '''\n\n def respond(self):\n self.ping()", " '''Strategy:\n Drive around the edge of the arena,\n Shoot whatever gets in the ...
from robot import Robot class TheRobot(Robot): '''Strategy: Drive around real fast, Don't run in to anything, Shoot stuff that gets in the way. ''' def initialize(self): self._spinning = False def respond(self): if self._spinning: self.spin() ...
[ [ 1, 0, 0.0147, 0.0147, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.5221, 0.9706, 0, 0.66, 1, 111, 0, 5, 0, 0, 440, 0, 16 ], [ 8, 1, 0.0882, 0.0735, 1, 0.36...
[ "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Drive around real fast,\n Don't run in to anything,\n Shoot stuff that gets in the way.\n '''\n\n def initialize(self):", " '''Strategy:\n Drive around real fast,\n Don't run in to anything,\n ...
import random from robot import Robot class TheRobot(Robot): '''Strategy: Drive around in sort of a circle, Shoot randomly. ''' def initialize(self): self._state = 'FORWARD' self._fwdfor_ticks = None self._rightfor_ticks = None self._unstick_freq = 12 ...
[ [ 1, 0, 0.0086, 0.0086, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0172, 0.0086, 0, 0.66, 0.5, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.5216, 0.9655, 0, 0.6...
[ "import random", "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Drive around in sort of a circle,\n Shoot randomly.\n '''\n \n def initialize(self):\n self._state = 'FORWARD'", " '''Strategy:\n Drive around in sort of a circle,\n Shoot ran...
from robot import Robot class TheRobot(Robot): '''Strategy: Circle around the center, Home in on any found robot and shoot it. ''' def initialize(self): self._foundrobotangle = None def respond(self): self.turret_forward() self.ping() kind, angle, d...
[ [ 1, 0, 0.0106, 0.0106, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.516, 0.9787, 0, 0.66, 1, 111, 0, 5, 0, 0, 440, 0, 19 ], [ 8, 1, 0.0585, 0.0426, 1, 0.6, ...
[ "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Circle around the center,\n Home in on any found robot and shoot it.\n '''\n \n def initialize(self):\n self._foundrobotangle = None", " '''Strategy:\n Circle around the center,\n Home in on any...
from robot import Robot from math import copysign class TheRobot(Robot): '''Strategy: Stay near the middle of the field, Move if being attacked. ''' def initialize(self): self.health = 100 self._flee = 15 self._goto = 0 self._moveto_choices = [7, 7, -7,...
[ [ 1, 0, 0.011, 0.011, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.033, 0.011, 0, 0.66, 0.5, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 3, 0, 0.5275, 0.956, 0, 0.66, ...
[ "from robot import Robot", "from math import copysign", "class TheRobot(Robot):\n '''Strategy:\n Stay near the middle of the field,\n Move if being attacked.\n '''\n \n def initialize(self):\n self.health = 100", " '''Strategy:\n Stay near the middle of the field,\n ...
from robot import Robot class TheRobot(Robot): '''Strategy: Get in to a corner, Look around and shoot stuff, Try to remember where stuff was, so you can shoot it real good. ''' def initialize(self): # Try to get in to a corner self.forseconds(5, self.istep, self...
[ [ 1, 0, 0.0084, 0.0084, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.5126, 0.9832, 0, 0.66, 1, 111, 0, 6, 0, 0, 440, 0, 19 ], [ 8, 1, 0.0504, 0.042, 1, 0.59,...
[ "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Get in to a corner,\n Look around and shoot stuff,\n Try to remember where stuff was, so you can shoot it real good.\n '''\n \n def initialize(self):", " '''Strategy:\n Get in to a corner,\n Loo...
# This example was used in verifying the problem outlined # in issue #5 in the bug tracker. from robot import Robot class TheRobot(Robot): def respond(self): self.turret(0) self.pingcheck() def pingcheck(self): g = self.sensors['GYRO'] if -2 <= g <= 2: self.ping() ...
[ [ 1, 0, 0.1905, 0.0476, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.6429, 0.7619, 0, 0.66, 1, 111, 0, 2, 0, 0, 440, 0, 7 ], [ 2, 1, 0.381, 0.1429, 1, 0.85, ...
[ "from robot import Robot", "class TheRobot(Robot):\n def respond(self):\n self.turret(0)\n self.pingcheck()\n\n def pingcheck(self):\n g = self.sensors['GYRO']\n if -2 <= g <= 2:", " def respond(self):\n self.turret(0)\n self.pingcheck()", " self.turre...
from robot import Robot class TheRobot(Robot): '''Strategy: Look around and shoot stuff, Move if attacked. ''' def initialize(self): self.health = 100 self._movefor = 0 self._moveforce = 0 self._turnto = 0 def respond(self): self.turnto() ...
[ [ 1, 0, 0.0143, 0.0143, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.5214, 0.9714, 0, 0.66, 1, 111, 0, 5, 0, 0, 440, 0, 10 ], [ 8, 1, 0.0786, 0.0571, 1, 0.58...
[ "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Look around and shoot stuff,\n Move if attacked.\n '''\n \n def initialize(self):\n self.health = 100", " '''Strategy:\n Look around and shoot stuff,\n Move if attacked.\n '''", " def in...
import random from math import pi from robot import Robot class TheRobot(Robot): '''Strategy: Drive around blindly in several different patterns, Shoot stuff. This robot shows an unusual style of coding using "generators" which makes programs that require sequential steps somewhat ...
[ [ 1, 0, 0.0092, 0.0092, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0183, 0.0092, 0, 0.66, 0.3333, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.0367, 0.0092, 0, ...
[ "import random", "from math import pi", "from robot import Robot", "class TheRobot(Robot):\n '''Strategy:\n Drive around blindly in several different patterns,\n Shoot stuff.\n\n This robot shows an unusual style of coding using \"generators\"\n which makes programs that require seq...
from robot import Robot class TheRobot(Robot): def initialize(self): # Will be called once, immediately after robot is created # Must finish in less than 1 second pass def respond(self): # Will be called 60 times per second # Must finish in less than 0.015 seconds ...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.5833, 0.8889, 0, 0.66, 1, 111, 0, 2, 0, 0, 440, 0, 0 ], [ 2, 1, 0.3056, 0.2222, 1, 0.39,...
[ "from robot import Robot", "class TheRobot(Robot):\n def initialize(self):\n # Will be called once, immediately after robot is created\n # Must finish in less than 1 second\n pass", " def initialize(self):\n # Will be called once, immediately after robot is created\n # M...
# Copyright 2010-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.4167, 0.0208, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.4583, 0.0208, 0, 0.66, 0.1667, 154, 0, 3, 0, 0, 154, 0, 0 ], [ 1, 0, 0.5, 0.0208, 0, 0.6...
[ "import os", "from PyQt4 import QtGui, QtCore, uic", "import util", "version = 'pybotwar-0.9'", "datadir = 'data'", "uidir = os.path.join(datadir, 'ui')", "class AboutDialog(QtGui.QDialog):\n def __init__(self, app):\n QtGui.QDialog.__init__(self)\n uifile = 'about.ui'\n uipath =...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 3, 0, 0.3333, 0.1852, 0, 0.66, 0, 120, 0, 5, 0, 0, 186, 0, 0 ], [ 2, 1, 0.2654, 0.0247, 1, 0.54, 0, 555, 0, 3, 0, 0, 0, 0, 0 ], [ 2, 1, 0.3025, 0.0247, 1, 0.54, ...
[ "class Fake(object):\n def __init__(self, a=None, b=None):\n pass\n\n def setpos(self, pos):\n pass\n\n def set_rotation(self, ang):", " def __init__(self, a=None, b=None):\n pass", " def setpos(self, pos):\n pass", " def set_rotation(self, ang):\n pass", ...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.0791, 0.004, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.083, 0.004, 0, 0.66, 0.1, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.087, 0.004, 0, 0.66, ...
[ "import os", "import sys", "import glob", "from PyQt4 import QtCore, QtGui, uic", "from PyQt4.Qt import QFrame, QWidget, QHBoxLayout, QPainter", "import util", "import conf", "uidir = 'data/ui'", "class CombatantsEditor(QtGui.QMainWindow):\n def __init__(self, parent):\n self.parent = pare...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.0587, 0.0029, 0, 0.66, 0, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0616, 0.0029, 0, 0.66, 0.0714, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0645, 0.0029, 0, ...
[ "import subprocess", "from subprocess import PIPE", "import time", "import random", "import os", "import logging", "logger = logging.getLogger('PybotwarLogger')", "import viewselect", "view = viewselect.get_view_module()", "import world", "from world import box2d", "import stats", "import ut...
#!/usr/bin/env python """ highlightedtextedit.py A PyQt custom widget example for Qt Designer. Copyright (C) 2006 David Boddie <david@boddie.org.uk> Copyright (C) 2005-2006 Trolltech ASA. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General ...
[ [ 8, 0, 0.0672, 0.1095, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1294, 0.005, 0, 0.66, 0.25, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 3, 0, 0.2488, 0.2139, 0, 0.66, ...
[ "\"\"\"\nhighlightedtextedit.py\n\nA PyQt custom widget example for Qt Designer.\n\nCopyright (C) 2006 David Boddie <david@boddie.org.uk>\nCopyright (C) 2005-2006 Trolltech ASA. All rights reserved.", "from PyQt4 import QtCore, QtGui", "class HighlightedTextEdit(QtGui.QTextEdit):\n\n \"\"\"HighlightedTextEdi...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 2, 0, 0.7222, 0.3611, 0, 0.66, 0, 808, 0, 1, 0, 0, 0, 0, 0 ], [ 4, 1, 0.75, 0.3056, 1, 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 1, 2, 0.6389, 0.0278, 2, 0.14, 0, ...
[ "def select_view_module(name):\n global selectedview\n if name == 'pygame':\n import pgview\n selectedview = pgview\n\n elif name == 'pyqt':\n import qt4view", " if name == 'pygame':\n import pgview\n selectedview = pgview\n\n elif name == 'pyqt':\n import ...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.1869, 0.0093, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 2, 0, 0.3224, 0.2243, 0, 0.66, 0.1429, 869, 0, 0, 0, 0, 0, 0, 7 ], [ 8, 1, 0.2243, 0.0093, 1, 0....
[ "import os", "def makeconf():\n 'create an empty conf file'\n\n conf_file = 'conf.py'\n\n if os.path.exists(conf_file):\n print('conf.py already exists')\n raise SystemExit", " 'create an empty conf file'", " conf_file = 'conf.py'", " if os.path.exists(conf_file):\n pr...
# Settings use_qt_settings = True # Robot subprocess subproc_python = '/usr/bin/python' subproc_main = 'control.py' init_timeout = 1.0 tick_timeout = 0.015 # Robot selection base_dir = 'robots' # user robot files generally stored here more_robot_dirs = ['examples'] # In order, in case of dup name ...
[ [ 14, 0, 0.0217, 0.0109, 0, 0.66, 0, 758, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.0652, 0.0109, 0, 0.66, 0.0208, 207, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0761, 0.0109, 0, 0...
[ "use_qt_settings = True", "subproc_python = '/usr/bin/python'", "subproc_main = 'control.py'", "init_timeout = 1.0", "tick_timeout = 0.015", "base_dir = 'robots' # user robot files generally stored here", "more_robot_dirs = ['examples'] # In order, in case of dup name", "r1 = 'robot01'", "r2 = 'rob...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.0862, 0.0043, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0905, 0.0043, 0, 0.66, 0.2, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0948, 0.0043, 0, 0.6...
[ "import os", "import random", "from time import sleep", "from util import defaultNonedict", "import conf", "class Robot(object):\n def __init__(self, name):\n self._p__name = name\n\n self._p__overtime_count = 0\n\n self.sensors = defaultNonedict()", " def __init__(self, name)...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.0205, 0.001, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0215, 0.001, 0, 0.66, 0.027, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0226, 0.001, 0, 0.66...
[ "import os", "import sys", "import math", "pi = math.pi", "import logging", "logger = logging.getLogger('PybotwarLogger')", "from PyQt4 import QtCore, QtGui, QtSvg, uic", "from editor import TextEditor", "from combatants import BattleEditor, TournamentEditor", "from settings import Settings", "i...
# Copyright 2009-2014 Lee Harr # # This file is part of pybotwar. # http://pybotwar.googlecode.com/ # # Pybotwar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
[ [ 1, 0, 0.107, 0.0053, 0, 0.66, 0, 87, 0, 1, 0, 0, 87, 0, 0 ], [ 1, 0, 0.1176, 0.0053, 0, 0.66, 0.0526, 632, 0, 1, 0, 0, 632, 0, 0 ], [ 1, 0, 0.123, 0.0053, 0, 0.66...
[ "import pygame", "from pygsear.Game import Game", "from pygsear.Drawable import RotatedImage, Square, Rectangle, Stationary, Multi, Image, String, Circle", "from pygsear.Widget import ProgressBar", "from pygsear.locals import RED, ORANGE, YELLOW", "import pygsear.conf", "pygsear.conf.MAX_FPS = 60", "m...
from distutils.core import setup description = """ a simple email-to-a-friend application that generates an email form, handles its submission, persists the submission data to a database, and sends a templated email. Both anonymous and registered users can send email. """ long_description = description + """ This a...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 14, 0, 0.117, 0.1277, 0, 0.66, 0.25, 306, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3191, 0.234, 0, 0.66...
[ "from distutils.core import setup", "description = \"\"\"\na simple email-to-a-friend application that generates an email\nform, handles its submission, persists the submission data to a\ndatabase, and sends a templated email. Both anonymous and registered\nusers can send email.\n\"\"\"", "long_description = d...
import re from django import forms try: from django.core.validators import email_re except ImportError: # django 1.1 from django.forms.fields import email_re from emailthis.models import EmailEvent class MultiEmailField(forms.CharField): def clean(self, value): if not value: rai...
[ [ 1, 0, 0.0204, 0.0204, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0612, 0.0204, 0, 0.66, 0.2, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 7, 0, 0.1224, 0.102, 0, 0.66...
[ "import re", "from django import forms", "try:\n from django.core.validators import email_re\nexcept ImportError:\n # django 1.1\n from django.forms.fields import email_re", " from django.core.validators import email_re", " from django.forms.fields import email_re", "from emailthis.models i...
import datetime from django.db import models from django.conf import settings from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') class EmailEvent(models.Model): content_type = models.Forei...
[ [ 1, 0, 0.0345, 0.0345, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1034, 0.0345, 0, 0.66, 0.1667, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.1379, 0.0345, 0, 0....
[ "import datetime", "from django.db import models", "from django.conf import settings", "from django.contrib.contenttypes import generic", "from django.contrib.contenttypes.models import ContentType", "AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')", "class EmailEvent(models.Model):\...
from django.conf.urls.defaults import patterns, url urlpatterns = patterns( 'emailthis.views', url(r'^(\d+)/(\d+)/$', 'get_email_form', name="emailthis_form"), url(r'^submit/(\d+)/(\d+)/$', 'process_email_form', name="emailthis_submit"), )
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 341, 0, 2, 0, 0, 341, 0, 0 ], [ 14, 0, 0.6818, 0.7273, 0, 0.66, 1, 990, 3, 3, 0, 0, 75, 10, 3 ] ]
[ "from django.conf.urls.defaults import patterns, url", "urlpatterns = patterns(\n 'emailthis.views',\n\n url(r'^(\\d+)/(\\d+)/$', 'get_email_form', name=\"emailthis_form\"),\n\n url(r'^submit/(\\d+)/(\\d+)/$', 'process_email_form',\n name=\"emailthis_submit\"),\n )" ]
import httplib try: # prefer externally maintained version import simplejson except ImportError: # use bundled version from django.utils import simplejson from django.conf import settings from django.http import HttpResponse def render_to_json(data, status=httplib.OK): return HttpResponse(simple...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 7, 0, 0.1375, 0.15, 0, 0.66, 0.1429, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.125, 0.025, 1, 0.31, 0, ...
[ "import httplib", "try:\n # prefer externally maintained version\n import simplejson\nexcept ImportError:\n # use bundled version\n from django.utils import simplejson", " import simplejson", " from django.utils import simplejson", "from django.conf import settings", "from django.http im...
import httplib import logging import re import smtplib import socket from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.exceptions import ObjectDoesNotExist from django.core.mail import EmailMessage from django.http ...
[ [ 1, 0, 0.0075, 0.0075, 0, 0.66, 0, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.015, 0.0075, 0, 0.66, 0.0588, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0226, 0.0075, 0, 0.66,...
[ "import httplib", "import logging", "import re", "import smtplib", "import socket", "from django.conf import settings", "from django.contrib.contenttypes.models import ContentType", "from django.contrib.sites.models import Site", "from django.core.exceptions import ObjectDoesNotExist", "from djang...
""" A Django implementation of email-to-a-friend that works with unregistered or registered users. """ import datetime from django.core.exceptions import ObjectDoesNotExist from django.contrib.contenttypes.models import ContentType import django.db from emailthis.models import EmailEvent def _safe_get_object(ctyp...
[ [ 8, 0, 0.0854, 0.1463, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1951, 0.0244, 0, 0.66, 0.1429, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.2439, 0.0244, 0, 0.66...
[ "\"\"\"\n\nA Django implementation of email-to-a-friend\nthat works with unregistered or registered users.\n\n\"\"\"", "import datetime", "from django.core.exceptions import ObjectDoesNotExist", "from django.contrib.contenttypes.models import ContentType", "import django.db", "from emailthis.models import...
''' 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.08, ...
[ "'''\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 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...
''' 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 ''' 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 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...
''' Created on 21-03-2011 @author: maciek ''' from IndexGenerator import IndexGenerator from optparse import OptionParser import os import tempfile import shutil import logging logging.basicConfig(level = logging.DEBUG) parser = OptionParser() parser.add_option('-n', '--app-name', action='store', dest='appName', hel...
[ [ 8, 0, 0.0341, 0.0568, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0682, 0.0114, 0, 0.66, 0.0303, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.0795, 0.0114, 0, 0.66...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "from IndexGenerator import IndexGenerator", "from optparse import OptionParser", "import os", "import tempfile", "import shutil", "import logging", "logging.basicConfig(level = logging.DEBUG)", "parser = OptionParser()", "parser.add_option('-n...
''' Created on 21-03-2011 @author: maciek ''' def formatString(format, **kwargs): ''' ''' if not format: return '' for arg in kwargs.keys(): format = format.replace("{" + arg + "}", "##" + arg + "##") format = format.replace ("{", "{{") format = format.replace("}", "}}") for...
[ [ 8, 0, 0.1304, 0.2174, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.6739, 0.6957, 0, 0.66, 1, 798, 0, 2, 1, 0, 0, 0, 9 ], [ 8, 1, 0.413, 0.087, 1, 0.78, 0, ...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "def formatString(format, **kwargs):\n '''\n '''\n if not format: return ''\n \n for arg in kwargs.keys():\n format = format.replace(\"{\" + arg + \"}\", \"##\" + arg + \"##\")\n format = format.replace (\"{\", \"{{\")", " '''\n ...
''' Created on 21-03-2011 @author: maciek ''' from formater import formatString import os class IndexGenerator(object): ''' Generates Index.html for iOS app OTA distribution ''' basePath = os.path.dirname(__file__) templateFile = os.path.join(basePath,"templates/index.tmpl") releaseUrls = "" ...
[ [ 8, 0, 0.0526, 0.0877, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1053, 0.0175, 0, 0.66, 0.3333, 11, 0, 1, 0, 0, 11, 0, 0 ], [ 1, 0, 0.1228, 0.0175, 0, 0.66, ...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "from formater import formatString", "import os", "class IndexGenerator(object):\n '''\n Generates Index.html for iOS app OTA distribution\n '''\n basePath = os.path.dirname(__file__)\n templateFile = os.path.join(basePath,\"templates/index....
#!/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.0297, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0367, 0.0017, 0, 0.66, 0.0333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.0385, 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.0451, 0.0765, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0874, 0.0027, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0929, 0.0027, 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.0173, 0.0042, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.021, 0.001, 0, 0.66, 0.0263, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0231, 0.001, 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.1848, 0.0543, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2283, 0.0109, 0, 0.66, 0.1667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.25, 0.0109, 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 threading", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from djan...
# 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.1491, 0.0439, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1842, 0.0088, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2018, 0.0088, 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...
# 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.0303, 0.0074, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0368, 0.0018, 0, 0.66, 0.0294, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0404, 0.0018, 0, 0.66,...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use OAuth 2.0 on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import base64", "import httplib2", "import logging", "import pickle", "import time", "try: # pragma: no cover\n import simp...
#!/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.0711, 0.004, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0751, 0.004, 0, 0.66, 0.0625, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.0791, 0.004, 0, 0.6...
[ "import base64", "import hashlib", "import logging", "import time", "from OpenSSL import crypto", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from django, should work on App Engine\n from django.utils import simplejson\n except I...
# 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.1504, 0.0442, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1858, 0.0088, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.2478, 0.0796, 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)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pr...
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.0186, 0.0064, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0234, 0.0011, 0, 0.66, 0.0303, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0261, 0.0043, 0, 0.66...
[ "\"\"\"Classes to encapsulate a single HTTP request.\n\nThe classes implement a command pattern, with every\nobject supporting an execute() method that does the\nactuall HTTP request.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "__all__ = [\n 'HttpRequest', 'RequestMockBuilder', 'HttpMoc...
# 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.0546, 0.0191, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0683, 0.0027, 0, 0.66, 0.0667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0738, 0.0027, 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.1667, 0.0439, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2018, 0.0088, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2281, 0.0088, 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 anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base error for th...
# 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_...
from StoredObject import * class Message(StoredObject): TEXT = 0 PHOTO = 1 GRAPHITY = 2 VIDEO = 3 AUDIO = 4 def __init__(self, id, time, text, mfrom, mto, isReaded, # Parameters defined at wall's messages retrieval message_type = 0, message_name = None, ...
[ [ 1, 0, 0.0204, 0.0204, 0, 0.66, 0, 754, 0, 1, 0, 0, 754, 0, 0 ], [ 3, 0, 0.3061, 0.5102, 0, 0.66, 0.25, 6, 0, 1, 0, 0, 754, 0, 0 ], [ 14, 1, 0.0816, 0.0204, 1, 0.1...
[ "from StoredObject import *", "class Message(StoredObject):\n TEXT = 0\n PHOTO = 1\n GRAPHITY = 2\n VIDEO = 3\n AUDIO = 4\n def __init__(self, id, time, text, mfrom, mto, isReaded,\n # Parameters defined at wall's messages retrieval", " TEXT = 0", " PHOTO = 1", "...
import Captcha from Errors import UserAPIError import httplib import re ID="1" USERAPI_HOST="login.userapi.com" class Session: def __init__(self, filename = None, remixpass = None, sid = None): if filename: self.load_session(filename) self.renew_session() else: ...
[ [ 1, 0, 0.0088, 0.0088, 0, 0.66, 0, 42, 0, 1, 0, 0, 42, 0, 0 ], [ 1, 0, 0.0175, 0.0088, 0, 0.66, 0.1667, 466, 0, 1, 0, 0, 466, 0, 0 ], [ 1, 0, 0.0351, 0.0088, 0, 0....
[ "import Captcha", "from Errors import UserAPIError", "import httplib", "import re", "ID=\"1\"", "USERAPI_HOST=\"login.userapi.com\"", "class Session:\n def __init__(self, filename = None, remixpass = None, sid = None):\n if filename:\n self.load_session(filename)\n self.r...
from StoredObject import * class Privacy: def __init__(self, may_look_profile, may_look_wall, may_leave_messages): self.may_look_profile = may_look_profile self.may_look_wall = may_look_wall self.may_leave_messages = may_leave_messages class Position: def __init__(self, id_count...
[ [ 1, 0, 0.0092, 0.0092, 0, 0.66, 0, 754, 0, 1, 0, 0, 754, 0, 0 ], [ 3, 0, 0.0459, 0.0459, 0, 0.66, 0.125, 947, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.0505, 0.0367, 1, 0.1...
[ "from StoredObject import *", "class Privacy:\n def __init__(self, may_look_profile, may_look_wall, may_leave_messages):\n self.may_look_profile = may_look_profile\n self.may_look_wall = may_look_wall\n self.may_leave_messages = may_leave_messages", " def __init__(self, may_loo...
from StoredObject import * class Photo(StoredObject): def __init__ (self, id, pic, small_pic): self.id = id self.pic = pic self.small_pic = small_pic class PhotosUploadInfo: def __init__(self, aid, upload_url = None, upload_hash = None, upload_rhash = None): se...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 754, 0, 1, 0, 0, 754, 0, 0 ], [ 3, 0, 0.2273, 0.2273, 0, 0.66, 0.3333, 382, 0, 1, 0, 0, 754, 0, 0 ], [ 2, 1, 0.25, 0.1818, 1, 0....
[ "from StoredObject import *", "class Photo(StoredObject):\n def __init__ (self, id, pic, small_pic):\n self.id = id\n self.pic = pic\n self.small_pic = small_pic", " def __init__ (self, id, pic, small_pic):\n self.id = id\n self.pic = pic\n...
class StoredObject: def __eq__(self, other): return int(self.id) == int(other.id) def __ne__(self, other): return int(self.id) != int(other.id) def __hash__(self): return int(self.id)
[ [ 3, 0, 0.5556, 1, 0, 0.66, 0, 754, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.2778, 0.2222, 1, 0.5, 0, 763, 0, 2, 1, 0, 0, 0, 2 ], [ 13, 2, 0.3333, 0.1111, 2, 0.78, 0, ...
[ "class StoredObject:\n def __eq__(self, other):\n return int(self.id) == int(other.id)\n\n def __ne__(self, other):\n return int(self.id) != int(other.id)\n\n def __hash__(self):", " def __eq__(self, other):\n return int(self.id) == int(other.id)", " return int(self.id) =...
import webbrowser class Captcha: def __init__(self): self.csid =4 # Chosed randomly! print "Look at browser and enter the captcha to console" webbrowser.open("http://userapi.com/data?act=captcha&csid=" + str(self.csid)) self.text = raw_input("VKontakte captcha: ") ...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 461, 0, 1, 0, 0, 461, 0, 0 ], [ 3, 0, 0.5417, 0.6667, 0, 0.66, 1, 42, 0, 1, 0, 0, 0, 0, 4 ], [ 2, 1, 0.5833, 0.5833, 1, 0.61, ...
[ "import webbrowser", "class Captcha:\n def __init__(self):\n self.csid =4 # Chosed randomly!\n print(\"Look at browser and enter the captcha to console\")\n \n webbrowser.open(\"http://userapi.com/data?act=captcha&csid=\" + str(self.csid))\n \n self.text = raw_input(\"...
class UserAPIError: def __init__(this, code, action, text): this.code = code this.action = action this.text = text class JSONProblemError(Exception): def __init__(self, json_data, supplement): self.json_data = json_data self.supplement = supplement
[ [ 3, 0, 0.2727, 0.4545, 0, 0.66, 0, 167, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.3182, 0.3636, 1, 0.01, 0, 555, 0, 4, 0, 0, 0, 0, 0 ], [ 14, 2, 0.2727, 0.0909, 2, 0.69, ...
[ "class UserAPIError:\n def __init__(this, code, action, text):\n this.code = code\n this.action = action\n this.text = text", " def __init__(this, code, action, text):\n this.code = code\n this.action = action\n this.text = text", " this.code = code", " ...
from UserAPI import Token from UserAPI import UserAPITypes from UserAPI import RetCodes from UserAPI import UserAPI from Session import Session from Errors import UserAPIError, JSONProblemError
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 3, 0, 1, 0, 0, 3, 0, 0 ], [ 1, 0, 0.25, 0.125, 0, 0.66, 0.2, 3, 0, 1, 0, 0, 3, 0, 0 ], [ 1, 0, 0.375, 0.125, 0, 0.66, 0.4, ...
[ "from UserAPI import Token", "from UserAPI import UserAPITypes", "from UserAPI import RetCodes", "from UserAPI import UserAPI", "from Session import Session", "from Errors import UserAPIError, JSONProblemError" ]
from Parser import * from Errors import * import Session import httplib import re import json class Token: Standard = None Login = 0 Action = 1 class RetCodes: NoError = 0 Error = 1 class UserAPITypes: Standard = None Outbox = "outbox" ...
[ [ 1, 0, 0.0045, 0.0045, 0, 0.66, 0, 717, 0, 1, 0, 0, 717, 0, 0 ], [ 1, 0, 0.009, 0.0045, 0, 0.66, 0.1, 466, 0, 1, 0, 0, 466, 0, 0 ], [ 1, 0, 0.018, 0.0045, 0, 0.66,...
[ "from Parser import *", "from Errors import *", "import Session", "import httplib", "import re", "import json", "class Token:\n Standard = None\n Login = 0\n Action = 1", " Standard = None", " Login = 0", " Action = 1", "class RetCodes:\n NoError ...
import json import datetime from Message import * from Person import * from Photo import * MSG_PERSON = 0 FRI_PERSON = 1 PRO_PERSON = 2 def listify(data, size): result = [None for i in range(0, size)] if isinstance(data, list): for i in range(0, len(data)): result[i] = data[i] elif...
[ [ 1, 0, 0.0051, 0.0051, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0101, 0.0051, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0202, 0.0051, 0, 0.6...
[ "import json", "import datetime", "from Message import *", "from Person import *", "from Photo import *", "MSG_PERSON = 0", "FRI_PERSON = 1", "PRO_PERSON = 2", "def listify(data, size):\n result = [None for i in range(0, size)]\n if isinstance(data, list):\n for i in range(0, len(dat...
# -*- coding: utf-8 -*- from userapi import * USER = "test.vkontakte@mail.ru" PASS = "yi8zXpHIs" DID="41657126" def test_profile(id = None): profile = test.v_profile(id) print "Profile of user " + profile.name + " <" + str(profile.id) + "> " print "Mother: " + str(profile.mother) print "Status: " ...
[ [ 1, 0, 0.027, 0.009, 0, 0.66, 0, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 14, 0, 0.045, 0.009, 0, 0.66, 0.0714, 532, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0541, 0.009, 0, 0.66,...
[ "from userapi import *", "USER = \"test.vkontakte@mail.ru\"", "PASS = \"yi8zXpHIs\"", "DID=\"41657126\"", "def test_profile(id = None):\n profile = test.v_profile(id)\n print(\"Profile of user \" + profile.name + \" <\" + str(profile.id) + \"> \")\n print(\"Mother: \" + str(profile.mother))\n pr...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # 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...
[ [ 1, 0, 0.2, 0.0111, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2111, 0.0111, 0, 0.66, 0.0625, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 7, 0, 0.2611, 0.0444, 0, 0.6...
[ "import os", "import sys", "try:\n from urlparse import parse_qsl\nexcept:\n from cgi import parse_qsl", " from urlparse import parse_qsl", " from cgi import parse_qsl", "import oauth2 as oauth", "REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'", "ACCESS_TOKEN_URL = 'https://api...
#!/usr/bin/python2.4 '''Post a message to twitter''' __author__ = 'dewitt@google.com' import ConfigParser import getopt import os import sys import twitter USAGE = '''Usage: tweet [options] message This script posts a message to Twitter. Options: -h --help : print this help --consumer-key : the twit...
[ [ 8, 0, 0.0213, 0.0071, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0355, 0.0071, 0, 0.66, 0.0667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0496, 0.0071, 0, 0.66,...
[ "'''Post a message to twitter'''", "__author__ = 'dewitt@google.com'", "import ConfigParser", "import getopt", "import os", "import sys", "import twitter", "USAGE = '''Usage: tweet [options] message\n\n This script posts a message to Twitter.\n\n Options:\n\n -h --help : print this help\n --co...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # 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...
[ [ 8, 0, 0.2606, 0.0563, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3099, 0.0141, 0, 0.66, 0.5, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 3, 0, 0.7535, 0.507, 0, 0.66, ...
[ "'''A class that defines the default URL Shortener.\n\nTinyURL is provided as the default and as an example.\n'''", "import urllib", "class ShortenURL(object):\n '''Helper class to make URL Shortener calls if/when required'''\n def __init__(self,\n userid=None,\n password=N...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # 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...
[ [ 8, 0, 0.2329, 0.0137, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2603, 0.0137, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.274, 0.0137, 0, 0.66, ...
[ "'''The setup and build script for the python-twitter library.'''", "__author__ = 'python-twitter@googlegroups.com'", "__version__ = '0.8.3'", "METADATA = dict(\n name = \"python-twitter\",\n version = __version__,\n py_modules = ['twitter'],\n author='The Python-Twitter Developers',\n author_email='pyth...
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
[ [ 8, 0, 0.0231, 0.0308, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0462, 0.0154, 0, 0.66, 0.1667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 7, 0, 0.0846, 0.0615, 0, 0.66...
[ "\"\"\"JSON token scanner\n\"\"\"", "import re", "try:\n from simplejson._speedups import make_scanner as c_make_scanner\nexcept ImportError:\n c_make_scanner = None", " from simplejson._speedups import make_scanner as c_make_scanner", " c_make_scanner = None", "__all__ = ['make_scanner']", ...