text
stringlengths
0
1.05M
meta
dict
# all country info from __future__ import unicode_literals import os, json, webnotes def get_country_info(country=None): data = get_all() data = webnotes._dict(data.get(country, {})) if not 'date_format' in data: data.date_format = "dd-mm-yyyy" return data def get_all(): with open(os.path.join(os.path.dir...
{ "repo_name": "rohitw1991/adbwnf", "path": "webnotes/country_info.py", "copies": "6", "size": "1092", "license": "mit", "hash": 7882626708285224000, "line_mean": 25.6341463415, "line_max": 92, "alpha_frac": 0.6749084249, "autogenerated": false, "ratio": 2.8511749347258486, "config_test": false,...
__all__ = ["Crawler", "CrawlerCollection", "NPCore"] from random import choice as random_choice, uniform as random_float from threading import Thread from types import MethodType from typing import Callable, List, Optional, Set, Union from weakref import ReferenceType, WeakMethod from nichtparasoup.core.image import ...
{ "repo_name": "k4cg/nichtparasoup", "path": "nichtparasoup/core/__init__.py", "copies": "1", "size": "6554", "license": "mit", "hash": -4359380360016446500, "line_mean": 37.1046511628, "line_max": 114, "alpha_frac": 0.6229783338, "autogenerated": false, "ratio": 3.671708683473389, "config_test"...
__all__ = ['crc16', 'get_hexdigest', 'luhn'] def crc16(buff, crc=0, poly=0xa001): l = len(buff) i = 0 while i < l: ch = ord(buff[i]) uc = 0 while uc < 8: if (crc & 1) ^ (ch & 1): crc = (crc >> 1) ^ poly else: crc >>= 1 ...
{ "repo_name": "sprymak/metacorus-django-utils", "path": "mcutils/checksums.py", "copies": "1", "size": "2036", "license": "mit", "hash": 760560266945768000, "line_mean": 28.0857142857, "line_max": 76, "alpha_frac": 0.5510805501, "autogenerated": false, "ratio": 3.7495395948434624, "config_test"...
__all__ = ["createm3ulib"] import os from os import path class createm3ulib: def __init__(self, basedir, dryrun): if(path.exists(basedir) == False): raise Exception(RuntimeError, 'Base Directory does not exist') self.basedir = basedir self.dryrun = dryrun self.file_excl...
{ "repo_name": "TheDarkTrumpet/MusicOrganization", "path": "createm3u/createm3ulib/createm3ulib.py", "copies": "1", "size": "2042", "license": "mit", "hash": 1028688965109731500, "line_mean": 35.4821428571, "line_max": 88, "alpha_frac": 0.5519098923, "autogenerated": false, "ratio": 3.838345864661...
__all__ = ["create_parser"] from argparse import ArgumentParser from typing import Any, Set from argcomplete import FilesCompleter # type: ignore from nichtparasoup.imagecrawler import get_imagecrawlers def imagecrawler_completion(*args: Any, **kwargs: Any) -> Set[str]: return set(get_imagecrawlers().names())...
{ "repo_name": "k4cg/nichtparasoup", "path": "nichtparasoup/cli/parser.py", "copies": "1", "size": "3803", "license": "mit", "hash": -8415263277507080000, "line_mean": 30.6916666667, "line_max": 113, "alpha_frac": 0.6192479621, "autogenerated": false, "ratio": 4.102481121898598, "config_test": t...
__all__ = ['create_proxy', 'POST_BODY', 'POST_RESPONSE'] from akara import request #Create a proxy function for a service available over HTTP def create_proxy(service_id, method, resultmap, *xarg, **xkwarg): """Add the function as an Zen service This affect how the resource is registered in Zen: servic...
{ "repo_name": "zepheira/zenpub", "path": "lib/httpmodel.py", "copies": "2", "size": "1427", "license": "apache-2.0", "hash": 2478063050932884500, "line_mean": 30.0217391304, "line_max": 79, "alpha_frac": 0.6355991591, "autogenerated": false, "ratio": 3.9529085872576175, "config_test": false, ...
__all__ = ['create_subprocess_exec', 'create_subprocess_shell'] import collections import subprocess from . import events from . import futures from . import protocols from . import streams from . import tasks from .coroutines import coroutine from .log import logger PIPE = subprocess.PIPE STDOUT = subprocess.STDOU...
{ "repo_name": "classmember/proof_of_concept", "path": "python/events/lib/python3.4/site-packages/asyncio/subprocess.py", "copies": "16", "size": "7223", "license": "mit", "hash": -603099904172129800, "line_mean": 32.5953488372, "line_max": 78, "alpha_frac": 0.528173889, "autogenerated": false, "r...
__all__ = ['create_subprocess_exec', 'create_subprocess_shell'] import collections import subprocess from . import events from . import futures from . import protocols # 协议接口 from . import streams from . import tasks from .coroutines import coroutine from .log import logger PIPE = subprocess.PIPE ...
{ "repo_name": "hhstore/flask-annotated", "path": "asyncio/asyncio-3.4.3/asyncio/subprocess.py", "copies": "2", "size": "7370", "license": "mit", "hash": 3259661685650119000, "line_mean": 31.1754385965, "line_max": 78, "alpha_frac": 0.5258996728, "autogenerated": false, "ratio": 4.508912108174554,...
__all__ = 'create_subprocess_exec', 'create_subprocess_shell' import subprocess import warnings from . import events from . import protocols from . import streams from . import tasks from .log import logger PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT DEVNULL = subprocess.DEVNULL class SubprocessStreamProtoc...
{ "repo_name": "batermj/algorithm-challenger", "path": "code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/asyncio/subprocess.py", "copies": "22", "size": "8068", "license": "apache-2.0", "hash": 8538744635092626000, "line_mean": 32.4771784232, "line_max": 77, "alpha_fr...
__all__ = ['create_subprocess_exec', 'create_subprocess_shell'] import subprocess from . import events from . import protocols from . import streams from . import tasks from .coroutines import coroutine from .log import logger PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT DEVNULL = subprocess.DEVNULL class Su...
{ "repo_name": "anbangleo/NlsdeWeb", "path": "Python-3.6.0/Lib/asyncio/subprocess.py", "copies": "8", "size": "7194", "license": "mit", "hash": -1281543367316727000, "line_mean": 32.7746478873, "line_max": 78, "alpha_frac": 0.5268279121, "autogenerated": false, "ratio": 4.638297872340425, "confi...
__all__ = 'create_subprocess_exec', 'create_subprocess_shell' import subprocess from . import events from . import protocols from . import streams from . import tasks from .log import logger PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT DEVNULL = subprocess.DEVNULL class SubprocessStreamProtocol(streams.FlowC...
{ "repo_name": "huguesv/PTVS", "path": "Python/Product/Miniconda/Miniconda3-x64/Lib/asyncio/subprocess.py", "copies": "11", "size": "7254", "license": "apache-2.0", "hash": 8507266298106950000, "line_mean": 32.2752293578, "line_max": 77, "alpha_frac": 0.5417700579, "autogenerated": false, "ratio":...
__all__ = ['create_test_spatial_db', 'get_geo_where_clause', 'SpatialBackend'] from ctypes.util import find_library from django.conf import settings from django.db.backends.signals import connection_created from django.contrib.gis.db.backend.base import BaseSpatialBackend from django.contrib.gis.db.backend.spatialite...
{ "repo_name": "CollabQ/CollabQ", "path": "vendor/django/contrib/gis/db/backend/spatialite/__init__.py", "copies": "10", "size": "3213", "license": "apache-2.0", "hash": -3394351264907441700, "line_mean": 52.55, "line_max": 90, "alpha_frac": 0.5474634298, "autogenerated": false, "ratio": 5.2585924...
__all__ = ['create_test_spatial_db', 'get_geo_where_clause', 'SpatialBackend'] from ctypes.util import find_library from django.conf import settings from django.db.backends.signals import connection_created from django.contrib.gis.db.backend.base import BaseSpatialBackend from django.contrib.gis.db.backend.spa...
{ "repo_name": "greggian/TapdIn", "path": "django/contrib/gis/db/backend/spatialite/__init__.py", "copies": "1", "size": "3273", "license": "apache-2.0", "hash": -8964399336573802000, "line_mean": 52.55, "line_max": 90, "alpha_frac": 0.5374274366, "autogenerated": false, "ratio": 5.035384615384616...
# All credit to github.com/rs # almost a direct copy of https://github.com/rs/xid # Changes to make more pythonic as needed. import hashlib import os import platform import time import datetime import threading import base32hex # MyPy imports try: from typing import List except: pass # ignore, we do not need the...
{ "repo_name": "graham/python_xid", "path": "xid.py", "copies": "1", "size": "3355", "license": "mit", "hash": -975038500926340900, "line_mean": 20.7857142857, "line_max": 64, "alpha_frac": 0.5210134128, "autogenerated": false, "ratio": 3.2763671875, "config_test": false, "has_no_keywords": fa...
__all__ = ['cross', 'dot', 'express', 'outer', 'inertia', 'mechanics_printing', 'mprint', 'mpprint', 'mlatex', 'kinematic_equations', 'inertia_of_point_mass', 'partial_velocity', 'linear_m...
{ "repo_name": "amitjamadagni/sympy", "path": "sympy/physics/mechanics/functions.py", "copies": "2", "size": "26581", "license": "bsd-3-clause", "hash": 4707582206880305000, "line_mean": 34.2066225166, "line_max": 132, "alpha_frac": 0.5553590911, "autogenerated": false, "ratio": 3.213758916696893,...
__all__ = ('current', 'get') import os.path activate_this = os.path.join(os.path.dirname(__file__), 'bin/activate_this.py') execfile(activate_this, dict(__file__=activate_this)) import json, os, requests, sys from urlparse import urljoin bridges_path = os.path.join(os.getenv('LB_SUPPORT_PATH'), 'bridges.json') brid...
{ "repo_name": "nriley/LBHue", "path": "Hue.lbaction/Contents/Scripts/bridges.py", "copies": "1", "size": "5849", "license": "apache-2.0", "hash": -8407444623702303000, "line_mean": 26.2046511628, "line_max": 79, "alpha_frac": 0.5677893657, "autogenerated": false, "ratio": 3.746957078795644, "co...
"""All data and feature processing functions and routines""" __author__ = "Gabriel Urbain" __copyright__ = "Copyright 2017, Gabriel Urbain" __license__ = "MIT" __version__ = "0.2" __maintainer__ = "Gabriel Urbain" __email__ = "gabriel.urbain@ugent.be" __status__ = "Research" __date__ = "September 1st, 2017" import a...
{ "repo_name": "Gabs48/ML_competition", "path": "preprocessing.py", "copies": "1", "size": "8334", "license": "mit", "hash": -878976530397160700, "line_mean": 31.3023255814, "line_max": 104, "alpha_frac": 0.555675546, "autogenerated": false, "ratio": 3.623478260869565, "config_test": true, "ha...
"""All database models for this application.""" from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from stdimage.models import StdImageField from django.core.urlresolvers import reverse from core.managers import GameManager from core.managers import UserManager cla...
{ "repo_name": "joshsamara/game-website", "path": "core/models.py", "copies": "1", "size": "7740", "license": "mit", "hash": 7531074596095337000, "line_mean": 31.3849372385, "line_max": 112, "alpha_frac": 0.6027131783, "autogenerated": false, "ratio": 4.1257995735607675, "config_test": false, ...
__all__ = ['Database'] import os import sys from collections import OrderedDict from .table import Table from .column import Column class Database(object): def __init__(self, store, db_name): self.store = store self.db_name = db_name self.opened = False self.tables = [] #...
{ "repo_name": "yadb/yadb", "path": "backup/store/database.py", "copies": "1", "size": "3405", "license": "mit", "hash": 3536149805163537400, "line_mean": 27.6134453782, "line_max": 77, "alpha_frac": 0.4966226138, "autogenerated": false, "ratio": 4.439374185136897, "config_test": false, "has_n...
__all__ = ["DatadogNotifier"] from freight import http from freight.models import App, Task, TaskStatus, User from .base import Notifier, NotifierEvent, generate_event_title class DatadogNotifier(Notifier): def get_options(self): return {"webhook_url": {"required": True}} def should_send_deploy(sel...
{ "repo_name": "getsentry/freight", "path": "freight/notifiers/datadog.py", "copies": "1", "size": "1645", "license": "apache-2.0", "hash": -5586916047744406000, "line_mean": 31.2549019608, "line_max": 108, "alpha_frac": 0.5519756839, "autogenerated": false, "ratio": 3.9448441247002397, "config_...
"""All datastore models live in this module""" import datetime from google.appengine.ext import ndb class Torrent(ndb.Model): """A main model for representing an individual Torrent entry.""" title = ndb.StringProperty(indexed=False, required=True) btih = ndb.StringProperty(indexed=False, required=True) ...
{ "repo_name": "notapresent/rutracker_rss", "path": "models.py", "copies": "1", "size": "1583", "license": "apache-2.0", "hash": 2891276585133262000, "line_mean": 36.6904761905, "line_max": 114, "alpha_frac": 0.6917245736, "autogenerated": false, "ratio": 4.143979057591623, "config_test": false,...
__all__ = ['DataStore'] from bisect import bisect_left DATASTORE_FLAG_SET = 1 DATASTORE_FLAG_DELETE = 2 class DataStore(object): def __init__(self, pk): self.pk = tuple(pk) # primary key # memtable self.MEM_TABLE_MAX_ITEMS = 4 self.memtable = MemTable(datastore=self) ...
{ "repo_name": "mtasic85/datastore", "path": "old/datastore2.py", "copies": "1", "size": "6763", "license": "mit", "hash": -2113651367527779600, "line_mean": 24.0481481481, "line_max": 91, "alpha_frac": 0.5030311992, "autogenerated": false, "ratio": 3.4878803506962353, "config_test": false, "h...
__all__ = ['DataStore'] import os import re class DataStore(object): def __init__(self, path, name, primary_key_columns, columns): self.path = path self.name = name self.primary_key_columns = primary_key_columns self.columns = columns self.memtable = MemTable(self) ...
{ "repo_name": "mtasic85/datastore", "path": "old/datastore.py", "copies": "1", "size": "2930", "license": "mit", "hash": -2572336892628854300, "line_mean": 25.3963963964, "line_max": 94, "alpha_frac": 0.5641638225, "autogenerated": false, "ratio": 3.2884399551066217, "config_test": false, "ha...
__all__ = ['DataTable', 'DataRow'] import FileIO __author__ = "Charles R Schmidt <schmidtc@gmail.com>" class DataTable(FileIO.FileIO): """ DataTable provides additional functionality to FileIO for data table file tables FileIO Handlers that provide data tables should subclass this instead of FileIO """ ...
{ "repo_name": "pombreda/pysal", "path": "pysal/core/Tables.py", "copies": "5", "size": "3347", "license": "bsd-3-clause", "hash": 3963793400627112000, "line_mean": 31.8137254902, "line_max": 107, "alpha_frac": 0.5383925904, "autogenerated": false, "ratio": 3.9192037470725993, "config_test": fal...
__all__ = ['DataTable'] from . import fileio from ..common import requires from warnings import warn import numpy as np __author__ = "Charles R Schmidt <schmidtc@gmail.com>" class DataTable(fileio.FileIO): """ DataTable provides additional functionality to FileIO for data table file tables FileIO Handler...
{ "repo_name": "lixun910/pysal", "path": "pysal/lib/io/tables.py", "copies": "1", "size": "7601", "license": "bsd-3-clause", "hash": 3851538012369659000, "line_mean": 33.55, "line_max": 107, "alpha_frac": 0.5040126299, "autogenerated": false, "ratio": 3.8681933842239187, "config_test": false, ...
__all__ = ['DataTable'] import FileIO from ..common import requires from warnings import warn import numpy as np __author__ = "Charles R Schmidt <schmidtc@gmail.com>" class DataTable(FileIO.FileIO): """ DataTable provides additional functionality to FileIO for data table file tables FileIO Handlers that ...
{ "repo_name": "ljwolf/pysal_core", "path": "libpysal/io/Tables.py", "copies": "8", "size": "7658", "license": "bsd-3-clause", "hash": 2594138759264239600, "line_mean": 33.3408071749, "line_max": 107, "alpha_frac": 0.4992165056, "autogenerated": false, "ratio": 3.8657243816254416, "config_test":...
__all__ = ['DataTable'] import FileIO import numpy as np __author__ = "Charles R Schmidt <schmidtc@gmail.com>" class DataTable(FileIO.FileIO): """ DataTable provides additional functionality to FileIO for data table file tables FileIO Handlers that provide data tables should subclass this instead of File...
{ "repo_name": "darribas/pysal", "path": "pysal/core/Tables.py", "copies": "8", "size": "5347", "license": "bsd-3-clause", "hash": -8968935362149206000, "line_mean": 31.0179640719, "line_max": 107, "alpha_frac": 0.4999064896, "autogenerated": false, "ratio": 3.7814710042432815, "config_test": fa...
__all__ = ['date_range', 'get_past_date', 'parse_date'] import datetime def date_range(since=datetime.date.today(), until=datetime.date.today()): """Get date range from `since` until `until`. :type since: datetime.date :param since: Earliest date of the range. :type until: datetime.date :param ...
{ "repo_name": "hans-t/autos", "path": "autos/utils/date.py", "copies": "1", "size": "1051", "license": "mit", "hash": -2142248918233033700, "line_mean": 26.6578947368, "line_max": 81, "alpha_frac": 0.6660323501, "autogenerated": false, "ratio": 3.687719298245614, "config_test": false, "has_no...
__all__ = ['DateTimeProtocolCommand'] import time import random import datetime from print_colors import PrintColors from contact import Contact from protocol_command import ProtocolCommand class DateTimeProtocolCommand(ProtocolCommand): def start(self): self.req() def stop(self): raise NotI...
{ "repo_name": "mtasic85/routingtable", "path": "datetime_protocol_command.py", "copies": "1", "size": "2043", "license": "mit", "hash": 3825377836880140300, "line_mean": 25.5324675325, "line_max": 77, "alpha_frac": 0.5756240822, "autogenerated": false, "ratio": 4.029585798816568, "config_test":...
__all__ = ['daub','qmf','cascade','morlet'] import numpy as np from numpy.dual import eig from scipy.misc import comb from scipy import linspace, pi, exp def daub(p): """The coefficients for the FIR low-pass filter producing Daubechies wavelets. p>=1 gives the order of the zero at f=1/2. There are 2p filter...
{ "repo_name": "stefanv/scipy3", "path": "scipy/signal/wavelets.py", "copies": "2", "size": "6488", "license": "bsd-3-clause", "hash": 5878597628813059000, "line_mean": 28.8986175115, "line_max": 82, "alpha_frac": 0.5339087546, "autogenerated": false, "ratio": 2.9370755998189226, "config_test": ...
__all__ = ["DayBoxOffice"] import tushare as ts from flask import request,json from flask_restful import Resource def get_day_boxoffice(day=None): if day == None: result = ts.day_boxoffice().to_json() else: try: result = ts.day_boxoffice(day).to_json() except Exception as e...
{ "repo_name": "FinaceInfo/Chinese-box-office-info", "path": "api/boxoffice/day_boxoffice.py", "copies": "1", "size": "1062", "license": "mit", "hash": 2432581363941076500, "line_mean": 22.2972972973, "line_max": 105, "alpha_frac": 0.6252900232, "autogenerated": false, "ratio": 2.1933842239185752,...
__all__ = ["DayCinema"] import tushare as ts from flask import request,json from flask_restful import Resource def get_day_cinema(day=None): if day == None: try: result = ts.day_cinema().to_json() except Exception as e: result = json.dumps({"error":True,"message":str(e)}) ...
{ "repo_name": "FinaceInfo/Chinese-box-office-info", "path": "api/boxoffice/day_cinema.py", "copies": "1", "size": "1177", "license": "mit", "hash": 318509471340882300, "line_mean": 23.825, "line_max": 109, "alpha_frac": 0.609264854, "autogenerated": false, "ratio": 2.464019851116625, "config_te...
__all__ = ["DeclHandler", "LexicalHandler", 'all_features', 'all_properties', 'feature_external_ges', 'feature_external_pes', 'feature_namespace_prefixes', 'feature_namespaces', 'feature_string_interning', 'feature_validation', 'property_declaration_handler', 'property_dom_node', 'property_encoding', 'property_internin...
{ "repo_name": "AmericanResearchInstitute/poweru-server", "path": "cmis_storage/amara/pyxml_standins.py", "copies": "1", "size": "10950", "license": "bsd-3-clause", "hash": -7639086978039671000, "line_mean": 40.0112359551, "line_max": 379, "alpha_frac": 0.6709589041, "autogenerated": false, "ratio...
__all__ = ["Decoder"] import struct from array import array import pyconspack.header as H import pyconspack.types as T import pyconspack.error as E import pyconspack.index as I class ForwardRef: def __init__(self, tag): self.tag = tag def set(self, place, index = None, is_key = False): self....
{ "repo_name": "conspack/pyconspack", "path": "decode.py", "copies": "1", "size": "8451", "license": "bsd-2-clause", "hash": 7268655817434544000, "line_mean": 27.7448979592, "line_max": 86, "alpha_frac": 0.5131937049, "autogenerated": false, "ratio": 3.298594847775176, "config_test": false, "h...
__all__ = ['dedupe', 'partition', 'chunk_iterable'] import itertools def dedupe(items, key=None): """Remove duplicates in an iterable of items based on key function. :type items: iterable :param items: Iterable of items. :type key: function :param key: A key function that takes an item as argum...
{ "repo_name": "hans-t/autos", "path": "autos/utils/iterable.py", "copies": "1", "size": "1605", "license": "mit", "hash": 432701877761510400, "line_mean": 22.9552238806, "line_max": 83, "alpha_frac": 0.6342679128, "autogenerated": false, "ratio": 4.158031088082901, "config_test": false, "has_...
__all__ = ["Definition", "find_file"] class Definition(object): ''' All Definitions should inherit this. For a given subject and session within the API, the definition is used to create a given mask, map, etc. Definitions have an init function which the users uses to specify how they want the ...
{ "repo_name": "yeatmanlab/pyAFQ", "path": "AFQ/definitions/utils.py", "copies": "2", "size": "3425", "license": "bsd-2-clause", "hash": -2463183909907093000, "line_mean": 31.0093457944, "line_max": 78, "alpha_frac": 0.583649635, "autogenerated": false, "ratio": 4.136473429951691, "config_test":...
__all__ = ['DelimitedTextReader', 'DelimitedPointsReaderBase', 'XYZTextReader'] __displayname__ = 'Delimited File I/O' import sys import numpy as np import pandas as pd from .. import _helpers, interface from ..base import ReaderBase if sys.version_info < (3,): from StringIO import StringIO else: from io i...
{ "repo_name": "banesullivan/ParaViewGeophysics", "path": "PVGeo/readers/delimited.py", "copies": "1", "size": "10331", "license": "bsd-3-clause", "hash": -7214485528681268000, "line_mean": 34.2593856655, "line_max": 103, "alpha_frac": 0.5754525215, "autogenerated": false, "ratio": 4.2992093216812...
__all__ = ["denoise_image"] from .. import utils from . import process_args as pargs from .get_mask import get_mask def denoise_image( image, mask=None, shrink_factor=1, p=1, r=3, noise_model="Rician", v=0 ): """ Denoise an image using a spatially adaptive filter originally described in J. V. Manjon,...
{ "repo_name": "ANTsX/ANTsPy", "path": "ants/utils/denoise_image.py", "copies": "1", "size": "2321", "license": "apache-2.0", "hash": -3427855477427090000, "line_mean": 26.630952381, "line_max": 81, "alpha_frac": 0.5777682034, "autogenerated": false, "ratio": 3.4902255639097746, "config_test": f...
#__all__ = ['deque', 'defaultdict', 'Counter'] from _collections import deque, defaultdict #from itertools import repeat as _repeat, chain as _chain, starmap as _starmap __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping re...
{ "repo_name": "lidiamcfreitas/FenixScheduleMaker", "path": "ScheduleMaker/brython/www/src/Lib/collections/__init__.py", "copies": "12", "size": "34896", "license": "bsd-2-clause", "hash": -1382751781762709000, "line_mean": 36.4420600858, "line_max": 97, "alpha_frac": 0.5541036222, "autogenerated": ...
__all__ = ['deque', 'defaultdict', 'namedtuple'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from _collections import deque, defaultdict from operator ...
{ "repo_name": "DecipherOne/Troglodyte", "path": "Trog Build Dependencies/Python26/Lib/collections.py", "copies": "6", "size": "6150", "license": "mit", "hash": 5728178793281582000, "line_mean": 40.2751677852, "line_max": 126, "alpha_frac": 0.5830894309, "autogenerated": false, "ratio": 3.89487017...
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict', 'ChainMap'] # For backwards compatibility, continue to make the collections ABCs # available through the collections module. from _collections_abc import * import _collections_abc __all__ += _co...
{ "repo_name": "ForgottenKahz/CloudOPC", "path": "venv/Lib/collections/__init__.py", "copies": "68", "size": "41964", "license": "mit", "hash": -304196575469146900, "line_mean": 36.0706713781, "line_max": 99, "alpha_frac": 0.5507339624, "autogenerated": false, "ratio": 4.176769184831293, "config...
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ +=...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.2/Lib/collections.py", "copies": "1", "size": "36703", "license": "mit", "hash": 2539180549309281000, "line_mean": 38.0457446809, "line_max": 126, "alpha_frac": 0.5493283928, "autogenerated": false, "rati...
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from _co...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.0/Lib/collections.py", "copies": "1", "size": "17446", "license": "mit", "hash": 4950037682656483000, "line_mean": 40.1462264151, "line_max": 126, "alpha_frac": 0.5634529405, "autogenerated": false, "rati...
"""All descriptor modules are loaded. .. code:: python >>> from mordred import Calculator, descriptors >>> descriptors.ABCIndex.__name__ # ABCIndex module 'mordred.ABCIndex' >>> len(descriptors.all) # all descriptor modules 50 >>> calc = Calculator(descriptors) # all descriptors """ def...
{ "repo_name": "mordred-descriptor/mordred", "path": "mordred/descriptors/__init__.py", "copies": "1", "size": "1044", "license": "bsd-3-clause", "hash": -1206776678479332900, "line_mean": 23.8571428571, "line_max": 75, "alpha_frac": 0.5862068966, "autogenerated": false, "ratio": 3.81021897810219,...
__all__ = ('DesignerApp', ) import kivy import time import os import shutil import traceback kivy.require('1.4.1') from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.layout import Layout from kivy.factory import Factory from kivy.properties import ObjectProperty, BooleanProperty from ...
{ "repo_name": "5y/kivy-designer", "path": "designer/app.py", "copies": "1", "size": "50457", "license": "mit", "hash": 831065526928783400, "line_mean": 38.0836560806, "line_max": 80, "alpha_frac": 0.5884416434, "autogenerated": false, "ratio": 3.9943793540215324, "config_test": false, "has_no...
__all__ = ['detect_stream', 'detect', 'dist_to_reference', 'dist', 'prob_class'] import numpy as np def detect_stream(s_inf, N_obs, R_pos, R_neg, gamma=1, theta=1, D_req=1): """Algorithm 1.1 Perform online binary classification on the infinite stream s_inf using ...
{ "repo_name": "norbert/hearsay", "path": "hearsay/algorithms/nikolov.py", "copies": "1", "size": "2185", "license": "mit", "hash": -5165373796406067000, "line_mean": 24.1149425287, "line_max": 77, "alpha_frac": 0.576201373, "autogenerated": false, "ratio": 3.5355987055016183, "config_test": fal...
__all__ = ["DeviceManager"] from adb_impl import AdbImpl from android_device import AndroidDevice from status import * from base.log import VLOG class DeviceManager(object): def __init__(self, xdb): self.xdb = xdb self.active_devices = [] # Returns a device which will not be reassigned during its lifeti...
{ "repo_name": "PeterWangIntel/crosswalk-webdriver-python", "path": "browser/device_manager.py", "copies": "1", "size": "2164", "license": "bsd-3-clause", "hash": -4348556971932496400, "line_mean": 32.2923076923, "line_max": 95, "alpha_frac": 0.6797597043, "autogenerated": false, "ratio": 3.796491...
__all__ = ["DevToolsClientImpl"] import copy import json import yaml import time from status import * from devtools_client import DevToolsClient from base.bind import Bind from base.log import VLOG from net.websocket_factory import WebsocketFactory from third_party.websocket_client.websocket import WebSocketConnection...
{ "repo_name": "PeterWangIntel/crosswalk-webdriver-python", "path": "browser/devtools_client_impl.py", "copies": "1", "size": "14578", "license": "bsd-3-clause", "hash": 5126628076973718000, "line_mean": 35.7204030227, "line_max": 104, "alpha_frac": 0.6933735766, "autogenerated": false, "ratio": 3...
__all__ = ["DevToolsHttpClient", \ "WebViewsInfo", \ "WebViewInfo"] import urllib2 import time import yaml from version import GetMinimumSupportedXwalkVersion from devtools_client_impl import DevToolsClientImpl from web_view_impl import WebViewImpl from status import * from base.log import VLOG ...
{ "repo_name": "PeterWangIntel/crosswalk-webdriver-python", "path": "browser/devtools_http_client.py", "copies": "1", "size": "9627", "license": "bsd-3-clause", "hash": -8346731058455586000, "line_mean": 33.6294964029, "line_max": 113, "alpha_frac": 0.6502544926, "autogenerated": false, "ratio": 3...
__all__ = ['DictExtractionTransformer', 'DictListExtractionTransformer', 'FunctionTransformer', 'IdentityTransformer'] from . import PureTransformer class DictExtractionTransformer(PureTransformer): """Extract a given key from dictionary object.""" def __init__(self, key=None, default=None, **kwargs): ...
{ "repo_name": "skylander86/ycml", "path": "ycml/transformers/misc.py", "copies": "1", "size": "1385", "license": "apache-2.0", "hash": -7819589387013101000, "line_mean": 27.2653061224, "line_max": 118, "alpha_frac": 0.6685920578, "autogenerated": false, "ratio": 3.9571428571428573, "config_test...
__all__ = ['DirectEntryScroll'] from panda3d.core import * from . import DirectGuiGlobals as DGG from .DirectScrolledFrame import * from .DirectFrame import * from .DirectEntry import * class DirectEntryScroll(DirectFrame): def __init__(self, entry, parent = None, **kw): optiondefs = ( ('pgFun...
{ "repo_name": "chandler14362/panda3d", "path": "direct/src/gui/DirectEntryScroll.py", "copies": "10", "size": "3883", "license": "bsd-3-clause", "hash": -2633922198941115000, "line_mean": 32.188034188, "line_max": 152, "alpha_frac": 0.5928405872, "autogenerated": false, "ratio": 3.585410895660203...
__all__ = ['DirectEntryScroll'] from panda3d.core import * import DirectGuiGlobals as DGG from DirectScrolledFrame import * from DirectFrame import * from DirectEntry import * class DirectEntryScroll(DirectFrame): def __init__(self, entry, parent = None, **kw): optiondefs = ( ('pgFunc', ...
{ "repo_name": "sctigercat1/panda3d", "path": "direct/src/gui/DirectEntryScroll.py", "copies": "8", "size": "4043", "license": "bsd-3-clause", "hash": 653566241581268900, "line_mean": 33.5555555556, "line_max": 152, "alpha_frac": 0.5683898095, "autogenerated": false, "ratio": 3.7331486611265006, ...
__all__ = ['DirectEntryScroll'] from pandac.PandaModules import * import DirectGuiGlobals as DGG from DirectScrolledFrame import * from DirectFrame import * from DirectEntry import * class DirectEntryScroll(DirectFrame): def __init__(self, entry, parent = None, **kw): optiondefs = ( ('pgFunc',...
{ "repo_name": "ToonTownInfiniteRepo/ToontownInfinite", "path": "Panda3D-1.9.0/direct/gui/DirectEntryScroll.py", "copies": "4", "size": "4075", "license": "mit", "hash": -3242939860245052400, "line_mean": 33.2521008403, "line_max": 152, "alpha_frac": 0.5656441718, "autogenerated": false, "ratio": ...
__all__ = ('discover_item',) def discover_item(title='Link Bridge'): return dict(title=title, action='discover.py', actionReturnsItems=True) def item_for_description(desc): device_info = desc['device'] return dict( action='connect.py', actionArgument=desc['URLBase'] + '#' + device_info['se...
{ "repo_name": "nriley/LBHue", "path": "Hue.lbaction/Contents/Scripts/discover.py", "copies": "1", "size": "2378", "license": "apache-2.0", "hash": -139266331606127890, "line_mean": 32.0277777778, "line_max": 79, "alpha_frac": 0.6446593776, "autogenerated": false, "ratio": 3.7448818897637794, "c...
__all__ = ['DiscoverProtocolCommand'] import time import random from print_colors import PrintColors from contact import Contact from protocol_command import ProtocolCommand class DiscoverProtocolCommand(ProtocolCommand): def start(self): self.req() def stop(self): raise NotImplementedError ...
{ "repo_name": "mtasic85/routingtable", "path": "discover_protocol_command.py", "copies": "1", "size": "11809", "license": "mit", "hash": -1829746817748145000, "line_mean": 38.8952702703, "line_max": 123, "alpha_frac": 0.4192564993, "autogenerated": false, "ratio": 4.647382920110193, "config_tes...
__all__ = ['distributeMUSICBndryPart'] import struct import numpy as np _header_fmt = '6i6dddii6Iiiddddii6Ii60s' _small = 1024*256 #256KB def distributeMUSICBndryPart(fname_in, fname_out=None, long_ids=False, \ coarse_type=5, distribute=(1,1,1,-1)): my_dist = map(int, distribute) if len(my_dist) != 4...
{ "repo_name": "manodeep/yymao-helpers", "path": "helpers/distributeMUSICBndryPart.py", "copies": "1", "size": "3685", "license": "mit", "hash": 6346009827898917000, "line_mean": 34.4326923077, "line_max": 150, "alpha_frac": 0.5115332429, "autogenerated": false, "ratio": 3.2901785714285716, "con...
__all__ = ['Distribution'] import re from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib from distutils.errors import DistutilsOpt...
{ "repo_name": "Drvanon/Game", "path": "venv/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/setuptools/dist.py", "copies": "1", "size": "31852", "license": "apache-2.0", "hash": 4082603245588716000, "line_mean": 36.2538011696, "line_max": 97, "alpha_frac": 0.6132111013, "autogenerated": fal...
__all__ = ['Distribution'] import re import os import sys import warnings import distutils.log import distutils.core import distutils.cmd from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) from setuptools.depend...
{ "repo_name": "KhalidGit/flask", "path": "Work/Trivia - Module 5/env/Lib/site-packages/setuptools/dist.py", "copies": "72", "size": "32547", "license": "apache-2.0", "hash": -5675795066891701000, "line_mean": 39.8881909548, "line_max": 97, "alpha_frac": 0.612928995, "autogenerated": false, "ratio...
__all__ = ['Distribution'] import re import os import sys import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, Distuti...
{ "repo_name": "Cian47/anti_bicycle_theft", "path": "python-api/env/lib/python3.5/site-packages/setuptools/dist.py", "copies": "259", "size": "35320", "license": "mit", "hash": -7030637806771407000, "line_mean": 39.8796296296, "line_max": 97, "alpha_frac": 0.6095979615, "autogenerated": false, "ra...
__all__ = ['Distribution'] import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) from distutils.util import rfc822_escape from setupto...
{ "repo_name": "AccelAI/accel.ai", "path": "flask-aws/lib/python2.7/site-packages/setuptools/dist.py", "copies": "18", "size": "37548", "license": "mit", "hash": 8119696690248872000, "line_mean": 39.5924324324, "line_max": 97, "alpha_frac": 0.6097528497, "autogenerated": false, "ratio": 4.44039735...
__all__ = ['Distribution'] import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist import itertools from collections import defaultdict from distutils.errors import ( DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, ...
{ "repo_name": "st135yle/django-site", "path": "dbenv/lib/python3.4/site-packages/setuptools/dist.py", "copies": "15", "size": "40304", "license": "mit", "hash": 3582401093393932000, "line_mean": 38.9841269841, "line_max": 79, "alpha_frac": 0.6084259627, "autogenerated": false, "ratio": 4.42269285...
__all__ = ['DockerManager'] import logging from .api import APIClient logger = logging.getLogger(__name__) # type: logging.Logger logger.setLevel(logging.DEBUG) class DockerManager(object): """ Provides access to the underlying Docker server used by a BugZoo server. """ def __init__(self, api: API...
{ "repo_name": "ChrisTimperley/AutomatedRepairBenchmarks.c", "path": "bugzoo/client/dockerm.py", "copies": "1", "size": "1410", "license": "mit", "hash": -1211700045628832300, "line_mean": 29, "line_max": 76, "alpha_frac": 0.5680851064, "autogenerated": false, "ratio": 4.12280701754386, "config_...
__all__ = ('Document',) from pyPdf import PdfFileWriter, PdfFileReader from .fields import BaseField class Document(object): pages = [] origin = None def __init__(self, instance): self.instance = instance def get_origin(self): return self.origin def save(self, to): ...
{ "repo_name": "wpjunior/pdforms", "path": "pdforms/document.py", "copies": "1", "size": "1139", "license": "mit", "hash": -8873073773400031000, "line_mean": 24.8863636364, "line_max": 88, "alpha_frac": 0.5654082529, "autogenerated": false, "ratio": 4.397683397683398, "config_test": false, "ha...
__all__=["doExtraction", "ExtrProgress"] import typing import clr clr.AddReference("LessMsi.core") clr.AddReference("LessIO") import LessIO from LessMsi.Msi import Wixtracts from pathlib import Path __license__="MIT" __copyright__=r""" Permission is hereby granted, free of charge, to any person obtaining a copy of thi...
{ "repo_name": "activescott/lessmsi", "path": "contrib/python/LessMsi.py", "copies": "1", "size": "3294", "license": "mit", "hash": 6045208784910004000, "line_mean": 44.75, "line_max": 460, "alpha_frac": 0.7680631451, "autogenerated": false, "ratio": 3.4276795005202914, "config_test": false, "...
__all__ = [ "Domain", "Peer", "Database", "Process" ] """ This module provides basic "entity" support, similar to what's available in the com.nuodb.entity Java package. A Domain instance provides entry into a domain, and optionally a hook for getting called back when domain-level events happen. The Domain provides acc...
{ "repo_name": "tvincentNuoDB/nuodb-python", "path": "pynuodb/entity.py", "copies": "1", "size": "47044", "license": "bsd-3-clause", "hash": -1453739839825792000, "line_mean": 33.7701404287, "line_max": 136, "alpha_frac": 0.5814981719, "autogenerated": false, "ratio": 4.560294687863513, "config_...
__all__ = ["DomTracker"] from devtools_event_listener import DevToolsEventListener from status import * import json # Tracks the state of the DOM and execution context creation. class DomTracker(DevToolsEventListener): def __init__(self, client): DevToolsEventListener.__init__(self) self.node_to_frame_map ...
{ "repo_name": "PeterWangIntel/crosswalk-webdriver-python", "path": "browser/dom_tracker.py", "copies": "1", "size": "2427", "license": "bsd-3-clause", "hash": 4967637890160209000, "line_mean": 31.36, "line_max": 87, "alpha_frac": 0.6538936959, "autogenerated": false, "ratio": 3.638680659670165, ...
__all__ = ['DotifyDict'] class DotifyDict(dict): def __init__(self, data=None): data = data or {} for k, v in data.items(): k = str(k) if isinstance(v, dict): setattr(self, k, DotifyDict(v)) else: setattr(self, k, v) def __re...
{ "repo_name": "rocktavious/pyul", "path": "pyul/coreUtils/dotifydict.py", "copies": "1", "size": "2631", "license": "mit", "hash": 3317074368692226600, "line_mean": 32.7307692308, "line_max": 104, "alpha_frac": 0.5013302927, "autogenerated": false, "ratio": 4.079069767441861, "config_test": fal...
__all__ = ['dot', 'subset_assignment', 'subset_slice_assignment', 'vector_subset_slice_assignment', 'matrix_addition'] import os import numpy import atexit import math import pycuda.autoinit import pycuda.driver as cuda import pycuda.gpuarray as gpuarray import scikits.cuda.cublas as cublas import scikits.cuda.linalg ...
{ "repo_name": "Captricity/sciguppy", "path": "sciguppy/matrix.py", "copies": "1", "size": "3278", "license": "mit", "hash": -5218300648358515000, "line_mean": 36.25, "line_max": 118, "alpha_frac": 0.6143990238, "autogenerated": false, "ratio": 2.7826825127334467, "config_test": false, "has_no...
__all__ = ["DottedList", "SingleFloat", "Char", "Vector", "Cons", "Pointer", "RRef", "Index", "Package", "Symbol", "package", "intern", "keyword"] import pyconspack import pyconspack.error as E class CustomType: def __repr__(self): return "pyconspack." + self.__class__.__name__ + "("...
{ "repo_name": "conspack/pyconspack", "path": "types.py", "copies": "1", "size": "3931", "license": "bsd-2-clause", "hash": -7834120745731181000, "line_mean": 27.2805755396, "line_max": 105, "alpha_frac": 0.5843296871, "autogenerated": false, "ratio": 3.865290068829892, "config_test": false, "...
__all__ = ['dotted', 'set', 'get', 'flatten', 'unflatten'] from simplegeneric import generic ## # High-level API. _sentinel = object() def dotted(o): """ Return an object that support dotted key access. """ wrapped = wrap(o) # Check that something has actually registered for this type, i.e. we...
{ "repo_name": "ish/dottedish", "path": "dottedish/api.py", "copies": "1", "size": "3740", "license": "bsd-3-clause", "hash": -4543697612574823000, "line_mean": 26.5, "line_max": 87, "alpha_frac": 0.5938502674, "autogenerated": false, "ratio": 3.7512537612838517, "config_test": false, "has_no_...
__all__ = ["Downloader"] from .scraper import Scraper from .serial import write_story, write_tar, write_zip import re ZIP_FILE_REGEX = re.compile(r".*\.zip", re.IGNORECASE) TAR_FILE_REGEX = re.compile(r".*\.tar(?:\.([a-z]+)|)", re.IGNORECASE) class Downloader(object): def __init__(self, recursive=True): ...
{ "repo_name": "sexypants/chyoa-scraper", "path": "chyoa/download.py", "copies": "1", "size": "1675", "license": "mit", "hash": 811498152455377000, "line_mean": 37.0681818182, "line_max": 83, "alpha_frac": 0.5540298507, "autogenerated": false, "ratio": 3.69757174392936, "config_test": false, "...
__all__ = ('DownloadState',) import pickle import time from datetime import timedelta from .utils import say, norm_path class DownloadState: """ DownloadState is a semi-persistent storage of episodes have already been downloaded. We make the assumption that re-downloading episodes is not really that bad as ...
{ "repo_name": "nepthar/autopirate", "path": "autopirate/download_state.py", "copies": "1", "size": "1853", "license": "unlicense", "hash": -6095886308005093000, "line_mean": 26.25, "line_max": 79, "alpha_frac": 0.6637884512, "autogenerated": false, "ratio": 3.7971311475409837, "config_test": fa...
__all__ = ('Driver', 'DriverNotFoundError') class Driver(object): name = None display = 'Generic Driver' form = {"host": {"label": "Host", "required": False, "default": None}, "port": {"label": "Port", "required": False, "default": None}, "username": {"label": "Username", "required"...
{ "repo_name": "coinbox/coinbox-core", "path": "cbpos/database/driver.py", "copies": "1", "size": "3506", "license": "mit", "hash": 8668789083604716000, "line_mean": 39.2988505747, "line_max": 82, "alpha_frac": 0.5610382202, "autogenerated": false, "ratio": 3.8316939890710384, "config_test": fal...
__all__ = ['dstack'] from ..core import numeric as _nx from ..core import atleast_3d def dstack(tup): """ Stack arrays in sequence depth wise (along third axis). Takes a sequence of arrays and stack them along the third axis to make a single array. Rebuilds arrays divided by `dsplit`. This is a s...
{ "repo_name": "bussiere/pypyjs", "path": "website/demo/home/rfk/repos/pypy/lib_pypy/numpypy/lib/shape_base.py", "copies": "2", "size": "1306", "license": "mit", "hash": 2117283222832045600, "line_mean": 23.1851851852, "line_max": 71, "alpha_frac": 0.5421133231, "autogenerated": false, "ratio": 3....
__all__ = ['dump'] def dump(mesh, f, e_color=None): from baiji.serialization.util.openlib import ensure_file_open_and_call return ensure_file_open_and_call(f, _dump, 'w', mesh, e_color=e_color) def _dump(f, mesh, e_color=None): ''' Writes a mesh to collada file format. ''' dae = mesh_to_collad...
{ "repo_name": "bodylabs/lace", "path": "lace/serialization/dae.py", "copies": "1", "size": "4242", "license": "bsd-2-clause", "hash": -3918767842820193300, "line_mean": 36.875, "line_max": 127, "alpha_frac": 0.5598774163, "autogenerated": false, "ratio": 3.7177914110429446, "config_test": false...
__all__=('dumpttf',) def dumpttf(fn,fontName=None, verbose=0): '''dump out known glyphs from a ttf file''' import os if not os.path.isfile(fn): raise IOError('No such file "%s"' % fn) from reportlab.pdfbase.pdfmetrics import registerFont, stringWidth from reportlab.pdfbase.ttfonts import TTF...
{ "repo_name": "Distrotech/reportlab", "path": "tools/utils/dumpttf.py", "copies": "14", "size": "1891", "license": "bsd-3-clause", "hash": 2510270623860276000, "line_mean": 30.5166666667, "line_max": 89, "alpha_frac": 0.5637228979, "autogenerated": false, "ratio": 3.2435677530017153, "config_te...
__all__=('dumpttf',) def dumpttf(fn,fontName=None, verbose=0): '''dump out known glyphs from a ttf file''' import os if not os.path.isfile(fn): raise IOError('No such file "%s"' % fn) from reportlab.pdfbase.pdfmetrics import registerFont, stringWidth from reportlab.pdfbase.ttfonts imp...
{ "repo_name": "nickpack/reportlab", "path": "tools/utils/dumpttf.py", "copies": "1", "size": "1947", "license": "bsd-3-clause", "hash": 5471645766530230000, "line_mean": 30.45, "line_max": 88, "alpha_frac": 0.5469953775, "autogenerated": false, "ratio": 3.333904109589041, "config_test": false, ...
''' All DUT alignment functions in space and time are listed here plus additional alignment check functions''' from __future__ import division import logging import re import os import progressbar import warnings from collections import Iterable import matplotlib.pyplot as plt from multiprocessing import Pool, cpu_co...
{ "repo_name": "SiLab-Bonn/testbeam_analysis", "path": "testbeam_analysis/dut_alignment.py", "copies": "1", "size": "93557", "license": "mit", "hash": -7071609250347247000, "line_mean": 63.4331955923, "line_max": 416, "alpha_frac": 0.5750718813, "autogenerated": false, "ratio": 4.026208202435771, ...
__all__ = ["DWBPackageInstaller"] from direct.p3d.PackageInstaller import PackageInstaller from direct.gui.DirectWaitBar import DirectWaitBar from direct.gui import DirectGuiGlobals as DGG class DWBPackageInstaller(DirectWaitBar, PackageInstaller): """ This class presents a PackageInstaller that also inherits fro...
{ "repo_name": "matthiascy/panda3d", "path": "direct/src/p3d/DWBPackageInstaller.py", "copies": "8", "size": "3922", "license": "bsd-3-clause", "hash": -4932623962831850000, "line_mean": 39.8541666667, "line_max": 76, "alpha_frac": 0.6070882203, "autogenerated": false, "ratio": 4.534104046242774, ...
######################################## IMPORTS ########################################## # pylint: disable=missing-docstring from __future__ import absolute_import from __future__ import division from __future__ import print_function #tensorflow stuff import time import math from six.moves import xrange # pylint:...
{ "repo_name": "vberthiaume/vblandr", "path": "src/main.py", "copies": "1", "size": "11011", "license": "apache-2.0", "hash": 6780546542251430000, "line_mean": 55.1785714286, "line_max": 196, "alpha_frac": 0.6321859958, "autogenerated": false, "ratio": 4.1131864026895775, "config_test": false, ...
__all__ = ('EggObserver',) from openmdao.util.log import LOG_DEBUG2 class EggObserver(object): """ Provides a convenient API for calling an observer of egg operations. `observer` will be called with: - ``('analyze', filename, -1, -1)`` during module analysis. - ``('add', filename, file_fraction,...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/OpenMDAO-Framework-dev/openmdao.util/src/openmdao/util/eggobserver.py", "copies": "1", "size": "4933", "license": "mit", "hash": 7413705992416260000, "line_mean": 32.7876712329, "line_max": 85, "alpha_frac": 0.538009325, "autogenerated":...
__all__ = ['embed_download'] from ..common import * from .bilibili import bilibili_download from .iqiyi import iqiyi_download_by_vid from .le import letvcloud_download_by_vu from .netease import netease_download from .qq import qq_download_by_vid from .sina import sina_download_by_vid from .tudou import tudou_downloa...
{ "repo_name": "cnbeining/you-get", "path": "src/you_get/extractors/embed.py", "copies": "2", "size": "3610", "license": "mit", "hash": -2116521549316964600, "line_mean": 35.8367346939, "line_max": 117, "alpha_frac": 0.6210526316, "autogenerated": false, "ratio": 2.829153605015674, "config_test"...
__all__ = ['embed_download'] from ..common import * from .iqiyi import iqiyi_download_by_vid from .le import letvcloud_download_by_vu from .netease import netease_download from .qq import qq_download_by_vid from .sina import sina_download_by_vid from .tudou import tudou_download_by_id from .vimeo import vimeo_downloa...
{ "repo_name": "betaY/crawler", "path": "you-get-master/src/you_get/extractors/embed.py", "copies": "2", "size": "3172", "license": "mit", "hash": 6218078539053646000, "line_mean": 35.8837209302, "line_max": 117, "alpha_frac": 0.6138083228, "autogenerated": false, "ratio": 2.8145519077196095, "c...
__all__ = ['embed_download'] from ..common import * from .iqiyi import iqiyi_download_by_vid from .le import letvcloud_download_by_vu from .qq import qq_download_by_vid from .sina import sina_download_by_vid from .tudou import tudou_download_by_id from .yinyuetai import yinyuetai_download_by_id from .youku import you...
{ "repo_name": "linhua55/you-get", "path": "src/you_get/extractors/embed.py", "copies": "1", "size": "2548", "license": "mit", "hash": 213281935754828260, "line_mean": 36.4705882353, "line_max": 117, "alpha_frac": 0.6000784929, "autogenerated": false, "ratio": 2.787746170678337, "config_test": f...
__all__ = ['embed_download'] from ..common import * from .iqiyi import iqiyi_download_by_vid from .letv import letvcloud_download_by_vu from .qq import qq_download_by_vid from .sina import sina_download_by_vid from .tudou import tudou_download_by_id from .yinyuetai import yinyuetai_download_by_id from .youku import y...
{ "repo_name": "jindaxia/you-get", "path": "src/you_get/extractors/embed.py", "copies": "1", "size": "2551", "license": "mit", "hash": -8034753737348402000, "line_mean": 36.5147058824, "line_max": 117, "alpha_frac": 0.6001568013, "autogenerated": false, "ratio": 2.787978142076503, "config_test":...
__all__ = ['embed_download'] from ..common import * from .letv import letvcloud_download_by_vu from .qq import qq_download_by_vid from .sina import sina_download_by_vid from .tudou import tudou_download_by_id from .youku import youku_download_by_vid """ refer to http://open.youku.com/tools """ youku_embed_patterns =...
{ "repo_name": "specter4mjy/you-get", "path": "src/you_get/extractors/embed.py", "copies": "1", "size": "1785", "license": "mit", "hash": -5738698972797349000, "line_mean": 34, "line_max": 117, "alpha_frac": 0.5932773109, "autogenerated": false, "ratio": 2.811023622047244, "config_test": false, ...
__all__ = ['embed_download'] import urllib.parse from ..common import * from .bilibili import bilibili_download from .dailymotion import dailymotion_download from .iqiyi import iqiyi_download_by_vid from .le import letvcloud_download_by_vu from .netease import netease_download from .qq import qq_download_by_vid from...
{ "repo_name": "zmwangx/you-get", "path": "src/you_get/extractors/embed.py", "copies": "2", "size": "5515", "license": "mit", "hash": -2943652645683742700, "line_mean": 35.045751634, "line_max": 118, "alpha_frac": 0.6103354488, "autogenerated": false, "ratio": 2.9571045576407506, "config_test": ...
__all__ = ["Encoder"] import re import struct from array import array import pyconspack.header as H import pyconspack.types as T import pyconspack.error as E import pyconspack.index as I class EncodedObject: def __init__(self, typename, val): self.typename = typename self.val = val class Encode...
{ "repo_name": "conspack/pyconspack", "path": "encode.py", "copies": "1", "size": "11267", "license": "bsd-2-clause", "hash": 4471520132313202700, "line_mean": 29.2876344086, "line_max": 100, "alpha_frac": 0.5277358658, "autogenerated": false, "ratio": 3.544196288140925, "config_test": false, ...
"""All encounter-related routes. If the user wants to browse/search encounters, or look at the overview for a particular encounter, they'll probably want one of these routes. """ from bottle import route, template, request, HTTPError from db import Encounter, Combatant, Swing, DataRequest, getDataTable, crosstab from...
{ "repo_name": "proegssilb/tsw-stats", "path": "pages/encounterRoutes.py", "copies": "1", "size": "7570", "license": "apache-2.0", "hash": 2362976590247454700, "line_mean": 37.040201005, "line_max": 79, "alpha_frac": 0.6233817701, "autogenerated": false, "ratio": 3.618546845124283, "config_test"...
__all__ = ('EncryptedBlockStorage',) import struct import hmac import hashlib from pyoram.storage.block_storage import (BlockStorageInterface, BlockStorageTypeFactory) from pyoram.crypto.aes import AES import six class EncryptedBlockStorageInterface(BlockStorageInterface): ...
{ "repo_name": "ghackebeil/PyORAM", "path": "src/pyoram/encrypted_storage/encrypted_block_storage.py", "copies": "1", "size": "10855", "license": "mit", "hash": -3628606151060027000, "line_mean": 34.4738562092, "line_max": 76, "alpha_frac": 0.5118378627, "autogenerated": false, "ratio": 4.39118122...
__all__ = ('EncryptedHeapStorage',) import struct from pyoram.util.virtual_heap import SizedVirtualHeap from pyoram.storage.heap_storage import \ (HeapStorageInterface, HeapStorage) from pyoram.encrypted_storage.encrypted_block_storage import \ (EncryptedBlockStorageInterface, EncryptedBlockStorage)...
{ "repo_name": "ghackebeil/PyORAM", "path": "src/pyoram/encrypted_storage/encrypted_heap_storage.py", "copies": "1", "size": "4968", "license": "mit", "hash": 6830713841002255000, "line_mean": 27.8837209302, "line_max": 73, "alpha_frac": 0.5249597424, "autogenerated": false, "ratio": 4.53284671532...
""" allen_data_prep loads data from the Allen emissions data spreadsheet and processes it before saving the results to a DataFile object. The Allen emissions data are from the following resource: D. Allen, V. M. Torres, et al. \Measurements of methane emissions at natural gas production sites in the Unit...
{ "repo_name": "EAOgroup/FEAST", "path": "InputData/RawDataProcessingScripts/allen_data_prep.py", "copies": "1", "size": "2317", "license": "mit", "hash": 2467916929316536300, "line_mean": 47.2978723404, "line_max": 118, "alpha_frac": 0.6754423824, "autogenerated": false, "ratio": 3.07702523240371...
__all__ = ["EndOfTraining", "StopCriterion_ABC", "EpochWall", "GeometricEarlyStopping"] class EndOfTraining(Exception) : """Exception raised when a training criteria is met""" def __init__(self, stopCriterion) : self.stopCriterion = stopCriterion self.message = "End of training: %s" % stopCrite...
{ "repo_name": "JonathanSeguin/Mariana", "path": "Mariana/training/future/stopcriteria.py", "copies": "2", "size": "5267", "license": "apache-2.0", "hash": -2680357581434028000, "line_mean": 38.9015151515, "line_max": 183, "alpha_frac": 0.6130624644, "autogenerated": false, "ratio": 4.317213114754...
__all__ = ['E'] import operator import sys import threading import numpy # Declare a double type that does not exist in Python space double = numpy.double # The default kind for undeclared variables default_kind = 'double' type_to_kind = {bool: 'bool', int: 'int', long: 'long', float: 'float', doub...
{ "repo_name": "erdc-cm/numexpr", "path": "numexpr/expressions.py", "copies": "2", "size": "14057", "license": "mit", "hash": 9185184747742923000, "line_mean": 32.3895486936, "line_max": 79, "alpha_frac": 0.5639183325, "autogenerated": false, "ratio": 3.6578194119177727, "config_test": false, ...
__all__ = ['Enum', 'WidgetState', 'WidgetAction'] class Enum: value = None def __init__(self, initial=None): self.value = initial def get(self): return self.value def set(self, value): self.value = value def eq(self, second): is_equal = False if self.value == second: is_equal = True return is_e...
{ "repo_name": "herrschr/prey-game", "path": "pocketthrone/entities/enum.py", "copies": "2", "size": "4136", "license": "bsd-2-clause", "hash": -3858649575684925000, "line_mean": 20.6544502618, "line_max": 49, "alpha_frac": 0.6774661509, "autogenerated": false, "ratio": 2.39768115942029, "config...
__all__ = ['Environment'] from typing import Dict, Any import json class Environment(object): """ Provides a static description of the state of the environment. """ @staticmethod def from_file(fn: str) -> 'Environment': with open(fn, "r") as f: jsn = json.load(f) retur...
{ "repo_name": "squaresLab/Houston", "path": "houston/environment.py", "copies": "1", "size": "1316", "license": "mit", "hash": 7599759614270977000, "line_mean": 27.6086956522, "line_max": 75, "alpha_frac": 0.5759878419, "autogenerated": false, "ratio": 4.049230769230769, "config_test": false, ...
__all__ = ['EofStream', 'StreamReader', 'DataQueue', 'ChunksQueue', 'FlowControlStreamReader', 'FlowControlDataQueue', 'FlowControlChunksQueue'] import asyncio import collections import traceback from .log import internal_logger EOF_MARKER = b'' DEFAULT_LIMIT = 2 ** 16 class EofStr...
{ "repo_name": "saghul/aiohttp", "path": "aiohttp/streams.py", "copies": "1", "size": "11487", "license": "apache-2.0", "hash": -6453895161939138000, "line_mean": 27.5037220844, "line_max": 79, "alpha_frac": 0.5366065988, "autogenerated": false, "ratio": 4.504705882352941, "config_test": false, ...
__all__ = ["error_from_response", "parse_error", "Error", "ClientError", "ServerError", "BadRequest", "Unauthorized", "InternalServerError", "BadGateway", "ServiceUnavailable", "GatewayTimeout"] def error_from_response(response_body, status_code): if status_code not in ERRORS: return...
{ "repo_name": "accepton/accepton-python", "path": "accepton/error.py", "copies": "1", "size": "1761", "license": "mit", "hash": 9047109225797212000, "line_mean": 23.4583333333, "line_max": 78, "alpha_frac": 0.6871095968, "autogenerated": false, "ratio": 4.153301886792453, "config_test": false, ...
# all error responses __ERROR__RESPONSES__ = { 0 : "Access Denied", 1 : "Parameter Missing: Function '%s'; Parameter '%s'", 2: "User '%s' Does Not Exist", 3: "Device '%s' Does Not Exist", 4: "Incorrect Connection Pin", 5: "Device Is Already Connected To A Host: Disconnect The Device And Try Connecting Again...
{ "repo_name": "HunterLarco/Jiro", "path": "devserver/Jiro/API/response.py", "copies": "1", "size": "1438", "license": "apache-2.0", "hash": 3233852983304167400, "line_mean": 32.4651162791, "line_max": 158, "alpha_frac": 0.6794158554, "autogenerated": false, "ratio": 3.7253886010362693, "config_...
# All error types described in DB API 2 are implemented the same way as in # Django (1.11 to 3.0)., otherwise some exceptions are not correctly reported in it. from importlib import import_module from typing import Any, Dict, Iterable, List, Mapping, Optional, Set, Type, Union import json import warnings import reques...
{ "repo_name": "hynekcer/django-salesforce", "path": "salesforce/dbapi/exceptions.py", "copies": "2", "size": "7963", "license": "mit", "hash": -1380240578440833500, "line_mean": 34.5491071429, "line_max": 135, "alpha_frac": 0.6250156976, "autogenerated": false, "ratio": 4.062755102040816, "conf...