text
stringlengths
0
1.05M
meta
dict
"""A .. collapse:: directive for sphinx-bootstrap-theme.""" import os.path as op from docutils import nodes from docutils.parsers.rst.directives import flag, class_option from docutils.parsers.rst.roles import set_classes from docutils.statemachine import StringList from sphinx.locale import _ from sphinx.util.docuti...
{ "repo_name": "cjayb/mne-python", "path": "doc/sphinxext/sphinx_bootstrap_divs/__init__.py", "copies": "6", "size": "6079", "license": "bsd-3-clause", "hash": 7310866247350506000, "line_mean": 30.0153061224, "line_max": 79, "alpha_frac": 0.5704885672, "autogenerated": false, "ratio": 3.9320827943...
"""A .. collapse:: directive for sphinx-bootstrap-theme.""" import os.path as op from docutils import nodes from docutils.parsers.rst.directives import flag from sphinx.locale import _ from sphinx.util.docutils import SphinxDirective from sphinx.util.fileutil import copy_asset this_dir = op.dirname(__file__) __vers...
{ "repo_name": "adykstra/mne-python", "path": "doc/sphinxext/sphinx_bootstrap_divs/__init__.py", "copies": "1", "size": "5024", "license": "bsd-3-clause", "hash": 2431707970534065000, "line_mean": 30.4, "line_max": 79, "alpha_frac": 0.5577229299, "autogenerated": false, "ratio": 4.009577015163607,...
"""A collection base class""" class Collection(): """A collection base class that introduces nested getting and setting""" #The default value for get_in; normally None DFLT = None def get(self, index, dflt=None): """This method needs to be implemented to subclass Collection""" raise No...
{ "repo_name": "hellerve/hawkweed", "path": "hawkweed/classes/collection.py", "copies": "1", "size": "2140", "license": "mit", "hash": 6436789742818975000, "line_mean": 33.5161290323, "line_max": 99, "alpha_frac": 0.5869158879, "autogenerated": false, "ratio": 4.602150537634409, "config_test": f...
"""A collection of agents written in Python""" from __future__ import unicode_literals, print_function from cyclus.agents import Region, Institution, Facility from cyclus import typesystem as ts class NullRegion(Region): """A simple do nothing region.""" class NullInst(Institution): """An instition that own...
{ "repo_name": "Baaaaam/cyclus", "path": "cyclus/pyagents.py", "copies": "6", "size": "4499", "license": "bsd-3-clause", "hash": 6950369749500685000, "line_mean": 33.8759689922, "line_max": 86, "alpha_frac": 0.6019115359, "autogenerated": false, "ratio": 4.0568079350766455, "config_test": false,...
"""A collection of analytical results which return the exact solution to a trial problem to benchmark particle movers Includes: * Motion in a constant electric field * Motion in a constant magnetic field * Crossed motion in perpendicular electric and magnetic fields """ __author__ = 'swebb' import numpy as np impo...
{ "repo_name": "radiasoft/radtrack", "path": "experimental/ode/PtclTests.py", "copies": "1", "size": "3124", "license": "apache-2.0", "hash": -8707012088017183000, "line_mean": 28.2056074766, "line_max": 77, "alpha_frac": 0.5457746479, "autogenerated": false, "ratio": 3.355531686358754, "config_...
"""a collection of Annotation-related models""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from flask_appbuilder import Model from sqlalchemy import ( Column, DateTime, ForeignKey, Index, Integer, String, Text...
{ "repo_name": "alanmcruickshank/superset-dev", "path": "superset/models/annotations.py", "copies": "1", "size": "1544", "license": "apache-2.0", "hash": -7130549895319735000, "line_mean": 26.5714285714, "line_max": 65, "alpha_frac": 0.6528497409, "autogenerated": false, "ratio": 3.86, "config_t...
"""A collection of base classes and utility objects for building an abstract syntax tree representing a Mathematica program. """ from typing import List from Types import TypeBase, SymbolType class ASTNode: """ The base class of all AST node classes. """ def __init__(self, children: list('ASTNode')...
{ "repo_name": "rljacobson/FoxySheep", "path": "python_target/FoxySheep/AST/ASTNode.py", "copies": "1", "size": "4179", "license": "bsd-2-clause", "hash": -5567086188784332000, "line_mean": 30.9007633588, "line_max": 86, "alpha_frac": 0.5881789902, "autogenerated": false, "ratio": 4.44102019128586...
"""A collection of bits that can be set, cleared, and toggled by number. Based on code from https://wiki.python.org/moin/BitArrays and converted to a class-based version for ease of use. """ __author__ = 'Brian Landers <brian@packetslave.com>' import array class BitField(object): """A collection of bits that c...
{ "repo_name": "Packetslave/bitfield", "path": "bitfield.py", "copies": "1", "size": "1627", "license": "apache-2.0", "hash": 522122701644228540, "line_mean": 28.0535714286, "line_max": 79, "alpha_frac": 0.5427166564, "autogenerated": false, "ratio": 3.5916114790286975, "config_test": false, "...
"""A collection of cards.""" import random from csrv.model import cards from csrv.model.cards import card_info # This import is just to pull in all the card definitions import csrv.model.cards.corp import csrv.model.cards.runner class Deck(object): def __init__(self, identity_name, card_names): self.identity...
{ "repo_name": "mrroach/CentralServer", "path": "csrv/model/deck.py", "copies": "1", "size": "3195", "license": "apache-2.0", "hash": 3447125318417795600, "line_mean": 34.5, "line_max": 114, "alpha_frac": 0.66885759, "autogenerated": false, "ratio": 3.2938144329896906, "config_test": false, "h...
""" A collection of Chaco tools that respond to a multi-pointer interface """ from numpy import asarray, dot, sqrt # Enthought library imports from traits.api import Delegate, Dict, Enum, Instance, Int, Property, Trait, Tuple, CArray # Chaco imports from chaco.api import BaseTool from chaco.tools.api import PanTool, ...
{ "repo_name": "burnpanck/chaco", "path": "examples/demo/canvas/mptools.py", "copies": "3", "size": "12674", "license": "bsd-3-clause", "hash": 3051875753965798000, "line_mean": 32.5291005291, "line_max": 90, "alpha_frac": 0.5863184472, "autogenerated": false, "ratio": 3.5343000557724484, "confi...
''' A collection of classes and functions for retrieving entries from an Atom feed. Atom standard: https://en.wikipedia.org/wiki/Atom_(standard) ''' from helpers.content import Content from helpers.xmlnode import get_feed NS_FORMAT = '{{http://www.w3.org/2005/Atom}}{tag}' ENTRY_TAG = NS_FORMAT.format(tag...
{ "repo_name": "foldr/collector-atom", "path": "atom.py", "copies": "1", "size": "1830", "license": "mit", "hash": -8650174065483614000, "line_mean": 24.9117647059, "line_max": 77, "alpha_frac": 0.6327868852, "autogenerated": false, "ratio": 3.3951762523191094, "config_test": false, "has_no_ke...
''' A collection of classes for generating XML documents lazily from an iterable stream of data. ''' from functools import partial from itertools import islice from urllib.request import urlopen from xml.etree.ElementTree import XMLPullParser def nth(iterable, n): ''' Returns the nth item of an iterab...
{ "repo_name": "foldr/helpers-py", "path": "xmlnode.py", "copies": "1", "size": "6902", "license": "mit", "hash": -5187537150939887000, "line_mean": 26.2950819672, "line_max": 90, "alpha_frac": 0.5523036801, "autogenerated": false, "ratio": 4.816468946266574, "config_test": false, "has_no_keyw...
"""A collection of classes that are part of the standard runtime environment.""" class RuntimeException(Exception): """A runtime exception.""" def __init__(self, message): super().__init__("RuntimeException: " + message) class NamespaceException(RuntimeException): """A namespace exception.""" ...
{ "repo_name": "lnsp/tea", "path": "runtime/env.py", "copies": "1", "size": "9484", "license": "mit", "hash": -7800075810921580000, "line_mean": 31.0405405405, "line_max": 101, "alpha_frac": 0.5947912273, "autogenerated": false, "ratio": 4.328617069831127, "config_test": false, "has_no_keyword...
"""A collection of classes to make working with energy and reserve offers from the New Zealand Electricity Market a bit more painless. Contains a master class, Offer, which publically exposed subclasses inherit from. This master class contains the code necessary for the exposed subclasses to function. """ # Standard ...
{ "repo_name": "NigelCleland/Offers", "path": "Offers/offer_frames.py", "copies": "1", "size": "25104", "license": "bsd-3-clause", "hash": -6462120860785511000, "line_mean": 32.6514745308, "line_max": 164, "alpha_frac": 0.602692798, "autogenerated": false, "ratio": 4.123521681997372, "config_tes...
"""A collection of classes, which can check table rows for conditions.""" class Condition: """Base class for all condition checks.""" pass class OneOf(Condition): """Class for checking, if a certain field in part of a list of items.""" def __init__(self, field, lst): """Store field name and...
{ "repo_name": "jakobkogler/wca_api", "path": "wca_api/conditions.py", "copies": "1", "size": "1702", "license": "mit", "hash": -7803114936333763000, "line_mean": 29.3928571429, "line_max": 76, "alpha_frac": 0.6010575793, "autogenerated": false, "ratio": 4.265664160401003, "config_test": false, ...
"""A collection of code for exporting reports in Markdown This rendering is helpful for manual inspection of results either by command line or in GitHub. Useful for dev work. Useful too for dumping a quick snapshot in GitHub for others to use. It may make sense to move this code to a dedicated package at some point. I...
{ "repo_name": "jfalkner/report_metrics", "path": "report_metrics/utils/html.py", "copies": "1", "size": "7202", "license": "mit", "hash": -3564947311819123000, "line_mean": 31.1517857143, "line_max": 119, "alpha_frac": 0.599555679, "autogenerated": false, "ratio": 3.4360687022900764, "config_te...
''' A collection of code to facilitate NPC generation using FATE-style aspects, personality traits, and other information rather than system-dependent stats. ''' # Date: Dec 26 2014 # Author: Alex Safatli # Email: safatli@cs.dal.ca class character(object): def __init__(self,name,traits=None): self...
{ "repo_name": "AlexSafatli/KingdomManager", "path": "Pathfinder Kingdom Manager/Pathfinder Kingdom ManagerTests/npc.py", "copies": "1", "size": "1048", "license": "mit", "hash": -119219298964657490, "line_mean": 29.8529411765, "line_max": 161, "alpha_frac": 0.6269083969, "autogenerated": false, "...
""" A collection of command-line tools for building encoded update.xml files. """ import warnings warnings.warn("Module is deprecated.", DeprecationWarning) from .info_file import InfoFile import os def files2xml(filenames): """ Given a list of filenames, extracts the app version and log information from ac...
{ "repo_name": "enthought/etsproxy", "path": "enthought/util/updates/tools.py", "copies": "1", "size": "1741", "license": "bsd-3-clause", "hash": 6823409647689241000, "line_mean": 31.8490566038, "line_max": 85, "alpha_frac": 0.6392877657, "autogenerated": false, "ratio": 4.002298850574713, "conf...
#A Collection of commonly used fabric scripts. import re from fabric.api import env, local, settings from fabric.context_managers import hide from fabric.operations import put, get import cuisine from cuisine import run, sudo from fabric.api import parallel from random import choice import string import socket import ...
{ "repo_name": "dhilipsiva/snippets", "path": "fabfile.py", "copies": "1", "size": "8256", "license": "mit", "hash": -1632338757591171000, "line_mean": 25.8925081433, "line_max": 75, "alpha_frac": 0.597504845, "autogenerated": false, "ratio": 3.3780687397708675, "config_test": false, "has_no_k...
'''A collection of common threadsafe data structures, adapted to the dnutils thread model''' '''A multi-producer, multi-consumer queue.''' from dnutils import threads from collections import deque from heapq import heappush, heappop from time import monotonic as time __all__ = ['Empty', 'Full', 'Queue', 'PriorityQue...
{ "repo_name": "danielnyga/dnutils", "path": "src/dnutils/threadsafe.py", "copies": "1", "size": "8845", "license": "mit", "hash": -3840604452834169000, "line_mean": 36.8034188034, "line_max": 92, "alpha_frac": 0.5997738836, "autogenerated": false, "ratio": 4.476214574898785, "config_test": fals...
"""A collection of converters, and converter creators For the purposes of this module, a converter is any function that takes a single value and returns another value. """ from decimal import Decimal from uuid import UUID, uuid4 from bidon.util import date def identity(val): """Returns the value it is given.""" ...
{ "repo_name": "treycucco/bidon", "path": "bidon/util/convert.py", "copies": "1", "size": "3963", "license": "mit", "hash": -5189435964128649000, "line_mean": 20.8950276243, "line_max": 99, "alpha_frac": 0.6684330053, "autogenerated": false, "ratio": 3.615875912408759, "config_test": false, "h...
"""A collection of converters, and converter creators For the purposes of this module, a converter is any function that takes a single value and returns another value. """ import arrow from decimal import Decimal from uuid import UUID, uuid4 from datetime import datetime, timezone, date from numbers import Number de...
{ "repo_name": "treycucco/py-utils", "path": "idb/util/convert.py", "copies": "1", "size": "2814", "license": "bsd-3-clause", "hash": 5513156658791072000, "line_mean": 15.650887574, "line_max": 98, "alpha_frac": 0.6417910448, "autogenerated": false, "ratio": 3.1796610169491526, "config_test": fa...
"""A collection of different tools Samantha might use. - Updater, to monitor it's sources on GitHub and automatically update to newer versions, if available and if a certain series of tests passes """ ############################################################################### # pylint: disable=global-statement ...
{ "repo_name": "Sirs0ri/PersonalAssistant", "path": "samantha/tools/__init__.py", "copies": "1", "size": "1914", "license": "mit", "hash": 4407502659395351000, "line_mean": 22.0602409639, "line_max": 79, "alpha_frac": 0.6128526646, "autogenerated": false, "ratio": 4.253333333333333, "config_test...
"""A collection of dpa-specific nuke nodes.""" from collections import defaultdict import os import re import nuke from dpa.ptask import PTask from dpa.ptask.area import PTaskArea, PTaskAreaError from dpa.ptask.spec import PTaskSpec # ----------------------------------------------------------------------------- # ...
{ "repo_name": "Clemson-DPA/dpa-pipe", "path": "dpa/nuke/nodes.py", "copies": "1", "size": "8279", "license": "mit", "hash": -6019101552678284000, "line_mean": 29.1054545455, "line_max": 79, "alpha_frac": 0.5512743085, "autogenerated": false, "ratio": 3.687750556792873, "config_test": false, "...
"""A collection of examples for CARLAEnvironment""" import pygame from tensorforce import Agent from tensorforce.environments import CARLAEnvironment def training_example(num_episodes: int, max_episode_timesteps: int): # Instantiate the environment (run the CARLA simulator before doing this!) env = CARLAEnv...
{ "repo_name": "reinforceio/tensorforce", "path": "examples/carla_examples.py", "copies": "1", "size": "3902", "license": "apache-2.0", "hash": -4746415820002222000, "line_mean": 41.4130434783, "line_max": 106, "alpha_frac": 0.5914915428, "autogenerated": false, "ratio": 4.098739495798319, "conf...
"""A collection of extended path classes and methods The classes all inherit from the original path.path """ import os from fnmatch import fnmatch from pysyte.types.lists import flatten class PathError(Exception): """Something went wrong with a path""" prefix = 'Path Error' def __init__(self, message): ...
{ "repo_name": "jalanb/dotsite", "path": "pysyte/types/paths.py", "copies": "1", "size": "28258", "license": "mit", "hash": 8857817128804107000, "line_mean": 28.4354166667, "line_max": 115, "alpha_frac": 0.5853917475, "autogenerated": false, "ratio": 3.958257459027875, "config_test": false, "h...
# A collection of failing integrals from the issues. from sympy import ( integrate, Integral, exp, oo, pi, sign, sqrt, sin, cos, Piecewise, tan, S, log, gamma, sinh, sec, acos, atan, sech, csch, DiracDelta, Rational ) from sympy.utilities.pytest import XFAIL, SKIP, slow, skip, ON_TRAVIS from sympy.abc import...
{ "repo_name": "kaushik94/sympy", "path": "sympy/integrals/tests/test_failing_integrals.py", "copies": "2", "size": "6857", "license": "bsd-3-clause", "hash": 8921861419278589000, "line_mean": 23.3156028369, "line_max": 188, "alpha_frac": 0.5890331049, "autogenerated": false, "ratio": 2.5729831144...
"""A collection of file system related utilities.""" import logging import os import sys import time import subprocess import string import tempfile import stat import shutil if not hasattr(__builtins__, 'FileExistsError'): FileExistsError = OSError if not hasattr(__builtins__, 'FileNotFoundError'): FileNotFou...
{ "repo_name": "qbicsoftware/dropboxhandler", "path": "dropboxhandler/fstools.py", "copies": "2", "size": "8109", "license": "mit", "hash": 804843549285486200, "line_mean": 31.9634146341, "line_max": 79, "alpha_frac": 0.5860155383, "autogenerated": false, "ratio": 4.014356435643564, "config_test...
"""A collection of functional primitives""" from functools import wraps, partial from functools import reduce as _reduce from inspect import getargspec def curry(fun): """ A working but dirty version of a currying function/decorator. """ def _internal_curry(fun, original=None, given=0): if ori...
{ "repo_name": "hellerve/hawkweed", "path": "hawkweed/functional/primitives.py", "copies": "1", "size": "6447", "license": "mit", "hash": -2249466787256780800, "line_mean": 27.78125, "line_max": 86, "alpha_frac": 0.6219947262, "autogenerated": false, "ratio": 4.289421157684631, "config_test": fa...
"""A collection of functional-programming primitives, loosely modeled after ramda.js (http://ramdajs.com/). Basic philosophy for all functions in this module: - Prefer immutable data structures; particularly, prefer tuples over lists. - Pure functions (none of the functions in this module have any observable side e...
{ "repo_name": "tracksinspector/papi", "path": "papi/fp.py", "copies": "1", "size": "13612", "license": "mit", "hash": -8857678047709237000, "line_mean": 32.0388349515, "line_max": 82, "alpha_frac": 0.6423743756, "autogenerated": false, "ratio": 3.7853170189099, "config_test": false, "has_no_k...
"""A collection of functions designed to help I/O with ascii files.""" __docformat__ = "restructuredtext en" import numpy as np import numpy.core.numeric as nx from __builtin__ import bool, int, long, float, complex, object, unicode, str def _is_string_like(obj): """ Check whether obj behaves like a string. ...
{ "repo_name": "plaes/numpy", "path": "numpy/lib/_iotools.py", "copies": "2", "size": "27692", "license": "bsd-3-clause", "hash": -8872808830122175000, "line_mean": 33.6583229036, "line_max": 83, "alpha_frac": 0.5633034811, "autogenerated": false, "ratio": 4.441379310344828, "config_test": false...
"""A collection of functions designed to help I/O with ascii files.""" __docformat__ = "restructuredtext en" import sys import numpy as np import numpy.core.numeric as nx from __builtin__ import bool, int, long, float, complex, object, unicode, str from numpy.compat import asbytes, bytes, asbytes_nested if sys.versi...
{ "repo_name": "dagss/numpy_svn", "path": "numpy/lib/_iotools.py", "copies": "5", "size": "28938", "license": "bsd-3-clause", "hash": -7855578288635591000, "line_mean": 33.6562874251, "line_max": 83, "alpha_frac": 0.5651392633, "autogenerated": false, "ratio": 4.419364691508858, "config_test": f...
"""A collection of functions designed to help I/O with ascii files. """ __docformat__ = "restructuredtext en" import numpy as np import numpy.core.numeric as nx from numpy.compat import asbytes, asunicode, bytes def _decode_line(line, encoding=None): """Decode bytes from binary input streams. Defaults to d...
{ "repo_name": "WarrenWeckesser/numpy", "path": "numpy/lib/_iotools.py", "copies": "4", "size": "30879", "license": "bsd-3-clause", "hash": -7375033473446904000, "line_mean": 33.0452039691, "line_max": 79, "alpha_frac": 0.5613523754, "autogenerated": false, "ratio": 4.437275470613594, "config_te...
"""A collection of functions designed to help I/O with ascii files. """ from __future__ import division, absolute_import, print_function __docformat__ = "restructuredtext en" import sys import numpy as np import numpy.core.numeric as nx from numpy.compat import asbytes, asunicode, bytes, asbytes_nested, basestring ...
{ "repo_name": "Eric89GXL/numpy", "path": "numpy/lib/_iotools.py", "copies": "15", "size": "32704", "license": "bsd-3-clause", "hash": -2698835629310235600, "line_mean": 33.3168940189, "line_max": 84, "alpha_frac": 0.5635396282, "autogenerated": false, "ratio": 4.45558583106267, "config_test": f...
#A collection of functions for dealing with Dadi models # A. Kern import dadi import numpy import scipy import pylab #import nlopt ######### Demographic stuff def OutOfAfricaGrowB((nuAf, nuEu0, nuEu, nuNA0, nuNA, TAf, TB, TEuNA, p_misid), (n1,n2,n3), pts): xx = dadi.Numerics.default_grid(pt...
{ "repo_name": "kern-lab/shanku_et_al", "path": "dadiStuff/dadiFunctions.py", "copies": "1", "size": "33020", "license": "mit", "hash": 8386585107928500000, "line_mean": 39.2682926829, "line_max": 114, "alpha_frac": 0.567383404, "autogenerated": false, "ratio": 2.504930966469428, "config_test": ...
# A collection of functions for processing, manipulating and calculating # necessary information from tensors # # Aim for unifiying the API among numpy, tensorflow and pytorch. # Since numpy is most popular framework, the function name is strictly # following numpy name and arguments. # # This software is released unde...
{ "repo_name": "imito/odin", "path": "odin/backend/tensor.py", "copies": "1", "size": "22253", "license": "mit", "hash": 5555192174463475000, "line_mean": 29.0716216216, "line_max": 80, "alpha_frac": 0.5900328046, "autogenerated": false, "ratio": 3.5066183422628425, "config_test": false, "has_...
""" A collection of functions for RSS feed parsing""" import discord from dateutil import parser import re from __main__ import botdata from bs4 import BeautifulSoup def is_new_blog(entry): """Takes the newest dota blog entry, and checks data against record returns a boolean updates blog entry if it is new""" new...
{ "repo_name": "mdiller/MangoByte", "path": "cogs/utils/rsstools.py", "copies": "1", "size": "1917", "license": "mit", "hash": 5920055542606382000, "line_mean": 29.9193548387, "line_max": 100, "alpha_frac": 0.710485133, "autogenerated": false, "ratio": 3.380952380952381, "config_test": false, ...
# A collection of functions relating to spacegroup symmetry information import re from cctbx import sgtbx from cctbx.sgtbx.bravais_types import bravais_lattice _int_re = re.compile("^[0-9]*$") def get_pointgroup(name): """Get the pointgroup for this spacegroup, e.g. P422 for P43212.""" space_group = sgtbx...
{ "repo_name": "xia2/xia2", "path": "src/xia2/Handlers/Syminfo.py", "copies": "1", "size": "2172", "license": "bsd-3-clause", "hash": 2179873679552812500, "line_mean": 23.6818181818, "line_max": 82, "alpha_frac": 0.6404235727, "autogenerated": false, "ratio": 3.4097331240188384, "config_test": f...
""" A collection of functions to assist with archiving/restoring epoch files. Epoch files are the few files which can change from one backup to the next and so must be date stamped to differentiate multiple backups from each other. Typically only archive_epoch_files and restore_epoch_files are called Copyr...
{ "repo_name": "tkuhlman/vertica-swift-backup", "path": "vertica_backup/epoch.py", "copies": "1", "size": "3058", "license": "mit", "hash": -5792982280293207000, "line_mean": 42.6857142857, "line_max": 102, "alpha_frac": 0.6899934598, "autogenerated": false, "ratio": 4.013123359580052, "config_t...
"""A collection of functions to summarize object information. This module provides several function which will help you to analyze object information which was gathered. Often it is sufficient to work with aggregated data instead of handling the entire set of existing objects. For example can a memory leak identified ...
{ "repo_name": "swiftstack/pympler", "path": "pympler/summary.py", "copies": "3", "size": "10768", "license": "apache-2.0", "hash": 3904276591235828700, "line_mean": 32.2345679012, "line_max": 79, "alpha_frac": 0.6029903418, "autogenerated": false, "ratio": 3.8650394831299355, "config_test": fal...
"""A collection of functions which act on surfaces or lists of surfaces.""" from collections import defaultdict from itertools import combinations from typing import Dict, List, Tuple, Union # noqa import warnings from eppy.bunch_subclass import EpBunch # noqa from eppy.idf_msequence import Idf_MSequence # noqa fro...
{ "repo_name": "jamiebull1/geomeppy", "path": "geomeppy/geom/surfaces.py", "copies": "1", "size": "7663", "license": "mit", "hash": -8191508465568749000, "line_mean": 37.315, "line_max": 119, "alpha_frac": 0.661490278, "autogenerated": false, "ratio": 3.427101967799642, "config_test": false, "...
'A collection of general purpose tools for reading files' # Copyright (c) 2008-2015 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause from __future__ import print_function import logging import zlib from collections import namedtuple from struct impor...
{ "repo_name": "deeplycloudy/MetPy", "path": "metpy/io/tools.py", "copies": "1", "size": "8391", "license": "bsd-3-clause", "hash": -1679596973043277300, "line_mean": 28.0346020761, "line_max": 91, "alpha_frac": 0.5780002384, "autogenerated": false, "ratio": 3.737639198218263, "config_test": fal...
"""A collection of helper/utility functions.""" import re from . import exceptions as ex API_ENDPOINT = 'https://api.emailhunter.co/v1/' EMAIL_URL = API_ENDPOINT + 'verify?email={0}&api_key={1}' DOMAIN_URL = (API_ENDPOINT + 'search?domain={0}&api_key={1}' '&offset={2}&type={3}') EMAIL_RE = re.compil...
{ "repo_name": "jgoodlet/punter", "path": "punter/helpers.py", "copies": "1", "size": "2663", "license": "mit", "hash": 5843302513730481000, "line_mean": 29.9651162791, "line_max": 71, "alpha_frac": 0.5846789335, "autogenerated": false, "ratio": 3.5131926121372032, "config_test": false, "has_n...
"""A collection of helpul utility functions for analysis of pypsych outputs.""" import pandas as pd import numpy as np def collapse_bins(df, prefixes): """Collapse (mean) any columns that start with each prefix.""" for prefix in prefixes: sel = [colname.startswith(prefix) for colname in df.columns] ...
{ "repo_name": "janmtl/pypsych", "path": "pypsych/utils.py", "copies": "1", "size": "1894", "license": "bsd-3-clause", "hash": -2243172058632679700, "line_mean": 32.2280701754, "line_max": 80, "alpha_frac": 0.6404435058, "autogenerated": false, "ratio": 3.3228070175438598, "config_test": false, ...
"""A collection of hemodynamic response functions. """ import numpy as np import nitime as nt import roi def double_gamma(self, width=32, a1=6.0, a2=12.0, b1=0.9, b2=0.9, c=0.35): """ Returns a HRF. Defaults are the canonical parameters. """ x_range = np.arange(0, width, self.TR) d1 = a1 * b1 d2...
{ "repo_name": "parenthetical-e/roi", "path": "hrfs.py", "copies": "1", "size": "2142", "license": "bsd-2-clause", "hash": -6316221245319187000, "line_mean": 29.6, "line_max": 75, "alpha_frac": 0.6209150327, "autogenerated": false, "ratio": 3.15, "config_test": false, "has_no_keywords": false,...
"""A collection of hemodynamic response functions.""" import numpy as np import scipy.stats as stats from modelmodel.misc import process_prng def double_gamma(width=32, TR=1, a1=6.0, a2=12., b1=0.9, b2=0.9, c=0.35): """ Returns a HRF. Defaults are the canonical parameters. """ x_range = np.arange(0,...
{ "repo_name": "parenthetical-e/modelmodel", "path": "hrf.py", "copies": "1", "size": "1556", "license": "bsd-2-clause", "hash": 4385524596475131000, "line_mean": 24.9333333333, "line_max": 100, "alpha_frac": 0.5893316195, "autogenerated": false, "ratio": 2.5976627712854756, "config_test": false...
"""A collection of hemodynamic response functions.""" import numpy as np import scipy.stats as stats def double_gamma(width=32, TR=1, a1=6.0, a2=12., b1=0.9, b2=0.9, c=0.35): """ Returns a HRF. Defaults are the canonical parameters. """ x_range = np.arange(0,width,TR) d1 = a1*b1 ...
{ "repo_name": "parenthetical-e/simfMRI", "path": "hrf.py", "copies": "1", "size": "2066", "license": "bsd-2-clause", "hash": -6016286430809220000, "line_mean": 30.7846153846, "line_max": 80, "alpha_frac": 0.6030977735, "autogenerated": false, "ratio": 3.398026315789474, "config_test": false, ...
## A collection of important functions #---------------------------------------------------------------------- # The idea is to collect all tasks in separate (small) functions to # clearly arange the code. ## Import modules #---------------------------------------------------------------------- import sys import pdb ...
{ "repo_name": "Steffen1989/GenPipeMesh", "path": "nek_utils.py", "copies": "1", "size": "116398", "license": "mit", "hash": 3198261230777750000, "line_mean": 49.0176192523, "line_max": 116, "alpha_frac": 0.4593310479, "autogenerated": false, "ratio": 2.880608835540156, "config_test": false, "...
"A collection of individuals with fixed relationships" import numpy as np from pydigree.paths import fraternity from pydigree.common import table from pydigree.population import Population class Pedigree(Population): "A collection of individuals with fixed relationships" def __init__(self, label=None):...
{ "repo_name": "jameshicks/pydigree", "path": "pydigree/pedigree.py", "copies": "1", "size": "8471", "license": "apache-2.0", "hash": -3853741909646653000, "line_mean": 32.6150793651, "line_max": 79, "alpha_frac": 0.5774997049, "autogenerated": false, "ratio": 3.875114364135407, "config_test": f...
""" A collection of input methods that aren't necessarily buttons """ from rcfc.server import register_post_with_state, register_post_with_input from rcfc.groups import convertGroup class DIRECTIONAL: LEFT = "left" RIGHT = "right" def slider(text, getter, input_range=(0, 100), group=None): min_value, m...
{ "repo_name": "pviafore/rcfc", "path": "rcfc/input_methods.py", "copies": "1", "size": "1204", "license": "mit", "hash": 5777970101391696000, "line_mean": 25.1739130435, "line_max": 74, "alpha_frac": 0.5863787375, "autogenerated": false, "ratio": 3.8222222222222224, "config_test": false, "has...
"""A collection of internal helper routines. .. note:: This module is intended for the internal use in python-icat and is not considered to be part of the API. No effort will be made to keep anything in here compatible between different versions. >>> name = 'rbeck' >>> qps = simpleqp_quote(name) >>> qps 'rb...
{ "repo_name": "icatproject/python-icat", "path": "icat/helper.py", "copies": "1", "size": "6371", "license": "apache-2.0", "hash": 776423161089985900, "line_mean": 29.4832535885, "line_max": 80, "alpha_frac": 0.5499921519, "autogenerated": false, "ratio": 3.7432432432432434, "config_test": fals...
"""A collection of (internal usage) utils for rewriting and propagation in the hierarchy.""" import copy import networkx as nx import warnings from regraph.category_op import (compose, compose_chain, compose_relation_dicts, ...
{ "repo_name": "eugeniashurko/ReGraph", "path": "regraph/rewriting_utils.py", "copies": "1", "size": "23150", "license": "mit", "hash": -8266582680949082000, "line_mean": 40.9384057971, "line_max": 92, "alpha_frac": 0.4722678186, "autogenerated": false, "ratio": 4.323870003735525, "config_test":...
"""A collection of (internal usage) utils for rewriting in the hierarchy.""" import time import copy import networkx as nx import warnings from regraph.networkx.category_utils import (compose, compose_chain, compose_relation_dict...
{ "repo_name": "Kappa-Dev/ReGraph", "path": "regraph/backends/networkx/utils/rewriting_utils.py", "copies": "1", "size": "45802", "license": "mit", "hash": -8376607582227996000, "line_mean": 45.3114256825, "line_max": 89, "alpha_frac": 0.429260731, "autogenerated": false, "ratio": 4.50452399685287...
"""A collection of (internal usage) utils for rule type checking.""" import networkx as nx from networkx.exception import NetworkXNoPath from regraph.category_op import check_homomorphism from regraph.exceptions import RewritingError from regraph.utils import keys_by_value, format_typing def _autocomplete_typing(hie...
{ "repo_name": "eugeniashurko/ReGraph", "path": "regraph/rule_type_checking.py", "copies": "1", "size": "10746", "license": "mit", "hash": -6691866400532814000, "line_mean": 47.8454545455, "line_max": 84, "alpha_frac": 0.4536571748, "autogenerated": false, "ratio": 4.561120543293718, "config_tes...
"""A collection of marathon-related utils """ # future imports from __future__ import absolute_import # third-party imports import requests # local imports from .deployment import DeploymentNotFound from .deployment import MarathonDeployment from shpkpr import exceptions class ClientError(exceptions.ShpkprException...
{ "repo_name": "shopkeep/shpkpr", "path": "shpkpr/marathon/client.py", "copies": "1", "size": "5601", "license": "mit", "hash": -5074475384342780000, "line_mean": 36.5906040268, "line_max": 102, "alpha_frac": 0.6207820032, "autogenerated": false, "ratio": 4.262557077625571, "config_test": false,...
""" A collection of methods for handling data gathered through the StackExchange API. Includes methods for extracting metric data from StackExchange JSON archives, and methods for putting that data in to a MySQL database. """ import json import pymysql import model import numpy as np # List of fields...
{ "repo_name": "nrpeterson/mse-closure-predictor", "path": "cleandata.py", "copies": "1", "size": "6918", "license": "mit", "hash": -3693528262514935300, "line_mean": 38.3068181818, "line_max": 205, "alpha_frac": 0.611303845, "autogenerated": false, "ratio": 3.599375650364204, "config_test": fal...
"""A collection of methods for training a classifier to predict whether posts from Mathematics.StackExchange will be closed due to 'lack of context', and for using that model to make predictions. """ import numpy as np from scipy.special import expit as sigmoid from sklearn.preprocessing import StandardScaler ...
{ "repo_name": "nrpeterson/mse-closure-predictor", "path": "model.py", "copies": "1", "size": "2936", "license": "mit", "hash": 5167383461531173000, "line_mean": 30.5698924731, "line_max": 81, "alpha_frac": 0.670640327, "autogenerated": false, "ratio": 3.842931937172775, "config_test": false, ...
"""A collection of miscellaneous functions to operate on iterables The pairwise function is different from the recipe version in that it is an explicit generator that walks the iterable in order to avoid tee. The partition function is different from the recipe version in that it returns lists instead of generators as...
{ "repo_name": "nxdevel/nx_itertools", "path": "nx_itertools/extra.py", "copies": "1", "size": "7606", "license": "mit", "hash": -1651712514886710500, "line_mean": 29.424, "line_max": 79, "alpha_frac": 0.6301603997, "autogenerated": false, "ratio": 4.747815230961298, "config_test": false, "has...
"""a collection of model-related helper classes and functions""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from datetime import datetime import json import re from flask import escape, Markup from flask_appbuild...
{ "repo_name": "alanmcruickshank/superset-dev", "path": "superset/models/helpers.py", "copies": "1", "size": "5135", "license": "apache-2.0", "hash": -8360271160628011000, "line_mean": 28.5114942529, "line_max": 79, "alpha_frac": 0.600194742, "autogenerated": false, "ratio": 3.925840978593272, "...
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
{ "repo_name": "ppyordanov/HCI_4_Future_Cities", "path": "Server/src/virtualenv/Lib/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py", "copies": "1", "size": "3408", "license": "mit", "hash": 8366273855690885000, "line_mean": 42.1392405063, "line_max": 79, "alpha_frac": 0.6813380282, "aut...
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.tree...
{ "repo_name": "bbondy/brianbondy.gae", "path": "libs/html5lib/treebuilders/__init__.py", "copies": "1", "size": "4473", "license": "mit", "hash": 1301685314238968000, "line_mean": 46.6195652174, "line_max": 94, "alpha_frac": 0.6317907445, "autogenerated": false, "ratio": 5.06568516421291, "conf...
"""A collection of modules for building different kinds of trees from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1. A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of ``base....
{ "repo_name": "ncos/lisa", "path": "src/lisa_drive/scripts/venv/lib/python3.5/site-packages/pip-10.0.1-py3.5.egg/pip/_vendor/html5lib/treebuilders/__init__.py", "copies": "6", "size": "3680", "license": "mit", "hash": -1848524000907628300, "line_mean": 39.8181818182, "line_max": 83, "alpha_frac": 0.6...
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
{ "repo_name": "mindw/html5lib-python", "path": "html5lib/treewalkers/__init__.py", "copies": "1", "size": "5558", "license": "mit", "hash": -6386479822638438000, "line_mean": 37.8671328671, "line_max": 94, "alpha_frac": 0.5269881252, "autogenerated": false, "ratio": 4.858391608391608, "config_t...
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method tak...
{ "repo_name": "neoscoin/neos-core", "path": "src/ledger/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py", "copies": "5", "size": "5868", "license": "mit", "hash": -8752658690270540000, "line_mean": 36.1038961039, "line_max": 94, "alpha_frac": 0.5252215406, "autogenerated": ...
"""A collection of native images. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import errno import glob import io import logging import os import pwd import shutil import stat from treadmill import appcfg from...
{ "repo_name": "captiosus/treadmill", "path": "treadmill/runtime/linux/image/native.py", "copies": "1", "size": "13416", "license": "apache-2.0", "hash": 818338753708417000, "line_mean": 30.5670588235, "line_max": 78, "alpha_frac": 0.5977191413, "autogenerated": false, "ratio": 3.400760456273764, ...
"""A collection of native images. """ import errno import glob import logging import os import pwd import shutil import stat import treadmill from treadmill import appcfg from treadmill import cgroups from treadmill import fs from treadmill import runtime from treadmill import subproc from treadmill import superviso...
{ "repo_name": "keithhendry/treadmill", "path": "treadmill/runtime/linux/image/native.py", "copies": "2", "size": "15443", "license": "apache-2.0", "hash": -8597321526959865000, "line_mean": 30.1350806452, "line_max": 78, "alpha_frac": 0.5984588487, "autogenerated": false, "ratio": 3.3491650401214...
# a collection of non-class routines that perform operations on a list # of images import math # return the bounds of the rectangle spanned by the provided list of # images def coverage(image_list): xmin = None; xmax = None; ymin = None; ymax = None for image in image_list: (x0, y0, x1, y1) = image.co...
{ "repo_name": "UASLab/ImageAnalysis", "path": "scripts/lib/image_list.py", "copies": "1", "size": "2956", "license": "mit", "hash": 1103809903412203100, "line_mean": 29.1632653061, "line_max": 82, "alpha_frac": 0.5953991881, "autogenerated": false, "ratio": 2.845043310875842, "config_test": fal...
"""A collection of non-environment specific tools""" import sys import os from robofab.objects.objectsRF import RInfo if sys.platform == "darwin" and sys.version_info[:3] == (2, 2, 0): # the Mac support of Jaguar's Python 2.2 is broken have_broken_macsupport = 1 else: have_broken_macsupport = 0 def readGlyphCon...
{ "repo_name": "adrientetar/robofab", "path": "Lib/robofab/tools/toolsAll.py", "copies": "1", "size": "3934", "license": "bsd-3-clause", "hash": -5750262888277025000, "line_mean": 26.7112676056, "line_max": 92, "alpha_frac": 0.6820030503, "autogenerated": false, "ratio": 2.8883994126284875, "con...
## A Collection of NURBS curve utility functions ## J Eisenmann ## ACCAD, The Ohio State University ## 2012-13 from math import * from Vector import * import maya.cmds as mc import maya.mel as mm mc.loadPlugin("closestPointOnCurve", quiet=True) def drawLine(pt1, pt2): try: # if pt1 and pt2 are Vectors ...
{ "repo_name": "jeisenma/traceSelectionInMaya", "path": "scripts/curveUtil.py", "copies": "1", "size": "11555", "license": "mit", "hash": -4355680436437923300, "line_mean": 38.5719178082, "line_max": 134, "alpha_frac": 0.5864993509, "autogenerated": false, "ratio": 3.2330721880246225, "config_te...
"""A collection of ORM sqlalchemy models for Caravel""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import functools import json import logging import re import textwrap from collections import namedtuple...
{ "repo_name": "wbsljh/caravel", "path": "caravel/models.py", "copies": "1", "size": "73950", "license": "apache-2.0", "hash": -1222798785848183600, "line_mean": 34.0312648034, "line_max": 113, "alpha_frac": 0.5446382691, "autogenerated": false, "ratio": 3.975165295920013, "config_test": false, ...
"""A collection of ORM sqlalchemy models for Caravel""" from copy import deepcopy, copy from collections import namedtuple from datetime import timedelta, datetime, date import functools import json import logging from six import string_types import sqlparse import requests from dateutil.parser import parse from flas...
{ "repo_name": "thebucknerlife/caravel", "path": "caravel/models.py", "copies": "1", "size": "42278", "license": "apache-2.0", "hash": -5922760950915400000, "line_mean": 32.795363709, "line_max": 86, "alpha_frac": 0.5552769762, "autogenerated": false, "ratio": 4.04032874617737, "config_test": fa...
"""A collection of ORM sqlalchemy models for SQL Lab""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from datetime import datetime import re from flask import Markup from flask_appbuilder import Model from future.s...
{ "repo_name": "alanmcruickshank/superset-dev", "path": "superset/models/sql_lab.py", "copies": "1", "size": "5286", "license": "apache-2.0", "hash": -5829946089397358000, "line_mean": 33.3246753247, "line_max": 74, "alpha_frac": 0.6208853575, "autogenerated": false, "ratio": 3.7838224767358626, ...
"""A collection of ORM sqlalchemy models for Superset""" #-*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools import json import logging import numpy import pickle import textwrap fro...
{ "repo_name": "BRD-CD/superset", "path": "superset/models/core.py", "copies": "1", "size": "29305", "license": "apache-2.0", "hash": 2701986638010991600, "line_mean": 33.4359576968, "line_max": 79, "alpha_frac": 0.5978501962, "autogenerated": false, "ratio": 3.926705078386708, "config_test": fa...
"""A collection of ORM sqlalchemy models for Superset""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from copy import copy, deepcopy from datetime import date, datetime import functools import json import logging i...
{ "repo_name": "alanmcruickshank/superset-dev", "path": "superset/models/core.py", "copies": "1", "size": "33495", "license": "apache-2.0", "hash": -8313337820049135000, "line_mean": 34.1469045121, "line_max": 86, "alpha_frac": 0.5986863711, "autogenerated": false, "ratio": 3.944765045342127, "c...
"""A collection of pandas data interfaces to a project instance.""" from __future__ import absolute_import import os.path as osp from glob import glob import warnings try: import pandas as pd except ImportError: raise ImportError('The pandas package is required for this plugin. ' 'Try pip...
{ "repo_name": "mwort/modelmanager", "path": "modelmanager/plugins/pandas.py", "copies": "1", "size": "7825", "license": "bsd-3-clause", "hash": 2659019043254886000, "line_mean": 32.7284482759, "line_max": 79, "alpha_frac": 0.5640894569, "autogenerated": false, "ratio": 4.193461950696677, "confi...
"""A collection of python stylers""" import re month_fullnames = { 1: "January", 2: "February", 3: "March", 4: "April", 5: "May", 6: "June", 7: "July", 8: "August", 9: "September", 10: "October", 11: "November", 12: "December", } month_threelets = { 1: "Jan", 2:...
{ "repo_name": "scopatz/regolith", "path": "regolith/stylers.py", "copies": "1", "size": "1321", "license": "cc0-1.0", "hash": 4253193127407000600, "line_mean": 19.3230769231, "line_max": 78, "alpha_frac": 0.5162755488, "autogenerated": false, "ratio": 3.31077694235589, "config_test": false, "...
"""A collection of random tools for dealing with dates in Python. .. deprecated:: 0.19.0 Use pandas.tseries module instead. """ # flake8: noqa import warnings from pandas.core.tools.datetimes import * from pandas.tseries.offsets import * from pandas.tseries.frequencies import * warnings.warn("The pandas.core.d...
{ "repo_name": "louispotok/pandas", "path": "pandas/core/datetools.py", "copies": "4", "size": "1494", "license": "bsd-3-clause", "hash": 5319722831966819000, "line_mean": 26.1636363636, "line_max": 75, "alpha_frac": 0.7510040161, "autogenerated": false, "ratio": 3.4187643020594964, "config_test...
"""A collection of random tools for dealing with dates in Python""" # flake8: noqa from pandas.tseries.tools import * from pandas.tseries.offsets import * from pandas.tseries.frequencies import * day = DateOffset() bday = BDay() businessDay = bday try: cday = CDay() customBusinessDay = CustomBusinessDay() ...
{ "repo_name": "BigDataforYou/movie_recommendation_workshop_1", "path": "big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/core/datetools.py", "copies": "2", "size": "1190", "license": "mit", "hash": 4299396511536654000, "line_mean": 25.4444444444, "line_max": 67, "alpha_frac": 0.767226890...
"""A collection of random tools for dealing with dates in Python""" # flake8: noqa import warnings from pandas.core.tools.datetimes import * from pandas.tseries.offsets import * from pandas.tseries.frequencies import * warnings.warn("The pandas.core.datetools module is deprecated and will be " "remove...
{ "repo_name": "jmmease/pandas", "path": "pandas/core/datetools.py", "copies": "16", "size": "1429", "license": "bsd-3-clause", "hash": -4846069132785568000, "line_mean": 27.0196078431, "line_max": 75, "alpha_frac": 0.755073478, "autogenerated": false, "ratio": 3.4350961538461537, "config_test":...
"""A collection of random tools for dealing with dates in Python""" # flake8: noqa import warnings from pandas.tseries.tools import * from pandas.tseries.offsets import * from pandas.tseries.frequencies import * warnings.warn("The pandas.core.datetools module is deprecated and will be " "removed in a ...
{ "repo_name": "andyraib/data-storage", "path": "python_scripts/env/lib/python3.6/site-packages/pandas/core/datetools.py", "copies": "7", "size": "1422", "license": "apache-2.0", "hash": -3057795233297330700, "line_mean": 26.8823529412, "line_max": 75, "alpha_frac": 0.7545710267, "autogenerated": fa...
"""A collection of random tools for dealing with dates in Python""" from pandas.tseries.tools import * from pandas.tseries.offsets import * from pandas.tseries.frequencies import * day = DateOffset() bday = BDay() businessDay = bday try: cday = CDay() customBusinessDay = CustomBusinessDay() customBusiness...
{ "repo_name": "sauloal/cnidaria", "path": "scripts/venv/lib/python2.7/site-packages/pandas/core/datetools.py", "copies": "6", "size": "1729", "license": "mit", "hash": -7689920604292522000, "line_mean": 26.4444444444, "line_max": 74, "alpha_frac": 0.7004048583, "autogenerated": false, "ratio": 3....
"""A collection of random tools for dealing with dates in Python""" from datetime import datetime, timedelta from dateutil import parser from dateutil.relativedelta import relativedelta import calendar #------------------------------------------------------------------------------- # Miscellaneous date func...
{ "repo_name": "willgrass/pandas", "path": "pandas/core/datetools.py", "copies": "1", "size": "19053", "license": "bsd-3-clause", "hash": -2739760356557671400, "line_mean": 28.9804878049, "line_max": 80, "alpha_frac": 0.5440088175, "autogenerated": false, "ratio": 3.9083076923076923, "config_tes...
# a collection of sample visualization functions # for binding to plotnode import matplotlib.pyplot as plt import numpy as np def viz_square(data, normalize=True, cmap=plt.cm.gray, padsize=1, padval=0): """ takes a np.ndarray of shape (n, height, width) or (n, height, width, channels) visualize each (heig...
{ "repo_name": "ericjang/tdb", "path": "tdb/examples/viz.py", "copies": "1", "size": "2019", "license": "apache-2.0", "hash": 3068488024545575400, "line_mean": 34.4210526316, "line_max": 105, "alpha_frac": 0.6478454681, "autogenerated": false, "ratio": 2.888412017167382, "config_test": false, ...
"""A collection of sensors helpers.""" import math import numpy as np import carla class Sensor(object): """Base class for wrapping sensors.""" def __init__(self, parent_actor: carla.Actor, transform=carla.Transform(), attachment_type=None, attributes: dict = None): self.parent = par...
{ "repo_name": "reinforceio/tensorforce", "path": "tensorforce/environments/carla/sensors.py", "copies": "1", "size": "15700", "license": "apache-2.0", "hash": -559809156252893300, "line_mean": 36.6498800959, "line_max": 123, "alpha_frac": 0.5924840764, "autogenerated": false, "ratio": 4.068411505...
"""A collection of shared utilities for all encoders, not intended for external use.""" import pandas as pd import numpy as np from scipy.sparse.csr import csr_matrix __author__ = 'willmcginnis' def convert_cols_to_list(cols): if isinstance(cols, pd.Series): return cols.tolist() elif isinstance(cols...
{ "repo_name": "wdm0006/categorical_encoding", "path": "category_encoders/utils.py", "copies": "1", "size": "5083", "license": "bsd-3-clause", "hash": -929589737662242600, "line_mean": 36.375, "line_max": 139, "alpha_frac": 0.615974818, "autogenerated": false, "ratio": 3.8017950635751685, "confi...
"""A collection of string constants. Public module variables: whitespace -- a string containing all ASCII whitespace ascii_lowercase -- a string containing all ASCII lowercase letters ascii_uppercase -- a string containing all ASCII uppercase letters ascii_letters -- a string containing all ASCII letters digits -- a ...
{ "repo_name": "Reflexe/doc_to_pdf", "path": "Windows/program/python-core-3.5.0/lib/string.py", "copies": "5", "size": "11854", "license": "mpl-2.0", "hash": -5982963243501532000, "line_mean": 37.2387096774, "line_max": 85, "alpha_frac": 0.5656318542, "autogenerated": false, "ratio": 4.50379939209...
"""A collection of string operations (most are no longer used in Python 1.6). Warning: most of the code you see here isn't normally used nowadays. With Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.3/Lib/string.py", "copies": "3", "size": "11367", "license": "mit", "hash": -901562446709140200, "line_mean": 28.7565445026, "line_max": 77, "alpha_frac": 0.6832057711, "autogenerated": false, "ratio": 3....
"""A collection of string operations (most are no longer used). Warning: most of the code you see here isn't normally used nowadays. Beginning with Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop is n...
{ "repo_name": "albertjan/pypyjs-presentation", "path": "assets/js/pypy.js-0.3.1/lib/modules/string.py", "copies": "6", "size": "20817", "license": "unlicense", "hash": 8104984555131726000, "line_mean": 31.3748055988, "line_max": 81, "alpha_frac": 0.6284767258, "autogenerated": false, "ratio": 4.1...
"""A collection of TAR images.""" import hashlib import logging import os import shutil import tarfile import tempfile import urllib.parse import requests import requests_kerberos from . import _image_base from . import _repository_base from . import native from treadmill import fs _LOGGER = logging.getLogger(__...
{ "repo_name": "gaocegege/treadmill", "path": "treadmill/runtime/linux/image/tar.py", "copies": "3", "size": "3085", "license": "apache-2.0", "hash": 4117737456166516700, "line_mean": 26.5446428571, "line_max": 79, "alpha_frac": 0.6087520259, "autogenerated": false, "ratio": 3.533791523482245, "...
"""A collection of TAR images. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import hashlib import io import logging import os import shutil import tarfile import tempfile import requests import requests_kerber...
{ "repo_name": "captiosus/treadmill", "path": "treadmill/runtime/linux/image/tar.py", "copies": "1", "size": "3266", "license": "apache-2.0", "hash": -3270221878946797600, "line_mean": 26.4453781513, "line_max": 79, "alpha_frac": 0.6172688304, "autogenerated": false, "ratio": 3.5538628944504898, ...
"""A collection of text rendering functions""" def write(s,font,pos,color,text,border=1): """Write text to a surface with a black border""" # Render the text in black, at various offsets to fake a border tmp = font.render(text,1,(0,0,0)) dirs = [(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)] f...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/pgu/text.py", "copies": "1", "size": "2390", "license": "epl-1.0", "hash": 6731692508059365000, "line_mean": 29.641025641, "line_max": 73, "alpha_frac": 0.5171548117, "autogenerated": false, "ratio": 3.3661971830985915, ...
"""A collection of tools for analysing a pdb file. Helper module for the biostructmap package. """ from __future__ import absolute_import, division, print_function from collections import defaultdict from Bio.SeqIO import PdbIO from Bio.SeqUtils import seq1 from Bio.Data.SCOPData import protein_letters_3to1 from Bio....
{ "repo_name": "andrewguy/biostructmap", "path": "biostructmap/pdbtools.py", "copies": "1", "size": "14755", "license": "mit", "hash": 6308888892342810000, "line_mean": 38.8783783784, "line_max": 96, "alpha_frac": 0.6147746527, "autogenerated": false, "ratio": 3.6128795298726737, "config_test": ...
""" A collection of tools for manipulating Numpy arrays This module contains a number of convenience routines for common manipulations of data stored in 1-D and 2-D arrays. """ from math import floor import numpy as np def find_indices(lats, lons, lat0, lon0, dlat, dlon, nrows, ncols): """Find row an...
{ "repo_name": "sahg/SAHGutils", "path": "sahgutils/io/arraytools.py", "copies": "1", "size": "11695", "license": "bsd-3-clause", "hash": 6955921947869257000, "line_mean": 34.6614420063, "line_max": 79, "alpha_frac": 0.5415989739, "autogenerated": false, "ratio": 4.1325088339222615, "config_test...
"""A collection of tools for rendering information about xml (typically errors)""" from __future__ import unicode_literals from __future__ import print_function def extract_lines(code, line, padding=2): """Extracts a number of lines from code surrounding a given line number, returns a list of tuples that cont...
{ "repo_name": "moyaproject/moya", "path": "moya/xmlreport.py", "copies": "1", "size": "3639", "license": "mit", "hash": -238926830751329000, "line_mean": 30.6434782609, "line_max": 92, "alpha_frac": 0.5902720528, "autogenerated": false, "ratio": 3.3725671918443, "config_test": false, "has_no_...
"""A collection of tools for various purely Python operations""" from random import Random import itertools import string # In theory should be few to no imports outside perhaps stdlib here def rands(n): """Generates a random alphanumeric string of length *n*""" return ''.join(Random().sample(string....
{ "repo_name": "willgrass/pandas", "path": "pandas/core/pytools.py", "copies": "1", "size": "2985", "license": "bsd-3-clause", "hash": 1512231176301478000, "line_mean": 25.1363636364, "line_max": 80, "alpha_frac": 0.5353433836, "autogenerated": false, "ratio": 3.83183568677792, "config_test": fa...
"""A collection of tools, tips, and tricks. 2009-07-20 22:36 IJC: Created 2010-10-28 11:53 IJMC: Updated documentation for Sphinx. 2011-06-15 09:34 IJMC: More functions have been added; cleaned documentation. """ import pdb import numpy as np def getfigs(): """Return a list of all open matplotlib figures. ...
{ "repo_name": "iancrossfield/aries_reduce", "path": "tools.py", "copies": "1", "size": "148551", "license": "mit", "hash": -2529292207197001000, "line_mean": 30.0971320913, "line_max": 241, "alpha_frac": 0.5617397392, "autogenerated": false, "ratio": 3.3973150985683573, "config_test": false, ...
"""A collection of tools to handle genomic tests, in particular Tajima's D. Part of the biostructmap package. """ from __future__ import absolute_import, division, print_function from io import StringIO import warnings from math import log from Bio import AlignIO from Bio.Data import IUPACData from numpy import mean ...
{ "repo_name": "andrewguy/biostructmap", "path": "biostructmap/gentests.py", "copies": "1", "size": "12715", "license": "mit", "hash": -7670846991746990000, "line_mean": 37.0688622754, "line_max": 89, "alpha_frac": 0.6528509634, "autogenerated": false, "ratio": 4.134959349593496, "config_test": ...
'''A collection of tools to handle sequence manipulation. Part of the biostructmap package. ''' from __future__ import absolute_import, division, print_function from io import StringIO import operator import re import subprocess import tempfile import warnings from Bio import AlignIO from Bio.Blast.Applications import...
{ "repo_name": "andrewguy/biostructmap", "path": "biostructmap/seqtools.py", "copies": "1", "size": "23316", "license": "mit", "hash": -6866793555426456000, "line_mean": 38.5186440678, "line_max": 97, "alpha_frac": 0.6145565277, "autogenerated": false, "ratio": 3.939844542075025, "config_test": ...
"""A collection of tools to handle tests over protein multiple sequence alignments. Part of the biostructmap package. """ from __future__ import absolute_import, division, print_function from io import StringIO import warnings from math import log from Bio import AlignIO from Bio.Data import IUPACData from numpy impo...
{ "repo_name": "andrewguy/biostructmap", "path": "biostructmap/protein_tests.py", "copies": "1", "size": "2417", "license": "mit", "hash": -5550801350473491000, "line_mean": 42.9454545455, "line_max": 89, "alpha_frac": 0.6628051303, "autogenerated": false, "ratio": 4.3707052441229655, "config_te...
# a collection of turtle generation functions # not meant to be run directly # only contains functions related to rdflib.Graph manipulation # only nonspecific stuff: shouldn't contain any functions directly related # to data structure(rdf triple organization) of the modules you're dev'ing import config from middleware...
{ "repo_name": "superphy/backend", "path": "app/middleware/graphers/turtle_grapher.py", "copies": "1", "size": "5520", "license": "apache-2.0", "hash": -4459132450892370000, "line_mean": 45.3865546218, "line_max": 142, "alpha_frac": 0.6802536232, "autogenerated": false, "ratio": 3.495883470550982,...