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
9caa0fd54e7a23e87ba07554ec5ec033eadd6428
118
py
Python
cafeteria/crawler/admin.py
devGW/cafeteria_back
fda99fbc838ee809b1ff28445d66cbd48e2b5016
[ "MIT" ]
null
null
null
cafeteria/crawler/admin.py
devGW/cafeteria_back
fda99fbc838ee809b1ff28445d66cbd48e2b5016
[ "MIT" ]
1
2019-11-13T09:06:20.000Z
2019-11-13T09:06:20.000Z
cafeteria/crawler/admin.py
devGW/PostApp
fda99fbc838ee809b1ff28445d66cbd48e2b5016
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import TuData # Register your models here. admin.site.register(TuData)
19.666667
32
0.805085
17
118
5.588235
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.127119
118
5
33
23.6
0.92233
0.220339
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
9cac04225d2b8a58ace07727647baa7102678886
292
py
Python
app/dashboard/admin.py
gibran-abdillah/quiz-app
6a346c87c5cc258aa42f8805f226b1119fbf60e6
[ "Apache-2.0" ]
10
2021-12-24T09:02:00.000Z
2022-02-08T06:54:45.000Z
app/dashboard/admin.py
gibran-abdillah/quiz-app
6a346c87c5cc258aa42f8805f226b1119fbf60e6
[ "Apache-2.0" ]
null
null
null
app/dashboard/admin.py
gibran-abdillah/quiz-app
6a346c87c5cc258aa42f8805f226b1119fbf60e6
[ "Apache-2.0" ]
null
null
null
from app.dashboard import dashboard_blueprint as dashboard from flask import render_template, redirect from app.modules.decorators import admin_required @dashboard.route('/manage-users') @admin_required def manage_users(): return render_template('dashboard/admin/manage-users.html')
24.333333
63
0.815068
38
292
6.105263
0.526316
0.142241
0
0
0
0
0
0
0
0
0
0
0.10274
292
11
64
26.545455
0.885496
0
0
0
0
0
0.158621
0.113793
0
0
0
0
0
1
0.142857
true
0
0.428571
0.142857
0.714286
0.142857
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
0
1
1
1
0
0
4
9cadf18c4cd161f610c46102f4a13ad15e96d5c9
212
py
Python
tests/test_color_system.py
RCJacH/color_systems
08dd89de69cb53de661aa3881255ae595598b61f
[ "MIT" ]
null
null
null
tests/test_color_system.py
RCJacH/color_systems
08dd89de69cb53de661aa3881255ae595598b61f
[ "MIT" ]
null
null
null
tests/test_color_system.py
RCJacH/color_systems
08dd89de69cb53de661aa3881255ae595598b61f
[ "MIT" ]
null
null
null
from color_systems.version import pkg_name, pkg_version def test_call_color_system_version(): """Checks that module is registered and visible in the meta data.""" assert pkg_name assert pkg_version
26.5
72
0.773585
32
212
4.84375
0.71875
0.090323
0
0
0
0
0
0
0
0
0
0
0.169811
212
7
73
30.285714
0.880682
0.292453
0
0
0
0
0
0
0
0
0
0
0.5
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
0
1
0
1
1
0
0
0
0
0
0
4
9cde7b6533cf97a52e2261c82dddc3eff8cc51fa
1,477
py
Python
silp/language.py
yjpark/silp
a5b8ef79c0c38848f6c9d6f94d5267101a15d3ba
[ "MIT" ]
3
2015-11-07T11:41:38.000Z
2015-11-27T04:51:59.000Z
silp/language.py
yjpark/silp
a5b8ef79c0c38848f6c9d6f94d5267101a15d3ba
[ "MIT" ]
3
2016-05-16T03:11:54.000Z
2018-11-02T03:08:24.000Z
silp/language.py
yjpark/silp
a5b8ef79c0c38848f6c9d6f94d5267101a15d3ba
[ "MIT" ]
1
2018-11-01T04:30:06.000Z
2018-11-01T04:30:06.000Z
class Language: def __init__(self, name, extension, macro_prefix, generated_suffix, columns): self.name = name self.extension = extension self.macro_prefix = macro_prefix self.generated_suffix = generated_suffix self.columns = columns languages = [ Language('Python', '.py', '#SILP:', '#__SILP__\n', 80), Language('F#', '.fs', '//SILP:', '//__SILP__\n', 80), Language('C#', '.cs', '//SILP:', '//__SILP__\n', 80), Language('Go', '.go', '//SILP:', '//__SILP__\n', 80), Language('Freshrc', '.freshrc', '#SILP:', '#__SILP__\n', 80), Language('YML', '.yml', '#SILP:', '#__SILP__\n', 80), Language('Swift', '.swift', '//SILP:', '//__SILP__\n', 80), Language('Objective-C', '.m', '//SILP:', '//__SILP__\n', 80), Language('Objective-C++', '.mm', '//SILP:', '//__SILP__\n', 80), Language('Moonscript', '.moon', '--SILP:', '--__SILP__\n', 80), Language('Lua', '.lua', '--SILP:', '--__SILP__\n', 80), Language('Erlang', '.erl', '%SILP:', '%__SILP__\n', 80), Language('Erlang Include', '.hrl', '%SILP:', '%__SILP__\n', 80), Language('SQL', '.sql', '-- SILP:', '/*__SILP__*/\n', 80), Language('CS Proj', '.csproj', '<!--SILP:', '<!--__SILP__-->\n', 80), Language('Proj Items', '.projitems', '<!--SILP:', '<!--__SILP__-->\n', 80), Language('Shader', '.shader', '//SILP:', '//__SILP__\n', 80), Language('TypeScript', '.ts', '//SILP:', '//__SILP__\n', 80), ]
49.233333
79
0.535545
163
1,477
4.349693
0.269939
0.203103
0.228491
0.279267
0.500705
0.152327
0.081805
0
0
0
0
0.029484
0.173324
1,477
29
80
50.931034
0.551188
0
0
0
1
0
0.373731
0
0
0
0
0
0
1
0.035714
false
0
0
0
0.071429
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
141e5bed6a2d9acb61407c73bb9d1e07e221afa7
120
py
Python
delta_node/utils/__init__.py
delta-mpc/delta-node
674fc61f951e41ed353597f93ca6ea6bc74a102b
[ "Apache-2.0" ]
4
2021-07-22T01:11:15.000Z
2022-03-17T03:26:20.000Z
delta_node/utils/__init__.py
delta-mpc/delta-node
674fc61f951e41ed353597f93ca6ea6bc74a102b
[ "Apache-2.0" ]
10
2021-09-13T09:55:02.000Z
2022-03-23T09:41:26.000Z
delta_node/utils/__init__.py
delta-mpc/delta-node
674fc61f951e41ed353597f93ca6ea6bc74a102b
[ "Apache-2.0" ]
null
null
null
from .arr import make_mask from .precision import fix_precision, unfix_precision from .commitment import calc_commitment
40
53
0.866667
17
120
5.882353
0.588235
0
0
0
0
0
0
0
0
0
0
0
0.1
120
3
54
40
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
1453a426e851b72a4844eed7230b164334c62ea5
620
py
Python
thinkpython_allen_downey/exercise_6_2.py
alirkaya/programming-textbook-solutions
7362dce474b8a881d654f95604e09d1d0e76aec2
[ "MIT" ]
null
null
null
thinkpython_allen_downey/exercise_6_2.py
alirkaya/programming-textbook-solutions
7362dce474b8a881d654f95604e09d1d0e76aec2
[ "MIT" ]
null
null
null
thinkpython_allen_downey/exercise_6_2.py
alirkaya/programming-textbook-solutions
7362dce474b8a881d654f95604e09d1d0e76aec2
[ "MIT" ]
null
null
null
# def hypotenuse(x, y): # return 0.0 # # print(hypotenuse(3, 4)) # # def hypotenuse(x, y): # square_x = x**2 # square_y = y**2 # print('square_x is', square_x) # print('square_y is', square_y) # return 0.0 # # print(hypotenuse(3, 4)) # # def hypotenuse(x, y): # from math import sqrt # square_x = x**2 # square_y = y**2 # h_square = square_x + square_y # print('hypotenuse square is', h_square) # result = sqrt(h_square) # return result # # print(hypotenuse(3, 4)) def hypotenuse(x, y): from math import sqrt return sqrt(x**2 + y**2) print(hypotenuse(3, 4))
20
45
0.58871
98
620
3.591837
0.183673
0.213068
0.159091
0.170455
0.528409
0.528409
0.528409
0.528409
0.426136
0.426136
0
0.038627
0.248387
620
30
46
20.666667
0.716738
0.754839
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0.25
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
1
0
0
0
0
1
0
0
4
145d67c1062b2d2eb704855f18f8404f92b94aba
34
py
Python
diofant/tests/vector/__init__.py
project-kotinos/diofant___diofant
882549ac3a4dac238695aa620c02fce6ca33f9d3
[ "BSD-3-Clause" ]
57
2016-09-13T23:16:26.000Z
2022-03-29T06:45:51.000Z
diofant/tests/vector/__init__.py
project-kotinos/diofant___diofant
882549ac3a4dac238695aa620c02fce6ca33f9d3
[ "BSD-3-Clause" ]
402
2016-05-11T11:11:47.000Z
2022-03-31T14:27:02.000Z
diofant/tests/vector/__init__.py
project-kotinos/diofant___diofant
882549ac3a4dac238695aa620c02fce6ca33f9d3
[ "BSD-3-Clause" ]
20
2016-05-11T08:17:37.000Z
2021-09-10T09:15:51.000Z
""" Tests for vector package. """
8.5
25
0.617647
4
34
5.25
1
0
0
0
0
0
0
0
0
0
0
0
0.176471
34
3
26
11.333333
0.75
0.735294
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
1473c3d572ed3e143d7a37f033373d63f7bd56d8
336
py
Python
vi/vi/csp/network.py
pveierland/permve-ntnu-it3105
6a7e4751de47b091c1c9c59560c19a8452698d81
[ "CC0-1.0" ]
null
null
null
vi/vi/csp/network.py
pveierland/permve-ntnu-it3105
6a7e4751de47b091c1c9c59560c19a8452698d81
[ "CC0-1.0" ]
null
null
null
vi/vi/csp/network.py
pveierland/permve-ntnu-it3105
6a7e4751de47b091c1c9c59560c19a8452698d81
[ "CC0-1.0" ]
null
null
null
class Network(object): def __init__(self, variables, domains, constraints): self.variables = variables self.domains = domains self.constraints = constraints def copy(self): return Network(self.variables, self.domains.copy(), self.constraints)
30.545455
56
0.574405
30
336
6.3
0.366667
0.206349
0.21164
0
0
0
0
0
0
0
0
0
0.342262
336
10
57
33.6
0.855204
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0
0.111111
0.444444
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
1
0
0
0
4
147b1e1f8e5439f593729a075e4175124ed30b26
94
py
Python
nyoka/PMML44/behaviors/setNeuralOutput.py
maxibor/nyoka
19f480eee608035aa5fba368c96d4143bc2f5710
[ "Apache-2.0" ]
71
2020-08-24T07:59:56.000Z
2022-03-21T08:36:35.000Z
nyoka/PMML43Ext/behaviors/setNeuralOutput.py
Chiragasourabh/nyoka
44003b5dc500b18d3a2b2c6ed6fc4db217e2d2c0
[ "Apache-2.0" ]
16
2020-09-02T10:27:36.000Z
2022-03-31T05:37:12.000Z
nyoka/PMML43Ext/behaviors/setNeuralOutput.py
Chiragasourabh/nyoka
44003b5dc500b18d3a2b2c6ed6fc4db217e2d2c0
[ "Apache-2.0" ]
16
2020-09-17T15:01:33.000Z
2022-03-28T03:13:25.000Z
self.NeuralOutput = NeuralOutput self.numberOfOutputs = len(self.NeuralOutput)
47
53
0.702128
8
94
8.25
0.5
0.484848
0
0
0
0
0
0
0
0
0
0
0.223404
94
2
53
47
0.90411
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
147eb88a480acd5f4ec2ba3122ec1d65bd6402ec
201
py
Python
main/scan.py
tqqq/genshin_dps_calculater
f3022d45fd9b24d1745d0551e1b2c4799cac63cf
[ "MIT" ]
null
null
null
main/scan.py
tqqq/genshin_dps_calculater
f3022d45fd9b24d1745d0551e1b2c4799cac63cf
[ "MIT" ]
null
null
null
main/scan.py
tqqq/genshin_dps_calculater
f3022d45fd9b24d1745d0551e1b2c4799cac63cf
[ "MIT" ]
null
null
null
# coding=utf-8 import json from main.const import ARTIFACTS_DATA def scan_artifacts(): artifacts_data = json.loads(open(ARTIFACTS_DATA, 'r', encoding='utf-8').read()) return artifacts_data
18.272727
83
0.736318
29
201
4.931034
0.62069
0.363636
0
0
0
0
0
0
0
0
0
0.011628
0.144279
201
10
84
20.1
0.819767
0.059701
0
0
0
0
0.032086
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
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
0
0
0
1
0
1
0
0
4
14b282c7027cf8023829d7c7abadfa1c4b327b08
466
py
Python
common/module_base.py
Legion-Engine/Hivemind
6511aba3a421ef06208aaf956ab06c81214f3c13
[ "MIT" ]
null
null
null
common/module_base.py
Legion-Engine/Hivemind
6511aba3a421ef06208aaf956ab06c81214f3c13
[ "MIT" ]
null
null
null
common/module_base.py
Legion-Engine/Hivemind
6511aba3a421ef06208aaf956ab06c81214f3c13
[ "MIT" ]
null
null
null
import abc from typing import NoReturn, List, Union from common.session_base import SessionBase # a module should always declare the messages it is interested in and a function to handle that message class ModuleBase(metaclass=abc.ABCMeta): def __init__(self, interests: List[Union[str, type]]): self.interests = interests @abc.abstractmethod def handle(self, message_name: str, message_value, session: SessionBase) -> NoReturn: pass
31.066667
103
0.748927
62
466
5.516129
0.677419
0.052632
0
0
0
0
0
0
0
0
0
0
0.180258
466
14
104
33.285714
0.895288
0.216738
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0.111111
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
1
0
1
1
0
1
0
0
4
1ad1f2bf6292f8ac236f0faef1ca23bcec255386
137
py
Python
respostas/ex4.py
diogocezar/dctb-python-course-utfpr
2d56f6566ecba3b3755f13aa9e408e130877c353
[ "Apache-2.0" ]
null
null
null
respostas/ex4.py
diogocezar/dctb-python-course-utfpr
2d56f6566ecba3b3755f13aa9e408e130877c353
[ "Apache-2.0" ]
null
null
null
respostas/ex4.py
diogocezar/dctb-python-course-utfpr
2d56f6566ecba3b3755f13aa9e408e130877c353
[ "Apache-2.0" ]
null
null
null
num1 = int(input("Me de um número ae meu chapa\n")) num2 = int(input("Me de outro número ae meu chapa\n")) print('Soma: ', num1 + num2)
27.4
54
0.656934
26
137
3.461538
0.576923
0.177778
0.222222
0.266667
0.377778
0
0
0
0
0
0
0.035398
0.175182
137
4
55
34.25
0.761062
0
0
0
0
0
0.50365
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
1ad7c093a32cf4788581660c8715bd120e346afd
130
py
Python
ticketr/apps.py
mark-barrett/Ticketr
07106db61a7a2a222bf2fdcbdb3718eff577bfc0
[ "MIT" ]
2
2017-09-27T08:56:34.000Z
2019-12-02T01:10:00.000Z
ticketr/apps.py
mark-barrett/Ticketr
07106db61a7a2a222bf2fdcbdb3718eff577bfc0
[ "MIT" ]
null
null
null
ticketr/apps.py
mark-barrett/Ticketr
07106db61a7a2a222bf2fdcbdb3718eff577bfc0
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class TicketrConfig(AppConfig): name = 'ticketr'
16.25
39
0.792308
15
130
6.533333
0.8
0
0
0
0
0
0
0
0
0
0
0
0.153846
130
7
40
18.571429
0.890909
0
0
0
0
0
0.053846
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
1ae0758545620bdfe088dc85e46b0076d610a0e8
152
py
Python
pytorch_bolt/loggers/__init__.py
yzhang-dev/PyTorch-Bolt
991fee41b58618656342a579319786ee5c57e717
[ "MIT" ]
null
null
null
pytorch_bolt/loggers/__init__.py
yzhang-dev/PyTorch-Bolt
991fee41b58618656342a579319786ee5c57e717
[ "MIT" ]
null
null
null
pytorch_bolt/loggers/__init__.py
yzhang-dev/PyTorch-Bolt
991fee41b58618656342a579319786ee5c57e717
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from .base_loggers import BaseLoggers from .loggers import Loggers __all__ = ('BaseLoggers', 'Loggers')
19
37
0.703947
19
152
5.368421
0.684211
0.254902
0
0
0
0
0
0
0
0
0
0.007634
0.138158
152
7
38
21.714286
0.770992
0.276316
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
1af97ac3d8de4ab8aa1cba40e6d9eac1bc7ef9bc
336
py
Python
python/hmap/CheckIfTheSentenceIsPangram.py
zihengCat/leetcode-collections
e94d6ee7d17cc72c8f34162d60e8d869164cbd53
[ "MIT" ]
4
2021-12-08T15:36:36.000Z
2022-03-23T12:21:06.000Z
python/hmap/CheckIfTheSentenceIsPangram.py
zihengCat/leetcode-collections
e94d6ee7d17cc72c8f34162d60e8d869164cbd53
[ "MIT" ]
null
null
null
python/hmap/CheckIfTheSentenceIsPangram.py
zihengCat/leetcode-collections
e94d6ee7d17cc72c8f34162d60e8d869164cbd53
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # LeetCode 1832. Check if the Sentence Is Pangram # https://leetcode.com/problems/check-if-the-sentence-is-pangram/ class CheckIfTheSentenceIsPangram: def checkIfPangram(self, sentence: str) -> bool: return len(set(sentence)) == 26 if __name__ == "__main__": pass # EOF
22.4
65
0.684524
43
336
5.162791
0.767442
0.063063
0.09009
0.162162
0.243243
0.243243
0
0
0
0
0
0.02509
0.169643
336
14
66
24
0.770609
0.470238
0
0
0
0
0.046243
0
0
0
0
0
0
1
0.2
false
0.2
0
0.2
0.6
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
0
0
1
0
1
1
0
0
4
212a949102ffabe728f78e4e54558684ba3294c5
80
py
Python
kneed/__init__.py
kev494/kneed
4e898c072ce0c6ce7da6f14151a05fb6e0130bc8
[ "BSD-3-Clause" ]
null
null
null
kneed/__init__.py
kev494/kneed
4e898c072ce0c6ce7da6f14151a05fb6e0130bc8
[ "BSD-3-Clause" ]
null
null
null
kneed/__init__.py
kev494/kneed
4e898c072ce0c6ce7da6f14151a05fb6e0130bc8
[ "BSD-3-Clause" ]
null
null
null
from .data_generator import DataGenerator from .knee_locator import KneeLocator
26.666667
41
0.875
10
80
6.8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.1
80
2
42
40
0.944444
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
0d377bf26299e22b25e681a58f1c856f16d84778
574
py
Python
mod02-joker/initial_code.py
eKids-Garage/boost_your_python_chatbot
1bb26c4be2853419ba71ac00b968329e3675ddd2
[ "MIT" ]
null
null
null
mod02-joker/initial_code.py
eKids-Garage/boost_your_python_chatbot
1bb26c4be2853419ba71ac00b968329e3675ddd2
[ "MIT" ]
null
null
null
mod02-joker/initial_code.py
eKids-Garage/boost_your_python_chatbot
1bb26c4be2853419ba71ac00b968329e3675ddd2
[ "MIT" ]
null
null
null
#func What we should get after the Module 1 chatbot_name = "Garik" user_name = input("Hello! What's you name? ") #1 phrase = input(chatbot_name + ": What do you think? ") print("Yes, " + user_name + ", " + phrase) #2 phrase = input(chatbot_name + ": What do you think? ") print("Yes, " + user_name + ", " + phrase) #3 phrase = input(chatbot_name + ": What do you think? ") print("Yes, " + user_name + ", " + phrase) #4 phrase = input(chatbot_name + ": What do you think? ") print("Yes, " + user_name + ", " + phrase) # ... and so on and so forth
24.956522
55
0.597561
82
574
4.060976
0.353659
0.165165
0.216216
0.264264
0.696697
0.696697
0.696697
0.696697
0.696697
0.696697
0
0.01139
0.235192
574
22
56
26.090909
0.747153
0.127178
0
0.8
0
0
0.298097
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b4adb59a9ae713bbb64d4092ba16d2efc7eef5ac
182
py
Python
dreamgadgetmail/models.py
dreamplatform/dream-gadget-mail
e36f26ac6c2b60f9061a271afb1e361e8a5a395b
[ "BSD-3-Clause" ]
null
null
null
dreamgadgetmail/models.py
dreamplatform/dream-gadget-mail
e36f26ac6c2b60f9061a271afb1e361e8a5a395b
[ "BSD-3-Clause" ]
null
null
null
dreamgadgetmail/models.py
dreamplatform/dream-gadget-mail
e36f26ac6c2b60f9061a271afb1e361e8a5a395b
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.models import User from django.db import models class Auth(models.Model): token = models.CharField(max_length=100) user = models.ForeignKey(User)
26
44
0.758242
26
182
5.269231
0.615385
0.145985
0
0
0
0
0
0
0
0
0
0.019355
0.148352
182
7
45
26
0.864516
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
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
b4fdf9aad4a3c45e7289cadd2781d69e865b78b7
118
py
Python
python/code_troopers/model/PlayerContext.py
tigeral/polygon
bd87c0533b82980ab44f17d2f62b9b1ab55f5eb3
[ "Unlicense" ]
null
null
null
python/code_troopers/model/PlayerContext.py
tigeral/polygon
bd87c0533b82980ab44f17d2f62b9b1ab55f5eb3
[ "Unlicense" ]
null
null
null
python/code_troopers/model/PlayerContext.py
tigeral/polygon
bd87c0533b82980ab44f17d2f62b9b1ab55f5eb3
[ "Unlicense" ]
null
null
null
class PlayerContext: def __init__(self, trooper, world): self.trooper = trooper self.world = world
29.5
39
0.652542
13
118
5.615385
0.538462
0.30137
0
0
0
0
0
0
0
0
0
0
0.262712
118
4
40
29.5
0.83908
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
370b8a62daa8adf88ddf40d72112de3eeaf563fc
114
py
Python
src/Role/Domain/Exceptions/RoleDisabledException.py
DigiChanges/python-experience
3332d2c4d922a5eb302fa151582a4f63c668a570
[ "MIT" ]
null
null
null
src/Role/Domain/Exceptions/RoleDisabledException.py
DigiChanges/python-experience
3332d2c4d922a5eb302fa151582a4f63c668a570
[ "MIT" ]
null
null
null
src/Role/Domain/Exceptions/RoleDisabledException.py
DigiChanges/python-experience
3332d2c4d922a5eb302fa151582a4f63c668a570
[ "MIT" ]
null
null
null
class RoleDisabledException(Exception): def __init__(self): self.name = "Your role is disable."
19
43
0.657895
12
114
5.916667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.245614
114
5
44
22.8
0.825581
0
0
0
0
0
0.185841
0
0
0
0
0
0
1
0.333333
false
0
0
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
1
0
0
0
0
1
0
0
4
2ea3a3c61e04749847689d653d529255df43ca3a
153
py
Python
List-1/first_last6.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
List-1/first_last6.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
List-1/first_last6.py
VivekM27/Coding-Bat-Python-Solutions
14d5c6ccaa2129e56a5898374dec60740fe6761b
[ "Apache-2.0" ]
null
null
null
# FIRST_LAST6 def first_last6(nums): if (len(nums) == 1 and nums == 6) or (nums[0] == 6 or nums[len(nums)-1] == 6): return True else: return False
38.25
93
0.620915
28
153
3.321429
0.535714
0.215054
0.172043
0
0
0
0
0
0
0
0
0.065574
0.202614
153
4
94
38.25
0.696721
0.071895
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
1
0
0
0
0
0
0
0
4
2ea790a4de443d073373bf8b88c05eecbb8a5488
3,627
py
Python
test_product_page.py
DedMazzai/stepic_test_project
f5dc9e71c9f18b48edf017cbfde86ada888482e2
[ "Apache-2.0" ]
null
null
null
test_product_page.py
DedMazzai/stepic_test_project
f5dc9e71c9f18b48edf017cbfde86ada888482e2
[ "Apache-2.0" ]
null
null
null
test_product_page.py
DedMazzai/stepic_test_project
f5dc9e71c9f18b48edf017cbfde86ada888482e2
[ "Apache-2.0" ]
null
null
null
import pytest from .pages.product_page import ProductPage from .pages.basket_page import BasketPage from .pages.login_page import LoginPage @pytest.mark.login_guest class TestUserAddToBasketFromProductPage: @pytest.fixture(scope="function", autouse=True) def setup(self, browser): link = "http://selenium1py.pythonanywhere.com/en-gb/accounts/login" page = LoginPage(browser, link) page.open() page.register_new_user() page.should_be_authorized_user() @pytest.mark.need_review def test_user_can_add_product_to_basket(self, browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/" product_page = ProductPage(browser, link) product_page.open() product_page.should_be_button_add_to_basket() product_page.click_button_add_to_basket() product_page.should_be_alert_about_adding_product_to_basket() product_page.should_be_product_name_in_alert_match_product_name() product_page.shold_be_alert_with_cost_basket() product_page.should_be_cost_product_in_alert_with_cost_basket() def test_user_cant_see_success_message(self, browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207" product_page = ProductPage(browser, link) product_page.open() product_page.should_not_be_success_message() @pytest.mark.xfail def test_guest_cant_see_success_message_after_adding_product_to_basket(browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207" product_page = ProductPage(browser, link) product_page.open() product_page.click_button_add_to_basket() product_page.should_not_be_success_message() @pytest.mark.xfail def test_message_disappeared_after_adding_product_to_basket(browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207" product_page = ProductPage(browser, link) product_page.open() product_page.click_button_add_to_basket() product_page.should_dissapear_of_success_message() def test_guest_should_see_login_link_on_product_page(browser): link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/" page = ProductPage(browser, link) page.open() page.should_be_login_link() @pytest.mark.need_review def test_guest_can_go_to_login_page_from_product_page(browser): link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/" page = ProductPage(browser, link) page.open() page.go_to_login_page() @pytest.mark.need_review def test_guest_cant_see_product_in_basket_opened_from_product_page(browser): link = "http://selenium1py.pythonanywhere.com/en-gb/catalogue/the-city-and-the-stars_95/" page = ProductPage(browser, link) page.open() page.go_to_basket_page() basket_page = BasketPage(browser, browser.current_url) basket_page.should_not_be_product_in_basket() basket_page.should_be_text_about_empty_basket() @pytest.mark.need_review def test_guest_can_add_product_to_basket(browser): link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/" product_page = ProductPage(browser, link) product_page.open() product_page.should_be_button_add_to_basket() product_page.click_button_add_to_basket() product_page.should_be_alert_about_adding_product_to_basket() product_page.should_be_product_name_in_alert_match_product_name() product_page.shold_be_alert_with_cost_basket() product_page.should_be_cost_product_in_alert_with_cost_basket()
39.857143
93
0.781086
502
3,627
5.193227
0.165339
0.130802
0.050633
0.089758
0.769467
0.74415
0.733794
0.719985
0.675105
0.675105
0
0.009479
0.127378
3,627
90
94
40.3
0.814218
0
0
0.635135
0
0.040541
0.175903
0
0
0
0
0
0
1
0.121622
false
0
0.054054
0
0.189189
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
2ed4cd7ab495eadbc11ec0aa45c83123036d6617
1,445
py
Python
busy/tasks.py
lcarsos/busy
1bc3121547f3dfbcfeecbd19d5f27026dcee0b30
[ "MIT" ]
null
null
null
busy/tasks.py
lcarsos/busy
1bc3121547f3dfbcfeecbd19d5f27026dcee0b30
[ "MIT" ]
null
null
null
busy/tasks.py
lcarsos/busy
1bc3121547f3dfbcfeecbd19d5f27026dcee0b30
[ "MIT" ]
null
null
null
"""A Task is a unit of organization in Busy""" def create_task(): pass class Task: """ A Task keeps track of a thing that has to get done. "Things" are very complex, Busy calls them tasks. Some Tasks cannot be started until other Tasks are completed, that task is "waiting on" those other tasks, some would call it "blocked". Some Tasks cannot be completed until other tasks are completed, those are children tasks. They come up when you put something on your todo list and realize there are several steps to getting that "one" task done, and you need/want to track that. """ def __init__(self, id): self._id = id def created(self): pass def started(self): pass def completed(self): pass def name(self): pass def description(self): pass def tags(self): pass def expected_time(self): pass def remaining_time(self): pass def story_points(self): pass def is_complete(self): pass # Tasks related to this Task def waiting_on(self): pass def blocking(self): pass def parents(self): pass def children(self): pass # Work done for this task def timers(self): """Timers directly related to this task""" pass def all_timers(self): """Include timers on children""" pass
20.352113
78
0.60692
199
1,445
4.346734
0.422111
0.12948
0.152601
0.039306
0.062428
0
0
0
0
0
0
0
0.321799
1,445
70
79
20.642857
0.882653
0.443599
0
0.459459
0
0
0
0
0
0
0
0.014286
0
1
0.486486
false
0.459459
0
0
0.513514
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
1
0
0
1
0
0
4
2ee60812ab43328b2b52a2436a98885a0c4d3b5a
89
py
Python
src/starfish/core/__init__.py
autognc/starfish
881c7593eb11efc93d0fca9ea6213628d4a1905f
[ "MIT" ]
10
2020-04-09T21:35:08.000Z
2022-02-14T05:24:30.000Z
src/starfish/core/__init__.py
autognc/synthetic-spacecraft-imagery
881c7593eb11efc93d0fca9ea6213628d4a1905f
[ "MIT" ]
5
2020-04-19T06:41:47.000Z
2021-02-12T12:10:59.000Z
src/starfish/core/__init__.py
autognc/synthetic-spacecraft-imagery
881c7593eb11efc93d0fca9ea6213628d4a1905f
[ "MIT" ]
1
2022-03-20T08:18:46.000Z
2022-03-20T08:18:46.000Z
from .frame import Frame from .sequence import Sequence __all__ = ['Frame', 'Sequence']
17.8
31
0.741573
11
89
5.636364
0.454545
0
0
0
0
0
0
0
0
0
0
0
0.146067
89
4
32
22.25
0.815789
0
0
0
0
0
0.146067
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
2ee8036b72c7c576f68c7a5dce2301b5161de72e
213
py
Python
datawinners/main/management/commands/crs_test_data.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
1
2015-11-02T09:11:12.000Z
2015-11-02T09:11:12.000Z
datawinners/main/management/commands/crs_test_data.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
datawinners/main/management/commands/crs_test_data.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
from django.core.management.base import BaseCommand from datawinners.custom_reports.crs.test_data import create_one_set class Command(BaseCommand): def handle(self, *args, **options): create_one_set()
35.5
67
0.784038
29
213
5.551724
0.793103
0.111801
0.149068
0
0
0
0
0
0
0
0
0
0.126761
213
6
68
35.5
0.865591
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
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
25810ab9ab20ad36f72ba20b31768341e78e2676
116
py
Python
fengshen/data/task_dataloader/__init__.py
dumpmemory/Fengshenbang-LM
475790c2a1d9f087c8a0922c726965d635b56faa
[ "Apache-2.0" ]
265
2021-11-22T11:32:24.000Z
2022-03-31T06:42:21.000Z
fengshen/data/task_dataloader/__init__.py
dumpmemory/Fengshenbang-LM
475790c2a1d9f087c8a0922c726965d635b56faa
[ "Apache-2.0" ]
22
2021-11-30T12:20:29.000Z
2022-03-06T09:04:32.000Z
fengshen/data/task_dataloader/__init__.py
dumpmemory/Fengshenbang-LM
475790c2a1d9f087c8a0922c726965d635b56faa
[ "Apache-2.0" ]
17
2021-11-22T11:39:22.000Z
2022-03-19T18:48:07.000Z
# coding=utf-8 from .task_datasets import LCSTSDataModel, LCSTSDataset __all__ = ['LCSTSDataModel', 'LCSTSDataset']
29
55
0.793103
12
116
7.25
0.833333
0.597701
0
0
0
0
0
0
0
0
0
0.009524
0.094828
116
3
56
38.666667
0.819048
0.103448
0
0
0
0
0.254902
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
2599e8c042f3c930afe56515c86de26a0c27c497
788
py
Python
cowsay/lib/cows/wizard.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
cowsay/lib/cows/wizard.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
cowsay/lib/cows/wizard.py
Ovlic/cowsay_py
1ee8d11d6d895d7695d57e26003d71ce18379d3b
[ "MIT" ]
null
null
null
def Wizard(thoughts, eyes, eye, tongue): return f""" {thoughts} {thoughts} _____ .\'* *.\' ___/_*_(_ / _______ \\ _\\_)/___\\(_/_ / _((\\- -/))_ \\ \\ \\())(-)(()/ / ' \\(((()))/ \' / \' \\)).))\\ \' \\ / _ \\ - | - /_ \\ ( ( .;\'\'\';. .\' ) _\\\"__ / )\\ __\"/_ \\/ \\ \' / \\/ .\' \'...\' \' ) / / | \\ \\ / . . . \\ / . . \\ / / | \\ \\ .\' / b \'. \'. _.-\' / Bb \'-. \'-_ _.-\' | BBb \'-. \'-. (________mrf\____.dBBBb._________)____) """
29.185185
41
0.164975
15
788
4.466667
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.555838
788
27
42
29.185185
0.191429
0
0
0.148148
0
0
0.926489
0.04943
0
0
0
0
0
1
0.037037
false
0
0
0.037037
0.074074
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
25abe9086275abc053deaad474d17d9cfe2e6507
837
py
Python
model.py
danialowen/Leeds_Day_1
bf2e6f95454cd98fc18852658e9f1390e9988689
[ "MIT" ]
null
null
null
model.py
danialowen/Leeds_Day_1
bf2e6f95454cd98fc18852658e9f1390e9988689
[ "MIT" ]
null
null
null
model.py
danialowen/Leeds_Day_1
bf2e6f95454cd98fc18852658e9f1390e9988689
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Sep 17 15:59:06 2018 @author: gydwo """ import random y0 = 50 x0 = 50 if random.random() < 0.5: y0 += 1 else: y0 -= 1 if random.random() < 0.5: x0 += 1 else: x0 -= 1 if random.random() < 0.5: y0 += 1 else: y0 -= 1 if random.random() < 0.5: x0 += 1 else: x0 -= 1 print(y0, x0) y1 = 50 x1 = 50 if random.random() < 0.5: y1 += 1 else: y1 -= 1 if random.random() < 0.5: x1 += 1 else: x1 -= 1 if random.random() < 0.5: y1 += 1 else: y1 -= 1 if random.random() < 0.5: x1 += 1 else: x1 -= 1 print(y1, x1) #MATHS dist_y = (y1-y0)**2 dist_x = (x1-x0)**2 answer = (dist_y + dist_x)**0.5 print (answer) #For random number between more than 0 and 1 #can't use random.random() - use random.randint(0,... e.g. 99)
11.465753
62
0.519713
151
837
2.854305
0.304636
0.25058
0.259861
0.278422
0.491879
0.491879
0.482599
0.482599
0.482599
0.482599
0
0.152542
0.295102
837
73
62
11.465753
0.577966
0.218638
0
0.744186
0
0
0
0
0
0
0
0
0
1
0
false
0
0.023256
0
0.023256
0.069767
0
0
0
null
1
1
1
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
0
0
0
0
0
0
0
0
4
25ade2728457657ce4b918ffec870d9e943e4c2c
2,144
py
Python
BFM17_POM1D_VrsFnl/src/pom/coupling/env_forcing_pom_bfm_1d.py
kyleniemeyer/pyPOM1D
4eeb1ca16abe07d039c634f2338ebac395692362
[ "BSD-3-Clause" ]
null
null
null
BFM17_POM1D_VrsFnl/src/pom/coupling/env_forcing_pom_bfm_1d.py
kyleniemeyer/pyPOM1D
4eeb1ca16abe07d039c634f2338ebac395692362
[ "BSD-3-Clause" ]
null
null
null
BFM17_POM1D_VrsFnl/src/pom/coupling/env_forcing_pom_bfm_1d.py
kyleniemeyer/pyPOM1D
4eeb1ca16abe07d039c634f2338ebac395692362
[ "BSD-3-Clause" ]
null
null
null
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # MODEL POM - Princeton Ocean Model # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # DESCRIPTION # # This routine calculates the physical forcing functions, # # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= from BFM17_POM1D_VrsFnl.src.pom.phys.pom_to_bfm import pom_to_bfm from BFM17_POM1D_VrsFnl.src.pom.coupling.CalcVerticalExtinction import CalcVerticalExtinction from BFM17_POM1D_VrsFnl.src.pom.coupling.CalcLightDistribution import CalcLightDistribution def env_forcing_pom_bfm_1d(): # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # PASS PHYSICAL VARIABLES INTO BFM # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= pom_to_bfm() # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # CALCULATION OF VERTICAL EXITINCTION COEFFICIENT # (input is ESSNO, PHYTOPLANKTON, DETRITUS AND BACTERIA BIOMASS) # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= CalcVerticalExtinction() # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # CALCULATION OF THE IRRADIATION (FORCING FUNCTION) # (input is xEPSNO: vertical extinction) # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= CalcLightDistribution() return # EOC # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # MODEL POM - Princeton Ocean Model # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
48.727273
120
0.290578
94
2,144
6.457447
0.521277
0.044481
0.069193
0.098847
0.243822
0.15486
0.112026
0
0
0
0
0.005118
0.088619
2,144
43
121
49.860465
0.305527
0.780317
0
0
0
0
0
0
0
0
0
0
0
1
0.125
true
0
0.375
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
25bc76245232abb598ef2b1fed50ca152c7334ec
61
py
Python
en/001/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
en/001/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
en/001/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
# Create a program that writes 'Hello World!' on the screen.
30.5
60
0.737705
10
61
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.180328
61
1
61
61
0.9
0.95082
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
25c2c9c7222b571ed0fdafb93d88e0bda1083a27
114
py
Python
tests/model_tests/004_ref/models/enum_class.py
cal-pratt/openapi-dataclasses
106a0c7466dfd29beed1fa1734182f59d9c94393
[ "MIT" ]
null
null
null
tests/model_tests/004_ref/models/enum_class.py
cal-pratt/openapi-dataclasses
106a0c7466dfd29beed1fa1734182f59d9c94393
[ "MIT" ]
null
null
null
tests/model_tests/004_ref/models/enum_class.py
cal-pratt/openapi-dataclasses
106a0c7466dfd29beed1fa1734182f59d9c94393
[ "MIT" ]
null
null
null
from enum import Enum class EnumClass(Enum): FOO = "foo" def __repr__(self): return self.value
12.666667
25
0.631579
15
114
4.533333
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.280702
114
8
26
14.25
0.829268
0
0
0
0
0
0.026316
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
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
0
1
1
0
0
4
25c32a86d5f64cf7b2727e3faf774ebb82a8b10e
77
py
Python
src/conftest.py
terasakisatoshi/pydev_poetry
05293560e6367b4f4d5fac146be2355ef52bcfa3
[ "MIT" ]
null
null
null
src/conftest.py
terasakisatoshi/pydev_poetry
05293560e6367b4f4d5fac146be2355ef52bcfa3
[ "MIT" ]
2
2021-01-26T08:34:40.000Z
2021-02-17T12:18:07.000Z
src/conftest.py
terasakisatoshi/pydev_poetry
05293560e6367b4f4d5fac146be2355ef52bcfa3
[ "MIT" ]
null
null
null
# https://stackoverflow.com/questions/50155464/using-pytest-with-a-src-layer
38.5
76
0.805195
11
77
5.636364
1
0
0
0
0
0
0
0
0
0
0
0.106667
0.025974
77
1
77
77
0.72
0.961039
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
25f83762ad41b02ecc6ea28039b970c7715cabb7
206
py
Python
tests/test_args.py
MohamedElashri/mathsnip
586c67ef22abc5afea49c932768b7ba006dc9753
[ "MIT" ]
null
null
null
tests/test_args.py
MohamedElashri/mathsnip
586c67ef22abc5afea49c932768b7ba006dc9753
[ "MIT" ]
null
null
null
tests/test_args.py
MohamedElashri/mathsnip
586c67ef22abc5afea49c932768b7ba006dc9753
[ "MIT" ]
null
null
null
import pytest from mathsnip import main,createParse @pytest.fixture def parser(): return createParse() def test_eat(parser): args = parser.parse_args(['eat', '-c', '2']) main(args)
14.714286
48
0.650485
26
206
5.076923
0.615385
0
0
0
0
0
0
0
0
0
0
0.006173
0.213592
206
13
49
15.846154
0.808642
0
0
0
0
0
0.029268
0
0
0
0
0
0
1
0.25
false
0
0.25
0.125
0.625
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
1
0
0
0
1
1
0
0
4
d327d3fed54257e91cc3c5a39b2ca37fec924458
282
py
Python
scripts/pylint_custom_plugin/tests/test_files/api_version_checker_violation.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
scripts/pylint_custom_plugin/tests/test_files/api_version_checker_violation.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
scripts/pylint_custom_plugin/tests/test_files/api_version_checker_violation.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# Test file for api version checker class SomeClient(): def __init__(self, endpoint, credential, **kwargs): """ :param str endpoint: Something. :param credential: Something. :type credential: TokenCredential. """ pass
20.142857
55
0.58156
25
282
6.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.322695
282
13
56
21.692308
0.837696
0.464539
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
0
0.666667
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
1
0
1
0
0
1
0
0
4
d32af66a827875561ae85d67073be5bb13b45da3
185
py
Python
tweet/forms.py
DeanNevins/twitterclone
e713627f352f8a7d34b493384fbc86818db841c6
[ "MIT" ]
null
null
null
tweet/forms.py
DeanNevins/twitterclone
e713627f352f8a7d34b493384fbc86818db841c6
[ "MIT" ]
null
null
null
tweet/forms.py
DeanNevins/twitterclone
e713627f352f8a7d34b493384fbc86818db841c6
[ "MIT" ]
null
null
null
from django import forms from tweet.models import Tweet class TweetForm(forms.Form): tweet = forms.CharField(widget=forms.Textarea(attrs={'class': 'nes-textarea'}),max_length=140)
30.833333
98
0.767568
26
185
5.423077
0.653846
0
0
0
0
0
0
0
0
0
0
0.018072
0.102703
185
6
98
30.833333
0.831325
0
0
0
0
0
0.091398
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
d366faa20a2bc654f45d40fd2d06331089070cde
68
py
Python
src/kaa/images.py
mmicek/kaa
3583edf19b0e453c7de6c316a08d9eda72a1fcfc
[ "MIT" ]
17
2019-07-10T12:24:53.000Z
2022-02-19T21:39:19.000Z
src/kaa/images.py
mmicek/kaa
3583edf19b0e453c7de6c316a08d9eda72a1fcfc
[ "MIT" ]
29
2019-07-10T12:30:58.000Z
2021-12-30T15:33:44.000Z
src/kaa/images.py
mmicek/kaa
3583edf19b0e453c7de6c316a08d9eda72a1fcfc
[ "MIT" ]
8
2019-03-26T23:08:40.000Z
2022-01-10T03:39:59.000Z
from ._kaa import Sprite, Texture __all__ = ('Sprite', 'Texture')
13.6
33
0.691176
8
68
5.25
0.75
0.619048
0
0
0
0
0
0
0
0
0
0
0.161765
68
4
34
17
0.736842
0
0
0
0
0
0.191176
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
d37ae80c0a5b0548e1e993443b57f2a4cb3316c2
369
py
Python
demo/main/models.py
9dev/django-flags
b4553ebd3f7750594da5abac4d73b6bc15c6bc30
[ "MIT" ]
null
null
null
demo/main/models.py
9dev/django-flags
b4553ebd3f7750594da5abac4d73b6bc15c6bc30
[ "MIT" ]
null
null
null
demo/main/models.py
9dev/django-flags
b4553ebd3f7750594da5abac4d73b6bc15c6bc30
[ "MIT" ]
null
null
null
from django.db import models from django.core.urlresolvers import reverse class Article(models.Model): title = models.CharField(max_length=100) content = models.CharField(max_length=1000) def get_absolute_url(self): return reverse('article_detail', kwargs={'pk': self.pk}) def __str__(self): return '<Article id={}>'.format(self.pk)
26.357143
64
0.704607
49
369
5.122449
0.612245
0.079681
0.143426
0.191235
0
0
0
0
0
0
0
0.022876
0.170732
369
13
65
28.384615
0.797386
0
0
0
0
0
0.084011
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.222222
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
d39c330b73be654814ef9f787d587ecba13b4113
1,917
py
Python
diary/migrations/0002_auto_20180604_1111.py
vsanasc/sbrain
c0d0c24ea347d6bd0f34b9fdc3d7f01563ba0461
[ "BSD-3-Clause" ]
1
2019-10-22T19:17:59.000Z
2019-10-22T19:17:59.000Z
diary/migrations/0002_auto_20180604_1111.py
vsanasc/sbrain
c0d0c24ea347d6bd0f34b9fdc3d7f01563ba0461
[ "BSD-3-Clause" ]
null
null
null
diary/migrations/0002_auto_20180604_1111.py
vsanasc/sbrain
c0d0c24ea347d6bd0f34b9fdc3d7f01563ba0461
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.0 on 2018-06-04 11:11 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('diary', '0001_initial'), ] operations = [ migrations.AlterField( model_name='date', name='stars', field=models.PositiveSmallIntegerField(default=3, validators=[django.core.validators.MaxValueValidator(5), django.core.validators.MinValueValidator(1)]), ), migrations.AlterField( model_name='date', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), migrations.AlterField( model_name='dedication', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), migrations.AlterField( model_name='role', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), migrations.AlterField( model_name='smallnote', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), migrations.AlterField( model_name='task', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), migrations.AlterField( model_name='typededication', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), migrations.AlterField( model_name='typetask', name='status', field=models.SmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1), ), ]
34.854545
165
0.565467
172
1,917
6.25
0.27907
0.148837
0.186047
0.215814
0.677209
0.676279
0.611163
0.611163
0.611163
0.611163
0
0.030545
0.282733
1,917
54
166
35.5
0.751273
0.022431
0
0.666667
1
0
0.116987
0
0
0
0
0
0
1
0
false
0
0.041667
0
0.104167
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6c8f5363264121a2652c92a563d29c6689b5e01c
303
py
Python
src/__init__.py
dgpatelgit/fabric8-analytics-bigquery-manifests-job
95f304dddff32fcabe1df6abe43c17a3718e1152
[ "Apache-2.0" ]
null
null
null
src/__init__.py
dgpatelgit/fabric8-analytics-bigquery-manifests-job
95f304dddff32fcabe1df6abe43c17a3718e1152
[ "Apache-2.0" ]
15
2019-05-08T15:16:58.000Z
2021-05-26T12:07:13.000Z
src/__init__.py
dgpatelgit/fabric8-analytics-bigquery-manifests-job
95f304dddff32fcabe1df6abe43c17a3718e1152
[ "Apache-2.0" ]
6
2019-04-22T17:16:01.000Z
2021-05-21T21:16:37.000Z
"""The source code for big query manifest jo.""" import logging from src.config.settings import SETTINGS # Set root logger format for uniform log format. logging.basicConfig(level=SETTINGS.logging_level, format='[%(asctime)s] %(levelname)s in %(pathname)s:%(lineno)d: %(message)s')
37.875
97
0.706271
42
303
5.071429
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.165017
303
7
98
43.285714
0.841897
0.29703
0
0
0
0.25
0.323672
0.115942
0
0
0
0
0
1
0
true
0
0.5
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
1
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
6c9c7423121492f7f4894e375466618f049de788
2,719
py
Python
tests/test_component_survey.py
archetipo/python-formio-data
ec1b3a2d59ce153c7e297f1a654d73e76788d421
[ "MIT" ]
null
null
null
tests/test_component_survey.py
archetipo/python-formio-data
ec1b3a2d59ce153c7e297f1a654d73e76788d421
[ "MIT" ]
null
null
null
tests/test_component_survey.py
archetipo/python-formio-data
ec1b3a2d59ce153c7e297f1a654d73e76788d421
[ "MIT" ]
null
null
null
# Copyright Nova Code (http://www.novacode.nl) # See LICENSE file for full licensing details. from test_component import ComponentTestCase from formiodata.components import surveyComponent class surveyComponentTestCase(ComponentTestCase): def test_object(self): # surveyComponent survey = self.builder.form_components['survey'] self.assertIsInstance(survey, surveyComponent) # Not surveyComponent firstName = self.builder.form_components['firstName'] self.assertNotIsInstance(firstName, surveyComponent) submit = self.builder.form_components['submit'] self.assertNotIsInstance(submit, surveyComponent) def test_get_key(self): survey = self.builder.form_components['survey'] self.assertEqual(survey.key, 'survey') def test_get_type(self): survey = self.builder.form_components['survey'] self.assertEqual(survey.type, 'survey') def test_get_label(self): survey = self.builder.form_components['survey'] self.assertEqual(survey.label, 'Survey') def test_set_label(self): survey = self.builder.form_components['survey'] self.assertEqual(survey.label, 'Survey') survey.label = 'Foobar' self.assertEqual(survey.label, 'Foobar') def test_get_form(self): survey = self.form.components['survey'] self.assertEqual(survey.label, 'Survey') self.assertEqual(survey.value['overallExperience'], 'excellent') self.assertEqual(survey.value['howWasCustomerSupport'], 'great') self.assertEqual(survey.value['howWouldYouRateTheFormIoPlatform'], 'excellent') self.assertEqual(survey.type, 'survey') def test_get_form_data(self): survey = self.form.data.survey self.assertEqual(survey.label, 'Survey') self.assertEqual(survey.value['overallExperience'], 'excellent') self.assertEqual(survey.value['howWasCustomerSupport'], 'great') self.assertEqual(survey.value['howWouldYouRateTheFormIoPlatform'], 'excellent') self.assertEqual(survey.type, 'survey') # i18n translations def test_get_label_i18n_nl(self): survey = self.builder_i18n_nl.form_components['survey'] self.assertEqual(survey.label, 'Enquête') def test_get_form_data_i18n_nl(self): survey = self.form_i18n_nl.data.survey self.assertEqual(survey.label, 'Enquête') # TODO Labels for questions and values # self.assertEqual(survey.value['overallExperience'], 'uitstekend') # self.assertEqual(survey.value['howWasCustomerSupport'], 'super goed') # self.assertEqual(survey.value['howWouldYouRateTheFormIoPlatform'], 'uitstekend')
40.58209
90
0.702096
280
2,719
6.689286
0.214286
0.106781
0.224239
0.144154
0.618793
0.504538
0.475707
0.429258
0.405766
0.405766
0
0.004505
0.183523
2,719
66
91
41.19697
0.839189
0.14601
0
0.454545
0
0
0.137111
0.045848
0
0
0
0.015152
0.454545
1
0.204545
false
0
0.045455
0
0.272727
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
1
1
0
1
0
0
0
0
0
0
0
4
6c9f4a1dd97d6ece3b176f9a722ff1d29735b483
239
py
Python
jsonobject/exceptions.py
st7105/jsonobject
240daf32747efd576dbbf71cc96c09257dc0fdf0
[ "BSD-3-Clause" ]
232
2015-01-11T22:41:02.000Z
2022-03-21T17:51:58.000Z
jsonobject/exceptions.py
st7105/jsonobject
240daf32747efd576dbbf71cc96c09257dc0fdf0
[ "BSD-3-Clause" ]
62
2015-01-30T14:44:49.000Z
2022-03-17T00:41:52.000Z
jsonobject/exceptions.py
st7105/jsonobject
240daf32747efd576dbbf71cc96c09257dc0fdf0
[ "BSD-3-Clause" ]
37
2015-04-13T01:24:36.000Z
2022-03-11T18:10:02.000Z
from __future__ import unicode_literals class DeleteNotAllowed(Exception): pass class BadValueError(Exception): """raised when a value can't be validated or is required""" class WrappingAttributeError(AttributeError): pass
19.916667
63
0.774059
27
239
6.666667
0.851852
0
0
0
0
0
0
0
0
0
0
0
0.158996
239
11
64
21.727273
0.895522
0.221757
0
0.333333
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.166667
0
0.666667
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
1
0
0
1
0
0
4
6ca7f27dd7b0aac46604609256a6f580aa988d2c
115
py
Python
sympy/assumptions/handlers/__init__.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
319
2016-09-22T15:54:48.000Z
2022-03-18T02:36:58.000Z
sympy/assumptions/handlers/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
13
2020-03-24T17:53:51.000Z
2022-02-10T20:01:14.000Z
sympy/assumptions/handlers/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
27
2016-10-06T16:05:32.000Z
2022-03-18T02:37:00.000Z
from .common import (AskHandler, CommonHandler, AskCommutativeHandler, TautologicalHandler, test_closed_group)
38.333333
70
0.834783
10
115
9.4
1
0
0
0
0
0
0
0
0
0
0
0
0.104348
115
2
71
57.5
0.912621
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
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
0
1
0
1
0
0
0
0
4
6cabd97ae3226a8ba39764678cc9c1745defddf4
241
py
Python
PiMulator/PiM5.py
hplp/PiMulator
498cbe0b1e176c7d1cc2721f20d7bc0f193a3e3b
[ "BSD-2-Clause" ]
null
null
null
PiMulator/PiM5.py
hplp/PiMulator
498cbe0b1e176c7d1cc2721f20d7bc0f193a3e3b
[ "BSD-2-Clause" ]
null
null
null
PiMulator/PiM5.py
hplp/PiMulator
498cbe0b1e176c7d1cc2721f20d7bc0f193a3e3b
[ "BSD-2-Clause" ]
null
null
null
import subprocess import os os.system('make Bank_HLS -C Bank_HLS/')#TARGET=xczu3eg-sfva625-1-i-es1 print("make Bank_HLS completed") os.system('make UZEG_Bank_Hardware -C Bank_Hardware_Design/') print("make Bank Hardware Design completed")
26.777778
70
0.792531
39
241
4.717949
0.487179
0.130435
0.130435
0
0
0
0
0
0
0
0
0.027397
0.091286
241
8
71
30.125
0.812785
0.124481
0
0
0
0
0.628571
0.1
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
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
1
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
6cb310b8ba1ca74c146cc6eb00c92be8a41fbe45
5,636
py
Python
tests/test_config.py
sbilinski/aws-ssh-sync
4b5f28c9aea977a1223347edd7464389b9a98df0
[ "Apache-2.0" ]
null
null
null
tests/test_config.py
sbilinski/aws-ssh-sync
4b5f28c9aea977a1223347edd7464389b9a98df0
[ "Apache-2.0" ]
3
2020-03-24T17:35:49.000Z
2021-02-02T22:25:38.000Z
tests/test_config.py
sjednac/aws-ssh-sync
4b5f28c9aea977a1223347edd7464389b9a98df0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from aws_ssh_sync.main import make_ssh_config def test_default_config_to_stdout(ec2_stub, ec2_region_name, capsys, monkeypatch): monkeypatch.setenv("AWS_PROFILE", "testprofile") monkeypatch.setenv("AWS_REGION", ec2_region_name) ec2_stub.add_response( "describe_instances", expected_params={ "Filters": [ {"Name": "instance-state-name", "Values": ["running"]} ] }, service_response={ "Reservations": [ { "Instances": [ { "InstanceId": "i-1", "PrivateIpAddress": "192.168.0.1", "PublicIpAddress": "42.42.42.42", "LaunchTime": "2019-01-01 09:00:00+00:00", "Tags": [] }, { "InstanceId": "i-2", "PrivateIpAddress": "192.168.0.2", "LaunchTime": "2018-01-01 09:00:00+00:00", "Tags": [{"Key": "Name", "Value": "clusterfoo"}] }, { "InstanceId": "i-3", "PrivateIpAddress": "192.168.0.3", "LaunchTime": "2017-01-01 09:00:00+00:00", "Tags": [{"Key": "Name", "Value": "clusterfoo"}] } ] } ] } ) make_ssh_config() out, err = capsys.readouterr() assert err == "" assert out == f"""\ # BEGIN [testprofile] # Generated automatically by `aws_ssh_sync`. ## {ec2_region_name} ### i-3 Host clusterfoo0 \tHostName 192.168.0.3 \tUser ec2-user \tIdentitiesOnly yes ### i-2 Host clusterfoo1 \tHostName 192.168.0.2 \tUser ec2-user \tIdentitiesOnly yes ### i-1 Host i-1 \tHostName 42.42.42.42 \tUser ec2-user \tIdentitiesOnly yes # END [testprofile] """ def test_extended_config_to_stdout(ec2_stub, ec2_region_name, capsys): ec2_stub.add_response( "describe_instances", expected_params={ "Filters": [ {"Name": "instance-state-name", "Values": ["running"]}, {'Name': 'tag:Name', 'Values': ['*node*']} ] }, service_response={ "Reservations": [ { "Instances": [ { "InstanceId": "i-1", "PrivateIpAddress": "192.168.0.1", "PublicIpAddress": "11.11.11.11", "LaunchTime": "2018-01-01 09:00:00+00:00", "Tags": [{"Key": "Name", "Value": "publicnode"}] }, { "InstanceId": "i-2", "PrivateIpAddress": "192.168.0.2", "PublicIpAddress": "22.22.22.22", "LaunchTime": "2019-01-01 09:00:00+00:00", "Tags": [{"Key": "Name", "Value": "publicnode"}] }, { "InstanceId": "i-3", "PrivateIpAddress": "192.168.0.3", "LaunchTime": "2017-01-01 09:00:00+00:00", "Tags": [{"Key": "Name", "Value": "privatenode"}] }, ] } ] } ) make_ssh_config( "--profile", "testprofile", "--region", ec2_region_name, "--ec2-filter-name", "*node*", "--address", "public", "--config-key", "test_key", "--region-prefix", "--name-prefix", "test-prefix-", "--port", "22", "--user", "tester", "--identity-file", "~/.ssh/id_rsa.test", "--server-alive-interval", "100", "--no-identities-only", "--skip-strict-host-checking", "--proxy-command", "ssh ec2-user@jumphost nc %h %p" ) out, err = capsys.readouterr() assert err == "" assert out == f"""\ # BEGIN [test_key] # Generated automatically by `aws_ssh_sync`. ## {ec2_region_name} ### i-1 Host test-prefix-{ec2_region_name}-publicnode0 \tHostName 11.11.11.11 \tPort 22 \tUser tester \tIdentityFile ~/.ssh/id_rsa.test \tServerAliveInterval 100 \tStrictHostKeyChecking no \tUserKnownHostsFile=/dev/null \tProxyCommand ssh ec2-user@jumphost nc %h %p ### i-2 Host test-prefix-{ec2_region_name}-publicnode1 \tHostName 22.22.22.22 \tPort 22 \tUser tester \tIdentityFile ~/.ssh/id_rsa.test \tServerAliveInterval 100 \tStrictHostKeyChecking no \tUserKnownHostsFile=/dev/null \tProxyCommand ssh ec2-user@jumphost nc %h %p # END [test_key] """ def test_no_instances_to_stdout(ec2_stub, ec2_region_name, capsys, monkeypatch): monkeypatch.setenv("AWS_PROFILE", "testprofile") monkeypatch.setenv("AWS_REGION", ec2_region_name) ec2_stub.add_response( "describe_instances", expected_params={ "Filters": [ {"Name": "instance-state-name", "Values": ["running"]} ] }, service_response={ "Reservations": [ ] } ) make_ssh_config() out, err = capsys.readouterr() assert err == "" assert out == f"""\ # BEGIN [testprofile] # Generated automatically by `aws_ssh_sync`. ## {ec2_region_name} # END [testprofile] """
27.90099
82
0.474273
526
5,636
4.93346
0.230038
0.027746
0.027746
0.053179
0.777649
0.757611
0.712909
0.704432
0.680925
0.663198
0
0.078521
0.376331
5,636
201
83
28.039801
0.659744
0.003726
0
0.568047
0
0
0.427401
0.049884
0
0
0
0
0.035503
1
0.017751
false
0
0.005917
0
0.023669
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
6ce46e66aca88467a9f3eff4a03ebbbb37df6a8b
104
py
Python
precognise/__init__.py
osper-os/precognise
ab464df6bc01a4c688f618edb676dfe3ccc2abc7
[ "MIT" ]
1
2019-12-18T10:09:40.000Z
2019-12-18T10:09:40.000Z
precognise/__init__.py
osper-os/precognise
ab464df6bc01a4c688f618edb676dfe3ccc2abc7
[ "MIT" ]
null
null
null
precognise/__init__.py
osper-os/precognise
ab464df6bc01a4c688f618edb676dfe3ccc2abc7
[ "MIT" ]
null
null
null
from precognise.args import ( CommandGroup, # noqa command, # noqa command_arg, # noqa )
17.333333
29
0.634615
11
104
5.909091
0.727273
0.338462
0
0
0
0
0
0
0
0
0
0
0.278846
104
5
30
20.8
0.866667
0.134615
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
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
9f433ab86c14fd80d0fb23d574a5257836113ee0
11,139
py
Python
easygraph/functions/graph_generator/RandomNetwork.py
tddschn/Easy-Graph
2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8
[ "BSD-3-Clause" ]
1
2022-03-19T11:29:42.000Z
2022-03-19T11:29:42.000Z
easygraph/functions/graph_generator/RandomNetwork.py
tddschn/Easy-Graph
2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8
[ "BSD-3-Clause" ]
null
null
null
easygraph/functions/graph_generator/RandomNetwork.py
tddschn/Easy-Graph
2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8
[ "BSD-3-Clause" ]
null
null
null
import easygraph as eg import numpy as np import random import math __all__ = [ 'erdos_renyi_M', 'erdos_renyi_P', 'fast_erdos_renyi_P', 'WS_Random', ] def erdos_renyi_M(n, edge, directed=False, FilePath=None): """Given the number of nodes and the number of edges, return an Erdős-Rényi random graph, and store the graph in a document. Parameters ---------- n : int The number of nodes. edge : int The number of edges. directed : bool, optional (default=False) If True, this function returns a directed graph. FilePath : string The file path of storing the graph G. Returns ------- G : graph an Erdős-Rényi random graph. Examples -------- Returns an Erdős-Rényi random graph G. >>> erdos_renyi_M(100,180,directed=False,FilePath="/users/fudanmsn/downloads/RandomNetwork.txt") References ---------- .. [1] P. Erdős and A. Rényi, On Random Graphs, Publ. Math. 6, 290 (1959). .. [2] E. N. Gilbert, Random Graphs, Ann. Math. Stat., 30, 1141 (1959). """ if directed: G = eg.DiGraph() adjacent = {} mmax = n * (n - 1) if edge >= mmax: for i in range(n): for j in range(n): if i != j: G.add_edge(i, j) if i not in adjacent: adjacent[i] = [] adjacent[i].append(j) else: adjacent[i].append(j) return G count = 0 while count < edge: i = random.randint(0, n - 1) j = random.randint(0, n - 1) if i == j or G.has_edge(i, j): continue else: count = count + 1 if i not in adjacent: adjacent[i] = [] adjacent[i].append(j) else: adjacent[i].append(j) G.add_edge(i, j) else: G = eg.Graph() adjacent = {} mmax = n * (n - 1) / 2 if edge >= mmax: for i in range(n): for j in range(n): if i != j: G.add_edge(i, j) if i not in adjacent: adjacent[i] = [] adjacent[i].append(j) else: adjacent[i].append(j) if j not in adjacent: adjacent[j] = [] adjacent[j].append(i) else: adjacent[j].append(i) return G count = 0 while count < edge: i = random.randint(0, n - 1) j = random.randint(0, n - 1) if i == j or G.has_edge(i, j): continue else: count = count + 1 if i not in adjacent: adjacent[i] = [] adjacent[i].append(j) else: adjacent[i].append(j) if j not in adjacent: adjacent[j] = [] adjacent[j].append(i) else: adjacent[j].append(i) G.add_edge(i, j) writeRandomNetworkToFile(n, adjacent, FilePath) return G def erdos_renyi_P(n, p, directed=False, FilePath=None): """Given the number of nodes and the probability of edge creation, return an Erdős-Rényi random graph, and store the graph in a document. Parameters ---------- n : int The number of nodes. p : float Probability for edge creation. directed : bool, optional (default=False) If True, this function returns a directed graph. FilePath : string The file path of storing the graph G. Returns ------- G : graph an Erdős-Rényi random graph. Examples -------- Returns an Erdős-Rényi random graph G >>> erdos_renyi_P(100,0.5,directed=False,FilePath="/users/fudanmsn/downloads/RandomNetwork.txt") References ---------- .. [1] P. Erdős and A. Rényi, On Random Graphs, Publ. Math. 6, 290 (1959). .. [2] E. N. Gilbert, Random Graphs, Ann. Math. Stat., 30, 1141 (1959). """ if directed: G = eg.DiGraph() adjacent = {} probability = 0.0 for i in range(n): for j in range(i + 1, n): probability = random.random() if probability < p: if i not in adjacent: adjacent[i] = [] adjacent[i].append(j) else: adjacent[i].append(j) G.add_edge(i, j) else: G = eg.Graph() adjacent = {} probability = 0.0 for i in range(n): for j in range(i + 1, n): probability = random.random() if probability < p: if i not in adjacent: adjacent[i] = [] adjacent[i].append(j) else: adjacent[i].append(j) if j not in adjacent: adjacent[j] = [] adjacent[j].append(i) else: adjacent[j].append(i) G.add_edge(i, j) writeRandomNetworkToFile(n, adjacent, FilePath) return G def fast_erdos_renyi_P(n, p, directed=False, FilePath=None): """Given the number of nodes and the probability of edge creation, return an Erdős-Rényi random graph, and store the graph in a document. Use this function for generating a huge scale graph. Parameters ---------- n : int The number of nodes. p : float Probability for edge creation. directed : bool, optional (default=False) If True, this function returns a directed graph. FilePath : string The file path of storing the graph G. Returns ------- G : graph an Erdős-Rényi random graph. Examples -------- Returns an Erdős-Rényi random graph G >>> erdos_renyi_P(100,0.5,directed=False,FilePath="/users/fudanmsn/downloads/RandomNetwork.txt") References ---------- .. [1] P. Erdős and A. Rényi, On Random Graphs, Publ. Math. 6, 290 (1959). .. [2] E. N. Gilbert, Random Graphs, Ann. Math. Stat., 30, 1141 (1959). """ if directed: G = eg.DiGraph() w = -1 lp = math.log(1.0 - p) v = 0 adjacent = {} while v < n: lr = math.log(1.0 - random.random()) w = w + 1 + int(lr / lp) if v == w: # avoid self loops w = w + 1 while v < n <= w: w = w - n v = v + 1 if v == w: # avoid self loops w = w + 1 if v < n: G.add_edge(v, w) if v not in adjacent: adjacent[v] = [] adjacent[v].append(w) else: adjacent[v].append(w) else: G = eg.Graph() w = -1 lp = math.log(1.0 - p) v = 1 adjacent = {} while v < n: lr = math.log(1.0 - random.random()) w = w + 1 + int(lr / lp) while w >= v and v < n: w = w - v v = v + 1 if v < n: G.add_edge(v, w) if v not in adjacent: adjacent[v] = [] adjacent[v].append(w) else: adjacent[v].append(w) if w not in adjacent: adjacent[w] = [] adjacent[w].append(v) else: adjacent[w].append(v) writeRandomNetworkToFile(n, adjacent, FilePath) return G def WS_Random(n, k, p, FilePath=None): """Returns a small-world graph. Parameters ---------- n : int The number of nodes k : int Each node is joined with its `k` nearest neighbors in a ring topology. p : float The probability of rewiring each edge FilePath : string The file path of storing the graph G Returns ------- G : graph a small-world graph Examples -------- Returns a small-world graph G >>> WS_Random(100,10,0.3,"/users/fudanmsn/downloads/RandomNetwork.txt") """ if k >= n: print("k>=n, choose smaller k or larger n") return adjacent = {} G = eg.Graph() NUM1 = n NUM2 = NUM1 - 1 K = k K1 = K + 1 N = list(range(NUM1)) G.add_nodes(N) for i in range(NUM1): for j in range(1, K1): K_add = NUM1 - K i_add_j = i + j + 1 if i >= K_add and i_add_j > NUM1: i_add = i + j - NUM1 G.add_edge(i, i_add) else: i_add = i + j G.add_edge(i, i_add) if i not in adjacent: adjacent[i] = [] adjacent[i].append(i_add) else: adjacent[i].append(i_add) if i_add not in adjacent: adjacent[i_add] = [] adjacent[i_add].append(i) else: adjacent[i_add].append(i) for i in range(NUM1): for e_del in range(i + 1, i + K1): if e_del >= NUM1: e_del = e_del - NUM1 P_random = random.random() if P_random < p: G.remove_edge(i, e_del) adjacent[i].remove(e_del) if adjacent[i] == []: adjacent.pop(i) adjacent[e_del].remove(i) if adjacent[e_del] == []: adjacent.pop(e_del) e_add = random.randint(0, NUM2) while e_add == i or G.has_edge(i, e_add) == True: e_add = random.randint(0, NUM2) G.add_edge(i, e_add) if i not in adjacent: adjacent[i] = [] adjacent[i].append(e_add) else: adjacent[i].append(e_add) if e_add not in adjacent: adjacent[e_add] = [] adjacent[e_add].append(i) else: adjacent[e_add].append(i) writeRandomNetworkToFile(n, adjacent, FilePath) return G def writeRandomNetworkToFile(n, adjacent, FilePath): if FilePath != None: f = open(FilePath, 'w+') else: f = open("RandomNetwork.txt", 'w+') adjacent = sorted(adjacent.items(), key=lambda d: d[0]) for i in adjacent: i[1].sort() for j in i[1]: f.write(str(i[0])) f.write(' ') f.write(str(j)) f.write('\n') f.close()
30.024259
194
0.451387
1,337
11,139
3.700075
0.111444
0.054579
0.042046
0.06792
0.788357
0.727714
0.706489
0.68587
0.677785
0.663432
0
0.023867
0.439537
11,139
370
195
30.105405
0.768541
0.255948
0
0.710744
0
0
0.014056
0
0
0
0
0
0
1
0.020661
false
0
0.016529
0
0.066116
0.004132
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9f567318063c6948cc27dcfaa241b991cddd0be5
6,814
py
Python
dpia/decorators.py
ait-csr/dpia-tool
458f106e25b1d3bd2f07fd9df18bde880f4edc4a
[ "MIT" ]
4
2018-12-25T05:53:17.000Z
2022-02-07T10:07:06.000Z
dpia/decorators.py
ait-csr/dpia-tool
458f106e25b1d3bd2f07fd9df18bde880f4edc4a
[ "MIT" ]
9
2020-02-12T00:57:33.000Z
2022-03-11T23:24:13.000Z
dpia/decorators.py
CSR-AIT/dpia-tool
458f106e25b1d3bd2f07fd9df18bde880f4edc4a
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.shortcuts import render_to_response, redirect, render, get_object_or_404 from django.core.exceptions import PermissionDenied from django.contrib import messages from django.http import HttpResponseRedirect, HttpResponseForbidden from django.db.models import Max, Min, F, FloatField, Sum, Prefetch, Q from dpia.models import * # decorator for owner authorization def auth_required(function): def wrap(request, *args, **kwargs): membership = get_object_or_404(Membership, questionaire=kwargs['q_id'], member=request.user) if membership.is_owner: return function(request, *args, **kwargs) else: return HttpResponseForbidden("You are not allowed to perform this action!") wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap ## decorators to see if each step is completed def pre_assessment_required(function): def wrap(request, *args, **kwargs): answers = Answer.objects.filter(user=request.user, questionaire=None) if answers.exists(): return function(request, *args, **kwargs) else: messages.warning(request, 'Complete Pre-Assessment to activate the next step.') return redirect(reverse('pre_assessment')) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def primary_assets_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_primary_assets(): return function(request, *args, **kwargs) else: messages.warning(request, 'Add and fill out the primary assets to activate the next step.') return redirect(reverse('primary_list', args=[q.id])) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def supporting_assets_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_supporting_assets(): return function(request, *args, **kwargs) else: messages.warning(request, 'Add supporting assets to activate the next step.') return redirect(reverse('primary_list', args=[q.id])) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def threats_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_threats(): return function(request, *args, **kwargs) else: messages.warning(request, 'Add threats to activate the next step.') return redirect(reverse('threat_identification', args=[q.id])) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def threat_assessment_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_unassessed_threats(): messages.warning(request, 'Assess likelihood of threats to activate the next step.') return redirect(reverse('threat_assessment', args=[q.id])) else: return function(request, *args, **kwargs) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def delete_nothreat_risks(function): def wrap(request, *args, **kwargs): empty_risks = Risk.objects\ .filter(primary_asset_affected__questionaire=kwargs['q_id'],\ primary_asset_affected__primary_in_psrel__supporting__supporting_in_threatsarel__isnull=True) if empty_risks: empty_risks.delete() return function(request, *args, **kwargs) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def risk_assessment_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_unassessed_risks(): messages.warning(request, 'Assess impact of risks to activate the next step.') return redirect(reverse('risk_assessment', args=[q.id])) else: return function(request, *args, **kwargs) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def threat_controls_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_unimplemented_controls(): messages.warning(request, 'Add threat controls to activate the next step.') return redirect(reverse('threat_controls', args=[q.id])) else: return function(request, *args, **kwargs) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def privacy_targets_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_privacy_targets(): return function(request, *args, **kwargs) else: messages.warning(request, 'Add privacy targets to activate the next step.') return redirect(reverse('privacy_target_identification', args=[q.id])) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def privacy_threats_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_privacy_threats(): return function(request, *args, **kwargs) else: messages.warning(request, 'Add privacy threats to activate the next step.') return redirect(reverse('privacy_threat_identification', args=[q.id])) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap def privacy_controls_required(function): def wrap(request, *args, **kwargs): q = get_object_or_404(Questionaire, id=kwargs['q_id'], q_in_membership__member=request.user) if q.has_privacy_controls(): return function(request, *args, **kwargs) else: messages.warning(request, 'Add privacy controls to activate the next step.') return redirect(reverse('privacy_control_implementation', args=[q.id])) wrap.__doc__ = function.__doc__ wrap.__name__ = function.__name__ return wrap ## ./end steps completion decorators
42.5875
109
0.688289
830
6,814
5.231325
0.142169
0.060801
0.093966
0.060801
0.733763
0.733763
0.718333
0.70912
0.678259
0.614924
0
0.006125
0.209275
6,814
159
110
42.855346
0.79974
0.01629
0
0.594203
0
0
0.114678
0.016276
0
0
0
0
0
1
0.173913
false
0
0.050725
0
0.478261
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
9f8377a7ea9c818096780502c52e06c509644e76
163
py
Python
dreamer/__main__.py
mouse-reeve/dreamer
c26ba31dc217f99180d23aa4ebc69dd0c4a149b3
[ "MIT" ]
null
null
null
dreamer/__main__.py
mouse-reeve/dreamer
c26ba31dc217f99180d23aa4ebc69dd0c4a149b3
[ "MIT" ]
3
2016-09-28T00:25:58.000Z
2016-09-29T19:08:28.000Z
dreamer/__main__.py
mouse-reeve/dreamer
c26ba31dc217f99180d23aa4ebc69dd0c4a149b3
[ "MIT" ]
null
null
null
''' sample dream ''' from dreamer import Dream if __name__ == "__main__": dream = Dream(dream_type='sex') for i in range(10): print dream.dream()
20.375
35
0.625767
22
163
4.227273
0.727273
0.322581
0
0
0
0
0
0
0
0
0
0.016
0.233129
163
7
36
23.285714
0.728
0
0
0
0
0
0.076923
0
0
0
0
0
0
0
null
null
0
0.2
null
null
0.2
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
1
0
0
0
0
0
0
0
0
4
9f8b47ce9dc898b7d1bde4006563c4c77d51525e
460
py
Python
examples/tests.py
xlwings/nose-random
b9a52c63f8de49a0a1f62d13e463c73d2693f6b9
[ "MIT" ]
2
2016-02-03T08:37:50.000Z
2016-12-17T00:29:59.000Z
examples/tests.py
xlwings/nose-random
b9a52c63f8de49a0a1f62d13e463c73d2693f6b9
[ "MIT" ]
1
2020-01-11T04:04:12.000Z
2020-01-11T04:04:12.000Z
examples/tests.py
ZoomerAnalytics/nose-random
b9a52c63f8de49a0a1f62d13e463c73d2693f6b9
[ "MIT" ]
null
null
null
import unittest from nose_random import randomize class RandomTestCase(unittest.TestCase): def generate_scenario(self, rng): return rng.random(), 10 * rng.random() @randomize(1000, generate_scenario) def failing_test(self, scenario): x, y = scenario self.assertLess(x, y) @randomize(1000, generate_scenario) def passing_test(self, scenario): x, y = scenario self.assertLess(x, y + 1)
25.555556
46
0.65
55
460
5.327273
0.436364
0.027304
0.143345
0.197952
0.505119
0.286689
0.286689
0.286689
0.286689
0.286689
0
0.031977
0.252174
460
18
47
25.555556
0.819767
0
0
0.307692
1
0
0
0
0
0
0
0
0.153846
1
0.230769
false
0.076923
0.153846
0.076923
0.538462
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
1
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
9fa33bb315dc3e795658edbe8c009fa36cf54a28
115
py
Python
Algorithms/441.arranging-coins/arranging-coins_1-math.py
OctopusLian/leetcode-solutions
40920d11c584504e805d103cdc6ef3f3774172b3
[ "MIT" ]
1
2020-12-01T18:35:24.000Z
2020-12-01T18:35:24.000Z
Algorithms/441.arranging-coins/arranging-coins_1-math.py
OctopusLian/leetcode-solutions
40920d11c584504e805d103cdc6ef3f3774172b3
[ "MIT" ]
18
2020-11-10T05:48:29.000Z
2020-11-26T08:39:20.000Z
Algorithms/441.arranging-coins/arranging-coins_1-math.py
OctopusLian/leetcode-solutions
40920d11c584504e805d103cdc6ef3f3774172b3
[ "MIT" ]
5
2020-11-09T07:43:00.000Z
2021-12-02T14:59:37.000Z
class Solution: def arrangeCoins(self, n: int) -> int: res = ((1+8*n)**0.5-1)/2 return int(res)
28.75
42
0.530435
19
115
3.210526
0.736842
0.196721
0
0
0
0
0
0
0
0
0
0.072289
0.278261
115
4
43
28.75
0.662651
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
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
9fb2e668383be16ae9fc2a1409c5a9f1e116cfea
56
py
Python
__init__.py
R0b95/player_amp
f5683ceb3a014bf474bbadc37352c3869abfccf9
[ "MIT" ]
null
null
null
__init__.py
R0b95/player_amp
f5683ceb3a014bf474bbadc37352c3869abfccf9
[ "MIT" ]
null
null
null
__init__.py
R0b95/player_amp
f5683ceb3a014bf474bbadc37352c3869abfccf9
[ "MIT" ]
null
null
null
# player_amp ### written in Phyton 3.8.1 by Strolch
14
39
0.660714
10
56
3.6
1
0
0
0
0
0
0
0
0
0
0
0.069767
0.232143
56
3
40
18.666667
0.767442
0.803571
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
9fcb7ec3da582f1bcefe84562013ad225697738b
83
py
Python
backend/mycv/apps.py
EmileSchneider/cityrepo
fc9d84016342f7cc83231aab9853b89c37d542f9
[ "MIT" ]
null
null
null
backend/mycv/apps.py
EmileSchneider/cityrepo
fc9d84016342f7cc83231aab9853b89c37d542f9
[ "MIT" ]
null
null
null
backend/mycv/apps.py
EmileSchneider/cityrepo
fc9d84016342f7cc83231aab9853b89c37d542f9
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MycvConfig(AppConfig): name = 'mycv'
13.833333
33
0.73494
10
83
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.180723
83
5
34
16.6
0.897059
0
0
0
0
0
0.048193
0
0
0
0
0
0
1
0
false
0
0.333333
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
4c8d5ed4fdc7a8e378610a7d0677a1e46ab1ad95
116
py
Python
hotels_django_restful_api_json_xml/hotels/admin.py
OSAMAMOHAMED1234/django_projects
ef4ac976411ae5ae8e91a2665314b2d7e0bcf7e9
[ "MIT" ]
3
2018-05-02T20:37:11.000Z
2020-10-15T17:19:26.000Z
hotels_django_restful_api_json_xml/hotels/admin.py
OSAMAMOHAMED1234/django_projects
ef4ac976411ae5ae8e91a2665314b2d7e0bcf7e9
[ "MIT" ]
1
2019-06-10T21:35:13.000Z
2019-06-10T21:35:13.000Z
hotels_django_restful_api_json_xml/hotels/admin.py
OSAMAMOHAMED1234/django_projects
ef4ac976411ae5ae8e91a2665314b2d7e0bcf7e9
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Hotel admin.site.register(Hotel)
19.333333
32
0.801724
17
116
5.470588
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.12931
116
6
33
19.333333
0.920792
0.224138
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
4c93e8746997625b44cec7da85fa8ae6bdd3fa0a
126
py
Python
generators/app/templates/common/src/modules/user/apps.py
pratheeshrussell1992/generator-djangoacs
c78d95ce322429d1416c42a2134a8227394fdfd6
[ "Apache-2.0" ]
null
null
null
generators/app/templates/common/src/modules/user/apps.py
pratheeshrussell1992/generator-djangoacs
c78d95ce322429d1416c42a2134a8227394fdfd6
[ "Apache-2.0" ]
null
null
null
generators/app/templates/common/src/modules/user/apps.py
pratheeshrussell1992/generator-djangoacs
c78d95ce322429d1416c42a2134a8227394fdfd6
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig from .conf import Config as config class UserConfig(AppConfig): name = config.app_name
21
34
0.785714
18
126
5.444444
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.15873
126
5
35
25.2
0.924528
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
4c9fd2d1c29356c70ee395200fc346db87cee93e
93
py
Python
tests/s_testseek.py
SeattleTestbed/repy_v1
f40a02e2e398b1ec67fede84b41a264ae7356d2c
[ "MIT" ]
1
2021-08-18T05:58:17.000Z
2021-08-18T05:58:17.000Z
tests/s_testseek.py
SeattleTestbed/repy_v1
f40a02e2e398b1ec67fede84b41a264ae7356d2c
[ "MIT" ]
3
2015-11-17T21:01:03.000Z
2016-07-14T09:08:04.000Z
tests/s_testseek.py
SeattleTestbed/repy_v1
f40a02e2e398b1ec67fede84b41a264ae7356d2c
[ "MIT" ]
5
2015-07-02T13:29:23.000Z
2021-09-25T07:48:30.000Z
fo = file("hello") data1 = fo.readline() fo.seek(0) data2 = fo.readline() print data1==data2
15.5
21
0.677419
15
93
4.2
0.6
0.31746
0
0
0
0
0
0
0
0
0
0.061728
0.129032
93
5
22
18.6
0.716049
0
0
0
0
0
0.053763
0
0
0
0
0
0
0
null
null
0
0
null
null
0.2
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
1
0
0
0
0
0
0
0
0
4
4cb3982e4ad5906943495c092eb89bf6bd226c61
148
py
Python
dataformats/user_data.py
uuu0614/discordpy_util_bot
56a3bae2caf1b351d91b5515c9052a4cc716f832
[ "MIT" ]
2
2021-08-13T07:06:50.000Z
2021-08-13T07:23:48.000Z
dataformats/user_data.py
uuu0614/discordpy_util_bot
56a3bae2caf1b351d91b5515c9052a4cc716f832
[ "MIT" ]
null
null
null
dataformats/user_data.py
uuu0614/discordpy_util_bot
56a3bae2caf1b351d91b5515c9052a4cc716f832
[ "MIT" ]
2
2020-10-31T13:52:54.000Z
2021-08-13T07:07:25.000Z
from dataclasses import dataclass from mylibrary.filesystem import * class UserData: def __init__(self): self.filesystem = FileSystem()
24.666667
38
0.75
16
148
6.6875
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.182432
148
6
38
24.666667
0.884298
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
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
4cbb91baf2815fbc8faeedf24e65678fdbac9227
29
py
Python
src/collabutils/__init__.py
dlce-eva/collabutils
d30c06aac43213b1aeb020de928b1a17d6274fef
[ "Apache-2.0" ]
null
null
null
src/collabutils/__init__.py
dlce-eva/collabutils
d30c06aac43213b1aeb020de928b1a17d6274fef
[ "Apache-2.0" ]
null
null
null
src/collabutils/__init__.py
dlce-eva/collabutils
d30c06aac43213b1aeb020de928b1a17d6274fef
[ "Apache-2.0" ]
null
null
null
# __version__ = '0.1.1.dev0'
9.666667
26
0.62069
5
29
2.8
0.8
0
0
0
0
0
0
0
0
0
0
0.16
0.137931
29
2
27
14.5
0.4
0
0
0
0
0
0.357143
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
4cedb6033408d41e0329683be0de727a220d549f
295
py
Python
telegrify/__init__.py
samedamci/telegrifybot
d77af5490c2d4f5738f1bb6cfb39f8b3de9baf24
[ "0BSD" ]
1
2021-02-02T13:17:17.000Z
2021-02-02T13:17:17.000Z
telegrify/__init__.py
samedamci/telegrifybot
d77af5490c2d4f5738f1bb6cfb39f8b3de9baf24
[ "0BSD" ]
2
2021-05-05T12:45:28.000Z
2021-08-08T14:21:06.000Z
telegrify/__init__.py
samedamci/telegrifybot
d77af5490c2d4f5738f1bb6cfb39f8b3de9baf24
[ "0BSD" ]
null
null
null
from telegrask import Telegrask from .config import CLIENT_ID, CLIENT_SECRET, TOKEN from spotipy import Spotify from spotipy.oauth2 import SpotifyClientCredentials spotify = Spotify(auth_manager=SpotifyClientCredentials(CLIENT_ID, CLIENT_SECRET)) bot = Telegrask(TOKEN) from . import commands
29.5
82
0.844068
36
295
6.777778
0.444444
0.065574
0.114754
0.163934
0
0
0
0
0
0
0
0.003788
0.105085
295
9
83
32.777778
0.920455
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.714286
0
0.714286
0
0
0
0
null
0
0
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
1
0
0
4
98036c365bce910b72250f3e385e6bb3d89d8b6d
253
py
Python
tools/pythonpkg/tests/fast/test_module.py
lokax/duckdb
c2581dfebccaebae9468c924c2c722fcf0306944
[ "MIT" ]
1
2021-12-13T06:00:18.000Z
2021-12-13T06:00:18.000Z
tools/pythonpkg/tests/fast/test_module.py
lokax/duckdb
c2581dfebccaebae9468c924c2c722fcf0306944
[ "MIT" ]
32
2021-09-24T23:50:09.000Z
2022-03-29T09:37:26.000Z
tools/pythonpkg/tests/fast/test_module.py
lokax/duckdb
c2581dfebccaebae9468c924c2c722fcf0306944
[ "MIT" ]
null
null
null
import duckdb class TestModule: def test_paramstyle(self): assert duckdb.paramstyle == "qmark" def test_threadsafety(self): assert duckdb.threadsafety == 1 def test_apilevel(self): assert duckdb.apilevel == "1.0"
19.461538
43
0.660079
29
253
5.655172
0.482759
0.128049
0.292683
0
0
0
0
0
0
0
0
0.015707
0.245059
253
12
44
21.083333
0.842932
0
0
0
0
0
0.031621
0
0
0
0
0
0.375
1
0.375
false
0
0.125
0
0.625
0
1
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
0
1
0
0
4
980383a8d9fd9226257ec64930a96dff083adf88
18
py
Python
shopify/version.py
metatick/shopify_python_api
a76133de0c1cb4cda404a044604261e1bd241925
[ "MIT" ]
null
null
null
shopify/version.py
metatick/shopify_python_api
a76133de0c1cb4cda404a044604261e1bd241925
[ "MIT" ]
null
null
null
shopify/version.py
metatick/shopify_python_api
a76133de0c1cb4cda404a044604261e1bd241925
[ "MIT" ]
null
null
null
VERSION = '8.0.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
981af313564d5f0a56bada6f801a80b57c1a5337
73
py
Python
test.py
Subaharan1202/classified-auto-ad-posting
548e7b11a93c2169dba4466f91ae3deffcc3018a
[ "Apache-2.0" ]
null
null
null
test.py
Subaharan1202/classified-auto-ad-posting
548e7b11a93c2169dba4466f91ae3deffcc3018a
[ "Apache-2.0" ]
null
null
null
test.py
Subaharan1202/classified-auto-ad-posting
548e7b11a93c2169dba4466f91ae3deffcc3018a
[ "Apache-2.0" ]
null
null
null
r,x,y,z=open("ads\\1Plumber\\Ad.txt").read().split("\n", 3) print(y)
10.428571
59
0.561644
15
73
2.733333
0.933333
0
0
0
0
0
0
0
0
0
0
0.030303
0.09589
73
6
60
12.166667
0.590909
0
0
0
0
0
0.333333
0.304348
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
e22641f62ea55f0b5a40ddd9be560f4bae74e3f3
3,238
py
Python
tests/test_op_upsert.py
theruziev/asynctnt
6c22a06757d3dc45ca38ea66aafc9e84533bdbb6
[ "Apache-2.0" ]
54
2017-03-10T13:54:51.000Z
2022-02-08T08:36:09.000Z
tests/test_op_upsert.py
theruziev/asynctnt
6c22a06757d3dc45ca38ea66aafc9e84533bdbb6
[ "Apache-2.0" ]
20
2017-09-07T08:26:50.000Z
2022-01-26T22:28:56.000Z
tests/test_op_upsert.py
theruziev/asynctnt
6c22a06757d3dc45ca38ea66aafc9e84533bdbb6
[ "Apache-2.0" ]
5
2019-11-19T12:35:58.000Z
2021-08-30T09:39:05.000Z
from asynctnt import Response from asynctnt.exceptions import TarantoolSchemaError from tests import BaseTarantoolTestCase class UpsertTestCase(BaseTarantoolTestCase): async def _fill_data(self): data = [ [0, 'a', 1], [1, 'b', 0], ] for t in data: await self.conn.insert(self.TESTER_SPACE_ID, t) return data async def test__upsert_empty_one_assign(self): data = [0, 'hello2', 1, 4, 'what is up'] res = await self.conn.upsert(self.TESTER_SPACE_ID, data, [['=', 2, 2]]) self.assertIsInstance(res, Response, 'Got response') self.assertEqual(res.code, 0, 'success') self.assertGreater(res.sync, 0, 'sync > 0') self.assertResponseEqual(res, [], 'Body ok') res = await self.conn.select(self.TESTER_SPACE_ID, [0]) self.assertResponseEqual(res, [data], 'Body ok') async def test__upsert_update_one_assign(self): data = [0, 'hello2', 1, 4, 'what is up'] await self.conn.insert(self.TESTER_SPACE_ID, data) res = await self.conn.upsert(self.TESTER_SPACE_ID, data, [['=', 2, 2]]) self.assertIsInstance(res, Response, 'Got response') self.assertEqual(res.code, 0, 'success') self.assertGreater(res.sync, 0, 'sync > 0') self.assertResponseEqual(res, [], 'Body ok') res = await self.conn.select(self.TESTER_SPACE_ID, [0]) data[2] = 2 self.assertResponseEqual(res, [data], 'Body ok') async def test__upsert_by_name(self): data = [0, 'hello2', 1, 4, 'what is up'] await self.conn.upsert(self.TESTER_SPACE_NAME, data, [['=', 2, 2]]) res = await self.conn.select(self.TESTER_SPACE_ID, [0]) self.assertIsInstance(res, Response, 'Got response') self.assertEqual(res.code, 0, 'success') self.assertGreater(res.sync, 0, 'sync > 0') self.assertResponseEqual(res, [data], 'Body ok') async def test__upsert_by_name_no_schema(self): await self.tnt_reconnect(fetch_schema=False) with self.assertRaises(TarantoolSchemaError): await self.conn.upsert(self.TESTER_SPACE_NAME, [0, 'hello', 1], [['=', 2, 2]]) async def test__upsert_dict_key(self): data = { 'f1': 0, 'f2': 'hello', 'f3': 1, 'f4': 2, 'f5': 100, } res = await self.conn.upsert(self.TESTER_SPACE_ID, data, [['=', 2, 2]]) self.assertResponseEqual(res, [], 'Body ok') res = await self.conn.select(self.TESTER_SPACE_ID, [0]) self.assertResponseEqual(res, [[0, 'hello', 1, 2, 100]], 'Body ok') async def test__usert_dict_resp_no_effect(self): data = { 'f1': 0, 'f2': 'hello', 'f3': 1, 'f4': 10, 'f5': 1000, } res = await self.conn.upsert(self.TESTER_SPACE_ID, data, [['=', 2, 2]]) self.assertResponseEqual(res, [], 'Body ok')
34.817204
79
0.541075
377
3,238
4.493369
0.204244
0.069067
0.09209
0.100354
0.760921
0.747934
0.744392
0.744392
0.672373
0.645218
0
0.034169
0.322112
3,238
92
80
35.195652
0.737585
0
0
0.547945
0
0
0.071958
0
0
0
0
0
0.246575
1
0
false
0
0.041096
0
0.068493
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
e26f356ec572cd0822435ebf31ba6ab943e44657
398
py
Python
Client.py
PiecePaperCode/pyogame_REST
1ce8223322b1b814d3fc6f91ac9fa9e364ecb9e1
[ "MIT" ]
1
2022-01-29T09:47:19.000Z
2022-01-29T09:47:19.000Z
Client.py
PiecePaperCode/pyogame_REST
1ce8223322b1b814d3fc6f91ac9fa9e364ecb9e1
[ "MIT" ]
null
null
null
Client.py
PiecePaperCode/pyogame_REST
1ce8223322b1b814d3fc6f91ac9fa9e364ecb9e1
[ "MIT" ]
null
null
null
import requests def get(function): return requests.get('http://127.0.0.1:5000/{}'.format(function)).json() def post(function, json): return requests.post('http://127.0.0.1:5000/{}'.format(function), json=json).json() print(post('login', {'universe': 'UNI', 'username': 'USER', 'password': 'PASSWORD'})) print(get('attacked')) print(post('supply', {'id': 12345})) print(get('logout'))
24.875
87
0.650754
55
398
4.709091
0.472727
0.138996
0.061776
0.069498
0.247104
0.247104
0.247104
0.247104
0.247104
0
0
0.069444
0.095477
398
15
88
26.533333
0.65
0
0
0
0
0
0.286432
0
0
0
0
0
0
1
0.222222
false
0.111111
0.111111
0.222222
0.555556
0.444444
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
0
1
0
4
e2952edcd8de9fa45d4b8c89db7d39da9e676d3e
154
py
Python
tasks/annotation_task/tasks.py
lvyufeng/KGEditer
166fadca4f49bd10e97fd5748ce5262fcffbecf1
[ "MIT" ]
5
2021-01-12T01:27:29.000Z
2022-03-18T04:25:35.000Z
tasks/annotation_task/tasks.py
lvyufeng/KGEditer
166fadca4f49bd10e97fd5748ce5262fcffbecf1
[ "MIT" ]
null
null
null
tasks/annotation_task/tasks.py
lvyufeng/KGEditer
166fadca4f49bd10e97fd5748ce5262fcffbecf1
[ "MIT" ]
1
2021-06-22T08:20:05.000Z
2021-06-22T08:20:05.000Z
# get raw data from text # run entity recognition and relation extraction services # to get useful triple data # add triple data into arangodb(tmp data)
25.666667
57
0.779221
24
154
5
0.791667
0.166667
0
0
0
0
0
0
0
0
0
0
0.181818
154
6
58
25.666667
0.952381
0.935065
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
e298efb8f94426a66dfc46d97703ac8133da5196
454
py
Python
projects/08/app/branching.py
Liquidibrium/nand2tetris
927d222e7556b9aab0f5b4d2f28b92dce1cf2346
[ "MIT" ]
null
null
null
projects/08/app/branching.py
Liquidibrium/nand2tetris
927d222e7556b9aab0f5b4d2f28b92dce1cf2346
[ "MIT" ]
null
null
null
projects/08/app/branching.py
Liquidibrium/nand2tetris
927d222e7556b9aab0f5b4d2f28b92dce1cf2346
[ "MIT" ]
null
null
null
from typing import Tuple def _goto(label_name: str) -> Tuple[str, ...]: return "//goto ", f"@{label_name}", "0;JMP" def _if_goto(label_name: str) -> Tuple[str, ...]: return "//if goto ", "@SP", "AM=M-1", "D=M", f"@{label_name}", "D;JNE" def _label(label_name: str) -> Tuple[str, ...]: return "//label", f"({label_name})" # can be rewritten only with lambda function branch_dict = {"goto": _goto, "if-goto": _if_goto, "label": _label}
25.222222
74
0.605727
69
454
3.768116
0.42029
0.207692
0.138462
0.196154
0.330769
0.330769
0.230769
0
0
0
0
0.005277
0.165198
454
17
75
26.705882
0.680739
0.092511
0
0
0
0
0.24878
0
0
0
0
0
0
1
0.375
false
0
0.125
0.375
0.875
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
1
0
0
0
1
0
0
0
4
e2a3fa54ddc7d160b846c8db7e040ae5a1ec99ef
588
py
Python
astropy/units/quantity_helper/__init__.py
zabop/astropy
11b3214f18b74aea5e3f8349e50ae1b09c39d30e
[ "BSD-3-Clause" ]
1
2019-03-11T12:26:49.000Z
2019-03-11T12:26:49.000Z
astropy/units/quantity_helper/__init__.py
nabobalis/astropy
9f77b9a0ffe18e4c767e36f00e2e8728135c0e11
[ "BSD-3-Clause" ]
1
2019-10-09T18:54:27.000Z
2019-10-09T18:54:27.000Z
astropy/units/quantity_helper/__init__.py
nabobalis/astropy
9f77b9a0ffe18e4c767e36f00e2e8728135c0e11
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Helper functions for Quantity. In particular, this implements the logic that determines scaling and result units for a given ufunc, given input units. """ from .converters import * # isort: split # By importing helpers, all the unit conversion functions needed for # numpy ufuncs and functions are defined. # For scipy.special and erfa, importing the helper modules ensures # the definitions are added as modules to UFUNC_HELPERS, to be loaded # on demand. from . import erfa, function_helpers, helpers, scipy_special
34.588235
75
0.782313
87
588
5.252874
0.678161
0.052516
0
0
0
0
0
0
0
0
0
0.002028
0.161565
588
16
76
36.75
0.924949
0.812925
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
e2a8e2c0760f42800d73f8b2bad5eff91306f4a1
22
py
Python
appdaemon/version.py
nivekmai/appdaemon
b2e2cea1175d39343dc4bfee631cdc3ed1452628
[ "Apache-2.0" ]
null
null
null
appdaemon/version.py
nivekmai/appdaemon
b2e2cea1175d39343dc4bfee631cdc3ed1452628
[ "Apache-2.0" ]
null
null
null
appdaemon/version.py
nivekmai/appdaemon
b2e2cea1175d39343dc4bfee631cdc3ed1452628
[ "Apache-2.0" ]
null
null
null
__version__ = "4.0.5"
11
21
0.636364
4
22
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.368421
0
0
0
0
0
0.227273
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
e2b0226d7a0128250eb3a3de0deaa1676922d107
91
py
Python
mathmodule_pkg/calculus/__init__.py
Retr0MrWave/mathModule
6c538e5d8c77e8bb4e4117de0246c493abeda994
[ "MIT" ]
null
null
null
mathmodule_pkg/calculus/__init__.py
Retr0MrWave/mathModule
6c538e5d8c77e8bb4e4117de0246c493abeda994
[ "MIT" ]
null
null
null
mathmodule_pkg/calculus/__init__.py
Retr0MrWave/mathModule
6c538e5d8c77e8bb4e4117de0246c493abeda994
[ "MIT" ]
null
null
null
from .DerrivativeAndIntegral import derrivative, integral all = ["derrivative", "integral"]
45.5
57
0.802198
8
91
9.125
0.75
0.520548
0
0
0
0
0
0
0
0
0
0
0.087912
91
2
58
45.5
0.879518
0
0
0
0
0
0.206522
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
2c696a68858490516014195a98a7ba9ac0154dfc
95
py
Python
2018/day12.py
jmooo/adventofcode
9805887165281ef2aa20e3633b4796edf3eb951f
[ "MIT" ]
null
null
null
2018/day12.py
jmooo/adventofcode
9805887165281ef2aa20e3633b4796edf3eb951f
[ "MIT" ]
null
null
null
2018/day12.py
jmooo/adventofcode
9805887165281ef2aa20e3633b4796edf3eb951f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def load_input(rules='day12.input_rules', state='day12.input_state'):
19
69
0.747368
15
95
4.533333
0.666667
0.294118
0
0
0
0
0
0
0
0
0
0.056818
0.073684
95
4
70
23.75
0.715909
0.221053
0
0
0
0
0.465753
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
2c700225af1d49ccb7fe2ee9e38a6d47e5609d25
135
py
Python
function_w_multiple_parameters.py
gsandoval49/stp
b56e778101d29732adc4629e101cccf290dcb9e9
[ "Apache-2.0" ]
null
null
null
function_w_multiple_parameters.py
gsandoval49/stp
b56e778101d29732adc4629e101cccf290dcb9e9
[ "Apache-2.0" ]
null
null
null
function_w_multiple_parameters.py
gsandoval49/stp
b56e778101d29732adc4629e101cccf290dcb9e9
[ "Apache-2.0" ]
null
null
null
# If you want your function to accept more than one parameter def f(x, y, z): return x + y + z result = f(1, 2, 3) print(result)
16.875
61
0.637037
27
135
3.185185
0.814815
0.046512
0.069767
0
0
0
0
0
0
0
0
0.029703
0.251852
135
7
62
19.285714
0.821782
0.437037
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0.25
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
1
0
0
0
4
2c706abbc5797186f8e21bb93e4a1c172ae16d76
812
py
Python
WebClassApp/cursos/migrations/0003_auto_20191005_2100.py
jesuscol96/WebClassApp
092bde4cb16f09f3efafc32af904715fae59773a
[ "MIT" ]
null
null
null
WebClassApp/cursos/migrations/0003_auto_20191005_2100.py
jesuscol96/WebClassApp
092bde4cb16f09f3efafc32af904715fae59773a
[ "MIT" ]
null
null
null
WebClassApp/cursos/migrations/0003_auto_20191005_2100.py
jesuscol96/WebClassApp
092bde4cb16f09f3efafc32af904715fae59773a
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-10-06 01:00 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cursos', '0002_auto_20191005_1923'), ] operations = [ migrations.RemoveField( model_name='comments', name='category_id', ), migrations.RemoveField( model_name='comments', name='item_id', ), migrations.RemoveField( model_name='courseuser', name='category_id', ), migrations.RemoveField( model_name='courseuser', name='user_account_id', ), migrations.RemoveField( model_name='views', name='user_account_id', ), ]
23.882353
48
0.518473
70
812
5.8
0.5
0.258621
0.320197
0.369458
0.55665
0.477833
0.35468
0
0
0
0
0.061265
0.376847
812
33
49
24.606061
0.741107
0.055419
0
0.666667
1
0
0.17623
0.031421
0
0
0
0
0
1
0
false
0
0.037037
0
0.148148
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2c76a71b81ad5d289ae2ba4a083ecf2ddeca4d19
364
py
Python
rtamt/exception/ltl/exception.py
xiaoyaooo/rtamt
edb7bf664720c52e9d70920102c450b1f593af95
[ "BSD-3-Clause" ]
24
2019-12-04T00:20:16.000Z
2022-03-24T17:48:14.000Z
rtamt/exception/ltl/exception.py
xiaoyaooo/rtamt
edb7bf664720c52e9d70920102c450b1f593af95
[ "BSD-3-Clause" ]
142
2020-01-16T15:36:21.000Z
2022-03-28T20:40:45.000Z
rtamt/exception/ltl/exception.py
xiaoyaooo/rtamt
edb7bf664720c52e9d70920102c450b1f593af95
[ "BSD-3-Clause" ]
17
2020-07-07T20:32:08.000Z
2022-03-07T07:20:22.000Z
from rtamt.exception.exception import RTAMTException class LTLException(RTAMTException): pass class LTLPastifyException(LTLException): pass class LTLParseException(LTLException): pass class LTLOfflineException(LTLException): pass class LTLSpecificationException(LTLException): pass class LTLNotImplementedException(LTLException): pass
19.157895
52
0.804945
30
364
9.766667
0.433333
0.153584
0.286689
0
0
0
0
0
0
0
0
0
0.14011
364
19
53
19.157895
0.936102
0
0
0.461538
0
0
0
0
0
0
0
0
0
1
0
true
0.461538
0.076923
0
0.538462
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
0
1
1
0
0
1
0
0
4
2c872e826c68c5a0b6f1db2a0db9472799ec4485
242
py
Python
my_test.py
athenian-computational-thinking/largest-of-3-assignment-template
09f7eb9a6613f80c54e7d0b4d670959376f8d1a2
[ "Apache-2.0" ]
null
null
null
my_test.py
athenian-computational-thinking/largest-of-3-assignment-template
09f7eb9a6613f80c54e7d0b4d670959376f8d1a2
[ "Apache-2.0" ]
null
null
null
my_test.py
athenian-computational-thinking/largest-of-3-assignment-template
09f7eb9a6613f80c54e7d0b4d670959376f8d1a2
[ "Apache-2.0" ]
null
null
null
from my_code import largest_num def test_inc(): assert 12 == largest_num(2, 12, 6) assert 17 == largest_num(17, 5, 17) assert 0 == largest_num(-3, -1, 0) assert 5 == largest_num(5, 2, 2) assert 7 == largest_num(2, 6, 7)
24.2
39
0.615702
44
242
3.204545
0.431818
0.425532
0.156028
0
0
0
0
0
0
0
0
0.13587
0.239669
242
9
40
26.888889
0.630435
0
0
0
0
0
0
0
0
0
0
0
0.714286
1
0.142857
true
0
0.142857
0
0.285714
0
0
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
1
0
0
1
0
0
0
0
0
0
4
e2e0fba20f0451c4b75349d7121d1d82b864c69b
238
py
Python
sectors.py
qwe123coder/Spaceflight2d
c6d83b16ea5aa14389c4eb62023b0129b2d9ba26
[ "MIT" ]
null
null
null
sectors.py
qwe123coder/Spaceflight2d
c6d83b16ea5aa14389c4eb62023b0129b2d9ba26
[ "MIT" ]
10
2021-09-18T10:09:55.000Z
2021-09-22T15:26:57.000Z
sectors.py
qwe123coder/Spaceflight2d
c6d83b16ea5aa14389c4eb62023b0129b2d9ba26
[ "MIT" ]
1
2021-09-20T06:36:14.000Z
2021-09-20T06:36:14.000Z
SECTOR_SIZE = 40000 def pixels2sector(x, y): return str(int(x/SECTOR_SIZE+.5)) + ":" + str(int(-y/SECTOR_SIZE+.5)) def sector2pixels(sec): x, y = sec.split(":") return int(x)*SECTOR_SIZE, -int(y)*SECTOR_SIZE
18.307692
74
0.60084
36
238
3.833333
0.388889
0.362319
0.144928
0.202899
0
0
0
0
0
0
0
0.048128
0.214286
238
12
75
19.833333
0.68984
0
0
0
0
0
0.008929
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
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
1
0
0
0
1
0
0
0
4
e2e2fd63be7293503df148fc9df0736f2850a9a7
191
py
Python
5-functions/code-demo/setup_window.py
ying-teaching/python
0bb04ef49655dad559e152d3e4a5864425150b19
[ "Apache-2.0" ]
10
2020-08-24T19:37:06.000Z
2021-08-25T03:51:01.000Z
5-functions/code-demo/setup_window.py
ying-teaching/python
0bb04ef49655dad559e152d3e4a5864425150b19
[ "Apache-2.0" ]
null
null
null
5-functions/code-demo/setup_window.py
ying-teaching/python
0bb04ef49655dad559e152d3e4a5864425150b19
[ "Apache-2.0" ]
7
2020-09-17T21:22:15.000Z
2022-01-19T12:58:42.000Z
import turtle # Task1: Setup the window 600 * 600 SCREEN_WIDTH = 600 # Screen width SCREEN_HEIGHT = 600 # Screen height def setup_window(): turtle.setup(SCREEN_WIDTH, SCREEN_HEIGHT)
27.285714
45
0.743455
27
191
5.074074
0.407407
0.19708
0.20438
0.335766
0
0
0
0
0
0
0
0.083333
0.183246
191
7
45
27.285714
0.794872
0.314136
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.4
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
3905f7a82add3bf2d66da78e7e8bee1f91c9c59f
6,077
py
Python
zeus/migrations/0e26830acd30_refactor_bundlestats.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
221
2017-07-03T17:29:21.000Z
2021-12-07T19:56:59.000Z
zeus/migrations/0e26830acd30_refactor_bundlestats.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
298
2017-07-04T18:08:14.000Z
2022-03-03T22:24:51.000Z
zeus/migrations/0e26830acd30_refactor_bundlestats.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
24
2017-07-15T13:46:45.000Z
2020-08-16T16:14:45.000Z
"""refactor_bundlestats Revision ID: 0e26830acd30 Revises: 89a8aa1c611c Create Date: 2018-01-05 13:26:00.762058 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql import zeus # revision identifiers, used by Alembic. revision = "0e26830acd30" down_revision = "89a8aa1c611c" branch_labels = () depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table( "bundle_asset", sa.Column("job_id", zeus.db.types.guid.GUID(), nullable=False), sa.Column("name", sa.Text(), nullable=False), sa.Column("size", sa.Integer(), nullable=True), sa.Column("chunk_names", postgresql.ARRAY(sa.String()), nullable=True), sa.Column("repository_id", zeus.db.types.guid.GUID(), nullable=False), sa.Column("id", zeus.db.types.guid.GUID(), nullable=False), sa.Column( "date_created", sa.TIMESTAMP(timezone=True), server_default=sa.text("now()"), nullable=False, ), sa.ForeignKeyConstraint(["job_id"], ["job.id"], ondelete="CASCADE"), sa.ForeignKeyConstraint( ["repository_id"], ["repository.id"], ondelete="CASCADE" ), sa.PrimaryKeyConstraint("id"), sa.UniqueConstraint("job_id", "name", name="unq_bundle_asset"), ) op.create_index( op.f("ix_bundle_asset_repository_id"), "bundle_asset", ["repository_id"], unique=False, ) op.create_table( "bundle_entrypoint", sa.Column("job_id", zeus.db.types.guid.GUID(), nullable=False), sa.Column("name", sa.Text(), nullable=False), sa.Column("repository_id", zeus.db.types.guid.GUID(), nullable=False), sa.Column("id", zeus.db.types.guid.GUID(), nullable=False), sa.Column( "date_created", sa.TIMESTAMP(timezone=True), server_default=sa.text("now()"), nullable=False, ), sa.ForeignKeyConstraint(["job_id"], ["job.id"], ondelete="CASCADE"), sa.ForeignKeyConstraint( ["repository_id"], ["repository.id"], ondelete="CASCADE" ), sa.PrimaryKeyConstraint("id"), sa.UniqueConstraint("job_id", "name", name="unq_bundle_entrypoint"), ) op.create_index( op.f("ix_bundle_entrypoint_repository_id"), "bundle_entrypoint", ["repository_id"], unique=False, ) op.create_table( "bundle_entrypoint_asset", sa.Column("entrypoint_id", zeus.db.types.guid.GUID(), nullable=False), sa.Column("asset_id", zeus.db.types.guid.GUID(), nullable=False), sa.ForeignKeyConstraint(["asset_id"], ["bundle_asset.id"]), sa.ForeignKeyConstraint(["entrypoint_id"], ["bundle_entrypoint.id"]), sa.PrimaryKeyConstraint("entrypoint_id", "asset_id"), ) op.drop_table("webpack_entrypoint") op.drop_table("webpack_asset") # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table( "webpack_asset", sa.Column("job_id", postgresql.UUID(), autoincrement=False, nullable=False), sa.Column("filename", sa.TEXT(), autoincrement=False, nullable=False), sa.Column("size", sa.INTEGER(), autoincrement=False, nullable=True), sa.Column( "chunk_names", postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True, ), sa.Column( "repository_id", postgresql.UUID(), autoincrement=False, nullable=False ), sa.Column("id", postgresql.UUID(), autoincrement=False, nullable=False), sa.Column( "date_created", postgresql.TIMESTAMP(timezone=True), server_default=sa.text("now()"), autoincrement=False, nullable=False, ), sa.ForeignKeyConstraint( ["job_id"], ["job.id"], name="webpack_asset_job_id_fkey", ondelete="CASCADE" ), sa.ForeignKeyConstraint( ["repository_id"], ["repository.id"], name="webpack_asset_repository_id_fkey", ondelete="CASCADE", ), sa.PrimaryKeyConstraint("id", name="webpack_asset_pkey"), sa.UniqueConstraint("job_id", "filename", name="unq_webpack_asset"), ) op.create_table( "webpack_entrypoint", sa.Column("job_id", postgresql.UUID(), autoincrement=False, nullable=False), sa.Column("name", sa.TEXT(), autoincrement=False, nullable=False), sa.Column( "asset_names", postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True, ), sa.Column( "repository_id", postgresql.UUID(), autoincrement=False, nullable=False ), sa.Column("id", postgresql.UUID(), autoincrement=False, nullable=False), sa.Column( "date_created", postgresql.TIMESTAMP(timezone=True), server_default=sa.text("now()"), autoincrement=False, nullable=False, ), sa.ForeignKeyConstraint( ["job_id"], ["job.id"], name="webpack_entrypoint_job_id_fkey", ondelete="CASCADE", ), sa.ForeignKeyConstraint( ["repository_id"], ["repository.id"], name="webpack_entrypoint_repository_id_fkey", ondelete="CASCADE", ), sa.PrimaryKeyConstraint("id", name="webpack_entrypoint_pkey"), sa.UniqueConstraint("job_id", "name", name="unq_webpack_entrypoint"), ) op.drop_table("bundle_entrypoint_asset") op.drop_index( op.f("ix_bundle_entrypoint_repository_id"), table_name="bundle_entrypoint" ) op.drop_table("bundle_entrypoint") op.drop_index(op.f("ix_bundle_asset_repository_id"), table_name="bundle_asset") op.drop_table("bundle_asset") # ### end Alembic commands ###
35.538012
88
0.603752
636
6,077
5.578616
0.139937
0.060879
0.09301
0.10062
0.800451
0.764938
0.735626
0.709696
0.644307
0.584555
0
0.010953
0.248807
6,077
170
89
35.747059
0.766265
0.049696
0
0.630872
0
0
0.211223
0.063088
0
0
0
0
0
1
0.013423
false
0
0.026846
0
0.040268
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
3936ee010960122bea12055cf82508eb0a7e73bd
534
py
Python
src/model_drift/drift/metrics/__init__.py
microsoft/MedImaging-ModelDriftMonitoring
35cc142a9175f589c9c25db73ba78531be3c133e
[ "MIT" ]
5
2022-03-20T21:33:25.000Z
2022-03-25T16:48:37.000Z
src/model_drift/drift/metrics/__init__.py
microsoft/MedImaging-ModelDriftMonitoring
35cc142a9175f589c9c25db73ba78531be3c133e
[ "MIT" ]
null
null
null
src/model_drift/drift/metrics/__init__.py
microsoft/MedImaging-ModelDriftMonitoring
35cc142a9175f589c9c25db73ba78531be3c133e
[ "MIT" ]
1
2022-03-22T21:44:19.000Z
2022-03-22T21:44:19.000Z
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ------------------------------------------------------------------------------------------ from .categorical import ChiSqDriftCalculator # noqa from .numeric import KSDriftCalculator # noqa from .sampler import Sampler # noqa from .tabular import TabularDriftCalculator # noqa
59.333333
94
0.513109
42
534
6.52381
0.666667
0.087591
0
0
0
0
0
0
0
0
0
0
0.11236
534
8
95
66.75
0.578059
0.662921
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
39518a03deab7319a9372abd99a1166c71478bcb
370
py
Python
config.py
harrinupponen/wizardify
a602984dd591701e18035e93b210d81ebba8bd94
[ "MIT" ]
null
null
null
config.py
harrinupponen/wizardify
a602984dd591701e18035e93b210d81ebba8bd94
[ "MIT" ]
11
2020-05-13T06:35:29.000Z
2022-02-10T01:53:18.000Z
config.py
harrinupponen/wizardify
a602984dd591701e18035e93b210d81ebba8bd94
[ "MIT" ]
null
null
null
import os # Flask and some of its extensions use the value of the secret key as # a cryptographic key, useful to generate signatures or tokens. The Flask-WTF # extension uses it to protect web forms against a nasty attack called # Cross-Site Request Forgery or CSRF class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess-do-you-?'
41.111111
80
0.764865
63
370
4.460317
0.761905
0.096085
0
0
0
0
0
0
0
0
0
0
0.162162
370
9
80
41.111111
0.906452
0.667568
0
0
1
0
0.327731
0.243697
0
0
0
0
0
1
0
false
0
0.333333
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1a301ff37e88e50ec5a25135e53b40398b1416e6
987
py
Python
tests/reporting_tests.py
harry-wood/Open_NaPTAN
4c0e958871f8fdafaa373e08e02961f31961da74
[ "MIT" ]
null
null
null
tests/reporting_tests.py
harry-wood/Open_NaPTAN
4c0e958871f8fdafaa373e08e02961f31961da74
[ "MIT" ]
null
null
null
tests/reporting_tests.py
harry-wood/Open_NaPTAN
4c0e958871f8fdafaa373e08e02961f31961da74
[ "MIT" ]
null
null
null
# report_tests.py import unittest import reporting as report from unittest.mock import MagicMock, Mock class ReportTestSolver(unittest.TestCase): """[summary] Args: unittest ([type]): [description] """ def nodes_error_reporting_tests(self): """[summary] """ report.nodes_error_reporting() def error_folder_created(self): """[summary] """ pass def error_report_created(self): """[summary] """ pass def plot_missing_data_tests(self): """[summary] """ report.plot_missing_data() def list_unique_values_tests(self): """[summary] """ report.list_unique_values() def print_column_info_tests(self): """[summary] """ report.print_column_info() def visualise_missing_counts_tests(self): """[summary] """ report.visualise_missing_counts()
20.5625
45
0.564336
93
987
5.666667
0.376344
0.14611
0.151803
0.208729
0.094877
0
0
0
0
0
0
0
0.318136
987
47
46
21
0.783061
0.213779
0
0.111111
0
0
0
0
0
0
0
0
0
1
0.388889
false
0.111111
0.166667
0
0.611111
0.111111
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
1
0
0
1
0
0
4
1a346971efea37ba3221dbdc8a7334f646b5d37a
340
py
Python
register/views.py
GAUTHAM31/JobfairReg
41fe48b542e35c0e5c1abfd8db79d4ea6da86c2c
[ "MIT" ]
null
null
null
register/views.py
GAUTHAM31/JobfairReg
41fe48b542e35c0e5c1abfd8db79d4ea6da86c2c
[ "MIT" ]
null
null
null
register/views.py
GAUTHAM31/JobfairReg
41fe48b542e35c0e5c1abfd8db79d4ea6da86c2c
[ "MIT" ]
null
null
null
from register.models import jfuser,jfcompany,jfadmin,usercompany from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.shortcuts import render_to_response from django.shortcuts import render from django.http import Http404, HttpResponseRedirect, HttpResponse # Create your views here.
37.777778
67
0.852941
45
340
6.4
0.577778
0.173611
0.118056
0.145833
0.215278
0
0
0
0
0
0
0.009772
0.097059
340
8
68
42.5
0.928339
0.067647
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
1a4285b4de50802553741969fb5aa6cbee04d66b
91
py
Python
corecode/apps.py
directoryxx/Django-School-Management-System
849055350d4285014cb283ce2548877393c4ac69
[ "MIT" ]
null
null
null
corecode/apps.py
directoryxx/Django-School-Management-System
849055350d4285014cb283ce2548877393c4ac69
[ "MIT" ]
9
2021-03-19T04:24:05.000Z
2022-03-12T00:33:21.000Z
corecode/apps.py
directoryxx/Django-School-Management-System
849055350d4285014cb283ce2548877393c4ac69
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CorecodeConfig(AppConfig): name = 'corecode'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
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
1acfcbe4387c6bdab4de689e27663d665a2a74ad
4,150
py
Python
pydraw/__init__.py
karimbahgat/PyDraw
cebfd8dae4211c63047a925dac1936d9f6535ba7
[ "MIT" ]
2
2016-11-23T14:06:01.000Z
2021-02-02T07:47:50.000Z
pydraw/__init__.py
karimbahgat/PyDraw
cebfd8dae4211c63047a925dac1936d9f6535ba7
[ "MIT" ]
null
null
null
pydraw/__init__.py
karimbahgat/PyDraw
cebfd8dae4211c63047a925dac1936d9f6535ba7
[ "MIT" ]
1
2020-06-13T07:54:48.000Z
2020-06-13T07:54:48.000Z
""" PyDraw v0.1 ## Introduction PyDraw is a pure-Python drawing library. The reason for making this library was to experiment with new drawing features to merge with the pure-Python "Pymaging" library. But since Pymaging still hasn't been released in a working-version aimed for end-users, I'm just releasing this as a separate package until it can hopefully be incorporated into the Pymaging library later on. PyDraw might also be interesting in itself since it incredibly lightweight, straightforward to use, and provides not only basic drawing but also some advanced features. One of the joys of it being pure-Python is that it becomes fairly easy and way more accessible for even novice Python programmers to experiment with and extend its drawing functionality and routines. Main features include: - uses similar drawing commands to those used in PIL and Aggdraw - the user can draw on a new empty image, open an existing one, and save the image to file - draws various graphical primitives: - lines - circles - multilines - polygons - bezier curves - drawings uses antialising (smooth sub-pixel precision) - offers exact and fuzzy floodfill coloring of large areas (however, fuzzy floodfill is currently way too slow to be used) - can also transform images - perspective transform, ie 3d tilting of an image - sphere/stereographic transform, ie 3d globe effect (partially working, partially not) The main backdraws currently are: - only support for reading/writing gif images, and if you use too many colors the gif image won't save - while transparent gif images can be read, transparency will not be saved (becomes black) - not as fast as C-based libraries (on average 10x slower) - not a stable version yet, so several lacking features and errors (see Status below) ## Basic Usage A typical example of how to use it would be: ``` import pydraw img = pydraw.Image().new(width=500,height=500) img.drawbezier([(22,22),(88,88),(188,22),(333,88)], fillcolor=(222,0,0)) img.drawcircle(333,111,fillsize=55,outlinecolor=(222,222,0)) img.drawline(0,250,499,250, fillcolor=(222,222,222)) img.floodfill(444,444,fillcolor=(0,222,0)) img.floodfill(222,222,fillcolor=(0,0,222)) img.view() ``` ## Requires: No dependencies; everything is written with the standard builtin Python library. This is mainly thanks to the basic read-write capabilities of the Tkinter PhotoImage class. Also tested to work on both Python 2.x and 3.x. ## Status: Main features are working okay so should be able to be used by end-users. However, still in its most basic alpha-version, which means there may be many bugs. But most importantly it is lacking a few crucial drawing features, which will be added in the future, such as: - None of the primitives are being filled correctly (so drawing is limited to outlines) - Thick multilines and thick polygon outlines appear choppy, need to add smooth join rules - Lines need to be capped at their ends, with option for rounded caps - Need more basic image transforms, such as rotate and flip - Support for saving transparency, and drawing partially transparent colors - Support for various color formats besides RGB (such as hex or colornames) - And most importantly, more image formats ## License: This code is free to share, use, reuse, and modify according to the MIT license, see license.txt ## Credits: Karim Bahgat (2014) Several Stackoverflow posts have been helpful for adding certain features, and in some cases the code has been taken directly from the posts. In other cases help and code has been found on websites. In all such cases, the appropriate credit is given in the code. ## Contributors I welcome any efforts to contribute code, particularly for: - optimizing for speed, particularly the floodfill algorithm and its fuzzy variant - adding/improving/correcting any rendering algorithms - improve the quality of antialiasing, is currently still somewhat choppy - fixing why image transform results in weird ripples and holes in the images - adding new features (see Status above) """ import core, coordinate_transformer from core import * from coordinate_transformer import *
41.919192
122
0.781205
663
4,150
4.886878
0.499246
0.007407
0.009877
0
0
0
0
0
0
0
0
0.027874
0.161446
4,150
98
123
42.346939
0.903161
0.974458
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
46d3951d77bd899263ecfd9160a91b8a4be04cbf
40
py
Python
examples/__init__.py
cuenca-mx/agave
d4719bdbab8e200c98d206475df6adb275e9fdcc
[ "MIT" ]
3
2020-12-11T16:48:44.000Z
2021-03-29T00:05:57.000Z
examples/__init__.py
cuenca-mx/agave
d4719bdbab8e200c98d206475df6adb275e9fdcc
[ "MIT" ]
115
2020-08-26T13:26:07.000Z
2022-03-31T23:58:22.000Z
examples/__init__.py
cuenca-mx/agave
d4719bdbab8e200c98d206475df6adb275e9fdcc
[ "MIT" ]
null
null
null
__all__ = ['app'] from .app import app
10
20
0.65
6
40
3.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.2
40
3
21
13.333333
0.6875
0
0
0
0
0
0.075
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
202d6ed19fa156417a2b84405ae4b7f1ce791ad0
52
py
Python
gunicorn.conf.py
wirrja/squidward
72945f6898f567e577aa74680b2a518b8e9a2b59
[ "Apache-2.0" ]
null
null
null
gunicorn.conf.py
wirrja/squidward
72945f6898f567e577aa74680b2a518b8e9a2b59
[ "Apache-2.0" ]
null
null
null
gunicorn.conf.py
wirrja/squidward
72945f6898f567e577aa74680b2a518b8e9a2b59
[ "Apache-2.0" ]
null
null
null
bind = '127.0.0.1:8000' workers = 5 user = "nobody"
13
23
0.615385
10
52
3.2
0.9
0
0
0
0
0
0
0
0
0
0
0.255814
0.173077
52
3
24
17.333333
0.488372
0
0
0
0
0
0.384615
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
2041ca277d0ea87bdc9f3e1c404b0214505250e1
1,357
py
Python
jacket/db/api.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/db/api.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/db/api.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.000Z
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Defines interface for DB access. Functions in this module are imported into the compute.db namespace. Call these functions from compute.db namespace, not the compute.db.api namespace. All functions in this module return objects that implement a dictionary-like interface. Currently, many of these objects are sqlalchemy objects that implement a dictionary interface. However, a future goal is to have all of these objects be simple dictionaries. """ from jacket.db.compute.api import * from jacket.db.storage.api import * from jacket.db.extend.api import *
42.40625
79
0.767133
204
1,357
5.102941
0.568627
0.057637
0.034582
0.03074
0.099904
0
0
0
0
0
0
0.010714
0.17465
1,357
32
80
42.40625
0.91875
0.890936
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
64497b3abcc7778cd2c5f9570e509f3150ee1f6f
186
py
Python
hassio-google-drive-backup/setup.py
voxipbx/hassio-addons
ddf2f1745f4240c2905f9f9d7616a927fb8934e4
[ "MIT" ]
1
2022-01-22T18:27:04.000Z
2022-01-22T18:27:04.000Z
hassio-google-drive-backup/setup.py
voxipbx/hassio-addons
ddf2f1745f4240c2905f9f9d7616a927fb8934e4
[ "MIT" ]
19
2021-09-29T06:13:25.000Z
2022-03-08T06:13:49.000Z
hassio-google-drive-backup/setup.py
voxipbx/hassio-addons
ddf2f1745f4240c2905f9f9d7616a927fb8934e4
[ "MIT" ]
1
2021-12-12T19:31:05.000Z
2021-12-12T19:31:05.000Z
from setuptools import setup, find_packages setup( name="hgdb", packages=find_packages(), package_data={ 'backup': ['static/*', 'static/*/*', 'static/*/*/*'] } )
20.666667
60
0.580645
18
186
5.833333
0.666667
0.228571
0
0
0
0
0
0
0
0
0
0
0.209677
186
8
61
23.25
0.714286
0
0
0
0
0
0.215054
0
0
0
0
0
0
1
0
true
0
0.125
0
0.125
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
64559197ba549d4bb8f28c26324d734bb74e97a2
28
py
Python
appengine/predator/third_party/six.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/predator/third_party/six.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/predator/third_party/six.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
../../third_party/six/six.py
28
28
0.678571
5
28
3.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0
28
1
28
28
0.642857
0
0
0
0
0
0
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
646721244061093f58cae41818d14d4c7122acca
2,644
py
Python
tests/classes.py
jeshan/pytest-cleanup
16371d41d4203906e3b8fe7e19e32709dc374a13
[ "MIT" ]
7
2020-01-26T08:46:12.000Z
2021-01-04T00:01:36.000Z
tests/classes.py
jeshan/pytest-cleanup
16371d41d4203906e3b8fe7e19e32709dc374a13
[ "MIT" ]
1
2020-01-27T21:20:41.000Z
2020-01-28T07:17:44.000Z
tests/classes.py
jeshan/pytest-cleanup
16371d41d4203906e3b8fe7e19e32709dc374a13
[ "MIT" ]
1
2020-01-26T11:04:50.000Z
2020-01-26T11:04:50.000Z
import threading class Hi: pass class Inner1: class Inner: pass def go(self): return Inner1.Inner class Inner2: class Inner: def __init__(self, value): self.value = value def go(self): return 1 def __eq__(self, other): return isinstance(other, self.__class__) and self.value == other.value def go(self): return Inner2.Inner(1) class Inner3: class Inner: def go(self): return 1 def go(self): return Inner3.Inner().go() class Inner4: class Inner: def higher_order(self, fn): return fn def pass_inner(self, fn): inner = Inner4.Inner() return inner.higher_order(fn) class Inner5: class Inner: def higher_order(self, fn): return fn def pass_inner(self, clazz): return Inner5.Inner def pass_back(self, clazz): return clazz class Hey: def __init__(self, value): super(Hey, self).__init__() from random import random self.value = value * random() def go_instance(self): print('in go_instance') self.go_instance2() return self.value * 3 def go_instance2(self): print('in go_instance2') return self.value * 33 def call_all_method(self): """calls different class methods to confirm calling all supported method types are properly recorded""" self.go_instance() Hey.go_static() Hey.go_class() @staticmethod def call_all_static_method(): """calls different class methods to confirm calling all supported method types are properly recorded""" Hey(3).go_instance() Hey.go_static() Hey.go_class() @classmethod def call_all_class_method(cls): """calls different class methods to confirm calling all supported method types are properly recorded""" Hey(4).go_instance() Hey.go_static() cls.go_static() cls.go_class() Hey.go_class() @staticmethod def go_static(): print('in static') Hey.go_static2() return 'static' @staticmethod def go_static2(): print('in static2') return 'static2' @classmethod def go_class(cls): print('in class') cls.go_class2() return 123 @classmethod def go_class2(cls): print('in class2') return 321 class HeyThread(threading.Thread): def __init__(self, value): super(HeyThread, self).__init__() def run(self): print('running')
20.496124
111
0.590393
320
2,644
4.678125
0.2
0.03674
0.03006
0.0501
0.43153
0.311289
0.285905
0.285905
0.244489
0.244489
0
0.018795
0.315809
2,644
128
112
20.65625
0.808734
0.110817
0
0.366667
0
0
0.036403
0
0
0
0
0
0
1
0.266667
false
0.055556
0.022222
0.111111
0.622222
0.077778
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
647dc2afb37b86a2d0c014f0c58a10adc2b55099
74
py
Python
tournament.py
phaksheet/guessthesong
f5d70dea5271286b2e8faea5dd6cb04a06635eee
[ "MIT" ]
2
2018-12-15T21:17:10.000Z
2018-12-15T21:17:17.000Z
tournament.py
phaksheet/guessthesong
f5d70dea5271286b2e8faea5dd6cb04a06635eee
[ "MIT" ]
4
2018-12-18T15:38:18.000Z
2018-12-18T16:44:34.000Z
tournament.py
DubThink/Guessong
9200dddd27658f2627d26b1b1fd9de6c56b8931a
[ "MIT" ]
null
null
null
from app import app if __name__ == '__main__': app.socketio.run(app)
14.8
26
0.689189
11
74
3.909091
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.189189
74
4
27
18.5
0.716667
0
0
0
0
0
0.108108
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
64a7b46918fe2b64c2f12bca555b25720a96e592
82
py
Python
database/dmg_formulas.py
cauchyswartz/LisaCodingLibrary
4f9117fff513754dd8bda379e0275e4be58a3c99
[ "MIT" ]
null
null
null
database/dmg_formulas.py
cauchyswartz/LisaCodingLibrary
4f9117fff513754dd8bda379e0275e4be58a3c99
[ "MIT" ]
null
null
null
database/dmg_formulas.py
cauchyswartz/LisaCodingLibrary
4f9117fff513754dd8bda379e0275e4be58a3c99
[ "MIT" ]
null
null
null
# dmg formulas global DEFAULT_PROFIT_FUNC = dmg_test def dmg_test(): return 0
11.714286
37
0.756098
13
82
4.461538
0.769231
0.241379
0
0
0
0
0
0
0
0
0
0.014925
0.182927
82
6
38
13.666667
0.850746
0.146341
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
64adecd653fd15ead1b6ee6162425f5dc58ae9f6
38
py
Python
Problem167.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
Problem167.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
Problem167.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
""" Investigating Ulam sequences """
7.6
28
0.684211
3
38
8.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
38
4
29
9.5
0.8125
0.736842
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
1
0
0
0
0
0
0
4
b3943fd994b64831972726e0deb877074c39b3c3
254
py
Python
montreal_forced_aligner/ivector/__init__.py
sameerkhurana10/Montreal-Forced-Aligner
b64b6bf4aa0394d59236510a05453740e7e7ebf5
[ "MIT" ]
null
null
null
montreal_forced_aligner/ivector/__init__.py
sameerkhurana10/Montreal-Forced-Aligner
b64b6bf4aa0394d59236510a05453740e7e7ebf5
[ "MIT" ]
null
null
null
montreal_forced_aligner/ivector/__init__.py
sameerkhurana10/Montreal-Forced-Aligner
b64b6bf4aa0394d59236510a05453740e7e7ebf5
[ "MIT" ]
null
null
null
"""Module for ivector extractor training""" from montreal_forced_aligner.ivector.trainer import ( DubmTrainer, IvectorTrainer, TrainableIvectorExtractor, ) __all__ = ["trainer", "DubmTrainer", "IvectorTrainer", "TrainableIvectorExtractor"]
25.4
83
0.76378
20
254
9.4
0.75
0.265957
0.531915
0
0
0
0
0
0
0
0
0
0.129921
254
9
84
28.222222
0.850679
0.145669
0
0
0
0
0.270142
0.118483
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
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
b3a349da63b529a5a01a8c0fdffc5bfff67d2080
659
py
Python
Week 08/id_510/str/match/Leetcode_115_510.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
1
2019-10-12T06:48:45.000Z
2019-10-12T06:48:45.000Z
Week 08/id_510/str/match/Leetcode_115_510.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
null
null
null
Week 08/id_510/str/match/Leetcode_115_510.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
null
null
null
""" 给定一个字符串 S 和一个字符串 T,计算在 S 的子序列中 T 出现的个数。 一个字符串的一个子序列是指,通过删除一些(也可以不删除)字符且不干扰剩余字符相对位置所组成的新字符串。(例如,"ACE" 是 "ABCDE" 的一个子序列,而 "AEC" 不是) 示例 1: 输入: S = "rabbbit", T = "rabbit" 输出: 3 解释: 如下图所示, 有 3 种可以从 S 中得到 "rabbit" 的方案。 (上箭头符号 ^ 表示选取的字母) rabbbit ^^^^ ^^ rabbbit ^^ ^^^^ rabbbit ^^^ ^^^ 示例 2: 输入: S = "babgbag", T = "bag" 输出: 5 解释: 如下图所示, 有 5 种可以从 S 中得到 "bag" 的方案。 (上箭头符号 ^ 表示选取的字母) babgbag ^^ ^ babgbag ^^ ^ babgbag ^ ^^ babgbag ^ ^^ babgbag ^^^ 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/distinct-subsequences 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 """ class Solution: def numDistinct(self, s: str, t: str) -> int: pass
13.44898
89
0.620637
94
659
4.351064
0.62766
0.136919
0.154034
0.136919
0
0
0
0
0
0
0
0.011429
0.203338
659
49
90
13.44898
0.767619
0.864947
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
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
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
b3ba7ba57afb1e18e7f5e87ca0a2032313b44006
142
py
Python
monte/runtime/trace.py
washort/monte
118916fda537984eb5897a3d854f52eef4509f2a
[ "MIT" ]
null
null
null
monte/runtime/trace.py
washort/monte
118916fda537984eb5897a3d854f52eef4509f2a
[ "MIT" ]
null
null
null
monte/runtime/trace.py
washort/monte
118916fda537984eb5897a3d854f52eef4509f2a
[ "MIT" ]
null
null
null
from monte.runtime.guards.base import deepFrozenFunc @deepFrozenFunc def trace(x): print x, @deepFrozenFunc def traceln(x): print x
14.2
52
0.746479
19
142
5.578947
0.631579
0.320755
0.132075
0
0
0
0
0
0
0
0
0
0.169014
142
9
53
15.777778
0.898305
0
0
0.285714
0
0
0
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.285714
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
1
0
0
0
0
0
0
0
0
4
b3d94420ac9f203b593b8514c405e36c0249a07a
1,079
py
Python
raiden/tests/unit/test_namedbuffer.py
ConsenSysMesh/raiden
76510e5535fa0a1ceb26107b560f805f3d7d26d9
[ "MIT" ]
3
2017-04-24T01:09:28.000Z
2017-05-26T18:32:34.000Z
raiden/tests/unit/test_namedbuffer.py
nicksavers/raiden
71e0c10de8e5acffb9caef3b0561bfd58e4f29c8
[ "MIT" ]
1
2021-10-31T12:41:15.000Z
2021-10-31T12:41:15.000Z
raiden/tests/unit/test_namedbuffer.py
isabella232/raiden
76510e5535fa0a1ceb26107b560f805f3d7d26d9
[ "MIT" ]
1
2021-10-31T12:05:52.000Z
2021-10-31T12:05:52.000Z
# -*- coding: utf-8 -*- from raiden.encoding.format import Field, namedbuffer from raiden.encoding.encoders import integer # pylint: disable=invalid-name byte = Field('byte', 1, 'B', None) hugeint = Field('huge', 100, '100s', integer(0, 2 ** (8 * 100))) SingleByte = namedbuffer('SingleByte', [byte]) HugeInt = namedbuffer('HugeInt', [hugeint]) def test_byte(): data = bytearray(1) # zero initialized packed_data = SingleByte(data) assert packed_data.byte == b'\x00' packed_data.byte = b'\x01' assert packed_data.byte == b'\x01' def test_decoder_int(): data = bytearray(100) packed_data = HugeInt(data) assert packed_data.huge == 0 packed_data.huge = 1 assert packed_data.huge == 1 def test_decoder_long(): data = bytearray(100) packed_data = HugeInt(data) assert packed_data.huge == 0 packed_data.huge = 1L assert packed_data.huge == 1 packed_data.huge = 2L ** 32 assert packed_data.huge == 2 ** 32 huge = 2 ** (8 * 100) - 1 packed_data.huge = huge assert packed_data.huge == huge
22.479167
64
0.65709
148
1,079
4.648649
0.290541
0.232558
0.203488
0.174419
0.361919
0.209302
0.209302
0.209302
0.209302
0.209302
0
0.052755
0.209453
1,079
47
65
22.957447
0.75381
0.062095
0
0.275862
0
0
0.041667
0
0
0
0
0
0.275862
0
null
null
0
0.068966
null
null
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
1
0
0
0
0
0
0
0
0
4
b6084812bbd5427effbc8be7ccc554aa2c1b47d5
2,161
py
Python
phase_1/example/franklin/pov/franklin-pov.py
cromulencellc/chess-aces
7780e29de1991758078816ca501ff79a2586b8c2
[ "MIT" ]
null
null
null
phase_1/example/franklin/pov/franklin-pov.py
cromulencellc/chess-aces
7780e29de1991758078816ca501ff79a2586b8c2
[ "MIT" ]
null
null
null
phase_1/example/franklin/pov/franklin-pov.py
cromulencellc/chess-aces
7780e29de1991758078816ca501ff79a2586b8c2
[ "MIT" ]
null
null
null
import sys import socket import os import struct packet_start = [ 0x33, 0x33, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x27, 0xf0, 0x94, 0xd3, 0x86, 0xdd, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x3a, 0xff, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x27, 0xff, 0xfe, 0xf0, 0x94, 0xd3, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x86, 0x00, 0x04, 0xb1, 0x40, 0x18, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ] dns_option_type = [0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8] first_str = [ 0xff ] #79 first_str += [0x61] * 0xff ## Overwrites J second_str = [0xb1] second_str += [0x62] * 0xa9 second_str += [0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] fourth_str = [0xff] fourth_str += [0x63] * 0xef fourth_str += [0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde] fourth_str += [0xfe, 0xca, 0xbe, 0xba, 0xfe, 0xca, 0xbe, 0xba] end_packet= [0x00, 0x00] packet = packet_start + dns_option_type + first_str + second_str + fourth_str + end_packet packet += [0x00] * ( 1024 - len(packet) ) def readuntil( s, u ): z = '' while z.endswith( u ) == False: z += s.recv(1) return z def readline( s ): return readuntil( s, '\n') def main( argv ): if len(argv) == 3: HOST=argv[1] PORT=int(argv[2]) else: if 'HOST' not in os.environ or 'PORT' not in os.environ: print '[ERROR] target and port must be specified via arguments or variables.' sys.exit(1) HOST=os.environ['HOST'] PORT=int(os.environ['PORT']) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((HOST, PORT)) except: print '[FAIL] Failed to connect to target %s:%d' %(HOST, PORT) sys.exit(1) print '[INFO] Connected to %s:%d' %(HOST, PORT) l = struct.pack('I', len(packet)) s.send( l + ''.join(chr(x) for x in packet)) print '[INFO] Sent packet. Use gdb to test' print 'RIP=babecafebabecafe' print 'RBP=deadbeefdeadbeef' if __name__ == '__main__': main(sys.argv)
28.064935
107
0.600648
315
2,161
4.025397
0.387302
0.246057
0.293375
0.302839
0.126183
0.126183
0.066246
0.066246
0.041009
0.041009
0
0.17928
0.254049
2,161
76
108
28.434211
0.60732
0.006941
0
0.037736
0
0
0.110126
0
0
0
0.212319
0
0
0
null
null
0
0.075472
null
null
0.113208
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
1
0
0
0
0
0
0
0
0
4
374c861e9cb035def3dea730e1b764c232597cbb
436
py
Python
cyclonedx_lint/cli.py
sthagen/miniature-umbrella
b2876f1bcc5bf7f7e2a10658b1c44a79f5bf3b8f
[ "MIT" ]
1
2021-03-07T11:08:51.000Z
2021-03-07T11:08:51.000Z
cyclonedx_lint/cli.py
sthagen/miniature-umbrella
b2876f1bcc5bf7f7e2a10658b1c44a79f5bf3b8f
[ "MIT" ]
25
2021-03-02T21:15:02.000Z
2021-03-02T21:48:56.000Z
cyclonedx_lint/cli.py
sthagen/miniature-umbrella
b2876f1bcc5bf7f7e2a10658b1c44a79f5bf3b8f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=expression-not-assigned,line-too-long """Visit folder tree with CycloneDX documents, validate the latter, and generate reports.""" import os import sys import cyclonedx_lint.lint as cyclonedx_lint # pylint: disable=expression-not-assigned def main(argv=None): """Process the job.""" argv = sys.argv[1:] if argv is None else argv cyclonedx_lint.main(argv)
25.647059
92
0.722477
64
436
4.875
0.65625
0.125
0.147436
0.166667
0.217949
0
0
0
0
0
0
0.005391
0.149083
436
16
93
27.25
0.83558
0.550459
0
0
1
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
0.666667
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
3773c7034b6e3bd87195f85594fd474e384836f4
160
py
Python
myapp/resources.py
percevalm/aumyproject
b24b38005188ce9dd41ed663cf54dad5464afef3
[ "bzip2-1.0.6" ]
null
null
null
myapp/resources.py
percevalm/aumyproject
b24b38005188ce9dd41ed663cf54dad5464afef3
[ "bzip2-1.0.6" ]
16
2020-03-24T17:30:37.000Z
2022-03-11T23:57:41.000Z
myapp/resources.py
percevalm/aumyproject
b24b38005188ce9dd41ed663cf54dad5464afef3
[ "bzip2-1.0.6" ]
null
null
null
from import_export import resources from myapp.models import Intbursary class IntbursaryResource(resources.ModelResource): class Meta: model = Intbursary
17.777778
50
0.825
18
160
7.277778
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.13125
160
8
51
20
0.942446
0
0
0
0
0
0
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
378d4571ba96697579eb030adcc7386c5d4d96e5
111
py
Python
backend/infs3202/password_reset/apps.py
eivrei/INFS3202
e5b2aa29768a75475f4be3a31d824de842c8b1e9
[ "MIT" ]
null
null
null
backend/infs3202/password_reset/apps.py
eivrei/INFS3202
e5b2aa29768a75475f4be3a31d824de842c8b1e9
[ "MIT" ]
9
2020-02-12T00:03:08.000Z
2022-02-10T07:52:04.000Z
backend/infs3202/password_reset/apps.py
eivrei/INFS3202
e5b2aa29768a75475f4be3a31d824de842c8b1e9
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PasswordResetConfig(AppConfig): name = 'infs3202.password_reset'
18.5
37
0.792793
12
111
7.25
0.916667
0
0
0
0
0
0
0
0
0
0
0.041667
0.135135
111
5
38
22.2
0.864583
0
0
0
0
0
0.207207
0.207207
0
0
0
0
0
1
0
false
0.666667
0.333333
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
1
1
0
0
0
0
4
3796678ef9d6791335fa79891d1540829409fbcb
81
py
Python
example/app.py
ksacry/pi-clap
23b349019c850e32def4959a7c94eb654ce56995
[ "MIT" ]
86
2015-05-05T09:21:09.000Z
2021-10-05T11:51:12.000Z
example/app.py
ksacry/pi-clap
23b349019c850e32def4959a7c94eb654ce56995
[ "MIT" ]
3
2017-01-19T16:53:57.000Z
2020-08-19T20:07:25.000Z
example/app.py
ksacry/pi-clap
23b349019c850e32def4959a7c94eb654ce56995
[ "MIT" ]
23
2016-06-16T03:44:54.000Z
2021-12-17T17:13:47.000Z
#!/usr/bin/python3 from piclap import * listener = Listener() listener.start()
11.571429
21
0.716049
10
81
5.8
0.8
0.551724
0
0
0
0
0
0
0
0
0
0.014286
0.135802
81
6
22
13.5
0.814286
0.209877
0
0
0
0
0
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