code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# -*- coding: utf-8 -*- from django.http import HttpRequest class RegisterVars(dict): """ This class provides a simplified mechanism to build context processors that only add variables or functions without processing a request. Your module should have a global instance of this class called 'regist...
[ [ 1, 0, 0.0392, 0.0196, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 3, 0, 0.5392, 0.9412, 0, 0.66, 1, 391, 0, 1, 0, 0, 827, 0, 6 ], [ 8, 1, 0.402, 0.6275, 1, 0.97, ...
[ "from django.http import HttpRequest", "class RegisterVars(dict):\n \"\"\"\n This class provides a simplified mechanism to build context processors\n that only add variables or functions without processing a request.\n \n Your module should have a global instance of this class called 'register'.\n ...
# -*- coding: utf-8 -*- from appenginepatcher import on_production_server, have_appserver import os DEBUG = not on_production_server # The MEDIA_VERSION will get integrated via %d MEDIA_URL = '/media/%d/' # The MEDIA_URL will get integrated via %s ADMIN_MEDIA_PREFIX = '%sadmin_media/' ADMINS = () DATABASE_ENGINE = '...
[ [ 1, 0, 0.0328, 0.0164, 0, 0.66, 0, 519, 0, 2, 0, 0, 519, 0, 0 ], [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0.0345, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0656, 0.0164, 0, ...
[ "from appenginepatcher import on_production_server, have_appserver", "import os", "DEBUG = not on_production_server", "MEDIA_URL = '/media/%d/'", "ADMIN_MEDIA_PREFIX = '%sadmin_media/'", "ADMINS = ()", "DATABASE_ENGINE = 'appengine'", "DATABASE_SUPPORTS_TRANSACTIONS = False", "USE_I18N = True", "E...
from django.conf import settings from django.http import HttpResponseServerError from ragendja.template import render_to_string def server_error(request, *args, **kwargs): debugkey = request.REQUEST.get('debugkey') if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None): import sys from...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.25, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.66,...
[ "from django.conf import settings", "from django.http import HttpResponseServerError", "from ragendja.template import render_to_string", "def server_error(request, *args, **kwargs):\n debugkey = request.REQUEST.get('debugkey')\n if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None):\n i...
# -*- coding: utf-8 -*- from django.conf import settings from django.utils.cache import patch_cache_control from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError from google.appengine.ext import db from ragendja.template import render_to_response from ragendja.views import server_error, maintenan...
[ [ 1, 0, 0.0417, 0.0208, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0625, 0.0208, 0, 0.66, 0.1, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 1, 0, 0.0833, 0.0208, 0, 0.66,...
[ "from django.conf import settings", "from django.utils.cache import patch_cache_control", "from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError", "from google.appengine.ext import db", "from ragendja.template import render_to_response", "from ragendja.views import server_error, mai...
# -*- coding: utf-8 -*- from settings import * import sys if '%d' in MEDIA_URL: MEDIA_URL = MEDIA_URL % MEDIA_VERSION if '%s' in ADMIN_MEDIA_PREFIX: ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL TEMPLATE_DEBUG = DEBUG MANAGERS = ADMINS # You can override Django's or some apps' locales with these folder...
[ [ 1, 0, 0.018, 0.009, 0, 0.66, 0, 168, 0, 1, 0, 0, 168, 0, 0 ], [ 1, 0, 0.027, 0.009, 0, 0.66, 0.0556, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.0495, 0.018, 0, 0.66,...
[ "from settings import *", "import sys", "if '%d' in MEDIA_URL:\n MEDIA_URL = MEDIA_URL % MEDIA_VERSION", " MEDIA_URL = MEDIA_URL % MEDIA_VERSION", "if '%s' in ADMIN_MEDIA_PREFIX:\n ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL", " ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL", "...
# -*- coding: utf-8 -*- from django.db.models import signals from django.http import Http404 from django.utils import simplejson from google.appengine.ext import db from ragendja.pyutils import getattr_by_path from random import choice from string import ascii_letters, digits def get_filters(*filters): """Helper m...
[ [ 1, 0, 0.0031, 0.0016, 0, 0.66, 0, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 1, 0, 0.0047, 0.0016, 0, 0.66, 0.0357, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0063, 0.0016, 0, ...
[ "from django.db.models import signals", "from django.http import Http404", "from django.utils import simplejson", "from google.appengine.ext import db", "from ragendja.pyutils import getattr_by_path", "from random import choice", "from string import ascii_letters, digits", "def get_filters(*filters):\...
#!/usr/bin/env python if __name__ == '__main__': from common.appenginepatch.aecmd import setup_env setup_env(manage_py_env=True) # Recompile translation files from mediautils.compilemessages import updatemessages updatemessages() # Generate compressed media files for manage.py update impor...
[ [ 4, 0, 0.5556, 0.9444, 0, 0.66, 0, 0, 0, 0, 0, 0, 0, 0, 5 ], [ 1, 1, 0.1667, 0.0556, 1, 0.99, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 1, 0.2222, 0.0556, 1, 0.99, ...
[ "if __name__ == '__main__':\n from common.appenginepatch.aecmd import setup_env\n setup_env(manage_py_env=True)\n\n # Recompile translation files\n from mediautils.compilemessages import updatemessages\n updatemessages()", " from common.appenginepatch.aecmd import setup_env", " setup_env(ma...
from ragendja.settings_post import settings settings.add_app_media('combined-%(LANGUAGE_CODE)s.js', 'jquery/jquery.js', 'jquery/jquery.fixes.js', 'jquery/jquery.ajax-queue.js', 'jquery/jquery.bgiframe.js', 'jquery/jquery.livequery.js', 'jquery/jquery.form.js', )
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 898, 0, 1, 0, 0, 898, 0, 0 ], [ 8, 0, 0.6111, 0.8889, 0, 0.66, 1, 197, 3, 7, 0, 0, 0, 0, 1 ] ]
[ "from ragendja.settings_post import settings", "settings.add_app_media('combined-%(LANGUAGE_CODE)s.js',\n 'jquery/jquery.js',\n 'jquery/jquery.fixes.js',\n 'jquery/jquery.ajax-queue.js',\n 'jquery/jquery.bgiframe.js',\n 'jquery/jquery.livequery.js',\n 'jquery/jquery.form.js',\n)" ]
#!/usr/bin/env python if __name__ == '__main__': from common.appenginepatch.aecmd import setup_env setup_env(manage_py_env=True) # Recompile translation files from mediautils.compilemessages import updatemessages updatemessages() # Generate compressed media files for manage.py update impor...
[ [ 4, 0, 0.5556, 0.9444, 0, 0.66, 0, 0, 0, 0, 0, 0, 0, 0, 5 ], [ 1, 1, 0.1667, 0.0556, 1, 0.43, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 1, 0.2222, 0.0556, 1, 0.43, ...
[ "if __name__ == '__main__':\n from common.appenginepatch.aecmd import setup_env\n setup_env(manage_py_env=True)\n\n # Recompile translation files\n from mediautils.compilemessages import updatemessages\n updatemessages()", " from common.appenginepatch.aecmd import setup_env", " setup_env(ma...
#!/usr/bin/env python # -*- Python -*- import sys import time sys.path.append(".") # Import RTM module import OpenRTM_aist import RTC import socket import httplib from time import sleep # Import Service implementation class # <rtc-template block="service_impl"> # </rtc-template> # Import Service stub modules # <r...
[ [ 1, 0, 0.019, 0.0048, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0238, 0.0048, 0, 0.66, 0.0833, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 8, 0, 0.0286, 0.0048, 0, 0...
[ "import sys", "import time", "sys.path.append(\".\")", "import OpenRTM_aist", "import RTC", "import socket", "import httplib", "from time import sleep", "proxy_spec = [\"implementation_id\", \"Proxy\", \n\t\t \"type_name\", \"Proxy\", \n\t\t \"description\", \"RTC-Lite for Arduino\", \...
#!/usr/bin/env python # -*- Python -*- import sys import time sys.path.append(".") # Import RTM module import OpenRTM_aist import RTC import socket import httplib from time import sleep # Import Service implementation class # <rtc-template block="service_impl"> # </rtc-template> # Import Service stub modules # <r...
[ [ 1, 0, 0.019, 0.0048, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0238, 0.0048, 0, 0.66, 0.0833, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 8, 0, 0.0286, 0.0048, 0, 0...
[ "import sys", "import time", "sys.path.append(\".\")", "import OpenRTM_aist", "import RTC", "import socket", "import httplib", "from time import sleep", "proxy_spec = [\"implementation_id\", \"Proxy\", \n\t\t \"type_name\", \"Proxy\", \n\t\t \"description\", \"RTC-Lite for Arduino\", \...
''' 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.1, 0...
[ "'''\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...
#!/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.1978, 0.011, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2088, 0.011, 0, 0.66, 0.0625, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 7, 0, 0.2582, 0.044, 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.5'", "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']", ...
"""Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ...
[ [ 8, 0, 0.0035, 0.0046, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0069, 0.0023, 0, 0.66, 0.0667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 7, 0, 0.015, 0.0092, 0, 0.66,...
[ "\"\"\"Implementation of JSONEncoder\n\"\"\"", "import re", "try:\n from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii\nexcept ImportError:\n c_encode_basestring_ascii = None", " from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii",...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
[ [ 8, 0, 0.1582, 0.3133, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3165, 0.0032, 0, 0.66, 0.1, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3244, 0.0127, 0, 0.66, ...
[ "r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\n:mod:`simplejson` exposes an API familiar to users of the standard library\n:mod:`marshal` and :mod:`pickle` modules. It is the externally maintaine...
import csv, os, glob import sys import numpy class affycel: def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified): self.filename = filename self.version = version self.header = {} self.intensityCel...
[ [ 1, 0, 0.014, 0.007, 0, 0.66, 0, 312, 0, 3, 0, 0, 312, 0, 0 ], [ 1, 0, 0.021, 0.007, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.028, 0.007, 0, 0.66, ...
[ "import csv, os, glob", "import sys", "import numpy", "class affycel:\n\n def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified):\n self.filename = filename\n self.version = version\n self.header = {}\n ...
#!/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 # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ import string import pickle import logging import sys, os, traceback from yaraeditor.constante import * from PyQt4 import * from PyQt4 imp...
[ [ 8, 0, 0.0226, 0.0189, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0453, 0.0038, 0, 0.66, 0.0833, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.0491, 0.0038, 0, 0.66...
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "import string", "import pickle", "import logging", "import sys, os, traceback", "from yaraeditor.constante import *", "from PyQt4 import *", "from PyQt4 impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) class YaraHighlighter(Qt...
[ [ 8, 0, 0.0432, 0.036, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0791, 0.0072, 0, 0.66, 0.2, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.0863, 0.0072, 0, 0.66, ...
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "from PyQt4 import QtGui", "from PyQt4 import QtCore", "from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT)", "class YaraHighlighter(QtGui.QSyntaxHighlighter):\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ import string import pickle import logging import sys, os, traceback from yaraeditor.constante import * from PyQt4 import * from PyQt4 imp...
[ [ 8, 0, 0.1, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2, 0.0167, 0, 0.66, 0.0909, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.2167, 0.0167, 0, 0.66, ...
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "import string", "import pickle", "import logging", "import sys, os, traceback", "from yaraeditor.constante import *", "from PyQt4 import *", "from PyQt4 impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ __all__ = [] # vim:ts=4:expandtab:sw=4
[ [ 8, 0, 0.5, 0.4167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.8333, 0.0833, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "__all__ = []" ]
# -*- coding: utf-8 -*- # Resource object code # # Created: Sat Nov 24 16:28:52 2012 # by: The Resource Compiler for PyQt (Qt v4.8.1) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x04\x8b\ \xff\ \xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x...
[ [ 1, 0, 0.0025, 0.0003, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 14, 0, 0.4858, 0.9658, 0, 0.66, 0.1667, 131, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9788, 0.0198, 0, ...
[ "from PyQt4 import QtCore", "qt_resource_data = \"\\\n\\x00\\x00\\x04\\x8b\\\n\\xff\\\n\\xd8\\xff\\xe0\\x00\\x10\\x4a\\x46\\x49\\x46\\x00\\x01\\x01\\x00\\x00\\x01\\x00\\\n\\x01\\x00\\x00\\xff\\xdb\\x00\\x84\\x00\\x09\\x06\\x06\\x13\\x06\\x05\\x09\\x14\\\n\\x10\\x08\\x0a\\x09\\x09\\x0a\\x0d\\x16\\x0e\\x0d\\x0c\\x1...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'yaraeditor.ui' # # Created: Tue Feb 26 07:52:45 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
[ [ 1, 0, 0.0599, 0.006, 0, 0.66, 0, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 7, 0, 0.0808, 0.024, 0, 0.66, 0.3333, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 1, 0.0778, 0.006, 1, 0.29, ...
[ "from PyQt4 import QtCore, QtGui", "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s", " _fromUtf8 = QtCore.QString.fromUtf8", " _fromUtf8 = lambda s: s", "class Ui_YaraEditor(object):\n def setupUi(self, YaraEditor):\n YaraEditor.setObjectNa...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'rules_generator.ui' # # Created: Tue Feb 26 07:52:45 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
[ [ 1, 0, 0.0952, 0.0095, 0, 0.66, 0, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 7, 0, 0.1286, 0.0381, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 1, 0.1238, 0.0095, 1, 0.4, ...
[ "from PyQt4 import QtCore, QtGui", "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s", " _fromUtf8 = QtCore.QString.fromUtf8", " _fromUtf8 = lambda s: s", "class Ui_DialogGenerator(object):\n def setupUi(self, DialogGenerator):\n DialogGenera...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ __all__ = [] # vim:ts=4:expandtab:sw=4
[ [ 8, 0, 0.5, 0.4167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.8333, 0.0833, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "__all__ = []" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ __all__ = [] # vim:ts=4:expandtab:sw=4
[ [ 8, 0, 0.5, 0.4167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.8333, 0.0833, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "__all__ = []" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ import os VERSION = "0.1.5" DEBUG = 1 AUTHOR = "Ivan Fontarensky" NAME = "yara-editor" LOG_FILE = "./%s.log" % (NAME) CONF_PATH = "%s/.yar...
[ [ 8, 0, 0.0896, 0.0746, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1642, 0.0149, 0, 0.66, 0.0312, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.194, 0.0149, 0, 0.66...
[ "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\"", "import os", "VERSION = \"0.1.5\"", "DEBUG = 1", "AUTHOR = \"Ivan Fontarensky\"", "NAME = \"yara-editor\"", "LOG_FILE = \"./%s.log\" % (NAME)", "CONF_PATH = \...
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 14, 0, 0.2727, 0.0909, 0, 0.66, 0.1111, 15, 3, 0, 0, 0, 654, 10, 1 ], [ 14, 0, 0.3636, 0.0909, 0, ...
[ "import time", "t = time.time()", "u = time.gmtime(t)", "s = time.strftime('%a, %e %b %Y %T GMT', u)", "print('Content-Type: text/javascript')", "print('Cache-Control: no-cache')", "print('Date: ' + s)", "print('Expires: ' + s)", "print('')", "print('var timeskew = new Date().getTime() - ' + str(t...
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfil...
[ [ 1, 0, 0.0066, 0.0066, 0, 0.66, 0, 11, 0, 3, 0, 0, 11, 0, 0 ], [ 1, 0, 0.0132, 0.0066, 0, 0.66, 0.01, 654, 0, 3, 0, 0, 654, 0, 0 ], [ 14, 0, 0.0331, 0.0066, 0, 0.6...
[ "import vcs, cdms2, cdutil", "import time,os, sys", "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')", "cdmsfile = cdms2.open( filepath )", "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india", "v = vcs.init()", "lc = v.getline('continents')", "lc.color=30#light ...
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfil...
[ [ 1, 0, 0.0066, 0.0066, 0, 0.66, 0, 11, 0, 3, 0, 0, 11, 0, 0 ], [ 1, 0, 0.0132, 0.0066, 0, 0.66, 0.0099, 654, 0, 3, 0, 0, 654, 0, 0 ], [ 14, 0, 0.0331, 0.0066, 0, 0...
[ "import vcs, cdms2, cdutil", "import time,os, sys", "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')", "cdmsfile = cdms2.open( filepath )", "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india", "v = vcs.init()", "lc = v.getline('continents')", "lc.color=30#light ...
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfil...
[ [ 1, 0, 0.0074, 0.0074, 0, 0.66, 0, 11, 0, 3, 0, 0, 11, 0, 0 ], [ 1, 0, 0.0148, 0.0074, 0, 0.66, 0.0122, 654, 0, 3, 0, 0, 654, 0, 0 ], [ 14, 0, 0.037, 0.0074, 0, 0....
[ "import vcs, cdms2, cdutil", "import time,os, sys", "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')", "cdmsfile = cdms2.open( filepath )", "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india", "v = vcs.init()", "lc = v.getline('continents')", "lc.color=30#light ...
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfil...
[ [ 1, 0, 0.0067, 0.0067, 0, 0.66, 0, 11, 0, 3, 0, 0, 11, 0, 0 ], [ 1, 0, 0.0133, 0.0067, 0, 0.66, 0.0101, 654, 0, 3, 0, 0, 654, 0, 0 ], [ 14, 0, 0.0333, 0.0067, 0, 0...
[ "import vcs, cdms2, cdutil", "import time,os, sys", "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')", "cdmsfile = cdms2.open( filepath )", "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india", "v = vcs.init()", "lc = v.getline('continents')", "lc.color=30#light ...
""" 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...
#!/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.2, 0.2, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.8, 0.2, 0, 0.66, 1, 669,...
[ "import cgi", "import os", "import fckeditor" ]
#!/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.3333, 0.3333, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 688, 0, 1, 0, 0, 688, 0, 0 ] ]
[ "import cgi", "import os" ]
#!/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.2, 0.2, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.8, 0.2, 0, 0.66, 1, 669,...
[ "import cgi", "import os", "import fckeditor" ]
#!/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.3333, 0.3333, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 688, 0, 1, 0, 0, 688, 0, 0 ] ]
[ "import cgi", "import os" ]
''' 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 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...
#!/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 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...
''' 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.77, ...
[ "'''\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 '''...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
[ [ 1, 0, 0.0588, 0.0118, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0824, 0.0118, 0, 0...
[ "import logging", "import shutil", "import sys", "import urlparse", "import SimpleHTTPServer", "import BaseHTTPServer", "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
[ [ 8, 0, 0.0631, 0.0991, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.1351, 0.009, 0, 0.66, 0....
[ "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD", "import httplib", "import os", "import re", "import sys", "import urllib", "import urllib2", "import urlparse", "import user", "from xml....
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
[ [ 1, 0, 0.0201, 0.0067, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0336, 0.0067, 0, ...
[ "import datetime", "import sys", "import textwrap", "import common", "from xml.dom import pulldom", "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;", "BOOLEAN_STANZA = \"\"\"\\\n } else i...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 1, 0, 0.0526, 0.0088, 0, ...
[ "import logging", "from xml.dom import minidom", "from xml.dom import pulldom", "BOOLEAN = \"boolean\"", "STRING = \"String\"", "GROUP = \"Group\"", "DEFAULT_INTERFACES = ['FoursquareType']", "INTERFACES = {\n}", "DEFAULT_CLASS_IMPORTS = [\n]", "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
[ [ 1, 0, 0.0588, 0.0118, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0824, 0.0118, 0, 0...
[ "import logging", "import shutil", "import sys", "import urlparse", "import SimpleHTTPServer", "import BaseHTTPServer", "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
[ [ 8, 0, 0.0631, 0.0991, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.1351, 0.009, 0, 0.66, 0....
[ "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD", "import httplib", "import os", "import re", "import sys", "import urllib", "import urllib2", "import urlparse", "import user", "from xml....
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
[ [ 1, 0, 0.0201, 0.0067, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0336, 0.0067, 0, ...
[ "import datetime", "import sys", "import textwrap", "import common", "from xml.dom import pulldom", "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;", "BOOLEAN_STANZA = \"\"\"\\\n } else i...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 1, 0, 0.0526, 0.0088, 0, ...
[ "import logging", "from xml.dom import minidom", "from xml.dom import pulldom", "BOOLEAN = \"boolean\"", "STRING = \"String\"", "GROUP = \"Group\"", "DEFAULT_INTERFACES = ['FoursquareType']", "INTERFACES = {\n}", "DEFAULT_CLASS_IMPORTS = [\n]", "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
[ [ 1, 0, 0.3514, 0.0135, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3649, 0.0135, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.3784, 0.0135, 0, ...
[ "import os", "import re", "import tempfile", "import shutil", "ignore_pattern = re.compile('^(.svn|target|bin|classes)')", "java_pattern = re.compile('^.*\\.java')", "annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')", "def process_dir(dir):\n files = os.listdir(dir)\n for...
#!/usr/bin/python #for test webpy in visualhost import sys sys.path.insert(0, "/usr/local/bin/python") sys.path.insert(0, "/www/fancyhan.host/ifancc_com/htdocs/115") sys.path.insert(0, "/www/fancyhan.host/ifancc_com/modules") import web from web.contrib.template import render_mako from netcrack import netdisk ...
[ [ 1, 0, 0.06, 0.02, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.08, 0.02, 0, 0.66, 0.0769, 368, 3, 2, 0, 0, 0, 0, 1 ], [ 8, 0, 0.1, 0.02, 0, 0.66, 0.153...
[ "import sys", "sys.path.insert(0, \"/usr/local/bin/python\")", "sys.path.insert(0, \"/www/fancyhan.host/ifancc_com/htdocs/115\")", "sys.path.insert(0, \"/www/fancyhan.host/ifancc_com/modules\")", "import web", "from web.contrib.template import render_mako", "from netcrack import netdisk", "render = re...
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 6 _modified_time = 1309516407.3164999 _template_filename='templates/main.html' _template_uri='main.html' _template_cache=cache.Cache(__name__, _mod...
[ [ 1, 0, 0.0769, 0.0385, 0, 0.66, 0, 682, 0, 3, 0, 0, 682, 0, 0 ], [ 14, 0, 0.1154, 0.0385, 0, 0.66, 0.0909, 67, 7, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1538, 0.0385, 0, 0...
[ "from mako import runtime, filters, cache", "UNDEFINED = runtime.UNDEFINED", "__M_dict_builtin = dict", "__M_locals_builtin = locals", "_magic_number = 6", "_modified_time = 1309516407.3164999", "_template_filename='templates/main.html'", "_template_uri='main.html'", "_template_cache=cache.Cache(__n...
#encoding:utf-8 import urllib import json class netdisk(): '''a class which can fetch 115 netdisk`s file though the given url or pickcode the request url examplehttp://uapi.115.com/?ct=upload_api&ac= get_pick_code_info&pickcode=aqbc8e20&version=1175"''' api = "http://uapi.115.c...
[ [ 1, 0, 0.0435, 0.0217, 0, 0.66, 0, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0652, 0.0217, 0, 0.66, 0.3333, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 3, 0, 0.4239, 0.6522, 0, ...
[ "import urllib", "import json", "class netdisk():\n '''a class which can fetch 115 netdisk`s file though the given url or\n pickcode\n the request url examplehttp://uapi.115.com/?ct=upload_api&ac=\n get_pick_code_info&pickcode=aqbc8e20&version=1175\"'''\n api = \"http://uapi.115.com/?...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Zdenko Podobný # Author: Zdenko Podobný # # 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/LIC...
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 1, ...
[ "import os", "import sys", "import ctypes" ]
#!/usr/bin/python import sys import os import matplotlib import numpy import matplotlib matplotlib.use('AGG') import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator from matplotlib.ticker import FormatStrFormatter def getArg(param, default=""): if (sys.argv.count(param) == 0): return default ...
[ [ 1, 0, 0.0577, 0.0192, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0769, 0.0192, 0, 0.66, 0.0455, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0962, 0.0192, 0, ...
[ "import sys", "import os", "import matplotlib", "import numpy", "import matplotlib", "matplotlib.use('AGG')", "import matplotlib.pyplot as plt", "from matplotlib.ticker import MaxNLocator", "from matplotlib.ticker import FormatStrFormatter", "def getArg(param, default=\"\"):\n if (sys.argv.coun...
from optparse import OptionParser import random import heapq from operator import itemgetter from collections import defaultdict class Split: def __init__(self): self.train = {} self.test = {} self.counts = {} def add(self,user,trustees): if len(trustees) >= opts.min_trustees:...
[ [ 1, 0, 0.0083, 0.0083, 0, 0.66, 0, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0167, 0.0083, 0, 0.66, 0.0303, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.025, 0.0083, 0, 0...
[ "from optparse import OptionParser", "import random", "import heapq", "from operator import itemgetter", "from collections import defaultdict", "class Split:\n\n def __init__(self):\n self.train = {}\n self.test = {}\n self.counts = {}\n\n def add(self,user,trustees):", " d...
# -*- coding:utf-8 -*- import socket import functools import tornado.ioloop import busmanager import config _socket = None _ioloop = tornado.ioloop.IOLoop.instance() def start(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.setb...
[ [ 1, 0, 0.0938, 0.0312, 0, 0.66, 0, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.125, 0.0312, 0, 0.66, 0.1111, 711, 0, 1, 0, 0, 711, 0, 0 ], [ 1, 0, 0.1875, 0.0312, 0, 0...
[ "import socket", "import functools", "import tornado.ioloop", "import busmanager", "import config", "_socket = None", "_ioloop = tornado.ioloop.IOLoop.instance()", "def start():\n sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)...
import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(8888) tornado.ioloop.IOLoop.instance().start()
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 730, 0, 1, 0, 0, 730, 0, 0 ], [ 1, 0, 0.1429, 0.0714, 0, 0.66, 0.25, 248, 0, 1, 0, 0, 248, 0, 0 ], [ 3, 0, 0.3571, 0.2143, 0, 0....
[ "import tornado.ioloop", "import tornado.web", "class MainHandler(tornado.web.RequestHandler):\n def get(self):\n self.write(\"Hello, world\")", " def get(self):\n self.write(\"Hello, world\")", " self.write(\"Hello, world\")", "application = tornado.web.Application([\n (r\"/...
# -*- coding:utf-8 -*- Coords = [ (23.152793, 113.342832, 0.33, 0), (23.152792, 113.342624, -0.33, 1), (23.152790, 113.342417, 0.00, 1), (23.153019, 113.342402, 0.17, 1), (23.153249, 113.342386, 0.33, 1), (23.153478, 113.342371, 0.50, 1), (23.153707, 113.342356, -0.33, 2), (23.153937, 113.342340, -0.17, 2), (...
[ [ 14, 0, 0.4118, 0.7868, 0, 0.66, 0, 620, 0, 0, 0, 0, 0, 5, 0 ], [ 2, 0, 0.8199, 0.0147, 0, 0.66, 0.25, 748, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 1, 0.8235, 0.0074, 1, 0.41...
[ "Coords = [\n\t(23.152793, 113.342832, 0.33, 0),\n\t(23.152792, 113.342624, -0.33, 1),\n\t(23.152790, 113.342417, 0.00, 1),\n\t(23.153019, 113.342402, 0.17, 1),\n\t(23.153249, 113.342386, 0.33, 1),\n\t(23.153478, 113.342371, 0.50, 1),\n\t(23.153707, 113.342356, -0.33, 2),", "def coord_latitude(coord):\n return...
# -*- coding:utf-8 -*- UDP_PORT = 6000 # 校巴终端上传数据端口 HTTP_PORT = 8001 # HTTP接口端口
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 230, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 66, 1, 0, 0, 0, 0, 1, 0 ] ]
[ "UDP_PORT = 6000 # 校巴终端上传数据端口", "HTTP_PORT = 8001 # HTTP接口端口" ]
from composite import CompositeGoal from onek_onek import OneKingAttackOneKingEvaluator, OneKingFleeOneKingEvaluator class Goal_Think(CompositeGoal): def __init__(self, owner): CompositeGoal.__init__(self, owner) self.evaluators = [OneKingAttackOneKingEvaluator(1.0), ...
[ [ 1, 0, 0.0263, 0.0263, 0, 0.66, 0, 334, 0, 1, 0, 0, 334, 0, 0 ], [ 1, 0, 0.0526, 0.0263, 0, 0.66, 0.5, 178, 0, 2, 0, 0, 178, 0, 0 ], [ 3, 0, 0.5, 0.8158, 0, 0.66, ...
[ "from composite import CompositeGoal", "from onek_onek import OneKingAttackOneKingEvaluator, OneKingFleeOneKingEvaluator", "class Goal_Think(CompositeGoal):\n def __init__(self, owner):\n CompositeGoal.__init__(self, owner)\n self.evaluators = [OneKingAttackOneKingEvaluator(1.0),\n ...
from goal import Goal class CompositeGoal(Goal): def __init__(self, owner): Goal.__init__(self, owner) self.subgoals = [] def removeAllSubgoals(self): for s in self.subgoals: s.terminate() self.subgoals = [] def processSubgoals(self): # rem...
[ [ 1, 0, 0.0312, 0.0312, 0, 0.66, 0, 914, 0, 1, 0, 0, 914, 0, 0 ], [ 3, 0, 0.5469, 0.9375, 0, 0.66, 1, 409, 0, 4, 0, 0, 302, 0, 8 ], [ 2, 1, 0.1562, 0.0938, 1, 0.65,...
[ "from goal import Goal", "class CompositeGoal(Goal):\n def __init__(self, owner):\n Goal.__init__(self, owner)\n self.subgoals = []\n\n def removeAllSubgoals(self):\n for s in self.subgoals:\n s.terminate()", " def __init__(self, owner):\n Goal.__init__(self, owne...
import unittest import checkers import games from globalconst import * # (white) # 45 46 47 48 # 39 40 41 42 # 34 35 36 37 # 28 29 30 31 # 23 24 25 26 # 17 18 19 20 # 12 13 14 15 # 6 7 8 9 # (bl...
[ [ 1, 0, 0.003, 0.003, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.006, 0.003, 0, 0.66, 0.0588, 901, 0, 1, 0, 0, 901, 0, 0 ], [ 1, 0, 0.009, 0.003, 0, 0.66, ...
[ "import unittest", "import checkers", "import games", "from globalconst import *", "class TestBlackManSingleJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n ...
import utils class Observer(object): def update(self, change): utils.abstract()
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 970, 0, 1, 0, 0, 970, 0, 0 ], [ 3, 0, 0.6667, 0.5, 0, 0.66, 1, 771, 0, 1, 0, 0, 186, 0, 1 ], [ 2, 1, 0.75, 0.3333, 1, 0.91, ...
[ "import utils", "class Observer(object):\n def update(self, change):\n utils.abstract()", " def update(self, change):\n utils.abstract()", " utils.abstract()" ]
import re import sys class LinkRules(object): """Rules for recognizing external links.""" # For the link targets: proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc' extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto interwiki = r''' (?P<inter_wiki> [A-Z][a-zA-Z]+ ) :...
[ [ 1, 0, 0.007, 0.007, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0141, 0.007, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 3, 0, 0.088, 0.1127, 0, 0.66...
[ "import re", "import sys", "class LinkRules(object):\n \"\"\"Rules for recognizing external links.\"\"\"\n\n # For the link targets:\n proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc'\n extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto\n interwiki = r'''\n (?P<inte...
import games import copy import multiprocessing import time import random from controller import Controller from transpositiontable import TranspositionTable from globalconst import * class AlphaBetaController(Controller): def __init__(self, **props): self._model = props['model'] self._...
[ [ 1, 0, 0.0075, 0.0075, 0, 0.66, 0, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.0149, 0.0075, 0, 0.66, 0.1, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0224, 0.0075, 0, 0.66, ...
[ "import games", "import copy", "import multiprocessing", "import time", "import random", "from controller import Controller", "from transpositiontable import TranspositionTable", "from globalconst import *", "class AlphaBetaController(Controller):\n def __init__(self, **props):\n self._mod...
from goal import Goal from composite import CompositeGoal class Goal_OneKingAttack(CompositeGoal): def __init__(self, owner): CompositeGoal.__init__(self, owner) def activate(self): self.status = self.ACTIVE self.removeAllSubgoals() # because goals are *pushed* onto t...
[ [ 1, 0, 0.011, 0.011, 0, 0.66, 0, 914, 0, 1, 0, 0, 914, 0, 0 ], [ 1, 0, 0.022, 0.011, 0, 0.66, 0.25, 334, 0, 1, 0, 0, 334, 0, 0 ], [ 3, 0, 0.1374, 0.1978, 0, 0.66, ...
[ "from goal import Goal", "from composite import CompositeGoal", "class Goal_OneKingAttack(CompositeGoal):\n def __init__(self, owner):\n CompositeGoal.__init__(self, owner)\n\n def activate(self):\n self.status = self.ACTIVE\n self.removeAllSubgoals()\n # because goals are *pus...
import math, os, sys from ConfigParser import RawConfigParser DEFAULT_SIZE = 400 BOARD_SIZE = 8 CHECKER_SIZE = 30 MAX_VALID_SQ = 32 MOVE = 0 JUMP = 1 OCCUPIED = 0 BLACK = 1 WHITE = 2 MAN = 4 KING = 8 FREE = 16 COLORS = BLACK | WHITE TYPES = OCCUPIED | BLACK | WHITE | MAN | KING | FREE HUMAN = 0 ...
[ [ 1, 0, 0.0034, 0.0034, 0, 0.66, 0, 526, 0, 3, 0, 0, 526, 0, 0 ], [ 1, 0, 0.0069, 0.0034, 0, 0.66, 0.0116, 272, 0, 1, 0, 0, 272, 0, 0 ], [ 14, 0, 0.0137, 0.0034, 0, ...
[ "import math, os, sys", "from ConfigParser import RawConfigParser", "DEFAULT_SIZE = 400", "BOARD_SIZE = 8", "CHECKER_SIZE = 30", "MAX_VALID_SQ = 32", "MOVE = 0", "JUMP = 1", "OCCUPIED = 0", "BLACK = 1", "WHITE = 2", "MAN = 4", "KING = 8", "FREE = 16", "COLORS = BLACK | WHITE", "TYPES =...
import os from Tkinter import * from Tkconstants import END, N, S, E, W from command import * from observer import * from globalconst import * from autoscrollbar import AutoScrollbar from textserialize import Serializer from hyperlinkmgr import HyperlinkManager from tkFileDialog import askopenfilename from tk...
[ [ 1, 0, 0.0021, 0.0021, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0041, 0.0021, 0, 0.66, 0.0833, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 1, 0, 0.0062, 0.0021, 0, ...
[ "import os", "from Tkinter import *", "from Tkconstants import END, N, S, E, W", "from command import *", "from observer import *", "from globalconst import *", "from autoscrollbar import AutoScrollbar", "from textserialize import Serializer", "from hyperlinkmgr import HyperlinkManager", "from tkF...
import sys import games from globalconst import * class Player(object): def __init__(self, color): self.col = color def _get_color(self): return self.col color = property(_get_color, doc="Player color") class AlphabetaPlayer(Player): def __init__(self, color, depth=4): ...
[ [ 1, 0, 0.0133, 0.0133, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0267, 0.0133, 0, 0.66, 0.2, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.04, 0.0133, 0, 0.66, ...
[ "import sys", "import games", "from globalconst import *", "class Player(object):\n def __init__(self, color):\n self.col = color\n\n def _get_color(self):\n return self.col\n color = property(_get_color, doc=\"Player color\")", " def __init__(self, color):\n self.col = colo...
from UserDict import UserDict class TranspositionTable (UserDict): def __init__ (self, maxSize): UserDict.__init__(self) assert maxSize > 0 self.maxSize = maxSize self.krono = [] self.maxdepth = 0 self.killer1 = [-1]*20 self.killer2 = [-1]*20 self.ha...
[ [ 1, 0, 0.0156, 0.0156, 0, 0.66, 0, 351, 0, 1, 0, 0, 351, 0, 0 ], [ 3, 0, 0.5234, 0.9688, 0, 0.66, 1, 391, 0, 8, 0, 0, 351, 0, 3 ], [ 2, 1, 0.1328, 0.1562, 1, 0.05,...
[ "from UserDict import UserDict", "class TranspositionTable (UserDict):\n def __init__ (self, maxSize):\n UserDict.__init__(self)\n assert maxSize > 0\n self.maxSize = maxSize\n self.krono = []\n self.maxdepth = 0", " def __init__ (self, maxSize):\n UserDict.__init...
import re import sys from rules import Rules from document import DocNode class Parser(object): """ Parse the raw text and create a document object that can be converted into output using Emitter. A separate instance should be created for parsing a new document. The first parameter is the raw tex...
[ [ 1, 0, 0.0041, 0.0041, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0083, 0.0041, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0165, 0.0041, 0, 0....
[ "import re", "import sys", "from rules import Rules", "from document import DocNode", "class Parser(object):\n \"\"\"\n Parse the raw text and create a document object\n that can be converted into output using Emitter.\n\n A separate instance should be created for parsing a new document.\n Th...
from Tkinter import * from ttk import Combobox, Label from tkFont import families from tkSimpleDialog import Dialog class PreferencesDialog(Dialog): def __init__(self, parent, title, font, size): self._master = parent self.result = False self.font = font self.size = size ...
[ [ 1, 0, 0.0233, 0.0233, 0, 0.66, 0, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 1, 0, 0.0465, 0.0233, 0, 0.66, 0.25, 718, 0, 2, 0, 0, 718, 0, 0 ], [ 1, 0, 0.0698, 0.0233, 0, 0....
[ "from Tkinter import *", "from ttk import Combobox, Label", "from tkFont import families", "from tkSimpleDialog import Dialog", "class PreferencesDialog(Dialog):\n def __init__(self, parent, title, font, size):\n self._master = parent\n self.result = False\n self.font = font\n ...
from Tkinter import PhotoImage from Tkconstants import * from globalconst import BULLET_IMAGE from creoleparser import Parser from rules import LinkRules class TextTagEmitter(object): """ Generate tagged output compatible with the Tkinter Text widget """ def __init__(self, root, txtWidget, hy...
[ [ 1, 0, 0.0041, 0.0041, 0, 0.66, 0, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 1, 0, 0.0082, 0.0041, 0, 0.66, 0.1667, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.0123, 0.0041, 0, 0.66...
[ "from Tkinter import PhotoImage", "from Tkconstants import *", "from globalconst import BULLET_IMAGE", "from creoleparser import Parser", "from rules import LinkRules", "class TextTagEmitter(object):\n \"\"\"\n Generate tagged output compatible with the Tkinter Text widget\n \"\"\"\n def __ini...