code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#!/usr/bin/env python
# View events and jpg images
import pygtk
pygtk.require('2.0')
import gtk
#import pango #cell renderer alignment, couldn't get this to work
import glob
import os.path
import re
import datetime
GMOTION_DIR = "/usr/local/var/gmotion"
GROUP_DIR = "default"
JPG_WINDOW_COLS = 5
EVENT_END_GAP = 60 ... | [
[
1,
0,
0.0214,
0.0043,
0,
0.66,
0,
106,
0,
1,
0,
0,
106,
0,
0
],
[
8,
0,
0.0256,
0.0043,
0,
0.66,
0.0769,
66,
3,
1,
0,
0,
0,
0,
1
],
[
1,
0,
0.0299,
0.0043,
0,
0.6... | [
"import pygtk",
"pygtk.require('2.0')",
"import gtk",
"import glob",
"import os.path",
"import re",
"import datetime",
"GMOTION_DIR = \"/usr/local/var/gmotion\"",
"GROUP_DIR = \"default\"",
"JPG_WINDOW_COLS = 5",
"EVENT_END_GAP = 60 # seconds",
"class MainWindow:\n\n def delete_event(self,... |
#!/usr/bin/env python
# View live images from a single or group of webcams
import gobject
import gtk
import pygtk
pygtk.require('2.0')
import glob
GMOTION_DIR = "/usr/local/var/gmotion"
GROUP_DIR = "default"
MOTION_SNAPSHOT_INTERVAL = 1 # seconds
class MainWindow:
def destroy(self, widget):
gtk.main_... | [
[
1,
0,
0.0806,
0.0161,
0,
0.66,
0,
90,
0,
1,
0,
0,
90,
0,
0
],
[
1,
0,
0.0968,
0.0161,
0,
0.66,
0.1,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.1129,
0.0161,
0,
0.66,... | [
"import gobject",
"import gtk",
"import pygtk",
"pygtk.require('2.0')",
"import glob",
"GMOTION_DIR = \"/usr/local/var/gmotion\"",
"GROUP_DIR = \"default\"",
"MOTION_SNAPSHOT_INTERVAL = 1 # seconds",
"class MainWindow:\n\n def destroy(self, widget):\n gtk.main_quit()\n\n def delete_eve... |
#!/usr/bin/env python
# -*- coding: cp1252 -*-
#Opciones
puerto = 1111
user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; ' \
'Trident/4.0; .NET CLR 1.1.4322)'
| [
[
14,
0,
0.7143,
0.1429,
0,
0.66,
0,
84,
1,
0,
0,
0,
0,
1,
0
],
[
14,
0,
0.9286,
0.2857,
0,
0.66,
1,
731,
1,
0,
0,
0,
0,
3,
0
]
] | [
"puerto = 1111",
"user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; ' \\\n 'Trident/4.0; .NET CLR 1.1.4322)'"
] |
#!/usr/bin/python
# -*- coding: latin-1 -*-
"""App para Bottle de constancia.py
"""
__license__ = "MIT"
__version__ = "0.02"
import sys
#Parche para que pueda cargar opciones.py con py2exe
if len(sys.path) == 1:
sys.path.append(sys.prefix)
import os
import webbrowser
import uuid
import bottle
from bottle impor... | [
[
8,
0,
0.0285,
0.0127,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.038,
0.0063,
0,
0.66,
0.05,
11,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0443,
0.0063,
0,
0.66,
... | [
"\"\"\"App para Bottle de constancia.py\n\"\"\"",
"__license__ = \"MIT\"",
"__version__ = \"0.02\"",
"import sys",
"if len(sys.path) == 1:\n sys.path.append(sys.prefix)",
" sys.path.append(sys.prefix)",
"import os",
"import webbrowser",
"import uuid",
"import bottle",
"from bottle import r... |
# Para hacer el ejecutable:
# python setup.py py2exe
#
"Creador de instalador para PyConstanciaLite"
__author__ = "None"
__copyright__ = "Copyright (C) 2011 None"
from distutils.core import setup
import py2exe
import sys
opts = {
'py2exe': {
'optimize':2,
'excludes' : ['opciones'] }... | [
[
8,
0,
0.2083,
0.0417,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2917,
0.0417,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3333,
0.0417,
0,
0.66... | [
"\"Creador de instalador para PyConstanciaLite\"",
"__author__ = \"None\"",
"__copyright__ = \"Copyright (C) 2011 None\"",
"from distutils.core import setup",
"import py2exe",
"import sys",
"opts = { \n 'py2exe': {\n 'optimize':2,\n\t'excludes' : ['opciones'] }\n }",
"setup( name = \"PyConsta... |
#!/usr/bin/python
import sys, tokenize, re
from cStringIO import StringIO
from Token import *
TWOARGS = re.compile(r"^(\.|\*|union)$")
ONEARG = re.compile(r"^(det|min|push|rmeps|epsn|sync|proj)$")
class Transducersaurus( ):
"""
Transducersauricize everything.
"""
def __init__(self, command, kwargs... | [
[
1,
0,
0.022,
0.011,
0,
0.66,
0,
509,
0,
3,
0,
0,
509,
0,
0
],
[
1,
0,
0.033,
0.011,
0,
0.66,
0.1429,
764,
0,
1,
0,
0,
764,
0,
0
],
[
1,
0,
0.044,
0.011,
0,
0.66,
... | [
"import sys, tokenize, re",
"from cStringIO import StringIO",
"from Token import *",
"TWOARGS = re.compile(r\"^(\\.|\\*|union)$\")",
"ONEARG = re.compile(r\"^(det|min|push|rmeps|epsn|sync|proj)$\")",
"class Transducersaurus( ):\n \"\"\"\n Transducersauricize everything.\n \"\"\"\n\n def __i... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.1775,
0.0059,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
2,
0,
0.2426,
0.1124,
0,
0.66,
0.2,
467,
0,
4,
0,
0,
0,
0,
13
],
[
14,
1,
0.1953,
0.0059,
1,
0.5... | [
"import re",
"def make_hmmsyms( hmmdefs, eps, prefix, aux ):\n hmm_fp = open(hmmdefs,\"r\")\n hmm_ofp = open(\"PREFIX.hmm.syms\".replace(\"PREFIX\",prefix),\"w\")\n hmm_ofp.write(\"EPS 0\\n\".replace(\"EPS\",eps))\n cnt = 0\n for line in hmm_fp:\n if not line.startswith(\"~h\"):\n ... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.2174,
0.0072,
0,
0.66,
0,
540,
0,
2,
0,
0,
540,
0,
0
],
[
3,
0,
0.5145,
0.5725,
0,
0.66,
0.5,
458,
0,
7,
0,
0,
0,
0,
44
],
[
2,
1,
0.3152,
0.1449,
1,
0.09... | [
"import re, math",
"class Silclass( ):\n\n def __init__( self, vocabfile, sil=\"<sil>\", eps=\"<eps>\", silperc=0.117, prefix=\"silclass\", failure=None, sentb=\"<s>\", sente=\"</s>\" ):\n self.vocabfile = vocabfile\n self.sil = sil\n self.eps = eps\n self.silperc = si... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.122,
0.0041,
0,
0.66,
0,
350,
0,
1,
0,
0,
350,
0,
0
],
[
1,
0,
0.126,
0.0041,
0,
0.66,
0.25,
193,
0,
1,
0,
0,
193,
0,
0
],
[
1,
0,
0.1301,
0.0041,
0,
0.66... | [
"from t3mdef import T3Mdef",
"from collections import defaultdict",
"import re",
"class hmm2wfst( ):\n \"\"\"\n Generate the H-level transducer.\n Expects an AT&T text-format hmm.hmm file as input.\n The format should be transparent however, looking at a \n Sphinx AM mdef file.\n ... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.1266,
0.0042,
0,
0.66,
0,
540,
0,
2,
0,
0,
540,
0,
0
],
[
3,
0,
0.4873,
0.7089,
0,
0.66,
0.5,
45,
0,
8,
0,
0,
0,
0,
86
],
[
8,
1,
0.1561,
0.038,
1,
0.62,
... | [
"import re, math",
"class ArpaLM( ):\n \"\"\"\n Class to convert an ARPA-format LM to WFST format.\n \n NOTE: This class will convert arbitrary length n-gram models, but\n it does not perform special handling of missing back-off NODES.\n It does add default back-off AR... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.1415,
0.0047,
0,
0.66,
0,
540,
0,
2,
0,
0,
540,
0,
0
],
[
1,
0,
0.1462,
0.0047,
0,
0.66,
0.3333,
193,
0,
1,
0,
0,
193,
0,
0
],
[
3,
0,
0.5142,
0.7217,
0,
... | [
"import re, math",
"from collections import defaultdict",
"class Lexicon( ):\n\n \"\"\"Build a lexicon transducer.\"\"\"\n\n def __init__( self, dictfile, prefix=\"lexicon\", lextype=\"htk\", sil=\"<sil>\", eps=\"<eps>\", weighted=False, failure=None ):\n \"\"\"Initialize some basic variables.\"\"\... |
# Copyright (c) 2010 Josef Robert Novak
#
# You may copy and modify this freely under the same terms as
# Sphinx-III
"""Read/write Sphinx-III model definition files.
This module reads and writes the text format model definiton (triphone
to senone mapping) files used by SphinxTrain, Sphinx-III, and
PocketSphinx.
MODI... | [
[
8,
0,
0.1571,
0.1571,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2571,
0.0143,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2714,
0.0143,
0,
0.66,
... | [
"\"\"\"Read/write Sphinx-III model definition files.\n\nThis module reads and writes the text format model definiton (triphone\nto senone mapping) files used by SphinxTrain, Sphinx-III, and\nPocketSphinx.\n\nMODIFIED on 12-22-2010 by Josef Novak \nAdded an array of mdef lines for easier processing,",
"__author__ ... |
#!/usr/bin/python
import re
from copy import deepcopy
#Shorthand for the DSL
label_map = {
'weights' : 'w', 'w' : 'w',
'labels' : 's', 's' : 's',
'log' : 'l', 'l' : 'l',
'tropical' : 't', 't' : 't',
'standard' : 't', 'symbols' : 's',
'pweights' : 'e', 'e' : 'e',
'plabels' : 'a', 'a... | [
[
1,
0,
0.0097,
0.0048,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0145,
0.0048,
0,
0.66,
0.1429,
739,
0,
1,
0,
0,
739,
0,
0
],
[
14,
0,
0.0507,
0.0483,
0,
... | [
"import re",
"from copy import deepcopy",
"label_map = {\n 'weights' : 'w', 'w' : 'w',\n 'labels' : 's', 's' : 's',\n 'log' : 'l', 'l' : 'l',\n 'tropical' : 't', 't' : 't',\n 'standard' : 't', 'symbols' : 's',\n 'pweights' : 'e', 'e' : 'e',\n 'plabels' : 'a', 'a' : 'a',",
"option... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.1064,
0.0035,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
3,
0,
0.5,
0.7766,
0,
0.66,
0.5,
82,
0,
14,
0,
0,
0,
0,
73
],
[
8,
1,
0.1223,
0.0142,
1,
0.82,
... | [
"import re",
"class ContextDependency( ):\n \"\"\"\n Context dependency transducer.\n Use an HTK format tiedlist to handle logical->physical triphone mapping.\n \"\"\"\n\n def __init__( self, phons, aux, tiedlist=None, start=\"<start>\", prefix=\"cd\", eps=\"<eps>\", sil=\"sil\", auxout=0 ):\n ... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.411,
0.0137,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
3,
0,
0.7192,
0.5753,
0,
0.66,
1,
680,
0,
4,
0,
0,
0,
0,
10
],
[
8,
1,
0.4521,
0.0137,
1,
0.52,
... | [
"import re",
"class WFST( ):\n \"\"\"A simple Weighted Finite-State Transducer base class.\"\"\"\n\n def __init__( self, start=0, acceptor=True, isyms=None, eps=\"<eps>\", semiring=\"standard\", arcs={}, states={}, final=0 ):\n self.start = start\n self.final = final\n self.max = s... |
#!/usr/bin/python
#########################################
# Copyright (c) [2010-2011], Josef Robert Novak
# 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 cod... | [
[
1,
0,
0.0867,
0.0029,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0896,
0.0029,
0,
0.66,
0.3333,
350,
0,
1,
0,
0,
350,
0,
0
],
[
3,
0,
0.539,
0.8902,
0,
0... | [
"import re",
"from t3mdef import T3Mdef",
"class ContextDependencySphinx( ):\n \"\"\"\n Context dependency transducer.\n Use an HTK format tiedlist to handle logical->physical triphone mapping.\n \"\"\"\n\n def __init__( self, mdef, aux, start=\"<start>\", prefix=\"cd\", eps=\"<eps>\", sil=\"SIL\... |
#!/usr/bin/python
# encoding=UTF-8
# Copyright © 2009 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import rainbow
image = rainbow(100, ... | [
[
1,
0,
0.6667,
0.0667,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
14,
0,
0.8,
0.0667,
0,
0.66,
0.5,
505,
3,
2,
0,
0,
80,
10,
1
],
[
8,
0,
0.8667,
0.0667,
0,
0.66,... | [
"from common import rainbow",
"image = rainbow(100, 100)",
"image.save('test-dpi-detection.jpeg')"
] |
#!/usr/bin/python
# encoding=UTF-8
# Copyright © 2009 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import rainbow
image = rainbow(255, ... | [
[
1,
0,
0.6667,
0.0667,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
14,
0,
0.8,
0.0667,
0,
0.66,
0.5,
505,
3,
2,
0,
0,
80,
10,
1
],
[
8,
0,
0.8667,
0.0667,
0,
0.66,... | [
"from common import rainbow",
"image = rainbow(255, 100)",
"image.save('test-rotated-page.jpeg')"
] |
# encoding=UTF-8
# Copyright © 2011, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import re
from common import (
case,
)
class test(case)... | [
[
1,
0,
0.36,
0.04,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.48,
0.12,
0,
0.66,
0.5,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.76,
0.36,
0,
0.66,
1,
... | [
"import re",
"from common import (\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=59\n fixed in [6c155e7cc346]\n '''\n def test(self):\n self.pdf2djvu('--monochrome').assert_()\n r = self.djvudump()",
" '''\n http://code.google.... |
#!/usr/bin/python
# encoding=UTF-8
# Copyright © 2009 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import rainbow
image = rainbow(100, ... | [
[
1,
0,
0.6667,
0.0667,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
14,
0,
0.8,
0.0667,
0,
0.66,
0.5,
505,
3,
2,
0,
0,
80,
10,
1
],
[
8,
0,
0.8667,
0.0667,
0,
0.66,... | [
"from common import rainbow",
"image = rainbow(100, 100)",
"image.save('test-fg-colors-2.jpeg')"
] |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import re
from common import (
assert_not_equal,
cas... | [
[
1,
0,
0.2903,
0.0323,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.4032,
0.129,
0,
0.66,
0.5,
718,
0,
2,
0,
0,
718,
0,
0
],
[
3,
0,
0.7258,
0.4516,
0,
0.66... | [
"import re",
"from common import (\n assert_not_equal,\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=23\n fixed in [ede3c622526a]\n '''\n def test_bundled(self):\n r = self.pdf2djvu('--pages=1,1')\n r.assert_(stderr=re.compile('^Dup... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
)
class test(case):
'''
... | [
[
1,
0,
0.4545,
0.1364,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.75,
0.3636,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
4
],
[
8,
1,
0.7045,
0.1818,
1,
0.07,
... | [
"from common import (\n case,\n)",
"class test(case):\n '''\n http://bugs.debian.org/508391\n fixed in [f5d4727b2490]\n '''\n def test(self):\n self.pdf2djvu().assert_()\n self.print_outline().assert_()",
" '''\n http://bugs.debian.org/508391\n fixed in [f5d4727b2490]\n ... |
#!/usr/bin/python
# encoding=UTF-8
# Copyright © 2009 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import rainbow
image = rainbow(100, ... | [
[
1,
0,
0.6667,
0.0667,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
14,
0,
0.8,
0.0667,
0,
0.66,
0.5,
505,
3,
2,
0,
0,
80,
10,
1
],
[
8,
0,
0.8667,
0.0667,
0,
0.66,... | [
"from common import rainbow",
"image = rainbow(100, 101)",
"image.save('test-100x101.jpeg')"
] |
# encoding=UTF-8
# Copyright © 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import os
execfile(os.path.join(
os.path.dirname(__file__),
... | [
[
1,
0,
0.5625,
0.0625,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
0.7812,
0.25,
0,
0.66,
1,
750,
3,
1,
0,
0,
0,
0,
3
]
] | [
"import os",
"execfile(os.path.join(\n os.path.dirname(__file__),\n 'test-fg-colors-1+gm.py'\n))"
] |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
assert_true,
assert_gr... | [
[
1,
0,
0.371,
0.1935,
0,
0.66,
0,
718,
0,
4,
0,
0,
718,
0,
0
],
[
3,
0,
0.7258,
0.4516,
0,
0.66,
1,
224,
0,
2,
0,
0,
159,
0,
9
],
[
8,
1,
0.5806,
0.0968,
1,
0.71,
... | [
"from common import (\n case,\n assert_true,\n assert_grep,\n assert_well_formed_xml,\n)",
"class test(case):\n '''\n fixed in [d8c60ea6bc37]\n '''\n def test_verbatim(self):\n self.pdf2djvu('--verbatim-metadata').assert_()\n xmp = self.extract_xmp()\n assert_true(xmp ... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
)
class test(case):
'''
... | [
[
1,
0,
0.4762,
0.1429,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.7619,
0.3333,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
2
],
[
8,
1,
0.7381,
0.1905,
1,
0.78,... | [
"from common import (\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=4\n fixed in [b58852fbb5ec]\n '''\n def test(self):\n self.pdf2djvu().assert_()",
" '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=4\n fixed in [b58852fbb5... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import re
from common import (
case,
)
class test(case)... | [
[
1,
0,
0.3,
0.0333,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.4,
0.1,
0,
0.66,
0.5,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.7167,
0.4667,
0,
0.66,
1,... | [
"import re",
"from common import (\n case,\n)",
"class test(case):\n '''\n fixed in [a244b65e0661], [2e5ab20f8a07]\n '''\n def test(self):\n self.pdf2djvu().assert_()\n r = self.print_ant(page=1)\n r.assert_(stdout=re.compile(",
" '''\n fixed in [a244b65e0661], [2e5ab... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
re,
)
class test(case):
... | [
[
1,
0,
0.4565,
0.1739,
0,
0.66,
0,
718,
0,
2,
0,
0,
718,
0,
0
],
[
3,
0,
0.7609,
0.3478,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
5
],
[
8,
1,
0.6957,
0.1304,
1,
0.85,... | [
"from common import (\n case,\n re,\n)",
"class test(case):\n '''\n fixed in [9a9650e7f06f]\n '''\n def test(self):\n self.pdf2djvu().assert_()\n r = self.djvudump()\n r.assert_(stdout=re('BG44 \\[[0-9][0-9]\\] .* 75x75'))",
" '''\n fixed in [9a9650e7f06f]\n '''",... |
#!/usr/bin/python
# encoding=UTF-8
# Copyright © 2009 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import rainbow
image = rainbow(100, ... | [
[
1,
0,
0.6667,
0.0667,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
14,
0,
0.8,
0.0667,
0,
0.66,
0.5,
505,
3,
2,
0,
0,
80,
10,
1
],
[
8,
0,
0.8667,
0.0667,
0,
0.66,... | [
"from common import rainbow",
"image = rainbow(100, 100)",
"image.save('test-monochrome.jpeg')"
] |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import unicodedata
from common import (
case,
re,
)
... | [
[
1,
0,
0.2571,
0.0286,
0,
0.66,
0,
759,
0,
1,
0,
0,
759,
0,
0
],
[
1,
0,
0.3571,
0.1143,
0,
0.66,
0.5,
718,
0,
2,
0,
0,
718,
0,
0
],
[
3,
0,
0.7,
0.5143,
0,
0.66,
... | [
"import unicodedata",
"from common import (\n case,\n re,\n)",
"class test(case):\n '''\n fixed in [18b2ae04de2f], [fa7d4addf18e]\n '''\n\n text = u'\\N{LATIN SMALL LIGATURE FL}uorogra\\N{LATIN SMALL LIGATURE FI}a'\n text_nfkc = unicodedata.normalize('NFKC', text).encode('UTF-8')\n text_... |
# encoding=UTF-8
# Copyright © 2010, 2011, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
)
class test(case):
... | [
[
1,
0,
0.3226,
0.0968,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.6774,
0.5484,
0,
0.66,
1,
224,
0,
2,
0,
0,
159,
0,
4
],
[
8,
1,
0.5,
0.129,
1,
0.03,
... | [
"from common import (\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=47\n fixed in [3d0f55ae5a65]\n '''\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=45\n fixed in [fc7df6c4d3d3]",
" '''\n http://code.google.com/p/pdf2djvu/is... |
# encoding=UTF-8
# Copyright © 2010, 2011, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
)
class test(case):
... | [
[
1,
0,
0.3226,
0.0968,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.6774,
0.5484,
0,
0.66,
1,
224,
0,
2,
0,
0,
159,
0,
4
],
[
8,
1,
0.5,
0.129,
1,
0.01,
... | [
"from common import (\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=47\n fixed in [3d0f55ae5a65]\n '''\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=45\n fixed in [fc7df6c4d3d3]",
" '''\n http://code.google.com/p/pdf2djvu/is... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
re,
)
class test(case):
... | [
[
1,
0,
0.4375,
0.1667,
0,
0.66,
0,
718,
0,
2,
0,
0,
718,
0,
0
],
[
3,
0,
0.75,
0.375,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
6
],
[
8,
1,
0.6667,
0.125,
1,
0.29,
... | [
"from common import (\n case,\n re,\n)",
"class test(case):\n '''\n fixed in [90111a528eb5]\n '''\n def test(self):\n title = r'\\316\\232\\317\\211\\316\\264\\316\\271\\316\\272\\316\\277\\317\\200\\316\\277\\316\\257\\316\\267\\317\\203\\316\\267 \\317\\207\\316\\261\\317\\201\\316\\261... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case
)
class test(case):
'''
... | [
[
1,
0,
0.4762,
0.1429,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.7619,
0.3333,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
2
],
[
8,
1,
0.7381,
0.1905,
1,
0.92,... | [
"from common import (\n case\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=5\n fixed in [1a39024ea13a]\n '''\n def test(self):\n self.pdf2djvu().assert_()",
" '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=5\n fixed in [1a39024ea13... |
#!/usr/bin/python
# encoding=UTF-8
# Copyright © 2009, 2011 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import rainbow
image = rainbow... | [
[
1,
0,
0.6667,
0.0667,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
14,
0,
0.8,
0.0667,
0,
0.66,
0.5,
505,
3,
2,
0,
0,
80,
10,
1
],
[
8,
0,
0.8667,
0.0667,
0,
0.66,... | [
"from common import rainbow",
"image = rainbow(100, 100)",
"image.save('test-fg-colors-2+gm.jpeg')"
] |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
assert_grep,
)
class test... | [
[
1,
0,
0.2917,
0.1111,
0,
0.66,
0,
718,
0,
2,
0,
0,
718,
0,
0
],
[
3,
0,
0.6667,
0.5833,
0,
0.66,
1,
224,
0,
2,
0,
0,
159,
0,
8
],
[
2,
1,
0.4583,
0.1111,
1,
0.93,... | [
"from common import (\n case,\n assert_grep,\n)",
"class test(case):\n def test_verbatim(self):\n self.pdf2djvu('--verbatim-metadata').assert_()\n xmp = self.extract_xmp()\n assert_grep(xmp, '<broken')\n\n def test_no_verbatim(self):\n r = self.pdf2djvu()",
" def test_... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
assert_grep,
assert_we... | [
[
1,
0,
0.3438,
0.1562,
0,
0.66,
0,
718,
0,
3,
0,
0,
718,
0,
0
],
[
3,
0,
0.7031,
0.5,
0,
0.66,
1,
224,
0,
2,
0,
0,
159,
0,
10
],
[
8,
1,
0.5469,
0.125,
1,
0.04,
... | [
"from common import (\n case,\n assert_grep,\n assert_well_formed_xml,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=12\n fixed in [490a08283fb4]\n '''\n def test_verbatim(self):\n self.pdf2djvu('--verbatim-metadata').assert_()\n xmp = sel... |
# encoding=UTF-8
# Copyright © 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import os
execfile(os.path.join(
os.path.dirname(__file__),
... | [
[
1,
0,
0.5625,
0.0625,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
0.7812,
0.25,
0,
0.66,
1,
750,
3,
1,
0,
0,
0,
0,
3
]
] | [
"import os",
"execfile(os.path.join(\n os.path.dirname(__file__),\n 'test-fg-colors-1.py'\n))"
] |
# encoding=UTF-8
# Copyright © 2010, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
)
class test(case):
'''
... | [
[
1,
0,
0.5238,
0.1429,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.7857,
0.2857,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
2
],
[
8,
1,
0.7619,
0.1429,
1,
0.41,... | [
"from common import (\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=50\n '''\n def test(self):\n self.pdf2djvu('--pages=2').assert_()",
" '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=50\n '''",
" def test(self):\n ... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import re
from common import (
case,
)
class test(case)... | [
[
1,
0,
0.36,
0.04,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.48,
0.12,
0,
0.66,
0.5,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.76,
0.36,
0,
0.66,
1,
... | [
"import re",
"from common import (\n case,\n)",
"class test(case):\n '''\n http://sf.net/tracker/?func=detail&aid=1972089&group_id=32953&atid=406583\n fixed in [5e3937296514]\n '''\n def test(self):\n self.pdf2djvu('--guess-dpi').assert_()\n r = self.djvudump()",
" '''\n ... |
# encoding=UTF-8
# Copyright © 2009, 2011, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
)
class test(case):
... | [
[
1,
0,
0.4762,
0.1429,
0,
0.66,
0,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.7619,
0.3333,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
4
],
[
8,
1,
0.7143,
0.1429,
1,
0.21,... | [
"from common import (\n case,\n)",
"class test(case):\n '''\n fixed in [d1b09854a9bc]\n '''\n def test(self):\n self.pdf2djvu('--no-metadata', '--dpi=72').assert_()\n self.print_meta().assert_()",
" '''\n fixed in [d1b09854a9bc]\n '''",
" def test(self):\n self.... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
import re
from common import (
case,
)
class test(case)... | [
[
1,
0,
0.3,
0.0333,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.4,
0.1,
0,
0.66,
0.5,
718,
0,
1,
0,
0,
718,
0,
0
],
[
3,
0,
0.7167,
0.4667,
0,
0.66,
1,... | [
"import re",
"from common import (\n case,\n)",
"class test(case):\n '''\n http://code.google.com/p/pdf2djvu/issues/detail?id=20\n fixed in [c06a41afdc46]\n '''\n def test_no_crop(self):\n self.pdf2djvu().assert_()\n r = self.print_pure_txt()",
" '''\n http://code.google.... |
# encoding=UTF-8
# Copyright © 2009, 2012 Jakub Wilk
#
# This package 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; version 2 dated June, 1991.
from common import (
case,
re,
)
class test(case):
... | [
[
1,
0,
0.4375,
0.1667,
0,
0.66,
0,
718,
0,
2,
0,
0,
718,
0,
0
],
[
3,
0,
0.75,
0.375,
0,
0.66,
1,
224,
0,
1,
0,
0,
159,
0,
5
],
[
8,
1,
0.6875,
0.1667,
1,
0.6,
... | [
"from common import (\n case,\n re,\n)",
"class test(case):\n '''\n http://sf.net/tracker/?func=detail&aid=1972089&group_id=32953&atid=406583\n fixed in [5e3937296514]\n '''\n def test(self):\n self.pdf2djvu('--bg-subsample=11', '--dpi=72').assert_()\n r = self.djvudump()",
" ... |
''' Cookie-handlin' mix-in helper; inspired by WebOb.
This module offers a cookie-handling mixin class meant to be used with Google
App Engine; this class can in fact be mixed into any class that shares the
following features with webapp.RequestHandler subclasses:
- a self.request.cookies object with a get(key, defa... | [
[
8,
0,
0.0538,
0.1,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1308,
0.0077,
0,
0.66,
0.1667,
32,
0,
1,
0,
0,
32,
0,
0
],
[
1,
0,
0.1385,
0.0077,
0,
0.66,
... | [
"''' Cookie-handlin' mix-in helper; inspired by WebOb.\n\nThis module offers a cookie-handling mixin class meant to be used with Google\nApp Engine; this class can in fact be mixed into any class that shares the\nfollowing features with webapp.RequestHandler subclasses:\n - a self.request.cookies object with a get... |
"""
Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
pass
ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
HAS_UTF8 = re.compile(r'[\x80-\xff]')
ESCAPE_DCT = ... | [
[
8,
0,
0.0052,
0.0078,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0104,
0.0026,
0,
0.66,
0.0667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
7,
0,
0.0195,
0.0104,
0,
0.66... | [
"\"\"\"\nImplementation of JSONEncoder\n\"\"\"",
"import re",
"try:\n from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii\nexcept ImportError:\n pass",
" from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii",
"ESCAPE = re.compile(r'... |
"""
Implementation of JSONDecoder
"""
import re
import sys
from simplejson.scanner import Scanner, pattern
try:
from simplejson._speedups import scanstring as c_scanstring
except ImportError:
pass
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconstants():
import struct
import sys
_BYTES... | [
[
8,
0,
0.0058,
0.0087,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0117,
0.0029,
0,
0.66,
0.0333,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0146,
0.0029,
0,
0.66... | [
"\"\"\"\nImplementation of JSONDecoder\n\"\"\"",
"import re",
"import sys",
"from simplejson.scanner import Scanner, pattern",
"try:\n from simplejson._speedups import scanstring as c_scanstring\nexcept ImportError:\n pass",
" from simplejson._speedups import scanstring as c_scanstring",
"FLAGS... |
r"""
A simple, fast, extensible JSON encoder and decoder
JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
simplejson exposes an API familiar to uses of the standard library
marshal and pickle modules.
Encoding b... | [
[
8,
0,
0.1356,
0.2686,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2713,
0.0027,
0,
0.66,
0.0714,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2779,
0.0106,
0,
0.66... | [
"r\"\"\"\nA simple, fast, extensible JSON encoder and decoder\n\nJSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\nsimplejson exposes an API familiar to uses of the standard library",
"__version__ = '1.9.... |
"""
Iterator based sre token scanner
"""
import re
from re import VERBOSE, MULTILINE, DOTALL
import sre_parse
import sre_compile
import sre_constants
from sre_constants import BRANCH, SUBPATTERN
__all__ = ['Scanner', 'pattern']
FLAGS = (VERBOSE | MULTILINE | DOTALL)
class Scanner(object):
def __init__(self, lexi... | [
[
8,
0,
0.0299,
0.0448,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0597,
0.0149,
0,
0.66,
0.1,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0746,
0.0149,
0,
0.66,
... | [
"\"\"\"\nIterator based sre token scanner\n\"\"\"",
"import re",
"from re import VERBOSE, MULTILINE, DOTALL",
"import sre_parse",
"import sre_compile",
"import sre_constants",
"from sre_constants import BRANCH, SUBPATTERN",
"__all__ = ['Scanner', 'pattern']",
"FLAGS = (VERBOSE | MULTILINE | DOTALL)"... |
# Much the below modified from the gae-json-rest project
import plistlib
import logging
import re
import touchengineutil
def id_of(entity):
""" Make a {'id': <string-of-digits>} dict for an entity.
Args:
entity: an entity
Returns:
a jobj corresponding to the entity
"""
return dict(id=touchengineut... | [
[
1,
0,
0.0755,
0.0189,
0,
0.66,
0,
592,
0,
1,
0,
0,
592,
0,
0
],
[
1,
0,
0.0943,
0.0189,
0,
0.66,
0.1667,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.1132,
0.0189,
0,
... | [
"import plistlib",
"import logging",
"import re",
"import touchengineutil",
"def id_of(entity):\n \"\"\" Make a {'id': <string-of-digits>} dict for an entity.\n\n Args:\n entity: an entity\n Returns:\n a jobj corresponding to the entity\n \"\"\"",
" \"\"\" Make a {'id': <string-of-digits>} dict... |
#!/usr/bin/env python
import logging
import time
import re
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.db import Key
import cookutil
import touchengineutil
import plistutil
# RE to match: optional /, classname, optional /, ID of 0+ numeric digits
CLASSNAME_ID_RE = re.co... | [
[
1,
0,
0.0186,
0.0062,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0248,
0.0062,
0,
0.66,
0.0909,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0311,
0.0062,
0,
... | [
"import logging",
"import time",
"import re",
"import wsgiref.handlers",
"from google.appengine.ext import webapp",
"from google.appengine.ext.db import Key",
"import cookutil",
"import touchengineutil",
"import plistutil",
"CLASSNAME_ID_RE = re.compile(r'^/?(\\w+)/?(\\d*)$')",
"def path_to_clas... |
""" Utilities for JSON REST CRUD support for GAE db models.
Terminology: a subclass of db.Model is known as "a Model"; an instance of
such a subclass is known as "an entity".
Data is said to be in JSONed or JSONable form if it contains only dicts, lists
and scalars (strings, numbers) in a form that is correctly seria... | [
[
8,
0,
0.051,
0.0952,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.102,
0.0068,
0,
0.66,
0.0833,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.1156,
0.0068,
0,
0.66,
... | [
"\"\"\" Utilities for JSON REST CRUD support for GAE db models.\n\nTerminology: a subclass of db.Model is known as \"a Model\"; an instance of\nsuch a subclass is known as \"an entity\".\n\nData is said to be in JSONed or JSONable form if it contains only dicts, lists\nand scalars (strings, numbers) in a form that ... |
"""A toy-level example of a data model in Google Appengine DB terms.
"""
import logging
from touchengine import touchengineutil
from Doctor import Doctor
from Pager import Pager
touchengineutil.decorateModuleNamed(__name__)
logging.info('touchengine Models in %r decorated', __name__)
| [
[
8,
0,
0.15,
0.2,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.1667,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.4,
0.1,
0,
0.66,
0.3333,
... | [
"\"\"\"A toy-level example of a data model in Google Appengine DB terms.\n\"\"\"",
"import logging",
"from touchengine import touchengineutil",
"from Doctor import Doctor",
"from Pager import Pager",
"touchengineutil.decorateModuleNamed(__name__)",
"logging.info('touchengine Models in %r decorated', __n... |
"""A toy-level example of a RESTful app running on Google Appengine.
"""
import logging
import time
import wsgiref.handlers
from google.appengine.ext import webapp
import models
from touchengine import cookutil
from touchengine import touchengineutil
from touchengine import plistutil
from touchengine.plistHandler impo... | [
[
8,
0,
0.0682,
0.0909,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1364,
0.0455,
0,
0.66,
0.0909,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.1818,
0.0455,
0,
0.66... | [
"\"\"\"A toy-level example of a RESTful app running on Google Appengine.\n\"\"\"",
"import logging",
"import time",
"import wsgiref.handlers",
"from google.appengine.ext import webapp",
"import models",
"from touchengine import cookutil",
"from touchengine import touchengineutil",
"from touchengine ... |
import cgi
import doctest
import logging
import os
import re
logger = logging.getLogger()
logger.setLevel(getattr(logging, os.environ.get('LOGLEVEL', 'WARNING')))
class UrlParser(object):
""" Parse a URL path and perform appropriate an callback on regex-matching.
Instantiate h with a prefix (to be matched, b... | [
[
1,
0,
0.005,
0.005,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.0099,
0.005,
0,
0.66,
0.1,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0149,
0.005,
0,
0.66,
... | [
"import cgi",
"import doctest",
"import logging",
"import os",
"import re",
"logger = logging.getLogger()",
"logger.setLevel(getattr(logging, os.environ.get('LOGLEVEL', 'WARNING')))",
"class UrlParser(object):\n \"\"\" Parse a URL path and perform appropriate an callback on regex-matching.\n\n I... |
#!/usr/bin/env python
#Python sonnet maker
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
#external imports
import sonnet
import plistlib
class MainHandler(webapp.RequestHandler):
"""Returns sonnets dictionary as a converted plist"""
... | [
[
1,
0,
0.087,
0.0217,
0,
0.66,
0,
709,
0,
1,
0,
0,
709,
0,
0
],
[
1,
0,
0.1087,
0.0217,
0,
0.66,
0.125,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.1304,
0.0217,
0,
0.... | [
"import wsgiref.handlers",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"import sonnet",
"import plistlib",
"class MainHandler(webapp.RequestHandler):\n \"\"\"Returns sonnets dictionary as a converted plist\"\"\"\n def get(self):\n pl... |
verses={"verses":[["I","""FROM fairest creatures we desire increase,
That thereby beauty's rose might never die,
But as the riper should by time decease,
His tender heir might bear his memory:
But thou, contracted to thine own bright eyes,
Feed'st thy light'st flame with self-substantial fuel,
Making a famine where abu... | [
[
14,
0,
0.5002,
1,
0,
0.66,
0,
344,
0,
0,
0,
0,
0,
6,
0
]
] | [
"verses={\"verses\":[[\"I\",\"\"\"FROM fairest creatures we desire increase,\nThat thereby beauty's rose might never die,\nBut as the riper should by time decease,\nHis tender heir might bear his memory:\nBut thou, contracted to thine own bright eyes,\nFeed'st thy light'st flame with self-substantial fuel,\nMaking ... |
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from google.appengine.ext.webapp import template
from django.utils import simplejson
from touchen... | [
[
1,
0,
0.0186,
0.0062,
0,
0.66,
0,
709,
0,
1,
0,
0,
709,
0,
0
],
[
1,
0,
0.0311,
0.0062,
0,
0.66,
0.05,
279,
0,
1,
0,
0,
279,
0,
0
],
[
1,
0,
0.0373,
0.0062,
0,
0.... | [
"import wsgiref.handlers",
"from google.appengine.api import users",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext import db",
"from google.appengine.ext.webapp import template",
"from django.utils import simplejson",
... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0193,
0.0014,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
7,
0,
0.0241,
0.0055,
0,
0.66,
0.0357,
0,
0,
1,
0,
0,
0,
0,
0
],
[
8,
1,
0.0234,
0.0014,
1,
0.68,
... | [
"\"\"\"Core classes for markup processing.\"\"\"",
"try:\n reduce # builtin in Python < 3\nexcept NameError:\n from functools import reduce",
" reduce # builtin in Python < 3",
" from functools import reduce",
"from itertools import chain",
"import operator",
"from genshi.util import plainte... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0558,
0.004,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0598,
0.004,
0,
0.66,
0.0714,
848,
0,
1,
0,
0,
848,
0,
0
],
[
1,
0,
0.0637,
0.004,
0,
0.6... | [
"import doctest",
"import pickle",
"from StringIO import StringIO",
"try:\n from cStringIO import StringIO as cStringIO\nexcept ImportError:\n cStringIO = StringIO",
" from cStringIO import StringIO as cStringIO",
" cStringIO = StringIO",
"import unittest",
"from genshi import core",
"fr... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0302,
0.0022,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0323,
0.0022,
0,
0.66,
0.0909,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0345,
0.0022,
0,
0.... | [
"import doctest",
"import unittest",
"import sys",
"from genshi.core import Attrs, Stream, QName",
"from genshi.input import HTML, XML",
"from genshi.output import DocType, XMLSerializer, XHTMLSerializer, \\\n HTMLSerializer, EmptyTagFilter",
"class XMLSerializerTestCase(unittes... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006,2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.1489,
0.0106,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.1596,
0.0106,
0,
0.66,
0.1667,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.1809,
0.0106,
0,
0.... | [
"import doctest",
"import unittest",
"from genshi import util",
"from genshi.util import LRUCache",
"class LRUCacheTestCase(unittest.TestCase):\n\n def test_setitem(self):\n cache = LRUCache(2)\n cache['A'] = 0\n self.assertEqual(1, len(cache))\n self.assertEqual('A', cache.he... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of ... | [
[
1,
0,
0.0201,
0.0014,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0215,
0.0014,
0,
0.66,
0.1429,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0244,
0.0014,
0,
0.... | [
"import doctest",
"import unittest",
"from genshi.input import XML",
"from genshi.path import Path, PathParser, PathSyntaxError, GenericStrategy, \\\n SingleStepStrategy, SimplePathStrategy",
"class FakePath(Path):\n def __init__(self, strategy):\n self.strategy = strategy\n... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0528,
0.0038,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0566,
0.0038,
0,
0.66,
0.1111,
609,
0,
1,
0,
0,
609,
0,
0
],
[
1,
0,
0.0604,
0.0038,
0,
... | [
"import doctest",
"from StringIO import StringIO",
"import sys",
"import unittest",
"from genshi.core import Attrs, Stream",
"from genshi.input import XMLParser, HTMLParser, ParseError",
"class XMLParserTestCase(unittest.TestCase):\n\n def test_text_node_pos_single_line(self):\n text = '<elem>... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of ... | [
[
1,
0,
0.4118,
0.0294,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
2,
0,
0.6912,
0.4706,
0,
0.66,
0.5,
425,
0,
0,
1,
0,
0,
0,
17
],
[
1,
1,
0.5,
0.0294,
1,
0.5,
... | [
"import unittest",
"def suite():\n import genshi\n from genshi.tests import builder, core, input, output, path, util\n from genshi.filters import tests as filters\n from genshi.template import tests as template\n\n suite = unittest.TestSuite()\n suite.addTest(builder.suite())",
" import gen... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of ... | [
[
1,
0,
0.1867,
0.0133,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.2,
0.0133,
0,
0.66,
0.1429,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.2267,
0.0133,
0,
0.66,... | [
"import doctest",
"import unittest",
"from genshi.builder import Element, tag",
"from genshi.core import Attrs, Markup, Stream",
"from genshi.input import XML",
"class ElementFactoryTestCase(unittest.TestCase):\n\n def test_link(self):\n link = tag.a(href='#', title='Foo', accesskey=None)('Bar')... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0179,
0.0036,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0215,
0.0012,
0,
0.66,
0.0556,
808,
0,
1,
0,
0,
808,
0,
0
],
[
1,
0,
0.0227,
0.0012,
0,
0.66... | [
"\"\"\"This module provides different kinds of serialization methods for XML event\nstreams.\n\"\"\"",
"from itertools import chain",
"import re",
"from genshi.core import escape, Attrs, Markup, Namespace, QName, StreamEventKind",
"from genshi.core import START, END, TEXT, XML_DECL, DOCTYPE, START_NS, END_N... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0511,
0.0036,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0584,
0.0036,
0,
0.66,
0.0833,
744,
0,
1,
0,
0,
744,
0,
0
],
[
1,
0,
0.062,
0.0036,
0,
0.66,... | [
"\"\"\"Various utility classes and functions.\"\"\"",
"import htmlentitydefs as entities",
"import re",
"__docformat__ = 'restructuredtext en'",
"class LRUCache(dict):\n \"\"\"A dictionary-like object that stores only a certain number of items, and\n discards its least recently used item when full.\n ... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0173,
0.017,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0268,
0.0007,
0,
0.66,
0.0135,
193,
0,
1,
0,
0,
193,
0,
0
],
[
7,
0,
0.0285,
0.0026,
0,
0.66,... | [
"\"\"\"Basic support for evaluating XPath expressions against streams.\n\n>>> from genshi.input import XML\n>>> doc = XML('''<doc>\n... <items count=\"4\">\n... <item status=\"new\">\n... <summary>Foo</summary>\n... </item>",
"from collections import deque",
"try:\n reduce # builtin in P... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0511,
0.0036,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0547,
0.0036,
0,
0.66,
0.0909,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0584,
0.0036,
0,
... | [
"import doctest",
"import os",
"import shutil",
"import tempfile",
"import unittest",
"from genshi.template.base import TemplateSyntaxError",
"from genshi.template.loader import TemplateLoader",
"from genshi.template.text import OldTextTemplate, NewTextTemplate",
"class OldTextTemplateTestCase(unitt... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Edgewall Software
# Copyright (C) 2006 Matthew Good
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/... | [
[
1,
0,
0.0568,
0.0038,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0606,
0.0038,
0,
0.66,
0.0909,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0644,
0.0038,
0,
... | [
"import doctest",
"import os",
"import unittest",
"from genshi.core import Stream",
"from genshi.output import DocType",
"from genshi.template import MarkupTemplate, TextTemplate, NewTextTemplate",
"from genshi.template.plugin import ConfigurationError, \\\n MarkupTempl... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.56,
0.04,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.6,
0.04,
0,
0.66,
0.25,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.68,
0.04,
0,
0.66,
0.5,
... | [
"import doctest",
"import unittest",
"from genshi.template.base import Template",
"def suite():\n suite = unittest.TestSuite()\n suite.addTest(doctest.DocTestSuite(Template.__module__))\n return suite",
" suite = unittest.TestSuite()",
" suite.addTest(doctest.DocTestSuite(Template.__module_... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.4375,
0.0312,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.4688,
0.0312,
0,
0.66,
0.3333,
88,
0,
1,
0,
0,
88,
0,
0
],
[
2,
0,
0.7188,
0.4062,
0,
0.... | [
"import doctest",
"import unittest",
"def suite():\n from genshi.template.tests import base, directives, eval, interpolation, \\\n loader, markup, plugin, text\n suite = unittest.TestSuite()\n suite.addTest(base.suite())\n suite.addTest(directives.suite())\n s... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0303,
0.0022,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0325,
0.0022,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0346,
0.0022,
0,
0.6... | [
"import doctest",
"import os",
"import shutil",
"import tempfile",
"import unittest",
"from genshi.core import TEXT",
"from genshi.template.loader import TemplateLoader",
"from genshi.template.markup import MarkupTemplate",
"class TemplateLoaderTestCase(unittest.TestCase):\n \"\"\"Tests for the t... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# Copyright (C) 2006 Matthew Good
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/... | [
[
8,
0,
0.0909,
0.017,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.108,
0.0057,
0,
0.66,
0.0833,
329,
0,
3,
0,
0,
329,
0,
0
],
[
1,
0,
0.1136,
0.0057,
0,
0.66,
... | [
"\"\"\"Basic support for the template engine plugin API used by TurboGears and\nCherryPy/Buffet.\n\"\"\"",
"from genshi.input import ET, HTML, XML",
"from genshi.output import DocType",
"from genshi.template.base import Template",
"from genshi.template.loader import TemplateLoader",
"from genshi.template.... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0277,
0.002,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0317,
0.002,
0,
0.66,
0.125,
738,
0,
1,
0,
0,
738,
0,
0
],
[
1,
0,
0.0337,
0.002,
0,
0.66,
... | [
"\"\"\"Emulation of the proper abstract syntax tree API for Python 2.4.\"\"\"",
"import compiler",
"import compiler.ast",
"from genshi.template import _ast24 as _ast",
"__all__ = ['_ast', 'parse']",
"__docformat__ = 'restructuredtext en'",
"def _new(cls, *args, **kwargs):\n ret = cls()\n if ret._f... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.6087,
0.0435,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.7391,
0.1304,
0,
0.66,
0.2,
152,
0,
6,
0,
0,
152,
0,
0
],
[
1,
0,
0.8261,
0.0435,
0,
0.66,
... | [
"\"\"\"Implementation of the template engine.\"\"\"",
"from genshi.template.base import Context, Template, TemplateError, \\\n TemplateRuntimeError, TemplateSyntaxError, \\\n BadDirectiveError",
"from genshi.template.loader import TemplateLoader, T... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.018,
0.0013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
7,
0,
0.0244,
0.009,
0,
0.66,
0.25,
0,
0,
1,
0,
0,
0,
0,
1
],
[
1,
1,
0.0219,
0.0013,
1,
0.34,
0,... | [
"\"\"\"Support classes for generating code from abstract syntax trees.\"\"\"",
"try:\n import _ast\nexcept ImportError:\n from genshi.template.ast24 import _ast, parse\nelse:\n def parse(source, mode):\n return compile(source, '', mode, _ast.PyCF_ONLY_AST)",
" import _ast",
" from genshi... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0418,
0.003,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0478,
0.003,
0,
0.66,
0.0909,
688,
0,
1,
0,
0,
688,
0,
0
],
[
7,
0,
0.0552,
0.0119,
0,
0.66,
... | [
"\"\"\"Template loading and caching.\"\"\"",
"import os",
"try:\n import threading\nexcept ImportError:\n import dummy_threading as threading",
" import threading",
" import dummy_threading as threading",
"from genshi.template.base import TemplateError",
"from genshi.util import LRUCache",
... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0237,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0382,
0.0008,
0,
0.66,
0.0233,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0389,
0.0008,
0,
0.66... | [
"\"\"\"A filter for functional-style transformations of markup streams.\n\nThe `Transformer` filter provides a variety of transformations that can be\napplied to parts of streams that match given XPath expressions. These\ntransformations can be chained to achieve results that would be comparitively\ntedious to achi... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of ... | [
[
1,
0,
0.0094,
0.0007,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.01,
0.0007,
0,
0.66,
0.0294,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.0107,
0.0007,
0,
0.... | [
"import doctest",
"from pprint import pprint",
"import unittest",
"from genshi import HTML",
"from genshi.builder import Element",
"from genshi.core import START, END, TEXT, QName, Attrs",
"from genshi.filters.transform import Transformer, StreamBuffer, ENTER, EXIT, \\\n ... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0295,
0.0021,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0316,
0.0021,
0,
0.66,
0.125,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0358,
0.0021,
0,
0.6... | [
"import doctest",
"import unittest",
"from genshi.input import HTML, ParseError",
"from genshi.filters.html import HTMLFormFiller, HTMLSanitizer",
"from genshi.template import MarkupTemplate",
"class HTMLFormFillerTestCase(unittest.TestCase):\n\n def test_fill_input_text_no_value(self):\n html =... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.5185,
0.037,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.5556,
0.037,
0,
0.66,
0.3333,
88,
0,
1,
0,
0,
88,
0,
0
],
[
2,
0,
0.7593,
0.2963,
0,
0.66... | [
"import doctest",
"import unittest",
"def suite():\n from genshi.filters.tests import html, i18n, transform\n suite = unittest.TestSuite()\n suite.addTest(html.suite())\n suite.addTest(i18n.suite())\n if hasattr(doctest, 'NORMALIZE_WHITESPACE'):\n suite.addTest(transform.suite())\n retu... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
1,
0,
0.0086,
0.0006,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0092,
0.0006,
0,
0.66,
0.0769,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0098,
0.0006,
0,
... | [
"from datetime import datetime",
"import doctest",
"from gettext import NullTranslations",
"from StringIO import StringIO",
"import unittest",
"from genshi.core import Attrs",
"from genshi.template import MarkupTemplate, Context",
"from genshi.filters.i18n import Translator, extract",
"from genshi.i... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0309,
0.0022,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
7,
0,
0.0386,
0.0088,
0,
0.66,
0.125,
0,
0,
1,
0,
0,
0,
0,
0
],
[
8,
1,
0.0375,
0.0022,
1,
0.85,
... | [
"\"\"\"Implementation of a number of stream filters.\"\"\"",
"try:\n any\nexcept NameError:\n from genshi.util import any",
" any",
" from genshi.util import any",
"import re",
"from genshi.core import Attrs, QName, stripentities",
"from genshi.core import END, START, TEXT, COMMENT",
"__al... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.7,
0.05,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.8,
0.05,
0,
0.66,
0.25,
844,
0,
2,
0,
0,
844,
0,
0
],
[
1,
0,
0.85,
0.05,
0,
0.66,
0.5,
5... | [
"\"\"\"Implementation of a number of stream filters.\"\"\"",
"from genshi.filters.html import HTMLFormFiller, HTMLSanitizer",
"from genshi.filters.i18n import Translator",
"from genshi.filters.transform import Transformer",
"__docformat__ = 'restructuredtext en'"
] |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.0141,
0.0051,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
7,
0,
0.0192,
0.0034,
0,
0.66,
0.0333,
0,
0,
1,
0,
0,
0,
0,
0
],
[
8,
1,
0.0188,
0.0009,
1,
0.54,
... | [
"\"\"\"Directives and utilities for internationalization and localization of\ntemplates.\n\n:since: version 0.4\n:note: Directives support added since version 0.6\n\"\"\"",
"try:\n any\nexcept NameError:\n from genshi.util import any",
" any",
" from genshi.util import any",
"from gettext import... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.6538,
0.2692,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.8462,
0.0385,
0,
0.66,
0.25,
959,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.8846,
0.0385,
0,
0.66,
... | [
"\"\"\"This package provides various means for generating and processing web markup\n(XML or HTML).\n\nThe design is centered around the concept of streams of markup events (similar\nin concept to SAX parsing events) which can be processed in a uniform manner\nindependently of where or how they are produced.\n\"\"\... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | [
[
8,
0,
0.1156,
0.156,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1992,
0.0056,
0,
0.66,
0.1111,
987,
0,
8,
0,
0,
987,
0,
0
],
[
14,
0,
0.2061,
0.0028,
0,
0.66... | [
"\"\"\"Support for programmatically generating markup streams from Python code using\na very simple syntax. The main entry point to this module is the `tag` object\n(which is actually an instance of the ``ElementFactory`` class). You should\nrarely (if ever) need to directly import and use any of the other classes ... |
import unittest
import doctest
class OptionalExtensionTestSuite(unittest.TestSuite):
def run(self, result):
import simplejson
run = unittest.TestSuite.run
run(self, result)
simplejson._toggle_speedups(False)
run(self, result)
simplejson._toggle_speedups(True)
... | [
[
1,
0,
0.0159,
0.0159,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0317,
0.0159,
0,
0.66,
0.1667,
614,
0,
1,
0,
0,
614,
0,
0
],
[
3,
0,
0.1429,
0.1429,
0,
0.... | [
"import unittest",
"import doctest",
"class OptionalExtensionTestSuite(unittest.TestSuite):\n def run(self, result):\n import simplejson\n run = unittest.TestSuite.run\n run(self, result)\n simplejson._toggle_speedups(False)\n run(self, result)\n simplejson._toggle_s... |
"""Implementation of JSONEncoder
"""
import re
from decimal import Decimal
def _import_speedups():
try:
from simplejson import _speedups
return _speedups.encode_basestring_ascii, _speedups.make_encoder
except ImportError:
return None, None
c_encode_basestring_ascii, c_make_encoder = _im... | [
[
8,
0,
0.003,
0.004,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.006,
0.002,
0,
0.66,
0.0588,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.008,
0.002,
0,
0.66,
... | [
"\"\"\"Implementation of JSONEncoder\n\"\"\"",
"import re",
"from decimal import Decimal",
"def _import_speedups():\n try:\n from simplejson import _speedups\n return _speedups.encode_basestring_ascii, _speedups.make_encoder\n except ImportError:\n return None, None",
" try:\n ... |
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.1144,
0.2265,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2288,
0.0023,
0,
0.66,
0.0625,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2357,
0.0114,
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... |
"""JSON token scanner
"""
import re
def _import_c_make_scanner():
try:
from simplejson._speedups import make_scanner
return make_scanner
except ImportError:
return None
c_make_scanner = _import_c_make_scanner()
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))... | [
[
8,
0,
0.0195,
0.026,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.039,
0.013,
0,
0.66,
0.1429,
540,
0,
1,
0,
0,
540,
0,
0
],
[
2,
0,
0.0844,
0.0779,
0,
0.66,
... | [
"\"\"\"JSON token scanner\n\"\"\"",
"import re",
"def _import_c_make_scanner():\n try:\n from simplejson._speedups import make_scanner\n return make_scanner\n except ImportError:\n return None",
" try:\n from simplejson._speedups import make_scanner\n return make_sc... |
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger
http://code.activestate.com/recipes/576693/
"""
from UserDict import DictMixin
# Modified from original to support Python 2.4, see
# http://code.google.com/p/simplejson/issues/detail?id=53
try:
all
except NameError:
def all(seq):
... | [
[
8,
0,
0.0252,
0.042,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0504,
0.0084,
0,
0.66,
0.3333,
351,
0,
1,
0,
0,
351,
0,
0
],
[
7,
0,
0.1134,
0.0672,
0,
0.66,... | [
"\"\"\"Drop-in replacement for collections.OrderedDict by Raymond Hettinger\n\nhttp://code.activestate.com/recipes/576693/\n\n\"\"\"",
"from UserDict import DictMixin",
"try:\n all\nexcept NameError:\n def all(seq):\n for elem in seq:\n if not elem:\n return False\n ... |
import logging
import os
#initialize logging
def create_env():
"""Sets logging level if LOGGING_DEBUG is set"""
default_log_level = logging.INFO
if os.environ.get("LOGGING_DEBUG") in ("1", "True", "on"):
default_log_level = logging.DEBUG
return default_log_level
class Formatter(object):
... | [
[
1,
0,
0.0204,
0.0204,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0408,
0.0204,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
2,
0,
0.1837,
0.1429,
0,
... | [
"import logging",
"import os",
"def create_env():\n \"\"\"Sets logging level if LOGGING_DEBUG is set\"\"\"\n\n default_log_level = logging.INFO\n if os.environ.get(\"LOGGING_DEBUG\") in (\"1\", \"True\", \"on\"):\n default_log_level = logging.DEBUG\n return default_log_level",
" \"\"\"Se... |
"""
Author: Noah Gift
Date: 08/05/2009
A really simple set of defaults for logging
============================================
You simply do this::
>>> from sensible.loginit import logger
>>> log = logger("MyApp")
>>> log.info("stuff")
2009-08-04 23:56:22,583 - MyApp - INFO - stuff
Environmental ... | [
[
8,
0,
0.5227,
1,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
] | [
"\"\"\"\nAuthor: Noah Gift\nDate: 08/05/2009\n\nA really simple set of defaults for logging\n============================================\n\nYou simply do this::"
] |
from _BookShelf import _BookShelf
class BookShelf(_BookShelf):
pass
# Custom logic goes here. | [
[
1,
0,
0.2,
0.2,
0,
0.66,
0,
291,
0,
1,
0,
0,
291,
0,
0
],
[
3,
0,
0.7,
0.4,
0,
0.66,
1,
80,
0,
0,
0,
0,
291,
0,
0
]
] | [
"from _BookShelf import _BookShelf",
"class BookShelf(_BookShelf):\n pass"
] |
"""
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard python 2.3+
datetime module.
"""
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
__version__ = "1.5"
| [
[
8,
0,
0.3889,
0.6667,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.7778,
0.1111,
0,
0.66,
0.3333,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.8889,
0.1111,
0,
0.66... | [
"\"\"\"\nCopyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>\n\nThis module offers extensions to the standard python 2.3+\ndatetime module.\n\"\"\"",
"__author__ = \"Gustavo Niemeyer <gustavo@niemeyer.net>\"",
"__license__ = \"PSF License\"",
"__version__ = \"1.5\""
] |
"""
Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard python 2.3+
datetime module.
"""
from dateutil.tz import tzfile
from tarfile import TarFile
import os
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
__all__ = ["setca... | [
[
8,
0,
0.0402,
0.069,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0805,
0.0115,
0,
0.66,
0.0714,
872,
0,
1,
0,
0,
872,
0,
0
],
[
1,
0,
0.092,
0.0115,
0,
0.66,
... | [
"\"\"\"\nCopyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net>\n\nThis module offers extensions to the standard python 2.3+\ndatetime module.\n\"\"\"",
"from dateutil.tz import tzfile",
"from tarfile import TarFile",
"import os",
"__author__ = \"Gustavo Niemeyer <gustavo@niemeyer.net>\"",
"__li... |
# This code was originally contributed by Jeffrey Harris.
import datetime
import struct
import _winreg
__author__ = "Jeffrey Harris & Gustavo Niemeyer <gustavo@niemeyer.net>"
__all__ = ["tzwin", "tzwinlocal"]
ONEWEEK = datetime.timedelta(7)
TZKEYNAMENT = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones"
TZ... | [
[
1,
0,
0.0111,
0.0056,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0167,
0.0056,
0,
0.66,
0.0667,
399,
0,
1,
0,
0,
399,
0,
0
],
[
1,
0,
0.0222,
0.0056,
0,
... | [
"import datetime",
"import struct",
"import _winreg",
"__author__ = \"Jeffrey Harris & Gustavo Niemeyer <gustavo@niemeyer.net>\"",
"__all__ = [\"tzwin\", \"tzwinlocal\"]",
"ONEWEEK = datetime.timedelta(7)",
"TZKEYNAMENT = r\"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\"",
"TZKEYNAME9X ... |
from _Book import _Book
class Book(_Book):
pass
# Custom logic goes here. | [
[
1,
0,
0.2,
0.2,
0,
0.66,
0,
208,
0,
1,
0,
0,
208,
0,
0
],
[
3,
0,
0.7,
0.4,
0,
0.66,
1,
97,
0,
0,
0,
0,
208,
0,
0
]
] | [
"from _Book import _Book",
"class Book(_Book):\n pass"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.