hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
90c1a4b62728120810321f50d18812d8c390b985
177
py
Python
app/tickets/tickets/admin.py
dnkraju/django_docker
2e63f5a4edece3c86b94f4401a1137c9933e933c
[ "MIT" ]
72
2018-08-23T22:32:24.000Z
2022-02-24T19:10:31.000Z
app/tickets/tickets/admin.py
dnkraju/django_docker
2e63f5a4edece3c86b94f4401a1137c9933e933c
[ "MIT" ]
4
2019-03-01T15:25:09.000Z
2020-01-17T18:22:59.000Z
app/tickets/tickets/admin.py
dnkraju/django_docker
2e63f5a4edece3c86b94f4401a1137c9933e933c
[ "MIT" ]
43
2018-12-24T19:40:19.000Z
2022-03-14T15:02:49.000Z
from django.contrib import admin from django.contrib.auth import get_user_model from tickets.tickets.models import Ticket User = get_user_model() admin.site.register(Ticket)
19.666667
46
0.824859
27
177
5.259259
0.518519
0.140845
0.239437
0
0
0
0
0
0
0
0
0
0.107345
177
8
47
22.125
0.898734
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
90e0e529e81edd65c2cb7b6460ea8d56193b7922
11,782
py
Python
sympy/assumptions/handlers/sets.py
Timeroot/sympy
f95bf4bbc548d326f4643d22faec32aca7880187
[ "BSD-3-Clause" ]
2
2015-11-13T16:40:57.000Z
2017-09-15T15:37:19.000Z
sympy_old/assumptions/handlers/sets.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
1
2016-06-13T01:29:51.000Z
2016-06-14T00:38:27.000Z
sympy_old/assumptions/handlers/sets.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
1
2022-03-21T09:07:27.000Z
2022-03-21T09:07:27.000Z
""" Handlers for predicates related to set membership: integer, rational, etc. """ from sympy.assumptions import Q, ask from sympy.assumptions.handlers import CommonHandler class AskIntegerHandler(CommonHandler): """ Handler for Q.integer Test that an expression belongs to the field of integer numbers """ @staticmethod def _number(expr, assumptions): # helper method if expr.as_real_imag()[1] == 0: return expr.evalf(1) == expr return False @staticmethod def Add(expr, assumptions): """ Integer + Integer -> Integer Integer + !Integer -> !Integer !Integer + !Integer -> ? """ if expr.is_number: return AskIntegerHandler._number(expr, assumptions) return test_closed_group(expr, assumptions, Q.integer) @staticmethod def Mul(expr, assumptions): """ Integer*Integer -> Integer Integer*Irrational -> !Integer Odd/Even -> !Integer Integer*Rational -> ? """ if expr.is_number: return AskIntegerHandler._number(expr, assumptions) _output = True for arg in expr.args: if not ask(Q.integer(arg), assumptions): if arg.is_Rational: if arg.q == 2: return ask(Q.even(2*expr), assumptions) if ~(arg.q & 1): return None elif ask(Q.irrational(arg), assumptions): if _output: _output = False else: return else: return else: return _output Pow = Add @staticmethod def int(expr, assumptions): return True @staticmethod def Integer(expr, assumptions): return True @staticmethod def Rational(expr, assumptions): # rationals with denominator one get # evaluated to Integers return False @staticmethod def Float(expr, assumptions): return int(expr) == expr @staticmethod def Pi(expr, assumptions): return False @staticmethod def Exp1(expr, assumptions): return False @staticmethod def Infinity(expr, assumptions): return False @staticmethod def NegativeInfinity(expr, assumptions): return False @staticmethod def ImaginaryUnit(expr, assumptions): return False @staticmethod def Abs(expr, assumptions): return ask(Q.integer(expr.args[0]), assumptions) class AskRationalHandler(CommonHandler): """ Handler for Q.rational Test that an expression belongs to the field of rational numbers """ @staticmethod def Add(expr, assumptions): """ Rational + Rational -> Rational Rational + !Rational -> !Rational !Rational + !Rational -> ? """ if expr.is_number: if expr.as_real_imag()[1]: return False return test_closed_group(expr, assumptions, Q.rational) Mul = Add @staticmethod def Pow(expr, assumptions): """ Rational ** Integer -> Rational Irrational ** Rational -> Irrational Rational ** Irrational -> ? """ if ask(Q.integer(expr.exp), assumptions): return ask(Q.rational(expr.base), assumptions) elif ask(Q.rational(expr.exp), assumptions): if ask(Q.prime(expr.base), assumptions): return False @staticmethod def Rational(expr, assumptions): return True @staticmethod def Float(expr, assumptions): # it's finite-precission return True @staticmethod def ImaginaryUnit(expr, assumptions): return False @staticmethod def Infinity(expr, assumptions): return False @staticmethod def NegativeInfinity(expr, assumptions): return False @staticmethod def Pi(expr, assumptions): return False @staticmethod def Exp1(expr, assumptions): return False class AskIrrationalHandler(CommonHandler): @staticmethod def Basic(expr, assumptions): _real = ask(Q.real(expr), assumptions) if _real: _rational = ask(Q.rational(expr), assumptions) if _rational is None: return None return not _rational else: return _real class AskRealHandler(CommonHandler): """ Handler for Q.real Test that an expression belongs to the field of real numbers """ @staticmethod def _number(expr, assumptions): return not expr.as_real_imag()[1] @staticmethod def Add(expr, assumptions): """ Real + Real -> Real Real + (Complex & !Real) -> !Real """ if expr.is_number: return AskRealHandler._number(expr, assumptions) return test_closed_group(expr, assumptions, Q.real) @staticmethod def Mul(expr, assumptions): """ Real*Real -> Real Real*Imaginary -> !Real Imaginary*Imaginary -> Real """ if expr.is_number: return AskRealHandler._number(expr, assumptions) result = True for arg in expr.args: if ask(Q.real(arg), assumptions): pass elif ask(Q.imaginary(arg), assumptions): result = result ^ True else: break else: return result @staticmethod def Pow(expr, assumptions): """ Real**Integer -> Real Positive**Real -> Real Real**(Integer/Even) -> Real if base is nonnegative Real**(Integer/Odd) -> Real """ if expr.is_number: return AskRealHandler._number(expr, assumptions) if ask(Q.real(expr.base), assumptions): if ask(Q.integer(expr.exp), assumptions): return True elif expr.exp.is_Rational: if (expr.exp.q % 2 == 0): return ask(Q.real(expr.base), assumptions) and \ not ask(Q.negative(expr.base), assumptions) else: return True elif ask(Q.real(expr.exp), assumptions): if ask(Q.positive(expr.base), assumptions): return True @staticmethod def Rational(expr, assumptions): return True @staticmethod def Float(expr, assumptions): return True @staticmethod def Pi(expr, assumptions): return True @staticmethod def Exp1(expr, assumptions): return True @staticmethod def Abs(expr, assumptions): return True @staticmethod def re(expr, assumptions): return True im = re @staticmethod def ImaginaryUnit(expr, assumptions): return False @staticmethod def Infinity(expr, assumptions): return False @staticmethod def NegativeInfinity(expr, assumptions): return False @staticmethod def sin(expr, assumptions): if ask(Q.real(expr.args[0]), assumptions): return True cos, exp = sin, sin class AskExtendedRealHandler(AskRealHandler): """ Handler for Q.extended_real Test that an expression belongs to the field of extended real numbers, that is real numbers union {Infinity, -Infinity} """ @staticmethod def Add(expr, assumptions): return test_closed_group(expr, assumptions, Q.extended_real) Mul, Pow = Add, Add @staticmethod def Infinity(expr, assumptions): return True @staticmethod def NegativeInfinity(expr, assumptions): return True class AskComplexHandler(CommonHandler): """ Handler for Q.complex Test that an expression belongs to the field of complex numbers """ @staticmethod def Add(expr, assumptions): return test_closed_group(expr, assumptions, Q.complex) Mul, Pow = Add, Add @staticmethod def Number(expr, assumptions): return True @staticmethod def NumberSymbol(expr, assumptions): return True @staticmethod def Abs(expr, assumptions): return True @staticmethod def ImaginaryUnit(expr, assumptions): return True @staticmethod def Infinity(expr, assumptions): return False @staticmethod def NegativeInfinity(expr, assumptions): return False sin, cos, exp, re, im = [Abs]*5 # they are all complex functions class AskImaginaryHandler(CommonHandler): """ Handler for Q.imaginary Test that an expression belongs to the field of imaginary numbers, that is, numbers in the form x*I, where x is real """ @staticmethod def _number(expr, assumptions): # helper method return not expr.as_real_imag()[0] @staticmethod def Add(expr, assumptions): """ Imaginary + Imaginary -> Imaginary Imaginary + Complex -> ? Imaginary + Real -> !Imaginary """ if expr.is_number: return AskImaginaryHandler._number(expr, assumptions) reals = 0 for arg in expr.args: if ask(Q.imaginary(arg), assumptions): pass elif ask(Q.real(arg), assumptions): reals += 1 else: break else: if reals == 0: return True if reals == 1 or (len(expr.args) == reals): # two reals could sum 0 thus giving an imaginary return False @staticmethod def Mul(expr, assumptions): """ Real*Imaginary -> Imaginary Imaginary*Imaginary -> Real """ if expr.is_number: return AskImaginaryHandler._number(expr, assumptions) result = False reals = 0 for arg in expr.args: if ask(Q.imaginary(arg), assumptions): result = result ^ True elif not ask(Q.real(arg), assumptions): break else: if reals == len(expr.args): return False return result Pow = Add @staticmethod def Number(expr, assumptions): return not (expr.as_real_imag()[1] == 0) NumberSymbol = Number @staticmethod def ImaginaryUnit(expr, assumptions): return True class AskAlgebraicHandler(CommonHandler): """Handler for Q.algebraic key. """ @staticmethod def Add(expr, assumptions): return test_closed_group(expr, assumptions, Q.algebraic) @staticmethod def Mul(expr, assumptions): return test_closed_group(expr, assumptions, Q.algebraic) @staticmethod def Pow(expr, assumptions): return expr.exp.is_Rational and ask(Q.algebraic(expr.base), assumptions) @staticmethod def Number(expr, assumptions): return False @staticmethod def Rational(expr, assumptions): return expr.q != 0 @staticmethod def ImaginaryUnit(expr, assumptions): return True @staticmethod def AlgebraicNumber(expr, assumptions): return True #### Helper methods def test_closed_group(expr, assumptions, key): """ Test for membership in a group with respect to the current operation """ result = True for arg in expr.args: _out = ask(key(arg), assumptions) if _out is None: break elif _out is False: if result: result = False else: break else: return result
25.724891
80
0.577915
1,201
11,782
5.617818
0.112406
0.171187
0.143175
0.069364
0.654661
0.605158
0.491922
0.424485
0.382244
0.290499
0
0.003327
0.336785
11,782
457
81
25.781182
0.860123
0.161093
0
0.722603
0
0
0
0
0
0
0
0
0
1
0.205479
false
0.006849
0.006849
0.160959
0.523973
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
90e1e81a3d6df199d317025f598518c45530610d
133
py
Python
tests/files/fixture02.py
mhallin/cov-exclude-py
32a834dc60ba38034c049118e35c3970a23f24ab
[ "MIT" ]
4
2015-12-07T15:57:26.000Z
2016-03-23T20:33:59.000Z
tests/files/fixture02.py
mhallin/cov-exclude-py
32a834dc60ba38034c049118e35c3970a23f24ab
[ "MIT" ]
3
2016-02-11T12:26:01.000Z
2020-01-14T00:40:31.000Z
tests/files/fixture02.py
mhallin/cov-exclude-py
32a834dc60ba38034c049118e35c3970a23f24ab
[ "MIT" ]
1
2020-10-13T13:53:35.000Z
2020-10-13T13:53:35.000Z
import pytest @pytest.fixture def sample_fixture(): return False def test_fixture(sample_fixture): assert sample_fixture
12.090909
33
0.766917
17
133
5.764706
0.529412
0.397959
0
0
0
0
0
0
0
0
0
0
0.172932
133
10
34
13.3
0.890909
0
0
0
0
0
0
0
0
0
0
0
0.166667
1
0.333333
false
0
0.166667
0.166667
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
90f6a94819159aadf956836f02300b43ca154e2e
206
py
Python
performance-storage-service/pss_project/api/models/rest/metadata/NoisePageMetadata.py
cmu-db/noisepage-stats
d61a0e143904748b3f7f43628a5b29769a5c9cf8
[ "MIT" ]
23
2020-12-22T20:19:51.000Z
2021-11-24T06:11:01.000Z
performance-storage-service/pss_project/api/models/rest/metadata/NoisePageMetadata.py
cmu-db/noisepage-test
d61a0e143904748b3f7f43628a5b29769a5c9cf8
[ "MIT" ]
13
2020-06-05T22:36:49.000Z
2020-11-10T16:25:04.000Z
performance-storage-service/pss_project/api/models/rest/metadata/NoisePageMetadata.py
cmu-db/noisepage-test
d61a0e143904748b3f7f43628a5b29769a5c9cf8
[ "MIT" ]
2
2020-06-08T18:03:34.000Z
2020-10-06T18:01:35.000Z
class NoisePageMetadata(object): """ This class is the model of the NoisePage metadata as it is represented by the HTTP API """ def __init__(self, db_version): self.db_version = db_version
34.333333
98
0.713592
30
206
4.666667
0.7
0.192857
0.185714
0
0
0
0
0
0
0
0
0
0.213592
206
5
99
41.2
0.864198
0.417476
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
292feccfda157cb71d4e27fae0d1918d065b4822
74
py
Python
myaccoutsite/tests.py
longmazhanfeng/rfui_web
f900bef1cd27eb17150864c90408427d116b849f
[ "MIT" ]
1
2020-07-23T11:20:58.000Z
2020-07-23T11:20:58.000Z
myaccoutsite/tests.py
longmazhanfeng/rfui_web
f900bef1cd27eb17150864c90408427d116b849f
[ "MIT" ]
5
2020-02-11T23:54:01.000Z
2021-06-10T19:28:54.000Z
myaccoutsite/tests.py
longmazhanfeng/rfui_web
f900bef1cd27eb17150864c90408427d116b849f
[ "MIT" ]
1
2017-10-21T06:04:06.000Z
2017-10-21T06:04:06.000Z
from myaccoutsite.models import Project # Project.objects.get_or_create()
24.666667
39
0.837838
10
74
6
0.9
0
0
0
0
0
0
0
0
0
0
0
0.081081
74
3
40
24.666667
0.882353
0.418919
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
2956457f30829acc89bcc94c77359f53de208777
215
py
Python
miqa/core/tests/test_import.py
davidshq/miqa-1
aeb5fbf40a65a6fdb82b6e3d3aff8fe47474792f
[ "Apache-2.0" ]
1
2021-05-26T18:49:52.000Z
2021-05-26T18:49:52.000Z
miqa/core/tests/test_import.py
davidshq/miqa-1
aeb5fbf40a65a6fdb82b6e3d3aff8fe47474792f
[ "Apache-2.0" ]
8
2021-04-29T17:25:28.000Z
2021-05-27T15:09:20.000Z
miqa/core/tests/test_import.py
girder/miqa
756675481c6a11c02134acbde405bfafc9d06b87
[ "Apache-2.0" ]
null
null
null
import pytest @pytest.mark.django_db def test_migrate(): # TODO this test can be deleted once we have real database tests. # For now it's a placeholder to force the migrations to run in CI assert True
23.888889
69
0.730233
37
215
4.189189
0.918919
0
0
0
0
0
0
0
0
0
0
0
0.223256
215
8
70
26.875
0.928144
0.590698
0
0
0
0
0
0
0
0
0
0.125
0.25
1
0.25
true
0
0.25
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
1
0
0
0
0
0
0
4
2971af6c7f3243a5fa94c5dacc0005247d50610c
76
py
Python
recipes-python/python-script/files/main.py
konan5d/meta-ynov-master
f4903da5ee908af6edc6ead658feee69f5076081
[ "MIT" ]
null
null
null
recipes-python/python-script/files/main.py
konan5d/meta-ynov-master
f4903da5ee908af6edc6ead658feee69f5076081
[ "MIT" ]
null
null
null
recipes-python/python-script/files/main.py
konan5d/meta-ynov-master
f4903da5ee908af6edc6ead658feee69f5076081
[ "MIT" ]
2
2021-04-08T09:52:49.000Z
2022-01-18T08:23:26.000Z
#!/usr/bin/env python3 # Replace by your own program print("hello world")
15.2
29
0.710526
12
76
4.5
1
0
0
0
0
0
0
0
0
0
0
0.015625
0.157895
76
5
30
15.2
0.828125
0.657895
0
0
0
0
0.44
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
2978cdd7a70b7ddf5f205f731d3df783444babc8
157
py
Python
hello/jugfile.py
luispedro/jug-gc-counts-tutorial
5e0d344f60a5a7d13d1764f8c94429f3dc5c8ecb
[ "MIT" ]
null
null
null
hello/jugfile.py
luispedro/jug-gc-counts-tutorial
5e0d344f60a5a7d13d1764f8c94429f3dc5c8ecb
[ "MIT" ]
null
null
null
hello/jugfile.py
luispedro/jug-gc-counts-tutorial
5e0d344f60a5a7d13d1764f8c94429f3dc5c8ecb
[ "MIT" ]
null
null
null
from jug import TaskGenerator @TaskGenerator def hello_world(): with open('hello.txt', 'wt') as out: out.write("Hello World\n") hello_world()
15.7
40
0.675159
22
157
4.727273
0.681818
0.288462
0
0
0
0
0
0
0
0
0
0
0.191083
157
9
41
17.444444
0.818898
0
0
0
0
0
0.152866
0
0
0
0
0
0
1
0.166667
true
0
0.166667
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
297ca18a3b03726de5e283c36d17d92dd3c6802f
124
py
Python
lib/JumpScale/grid/osis/_templates/model_template.py
rudecs/jumpscale_core7
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
[ "Apache-2.0" ]
1
2015-10-26T10:38:13.000Z
2015-10-26T10:38:13.000Z
lib/JumpScale/grid/osis/_templates/model_template.py
rudecs/jumpscale_core7
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
[ "Apache-2.0" ]
4
2016-08-25T12:08:39.000Z
2018-04-12T12:36:01.000Z
lib/JumpScale/grid/osis/_templates/model_template.py
rudecs/jumpscale_core7
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
[ "Apache-2.0" ]
3
2016-03-08T07:49:34.000Z
2018-10-19T13:56:43.000Z
from JumpScale import j OsisBaseObject=j.core.osis.getOsisBaseObjectClass() class $categoryname(OsisBaseObject): pass
17.714286
51
0.806452
13
124
7.692308
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.112903
124
6
52
20.666667
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0.25
0.25
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
4
297f282ce5cf479daac0f0943dba3cf8aa1645a3
112
py
Python
WebDownloader/__init__.py
pluto-junzeng/baiduSpider
ea591920cd0994e83e36f033f98c6cc6859141d6
[ "Apache-2.0" ]
13
2020-12-07T03:19:12.000Z
2022-01-19T13:02:41.000Z
WebDownloader/__init__.py
zengjunjun/baiduSpider
ea591920cd0994e83e36f033f98c6cc6859141d6
[ "Apache-2.0" ]
null
null
null
WebDownloader/__init__.py
zengjunjun/baiduSpider
ea591920cd0994e83e36f033f98c6cc6859141d6
[ "Apache-2.0" ]
3
2021-07-10T08:24:55.000Z
2022-01-19T13:02:43.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- """ @Author:lichunhui @Time: 2018/7/12 10:12 @Description: """
14
23
0.589286
16
112
4.125
0.9375
0
0
0
0
0
0
0
0
0
0
0.126316
0.151786
112
8
24
14
0.568421
0.892857
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4634d42529e99ea3c94a5c7b108c98a25c41554b
138
py
Python
tests/compat.py
bmorelli25/ecs-logging-python
ee288d8ce2a3c58462e95e050dd4ec9afbaf1c83
[ "Apache-2.0" ]
null
null
null
tests/compat.py
bmorelli25/ecs-logging-python
ee288d8ce2a3c58462e95e050dd4ec9afbaf1c83
[ "Apache-2.0" ]
null
null
null
tests/compat.py
bmorelli25/ecs-logging-python
ee288d8ce2a3c58462e95e050dd4ec9afbaf1c83
[ "Apache-2.0" ]
null
null
null
import sys if sys.version_info >= (3,): from io import StringIO else: from io import BytesIO as StringIO __all__ = ["StringIO"]
15.333333
38
0.688406
20
138
4.5
0.65
0.133333
0.266667
0
0
0
0
0
0
0
0
0.009259
0.217391
138
8
39
17.25
0.824074
0
0
0
0
0
0.057971
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
46431452f843c2241eadc013608383be44c16498
395
py
Python
04/01/class_attr/attrs.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
04/01/class_attr/attrs.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
32
2017-09-01T00:52:17.000Z
2017-10-01T00:30:02.000Z
04/01/class_attr/attrs.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
import datetime print(datetime.datetime.min) print(datetime.datetime.max) print(datetime.datetime.resolution) print(datetime.datetime.year) print(datetime.datetime.month) print(datetime.datetime.day) print(datetime.datetime.hour) print(datetime.datetime.minute) print(datetime.datetime.second) print(datetime.datetime.microsecond) print(datetime.datetime.tzinfo) print(datetime.datetime.fold)
24.6875
36
0.837975
50
395
6.62
0.3
0.471299
0.761329
0
0
0
0
0
0
0
0
0
0.040506
395
15
37
26.333333
0.873351
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.076923
0
0.076923
0.923077
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
465389663f5b22466ff1a5f106124b6372f42b86
233
py
Python
mmdet/datasets/my_dataset.py
xiayongtao/mmdetection
63c1949e7687e6ac7c8752074689cffda503f3b1
[ "Apache-2.0" ]
null
null
null
mmdet/datasets/my_dataset.py
xiayongtao/mmdetection
63c1949e7687e6ac7c8752074689cffda503f3b1
[ "Apache-2.0" ]
4
2020-01-07T03:47:03.000Z
2020-06-23T10:50:05.000Z
mmdet/datasets/my_dataset.py
xiayongtao/mmdetection
63c1949e7687e6ac7c8752074689cffda503f3b1
[ "Apache-2.0" ]
null
null
null
from .coco import CocoDataset from .registry import DATASETS @DATASETS.register_module class MyDataset(CocoDataset): CLASSES = ('handsup', 'phone', 'write', 'sleep', 'watch_tv', 'watch_pc', 'watch_stu', 'discuss', "watch_blc")
29.125
113
0.725322
28
233
5.857143
0.75
0
0
0
0
0
0
0
0
0
0
0
0.120172
233
7
114
33.285714
0.8
0
0
0
0
0
0.270386
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4655b8f89a1a39d71f8866f2be2a87e286930e3d
192
py
Python
pointnet2/tf_ops/sampling/__init__.py
ltriess/pointnet2_keras
29be56161c8c772442b85b8fda300d10ff7fe7b3
[ "MIT" ]
2
2022-02-06T23:12:15.000Z
2022-03-28T06:48:52.000Z
pointnet2/tf_ops/sampling/__init__.py
ltriess/pointnet2_keras
29be56161c8c772442b85b8fda300d10ff7fe7b3
[ "MIT" ]
null
null
null
pointnet2/tf_ops/sampling/__init__.py
ltriess/pointnet2_keras
29be56161c8c772442b85b8fda300d10ff7fe7b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Larissa Triess" __email__ = "mail@triess.eu" from .tf_sampling import farthest_point_sample __all__ = ["farthest_point_sample"]
19.2
46
0.729167
25
192
4.92
0.84
0.211382
0.308943
0
0
0
0
0
0
0
0
0.011905
0.125
192
9
47
21.333333
0.720238
0.223958
0
0
0
0
0.333333
0.142857
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
465d46c4a8b5300341d70706c2e35e45da4497c3
670
py
Python
tests/test_684.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
tests/test_684.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
tests/test_684.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
#!/usr/bin/env python import pytest """ Test 684. Redundant Connection """ @pytest.fixture(scope="session") def init_variables_684(): from src.leetcode_684_redundant_connection import Solution solution = Solution() def _init_variables_684(): return solution yield _init_variables_684 class TestClass684: def test_solution_0(self, init_variables_684): assert init_variables_684().findRedundantConnection([[1, 2], [1, 3], [2, 3]]) == [2, 3] def test_solution_1(self, init_variables_684): assert init_variables_684().findRedundantConnection( [[1, 2], [2, 3], [3, 4], [1, 4], [1, 5]] ) == [1, 4]
22.333333
95
0.656716
86
670
4.848837
0.383721
0.218225
0.268585
0.091127
0.321343
0.321343
0.321343
0.321343
0.321343
0.321343
0
0.097744
0.20597
670
29
96
23.103448
0.68609
0.029851
0
0
0
0
0.011457
0
0
0
0
0
0.133333
1
0.266667
false
0
0.133333
0.066667
0.533333
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
4671473e3d8620836c0456f4865350cb3d665f72
216
py
Python
docfish/apps/base/templatetags/string_extras.py
vsoch/wordfish
effa923cf7f41dedd4625f247a8a99a1f71d21a1
[ "MIT" ]
null
null
null
docfish/apps/base/templatetags/string_extras.py
vsoch/wordfish
effa923cf7f41dedd4625f247a8a99a1f71d21a1
[ "MIT" ]
7
2017-04-27T00:04:36.000Z
2017-05-15T15:44:40.000Z
docfish/apps/base/templatetags/string_extras.py
vsoch/wordfish
effa923cf7f41dedd4625f247a8a99a1f71d21a1
[ "MIT" ]
1
2021-08-14T05:09:14.000Z
2021-08-14T05:09:14.000Z
from django import template register = template.Library() @register.filter(name='replace') def replace(value, arg): replace_this,replace_with = arg.split(',') return value.replace(replace_this,replace_with)
27
51
0.759259
28
216
5.714286
0.571429
0.1375
0.225
0.275
0
0
0
0
0
0
0
0
0.115741
216
7
52
30.857143
0.837696
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
46761a2322167f07a4816a886956881cdc779c14
2,404
py
Python
matrix/src_from_web/inverse_index_lab.py
tjctw/PythonNote
e93cebbc6bf9748966f761eff6a9ad7b12e9ece5
[ "CC0-1.0" ]
null
null
null
matrix/src_from_web/inverse_index_lab.py
tjctw/PythonNote
e93cebbc6bf9748966f761eff6a9ad7b12e9ece5
[ "CC0-1.0" ]
null
null
null
matrix/src_from_web/inverse_index_lab.py
tjctw/PythonNote
e93cebbc6bf9748966f761eff6a9ad7b12e9ece5
[ "CC0-1.0" ]
null
null
null
# version code d345910f07ae coursera = 1 # Please fill out this stencil and submit using the provided submission script. ## 1: (Task 1) Movie Review ## Task 1 def movie_review(name): """ Input: the name of a movie Output: a string (one of the review options), selected at random using randint """ return ... ## 2: (Task 2) Make Inverse Index def makeInverseIndex(strlist): """ Input: a list of documents as strings Output: a dictionary that maps each word in any document to the set consisting of the document ids (ie, the index in the strlist) for all documents containing the word. Distinguish between an occurence of a string (e.g. "use") in the document as a word (surrounded by spaces), and an occurence of the string as a substring of a word (e.g. "because"). Only the former should be represented in the inverse index. Feel free to use a loop instead of a comprehension. Example: >>> makeInverseIndex(['hello world','hello','hello cat','hellolot of cats']) == {'hello': {0, 1, 2}, 'cat': {2}, 'of': {3}, 'world': {0}, 'cats': {3}, 'hellolot': {3}} True """ pass ## 3: (Task 3) Or Search def orSearch(inverseIndex, query): """ Input: an inverse index, as created by makeInverseIndex, and a list of words to query Output: the set of document ids that contain _any_ of the specified words Feel free to use a loop instead of a comprehension. >>> idx = makeInverseIndex(['Johann Sebastian Bach', 'Johannes Brahms', 'Johann Strauss the Younger', 'Johann Strauss the Elder', ' Johann Christian Bach', 'Carl Philipp Emanuel Bach']) >>> orSearch(idx, ['Bach','the']) {0, 2, 3, 4, 5} >>> orSearch(idx, ['Johann', 'Carl']) {0, 2, 3, 4, 5} """ pass ## 4: (Task 4) And Search def andSearch(inverseIndex, query): """ Input: an inverse index, as created by makeInverseIndex, and a list of words to query Output: the set of all document ids that contain _all_ of the specified words Feel free to use a loop instead of a comprehension. >>> idx = makeInverseIndex(['Johann Sebastian Bach', 'Johannes Brahms', 'Johann Strauss the Younger', 'Johann Strauss the Elder', ' Johann Christian Bach', 'Carl Philipp Emanuel Bach']) >>> andSearch(idx, ['Johann', 'the']) {2, 3} >>> andSearch(idx, ['Johann', 'Bach']) {0, 4} """ pass
33.859155
190
0.653078
345
2,404
4.536232
0.33913
0.011502
0.040895
0.02492
0.410863
0.404473
0.404473
0.404473
0.404473
0.404473
0
0.021552
0.227953
2,404
70
191
34.342857
0.821659
0.835691
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.444444
false
0.333333
0
0
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
469eceb35b12ae9b06e7cd902b44687f856ac17e
22
py
Python
baasdt/python/antchain_sdk_baasdt/__init__.py
alipay/antchain-openapi-prod-sdk
f78549e5135d91756093bd88d191ca260b28e083
[ "MIT" ]
6
2020-06-28T06:40:50.000Z
2022-02-25T11:02:18.000Z
baasdt/python/antchain_sdk_baasdt/__init__.py
alipay/antchain-openapi-prod-sdk
f78549e5135d91756093bd88d191ca260b28e083
[ "MIT" ]
null
null
null
baasdt/python/antchain_sdk_baasdt/__init__.py
alipay/antchain-openapi-prod-sdk
f78549e5135d91756093bd88d191ca260b28e083
[ "MIT" ]
6
2020-06-30T09:29:03.000Z
2022-01-07T10:42:22.000Z
__version__ = '1.3.54'
22
22
0.681818
4
22
2.75
1
0
0
0
0
0
0
0
0
0
0
0.2
0.090909
22
1
22
22
0.35
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
469f5a5f72ab3bdb40db4962b968d947a653b6e7
79
py
Python
goodok_mlu/kekas/callbacks/__init__.py
roma-goodok/ml_utils
c1d6630021a519102b5c4e029cecccdd8a0da946
[ "MIT" ]
null
null
null
goodok_mlu/kekas/callbacks/__init__.py
roma-goodok/ml_utils
c1d6630021a519102b5c4e029cecccdd8a0da946
[ "MIT" ]
null
null
null
goodok_mlu/kekas/callbacks/__init__.py
roma-goodok/ml_utils
c1d6630021a519102b5c4e029cecccdd8a0da946
[ "MIT" ]
1
2021-03-29T13:15:02.000Z
2021-03-29T13:15:02.000Z
from .neptune_callbacks import NeptuneMonitor from .tb_logger import TBLogger
19.75
45
0.860759
10
79
6.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.113924
79
3
46
26.333333
0.942857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
46aaedbe3330312b14281494666516caedecb359
300
py
Python
wecs/panda3d/__init__.py
momojohobo/wecs
2129c8095e8fe1bdea38762e393ef637438c9655
[ "BSD-3-Clause" ]
null
null
null
wecs/panda3d/__init__.py
momojohobo/wecs
2129c8095e8fe1bdea38762e393ef637438c9655
[ "BSD-3-Clause" ]
null
null
null
wecs/panda3d/__init__.py
momojohobo/wecs
2129c8095e8fe1bdea38762e393ef637438c9655
[ "BSD-3-Clause" ]
null
null
null
from .core import ECSShowBase from .clock import * from .model import * from .input import * from .camera import * from .character import * from .ai import * from .animation import * #__all__ = ['ECSShowBase'] def panda_clock(): def read_dt(): return globalClock.dt return read_dt
17.647059
29
0.7
39
300
5.205128
0.461538
0.295567
0
0
0
0
0
0
0
0
0
0
0.206667
300
16
30
18.75
0.852941
0.083333
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
true
0
0.666667
0.083333
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
46acc2ac9025b88c7170d755b3e3a6087394950b
239
py
Python
third_party/antlr_grammars_v4/python/python/examples/testlist_comp.py
mikhan808/rsyntaxtextarea-antlr4-extension
be6a7881e0f6e1a5e8c8e65f7ca4898a2298aa77
[ "BSD-3-Clause" ]
4
2020-10-14T13:44:57.000Z
2021-07-08T00:54:33.000Z
third_party/antlr_grammars_v4/python/python/examples/testlist_comp.py
mikhan808/rsyntaxtextarea-antlr4-extension
be6a7881e0f6e1a5e8c8e65f7ca4898a2298aa77
[ "BSD-3-Clause" ]
null
null
null
third_party/antlr_grammars_v4/python/python/examples/testlist_comp.py
mikhan808/rsyntaxtextarea-antlr4-extension
be6a7881e0f6e1a5e8c8e65f7ca4898a2298aa77
[ "BSD-3-Clause" ]
2
2021-09-06T08:50:58.000Z
2021-09-16T11:37:27.000Z
# testlist_comp # : (test | star_expr) (comp_for | (COMMA (test | star_expr))* COMMA?) # ; # test [x] # star_expr comp_for [z for z in a] # test COMMA star_expr COMMA [x, *a,] # star_expr COMMA test COMMA star_expr [*u, a, *i]
14.9375
74
0.615063
40
239
3.45
0.325
0.347826
0.282609
0.217391
0
0
0
0
0
0
0
0
0.230126
239
15
75
15.933333
0.75
0.753138
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
46aeef734c63fb32e95a08dde2ea376b99404103
101
py
Python
mirari/SIEBEL/apps.py
gcastellan0s/mirariapp
24a9db06d10f96c894d817ef7ccfeec2a25788b7
[ "MIT" ]
null
null
null
mirari/SIEBEL/apps.py
gcastellan0s/mirariapp
24a9db06d10f96c894d817ef7ccfeec2a25788b7
[ "MIT" ]
18
2019-12-27T19:58:20.000Z
2022-02-27T08:17:49.000Z
mirari/SIEBEL/apps.py
gcastellan0s/mirariapp
24a9db06d10f96c894d817ef7ccfeec2a25788b7
[ "MIT" ]
null
null
null
from django.apps import AppConfig from .vars import * class SIEBELConfig(AppConfig): name = APP
16.833333
33
0.752475
13
101
5.846154
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.178218
101
5
34
20.2
0.915663
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
46b6f49a92c6c4a744fcc331e833cddcd790faa5
110
py
Python
transweb/serve.py
AiHaibara/Trans
e37cc946ab3ecbc8e016b3cdfebff1be1cf93f01
[ "MIT" ]
6
2020-03-28T06:46:26.000Z
2021-06-04T17:26:33.000Z
transweb/serve.py
AiHaibara/Trans
e37cc946ab3ecbc8e016b3cdfebff1be1cf93f01
[ "MIT" ]
1
2022-01-13T03:46:25.000Z
2022-01-13T03:46:25.000Z
transweb/serve.py
AiHaibara/Trans
e37cc946ab3ecbc8e016b3cdfebff1be1cf93f01
[ "MIT" ]
null
null
null
from app import app from livereload import Server app.debug=True server = Server(app.wsgi_app) server.serve()
18.333333
29
0.8
18
110
4.833333
0.5
0.206897
0
0
0
0
0
0
0
0
0
0
0.118182
110
6
30
18.333333
0.896907
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d3b2ebb395a9868b9222588a5fa1b034f636fda6
159
py
Python
tardis/default_settings/email.py
keithschulze/mytardis
8ed3562574ce990d42bfe96133185a82c31c27d4
[ "Apache-2.0" ]
null
null
null
tardis/default_settings/email.py
keithschulze/mytardis
8ed3562574ce990d42bfe96133185a82c31c27d4
[ "Apache-2.0" ]
null
null
null
tardis/default_settings/email.py
keithschulze/mytardis
8ed3562574ce990d42bfe96133185a82c31c27d4
[ "Apache-2.0" ]
null
null
null
# Email Configuration EMAIL_PORT = 587 EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'bob@bobmail.com' EMAIL_HOST_PASSWORD = 'bob' EMAIL_USE_TLS = True
13.25
35
0.754717
24
159
4.666667
0.625
0.241071
0.214286
0
0
0
0
0
0
0
0
0.022059
0.144654
159
11
36
14.454545
0.801471
0.119497
0
0
0
0
0.231884
0
0
0
0
0
0
1
0
false
0.2
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
d3d777db61325660f1d9df6cb1ba3684394db58b
266
py
Python
apps/schedule_views.py
AntonNiko/transit-scheduling
0ef34bc93898c94157d5bafd8ff7118b6cbf4a0d
[ "MIT" ]
null
null
null
apps/schedule_views.py
AntonNiko/transit-scheduling
0ef34bc93898c94157d5bafd8ff7118b6cbf4a0d
[ "MIT" ]
null
null
null
apps/schedule_views.py
AntonNiko/transit-scheduling
0ef34bc93898c94157d5bafd8ff7118b6cbf4a0d
[ "MIT" ]
null
null
null
""" Script with Document class that will create documents such as operational schedules, stop schedules. """ import numpy as np import matplotlib.pyplot as plt class ScheduleView(): def __init__(self): pass
16.625
84
0.612782
29
266
5.482759
0.827586
0
0
0
0
0
0
0
0
0
0
0
0.330827
266
15
85
17.733333
0.893258
0.37594
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
d3de0934298aace2811bbaf5abba1ed39df90175
180
py
Python
login_first.py
youthDai/weibospider
814b40202eeeba506b6661e4f98e622212362a7a
[ "MIT" ]
null
null
null
login_first.py
youthDai/weibospider
814b40202eeeba506b6661e4f98e622212362a7a
[ "MIT" ]
null
null
null
login_first.py
youthDai/weibospider
814b40202eeeba506b6661e4f98e622212362a7a
[ "MIT" ]
1
2019-03-31T12:55:03.000Z
2019-03-31T12:55:03.000Z
# coding:utf-8 from tasks import login if __name__ == '__main__': # you should exeute this file, because celery timer wiill execute login delayed login.excute_login_task()
30
83
0.75
26
180
4.807692
0.884615
0
0
0
0
0
0
0
0
0
0
0.006757
0.177778
180
6
84
30
0.837838
0.5
0
0
0
0
0.090909
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
3110172693f89009f6f5f3a2c1a3db7d1af35d38
3,801
py
Python
tests/app_routes.py
sephrat/mealie
1f35742d8bad8e9066cd40e7bff8f5a41c4cd2ba
[ "MIT" ]
null
null
null
tests/app_routes.py
sephrat/mealie
1f35742d8bad8e9066cd40e7bff8f5a41c4cd2ba
[ "MIT" ]
1
2021-04-23T01:13:25.000Z
2021-04-23T01:13:25.000Z
tests/app_routes.py
sephrat/mealie
1f35742d8bad8e9066cd40e7bff8f5a41c4cd2ba
[ "MIT" ]
null
null
null
class AppRoutes: def __init__(self) -> None: self.prefix = "/api" self.users_sign_ups = "/api/users/sign-ups" self.auth_token = "/api/auth/token" self.auth_token_long = "/api/auth/token/long" self.auth_refresh = "/api/auth/refresh" self.users = "/api/users" self.users_self = "/api/users/self" self.groups = "/api/groups" self.groups_self = "/api/groups/self" self.recipes = "/api/recipes" self.recipes_category = "/api/recipes/category" self.recipes_tag = "/api/recipes/tag" self.categories = "/api/categories" self.recipes_tags = "/api/recipes/tags/" self.recipes_create = "/api/recipes/create" self.recipes_create_url = "/api/recipes/create-url" self.meal_plans_all = "/api/meal-plans/all" self.meal_plans_create = "/api/meal-plans/create" self.meal_plans_this_week = "/api/meal-plans/this-week" self.meal_plans_today = "/api/meal-plans/today" self.site_settings_custom_pages = "/api/site-settings/custom-pages" self.site_settings = "/api/site-settings" self.site_settings_webhooks_test = "/api/site-settings/webhooks/test" self.themes = "/api/themes" self.themes_create = "/api/themes/create" self.backups_available = "/api/backups/available" self.backups_export_database = "/api/backups/export/database" self.backups_upload = "/api/backups/upload" self.migrations = "/api/migrations" self.debug_version = "/api/debug/version" self.debug_last_recipe_json = "/api/debug/last-recipe-json" def users_sign_ups_token(self, token): return f"{self.prefix}/users/sign-ups/{token}" def users_id(self, id): return f"{self.prefix}/users/{id}" def users_id_reset_password(self, id): return f"{self.prefix}/users/{id}/reset-password" def users_id_image(self, id): return f"{self.prefix}/users/{id}/image" def users_id_password(self, id): return f"{self.prefix}/users/{id}/password" def groups_id(self, id): return f"{self.prefix}/groups/{id}" def categories_category(self, category): return f"{self.prefix}/categories/{category}" def recipes_tags_tag(self, tag): return f"{self.prefix}/recipes/tags/{tag}" def recipes_recipe_slug(self, recipe_slug): return f"{self.prefix}/recipes/{recipe_slug}" def recipes_recipe_slug_image(self, recipe_slug): return f"{self.prefix}/recipes/{recipe_slug}/image" def meal_plans_plan_id(self, plan_id): return f"{self.prefix}/meal-plans/{plan_id}" def meal_plans_id_shopping_list(self, id): return f"{self.prefix}/meal-plans/{id}/shopping-list" def site_settings_custom_pages_id(self, id): return f"{self.prefix}/site-settings/custom-pages/{id}" def themes_theme_name(self, theme_name): return f"{self.prefix}/themes/{theme_name}" def backups_file_name_download(self, file_name): return f"{self.prefix}/backups/{file_name}/download" def backups_file_name_import(self, file_name): return f"{self.prefix}/backups/{file_name}/import" def backups_file_name_delete(self, file_name): return f"{self.prefix}/backups/{file_name}/delete" def migrations_source_file_name_import(self, source, file_name): return f"{self.prefix}/migrations/{source}/{file_name}/import" def migrations_source_file_name_delete(self, source, file_name): return f"{self.prefix}/migrations/{source}/{file_name}/delete" def migrations_source_upload(self, source): return f"{self.prefix}/migrations/{source}/upload" def debug_log_num(self, num): return f"{self.prefix}/debug/log/{num}"
38.785714
77
0.66693
515
3,801
4.699029
0.128155
0.090909
0.095455
0.147521
0.364463
0.279752
0.243802
0.199174
0.17438
0.142975
0
0
0.192581
3,801
97
78
39.185567
0.78853
0
0
0
0
0
0.357011
0.271508
0
0
0
0
0
1
0.293333
false
0.053333
0.053333
0.28
0.64
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
31186f4b8a170c6e00a04c9fbecccc730114541e
182
py
Python
src/python/llvm/__init__.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
1
2022-03-16T16:37:11.000Z
2022-03-16T16:37:11.000Z
src/python/llvm/__init__.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
src/python/llvm/__init__.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
from _llvm import * from .types import * # Modules imported for their side-effects. from . import _symboltable from . import _value def isa(obj, llvmty): return obj.isa(llvmty)
16.545455
42
0.741758
26
182
5.076923
0.653846
0.151515
0
0
0
0
0
0
0
0
0
0
0.175824
182
10
43
18.2
0.88
0.21978
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.666667
0.166667
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
31602b860bd8266acc194d5c2a676e1cea7ab467
425
py
Python
tests/conftest.py
QunarOPS/qtdigest-cffi
04d44b651a633e16e666ea0da0df7560825cbdc4
[ "BSD-3-Clause" ]
2
2020-01-03T13:41:42.000Z
2022-02-17T06:26:10.000Z
tests/conftest.py
QunarOPS/qtdigest-cffi
04d44b651a633e16e666ea0da0df7560825cbdc4
[ "BSD-3-Clause" ]
2
2020-11-02T03:33:49.000Z
2020-11-02T04:42:16.000Z
tests/conftest.py
QunarOPS/qtdigest-cffi
04d44b651a633e16e666ea0da0df7560825cbdc4
[ "BSD-3-Clause" ]
1
2019-12-14T05:37:29.000Z
2019-12-14T05:37:29.000Z
import random import pytest import tdigest @pytest.fixture(scope="function") def seed(): random.seed(0) @pytest.fixture(scope="function") def digest(): return tdigest.TDigest() @pytest.fixture(scope="session") def custom_digest(): def custom_digest_(compression=tdigest.DEFAULT_COMPRESSION, raw=False): return (tdigest.RawTDigest if raw else tdigest.TDigest)(compression) return custom_digest_
19.318182
76
0.743529
52
425
5.961538
0.403846
0.125806
0.174194
0.16129
0.187097
0
0
0
0
0
0
0.00274
0.141176
425
21
77
20.238095
0.846575
0
0
0.142857
0
0
0.054118
0
0
0
0
0
0
1
0.285714
false
0
0.214286
0.142857
0.714286
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
3170dadbf1557bb0b85b76db2e7b730164f36d3f
2,208
py
Python
elcheapoais_tui/screen_config.py
innovationgarage/ElCheapoAIS-TUI
c54990cfd2c1f7527e55371fcf166f708f21fc14
[ "MIT" ]
null
null
null
elcheapoais_tui/screen_config.py
innovationgarage/ElCheapoAIS-TUI
c54990cfd2c1f7527e55371fcf166f708f21fc14
[ "MIT" ]
null
null
null
elcheapoais_tui/screen_config.py
innovationgarage/ElCheapoAIS-TUI
c54990cfd2c1f7527e55371fcf166f708f21fc14
[ "MIT" ]
null
null
null
from . import screen from .utils import strw class ConfigMenu(screen.Menu): def __init__(self, tui): self.tui = tui screen.Menu.__init__(self, [ "Back", "Msgs/min:", "Msgs/min/mmsi:", ], max_message_per_sec = 0.1, max_message_per_mmsi_per_sec=0.1) def display_max_message_per_sec(self, value): self.wr(b"\x1b[3;13H" + strw(" " * (screen.SCREENW-13), 1, 1, str(value)).encode("utf-8")) def display_max_message_per_mmsi_per_sec(self, value): self.wr(b"\x1b[4;18H" + strw(" " * (screen.SCREENW-19), 1, 1, str(value)).encode("utf-8")) def updated_max_message_per_sec(self, value): downsampler = self.tui.dbus_thread.bus.get_object('no.innovationgarage.elcheapoais.config', '/no/innovationgarage/elcheapoais/downsampler') downsampler.Set("no.innovationgarage.elcheapoais.downsampler", "max_message_per_sec", value) def updated_max_message_per_mmsi_per_sec(self, value): downsampler = self.tui.dbus_thread.bus.get_object('no.innovationgarage.elcheapoais.config', '/no/innovationgarage/elcheapoais/downsampler') downsampler.Set("no.innovationgarage.elcheapoais.downsampler", "max_message_per_mmsi_per_sec", value) def action_0(self): return self.tui.main_screen def action_1(self): self.tui.msgs_min_screen["value"] = self["max_message_per_sec"] return self.tui.msgs_min_screen def action_2(self): self.tui.msgs_min_mmsi_screen["value"] = self["max_message_per_mmsi_per_sec"] return self.tui.msgs_min_mmsi_screen class MsgsMinScreen(screen.Dial): def __init__(self, tui): self.tui = tui screen.Dial.__init__(self, "Messages/minute total: ", 0, inc=0.01) def action(self, value): self.tui.config_screen["max_message_per_sec"] = value return self.tui.config_screen class MsgsMinMmsiScreen(screen.Dial): def __init__(self, tui): self.tui = tui screen.Dial.__init__(self, "Messages/minute/mmsi: ", 0, inc=0.01) def action(self, value): self.tui.config_screen["max_message_per_mmsi_per_sec"] = value return self.tui.config_screen
41.660377
147
0.680254
305
2,208
4.603279
0.203279
0.084758
0.111111
0.068376
0.810541
0.760684
0.669516
0.618946
0.45584
0.45584
0
0.018467
0.19067
2,208
52
148
42.461538
0.767208
0
0
0.285714
0
0
0.228714
0.160779
0
0
0
0
0
1
0.285714
false
0
0.047619
0.02381
0.52381
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
319b10d4896bead13302e61dee459aa9732c77c2
135
py
Python
src/resources/voice.py
RoliKhanna/SafeRide
d839538b19f44bee938694af275d53faa06be8ec
[ "MIT" ]
null
null
null
src/resources/voice.py
RoliKhanna/SafeRide
d839538b19f44bee938694af275d53faa06be8ec
[ "MIT" ]
null
null
null
src/resources/voice.py
RoliKhanna/SafeRide
d839538b19f44bee938694af275d53faa06be8ec
[ "MIT" ]
null
null
null
from gtts import gTTS import os tts = gTTS(text="It is too dark.", lang="en") tts.save("dark.mp3") # os.system("mpg321 morning.mp3")
16.875
45
0.681481
24
135
3.833333
0.708333
0.217391
0
0
0
0
0
0
0
0
0
0.043103
0.140741
135
7
46
19.285714
0.75
0.22963
0
0
0
0
0.247525
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
319d0df00a5bae07b42dd6ed90d9f33f00703158
190
py
Python
moya/template/__init__.py
moyaproject/moya
78b91d87b4519f91dfdd2b40dab44e72f201a843
[ "MIT" ]
129
2015-02-16T12:02:50.000Z
2021-11-06T00:20:01.000Z
moya/template/__init__.py
liaohandel/moya
78b91d87b4519f91dfdd2b40dab44e72f201a843
[ "MIT" ]
5
2015-02-19T15:56:41.000Z
2015-09-08T18:58:35.000Z
moya/template/__init__.py
liaohandel/moya
78b91d87b4519f91dfdd2b40dab44e72f201a843
[ "MIT" ]
14
2015-02-19T17:20:34.000Z
2022-03-28T01:38:09.000Z
from __future__ import absolute_import from .enginebase import TemplateEngine from .moyatemplates import Template from .environment import Environment TemplateEngine Template Environment
17.272727
38
0.868421
20
190
8
0.45
0
0
0
0
0
0
0
0
0
0
0
0.115789
190
10
39
19
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
31bd069f1ff61ae985ca1e6712255ebea28a59d6
9,168
py
Python
boto3_type_annotations/boto3_type_annotations/apigatewayv2/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
119
2018-12-01T18:20:57.000Z
2022-02-02T10:31:29.000Z
boto3_type_annotations/boto3_type_annotations/apigatewayv2/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
15
2018-11-16T00:16:44.000Z
2021-11-13T03:44:18.000Z
boto3_type_annotations/boto3_type_annotations/apigatewayv2/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
11
2019-05-06T05:26:51.000Z
2021-09-28T15:27:59.000Z
from typing import Optional from botocore.client import BaseClient from typing import Dict from typing import Union from botocore.paginate import Paginator from botocore.waiter import Waiter from typing import List class Client(BaseClient): def can_paginate(self, operation_name: str = None): pass def create_api(self, Name: str, ProtocolType: str, RouteSelectionExpression: str, ApiKeySelectionExpression: str = None, Description: str = None, DisableSchemaValidation: bool = None, Version: str = None) -> Dict: pass def create_api_mapping(self, ApiId: str, DomainName: str, Stage: str, ApiMappingKey: str = None) -> Dict: pass def create_authorizer(self, ApiId: str, AuthorizerType: str, AuthorizerUri: str, IdentitySource: List, Name: str, AuthorizerCredentialsArn: str = None, AuthorizerResultTtlInSeconds: int = None, IdentityValidationExpression: str = None, ProviderArns: List = None) -> Dict: pass def create_deployment(self, ApiId: str, Description: str = None, StageName: str = None) -> Dict: pass def create_domain_name(self, DomainName: str, DomainNameConfigurations: List = None) -> Dict: pass def create_integration(self, ApiId: str, IntegrationType: str, ConnectionId: str = None, ConnectionType: str = None, ContentHandlingStrategy: str = None, CredentialsArn: str = None, Description: str = None, IntegrationMethod: str = None, IntegrationUri: str = None, PassthroughBehavior: str = None, RequestParameters: Dict = None, RequestTemplates: Dict = None, TemplateSelectionExpression: str = None, TimeoutInMillis: int = None) -> Dict: pass def create_integration_response(self, ApiId: str, IntegrationId: str, IntegrationResponseKey: str, ContentHandlingStrategy: str = None, ResponseParameters: Dict = None, ResponseTemplates: Dict = None, TemplateSelectionExpression: str = None) -> Dict: pass def create_model(self, ApiId: str, Name: str, Schema: str, ContentType: str = None, Description: str = None) -> Dict: pass def create_route(self, ApiId: str, RouteKey: str, ApiKeyRequired: bool = None, AuthorizationScopes: List = None, AuthorizationType: str = None, AuthorizerId: str = None, ModelSelectionExpression: str = None, OperationName: str = None, RequestModels: Dict = None, RequestParameters: Dict = None, RouteResponseSelectionExpression: str = None, Target: str = None) -> Dict: pass def create_route_response(self, ApiId: str, RouteId: str, RouteResponseKey: str, ModelSelectionExpression: str = None, ResponseModels: Dict = None, ResponseParameters: Dict = None) -> Dict: pass def create_stage(self, ApiId: str, StageName: str, AccessLogSettings: Dict = None, ClientCertificateId: str = None, DefaultRouteSettings: Dict = None, DeploymentId: str = None, Description: str = None, RouteSettings: Dict = None, StageVariables: Dict = None) -> Dict: pass def delete_api(self, ApiId: str): pass def delete_api_mapping(self, ApiMappingId: str, DomainName: str): pass def delete_authorizer(self, ApiId: str, AuthorizerId: str): pass def delete_deployment(self, ApiId: str, DeploymentId: str): pass def delete_domain_name(self, DomainName: str): pass def delete_integration(self, ApiId: str, IntegrationId: str): pass def delete_integration_response(self, ApiId: str, IntegrationId: str, IntegrationResponseId: str): pass def delete_model(self, ApiId: str, ModelId: str): pass def delete_route(self, ApiId: str, RouteId: str): pass def delete_route_response(self, ApiId: str, RouteId: str, RouteResponseId: str): pass def delete_stage(self, ApiId: str, StageName: str): pass def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None): pass def get_api(self, ApiId: str) -> Dict: pass def get_api_mapping(self, ApiMappingId: str, DomainName: str) -> Dict: pass def get_api_mappings(self, DomainName: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_apis(self, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_authorizer(self, ApiId: str, AuthorizerId: str) -> Dict: pass def get_authorizers(self, ApiId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_deployment(self, ApiId: str, DeploymentId: str) -> Dict: pass def get_deployments(self, ApiId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_domain_name(self, DomainName: str) -> Dict: pass def get_domain_names(self, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_integration(self, ApiId: str, IntegrationId: str) -> Dict: pass def get_integration_response(self, ApiId: str, IntegrationId: str, IntegrationResponseId: str) -> Dict: pass def get_integration_responses(self, ApiId: str, IntegrationId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_integrations(self, ApiId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_model(self, ApiId: str, ModelId: str) -> Dict: pass def get_model_template(self, ApiId: str, ModelId: str) -> Dict: pass def get_models(self, ApiId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_paginator(self, operation_name: str = None) -> Paginator: pass def get_route(self, ApiId: str, RouteId: str) -> Dict: pass def get_route_response(self, ApiId: str, RouteId: str, RouteResponseId: str) -> Dict: pass def get_route_responses(self, ApiId: str, RouteId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_routes(self, ApiId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_stage(self, ApiId: str, StageName: str) -> Dict: pass def get_stages(self, ApiId: str, MaxResults: str = None, NextToken: str = None) -> Dict: pass def get_waiter(self, waiter_name: str = None) -> Waiter: pass def update_api(self, ApiId: str, ApiKeySelectionExpression: str = None, Description: str = None, DisableSchemaValidation: bool = None, Name: str = None, RouteSelectionExpression: str = None, Version: str = None) -> Dict: pass def update_api_mapping(self, ApiId: str, ApiMappingId: str, DomainName: str, ApiMappingKey: str = None, Stage: str = None) -> Dict: pass def update_authorizer(self, ApiId: str, AuthorizerId: str, AuthorizerCredentialsArn: str = None, AuthorizerResultTtlInSeconds: int = None, AuthorizerType: str = None, AuthorizerUri: str = None, IdentitySource: List = None, IdentityValidationExpression: str = None, Name: str = None, ProviderArns: List = None) -> Dict: pass def update_deployment(self, ApiId: str, DeploymentId: str, Description: str = None) -> Dict: pass def update_domain_name(self, DomainName: str, DomainNameConfigurations: List = None) -> Dict: pass def update_integration(self, ApiId: str, IntegrationId: str, ConnectionId: str = None, ConnectionType: str = None, ContentHandlingStrategy: str = None, CredentialsArn: str = None, Description: str = None, IntegrationMethod: str = None, IntegrationType: str = None, IntegrationUri: str = None, PassthroughBehavior: str = None, RequestParameters: Dict = None, RequestTemplates: Dict = None, TemplateSelectionExpression: str = None, TimeoutInMillis: int = None) -> Dict: pass def update_integration_response(self, ApiId: str, IntegrationId: str, IntegrationResponseId: str, ContentHandlingStrategy: str = None, IntegrationResponseKey: str = None, ResponseParameters: Dict = None, ResponseTemplates: Dict = None, TemplateSelectionExpression: str = None) -> Dict: pass def update_model(self, ApiId: str, ModelId: str, ContentType: str = None, Description: str = None, Name: str = None, Schema: str = None) -> Dict: pass def update_route(self, ApiId: str, RouteId: str, ApiKeyRequired: bool = None, AuthorizationScopes: List = None, AuthorizationType: str = None, AuthorizerId: str = None, ModelSelectionExpression: str = None, OperationName: str = None, RequestModels: Dict = None, RequestParameters: Dict = None, RouteKey: str = None, RouteResponseSelectionExpression: str = None, Target: str = None) -> Dict: pass def update_route_response(self, ApiId: str, RouteId: str, RouteResponseId: str, ModelSelectionExpression: str = None, ResponseModels: Dict = None, ResponseParameters: Dict = None, RouteResponseKey: str = None) -> Dict: pass def update_stage(self, ApiId: str, StageName: str, AccessLogSettings: Dict = None, ClientCertificateId: str = None, DefaultRouteSettings: Dict = None, DeploymentId: str = None, Description: str = None, RouteSettings: Dict = None, StageVariables: Dict = None) -> Dict: pass
48.252632
471
0.696335
1,045
9,168
6.027751
0.111962
0.111129
0.087633
0.076203
0.794253
0.740753
0.605017
0.525798
0.513732
0.443721
0
0
0.203425
9,168
189
472
48.507937
0.862522
0
0
0.46875
0
0
0
0
0
0
0
0
0
1
0.46875
false
0.484375
0.054688
0
0.53125
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
31cd9126a7827f28298d041cedc74d4d3cea9dee
300
py
Python
inceptor/engine/component/UnookComponent.py
whitefi/inceptor
2234740b76c34b2ab91d05ff675748022c476a81
[ "BSD-4-Clause" ]
743
2021-08-02T16:27:27.000Z
2022-03-31T16:34:16.000Z
inceptor/engine/component/UnookComponent.py
whitefi/inceptor
2234740b76c34b2ab91d05ff675748022c476a81
[ "BSD-4-Clause" ]
32
2021-08-03T04:47:20.000Z
2022-03-28T23:15:45.000Z
inceptor/engine/component/UnookComponent.py
whitefi/inceptor
2234740b76c34b2ab91d05ff675748022c476a81
[ "BSD-4-Clause" ]
138
2021-08-02T16:27:28.000Z
2022-03-31T02:47:20.000Z
from config.Config import Config from engine.component.TemplateModuleComponent import TemplateModuleComponent class UnhookComponent(TemplateModuleComponent): def __init__(self, code=None): placeholder = Config().get("PLACEHOLDERS", "UNHOOK") super().__init__(code, placeholder)
33.333333
76
0.77
28
300
7.964286
0.642857
0
0
0
0
0
0
0
0
0
0
0
0.136667
300
8
77
37.5
0.861004
0
0
0
0
0
0.06
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
31ce11b0aa26d9c06b9692670a37c7cd6442b87e
124
py
Python
rl_gym_maze/__init__.py
AngusMaiden/rl-gym-maze
72658fa3cc3d5afcfb93825b73e4a2f5d77d5667
[ "MIT" ]
null
null
null
rl_gym_maze/__init__.py
AngusMaiden/rl-gym-maze
72658fa3cc3d5afcfb93825b73e4a2f5d77d5667
[ "MIT" ]
null
null
null
rl_gym_maze/__init__.py
AngusMaiden/rl-gym-maze
72658fa3cc3d5afcfb93825b73e4a2f5d77d5667
[ "MIT" ]
null
null
null
from gym.envs.registration import register register( id='rl-gym-maze-v0', entry_point='rl_gym_maze.envs:MazeEnv', )
20.666667
43
0.733871
19
124
4.631579
0.684211
0.113636
0.204545
0
0
0
0
0
0
0
0
0.009259
0.129032
124
6
44
20.666667
0.805556
0
0
0
0
0
0.304
0.192
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
31d3acb2eb3ed36b7b2794a339364adac0d2a941
1,557
py
Python
oscar/lib/python2.7/site-packages/coverage/backunittest.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/coverage/backunittest.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/coverage/backunittest.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Implementations of unittest features from the future.""" # Use unittest2 if it's available, otherwise unittest. This gives us # back-ported features for 2.6. try: import unittest2 as unittest except ImportError: import unittest def unittest_has(method): """Does `unittest.TestCase` have `method` defined?""" return hasattr(unittest.TestCase, method) class TestCase(unittest.TestCase): """Just like unittest.TestCase, but with assert methods added. Designed to be compatible with 3.1 unittest. Methods are only defined if `unittest` doesn't have them. """ # pylint: disable=missing-docstring # Many Pythons have this method defined. But PyPy3 has a bug with it # somehow (https://bitbucket.org/pypy/pypy/issues/2092), so always use our # own implementation that works everywhere, at least for the ways we're # calling it. def assertCountEqual(self, s1, s2): """Assert these have the same elements, regardless of order.""" self.assertEqual(sorted(s1), sorted(s2)) if not unittest_has('assertRaisesRegex'): def assertRaisesRegex(self, *args, **kwargs): return self.assertRaisesRegexp(*args, **kwargs) if not unittest_has('assertRegex'): def assertRegex(self, *args, **kwargs): return self.assertRegexpMatches(*args, **kwargs)
36.209302
80
0.684008
196
1,557
5.418367
0.602041
0.060264
0.032015
0.030132
0.045198
0
0
0
0
0
0
0.013855
0.211946
1,557
42
81
37.071429
0.851671
0.533719
0
0
0
0
0.043682
0
0
0
0
0
0.533333
1
0.266667
false
0
0.2
0.133333
0.733333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
1
1
0
0
4
31e031a989f9fe56c73bf87b7d285d3c16031424
61
py
Python
views.py
setivolkylany/DjangoAppTemplate
d26a63116d9f01e321374e3560b84836a1bea4c7
[ "MIT" ]
null
null
null
views.py
setivolkylany/DjangoAppTemplate
d26a63116d9f01e321374e3560b84836a1bea4c7
[ "MIT" ]
null
null
null
views.py
setivolkylany/DjangoAppTemplate
d26a63116d9f01e321374e3560b84836a1bea4c7
[ "MIT" ]
null
null
null
from django.views.generic import DetailView, ListView, View
20.333333
59
0.819672
8
61
6.25
1
0
0
0
0
0
0
0
0
0
0
0
0.114754
61
2
60
30.5
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
31ead849e144e4b5568b6e78ae536f3edcb8e2c1
218
py
Python
johnnyv/tests/test_raspberryPi.py
lincolnreese/JohnnyV
bce5a9f11796090754de8dbac91a6ea080fe4236
[ "MIT" ]
null
null
null
johnnyv/tests/test_raspberryPi.py
lincolnreese/JohnnyV
bce5a9f11796090754de8dbac91a6ea080fe4236
[ "MIT" ]
null
null
null
johnnyv/tests/test_raspberryPi.py
lincolnreese/JohnnyV
bce5a9f11796090754de8dbac91a6ea080fe4236
[ "MIT" ]
null
null
null
from unittest import TestCase class TestRaspberryPi(TestCase): def test_get_sensor_addr(self): self.fail() def test_capture(self): self.fail() def test_record(self): self.fail()
16.769231
35
0.651376
27
218
5.074074
0.555556
0.153285
0.262774
0.218978
0.277372
0
0
0
0
0
0
0
0.252294
218
12
36
18.166667
0.840491
0
0
0.375
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.125
0
0.625
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
9efa730e728c4d8a4be44c102099bfc212d9b48c
175
py
Python
Update Bits.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
Update Bits.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
Update Bits.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
class Solution: #@param n, m: Two integer #@param i, j: Two bit positions #return: An integer def updateBits(self, n, m, i, j): # write your code here
25
37
0.6
27
175
3.888889
0.740741
0.038095
0
0
0
0
0
0
0
0
0
0
0.291429
175
6
38
29.166667
0.846774
0.531429
0
0
0
0
0
0
0
0
0
0.166667
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
4
730244b4d5b566d6c6d176d371614d83c670a31b
214
py
Python
backstage-manage-system/xizhi_backend/xizhi_backend/admin/article.py
SunShineToMiaoMiao/personal-website
1ee0a5405d1627eb6ab2ae19585ceac0218c00e0
[ "MIT" ]
null
null
null
backstage-manage-system/xizhi_backend/xizhi_backend/admin/article.py
SunShineToMiaoMiao/personal-website
1ee0a5405d1627eb6ab2ae19585ceac0218c00e0
[ "MIT" ]
null
null
null
backstage-manage-system/xizhi_backend/xizhi_backend/admin/article.py
SunShineToMiaoMiao/personal-website
1ee0a5405d1627eb6ab2ae19585ceac0218c00e0
[ "MIT" ]
null
null
null
from django.contrib import admin from ..models import * # article模型的后台管理设置 @admin.register(Article) class Article(admin.ModelAdmin): list_display = ('title', 'author', 'content','create_time', 'update_time')
23.777778
78
0.742991
25
214
6.24
0.76
0
0
0
0
0
0
0
0
0
0
0
0.116822
214
8
79
26.75
0.825397
0.074766
0
0
0
0
0.204082
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
73120da329e641037dc51c260be8c3d4630a5050
135
py
Python
exercises/rail-fence-cipher/rail_fence_cipher.py
haithamk/python-exercism
8166a98ba771e0d527efdda421d3d9e741f0459b
[ "MIT" ]
null
null
null
exercises/rail-fence-cipher/rail_fence_cipher.py
haithamk/python-exercism
8166a98ba771e0d527efdda421d3d9e741f0459b
[ "MIT" ]
null
null
null
exercises/rail-fence-cipher/rail_fence_cipher.py
haithamk/python-exercism
8166a98ba771e0d527efdda421d3d9e741f0459b
[ "MIT" ]
1
2021-12-29T19:26:23.000Z
2021-12-29T19:26:23.000Z
def fence_pattern(rails, message_size): pass def encode(rails, message): pass def decode(rails, encoded_message): pass
12.272727
39
0.703704
18
135
5.111111
0.555556
0.26087
0
0
0
0
0
0
0
0
0
0
0.207407
135
10
40
13.5
0.859813
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
73135bb3adaac09653b601d89e195139f9ad60e3
359
py
Python
Desafio Python/Aula 22 des108.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
Desafio Python/Aula 22 des108.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
Desafio Python/Aula 22 des108.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
from des108 import moeda preco = float(input('Digite o preço pretendido: €')) print(f'''A metade do preço é {moeda.dinheiro(moeda.metade(preco))} O dobro do preço é {moeda.dinheiro(moeda.dobra(preco))} Aumentando o preço 10% temos {moeda.dinheiro(moeda.aumentar(preco, 10))} Diminuindo o preço 13% temos {moeda.dinheiro(moeda.aumentar(preco, 13))}''')
44.875
78
0.729805
56
359
4.696429
0.482143
0.197719
0.273764
0.098859
0.471483
0.471483
0
0
0
0
0
0.034921
0.122563
359
7
79
51.285714
0.796825
0
0
0
0
0
0.816156
0.409471
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.166667
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
731b893547bc922b941c70bc685e976ca37c3215
444
py
Python
fdk_client/platform/models/InformationSupport.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/InformationSupport.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/InformationSupport.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema class InformationSupport(BaseSchema): # Configuration swagger.json phone = fields.List(fields.Str(required=False), required=False) email = fields.List(fields.Str(required=False), required=False) timing = fields.Str(required=False)
17.076923
67
0.713964
49
444
6.469388
0.469388
0.205047
0.160883
0.208202
0.283912
0.283912
0.283912
0.283912
0
0
0
0
0.184685
444
25
68
17.76
0.875691
0.099099
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b4156547938e54dbc668bf71930211b8cd7fdc83
22
py
Python
aliyun-python-sdk-polardb/aliyunsdkpolardb/__init__.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-polardb/aliyunsdkpolardb/__init__.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-polardb/aliyunsdkpolardb/__init__.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
__version__ = '1.8.15'
22
22
0.681818
4
22
2.75
1
0
0
0
0
0
0
0
0
0
0
0.2
0.090909
22
1
22
22
0.35
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b41af04249a630544f300d70915a91ac0f317d64
110
py
Python
pypackage/flexfringe/__init__.py
aria-systems-group/dfasat
8116712a49320fc82a32a6478ffaa3e48719e3e6
[ "ECL-2.0", "Apache-2.0" ]
2
2021-12-15T13:51:32.000Z
2021-12-16T18:48:53.000Z
pypackage/flexfringe/__init__.py
aria-systems-group/dfasat
8116712a49320fc82a32a6478ffaa3e48719e3e6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
pypackage/flexfringe/__init__.py
aria-systems-group/dfasat
8116712a49320fc82a32a6478ffaa3e48719e3e6
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-22T05:53:16.000Z
2021-03-22T05:53:16.000Z
from .estimators import DFASATEstimator from . import estimators __all__ = ['DFASATEstimator', 'estimators']
22
43
0.790909
10
110
8.3
0.5
0
0
0
0
0
0
0
0
0
0
0
0.118182
110
4
44
27.5
0.85567
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b42acfbfcfd63be92434ac1427273bed73f31e9c
83
py
Python
src/core/runtime/number.py
archanpatkar/Bhaskara
3ab296edb1b239ad3775c944a01a7333a2436f34
[ "MIT" ]
1
2020-11-13T20:55:16.000Z
2020-11-13T20:55:16.000Z
src/core/runtime/number.py
archanpatkar/Bhaskara
3ab296edb1b239ad3775c944a01a7333a2436f34
[ "MIT" ]
null
null
null
src/core/runtime/number.py
archanpatkar/Bhaskara
3ab296edb1b239ad3775c944a01a7333a2436f34
[ "MIT" ]
null
null
null
# Currently meta-circular # use DEC64 here instead of default python impelmentation
41.5
57
0.831325
11
83
6.272727
1
0
0
0
0
0
0
0
0
0
0
0.027778
0.13253
83
2
57
41.5
0.930556
0.951807
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b43fb342edae7528aface983306dd15a1045372b
263
py
Python
shortnr/core.py
dsfx3d/dj-shortnr
ae0b0865cd81da7c84bf147e68fe463140cce395
[ "MIT" ]
null
null
null
shortnr/core.py
dsfx3d/dj-shortnr
ae0b0865cd81da7c84bf147e68fe463140cce395
[ "MIT" ]
null
null
null
shortnr/core.py
dsfx3d/dj-shortnr
ae0b0865cd81da7c84bf147e68fe463140cce395
[ "MIT" ]
null
null
null
from .models import UrlIndex def shorten_url(url): obj, created = UrlIndex.objects.get_or_create(url=url) if obj: return obj raise Exception('cannot shorten url') def unshorten_url(key): return UrlIndex.objects.get(key=key)
16.4375
58
0.676806
36
263
4.833333
0.555556
0.114943
0.206897
0
0
0
0
0
0
0
0
0
0.231939
263
15
59
17.533333
0.861386
0
0
0
0
0
0.068441
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.625
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
b44e5f88ad4fe073e8c0cf8f29a492d95c7ce770
131
py
Python
tools/pygo/examples/t.py
Tjoppen/fmigo
0ad5e82b49a973cf710f85daa9dffc45261b36ae
[ "MIT" ]
7
2018-12-18T16:35:21.000Z
2021-05-14T07:38:05.000Z
tools/pygo/examples/t.py
Tjoppen/fmigo
0ad5e82b49a973cf710f85daa9dffc45261b36ae
[ "MIT" ]
null
null
null
tools/pygo/examples/t.py
Tjoppen/fmigo
0ad5e82b49a973cf710f85daa9dffc45261b36ae
[ "MIT" ]
1
2022-02-20T15:50:01.000Z
2022-02-20T15:50:01.000Z
if not ( ( 'a' in vars() or 'a' in globals() ) and type(a) == type(0) ): print("no suitable a") else: print("good to go")
21.833333
72
0.534351
23
131
3.043478
0.73913
0.085714
0
0
0
0
0
0
0
0
0
0.010204
0.251908
131
5
73
26.2
0.704082
0
0
0
0
0
0.192308
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
b456d6e5f42c73b2fd827aff44d3f6a99a18128c
113
py
Python
kubesh/consoles/__init__.py
joaompinto/kubesh
5ca15a616ad01f84e6fc6925f8b848aa7e32ef95
[ "BSD-3-Clause" ]
null
null
null
kubesh/consoles/__init__.py
joaompinto/kubesh
5ca15a616ad01f84e6fc6925f8b848aa7e32ef95
[ "BSD-3-Clause" ]
null
null
null
kubesh/consoles/__init__.py
joaompinto/kubesh
5ca15a616ad01f84e6fc6925f8b848aa7e32ef95
[ "BSD-3-Clause" ]
null
null
null
from .terminal import TerminalConsole from .stdin import StdinConsole __all__ = [StdinConsole, TerminalConsole]
22.6
41
0.831858
11
113
8.181818
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.115044
113
4
42
28.25
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b45e30f53b8d7e4dfb76aceed14e62e7408733e9
201
py
Python
src/myhours/console.py
sander76/myhours
c0e1fe5d00072611c03235fe38863b386e01f2e8
[ "MIT" ]
null
null
null
src/myhours/console.py
sander76/myhours
c0e1fe5d00072611c03235fe38863b386e01f2e8
[ "MIT" ]
null
null
null
src/myhours/console.py
sander76/myhours
c0e1fe5d00072611c03235fe38863b386e01f2e8
[ "MIT" ]
null
null
null
from rich.console import Console console = Console() def info(text: str) -> None: console.print(f"[green]>> [/]{text}") def warn(text: str) -> None: console.print(f"[orange]!! [/]{text}")
16.75
42
0.61194
27
201
4.555556
0.518519
0.227642
0.178862
0.292683
0.390244
0.390244
0
0
0
0
0
0
0.169154
201
11
43
18.272727
0.736527
0
0
0
0
0
0.19403
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.5
0.333333
1
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
81e9c591fbe9332ddf51d71d6686fb6d7e565a71
136
py
Python
NOTWORKINGPANDA3d/Panda3D-1.10.0/panda3d/dtoolconfig.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
Panda3D-1.10.0/panda3d/dtoolconfig.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
null
null
null
Panda3D-1.10.0/panda3d/dtoolconfig.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
1
2020-03-11T17:38:45.000Z
2020-03-11T17:38:45.000Z
if __debug__: print("Warning: panda3d.dtoolconfig is deprecated, use panda3d.interrogatedb instead.") from .interrogatedb import *
27.2
91
0.779412
15
136
6.8
0.866667
0
0
0
0
0
0
0
0
0
0
0.016949
0.132353
136
4
92
34
0.847458
0
0
0
0
0
0.577778
0.155556
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
81fbdd6b468686757dfb9207af772db39291a513
1,566
py
Python
gemmforge/vm/lexic/lexic.py
ravil-mobile/gemmforge
6381584c2d1ce77eaa938de02bc4f130f19cb2e4
[ "MIT" ]
null
null
null
gemmforge/vm/lexic/lexic.py
ravil-mobile/gemmforge
6381584c2d1ce77eaa938de02bc4f130f19cb2e4
[ "MIT" ]
2
2021-02-01T16:31:22.000Z
2021-05-05T13:44:43.000Z
gemmforge/vm/lexic/lexic.py
ravil-mobile/gemmforge
6381584c2d1ce77eaa938de02bc4f130f19cb2e4
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class Lexic(ABC): """ You can use this abstract class to add a dictionary for any backend for variables like e.g. threadIdx.x for CUDA that are used by the generators and loaders """ def __init__(self, underlying_hardware): self._underlying_hardware = underlying_hardware self.thread_idx_x = None self.thread_idx_y = None self.thread_idx_z = None self.block_dim_y = None self.block_dim_z = None self.block_idx_x = None self.stream_name = None def get_tid_counter(self, thread_id, block_dim, block_id): return f'({thread_id} + {block_dim} * {block_id})' @abstractmethod def get_launch_code(self, func_name, grid, block, stream, func_params): pass @abstractmethod def declare_shared_memory_inline(self, name, precision, size, alignment): pass @abstractmethod def kernel_definition(self, file, kernel_bounds, base_name, params, precision=None, total_shared_mem_size=None): pass @abstractmethod def sync_threads(self): pass @abstractmethod def sync_vec_unit(self): pass @abstractmethod def kernel_range_object(self): pass @abstractmethod def get_stream_via_pointer(self, file, stream_name, pointer_name): pass @abstractmethod def check_error(self): pass @abstractmethod def batch_indexer_gemm(self): pass @abstractmethod def batch_indexer_csa(self): pass @abstractmethod def batch_indexer_init(self): pass @abstractmethod def get_headers(self): pass
22.056338
93
0.716475
212
1,566
5.009434
0.415094
0.19209
0.217514
0.164783
0.200565
0.147834
0
0
0
0
0
0
0.207535
1,566
70
94
22.371429
0.855761
0.099617
0
0.48
0
0
0.028653
0
0
0
0
0
0
1
0.28
false
0.24
0.02
0.02
0.34
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
c31d266f32c0cf68cf91a34e523207a0dfea8a30
758
py
Python
src/models/modules/__init__.py
takedarts/skipresnet
d6f1e16042f8433a287355009e17e4e5768ad319
[ "MIT" ]
3
2022-02-03T13:25:12.000Z
2022-02-04T16:12:23.000Z
src/models/modules/__init__.py
takedarts/skipresnet
d6f1e16042f8433a287355009e17e4e5768ad319
[ "MIT" ]
null
null
null
src/models/modules/__init__.py
takedarts/skipresnet
d6f1e16042f8433a287355009e17e4e5768ad319
[ "MIT" ]
1
2022-02-04T12:28:02.000Z
2022-02-04T12:28:02.000Z
from .blur_pool import BlurPool2d # noqa from .channel_pad import ChannelPad # noqa from .conv2d_same import Conv2dSame # noqa from .drop_block import DropBlock # noqa from .inplace_norm import InplaceNorm # noqa from .layer_norm import LayerNorm2d # noqa from .multiply import Multiply # noqa from .reshape import Reshape # noqa from .shakedrop import ShakeDrop # noqa from .sigmoid import HSigmoid # noqa from .signal_augmentation import SignalAugmentation # noqa from .split_attention import SplitAttentionModule # noqa from .squeeze_excite import SEModule # noqa from .std_conv import ScaledStdConv2d, ScaledStdConv2dSame # noqa from .stochastic_depth import StochasticDepth # noqa from .swish import HSwish, Swish # noqa
44.588235
67
0.783641
93
758
6.268817
0.462366
0.205832
0
0
0
0
0
0
0
0
0
0.009554
0.171504
758
16
68
47.375
0.91879
0.104222
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
c32059303659ed8f77ee17bcd7b46315b2df98d0
393
py
Python
floss/plugins/plugin_object.py
jimmy-sonny/flare-floss
9aaafa94b97ef3ddb9ead53c39d334617bff4353
[ "Apache-2.0" ]
2
2020-03-18T07:42:54.000Z
2020-03-19T02:59:25.000Z
floss/plugins/plugin_object.py
jimmy-sonny/flare-floss
9aaafa94b97ef3ddb9ead53c39d334617bff4353
[ "Apache-2.0" ]
null
null
null
floss/plugins/plugin_object.py
jimmy-sonny/flare-floss
9aaafa94b97ef3ddb9ead53c39d334617bff4353
[ "Apache-2.0" ]
1
2020-03-17T08:30:07.000Z
2020-03-17T08:30:07.000Z
# Copyright (C) 2017 FireEye, Inc. All Rights Reserved. import plugnplay import viv_utils # TODO rename to Plugin, rename file class GeneralPlugin(plugnplay.Plugin, viv_utils.LoggingObject): def __str__(self): return self.__class__.__name__ def __repr__(self): return str(self) def get_name_version(self): return "%s (v%s)" % (str(self), self.version)
23.117647
63
0.694656
52
393
4.865385
0.576923
0.083004
0
0
0
0
0
0
0
0
0
0.01278
0.203562
393
16
64
24.5625
0.795527
0.223919
0
0
0
0
0.02649
0
0
0
0
0.0625
0
1
0.333333
false
0
0.222222
0.333333
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
c32c704b602f0958d2b1aa1774cdf82cb5108d46
137
py
Python
python_modules/dagster/dagster_tests/core_tests/definitions_tests/foo/bar.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/dagster/dagster_tests/core_tests/definitions_tests/foo/bar.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/dagster/dagster_tests/core_tests/definitions_tests/foo/bar.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from dagster import pipeline from .baz import baz_solid # pylint: disable=import-error @pipeline def bar_pipeline(): baz_solid()
15.222222
58
0.751825
19
137
5.263158
0.578947
0.16
0
0
0
0
0
0
0
0
0
0
0.167883
137
8
59
17.125
0.877193
0.20438
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c36565f73ca573cf17f171baa6feb99f4dcdfe16
101
py
Python
main.py
henry-richard7/Kodi-Voot-Addon
45ecc63b9dc5ba5fece0a60feb00935b7e335524
[ "MIT" ]
null
null
null
main.py
henry-richard7/Kodi-Voot-Addon
45ecc63b9dc5ba5fece0a60feb00935b7e335524
[ "MIT" ]
2
2021-11-01T22:53:07.000Z
2021-11-03T05:14:14.000Z
main.py
henry-richard7/Kodi-Voot-Addon
45ecc63b9dc5ba5fece0a60feb00935b7e335524
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from resources.lib import plugin if __name__ == "__main__": plugin.run()
20.2
32
0.643564
13
101
4.384615
0.923077
0
0
0
0
0
0
0
0
0
0
0.012048
0.178218
101
5
33
20.2
0.674699
0.207921
0
0
0
0
0.101266
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
6f1ed9b8861cba52f65d7346daafaeb48de10324
283
py
Python
apps/mpm/models/__init__.py
gustavofoa/pympm
a7d2d3a396e7ebf77ec6f213ee04093e790bf901
[ "Apache-2.0" ]
2
2017-04-26T10:21:57.000Z
2021-04-02T08:36:24.000Z
apps/mpm/models/__init__.py
gustavofoa/pympm
a7d2d3a396e7ebf77ec6f213ee04093e790bf901
[ "Apache-2.0" ]
null
null
null
apps/mpm/models/__init__.py
gustavofoa/pympm
a7d2d3a396e7ebf77ec6f213ee04093e790bf901
[ "Apache-2.0" ]
null
null
null
from .Categoria import Categoria from .Data import Data from .DiaLiturgico import DiaLiturgico from .ItemLiturgia import ItemLiturgia from .Leitura import Leitura from .Musica import Musica from .Post import Post from .SugestaoMusica import SugestaoMusica from .Banner import Banner
28.3
42
0.840989
36
283
6.611111
0.305556
0
0
0
0
0
0
0
0
0
0
0
0.127208
283
9
43
31.444444
0.963563
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
6f25d8ccb5578aa635f1c962512345e112dacd1c
237
py
Python
twobuntu/shorturls/views.py
muhiza/originarities
ca0a67363579e6237127386f13baa2ab7a7c2717
[ "Apache-2.0" ]
16
2015-01-12T12:25:28.000Z
2021-06-22T03:23:44.000Z
twobuntu/shorturls/views.py
muhiza/originarities
ca0a67363579e6237127386f13baa2ab7a7c2717
[ "Apache-2.0" ]
5
2015-01-02T01:23:40.000Z
2015-10-22T06:11:40.000Z
twobuntu/shorturls/views.py
muhiza/originarities
ca0a67363579e6237127386f13baa2ab7a7c2717
[ "Apache-2.0" ]
11
2015-01-27T06:23:45.000Z
2020-05-20T11:46:12.000Z
from django.shortcuts import get_object_or_404, redirect from twobuntu.shorturls.models import ShortURL def shorturl(request, key): """ Redirect the client. """ return redirect(get_object_or_404(ShortURL, pk=key).url)
21.545455
60
0.742616
32
237
5.3125
0.65625
0.105882
0.129412
0.164706
0
0
0
0
0
0
0
0.030303
0.164557
237
10
61
23.7
0.828283
0.084388
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
6f4c6f6789a946d2999b7069f4d206539a30ecfd
31
py
Python
python/testData/editing/enterInIncompleteNestedGluedStringInParentheses.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/editing/enterInIncompleteNestedGluedStringInParentheses.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/editing/enterInIncompleteNestedGluedStringInParentheses.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
x3 = ('foo' ('bar'<caret>
15.5
19
0.419355
4
31
3.25
1
0
0
0
0
0
0
0
0
0
0
0.045455
0.290323
31
2
19
15.5
0.545455
0
0
0
0
0
0.1875
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
6f6f1adfae925cab087e61fe7870142edc7025e4
210
py
Python
src/state_machine/helper_functions.py
CircuitLaunch/colab-reachy-ros
f54414ae181beb60a0435611227d77b3a549339e
[ "MIT" ]
null
null
null
src/state_machine/helper_functions.py
CircuitLaunch/colab-reachy-ros
f54414ae181beb60a0435611227d77b3a549339e
[ "MIT" ]
3
2021-02-28T06:37:51.000Z
2021-05-09T05:18:21.000Z
src/state_machine/helper_functions.py
CircuitLaunch/colab_reachy_ros
f54414ae181beb60a0435611227d77b3a549339e
[ "MIT" ]
null
null
null
import rospy from colab_reachy_ros.srv import Speak def say_something(sentence: str): rospy.wait_for_service("/speak") speech_service = rospy.ServiceProxy("/speak", Speak) speech_service(sentence)
26.25
56
0.766667
28
210
5.5
0.642857
0.142857
0.233766
0
0
0
0
0
0
0
0
0
0.133333
210
8
57
26.25
0.846154
0
0
0
0
0
0.056872
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
48928999f0368401096335447e458c5d3b419da2
98
py
Python
track.py
SerCeMan/PlayCharm
573b6684fceceb2c40dcccda37ad0ad96383f645
[ "Apache-2.0" ]
1
2020-02-25T18:58:47.000Z
2020-02-25T18:58:47.000Z
track.py
SerCeMan/PlayCharm
573b6684fceceb2c40dcccda37ad0ad96383f645
[ "Apache-2.0" ]
null
null
null
track.py
SerCeMan/PlayCharm
573b6684fceceb2c40dcccda37ad0ad96383f645
[ "Apache-2.0" ]
null
null
null
class Track: def __init__(self, num, title): self.num = num self.title = title
24.5
35
0.581633
13
98
4.076923
0.538462
0.264151
0
0
0
0
0
0
0
0
0
0
0.316327
98
4
36
24.5
0.791045
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
4892deeb25b06eef876076b13c03afc1dfe7319b
98
py
Python
wdom/__init__.py
miyakogi/wdom_py
a21bcd23e94baceee71161829f6897bee3fd39c1
[ "MIT" ]
66
2016-04-26T13:05:25.000Z
2021-11-06T20:54:48.000Z
wdom/__init__.py
miyakogi/wdom_py
a21bcd23e94baceee71161829f6897bee3fd39c1
[ "MIT" ]
6
2016-05-16T19:03:54.000Z
2021-05-15T18:58:42.000Z
wdom/__init__.py
miyakogi/wdom_py
a21bcd23e94baceee71161829f6897bee3fd39c1
[ "MIT" ]
11
2017-05-08T11:20:15.000Z
2021-03-23T18:43:19.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """WDOM: Browser-based GUI library for python."""
19.6
49
0.622449
14
98
4.357143
1
0
0
0
0
0
0
0
0
0
0
0.02381
0.142857
98
4
50
24.5
0.702381
0.887755
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
48d7fd22873ab9c621f26cb6fb891d86d5fc8695
583
py
Python
tests/backend/test_listener.py
kyleheyne/mopidy
3b1b0dd2e9052cadb7bd1a29e724498f9fba7bca
[ "Apache-2.0" ]
2
2019-02-13T15:16:55.000Z
2019-02-18T08:47:29.000Z
tests/backend/test_listener.py
kyleheyne/mopidy
3b1b0dd2e9052cadb7bd1a29e724498f9fba7bca
[ "Apache-2.0" ]
40
2019-02-13T09:33:00.000Z
2019-02-19T13:21:12.000Z
tests/backend/test_listener.py
kyleheyne/mopidy
3b1b0dd2e9052cadb7bd1a29e724498f9fba7bca
[ "Apache-2.0" ]
1
2020-03-10T05:11:49.000Z
2020-03-10T05:11:49.000Z
from __future__ import absolute_import, unicode_literals import unittest import mock from mopidy import backend class BackendListenerTest(unittest.TestCase): def setUp(self): # noqa: N802 self.listener = backend.BackendListener() def test_on_event_forwards_to_specific_handler(self): self.listener.playlists_loaded = mock.Mock() self.listener.on_event('playlists_loaded') self.listener.playlists_loaded.assert_called_with() def test_listener_has_default_impl_for_playlists_loaded(self): self.listener.playlists_loaded()
24.291667
66
0.763293
70
583
5.985714
0.514286
0.143198
0.150358
0.193317
0.147971
0
0
0
0
0
0
0.00616
0.164666
583
23
67
25.347826
0.854209
0.017153
0
0
0
0
0.028021
0
0
0
0
0
0.076923
1
0.230769
false
0
0.307692
0
0.615385
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
5b06597e0168c569f8ad7ccaadd46d9543a45aa8
84
py
Python
project1/models/__init__.py
DiscoBroccoli/logistic-regression-and-naive-Bayes-from-Scratch
bcb24a9258ea004a3694e6eaa524b499c2584f96
[ "MIT" ]
null
null
null
project1/models/__init__.py
DiscoBroccoli/logistic-regression-and-naive-Bayes-from-Scratch
bcb24a9258ea004a3694e6eaa524b499c2584f96
[ "MIT" ]
null
null
null
project1/models/__init__.py
DiscoBroccoli/logistic-regression-and-naive-Bayes-from-Scratch
bcb24a9258ea004a3694e6eaa524b499c2584f96
[ "MIT" ]
null
null
null
from pathlib import Path DATASET_DIR = Path(__file__).parent.parent.parent / 'data'
42
58
0.785714
12
84
5.083333
0.75
0.393443
0
0
0
0
0
0
0
0
0
0
0.107143
84
2
58
42
0.813333
0
0
0
0
0
0.047619
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5b125a8574b2bf35768b666fc205f60fd252ba25
1,639
py
Python
app/models.py
MikeRodziewicz/recipe_flask
e0eff0ffb0f36dc3766d64f883bfd1eefb4cf695
[ "MIT" ]
null
null
null
app/models.py
MikeRodziewicz/recipe_flask
e0eff0ffb0f36dc3766d64f883bfd1eefb4cf695
[ "MIT" ]
4
2021-08-23T17:01:27.000Z
2021-10-02T16:01:23.000Z
app/models.py
MikeRodziewicz/recipe_flask
e0eff0ffb0f36dc3766d64f883bfd1eefb4cf695
[ "MIT" ]
null
null
null
from werkzeug.security import generate_password_hash, check_password_hash from enum import unique from operator import contains, index from flask_login import UserMixin, AnonymousUserMixin from flask import current_app, request, url_for from sqlalchemy.orm import backref from app import db, login #TODO password management to be added here class User(UserMixin, db.Model): __tablename__ = 'users' user_id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String, unique=True, index=True) password_hash = db.Column(db.String(128)) def __repr__(self) -> str: return f'This is the user e-mail {self.email}' @property def password(self): raise AttributeError('you cannot read password') def set_password(self, password): self.password_hash = generate_password_hash(password) def verify_password(self, password): return check_password_hash(self.password_hash, password) def get_id(self): return (self.user_id) @login.user_loader def load_user(user_id): return User.query.get(int(user_id)) class Container(db.Model): container_id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(100), unique=True, index=True) capacity = db.Column(db.Integer) ingredient = db.relationship('Ingredient', backref='container', lazy='dynamic') class Ingredient(db.Model): ingredient_id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(100), unique=True, index=True) quantity = db.Column(db.Integer) container_id = db.Column(db.Integer, db.ForeignKey('container.container_id'))
30.351852
83
0.729713
229
1,639
5.056769
0.349345
0.069085
0.086356
0.088083
0.189983
0.189983
0.158031
0.158031
0.129534
0.129534
0
0.006579
0.165345
1,639
53
84
30.924528
0.839912
0.025015
0
0.055556
1
0
0.070802
0.013784
0
0
0
0.018868
0
1
0.166667
false
0.222222
0.194444
0.111111
0.888889
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
1
0
1
0
0
0
4
5b13d133089ffae16b6e6382c5b9854e40ae35bf
18
py
Python
arango/version.py
jsteemann/python-arango
b69a0dfdf43ec332bb34047345436bc9f50b7b1a
[ "MIT" ]
null
null
null
arango/version.py
jsteemann/python-arango
b69a0dfdf43ec332bb34047345436bc9f50b7b1a
[ "MIT" ]
null
null
null
arango/version.py
jsteemann/python-arango
b69a0dfdf43ec332bb34047345436bc9f50b7b1a
[ "MIT" ]
null
null
null
version = "7.3.2"
9
17
0.555556
4
18
2.5
1
0
0
0
0
0
0
0
0
0
0
0.2
0.166667
18
1
18
18
0.466667
0
0
0
0
0
0.277778
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d2a8fce6291d234274f16c474742f4b170e5cf9b
177
py
Python
tests/correct_scripts/2/iters.py.commented.py
shiba6v/shape_commentator
e57c4d7e0781fa02fdc49dbc5c88236df5948cf1
[ "MIT" ]
65
2018-12-06T15:34:50.000Z
2021-09-10T12:38:43.000Z
tests/correct_scripts/2/iters.py.commented.py
shiba6v/shape_commentator
e57c4d7e0781fa02fdc49dbc5c88236df5948cf1
[ "MIT" ]
5
2018-12-14T06:32:54.000Z
2019-08-04T09:36:45.000Z
tests/correct_scripts/2/iters.py.commented.py
shiba6v/shape_commentator
e57c4d7e0781fa02fdc49dbc5c88236df5948cf1
[ "MIT" ]
1
2019-01-02T00:05:38.000Z
2019-01-02T00:05:38.000Z
li = [1, 1] #_ [int,int,] it = iter(li) #_ listiterator tu = (1, 1) #_ (int,int,) it = iter(tu) #_ tupleiterator ra = range(2) #_ [int,int,] it = iter(ra) #_ listiterator
25.285714
31
0.570621
27
177
3.518519
0.407407
0.189474
0.252632
0.378947
0.294737
0.294737
0
0
0
0
0
0.035971
0.214689
177
6
32
29.5
0.647482
0.446328
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d2bd02bb2e872a283b4e711b88620175d365cd25
117
py
Python
units/__init__.py
cppio/units
ade2ee4bf818ec2d12d53993a285cd0852b1da06
[ "MIT" ]
null
null
null
units/__init__.py
cppio/units
ade2ee4bf818ec2d12d53993a285cd0852b1da06
[ "MIT" ]
null
null
null
units/__init__.py
cppio/units
ade2ee4bf818ec2d12d53993a285cd0852b1da06
[ "MIT" ]
null
null
null
from .unit import Unit from .value import Value from .convert import convert __all__ = ["Unit", "Value", "convert"]
19.5
38
0.726496
16
117
5.0625
0.375
0
0
0
0
0
0
0
0
0
0
0
0.153846
117
5
39
23.4
0.818182
0
0
0
0
0
0.136752
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
d2d0a214900be90021a37322c5cf059a3488d585
342
py
Python
bindings/python/cntk/internal/__init__.py
MSXC/CNTK
d223d48b411bc994acd465ed333c9f6bed64dd7f
[ "RSA-MD" ]
null
null
null
bindings/python/cntk/internal/__init__.py
MSXC/CNTK
d223d48b411bc994acd465ed333c9f6bed64dd7f
[ "RSA-MD" ]
null
null
null
bindings/python/cntk/internal/__init__.py
MSXC/CNTK
d223d48b411bc994acd465ed333c9f6bed64dd7f
[ "RSA-MD" ]
1
2020-12-24T14:50:54.000Z
2020-12-24T14:50:54.000Z
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== from .swig_helper import typemap, map_if_possible from .sanitize import * from .sanitize import _as_tuple
38
80
0.605263
39
342
5.179487
0.794872
0.118812
0.178218
0
0
0
0
0
0
0
0
0
0.119883
342
9
81
38
0.671096
0.660819
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
d2e0833a2fa78b587cff843794650b5027c1e22a
171
py
Python
setup.py
gibsramen/mtdist
b2a02999b246042ee4cb17adc5f773bc1d7bda5a
[ "BSD-3-Clause" ]
1
2020-01-28T14:05:40.000Z
2020-01-28T14:05:40.000Z
setup.py
gibsramen/mtdist
b2a02999b246042ee4cb17adc5f773bc1d7bda5a
[ "BSD-3-Clause" ]
null
null
null
setup.py
gibsramen/mtdist
b2a02999b246042ee4cb17adc5f773bc1d7bda5a
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages setup( name="mtdist", author="Gibraan Rahman", author_email="gtrahman@gmail.com", packages=find_packages(), )
19
43
0.707602
20
171
5.9
0.75
0.20339
0
0
0
0
0
0
0
0
0
0
0.169591
171
8
44
21.375
0.830986
0
0
0
0
0
0.222222
0
0
0
0
0
0
1
0
true
0
0.142857
0
0.142857
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d2e1000b27e330d4e1b5199f70bcbf651647a948
153
py
Python
bat/test.py
zzf/ShaderProgramProj
ce2552d1ba8e1c71e22f130b71989109e53b7750
[ "MIT" ]
null
null
null
bat/test.py
zzf/ShaderProgramProj
ce2552d1ba8e1c71e22f130b71989109e53b7750
[ "MIT" ]
null
null
null
bat/test.py
zzf/ShaderProgramProj
ce2552d1ba8e1c71e22f130b71989109e53b7750
[ "MIT" ]
null
null
null
import os import sys import time import webbrowser print("-----------sleep seconds") time.sleep(10) webbrowser.open("http://www.baidu.com") os.system('')
19.125
39
0.705882
22
153
4.909091
0.681818
0
0
0
0
0
0
0
0
0
0
0.014184
0.078431
153
8
40
19.125
0.751773
0
0
0
0
0
0.285714
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.125
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d2e21a391fce7fa54c9e3294efd047c93a40fc8a
225
py
Python
plone-chrigl-debian/src/plonetheme.colorfulworld/plonetheme/colorfulworld/browser/viewlets/__init__.py
chrigl/docker-library
5dc9a2c1f0d81aba42190d3ff0e28c1fab2240d1
[ "Apache-2.0" ]
null
null
null
plone-chrigl-debian/src/plonetheme.colorfulworld/plonetheme/colorfulworld/browser/viewlets/__init__.py
chrigl/docker-library
5dc9a2c1f0d81aba42190d3ff0e28c1fab2240d1
[ "Apache-2.0" ]
null
null
null
plone-chrigl-debian/src/plonetheme.colorfulworld/plonetheme/colorfulworld/browser/viewlets/__init__.py
chrigl/docker-library
5dc9a2c1f0d81aba42190d3ff0e28c1fab2240d1
[ "Apache-2.0" ]
null
null
null
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from plone.app.layout.viewlets.common import SearchBoxViewlet class SearchBoxViewlet(SearchBoxViewlet): index = ViewPageTemplateFile('searchbox.pt')
45
71
0.853333
22
225
8.727273
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.075556
225
5
72
45
0.923077
0
0
0
0
0
0.053097
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
d2e425130ab93b288b9a8f4b6a68d0ecc4fcf666
47
py
Python
src/yea_wandb/__init__.py
wandb/yea-wandb
1be8fa5bcb8d5bf403352c89bff2a9d9f8d1dc9f
[ "MIT" ]
1
2021-12-17T17:33:18.000Z
2021-12-17T17:33:18.000Z
src/yea_wandb/__init__.py
wandb/yea-wandb
1be8fa5bcb8d5bf403352c89bff2a9d9f8d1dc9f
[ "MIT" ]
43
2021-07-18T00:30:11.000Z
2022-03-25T18:15:15.000Z
src/yea_wandb/__init__.py
wandb/yea-wandb
1be8fa5bcb8d5bf403352c89bff2a9d9f8d1dc9f
[ "MIT" ]
null
null
null
from .setup import setup __all__ = ["setup"]
9.4
24
0.680851
6
47
4.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.191489
47
4
25
11.75
0.736842
0
0
0
0
0
0.106383
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d2e8c70f38ba598eae7b1646ad8b1f3566778eac
2,009
py
Python
tests/helpers/install/test_version_to_install.py
bdraco/integration
b30e799bb27fdd978bd68f21909c82005d0dd3ea
[ "MIT" ]
2
2019-06-18T11:30:53.000Z
2019-10-03T21:34:11.000Z
tests/helpers/install/test_version_to_install.py
bdraco/integration
b30e799bb27fdd978bd68f21909c82005d0dd3ea
[ "MIT" ]
341
2019-06-18T11:30:55.000Z
2021-07-15T05:38:46.000Z
tests/helpers/install/test_version_to_install.py
bdraco/integration
b30e799bb27fdd978bd68f21909c82005d0dd3ea
[ "MIT" ]
null
null
null
"""Helpers: Install: version_to_install.""" # pylint: disable=missing-docstring from custom_components.hacs.helpers.functions.version_to_install import ( version_to_install, ) from tests.dummy_repository import dummy_repository_base def test_version_to_install(): repository = dummy_repository_base() repository.data.selected_tag = "master" assert version_to_install(repository) == "master" repository = dummy_repository_base() repository.data.default_branch = None repository.data.last_version = None repository.data.selected_tag = None assert version_to_install(repository) == "master" repository = dummy_repository_base() repository.data.selected_tag = "2" assert version_to_install(repository) == "2" repository = dummy_repository_base() repository.data.selected_tag = None assert version_to_install(repository) == "3" repository = dummy_repository_base() repository.data.selected_tag = None repository.data.last_version = None assert version_to_install(repository) == "master" repository = dummy_repository_base() repository.data.selected_tag = "2" repository.data.last_version = None assert version_to_install(repository) == "2" repository = dummy_repository_base() repository.data.selected_tag = "master" repository.data.last_version = None assert version_to_install(repository) == "master" repository = dummy_repository_base() repository.data.selected_tag = "3" repository.data.last_version = "3" version_to_install(repository) assert repository.data.selected_tag is None repository = dummy_repository_base() repository.data.default_branch = "dev" repository.data.last_version = None repository.data.selected_tag = None assert version_to_install(repository) == "dev" repository = dummy_repository_base() repository.data.default_branch = "master" repository.data.last_version = "2" assert version_to_install(repository) == "2"
34.050847
73
0.747138
235
2,009
6.076596
0.140426
0.196078
0.156863
0.20028
0.785714
0.764006
0.761204
0.737395
0.64986
0.563025
0
0.005332
0.159781
2,009
58
74
34.637931
0.84064
0.035839
0
0.666667
0
0
0.029518
0
0
0
0
0
0.222222
1
0.022222
false
0
0.044444
0
0.066667
0
0
0
0
null
0
0
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d2f2cf8ea1536710ad0504875a2c9f31a99dcc2b
13,925
py
Python
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/nixi/calculators/calc_misc.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
69
2021-12-16T01:34:09.000Z
2022-03-31T08:27:39.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/nixi/calculators/calc_misc.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
6
2022-01-12T18:22:08.000Z
2022-03-25T10:19:27.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/nixi/calculators/calc_misc.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
21
2021-12-20T09:05:45.000Z
2022-03-28T02:52:28.000Z
from pyradioconfig.parts.jumbo.calculators.calc_misc import CALC_Misc_jumbo from py_2_and_3_compatibility import * class CALC_Misc_nixi(CALC_Misc_jumbo): def calc_misc(self, model): """ These aren't really calculating right now. Just using defaults or forced values. Args: model (ModelRoot) : Data model to read and write variables from """ self._reg_write(model.vars.MODEM_CTRL0_FRAMEDETDEL, 0) self._reg_write(model.vars.MODEM_CTRL1_SYNCERRORS, 0) self._reg_write(model.vars.MODEM_CTRL1_SYNC1INV, 0) self._reg_write(model.vars.MODEM_CTRL2_BRDIVB, 0) self._reg_write(model.vars.MODEM_CTRL2_BRDIVA, 0) self._reg_write(model.vars.MODEM_CTRL4_ADCSATDENS, 0) self._reg_write(model.vars.MODEM_CTRL4_ADCSATLEVEL, 6) self._reg_write(model.vars.MODEM_PRE_DSSSPRE, 0) self._reg_write(model.vars.MODEM_TIMING_TSAGCDEL, 0) self._reg_write(model.vars.MODEM_TIMING_TIMSEQSYNC, 0) self._reg_write(model.vars.MODEM_TIMING_FASTRESYNC, 0) self._reg_write(model.vars.MODEM_AFC_AFCTXMODE, 0) self._reg_write(model.vars.MODEM_DSATHD0_SPIKETHD, 0x64) self._reg_write(model.vars.MODEM_DSATHD0_UNMODTHD, 4) self._reg_write(model.vars.MODEM_DSATHD0_FDEVMINTHD, 12) self._reg_write(model.vars.MODEM_DSATHD0_FDEVMAXTHD, 0x78) self._reg_write(model.vars.MODEM_DSATHD1_POWABSTHD, 0x1388) self._reg_write(model.vars.MODEM_DSATHD1_POWRELTHD, 0) self._reg_write(model.vars.MODEM_DSATHD1_DSARSTCNT, 2) self._reg_write(model.vars.MODEM_DSATHD1_RSSIJMPTHD, 6) self._reg_write(model.vars.MODEM_DSATHD1_FREQLATDLY, 1) self._reg_write(model.vars.MODEM_DSATHD1_PWRFLTBYP, 1) self._reg_write(model.vars.MODEM_DSATHD1_AMPFLTBYP, 1) self._reg_write(model.vars.MODEM_DSATHD1_PWRDETDIS, 1) self._reg_write(model.vars.MODEM_DSATHD1_FREQSCALE, 0) self._reg_write(model.vars.MODEM_DSACTRL_ARRTOLERTHD0, 2) self._reg_write(model.vars.MODEM_DSACTRL_ARRTOLERTHD1, 4) self._reg_write(model.vars.MODEM_DSACTRL_SCHPRD, 0) self._reg_write(model.vars.MODEM_DSACTRL_FREQAVGSYM, 1) self._reg_write(model.vars.MODEM_DSACTRL_DSARSTON, 1) self._reg_write(model.vars.MODEM_DSACTRL_LOWDUTY, 0) self._reg_write(model.vars.MODEM_VTTRACK_FREQTRACKMODE, 0) self._reg_write(model.vars.MODEM_VTTRACK_TIMTRACKTHD, 2) self._reg_write(model.vars.MODEM_VTTRACK_TIMEACQUTHD, 0xEE) self._reg_write(model.vars.MODEM_VTTRACK_TIMCHK, 0) self._reg_write(model.vars.MODEM_VTTRACK_TIMEOUTMODE, 1) self._reg_write(model.vars.MODEM_VTTRACK_TIMGEAR, 0) self._reg_write(model.vars.MODEM_VTTRACK_FREQBIAS, 0) self._reg_write(model.vars.MODEM_VTTRACK_HIPWRTHD, 1) self._reg_write(model.vars.MODEM_VTCORRCFG1_CORRSHFTLEN, 0x20) self._reg_write(model.vars.MODEM_VTCORRCFG1_VTFRQLIM, 0xC0) self._reg_write(model.vars.MODEM_VTCORRCFG1_EXPSYNCLEN, 8) self._reg_write(model.vars.MODEM_VTCORRCFG1_BUFFHEAD, 2) self._reg_write(model.vars.MODEM_VITERBIDEMOD_VTDEMODEN, 0) self._reg_write(model.vars.MODEM_VITERBIDEMOD_HARDDECISION, 0) self._reg_write(model.vars.MODEM_VITERBIDEMOD_VITERBIKSI1, 0x40) self._reg_write(model.vars.MODEM_VITERBIDEMOD_VITERBIKSI2, 0x30) self._reg_write(model.vars.MODEM_VITERBIDEMOD_VITERBIKSI3, 0x20) self._reg_write(model.vars.MODEM_VITERBIDEMOD_SYNTHAFC, 0) self._reg_write(model.vars.MODEM_VITERBIDEMOD_CORRCYCLE, 0) self._reg_write(model.vars.MODEM_VITERBIDEMOD_CORRSTPSIZE, 0) self._reg_write(model.vars.MODEM_CTRL4_SOFTDSSSMODE, 0) self._reg_write(model.vars.MODEM_CTRL4_PREDISTRST, 0) self._reg_write(model.vars.MODEM_CTRL4_PREDISTAVG, 0) self._reg_write(model.vars.MODEM_CTRL4_PREDISTDEB, 0) self._reg_write(model.vars.MODEM_CTRL4_PREDISTGAIN, 0) self._reg_write(model.vars.MODEM_CTRL5_RESYNCLIMIT, 0) self._reg_write(model.vars.MODEM_CTRL6_RXBRCALCDIS, 0) self._reg_write(model.vars.MODEM_CTRL6_DEMODRESTARTALL, 0) self._reg_write(model.vars.MODEM_DSACTRL_AGCBAUDEN, 0) self._reg_write(model.vars.MODEM_DSACTRL_RESTORE, 0) self._reg_write(model.vars.MODEM_DSACTRL_AMPJUPTHD, 0) self._reg_write(model.vars.MODEM_DSACTRL_GAINREDUCDLY, 0) self._reg_write(model.vars.MODEM_CTRL0_DUALCORROPTDIS, 0) self._reg_write(model.vars.MODEM_CGCLKSTOP_FORCEOFF, 0) self._reg_write(model.vars.AGC_RSSISTEPTHR_DEMODRESTARTPER, 0) self._reg_write(model.vars.AGC_RSSISTEPTHR_DEMODRESTARTTHR, 0) self._reg_write(model.vars.AGC_RSSISTEPTHR_POSSTEPTHR , 0) self._reg_write(model.vars.AGC_RSSISTEPTHR_NEGSTEPTHR , 0) self._reg_write(model.vars.AGC_RSSISTEPTHR_STEPPER , 0) self._reg_write(model.vars.MODEM_LONGRANGE_LRCORRTHD, 0x3E8) self._reg_write(model.vars.MODEM_LONGRANGE_LRTIMCORRTHD, 0x0FA) self._reg_write(model.vars.MODEM_LONGRANGE_LRCORRSCHWIN, 0xA) self._reg_write(model.vars.MODEM_LONGRANGE_LRBLE, 0) self._reg_write(model.vars.MODEM_LRFRC_CI500, 1) self._reg_write(model.vars.MODEM_LRFRC_FRCACKTIMETHD, 0) self._reg_write(model.vars.MODEM_LONGRANGE_LRDEC, 0) self._reg_write(model.vars.MODEM_LONGRANGE_LRBLEDSA, 0) self._reg_write(model.vars.MODEM_LONGRANGE1_LRSS, 0) self._reg_write(model.vars.MODEM_LONGRANGE1_LRTIMEOUTTHD, 0) self._reg_write(model.vars.MODEM_LONGRANGE6_LRCHPWRSPIKETH, 0) self._reg_write(model.vars.MODEM_LONGRANGE6_LRSPIKETHD, 0) self._reg_write(model.vars.MODEM_LONGRANGE1_LRSPIKETHADD, 0) self._reg_write(model.vars.MODEM_LONGRANGE1_CHPWRACCUDEL, 0) self._reg_write(model.vars.MODEM_LONGRANGE1_HYSVAL, 0) self._reg_write(model.vars.MODEM_LONGRANGE1_AVGWIN, 0) self._reg_write(model.vars.MODEM_LONGRANGE2_LRCHPWRTH1, 0) self._reg_write(model.vars.MODEM_LONGRANGE2_LRCHPWRTH2, 0) self._reg_write(model.vars.MODEM_LONGRANGE2_LRCHPWRTH3, 0) self._reg_write(model.vars.MODEM_LONGRANGE2_LRCHPWRTH4, 0) self._reg_write(model.vars.MODEM_LONGRANGE3_LRCHPWRTH5, 0) self._reg_write(model.vars.MODEM_LONGRANGE3_LRCHPWRTH6, 0) self._reg_write(model.vars.MODEM_LONGRANGE3_LRCHPWRTH7, 0) self._reg_write(model.vars.MODEM_LONGRANGE3_LRCHPWRTH8, 0) self._reg_write(model.vars.MODEM_LONGRANGE4_LRCHPWRTH9, 0) self._reg_write(model.vars.MODEM_LONGRANGE4_LRCHPWRTH10, 0) self._reg_write(model.vars.MODEM_LONGRANGE4_LRCHPWRSH1, 0) self._reg_write(model.vars.MODEM_LONGRANGE4_LRCHPWRSH2, 0) self._reg_write(model.vars.MODEM_LONGRANGE4_LRCHPWRSH3, 0) self._reg_write(model.vars.MODEM_LONGRANGE4_LRCHPWRSH4, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH5, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH6, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH7, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH8, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH9, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH10, 0) self._reg_write(model.vars.MODEM_LONGRANGE5_LRCHPWRSH11, 0) #These writes should only happen in Nixi (not in later families) if model.part_family.lower() == 'nixi': self._reg_write(model.vars.MODEM_VTCORRCFG0_EXPECTPATT, long(0x123556B7)) self._reg_write(model.vars.MODEM_VTCORRCFG1_EXPECTHT, 5) self._reg_write(model.vars.AGC_GAINSTEPLIM_EN2XFASTSTEPDOWN, 0) self._reg_write(model.vars.MODEM_DSACTRL_AGCDEBOUNDLY, 0) self._reg_write(model.vars.MODEM_DSACTRL_TIMEST, 0) self._reg_write(model.vars.SEQ_MISC_SQBMODETX, 0) self._reg_write(model.vars.SEQ_SYNTH_CTRL_DITHER_SETTINGS_DITHERDSMOUTPUTRX, 7) self._reg_write(model.vars.SEQ_SYNTH_CTRL_DITHER_SETTINGS_DITHERDACRX, 3) self._reg_write(model.vars.SEQ_SYNTH_CTRL_DITHER_SETTINGS_DITHERDACTX, 3) self._reg_write(model.vars.SEQ_SYNTH_CTRL_DITHER_SETTINGS_DITHERDSMINPUTRX, 1) self._reg_write(model.vars.SEQ_SYNTH_CTRL_DITHER_SETTINGS_DITHERDSMINPUTTX, 1) self._reg_write(model.vars.SYNTH_CTRL_DEMMODE, 1) #These writes should happen for Nixi and Panther (not in later families) if model.part_family.lower() in ['nixi','panther']: self._reg_write(model.vars.MODEM_SHAPING4_COEFF20, 0) self._reg_write(model.vars.MODEM_SHAPING4_COEFF21, 0) self._reg_write(model.vars.MODEM_SHAPING5_COEFF24, 0) self._reg_write(model.vars.MODEM_SHAPING5_COEFF25, 0) self._reg_write(model.vars.MODEM_SHAPING5_COEFF26, 0) self._reg_write(model.vars.MODEM_SHAPING5_COEFF27, 0) self._reg_write(model.vars.MODEM_SHAPING5_COEFF28, 0) self._reg_write(model.vars.MODEM_SHAPING5_COEFF29, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF30, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF31, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF32, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF33, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF34, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF35, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF36, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF37, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF38, 0) self._reg_write(model.vars.MODEM_SHAPING6_COEFF39, 0) #These writes should happen for all families except Lynx / Leopard if model.part_family.lower() not in ['lynx', 'leopard']: self._reg_write(model.vars.MODEM_CTRL5_DSSSCTD, 0) self._reg_write(model.vars.MODEM_CTRL5_BBSS, 0) self._reg_write(model.vars.MODEM_CTRL5_POEPER, 0) self._reg_write(model.vars.MODEM_CTRL5_FOEPREAVG, 0) self._reg_write(model.vars.MODEM_CTRL5_LINCORR, 0) self._reg_write(model.vars.MODEM_CTRL5_PRSDEBUG, 0) self._reg_write(model.vars.MODEM_CTRL6_ARW, 0) self._reg_write(model.vars.MODEM_CTRL6_TIMTHRESHGAIN, 0) self._reg_write(model.vars.MODEM_CTRL6_CPLXCORREN, 0) self._reg_write(model.vars.MODEM_CTRL6_DSSS3SYMBOLSYNCEN, 0) self._reg_write(model.vars.MODEM_CTRL6_TDREW, 0) self._reg_write(model.vars.MODEM_CTRL6_PREBASES, 0) self._reg_write(model.vars.MODEM_CTRL6_PSTIMABORT0, 0) self._reg_write(model.vars.MODEM_CTRL6_PSTIMABORT1, 0) self._reg_write(model.vars.MODEM_CTRL6_PSTIMABORT2, 0) self._reg_write(model.vars.MODEM_CTRL6_PSTIMABORT3, 0) self._reg_write(model.vars.MODEM_INTAFC_FOEPREAVG0, 0) self._reg_write(model.vars.MODEM_INTAFC_FOEPREAVG1, 0) self._reg_write(model.vars.MODEM_INTAFC_FOEPREAVG2, 0) self._reg_write(model.vars.MODEM_INTAFC_FOEPREAVG3, 0) self._reg_write(model.vars.MODEM_COH0_COHCHPWRTH2, 0) self._reg_write(model.vars.MODEM_COH0_COHCHPWRTH1, 0) self._reg_write(model.vars.MODEM_COH0_COHCHPWRTH0, 0) self._reg_write(model.vars.MODEM_COH0_COHDYNAMICSYNCTHRESH, 0) self._reg_write(model.vars.MODEM_COH0_COHDYNAMICBBSSEN, 0) self._reg_write(model.vars.MODEM_COH1_SYNCTHRESH0, 0) self._reg_write(model.vars.MODEM_COH1_SYNCTHRESH1, 0) self._reg_write(model.vars.MODEM_COH1_SYNCTHRESH2, 0) self._reg_write(model.vars.MODEM_COH1_SYNCTHRESH3, 0) self._reg_write(model.vars.MODEM_COH2_SYNCTHRESHDELTA0, 0) self._reg_write(model.vars.MODEM_COH2_SYNCTHRESHDELTA1, 0) self._reg_write(model.vars.MODEM_COH2_SYNCTHRESHDELTA2, 0) self._reg_write(model.vars.MODEM_COH2_SYNCTHRESHDELTA3, 0) self._reg_write(model.vars.MODEM_COH2_DSAPEAKCHPWRTH, 0) self._reg_write(model.vars.MODEM_COH2_FIXEDCDTHFORIIR, 0) self._reg_write(model.vars.MODEM_COH3_COHDSAEN, 0) self._reg_write(model.vars.MODEM_COH3_COHDSAADDWNDSIZE, 0) self._reg_write(model.vars.MODEM_COH3_CDSS, 0) self._reg_write(model.vars.MODEM_COH3_DSAPEAKCHKEN, 0) self._reg_write(model.vars.MODEM_COH3_DSAPEAKINDLEN, 0) self._reg_write(model.vars.MODEM_COH3_DSAPEAKCHPWREN, 0) self._reg_write(model.vars.MODEM_COH3_LOGICBASEDCOHDEMODGATE, 0) self._reg_write(model.vars.MODEM_COH3_DYNIIRCOEFOPTION, 0) self._reg_write(model.vars.MODEM_COH3_ONEPEAKQUALEN, 0) self._reg_write(model.vars.MODEM_COH3_PEAKCHKTIMOUT, 0) self._reg_write(model.vars.MODEM_COH3_COHDSADETDIS, 0) self._reg_write(model.vars.MODEM_DSATHD2_PMDETFORCE, 0) self._reg_write(model.vars.MODEM_DSATHD2_INTERFERDET, 6) self._reg_write(model.vars.MODEM_DSATHD2_FREQESTTHD, 6) self._reg_write(model.vars.MODEM_DSATHD2_PMDETPASSTHD, 6) self._reg_write(model.vars.MODEM_DSATHD2_FDADJTHD, 1) self._reg_write(model.vars.MODEM_DSATHD2_JUMPDETEN, 1) self._reg_write(model.vars.MODEM_DSATHD2_POWABSTHDLOG, 100) def calc_ook_rssi_offset(self,model): #OOK RSSI offset measured experimentally for Nixi model.vars.ook_rssi_offset.value = 16 def calc_dynamic_bbss_values(self, model): #Do not inherit dynamic BBSS calculations on Nixi pass
63.295455
91
0.719066
1,873
13,925
4.919915
0.174052
0.186544
0.247423
0.350515
0.720781
0.712751
0.704829
0.568964
0.0344
0.025719
0
0.039608
0.193178
13,925
220
92
63.295455
0.780596
0.03246
0
0
0
0
0.001936
0
0
0
0.004542
0
0
1
0.014925
false
0.00995
0.00995
0
0.029851
0
0
0
0
null
0
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
96020e45153b68af3990c14398ad88452a6f4a51
466
py
Python
pgallery/sitemaps.py
zsiciarz/django-pgallery
8dee38433645d2f45b3957520e61a72cd652534b
[ "MIT" ]
20
2015-01-15T02:59:23.000Z
2022-02-03T14:49:21.000Z
pgallery/sitemaps.py
zsiciarz/django-pgallery
8dee38433645d2f45b3957520e61a72cd652534b
[ "MIT" ]
18
2015-10-04T06:14:52.000Z
2022-03-11T23:17:08.000Z
pgallery/sitemaps.py
zsiciarz/django-pgallery
8dee38433645d2f45b3957520e61a72cd652534b
[ "MIT" ]
13
2015-07-12T20:24:03.000Z
2020-11-27T22:44:19.000Z
from django.contrib.sitemaps import Sitemap from .models import Gallery, Photo class GallerySitemap(Sitemap): changefreq = "weekly" priority = 0.5 def items(self): return Gallery.published.all() def lastmod(self, obj): return obj.modified class PhotoSitemap(Sitemap): changefreq = "weekly" priority = 0.5 def items(self): return Photo.objects.all() def lastmod(self, obj): return obj.modified
17.923077
43
0.656652
55
466
5.563636
0.490909
0.111111
0.150327
0.202614
0.575163
0.575163
0.575163
0.575163
0.333333
0.333333
0
0.011429
0.248927
466
25
44
18.64
0.862857
0
0
0.625
0
0
0.025751
0
0
0
0
0
0
1
0.25
false
0
0.125
0.25
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
961608300303270652dbcf7848c5dab4b39c46cc
104
py
Python
smp_audio/caching.py
x75/smp_audio
6e293d6419132e34e38efde90efb58cabb9c623b
[ "MIT" ]
4
2020-12-30T01:47:17.000Z
2021-04-10T11:11:16.000Z
smp_audio/caching.py
x75/smp_audio
6e293d6419132e34e38efde90efb58cabb9c623b
[ "MIT" ]
null
null
null
smp_audio/caching.py
x75/smp_audio
6e293d6419132e34e38efde90efb58cabb9c623b
[ "MIT" ]
null
null
null
# caching joblib from joblib import Memory location = './cachedir' memory = Memory(location, verbose=0)
20.8
36
0.759615
13
104
6.076923
0.692308
0.35443
0
0
0
0
0
0
0
0
0
0.011111
0.134615
104
4
37
26
0.866667
0.134615
0
0
0
0
0.113636
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8258104492781e0bee5435c809cf7ddd5222a20f
2,645
py
Python
modules/core/sublime_event_loop.py
timfjord/sublime_debugger
3dae233f307264d103e687fb641275c38889d814
[ "MIT" ]
225
2019-07-18T17:32:46.000Z
2022-03-20T02:21:03.000Z
modules/core/sublime_event_loop.py
timfjord/sublime_debugger
3dae233f307264d103e687fb641275c38889d814
[ "MIT" ]
134
2019-07-23T01:07:58.000Z
2022-03-31T15:37:08.000Z
modules/core/sublime_event_loop.py
timfjord/sublime_debugger
3dae233f307264d103e687fb641275c38889d814
[ "MIT" ]
39
2019-07-27T05:41:38.000Z
2022-03-28T04:39:06.000Z
from __future__ import annotations import asyncio import sublime import threading class Handle: def __init__(self, callback, args): self.callback = callback self.args = args def __call__(self): if self.callback: self.callback(*self.args) def cancel(self): self.callback = None self.args = None class SublimeEventLoop (asyncio.AbstractEventLoop): def run_forever(self): raise NotImplementedError def run_until_complete(self, future): raise NotImplementedError def stop(self): raise NotImplementedError def is_running(self): raise NotImplementedError def is_closed(self): raise NotImplementedError def close(self): raise NotImplementedError def shutdown_asyncgens(self): raise NotImplementedError # Methods scheduling callbacks. All these return Handles. def _timer_handle_cancelled(self, handle): raise NotImplementedError def call_soon(self, callback, *args, context=None): handle = Handle(callback, args) sublime.set_timeout(handle, 0) return handle def call_later(self, delay, callback, *args, context=None): handle = Handle(callback, args) sublime.set_timeout(handle, delay * 1000) return handle def call_at(self, when, callback, *args): raise NotImplementedError def time(self): raise NotImplementedError def create_future(self): return asyncio.futures.Future(loop=self) # Method scheduling a coroutine object: create a task. def create_task(self, coro): task = asyncio.tasks.Task(coro, loop=self) if task._source_traceback: #type: ignore del task._source_traceback[-1] #type: ignore return task # Methods for interacting with threads. def call_soon_threadsafe(self, callback, *args): return self.call_later(0, callback, *args) def run_in_executor(self, executor, func, *args): raise NotImplementedError def set_default_executor(self, executor): raise NotImplementedError # Task factory. def set_task_factory(self, factory): raise NotImplementedError def get_task_factory(self): raise NotImplementedError # Error handlers. def get_exception_handler(self): raise NotImplementedError def set_exception_handler(self, handler): raise NotImplementedError def default_exception_handler(self, context): raise NotImplementedError def call_exception_handler(self, context): from .log import log_exception from .error import Error try: if 'exception' in context: raise context['exception'] else: raise Error(context['message']) except Exception as e: log_exception() # Debug flag management. def get_debug(self): return False def set_debug(self, enabled): raise NotImplementedError
22.041667
60
0.762193
331
2,645
5.924471
0.29003
0.220296
0.192759
0.110658
0.105048
0.071392
0.071392
0.071392
0.071392
0.071392
0
0.003136
0.156144
2,645
119
61
22.226891
0.875448
0.084688
0
0.275
0
0
0.010365
0
0
0
0
0
0
1
0.35
false
0
0.075
0.0375
0.525
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
82b3910ca491bd8a8eca5cd3188df116613cff00
112
py
Python
example/__init__.py
ssfanli/screcord
94082e1c6b34e2f07779681059f5e329036c5344
[ "MIT" ]
6
2021-03-10T05:23:47.000Z
2022-01-05T04:16:54.000Z
example/__init__.py
ssfanli/screcord
94082e1c6b34e2f07779681059f5e329036c5344
[ "MIT" ]
5
2021-03-11T04:03:20.000Z
2021-11-18T12:54:45.000Z
example/__init__.py
ssfanli/screcord
94082e1c6b34e2f07779681059f5e329036c5344
[ "MIT" ]
3
2020-09-23T07:22:15.000Z
2021-11-18T10:09:27.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @Author: Ssfanli @Time : 2020/04/14 10:36 下午 @Desc : """
11.2
28
0.544643
17
112
3.588235
1
0
0
0
0
0
0
0
0
0
0
0.155556
0.196429
112
9
29
12.444444
0.522222
0.875
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
7d55e0df88bf7d5566cb7a2220afcd6f5c3c14b5
5,444
py
Python
colour/models/tests/test_din99.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
2
2020-05-03T20:15:42.000Z
2021-04-09T18:19:06.000Z
colour/models/tests/test_din99.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
null
null
null
colour/models/tests/test_din99.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
1
2019-12-11T19:48:27.000Z
2019-12-11T19:48:27.000Z
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.models.din99` module. """ from __future__ import division, unicode_literals import numpy as np import unittest from itertools import permutations from colour.models import Lab_to_DIN99, DIN99_to_Lab from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = 'Colour Developers' __copyright__ = 'Copyright (C) 2013-2019 - Colour Developers' __license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause' __maintainer__ = 'Colour Developers' __email__ = 'colour-science@googlegroups.com' __status__ = 'Production' __all__ = ['TestLab_to_DIN99', 'TestDIN99_to_Lab'] class TestLab_to_DIN99(unittest.TestCase): """ Defines :func:`colour.models.din99.Lab_to_DIN99` definition unit tests methods. """ def test_Lab_to_DIN99(self): """ Tests :func:`colour.models.din99.Lab_to_DIN99` definition. """ np.testing.assert_almost_equal( Lab_to_DIN99(np.array([41.52787529, 52.63858304, 26.92317922])), np.array([53.22821988, 28.41634656, 3.89839552]), decimal=7) np.testing.assert_almost_equal( Lab_to_DIN99(np.array([55.11636304, -41.08791787, 30.91825778])), np.array([66.08943912, -17.35290106, 16.09690691]), decimal=7) np.testing.assert_almost_equal( Lab_to_DIN99(np.array([29.80565520, 20.01830466, -48.34913874])), np.array([40.71533366, 3.48714163, -21.45321411]), decimal=7) def test_n_dimensional_Lab_to_DIN99(self): """ Tests :func:`colour.models.din99.Lab_to_DIN99` definition n-dimensional support. """ Lab = np.array([41.52787529, 52.63858304, 26.92317922]) Lab_99 = Lab_to_DIN99(Lab) Lab = np.tile(Lab, (6, 1)) Lab_99 = np.tile(Lab_99, (6, 1)) np.testing.assert_almost_equal(Lab_to_DIN99(Lab), Lab_99, decimal=7) Lab = np.reshape(Lab, (2, 3, 3)) Lab_99 = np.reshape(Lab_99, (2, 3, 3)) np.testing.assert_almost_equal(Lab_to_DIN99(Lab), Lab_99, decimal=7) def test_domain_range_scale_Lab_to_DIN99(self): """ Tests :func:`colour.models.din99.Lab_to_DIN99` definition domain and range scale support. """ Lab = np.array([41.52787529, 52.63858304, 26.92317922]) Lab_99 = Lab_to_DIN99(Lab) d_r = (('reference', 1), (1, 0.01), (100, 1)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal( Lab_to_DIN99(Lab * factor), Lab_99 * factor, decimal=7) @ignore_numpy_errors def test_nan_Lab_to_DIN99(self): """ Tests :func:`colour.models.din99.Lab_to_DIN99` definition nan support. """ cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan] cases = set(permutations(cases * 3, r=3)) for case in cases: Lab_to_DIN99(np.array(case)) class TestDIN99_to_Lab(unittest.TestCase): """ Defines :func:`colour.models.din99.DIN99_to_Lab` definition unit tests methods. """ def test_DIN99_to_Lab(self): """ Tests :func:`colour.models.din99.DIN99_to_Lab` definition. """ np.testing.assert_almost_equal( DIN99_to_Lab(np.array([53.22821988, 28.41634656, 3.89839552])), np.array([41.52787529, 52.63858304, 26.92317922]), decimal=7) np.testing.assert_almost_equal( DIN99_to_Lab(np.array([66.08943912, -17.35290106, 16.09690691])), np.array([55.11636304, -41.08791787, 30.91825778]), decimal=7) np.testing.assert_almost_equal( DIN99_to_Lab(np.array([40.71533366, 3.48714163, -21.45321411])), np.array([29.80565520, 20.01830466, -48.34913874]), decimal=7) def test_n_dimensional_DIN99_to_Lab(self): """ Tests :func:`colour.models.din99.DIN99_to_Lab` definition n-dimensional support. """ Lab_99 = np.array([53.22821988, 28.41634656, 3.89839552]) Lab = DIN99_to_Lab(Lab_99) Lab_99 = np.tile(Lab_99, (6, 1)) Lab = np.tile(Lab, (6, 1)) np.testing.assert_almost_equal(DIN99_to_Lab(Lab_99), Lab, decimal=7) Lab_99 = np.reshape(Lab_99, (2, 3, 3)) Lab = np.reshape(Lab, (2, 3, 3)) np.testing.assert_almost_equal(DIN99_to_Lab(Lab_99), Lab, decimal=7) def test_domain_range_scale_DIN99_to_Lab(self): """ Tests :func:`colour.models.din99.DIN99_to_Lab` definition domain and range scale support. """ Lab_99 = np.array([53.22821988, 28.41634656, 3.89839552]) Lab = DIN99_to_Lab(Lab_99) d_r = (('reference', 1), (1, 0.01), (100, 1)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal( DIN99_to_Lab(Lab_99 * factor), Lab * factor, decimal=7) @ignore_numpy_errors def test_nan_DIN99_to_Lab(self): """ Tests :func:`colour.models.din99.DIN99_to_Lab` definition nan support. """ cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan] cases = set(permutations(cases * 3, r=3)) for case in cases: DIN99_to_Lab(np.array(case)) if __name__ == '__main__': unittest.main()
32.598802
79
0.61903
745
5,444
4.248322
0.177181
0.046446
0.060032
0.079621
0.820221
0.801896
0.762085
0.709953
0.545972
0.502054
0
0.17013
0.24853
5,444
166
80
32.795181
0.60352
0.154666
0
0.539326
0
0
0.054839
0.007143
0
0
0
0
0.134831
1
0.089888
false
0
0.067416
0
0.179775
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7d5c75b67f0c276dbbe7d530e7ef1366e8fd058c
472
py
Python
cloudbio/custom/galaxy.py
glebkuznetsov/cloudbiolinux
ec47b90ce72f6cd1bc4e5422231f19d41378b122
[ "MIT" ]
122
2015-01-04T13:23:27.000Z
2022-01-18T22:52:12.000Z
cloudbio/custom/galaxy.py
glebkuznetsov/cloudbiolinux
ec47b90ce72f6cd1bc4e5422231f19d41378b122
[ "MIT" ]
170
2015-02-09T18:03:49.000Z
2021-11-14T02:32:09.000Z
cloudbio/custom/galaxy.py
glebkuznetsov/cloudbiolinux
ec47b90ce72f6cd1bc4e5422231f19d41378b122
[ "MIT" ]
107
2015-01-06T06:10:04.000Z
2022-02-10T17:25:34.000Z
""" Install any components that fall under 'galaxy' directive in main.yaml """ from cloudbio.galaxy import _setup_users from cloudbio.galaxy import _setup_galaxy_env_defaults from cloudbio.galaxy import _install_galaxy from cloudbio.galaxy import _configure_galaxy_options def install_galaxy_webapp(env): _prep_galaxy(env) _install_galaxy(env) _configure_galaxy_options(env) def _prep_galaxy(env): _setup_users(env) _setup_galaxy_env_defaults(env)
24.842105
70
0.809322
65
472
5.446154
0.353846
0.127119
0.20339
0.271186
0.163842
0
0
0
0
0
0
0
0.129237
472
18
71
26.222222
0.861314
0.148305
0
0
0
0
0
0
0
0
0
0
0
1
0.181818
false
0
0.363636
0
0.545455
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7d616cf2cb1ff6ff6314162eb89e01cf9b9a7016
162
py
Python
Transformers/Python/tests/test_inputs/buggy_and_ok_files/python2.py
wubero/Lampion
8a81b3381dee48ffab8cf7ee1b57e0eea8aaeba2
[ "MIT" ]
1
2022-02-20T11:42:18.000Z
2022-02-20T11:42:18.000Z
Transformers/Python/tests/test_inputs/buggy_files/python2.py
ciselab/Lampion
ba457d152a83e9b58072ec4676cc340b5b5afb1b
[ "MIT" ]
28
2021-12-06T07:10:27.000Z
2022-03-25T09:42:51.000Z
Transformers/Python/tests/test_inputs/buggy_files/python2.py
wubero/Lampion
8a81b3381dee48ffab8cf7ee1b57e0eea8aaeba2
[ "MIT" ]
2
2021-11-25T08:32:45.000Z
2022-02-20T11:42:27.000Z
# This file is (correct) python2 # But for Lampion it is considered "bad" and should not be picked up def py2print(s): splus = "Hello " + s print splus
20.25
68
0.67284
26
162
4.192308
0.884615
0
0
0
0
0
0
0
0
0
0
0.016393
0.246914
162
7
69
23.142857
0.877049
0.598765
0
0
0
0
0.098361
0
0
0
0
0
0
0
null
null
0
0
null
null
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
4
7d8c62b505defa9e0629da028a287593f0dcccd6
426
py
Python
MCSC/__init__.py
samiptimalsena/MCSC
87f3ea7d704682576d978cfd05a82ec68645c8a2
[ "MIT" ]
6
2020-09-12T03:35:00.000Z
2020-09-30T14:03:02.000Z
MCSC/__init__.py
samiptimalsena/MCSC
87f3ea7d704682576d978cfd05a82ec68645c8a2
[ "MIT" ]
null
null
null
MCSC/__init__.py
samiptimalsena/MCSC
87f3ea7d704682576d978cfd05a82ec68645c8a2
[ "MIT" ]
null
null
null
from MCSC.BisectionMethod import BisectionMethod from MCSC.FalsePostionMethod import FalsePostionMethod from MCSC.IterationMethod import IterationMethod,JacobiMethod,GaussSeidelMethod from MCSC.NewtonRaphsonMethod import NewtonRaphsonMethod,GeneralizedNewtonRaphsonMethod,NewtonMethodForSystem from MCSC.SecantMethod import SecantMethod from MCSC.ThomasAlgorithm import ThomasAlgorithm from MCSC.Interpolate import Interpolate
60.857143
109
0.910798
39
426
9.948718
0.358974
0.14433
0
0
0
0
0
0
0
0
0
0
0.06338
426
7
110
60.857143
0.972431
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
7da2bda209282dea7236b8c513f8e8b769abbf10
218
py
Python
src/lcov/__about__.py
karpierz/lcov
4ddcc93e202085ae7d7994697c1b92ff7d89b4fe
[ "BSD-3-Clause" ]
null
null
null
src/lcov/__about__.py
karpierz/lcov
4ddcc93e202085ae7d7994697c1b92ff7d89b4fe
[ "BSD-3-Clause" ]
null
null
null
src/lcov/__about__.py
karpierz/lcov
4ddcc93e202085ae7d7994697c1b92ff7d89b4fe
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020-2022, Adam Karpierz # Licensed under the BSD license # https://opensource.org/licenses/BSD-3-Clause __import__("pkg_about").about() __copyright__ = f"Copyright (c) 2020-2022 {__author__}" # noqa
31.142857
63
0.743119
30
218
4.966667
0.766667
0.134228
0.187919
0.241611
0
0
0
0
0
0
0
0.088083
0.114679
218
6
64
36.333333
0.683938
0.545872
0
0
0
0
0.478723
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
7dbaf1e5e597f03036dbd879cd04503d7c2df7f1
13,778
py
Python
abcpy/NN_utilities/networks.py
vishalbelsare/abcpy
72d0d31ae3fa531b69ea3fef39c96af6628ee76f
[ "BSD-3-Clause-Clear" ]
89
2017-02-23T23:34:52.000Z
2022-03-25T20:35:17.000Z
abcpy/NN_utilities/networks.py
vishalbelsare/abcpy
72d0d31ae3fa531b69ea3fef39c96af6628ee76f
[ "BSD-3-Clause-Clear" ]
35
2017-03-31T13:24:52.000Z
2022-01-09T11:31:38.000Z
abcpy/NN_utilities/networks.py
vishalbelsare/abcpy
72d0d31ae3fa531b69ea3fef39c96af6628ee76f
[ "BSD-3-Clause-Clear" ]
32
2017-03-22T06:27:43.000Z
2021-09-17T15:50:42.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import grad class SiameseNet(nn.Module): """ This is used in the contrastive distance learning. It is a network wrapping a standard neural network and feeding two samples through it at once. From https://github.com/adambielski/siamese-triplet""" def __init__(self, embedding_net): super(SiameseNet, self).__init__() self.embedding_net = embedding_net def forward(self, x1, x2): output1 = self.embedding_net(x1) output2 = self.embedding_net(x2) return output1, output2 def get_embedding(self, x): return self.embedding_net(x) class TripletNet(nn.Module): """ This is used in the triplet distance learning. It is a network wrapping a standard neural network and feeding three samples through it at once. From https://github.com/adambielski/siamese-triplet""" def __init__(self, embedding_net): super(TripletNet, self).__init__() self.embedding_net = embedding_net def forward(self, x1, x2, x3): output1 = self.embedding_net(x1) output2 = self.embedding_net(x2) output3 = self.embedding_net(x3) return output1, output2, output3 def get_embedding(self, x): return self.embedding_net(x) class ScalerAndNet(nn.Module): """Defines a nn.Module class that wraps a scaler and a neural network, and applies the scaler before passing the data through the neural network.""" def __init__(self, net, scaler): """""" super().__init__() self.net = net self.scaler = scaler def forward(self, x): """""" x = torch.tensor(self.scaler.transform(x), dtype=torch.float32).to(next(self.net.parameters()).device) return self.net(x) class DiscardLastOutputNet(nn.Module): """Defines a nn.Module class that wraps a scaler and a neural network, and applies the scaler before passing the data through the neural network. Next, the """ def __init__(self, net): super().__init__() self.net = net def forward(self, x): x = self.net(x) if len(x.shape) == 1: return x[0:-1] if len(x.shape) == 2: return x[:, 0:-1] if len(x.shape) == 3: return x[:, :, 0:-1] def createDefaultNN(input_size, output_size, hidden_sizes=None, nonlinearity=None, batch_norm_last_layer=False, batch_norm_last_layer_momentum=0.1): """Function returning a fully connected neural network class with a given input and output size, and optionally given hidden layer sizes (if these are not given, they are determined from the input and output size in a heuristic way, see below). In order to instantiate the network, you need to write: >>> createDefaultNN(input_size, output_size)() as the function returns a class, and () is needed to instantiate an object. If hidden_sizes is None, three hidden layers are used with the following sizes: ``[int(input_size * 1.5), int(input_size * 0.75 + output_size * 3), int(output_size * 5)]`` Note that the nonlinearity here is as an object or a functional, not a class, eg: nonlinearity = nn.Softplus() or: nonlinearity = nn.functional.softplus """ class DefaultNN(nn.Module): """Neural network class with sizes determined by the upper level variables.""" def __init__(self): super(DefaultNN, self).__init__() # put some fully connected layers: if hidden_sizes is not None and len(hidden_sizes) == 0: # it is effectively a linear network self.fc_in = nn.Linear(input_size, output_size) else: if hidden_sizes is None: # then set some default values for the hidden layers sizes; is this parametrization reasonable? hidden_sizes_list = [int(input_size * 1.5), int(input_size * 0.75 + output_size * 3), int(output_size * 5)] else: hidden_sizes_list = hidden_sizes self.fc_in = nn.Linear(input_size, hidden_sizes_list[0]) # define now the hidden layers self.fc_hidden = nn.ModuleList() for i in range(len(hidden_sizes_list) - 1): self.fc_hidden.append(nn.Linear(hidden_sizes_list[i], hidden_sizes_list[i + 1])) self.fc_out = nn.Linear(hidden_sizes_list[-1], output_size) # define the batch_norm: if batch_norm_last_layer: self.bn_out = nn.BatchNorm1d(output_size, affine=False, momentum=batch_norm_last_layer_momentum) def forward(self, x): if nonlinearity is None: nonlinearity_fcn = F.relu else: nonlinearity_fcn = nonlinearity if not hasattr(self, "fc_hidden"): # it means that hidden sizes was provided and the length of the list was 0 return self.fc_in(x) x = nonlinearity_fcn(self.fc_in(x)) for i in range(len(self.fc_hidden)): x = nonlinearity_fcn(self.fc_hidden[i](x)) x = self.fc_out(x) if batch_norm_last_layer: x = self.bn_out(x) return x return DefaultNN def createDefaultNNWithDerivatives(input_size, output_size, hidden_sizes=None, nonlinearity=None, first_derivative_only=False): """Function returning a fully connected neural network class with a given input and output size, and optionally given hidden layer sizes (if these are not given, they are determined from the input and output size with some expression. This neural network is capable of computing the first and second derivatives of output with respect to input along with the forward pass. All layers in this neural network are linear. >>> createDefaultNN(input_size, output_size)() as the function returns a class, and () is needed to instantiate an object. If hidden_sizes is None, three hidden layers are used with the following sizes: ``[int(input_size * 1.5), int(input_size * 0.75 + output_size * 3), int(output_size * 5)]`` Note that the nonlinearity here is passed as a class, not an object, eg: nonlinearity = nn.Softplus """ if nonlinearity in [torch.nn.Softsign, torch.nn.Tanhshrink]: raise RuntimeError("The implementation of forward derivatives does not work with Tanhshrink and " "Softsign nonlinearities.") class DefaultNNWithDerivatives(nn.Module): """Neural network class with sizes determined by the upper level variables.""" def __init__(self): super(DefaultNNWithDerivatives, self).__init__() # put some fully connected layers: if nonlinearity is None: # default nonlinearity non_linearity = nn.ReLU else: non_linearity = nonlinearity # need to change name otherwise it gives Error if hidden_sizes is not None and len(hidden_sizes) == 0: # it is effectively a linear network self.fc_in = nn.Linear(input_size, output_size) else: if hidden_sizes is None: # then set some default values for the hidden layers sizes; is this parametrization reasonable? hidden_sizes_list = [int(input_size * 1.5), int(input_size * 0.75 + output_size * 3), int(output_size * 5)] else: hidden_sizes_list = hidden_sizes self.fc_in = nn.Linear(input_size, hidden_sizes_list[0]) self.nonlinearity_in = non_linearity() # define now the hidden layers self.fc_hidden = nn.ModuleList() self.nonlinearities_hidden = nn.ModuleList() for i in range(len(hidden_sizes_list) - 1): self.fc_hidden.append(nn.Linear(hidden_sizes_list[i], hidden_sizes_list[i + 1])) self.nonlinearities_hidden.append(non_linearity()) self.fc_out = nn.Linear(hidden_sizes_list[-1], output_size) def forward(self, x): if not hasattr(self, "fc_hidden"): # it means that hidden sizes was provided and the length of the list was 0, ie the return self.fc_in(x) x = self.fc_in(x) x1 = self.nonlinearity_in(x) for i in range(len(self.fc_hidden)): x = self.fc_hidden[i](x1) x1 = self.nonlinearities_hidden[i](x) x = self.fc_out(x1) return x def forward_and_derivatives(self, x): # initialize the derivatives: f = self.fc_in.weight.unsqueeze(0).repeat(x.shape[0], 1, 1).transpose(2, 1).transpose(0, 1) # one for each element of the batch if not first_derivative_only: s = torch.zeros_like(f) if not hasattr(self, "fc_hidden"): # it means that hidden sizes was provided and the length of the list was 0, ie the net is a single layer. if first_derivative_only: return self.fc_in(x), f.transpose(0, 1) else: return self.fc_in(x), f.transpose(0, 1), s.transpose(0, 1) x = self.fc_in(x) x1 = self.nonlinearity_in(x) for i in range(len(self.fc_hidden)): z = x1.grad_fn(torch.ones_like(x1)) # here we repeat some computation from the above line # z = grad(x1, x, torch.ones_like(x1), create_graph=True)[0] # here we repeat some computation from the above line # you need to update first the second derivative, as you need the first derivative at previous layer if not first_derivative_only: s = z * s + grad(z, x, torch.ones_like(z), retain_graph=True)[0] * f ** 2 f = z * f f = F.linear(f, self.fc_hidden[i].weight) if not first_derivative_only: s = F.linear(s, self.fc_hidden[i].weight) x = self.fc_hidden[i](x1) x1 = self.nonlinearities_hidden[i](x) z = x1.grad_fn(torch.ones_like(x1)) # here we repeat some computation from the above line # z = grad(x1, x, torch.ones_like(x1), create_graph=True)[0] # here we repeat some computation from the above line # you need to update first the second derivative, as you need the first derivative at previous layer if not first_derivative_only: s = z * s + grad(z, x, torch.ones_like(z), retain_graph=True)[0] * f ** 2 f = z * f f = F.linear(f, self.fc_out.weight) if not first_derivative_only: s = F.linear(s, self.fc_out.weight) x = self.fc_out(x1) if first_derivative_only: return x, f.transpose(0, 1) else: return x, f.transpose(0, 1), s.transpose(0, 1) def forward_and_full_derivatives(self, x): """This computes jacobian and full Hessian matrix""" # initialize the derivatives (one for each element of the batch) f = self.fc_in.weight.unsqueeze(0).repeat(x.shape[0], 1, 1).transpose(2, 1).transpose(0, 1) H = torch.zeros((f.shape[0], *f.shape)).to(f) # hessian has an additional dimension wrt f if not hasattr(self, "fc_hidden"): # it means that hidden sizes was provided and the length of the list was 0, ie the net is a single layer return self.fc_in(x), f.transpose(0, 1), H.transpose(0, 2) x = self.fc_in(x) x1 = self.nonlinearity_in(x) for i in range(len(self.fc_hidden)): z = x1.grad_fn(torch.ones_like(x1)) # here we repeat some computation from the above line # print("H", H.shape, "z", z.shape, "z'", grad(z, x, torch.ones_like(z), retain_graph=True)[0].shape, "f", f.shape) # z = grad(x1, x, torch.ones_like(x1), create_graph=True)[0] # here we repeat some computation from the above line # you need to update first the second derivative, as you need the first derivative at previous layer H = z * H + grad(z, x, torch.ones_like(z), retain_graph=True)[0] * torch.einsum('ibo,jbo->ijbo', f, f) f = z * f f = F.linear(f, self.fc_hidden[i].weight) H = F.linear(H, self.fc_hidden[i].weight) x = self.fc_hidden[i](x1) x1 = self.nonlinearities_hidden[i](x) z = x1.grad_fn(torch.ones_like(x1)) # here we repeat some computation from the above line # z = grad(x1, x, torch.ones_like(x1), create_graph=True)[0] # here we repeat some computation from the above line # you need to update first the second derivative, as you need the first derivative at previous layer H = z * H + grad(z, x, torch.ones_like(z), retain_graph=True)[0] * torch.einsum('ibo,jbo->ijbo', f, f) f = z * f f = F.linear(f, self.fc_out.weight) H = F.linear(H, self.fc_out.weight) x = self.fc_out(x1) return x, f.transpose(0, 1), H.transpose(0, 2) return DefaultNNWithDerivatives
42.524691
137
0.597256
1,889
13,778
4.215458
0.126522
0.033907
0.030139
0.010172
0.774582
0.737787
0.730001
0.706392
0.692327
0.654276
0
0.016046
0.312455
13,778
323
138
42.656347
0.824554
0.337132
0
0.610169
0
0
0.018163
0
0
0
0
0
0
1
0.101695
false
0
0.022599
0.011299
0.271186
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7dced69d8bebc47fc9ea475e8d3e3c1535e3cff6
49
py
Python
gaia_deprojection/settings.py
Joshuaalbert/gaia_deprojection
6ded38150ecbb5205e13666730f0c3ea6c6f426f
[ "Apache-2.0" ]
null
null
null
gaia_deprojection/settings.py
Joshuaalbert/gaia_deprojection
6ded38150ecbb5205e13666730f0c3ea6c6f426f
[ "Apache-2.0" ]
8
2019-05-15T14:14:07.000Z
2020-03-31T03:13:12.000Z
gaia_deprojection/settings.py
Joshuaalbert/gaia_deprojection
6ded38150ecbb5205e13666730f0c3ea6c6f426f
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf float_type = tf.float64
12.25
23
0.795918
8
49
4.75
0.875
0
0
0
0
0
0
0
0
0
0
0.04878
0.163265
49
3
24
16.333333
0.878049
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
7de32c1fc2fa55df8f5989fc4304797021c476cb
117
py
Python
cmdline/nxseed.py
ZenosParadox/grtoolkit
2e34f151a78f57864e39e572c221ca4b73e48bb7
[ "MIT" ]
3
2020-02-02T14:33:30.000Z
2020-07-29T00:27:46.000Z
cmdline/nxseed.py
ZenosParadox/grtoolkit
2e34f151a78f57864e39e572c221ca4b73e48bb7
[ "MIT" ]
null
null
null
cmdline/nxseed.py
ZenosParadox/grtoolkit
2e34f151a78f57864e39e572c221ca4b73e48bb7
[ "MIT" ]
2
2020-02-02T14:33:32.000Z
2022-03-21T14:33:34.000Z
import os, shutil NX_SEED = os.environ["NX_SEED"] shutil.copy(NX_SEED,f"{os.getcwd()}\\{os.path.basename(NX_SEED)}")
29.25
66
0.717949
21
117
3.809524
0.52381
0.3
0
0
0
0
0
0
0
0
0
0
0.059829
117
3
67
39
0.727273
0
0
0
0
0
0.418803
0.358974
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8156b4fa42b4153cf8d08f1929a19910a28b7591
1,890
py
Python
poetry/mixology/incompatibility_cause.py
vanyakosmos/poetry
b218969107e49dc57e65dbc0d349e83cbe1f44a8
[ "MIT" ]
2
2019-06-19T15:07:58.000Z
2019-11-24T14:08:55.000Z
poetry/mixology/incompatibility_cause.py
vanyakosmos/poetry
b218969107e49dc57e65dbc0d349e83cbe1f44a8
[ "MIT" ]
18
2020-01-15T04:11:31.000Z
2020-06-30T13:24:27.000Z
poetry/mixology/incompatibility_cause.py
vanyakosmos/poetry
b218969107e49dc57e65dbc0d349e83cbe1f44a8
[ "MIT" ]
1
2022-03-09T02:36:31.000Z
2022-03-09T02:36:31.000Z
class IncompatibilityCause(Exception): """ The reason and Incompatibility's terms are incompatible. """ class RootCause(IncompatibilityCause): pass class NoVersionsCause(IncompatibilityCause): pass class DependencyCause(IncompatibilityCause): pass class ConflictCause(IncompatibilityCause): """ The incompatibility was derived from two existing incompatibilities during conflict resolution. """ def __init__(self, conflict, other): self._conflict = conflict self._other = other @property def conflict(self): return self._conflict @property def other(self): return self._other def __str__(self): return str(self._conflict) class PythonCause(IncompatibilityCause): """ The incompatibility represents a package's python constraint (Python versions) being incompatible with the current python version. """ def __init__(self, python_version, root_python_version): self._python_version = python_version self._root_python_version = root_python_version @property def python_version(self): return self._python_version @property def root_python_version(self): return self._root_python_version class PlatformCause(IncompatibilityCause): """ The incompatibility represents a package's platform constraint (OS most likely) being incompatible with the current platform. """ def __init__(self, platform): self._platform = platform @property def platform(self): return self._platform class PackageNotFoundCause(IncompatibilityCause): """ The incompatibility represents a package that couldn't be found by its source. """ def __init__(self, error): self._error = error @property def error(self): return self._error
21
74
0.692063
193
1,890
6.528497
0.305699
0.113492
0.066667
0.114286
0.274603
0.134921
0.090476
0
0
0
0
0
0.237566
1,890
89
75
21.235955
0.874393
0.258201
0
0.219512
0
0
0
0
0
0
0
0
0
1
0.268293
false
0.073171
0
0.170732
0.634146
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
817f6ce02bf7db428f6837ce9cea3e589c754577
4,251
py
Python
pyramid/tests/test_config/test_security.py
danielpronych/pyramid-doxygen
ad95a8c151c2c4e029e03aed2feda2993380f36f
[ "BSD-2-Clause" ]
null
null
null
pyramid/tests/test_config/test_security.py
danielpronych/pyramid-doxygen
ad95a8c151c2c4e029e03aed2feda2993380f36f
[ "BSD-2-Clause" ]
null
null
null
pyramid/tests/test_config/test_security.py
danielpronych/pyramid-doxygen
ad95a8c151c2c4e029e03aed2feda2993380f36f
[ "BSD-2-Clause" ]
null
null
null
import unittest from pyramid.exceptions import ConfigurationExecutionError from pyramid.exceptions import ConfigurationError class ConfiguratorSecurityMethodsTests(unittest.TestCase): def _makeOne(self, *arg, **kw): from pyramid.config import Configurator config = Configurator(*arg, **kw) return config def test_set_authentication_policy_no_authz_policy(self): config = self._makeOne() policy = object() config.set_authentication_policy(policy) self.assertRaises(ConfigurationExecutionError, config.commit) def test_set_authentication_policy_no_authz_policy_autocommit(self): config = self._makeOne(autocommit=True) policy = object() self.assertRaises(ConfigurationError, config.set_authentication_policy, policy) def test_set_authentication_policy_with_authz_policy(self): from pyramid.interfaces import IAuthenticationPolicy from pyramid.interfaces import IAuthorizationPolicy config = self._makeOne() authn_policy = object() authz_policy = object() config.registry.registerUtility(authz_policy, IAuthorizationPolicy) config.set_authentication_policy(authn_policy) config.commit() self.assertEqual( config.registry.getUtility(IAuthenticationPolicy), authn_policy) def test_set_authentication_policy_with_authz_policy_autocommit(self): from pyramid.interfaces import IAuthenticationPolicy from pyramid.interfaces import IAuthorizationPolicy config = self._makeOne(autocommit=True) authn_policy = object() authz_policy = object() config.registry.registerUtility(authz_policy, IAuthorizationPolicy) config.set_authentication_policy(authn_policy) config.commit() self.assertEqual( config.registry.getUtility(IAuthenticationPolicy), authn_policy) def test_set_authorization_policy_no_authn_policy(self): config = self._makeOne() policy = object() config.set_authorization_policy(policy) self.assertRaises(ConfigurationExecutionError, config.commit) def test_set_authorization_policy_no_authn_policy_autocommit(self): from pyramid.interfaces import IAuthorizationPolicy config = self._makeOne(autocommit=True) policy = object() config.set_authorization_policy(policy) self.assertEqual( config.registry.getUtility(IAuthorizationPolicy), policy) def test_set_authorization_policy_with_authn_policy(self): from pyramid.interfaces import IAuthorizationPolicy from pyramid.interfaces import IAuthenticationPolicy config = self._makeOne() authn_policy = object() authz_policy = object() config.registry.registerUtility(authn_policy, IAuthenticationPolicy) config.set_authorization_policy(authz_policy) config.commit() self.assertEqual( config.registry.getUtility(IAuthorizationPolicy), authz_policy) def test_set_authorization_policy_with_authn_policy_autocommit(self): from pyramid.interfaces import IAuthorizationPolicy from pyramid.interfaces import IAuthenticationPolicy config = self._makeOne(autocommit=True) authn_policy = object() authz_policy = object() config.registry.registerUtility(authn_policy, IAuthenticationPolicy) config.set_authorization_policy(authz_policy) self.assertEqual( config.registry.getUtility(IAuthorizationPolicy), authz_policy) def test_set_default_permission(self): from pyramid.interfaces import IDefaultPermission config = self._makeOne(autocommit=True) config.set_default_permission('view') self.assertEqual(config.registry.getUtility(IDefaultPermission), 'view') def test_add_permission(self): config = self._makeOne(autocommit=True) config.add_permission('perm') cat = config.registry.introspector.get_category('permissions') self.assertEqual(len(cat), 1) D = cat[0] intr = D['introspectable'] self.assertEqual(intr['value'], 'perm')
42.089109
76
0.717949
408
4,251
7.215686
0.139706
0.05231
0.057745
0.091712
0.815897
0.777514
0.74966
0.712976
0.647758
0.545516
0
0.000596
0.211009
4,251
100
77
42.51
0.877162
0
0
0.632184
0
0
0.010824
0
0
0
0
0
0.126437
1
0.126437
false
0
0.16092
0
0.310345
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
819164a852d324f884d11592b52ef8fb7b6894a4
160
py
Python
tests/test_user.py
ImageMarkup/isic-cli
2dd86f918443c69df601e560760d430b7f958095
[ "Apache-2.0" ]
null
null
null
tests/test_user.py
ImageMarkup/isic-cli
2dd86f918443c69df601e560760d430b7f958095
[ "Apache-2.0" ]
null
null
null
tests/test_user.py
ImageMarkup/isic-cli
2dd86f918443c69df601e560760d430b7f958095
[ "Apache-2.0" ]
null
null
null
def test_user_login_logged_in(cli_run, mock_user): result = cli_run(['user', 'login']) assert result.exit_code == 0 assert 'Hello' in result.output
32
50
0.70625
25
160
4.2
0.64
0.171429
0
0
0
0
0
0
0
0
0
0.007519
0.16875
160
4
51
40
0.781955
0
0
0
0
0
0.0875
0
0
0
0
0
0.5
1
0.25
false
0
0
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
81a478ff0e6a52980b35393cf99d493a7208a86a
154
py
Python
pyhatchbabyrest/__init__.py
southqaw/pyhatchbabyrest
9c8639b58081d75931650d0aa03e24a2e49c6c2b
[ "MIT" ]
12
2019-10-25T12:54:58.000Z
2021-12-29T04:17:15.000Z
pyhatchbabyrest/__init__.py
southqaw/pyhatchbabyrest
9c8639b58081d75931650d0aa03e24a2e49c6c2b
[ "MIT" ]
3
2019-10-24T21:13:12.000Z
2021-01-01T21:06:09.000Z
pyhatchbabyrest/__init__.py
southqaw/pyhatchbabyrest
9c8639b58081d75931650d0aa03e24a2e49c6c2b
[ "MIT" ]
7
2020-03-07T19:54:00.000Z
2021-11-09T16:38:39.000Z
from .pyhatchbabyrest import PyHatchBabyRest # noqa: F401 from .pyhatchbabyrestasync import PyHatchBabyRestAsync # noqa: F401 name = "pyhatchbabyrest"
30.8
68
0.811688
14
154
8.928571
0.5
0.128
0
0
0
0
0
0
0
0
0
0.044776
0.12987
154
4
69
38.5
0.88806
0.136364
0
0
0
0
0.115385
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
81d3bb2f2cfba41240caa16d074521d677b86d21
466
py
Python
amazon_problems/problem_13.py
loftwah/Daily-Coding-Problem
0327f0b4f69ef419436846c831110795c7a3c1fe
[ "MIT" ]
129
2018-10-14T17:52:29.000Z
2022-01-29T15:45:57.000Z
amazon_problems/problem_13.py
loftwah/Daily-Coding-Problem
0327f0b4f69ef419436846c831110795c7a3c1fe
[ "MIT" ]
2
2019-11-30T23:28:23.000Z
2020-01-03T16:30:32.000Z
amazon_problems/problem_13.py
loftwah/Daily-Coding-Problem
0327f0b4f69ef419436846c831110795c7a3c1fe
[ "MIT" ]
60
2019-02-21T09:18:31.000Z
2022-03-25T21:01:04.000Z
"""This problem was asked by Amazon. Given a pivot x, and a list lst, partition the list into three parts. • The first part contains all elements in lst that are less than x • The second part contains all elements in lst that are equal to x • The third part contains all elements in lst that are larger than x Ordering within a part can be arbitrary. For example, given x = 10 and lst = [9, 12, 3, 5, 14, 10, 10], one partition may be `[9, 3, 5, 10, 10, 12, 14]. """
58.25
111
0.716738
94
466
3.585106
0.521277
0.035608
0.133531
0.204748
0.311573
0.311573
0.311573
0.311573
0
0
0
0.064865
0.206009
466
8
112
58.25
0.837838
1.023605
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
c48c661a0331af894acc1afeaf6d49ee960f928a
921
py
Python
sample_project/sample_app/tasks.py
valyagolev/django-cloud-tasks
baacde0139ebe4cdc2e39dbe0963d8b7d5ca646a
[ "Apache-2.0" ]
null
null
null
sample_project/sample_app/tasks.py
valyagolev/django-cloud-tasks
baacde0139ebe4cdc2e39dbe0963d8b7d5ca646a
[ "Apache-2.0" ]
null
null
null
sample_project/sample_app/tasks.py
valyagolev/django-cloud-tasks
baacde0139ebe4cdc2e39dbe0963d8b7d5ca646a
[ "Apache-2.0" ]
null
null
null
from django_cloud_tasks.tasks import Task, PeriodicTask, SubscriberTask class BaseAbstractTask(Task): abstract = True def run(self, **kwargs): raise NotImplementedError() # TODO Allow inheriting from ABC class AnotherBaseAbstractTask(BaseAbstractTask): abstract = True def run(self, **kwargs): raise NotImplementedError() class CalculatePriceTask(Task): def run(self, price, quantity, discount): return price * quantity * (1 - discount) class FailMiserablyTask(AnotherBaseAbstractTask): only_once = True def run(self, magic_number): return magic_number / 0 class SaySomethingTask(PeriodicTask): run_every = '* * * * 1' def run(self): print("Hello!!") class PleaseNotifyMeTask(SubscriberTask): @property def topic_name(self): return 'potato' def run(self, message, attributes): return print(message)
20.931818
71
0.682953
94
921
6.617021
0.489362
0.057878
0.096463
0.067524
0.167203
0.167203
0.167203
0.167203
0
0
0
0.004196
0.22367
921
43
72
21.418605
0.865734
0.032573
0
0.230769
0
0
0.024747
0
0
0
0
0.023256
0
1
0.269231
false
0
0.038462
0.153846
0.846154
0.076923
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
c48d171c1d2624779ec47ea7fac90fbafd45283d
109
py
Python
complex-workflow/frontend/test_frontend.py
lbrack/testspace-experiments
c5a5e82361e99bd5207e885458de351826929615
[ "MIT" ]
null
null
null
complex-workflow/frontend/test_frontend.py
lbrack/testspace-experiments
c5a5e82361e99bd5207e885458de351826929615
[ "MIT" ]
null
null
null
complex-workflow/frontend/test_frontend.py
lbrack/testspace-experiments
c5a5e82361e99bd5207e885458de351826929615
[ "MIT" ]
null
null
null
import pytest @pytest.mark.parametrize(argnames="value", argvalues=range(20)) def test_font(value): pass
21.8
63
0.761468
15
109
5.466667
0.866667
0
0
0
0
0
0
0
0
0
0
0.020408
0.100917
109
5
64
21.8
0.816327
0
0
0
0
0
0.045455
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
c4b942bbe0cb7fc9827753377c8d4c6b315f8953
115
py
Python
2. funcoes/cateto_de_um_triangulo.py
andrebrito16/python-academy
544516048c0a2f8cea42ef0f252b9c40e8f5b141
[ "MIT" ]
1
2021-08-19T19:40:14.000Z
2021-08-19T19:40:14.000Z
2. funcoes/cateto_de_um_triangulo.py
andrebrito16/python-academy
544516048c0a2f8cea42ef0f252b9c40e8f5b141
[ "MIT" ]
null
null
null
2. funcoes/cateto_de_um_triangulo.py
andrebrito16/python-academy
544516048c0a2f8cea42ef0f252b9c40e8f5b141
[ "MIT" ]
null
null
null
from math import sqrt # h2 = c1**2 + c2**2 def encontra_cateto(c1, h): c2 = sqrt((h**2)-(c1**2)) return c2
19.166667
29
0.573913
22
115
2.954545
0.590909
0.092308
0
0
0
0
0
0
0
0
0
0.123596
0.226087
115
6
30
19.166667
0.606742
0.156522
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c4d7de2f36a0eedfe6c2b45de7cea74e4d902876
399
py
Python
src/python/WMComponent/DBS3Buffer/Oracle/ListAlgo.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
21
2015-11-19T16:18:45.000Z
2021-12-02T18:20:39.000Z
src/python/WMComponent/DBS3Buffer/Oracle/ListAlgo.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
5,671
2015-01-06T14:38:52.000Z
2022-03-31T22:11:14.000Z
src/python/WMComponent/DBS3Buffer/Oracle/ListAlgo.py
khurtado/WMCore
f74e252412e49189a92962945a94f93bec81cd1e
[ "Apache-2.0" ]
67
2015-01-21T15:55:38.000Z
2022-02-03T19:53:13.000Z
#!/usr/bin/env python """ _ListAlgo_ Oracle implementation of DBSBuffer.ListAlgo """ from WMComponent.DBS3Buffer.MySQL.ListAlgo import ListAlgo as MySQLListAlgo class ListAlgo(MySQLListAlgo): """ _ListAlgo_ Retrieve information about an algorithm from the DBSBuffer. This is mainly used by the unit tests to verify that the NewAlgo DAO is working correctly. """ pass
19
79
0.739348
49
399
5.938776
0.77551
0
0
0
0
0
0
0
0
0
0
0.003115
0.195489
399
20
80
19.95
0.903427
0.601504
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
c4e46d6c90f49293ba3dfc6cca8b658e901ed91f
77
py
Python
src/practice/exception_handling.py
Yasilagit/Python_Workspace
dc2274e685661e29e91b4f9f09cc9f228b17fe17
[ "MIT" ]
null
null
null
src/practice/exception_handling.py
Yasilagit/Python_Workspace
dc2274e685661e29e91b4f9f09cc9f228b17fe17
[ "MIT" ]
null
null
null
src/practice/exception_handling.py
Yasilagit/Python_Workspace
dc2274e685661e29e91b4f9f09cc9f228b17fe17
[ "MIT" ]
null
null
null
try: print(int(input())) except: print("Bad String")
9.625
24
0.467532
8
77
4.5
0.875
0
0
0
0
0
0
0
0
0
0
0
0.376623
77
8
25
9.625
0.75
0
0
0
0
0
0.140845
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
c4fd38a147a0db90c36e384360d7bffd9555daaf
193
py
Python
SSE/timer.py
BugliL/FlaskPymodbusPlayground
8470402131870ed0a65603c904aaa5cd815949dc
[ "MIT" ]
null
null
null
SSE/timer.py
BugliL/FlaskPymodbusPlayground
8470402131870ed0a65603c904aaa5cd815949dc
[ "MIT" ]
null
null
null
SSE/timer.py
BugliL/FlaskPymodbusPlayground
8470402131870ed0a65603c904aaa5cd815949dc
[ "MIT" ]
null
null
null
import time def printit(): def print_stream(): while True: time.sleep(.5) yield "Hello, World!" for x in print_stream(): print(x) printit()
12.866667
33
0.518135
23
193
4.26087
0.695652
0.22449
0
0
0
0
0
0
0
0
0
0.008197
0.367876
193
14
34
13.785714
0.795082
0
0
0
0
0
0.067358
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0
0.333333
0.555556
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
4
f20f49a9987ef140bc93ce7c6d23d3a43396c1b9
123
py
Python
appli/fourcheball_back_end/e_conf.py
kasshyss/fourcheball
12f0312eb32cc2fb247d8a5d8fb6b0b7ea195a32
[ "MIT" ]
null
null
null
appli/fourcheball_back_end/e_conf.py
kasshyss/fourcheball
12f0312eb32cc2fb247d8a5d8fb6b0b7ea195a32
[ "MIT" ]
null
null
null
appli/fourcheball_back_end/e_conf.py
kasshyss/fourcheball
12f0312eb32cc2fb247d8a5d8fb6b0b7ea195a32
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import logging from enum import Enum class logger_level(Enum): CURRENT_LEVEL = logging.DEBUG
13.666667
33
0.707317
17
123
5
0.705882
0
0
0
0
0
0
0
0
0
0
0.009901
0.178862
123
8
34
15.375
0.831683
0.170732
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f21b97cd95f597c4a75739b542ff177533de811b
1,373
py
Python
test.py
caibingcheng/cigam
4ec75e21f9db674613d071952e3b741ef61cdd7a
[ "MIT" ]
null
null
null
test.py
caibingcheng/cigam
4ec75e21f9db674613d071952e3b741ef61cdd7a
[ "MIT" ]
2
2017-12-28T03:09:56.000Z
2018-11-12T09:01:54.000Z
test.py
caibingcheng/cigam
4ec75e21f9db674613d071952e3b741ef61cdd7a
[ "MIT" ]
1
2018-08-29T14:37:52.000Z
2018-08-29T14:37:52.000Z
import os import unittest from cigam import Magic FILES_PATH = os.path.dirname(os.path.abspath(__file__)) + os.sep + 'files' + os.sep class TestMagic(unittest.TestCase): def test_apk(self): m = Magic(FILES_PATH + 'test.apk') self.assertEqual(m.get_type(), 'apk') def test_axml(self): m = Magic(FILES_PATH + 'test.axml') self.assertEqual(m.get_type(), 'axml') def test_arsc(self): m = Magic(FILES_PATH + 'test.arsc') self.assertEqual(m.get_type(), 'arsc') def test_elf(self): m = Magic(FILES_PATH + 'test.so') self.assertEqual(m.get_type(), 'elf') def test_dex(self): m = Magic(FILES_PATH + 'test.dex') self.assertEqual(m.get_type(), 'dex') def test_zip(self): m = Magic(FILES_PATH + 'test.zip') self.assertEqual(m.get_type(), 'zip') def test_tar(self): pass def test_png(self): m = Magic(FILES_PATH + 'test.png') self.assertEqual(m.get_type(), 'png') def test_gif(self): pass def test_ogg(self): pass def istext(self, data): m = Magic(FILES_PATH + 'test.txt') self.assertEqual(m.get_type(), 'txt') def test_none(self): m = Magic(FILES_PATH + 'test.none') self.assertEqual(m.get_type(), 'txt') if __name__ == '__main__': unittest.main()
23.672414
83
0.591406
190
1,373
4.052632
0.215789
0.1
0.181818
0.175325
0.54026
0.306494
0
0
0
0
0
0
0.256373
1,373
57
84
24.087719
0.754163
0
0
0.125
0
0
0.084487
0
0
0
0
0
0.225
1
0.3
false
0.075
0.075
0
0.4
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4