text stringlengths 0 1.05M | meta dict |
|---|---|
#$Id$#
from books.model.VendorPayment import VendorPayment
from books.model.VendorPaymentList import VendorPaymentList
from books.model.Bill import Bill
class VendorPaymentsParser:
"""This class is used to parse the json response for Vendor payments."""
def get_list(self, resp):
"""This method parses... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/parser/VendorPaymentsParser.py",
"copies": "1",
"size": "3926",
"license": "mit",
"hash": -3219629195741161000,
"line_mean": 40.3263157895,
"line_max": 78,
"alpha_frac": 0.6304126337,
"autogenerated": false,
"ratio": 4.110994764397906,
... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BankAccountsParser import BankAccountsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'bankaccounts/'
zoho_http_client = ZohoHttpClient()
parser = BankAccountsParser()
class BankAccountsApi:
... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/BankAccountsApi.py",
"copies": "1",
"size": "5353",
"license": "mit",
"hash": 3971424996258980000,
"line_mean": 27.7795698925,
"line_max": 82,
"alpha_frac": 0.5800485709,
"autogenerated": false,
"ratio": 4.228278041074249,
"config_t... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BankRulesParser import BankRulesParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'bankaccounts/rules/'
zoho_http_client = ZohoHttpClient()
parser = BankRulesParser()
class BankRulesApi:
"""This cl... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/BankRulesApi.py",
"copies": "1",
"size": "2877",
"license": "mit",
"hash": -260287352271217660,
"line_mean": 24.2368421053,
"line_max": 78,
"alpha_frac": 0.5509210984,
"autogenerated": false,
"ratio": 3.9902912621359223,
"config_tes... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BankTransactionsParser import BankTransactionsParser
from books.api.Api import Api
from os.path import basename
from json import dumps
base_url = Api().base_url + 'banktransactions/'
zoho_http_client = ZohoHttpClient()
parser = BankTransact... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/BankTransactionsApi.py",
"copies": "1",
"size": "14491",
"license": "mit",
"hash": 6620214207236636000,
"line_mean": 32.6218097448,
"line_max": 80,
"alpha_frac": 0.5771168311,
"autogenerated": false,
"ratio": 4.446455968088371,
"con... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BaseCurrencyAdjustmentParser import BaseCurrencyAdjustmentParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'basecurrencyadjustment/'
zoho_http_client = ZohoHttpClient()
parser = BaseCurrencyAdjustmentP... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/BaseCurrencyAdjustmentApi.py",
"copies": "1",
"size": "3563",
"license": "mit",
"hash": 4171211703789267000,
"line_mean": 29.9826086957,
"line_max": 82,
"alpha_frac": 0.6227897839,
"autogenerated": false,
"ratio": 4.45375,
"config_t... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.BillsParser import BillsParser
from books.api.Api import Api
from os.path import basename
from json import dumps
base_url = Api().base_url + 'bills/'
zoho_http_client = ZohoHttpClient()
parser = BillsParser()
class BillsApi:
"""Bills A... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/BillsApi.py",
"copies": "1",
"size": "11008",
"license": "mit",
"hash": 5572489422318638000,
"line_mean": 28.7513513514,
"line_max": 80,
"alpha_frac": 0.5371547965,
"autogenerated": false,
"ratio": 3.9230220955096224,
"config_test":... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ChartOfAccountsParser import ChartOfAccountsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'chartofaccounts/'
parser = ChartOfAccountsParser()
zoho_http_client = ZohoHttpClient()
class ChartOfAccoun... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/ChartOfAccountsApi.py",
"copies": "1",
"size": "5121",
"license": "mit",
"hash": -3197973844767088600,
"line_mean": 27.2928176796,
"line_max": 87,
"alpha_frac": 0.578012107,
"autogenerated": false,
"ratio": 4.221764220939819,
"confi... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ContactParser import ContactParser
from Api import Api
from json import dumps
base_url = Api().base_url + 'contacts/'
parser = ContactParser()
zoho_http_client = zoho_http_client = ZohoHttpClient()
class ContactPersonsApi:
"""ContactPe... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/ContactPersonsApi.py",
"copies": "1",
"size": "4091",
"license": "mit",
"hash": 2071456816183093200,
"line_mean": 29.5298507463,
"line_max": 75,
"alpha_frac": 0.5996088976,
"autogenerated": false,
"ratio": 4.21318228630278,
"config_... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.CreditNotesParser import CreditNotesParser
from os.path import basename
from json import dumps
from books.api.Api import Api
base_url = Api().base_url + 'creditnotes/'
parser = CreditNotesParser()
zoho_http_client = ZohoHttpClient()
class ... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/CreditNotesApi.py",
"copies": "1",
"size": "21312",
"license": "mit",
"hash": 1381149148898074600,
"line_mean": 32.6151419558,
"line_max": 129,
"alpha_frac": 0.5508633634,
"autogenerated": false,
"ratio": 4.3996696944673825,
"config... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.CustomerPaymentsParser import CustomerPaymentsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'customerpayments/'
parser = CustomerPaymentsParser()
zoho_http_client = ZohoHttpClient()
class CustomerP... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/CustomerPaymentsApi.py",
"copies": "1",
"size": "3390",
"license": "mit",
"hash": 2193655016668766000,
"line_mean": 28.7368421053,
"line_max": 75,
"alpha_frac": 0.5997050147,
"autogenerated": false,
"ratio": 4.340588988476313,
"conf... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ExpensesParser import ExpensesParser
from os.path import basename
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'expenses/'
parser = ExpensesParser()
zoho_http_client = ZohoHttpClient()
class ExpensesApi:... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/ExpensesApi.py",
"copies": "1",
"size": "6395",
"license": "mit",
"hash": 436793063607489660,
"line_mean": 28.4700460829,
"line_max": 80,
"alpha_frac": 0.5390148554,
"autogenerated": false,
"ratio": 4.297715053763441,
"config_test":... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.JournalsParser import JournalsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'journals/'
zoho_http_client = ZohoHttpClient()
parser = JournalsParser()
class JournalsApi:
"""Journals Api class is... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/JournalsApi.py",
"copies": "1",
"size": "2779",
"license": "mit",
"hash": 5298208345516670000,
"line_mean": 24.7314814815,
"line_max": 76,
"alpha_frac": 0.5674703131,
"autogenerated": false,
"ratio": 4.039244186046512,
"config_test"... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ProjectsParser import ProjectsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'projects/'
zoho_http_client = ZohoHttpClient()
parser = ProjectsParser()
class ProjectsApi:
"""This class is used to... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/ProjectsApi.py",
"copies": "1",
"size": "16913",
"license": "mit",
"hash": 1925660577431593500,
"line_mean": 26.7717569787,
"line_max": 78,
"alpha_frac": 0.5443741501,
"autogenerated": false,
"ratio": 4.04520449653193,
"config_test"... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.RecurringExpensesParser import RecurringExpensesParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'recurringexpenses/'
parser = RecurringExpensesParser()
zoho_http_client = ZohoHttpClient()
class Recur... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/RecurringExpensesApi.py",
"copies": "1",
"size": "5752",
"license": "mit",
"hash": -6827977661880919000,
"line_mean": 30.4316939891,
"line_max": 80,
"alpha_frac": 0.6081363004,
"autogenerated": false,
"ratio": 4.079432624113475,
"co... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.RecurringInvoiceParser import RecurringInvoiceParser
from Api import Api
from json import dumps
base_url = Api().base_url + 'recurringinvoices/'
parser = RecurringInvoiceParser()
zoho_http_client = ZohoHttpClient()
class RecurringInvoices... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/RecurringInvoicesApi.py",
"copies": "1",
"size": "5822",
"license": "mit",
"hash": -8886411586533889000,
"line_mean": 31.7078651685,
"line_max": 79,
"alpha_frac": 0.61370663,
"autogenerated": false,
"ratio": 4.274596182085169,
"conf... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'items/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()
class ItemsApi:
"""Items Api class is used to ... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/ItemsApi.py",
"copies": "1",
"size": "3555",
"license": "mit",
"hash": 1078325628554547500,
"line_mean": 24.0352112676,
"line_max": 74,
"alpha_frac": 0.5341772152,
"autogenerated": false,
"ratio": 3.902305159165752,
"config_test": f... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'organizations/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()
class OrganizationsApi:
"""Organizatio... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/OrganizationsApi.py",
"copies": "1",
"size": "2468",
"license": "mit",
"hash": -33816613064295616,
"line_mean": 25.8260869565,
"line_max": 71,
"alpha_frac": 0.5964343598,
"autogenerated": false,
"ratio": 4.314685314685315,
"config_t... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'settings/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()
class SettingsApi:
"""This class is used to... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/SettingsApi.py",
"copies": "1",
"size": "23914",
"license": "mit",
"hash": 5092538827102214000,
"line_mean": 27.8816425121,
"line_max": 78,
"alpha_frac": 0.566028268,
"autogenerated": false,
"ratio": 4.036118143459916,
"config_test"... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.SettingsParser import SettingsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'users/'
zoho_http_client = ZohoHttpClient()
parser = SettingsParser()
class UsersApi:
"""Uses Api class is used to
... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/UsersApi.py",
"copies": "1",
"size": "4629",
"license": "mit",
"hash": 935682246673127000,
"line_mean": 25.6034482759,
"line_max": 77,
"alpha_frac": 0.5493627133,
"autogenerated": false,
"ratio": 3.993960310612597,
"config_test": fa... |
#$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.VendorPaymentsParser import VendorPaymentsParser
from books.api.Api import Api
from json import dumps
base_url = Api().base_url + 'vendorpayments/'
parser = VendorPaymentsParser()
zoho_http_client = ZohoHttpClient()
class VendorPaymentsApi... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/VendorPaymentsApi.py",
"copies": "1",
"size": "3189",
"license": "mit",
"hash": -127832632843351070,
"line_mean": 26.4913793103,
"line_max": 76,
"alpha_frac": 0.5926622766,
"autogenerated": false,
"ratio": 4.093709884467266,
"config... |
# $Id$
from canary.context import Context
from canary.study import *
from canary.user import get_user_by_id
class StatCollector:
def __init__ (self, context):
self.context = context
self.handlers = []
def add_handler(self, handler):
self.handlers.append(handler)
def add_handl... | {
"repo_name": "dchud/sentinel",
"path": "canary/stats.py",
"copies": "1",
"size": "5600",
"license": "mit",
"hash": 5791502559188242000,
"line_mean": 27,
"line_max": 79,
"alpha_frac": 0.5896428571,
"autogenerated": false,
"ratio": 4.031677465802736,
"config_test": false,
"has_no_keywords": fa... |
# $Id$
from cPickle import load, dump
import logging
import os
import shelve
from time import time
import traceback
from mx.DateTime import localtime, mktime
from quixote import get_publisher
from quixote.errors import AccessError
from quixote.form2 import Form
from quixote.publish import SessionPublisher
from quixo... | {
"repo_name": "dchud/sentinel",
"path": "canary/qx_defs.py",
"copies": "1",
"size": "10296",
"license": "mit",
"hash": -6240295501764007000,
"line_mean": 29.1052631579,
"line_max": 85,
"alpha_frac": 0.558954934,
"autogenerated": false,
"ratio": 4.168421052631579,
"config_test": false,
"has_no... |
# $Id$
from cStringIO import StringIO
import traceback
import urllib
from elementtree import ElementTree as etree
from elementtree.ElementTree import Element, SubElement
import canary
from canary import dtuple
from canary.utils import DTable
def find_resolver (context, ip_address='127.0.0.1'):
"""For a given w... | {
"repo_name": "dchud/sentinel",
"path": "canary/resolver.py",
"copies": "1",
"size": "6664",
"license": "mit",
"hash": -5701826900031695000,
"line_mean": 36.8636363636,
"line_max": 97,
"alpha_frac": 0.5333133253,
"autogenerated": false,
"ratio": 4.036341611144761,
"config_test": false,
"has_n... |
# $Id$
from dpkt import Packet
# header_type
QQ_HEADER_BASIC_FAMILY = 0x02
QQ_HEADER_P2P_FAMILY = 0x00
QQ_HEADER_03_FAMILY = 0x03
QQ_HEADER_04_FAMILY = 0x04
QQ_HEADER_05_FAMILY = 0x05
header_type_str = [
"QQ_HEADER_P2P_FAMILY",
"Unknown Type",
"QQ_HEADER_03_FAMILY",
"QQ_HEADER_04_FAMILY",
"QQ_HEA... | {
"repo_name": "FunctionAnalysis/dpkt",
"path": "dpkt/qq.py",
"copies": "17",
"size": "6773",
"license": "bsd-3-clause",
"hash": 3831721841113930000,
"line_mean": 29.2366071429,
"line_max": 51,
"alpha_frac": 0.6531817511,
"autogenerated": false,
"ratio": 2.278170198452741,
"config_test": false,
... |
from __future__ import with_statement
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de'
import random
import pickle
from itertools import chain
from scipy import zeros, resize, ravel, asarray
from pybrain.utilities import Serializable
class OutOfSyncError(Exception): pass
class VectorFormatError(Exception): ... | {
"repo_name": "daanwierstra/pybrain",
"path": "pybrain/datasets/dataset.py",
"copies": "1",
"size": "13134",
"license": "bsd-3-clause",
"hash": -3280491516552942600,
"line_mean": 35.4861111111,
"line_max": 122,
"alpha_frac": 0.5615958581,
"autogenerated": false,
"ratio": 4.283757338551859,
"con... |
# $Id$
from mod_python import apache
import cgi, fakefile
class Error(Exception):
pass
class InputStream(fakefile.FakeInput):
def __init__(self, modpy_req):
fakefile.FakeInput.__init__(self)
self._modpy_req = modpy_req
def _read(self, size=-1):
return self._modpy_req.read(size)
class Request(c... | {
"repo_name": "jribbens/jonpy",
"path": "jon/modpy.py",
"copies": "1",
"size": "3277",
"license": "mit",
"hash": -2300838051737321500,
"line_mean": 25.8606557377,
"line_max": 80,
"alpha_frac": 0.6280134269,
"autogenerated": false,
"ratio": 3.2381422924901186,
"config_test": false,
"has_no_key... |
# $Id$
from module_base import ModuleBase
from module_mixins import FilenameViewModuleMixin
import module_utils
import vtk
class vtpRDR(FilenameViewModuleMixin, ModuleBase):
def __init__(self, module_manager):
# call parent constructor
ModuleBase.__init__(self, module_manager)
self._read... | {
"repo_name": "nagyistoce/devide",
"path": "modules/readers/vtpRDR.py",
"copies": "7",
"size": "1863",
"license": "bsd-3-clause",
"hash": -8256594372240891000,
"line_mean": 26,
"line_max": 60,
"alpha_frac": 0.6049382716,
"autogenerated": false,
"ratio": 4.205417607223477,
"config_test": true,
... |
# $Id$
from module_base import ModuleBase
from module_mixins import FilenameViewModuleMixin
import module_utils
import vtk
class plyRDR(FilenameViewModuleMixin, ModuleBase):
def __init__(self, module_manager):
# call parent constructor
ModuleBase.__init__(self, module_manager)
self._re... | {
"repo_name": "nagyistoce/devide",
"path": "modules/readers/plyRDR.py",
"copies": "7",
"size": "1907",
"license": "bsd-3-clause",
"hash": 1727189728149308400,
"line_mean": 25.8732394366,
"line_max": 75,
"alpha_frac": 0.6030414263,
"autogenerated": false,
"ratio": 4.209713024282561,
"config_test... |
# $Id$
from module_base import ModuleBase
from module_mixins import FilenameViewModuleMixin
import module_utils
import vtk
class vtiWRT(FilenameViewModuleMixin, ModuleBase):
def __init__(self, module_manager):
# call parent constructor
ModuleBase.__init__(self, module_manager)
self._wri... | {
"repo_name": "fvpolpeta/devide",
"path": "modules/writers/vtiWRT.py",
"copies": "7",
"size": "2401",
"license": "bsd-3-clause",
"hash": 1532717639169082400,
"line_mean": 27.9277108434,
"line_max": 76,
"alpha_frac": 0.6159933361,
"autogenerated": false,
"ratio": 4.111301369863014,
"config_test"... |
# $Id$
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
import module_utils
import vtk
import wx # needs this for wx.OPEN, we need to make this constant available
# elsewhere
class pngWRT(ScriptedConfigModuleMixin, ModuleBase):
def __init__(self, module_manager):
... | {
"repo_name": "chrisidefix/devide",
"path": "modules/writers/pngWRT.py",
"copies": "7",
"size": "3025",
"license": "bsd-3-clause",
"hash": 1704198060779807000,
"line_mean": 28.9504950495,
"line_max": 78,
"alpha_frac": 0.5980165289,
"autogenerated": false,
"ratio": 4.054959785522788,
"config_tes... |
# $Id$
from Module import *
from Hpin import *
from Instance import *
from settings import *
class Hinstance:
def __init__(self, instance, name, mycanvas):
self.instance = instance
# Hierarhcy name
self.name = name
self.mycanvas = mycanvas
self.name_id ... | {
"repo_name": "tyamamot5/Verilog-netlist-viewer",
"path": "Hinstance.py",
"copies": "1",
"size": "2664",
"license": "apache-2.0",
"hash": 9087419153623468000,
"line_mean": 28.6,
"line_max": 85,
"alpha_frac": 0.5825825826,
"autogenerated": false,
"ratio": 3.4823529411764707,
"config_test": false... |
# $Id$
from Module import *
from Pin import *
class Hpin:
def __init__(self, pin):
# Class Pin
self.pin = pin
# An id of the pin rectangle on canvas
self.id = None
# List of net ids connected with the pin on canvas
self.nets = []
def get_id(self):... | {
"repo_name": "tyamamot5/Verilog-netlist-viewer",
"path": "Hpin.py",
"copies": "1",
"size": "1083",
"license": "apache-2.0",
"hash": -7311546504111538000,
"line_mean": 24.7857142857,
"line_max": 73,
"alpha_frac": 0.5244690674,
"autogenerated": false,
"ratio": 3.301829268292683,
"config_test": f... |
#$Id$#
from os.path import basename
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.EstimatesParser import EstimatesParser
from Api import Api
from json import dumps
base_url = Api().base_url + 'estimates/'
parser = EstimatesParser()
zoho_http_client = ZohoHttpClient()
class EstimatesApi:
... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/EstimatesApi.py",
"copies": "1",
"size": "15759",
"license": "mit",
"hash": 8430975704426706000,
"line_mean": 30.7721774194,
"line_max": 80,
"alpha_frac": 0.5554920998,
"autogenerated": false,
"ratio": 4.362956810631229,
"config_tes... |
#$Id$#
from os.path import basename
from json import dumps
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.ContactParser import ContactParser
from Api import Api
base_url = Api().base_url + 'contacts/'
parser = ContactParser()
zoho_http_client = ZohoHttpClient()
class ContactsApi:
"""Conta... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/ContactsApi.py",
"copies": "1",
"size": "14086",
"license": "mit",
"hash": -2803078406857362000,
"line_mean": 30.7252252252,
"line_max": 80,
"alpha_frac": 0.5518954991,
"autogenerated": false,
"ratio": 4.41983056165673,
"config_test... |
#$Id$#
from os.path import basename
from json import dumps
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.InvoicesParser import InvoicesParser
from Api import Api
base_url = Api().base_url + 'invoices/'
parser = InvoicesParser()
zoho_http_client = ZohoHttpClient()
class InvoicesApi:
"""In... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/api/InvoicesApi.py",
"copies": "1",
"size": "32575",
"license": "mit",
"hash": -6836507186813786000,
"line_mean": 33.0386624869,
"line_max": 83,
"alpha_frac": 0.5449884881,
"autogenerated": false,
"ratio": 4.480126530050887,
"config_tes... |
#$Id$
from projects.api.PortalsApi import PortalsApi
from projects.api.ProjectsApi import ProjectsApi
from projects.api.DashboardApi import DashboardApi
from projects.api.MilestonesApi import MilestonesApi
from projects.api.TaskListApi import TaskListApi
from projects.api.TasksApi import TasksApi
from projects.api.Tim... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/service/ZohoProjects.py",
"copies": "1",
"size": "4420",
"license": "mit",
"hash": -6596545171650901000,
"line_mean": 24.549132948,
"line_max": 107,
"alpha_frac": 0.6158371041,
"autogenerated": false,
"ratio": 4.138576779026217,
"... |
#$Id$
from projects.model.Activity import Activity
from projects.model.Status import Status
class DashboardParser:
"""This class is used to create object for Dashboard parser."""
def get_activities(self, resp):
"""This method parses the given response and returns list of activities.
Args:
... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/DashboardParser.py",
"copies": "1",
"size": "3287",
"license": "mit",
"hash": -483807985206549250,
"line_mean": 28.8818181818,
"line_max": 83,
"alpha_frac": 0.5701247338,
"autogenerated": false,
"ratio": 4.459972862957938,
... |
#$Id$
from projects.model.Bug import Bug
from projects.model.Project import Project
from projects.model.Defaultfield import Defaultfield
from projects.model.Customfield import Customfield
class BugsParser:
"""This class is used to parse the json response for Bugs."""
def to_json(self, bug):
"""Th... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/BugsParser.py",
"copies": "1",
"size": "9374",
"license": "mit",
"hash": -7938851856737323000,
"line_mean": 28.29375,
"line_max": 86,
"alpha_frac": 0.5456582035,
"autogenerated": false,
"ratio": 3.8386568386568385,
"config_... |
#$Id$
from projects.model.Category import Category
class CategoryParser:
"""This class is used to parse the json object for category."""
def get_categories(self, resp):
"""This method parses the json for categories list.
Args:
resp(dict):Response containing json for categorie... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/CategoryParser.py",
"copies": "1",
"size": "1464",
"license": "mit",
"hash": 6974675219726831000,
"line_mean": 25.6181818182,
"line_max": 77,
"alpha_frac": 0.5710382514,
"autogenerated": false,
"ratio": 4.979591836734694,
"... |
#$Id$
from projects.model.Document import Document
from projects.model.Folder import Folder
from projects.model.Version import Version
class DocumentsParser:
"""This class parses the given response for documents."""
def get_documents(self, resp):
"""This method parses the given response for docume... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/DocumentsParser.py",
"copies": "1",
"size": "3618",
"license": "mit",
"hash": 4350892766672226300,
"line_mean": 33.7884615385,
"line_max": 88,
"alpha_frac": 0.54671089,
"autogenerated": false,
"ratio": 4.59720457433291,
"co... |
#$Id$
from projects.model.Event import Event
from projects.model.Participant import Participant
class EventsParser:
"""This class is used to parse the json response for events."""
def get_events(self, resp):
"""This method parses the given repsonse for list of events.
Args:
resp... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/EventsParser.py",
"copies": "1",
"size": "4477",
"license": "mit",
"hash": -4398786016526815700,
"line_mean": 34.2519685039,
"line_max": 86,
"alpha_frac": 0.54456109,
"autogenerated": false,
"ratio": 4.2760267430754535,
"co... |
#$Id$
from projects.model.Folder import Folder
class Document:
"""This class is used to create object for Document."""
def __init__(self):
"""Initialize parameters for Document object."""
self.id = 0
self.file_name = ""
self.content_type = ""
self.versions = []
... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/model/Document.py",
"copies": "1",
"size": "3567",
"license": "mit",
"hash": 676752534570063100,
"line_mean": 16.835,
"line_max": 59,
"alpha_frac": 0.4763106252,
"autogenerated": false,
"ratio": 4.41460396039604,
"config_test": fa... |
#$Id$
from projects.model.Folder import Folder
class FoldersParser:
"""This class is used to parse the json response for Folders."""
def get_folders(self, resp):
"""This method parses the given response and returns list of folders object.
Args:
resp(dict): Dictionary containin js... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/FoldersParser.py",
"copies": "1",
"size": "2003",
"license": "mit",
"hash": -8791936608599114000,
"line_mean": 26.8194444444,
"line_max": 86,
"alpha_frac": 0.5531702446,
"autogenerated": false,
"ratio": 4.604597701149426,
"... |
#$Id$
from projects.model.Forum import Forum
from projects.model.Comment import Comment
class ForumsParser:
"""This class is used to parse the givenr response for forums parser."""
def get_forums(self, resp):
"""This method parses the given repsonse and returns list of forums object.
Args:
... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/ForumsParser.py",
"copies": "1",
"size": "4532",
"license": "mit",
"hash": 1613826693296957200,
"line_mean": 29.6216216216,
"line_max": 86,
"alpha_frac": 0.5545013239,
"autogenerated": false,
"ratio": 4.219739292364991,
"co... |
#$Id$
from projects.model.Milestone import Milestone
class MilestonesParser:
"""This class is used to parse the json response for milestones."""
def get_milestones(self, resp):
"""This method parses the given response and returns list of milestone object.
Args:
resp(dict): Di... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/MilestonesParser.py",
"copies": "1",
"size": "3720",
"license": "mit",
"hash": 1687541552571029200,
"line_mean": 32.8181818182,
"line_max": 86,
"alpha_frac": 0.5553763441,
"autogenerated": false,
"ratio": 4.047878128400435,
... |
#$Id$
from projects.model.Milestone import Milestone
class TaskList:
"""This class is used to create object for TasksList."""
def __init__(self):
"""Initialize parameters for Taskslist."""
self.id = ""
self.id_string = ""
self.name = ""
self.milestone = Milestone(... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/model/TaskList.py",
"copies": "1",
"size": "4340",
"license": "mit",
"hash": -7868159375934776000,
"line_mean": 16.7142857143,
"line_max": 60,
"alpha_frac": 0.4737327189,
"autogenerated": false,
"ratio": 4.177093358999038,
"config... |
#$ID$
from projects.model.Project import Project
class Bug:
"""This class is used to create object for bug."""
def __init__(self):
"""Initialize parameters for Bug object."""
self.id = 0
self.key = ""
self.project = Project()
self.flag = ""
self.title = ""
... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/model/Bug.py",
"copies": "1",
"size": "10484",
"license": "mit",
"hash": -6161747157567498000,
"line_mean": 18.2720588235,
"line_max": 60,
"alpha_frac": 0.5040061045,
"autogenerated": false,
"ratio": 4.1422362702489135,
"config_te... |
#$Id$
from projects.model.Project import Project
class ProjectsParser:
"""This class is used to parse the json response for projects."""
def get_projects(self, resp):
"""This method parses the given response and returns list of projects.
Args:
resp(dict): Dictionary containing js... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/ProjectsParser.py",
"copies": "1",
"size": "5135",
"license": "mit",
"hash": -2856149939606493000,
"line_mean": 35.161971831,
"line_max": 86,
"alpha_frac": 0.5252190847,
"autogenerated": false,
"ratio": 4.34065934065934,
"c... |
#$Id$
from projects.model.Task import Task
from projects.model.Owner import Owner
from projects.model.TaskList import TaskList
from projects.model.Comment import Comment
class TasksParser:
"""This class is used to parse the json response for Tasks."""
def get_tasks(self, resp):
"""This method par... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/TasksParser.py",
"copies": "1",
"size": "7029",
"license": "mit",
"hash": -13638833921067692,
"line_mean": 28.1659751037,
"line_max": 89,
"alpha_frac": 0.5235453123,
"autogenerated": false,
"ratio": 3.9801812004530013,
"con... |
#$Id$
from projects.model.TaskList import TaskList
from projects.model.Milestone import Milestone
class TaskListParser:
"""This class parses the json response for Tasklists."""
def get_tasklists(self, resp):
"""This method parses the given response and returns list of task list object.
Ar... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/TaskListParser.py",
"copies": "1",
"size": "4769",
"license": "mit",
"hash": 4896295610100063000,
"line_mean": 35.9689922481,
"line_max": 86,
"alpha_frac": 0.5414132942,
"autogenerated": false,
"ratio": 4.143353605560383,
"... |
#$Id$
from projects.model.TaskList import TaskList
class Task:
"""This class is used to create object for task."""
def __init__(self):
"""Initialize parameters for tasks object."""
self.id = ""
self.id_string = ""
self.name = ""
self.completed = ""
self.crea... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/model/Task.py",
"copies": "1",
"size": "7932",
"license": "mit",
"hash": -95959538744144750,
"line_mean": 17.5761124122,
"line_max": 69,
"alpha_frac": 0.4895360565,
"autogenerated": false,
"ratio": 4.118380062305296,
"config_test"... |
#$Id$
from projects.model.Tasklog import Tasklog
from projects.model.Timelog import Timelog
from projects.model.Date import Date
from projects.model.Buglog import Buglog
from projects.model.Generallog import Generallog
class TimesheetsParser:
"""This class parses the json response for Time sheets."""
def get_... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/parser/TimesheetsParser.py",
"copies": "1",
"size": "9294",
"license": "mit",
"hash": -1816609797878351000,
"line_mean": 34.4732824427,
"line_max": 86,
"alpha_frac": 0.5420701528,
"autogenerated": false,
"ratio": 4.025119099177133,
... |
#$Id$
from projects.service.ZohoProjects import ZohoProjects
from projects.model.Event import Event
from projects.model.Participant import Participant
from projects.exception.ProjectsException import ProjectsException
authtoken = '{auth_token}'
zoho_portals = ZohoProjects(authtoken)
try:
portal_id = zoho_portal... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "test/EventsTest.py",
"copies": "1",
"size": "1932",
"license": "mit",
"hash": 4294765870046923000,
"line_mean": 25.1081081081,
"line_max": 81,
"alpha_frac": 0.6630434783,
"autogenerated": false,
"ratio": 3.2635135135135136,
"config_test": ... |
#$Id$
from projects.service.ZohoProjects import ZohoProjects
from projects.model.Milestone import Milestone
from projects.exception.ProjectsException import ProjectsException
authtoken = '{auth_token}'
zoho_portals = ZohoProjects(authtoken)
try:
portal_id = zoho_portals.get_portals_api().get_portals()[0].get_id... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "test/MilestoneTest.py",
"copies": "1",
"size": "1798",
"license": "mit",
"hash": -2309764436953712600,
"line_mean": 27.5396825397,
"line_max": 81,
"alpha_frac": 0.6996662959,
"autogenerated": false,
"ratio": 3.1710758377425043,
"config_tes... |
#$Id$
from projects.service.ZohoProjects import ZohoProjects
from projects.model.Status import Status
from projects.exception.ProjectsException import ProjectsException
authtoken = '{auth_token}'
zoho_portals = ZohoProjects(authtoken)
try:
portal_id = zoho_portals.get_portals_api().get_portals()[0].get_id()... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "test/DashboardTest.py",
"copies": "1",
"size": "1113",
"license": "mit",
"hash": 7812049854448345000,
"line_mean": 27.5384615385,
"line_max": 81,
"alpha_frac": 0.6900269542,
"autogenerated": false,
"ratio": 3.435185185185185,
"config_test"... |
#$Id$
from projects.service.ZohoProjects import ZohoProjects
from projects.model.Task import Task
from projects.model.Owner import Owner
from projects.exception.ProjectsException import ProjectsException
authtoken = '{auth_token}'
zoho_portals = ZohoProjects(authtoken)
try:
portal_id = zoho_portals.get_portals... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "test/TasksTest.py",
"copies": "1",
"size": "2430",
"license": "mit",
"hash": 9047379263948943000,
"line_mean": 25.1290322581,
"line_max": 81,
"alpha_frac": 0.6588477366,
"autogenerated": false,
"ratio": 3.0994897959183674,
"config_test": f... |
#$Id$
from projects.service.ZohoProjects import ZohoProjects
from projects.model.Tasklog import Tasklog
from projects.model.Buglog import Buglog
from projects.model.Generallog import Generallog
from projects.exception.ProjectsException import ProjectsException
authtoken = '{auth_token}'
zoho_portals = ZohoProjects(au... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "test/TimesheetsTest.py",
"copies": "1",
"size": "4202",
"license": "mit",
"hash": -278451715487801900,
"line_mean": 27.3918918919,
"line_max": 113,
"alpha_frac": 0.6361256545,
"autogenerated": false,
"ratio": 3.005722460658083,
"config_tes... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.BugsParser import BugsParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = BugsParser()
class BugsApi:
"""Bugs Api class is used to
1.Get all bugs in given project.
... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/BugsApi.py",
"copies": "1",
"size": "4269",
"license": "mit",
"hash": 6696853024219391000,
"line_mean": 28.8531468531,
"line_max": 126,
"alpha_frac": 0.5654720075,
"autogenerated": false,
"ratio": 3.6738382099827884,
"config_t... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.CategoryParser import CategoryParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = CategoryParser()
class CategoryApi:
"""Category api class is used to
1.Get all the... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/CategoryApi.py",
"copies": "1",
"size": "1612",
"license": "mit",
"hash": 2605993121431860700,
"line_mean": 27.7857142857,
"line_max": 107,
"alpha_frac": 0.5986352357,
"autogenerated": false,
"ratio": 3.8564593301435406,
"conf... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.DashboardParser import DashboardParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = DashboardParser()
class DashboardApi:
"""Dashboard Api class is used to
1. List ... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/DashboardApi.py",
"copies": "1",
"size": "2396",
"license": "mit",
"hash": 5551330516750602000,
"line_mean": 30.1168831169,
"line_max": 106,
"alpha_frac": 0.5984974958,
"autogenerated": false,
"ratio": 3.9472817133443163,
"con... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.DocumentsParser import DocumentsParser
from os.path import basename
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = DocumentsParser()
class DocumentsApi:
"""Documents api cla... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/DocumentsApi.py",
"copies": "1",
"size": "4748",
"license": "mit",
"hash": 7770220785722540000,
"line_mean": 32.4366197183,
"line_max": 137,
"alpha_frac": 0.5385425442,
"autogenerated": false,
"ratio": 4.239285714285714,
"conf... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.EventsParser import EventsParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = EventsParser()
class EventsApi:
"""Events Api class is used to
1.Get all the events in ... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/EventsApi.py",
"copies": "1",
"size": "2828",
"license": "mit",
"hash": -8870038037070942000,
"line_mean": 29.4086021505,
"line_max": 131,
"alpha_frac": 0.5774398868,
"autogenerated": false,
"ratio": 3.7959731543624162,
"confi... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.FoldersParser import FoldersParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = FoldersParser()
class FoldersApi:
"""Folders Api class is used to
1.Get all the folde... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/FoldersApi.py",
"copies": "1",
"size": "2737",
"license": "mit",
"hash": -5804473790714655000,
"line_mean": 28.4301075269,
"line_max": 132,
"alpha_frac": 0.5791012057,
"autogenerated": false,
"ratio": 3.7803867403314917,
"conf... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.ForumsParser import ForumsParser
from os.path import basename
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = ForumsParser()
class ForumsApi:
"""Forums Api class is used to
... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/ForumsApi.py",
"copies": "1",
"size": "5033",
"license": "mit",
"hash": -5254343311106340000,
"line_mean": 31.6818181818,
"line_max": 134,
"alpha_frac": 0.5320882178,
"autogenerated": false,
"ratio": 3.9505494505494507,
"confi... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.MilestonesParser import MilestonesParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = MilestonesParser()
class MilestonesApi:
"""MilestonesApi class is used to
1.Ge... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/MilestonesApi.py",
"copies": "1",
"size": "4098",
"license": "mit",
"hash": 8836999108228384000,
"line_mean": 30.7674418605,
"line_max": 139,
"alpha_frac": 0.5846754514,
"autogenerated": false,
"ratio": 3.770009199632015,
"con... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.ProjectsParser import ProjectsParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = ProjectsParser()
class ProjectsApi:
"""Projects Api class is used to
1.Get all proje... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/ProjectsApi.py",
"copies": "1",
"size": "3042",
"license": "mit",
"hash": 2391388076502064600,
"line_mean": 27.4299065421,
"line_max": 95,
"alpha_frac": 0.5798816568,
"autogenerated": false,
"ratio": 3.9353169469598965,
"confi... |
#$ID$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.TaskListParser import TaskListParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = TaskListParser()
class TaskListApi:
"""TasksList Api class is used to
1. Get all the... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/TaskListApi.py",
"copies": "1",
"size": "2912",
"license": "mit",
"hash": -617137824789093200,
"line_mean": 29.9787234043,
"line_max": 136,
"alpha_frac": 0.5824175824,
"autogenerated": false,
"ratio": 3.772020725388601,
"confi... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.TasksParser import TasksParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = TasksParser()
class TasksApi:
"""TasksApi class is used to
1.Get all tasks in the given p... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/TasksApi.py",
"copies": "1",
"size": "6525",
"license": "mit",
"hash": 4048119786277313500,
"line_mean": 28.7945205479,
"line_max": 136,
"alpha_frac": 0.5785440613,
"autogenerated": false,
"ratio": 3.5812294182217346,
"config_... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.TimesheetsParser import TimesheetsParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = TimesheetsParser()
class TimesheetsApi:
"""Timesheets api is used to
1.Get all ... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/TimesheetsApi.py",
"copies": "1",
"size": "6733",
"license": "mit",
"hash": -2671298150471519000,
"line_mean": 32.8341708543,
"line_max": 171,
"alpha_frac": 0.5694341304,
"autogenerated": false,
"ratio": 3.594767752269087,
"co... |
#$Id$
from projects.util.ZohoHttpClient import ZohoHttpClient
from projects.api.Api import Api
from projects.parser.UsersParser import UsersParser
base_url = Api().base_url
zoho_http_client = ZohoHttpClient()
parser = UsersParser()
class UsersApi:
"""Users Api class is used to
1.Get all the users in th... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/api/UsersApi.py",
"copies": "1",
"size": "1126",
"license": "mit",
"hash": -4447471433279565300,
"line_mean": 25.1860465116,
"line_max": 101,
"alpha_frac": 0.5985790409,
"autogenerated": false,
"ratio": 3.778523489932886,
"config_... |
# $Id:$
from pyglet.media import Source, AudioFormat, AudioData
import ctypes
import os
import math
class ProceduralSource(Source):
def __init__(self, duration, sample_rate=44800, sample_size=16):
self._duration = float(duration)
self.audio_format = AudioFormat(
channels=1,
... | {
"repo_name": "KevinGoodsell/sympy",
"path": "sympy/thirdparty/pyglet/pyglet/media/procedural.py",
"copies": "4",
"size": "4750",
"license": "bsd-3-clause",
"hash": 3018739532857419000,
"line_mean": 31.0945945946,
"line_max": 79,
"alpha_frac": 0.5273684211,
"autogenerated": false,
"ratio": 4.1813... |
# $Id$
#
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors as rdMD
from rdkit import DataStructs
from rdkit import RDConfig
import unittest
def feq(v1, v2, tol=1.e-4) :
return abs(v1-v2) < tol
class TestCase(unittest.TestCase) :
def setUp(self):
pass
def testAtomPairTypes(self):
params = r... | {
"repo_name": "rdkit/rdkit-orig",
"path": "Code/GraphMol/Descriptors/Wrap/testMolDescriptors.py",
"copies": "1",
"size": "12931",
"license": "bsd-3-clause",
"hash": -4842987770882704000,
"line_mean": 39.1583850932,
"line_max": 226,
"alpha_frac": 0.7157219086,
"autogenerated": false,
"ratio": 2.80... |
# $Id$
from unittest import TestCase
from canary.context import Context
from canary.resolver import find_resolver, Resolver
class ResolverTests (TestCase):
context = Context()
OCLC_GATEWAY_URL = 'http://worldcatlibraries.org/registry/gateway'
def test_default (self):
r = find_resol... | {
"repo_name": "dchud/sentinel",
"path": "test/resolver.py",
"copies": "1",
"size": "1204",
"license": "mit",
"hash": -1088029680344466800,
"line_mean": 32.4444444444,
"line_max": 81,
"alpha_frac": 0.6470099668,
"autogenerated": false,
"ratio": 3.236559139784946,
"config_test": true,
"has_no_k... |
# $Id$
from unittest import TestCase
from canary.context import Context
from canary.stats import *
from canary.search import RecordSearcher
class StatsTests (TestCase):
context = Context()
def setUp (self):
# each test gets a new collector
self.collector = StatCollector(self.context)
... | {
"repo_name": "dchud/sentinel",
"path": "test/stats.py",
"copies": "1",
"size": "3210",
"license": "mit",
"hash": -5261885974166921000,
"line_mean": 34.6666666667,
"line_max": 62,
"alpha_frac": 0.6657320872,
"autogenerated": false,
"ratio": 4.0125,
"config_test": true,
"has_no_keywords": fals... |
#$Id$#
from urllib import urlencode,urlretrieve
from httplib2 import Http
from json import dumps,loads
from re import search
from mimetypes import guess_type
from string import digits,ascii_letters
from random import choice
from books.exception.BooksException import BooksException
_BOUNDARY_CHARS = digits + ascii_let... | {
"repo_name": "zoho/books-python-wrappers",
"path": "books/util/ZohoHttpClient.py",
"copies": "1",
"size": "9878",
"license": "mit",
"hash": 7889225427765470000,
"line_mean": 34.153024911,
"line_max": 81,
"alpha_frac": 0.5649929135,
"autogenerated": false,
"ratio": 4.498178506375227,
"config_te... |
#$Id$
from urllib import urlencode,urlretrieve
from httplib2 import Http
from json import dumps,loads
from re import search
from mimetypes import guess_type
from string import digits,ascii_letters
from random import choice
from projects.exception.ProjectsException import ProjectsException
_BOUNDARY_CHARS = digits + a... | {
"repo_name": "zoho/projects-python-wrappers",
"path": "projects/util/ZohoHttpClient.py",
"copies": "1",
"size": "10159",
"license": "mit",
"hash": 4843706148375089000,
"line_mean": 33.910652921,
"line_max": 81,
"alpha_frac": 0.5638350231,
"autogenerated": false,
"ratio": 4.519128113879003,
"co... |
# $Id$
"""Generic Routing Encapsulation."""
import struct
import dpkt
GRE_CP = 0x8000 # Checksum Present
GRE_RP = 0x4000 # Routing Present
GRE_KP = 0x2000 # Key Present
GRE_SP = 0x1000 # Sequence Present
GRE_SS = 0x0800 # Strict Source Route
GRE_AP = 0x0080 # Acknowledgment Present
GRE_opt_fields = (
(GRE... | {
"repo_name": "tthtlc/dpkt",
"path": "dpkt/gre.py",
"copies": "17",
"size": "3225",
"license": "bsd-3-clause",
"hash": 1681907018322016500,
"line_mean": 30.3106796117,
"line_max": 72,
"alpha_frac": 0.4998449612,
"autogenerated": false,
"ratio": 3.208955223880597,
"config_test": false,
"has_no... |
# $Id$
import array
# CRC-32C Checksum
# http://tools.ietf.org/html/rfc3309
crc32c_table = (
0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, 0xC79A971FL,
0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, 0x8AD958CFL, 0x78B2DBCCL,
0x6BE22838L, 0x9989AB3BL, 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L,
0x5E133C24L, ... | {
"repo_name": "lzp819739483/dpkt",
"path": "dpkt/crc32c.py",
"copies": "17",
"size": "4094",
"license": "bsd-3-clause",
"hash": 6837719413612497000,
"line_mean": 50.175,
"line_max": 68,
"alpha_frac": 0.7603810454,
"autogenerated": false,
"ratio": 1.695940347970174,
"config_test": false,
"has_... |
# $Id$
import canary.context
from canary.loader import QueuedRecord
def records_by_heading (context, term):
results = []
# GROUP BY reference_id because some terms repeat w/diff qualifiers
cursor = context.get_cursor()
cursor.execute("""
SELECT reference_id
FROM reference_mesh
... | {
"repo_name": "dchud/sentinel",
"path": "canary/browse.py",
"copies": "1",
"size": "11203",
"license": "mit",
"hash": -1068167146241494900,
"line_mean": 31.95,
"line_max": 102,
"alpha_frac": 0.5884138177,
"autogenerated": false,
"ratio": 3.848505668155273,
"config_test": false,
"has_no_keywor... |
# $Id$
import cgi, fakefile
# classes involving calling jonpy-style handlers from WSGI server connectors
class Request(cgi.Request):
def _init(self, environ, start_response):
self.environ = environ
self.stdin = environ["wsgi.input"]
self._wsgi_start_response = start_response
self._wsgi_write = Non... | {
"repo_name": "jribbens/jonpy",
"path": "jon/wsgi.py",
"copies": "1",
"size": "3111",
"license": "mit",
"hash": 104432721281414980,
"line_mean": 26.5309734513,
"line_max": 80,
"alpha_frac": 0.6467373835,
"autogenerated": false,
"ratio": 3.664310954063604,
"config_test": false,
"has_no_keyword... |
# $Id$
import copy
import email
import logging
import re
import time
import traceback
import types
import dtuple
from canary.context import Cacheable
import canary.search
from canary.source_catalog import Source, Term, SourceCatalog
from canary.study import Study
from canary.utils import DTable
class Queue:
d... | {
"repo_name": "dchud/sentinel",
"path": "canary/loader.py",
"copies": "1",
"size": "25156",
"license": "mit",
"hash": -8046762084937634000,
"line_mean": 36.2130177515,
"line_max": 108,
"alpha_frac": 0.5065193194,
"autogenerated": false,
"ratio": 4.44138418079096,
"config_test": false,
"has_no... |
# $Id$
import copy
import logging
import time
import traceback
import types
from quixote import form2
from quixote.html import htmltext
import canary.context
from canary.gazeteer import Feature
from canary.qx_defs import MyForm
from canary.utils import DTable, render_capitalized
import dtuple
class ExposureRoute ... | {
"repo_name": "dchud/sentinel",
"path": "canary/study.py",
"copies": "1",
"size": "63030",
"license": "mit",
"hash": -2656050997565630,
"line_mean": 34.3307174888,
"line_max": 100,
"alpha_frac": 0.5066476281,
"autogenerated": false,
"ratio": 4.104584527220631,
"config_test": false,
"has_no_ke... |
# $Id$
import dtuple
import re
class SubjectHeading:
def __repr__ (self):
return """<SubjectHeading term=%s, is_focus=%s, qualifier=%s>""" % (self.term,
self.is_focus, self.qualifier)
def __init__ (self, text=''):
if not text == '':
self.parse_text(text)
else... | {
"repo_name": "dchud/sentinel",
"path": "canary/record.py",
"copies": "1",
"size": "4694",
"license": "mit",
"hash": -4549324444631187500,
"line_mean": 27.975308642,
"line_max": 86,
"alpha_frac": 0.4629314018,
"autogenerated": false,
"ratio": 4.411654135338346,
"config_test": false,
"has_no_k... |
# $Id$
import dtuple
from canary.utils import DTable
class Feature (DTable):
def __init__ (self, context=None, uid=-1):
self.uid = uid
self.data_source = ''
self.latitude = 0.0
self.longitude = 0.0
self.dms_latitude = 0
self.dms_longitude = 0
self.featur... | {
"repo_name": "dchud/sentinel",
"path": "canary/gazeteer.py",
"copies": "1",
"size": "5159",
"license": "mit",
"hash": 6602684059664104000,
"line_mean": 34.5793103448,
"line_max": 94,
"alpha_frac": 0.5018414421,
"autogenerated": false,
"ratio": 4.097696584590945,
"config_test": false,
"has_no... |
# $Id$
# importing this module shouldn't directly cause other large imports
# do large imports in the init() hook so that you can call back to the
# ModuleManager progress handler methods.
"""vtk_kit package driver file.
This performs all initialisation necessary to use VTK from DeVIDE. Makes
sure that all VTK clas... | {
"repo_name": "fvpolpeta/devide",
"path": "module_kits/vtk_kit/__init__.py",
"copies": "6",
"size": "3965",
"license": "bsd-3-clause",
"hash": -2397312117573458400,
"line_mean": 30.2204724409,
"line_max": 79,
"alpha_frac": 0.6393442623,
"autogenerated": false,
"ratio": 3.7300094073377235,
"conf... |
# $Id$
import logging
import random
import sha
import canary
from canary import dtuple
from canary.utils import DTable
logger = logging.getLogger('canary.user')
# Copied from dulcinea.user
def hash_password (password):
"""Apply a one way hash function to a password and return the result."""
return sha.new(... | {
"repo_name": "dchud/sentinel",
"path": "canary/user.py",
"copies": "1",
"size": "16437",
"license": "mit",
"hash": 6351847147434473000,
"line_mean": 31.874,
"line_max": 104,
"alpha_frac": 0.4933990388,
"autogenerated": false,
"ratio": 4.12678885262365,
"config_test": false,
"has_no_keywords"... |
# $Id$
import logging
import traceback
import types
import canary.context
from canary.utils import DTable
import dtuple
class Concept (canary.context.Cacheable, DTable):
# FIXME: Resolve conflict between Exp/Out/Spec as "concepts" and this
# 'Concept'; namely that Concept.uid == Exp/Out/Spec.concept_id.
... | {
"repo_name": "dchud/sentinel",
"path": "canary/concept.py",
"copies": "1",
"size": "17138",
"license": "mit",
"hash": 6898701715702141000,
"line_mean": 33.4828973843,
"line_max": 89,
"alpha_frac": 0.5041428405,
"autogenerated": false,
"ratio": 4.183060776177691,
"config_test": false,
"has_no... |
# $Id$
import logging
import traceback
import pyparsing as pyp
import PyLucene
import canary.loader
from canary.concept import Concept
from canary.gazeteer import Feature
from canary.pubmed import Journal
from canary.study import Study
from canary.utils import render_capitalized
# All possible search fields, indexe... | {
"repo_name": "dchud/sentinel",
"path": "canary/search.py",
"copies": "1",
"size": "27077",
"license": "mit",
"hash": 7512486513420560000,
"line_mean": 38.8777614138,
"line_max": 174,
"alpha_frac": 0.5082542379,
"autogenerated": false,
"ratio": 4.167615822687394,
"config_test": false,
"has_no... |
# $Id$
import logging
import dtuple
class ValueGroup:
"""
A single group of discrete values from the EAV model.
"""
def __init__ (self, group_name, description, value_group_id=-1,
allow_multiple=0):
self.value_group_id = value_group_id
self.group_name = group_name
se... | {
"repo_name": "dchud/sentinel",
"path": "canary/db_model.py",
"copies": "1",
"size": "8422",
"license": "mit",
"hash": -4312848658477355000,
"line_mean": 30.9015151515,
"line_max": 108,
"alpha_frac": 0.4972690572,
"autogenerated": false,
"ratio": 4.215215215215215,
"config_test": false,
"has_... |
# $Id$
import lxml.objectify
import rwproperty
import zope.app.container.interfaces
import zope.component
import zope.interface
import zeit.cms.content.property
import zeit.content.quiz.interfaces
import zeit.content.quiz.container
import zeit.content.quiz.quiz
ANSWER_TEMPLATE = u"""\
<answer xmlns:py="http://codes... | {
"repo_name": "ZeitOnline/zeit.content.quiz",
"path": "src/zeit/content/quiz/answer.py",
"copies": "1",
"size": "1505",
"license": "bsd-3-clause",
"hash": 2036262043217085400,
"line_mean": 26.8703703704,
"line_max": 76,
"alpha_frac": 0.707641196,
"autogenerated": false,
"ratio": 3.459770114942528... |
# $Id$
import os.path
import jon.wt as wt
import jon.cgi as cgi
class MultiForm(wt.TemplateCode):
name = "standard"
stages = 0
filename = "mf%d.html"
keys = ()
xhtml = 1
def init(self):
pass
def update(self):
pass
def check(self):
pass
def _get_name(self):
if self.name:
re... | {
"repo_name": "jribbens/jonpy",
"path": "jon/wt/multiform.py",
"copies": "1",
"size": "4565",
"license": "mit",
"hash": -7116683247324626000,
"line_mean": 26.8353658537,
"line_max": 79,
"alpha_frac": 0.5798466594,
"autogenerated": false,
"ratio": 3.5305491105955142,
"config_test": false,
"has... |
# $Id$
import re
import urllib
import dtuple
import canary.context
from canary.utils import DTable
class Journal (canary.context.Cacheable, DTable):
"""
A simple structure containing exactly one row of the NLM MEDLINE
journal list, stored locally in the db as "medline_journals".
http://www.ncb... | {
"repo_name": "dchud/sentinel",
"path": "canary/pubmed.py",
"copies": "1",
"size": "7141",
"license": "mit",
"hash": 8656622201880145000,
"line_mean": 27.6787148594,
"line_max": 83,
"alpha_frac": 0.5558045092,
"autogenerated": false,
"ratio": 3.5386521308225967,
"config_test": false,
"has_no_... |
# $Id$
import struct, socket, sys, errno, os, select
import cgi, fakefile
log_level = 0
log_name = "/tmp/fcgi.log"
log_file = None
log_lock = None
FCGI_LISTENSOCK_FILENO = 0
FCGI_VERSION_1 = 1
FCGI_BEGIN_REQUEST = 1
FCGI_ABORT_REQUEST = 2
FCGI_END_REQUEST = 3
FCGI_PARAMS = 4
FCGI_STDIN = 5
FCGI_STDOUT = 6
FCGI_STDE... | {
"repo_name": "jribbens/jonpy",
"path": "jon/fcgi.py",
"copies": "1",
"size": "17501",
"license": "mit",
"hash": 558906104448596600,
"line_mean": 30.8779599271,
"line_max": 80,
"alpha_frac": 0.5793383235,
"autogenerated": false,
"ratio": 3.410836094328591,
"config_test": false,
"has_no_keywor... |
# $Id $
############################################################################
import sys
from math import fabs
############################################################################
LatticeError="LATTICE_ERROR:"
true =(1>0) #get true
false=(1<0) #get false
eps=1.e-5 #precision limit for position calcu... | {
"repo_name": "luxiaohan/openxal-csns-luxh",
"path": "core/src/xal/sim/slg/Lattice.py",
"copies": "3",
"size": "17611",
"license": "bsd-3-clause",
"hash": 6203877887158807000,
"line_mean": 29.627826087,
"line_max": 113,
"alpha_frac": 0.636250071,
"autogenerated": false,
"ratio": 3.218384502923976... |
# $Id$
import sys
import traceback
from canary.concept import Concept
import canary.context
from canary.human_study import HumanStudy
from canary import study
from canary.utils import DTable
import dtuple
this_module = sys.modules[__name__]
def summary_set_from_concept (context, concept_id, concept_type):
"""
... | {
"repo_name": "dchud/sentinel",
"path": "canary/summary.py",
"copies": "1",
"size": "15704",
"license": "mit",
"hash": -2402277976975921000,
"line_mean": 34.5294117647,
"line_max": 98,
"alpha_frac": 0.5038206826,
"autogenerated": false,
"ratio": 4.4550354609929075,
"config_test": false,
"has_... |
# $Id$
import sys,os
import tempfile
from shutil import rmtree
import pkg_resources
import helpers as _helpers
import re
class Compression(object):
def __init__(self):
self.log = _helpers.get_logger(__name__)
try:
import tarfile as tarfile
global tarfile
except Im... | {
"repo_name": "m00dawg/holland",
"path": "holland/legacy/compression.py",
"copies": "1",
"size": "15787",
"license": "bsd-3-clause",
"hash": 1919232541384582400,
"line_mean": 33.3217391304,
"line_max": 83,
"alpha_frac": 0.4937606892,
"autogenerated": false,
"ratio": 4.320470717022441,
"config_t... |
# $Id$
import sys, re, os, Cookie, errno
try:
import cStringIO as StringIO
except ImportError:
import StringIO
"""Object-oriented CGI interface."""
class Error(Exception):
"""The base class for all exceptions thrown by this module."""
pass
class SequencingError(Error):
"""The exception thrown when functi... | {
"repo_name": "jribbens/jonpy",
"path": "jon/cgi.py",
"copies": "1",
"size": "16681",
"license": "mit",
"hash": -3223970739280333300,
"line_mean": 29.5512820513,
"line_max": 80,
"alpha_frac": 0.6169294407,
"autogenerated": false,
"ratio": 3.6872236958443856,
"config_test": false,
"has_no_keyw... |
# $Id$
import time, hmac, Cookie, re, random, os, errno, fcntl
try:
import hashlib
sha = hashlib.sha1
shanew = hashlib.sha1
except ImportError:
import sha
shanew = sha.new
try:
import cPickle as pickle
except ImportError:
import pickle
class Error(Exception):
pass
class Session(dict):
def _make_h... | {
"repo_name": "jribbens/jonpy",
"path": "jon/session.py",
"copies": "1",
"size": "10737",
"license": "mit",
"hash": -2936696600022355000,
"line_mean": 29.0756302521,
"line_max": 80,
"alpha_frac": 0.5734376455,
"autogenerated": false,
"ratio": 3.331368290412659,
"config_test": false,
"has_no_k... |
# $Id$
import traceback
import canary.context
from canary.utils import DTable
import dtuple
def find_references (context, token=''):
if not token:
return get_studies(context)
studies = []
cursor = context.get_cursor()
cursor.execute("""
SELECT uid
FROM human_studies
W... | {
"repo_name": "dchud/sentinel",
"path": "canary/human_study.py",
"copies": "1",
"size": "4326",
"license": "mit",
"hash": 3048566577246558000,
"line_mean": 29.0416666667,
"line_max": 79,
"alpha_frac": 0.5166435506,
"autogenerated": false,
"ratio": 4.2536873156342185,
"config_test": false,
"ha... |
# $Id$
import weakref as _weakref
import Queue as _Queue
import thread as _thread
import time as _time
import atexit as _atexit
_log_level = 0
_log_name = "/tmp/dbpool.log"
_log_file = None
_log_lock = _thread.allocate_lock()
apilevel = "2.0"
threadsafety = 2
_dbmod = None
_lock = _thread.allocate_lock()
_refs = {... | {
"repo_name": "jribbens/jonpy",
"path": "jon/dbpool.py",
"copies": "1",
"size": "7403",
"license": "mit",
"hash": 1728524679384096000,
"line_mean": 30.5021276596,
"line_max": 79,
"alpha_frac": 0.6251519654,
"autogenerated": false,
"ratio": 3.4400557620817844,
"config_test": false,
"has_no_key... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.