code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#pydicom_Tkinter.py
#
# Copyright (c) 2009 Daniel Nanz
# This file is released under the pydicom (http://code.google.com/p/pydicom/)
# license, see the file license.txt available at
# (http://code.google.com/p/pydicom/)
#
# revision history:
# Dec-08-2009: version 0.1
#
# 0.1: tested with pydicom version 0.9.3, Pytho... | [
[
8,
0,
0.1005,
0.0622,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1388,
0.0048,
0,
0.66,
0.1111,
368,
0,
1,
0,
0,
368,
0,
0
],
[
1,
0,
0.1435,
0.0048,
0,
0.66... | [
"'''\nView DICOM images from pydicom\n\nrequires numpy: http://numpy.scipy.org/\n\nUsage:\n------\n>>> import dicom # pydicom",
"import Tkinter",
"import tempfile",
"import os",
"have_numpy = True",
"try:\n import numpy as np\nexcept:\n # will not work...\n have_numpy = False",
" ... |
# dicom_series.py
"""
By calling the function read_files with a directory name or list
of files as an argument, a list of DicomSeries instances can be
obtained. A DicomSeries object has some attributes that give
information about the serie (such as shape, sampling, suid) and
has an info attribute, which is a dicom.Data... | [
[
8,
0,
0.0123,
0.0203,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0593,
0.0014,
0,
0.66,
0.0667,
688,
0,
4,
0,
0,
688,
0,
0
],
[
1,
0,
0.0608,
0.0014,
0,
0.66... | [
"\"\"\"\nBy calling the function read_files with a directory name or list\nof files as an argument, a list of DicomSeries instances can be\nobtained. A DicomSeries object has some attributes that give\ninformation about the serie (such as shape, sampling, suid) and\nhas an info attribute, which is a dicom.DataSet i... |
#!/usr/bin/python
""" dicom_dao
Data Access Objects for persisting PyDicom DataSet objects.
Currently we support couchdb through the DicomCouch class.
Limitations:
- Private tags are discarded
TODO:
- Unit tests with multiple objects open at a time
- Unit tests with rtstruct objects
- Support for mongodb (mong... | [
[
8,
0,
0.0387,
0.065,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.09,
0.0025,
0,
0.66,
0.0476,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.0925,
0.0025,
0,
0.66,
... | [
"\"\"\" dicom_dao\n\nData Access Objects for persisting PyDicom DataSet objects.\n\nCurrently we support couchdb through the DicomCouch class.\n\nLimitations:\n - Private tags are discarded",
"import hashlib",
"import os",
"import string",
"import simplejson",
"import couchdb",
"import dicom",
"def ui... |
# pydicom_PIL.py
"""View DICOM images using Python image Library (PIL)
Usage:
>>> import dicom
>>> from dicom.contrib.pydicom_PIL import show_PIL
>>> ds = dicom.read_file("filename")
>>> show_PIL(ds)
Requires Numpy: http://numpy.scipy.org/
and Python Imaging Library: http://www.pythonware.com/products/pil/
"""
# ... | [
[
8,
0,
0.0843,
0.1348,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2697,
0.0112,
0,
0.66,
0.1111,
264,
1,
0,
0,
0,
0,
4,
0
],
[
7,
0,
0.2978,
0.0449,
0,
0.66,... | [
"\"\"\"View DICOM images using Python image Library (PIL)\n\nUsage:\n>>> import dicom\n>>> from dicom.contrib.pydicom_PIL import show_PIL\n>>> ds = dicom.read_file(\"filename\")\n>>> show_PIL(ds)",
"have_PIL=True",
"try:\n import PIL.Image\nexcept:\n have_PIL = False",
" import PIL.Image",
" hav... |
# __init__.py
# Mark the folder as a python package
| [] | [] |
#==========================================================================
# imViewer-Simple.py
#
# An example program that opens uncompressed DICOM images and
# converts them via numPy and PIL to be viewed in wxWidgets GUI
# apps. The conversion is currently:
#
# pydicom->NumPy->PIL->wxPython.Image->wxPython.B... | [
[
1,
0,
0.0898,
0.003,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0928,
0.003,
0,
0.66,
0.0769,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.0958,
0.003,
0,
0.66,... | [
"import os",
"import os.path",
"import sys",
"import dicom",
"import wx",
"have_PIL = True",
"try:\n import PIL.Image\nexcept:\n have_PIL = False",
" import PIL.Image",
" have_PIL = False",
"have_numpy = True",
"try:\n import numpy as np\nexcept:\n have_numpy = False",
" i... |
# sequence.py
"""Hold the Sequence class, which stores a dicom sequence (list of Datasets)"""
# Copyright (c) 2008-2012 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
... | [
[
8,
0,
0.0351,
0.0175,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1404,
0.0175,
0,
0.66,
0.25,
967,
0,
1,
0,
0,
967,
0,
0
],
[
1,
0,
0.1579,
0.0175,
0,
0.66,
... | [
"\"\"\"Hold the Sequence class, which stores a dicom sequence (list of Datasets)\"\"\"",
"from dicom.dataset import Dataset",
"from dicom.multival import MultiValue",
"def validate_dataset(elem):\n \"\"\"Ensures that the value is a Dataset instance\"\"\"\n if not isinstance(elem, Dataset):\n rais... |
# __init__.py for Dicom package
"""pydicom package -- easily handle DICOM files. See Quick Start below.
Copyright (c) 2008-2012 Darcy Mason
This file is part of pydicom, released under a modified MIT license.
See the file license.txt included with this distribution, also
available at http://pydicom.googlecode.co... | [
[
8,
0,
0.1918,
0.3425,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3836,
0.0137,
0,
0.66,
0.0667,
509,
0,
1,
0,
0,
509,
0,
0
],
[
4,
0,
0.4041,
0.0274,
0,
0.66... | [
"\"\"\"pydicom package -- easily handle DICOM files. See Quick Start below.\n\nCopyright (c) 2008-2012 Darcy Mason\nThis file is part of pydicom, released under a modified MIT license.\n See the file license.txt included with this distribution, also\n available at http://pydicom.googlecode.com\n\n-----------",
... |
# UID.py
"""Dicom Unique identifiers"""
# Copyright (c) 2008 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
import os
import uuid
import time, datetime
from math impor... | [
[
8,
0,
0.0106,
0.0053,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0423,
0.0053,
0,
0.66,
0.0667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0476,
0.0053,
0,
0.66... | [
"\"\"\"Dicom Unique identifiers\"\"\"",
"import os",
"import uuid",
"import time, datetime",
"from math import fabs",
"from _UID_dict import UID_dictionary",
"class InvalidUID(Exception):\n '''\n Throw when DICOM UID is invalid\n\n Example of invalid UID::\n\n >>> uid = '1.2.123.'\n '... |
# filebase.py
"""Hold DicomFile class, which does basic I/O for a dicom file."""
# Copyright (c) 2008-2012 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
from __future_... | [
[
8,
0,
0.0127,
0.0063,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0443,
0.0063,
0,
0.66,
0.1,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.057,
0.0063,
0,
0.66,
... | [
"\"\"\"Hold DicomFile class, which does basic I/O for a dicom file.\"\"\"",
"from __future__ import absolute_import",
"from dicom.tag import Tag",
"from struct import unpack, pack",
"from io import BytesIO",
"import logging",
"logger = logging.getLogger('pydicom')",
"class DicomIO(object):\n \"\"\"... |
# tag.py
"""Define Tag class to hold a dicom (group, element) tag"""
# Copyright (c) 2008-2012 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
# Store the 4 bytes of a ... | [
[
8,
0,
0.0182,
0.0091,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
0,
0.2273,
0.1909,
0,
0.66,
0.1429,
493,
0,
2,
1,
0,
0,
0,
12
],
[
8,
1,
0.1545,
0.0273,
1,
0.2,
... | [
"\"\"\"Define Tag class to hold a dicom (group, element) tag\"\"\"",
"def Tag(arg, arg2=None):\n \"\"\"General function for creating a Tag in any of the standard forms:\n e.g. Tag(0x00100010), Tag(0x10,0x10), Tag((0x10, 0x10))\n \"\"\"\n if arg2 is not None:\n arg = (arg, arg2) # act as if wa... |
# misc.py
"""Miscellaneous helper functions"""
# Copyright (c) 2009 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
_size_factors = dict(KB=1024, MB=1024 * 1024, GB=102... | [
[
8,
0,
0.0909,
0.0455,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3636,
0.0455,
0,
0.66,
0.5,
623,
3,
3,
0,
0,
827,
10,
1
],
[
2,
0,
0.75,
0.5455,
0,
0.66,
... | [
"\"\"\"Miscellaneous helper functions\"\"\"",
"_size_factors = dict(KB=1024, MB=1024 * 1024, GB=1024 * 1024 * 1024)",
"def size_in_bytes(expr):\n \"\"\"Return the number of bytes for a defer_size argument to read_file()\n \"\"\"\n try:\n return int(expr)\n except ValueError:\n unit = e... |
# fileutil.py
"""Functions for reading to certain bytes, e.g. delimiters"""
# Copyright (c) 2009-2012 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
from struct import... | [
[
8,
0,
0.0109,
0.0055,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0437,
0.0055,
0,
0.66,
0.0909,
399,
0,
2,
0,
0,
399,
0,
0
],
[
1,
0,
0.0492,
0.0055,
0,
0.66... | [
"\"\"\"Functions for reading to certain bytes, e.g. delimiters\"\"\"",
"from struct import pack, unpack",
"from dicom.tag import TupleTag, Tag",
"from dicom.datadict import dictionary_description",
"import logging",
"logger = logging.getLogger('pydicom')",
"def absorb_delimiter_item(fp, is_little_endian... |
# config.py
"""Pydicom configuration options."""
# Copyright (c) 2012 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
# doc strings following items are picked up by sph... | [
[
8,
0,
0.1111,
0.0556,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.5556,
0.0556,
0,
0.66,
0.25,
658,
1,
0,
0,
0,
0,
4,
0
],
[
8,
0,
0.6667,
0.1667,
0,
0.66,
... | [
"\"\"\"Pydicom configuration options.\"\"\"",
"allow_DS_float = False",
"\"\"\"Set allow_float to True to allow DS instances to be created with floats;\notherwise, they must be explicitly converted to strings, with the user\nexplicity setting the precision of digits and rounding. Default: False\"\"\"",
"enfor... |
#!/usr/bin/env python
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
import os
import os.path
import sys
setup(name="pydicom",
packages = find_packages(),
include_package_data = True,
version="1.0a",
package_data = {'dicom': ['testfile... | [
[
1,
0,
0.0377,
0.0189,
0,
0.66,
0,
926,
0,
1,
0,
0,
926,
0,
0
],
[
8,
0,
0.0566,
0.0189,
0,
0.66,
0.1667,
479,
3,
0,
0,
0,
0,
0,
1
],
[
1,
0,
0.0943,
0.0189,
0,
0.... | [
"from distribute_setup import use_setuptools",
"use_setuptools()",
"from setuptools import setup, find_packages",
"import os",
"import os.path",
"import sys",
"setup(name=\"pydicom\",\n packages = find_packages(),\n include_package_data = True,\n version=\"1.0a\",\n package_data = {'... |
from __future__ import with_statement
# file "make_private_dict.py"
# Copyright (c) 2009 Daniel Nanz
# This file is released under the pydicom (http://code.google.com/p/pydicom/)
# license.
# See the file license.txt included with the pydicom distribution, also
# available at http://pydicom.googlecode.com
'''
-- ... | [
[
1,
0,
0.0088,
0.0088,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
8,
0,
0.1711,
0.1754,
0,
0.66,
0.0667,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2719,
0.0088,
0,
0.66... | [
"from __future__ import with_statement",
"'''\n-- Usage ------------------ (>= python 2.5, <3)---\n\npython make_private_dict_alt.py\n\nor\n\npython make_private_dict_alt.py target_file_path",
"import urllib2",
"import io",
"import xml.etree.cElementTree as ET",
"import sys",
"import datetime",
"impor... |
# make_UID_dict.py
"""Reformat a UID list csv file (Table A-1 PS3.6-2008) to Python syntax
Write the dict elements as:
UID: (name, type, name_info, is_retired)
in python format
name_info is extra information extracted from very long names, e.g.
which bit size a particular transfer syntax is def... | [
[
8,
0,
0.1102,
0.1695,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2881,
0.0169,
0,
0.66,
0.2,
352,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3051,
0.0169,
0,
0.66,
... | [
"\"\"\"Reformat a UID list csv file (Table A-1 PS3.6-2008) to Python syntax\n\n Write the dict elements as:\n UID: (name, type, name_info, is_retired)\n in python format\n \n name_info is extra information extracted from very long names, e.g. \n which bit size a particular transfer syntax is default... |
'''
Created on 21-03-2011
@author: maciek
'''
def formatString(format, **kwargs):
'''
'''
if not format: return ''
for arg in kwargs.keys():
format = format.replace("{" + arg + "}", "##" + arg + "##")
format = format.replace ("{", "{{")
format = format.replace("}", "}}")
for... | [
[
8,
0,
0.1304,
0.2174,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
0,
0.6739,
0.6957,
0,
0.66,
1,
798,
0,
2,
1,
0,
0,
0,
9
],
[
8,
1,
0.413,
0.087,
1,
0.48,
0,
... | [
"'''\nCreated on 21-03-2011\n\n@author: maciek\n'''",
"def formatString(format, **kwargs):\n '''\n '''\n if not format: return ''\n \n for arg in kwargs.keys():\n format = format.replace(\"{\" + arg + \"}\", \"##\" + arg + \"##\")\n format = format.replace (\"{\", \"{{\")",
" '''\n ... |
'''
Created on 21-03-2011
@author: maciek
'''
from IndexGenerator import IndexGenerator
from optparse import OptionParser
import os
import tempfile
import shutil
import logging
logging.basicConfig(level = logging.DEBUG)
parser = OptionParser()
parser.add_option('-n', '--app-name', action='store', dest='appName', hel... | [
[
8,
0,
0.0341,
0.0568,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0682,
0.0114,
0,
0.66,
0.0303,
933,
0,
1,
0,
0,
933,
0,
0
],
[
1,
0,
0.0795,
0.0114,
0,
0.66... | [
"'''\nCreated on 21-03-2011\n\n@author: maciek\n'''",
"from IndexGenerator import IndexGenerator",
"from optparse import OptionParser",
"import os",
"import tempfile",
"import shutil",
"import logging",
"logging.basicConfig(level = logging.DEBUG)",
"parser = OptionParser()",
"parser.add_option('-n... |
'''
Created on 21-03-2011
@author: maciek
'''
from formater import formatString
import os
class IndexGenerator(object):
'''
Generates Index.html for iOS app OTA distribution
'''
basePath = os.path.dirname(__file__)
templateFile = os.path.join(basePath,"templates/index.tmpl")
releaseUrls = ""
... | [
[
8,
0,
0.0526,
0.0877,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1053,
0.0175,
0,
0.66,
0.3333,
11,
0,
1,
0,
0,
11,
0,
0
],
[
1,
0,
0.1228,
0.0175,
0,
0.66,
... | [
"'''\nCreated on 21-03-2011\n\n@author: maciek\n'''",
"from formater import formatString",
"import os",
"class IndexGenerator(object):\n '''\n Generates Index.html for iOS app OTA distribution\n '''\n basePath = os.path.dirname(__file__)\n templateFile = os.path.join(basePath,\"templates/index.... |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| [
[
1,
0,
0.1818,
0.0909,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
14,
0,
0.2727,
0.0909,
0,
0.66,
0.1111,
15,
3,
0,
0,
0,
654,
10,
1
],
[
14,
0,
0.3636,
0.0909,
0,
... | [
"import time",
"t = time.time()",
"u = time.gmtime(t)",
"s = time.strftime('%a, %e %b %Y %T GMT', u)",
"print('Content-Type: text/javascript')",
"print('Cache-Control: no-cache')",
"print('Date: ' + s)",
"print('Expires: ' + s)",
"print('')",
"print('var timeskew = new Date().getTime() - ' + str(t... |
#!/usr/bin/env python
import codecs
import re
import jinja2
import markdown
def process_slides():
with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile:
md = codecs.open('slides.md', encoding='utf8').read()
md_slides = md.split('\n---\n')
print 'Compiled %s slides.' % len(m... | [
[
1,
0,
0.0526,
0.0175,
0,
0.66,
0,
220,
0,
1,
0,
0,
220,
0,
0
],
[
1,
0,
0.0702,
0.0175,
0,
0.66,
0.1429,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0877,
0.0175,
0,
... | [
"import codecs",
"import re",
"import jinja2",
"import markdown",
"def process_slides():\n with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile:\n md = codecs.open('slides.md', encoding='utf8').read()\n md_slides = md.split('\\n---\\n')\n print('Compiled %s slides.' ... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
[
14,
0,
0.0281,
0.0017,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0347,
0.0017,
0,
0.66,
0.0303,
509,
0,
1,
0,
0,
509,
0,
0
],
[
8,
0,
0.0364,
0.0017,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import sys",
"sys.path.insert(0, 'lib')",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext import db",
"from google... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
[
14,
0,
0.0557,
0.0033,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0689,
0.0033,
0,
0.66,
0.0333,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0721,
0.0033,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import db",
"from google.appengine.ext.webapp import template",
"from apiclient.discovery import build_from_document",
"from apiclient.http import MediaUpload",
"from oauth2... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | [
[
14,
0,
0.1667,
0.0556,
0,
0.66,
0,
189,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3889,
0.0556,
0,
0.66,
0.3333,
295,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6111,
0.0556,
0,
0... | [
"manual_verstr = \"1.5\"",
"auto_build_num = \"211\"",
"verstr = manual_verstr + \".\" + auto_build_num",
"try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.3,
0.575,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.625,
0.025,
0,
0.66,
0.3333,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.65,
0.025,
0,
0.66,
0.6... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.2927,
0.561,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.6098,
0.0244,
0,
0.66,
0.25,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.6341,
0.0244,
0,
0.66,
... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | [
[
8,
0,
0.0437,
0.0741,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0847,
0.0026,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0899,
0.0026,
0,
0.66,... | [
"\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id",
"__author__ = 'jb... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0145,
0.0035,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0176,
0.0009,
0,
0.66,
0.0244,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0193,
0.0009,
0,
0.66,... | [
"\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import base64",
"import clientsecrets",
"import copy",
"import datetime",
"import httplib2",
"import logging",
"import os",
"import sys",
"im... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1604,
0.0472,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1981,
0.0094,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.217,
0.0094,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import os",
"import stat",
"import threading",
"from anyjson import simplejson",
"from client import Storage as BaseStorage",
"from clien... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1371,
0.0403,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1694,
0.0081,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1855,
0.0081,
0,
0.66,... | [
"\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import oauth2client",
"import base64",
"import pickle",
"from django.db import models",
"from oauth2client.client import St... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
[
1,
0,
0.0738,
0.0041,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0779,
0.0041,
0,
0.66,
0.0625,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.082,
0.0041,
0,
0... | [
"import base64",
"import hashlib",
"import logging",
"import time",
"from OpenSSL import crypto",
"from anyjson import simplejson",
"CLOCK_SKEW_SECS = 300 # 5 minutes in seconds",
"AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds",
"MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds",
"cla... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1619,
0.0476,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2,
0.0095,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2286,
0.0095,
0,
0.66,
... | [
"\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from anyjson import simplejson",
"TYPE_WEB = 'web'",
"TYPE_INSTALL... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
32,
0,
1,
0,
0,
32,
0,
0
],
[
1,
0,
0.0119,
0.006,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0179,
0.006,
0,
0.66,
... | [
"import Cookie",
"import datetime",
"import time",
"import email.utils",
"import calendar",
"import base64",
"import hashlib",
"import hmac",
"import re",
"import logging",
"class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0342,
0.0083,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0414,
0.0021,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0476,
0.0021,
0,
0.66,... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import copy",
"import httplib2",
"import logging",
"import oauth2 as oauth",
"import urllib",
"import urlparse",
"from anyjson import simplejson",
"tr... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.0519,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0649,
0.0026,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0701,
0.0026,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2619,
0.0635,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3175,
0.0159,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3492,
0.0159,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"import threading",
"from apiclient.oauth import Storage as BaseStorage",
"class Storage(BaseStorage):\n \"\"\"Store and retr... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
1,
0,
0.2679,
0.0179,
0,
0.66,
0,
629,
0,
1,
0,
0,
629,
0,
0
],
[
1,
0,
0.2857,
0.0179,
0,
0.66,
0.2,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.3036,
0.0179,
0,
0.6... | [
"import apiclient",
"import base64",
"import pickle",
"from django.db import models",
"class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):",
" __metaclass__ = models.SubfieldBase",
" def db_t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1259,
0.037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1556,
0.0074,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1704,
0.0074,
0,
0.66,
... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"from google.appengine.ext import db",
"from apiclient.oauth import OAuthCredentials",
"... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.1545,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.187,
0.0081,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2114,
0.0081,
0,
0.66,
... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from oauth2client.anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
dataTypes = ["CPUndefinedDataType", "CPIntegerDataType", "CPUnsignedIntegerDataType", "CPFloatingPointDataType", "CPComplexFloatingPointDataType", "CPDecimalDataType"]
types = { "CPUndefinedDataType" : [],
"CPIntegerDataType" : ["int8_t", "int16_t", "int32_t", "int64_t"],
"CPUnsignedIntegerDataType" : ... | [
[
14,
0,
0.0068,
0.0068,
0,
0.66,
0,
302,
0,
0,
0,
0,
0,
5,
0
],
[
14,
0,
0.0372,
0.0405,
0,
0.66,
0.04,
209,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.1115,
0.0946,
0,
0.6... | [
"dataTypes = [\"CPUndefinedDataType\", \"CPIntegerDataType\", \"CPUnsignedIntegerDataType\", \"CPFloatingPointDataType\", \"CPComplexFloatingPointDataType\", \"CPDecimalDataType\"]",
"types = { \"CPUndefinedDataType\" : [],\n \"CPIntegerDataType\" : [\"int8_t\", \"int16_t\", \"int32_t\", \"int64_t\"],\n ... |
#!/usr/bin/env python
from os import mkdir, makedirs, environ, chdir, getcwd, system, listdir
from os.path import join
from shutil import copy, copytree, move, rmtree
# Usage
def Usage():
return 'Usage: createversion.py <version>'
# Run Xcode
def RunXcode(project, target):
system('/usr/bin/xcodebuild -projec... | [
[
1,
0,
0.0357,
0.0119,
0,
0.66,
0,
688,
0,
7,
0,
0,
688,
0,
0
],
[
1,
0,
0.0476,
0.0119,
0,
0.66,
0.0222,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.0595,
0.0119,
0,
0.... | [
"from os import mkdir, makedirs, environ, chdir, getcwd, system, listdir",
"from os.path import join",
"from shutil import copy, copytree, move, rmtree",
"def Usage():\n return 'Usage: createversion.py <version>'",
" return 'Usage: createversion.py <version>'",
"def RunXcode(project, target):\n s... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | [
[
1,
0,
0.0816,
0.0102,
0,
0.66,
0,
688,
0,
4,
0,
0,
688,
0,
0
],
[
14,
0,
0.1224,
0.0102,
0,
0.66,
0.0714,
792,
6,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1531,
0.0102,
0,
... | [
"import os, re, mimetypes, sys",
"SOURCE = sys.argv[1:]",
"COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)",
"COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)",
"COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)",
"EXCLUDE_TYPES = [\n \"application/xml\... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.2807,
0.0175,
0,
0.66,
0,
371,
0,
1,
0,
0,
371,
0,
0
],
[
1,
0,
0.2982,
0.0175,
0,
0.66,
0.3333,
79,
0,
1,
0,
0,
79,
0,
0
],
[
2,
0,
0.3947,
0.1404,
0,
0.... | [
"import nltk",
"import os.path",
"def init_nltk(clazz):\n \"\"\" Initialize path to NLTK so that resource files do not\n need to be loaded directly.\n \"\"\"\n directory = os.path.dirname(__file__)\n nltk.data.path.insert(0, directory + \"/resources\")\n\n return clazz",
" \"\"\" Init... |
from PlugInInterface import *
from progressbar import *
class ConsoleNotifier(PlugIn, ExtractStart, ExtractStop, FeatureStart, TrainStart, TrainStop):
""" Notifier plugin that prints status messages to STDOUT"""
dependencies = None
conflicts = None
needs_vanilla_data = False
modifies_data = False... | [
[
1,
0,
0.0141,
0.0141,
0,
0.66,
0,
627,
0,
1,
0,
0,
627,
0,
0
],
[
1,
0,
0.0282,
0.0141,
0,
0.66,
0.5,
349,
0,
1,
0,
0,
349,
0,
0
],
[
3,
0,
0.5282,
0.9577,
0,
0.6... | [
"from PlugInInterface import *",
"from progressbar import *",
"class ConsoleNotifier(PlugIn, ExtractStart, ExtractStop, FeatureStart, TrainStart, TrainStop):\n \"\"\" Notifier plugin that prints status messages to STDOUT\"\"\"\n dependencies = None\n conflicts = None\n needs_vanilla_data = False\n... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.2462,
0.0154,
0,
0.66,
0,
201,
0,
1,
0,
0,
201,
0,
0
],
[
1,
0,
0.2615,
0.0154,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2923,
0.0154,
0,
0.... | [
"import imp",
"import os",
"from LinguisticFeature import *",
"def init_features(clazz):\n \"\"\"Initialize the list of installed features\"\"\"\n installed_features = os.listdir(\"features\");\n\n for feature in installed_features:\n if feature.endswith(\".py\"):\n clazz.load_featu... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.1495,
0.0093,
0,
0.66,
0,
448,
0,
1,
0,
0,
448,
0,
0
],
[
1,
0,
0.1589,
0.0093,
0,
0.66,
0.5,
627,
0,
1,
0,
0,
627,
0,
0
],
[
3,
0,
0.5888,
0.8318,
0,
0.6... | [
"from plugins.FeatureExtractor.FeatureFactory import *",
"from PlugInInterface import *",
"class FeatureExtractor(PlugIn, ExtractStart, ListFeatures):\n dependencies = None\n conflicts = None\n needs_vanilla_data = False\n modifies_data = True\n category = Categories.FEATUREEXTRACTION\n \n ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.1103,
0.0069,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1172,
0.0069,
0,
0.66,
0.2,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.131,
0.0069,
0,
0.66... | [
"import os",
"import sys",
"from Domain import FeatureResult",
"from PlugInInterface import *",
"try:\n import orange\nexcept:\n print(\"Could not import Orange!\")\n sys.exit(1)",
" import orange",
" print(\"Could not import Orange!\")",
" sys.exit(1)",
"class OrangeAdaptor(PlugIn... |
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
#
# progressbar - Text progressbar library for python.
# Copyright (c) 2005 Nilton Volpato
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation... | [
[
8,
0,
0.0807,
0.0495,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1094,
0.0026,
0,
0.66,
0.0476,
777,
0,
1,
0,
0,
777,
0,
0
],
[
14,
0,
0.1146,
0.0026,
0,
0.6... | [
"\"\"\"Text progressbar library for python.\n\nThis library provides a text mode progressbar. This is typically used\nto display the progress of a long running operation, providing a\nvisual clue that processing is underway.\n\nThe ProgressBar class manages the progress, and the format of the line\nis given by a nu... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.1088,
0.0068,
0,
0.66,
0,
201,
0,
1,
0,
0,
201,
0,
0
],
[
1,
0,
0.1156,
0.0068,
0,
0.66,
0.3333,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1293,
0.0068,
0,
... | [
"import imp",
"import sys",
"from PlugInInterface import *",
"class PluginManager(object):\n \"\"\"Loads, organizes, and contacts plugins when events occur.\n \n _plug_ins -- List of plugins loaded\n _events -- Dictionary of events where value is a list of plugins subscribed\n \n \"\"\"",
... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
3,
0,
0.1568,
0.0508,
0,
0.66,
0,
286,
0,
2,
0,
0,
186,
0,
2
],
[
2,
1,
0.1483,
0.0169,
1,
0.58,
0,
276,
0,
2,
0,
0,
0,
0,
1
],
[
2,
1,
0.1737,
0.0169,
1,
0.58,
... | [
"class PlugIn(object):\n def register(self, events):\n raise NotImplementedError()\n\n def unregister(self, events):\n raise NotImplementedError()",
" def register(self, events):\n raise NotImplementedError()",
" def unregister(self, events):\n raise NotImplementedError()... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3902,
0.0244,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4146,
0.0244,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7317,
0.561,
0,
0.66... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class Complexity(LinguisticFeature):\n \"\"\"Calculates the lexical diversity of a sample\n _short_name -- Short name of feature\n _long_name -- Long name of feature\n _description -- Description of feature\n\n \"\"\"\n _s... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.2319,
0.0145,
0,
0.66,
0,
272,
0,
1,
0,
0,
272,
0,
0
],
[
1,
0,
0.2609,
0.0145,
0,
0.66,
0.3333,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.2754,
0.0145,
0,
... | [
"import ConfigParser",
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class PctWordGroups(LinguisticFeature):\n \"\"\" Feature that calculates the percentage of words that belong\n in each specified word group\n \"\"\"\n _short_name = \"PctWordGroups\"\n _long_name ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.381,
0.0238,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4048,
0.0238,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7143,
0.5476,
0,
0.66... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class AvgCharactersPerParagraph(LinguisticFeature):\n \"\"\" Feature that calculates the average number of characters\n per paragraph in the sample\n \"\"\"\n _short_name = \"AvgCharactersPerParagraph\"\n _long_name = \"A... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.4706,
0.0294,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.5,
0.0294,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7794,
0.4706,
0,
0.66,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class UniqueWordCount(LinguisticFeature):\n \"\"\" Feature that counts the number of unique words in the sample\"\"\"\n _short_name = \"UniqueWordCount\"\n _long_name = \"Unique Word Count\"\n _description = \"Number of unique w... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3902,
0.0244,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4146,
0.0244,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7195,
0.5366,
0,
0.6... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class AvgWordsPerParagraph(LinguisticFeature):\n \"\"\" Feature that calculates the average number of words per paragraph\n in the sample\n \"\"\"\n _short_name = \"AvgWordsPerParagraph\"\n _long_name = \"Average Number o... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.2286,
0.0143,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.2429,
0.0143,
0,
0.66,
0.25,
965,
0,
1,
0,
0,
965,
0,
0
],
[
1,
0,
0.2714,
0.0143,
0,
0.... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"import nltk",
"from nltk_contrib.readability import syllables_en",
"class Readability(LinguisticFeature):\n \"\"\" Feature that calculates the readability of the sample.\n Uses both the Automated Readability Index (ARI)\n ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.1356,
0.0085,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.1441,
0.0085,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.5805,
0.8475,
0,
0.6... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class NGramFreq(LinguisticFeature):\n \"\"\" Feature that calculates the frequency of unigrams, bigrams, and\n trigrams in the sample\n \"\"\"\n _short_name = \"NGramFreq\"\n _long_name = \"N-Gram Frequency\"\n _descri... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.2388,
0.0149,
0,
0.66,
0,
272,
0,
1,
0,
0,
272,
0,
0
],
[
1,
0,
0.2687,
0.0149,
0,
0.66,
0.3333,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.2836,
0.0149,
0,
... | [
"import ConfigParser",
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class WordGroups(LinguisticFeature):\n \"\"\" Feature that counts the number of words in each specified word group\"\"\" \n _short_name = \"WordGroups\"\n _long_name = \"Word Groups\"\n _description = \"... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.4571,
0.0286,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4857,
0.0286,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7714,
0.4857,
0,
0.6... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class LargeWordCount(LinguisticFeature):\n \"\"\" Feature that calculates the number of large words in the sample.\n Large words are those that have at least 10 characters.\n \"\"\"\n _short_name = \"LargeWordCount\"\n _l... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3721,
0.0233,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.3953,
0.0233,
0,
0.66,
0.3333,
965,
0,
1,
0,
0,
965,
0,
0
],
[
1,
0,
0.4419,
0.0233,
0,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"import nltk",
"class AvgSentencesPerParagraph(LinguisticFeature):\n \"\"\" Feature that calculates the average number of sentences per\n paragraph in the sample\n \"\"\"\n _short_name = \"AvgSentencesPerParagraph\"\n _l... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.5517,
0.0345,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.5862,
0.0345,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.8276,
0.3793,
0,
0.6... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class WordCount(LinguisticFeature):\n \"\"\" Feature that counts the number of words in the sample\"\"\"\n _short_name = \"WordCount\"\n _long_name = \"Word Count\"\n _description = \"Number of words in the sample.\"\n\n def ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3019,
0.0189,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.3208,
0.0189,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.6792,
0.6604,
0,
0.6... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class LexicalDiversity(LinguisticFeature):\n \"\"\"Calculates the lexical diversity of a sample\n _short_name -- Short name of feature\n _long_name -- Long name of feature\n _description -- Description of feature\n\n \"\"\"\n... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.254,
0.0159,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.2698,
0.0159,
0,
0.66,
0.25,
799,
0,
1,
0,
0,
799,
0,
0
],
[
1,
0,
0.3016,
0.0159,
0,
0.6... | [
"import sys",
"from nltk.corpus import wordnet",
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class SynClassification(LinguisticFeature):\n \"\"\" Feature that calculates the product of the number of synonyms of\n each word and the minimum nuber of times those synonyms a... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3636,
0.0227,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.3864,
0.0227,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7159,
0.5909,
0,
0.6... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class PctLargeWords(LinguisticFeature):\n \"\"\" Feature that calculates the percentage of large words in the sample.\n Large words are those that have more than 10 characters.\n \"\"\"\n _short_name = \"PctLargeWords\"\n ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.4211,
0.0263,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4474,
0.0263,
0,
0.66,
0.3333,
965,
0,
1,
0,
0,
965,
0,
0
],
[
1,
0,
0.4737,
0.0263,
0,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"import nltk",
"class AvgSentenceLength(LinguisticFeature):\n \"\"\" Feature that calculates the average sentence length of the sample\"\"\"\n _short_name = \"AvgSentenceLength\"\n _long_name = \"Average Sentence Length\"\n _de... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.32,
0.02,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.34,
0.02,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.69,
0.64,
0,
0.66,
1,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class PctPunctuation(LinguisticFeature):\n \"\"\" Feature that calculates the percentage of each type of punctuation\n in the sample\n \"\"\"\n _short_name = \"PctPunctuation\"\n _long_name = \"Punctuation Percentage\"\n ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.5333,
0.0333,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.5667,
0.0333,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.8,
0.3667,
0,
0.66,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class CharCount(LinguisticFeature):\n \"\"\" Feature that calculates the number of characters in the sample\"\"\"\n _short_name = \"CharCount\"\n _long_name = \"Character Count\"\n _description = \"Number of characters in the sa... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.4444,
0.0278,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4722,
0.0278,
0,
0.66,
0.5,
965,
0,
1,
0,
0,
965,
0,
0
],
[
3,
0,
0.7639,
0.5,
0,
0.66,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"class AvgWordLength(LinguisticFeature):\n \"\"\" Feature that calculates the average length of words in the sample\"\"\"\n _short_name = \"AvgWordLength\"\n _long_name = \"Average Word Length\"\n _description = \"Average length ... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3902,
0.0244,
0,
0.66,
0,
166,
0,
1,
0,
0,
166,
0,
0
],
[
1,
0,
0.4146,
0.0244,
0,
0.66,
0.3333,
965,
0,
1,
0,
0,
965,
0,
0
],
[
1,
0,
0.4634,
0.0244,
0,
... | [
"from Domain import FeatureResult",
"from LinguisticFeature import *",
"from nltk_contrib.readability import syllables_en",
"class AvgSyllables(LinguisticFeature):\n \"\"\" Feature that calculates the average number of syllables per word\n in the sample\n \"\"\"\n _short_name = \"AvgSyllables\... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.3265,
0.0204,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.3673,
0.0204,
0,
0.66,
0.2,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3878,
0.0204,
0,
0.66,... | [
"import unittest",
"import os",
"import imp",
"import sys",
"class PluginInterfacesTestCase(unittest.TestCase):\n def setUp(self):\n sys.path.append(os.getcwd())\n \n\n #def tearDown(self):\n # self.foo.dispose()\n # self.foo = None",
" def setUp(self):\n sys.path.ap... |
# This file is part of Stylo.
#
# Stylo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Stylo is distributed in t... | [
[
1,
0,
0.1495,
0.0093,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.1682,
0.0093,
0,
0.66,
0.1429,
201,
0,
1,
0,
0,
201,
0,
0
],
[
1,
0,
0.1776,
0.0093,
0,
0.... | [
"import unittest",
"import imp",
"import os",
"import sys",
"sys.path.append(os.getcwd())",
"from Domain import Sample",
"class LinguisticFeaturesTestCase(unittest.TestCase):\n #def setUp(self):\n\n #def tearDown(self):\n # self.foo.dispose()\n # self.foo = None\n\n def get_linguis... |
#!/usr/bin/python
import os
from subprocess import *
if __name__ == "__main__":
test_module_names = os.listdir("./tests/")
os.chdir("src")
for tmn in test_module_names:
if tmn.endswith(".py"):
Popen(["python", "../tests/%s" % tmn]).communicate()
| [
[
1,
0,
0.2143,
0.0714,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3571,
0.0714,
0,
0.66,
0.25,
394,
0,
1,
0,
0,
394,
0,
0
],
[
4,
0,
0.5357,
0.1429,
0,
0.... | [
"import os",
"from subprocess import *",
"if __name__ == \"__main__\":\n test_module_names = os.listdir(\"./tests/\")",
" test_module_names = os.listdir(\"./tests/\")",
"os.chdir(\"src\")",
"for tmn in test_module_names:\n if tmn.endswith(\".py\"):\n Popen([\"python\", \"../tests/%s\" % tm... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | [
[
1,
0,
0.0816,
0.0102,
0,
0.66,
0,
688,
0,
4,
0,
0,
688,
0,
0
],
[
14,
0,
0.1224,
0.0102,
0,
0.66,
0.0714,
792,
6,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1531,
0.0102,
0,
... | [
"import os, re, mimetypes, sys",
"SOURCE = sys.argv[1:]",
"COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)",
"COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)",
"COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)",
"EXCLUDE_TYPES = [\n \"application/xml\... |
# Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
14,
0,
0.1168,
0.0073,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1387,
0.0073,
0,
0.66,
0.0714,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.146,
0.0073,
0,
0.... | [
"__author__ = 'j.s@google.com (Jeff Scudder)'",
"import os",
"import wsgiref.handlers",
"from google.appengine.api import users",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp import template",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"import gdata.ga... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.0572,
0.0176,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0733,
0.0029,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0821,
0.0029,
0,
0.66,... | [
"\"\"\"GroupsClient simplifies Groups Provisioning API calls.\n\nGroupsClient extends gdata.client.GDClient to ease interaction\nwith the Group Provisioning API. These interactions include the\nability to create, retrieve, update and delete groups.\n\"\"\"",
"__author__ = 'Shraddha gupta <shraddhag@google.com>'"... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.072,
0.0042,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0847,
0.0042,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0975,
0.0042,
0,
0.66,
... | [
"\"\"\"Data model classes for the Groups Provisioning API.\"\"\"",
"__author__ = 'Shraddha gupta <shraddhag@google.com>'",
"import atom.data",
"import gdata.apps",
"import gdata.apps.apps_property_entry",
"import gdata.apps_property",
"import gdata.data",
"pyproperty = property",
"GROUP_ID = 'groupI... |
#!/usr/bin/python2.4
#
# Copyright 2008 Google Inc. All Rights Reserved.
#
# 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 require... | [
[
8,
0,
0.0762,
0.0045,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0852,
0.0045,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0987,
0.0045,
0,
0.66,... | [
"\"\"\"Contains objects used with Google Apps.\"\"\"",
"__author__ = 'google-apps-apis@googlegroups.com'",
"import atom",
"import gdata",
"APPS_NAMESPACE = 'http://schemas.google.com/apps/2006'",
"APPS_TEMPLATE = '{http://schemas.google.com/apps/2006}%s'",
"class Rfc822Msg(atom.AtomBase):\n \"\"\"The M... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.0524,
0.0183,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0681,
0.0026,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0759,
0.0026,
0,
0.66,... | [
"\"\"\"MultiDomainProvisioningClient simplifies Multidomain Provisioning API calls.\n\nMultiDomainProvisioningClient extends gdata.client.GDClient to ease interaction\nwith the Google Multidomain Provisioning API. These interactions include the\nability to create, retrieve, update and delete users and aliases in m... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.0411,
0.0024,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0483,
0.0024,
0,
0.66,
0.0417,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0556,
0.0024,
0,
0.66,... | [
"\"\"\"Data model classes for the Multidomain Provisioning API.\"\"\"",
"__author__ = 'Claudio Cherubino <ccherubino@google.com>'",
"import gdata.apps",
"import gdata.apps.apps_property_entry",
"import gdata.apps_property",
"import gdata.data",
"pyproperty = property",
"USER_FIRST_NAME = 'firstName'",... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.2615,
0.0154,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3077,
0.0154,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3538,
0.0154,
0,
0.66,
... | [
"\"\"\"Generic class for Set/Get properties of GData Provisioning clients.\"\"\"",
"__author__ = 'Gunjan Sharma <gunjansharma@google.com>'",
"import gdata.apps",
"import gdata.apps_property",
"import gdata.data",
"class AppsPropertyEntry(gdata.data.GDEntry):\n \"\"\"Represents a generic entry in object ... |
# Copyright 2010 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
[
8,
0,
0.0739,
0.0049,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0887,
0.0049,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1034,
0.0049,
0,
0.66,
... | [
"\"\"\"AppsClient adds Client Architecture to Provisioning API.\"\"\"",
"__author__ = '<Shraddha Gupta shraddhag@google.com>'",
"import gdata.apps.data",
"import gdata.client",
"import gdata.service",
"class AppsClient(gdata.client.GDClient):\n \"\"\"Client extension for the Google Provisioning API servi... |
#!/usr/bin/python
#
# Copyright (C) 2008 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
[
8,
0,
0.0701,
0.0152,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0833,
0.0038,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0947,
0.0038,
0,
0.66,... | [
"\"\"\"Allow Google Apps domain administrators to set users' email settings.\n\n EmailSettingsService: Set various email settings.\n\"\"\"",
"__author__ = 'google-apps-apis@googlegroups.com'",
"import gdata.apps",
"import gdata.apps.service",
"import gdata.service",
"API_VER='2.0'",
"KEEP='KEEP'",
"A... |
#!/usr/bin/python2.4
#
# Copyright 2010 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.036,
0.0154,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0479,
0.0017,
0,
0.66,
0.0435,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0531,
0.0017,
0,
0.66,
... | [
"\"\"\"EmailSettingsClient simplifies Email Settings API calls.\n\nEmailSettingsClient extends gdata.client.GDClient to ease interaction with\nthe Google Apps Email Settings API. These interactions include the ability\nto create labels, filters, aliases, and update web-clip, forwarding, POP,\nIMAP, vacation-respon... |
#!/usr/bin/python
#
# Copyright 2010 Google Inc. All Rights Reserved.
#
# 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.0135,
0.0008,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0159,
0.0008,
0,
0.66,
0.0169,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0183,
0.0008,
0,
0.66,... | [
"\"\"\"Data model classes for the Email Settings API.\"\"\"",
"__author__ = 'Claudio Cherubino <ccherubino@google.com>'",
"import atom.data",
"import gdata.apps",
"import gdata.apps_property",
"import gdata.data",
"pyproperty = property",
"LABEL_NAME = 'label'",
"FILTER_FROM_NAME = 'from'",
"FILTE... |
#!/usr/bin/python
#
# Copyright (C) 2008 Google
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [] | [] |
#!/usr/bin/python
#
# Copyright 2010 Google Inc. All Rights Reserved.
#
# 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.2048,
0.012,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.241,
0.012,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2771,
0.012,
0,
0.66,
... | [
"\"\"\"Data model classes for the Provisioning API.\"\"\"",
"__author__ = 'Shraddha Gupta shraddhag@google.com>'",
"import atom.core",
"import atom.data",
"import gdata.apps",
"import gdata.data",
"class Login(atom.core.XmlElement):\n\n _qname = gdata.apps.APPS_TEMPLATE % 'login'\n user_name = 'userNa... |
#!/usr/bin/python
#
# Copyright (C) 2008 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
[
8,
0,
0.0623,
0.0135,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0741,
0.0034,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0842,
0.0034,
0,
0.66,... | [
"\"\"\"Allow Google Apps domain administrators to manage organization unit and organization user.\n\n OrganizationService: Provides methods to manage organization unit and organization user.\n\"\"\"",
"__author__ = 'Alexandre Vivien (alex@simplecode.fr)'",
"import gdata.apps",
"import gdata.apps.service",
... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.0395,
0.0154,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.052,
0.0019,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0578,
0.0019,
0,
0.66,
... | [
"\"\"\"OrganizationUnitProvisioningClient simplifies OrgUnit Provisioning API calls.\n\nOrganizationUnitProvisioningClient extends gdata.client.GDClient to ease\ninteraction with the Google Organization Unit Provisioning API.\nThese interactions include the ability to create, retrieve, update and delete\norganizati... |
#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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 ... | [
[
8,
0,
0.0464,
0.0027,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0546,
0.0027,
0,
0.66,
0.0435,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0628,
0.0027,
0,
0.66,... | [
"\"\"\"Data model classes for the Organization Unit Provisioning API.\"\"\"",
"__author__ = 'Gunjan Sharma <gunjansharma@google.com>'",
"import gdata.apps",
"import gdata.apps.apps_property_entry",
"import gdata.apps_property",
"import gdata.data",
"pyproperty = property",
"ORG_UNIT_NAME = 'name'",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.