text
stringlengths
0
1.05M
meta
dict
"""Algorithms for computing symbolic roots of polynomials.""" import functools import math from ..core import (Dummy, Eq, Float, I, Integer, Rational, Symbol, comp, factor_terms, pi, symbols) from ..core.mul import expand_2arg from ..core.sympify import sympify from ..domains.compositedomain impor...
{ "repo_name": "diofant/diofant", "path": "diofant/polys/polyroots.py", "copies": "1", "size": "28966", "license": "bsd-3-clause", "hash": 6566477803474561000, "line_mean": 27.3702252693, "line_max": 89, "alpha_frac": 0.5167437686, "autogenerated": false, "ratio": 3.179582875960483, "config_test...
'''Algorithms for converting grammars to Chomsky Normal Form.''' from cfg.core import ContextFreeGrammar, Terminal, Nonterminal, \ ProductionRule, SubscriptedNonterminal from util.moreitertools import powerset def is_cnf_rule(r, start): '''Return whether a production rule is in CNF. Must indi...
{ "repo_name": "bdusell/pycfg", "path": "src/cfg/cnf.py", "copies": "1", "size": "5697", "license": "mit", "hash": 3390698130314284000, "line_mean": 35.5192307692, "line_max": 79, "alpha_frac": 0.5961032122, "autogenerated": false, "ratio": 3.8260577568838148, "config_test": false, "has_no_key...
"""Algorithms for determination of Laue group symmetry.""" import json import logging import math import scipy.stats import libtbx from cctbx import crystal, sgtbx from scitbx.array_family import flex from scitbx.math import five_number_summary import dials.util from dials.algorithms.symmetry import symmetry_base ...
{ "repo_name": "dials/dials", "path": "algorithms/symmetry/laue_group.py", "copies": "1", "size": "30298", "license": "bsd-3-clause", "hash": 2961777214921668600, "line_mean": 35.7694174757, "line_max": 89, "alpha_frac": 0.5561753251, "autogenerated": false, "ratio": 3.6715947649054774, "config_...
"""Algorithms for finding cut vertices and cut edges from undirected graph. Cut vertex or cut edge is a vertex or edge of which removal will disconnect the graph. Time complexity: O(V + E) """ from algolib.graph.dfs import DFS def __process_early(_graph, dfs, vertex): dfs[vertex].reachable_ancestor = vertex d...
{ "repo_name": "niemmi/algolib", "path": "algolib/graph/cut.py", "copies": "1", "size": "2846", "license": "bsd-3-clause", "hash": 4563371950588936000, "line_mean": 26.1047619048, "line_max": 80, "alpha_frac": 0.6152494729, "autogenerated": false, "ratio": 3.6913099870298316, "config_test": fals...
"""Algorithms for generating prototypes. A prototype algorithm is a callable with the signature: prototypes = algorithm(num_prototypes, model, make_training_exp, pool, progress=None) where `images` is a generator of image paths. See also :func:`glimpse.experiment.MakePrototypes`. """ # Copyright (c) 2011-2013 Mi...
{ "repo_name": "mthomure/glimpse-project", "path": "glimpse/experiment/prototype_algorithms.py", "copies": "1", "size": "9119", "license": "mit", "hash": 6471195121129637000, "line_mean": 33.938697318, "line_max": 88, "alpha_frac": 0.7210220419, "autogenerated": false, "ratio": 3.559328649492584, ...
"""Algorithms for indexing.""" import numpy as np from recordlinkage.measures import full_index_size def _map_tril_1d_on_2d(indices, dims): """Map 1d indices on lower triangular matrix in 2d. """ N = (dims * dims - dims) / 2 m = np.ceil(np.sqrt(2 * N)) c = m - np.round(np.sqrt(2 * (N - indices))) ...
{ "repo_name": "J535D165/recordlinkage", "path": "recordlinkage/algorithms/indexing.py", "copies": "1", "size": "3274", "license": "bsd-3-clause", "hash": -3362676591491719700, "line_mean": 29.5981308411, "line_max": 74, "alpha_frac": 0.6365302382, "autogenerated": false, "ratio": 3.49786324786324...
"""Algorithms for manipulating BibTeX data. This module implements various algorithms supplied by BibTeX to style files, as well as some algorithms to make BibTeX data more accessible to Python. """ __all__ = ('Name parse_names ' + 'parse_month ' + 'title_case ' + 'TeXProcessor TeXToU...
{ "repo_name": "ajbouh/tfi", "path": "src/tfi/parse/biblib/algo.py", "copies": "2", "size": "17807", "license": "mit", "hash": 4353573591234447400, "line_mean": 35.6494845361, "line_max": 113, "alpha_frac": 0.5139803094, "autogenerated": false, "ratio": 4.022403258655804, "config_test": false, ...
"""Algorithms for partial fraction decomposition of rational functions. """ from __future__ import print_function, division from sympy.core import S, Add, sympify, Function, Lambda, Dummy from sympy.core.basic import preorder_traversal from sympy.core.compatibility import range from sympy.polys import Poly, RootSum, ...
{ "repo_name": "kaushik94/sympy", "path": "sympy/polys/partfrac.py", "copies": "2", "size": "14755", "license": "bsd-3-clause", "hash": 8209638807654570000, "line_mean": 28.6285140562, "line_max": 104, "alpha_frac": 0.5609623856, "autogenerated": false, "ratio": 3.3942949160340463, "config_test"...
"""Algorithms for partial fraction decomposition of rational functions. """ from __future__ import print_function, division from sympy.polys import Poly, RootSum, cancel, factor from sympy.polys.polytools import parallel_poly_from_expr from sympy.polys.polyoptions import allowed_flags, set_defaults from sympy.polys.p...
{ "repo_name": "lidavidm/sympy", "path": "sympy/polys/partfrac.py", "copies": "9", "size": "13809", "license": "bsd-3-clause", "hash": -4670793405576447000, "line_mean": 28.0105042017, "line_max": 104, "alpha_frac": 0.5534796147, "autogenerated": false, "ratio": 3.368048780487805, "config_test":...
"""Algorithms for partial fraction decomposition of rational functions. """ from sympy.polys import Poly, RootSum, cancel, factor from sympy.polys.polytools import parallel_poly_from_expr from sympy.polys.polyoptions import allowed_flags, set_defaults from sympy.core import S, Add, sympify, Function, Lambda, Dummy fr...
{ "repo_name": "amitjamadagni/sympy", "path": "sympy/polys/partfrac.py", "copies": "2", "size": "12158", "license": "bsd-3-clause", "hash": 8859705591683495000, "line_mean": 27.4065420561, "line_max": 104, "alpha_frac": 0.5635795361, "autogenerated": false, "ratio": 3.300217155266015, "config_te...
"""Algorithms for partial fraction decomposition of rational functions. """ from sympy.polys import Poly, RootSum, cancel, factor from sympy.polys.polytools import parallel_poly_from_expr from sympy.core import S, Add, sympify, Symbol, Function, Lambda, Dummy from sympy.utilities import numbered_symbols, take, thread...
{ "repo_name": "Cuuuurzel/KiPyCalc", "path": "sympy_old/polys/partfrac.py", "copies": "2", "size": "4192", "license": "mit", "hash": 8503107723532895000, "line_mean": 24.717791411, "line_max": 80, "alpha_frac": 0.5591603053, "autogenerated": false, "ratio": 3.4109031733116355, "config_test": fal...
"""Algorithms for partial fraction decomposition of rational functions.""" import itertools from ..core import Add, Dummy, Function, Integer, Lambda, preorder_traversal from ..core.sympify import sympify from ..utilities import numbered_symbols from . import Poly, RootSum, cancel, factor from .polyerrors import Polyn...
{ "repo_name": "diofant/diofant", "path": "diofant/polys/partfrac.py", "copies": "1", "size": "14342", "license": "bsd-3-clause", "hash": -6138820087521659000, "line_mean": 28.4496919918, "line_max": 94, "alpha_frac": 0.5580811602, "autogenerated": false, "ratio": 3.3299280241467377, "config_tes...
"""Algorithms for partial fraction decomposition of rational functions.""" import itertools from ..core import (Add, Dummy, Function, Integer, Lambda, preorder_traversal, sympify) from ..utilities import numbered_symbols from . import Poly, RootSum, cancel, factor from .polyerrors import Polynomia...
{ "repo_name": "skirpichev/omg", "path": "diofant/polys/partfrac.py", "copies": "1", "size": "14294", "license": "bsd-3-clause", "hash": -4036554379675930000, "line_mean": 28.4721649485, "line_max": 94, "alpha_frac": 0.5577165244, "autogenerated": false, "ratio": 3.3327115877827, "config_test": ...
"""Algorithms for read generation""" import numpy as np class Node(object): __slots__ = ('ps', 'pr', 'cigarop', 'oplen', 'seq', 'v') def __init__(self, ps, pr, cigarop, oplen, seq): self.ps = ps self.pr = pr self.cigarop = cigarop self.oplen = oplen self.seq = seq # The variant size code....
{ "repo_name": "sbg/Mitty", "path": "mitty/simulation/rpc.py", "copies": "1", "size": "5839", "license": "apache-2.0", "hash": -7730485680460287000, "line_mean": 35.9620253165, "line_max": 135, "alpha_frac": 0.6088371296, "autogenerated": false, "ratio": 2.988229273285568, "config_test": false, ...
"""Algorithms for searching and optimisation.""" import copy def hill_climb(nsteps, start_node, get_next_node): """Modular hill climbing algorithm. Example: >>> def get_next_node(node): ... a, b = random.sample(range(len(node)), 2) ... node[a], node[b] = node[b], node[a] ...
{ "repo_name": "CameronLonsdale/lantern", "path": "lantern/analysis/search.py", "copies": "1", "size": "1411", "license": "mit", "hash": -6857011294354643000, "line_mean": 35.1794871795, "line_max": 104, "alpha_frac": 0.6144578313, "autogenerated": false, "ratio": 3.8342391304347827, "config_tes...
"""Algorithms for spectral clustering""" # Author: Gael Varoquaux gael.varoquaux@normalesup.org # Brian Cheung # Wei LI <kuantkid@gmail.com> # License: BSD import warnings import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import check_random_state, as_float_array, depreca...
{ "repo_name": "florian-f/sklearn", "path": "sklearn/cluster/spectral.py", "copies": "2", "size": "17870", "license": "bsd-3-clause", "hash": -1982757053190527200, "line_mean": 37.9324618736, "line_max": 79, "alpha_frac": 0.6314493565, "autogenerated": false, "ratio": 4.327924436909663, "config_...
"""Algorithms for spectral clustering""" # Author: Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD import warnings import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import check_random_state from ..utils.graph import graph_laplacian from ..metrics.pairwise import rbf_kernel ...
{ "repo_name": "pradyu1993/scikit-learn", "path": "sklearn/cluster/spectral.py", "copies": "1", "size": "14443", "license": "bsd-3-clause", "hash": -2560481668920930000, "line_mean": 38.5698630137, "line_max": 78, "alpha_frac": 0.6484802326, "autogenerated": false, "ratio": 4.241703377386197, "c...
"""Algorithms for spectral clustering""" # Author: Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD import warnings import numpy as np from ..base import BaseEstimator from ..utils import check_random_state from ..utils.graph import graph_laplacian from .k_means_ import k_means def spectral_embedding(a...
{ "repo_name": "joshbohde/scikit-learn", "path": "sklearn/cluster/spectral.py", "copies": "1", "size": "10632", "license": "bsd-3-clause", "hash": -1537913726048693800, "line_mean": 36.1748251748, "line_max": 77, "alpha_frac": 0.647103085, "autogenerated": false, "ratio": 4.2528, "config_test": ...
"""Algorithms for the computation of Groebner bases""" from sympy.polynomials.base import * from sympy.polynomials import div_ def groebner(f, var=None, order=None, reduced=True): """Computes a (reduced) Groebner base for a given list of polynomials. Usage: ====== The input consists of a list of ...
{ "repo_name": "certik/sympy-oldcore", "path": "sympy/polynomials/groebner_.py", "copies": "1", "size": "5923", "license": "bsd-3-clause", "hash": 5676863946287562000, "line_mean": 39.2925170068, "line_max": 76, "alpha_frac": 0.5735269289, "autogenerated": false, "ratio": 3.6788819875776397, "co...
#Algorithms for Trie class Node(): def __init__(self,letter=None): self.letter=letter self.isEnd=False self.branches={} return def __getitem__(self,index): if index in self.branches: return self.branches[index] else: return False def __...
{ "repo_name": "Seenivasanseeni/PyDaS", "path": "PDaS/Trie.py", "copies": "1", "size": "1990", "license": "mit", "hash": 6375520377288167000, "line_mean": 23.2804878049, "line_max": 68, "alpha_frac": 0.5608040201, "autogenerated": false, "ratio": 3.273026315789474, "config_test": false, "has_n...
# algorithms.py # 14th March 2015 # Examples of Discrete Fourier Transform code in Python # http://forum.micropython.org/viewtopic.php?f=2&t=208&hilit=fft # import math, cmath # Recursive algorithm: simple but slow and stack-hungry # Enter with a list of complex numbers of length 2**N def fft_recursive(x): n = le...
{ "repo_name": "peterhinch/micropython-fft", "path": "algorithms.py", "copies": "1", "size": "3846", "license": "mit", "hash": 1769043380472413000, "line_mean": 26.4714285714, "line_max": 82, "alpha_frac": 0.5200208008, "autogenerated": false, "ratio": 2.933638443935927, "config_test": false, ...
# algorithms.py # 14th March 2015 # Examples of Discrete Fourier Transform code in Python # http://forum.micropython.org/viewtopic.php?f=2&t=208&hilit=fft # Released under the MIT license. # import math, cmath # Recursive algorithm: simple but slow and stack-hungry # Enter with an array of complex numbers of length 2*...
{ "repo_name": "peterhinch/micropython-fourier", "path": "algorithms.py", "copies": "1", "size": "2369", "license": "mit", "hash": 7264192233145653000, "line_mean": 24.75, "line_max": 80, "alpha_frac": 0.5356690587, "autogenerated": false, "ratio": 2.8542168674698796, "config_test": false, "ha...
# algorithms.py """Contains various quantum computing algorithms.""" from cmath import exp from math import asin, ceil, log, pi, sqrt from numpy import eye, outer from quantum.gate_factory import function_gate, grover_diffusion_operator,\ hadamard_gate from quantum.quantum_gate impor...
{ "repo_name": "kcoltin/quantum", "path": "python/quantum/algorithms.py", "copies": "1", "size": "6654", "license": "mit", "hash": -6655314907934318000, "line_mean": 29.66359447, "line_max": 80, "alpha_frac": 0.6127141569, "autogenerated": false, "ratio": 3.3931667516573176, "config_test": false...
# algorithms.py # This is all about searches and sorts # Binary search is definitely faster than Linear search # Python's built in sort is ridiculously faster than Selection, 2nd, and Insertion, 3rd, but Selection is only around 30% faster. # <Chad Hobbs> def readData(filename): numbers = [] infile = o...
{ "repo_name": "itsallvoodoo/csci-school", "path": "CSCI220/Week 11 - MAR26-30/Lab 11 - APR04/algorithms.py", "copies": "1", "size": "3060", "license": "apache-2.0", "hash": -6231396199389622000, "line_mean": 25.3214285714, "line_max": 129, "alpha_frac": 0.5401960784, "autogenerated": false, "rati...
"""Algorithms related to graphs.""" from __future__ import absolute_import import numpy as np import scipy as sp from scipy import sparse from . import amg_core __all__ = ['maximal_independent_set', 'vertex_coloring', 'bellman_ford', 'lloyd_cluster', 'connected_components'] from pyamg.graph_r...
{ "repo_name": "pyamg/pyamg", "path": "pyamg/graph.py", "copies": "1", "size": "12162", "license": "mit", "hash": 1385509611404787500, "line_mean": 25.8476821192, "line_max": 86, "alpha_frac": 0.5719454037, "autogenerated": false, "ratio": 3.6014213799230084, "config_test": false, "has_no_keyw...
"""Algorithms related to graphs""" __docformat__ = "restructuredtext en" import numpy as np import scipy as sp from scipy import sparse import amg_core __all__ = ['maximal_independent_set', 'vertex_coloring', 'bellman_ford', 'lloyd_cluster', 'connected_components'] def max_value(datatype): try: ...
{ "repo_name": "kidaa/pyamg", "path": "pyamg/graph.py", "copies": "2", "size": "9545", "license": "bsd-3-clause", "hash": 8510628706907840000, "line_mean": 23.6005154639, "line_max": 79, "alpha_frac": 0.5790466213, "autogenerated": false, "ratio": 3.5682242990654207, "config_test": false, "has...
"""Algorithms related to graphs""" __docformat__ = "restructuredtext en" import numpy import scipy from scipy import sparse import amg_core __all__ = ['maximal_independent_set', 'vertex_coloring', 'bellman_ford', 'lloyd_cluster', 'connected_components'] def max_value(datatype): try: return ...
{ "repo_name": "pombreda/pyamg", "path": "pyamg/graph.py", "copies": "1", "size": "9553", "license": "bsd-3-clause", "hash": -2512739349549351000, "line_mean": 23.6211340206, "line_max": 79, "alpha_frac": 0.5817020831, "autogenerated": false, "ratio": 3.5954083552879186, "config_test": false, ...
""" algorithms tests thomas moll 2015 """ import unittest import algorithms class TestAlgorithms(unittest.TestCase): def setUp(self): self.list_a = [12,43,60,32,10] self.list_b = [43,60,32,10,12] self.list_c = [10,12,9,7,40,6] self.big_sorted = list(xrange(1000)...
{ "repo_name": "QuantumFractal/Data-Structure-Zoo", "path": "1-Algorithm Analysis/test.py", "copies": "5", "size": "1254", "license": "mit", "hash": -5072729073633675000, "line_mean": 27.1627906977, "line_max": 78, "alpha_frac": 0.6028708134, "autogenerated": false, "ratio": 3.3619302949061662, ...
"""Algorithms to determine the roots of polynomials""" from sympy.polynomials.base import * from sympy.polynomials import div_, groebner_ def cubic(f): """Computes the roots of a cubic polynomial. Usage: ====== This function is called by the wrapper L{roots}, don't use it directly. The in...
{ "repo_name": "certik/sympy-oldcore", "path": "sympy/polynomials/roots_.py", "copies": "1", "size": "12552", "license": "bsd-3-clause", "hash": -2768478862339429000, "line_mean": 28.6737588652, "line_max": 77, "alpha_frac": 0.5618228171, "autogenerated": false, "ratio": 3.5228739825989335, "con...
"""Algorithms to reorder triangle list order and vertex order aiming to minimize vertex cache misses. This is effectively an implementation of 'Linear-Speed Vertex Cache Optimisation' by Tom Forsyth, 28th September 2006 http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html """ # ***** BEGIN LICENSE BLO...
{ "repo_name": "griest024/PokyrimTools", "path": "pyffi-develop/pyffi/utils/vertex_cache.py", "copies": "1", "size": "19824", "license": "mit", "hash": -98108486258272640, "line_mean": 38.1778656126, "line_max": 94, "alpha_frac": 0.5626008878, "autogenerated": false, "ratio": 4.043238833367326, ...
"""Algorithms to support fitting routines in seaborn plotting functions.""" from __future__ import division import numpy as np from scipy import stats from .external.six.moves import range def bootstrap(*args, **kwargs): """Resample one or more arrays with replacement and store aggregate values. Positional a...
{ "repo_name": "cpcloud/seaborn", "path": "seaborn/algorithms.py", "copies": "1", "size": "6873", "license": "bsd-3-clause", "hash": -2485529422238807600, "line_mean": 32.6911764706, "line_max": 79, "alpha_frac": 0.5901353121, "autogenerated": false, "ratio": 3.7252032520325202, "config_test": f...
"""Algorithms to support fitting routines in seaborn plotting functions.""" from __future__ import division import numpy as np from scipy import stats from six.moves import range def bootstrap(*args, **kwargs): """Resample one or more arrays with replacement and store aggregate values. Positional arguments a...
{ "repo_name": "yarikoptic/seaborn", "path": "seaborn/algorithms.py", "copies": "1", "size": "6863", "license": "bsd-3-clause", "hash": 1302225294867658500, "line_mean": 32.6421568627, "line_max": 79, "alpha_frac": 0.5898295206, "autogenerated": false, "ratio": 3.725841476655809, "config_test": ...
"""Algorithms to support fitting routines in seaborn plotting functions.""" from __future__ import division import numpy as np from scipy import stats import warnings from .external.six import string_types from .external.six.moves import range def bootstrap(*args, **kwargs): """Resample one or more arrays with re...
{ "repo_name": "lukauskas/seaborn", "path": "seaborn/algorithms.py", "copies": "3", "size": "4233", "license": "bsd-3-clause", "hash": 7271285285809882000, "line_mean": 34.275, "line_max": 79, "alpha_frac": 0.6234349161, "autogenerated": false, "ratio": 3.8799266727772688, "config_test": false, ...
"""Algorithms to support fitting routines in seaborn plotting functions.""" import numbers import numpy as np import warnings def bootstrap(*args, **kwargs): """Resample one or more arrays with replacement and store aggregate values. Positional arguments are a sequence of arrays to bootstrap along the first ...
{ "repo_name": "mwaskom/seaborn", "path": "seaborn/algorithms.py", "copies": "2", "size": "4971", "license": "bsd-3-clause", "hash": 4144861291383294500, "line_mean": 34.0070422535, "line_max": 85, "alpha_frac": 0.6099376383, "autogenerated": false, "ratio": 4.048045602605863, "config_test": fal...
""" Algorithms, using only one class for classification Though this focuses on one class, the relation to the ``REST`` should still be specified. """ from pySPACE.missions.nodes.classification.base import RegularizedClassifierBase import logging # import the external libraries from pySPACE.missions.nodes.classificati...
{ "repo_name": "pyspace/pyspace", "path": "pySPACE/missions/nodes/classification/one_class.py", "copies": "3", "size": "2848", "license": "bsd-3-clause", "hash": 8486670824768563000, "line_mean": 32.1162790698, "line_max": 99, "alpha_frac": 0.6025280899, "autogenerated": false, "ratio": 4.38828967...
# Algorithms were taken directly from https://github.com/dgasmith/psi4numpy/blob/master/Coupled-Cluster/CCSD.dat # Special thanks to Daniel Crawford's programming website: # http://sirius.chem.vt.edu/wiki/doku.php?id=crawdad:programming import time import numpy as np from itertools import product from functools import...
{ "repo_name": "Konjkov/pyquante2", "path": "pyquante2/cc/ccsd.py", "copies": "1", "size": "8215", "license": "bsd-3-clause", "hash": -8707895786182627000, "line_mean": 36.6834862385, "line_max": 127, "alpha_frac": 0.5335362142, "autogenerated": false, "ratio": 2.4333530805687205, "config_test":...
"""Simple test of the algorithms used in the Atlas 6DOF simulation framework.""" import numpy as np import numpy.matlib as m from scipy.integrate import odeint #import datetime from EarthFrame import * # The state vector X is laid out as follows: # 0 - x - x axis coordinate (m) # 1 - y - y axis coordinat...
{ "repo_name": "pchokanson/atlas-sim", "path": "algorithm-test.py", "copies": "1", "size": "2461", "license": "mit", "hash": -6098646581807300000, "line_mean": 24.6354166667, "line_max": 80, "alpha_frac": 0.5542462414, "autogenerated": false, "ratio": 2.094468085106383, "config_test": false, "...
"""Algorithm Tests.""" from SafeRLBench.algo import PolicyGradient, A3C from SafeRLBench.envs import LinearCar from .policygradient import CentralFDEstimator, estimators from SafeRLBench.policy import NeuralNetwork from unittest2 import TestCase from mock import MagicMock, Mock class TestPolicyGradient(TestCase): ...
{ "repo_name": "befelix/Safe-RL-Benchmark", "path": "SafeRLBench/algo/test.py", "copies": "1", "size": "1382", "license": "mit", "hash": -2312248252766539000, "line_mean": 30.4090909091, "line_max": 77, "alpha_frac": 0.6410998553, "autogenerated": false, "ratio": 3.7967032967032965, "config_test...
# Algorithm to compute pi via subdividing unit square recursively # and seeing it is part of the circle or not. from __future__ import division def iterate(x, y, iteration, N): ''' Determines whether a square size = (1 / 2 ^ iteration) at coord (x, y) is inside the unit circle or not. returns...
{ "repo_name": "jeeyoungk/exercise", "path": "python/pi.py", "copies": "1", "size": "3900", "license": "mit", "hash": 6377673966239517000, "line_mean": 32.0508474576, "line_max": 84, "alpha_frac": 0.5607692308, "autogenerated": false, "ratio": 2.8655400440852317, "config_test": false, "has_no_...
# Algorithm Trial 01 # Purpose: compare 2 signals to find a measure of their correlation # Method: inspired by cross-correlation. # - Multiply of the signals' values at each time step, and sum all the # multiples, and normalize (divide by length of vector). # - offset how the signals are lined-up by 1, a...
{ "repo_name": "Ondross/statsq", "path": "correlation.py", "copies": "1", "size": "1698", "license": "mit", "hash": -8554443253585108000, "line_mean": 32.96, "line_max": 100, "alpha_frac": 0.609540636, "autogenerated": false, "ratio": 3.1213235294117645, "config_test": false, "has_no_keywords"...
# Algos from https://github.com/dirceup/tiled-vegetation-indices/blob/master/app/lib/vegetation_index.rb # Functions can use all of the supported functions and operators from # https://numexpr.readthedocs.io/en/latest/user_guide.html#supported-operators import re from functools import lru_cache from django.utils.trans...
{ "repo_name": "OpenDroneMap/WebODM", "path": "app/api/formulas.py", "copies": "1", "size": "5539", "license": "mpl-2.0", "hash": -749807877132644000, "line_mean": 33.61875, "line_max": 159, "alpha_frac": 0.5475717639, "autogenerated": false, "ratio": 3.183333333333333, "config_test": false, "...
""" Generate visualizations of classification, regression, and clustering """ ########################################################################## ## Imports ########################################################################## import numpy as np from sklearn import datasets import matplotlib.pyplot as pl...
{ "repo_name": "wavelets/machine-learning", "path": "code/algviz.py", "copies": "5", "size": "4351", "license": "mit", "hash": 2723088663044569600, "line_mean": 28.2013422819, "line_max": 113, "alpha_frac": 0.6161801885, "autogenerated": false, "ratio": 3.3781055900621118, "config_test": false, ...
# Alias 8 remote script for Ableton Live 10. # by Kevin Ferguson (http://www.ofrecordings.com/) from __future__ import with_statement g_logger = None DEBUG = True def log(msg): global g_logger if DEBUG: if g_logger is not None: g_logger(msg) import Live import MidiRemoteScript from _Fra...
{ "repo_name": "macfergus/alias8", "path": "alias8/alias.py", "copies": "1", "size": "7443", "license": "cc0-1.0", "hash": -5127657943387977000, "line_mean": 32.9863013699, "line_max": 78, "alpha_frac": 0.5890098079, "autogenerated": false, "ratio": 3.6755555555555555, "config_test": false, "h...
"""Alias command.""" from . import Command from ...packets import MessagePacket class Alias(Command): """Alias command.""" COMMAND = "alias" @Command.command(role="moderator") async def add(self, alias: "?command", command: "?command", *_: False, raw: "packet"): """Add a n...
{ "repo_name": "CactusDev/CactusBot", "path": "cactusbot/commands/magic/alias.py", "copies": "2", "size": "1908", "license": "mit", "hash": 2289707931717732900, "line_mean": 31.8965517241, "line_max": 78, "alpha_frac": 0.5393081761, "autogenerated": false, "ratio": 4.468384074941452, "config_tes...
""" Aliases gather aliasing informations. """ from pythran.analyses.global_declarations import GlobalDeclarations from pythran.intrinsic import Intrinsic, Class, NewMem from pythran.passmanager import ModuleAnalysis from pythran.syntax import PythranSyntaxError from pythran.tables import functions, methods, MODULES im...
{ "repo_name": "pombredanne/pythran", "path": "pythran/analyses/aliases.py", "copies": "2", "size": "14289", "license": "bsd-3-clause", "hash": 6622609306301754000, "line_mean": 34.1081081081, "line_max": 78, "alpha_frac": 0.5474840787, "autogenerated": false, "ratio": 4.248884924174844, "config...
""" Aliases gather aliasing informations. """ from pythran.analyses.global_declarations import GlobalDeclarations from pythran.intrinsic import Intrinsic, Class, UnboundValue from pythran.passmanager import ModuleAnalysis from pythran.syntax import PythranSyntaxError from pythran.tables import functions, methods, MODU...
{ "repo_name": "serge-sans-paille/pythran", "path": "pythran/analyses/aliases.py", "copies": "1", "size": "27680", "license": "bsd-3-clause", "hash": -8463511336772986000, "line_mean": 35.135770235, "line_max": 79, "alpha_frac": 0.5363078035, "autogenerated": false, "ratio": 4.141232794733693, "...
ALIASES = { 'name': { 'honk': 'Kousaka Honoka', 'bird': 'Minami Kotori', 'birb': 'Minami Kotori', 'eri': 'Ayase Eli', 'harasho': 'Ayase Eli', 'yohane': 'Tsushima Yoshiko', 'datenshi': 'Tsushima Yoshiko', 'hana': 'Koizumi Hanayo', 'pana': 'Koizu...
{ "repo_name": "DamourYouKnow/HAHA-NO-UR", "path": "core/argument_parser.py", "copies": "1", "size": "4227", "license": "mit", "hash": -5607456562393811000, "line_mean": 27.7142857143, "line_max": 71, "alpha_frac": 0.5188343994, "autogenerated": false, "ratio": 3.015, "config_test": false, "ha...
"""aliases.txt support.""" import re import util from errors import FileError def load_aliases(filename): """ Loads aliases.txt-formatted file and returns a dict. Accepted formats: aliasname,keystrokes (QF1.x style) aliasname:keystrokes (QF2.x style) """ al...
{ "repo_name": "ev1l0rd/yalnpv", "path": "quickfort/src/qfconvert/aliases.py", "copies": "3", "size": "2056", "license": "mit", "hash": -7163744323356857000, "line_mean": 28.6865671642, "line_max": 78, "alpha_frac": 0.5578793774, "autogenerated": false, "ratio": 4.047244094488189, "config_test":...
"""Alias for module blend. Deprecated module. Original name for module blend.py. Was changed in 0.2.8. """ from __future__ import print_function, division, absolute_import import imgaug as ia from . import blend _DEPRECATION_COMMENT = ( "It has the same interface, except that the parameter " "`first` was r...
{ "repo_name": "aleju/ImageAugmenter", "path": "imgaug/augmenters/overlay.py", "copies": "2", "size": "1920", "license": "mit", "hash": -6990266061294369000, "line_mean": 33.2857142857, "line_max": 75, "alpha_frac": 0.7020833333, "autogenerated": false, "ratio": 3.4972677595628414, "config_test"...
alias_help = """ Dynamic alias creator for system Windows. Features: - execute program in fork, or in current command line - custom static invoke arguments Requirements: - python - folder with script in system PATH EXAMPLES: 1) Register this script as new alias with name 'alias': python {script}...
{ "repo_name": "asRIA/alias", "path": "alias.py", "copies": "1", "size": "6270", "license": "mit", "hash": -7828211434235067000, "line_mean": 29.7352941176, "line_max": 112, "alpha_frac": 0.6301435407, "autogenerated": false, "ratio": 3.820840950639854, "config_test": false, "has_no_keywords":...
"""Alias related views.""" from django.core.urlresolvers import reverse from django.db import IntegrityError from django.shortcuts import render from django.utils.translation import ugettext as _, ungettext from django.views import generic from django.contrib.auth import mixins as auth_mixins from django.contrib.auth...
{ "repo_name": "carragom/modoboa", "path": "modoboa/admin/views/alias.py", "copies": "1", "size": "4006", "license": "isc", "hash": -9216744546486646000, "line_mean": 30.0542635659, "line_max": 76, "alpha_frac": 0.6615077384, "autogenerated": false, "ratio": 4.014028056112225, "config_test": fal...
"""Alias related views.""" from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.db import IntegrityError from django.shortcuts import render from django.utils.translation import ugettext as _, ungettext from django.views import generic from django.contrib.auth import mixin...
{ "repo_name": "bearstech/modoboa", "path": "modoboa/admin/views/alias.py", "copies": "1", "size": "4029", "license": "isc", "hash": -3332303187644758500, "line_mean": 29.7557251908, "line_max": 76, "alpha_frac": 0.6619508563, "autogenerated": false, "ratio": 4.0129482071713145, "config_test": f...
"""Alias related views.""" from reversion import revisions as reversion from django.contrib.auth import mixins as auth_mixins from django.contrib.auth.decorators import login_required, permission_required from django.db import IntegrityError from django.shortcuts import render from django.urls import reverse from dja...
{ "repo_name": "modoboa/modoboa", "path": "modoboa/admin/views/alias.py", "copies": "1", "size": "3965", "license": "isc", "hash": 4242295708826724000, "line_mean": 30.72, "line_max": 78, "alpha_frac": 0.6617906683, "autogenerated": false, "ratio": 4.02129817444219, "config_test": false, "has_...
# alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode from _pydevd_frame_eval.vendored.bytecode.concrete import ConcreteInstr from _pydevd_frame_eval.vendored.bytecode.instr import Label, SetLineno, Instr class BasicBlock(_bytecode._InstrList): def __init__(sel...
{ "repo_name": "fabioz/PyDev.Debugger", "path": "_pydevd_frame_eval/vendored/bytecode/cfg.py", "copies": "1", "size": "14433", "license": "epl-1.0", "hash": 5153407549036227000, "line_mean": 31.5801354402, "line_max": 85, "alpha_frac": 0.5609367422, "autogenerated": false, "ratio": 4.4864780851725...
# alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode try: from enum import IntFlag except ImportError: from aenum import IntFlag class CompilerFlags(IntFlag): """Possible values of the co_flags attribute of Code object. Note: We do not rely on in...
{ "repo_name": "fabioz/PyDev.Debugger", "path": "_pydevd_frame_eval/vendored/bytecode/flags.py", "copies": "2", "size": "5812", "license": "epl-1.0", "hash": -7843855972920849000, "line_mean": 31.8361581921, "line_max": 85, "alpha_frac": 0.599449415, "autogenerated": false, "ratio": 4.386415094339...
# alias to keep the 'bytecode' variable free import bytecode as _bytecode from bytecode.concrete import ConcreteInstr from bytecode.instr import Label, SetLineno, Instr class BasicBlock(_bytecode._InstrList): def __init__(self, instructions=None): # a BasicBlock object, or None self.next_block = ...
{ "repo_name": "haypo/bytecode", "path": "bytecode/cfg.py", "copies": "1", "size": "10025", "license": "mit", "hash": 2972598080645481500, "line_mean": 30.1335403727, "line_max": 77, "alpha_frac": 0.536957606, "autogenerated": false, "ratio": 4.391151992991678, "config_test": false, "has_no_ke...
# alias to keep the 'bytecode' variable free import bytecode as _bytecode from bytecode.instr import UNSET, Label, SetLineno, Instr from bytecode.flags import infer_flags class BaseBytecode: def __init__(self): self.argcount = 0 self.kwonlyargcount = 0 self.first_lineno = 1 self.n...
{ "repo_name": "haypo/bytecode", "path": "bytecode/bytecode.py", "copies": "1", "size": "4763", "license": "mit", "hash": 5956348102641009000, "line_mean": 31.4013605442, "line_max": 77, "alpha_frac": 0.5767373504, "autogenerated": false, "ratio": 4.341841385597083, "config_test": false, "has_...
# alias to keep the 'bytecode' variable free import bytecode as _bytecode try: from enum import IntFlag except ImportError: from aenum import IntFlag class CompilerFlags(IntFlag): """Possible values of the co_flags attribute of Code object. Note: We do not rely on inspect values here as some of them ...
{ "repo_name": "haypo/bytecode", "path": "bytecode/flags.py", "copies": "1", "size": "3449", "license": "mit", "hash": 2976361441260728300, "line_mean": 37.7528089888, "line_max": 79, "alpha_frac": 0.5737895042, "autogenerated": false, "ratio": 4.130538922155688, "config_test": false, "has_no_...
# alias to keep the 'bytecode' variable free import sys from _pydevd_frame_eval.vendored import bytecode as _bytecode from _pydevd_frame_eval.vendored.bytecode.instr import UNSET, Label, SetLineno, Instr from _pydevd_frame_eval.vendored.bytecode.flags import infer_flags class BaseBytecode: def __init__(self): ...
{ "repo_name": "fabioz/PyDev.Debugger", "path": "_pydevd_frame_eval/vendored/bytecode/bytecode.py", "copies": "1", "size": "6650", "license": "epl-1.0", "hash": -2455584496067711000, "line_mean": 30.9711538462, "line_max": 88, "alpha_frac": 0.5822556391, "autogenerated": false, "ratio": 4.23297262...
# alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode from _pydevd_frame_eval.vendored.bytecode.concrete import ConcreteInstr from _pydevd_frame_eval.vendored.bytecode.instr import Label, SetLineno, Instr class BasicBlock(_bytecode._InstrList): def __ini...
{ "repo_name": "glenngillen/dotfiles", "path": ".vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py", "copies": "1", "size": "15328", "license": "mit", "hash": -223557488881105380, "line_mean": 32.2142857143, "l...
# alias to keep the 'bytecode' variable free from _pydevd_frame_eval.vendored import bytecode as _bytecode try: from enum import IntFlag except ImportError: from aenum import IntFlag class CompilerFlags(IntFlag): """Possible values of the co_flags attribute of Code object. Note: We do no...
{ "repo_name": "glenngillen/dotfiles", "path": ".vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py", "copies": "1", "size": "5989", "license": "mit", "hash": -5257391810324939000, "line_mean": 31.8361581921, ...
# alias to keep the 'bytecode' variable free import sys from _pydevd_frame_eval.vendored import bytecode as _bytecode from _pydevd_frame_eval.vendored.bytecode.instr import UNSET, Label, SetLineno, Instr from _pydevd_frame_eval.vendored.bytecode.flags import infer_flags class BaseBytecode: def __init__(se...
{ "repo_name": "glenngillen/dotfiles", "path": ".vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py", "copies": "1", "size": "6986", "license": "mit", "hash": -6572307525388392000, "line_mean": 31.9126213592,...
ALIBABA_API_URL = 'http://gw.api.alibaba.com/openapi/param2/2/portals.open/%(api_call)s/%(api_key)s?%(call_parameters)s' ALIBABA_API_CALLS = { 'list': 'api.listPromotionProduct', 'details': 'api.getPromotionProductDetail', 'links': 'api.getPromotionLinks' } ALIBABA_API_PARAMS = { 'list': [ 'fi...
{ "repo_name": "kronas/python-aliexpress-api-client", "path": "aliexpress_api_client/config.py", "copies": "1", "size": "4910", "license": "mit", "hash": 5042680528330674000, "line_mean": 27.7134502924, "line_max": 120, "alpha_frac": 0.5753564155, "autogenerated": false, "ratio": 3.77401998462721,...
# A library and utility for drawing ONNX nets. Most of this implementation has # been borrowed from the caffe2 implementation # https://github.com/caffe2/caffe2/blob/master/caffe2/python/net_drawer.py # # The script takes two required arguments: # -input: a path to a serialized ModelProto .pb file. # -output: a pat...
{ "repo_name": "mlperf/training_results_v0.7", "path": "Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/tools/net_drawer.py", "copies": "2", "size": "5101", "license": "apache-2.0", "hash": 7507450820229027000, "line_mean": 33.2348993289, ...
# A library file for simplifying pygame interaction. You MUST place this file in the same directory as your game py files. '''This code is the original work of Luther Tychonievich, who releases it into the public domain. As a courtesy, Luther would appreciate it if you acknowledged him in any work that benefited fro...
{ "repo_name": "acs3ss/austinsullivan.github.io", "path": "files/Gamebox/gamebox.py", "copies": "1", "size": "26384", "license": "unlicense", "hash": -772929578608106800, "line_mean": 42.2524590164, "line_max": 183, "alpha_frac": 0.5740600364, "autogenerated": false, "ratio": 3.448438112665011, ...
"""A Library for accessing the Science Logic EM7. """ from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='pyem7', ...
{ "repo_name": "the-kid89/pyem7", "path": "setup.py", "copies": "1", "size": "1397", "license": "bsd-3-clause", "hash": 3946435962172243000, "line_mean": 31.488372093, "line_max": 89, "alpha_frac": 0.5862562634, "autogenerated": false, "ratio": 3.8591160220994474, "config_test": false, "has_no...
"""A library for creating graphs using Unicode braille characters. https://pypi.python.org/pypi/braillegraph Someone on reddit posted a screenshot of their xmobar setup, which used braille characters to show the loads of their four processor cores, as well as several other metrics. I was impressed that you could fit ...
{ "repo_name": "chrisbouchard/braillegraph", "path": "braillegraph/__main__.py", "copies": "1", "size": "3356", "license": "bsd-2-clause", "hash": -5837396303707746000, "line_mean": 34.6129032258, "line_max": 79, "alpha_frac": 0.6458333333, "autogenerated": false, "ratio": 3.942857142857143, "co...
"""A library for *curl*. Add new keywords here to invoke curl in a desired way \`Get_Url_Status\` \`Check_For_Dead_Links\`. """ import subprocess import re import time from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException class curl(object): ROBOT_LIBRARY_VERSION ...
{ "repo_name": "ayxos/react-cellar", "path": "e2e/robot/resources/lib/curl/curl.py", "copies": "16", "size": "9243", "license": "mit", "hash": 5423838486920210000, "line_mean": 44.7574257426, "line_max": 148, "alpha_frac": 0.6084604566, "autogenerated": false, "ratio": 4.1766832354270225, "confi...
"""A library for dealing with authentication.""" from functools import wraps __all__ = ['Need', 'needs', 'no_need'] class Need(object): """An authentication requirement. This can be used in a few different ways. Calling the need returns a boolean which indicates whether or not the need is me...
{ "repo_name": "astex/needs", "path": "needs/base.py", "copies": "1", "size": "5139", "license": "mit", "hash": 190132734270362500, "line_mean": 24.9545454545, "line_max": 79, "alpha_frac": 0.54271259, "autogenerated": false, "ratio": 4.1645056726094, "config_test": false, "has_no_keywords": f...
"""A library for dealing with authentication.""" from needs import Need from werkzeug.exceptions import Unauthorized, Forbidden __all__ = [ 'SelfNeed', 'no_apps_need', 'app_need', 'login_need', 'admin_need', 'csrf_need' ] class FlaskNeed(Need): """A basic need with some handy flask wrapping.""" ...
{ "repo_name": "astex/peanuts", "path": "peanuts/lib/auth.py", "copies": "1", "size": "3540", "license": "mit", "hash": -4424007504795224000, "line_mean": 26.874015748, "line_max": 78, "alpha_frac": 0.5991525424, "autogenerated": false, "ratio": 4.14519906323185, "config_test": false, "has_no_...
"""A library for dealing with session-based authentication.""" from werkzeug.exceptions import Forbidden from flask.sessions import SecureCookieSession, SecureCookieSessionInterface __all__ = ['PeanutsSessionInterface'] class PeanutsSession(SecureCookieSession): """A custom session object for use with peanuts...
{ "repo_name": "astex/peanuts", "path": "peanuts/lib/session.py", "copies": "1", "size": "1964", "license": "mit", "hash": 282019314125100860, "line_mean": 30.1746031746, "line_max": 76, "alpha_frac": 0.633910387, "autogenerated": false, "ratio": 4.4840182648401825, "config_test": false, "has_...
"""A library for finding approximate subsequence matches. Contains several implementations of fuzzy sub-sequence search functions. Such functions find parts of a sequence which match a given sub-sequence up to a given maximum Levenshtein distance. The simplest use is via the find_near_matches utility function, which ...
{ "repo_name": "taleinat/fuzzysearch", "path": "src/fuzzysearch/__init__.py", "copies": "1", "size": "7866", "license": "mit", "hash": 5272758319984604000, "line_mean": 38.33, "line_max": 90, "alpha_frac": 0.6092041698, "autogenerated": false, "ratio": 4.213176218532405, "config_test": false, ...
"""A library for generating fake user data""" VERSION = (0,0,4) __version__ = ".".join(map(str, VERSION)) __author__ = "Dylan Clendenin" __contact__ = "dylan.clendenin@gmail.com" __homepage__ = "https://github.com/deepthawtz/faker" __all__ = ("Faker",) import random from faker import data from faker import patterns f...
{ "repo_name": "mgedmin/faker", "path": "faker/__init__.py", "copies": "2", "size": "2983", "license": "mit", "hash": -8164056640425130000, "line_mean": 29.1313131313, "line_max": 104, "alpha_frac": 0.5581629232, "autogenerated": false, "ratio": 3.6289537712895377, "config_test": false, "has_n...
"""A library for generating fake user data""" VERSION = (0,1,4) __version__ = ".".join(map(str, VERSION)) __author__ = "Dylan Clendenin" __contact__ = "dylan.clendenin@gmail.com" __homepage__ = "https://github.com/deepthawtz/faker" __all__ = ("Faker",) import random import warnings from faker import data from faker i...
{ "repo_name": "deepthawtz/faker", "path": "faker/__init__.py", "copies": "1", "size": "4504", "license": "mit", "hash": -5438433923563680000, "line_mean": 31.1714285714, "line_max": 102, "alpha_frac": 0.5810390764, "autogenerated": false, "ratio": 3.6827473426001633, "config_test": false, "ha...
"""A library for helping optimizing Python extensions compilation.""" from sys import version_info as _version_info if _version_info[0] < 3 or (_version_info[0] == 3 and _version_info[1] < 6): raise ImportError("Compilertools needs Python 3.6 or above.") del _version_info from compilertools._version import __ver...
{ "repo_name": "JGoutin/compilertools", "path": "compilertools/__init__.py", "copies": "1", "size": "1092", "license": "bsd-2-clause", "hash": 3798193727462256000, "line_mean": 25.6341463415, "line_max": 82, "alpha_frac": 0.6923076923, "autogenerated": false, "ratio": 4.029520295202952, "config_...
"""A library for integrating pyOpenSSL with CherryPy. The OpenSSL module must be importable for SSL functionality. You can obtain it from `here <https://launchpad.net/pyopenssl>`_. To use this module, set CherryPyWSGIServer.ssl_adapter to an instance of SSLAdapter. There are two ways to use SSL: Method One ---------...
{ "repo_name": "Hernrup/django-wsgiserver3", "path": "django_wsgiserver/wsgiserver/ssl_pyopenssl.py", "copies": "1", "size": "9160", "license": "bsd-3-clause", "hash": 4781519175381370000, "line_mean": 35.4940239044, "line_max": 79, "alpha_frac": 0.5804585153, "autogenerated": false, "ratio": 4.17...
"""A library for integrating pyOpenSSL with CherryPy. The OpenSSL module must be importable for SSL functionality. You can obtain it from http://pyopenssl.sourceforge.net/ To use this module, set CherryPyWSGIServer.ssl_adapter to an instance of SSLAdapter. There are two ways to use SSL: Method One: ssl_adapter.c...
{ "repo_name": "southpawtech/TACTIC-DEV", "path": "3rd_party/CherryPy/cherrypy/wsgiserver/ssl_pyopenssl.py", "copies": "7", "size": "9378", "license": "epl-1.0", "hash": -7422377571311049000, "line_mean": 37.9128630705, "line_max": 86, "alpha_frac": 0.5592876946, "autogenerated": false, "ratio": 4...
"""A library for integrating pyOpenSSL with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set CherryPyWSGIServer.ssl_adapter to an instance of BuiltinSSLAdapter. ssl_adapter.certificate: the filename of the server SSL certificate. ssl_adapter.private_key: the filename...
{ "repo_name": "mwx1993/TACTIC", "path": "3rd_party/CherryPy/cherrypy/wsgiserver/ssl_builtin.py", "copies": "7", "size": "2541", "license": "epl-1.0", "hash": 1958851954904281000, "line_mean": 35.8260869565, "line_max": 78, "alpha_frac": 0.6099960645, "autogenerated": false, "ratio": 4.29949238578...
"""A library for integrating Python's builtin ``ssl`` library with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set ``CherryPyWSGIServer.ssl_adapter`` to an instance of ``BuiltinSSLAdapter``. """ try: import ssl except ImportError: ssl = None from cherrypy import ws...
{ "repo_name": "jolth/websiteDevMicrosystem", "path": "web/wsgiserver/ssl_builtin.py", "copies": "79", "size": "2589", "license": "apache-2.0", "hash": -7540007263591561000, "line_mean": 34.9583333333, "line_max": 78, "alpha_frac": 0.5998455002, "autogenerated": false, "ratio": 4.329431438127091, ...
"""A library for math related things Copyright 2015 Heung Ming Tai Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law...
{ "repo_name": "hermantai/sorno-py-scripts", "path": "sorno/mathlib.py", "copies": "1", "size": "2471", "license": "apache-2.0", "hash": -2402409308476059000, "line_mean": 27.4022988506, "line_max": 79, "alpha_frac": 0.6171590449, "autogenerated": false, "ratio": 4.084297520661157, "config_test"...
"""A library for parsing and evaluating dice notation.""" from __future__ import absolute_import, print_function, unicode_literals from pyparsing import ParseBaseException import dice.elements import dice.grammar import dice.utilities from dice.constants import DiceExtreme from dice.exceptions import DiceBaseExcepti...
{ "repo_name": "borntyping/python-dice", "path": "dice/__init__.py", "copies": "1", "size": "1739", "license": "mit", "hash": 7790421438806954000, "line_mean": 25.7538461538, "line_max": 83, "alpha_frac": 0.6797009776, "autogenerated": false, "ratio": 3.6457023060796647, "config_test": false, ...
"""A library for parsing Heroes of the Storm replays.""" from s2protocol.mpyq import mpyq from s2protocol import protocol34784 as proto class Replay(object): def __init__(self, replay_file): self.replay_file = replay_file self.archive = mpyq.MPQArchive(self.replay_file) def _get_header(self):...
{ "repo_name": "HoTSStuff/replaylib", "path": "replaylib/ReplayLib.py", "copies": "1", "size": "2057", "license": "apache-2.0", "hash": -4096498512928898000, "line_mean": 35.7321428571, "line_max": 76, "alpha_frac": 0.6431696646, "autogenerated": false, "ratio": 3.9633911368015413, "config_test"...
import trunk.matgen from numpy import * def oldCompleteCholesky(M): ''' Computes the cholesky factorization of a matrix M, i.e the lower triangular matrix T such as M = T . T.transpose M should be a symmetric positive definite matrix runs in O(n^3/3) where M is a matrix of size nxn''' n = M.shape[0...
{ "repo_name": "ethiery/heat-solver", "path": "trunk/cholesky.py", "copies": "1", "size": "2853", "license": "mit", "hash": 4237637251507400700, "line_mean": 30.0108695652, "line_max": 106, "alpha_frac": 0.4994742376, "autogenerated": false, "ratio": 3.2128378378378377, "config_test": false, "...
# A library for the molecular dynamics simulation of a gas using verlet integration # William Gilpin 2014 from matplotlib import pyplot from scipy import * from numpy import * from random import randrange # NOTE: it might be more clever to construct entire simulation as a CLASS with dt, dx, dy as attributes # and an ...
{ "repo_name": "williamgilpin/vergas", "path": "vergas_funcs.py", "copies": "1", "size": "4839", "license": "mit", "hash": 2452828129331204600, "line_mean": 32.6111111111, "line_max": 103, "alpha_frac": 0.5986774127, "autogenerated": false, "ratio": 3.0529968454258674, "config_test": false, "h...
"""A library for validating SQLAlchemy-jsonapi apis.""" import copy import functools from jsonschema import validate as schema_validate, exceptions from sqlalchemy.sql import sqltypes as types _TYPE_MAP = { types.Integer: 'integer', types.String: 'string', types.Boolean: 'boolean', } _BASE_SCHEMA = { ...
{ "repo_name": "rockstar/puff", "path": "puff.py", "copies": "1", "size": "3424", "license": "mit", "hash": -5167272237142649000, "line_mean": 29.5714285714, "line_max": 78, "alpha_frac": 0.5189836449, "autogenerated": false, "ratio": 4.475816993464052, "config_test": false, "has_no_keywords":...
"""A library for working with Asciidoc markup.""" ##==============================================================# ## DEVELOPED 2014, REVISED 2014, Jeff Rimko. # ##==============================================================# ##==============================================================# ## S...
{ "repo_name": "jeffrimko/Archiver", "path": "app/adoclib.py", "copies": "1", "size": "1631", "license": "mit", "hash": 4455405561736292400, "line_mean": 37.8333333333, "line_max": 81, "alpha_frac": 0.3513182097, "autogenerated": false, "ratio": 4.839762611275964, "config_test": false, "has_no...
"""A Library is a local collection of bundles. It holds a database for the configuration of the bundles that have been installed into it. """ # Copyright (c) 2013 Clarinova. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE.txt from ambry.orm import Dataset,...
{ "repo_name": "kball/ambry", "path": "ambry/library/query.py", "copies": "1", "size": "15936", "license": "bsd-2-clause", "hash": 7596141980257792000, "line_mean": 28.0273224044, "line_max": 145, "alpha_frac": 0.5229041165, "autogenerated": false, "ratio": 4.376819555067289, "config_test": fals...
"""A Library is a local collection of bundles. It holds a database for the configuration of the bundles that have been installed into it. """ # Copyright (c) 2013 Clarinova. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE.txt import os.path import ambry ...
{ "repo_name": "kball/ambry", "path": "ambry/library/database.py", "copies": "1", "size": "34182", "license": "bsd-2-clause", "hash": 1080923694879913600, "line_mean": 29.0633245383, "line_max": 177, "alpha_frac": 0.5615821192, "autogenerated": false, "ratio": 4.4334630350194555, "config_test": ...
"""A Library is a local collection of bundles. It holds a database for the configuration of the bundles that have been installed into it. """ # Copyright (c) 2015 Civic Knowledge. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE.txt import imp import os impor...
{ "repo_name": "CivicKnowledge/ambry", "path": "ambry/library/__init__.py", "copies": "1", "size": "35853", "license": "bsd-2-clause", "hash": 9155002464403941000, "line_mean": 29.4613423959, "line_max": 121, "alpha_frac": 0.5736479514, "autogenerated": false, "ratio": 4.248992652287272, "config...
"""A library of common shape functions.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import tensor_shape def scalar_shape(unused_op): """Shape function for ops that output a scalar value.""" return [tensor_shape.s...
{ "repo_name": "kcartier/tensorflow-toe-in-the-water", "path": "tensorflow/python/ops/common_shapes.py", "copies": "1", "size": "13282", "license": "apache-2.0", "hash": -6323996811829626000, "line_mean": 34.8972972973, "line_max": 80, "alpha_frac": 0.6675199518, "autogenerated": false, "ratio": 3...
"""A library of common shape functions.""" import math from tensorflow.python.framework import tensor_shape def scalar_shape(unused_op): """Shape function for ops that output a scalar value.""" return [tensor_shape.scalar()] def unchanged_shape(op): """Shape function for ops that output an tensor like their ...
{ "repo_name": "liyu1990/tensorflow", "path": "tensorflow/python/ops/common_shapes.py", "copies": "5", "size": "13192", "license": "apache-2.0", "hash": 6890098805992269000, "line_mean": 34.5579514825, "line_max": 80, "alpha_frac": 0.6660855064, "autogenerated": false, "ratio": 3.5206832132372563,...
"""A library of components for tk with rx""" import tkinter as tk import rx def create(title): """Create a Tk root title - a title for the application """ assert isinstance(title, str) root = tk.Tk() root.title = title rx.concurrency.TkinterScheduler(root) return root def input_stre...
{ "repo_name": "brad-h/expy", "path": "ExPy/ExPy/tkcomponents.py", "copies": "1", "size": "3787", "license": "mit", "hash": 5672266438646759000, "line_mean": 29.7886178862, "line_max": 74, "alpha_frac": 0.6501188276, "autogenerated": false, "ratio": 3.880122950819672, "config_test": false, "ha...
"""A library of helper functions for the Cheroot test suite.""" from __future__ import absolute_import, division, print_function __metaclass__ = type import datetime import logging import os import sys import time import threading import types from six.moves import http_client import six import cheroot.server impo...
{ "repo_name": "cherrypy/cheroot", "path": "cheroot/test/helper.py", "copies": "1", "size": "4896", "license": "bsd-3-clause", "hash": -86871369143762580, "line_mean": 27.1379310345, "line_max": 79, "alpha_frac": 0.5533088235, "autogenerated": false, "ratio": 4.097071129707113, "config_test": tr...
"""A library of helper functions for the Cheroot test suite.""" import datetime import io import logging import os import subprocess import sys import time import threading import types from six.moves import http_client import portend import pytest import six import cheroot.server import cheroot.wsgi from cheroot....
{ "repo_name": "diegocortassa/TACTIC", "path": "3rd_party/site-packages/cheroot/test/helper.py", "copies": "2", "size": "8516", "license": "epl-1.0", "hash": 2308926685222647000, "line_mean": 27.6734006734, "line_max": 79, "alpha_frac": 0.5338186942, "autogenerated": false, "ratio": 3.885036496350...
"""A library of helper functions for the CherryPy test suite.""" import datetime import io import logging import os import re import subprocess import sys import time import unittest import warnings import contextlib import portend import pytest from cheroot.test import webtest import cherrypy from cherrypy._cpcomp...
{ "repo_name": "cherrypy/cherrypy", "path": "cherrypy/test/helper.py", "copies": "2", "size": "16369", "license": "bsd-3-clause", "hash": -1430271156406365700, "line_mean": 30.5394990366, "line_max": 79, "alpha_frac": 0.5763944041, "autogenerated": false, "ratio": 3.9982901807523206, "config_tes...
"""A library of helper functions for the CherryPy test suite.""" import datetime import logging log = logging.getLogger(__name__) import os thisdir = os.path.abspath(os.path.dirname(__file__)) serverpem = os.path.join(os.getcwd(), thisdir, 'test.pem') import unittest import re import sys import time import warnings ...
{ "repo_name": "CodyKochmann/pi-cluster", "path": "software/src/cherrypy/test/helper.py", "copies": "1", "size": "17824", "license": "mit", "hash": 9067739917278950000, "line_mean": 31.3484573503, "line_max": 79, "alpha_frac": 0.5741135548, "autogenerated": false, "ratio": 4.0564406008192995, "c...
""" A library of object-oriented patterns """ from __future__ import division import new, weakref class injector: """ Injection of new methods into an existing class * synopsis * class some_descriptive_text(injector, some_existing_class, another_existing_class, ...): ...
{ "repo_name": "hickerson/bbn", "path": "fable/fable_sources/libtbx/object_oriented_patterns.py", "copies": "1", "size": "4540", "license": "mit", "hash": -1590494384021151000, "line_mean": 23.8087431694, "line_max": 74, "alpha_frac": 0.6174008811, "autogenerated": false, "ratio": 3.85726423109600...
# A library of sport implementations. import random DRAW = 0 WIN = 1 LOSS = 2 def basic_game(team1, team2, teams, settings): # A template for all games. The game must take two team dictionaries. # If the game is won by a team, the result is set to the WIN constant. # If the game is drawn, the result is...
{ "repo_name": "kdelwat/Ladder", "path": "sports.py", "copies": "1", "size": "3361", "license": "mit", "hash": -420477309148616200, "line_mean": 30.7169811321, "line_max": 79, "alpha_frac": 0.5781017554, "autogenerated": false, "ratio": 3.772166105499439, "config_test": false, "has_no_keywords...
# A library of things to help with simple symmetry operation stuff. # # FIXED 17/NOV/06 add a method in here to give a list of likely, and then # less likely, spacegroups based on an input spacegroup. # For instance, if the input spacegroup is P 41 21 2 then # another lik...
{ "repo_name": "xia2/xia2", "path": "src/xia2/lib/SymmetryLib.py", "copies": "1", "size": "4704", "license": "bsd-3-clause", "hash": -3971862335227733000, "line_mean": 24.7049180328, "line_max": 78, "alpha_frac": 0.5106292517, "autogenerated": false, "ratio": 3.239669421487603, "config_test": fa...
"""A library that holds the bulk of the logic for merging JSON profiles. Collect duration statistics of events across these profiles. Duration is measured in milliseconds. """ from __future__ import division import csv import gzip import json import os def _median(lst): """Returns the median of the input list. ...
{ "repo_name": "bazelbuild/bazel-bench", "path": "utils/json_profiles_merger_lib.py", "copies": "1", "size": "5977", "license": "apache-2.0", "hash": -7705798818457562000, "line_mean": 32.2055555556, "line_max": 80, "alpha_frac": 0.6397858457, "autogenerated": false, "ratio": 3.669122160834868, ...