repo_name
stringlengths
7
65
path
stringlengths
5
185
copies
stringlengths
1
4
size
stringlengths
4
6
content
stringlengths
977
990k
license
stringclasses
14 values
hash
stringlengths
32
32
line_mean
float64
7.18
99.4
line_max
int64
31
999
alpha_frac
float64
0.25
0.95
ratio
float64
1.5
7.84
autogenerated
bool
1 class
config_or_test
bool
2 classes
has_no_keywords
bool
2 classes
has_few_assignments
bool
1 class
abhinavsingh/proxy.py
proxy/core/base/tcp_server.py
1
8417
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
355b4bc738318640d62d4abebea66a0c
33.756198
105
0.594697
4.342282
false
false
false
false
abhinavsingh/proxy.py
proxy/core/event/dispatcher.py
1
4706
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
8cbce45edbe7592c560e58be01f6714a
32.81295
86
0.575319
4.392523
false
false
false
false
abhinavsingh/proxy.py
proxy/core/work/task/remote.py
1
1297
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
7037f08bd495b595c03c76fef23ce112
25.895833
86
0.615027
3.752907
false
false
false
false
abhinavsingh/proxy.py
proxy/core/tls/tls.py
1
2493
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
9b05c337fa8a80bae8be0c62bbcb9563
31.723684
92
0.607961
3.910377
false
false
false
false
abhinavsingh/proxy.py
proxy/core/base/tcp_upstream.py
1
4399
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
c6bd2c00a8030c792a56debe7148c17d
40.056075
86
0.617118
4.366799
false
false
false
false
abhinavsingh/proxy.py
proxy/http/server/pac_plugin.py
1
2727
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
0bd4f407501a1f771cd792b07631f8c3
31.392857
86
0.575891
3.903874
false
false
false
false
abhinavsingh/proxy.py
proxy/common/plugins.py
1
3789
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
7faf058d697d62259a38ec8ca794f0c3
35.028571
110
0.556965
4.308656
false
false
false
false
abhinavsingh/proxy.py
proxy/http/inspector/transformer.py
1
5989
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
662b033c995318536ca4a127f326f3c7
35.260606
86
0.481865
4.641583
false
false
false
false
abhinavsingh/proxy.py
tests/http/exceptions/test_http_proxy_auth_failed.py
1
5569
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
bf6696becc287c8ce2fdd4e081f8453b
36.33557
86
0.563545
3.970735
false
true
false
false
abhinavsingh/proxy.py
proxy/plugin/modify_post_data.py
1
1679
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
0f5ce8ca465c0b9258962d7b3b475c1e
29.418182
86
0.601913
3.983333
false
false
false
false
astropy/astropy
astropy/coordinates/baseframe.py
3
83537
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Framework and base classes for coordinate frames/"low-level" coordinate classes. """ # Standard library import copy import inspect import warnings from collections import defaultdict, namedtuple # Dependencies import numpy as np from astropy import...
bsd-3-clause
26f64b604465b4e77f368e0c08aac9b3
40.050123
110
0.575134
4.693354
false
false
false
false
astropy/astropy
astropy/modeling/tests/irafutil.py
3
7039
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides functions to help with testing against iraf tasks """ import numpy as np from astropy.logger import log iraf_models_map = {1.0: "Chebyshev", 2.0: "Legendre", 3.0: "Spline3", 4.0: "Spline1"} def get_records(fname): """ ...
bsd-3-clause
b4c5541186a52e3f4ab11ad9d4f44dc3
25.462406
85
0.553346
3.897564
false
false
false
false
astropy/astropy
astropy/units/utils.py
3
8991
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Miscellaneous utilities for `astropy.units`. None of the functions in the module are meant for use outside of the package. """ import io import re from fractions import Fraction import numpy as np from numpy import finfo _float_finfo = finfo(float)...
bsd-3-clause
b8126c342557652290fe443fbaf2666a
27.633758
87
0.60605
3.860455
false
false
false
false
astropy/astropy
astropy/cosmology/io/html.py
3
7434
import astropy.cosmology.units as cu import astropy.units as u from astropy.cosmology.connect import readwrite_registry from astropy.cosmology.core import Cosmology from astropy.cosmology.parameter import Parameter from astropy.table import QTable from .table import from_table, to_table # Format look-up for ...
bsd-3-clause
1f6bbd729dee8c8dbe0b2cc2e65ed738
34.985075
82
0.60869
3.745088
false
false
false
false
astropy/astropy
astropy/coordinates/representation.py
3
141494
""" In this module, we define the coordinate representation classes, which are used to represent low-level cartesian, spherical, cylindrical, and other coordinates. """ import abc import functools import inspect import operator import warnings import numpy as np from erfa import ufunc as erfa_ufunc import astropy.un...
bsd-3-clause
cced535eeea23bd45822e0aa3152499d
37.818656
97
0.605715
4.403112
false
false
false
false
astropy/astropy
astropy/units/structured.py
3
20282
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module defines structured units and quantities. """ from __future__ import annotations # For python < 3.10 # Standard library import operator import numpy as np from .core import UNITY, Unit, UnitBase __all__ = ["StructuredUnit"] DTYPE_OBJ...
bsd-3-clause
907ac10546b8805561ddb2526dc6ab2f
34.52014
101
0.571393
4.283421
false
false
false
false
mozilla/app-validator
tests/js/test_operators.py
5
7174
from nose.tools import eq_ from js_helper import TestCase class TestMath(TestCase): def test_basic_math(self): "Tests that contexts work and that basic math is executed properly" self.run_script(""" var x = 1; var y = 2; var z = x + y; var dbz = 1; var d...
bsd-3-clause
448b5d48ae264e2c505e0d3e1295eb97
29.142857
80
0.474212
3.383962
false
true
false
false
scikit-learn/scikit-learn
examples/decomposition/plot_sparse_coding.py
12
4027
""" =========================================== Sparse coding with a precomputed dictionary =========================================== Transform a signal as a sparse combination of Ricker wavelets. This example visually compares different sparse coding methods using the :class:`~sklearn.decomposition.SparseCoder` est...
bsd-3-clause
0f765a4035ebc147bc97bc510623f72c
32.558333
88
0.627266
3.361436
false
false
false
false
scikit-learn/scikit-learn
sklearn/datasets/_openml.py
12
38558
import gzip import hashlib import json import os import shutil import time from contextlib import closing from functools import wraps from os.path import join from typing import Callable, Optional, Dict, Tuple, List, Any, Union from tempfile import TemporaryDirectory from urllib.error import HTTPError, URLError from ur...
bsd-3-clause
7517a70ea2cb757a3a1b030492f7612b
34.968284
88
0.606022
4.059164
false
false
false
false
scikit-learn/scikit-learn
sklearn/inspection/_plot/partial_dependence.py
8
51095
import numbers import warnings from itertools import chain from math import ceil import numpy as np from scipy import sparse from scipy.stats.mstats import mquantiles from joblib import Parallel from .. import partial_dependence from ...base import is_regressor from ...utils import Bunch from ...utils import check_ar...
bsd-3-clause
5e63e4247da3794104141e1e0b3aebd2
39.391304
92
0.56303
4.302737
false
false
false
false
scikit-learn/scikit-learn
examples/linear_model/plot_tweedie_regression_insurance_claims.py
4
23583
""" ====================================== Tweedie regression on insurance claims ====================================== This example illustrates the use of Poisson, Gamma and Tweedie regression on the `French Motor Third-Party Liability Claims dataset <https://www.openml.org/d/41214>`_, and is inspired by an R tutori...
bsd-3-clause
a1dcad238fab5a2ce44aef300415f303
33.027417
88
0.67724
3.442482
false
true
false
false
scikit-learn/scikit-learn
sklearn/neighbors/tests/test_quad_tree.py
17
4856
import pickle import numpy as np import pytest from sklearn.neighbors._quad_tree import _QuadTree from sklearn.utils import check_random_state def test_quadtree_boundary_computation(): # Introduce a point into a quad tree with boundaries not easy to compute. Xs = [] # check a random case Xs.append(...
bsd-3-clause
51d51613380dd5e0bfcd4505263c8615
32.722222
87
0.62603
3.023661
false
true
false
false
scikit-learn/scikit-learn
asv_benchmarks/benchmarks/neighbors.py
17
1140
from sklearn.neighbors import KNeighborsClassifier from .common import Benchmark, Estimator, Predictor from .datasets import _20newsgroups_lowdim_dataset from .utils import make_gen_classif_scorers class KNeighborsClassifierBenchmark(Predictor, Estimator, Benchmark): """ Benchmarks for KNeighborsClassifier. ...
bsd-3-clause
79dd841d2bd67a9d451267d998b1542d
28.230769
88
0.660526
3.931034
false
false
false
false
scikit-learn/scikit-learn
benchmarks/bench_plot_omp_lars.py
12
4454
"""Benchmarks of orthogonal matching pursuit (:ref:`OMP`) versus least angle regression (:ref:`least_angle_regression`) The input data is mostly low rank but is a fat infinite tail. """ import gc import sys from time import time import numpy as np from sklearn.linear_model import lars_path, lars_path_gram, orthogona...
bsd-3-clause
a4e6d56f953f542a7b39345e548902c0
35.809917
83
0.534351
3.426154
false
false
false
false
scikit-learn/scikit-learn
examples/linear_model/plot_ard.py
12
7094
""" ==================================== Comparing Linear Bayesian Regressors ==================================== This example compares two different bayesian regressors: - a :ref:`automatic_relevance_determination` - a :ref:`bayesian_ridge_regression` In the first part, we use an :ref:`ordinary_least_squares` (O...
bsd-3-clause
1854c39e6cec8bd5600d347c3a09af72
32.780952
83
0.685932
3.423745
false
false
false
false
diofant/diofant
diofant/ntheory/partitions_.py
1
2833
import math from mpmath.libmp import (bitcount, fhalf, fone, from_int, from_man_exp, from_rational, fzero, mpf_add, mpf_cos, mpf_cosh_sinh, mpf_div, mpf_mul, mpf_pi, mpf_sqrt, mpf_sub, pi_fixed, to_int) __all__ = 'npartitions', def _a(n,...
bsd-3-clause
d8c21ae8853ef5f532d463e77d64ce8c
28.821053
77
0.53371
2.941848
false
false
false
false
diofant/diofant
diofant/combinatorics/named_groups.py
2
7374
from .group_constructs import DirectProduct from .perm_groups import PermutationGroup from .permutations import Permutation _af_new = Permutation._af_new def AbelianGroup(*cyclic_orders): """ Returns the direct product of cyclic groups with the given orders. According to the structure theorem for finit...
bsd-3-clause
83bbb0871753ca25c2532b9c6c409b7e
23.58
97
0.524546
3.066112
false
false
false
false
diofant/diofant
diofant/tests/simplify/test_combsimp.py
1
5742
from diofant import (FallingFactorial, Rational, RisingFactorial, Symbol, binomial, combsimp, cos, exp, factorial, gamma, pi, powsimp, rf, simplify, sin, sqrt, symbols) from diofant.abc import k, n, x, y __all__ = () def test_combsimp(): assert combsimp(factorial(n)) ==...
bsd-3-clause
45310ddef84fe96709c9a29f34cebadc
42.5
129
0.512713
2.589986
false
false
false
false
diofant/diofant
diofant/tests/matrices/test_matadd.py
2
1178
import pytest from diofant import (Basic, ImmutableMatrix, MatAdd, MatMul, MatPow, MatrixSymbol, ShapeError, eye) __all__ = () X = MatrixSymbol('X', 2, 2) Y = MatrixSymbol('Y', 2, 2) def test_sort_key(): assert MatAdd(Y, X).doit().args == (X, Y) def test_matadd(): pytest.raises(Shap...
bsd-3-clause
73baa1315c230038a068c51ce7b41b6d
25.772727
79
0.588285
2.745921
false
true
false
false
diofant/diofant
diofant/tensor/array/arrayop.py
2
7985
import collections import itertools from ...combinatorics import Permutation from ...core import Integer, Tuple, diff from ...matrices import MatrixBase from .dense_ndim_array import ImmutableDenseNDimArray from .ndim_array import NDimArray def _arrayfy(a): if isinstance(a, NDimArray): return a if is...
bsd-3-clause
351b4bf2e04f6f517c184788665a1b4d
29.477099
106
0.556418
3.102176
false
false
false
false
diofant/diofant
diofant/ntheory/residue_ntheory.py
1
26568
import collections import math import random from ..core import Function, Integer from ..core.compatibility import as_int from ..core.numbers import igcdex, mod_inverse from ..utilities.iterables import cantor_product from .factor_ import factorint, multiplicity, totient, trailing from .modular import crt, crt1, crt2 ...
bsd-3-clause
b5c3d3a78eee21cea4be64a814f4ab68
23.305581
81
0.449974
3.274498
false
false
false
false
diofant/diofant
diofant/functions/special/spherical_harmonics.py
1
8598
from ...core import Dummy, Function, I, pi from ...core.function import ArgumentIndexError from ..combinatorial.factorials import factorial from ..elementary.complexes import Abs from ..elementary.exponential import exp from ..elementary.miscellaneous import sqrt from ..elementary.trigonometric import cos, cot, sin fro...
bsd-3-clause
b047f4cee8074f5a5182f8430382b095
30.962825
113
0.558618
3.003144
false
false
false
false
diofant/diofant
diofant/polys/sqfreetools.py
1
5542
"""Square-free decomposition algorithms and related tools.""" from .polyerrors import DomainError class _SQF: """Mixin class to compute square-free decomposition of polynomials.""" def sqf_list(self, f): """ Return square-free decomposition of a polynomial in ``K[X]``. Examples ...
bsd-3-clause
36006d4f0090764c117ab3c28f2c6d05
23.200873
92
0.428726
3.559409
false
false
false
false
diofant/diofant
diofant/vector/orienters.py
1
11432
from ..core import Basic, Symbol, cacheit, sympify from ..functions import cos, sin from ..matrices import ImmutableMatrix, eye, rot_axis1, rot_axis2, rot_axis3 class Orienter(Basic): """Super-class for all orienter classes.""" def rotation_matrix(self): """ The rotation matrix corresponding ...
bsd-3-clause
a4d62864aa5dec2bdf4e0a8b2ad05d88
29.648794
78
0.523443
3.860858
false
false
false
false
diofant/diofant
diofant/tests/polys/test_polyroots.py
1
26424
"""Tests for algorithms for computing symbolic roots of polynomials.""" import itertools import mpmath import pytest from diofant import (EX, QQ, ZZ, I, Integer, Interval, Piecewise, PolynomialError, Rational, RootOf, Symbol, Wild, acos, cbrt, cos, cyclotomic_poly, exp, im, ...
bsd-3-clause
a1fd4fc56b59f0377c6169fb29d7f420
35.7
121
0.475098
2.368166
false
false
false
false
diofant/diofant
diofant/functions/special/elliptic_integrals.py
1
11441
"""Elliptic integrals.""" from ...core import Function, I, Integer, Rational, oo, pi, zoo from ...core.function import ArgumentIndexError from ..elementary.complexes import sign from ..elementary.hyperbolic import atanh from ..elementary.miscellaneous import sqrt from ..elementary.trigonometric import sin, tan from .g...
bsd-3-clause
864603a3eca439b55a7da6e0cc4d7829
30.345205
84
0.498995
3.19581
false
false
false
false
diofant/diofant
diofant/tests/polys/test_rationaltools.py
2
2195
"""Tests for tools for manipulation of rational expressions.""" from diofant import Eq, Integral, Mul, Rational, exp, sin, symbols, together from diofant.abc import x, y, z __all__ = () A, B = symbols('A,B', commutative=False) def test_together(): assert together(0) == 0 assert together(1) == 1 asser...
bsd-3-clause
d35bfbe09a12e761c388a35e0f4fc5a1
36.20339
87
0.474715
2.345085
false
false
false
false
diofant/diofant
diofant/tests/matrices/test_adjoint.py
2
1203
from diofant import (Adjoint, Integer, Matrix, MatrixSymbol, Transpose, adjoint, conjugate, eye, symbols, trace, transpose) __all__ = () n, m, l, k, p = symbols('n m l k p', integer=True) A = MatrixSymbol('A', n, m) B = MatrixSymbol('B', m, l) C = MatrixSymbol('C', n, n) D = MatrixSymbol('D', n,...
bsd-3-clause
1a41321d88d48b5dfadcd65df57f3d3b
31.513514
83
0.603491
2.934146
false
false
false
false
diofant/diofant
diofant/polys/rationaltools.py
1
2478
"""Tools for manipulation of rational expressions.""" from ..core import Add, gcd_terms from ..core.sympify import sympify def together(expr, deep=False): """ Denest and combine rational expressions using symbolic methods. This function takes an expression or a container of expressions and puts it (...
bsd-3-clause
258579af55b4120d470efc72c78ca3d7
32.945205
93
0.605327
3.509915
false
false
false
false
diofant/diofant
diofant/interactive/printing.py
1
3322
import builtins import fractions import os import sys from ..printing import latex, pretty, sstrrepr from ..printing.printer import Printer def _init_python_printing(stringify_func): """Setup printing in Python interactive session.""" def _displayhook(arg): """Python's pretty-printer display hook. ...
bsd-3-clause
96f7cbc54356f4d5a5372f1e1ad37bdd
25.96748
75
0.615014
3.920804
false
false
false
false
diofant/diofant
diofant/core/evalf.py
1
44144
""" Adaptive numerical evaluation of Diofant expressions, using mpmath for mathematical functions. An mpf value tuple is a tuple of integers (sign, man, exp, bc) representing a floating-point number: [1, -1][sign]*man*2**exp where sign is 0 or 1 and bc should correspond to the number of bits used to represent the mant...
bsd-3-clause
90257d3ac540e11c70dcd45141bbdac9
32.190977
100
0.534546
3.657635
false
false
false
false
diofant/diofant
diofant/utilities/iterables.py
1
58179
import operator from collections import defaultdict from itertools import (combinations, combinations_with_replacement, permutations, product) # this is the logical location of these functions from ..core.compatibility import as_int, is_sequence, iterable from .enumerative import (MultisetPartit...
bsd-3-clause
3c40f2953bae1e36c3a24cceffa3e994
27.324732
89
0.530741
3.593958
false
false
false
false
diofant/diofant
diofant/printing/python.py
1
2979
import keyword as kw from .repr import ReprPrinter from .str import StrPrinter # A list of classes that should be printed using StrPrinter STRPRINT = ('Add', 'Infinity', 'Integer', 'Mul', 'NegativeInfinity', 'Pow', 'Zero') class PythonPrinter(ReprPrinter, StrPrinter): """A printer which converts an...
bsd-3-clause
0141883ca96d5795c1d12a6cd26732dc
34.891566
81
0.615307
4.433036
false
false
false
false
diofant/diofant
diofant/tests/polys/test_specialpolys.py
1
5434
"""Tests for functions for generating interesting polynomials.""" import random import pytest from diofant import (ZZ, cyclotomic_poly, interpolating_poly, random_poly, ring, swinnerton_dyer_poly, symbols, symmetric_poly) from diofant.abc import x, y, z __all__ = () def test_swinnerton_dyer_...
bsd-3-clause
bfe887da9479c3a4066d9c97ed7a6bed
30.410405
81
0.508281
2.64557
false
true
false
false
diofant/diofant
diofant/functions/elementary/piecewise.py
1
22234
from ...core import (Basic, Dummy, Equality, Expr, Function, Integer, Tuple, diff, nan, oo) from ...core.relational import Relational from ...logic import And, Not, Or, false, to_cnf, true from ...logic.boolalg import Boolean from ...sets import ExtendedReals from ...utilities import default_sort_k...
bsd-3-clause
4788eab2dc961bd86f624730f18d9094
38.282686
96
0.506207
3.929657
false
false
false
false
diofant/diofant
diofant/printing/repr.py
1
6770
""" A Printer for generating executable code. The most important function here is srepr (that is an exact equivalent of builtin repr, except for optional arguments) that returns a string so that the relation eval(srepr(expr))=expr holds in an appropriate environment. """ from __future__ import annotations import typ...
bsd-3-clause
6f4a6bc47923595a712ec601d62e4cf3
33.717949
115
0.542541
3.681349
false
false
false
false
diofant/diofant
diofant/utilities/autowrap.py
1
31290
"""Module for compiling codegen output, and wrap the binary for use in python. This module provides a common interface for different external backends, such as f2py, fwrap, Cython, SWIG(?) etc. (Currently only f2py and Cython are implemented) The goal is to provide access to compiled binaries of acceptable performance...
bsd-3-clause
31bf9082aee62f8472ab591d344192de
34.236486
115
0.578012
3.991581
false
false
false
false
diofant/diofant
diofant/calculus/finite_diff.py
1
13119
""" Finite difference weights ========================= This module implements an algorithm for efficient generation of finite difference weights for ordinary differentials of functions for derivatives from 0 (interpolation) up to arbitrary order. The core algorithm is provided in the finite difference weight generat...
bsd-3-clause
7fbe79fd5cb4dbbcc6b6b432ffc8364a
33.523684
83
0.57512
3.204446
false
false
false
false
diofant/diofant
diofant/solvers/ode.py
1
283430
r""" This module contains :py:meth:`~diofant.solvers.ode.dsolve` and different helper functions that it uses. :py:meth:`~diofant.solvers.ode.dsolve` solves ordinary differential equations. See the docstring on the various functions for their uses. Note that partial differential equations support is in ``pde.py``. No...
bsd-3-clause
e6533d1ef6b0070bbf8af2975e360a56
38.250796
386
0.535444
3.169011
false
false
false
false
diofant/diofant
diofant/tests/simplify/test_cse.py
1
14074
import itertools import pytest from diofant import (Add, Eq, Function, Idx, ImmutableDenseMatrix, ImmutableSparseMatrix, IndexedBase, Matrix, MatrixSymbol, MutableDenseMatrix, MutableSparseMatrix, O, Piecewise, Pow, Rational, RootOf, Subs, Symbol, Tuple, ...
bsd-3-clause
b3de8add718da2f43e294d7e2b3bdcfc
34.450882
298
0.473
2.662505
false
true
false
false
diofant/diofant
diofant/simplify/ratsimp.py
1
7308
from itertools import combinations_with_replacement from ..core import Add, Dummy, Rational, symbols from ..polys import (ComputationFailed, Poly, cancel, parallel_poly_from_expr, reduced) from ..polys.monomials import Monomial def ratsimp(expr): """ Put an expression over a common denom...
bsd-3-clause
a52adff774fafb34165994f44ad349ba
33.305164
95
0.54742
3.486164
false
false
false
false
diofant/diofant
diofant/matrices/expressions/matadd.py
1
3298
import functools import operator from ...core import Add, Expr from ...core.logic import _fuzzy_group from ...core.strategies import (condition, do_one, exhaust, flatten, glom, rm_id, sort, unpack) from ...core.sympify import sympify from ...functions import adjoint from ...utilities im...
bsd-3-clause
016f41fffb4fe2d9f4ed898f5f890884
25.384
88
0.565797
3.475237
false
false
false
false
diofant/diofant
diofant/solvers/polysys.py
1
7387
"""Solvers of systems of polynomial equations.""" import collections from ..core import expand_mul from ..domains import EX from ..matrices import Matrix from ..polys import (ComputationFailed, PolificationFailed, groebner, parallel_poly_from_expr) from ..polys.solvers import solve_lin_sys from ....
bsd-3-clause
8ba7be4c000fe2c8da0476b44f36cdae
28.78629
81
0.553946
3.684289
false
false
false
false
diofant/diofant
diofant/sets/fancysets.py
1
13184
"""Special sets.""" from ..core import Basic, Expr, Integer, Lambda, Rational, S, oo from ..core.compatibility import as_int from ..core.singleton import Singleton from ..core.sympify import converter, sympify from ..logic import false, true from ..utilities.iterables import cantor_product from .sets import EmptySet, ...
bsd-3-clause
485d96d86896421b1545e57121ae1cdf
25.527163
81
0.539669
3.803808
false
false
false
false
diofant/diofant
diofant/functions/elementary/integers.py
1
6922
from mpmath.libmp.libmpf import prec_to_dps from ...core import (Add, Function, Ge, Gt, I, Integer, Le, Lt, PrecisionExhausted) from ...logic import false, true ############################################################################### # ####################### FLOOR and CEILING FUNCTIONS #...
bsd-3-clause
7c685fb121816e326c3dcd7a96109b3e
27.253061
82
0.505779
3.95317
false
false
false
false
diofant/diofant
diofant/tests/polys/test_modulargcd.py
1
2048
"""Tests for modular GCD algorithms.""" from diofant import QQ, ZZ, ring, sqrt from diofant.polys.modulargcd import (_chinese_remainder_reconstruction, _func_field_modgcd_m, _to_ANP_poly, _to_ZZ_poly) __all__ = () def test_chinese_remainde...
bsd-3-clause
24ec899adcd7d6ba664e789078e53238
23.97561
73
0.47168
2.283166
false
false
false
false
diofant/diofant
diofant/vector/scalar.py
2
1659
from ..core import Expr, Integer, Symbol, sympify from ..printing.pretty.stringpict import prettyForm class BaseScalar(Expr): """ A coordinate symbol/base scalar. Ideally, users should not instantiate this class. """ is_commutative = True def __new__(cls, name, index, system, pretty_str, la...
bsd-3-clause
4d9815941d2cd5dd8681b3b4b2713f29
27.118644
78
0.602773
3.978417
false
false
false
false
kjung/scikit-learn
examples/feature_selection/plot_select_from_model_boston.py
142
1527
""" =================================================== Feature selection using SelectFromModel and LassoCV =================================================== Use SelectFromModel meta-transformer along with Lasso to select the best couple of features from the Boston dataset. """ # Author: Manoj Kumar <mks542@nyu.edu>...
bsd-3-clause
052d7530d893e75dda8da3ea3e8762af
28.941176
84
0.691552
3.542923
false
false
false
false
kjung/scikit-learn
examples/svm/plot_rbf_parameters.py
43
8096
''' ================== RBF SVM parameters ================== This example illustrates the effect of the parameters ``gamma`` and ``C`` of the Radial Basis Function (RBF) kernel SVM. Intuitively, the ``gamma`` parameter defines how far the influence of a single training example reaches, with low values meaning 'far' a...
bsd-3-clause
d2921613e107de6e55b6430b74aeb5b2
39.683417
80
0.712945
3.646847
false
false
false
false
kjung/scikit-learn
examples/cluster/plot_face_compress.py
70
2479
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= Vector Quantization Example ========================================================= Face, a 1024 x 768 size image of a raccoon face, is used here to illustrate how `k`-means is used for vector quantization. """ ...
bsd-3-clause
a33b222e8dd762cabed6c9ce7f654f1d
27.482759
77
0.661017
3.063041
false
false
false
false
pallets/click
examples/termui/termui.py
1
4150
import math import random import time import click @click.group() def cli(): """This script showcases different terminal UI helpers in Click.""" pass @cli.command() def colordemo(): """Demonstrates ANSI color support.""" for color in "red", "green", "blue": click.echo(click.style(f"I am col...
bsd-3-clause
9851c21c6c15151e92acdf9aa5e2853b
23.532544
82
0.543415
3.698483
false
false
false
false
pallets/click
src/click/_compat.py
1
18810
import codecs import io import os import re import sys import typing as t from weakref import WeakKeyDictionary CYGWIN = sys.platform.startswith("cygwin") MSYS2 = sys.platform.startswith("win") and ("GCC" in sys.version) # Determine local App Engine environment, per Google's own suggestion APP_ENGINE = "APPENGINE_RUNT...
bsd-3-clause
c62064302a7a3f028dc93b6293083cc4
29.047923
88
0.616108
3.738076
false
false
false
false
pytorch/text
torchtext/models/roberta/bundler.py
1
13133
import logging import re from dataclasses import dataclass from typing import Any, Callable, Dict, Optional, Union from urllib.parse import urljoin import torch from torch.nn import Module from torchtext._download_hooks import load_state_dict_from_url logger = logging.getLogger(__name__) import torchtext.transforms ...
bsd-3-clause
6723765062893c09c9e48b2e72dea9dd
43.368243
176
0.665575
3.737336
false
false
false
false
scipy/scipy
benchmarks/benchmarks/cython_special.py
18
1956
import re import numpy as np from scipy import special from .common import with_attributes, safe_import with safe_import(): from scipy.special import cython_special FUNC_ARGS = { 'airy_d': (1,), 'airy_D': (1,), 'beta_dd': (0.25, 0.75), 'erf_d': (1,), 'erf_D': (1+1j,), 'exprel_d': (1e-6,)...
bsd-3-clause
11b34a26465dce6fd1d651207a066fc9
26.942857
76
0.500511
3.227723
false
false
false
false
scipy/scipy
scipy/interpolate/_pade.py
8
1827
from numpy import zeros, asarray, eye, poly1d, hstack, r_ from scipy import linalg __all__ = ["pade"] def pade(an, m, n=None): """ Return Pade approximation to a polynomial as the ratio of two polynomials. Parameters ---------- an : (N,) array_like Taylor series coefficients. m : int ...
bsd-3-clause
86f2f592937100f77b605e2f19eaebce
26.268657
78
0.530378
2.937299
false
false
false
false
scipy/scipy
scipy/spatial/transform/tests/test_rotation_spline.py
22
5035
from itertools import product import numpy as np from numpy.testing import assert_allclose from pytest import raises from scipy.spatial.transform import Rotation, RotationSpline from scipy.spatial.transform._rotation_spline import ( _angular_rate_to_rotvec_dot_matrix, _rotvec_dot_to_angular_rate_matrix, _ma...
bsd-3-clause
a1d0d0e1b928a7a1556cb897c9249420
30.273292
74
0.606157
2.912088
false
true
false
false
scipy/scipy
scipy/special/tests/test_nan_inputs.py
26
1845
"""Test how the ufuncs in special handle nan inputs. """ from typing import Callable, Dict import numpy as np from numpy.testing import assert_array_equal, assert_, suppress_warnings import pytest import scipy.special as sc KNOWNFAILURES: Dict[str, Callable] = {} POSTPROCESSING: Dict[str, Callable] = {} def _get...
bsd-3-clause
2450144e4d3039c675d679b23214748d
27.828125
72
0.611382
3.804124
false
true
false
false
scipy/scipy
scipy/stats/_discrete_distns.py
10
54698
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from functools import partial import warnings from scipy import special from scipy.special import entr, logsumexp, betaln, gammaln as gamln, zeta from scipy._lib._util import _lazywhere, rng_integers from scipy.inte...
bsd-3-clause
2527f0991bb8ba6313190da1d7aa25dd
29.153252
90
0.548027
3.013664
false
false
false
false
scipy/scipy
scipy/_lib/_uarray/__init__.py
11
4493
""" .. note: If you are looking for overrides for NumPy-specific methods, see the documentation for :obj:`unumpy`. This page explains how to write back-ends and multimethods. ``uarray`` is built around a back-end protocol, and overridable multimethods. It is necessary to define multimethods for back-ends t...
bsd-3-clause
ab305dadb14a5002ab5a66be5cd80a8e
37.732759
91
0.691743
3.611736
false
false
false
false
scipy/scipy
scipy/io/_netcdf.py
1
39085
""" NetCDF reader/writer module. This module is used to read and create NetCDF files. NetCDF files are accessed through the `netcdf_file` object. Data written to and from NetCDF files are contained in `netcdf_variable` objects. Attributes are given as member variables of the `netcdf_file` and `netcdf_variable` objects...
bsd-3-clause
c6476d4a2bbdc0fa7517fc5f5ca2ffc3
34.923713
107
0.570577
4.117678
false
false
false
false
scipy/scipy
scipy/integrate/tests/test_odeint_jac.py
29
1820
import numpy as np from numpy.testing import assert_equal, assert_allclose from scipy.integrate import odeint import scipy.integrate._test_odeint_banded as banded5x5 def rhs(y, t): dydt = np.zeros_like(y) banded5x5.banded5x5(t, y, dydt) return dydt def jac(y, t): n = len(y) jac = np.zeros((n, n...
bsd-3-clause
a0ca9b4d822b11b49be475c1a69630fa
23.266667
71
0.601648
2.633864
false
true
false
false
statsmodels/statsmodels
statsmodels/tsa/arima/model.py
3
25337
""" ARIMA model class. Author: Chad Fulton License: BSD-3 """ from statsmodels.compat.pandas import Appender import warnings import numpy as np from statsmodels.tools.data import _is_using_pandas from statsmodels.tsa.statespace import sarimax from statsmodels.tsa.statespace.kalman_filter import MEMORY_CONSERVE from...
bsd-3-clause
9145ca34808a33cde1312b4a1044f333
46.89603
79
0.600939
4.251174
false
false
false
false
statsmodels/statsmodels
statsmodels/datasets/modechoice/data.py
3
2633
"""Travel Mode Choice""" from statsmodels.datasets import utils as du __docformat__ = 'restructuredtext' COPYRIGHT = """This is public domain.""" TITLE = __doc__ SOURCE = """ Greene, W.H. and D. Hensher (1997) Multinomial logit and discrete choice models in Greene, W. H. (1997) LIMDEP version 7.0 user's manual revise...
bsd-3-clause
0c09303cac9505d8c32102de9411a628
31.9125
82
0.663122
3.572592
false
false
false
false
statsmodels/statsmodels
statsmodels/nonparametric/tests/test_kde.py
3
12795
import os import numpy.testing as npt import numpy as np import pytest from scipy import stats from statsmodels.distributions.mixture_rvs import mixture_rvs from statsmodels.nonparametric.kde import KDEUnivariate as KDE import statsmodels.sandbox.nonparametric.kernels as kernels import statsmodels.nonparametric.bandw...
bsd-3-clause
b07d9ee41dba39895c70257af30aa36a
31.807692
83
0.621102
3.147601
false
true
false
false
statsmodels/statsmodels
statsmodels/graphics/tests/test_dotplot.py
3
15085
import numpy as np import pandas as pd import pytest from statsmodels.graphics.dotplots import dot_plot # If true, the output is written to a multi-page pdf file. pdf_output = False try: import matplotlib.pyplot as plt except ImportError: pass def close_or_save(pdf, fig): if pdf_output: pdf.sav...
bsd-3-clause
be9a1b285e04034d1e25e81615a23168
35.349398
84
0.607358
3.100082
false
false
false
false
statsmodels/statsmodels
statsmodels/sandbox/distributions/tests/test_transf.py
3
6522
# -*- coding: utf-8 -*- """ Created on Sun May 09 22:35:21 2010 Author: josef-pktd License: BSD todo: change moment calculation, (currently uses default _ppf method - I think) >>> lognormalg.moment(4) Warning: The algorithm does not converge. Roundoff error is detected in the extrapolation table. It is assumed t...
bsd-3-clause
0bb2dfbd55440106f23c6ad279e00584
35.435754
79
0.553511
2.800343
false
false
false
false
statsmodels/statsmodels
statsmodels/regression/_prediction.py
3
7055
# -*- coding: utf-8 -*- """ Created on Fri Dec 19 11:29:18 2014 Author: Josef Perktold License: BSD-3 """ import numpy as np from scipy import stats import pandas as pd # this is similar to ContrastResults after t_test, copied and adjusted class PredictionResults: """ Results class for predictions. Pa...
bsd-3-clause
f41428f736cd02f238073fd03bbd3042
31.662037
77
0.588094
3.963483
false
false
false
false
statsmodels/statsmodels
statsmodels/genmod/tests/results/glmnet_r_results.py
6
1926
import numpy as np rslt_binomial_0 = np.array([ 0, 6.618737, 0.004032037, 0.01433665, 0.01265635, 0.006173346, 0.01067706]) rslt_binomial_1 = np.array([ 0, 1.029661, 0.02180239, 0.07769613, 0.06756466, 0.03156418, 0.05851878]) rslt_binomial_2 = np.array([ 0, 0.1601819, 0.07111087, 0.2544921, 0.2110318, 0...
bsd-3-clause
d08b333712148a0dbc467e94849f8014
34.018182
79
0.668224
1.997925
false
false
true
false
statsmodels/statsmodels
statsmodels/examples/ex_kernel_singleindex_dgp.py
6
3400
# -*- coding: utf-8 -*- """ Created on Sun Jan 06 09:50:54 2013 Author: Josef Perktold """ if __name__ == '__main__': import numpy as np import matplotlib.pyplot as plt #from statsmodels.nonparametric.api import KernelReg import statsmodels.sandbox.nonparametric.kernel_extras as smke import st...
bsd-3-clause
e6c20874055bd20808ebc91bd5c1dc16
35.956522
98
0.577059
2.709163
false
false
false
false
statsmodels/statsmodels
statsmodels/regression/tests/results/lme_r_results.py
6
15667
import numpy as np coef_ml_drf_0 = np.array([-0.9887517]) vcov_ml_drf_0 = np.array([0.001317148]).reshape(1, 1, order='F') cov_re_ml_drf_0 = np.array([0.2522485]).reshape(1, 1, order='F') scale_ml_drf_0 = np.array([0.2718486]) loglike_ml_drf_0 = np.array([-240.1254]) ranef_mean_ml_drf_0 = np.array([0.04977167]) ...
bsd-3-clause
771ea7896656a34934c9179356f32110
26.976786
79
0.644986
1.994526
false
false
true
false
statsmodels/statsmodels
statsmodels/tools/linalg.py
5
4805
""" Linear Algebra solvers and other helpers """ import numpy as np __all__ = ["logdet_symm", "stationary_solve", "transf_constraints", "matrix_sqrt"] def logdet_symm(m, check_symm=False): """ Return log(det(m)) asserting positive definiteness of m. Parameters ---------- m : array_lik...
bsd-3-clause
27bcdfa9382ad98b456dc807791d1026
26.614943
75
0.593548
3.847078
false
false
false
false
statsmodels/statsmodels
statsmodels/genmod/tests/gee_poisson_simulation_check.py
3
9115
""" Assesment of Generalized Estimating Equations using simulation. This script checks Poisson models. See the generated file "gee_poisson_simulation_check.txt" for results. """ import numpy as np from statsmodels.genmod.families import Poisson from .gee_gaussian_simulation_check import GEE_simulator from statsmodel...
bsd-3-clause
811dc05dda1edb6394e2e0d8d0ca5cd2
31.208481
80
0.544487
3.369686
false
false
false
false
conda-forge/conda-forge.github.io
scripts/tick_my_feedstocks.py
1
33437
#!/usr/bin/env conda-execute # conda execute # env: # - python >=2.7 # - setuptools # - beautifulsoup4 # - conda-smithy # - gitpython # - jinja2 # - pygithub >=1.29,<2 # - pyyaml # - requests # - tqdm # channels: # - conda-forge # run_with: python """ Usage: python tick_my_feedstocks.py [-h] [--password GH...
bsd-3-clause
3ada80949789efce164c2b8bf69af057
34.992465
79
0.578072
4.081665
false
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/worker/heartbeat.py
1
1643
# -*- coding: utf-8 -*- """ celery.worker.heartbeat ~~~~~~~~~~~~~~~~~~~~~~~ This is the internal thread that sends heartbeat events at regular intervals. """ from __future__ import absolute_import from .state import SOFTWARE_INFO, active_requests, total_count class Heart(object): """Timer sendi...
bsd-3-clause
e531a22939d8e61a297d393ccd2b314f
29.425926
75
0.572733
4.180662
false
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/tests/config.py
1
1764
from __future__ import absolute_import import os from kombu import Queue BROKER_URL = 'memory://' #: warn if config module not found os.environ['C_WNOCONF'] = 'yes' #: Don't want log output when running suite. CELERYD_HIJACK_ROOT_LOGGER = False CELERY_RESULT_BACKEND = 'cache' CELERY_CACHE_BACKEND = 'memory' CELER...
bsd-3-clause
7258e378987520acc242d41d412ccdb5
31.666667
74
0.70805
3.073171
false
true
true
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/app/base.py
1
17166
# -*- coding: utf-8 -*- """ celery.app.base ~~~~~~~~~~~~~~~ Actual App instance implementation. """ from __future__ import absolute_import from __future__ import with_statement import os import threading import warnings from collections import deque from contextlib import contextmanager from copy import...
bsd-3-clause
45f1687fac40be3084086798960061f7
33.678788
78
0.594955
4.127434
false
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/tests/utilities/test_imports.py
1
2006
from __future__ import absolute_import from __future__ import with_statement from mock import Mock, patch from celery.utils.imports import ( qualname, symbol_by_name, reload_from_cwd, module_file, find_module, NotAPackage, ) from celery.tests.utils import Case class test_import_utils(Case):...
bsd-3-clause
73136b7616754e12d84d176e222a0585
28.940299
71
0.612662
3.569395
false
true
false
false
mozilla/firefox-flicks
vendor-local/lib/python/requests/packages/urllib3/poolmanager.py
15
5354
# urllib3/poolmanager.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging from ._collections import RecentlyUsedContainer from .connectionpool import...
bsd-3-clause
c52448f308d1881fdc3734df6cb01829
31.846626
79
0.632051
4.049924
false
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/tests/contrib/test_migrate.py
1
3725
from __future__ import absolute_import from __future__ import with_statement from kombu import Connection, Producer, Queue, Exchange from kombu.exceptions import StdChannelError from mock import patch from celery.contrib.migrate import ( State, migrate_task, migrate_tasks, ) from celery.utils.encoding imp...
bsd-3-clause
491de373fad557d17026e1edda431fa4
32.558559
74
0.60349
3.950159
false
true
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/utils/timer2.py
1
10044
# -*- coding: utf-8 -*- """ timer2 ~~~~~~ Scheduler for Python functions. """ from __future__ import absolute_import from __future__ import with_statement import atexit import heapq import os import sys import threading from datetime import datetime from functools import wraps from itertools import coun...
bsd-3-clause
ad74caaaf824a5e7d8dd31b917ff2308
28.715976
79
0.551772
3.949666
false
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/app/builtins.py
1
12278
# -*- coding: utf-8 -*- """ celery.app.builtins ~~~~~~~~~~~~~~~~~~~ Built-in tasks that are always available in all app instances. E.g. chord, group and xmap. """ from __future__ import absolute_import from __future__ import with_statement from collections import deque from itertools import starmap ...
bsd-3-clause
f03cd460a1c7fc7a8de8c83e681fdec3
35.325444
79
0.558153
4.28402
false
false
false
false
mozilla/firefox-flicks
vendor-local/lib/python/celery/worker/mediator.py
1
2304
# -*- coding: utf-8 -*- """ celery.worker.mediator ~~~~~~~~~~~~~~~~~~~~~~ The mediator is an internal thread that moves tasks from an internal :class:`Queue` to the worker pool. This is only used if rate limits are enabled, as it moves messages from the rate limited queue (which holds tasks ...
bsd-3-clause
a88f3e22c667b0447700ef8e0067e78c
27.8
77
0.582031
4.121646
false
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_1_0_6/models/communicationrequest.py
1
6718
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/CommunicationRequest) on 2016-06-23. # 2016, SMART Health IT. from . import domainresource class CommunicationRequest(domainresource.DomainResource): """ A request for information to be sen...
bsd-3-clause
b5b5dd5b5e03037dd7f832b359b47526
40.9875
147
0.625484
4.487642
false
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_1_0_6/models/medicationorder.py
1
14548
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/MedicationOrder) on 2016-06-23. # 2016, SMART Health IT. from . import domainresource class MedicationOrder(domainresource.DomainResource): """ Prescription of medication to for patient. ...
bsd-3-clause
4ece6e8df29f17b3d34318b90c7653fa
43.489297
132
0.635001
4.387214
false
false
false
false
django/django-localflavor
tests/test_ch.py
4
2928
from django.test import SimpleTestCase from django.utils.translation import gettext as _ from django.utils.translation import override from localflavor.ch.forms import CHIdentityCardNumberField, CHSocialSecurityNumberField, CHStateSelect, CHZipCodeField class CHLocalFlavorTests(SimpleTestCase): def test_CHState...
bsd-3-clause
5ee47419a7b8e7e414f400e4c3273abc
35.6
118
0.641735
3.388889
false
true
false
false
all-of-us/raw-data-repository
rdr_service/alembic/versions/fbd2991cb316_add_created_from_metric_id_to_results_.py
1
1841
"""add created_from_metric_id to results viewed and report states tables Revision ID: fbd2991cb316 Revises: 2ea1a8e0acb0, 2d70a82af09b, 42428d88dd1d Create Date: 2022-10-06 14:50:49.973035 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fbd2991cb316' down_revis...
bsd-3-clause
5f7497a69409f0ec0ce92cfb95c890b8
33.092593
120
0.687127
3.17962
false
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_4_0_0/models/medicinalproductauthorization.py
1
10780
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/MedicinalProductAuthorization) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class MedicinalProductAuthorization(domainresource.DomainResource): """ The regulat...
bsd-3-clause
f34d012e6b8268de50e5d5e44a25b8ee
43.916667
152
0.648609
4.45823
false
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_4_0_0/models/testreport_tests.py
1
6848
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07. # 2019, SMART Health IT. import os import io import unittest import json from . import testreport from .fhirdate import FHIRDate class TestReportTests(unittest.TestCase): def instantiate_from(self, filename):...
bsd-3-clause
88f7fdbf34c092a646d7bb9619e353b5
65.485437
109
0.696554
3.213515
false
true
false
false
all-of-us/raw-data-repository
rdr_service/singletons.py
1
1699
import threading from datetime import timedelta from rdr_service.clock import CLOCK singletons_lock = threading.RLock() singletons_map = {} CODE_CACHE_INDEX = 0 HPO_CACHE_INDEX = 1 SITE_CACHE_INDEX = 2 SQL_DATABASE_INDEX = 3 ORGANIZATION_CACHE_INDEX = 4 GENERIC_SQL_DATABASE_INDEX = 5 MAIN_CONFIG_INDEX = 6 DB_CONFIG_...
bsd-3-clause
343a0b2f145b521c93146ecfc803d6fa
27.79661
92
0.675103
3.614894
false
false
false
false
all-of-us/raw-data-repository
rdr_service/resource/tasks.py
1
8792
# # This file is subject to the terms and conditions defined in the # file 'LICENSE', which is part of this source code package. # # import json import logging from datetime import datetime import rdr_service.config as config from rdr_service.resource.constants import SKIP_TEST_PIDS_FOR_PDR from rdr_service.dao.bigqu...
bsd-3-clause
6b81e00bcb7fb69a2b433823dad5b9b7
44.319588
118
0.685282
3.90582
false
false
false
false