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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3e1dd5bd68d394d39a441e19a0509812a9f6b841
| 152
|
py
|
Python
|
knxpy/dpts/dpt1.py
|
BrechtBa/knxpy
|
9e486f4a4623f586091e72cc6472441f3efbdd72
|
[
"MIT"
] | null | null | null |
knxpy/dpts/dpt1.py
|
BrechtBa/knxpy
|
9e486f4a4623f586091e72cc6472441f3efbdd72
|
[
"MIT"
] | null | null | null |
knxpy/dpts/dpt1.py
|
BrechtBa/knxpy
|
9e486f4a4623f586091e72cc6472441f3efbdd72
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
"""
Boolean data
1 bit
0,1
"""
def encode(value):
return [int(value) & 0x01]
def decode(data):
return (data & 0x01)
| 9.5
| 30
| 0.605263
| 23
| 152
| 4
| 0.695652
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084746
| 0.223684
| 152
| 15
| 31
| 10.133333
| 0.694915
| 0.289474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080808
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3e20d2ec7ffb4e37a534ab2ec90631b3c444d2a4
| 218
|
py
|
Python
|
rowboat/models/migrations/0006_new_guild_config.py
|
StreamersConnected/testrb
|
292abe1d9b463e416f157023f271ca9547638b00
|
[
"MIT"
] | 1
|
2018-05-12T12:34:51.000Z
|
2018-05-12T12:34:51.000Z
|
rowboat/models/migrations/0006_new_guild_config.py
|
StreamersConnected/testrb
|
292abe1d9b463e416f157023f271ca9547638b00
|
[
"MIT"
] | null | null | null |
rowboat/models/migrations/0006_new_guild_config.py
|
StreamersConnected/testrb
|
292abe1d9b463e416f157023f271ca9547638b00
|
[
"MIT"
] | null | null | null |
from rowboat.models.migrations import Migrate
from rowboat.models.guild import Guild
@Migrate.only_if(Migrate.missing, Guild, 'config_raw')
def add_guild_columns(m):
m.add_columns(Guild, Guild.config_raw)
| 27.25
| 55
| 0.775229
| 32
| 218
| 5.09375
| 0.5
| 0.134969
| 0.208589
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12844
| 218
| 7
| 56
| 31.142857
| 0.857895
| 0
| 0
| 0
| 0
| 0
| 0.047393
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3e28c4d69d2197030e7707044c7e090c5b99ac3f
| 170
|
py
|
Python
|
server/mongo_client.py
|
jsonkung/agora
|
18c951b63556cdccf2c552e7413de56c18254c00
|
[
"MIT"
] | null | null | null |
server/mongo_client.py
|
jsonkung/agora
|
18c951b63556cdccf2c552e7413de56c18254c00
|
[
"MIT"
] | null | null | null |
server/mongo_client.py
|
jsonkung/agora
|
18c951b63556cdccf2c552e7413de56c18254c00
|
[
"MIT"
] | null | null | null |
import pymongo
def get_mongo_client(host='localhost', port=27017):
uri = "mongodb://{host}:{port}".format(host=host, port=port)
return pymongo.MongoClient(uri)
| 24.285714
| 64
| 0.711765
| 23
| 170
| 5.173913
| 0.652174
| 0.134454
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033557
| 0.123529
| 170
| 6
| 65
| 28.333333
| 0.765101
| 0
| 0
| 0
| 0
| 0
| 0.188235
| 0.135294
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3e34635e5576cdec28118969af2af12619f4bd14
| 153
|
py
|
Python
|
HealthNet/calendarium/settings.py
|
jimga150/HealthNet
|
84e55302b02221ae6e93640904af837fdfe09a83
|
[
"MIT"
] | 79
|
2015-01-21T10:23:24.000Z
|
2016-11-03T13:25:03.000Z
|
HealthNet/calendarium/settings.py
|
jimga150/HealthNet
|
84e55302b02221ae6e93640904af837fdfe09a83
|
[
"MIT"
] | 28
|
2015-01-06T17:16:51.000Z
|
2016-09-08T09:13:19.000Z
|
HealthNet/calendarium/settings.py
|
jimga150/HealthNet
|
84e55302b02221ae6e93640904af837fdfe09a83
|
[
"MIT"
] | 24
|
2015-01-14T17:02:54.000Z
|
2016-08-10T02:47:03.000Z
|
"""Default settings for the calendarium app."""
from django.conf import settings
SHIFT_WEEKSTART = getattr(settings, 'CALENDARIUM_SHIFT_WEEKSTART', 0)
| 25.5
| 69
| 0.79085
| 19
| 153
| 6.210526
| 0.736842
| 0.237288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007353
| 0.111111
| 153
| 5
| 70
| 30.6
| 0.860294
| 0.267974
| 0
| 0
| 0
| 0
| 0.254717
| 0.254717
| 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
|
3e42ac90b1dd4da06e0daecb7d3347611703ef22
| 55
|
py
|
Python
|
tsis1/bool1.py
|
ayazhan112/python-
|
fba09ecc25e11dbfb116f273838b13174f66126d
|
[
"MIT"
] | null | null | null |
tsis1/bool1.py
|
ayazhan112/python-
|
fba09ecc25e11dbfb116f273838b13174f66126d
|
[
"MIT"
] | null | null | null |
tsis1/bool1.py
|
ayazhan112/python-
|
fba09ecc25e11dbfb116f273838b13174f66126d
|
[
"MIT"
] | null | null | null |
x = "Hello"
y = 15
print(bool(x))
print(bool(y))
| 9.166667
| 15
| 0.527273
| 10
| 55
| 2.9
| 0.6
| 0.62069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.254545
| 55
| 5
| 16
| 11
| 0.658537
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
3e571472fe3f555726d8dffb1c9bc058f191e207
| 44
|
py
|
Python
|
tests/couldBeGenerated_pb2.py
|
jddixon/pysloc
|
ab642816ab3bfe92755ebbba55d09a802d5be485
|
[
"MIT"
] | 1
|
2019-06-13T18:28:51.000Z
|
2019-06-13T18:28:51.000Z
|
tests/couldBeGenerated_pb2.py
|
jddixon/pysloc
|
ab642816ab3bfe92755ebbba55d09a802d5be485
|
[
"MIT"
] | null | null | null |
tests/couldBeGenerated_pb2.py
|
jddixon/pysloc
|
ab642816ab3bfe92755ebbba55d09a802d5be485
|
[
"MIT"
] | null | null | null |
This
should be
counted
as a
0 - line
file
.
| 5.5
| 9
| 0.704545
| 9
| 44
| 3.444444
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.25
| 44
| 7
| 10
| 6.285714
| 0.909091
| 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
|
3e6e9ff6a73cccdf8dc1241c0b382196d8640149
| 52
|
py
|
Python
|
tests/pytest_plugin/data/test_using_migrator_fixture.py
|
swiatekm/django-test-migrations
|
628f650d2c076ce8ad44222d1a6c674ded90a48a
|
[
"MIT"
] | 4
|
2019-07-26T12:42:42.000Z
|
2020-01-27T07:45:09.000Z
|
tests/pytest_plugin/data/test_using_migrator_fixture.py
|
swiatekm/django-test-migrations
|
628f650d2c076ce8ad44222d1a6c674ded90a48a
|
[
"MIT"
] | 37
|
2019-10-18T18:10:14.000Z
|
2020-01-31T07:46:23.000Z
|
tests/pytest_plugin/data/test_using_migrator_fixture.py
|
swiatekm/django-test-migrations
|
628f650d2c076ce8ad44222d1a6c674ded90a48a
|
[
"MIT"
] | 1
|
2019-08-03T15:54:50.000Z
|
2019-08-03T15:54:50.000Z
|
def test_using_migrator_fixture(migrator):
pass
| 17.333333
| 42
| 0.807692
| 7
| 52
| 5.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 52
| 2
| 43
| 26
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
e41ca9c0b4c42a66448eca7c9d933029b29f368d
| 377
|
py
|
Python
|
chap8/8-12.py
|
wikilike7/python-crash-course
|
85cd7a2ab6e43a554c282b6e0c1c44c415cca3a3
|
[
"MIT"
] | null | null | null |
chap8/8-12.py
|
wikilike7/python-crash-course
|
85cd7a2ab6e43a554c282b6e0c1c44c415cca3a3
|
[
"MIT"
] | null | null | null |
chap8/8-12.py
|
wikilike7/python-crash-course
|
85cd7a2ab6e43a554c282b6e0c1c44c415cca3a3
|
[
"MIT"
] | 1
|
2019-03-05T09:31:27.000Z
|
2019-03-05T09:31:27.000Z
|
def rice_describ(*rice):
print('\n下面介绍各种大米的分类和基础介绍:')
print(rice)
rice_describ('糙米:稻谷去除稻壳后之稻米,保留了八成的产物比例。营养价值较胚芽米和白米较高,但浸 水和煮食时间也较长')
rice_describ('胚芽米:糙米加工后去除糠层保留胚及胚乳,保留了七成半的产物比例,是糙米和白 米的中间产物', '白米:(即我们平时食用的白米或大米) 糙米经继续加工,碾去皮层和胚 (即细 糠),基本上只剩下胚乳,保留了七成的产物比例。市场上最主要的类别', '预熟米 (改造米):将食米经浸润、蒸煮、干燥等处理')
rice_describ('营养强化米:食米添加一种或多种营养素', '速食米:食米经加工处理,可以开水浸泡或经短时间煮沸,即可食用')
| 41.888889
| 163
| 0.777188
| 45
| 377
| 6.422222
| 0.8
| 0.152249
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 377
| 8
| 164
| 47.125
| 0.823362
| 0
| 0
| 0
| 0
| 0
| 0.681698
| 0.427056
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0
| 0
| 0.166667
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e42660793699a33c5a358a0c5bf836c4fd142992
| 58
|
py
|
Python
|
yikes_moles/__main__.py
|
hodgestar/yikes-moles
|
195a3db7d2dbea3e9f0cec7620f6c4b38a2a5524
|
[
"MIT"
] | null | null | null |
yikes_moles/__main__.py
|
hodgestar/yikes-moles
|
195a3db7d2dbea3e9f0cec7620f6c4b38a2a5524
|
[
"MIT"
] | null | null | null |
yikes_moles/__main__.py
|
hodgestar/yikes-moles
|
195a3db7d2dbea3e9f0cec7620f6c4b38a2a5524
|
[
"MIT"
] | null | null | null |
""" Run Yikes! Moles! """
from .main import main
main()
| 9.666667
| 25
| 0.603448
| 8
| 58
| 4.375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206897
| 58
| 5
| 26
| 11.6
| 0.76087
| 0.293103
| 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
|
e454d9acd17f9e44a441065289136ddc69c50041
| 189
|
py
|
Python
|
Python/Introduction/python_if_else.py
|
isbendiyarovanezrin/HackerRank-Solutions
|
3e66ecab82b35e718e1bdd1b0c00d0aeb3b4569f
|
[
"MIT"
] | 2
|
2021-11-21T21:40:25.000Z
|
2021-11-22T06:30:58.000Z
|
Python/Introduction/python_if_else.py
|
isbendiyarovanezrin/HackerRankSolutions
|
3e66ecab82b35e718e1bdd1b0c00d0aeb3b4569f
|
[
"MIT"
] | null | null | null |
Python/Introduction/python_if_else.py
|
isbendiyarovanezrin/HackerRankSolutions
|
3e66ecab82b35e718e1bdd1b0c00d0aeb3b4569f
|
[
"MIT"
] | null | null | null |
# Language: Python 3
n = int(input())
if (n % 2 != 0):
print("Weird")
elif (2 <= n <= 5):
print("Not Weird")
elif (6 <= n <= 20):
print("Weird")
else:
print("Not Weird")
| 14.538462
| 23
| 0.497354
| 29
| 189
| 3.241379
| 0.586207
| 0.212766
| 0.276596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057971
| 0.269841
| 189
| 12
| 24
| 15.75
| 0.623188
| 0.095238
| 0
| 0.444444
| 0
| 0
| 0.16568
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
e45b51c0cd4d12db9eb6625c4f1239c0a4e9e0f0
| 22
|
py
|
Python
|
skewt/__init__.py
|
aktaylor08/SkewT
|
bc6fde8ed9ff2da9000fb5865cc9aaecf1a662e2
|
[
"MIT"
] | 1
|
2017-05-24T09:14:28.000Z
|
2017-05-24T09:14:28.000Z
|
skewt/__init__.py
|
peterwilletts24/SkewT
|
bc6fde8ed9ff2da9000fb5865cc9aaecf1a662e2
|
[
"MIT"
] | null | null | null |
skewt/__init__.py
|
peterwilletts24/SkewT
|
bc6fde8ed9ff2da9000fb5865cc9aaecf1a662e2
|
[
"MIT"
] | 1
|
2019-08-28T16:56:22.000Z
|
2019-08-28T16:56:22.000Z
|
__version__="0.1.3r1"
| 11
| 21
| 0.727273
| 4
| 22
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 0.045455
| 22
| 1
| 22
| 22
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0.318182
| 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
|
e45bccb3746c666fdc5b880764bd0d0636551c9c
| 81
|
py
|
Python
|
elk/apps.py
|
mingregister/zlk
|
6386eb019e14cb5380c1b9518bc43ef48bd78369
|
[
"Apache-2.0"
] | null | null | null |
elk/apps.py
|
mingregister/zlk
|
6386eb019e14cb5380c1b9518bc43ef48bd78369
|
[
"Apache-2.0"
] | null | null | null |
elk/apps.py
|
mingregister/zlk
|
6386eb019e14cb5380c1b9518bc43ef48bd78369
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class ElkConfig(AppConfig):
name = 'elk'
| 13.5
| 33
| 0.728395
| 10
| 81
| 5.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185185
| 81
| 5
| 34
| 16.2
| 0.893939
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 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
|
9028bd48a3d3f9da19435ac6eddece7270848cc0
| 207
|
py
|
Python
|
mysite/ctms/admin.py
|
raccoongang/socraticqs2
|
06201005136ee139846f857dbb2f518736e441de
|
[
"Apache-2.0"
] | 3
|
2015-11-20T07:33:28.000Z
|
2017-01-15T23:33:50.000Z
|
mysite/ctms/admin.py
|
raccoongang/socraticqs2
|
06201005136ee139846f857dbb2f518736e441de
|
[
"Apache-2.0"
] | 28
|
2015-07-14T11:33:24.000Z
|
2017-11-17T15:21:22.000Z
|
mysite/ctms/admin.py
|
raccoongang/socraticqs2
|
06201005136ee139846f857dbb2f518736e441de
|
[
"Apache-2.0"
] | 4
|
2015-04-29T09:04:59.000Z
|
2017-07-19T14:11:16.000Z
|
from django.contrib import admin
from ctms.models import Invite
@admin.register(*[Invite])
class AdminModel(admin.ModelAdmin):
list_display = ('code', 'email', 'course', 'get_status_display', 'type')
| 23
| 76
| 0.7343
| 26
| 207
| 5.730769
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120773
| 207
| 8
| 77
| 25.875
| 0.818681
| 0
| 0
| 0
| 0
| 0
| 0.178744
| 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
|
5f788ed13aba6c73803f9fb6c671443522d89fb0
| 357
|
py
|
Python
|
factory/ey.py
|
amitkc00/design_patterns
|
86262200d8ab106e9e8b32abc0d87e7a8e1cce2a
|
[
"MIT"
] | null | null | null |
factory/ey.py
|
amitkc00/design_patterns
|
86262200d8ab106e9e8b32abc0d87e7a8e1cce2a
|
[
"MIT"
] | null | null | null |
factory/ey.py
|
amitkc00/design_patterns
|
86262200d8ab106e9e8b32abc0d87e7a8e1cce2a
|
[
"MIT"
] | null | null | null |
from iConsultant import iconsultant
class ey(iconsultant):
def __init__(self):
pass
def do_SAP_Security_audit(self):
print('This is EY SAP Security Audit')
def do_SAP_HR_audit(self):
print('This is EY SAP HR Audit')
def do_SAP_PurchaseSale_audit(self):
print('This is EY SAP Purchase Sale Audit')
| 23.8
| 51
| 0.661064
| 51
| 357
| 4.372549
| 0.392157
| 0.067265
| 0.107623
| 0.242152
| 0.336323
| 0.336323
| 0.336323
| 0
| 0
| 0
| 0
| 0
| 0.263305
| 357
| 15
| 51
| 23.8
| 0.847909
| 0
| 0
| 0
| 0
| 0
| 0.240223
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.1
| 0.1
| 0
| 0.6
| 0.3
| 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
|
5f7a9bb21dbf122d5c97ab4a037b75606ef993aa
| 165
|
py
|
Python
|
ops/multihead/__init__.py
|
ancientmooner/CCNet
|
c914913ad523ec854f78c28f22044af204d4fbe6
|
[
"MIT"
] | null | null | null |
ops/multihead/__init__.py
|
ancientmooner/CCNet
|
c914913ad523ec854f78c28f22044af204d4fbe6
|
[
"MIT"
] | null | null | null |
ops/multihead/__init__.py
|
ancientmooner/CCNet
|
c914913ad523ec854f78c28f22044af204d4fbe6
|
[
"MIT"
] | null | null | null |
from .multihead_block import MultiheadBlock
from .multihead_spatial_block import MultiheadSpatialBlock
__all__ = [
'MultiheadBlock', 'MultiheadSpatialBlock',
]
| 23.571429
| 58
| 0.818182
| 14
| 165
| 9.142857
| 0.571429
| 0.203125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115152
| 165
| 6
| 59
| 27.5
| 0.876712
| 0
| 0
| 0
| 0
| 0
| 0.212121
| 0.127273
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5f95e6ae5caa0336b8e739993847fcbfd9781539
| 196
|
py
|
Python
|
NCPWD/apps/comments/serializers.py
|
fossabot/NCPWD
|
e46776ecf0cb4f263ff4e7883cb2402a3fc58717
|
[
"Apache-2.0"
] | 1
|
2019-08-22T23:36:07.000Z
|
2019-08-22T23:36:07.000Z
|
NCPWD/apps/comments/serializers.py
|
C3real-kill3r/H-digest
|
afce0a6e8b0fa4d2684550fe9f484ab9c6e76560
|
[
"Apache-2.0"
] | 10
|
2019-12-12T13:59:43.000Z
|
2021-09-22T18:21:44.000Z
|
NCPWD/apps/comments/serializers.py
|
C3real-kill3r/H-digest
|
afce0a6e8b0fa4d2684550fe9f484ab9c6e76560
|
[
"Apache-2.0"
] | 2
|
2019-12-12T13:56:33.000Z
|
2019-12-26T11:47:05.000Z
|
from rest_framework.serializers import ModelSerializer
from .models import Comments
class CommentSerializer(ModelSerializer):
class Meta:
model = Comments
fields = "__all__"
| 21.777778
| 54
| 0.744898
| 19
| 196
| 7.421053
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204082
| 196
| 8
| 55
| 24.5
| 0.903846
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5f9b786c50786b8d6e9a5bbfb14cb258efc64cd4
| 98
|
py
|
Python
|
websocket_redis/api/async/__init__.py
|
Abdeljelil/websocket_redis
|
d056628333144efc5396881d344e8acfcf9b0edc
|
[
"BSD-3-Clause"
] | 1
|
2016-07-28T07:07:16.000Z
|
2016-07-28T07:07:16.000Z
|
websocket_redis/api/async/__init__.py
|
Abdeljelil/websocket_redis
|
d056628333144efc5396881d344e8acfcf9b0edc
|
[
"BSD-3-Clause"
] | null | null | null |
websocket_redis/api/async/__init__.py
|
Abdeljelil/websocket_redis
|
d056628333144efc5396881d344e8acfcf9b0edc
|
[
"BSD-3-Clause"
] | null | null | null |
from websocket_redis.api.async.listener import APIClientListener
__all__ = ["APIClientListener"]
| 24.5
| 64
| 0.836735
| 10
| 98
| 7.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 98
| 3
| 65
| 32.666667
| 0.855556
| 0
| 0
| 0
| 0
| 0
| 0.173469
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5fa43ddb266081abdf4e24e2219f8c9d014bde39
| 262
|
py
|
Python
|
HackersPySim.py
|
mar232320/HackersPy
|
1f4f76ef34363408cfbca090d93f304ce27db3f7
|
[
"MIT"
] | null | null | null |
HackersPySim.py
|
mar232320/HackersPy
|
1f4f76ef34363408cfbca090d93f304ce27db3f7
|
[
"MIT"
] | null | null | null |
HackersPySim.py
|
mar232320/HackersPy
|
1f4f76ef34363408cfbca090d93f304ce27db3f7
|
[
"MIT"
] | null | null | null |
#Import Modules
import json
try:
#Define Programs
#Define Nodes
#Operations Area
#Error Catchment
except FileNotFoundError:
print ("Error, could not find 1 or more files required, please ensure all files are downloaded and in dir with the Py file")
| 26.2
| 129
| 0.755725
| 38
| 262
| 5.210526
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004739
| 0.194656
| 262
| 9
| 130
| 29.111111
| 0.933649
| 0.270992
| 0
| 0
| 0
| 0.25
| 0.644068
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.25
| null | null | 0.25
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5fb4b58afc191733eefbdedf98269293675fe91c
| 46,297
|
py
|
Python
|
nova/objects/request_spec.py
|
bopopescu/nova-token
|
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
|
[
"Apache-2.0"
] | null | null | null |
nova/objects/request_spec.py
|
bopopescu/nova-token
|
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
|
[
"Apache-2.0"
] | null | null | null |
nova/objects/request_spec.py
|
bopopescu/nova-token
|
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
|
[
"Apache-2.0"
] | 2
|
2017-07-20T17:31:34.000Z
|
2020-07-24T02:42:19.000Z
|
begin_unit
comment|'# Copyright 2015 Red Hat, Inc.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n'
comment|'# a copy of the License at'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# http://www.apache.org/licenses/LICENSE-2.0'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Unless required by applicable law or agreed to in writing, software'
nl|'\n'
comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT'
nl|'\n'
comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the'
nl|'\n'
comment|'# License for the specific language governing permissions and limitations'
nl|'\n'
comment|'# under the License.'
nl|'\n'
nl|'\n'
name|'from'
name|'oslo_serialization'
name|'import'
name|'jsonutils'
newline|'\n'
name|'import'
name|'six'
newline|'\n'
nl|'\n'
name|'from'
name|'nova'
op|'.'
name|'db'
op|'.'
name|'sqlalchemy'
name|'import'
name|'api'
name|'as'
name|'db'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'db'
op|'.'
name|'sqlalchemy'
name|'import'
name|'api_models'
newline|'\n'
name|'from'
name|'nova'
name|'import'
name|'exception'
newline|'\n'
name|'from'
name|'nova'
name|'import'
name|'objects'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'objects'
name|'import'
name|'base'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'objects'
name|'import'
name|'fields'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'objects'
name|'import'
name|'instance'
name|'as'
name|'obj_instance'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'virt'
name|'import'
name|'hardware'
newline|'\n'
nl|'\n'
nl|'\n'
op|'@'
name|'base'
op|'.'
name|'NovaObjectRegistry'
op|'.'
name|'register'
newline|'\n'
DECL|class|RequestSpec
name|'class'
name|'RequestSpec'
op|'('
name|'base'
op|'.'
name|'NovaObject'
op|')'
op|':'
newline|'\n'
comment|'# Version 1.0: Initial version'
nl|'\n'
comment|'# Version 1.1: ImageMeta version 1.6'
nl|'\n'
comment|'# Version 1.2: SchedulerRetries version 1.1'
nl|'\n'
comment|'# Version 1.3: InstanceGroup version 1.10'
nl|'\n'
comment|'# Version 1.4: ImageMeta version 1.7'
nl|'\n'
comment|'# Version 1.5: Added get_by_instance_uuid(), create(), save()'
nl|'\n'
DECL|variable|VERSION
indent|' '
name|'VERSION'
op|'='
string|"'1.5'"
newline|'\n'
nl|'\n'
DECL|variable|fields
name|'fields'
op|'='
op|'{'
nl|'\n'
string|"'id'"
op|':'
name|'fields'
op|'.'
name|'IntegerField'
op|'('
op|')'
op|','
nl|'\n'
string|"'image'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'ImageMeta'"
op|','
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'numa_topology'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'InstanceNUMATopology'"
op|','
nl|'\n'
DECL|variable|nullable
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'pci_requests'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'InstancePCIRequests'"
op|','
nl|'\n'
DECL|variable|nullable
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'project_id'"
op|':'
name|'fields'
op|'.'
name|'StringField'
op|'('
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'availability_zone'"
op|':'
name|'fields'
op|'.'
name|'StringField'
op|'('
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'flavor'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'Flavor'"
op|','
name|'nullable'
op|'='
name|'False'
op|')'
op|','
nl|'\n'
string|"'num_instances'"
op|':'
name|'fields'
op|'.'
name|'IntegerField'
op|'('
name|'default'
op|'='
number|'1'
op|')'
op|','
nl|'\n'
string|"'ignore_hosts'"
op|':'
name|'fields'
op|'.'
name|'ListOfStringsField'
op|'('
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'force_hosts'"
op|':'
name|'fields'
op|'.'
name|'ListOfStringsField'
op|'('
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'force_nodes'"
op|':'
name|'fields'
op|'.'
name|'ListOfStringsField'
op|'('
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'retry'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'SchedulerRetries'"
op|','
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'limits'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'SchedulerLimits'"
op|','
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'instance_group'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'InstanceGroup'"
op|','
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
comment|'# NOTE(sbauza): Since hints are depending on running filters, we prefer'
nl|'\n'
comment|'# to leave the API correctly validating the hints per the filters and'
nl|'\n'
comment|'# just provide to the RequestSpec object a free-form dictionary'
nl|'\n'
string|"'scheduler_hints'"
op|':'
name|'fields'
op|'.'
name|'DictOfListOfStringsField'
op|'('
name|'nullable'
op|'='
name|'True'
op|')'
op|','
nl|'\n'
string|"'instance_uuid'"
op|':'
name|'fields'
op|'.'
name|'UUIDField'
op|'('
op|')'
op|','
nl|'\n'
op|'}'
newline|'\n'
nl|'\n'
op|'@'
name|'property'
newline|'\n'
DECL|member|vcpus
name|'def'
name|'vcpus'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'self'
op|'.'
name|'flavor'
op|'.'
name|'vcpus'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'property'
newline|'\n'
DECL|member|memory_mb
name|'def'
name|'memory_mb'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'self'
op|'.'
name|'flavor'
op|'.'
name|'memory_mb'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'property'
newline|'\n'
DECL|member|root_gb
name|'def'
name|'root_gb'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'self'
op|'.'
name|'flavor'
op|'.'
name|'root_gb'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'property'
newline|'\n'
DECL|member|ephemeral_gb
name|'def'
name|'ephemeral_gb'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'self'
op|'.'
name|'flavor'
op|'.'
name|'ephemeral_gb'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'property'
newline|'\n'
DECL|member|swap
name|'def'
name|'swap'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'self'
op|'.'
name|'flavor'
op|'.'
name|'swap'
newline|'\n'
nl|'\n'
DECL|member|_image_meta_from_image
dedent|''
name|'def'
name|'_image_meta_from_image'
op|'('
name|'self'
op|','
name|'image'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'isinstance'
op|'('
name|'image'
op|','
name|'objects'
op|'.'
name|'ImageMeta'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'image'
op|'='
name|'image'
newline|'\n'
dedent|''
name|'elif'
name|'isinstance'
op|'('
name|'image'
op|','
name|'dict'
op|')'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): Until Nova is fully providing an ImageMeta object'
nl|'\n'
comment|'# for getting properties, we still need to hydrate it here'
nl|'\n'
comment|'# TODO(sbauza): To be removed once all RequestSpec hydrations are'
nl|'\n'
comment|'# done on the conductor side and if the image is an ImageMeta'
nl|'\n'
indent|' '
name|'self'
op|'.'
name|'image'
op|'='
name|'objects'
op|'.'
name|'ImageMeta'
op|'.'
name|'from_dict'
op|'('
name|'image'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'image'
op|'='
name|'None'
newline|'\n'
nl|'\n'
DECL|member|_from_instance
dedent|''
dedent|''
name|'def'
name|'_from_instance'
op|'('
name|'self'
op|','
name|'instance'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'isinstance'
op|'('
name|'instance'
op|','
name|'obj_instance'
op|'.'
name|'Instance'
op|')'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): Instance should normally be a NovaObject...'
nl|'\n'
indent|' '
name|'getter'
op|'='
name|'getattr'
newline|'\n'
dedent|''
name|'elif'
name|'isinstance'
op|'('
name|'instance'
op|','
name|'dict'
op|')'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): ... but there are some cases where request_spec'
nl|'\n'
comment|'# has an instance key as a dictionary, just because'
nl|'\n'
comment|'# select_destinations() is getting a request_spec dict made by'
nl|'\n'
comment|'# sched_utils.build_request_spec()'
nl|'\n'
comment|'# TODO(sbauza): To be removed once all RequestSpec hydrations are'
nl|'\n'
comment|'# done on the conductor side'
nl|'\n'
indent|' '
name|'getter'
op|'='
name|'lambda'
name|'x'
op|','
name|'y'
op|':'
name|'x'
op|'.'
name|'get'
op|'('
name|'y'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
comment|'# If the instance is None, there is no reason to set the fields'
nl|'\n'
indent|' '
name|'return'
newline|'\n'
nl|'\n'
dedent|''
name|'instance_fields'
op|'='
op|'['
string|"'numa_topology'"
op|','
string|"'pci_requests'"
op|','
string|"'uuid'"
op|','
nl|'\n'
string|"'project_id'"
op|','
string|"'availability_zone'"
op|']'
newline|'\n'
name|'for'
name|'field'
name|'in'
name|'instance_fields'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'field'
op|'=='
string|"'uuid'"
op|':'
newline|'\n'
indent|' '
name|'setattr'
op|'('
name|'self'
op|','
string|"'instance_uuid'"
op|','
name|'getter'
op|'('
name|'instance'
op|','
name|'field'
op|')'
op|')'
newline|'\n'
dedent|''
name|'elif'
name|'field'
op|'=='
string|"'pci_requests'"
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'_from_instance_pci_requests'
op|'('
name|'getter'
op|'('
name|'instance'
op|','
name|'field'
op|')'
op|')'
newline|'\n'
dedent|''
name|'elif'
name|'field'
op|'=='
string|"'numa_topology'"
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'_from_instance_numa_topology'
op|'('
name|'getter'
op|'('
name|'instance'
op|','
name|'field'
op|')'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'setattr'
op|'('
name|'self'
op|','
name|'field'
op|','
name|'getter'
op|'('
name|'instance'
op|','
name|'field'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|_from_instance_pci_requests
dedent|''
dedent|''
dedent|''
name|'def'
name|'_from_instance_pci_requests'
op|'('
name|'self'
op|','
name|'pci_requests'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'isinstance'
op|'('
name|'pci_requests'
op|','
name|'dict'
op|')'
op|':'
newline|'\n'
indent|' '
name|'pci_req_cls'
op|'='
name|'objects'
op|'.'
name|'InstancePCIRequests'
newline|'\n'
name|'self'
op|'.'
name|'pci_requests'
op|'='
name|'pci_req_cls'
op|'.'
name|'from_request_spec_instance_props'
op|'('
nl|'\n'
name|'pci_requests'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'pci_requests'
op|'='
name|'pci_requests'
newline|'\n'
nl|'\n'
DECL|member|_from_instance_numa_topology
dedent|''
dedent|''
name|'def'
name|'_from_instance_numa_topology'
op|'('
name|'self'
op|','
name|'numa_topology'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'isinstance'
op|'('
name|'numa_topology'
op|','
name|'dict'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'numa_topology'
op|'='
name|'hardware'
op|'.'
name|'instance_topology_from_instance'
op|'('
nl|'\n'
name|'dict'
op|'('
name|'numa_topology'
op|'='
name|'numa_topology'
op|')'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'numa_topology'
op|'='
name|'numa_topology'
newline|'\n'
nl|'\n'
DECL|member|_from_flavor
dedent|''
dedent|''
name|'def'
name|'_from_flavor'
op|'('
name|'self'
op|','
name|'flavor'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'isinstance'
op|'('
name|'flavor'
op|','
name|'objects'
op|'.'
name|'Flavor'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'flavor'
op|'='
name|'flavor'
newline|'\n'
dedent|''
name|'elif'
name|'isinstance'
op|'('
name|'flavor'
op|','
name|'dict'
op|')'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): Again, request_spec is primitived by'
nl|'\n'
comment|'# sched_utils.build_request_spec() and passed to'
nl|'\n'
comment|'# select_destinations() like this'
nl|'\n'
comment|'# TODO(sbauza): To be removed once all RequestSpec hydrations are'
nl|'\n'
comment|'# done on the conductor side'
nl|'\n'
indent|' '
name|'self'
op|'.'
name|'flavor'
op|'='
name|'objects'
op|'.'
name|'Flavor'
op|'('
op|'**'
name|'flavor'
op|')'
newline|'\n'
nl|'\n'
DECL|member|_from_retry
dedent|''
dedent|''
name|'def'
name|'_from_retry'
op|'('
name|'self'
op|','
name|'retry_dict'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'retry'
op|'='
op|'('
name|'SchedulerRetries'
op|'.'
name|'from_dict'
op|'('
name|'self'
op|'.'
name|'_context'
op|','
name|'retry_dict'
op|')'
nl|'\n'
name|'if'
name|'retry_dict'
name|'else'
name|'None'
op|')'
newline|'\n'
nl|'\n'
DECL|member|_populate_group_info
dedent|''
name|'def'
name|'_populate_group_info'
op|'('
name|'self'
op|','
name|'filter_properties'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'instance_group'"
op|')'
op|':'
newline|'\n'
comment|'# New-style group information as a NovaObject, we can directly set'
nl|'\n'
comment|'# the field'
nl|'\n'
indent|' '
name|'self'
op|'.'
name|'instance_group'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'instance_group'"
op|')'
newline|'\n'
dedent|''
name|'elif'
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'group_updated'"
op|')'
name|'is'
name|'True'
op|':'
newline|'\n'
comment|'# Old-style group information having ugly dict keys containing sets'
nl|'\n'
comment|'# NOTE(sbauza): Can be dropped once select_destinations is removed'
nl|'\n'
indent|' '
name|'policies'
op|'='
name|'list'
op|'('
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'group_policies'"
op|')'
op|')'
newline|'\n'
name|'hosts'
op|'='
name|'list'
op|'('
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'group_hosts'"
op|')'
op|')'
newline|'\n'
name|'members'
op|'='
name|'list'
op|'('
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'group_members'"
op|')'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'instance_group'
op|'='
name|'objects'
op|'.'
name|'InstanceGroup'
op|'('
name|'policies'
op|'='
name|'policies'
op|','
nl|'\n'
name|'hosts'
op|'='
name|'hosts'
op|','
nl|'\n'
name|'members'
op|'='
name|'members'
op|')'
newline|'\n'
comment|'# hosts has to be not part of the updates for saving the object'
nl|'\n'
name|'self'
op|'.'
name|'instance_group'
op|'.'
name|'obj_reset_changes'
op|'('
op|'['
string|"'hosts'"
op|']'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
comment|'# Set the value anyway to avoid any call to obj_attr_is_set for it'
nl|'\n'
indent|' '
name|'self'
op|'.'
name|'instance_group'
op|'='
name|'None'
newline|'\n'
nl|'\n'
DECL|member|_from_limits
dedent|''
dedent|''
name|'def'
name|'_from_limits'
op|'('
name|'self'
op|','
name|'limits_dict'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'limits'
op|'='
name|'SchedulerLimits'
op|'.'
name|'from_dict'
op|'('
name|'limits_dict'
op|')'
newline|'\n'
nl|'\n'
DECL|member|_from_hints
dedent|''
name|'def'
name|'_from_hints'
op|'('
name|'self'
op|','
name|'hints_dict'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'hints_dict'
name|'is'
name|'None'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'scheduler_hints'
op|'='
name|'None'
newline|'\n'
name|'return'
newline|'\n'
dedent|''
name|'self'
op|'.'
name|'scheduler_hints'
op|'='
op|'{'
nl|'\n'
name|'hint'
op|':'
name|'value'
name|'if'
name|'isinstance'
op|'('
name|'value'
op|','
name|'list'
op|')'
name|'else'
op|'['
name|'value'
op|']'
nl|'\n'
name|'for'
name|'hint'
op|','
name|'value'
name|'in'
name|'six'
op|'.'
name|'iteritems'
op|'('
name|'hints_dict'
op|')'
op|'}'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'classmethod'
newline|'\n'
DECL|member|from_primitives
name|'def'
name|'from_primitives'
op|'('
name|'cls'
op|','
name|'context'
op|','
name|'request_spec'
op|','
name|'filter_properties'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Returns a new RequestSpec object by hydrating it from legacy dicts.\n\n Deprecated. A RequestSpec object is created early in the boot process\n using the from_components method. That object will either be passed to\n places that require it, or it can be looked up with\n get_by_instance_uuid. This method can be removed when there are no\n longer any callers. Because the method is not remotable it is not tied\n to object versioning.\n\n That helper is not intended to leave the legacy dicts kept in the nova\n codebase, but is rather just for giving a temporary solution for\n populating the Spec object until we get rid of scheduler_utils\'\n build_request_spec() and the filter_properties hydratation in the\n conductor.\n\n :param context: a context object\n :param request_spec: An old-style request_spec dictionary\n :param filter_properties: An old-style filter_properties dictionary\n """'
newline|'\n'
name|'num_instances'
op|'='
name|'request_spec'
op|'.'
name|'get'
op|'('
string|"'num_instances'"
op|','
number|'1'
op|')'
newline|'\n'
name|'spec'
op|'='
name|'cls'
op|'('
name|'context'
op|','
name|'num_instances'
op|'='
name|'num_instances'
op|')'
newline|'\n'
comment|'# Hydrate from request_spec first'
nl|'\n'
name|'image'
op|'='
name|'request_spec'
op|'.'
name|'get'
op|'('
string|"'image'"
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_image_meta_from_image'
op|'('
name|'image'
op|')'
newline|'\n'
name|'instance'
op|'='
name|'request_spec'
op|'.'
name|'get'
op|'('
string|"'instance_properties'"
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_from_instance'
op|'('
name|'instance'
op|')'
newline|'\n'
name|'flavor'
op|'='
name|'request_spec'
op|'.'
name|'get'
op|'('
string|"'instance_type'"
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_from_flavor'
op|'('
name|'flavor'
op|')'
newline|'\n'
comment|'# Hydrate now from filter_properties'
nl|'\n'
name|'spec'
op|'.'
name|'ignore_hosts'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'ignore_hosts'"
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'force_hosts'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'force_hosts'"
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'force_nodes'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'force_nodes'"
op|')'
newline|'\n'
name|'retry'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'retry'"
op|','
op|'{'
op|'}'
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_from_retry'
op|'('
name|'retry'
op|')'
newline|'\n'
name|'limits'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'limits'"
op|','
op|'{'
op|'}'
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_from_limits'
op|'('
name|'limits'
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_populate_group_info'
op|'('
name|'filter_properties'
op|')'
newline|'\n'
name|'scheduler_hints'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'scheduler_hints'"
op|','
op|'{'
op|'}'
op|')'
newline|'\n'
name|'spec'
op|'.'
name|'_from_hints'
op|'('
name|'scheduler_hints'
op|')'
newline|'\n'
name|'return'
name|'spec'
newline|'\n'
nl|'\n'
DECL|member|get_scheduler_hint
dedent|''
name|'def'
name|'get_scheduler_hint'
op|'('
name|'self'
op|','
name|'hint_name'
op|','
name|'default'
op|'='
name|'None'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Convenient helper for accessing a particular scheduler hint since\n it is hydrated by putting a single item into a list.\n\n In order to reduce the complexity, that helper returns a string if the\n requested hint is a list of only one value, and if not, returns the\n value directly (ie. the list). If the hint is not existing (or\n scheduler_hints is None), then it returns the default value.\n\n :param hint_name: name of the hint\n :param default: the default value if the hint is not there\n """'
newline|'\n'
name|'if'
op|'('
name|'not'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'scheduler_hints'"
op|')'
nl|'\n'
name|'or'
name|'self'
op|'.'
name|'scheduler_hints'
name|'is'
name|'None'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'default'
newline|'\n'
dedent|''
name|'hint_val'
op|'='
name|'self'
op|'.'
name|'scheduler_hints'
op|'.'
name|'get'
op|'('
name|'hint_name'
op|','
name|'default'
op|')'
newline|'\n'
name|'return'
op|'('
name|'hint_val'
op|'['
number|'0'
op|']'
name|'if'
name|'isinstance'
op|'('
name|'hint_val'
op|','
name|'list'
op|')'
nl|'\n'
name|'and'
name|'len'
op|'('
name|'hint_val'
op|')'
op|'=='
number|'1'
name|'else'
name|'hint_val'
op|')'
newline|'\n'
nl|'\n'
DECL|member|_to_legacy_image
dedent|''
name|'def'
name|'_to_legacy_image'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'base'
op|'.'
name|'obj_to_primitive'
op|'('
name|'self'
op|'.'
name|'image'
op|')'
name|'if'
op|'('
nl|'\n'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'image'"
op|')'
name|'and'
name|'self'
op|'.'
name|'image'
op|')'
name|'else'
op|'{'
op|'}'
newline|'\n'
nl|'\n'
DECL|member|_to_legacy_instance
dedent|''
name|'def'
name|'_to_legacy_instance'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): Since the RequestSpec only persists a few Instance'
nl|'\n'
comment|'# fields, we can only return a dict.'
nl|'\n'
indent|' '
name|'instance'
op|'='
op|'{'
op|'}'
newline|'\n'
name|'instance_fields'
op|'='
op|'['
string|"'numa_topology'"
op|','
string|"'pci_requests'"
op|','
nl|'\n'
string|"'project_id'"
op|','
string|"'availability_zone'"
op|','
string|"'instance_uuid'"
op|']'
newline|'\n'
name|'for'
name|'field'
name|'in'
name|'instance_fields'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'not'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
name|'field'
op|')'
op|':'
newline|'\n'
indent|' '
name|'continue'
newline|'\n'
dedent|''
name|'if'
name|'field'
op|'=='
string|"'instance_uuid'"
op|':'
newline|'\n'
indent|' '
name|'instance'
op|'['
string|"'uuid'"
op|']'
op|'='
name|'getattr'
op|'('
name|'self'
op|','
name|'field'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'instance'
op|'['
name|'field'
op|']'
op|'='
name|'getattr'
op|'('
name|'self'
op|','
name|'field'
op|')'
newline|'\n'
dedent|''
dedent|''
name|'flavor_fields'
op|'='
op|'['
string|"'root_gb'"
op|','
string|"'ephemeral_gb'"
op|','
string|"'memory_mb'"
op|','
string|"'vcpus'"
op|']'
newline|'\n'
name|'if'
name|'not'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'flavor'"
op|')'
op|':'
newline|'\n'
indent|' '
name|'return'
name|'instance'
newline|'\n'
dedent|''
name|'for'
name|'field'
name|'in'
name|'flavor_fields'
op|':'
newline|'\n'
indent|' '
name|'instance'
op|'['
name|'field'
op|']'
op|'='
name|'getattr'
op|'('
name|'self'
op|'.'
name|'flavor'
op|','
name|'field'
op|')'
newline|'\n'
dedent|''
name|'return'
name|'instance'
newline|'\n'
nl|'\n'
DECL|member|_to_legacy_group_info
dedent|''
name|'def'
name|'_to_legacy_group_info'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): Since this is only needed until the AffinityFilters are'
nl|'\n'
comment|'# modified by using directly the RequestSpec object, we need to keep'
nl|'\n'
comment|'# the existing dictionary as a primitive.'
nl|'\n'
indent|' '
name|'return'
op|'{'
string|"'group_updated'"
op|':'
name|'True'
op|','
nl|'\n'
string|"'group_hosts'"
op|':'
name|'set'
op|'('
name|'self'
op|'.'
name|'instance_group'
op|'.'
name|'hosts'
op|')'
op|','
nl|'\n'
string|"'group_policies'"
op|':'
name|'set'
op|'('
name|'self'
op|'.'
name|'instance_group'
op|'.'
name|'policies'
op|')'
op|'}'
newline|'\n'
nl|'\n'
DECL|member|to_legacy_request_spec_dict
dedent|''
name|'def'
name|'to_legacy_request_spec_dict'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Returns a legacy request_spec dict from the RequestSpec object.\n\n Since we need to manage backwards compatibility and rolling upgrades\n within our RPC API, we need to accept to provide an helper for\n primitiving the right RequestSpec object into a legacy dict until we\n drop support for old Scheduler RPC API versions.\n If you don\'t understand why this method is needed, please don\'t use it.\n """'
newline|'\n'
name|'req_spec'
op|'='
op|'{'
op|'}'
newline|'\n'
name|'if'
name|'not'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'num_instances'"
op|')'
op|':'
newline|'\n'
indent|' '
name|'req_spec'
op|'['
string|"'num_instances'"
op|']'
op|'='
name|'self'
op|'.'
name|'fields'
op|'['
string|"'num_instances'"
op|']'
op|'.'
name|'default'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'req_spec'
op|'['
string|"'num_instances'"
op|']'
op|'='
name|'self'
op|'.'
name|'num_instances'
newline|'\n'
dedent|''
name|'req_spec'
op|'['
string|"'image'"
op|']'
op|'='
name|'self'
op|'.'
name|'_to_legacy_image'
op|'('
op|')'
newline|'\n'
name|'req_spec'
op|'['
string|"'instance_properties'"
op|']'
op|'='
name|'self'
op|'.'
name|'_to_legacy_instance'
op|'('
op|')'
newline|'\n'
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'flavor'"
op|')'
op|':'
newline|'\n'
indent|' '
name|'req_spec'
op|'['
string|"'instance_type'"
op|']'
op|'='
name|'self'
op|'.'
name|'flavor'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'req_spec'
op|'['
string|"'instance_type'"
op|']'
op|'='
op|'{'
op|'}'
newline|'\n'
dedent|''
name|'return'
name|'req_spec'
newline|'\n'
nl|'\n'
DECL|member|to_legacy_filter_properties_dict
dedent|''
name|'def'
name|'to_legacy_filter_properties_dict'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Returns a legacy filter_properties dict from the RequestSpec object.\n\n Since we need to manage backwards compatibility and rolling upgrades\n within our RPC API, we need to accept to provide an helper for\n primitiving the right RequestSpec object into a legacy dict until we\n drop support for old Scheduler RPC API versions.\n If you don\'t understand why this method is needed, please don\'t use it.\n """'
newline|'\n'
name|'filt_props'
op|'='
op|'{'
op|'}'
newline|'\n'
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'ignore_hosts'"
op|')'
name|'and'
name|'self'
op|'.'
name|'ignore_hosts'
op|':'
newline|'\n'
indent|' '
name|'filt_props'
op|'['
string|"'ignore_hosts'"
op|']'
op|'='
name|'self'
op|'.'
name|'ignore_hosts'
newline|'\n'
dedent|''
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'force_hosts'"
op|')'
name|'and'
name|'self'
op|'.'
name|'force_hosts'
op|':'
newline|'\n'
indent|' '
name|'filt_props'
op|'['
string|"'force_hosts'"
op|']'
op|'='
name|'self'
op|'.'
name|'force_hosts'
newline|'\n'
dedent|''
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'force_nodes'"
op|')'
name|'and'
name|'self'
op|'.'
name|'force_nodes'
op|':'
newline|'\n'
indent|' '
name|'filt_props'
op|'['
string|"'force_nodes'"
op|']'
op|'='
name|'self'
op|'.'
name|'force_nodes'
newline|'\n'
dedent|''
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'retry'"
op|')'
name|'and'
name|'self'
op|'.'
name|'retry'
op|':'
newline|'\n'
indent|' '
name|'filt_props'
op|'['
string|"'retry'"
op|']'
op|'='
name|'self'
op|'.'
name|'retry'
op|'.'
name|'to_dict'
op|'('
op|')'
newline|'\n'
dedent|''
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'limits'"
op|')'
name|'and'
name|'self'
op|'.'
name|'limits'
op|':'
newline|'\n'
indent|' '
name|'filt_props'
op|'['
string|"'limits'"
op|']'
op|'='
name|'self'
op|'.'
name|'limits'
op|'.'
name|'to_dict'
op|'('
op|')'
newline|'\n'
dedent|''
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'instance_group'"
op|')'
name|'and'
name|'self'
op|'.'
name|'instance_group'
op|':'
newline|'\n'
indent|' '
name|'filt_props'
op|'.'
name|'update'
op|'('
name|'self'
op|'.'
name|'_to_legacy_group_info'
op|'('
op|')'
op|')'
newline|'\n'
dedent|''
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'scheduler_hints'"
op|')'
name|'and'
name|'self'
op|'.'
name|'scheduler_hints'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): We need to backport all the hints correctly since'
nl|'\n'
comment|'# we had to hydrate the field by putting a single item into a list.'
nl|'\n'
indent|' '
name|'filt_props'
op|'['
string|"'scheduler_hints'"
op|']'
op|'='
op|'{'
name|'hint'
op|':'
name|'self'
op|'.'
name|'get_scheduler_hint'
op|'('
nl|'\n'
name|'hint'
op|')'
name|'for'
name|'hint'
name|'in'
name|'self'
op|'.'
name|'scheduler_hints'
op|'}'
newline|'\n'
dedent|''
name|'return'
name|'filt_props'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'classmethod'
newline|'\n'
DECL|member|from_components
name|'def'
name|'from_components'
op|'('
name|'cls'
op|','
name|'context'
op|','
name|'instance_uuid'
op|','
name|'image'
op|','
name|'flavor'
op|','
nl|'\n'
name|'numa_topology'
op|','
name|'pci_requests'
op|','
name|'filter_properties'
op|','
name|'instance_group'
op|','
nl|'\n'
name|'availability_zone'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Returns a new RequestSpec object hydrated by various components.\n\n This helper is useful in creating the RequestSpec from the various\n objects that are assembled early in the boot process. This method\n creates a complete RequestSpec object with all properties set or\n intentionally left blank.\n\n :param context: a context object\n :param instance_uuid: the uuid of the instance to schedule\n :param image: a dict of properties for an image or volume\n :param flavor: a flavor NovaObject\n :param numa_topology: InstanceNUMATopology or None\n :param pci_requests: InstancePCIRequests\n :param filter_properties: a dict of properties for scheduling\n :param instance_group: None or an instance group NovaObject\n :param availability_zone: an availability_zone string\n """'
newline|'\n'
name|'spec_obj'
op|'='
name|'cls'
op|'('
name|'context'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'num_instances'
op|'='
number|'1'
newline|'\n'
name|'spec_obj'
op|'.'
name|'instance_uuid'
op|'='
name|'instance_uuid'
newline|'\n'
name|'spec_obj'
op|'.'
name|'instance_group'
op|'='
name|'instance_group'
newline|'\n'
name|'if'
name|'spec_obj'
op|'.'
name|'instance_group'
name|'is'
name|'None'
name|'and'
name|'filter_properties'
op|':'
newline|'\n'
indent|' '
name|'spec_obj'
op|'.'
name|'_populate_group_info'
op|'('
name|'filter_properties'
op|')'
newline|'\n'
dedent|''
name|'spec_obj'
op|'.'
name|'project_id'
op|'='
name|'context'
op|'.'
name|'project_id'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_image_meta_from_image'
op|'('
name|'image'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_from_flavor'
op|'('
name|'flavor'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_from_instance_pci_requests'
op|'('
name|'pci_requests'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_from_instance_numa_topology'
op|'('
name|'numa_topology'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'ignore_hosts'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'ignore_hosts'"
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'force_hosts'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'force_hosts'"
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'force_nodes'
op|'='
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'force_nodes'"
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_from_retry'
op|'('
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'retry'"
op|','
op|'{'
op|'}'
op|')'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_from_limits'
op|'('
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'limits'"
op|','
op|'{'
op|'}'
op|')'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'_from_hints'
op|'('
name|'filter_properties'
op|'.'
name|'get'
op|'('
string|"'scheduler_hints'"
op|','
op|'{'
op|'}'
op|')'
op|')'
newline|'\n'
name|'spec_obj'
op|'.'
name|'availability_zone'
op|'='
name|'availability_zone'
newline|'\n'
name|'return'
name|'spec_obj'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'staticmethod'
newline|'\n'
DECL|member|_from_db_object
name|'def'
name|'_from_db_object'
op|'('
name|'context'
op|','
name|'spec'
op|','
name|'db_spec'
op|')'
op|':'
newline|'\n'
indent|' '
name|'spec_obj'
op|'='
name|'spec'
op|'.'
name|'obj_from_primitive'
op|'('
name|'jsonutils'
op|'.'
name|'loads'
op|'('
name|'db_spec'
op|'['
string|"'spec'"
op|']'
op|')'
op|')'
newline|'\n'
name|'for'
name|'key'
name|'in'
name|'spec'
op|'.'
name|'fields'
op|':'
newline|'\n'
comment|'# Load these from the db model not the serialized object within,'
nl|'\n'
comment|'# though they should match.'
nl|'\n'
indent|' '
name|'if'
name|'key'
name|'in'
op|'['
string|"'id'"
op|','
string|"'instance_uuid'"
op|']'
op|':'
newline|'\n'
indent|' '
name|'setattr'
op|'('
name|'spec'
op|','
name|'key'
op|','
name|'db_spec'
op|'['
name|'key'
op|']'
op|')'
newline|'\n'
dedent|''
name|'else'
op|':'
newline|'\n'
indent|' '
name|'setattr'
op|'('
name|'spec'
op|','
name|'key'
op|','
name|'getattr'
op|'('
name|'spec_obj'
op|','
name|'key'
op|')'
op|')'
newline|'\n'
dedent|''
dedent|''
name|'spec'
op|'.'
name|'_context'
op|'='
name|'context'
newline|'\n'
name|'spec'
op|'.'
name|'obj_reset_changes'
op|'('
op|')'
newline|'\n'
name|'return'
name|'spec'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'staticmethod'
newline|'\n'
op|'@'
name|'db'
op|'.'
name|'api_context_manager'
op|'.'
name|'reader'
newline|'\n'
DECL|member|_get_by_instance_uuid_from_db
name|'def'
name|'_get_by_instance_uuid_from_db'
op|'('
name|'context'
op|','
name|'instance_uuid'
op|')'
op|':'
newline|'\n'
indent|' '
name|'db_spec'
op|'='
name|'context'
op|'.'
name|'session'
op|'.'
name|'query'
op|'('
name|'api_models'
op|'.'
name|'RequestSpec'
op|')'
op|'.'
name|'filter_by'
op|'('
nl|'\n'
name|'instance_uuid'
op|'='
name|'instance_uuid'
op|')'
op|'.'
name|'first'
op|'('
op|')'
newline|'\n'
name|'if'
name|'not'
name|'db_spec'
op|':'
newline|'\n'
indent|' '
name|'raise'
name|'exception'
op|'.'
name|'RequestSpecNotFound'
op|'('
nl|'\n'
name|'instance_uuid'
op|'='
name|'instance_uuid'
op|')'
newline|'\n'
dedent|''
name|'return'
name|'db_spec'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'base'
op|'.'
name|'remotable_classmethod'
newline|'\n'
DECL|member|get_by_instance_uuid
name|'def'
name|'get_by_instance_uuid'
op|'('
name|'cls'
op|','
name|'context'
op|','
name|'instance_uuid'
op|')'
op|':'
newline|'\n'
indent|' '
name|'db_spec'
op|'='
name|'cls'
op|'.'
name|'_get_by_instance_uuid_from_db'
op|'('
name|'context'
op|','
name|'instance_uuid'
op|')'
newline|'\n'
name|'return'
name|'cls'
op|'.'
name|'_from_db_object'
op|'('
name|'context'
op|','
name|'cls'
op|'('
op|')'
op|','
name|'db_spec'
op|')'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'staticmethod'
newline|'\n'
op|'@'
name|'db'
op|'.'
name|'api_context_manager'
op|'.'
name|'writer'
newline|'\n'
DECL|member|_create_in_db
name|'def'
name|'_create_in_db'
op|'('
name|'context'
op|','
name|'updates'
op|')'
op|':'
newline|'\n'
indent|' '
name|'db_spec'
op|'='
name|'api_models'
op|'.'
name|'RequestSpec'
op|'('
op|')'
newline|'\n'
name|'db_spec'
op|'.'
name|'update'
op|'('
name|'updates'
op|')'
newline|'\n'
name|'db_spec'
op|'.'
name|'save'
op|'('
name|'context'
op|'.'
name|'session'
op|')'
newline|'\n'
name|'return'
name|'db_spec'
newline|'\n'
nl|'\n'
DECL|member|_get_update_primitives
dedent|''
name|'def'
name|'_get_update_primitives'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Serialize object to match the db model.\n\n We store copies of embedded objects rather than\n references to these objects because we want a snapshot of the request\n at this point. If the references changed or were deleted we would\n not be able to reschedule this instance under the same conditions as\n it was originally scheduled with.\n """'
newline|'\n'
name|'updates'
op|'='
name|'self'
op|'.'
name|'obj_get_changes'
op|'('
op|')'
newline|'\n'
comment|'# NOTE(alaski): The db schema is the full serialized object in a'
nl|'\n'
comment|"# 'spec' column. If anything has changed we rewrite the full thing."
nl|'\n'
name|'if'
name|'updates'
op|':'
newline|'\n'
indent|' '
name|'db_updates'
op|'='
op|'{'
string|"'spec'"
op|':'
name|'jsonutils'
op|'.'
name|'dumps'
op|'('
name|'self'
op|'.'
name|'obj_to_primitive'
op|'('
op|')'
op|')'
op|'}'
newline|'\n'
name|'if'
string|"'instance_uuid'"
name|'in'
name|'updates'
op|':'
newline|'\n'
indent|' '
name|'db_updates'
op|'['
string|"'instance_uuid'"
op|']'
op|'='
name|'updates'
op|'['
string|"'instance_uuid'"
op|']'
newline|'\n'
dedent|''
dedent|''
name|'return'
name|'db_updates'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'base'
op|'.'
name|'remotable'
newline|'\n'
DECL|member|create
name|'def'
name|'create'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'self'
op|'.'
name|'obj_attr_is_set'
op|'('
string|"'id'"
op|')'
op|':'
newline|'\n'
indent|' '
name|'raise'
name|'exception'
op|'.'
name|'ObjectActionError'
op|'('
name|'action'
op|'='
string|"'create'"
op|','
nl|'\n'
name|'reason'
op|'='
string|"'already created'"
op|')'
newline|'\n'
nl|'\n'
dedent|''
name|'updates'
op|'='
name|'self'
op|'.'
name|'_get_update_primitives'
op|'('
op|')'
newline|'\n'
nl|'\n'
name|'db_spec'
op|'='
name|'self'
op|'.'
name|'_create_in_db'
op|'('
name|'self'
op|'.'
name|'_context'
op|','
name|'updates'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'_from_db_object'
op|'('
name|'self'
op|'.'
name|'_context'
op|','
name|'self'
op|','
name|'db_spec'
op|')'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'staticmethod'
newline|'\n'
op|'@'
name|'db'
op|'.'
name|'api_context_manager'
op|'.'
name|'writer'
newline|'\n'
DECL|member|_save_in_db
name|'def'
name|'_save_in_db'
op|'('
name|'context'
op|','
name|'instance_uuid'
op|','
name|'updates'
op|')'
op|':'
newline|'\n'
comment|'# FIXME(sbauza): Provide a classmethod when oslo.db bug #1520195 is'
nl|'\n'
comment|'# fixed and released'
nl|'\n'
indent|' '
name|'db_spec'
op|'='
name|'RequestSpec'
op|'.'
name|'_get_by_instance_uuid_from_db'
op|'('
name|'context'
op|','
nl|'\n'
name|'instance_uuid'
op|')'
newline|'\n'
name|'db_spec'
op|'.'
name|'update'
op|'('
name|'updates'
op|')'
newline|'\n'
name|'db_spec'
op|'.'
name|'save'
op|'('
name|'context'
op|'.'
name|'session'
op|')'
newline|'\n'
name|'return'
name|'db_spec'
newline|'\n'
nl|'\n'
dedent|''
op|'@'
name|'base'
op|'.'
name|'remotable'
newline|'\n'
DECL|member|save
name|'def'
name|'save'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'updates'
op|'='
name|'self'
op|'.'
name|'_get_update_primitives'
op|'('
op|')'
newline|'\n'
name|'db_spec'
op|'='
name|'self'
op|'.'
name|'_save_in_db'
op|'('
name|'self'
op|'.'
name|'_context'
op|','
name|'self'
op|'.'
name|'instance_uuid'
op|','
name|'updates'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'_from_db_object'
op|'('
name|'self'
op|'.'
name|'_context'
op|','
name|'self'
op|','
name|'db_spec'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'obj_reset_changes'
op|'('
op|')'
newline|'\n'
nl|'\n'
DECL|member|reset_forced_destinations
dedent|''
name|'def'
name|'reset_forced_destinations'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""Clears the forced destination fields from the RequestSpec object.\n\n This method is for making sure we don\'t ask the scheduler to give us\n again the same destination(s) without persisting the modifications.\n """'
newline|'\n'
name|'self'
op|'.'
name|'force_hosts'
op|'='
name|'None'
newline|'\n'
name|'self'
op|'.'
name|'force_nodes'
op|'='
name|'None'
newline|'\n'
comment|"# NOTE(sbauza): Make sure we don't persist this, we need to keep the"
nl|'\n'
comment|'# original request for the forced hosts'
nl|'\n'
name|'self'
op|'.'
name|'obj_reset_changes'
op|'('
op|'['
string|"'force_hosts'"
op|','
string|"'force_nodes'"
op|']'
op|')'
newline|'\n'
nl|'\n'
nl|'\n'
dedent|''
dedent|''
op|'@'
name|'base'
op|'.'
name|'NovaObjectRegistry'
op|'.'
name|'register'
newline|'\n'
DECL|class|SchedulerRetries
name|'class'
name|'SchedulerRetries'
op|'('
name|'base'
op|'.'
name|'NovaObject'
op|')'
op|':'
newline|'\n'
comment|'# Version 1.0: Initial version'
nl|'\n'
comment|'# Version 1.1: ComputeNodeList version 1.14'
nl|'\n'
DECL|variable|VERSION
indent|' '
name|'VERSION'
op|'='
string|"'1.1'"
newline|'\n'
nl|'\n'
DECL|variable|fields
name|'fields'
op|'='
op|'{'
nl|'\n'
string|"'num_attempts'"
op|':'
name|'fields'
op|'.'
name|'IntegerField'
op|'('
op|')'
op|','
nl|'\n'
comment|'# NOTE(sbauza): Even if we are only using host/node strings, we need to'
nl|'\n'
comment|'# know which compute nodes were tried'
nl|'\n'
string|"'hosts'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'ComputeNodeList'"
op|')'
op|','
nl|'\n'
op|'}'
newline|'\n'
nl|'\n'
op|'@'
name|'classmethod'
newline|'\n'
DECL|member|from_dict
name|'def'
name|'from_dict'
op|'('
name|'cls'
op|','
name|'context'
op|','
name|'retry_dict'
op|')'
op|':'
newline|'\n'
comment|"# NOTE(sbauza): We are not persisting the user context since it's only"
nl|'\n'
comment|'# needed for hydrating the Retry object'
nl|'\n'
indent|' '
name|'retry_obj'
op|'='
name|'cls'
op|'('
op|')'
newline|'\n'
name|'if'
name|'not'
op|'('
string|"'num_attempts'"
name|'and'
string|"'hosts'"
op|')'
name|'in'
name|'retry_dict'
op|':'
newline|'\n'
comment|'# NOTE(sbauza): We prefer to return an empty object if the'
nl|'\n'
comment|'# primitive is not good enough'
nl|'\n'
indent|' '
name|'return'
name|'retry_obj'
newline|'\n'
dedent|''
name|'retry_obj'
op|'.'
name|'num_attempts'
op|'='
name|'retry_dict'
op|'.'
name|'get'
op|'('
string|"'num_attempts'"
op|')'
newline|'\n'
comment|"# NOTE(sbauza): each retry_dict['hosts'] item is a list of [host, node]"
nl|'\n'
name|'computes'
op|'='
op|'['
name|'objects'
op|'.'
name|'ComputeNode'
op|'('
name|'context'
op|'='
name|'context'
op|','
name|'host'
op|'='
name|'host'
op|','
nl|'\n'
name|'hypervisor_hostname'
op|'='
name|'node'
op|')'
nl|'\n'
name|'for'
name|'host'
op|','
name|'node'
name|'in'
name|'retry_dict'
op|'.'
name|'get'
op|'('
string|"'hosts'"
op|')'
op|']'
newline|'\n'
name|'retry_obj'
op|'.'
name|'hosts'
op|'='
name|'objects'
op|'.'
name|'ComputeNodeList'
op|'('
name|'objects'
op|'='
name|'computes'
op|')'
newline|'\n'
name|'return'
name|'retry_obj'
newline|'\n'
nl|'\n'
DECL|member|to_dict
dedent|''
name|'def'
name|'to_dict'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'legacy_hosts'
op|'='
op|'['
op|'['
name|'cn'
op|'.'
name|'host'
op|','
name|'cn'
op|'.'
name|'hypervisor_hostname'
op|']'
name|'for'
name|'cn'
name|'in'
name|'self'
op|'.'
name|'hosts'
op|']'
newline|'\n'
name|'return'
op|'{'
string|"'num_attempts'"
op|':'
name|'self'
op|'.'
name|'num_attempts'
op|','
nl|'\n'
string|"'hosts'"
op|':'
name|'legacy_hosts'
op|'}'
newline|'\n'
nl|'\n'
nl|'\n'
dedent|''
dedent|''
op|'@'
name|'base'
op|'.'
name|'NovaObjectRegistry'
op|'.'
name|'register'
newline|'\n'
DECL|class|SchedulerLimits
name|'class'
name|'SchedulerLimits'
op|'('
name|'base'
op|'.'
name|'NovaObject'
op|')'
op|':'
newline|'\n'
comment|'# Version 1.0: Initial version'
nl|'\n'
DECL|variable|VERSION
indent|' '
name|'VERSION'
op|'='
string|"'1.0'"
newline|'\n'
nl|'\n'
DECL|variable|fields
name|'fields'
op|'='
op|'{'
nl|'\n'
string|"'numa_topology'"
op|':'
name|'fields'
op|'.'
name|'ObjectField'
op|'('
string|"'NUMATopologyLimits'"
op|','
nl|'\n'
DECL|variable|nullable
name|'nullable'
op|'='
name|'True'
op|','
nl|'\n'
DECL|variable|default
name|'default'
op|'='
name|'None'
op|')'
op|','
nl|'\n'
string|"'vcpu'"
op|':'
name|'fields'
op|'.'
name|'IntegerField'
op|'('
name|'nullable'
op|'='
name|'True'
op|','
name|'default'
op|'='
name|'None'
op|')'
op|','
nl|'\n'
string|"'disk_gb'"
op|':'
name|'fields'
op|'.'
name|'IntegerField'
op|'('
name|'nullable'
op|'='
name|'True'
op|','
name|'default'
op|'='
name|'None'
op|')'
op|','
nl|'\n'
string|"'memory_mb'"
op|':'
name|'fields'
op|'.'
name|'IntegerField'
op|'('
name|'nullable'
op|'='
name|'True'
op|','
name|'default'
op|'='
name|'None'
op|')'
op|','
nl|'\n'
op|'}'
newline|'\n'
nl|'\n'
op|'@'
name|'classmethod'
newline|'\n'
DECL|member|from_dict
name|'def'
name|'from_dict'
op|'('
name|'cls'
op|','
name|'limits_dict'
op|')'
op|':'
newline|'\n'
indent|' '
name|'limits'
op|'='
name|'cls'
op|'('
op|'**'
name|'limits_dict'
op|')'
newline|'\n'
comment|'# NOTE(sbauza): Since the limits can be set for each field or not, we'
nl|'\n'
comment|'# prefer to have the fields nullable, but default the value to None.'
nl|'\n'
comment|'# Here we accept that the object is always generated from a primitive'
nl|'\n'
comment|'# hence the use of obj_set_defaults exceptionally.'
nl|'\n'
name|'limits'
op|'.'
name|'obj_set_defaults'
op|'('
op|')'
newline|'\n'
name|'return'
name|'limits'
newline|'\n'
nl|'\n'
DECL|member|to_dict
dedent|''
name|'def'
name|'to_dict'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'limits'
op|'='
op|'{'
op|'}'
newline|'\n'
name|'for'
name|'field'
name|'in'
name|'self'
op|'.'
name|'fields'
op|':'
newline|'\n'
indent|' '
name|'if'
name|'getattr'
op|'('
name|'self'
op|','
name|'field'
op|')'
name|'is'
name|'not'
name|'None'
op|':'
newline|'\n'
indent|' '
name|'limits'
op|'['
name|'field'
op|']'
op|'='
name|'getattr'
op|'('
name|'self'
op|','
name|'field'
op|')'
newline|'\n'
dedent|''
dedent|''
name|'return'
name|'limits'
newline|'\n'
dedent|''
dedent|''
endmarker|''
end_unit
| 14.494991
| 1,018
| 0.620753
| 6,847
| 46,297
| 4.099168
| 0.06952
| 0.137457
| 0.069477
| 0.051377
| 0.753839
| 0.683115
| 0.617487
| 0.548545
| 0.478177
| 0.426016
| 0
| 0.001379
| 0.12301
| 46,297
| 3,193
| 1,019
| 14.49953
| 0.689892
| 0
| 0
| 0.946759
| 0
| 0.000626
| 0.653973
| 0.088537
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.000626
| 0.003132
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5fc0e71e7d02ff582dfa669b591962a12eb2e52f
| 95
|
py
|
Python
|
setup.py
|
codingjoe/codingjoes_new_package
|
56d7b5a01f1504ce1b5e3e2850cfc68d28d7d02a
|
[
"MIT"
] | null | null | null |
setup.py
|
codingjoe/codingjoes_new_package
|
56d7b5a01f1504ce1b5e3e2850cfc68d28d7d02a
|
[
"MIT"
] | null | null | null |
setup.py
|
codingjoe/codingjoes_new_package
|
56d7b5a01f1504ce1b5e3e2850cfc68d28d7d02a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from setuptools import setup
setup(version_format='{tag}.dev{commits}')
| 19
| 42
| 0.757895
| 14
| 95
| 5.071429
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084211
| 95
| 4
| 43
| 23.75
| 0.816092
| 0.210526
| 0
| 0
| 0
| 0
| 0.243243
| 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
|
5fc6590fd9eb4ea09aea8a11243e79690219e923
| 171
|
py
|
Python
|
JPS_Chatbot/EnvironmentTest/chatbot/calculate.py
|
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
|
011aee78c016b76762eaf511c78fabe3f98189f4
|
[
"MIT"
] | 21
|
2021-03-08T01:58:25.000Z
|
2022-03-09T15:46:16.000Z
|
JPS_Chatbot/EnvironmentTest/chatbot/calculate.py
|
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
|
011aee78c016b76762eaf511c78fabe3f98189f4
|
[
"MIT"
] | 63
|
2021-05-04T15:05:30.000Z
|
2022-03-23T14:32:29.000Z
|
JPS_Chatbot/EnvironmentTest/chatbot/calculate.py
|
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
|
011aee78c016b76762eaf511c78fabe3f98189f4
|
[
"MIT"
] | 15
|
2021-03-08T07:52:03.000Z
|
2022-03-29T04:46:20.000Z
|
class Calculator:
def __init__(self, socket):
self.socket = socket
def run(self):
self.socket.emit('response', 'Here is your result')
| 15.545455
| 59
| 0.584795
| 20
| 171
| 4.8
| 0.65
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.304094
| 171
| 10
| 60
| 17.1
| 0.806723
| 0
| 0
| 0
| 0
| 0
| 0.158824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
396ba326c6d51e9cb8dcedff321b5b1b4b698c65
| 328
|
py
|
Python
|
dgs/context_processors.py
|
machakux/dgs
|
46de3cdaced5e4afef46fa46c7a3303d53df0da0
|
[
"Unlicense"
] | 6
|
2017-11-06T02:50:31.000Z
|
2021-09-18T08:12:05.000Z
|
dgs/context_processors.py
|
machakux/dgs
|
46de3cdaced5e4afef46fa46c7a3303d53df0da0
|
[
"Unlicense"
] | 5
|
2017-07-08T07:58:07.000Z
|
2017-09-11T06:13:03.000Z
|
dgs/context_processors.py
|
machakux/dgs
|
46de3cdaced5e4afef46fa46c7a3303d53df0da0
|
[
"Unlicense"
] | 2
|
2017-09-15T20:49:41.000Z
|
2019-09-10T11:03:59.000Z
|
from django.conf import settings
def site(request):
return {
'SITE_NAME': getattr(settings, 'SITE_NAME', ''),
'PUBLIC_SITE_URL': getattr(settings, 'PUBLIC_SITE_URL', '/'),
'SITE_API_NAME': getattr(settings, 'SITE_API_NAME', ''),
'SITE_API_URL': getattr(settings, 'SITE_API_URL', ''),
}
| 29.818182
| 69
| 0.628049
| 39
| 328
| 4.923077
| 0.358974
| 0.3125
| 0.296875
| 0.239583
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204268
| 328
| 10
| 70
| 32.8
| 0.735632
| 0
| 0
| 0
| 0
| 0
| 0.301829
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.125
| 0.125
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
3986566ad8c7363cf4384f57099947cb91e07deb
| 2,273
|
py
|
Python
|
utilities/test_find_pairs_pt.py
|
davemungo/various
|
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
|
[
"MIT"
] | 1
|
2020-01-19T01:21:56.000Z
|
2020-01-19T01:21:56.000Z
|
utilities/test_find_pairs_pt.py
|
davemungo/various
|
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
|
[
"MIT"
] | null | null | null |
utilities/test_find_pairs_pt.py
|
davemungo/various
|
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
|
[
"MIT"
] | 1
|
2021-07-02T14:40:01.000Z
|
2021-07-02T14:40:01.000Z
|
# Test code for find_pairs_pt.py
import pytest
import find_pairs_pt as fp
def test_no_pairs():
test_array = [9]
response = []
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_one_pair():
test_array = [1,9]
response = [(1,9)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
# Same thing, order reversed
test_array = [9,1]
response = [(9,1)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_values_to_skip():
test_array = [9,1,6]
response = [(9,1)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_use_both_end_values():
test_array = [9,6,1]
response = [(9,1)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_avoid_repeated_single_value():
test_array = [5]
response = []
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_repeated_values():
test_array = [5,5]
response = [(5,5)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_multiple_pairs():
test_array = [9,6,1,4,7]
response = [(9,1), (6,4)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_multiple_pairs_repeated_value():
test_array = [9,6,1,4,7,1]
response = [(9,1), (9,1), (6,4)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
def test_alternate_target():
test_array = [1,3,7,5,9]
target_value = 14
response = [(5,9)]
assert fp.find_pairs_simple(test_array, target_value) == response
assert fp.find_pairs(test_array, target_value) == response
def test_negative_values():
test_array = [13,-3,7,5,9]
response = [(13,-3)]
assert fp.find_pairs_simple(test_array) == response
assert fp.find_pairs(test_array) == response
| 27.719512
| 70
| 0.657281
| 330
| 2,273
| 4.224242
| 0.139394
| 0.213056
| 0.189383
| 0.268293
| 0.728121
| 0.698709
| 0.698709
| 0.654232
| 0.629842
| 0.629842
| 0
| 0.035553
| 0.220414
| 2,273
| 81
| 71
| 28.061728
| 0.751129
| 0.025077
| 0
| 0.438596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.385965
| 1
| 0.175439
| false
| 0
| 0.035088
| 0
| 0.210526
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 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
|
39b1faeb8921d5ab678c96768e71ca41de1684aa
| 52
|
py
|
Python
|
examples/struct_instantiation/__init__.py
|
radeklat/sparkql
|
57d55c7599460f2e7e5957c037d7c25cedb92647
|
[
"MIT"
] | 6
|
2020-02-12T14:01:08.000Z
|
2020-05-29T05:35:09.000Z
|
examples/struct_instantiation/__init__.py
|
radeklat/sparkql
|
57d55c7599460f2e7e5957c037d7c25cedb92647
|
[
"MIT"
] | 31
|
2020-02-09T18:52:52.000Z
|
2020-05-15T16:03:32.000Z
|
examples/struct_instantiation/__init__.py
|
radeklat/sparkql
|
57d55c7599460f2e7e5957c037d7c25cedb92647
|
[
"MIT"
] | 1
|
2020-04-03T19:23:08.000Z
|
2020-04-03T19:23:08.000Z
|
"""Examples of creating an instance of a schema."""
| 26
| 51
| 0.711538
| 8
| 52
| 4.625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 52
| 1
| 52
| 52
| 0.840909
| 0.865385
| 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
|
39c627ad94ccdad37e2eb0f4073705f863de01e3
| 104
|
py
|
Python
|
src/commands/exit.py
|
MineHubCZ/MH-DOS
|
0d1361aee8aa4903e7b6c89c1df279b74d55d703
|
[
"MIT"
] | 2
|
2021-08-01T12:59:59.000Z
|
2021-09-27T05:51:05.000Z
|
src/commands/exit.py
|
MineHubCZ/MH-DOS
|
0d1361aee8aa4903e7b6c89c1df279b74d55d703
|
[
"MIT"
] | 3
|
2021-07-25T07:54:19.000Z
|
2021-08-18T20:35:26.000Z
|
src/commands/exit.py
|
MineHubCZ/MH-DOS
|
0d1361aee8aa4903e7b6c89c1df279b74d55d703
|
[
"MIT"
] | null | null | null |
from helpers.rich import printr
def exit_dos(arguments):
printr("<blue>Ok, bye! <end>")
exit()
| 17.333333
| 34
| 0.663462
| 15
| 104
| 4.533333
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182692
| 104
| 5
| 35
| 20.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
39d84f5ee64770b220f2dc2b1b8f2ac60e59f1c2
| 149
|
py
|
Python
|
setup.py
|
KOLANICH/ELFRelocs.py
|
f4ee4cb7e4819f61d427f9feb76bedbba51007fc
|
[
"Unlicense"
] | null | null | null |
setup.py
|
KOLANICH/ELFRelocs.py
|
f4ee4cb7e4819f61d427f9feb76bedbba51007fc
|
[
"Unlicense"
] | null | null | null |
setup.py
|
KOLANICH/ELFRelocs.py
|
f4ee4cb7e4819f61d427f9feb76bedbba51007fc
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python3
import os
from setuptools import setup
from pathlib import Path
thisDir = Path(__file__).parent
setup(use_scm_version = True)
| 21.285714
| 31
| 0.798658
| 23
| 149
| 4.913043
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007634
| 0.120805
| 149
| 6
| 32
| 24.833333
| 0.854962
| 0.14094
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 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
|
39f25ea4eac292f8f4d684c25ea44c5799562a30
| 57
|
py
|
Python
|
authentek/wsgi.py
|
eshta/authentek
|
c81e5e6bd3f0cc68f224fb92b663445f8d1ee4d4
|
[
"MIT"
] | null | null | null |
authentek/wsgi.py
|
eshta/authentek
|
c81e5e6bd3f0cc68f224fb92b663445f8d1ee4d4
|
[
"MIT"
] | null | null | null |
authentek/wsgi.py
|
eshta/authentek
|
c81e5e6bd3f0cc68f224fb92b663445f8d1ee4d4
|
[
"MIT"
] | null | null | null |
from authentek.app import create_app
app = create_app()
| 14.25
| 36
| 0.789474
| 9
| 57
| 4.777778
| 0.555556
| 0.418605
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 57
| 3
| 37
| 19
| 0.877551
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
8408541783670337922f5f64a8f15b1356f2e348
| 167
|
py
|
Python
|
seaborn/python_2_to_3/python_2_to_3.py
|
christensonb/Seaborn
|
adac2dfe60aabd754f93efd3b109213e5ee58772
|
[
"MIT"
] | null | null | null |
seaborn/python_2_to_3/python_2_to_3.py
|
christensonb/Seaborn
|
adac2dfe60aabd754f93efd3b109213e5ee58772
|
[
"MIT"
] | null | null | null |
seaborn/python_2_to_3/python_2_to_3.py
|
christensonb/Seaborn
|
adac2dfe60aabd754f93efd3b109213e5ee58772
|
[
"MIT"
] | null | null | null |
import sys
if sys.version_info[0] == 3:
xrange = range
basestring = str
unicode = str
from io import StringIO
else:
from StringIO import StringIO
| 16.7
| 33
| 0.670659
| 23
| 167
| 4.826087
| 0.695652
| 0.252252
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.269461
| 167
| 9
| 34
| 18.555556
| 0.893443
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 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
|
841bdfda2c2084f22c34c1a8d4f54b5ff7fd1a07
| 269
|
py
|
Python
|
src/podping_hivewriter/exceptions.py
|
brianoflondon/podping-hivewriter
|
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
|
[
"MIT"
] | 11
|
2021-05-28T15:58:31.000Z
|
2022-03-21T07:08:58.000Z
|
src/podping_hivewriter/exceptions.py
|
brianoflondon/podping-hivewriter
|
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
|
[
"MIT"
] | 33
|
2021-06-12T09:23:47.000Z
|
2022-02-27T06:34:05.000Z
|
src/podping_hivewriter/exceptions.py
|
brianoflondon/podping-hivewriter
|
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
|
[
"MIT"
] | 3
|
2021-07-30T19:40:04.000Z
|
2022-01-19T04:14:14.000Z
|
class PodpingCustomJsonPayloadExceeded(RuntimeError):
"""Raise when the size of a json string exceeds the custom_json payload limit"""
class TooManyCustomJsonsPerBlock(RuntimeError):
"""Raise when trying to write more than 5 custom_jsons in a single block"""
| 38.428571
| 84
| 0.784387
| 34
| 269
| 6.147059
| 0.764706
| 0.162679
| 0.200957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004367
| 0.148699
| 269
| 6
| 85
| 44.833333
| 0.908297
| 0.535316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
84266c693f6d7763f6c9fabd5cc539ad165d9cee
| 85
|
py
|
Python
|
Chapter02-modifiability/loop2.py
|
showa-yojyo/Software-Architecture-with-Python
|
46ba48911065292c9d391f66d7213c01699fca80
|
[
"MIT"
] | null | null | null |
Chapter02-modifiability/loop2.py
|
showa-yojyo/Software-Architecture-with-Python
|
46ba48911065292c9d391f66d7213c01699fca80
|
[
"MIT"
] | null | null | null |
Chapter02-modifiability/loop2.py
|
showa-yojyo/Software-Architecture-with-Python
|
46ba48911065292c9d391f66d7213c01699fca80
|
[
"MIT"
] | null | null | null |
# Code listing #2
for idx, item in enumerate(seq):
print(f'{idx} => {seq[idx]}')
| 21.25
| 33
| 0.6
| 14
| 85
| 3.642857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.188235
| 85
| 3
| 34
| 28.333333
| 0.724638
| 0.164706
| 0
| 0
| 0
| 0
| 0.279412
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
84334ba3ba1467b344b4726bf781daa11cc25e63
| 62
|
py
|
Python
|
adjutant/actions/v1/__init__.py
|
CCI-MOC/adjutant
|
032db3124ea0b0632afdfc27afc60b6c66cf5f66
|
[
"Apache-2.0"
] | null | null | null |
adjutant/actions/v1/__init__.py
|
CCI-MOC/adjutant
|
032db3124ea0b0632afdfc27afc60b6c66cf5f66
|
[
"Apache-2.0"
] | null | null | null |
adjutant/actions/v1/__init__.py
|
CCI-MOC/adjutant
|
032db3124ea0b0632afdfc27afc60b6c66cf5f66
|
[
"Apache-2.0"
] | 1
|
2019-04-18T12:21:59.000Z
|
2019-04-18T12:21:59.000Z
|
default_app_config = 'adjutant.actions.v1.app.ActionV1Config'
| 31
| 61
| 0.83871
| 8
| 62
| 6.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033898
| 0.048387
| 62
| 1
| 62
| 62
| 0.813559
| 0
| 0
| 0
| 0
| 0
| 0.612903
| 0.612903
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8434a087e0ac1859044410b73db19fe157003926
| 1,356
|
py
|
Python
|
LeetCode/Array/238. Product of Array Except Self.py
|
ctc316/algorithm-python
|
ac4580d55e05e93e407c6156c9bb801808027d60
|
[
"MIT"
] | null | null | null |
LeetCode/Array/238. Product of Array Except Self.py
|
ctc316/algorithm-python
|
ac4580d55e05e93e407c6156c9bb801808027d60
|
[
"MIT"
] | null | null | null |
LeetCode/Array/238. Product of Array Except Self.py
|
ctc316/algorithm-python
|
ac4580d55e05e93e407c6156c9bb801808027d60
|
[
"MIT"
] | null | null | null |
# Version 1: build products of before and after i, Time: O(n), Space: O(n)
class Solution:
def productExceptSelf(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
# scan from left to right to find products before i
before_i = [i for i in range(len(nums))]
prod = 1
for i in range(len(nums)):
before_i[i] = prod
prod *= nums[i]
# scan from left to right to find products after i
after_i = [i for i in range(len(nums))]
prod = 1
for i in range(len(nums) - 1, -1, -1):
after_i[i] = prod
prod *= nums[i]
return [before_i[i] * after_i[i] for i in range(len(nums))]
# Version 2: save extra space, Time: O(n), Space: O(1)
class Solution:
def productExceptSelf(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
products = [i for i in range(len(nums))]
# scan from left to right to find products before i
prod = 1
for i in range(len(nums)):
products[i] = prod
prod *= nums[i]
# scan from left to right to mutiply products after i
prod = 1
for i in range(len(nums) - 1, -1, -1):
products[i] *= prod
prod *= nums[i]
return products
| 27.673469
| 74
| 0.518437
| 197
| 1,356
| 3.538071
| 0.19797
| 0.045911
| 0.068867
| 0.126255
| 0.817791
| 0.783357
| 0.700143
| 0.672884
| 0.655667
| 0.621234
| 0
| 0.015116
| 0.365782
| 1,356
| 49
| 75
| 27.673469
| 0.795349
| 0.300147
| 0
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.08
| false
| 0
| 0
| 0
| 0.24
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 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
|
844af689a61388880536344306e40b7bfd1de2ac
| 302
|
py
|
Python
|
SUSOD/views/__init__.py
|
whale-net/SUSOD
|
404cd25e08db10759073475821353eaf4c0a7041
|
[
"MIT"
] | 1
|
2020-08-06T04:07:42.000Z
|
2020-08-06T04:07:42.000Z
|
SUSOD/views/__init__.py
|
whale-net/SUSOD
|
404cd25e08db10759073475821353eaf4c0a7041
|
[
"MIT"
] | 4
|
2020-05-24T20:30:43.000Z
|
2021-05-10T04:21:58.000Z
|
SUSOD/views/__init__.py
|
whale-net/SUSOD
|
404cd25e08db10759073475821353eaf4c0a7041
|
[
"MIT"
] | null | null | null |
"""
Export view for each indvidual page.
Usually populates a templated HTML web page with session data.
Could also call model functions and populate data.
Really the world is your oyster here but this module
is intended to serve your view pages.
"""
from .index import show_index
from .user import *
| 27.454545
| 62
| 0.781457
| 49
| 302
| 4.795918
| 0.836735
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175497
| 302
| 11
| 63
| 27.454545
| 0.943775
| 0.804636
| 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
|
081dab06f9e770760650cbcd1c2896daea07b19c
| 2,625
|
py
|
Python
|
DailyProgrammer/DP20140910B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | 2
|
2020-12-23T18:59:22.000Z
|
2021-04-14T13:16:09.000Z
|
DailyProgrammer/DP20140910B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
DailyProgrammer/DP20140910B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
"""
[9/10/2014] Challenge #179 [Intermediate] Roguelike - The traveller Game
https://www.reddit.com/r/dailyprogrammer/comments/2g1c80/9102014_challenge_179_intermediate_roguelike_the/
#Description:
So I was fooling around once with an idea to make a fun Rogue like game.
If you do not know what a Rogue Like is check out [Wikipedia Article] (http://en.wikipedia.org/wiki/Roguelike) on what
it is about.
I got this really weak start at just trying to generate a more graphical approach than ASCII text. If you want to see
my attempt. Check out my incomplete project [FORGE] (http://coderd00d.com/Forge/index.html)
For this challenge you will have to develop a character moving in a rogue like environment. So the design requirements.
* 1 Hero character who moves up/down/left/right in a box map.
* Map must have boundary elements to contain it -- Walls/Water/Moutains/Whatever you come up with
* Hero does not have to be a person. Could be a spaceship/sea creature/whatever - Just has to move up/down/left/right
on a 2-D map
* Map has to be 20x20. The boundary are some element which prevents passage like a wall, water or blackholes. Whatever
fits your theme.
* Your hero has 100 movement points. Each time they move up/down/left/right they lose 1 movement points. When they
reach 0 movement points the game ends.
* Random elements are generated in the room. Gold. Treasure. Plants. Towns. Caves. Whatever. When the hero reaches that
point they score a point. You must have 100 random elements.
* At the end of the game when your hero is out of movement. The score is based on how many elements you are able to
move to. The higher the score the better.
* Hero starts either in a fixed room spot or random spot. I leave it to you to decide.
#input:
Some keyboard/other method for moving a hero up/down/left/right and way to end the game like Q or Esc or whatever.
#output:
The 20x20 map with the hero updating if you can with moves. Show how much movement points you have and score.
At the end of the game show some final score box. Good luck and have fun.
#Example:
ASCII Map might look like this. (This is not 20x20 but yours will be 20x20)
* % = Wall
* $ = Random element
* @ = the hero
A simple dungeon.
%%%%%%%%%%
%..$.....%
%......$.%
%...@....%
%....$...%
%.$......%
%%%%%%%%%%
Move: 100
Score: 0
#Creative Challenge:
This is a creative challenge. You can use ASCII graphics or bmp graphics or more. You can add more elements to this.
But regardless have fun trying to make this challenge work for you.
"""
def main():
pass
if __name__ == "__main__":
main()
| 45.258621
| 119
| 0.728762
| 445
| 2,625
| 4.269663
| 0.453933
| 0.012632
| 0.021053
| 0.031579
| 0.075789
| 0.017895
| 0
| 0
| 0
| 0
| 0
| 0.026254
| 0.187429
| 2,625
| 57
| 120
| 46.052632
| 0.86451
| 0.972571
| 0
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0
| 0
| 0.25
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
08207519eb6275cb45f88abc2e0783a8dd7de718
| 699
|
py
|
Python
|
python/terra_proto/ibc/lightclients/localhost/v1/__init__.py
|
Vritra4/terra.proto
|
977264b7c3e0f9d135120d77b48657b82f5eacf6
|
[
"Apache-2.0"
] | 1
|
2022-02-22T06:18:40.000Z
|
2022-02-22T06:18:40.000Z
|
python/osmosis_proto/ibc/lightclients/localhost/v1/__init__.py
|
fabio-nukui/osmosis.proto
|
4780f22681881626b853109971602a6e29a3fb69
|
[
"Apache-2.0"
] | null | null | null |
python/osmosis_proto/ibc/lightclients/localhost/v1/__init__.py
|
fabio-nukui/osmosis.proto
|
4780f22681881626b853109971602a6e29a3fb69
|
[
"Apache-2.0"
] | null | null | null |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: ibc/lightclients/localhost/v1/localhost.proto
# plugin: python-betterproto
from dataclasses import dataclass
import betterproto
from betterproto.grpc.grpclib_server import ServiceBase
@dataclass(eq=False, repr=False)
class ClientState(betterproto.Message):
"""
ClientState defines a loopback (localhost) client. It requires (read-only)
access to keys outside the client prefix.
"""
# self chain ID
chain_id: str = betterproto.string_field(1)
# self latest block height
height: "___core_client_v1__.Height" = betterproto.message_field(2)
from ....core.client import v1 as ___core_client_v1__
| 29.125
| 78
| 0.759657
| 90
| 699
| 5.7
| 0.644444
| 0.05848
| 0.046784
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010187
| 0.157368
| 699
| 23
| 79
| 30.391304
| 0.860781
| 0.422031
| 0
| 0
| 1
| 0
| 0.068421
| 0.068421
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
084fc1a405d9b0c6014ca9bc8c6abcdab7931b7d
| 28
|
py
|
Python
|
reservoirpy/_version.py
|
neuronalX/Funky_Reservoir
|
ce11aafb02ad36d37232a8a813e70923e0da1cc8
|
[
"MIT"
] | null | null | null |
reservoirpy/_version.py
|
neuronalX/Funky_Reservoir
|
ce11aafb02ad36d37232a8a813e70923e0da1cc8
|
[
"MIT"
] | null | null | null |
reservoirpy/_version.py
|
neuronalX/Funky_Reservoir
|
ce11aafb02ad36d37232a8a813e70923e0da1cc8
|
[
"MIT"
] | null | null | null |
__version__ = "0.3.2.post1"
| 14
| 27
| 0.678571
| 5
| 28
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 0.107143
| 28
| 1
| 28
| 28
| 0.44
| 0
| 0
| 0
| 0
| 0
| 0.392857
| 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
|
f22d9080770e8887e98e9dcd9ebb6f4121dd2d91
| 547
|
py
|
Python
|
FeiZhai/feizhaipro/apps/news/migrations/0007_auto_20181031_1327.py
|
FSen0/FeiZhai
|
5fa635551066a1ba2866b345b39ecf13ef070103
|
[
"Apache-2.0"
] | null | null | null |
FeiZhai/feizhaipro/apps/news/migrations/0007_auto_20181031_1327.py
|
FSen0/FeiZhai
|
5fa635551066a1ba2866b345b39ecf13ef070103
|
[
"Apache-2.0"
] | null | null | null |
FeiZhai/feizhaipro/apps/news/migrations/0007_auto_20181031_1327.py
|
FSen0/FeiZhai
|
5fa635551066a1ba2866b345b39ecf13ef070103
|
[
"Apache-2.0"
] | null | null | null |
# Generated by Django 2.0.6 on 2018-10-31 05:27
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('news', '0006_auto_20181030_0943'),
]
operations = [
migrations.RemoveField(
model_name='comment',
name='create_time',
),
migrations.RemoveField(
model_name='comment',
name='is_delete',
),
migrations.RemoveField(
model_name='comment',
name='update_time',
),
]
| 21.038462
| 47
| 0.550274
| 52
| 547
| 5.615385
| 0.653846
| 0.215753
| 0.267123
| 0.308219
| 0.421233
| 0.421233
| 0
| 0
| 0
| 0
| 0
| 0.085635
| 0.338208
| 547
| 25
| 48
| 21.88
| 0.720994
| 0.082267
| 0
| 0.473684
| 1
| 0
| 0.158
| 0.046
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.052632
| 0
| 0.210526
| 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
|
f265784679b4b5c9584c6c6111fcc1e748f31f45
| 308
|
py
|
Python
|
Part2/HW_4_1.py
|
Torkvamedo/smx
|
a5aef4f430f56ac67100c505902f55e18fba5978
|
[
"Unlicense"
] | null | null | null |
Part2/HW_4_1.py
|
Torkvamedo/smx
|
a5aef4f430f56ac67100c505902f55e18fba5978
|
[
"Unlicense"
] | null | null | null |
Part2/HW_4_1.py
|
Torkvamedo/smx
|
a5aef4f430f56ac67100c505902f55e18fba5978
|
[
"Unlicense"
] | null | null | null |
class Car:
def __init__(self, make, petrol_consumption):
self.make = make
self.petrol_consumption = petrol_consumption
def petrol_calculation(self, price = 22.5):
return self.petrol_consumption * price
ford = Car("ford", 10)
money = ford.petrol_calculation()
print(money)
| 22
| 52
| 0.691558
| 38
| 308
| 5.342105
| 0.447368
| 0.334975
| 0.206897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020576
| 0.211039
| 308
| 13
| 53
| 23.692308
| 0.814815
| 0
| 0
| 0
| 0
| 0
| 0.012987
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0
| 0.111111
| 0.444444
| 0.111111
| 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
|
f2875947e8bd5ab76b67ab4ab5bbd62fe1287ec5
| 15
|
py
|
Python
|
narnia/__init__.py
|
maisammusthafa/narnia
|
28a6aedbf44ed4adf5a3f969b7ebaa1664df4811
|
[
"MIT"
] | null | null | null |
narnia/__init__.py
|
maisammusthafa/narnia
|
28a6aedbf44ed4adf5a3f969b7ebaa1664df4811
|
[
"MIT"
] | null | null | null |
narnia/__init__.py
|
maisammusthafa/narnia
|
28a6aedbf44ed4adf5a3f969b7ebaa1664df4811
|
[
"MIT"
] | null | null | null |
""" narnia """
| 7.5
| 14
| 0.4
| 1
| 15
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 15
| 1
| 15
| 15
| 0.5
| 0.4
| 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
|
f2ad0cd68f17210ea869c1964a934b61c72b1238
| 56
|
py
|
Python
|
bin/dns.py
|
captainshar/pi-setup
|
901d996f42bfa03431f06498adfc099b3238aba2
|
[
"MIT"
] | null | null | null |
bin/dns.py
|
captainshar/pi-setup
|
901d996f42bfa03431f06498adfc099b3238aba2
|
[
"MIT"
] | null | null | null |
bin/dns.py
|
captainshar/pi-setup
|
901d996f42bfa03431f06498adfc099b3238aba2
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import name
name.Daemon().run()
| 9.333333
| 21
| 0.678571
| 9
| 56
| 4.222222
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 56
| 5
| 22
| 11.2
| 0.77551
| 0.357143
| 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
|
4b449f5b1feb559c044b29891ed779f011257a30
| 23
|
py
|
Python
|
samtranslator/__init__.py
|
will-driven/serverless-application-model
|
5e2e61bc459da259cb3f9256ee6fe33ec28d5591
|
[
"Apache-2.0"
] | 1
|
2022-03-08T07:51:48.000Z
|
2022-03-08T07:51:48.000Z
|
samtranslator/__init__.py
|
will-driven/serverless-application-model
|
5e2e61bc459da259cb3f9256ee6fe33ec28d5591
|
[
"Apache-2.0"
] | null | null | null |
samtranslator/__init__.py
|
will-driven/serverless-application-model
|
5e2e61bc459da259cb3f9256ee6fe33ec28d5591
|
[
"Apache-2.0"
] | 2
|
2022-03-08T07:11:42.000Z
|
2022-03-08T07:49:20.000Z
|
__version__ = "1.34.0"
| 11.5
| 22
| 0.652174
| 4
| 23
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.130435
| 23
| 1
| 23
| 23
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4b49b224611040ac6c4b726d7b847e0e81c32d3b
| 126
|
py
|
Python
|
pyswagger/__init__.py
|
nzinfo/pyswagger
|
efde3ae756f0cd5a500f9ba90495e18a53d7df24
|
[
"MIT"
] | null | null | null |
pyswagger/__init__.py
|
nzinfo/pyswagger
|
efde3ae756f0cd5a500f9ba90495e18a53d7df24
|
[
"MIT"
] | null | null | null |
pyswagger/__init__.py
|
nzinfo/pyswagger
|
efde3ae756f0cd5a500f9ba90495e18a53d7df24
|
[
"MIT"
] | 1
|
2020-03-04T00:22:24.000Z
|
2020-03-04T00:22:24.000Z
|
from .getter import Getter
from .core import SwaggerApp, SwaggerSecurity
# backward compatible
SwaggerAuth = SwaggerSecurity
| 21
| 45
| 0.833333
| 13
| 126
| 8.076923
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 126
| 5
| 46
| 25.2
| 0.954545
| 0.150794
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4b891e2897fb75492f037c8bfa7f921a3b0a9e6a
| 146
|
py
|
Python
|
fabfile/mooc.py
|
JulienPalard/cloudmesh
|
1759b88daef3a13917492d028fdabe08f03ca996
|
[
"Apache-2.0"
] | null | null | null |
fabfile/mooc.py
|
JulienPalard/cloudmesh
|
1759b88daef3a13917492d028fdabe08f03ca996
|
[
"Apache-2.0"
] | 4
|
2021-06-08T20:20:08.000Z
|
2022-03-11T23:30:22.000Z
|
fabfile/mooc.py
|
JulienPalard/cloudmesh
|
1759b88daef3a13917492d028fdabe08f03ca996
|
[
"Apache-2.0"
] | null | null | null |
from fabric.api import task, local
@task
def start():
local("fab server.start:server=mooc,mooc")
def stop():
local("fab server.stop")
| 13.272727
| 46
| 0.671233
| 22
| 146
| 4.454545
| 0.545455
| 0.163265
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178082
| 146
| 10
| 47
| 14.6
| 0.816667
| 0
| 0
| 0
| 0
| 0
| 0.328767
| 0.19863
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.166667
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4b9942b5caaa249e3c832257facdb774b897c6ce
| 12,719
|
py
|
Python
|
MLib/Core/layers.py
|
rvegaml/SIMLR
|
5d50cd1ccd5f34bf095c499e3be2e739950a0145
|
[
"MIT"
] | 5
|
2022-01-11T02:35:13.000Z
|
2022-01-21T10:00:55.000Z
|
MLib/Core/layers.py
|
rvegaml/SIMLR
|
5d50cd1ccd5f34bf095c499e3be2e739950a0145
|
[
"MIT"
] | null | null | null |
MLib/Core/layers.py
|
rvegaml/SIMLR
|
5d50cd1ccd5f34bf095c499e3be2e739950a0145
|
[
"MIT"
] | null | null | null |
import tensorflow as tf
import numpy as np
from tensorflow.keras import layers
from tensorflow.keras import Model
import tensorflow.keras.backend as K
from tensorflow.keras.initializers import glorot_normal
class Identity(layers.Layer):
'''
Identity layer. It returns a copy of the input.
'''
# According to the TensorFlow documentation, it's a good practice to add this function
def __init__(self, **kwargs):
super(Identity, self).__init__(**kwargs)
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(Identity, self).get_config()
return config
def call(self, inputs):
return tf.identity(inputs)
class LinearRegLayer(layers.Layer):
'''
A simple linear layer that penalizes deviations from the initial weights
'''
# According to the TensorFlow documentation, it's a good practice to add this function
def __init__(self, units=10, rate=.01, init_weights=[], **kwargs):
super(LinearRegLayer, self).__init__(**kwargs)
self.units = units
self.rate = rate
self.init_weights = init_weights
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(LinearRegLayer, self).get_config()
return config
def build(self, input_shape):
# Get the number of dimensions of the data
num_dim = input_shape[-1]
# Build the actual weights
self.w = self.add_weight(shape=(num_dim, self.units),
initializer='random_normal',
trainable=True)
self.b = self.add_weight(shape=(self.units,),
initializer='random_normal',
trainable=True)
def call(self, inputs):
current_weights = self.weights
current_w = current_weights[0]
current_b = current_weights[1]
init_w = np.array(self.init_weights[0])
init_b = np.array(self.init_weights[1])
diff_w = K.sum(K.square(current_w - init_w))
diff_b = K.sum(K.square(current_b - init_b))
total_diff = diff_w + diff_b
self.add_loss(self.rate * total_diff)
return tf.matmul(inputs, self.w) + self.b
class LinearLayer(layers.Layer):
'''
A simple linear layer that penalizes deviations from the initial weights
'''
# According to the TensorFlow documentation, it's a good practice to add this function
def __init__(self, units=10, **kwargs):
super(LinearLayer, self).__init__(**kwargs)
self.units = units
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(LinearLayer, self).get_config()
return config
def build(self, input_shape):
# Get the number of dimensions of the data
num_dim = input_shape[-1]
# Build the actual weights
self.w = self.add_weight(shape=(num_dim, self.units),
initializer='random_normal',
trainable=True)
self.b = self.add_weight(shape=(self.units,),
initializer='random_normal',
trainable=True)
def call(self, inputs):
return tf.matmul(inputs, self.w) + self.b
class ConvLayer(layers.Layer):
'''
Layer that computes the 2D convolution and penalizes deviations from weights.
'''
def __init__(self, size=[3,3], num_filters=32, gate=tf.nn.relu,
stride=[1,1,1,1], padding='SAME', **kwargs):
super(ConvLayer, self).__init__(**kwargs)
self.size = size
self.num_filters = num_filters
self.gate = gate
self.stride = stride
self.padding = padding
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(ConvLayer, self).get_config()
return config
def build(self, input_shape):
# Get the number of dimensions of the data
dim_in = input_shape[-1]
filter_height = self.size[0]
filter_width = self.size[1]
# Build the actual weights
self.w = self.add_weight(shape=(filter_height, filter_width, dim_in, self.num_filters),
initializer=glorot_normal(),
trainable=True)
self.b = self.add_weight(shape=(self.num_filters,),
initializer=glorot_normal(),
trainable=True)
def call(self, inputs):
x = tf.nn.conv2d(inputs, filters=self.w, strides=self.stride, padding=self.padding)
x = tf.add(x, self.b)
return self.gate(x)
class RegConvLayer(layers.Layer):
'''
Layer that computes the 2D convolution and penalizes deviations from weights.
'''
def __init__(self, size=[3,3], num_filters=32, gate=tf.nn.relu, rate=.01,
init_weights=[], stride=[1,1,1,1], padding='SAME', **kwargs):
super(RegConvLayer, self).__init__(**kwargs)
self.rate = rate
self.init_weights = init_weights
self.size = size
self.num_filters = num_filters
self.gate = gate
self.stride = stride
self.padding = padding
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(RegConvLayer, self).get_config()
return config
def build(self, input_shape):
# Get the number of dimensions of the data
dim_in = input_shape[-1]
filter_height = self.size[0]
filter_width = self.size[1]
# Build the actual weights
self.w = self.add_weight(shape=(filter_height, filter_width, dim_in, self.num_filters),
initializer=glorot_normal(),
trainable=True)
self.b = self.add_weight(shape=(self.num_filters,),
initializer=glorot_normal(),
trainable=True)
def call(self, inputs):
current_weights = self.weights
current_w = current_weights[0]
current_b = current_weights[1]
init_w = np.array(self.init_weights[0])
init_b = np.array(self.init_weights[1])
diff_w = K.sum(K.square(current_w - init_w))
diff_b = K.sum(K.square(current_b - init_b))
total_diff = diff_w + diff_b
self.add_loss(self.rate * total_diff)
x = tf.nn.conv2d(inputs, self.w, strides=self.stride, padding=self.padding)
x = tf.add(x, self.b)
return self.gate(x)
class RegTransposeConvLayer(layers.Layer):
'''
Layer that computes the 2D convolution and penalizes deviations from weights.
'''
def __init__(self, size=[3,3], num_filters=32, gate=tf.nn.relu, rate=.01,
init_weights=[], stride=[1,1,1,1], padding='SAME', **kwargs):
super(RegTransposeConvLayer, self).__init__(**kwargs)
self.rate = rate
self.init_weights = init_weights
self.size = size
self.num_filters = num_filters
self.gate = gate
self.stride = stride
self.padding = padding
self.output_shape = None
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(RegTransposeConvLayer, self).get_config()
return config
def build(self, input_shape):
# Get the number of dimensions of the data
batch = input_shape[0]
dim_in = input_shape[-1]
filter_height = self.size[0]
filter_width = self.size[1]
new_height = deconv_output_length(height, filter_height, padding, strides[1])
new_width = deconv_output_length(width, filter_width, padding, strides[2])
self.output_shape = tf.convert_to_tensor([batch, new_height, new_width, self.num_filters])
# Build the actual weights
self.w = self.add_weight(shape=(filter_height, filter_width, self.num_filters, dim_in),
initializer=glorot_normal(),
trainable=True)
self.b = self.add_weight(shape=(self.num_filters,),
initializer=glorot_normal(),
trainable=True)
def call(self, inputs):
current_weights = self.weights
current_w = current_weights[0]
current_b = current_weights[1]
init_w = np.array(self.init_weights[0])
init_b = np.array(self.init_weights[1])
diff_w = K.sum(K.square(current_w - init_w))
diff_b = K.sum(K.square(current_b - init_b))
total_diff = diff_w + diff_b
self.add_loss(self.rate * total_diff)
x = tf.nn.conv2d_transpose(inputs, self.w,self.output_shape,
strides=self.stride, padding=self.padding)
x = tf.add(x, self.b)
return self.gate(x)
class MyReshape(layers.Layer):
def __init__(self, target_shape, **kwargs):
super(MyReshape, self).__init__(**kwargs)
self.target_shape = target_shape
# According to the TensorFlow documentation, it's a good practice to add this function
def get_config(self):
config = super(MyReshape, self).get_config()
return config
def call(self, inputs):
reshaped = tf.reshape(inputs, self.target_shape)
return reshaped
# # -----------------------------------------------------------------------------------------
# # The following functions used to work on TensorFlow 1.XX
# # Create the custom 3D-Layer
# def Convolution_3D(name, label, inputs, kernel_size, channels_in, channels_out, transfer,
# strides=[1,1,1], padding='SAME', initializer_W=None, initializer_b=None, reuse=False):
# with tf.variable_scope(name, reuse=reuse):
# with tf.variable_scope(label, reuse=reuse):
# W = tf.get_variable('W', [kernel_size, kernel_size, kernel_size, channels_in, channels_out],
# initializer=initializer_W)
# b = tf.get_variable('bias', [channels_out], initializer=initializer_b)
# # The first and last elemnts of strides should alwasys be 1
# c_strides = [1] + list(strides) + [1]
# # Perform the 3D convolution
# z_hat = tf.nn.conv3d(inputs, W, strides=c_strides, padding=padding)
# # Add the bias
# z_hat = tf.nn.bias_add(z_hat, b)
# # Apply the transfer function
# y_hat = transfer(z_hat)
# return W, b, z_hat, y_hat
# def Up_Convolution_3D(name, label, inputs, kernel_size, channels_in, channels_out,
# strides=[2,2,2], padding='SAME', initializer=None, reuse=False):
# with tf.variable_scope(name, reuse=reuse):
# with tf.variable_scope(label, reuse=reuse):
# W = tf.get_variable('W', [kernel_size, kernel_size, kernel_size, channels_out, channels_in],
# initializer=initializer)
# # The first and last elemnts of strides should alwasys be 1
# c_strides = [1] + list(strides) + [1]
# # Extract the shape of the inputs
# inputs_size = tf.shape(inputs)
# batch = inputs_size[0]
# depth = inputs_size[1]
# height = inputs_size[2]
# width = inputs_size[3]
# in_channels = inputs_size[4]
# # Compute the shape after the de-convolution
# new_depth = deconv_output_length(depth, kernel_size, padding, strides[0])
# new_height = deconv_output_length(height, kernel_size, padding, strides[1])
# new_width = deconv_output_length(width, kernel_size, padding, strides[2])
# output_shape = tf.convert_to_tensor([batch, new_depth, new_height, new_width, channels_out])
# # Apply the deconvolution
# z_hat = tf.nn.conv3d_transpose(inputs, W, output_shape, strides=c_strides, padding=padding)
# return W, z_hat
# def Fully_Connected(name, label, inputs, dim_in, dim_out, transfer, reuse=False):
# with tf.variable_scope(name, reuse=reuse):
# with tf.variable_scope(label, reuse=reuse):
# W = tf.get_variable('W', [dim_in, dim_out])
# b = tf.get_variable('b', [dim_out])
# z_hat = tf.matmul(inputs, W) + b
# y_hat = transfer(z_hat)
# return W, b, z_hat, y_hat
# def Convolution_2D(name, label, inputs, kernel_size, channels_in, channels_out, transfer,
# strides=[1,1], padding='SAME', initializer_W=None, initializer_b=None, reuse=False):
# '''
# This layer computes the 2D standard convolution.
# Arguments:
# name: Name of the network.
# label: Name of this particular layer
# inputs: A tf.placeholder containing the inputs: [num_images, height, width, channels]
# kernel_size: An int specifing the size of the kxk kernel
# channels_in: Number of channels of the input
# channels_out: Number of filters to create
# transfer: Transfer function to use.
# strides: The first and the last elements are always 1. The elements in the middle are the
# y and x steps.
# '''
# with tf.variable_scope(name, reuse=reuse):
# with tf.variable_scope(label, reuse=reuse):
# W = tf.get_variable('W', [kernel_size, kernel_size, channels_in, channels_out],
# initializer=initializer_W)
# b = tf.get_variable('bias', [channels_out], initializer=initializer_b)
# # The first and last elemnts of strides should alwasys be 1
# c_strides = [1] + list(strides) + [1]
# # Compute the convolution
# z_hat = tf.nn.conv2d(inputs, W, c_strides, padding)
# # Add the bias
# z_hat = tf.nn.bias_add(z_hat, b)
# # Apply the transfer function
# y_hat = transfer(z_hat)
# return W, b, z_hat, y_hat
def deconv_output_length(input_length, filter_size, padding, stride):
"""This function was adapted from Keras
Determines output length of a transposed convolution given input length.
Arguments:
input_length: integer.
filter_size: integer.
padding: one of "same", "valid", "full".
stride: integer.
Returns:
The output length (integer).
"""
if input_length is None:
return None
output_length = input_length * stride
if padding == 'VALID':
output_length = output_length + max(filter_size - stride, 0)
return output_length
def main():
return -1
if __name__ == '__main__':
# Do nothing
main()
| 30.79661
| 98
| 0.718689
| 1,905
| 12,719
| 4.604724
| 0.103412
| 0.014592
| 0.01596
| 0.02736
| 0.731076
| 0.716028
| 0.701208
| 0.701208
| 0.689466
| 0.657775
| 0
| 0.009707
| 0.157638
| 12,719
| 413
| 99
| 30.79661
| 0.809035
| 0.445397
| 0
| 0.688172
| 0
| 0
| 0.011195
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.150538
| false
| 0
| 0.032258
| 0.016129
| 0.311828
| 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
|
29977842dd61939835f9f326dbb6fb9bf80767cd
| 179
|
py
|
Python
|
app/input/input.py
|
pedrolp85/pycli
|
469d22442de2a854aebc3354cdbf9b8fe342ee16
|
[
"Apache-2.0"
] | null | null | null |
app/input/input.py
|
pedrolp85/pycli
|
469d22442de2a854aebc3354cdbf9b8fe342ee16
|
[
"Apache-2.0"
] | null | null | null |
app/input/input.py
|
pedrolp85/pycli
|
469d22442de2a854aebc3354cdbf9b8fe342ee16
|
[
"Apache-2.0"
] | null | null | null |
from typing import Iterator
from abc import ABCMeta, abstractmethod
class Input(metaclass=ABCMeta):
@abstractmethod
def get_lines(self) -> Iterator[str]:
pass
| 16.272727
| 41
| 0.72067
| 21
| 179
| 6.095238
| 0.761905
| 0.328125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206704
| 179
| 10
| 42
| 17.9
| 0.901408
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.166667
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
29abaf7eb25524394e52798e8d88fb2d0ffd63a7
| 241
|
py
|
Python
|
sitecontent/urls.py
|
vjousse/viserlalune
|
8035546a7886daff190902fa2f258c6aa549dd14
|
[
"MIT"
] | 4
|
2015-02-02T15:43:46.000Z
|
2016-05-31T15:51:21.000Z
|
sitecontent/urls.py
|
vjousse/viserlalune
|
8035546a7886daff190902fa2f258c6aa549dd14
|
[
"MIT"
] | null | null | null |
sitecontent/urls.py
|
vjousse/viserlalune
|
8035546a7886daff190902fa2f258c6aa549dd14
|
[
"MIT"
] | null | null | null |
from django.conf.urls import patterns, url
from sitecontent import views
urlpatterns = patterns('',
url("^feeds/(?P<format>.*)$",
"sitecontent.views.blog_post_feed_richtext_filters", name="blog_post_feed_richtext_filters"),
)
| 24.1
| 101
| 0.73444
| 30
| 241
| 5.633333
| 0.633333
| 0.130178
| 0.142012
| 0.236686
| 0.319527
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128631
| 241
| 9
| 102
| 26.777778
| 0.804762
| 0
| 0
| 0
| 0
| 0
| 0.423237
| 0.423237
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
29b56e410120586366a3354301e36b70aba04e52
| 70
|
py
|
Python
|
think-python/code/chapter_07.py
|
baldoinov/think-python-2e-exercises
|
5a5cd6e94f44e14dc567c35ebf3dd9160cf6b01b
|
[
"MIT"
] | null | null | null |
think-python/code/chapter_07.py
|
baldoinov/think-python-2e-exercises
|
5a5cd6e94f44e14dc567c35ebf3dd9160cf6b01b
|
[
"MIT"
] | null | null | null |
think-python/code/chapter_07.py
|
baldoinov/think-python-2e-exercises
|
5a5cd6e94f44e14dc567c35ebf3dd9160cf6b01b
|
[
"MIT"
] | null | null | null |
def print_n(s, n):
while n >= 0:
print(s)
n -= 1
| 11.666667
| 18
| 0.385714
| 12
| 70
| 2.166667
| 0.583333
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.457143
| 70
| 5
| 19
| 14
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
29d003c441f38cf77c8e91ad285bd0f62bdc83dd
| 179
|
py
|
Python
|
Weather/mock_bme280.py
|
Rubber-Duck-999/HouseGuardServices
|
0b8f0a91b331ca68f343c4e960d59b84f7182b62
|
[
"MIT"
] | null | null | null |
Weather/mock_bme280.py
|
Rubber-Duck-999/HouseGuardServices
|
0b8f0a91b331ca68f343c4e960d59b84f7182b62
|
[
"MIT"
] | 3
|
2021-08-05T07:56:05.000Z
|
2022-03-22T12:35:44.000Z
|
Weather/mock_bme280.py
|
Rubber-Duck-999/HouseGuardServices
|
0b8f0a91b331ca68f343c4e960d59b84f7182b62
|
[
"MIT"
] | null | null | null |
class BME280:
'''Class to mock temp sensor'''
def __init__(self):
'''Constructor for mock'''
def get_temperature(self):
'''Temp'''
return 20.0
| 22.375
| 35
| 0.558659
| 21
| 179
| 4.52381
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.296089
| 179
| 8
| 36
| 22.375
| 0.706349
| 0.284916
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
29d1544f0f1f6824b4d1a90eaf87129cdc8adf26
| 35
|
py
|
Python
|
test/static_analysis/with_.py
|
haoqixu/jedi
|
ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591
|
[
"MIT"
] | 10
|
2020-07-21T21:59:54.000Z
|
2021-07-19T11:01:47.000Z
|
test/static_analysis/with_.py
|
haoqixu/jedi
|
ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591
|
[
"MIT"
] | null | null | null |
test/static_analysis/with_.py
|
haoqixu/jedi
|
ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591
|
[
"MIT"
] | 1
|
2021-01-30T18:17:01.000Z
|
2021-01-30T18:17:01.000Z
|
with open() as fin:
fin.read()
| 11.666667
| 19
| 0.571429
| 6
| 35
| 3.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.257143
| 35
| 2
| 20
| 17.5
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d9acc773015cf932e5a592be22aca4766dd345d2
| 48,295
|
py
|
Python
|
sdk/lusid/__init__.py
|
finbourne/lusid-sdk-python-generated-preview
|
9c36c953e8149443a4390ed7f0c04d01211401b6
|
[
"MIT"
] | null | null | null |
sdk/lusid/__init__.py
|
finbourne/lusid-sdk-python-generated-preview
|
9c36c953e8149443a4390ed7f0c04d01211401b6
|
[
"MIT"
] | null | null | null |
sdk/lusid/__init__.py
|
finbourne/lusid-sdk-python-generated-preview
|
9c36c953e8149443a4390ed7f0c04d01211401b6
|
[
"MIT"
] | null | null | null |
# coding: utf-8
# flake8: noqa
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.4425
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
__version__ = "0.11.4425"
# import apis into sdk package
from lusid.api.aggregation_api import AggregationApi
from lusid.api.allocations_api import AllocationsApi
from lusid.api.application_metadata_api import ApplicationMetadataApi
from lusid.api.blocks_api import BlocksApi
from lusid.api.calendars_api import CalendarsApi
from lusid.api.complex_market_data_api import ComplexMarketDataApi
from lusid.api.compliance_api import ComplianceApi
from lusid.api.configuration_recipe_api import ConfigurationRecipeApi
from lusid.api.conventions_api import ConventionsApi
from lusid.api.corporate_action_sources_api import CorporateActionSourcesApi
from lusid.api.counterparties_api import CounterpartiesApi
from lusid.api.custom_entities_api import CustomEntitiesApi
from lusid.api.custom_entity_definitions_api import CustomEntityDefinitionsApi
from lusid.api.cut_label_definitions_api import CutLabelDefinitionsApi
from lusid.api.data_types_api import DataTypesApi
from lusid.api.derived_transaction_portfolios_api import DerivedTransactionPortfoliosApi
from lusid.api.entities_api import EntitiesApi
from lusid.api.executions_api import ExecutionsApi
from lusid.api.fees_and_commissions_api import FeesAndCommissionsApi
from lusid.api.instruments_api import InstrumentsApi
from lusid.api.legal_entities_api import LegalEntitiesApi
from lusid.api.order_graph_api import OrderGraphApi
from lusid.api.order_instructions_api import OrderInstructionsApi
from lusid.api.orders_api import OrdersApi
from lusid.api.packages_api import PackagesApi
from lusid.api.participations_api import ParticipationsApi
from lusid.api.persons_api import PersonsApi
from lusid.api.placements_api import PlacementsApi
from lusid.api.portfolio_groups_api import PortfolioGroupsApi
from lusid.api.portfolios_api import PortfoliosApi
from lusid.api.property_definitions_api import PropertyDefinitionsApi
from lusid.api.quotes_api import QuotesApi
from lusid.api.reconciliations_api import ReconciliationsApi
from lusid.api.reference_portfolio_api import ReferencePortfolioApi
from lusid.api.relation_definitions_api import RelationDefinitionsApi
from lusid.api.relations_api import RelationsApi
from lusid.api.relationship_definitions_api import RelationshipDefinitionsApi
from lusid.api.relationships_api import RelationshipsApi
from lusid.api.schemas_api import SchemasApi
from lusid.api.scopes_api import ScopesApi
from lusid.api.search_api import SearchApi
from lusid.api.sequences_api import SequencesApi
from lusid.api.structured_result_data_api import StructuredResultDataApi
from lusid.api.system_configuration_api import SystemConfigurationApi
from lusid.api.transaction_configuration_api import TransactionConfigurationApi
from lusid.api.transaction_fees_api import TransactionFeesApi
from lusid.api.transaction_portfolios_api import TransactionPortfoliosApi
from lusid.api.translation_api import TranslationApi
# import ApiClient
from lusid.api_client import ApiClient
from lusid.configuration import Configuration
from lusid.exceptions import OpenApiException
from lusid.exceptions import ApiTypeError
from lusid.exceptions import ApiValueError
from lusid.exceptions import ApiKeyError
from lusid.exceptions import ApiException
# import models into sdk package
from lusid.models.a2_b_breakdown import A2BBreakdown
from lusid.models.a2_b_category import A2BCategory
from lusid.models.a2_b_data_record import A2BDataRecord
from lusid.models.a2_b_movement_record import A2BMovementRecord
from lusid.models.access_controlled_action import AccessControlledAction
from lusid.models.access_controlled_resource import AccessControlledResource
from lusid.models.access_metadata_value import AccessMetadataValue
from lusid.models.accounting_method import AccountingMethod
from lusid.models.action_id import ActionId
from lusid.models.action_result_of_portfolio import ActionResultOfPortfolio
from lusid.models.add_business_days_to_date_request import AddBusinessDaysToDateRequest
from lusid.models.add_business_days_to_date_response import AddBusinessDaysToDateResponse
from lusid.models.adjust_holding import AdjustHolding
from lusid.models.adjust_holding_request import AdjustHoldingRequest
from lusid.models.aggregate_spec import AggregateSpec
from lusid.models.aggregated_return import AggregatedReturn
from lusid.models.aggregated_returns_request import AggregatedReturnsRequest
from lusid.models.aggregated_returns_response import AggregatedReturnsResponse
from lusid.models.aggregation_context import AggregationContext
from lusid.models.aggregation_measure_failure_detail import AggregationMeasureFailureDetail
from lusid.models.aggregation_op import AggregationOp
from lusid.models.aggregation_options import AggregationOptions
from lusid.models.aggregation_query import AggregationQuery
from lusid.models.aggregation_type import AggregationType
from lusid.models.allocation import Allocation
from lusid.models.allocation_request import AllocationRequest
from lusid.models.allocation_set_request import AllocationSetRequest
from lusid.models.annul_quotes_response import AnnulQuotesResponse
from lusid.models.annul_single_structured_data_response import AnnulSingleStructuredDataResponse
from lusid.models.annul_structured_data_response import AnnulStructuredDataResponse
from lusid.models.asset_class import AssetClass
from lusid.models.basket import Basket
from lusid.models.basket_all_of import BasketAllOf
from lusid.models.basket_identifier import BasketIdentifier
from lusid.models.block import Block
from lusid.models.block_request import BlockRequest
from lusid.models.block_set_request import BlockSetRequest
from lusid.models.bond import Bond
from lusid.models.bond_all_of import BondAllOf
from lusid.models.bucketed_cash_flow_request import BucketedCashFlowRequest
from lusid.models.bucketed_cash_flow_response import BucketedCashFlowResponse
from lusid.models.calculation_info import CalculationInfo
from lusid.models.calendar import Calendar
from lusid.models.calendar_date import CalendarDate
from lusid.models.cap_floor import CapFloor
from lusid.models.cap_floor_all_of import CapFloorAllOf
from lusid.models.cash_flow_lineage import CashFlowLineage
from lusid.models.cash_flow_value import CashFlowValue
from lusid.models.cash_flow_value_all_of import CashFlowValueAllOf
from lusid.models.cash_flow_value_set import CashFlowValueSet
from lusid.models.cash_flow_value_set_all_of import CashFlowValueSetAllOf
from lusid.models.cash_ladder_record import CashLadderRecord
from lusid.models.cash_perpetual import CashPerpetual
from lusid.models.cash_perpetual_all_of import CashPerpetualAllOf
from lusid.models.cds_flow_conventions import CdsFlowConventions
from lusid.models.cds_index import CdsIndex
from lusid.models.cds_index_all_of import CdsIndexAllOf
from lusid.models.cds_protection_detail_specification import CdsProtectionDetailSpecification
from lusid.models.change import Change
from lusid.models.complete_portfolio import CompletePortfolio
from lusid.models.complete_relation import CompleteRelation
from lusid.models.complete_relationship import CompleteRelationship
from lusid.models.complex_bond import ComplexBond
from lusid.models.complex_bond_all_of import ComplexBondAllOf
from lusid.models.complex_market_data import ComplexMarketData
from lusid.models.complex_market_data_id import ComplexMarketDataId
from lusid.models.compliance_rule import ComplianceRule
from lusid.models.compliance_rule_result import ComplianceRuleResult
from lusid.models.compliance_rule_upsert_request import ComplianceRuleUpsertRequest
from lusid.models.compliance_rule_upsert_response import ComplianceRuleUpsertResponse
from lusid.models.compliance_run import ComplianceRun
from lusid.models.compounding import Compounding
from lusid.models.configuration_recipe import ConfigurationRecipe
from lusid.models.configuration_recipe_snippet import ConfigurationRecipeSnippet
from lusid.models.constituents_adjustment_header import ConstituentsAdjustmentHeader
from lusid.models.contract_for_difference import ContractForDifference
from lusid.models.contract_for_difference_all_of import ContractForDifferenceAllOf
from lusid.models.corporate_action import CorporateAction
from lusid.models.corporate_action_source import CorporateActionSource
from lusid.models.corporate_action_transition import CorporateActionTransition
from lusid.models.corporate_action_transition_component import CorporateActionTransitionComponent
from lusid.models.corporate_action_transition_component_request import CorporateActionTransitionComponentRequest
from lusid.models.corporate_action_transition_request import CorporateActionTransitionRequest
from lusid.models.counterparty_agreement import CounterpartyAgreement
from lusid.models.counterparty_risk_information import CounterpartyRiskInformation
from lusid.models.counterparty_signatory import CounterpartySignatory
from lusid.models.create_calendar_request import CreateCalendarRequest
from lusid.models.create_corporate_action_source_request import CreateCorporateActionSourceRequest
from lusid.models.create_cut_label_definition_request import CreateCutLabelDefinitionRequest
from lusid.models.create_data_map_request import CreateDataMapRequest
from lusid.models.create_data_type_request import CreateDataTypeRequest
from lusid.models.create_date_request import CreateDateRequest
from lusid.models.create_derived_property_definition_request import CreateDerivedPropertyDefinitionRequest
from lusid.models.create_derived_transaction_portfolio_request import CreateDerivedTransactionPortfolioRequest
from lusid.models.create_portfolio_details import CreatePortfolioDetails
from lusid.models.create_portfolio_group_request import CreatePortfolioGroupRequest
from lusid.models.create_property_definition_request import CreatePropertyDefinitionRequest
from lusid.models.create_recipe_request import CreateRecipeRequest
from lusid.models.create_reference_portfolio_request import CreateReferencePortfolioRequest
from lusid.models.create_relation_definition_request import CreateRelationDefinitionRequest
from lusid.models.create_relation_request import CreateRelationRequest
from lusid.models.create_relationship_definition_request import CreateRelationshipDefinitionRequest
from lusid.models.create_relationship_request import CreateRelationshipRequest
from lusid.models.create_sequence_request import CreateSequenceRequest
from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
from lusid.models.create_unit_definition import CreateUnitDefinition
from lusid.models.credit_default_swap import CreditDefaultSwap
from lusid.models.credit_default_swap_all_of import CreditDefaultSwapAllOf
from lusid.models.credit_rating import CreditRating
from lusid.models.credit_spread_curve_data import CreditSpreadCurveData
from lusid.models.credit_spread_curve_data_all_of import CreditSpreadCurveDataAllOf
from lusid.models.credit_support_annex import CreditSupportAnnex
from lusid.models.currency_and_amount import CurrencyAndAmount
from lusid.models.custom_entity_definition import CustomEntityDefinition
from lusid.models.custom_entity_definition_request import CustomEntityDefinitionRequest
from lusid.models.custom_entity_field import CustomEntityField
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
from lusid.models.custom_entity_id import CustomEntityId
from lusid.models.custom_entity_request import CustomEntityRequest
from lusid.models.custom_entity_response import CustomEntityResponse
from lusid.models.cut_label_definition import CutLabelDefinition
from lusid.models.cut_local_time import CutLocalTime
from lusid.models.data_definition import DataDefinition
from lusid.models.data_map_key import DataMapKey
from lusid.models.data_mapping import DataMapping
from lusid.models.data_type import DataType
from lusid.models.data_type_summary import DataTypeSummary
from lusid.models.data_type_value_range import DataTypeValueRange
from lusid.models.date_attributes import DateAttributes
from lusid.models.date_range import DateRange
from lusid.models.date_time_comparison_type import DateTimeComparisonType
from lusid.models.day_of_week import DayOfWeek
from lusid.models.delete_instrument_properties_response import DeleteInstrumentPropertiesResponse
from lusid.models.delete_instrument_response import DeleteInstrumentResponse
from lusid.models.delete_relation_request import DeleteRelationRequest
from lusid.models.delete_relationship_request import DeleteRelationshipRequest
from lusid.models.deleted_entity_response import DeletedEntityResponse
from lusid.models.dependency_source_filter import DependencySourceFilter
from lusid.models.discount_factor_curve_data import DiscountFactorCurveData
from lusid.models.discount_factor_curve_data_all_of import DiscountFactorCurveDataAllOf
from lusid.models.discounting_method import DiscountingMethod
from lusid.models.empty_model_options import EmptyModelOptions
from lusid.models.empty_model_options_all_of import EmptyModelOptionsAllOf
from lusid.models.entity_identifier import EntityIdentifier
from lusid.models.equity import Equity
from lusid.models.equity_all_of import EquityAllOf
from lusid.models.equity_all_of_identifiers import EquityAllOfIdentifiers
from lusid.models.equity_option import EquityOption
from lusid.models.equity_option_all_of import EquityOptionAllOf
from lusid.models.equity_swap import EquitySwap
from lusid.models.equity_swap_all_of import EquitySwapAllOf
from lusid.models.equity_vol_surface_data import EquityVolSurfaceData
from lusid.models.equity_vol_surface_data_all_of import EquityVolSurfaceDataAllOf
from lusid.models.error_detail import ErrorDetail
from lusid.models.exchange_traded_option import ExchangeTradedOption
from lusid.models.exchange_traded_option_all_of import ExchangeTradedOptionAllOf
from lusid.models.exchange_traded_option_contract_details import ExchangeTradedOptionContractDetails
from lusid.models.execution import Execution
from lusid.models.execution_request import ExecutionRequest
from lusid.models.execution_set_request import ExecutionSetRequest
from lusid.models.exotic_instrument import ExoticInstrument
from lusid.models.exotic_instrument_all_of import ExoticInstrumentAllOf
from lusid.models.expanded_group import ExpandedGroup
from lusid.models.fee_calculation_details import FeeCalculationDetails
from lusid.models.fee_rule import FeeRule
from lusid.models.fee_rule_upsert_request import FeeRuleUpsertRequest
from lusid.models.fee_rule_upsert_response import FeeRuleUpsertResponse
from lusid.models.field_definition import FieldDefinition
from lusid.models.field_schema import FieldSchema
from lusid.models.field_value import FieldValue
from lusid.models.file_response import FileResponse
from lusid.models.fixed_leg import FixedLeg
from lusid.models.fixed_leg_all_of import FixedLegAllOf
from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides
from lusid.models.fixed_schedule import FixedSchedule
from lusid.models.fixed_schedule_all_of import FixedScheduleAllOf
from lusid.models.float_schedule import FloatSchedule
from lusid.models.float_schedule_all_of import FloatScheduleAllOf
from lusid.models.floating_leg import FloatingLeg
from lusid.models.floating_leg_all_of import FloatingLegAllOf
from lusid.models.flow_convention_name import FlowConventionName
from lusid.models.flow_conventions import FlowConventions
from lusid.models.forward_rate_agreement import ForwardRateAgreement
from lusid.models.forward_rate_agreement_all_of import ForwardRateAgreementAllOf
from lusid.models.funding_leg import FundingLeg
from lusid.models.funding_leg_all_of import FundingLegAllOf
from lusid.models.funding_leg_options import FundingLegOptions
from lusid.models.funding_leg_options_all_of import FundingLegOptionsAllOf
from lusid.models.future import Future
from lusid.models.future_all_of import FutureAllOf
from lusid.models.futures_contract_details import FuturesContractDetails
from lusid.models.fx_forward import FxForward
from lusid.models.fx_forward_all_of import FxForwardAllOf
from lusid.models.fx_forward_curve_by_quote_reference import FxForwardCurveByQuoteReference
from lusid.models.fx_forward_curve_by_quote_reference_all_of import FxForwardCurveByQuoteReferenceAllOf
from lusid.models.fx_forward_curve_data import FxForwardCurveData
from lusid.models.fx_forward_curve_data_all_of import FxForwardCurveDataAllOf
from lusid.models.fx_forward_model_options import FxForwardModelOptions
from lusid.models.fx_forward_model_options_all_of import FxForwardModelOptionsAllOf
from lusid.models.fx_forward_pips_curve_data import FxForwardPipsCurveData
from lusid.models.fx_forward_pips_curve_data_all_of import FxForwardPipsCurveDataAllOf
from lusid.models.fx_forward_tenor_curve_data import FxForwardTenorCurveData
from lusid.models.fx_forward_tenor_curve_data_all_of import FxForwardTenorCurveDataAllOf
from lusid.models.fx_forward_tenor_pips_curve_data import FxForwardTenorPipsCurveData
from lusid.models.fx_forward_tenor_pips_curve_data_all_of import FxForwardTenorPipsCurveDataAllOf
from lusid.models.fx_option import FxOption
from lusid.models.fx_option_all_of import FxOptionAllOf
from lusid.models.fx_swap import FxSwap
from lusid.models.fx_swap_all_of import FxSwapAllOf
from lusid.models.fx_vol_surface_data import FxVolSurfaceData
from lusid.models.get_cds_flow_conventions_response import GetCdsFlowConventionsResponse
from lusid.models.get_complex_market_data_response import GetComplexMarketDataResponse
from lusid.models.get_counterparty_agreement_response import GetCounterpartyAgreementResponse
from lusid.models.get_credit_support_annex_response import GetCreditSupportAnnexResponse
from lusid.models.get_data_map_response import GetDataMapResponse
from lusid.models.get_flow_conventions_response import GetFlowConventionsResponse
from lusid.models.get_index_convention_response import GetIndexConventionResponse
from lusid.models.get_instruments_response import GetInstrumentsResponse
from lusid.models.get_quotes_response import GetQuotesResponse
from lusid.models.get_recipe_response import GetRecipeResponse
from lusid.models.get_reference_portfolio_constituents_response import GetReferencePortfolioConstituentsResponse
from lusid.models.get_structured_result_data_response import GetStructuredResultDataResponse
from lusid.models.get_virtual_document_response import GetVirtualDocumentResponse
from lusid.models.grouped_result_of_address_key import GroupedResultOfAddressKey
from lusid.models.holding_adjustment import HoldingAdjustment
from lusid.models.holding_context import HoldingContext
from lusid.models.holdings_adjustment import HoldingsAdjustment
from lusid.models.holdings_adjustment_header import HoldingsAdjustmentHeader
from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
from lusid.models.id_selector_definition import IdSelectorDefinition
from lusid.models.identifier_part_schema import IdentifierPartSchema
from lusid.models.index_convention import IndexConvention
from lusid.models.index_model_options import IndexModelOptions
from lusid.models.index_model_options_all_of import IndexModelOptionsAllOf
from lusid.models.industry_classifier import IndustryClassifier
from lusid.models.inline_valuation_request import InlineValuationRequest
from lusid.models.inline_valuations_reconciliation_request import InlineValuationsReconciliationRequest
from lusid.models.instrument import Instrument
from lusid.models.instrument_cash_flow import InstrumentCashFlow
from lusid.models.instrument_definition import InstrumentDefinition
from lusid.models.instrument_definition_format import InstrumentDefinitionFormat
from lusid.models.instrument_id_type_descriptor import InstrumentIdTypeDescriptor
from lusid.models.instrument_id_value import InstrumentIdValue
from lusid.models.instrument_leg import InstrumentLeg
from lusid.models.instrument_leg_all_of import InstrumentLegAllOf
from lusid.models.instrument_match import InstrumentMatch
from lusid.models.instrument_payment_diary import InstrumentPaymentDiary
from lusid.models.instrument_payment_diary_leg import InstrumentPaymentDiaryLeg
from lusid.models.instrument_payment_diary_row import InstrumentPaymentDiaryRow
from lusid.models.instrument_properties import InstrumentProperties
from lusid.models.instrument_search_property import InstrumentSearchProperty
from lusid.models.instrument_type import InstrumentType
from lusid.models.interest_rate_swap import InterestRateSwap
from lusid.models.interest_rate_swap_all_of import InterestRateSwapAllOf
from lusid.models.interest_rate_swaption import InterestRateSwaption
from lusid.models.interest_rate_swaption_all_of import InterestRateSwaptionAllOf
from lusid.models.ir_vol_cube_data import IrVolCubeData
from lusid.models.ir_vol_cube_data_all_of import IrVolCubeDataAllOf
from lusid.models.is_business_day_response import IsBusinessDayResponse
from lusid.models.label_value_set import LabelValueSet
from lusid.models.leg_definition import LegDefinition
from lusid.models.legal_entity import LegalEntity
from lusid.models.level_step import LevelStep
from lusid.models.link import Link
from lusid.models.list_aggregation_reconciliation import ListAggregationReconciliation
from lusid.models.list_aggregation_response import ListAggregationResponse
from lusid.models.list_complex_market_data_with_meta_data_response import ListComplexMarketDataWithMetaDataResponse
from lusid.models.lusid_instrument import LusidInstrument
from lusid.models.lusid_problem_details import LusidProblemDetails
from lusid.models.lusid_unique_id import LusidUniqueId
from lusid.models.lusid_validation_problem_details import LusidValidationProblemDetails
from lusid.models.market_context import MarketContext
from lusid.models.market_context_suppliers import MarketContextSuppliers
from lusid.models.market_data_key_rule import MarketDataKeyRule
from lusid.models.market_data_specific_rule import MarketDataSpecificRule
from lusid.models.market_data_type import MarketDataType
from lusid.models.market_observable_type import MarketObservableType
from lusid.models.market_options import MarketOptions
from lusid.models.market_quote import MarketQuote
from lusid.models.metric_value import MetricValue
from lusid.models.model_options import ModelOptions
from lusid.models.model_options_type import ModelOptionsType
from lusid.models.model_property import ModelProperty
from lusid.models.model_selection import ModelSelection
from lusid.models.movement_type import MovementType
from lusid.models.next_value_in_sequence_response import NextValueInSequenceResponse
from lusid.models.numeric_comparison_type import NumericComparisonType
from lusid.models.opaque_market_data import OpaqueMarketData
from lusid.models.opaque_market_data_all_of import OpaqueMarketDataAllOf
from lusid.models.opaque_model_options import OpaqueModelOptions
from lusid.models.opaque_model_options_all_of import OpaqueModelOptionsAllOf
from lusid.models.operand_type import OperandType
from lusid.models.operation import Operation
from lusid.models.operator import Operator
from lusid.models.order import Order
from lusid.models.order_by_spec import OrderBySpec
from lusid.models.order_graph_block import OrderGraphBlock
from lusid.models.order_graph_block_allocation_detail import OrderGraphBlockAllocationDetail
from lusid.models.order_graph_block_allocation_synopsis import OrderGraphBlockAllocationSynopsis
from lusid.models.order_graph_block_execution_detail import OrderGraphBlockExecutionDetail
from lusid.models.order_graph_block_execution_synopsis import OrderGraphBlockExecutionSynopsis
from lusid.models.order_graph_block_order_detail import OrderGraphBlockOrderDetail
from lusid.models.order_graph_block_order_synopsis import OrderGraphBlockOrderSynopsis
from lusid.models.order_graph_block_placement_detail import OrderGraphBlockPlacementDetail
from lusid.models.order_graph_block_placement_synopsis import OrderGraphBlockPlacementSynopsis
from lusid.models.order_graph_placement import OrderGraphPlacement
from lusid.models.order_graph_placement_allocation_detail import OrderGraphPlacementAllocationDetail
from lusid.models.order_graph_placement_allocation_synopsis import OrderGraphPlacementAllocationSynopsis
from lusid.models.order_graph_placement_execution_detail import OrderGraphPlacementExecutionDetail
from lusid.models.order_graph_placement_execution_synopsis import OrderGraphPlacementExecutionSynopsis
from lusid.models.order_graph_placement_order_detail import OrderGraphPlacementOrderDetail
from lusid.models.order_graph_placement_order_synopsis import OrderGraphPlacementOrderSynopsis
from lusid.models.order_graph_placement_placement_synopsis import OrderGraphPlacementPlacementSynopsis
from lusid.models.order_instruction import OrderInstruction
from lusid.models.order_instruction_request import OrderInstructionRequest
from lusid.models.order_instruction_set_request import OrderInstructionSetRequest
from lusid.models.order_request import OrderRequest
from lusid.models.order_set_request import OrderSetRequest
from lusid.models.otc_confirmation import OtcConfirmation
from lusid.models.output_transaction import OutputTransaction
from lusid.models.package import Package
from lusid.models.package_request import PackageRequest
from lusid.models.package_set_request import PackageSetRequest
from lusid.models.paged_resource_list_of_allocation import PagedResourceListOfAllocation
from lusid.models.paged_resource_list_of_block import PagedResourceListOfBlock
from lusid.models.paged_resource_list_of_calendar import PagedResourceListOfCalendar
from lusid.models.paged_resource_list_of_corporate_action_source import PagedResourceListOfCorporateActionSource
from lusid.models.paged_resource_list_of_custom_entity_definition import PagedResourceListOfCustomEntityDefinition
from lusid.models.paged_resource_list_of_custom_entity_response import PagedResourceListOfCustomEntityResponse
from lusid.models.paged_resource_list_of_cut_label_definition import PagedResourceListOfCutLabelDefinition
from lusid.models.paged_resource_list_of_data_type_summary import PagedResourceListOfDataTypeSummary
from lusid.models.paged_resource_list_of_execution import PagedResourceListOfExecution
from lusid.models.paged_resource_list_of_instrument import PagedResourceListOfInstrument
from lusid.models.paged_resource_list_of_legal_entity import PagedResourceListOfLegalEntity
from lusid.models.paged_resource_list_of_order import PagedResourceListOfOrder
from lusid.models.paged_resource_list_of_order_graph_block import PagedResourceListOfOrderGraphBlock
from lusid.models.paged_resource_list_of_order_graph_placement import PagedResourceListOfOrderGraphPlacement
from lusid.models.paged_resource_list_of_order_instruction import PagedResourceListOfOrderInstruction
from lusid.models.paged_resource_list_of_package import PagedResourceListOfPackage
from lusid.models.paged_resource_list_of_participation import PagedResourceListOfParticipation
from lusid.models.paged_resource_list_of_person import PagedResourceListOfPerson
from lusid.models.paged_resource_list_of_placement import PagedResourceListOfPlacement
from lusid.models.paged_resource_list_of_portfolio_group_search_result import PagedResourceListOfPortfolioGroupSearchResult
from lusid.models.paged_resource_list_of_portfolio_search_result import PagedResourceListOfPortfolioSearchResult
from lusid.models.paged_resource_list_of_property_definition_search_result import PagedResourceListOfPropertyDefinitionSearchResult
from lusid.models.paged_resource_list_of_relationship_definition import PagedResourceListOfRelationshipDefinition
from lusid.models.paged_resource_list_of_sequence_definition import PagedResourceListOfSequenceDefinition
from lusid.models.participation import Participation
from lusid.models.participation_request import ParticipationRequest
from lusid.models.participation_set_request import ParticipationSetRequest
from lusid.models.performance_return import PerformanceReturn
from lusid.models.performance_returns_metric import PerformanceReturnsMetric
from lusid.models.period_type import PeriodType
from lusid.models.perpetual_entity_state import PerpetualEntityState
from lusid.models.perpetual_property import PerpetualProperty
from lusid.models.person import Person
from lusid.models.placement import Placement
from lusid.models.placement_request import PlacementRequest
from lusid.models.placement_set_request import PlacementSetRequest
from lusid.models.portfolio import Portfolio
from lusid.models.portfolio_cash_flow import PortfolioCashFlow
from lusid.models.portfolio_cash_ladder import PortfolioCashLadder
from lusid.models.portfolio_details import PortfolioDetails
from lusid.models.portfolio_entity_id import PortfolioEntityId
from lusid.models.portfolio_group import PortfolioGroup
from lusid.models.portfolio_group_properties import PortfolioGroupProperties
from lusid.models.portfolio_group_search_result import PortfolioGroupSearchResult
from lusid.models.portfolio_holding import PortfolioHolding
from lusid.models.portfolio_properties import PortfolioProperties
from lusid.models.portfolio_reconciliation_request import PortfolioReconciliationRequest
from lusid.models.portfolio_result_data_key_rule import PortfolioResultDataKeyRule
from lusid.models.portfolio_result_data_key_rule_all_of import PortfolioResultDataKeyRuleAllOf
from lusid.models.portfolio_search_result import PortfolioSearchResult
from lusid.models.portfolio_type import PortfolioType
from lusid.models.portfolios_reconciliation_request import PortfoliosReconciliationRequest
from lusid.models.portfolios_reconciliation_request_preview import PortfoliosReconciliationRequestPreview
from lusid.models.premium import Premium
from lusid.models.pricing_context import PricingContext
from lusid.models.pricing_model import PricingModel
from lusid.models.pricing_options import PricingOptions
from lusid.models.processed_command import ProcessedCommand
from lusid.models.property_definition import PropertyDefinition
from lusid.models.property_definition_search_result import PropertyDefinitionSearchResult
from lusid.models.property_definition_type import PropertyDefinitionType
from lusid.models.property_domain import PropertyDomain
from lusid.models.property_filter import PropertyFilter
from lusid.models.property_interval import PropertyInterval
from lusid.models.property_life_time import PropertyLifeTime
from lusid.models.property_schema import PropertySchema
from lusid.models.property_type import PropertyType
from lusid.models.property_value import PropertyValue
from lusid.models.quote import Quote
from lusid.models.quote_access_metadata_rule import QuoteAccessMetadataRule
from lusid.models.quote_access_metadata_rule_id import QuoteAccessMetadataRuleId
from lusid.models.quote_id import QuoteId
from lusid.models.quote_instrument_id_type import QuoteInstrumentIdType
from lusid.models.quote_series_id import QuoteSeriesId
from lusid.models.quote_type import QuoteType
from lusid.models.realised_gain_loss import RealisedGainLoss
from lusid.models.reconcile_date_time_rule import ReconcileDateTimeRule
from lusid.models.reconcile_date_time_rule_all_of import ReconcileDateTimeRuleAllOf
from lusid.models.reconcile_numeric_rule import ReconcileNumericRule
from lusid.models.reconcile_numeric_rule_all_of import ReconcileNumericRuleAllOf
from lusid.models.reconcile_string_rule import ReconcileStringRule
from lusid.models.reconcile_string_rule_all_of import ReconcileStringRuleAllOf
from lusid.models.reconciliation_break import ReconciliationBreak
from lusid.models.reconciliation_left_right_address_key_pair import ReconciliationLeftRightAddressKeyPair
from lusid.models.reconciliation_line import ReconciliationLine
from lusid.models.reconciliation_request import ReconciliationRequest
from lusid.models.reconciliation_response import ReconciliationResponse
from lusid.models.reconciliation_rule import ReconciliationRule
from lusid.models.reconciliation_rule_type import ReconciliationRuleType
from lusid.models.reference_data import ReferenceData
from lusid.models.reference_instrument import ReferenceInstrument
from lusid.models.reference_instrument_all_of import ReferenceInstrumentAllOf
from lusid.models.reference_portfolio_constituent import ReferencePortfolioConstituent
from lusid.models.reference_portfolio_constituent_request import ReferencePortfolioConstituentRequest
from lusid.models.reference_portfolio_weight_type import ReferencePortfolioWeightType
from lusid.models.related_entity import RelatedEntity
from lusid.models.relation import Relation
from lusid.models.relation_definition import RelationDefinition
from lusid.models.relationship import Relationship
from lusid.models.relationship_definition import RelationshipDefinition
from lusid.models.repo import Repo
from lusid.models.repo_all_of import RepoAllOf
from lusid.models.resource_id import ResourceId
from lusid.models.resource_list_of_access_controlled_resource import ResourceListOfAccessControlledResource
from lusid.models.resource_list_of_access_metadata_value_of import ResourceListOfAccessMetadataValueOf
from lusid.models.resource_list_of_aggregated_return import ResourceListOfAggregatedReturn
from lusid.models.resource_list_of_aggregation_query import ResourceListOfAggregationQuery
from lusid.models.resource_list_of_allocation import ResourceListOfAllocation
from lusid.models.resource_list_of_block import ResourceListOfBlock
from lusid.models.resource_list_of_calendar_date import ResourceListOfCalendarDate
from lusid.models.resource_list_of_change import ResourceListOfChange
from lusid.models.resource_list_of_compliance_rule import ResourceListOfComplianceRule
from lusid.models.resource_list_of_compliance_rule_result import ResourceListOfComplianceRuleResult
from lusid.models.resource_list_of_compliance_run import ResourceListOfComplianceRun
from lusid.models.resource_list_of_constituents_adjustment_header import ResourceListOfConstituentsAdjustmentHeader
from lusid.models.resource_list_of_corporate_action import ResourceListOfCorporateAction
from lusid.models.resource_list_of_data_type import ResourceListOfDataType
from lusid.models.resource_list_of_execution import ResourceListOfExecution
from lusid.models.resource_list_of_fee_calculation_details import ResourceListOfFeeCalculationDetails
from lusid.models.resource_list_of_fee_rule import ResourceListOfFeeRule
from lusid.models.resource_list_of_get_cds_flow_conventions_response import ResourceListOfGetCdsFlowConventionsResponse
from lusid.models.resource_list_of_get_counterparty_agreement_response import ResourceListOfGetCounterpartyAgreementResponse
from lusid.models.resource_list_of_get_credit_support_annex_response import ResourceListOfGetCreditSupportAnnexResponse
from lusid.models.resource_list_of_get_flow_conventions_response import ResourceListOfGetFlowConventionsResponse
from lusid.models.resource_list_of_get_index_convention_response import ResourceListOfGetIndexConventionResponse
from lusid.models.resource_list_of_get_recipe_response import ResourceListOfGetRecipeResponse
from lusid.models.resource_list_of_holdings_adjustment_header import ResourceListOfHoldingsAdjustmentHeader
from lusid.models.resource_list_of_i_unit_definition_dto import ResourceListOfIUnitDefinitionDto
from lusid.models.resource_list_of_instrument_cash_flow import ResourceListOfInstrumentCashFlow
from lusid.models.resource_list_of_instrument_id_type_descriptor import ResourceListOfInstrumentIdTypeDescriptor
from lusid.models.resource_list_of_legal_entity import ResourceListOfLegalEntity
from lusid.models.resource_list_of_list_complex_market_data_with_meta_data_response import ResourceListOfListComplexMarketDataWithMetaDataResponse
from lusid.models.resource_list_of_order import ResourceListOfOrder
from lusid.models.resource_list_of_order_instruction import ResourceListOfOrderInstruction
from lusid.models.resource_list_of_package import ResourceListOfPackage
from lusid.models.resource_list_of_participation import ResourceListOfParticipation
from lusid.models.resource_list_of_performance_return import ResourceListOfPerformanceReturn
from lusid.models.resource_list_of_person import ResourceListOfPerson
from lusid.models.resource_list_of_placement import ResourceListOfPlacement
from lusid.models.resource_list_of_portfolio import ResourceListOfPortfolio
from lusid.models.resource_list_of_portfolio_cash_flow import ResourceListOfPortfolioCashFlow
from lusid.models.resource_list_of_portfolio_cash_ladder import ResourceListOfPortfolioCashLadder
from lusid.models.resource_list_of_portfolio_group import ResourceListOfPortfolioGroup
from lusid.models.resource_list_of_processed_command import ResourceListOfProcessedCommand
from lusid.models.resource_list_of_property import ResourceListOfProperty
from lusid.models.resource_list_of_property_definition import ResourceListOfPropertyDefinition
from lusid.models.resource_list_of_property_interval import ResourceListOfPropertyInterval
from lusid.models.resource_list_of_quote import ResourceListOfQuote
from lusid.models.resource_list_of_quote_access_metadata_rule import ResourceListOfQuoteAccessMetadataRule
from lusid.models.resource_list_of_reconciliation_break import ResourceListOfReconciliationBreak
from lusid.models.resource_list_of_relation import ResourceListOfRelation
from lusid.models.resource_list_of_relationship import ResourceListOfRelationship
from lusid.models.resource_list_of_scope_definition import ResourceListOfScopeDefinition
from lusid.models.resource_list_of_string import ResourceListOfString
from lusid.models.resource_list_of_transaction import ResourceListOfTransaction
from lusid.models.resource_list_of_value_type import ResourceListOfValueType
from lusid.models.result_data_key_rule import ResultDataKeyRule
from lusid.models.result_data_key_rule_all_of import ResultDataKeyRuleAllOf
from lusid.models.result_data_schema import ResultDataSchema
from lusid.models.result_key_rule import ResultKeyRule
from lusid.models.result_key_rule_type import ResultKeyRuleType
from lusid.models.result_value import ResultValue
from lusid.models.result_value0_d import ResultValue0D
from lusid.models.result_value0_d_all_of import ResultValue0DAllOf
from lusid.models.result_value_decimal import ResultValueDecimal
from lusid.models.result_value_decimal_all_of import ResultValueDecimalAllOf
from lusid.models.result_value_dictionary import ResultValueDictionary
from lusid.models.result_value_dictionary_all_of import ResultValueDictionaryAllOf
from lusid.models.result_value_int import ResultValueInt
from lusid.models.result_value_int_all_of import ResultValueIntAllOf
from lusid.models.result_value_string import ResultValueString
from lusid.models.result_value_string_all_of import ResultValueStringAllOf
from lusid.models.result_value_type import ResultValueType
from lusid.models.scaling_methodology import ScalingMethodology
from lusid.models.schedule import Schedule
from lusid.models.schedule_type import ScheduleType
from lusid.models.schema import Schema
from lusid.models.scope_definition import ScopeDefinition
from lusid.models.sequence_definition import SequenceDefinition
from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest
from lusid.models.set_legal_entity_properties_request import SetLegalEntityPropertiesRequest
from lusid.models.set_person_identifiers_request import SetPersonIdentifiersRequest
from lusid.models.set_person_properties_request import SetPersonPropertiesRequest
from lusid.models.set_transaction_configuration_alias import SetTransactionConfigurationAlias
from lusid.models.set_transaction_configuration_source_request import SetTransactionConfigurationSourceRequest
from lusid.models.side_configuration_data import SideConfigurationData
from lusid.models.side_configuration_data_request import SideConfigurationDataRequest
from lusid.models.side_definition import SideDefinition
from lusid.models.side_definition_request import SideDefinitionRequest
from lusid.models.simple_instrument import SimpleInstrument
from lusid.models.simple_instrument_all_of import SimpleInstrumentAllOf
from lusid.models.sort_order import SortOrder
from lusid.models.step_schedule import StepSchedule
from lusid.models.stream import Stream
from lusid.models.string_comparison_type import StringComparisonType
from lusid.models.structured_result_data import StructuredResultData
from lusid.models.structured_result_data_id import StructuredResultDataId
from lusid.models.target_tax_lot import TargetTaxLot
from lusid.models.target_tax_lot_request import TargetTaxLotRequest
from lusid.models.term_deposit import TermDeposit
from lusid.models.term_deposit_all_of import TermDepositAllOf
from lusid.models.tolerance import Tolerance
from lusid.models.tolerance_enum import ToleranceEnum
from lusid.models.transaction import Transaction
from lusid.models.transaction_configuration_data import TransactionConfigurationData
from lusid.models.transaction_configuration_data_request import TransactionConfigurationDataRequest
from lusid.models.transaction_configuration_movement_data import TransactionConfigurationMovementData
from lusid.models.transaction_configuration_movement_data_request import TransactionConfigurationMovementDataRequest
from lusid.models.transaction_configuration_type_alias import TransactionConfigurationTypeAlias
from lusid.models.transaction_price import TransactionPrice
from lusid.models.transaction_price_type import TransactionPriceType
from lusid.models.transaction_property_mapping import TransactionPropertyMapping
from lusid.models.transaction_property_mapping_request import TransactionPropertyMappingRequest
from lusid.models.transaction_query_mode import TransactionQueryMode
from lusid.models.transaction_query_parameters import TransactionQueryParameters
from lusid.models.transaction_request import TransactionRequest
from lusid.models.transaction_roles import TransactionRoles
from lusid.models.transaction_set_configuration_data import TransactionSetConfigurationData
from lusid.models.transaction_set_configuration_data_request import TransactionSetConfigurationDataRequest
from lusid.models.transaction_status import TransactionStatus
from lusid.models.transaction_type import TransactionType
from lusid.models.transaction_type_alias import TransactionTypeAlias
from lusid.models.transaction_type_movement import TransactionTypeMovement
from lusid.models.transaction_type_property_mapping import TransactionTypePropertyMapping
from lusid.models.transaction_type_request import TransactionTypeRequest
from lusid.models.translate_instrument_definitions_request import TranslateInstrumentDefinitionsRequest
from lusid.models.translate_instrument_definitions_response import TranslateInstrumentDefinitionsResponse
from lusid.models.typed_resource_id import TypedResourceId
from lusid.models.unit_schema import UnitSchema
from lusid.models.unmatched_holding_method import UnmatchedHoldingMethod
from lusid.models.update_calendar_request import UpdateCalendarRequest
from lusid.models.update_cut_label_definition_request import UpdateCutLabelDefinitionRequest
from lusid.models.update_data_type_request import UpdateDataTypeRequest
from lusid.models.update_instrument_identifier_request import UpdateInstrumentIdentifierRequest
from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequest
from lusid.models.update_portfolio_request import UpdatePortfolioRequest
from lusid.models.update_property_definition_request import UpdatePropertyDefinitionRequest
from lusid.models.update_relationship_definition_request import UpdateRelationshipDefinitionRequest
from lusid.models.update_unit_request import UpdateUnitRequest
from lusid.models.upsert_cds_flow_conventions_request import UpsertCdsFlowConventionsRequest
from lusid.models.upsert_complex_market_data_request import UpsertComplexMarketDataRequest
from lusid.models.upsert_corporate_action_request import UpsertCorporateActionRequest
from lusid.models.upsert_corporate_actions_response import UpsertCorporateActionsResponse
from lusid.models.upsert_counterparty_agreement_request import UpsertCounterpartyAgreementRequest
from lusid.models.upsert_credit_support_annex_request import UpsertCreditSupportAnnexRequest
from lusid.models.upsert_flow_conventions_request import UpsertFlowConventionsRequest
from lusid.models.upsert_index_convention_request import UpsertIndexConventionRequest
from lusid.models.upsert_instrument_properties_response import UpsertInstrumentPropertiesResponse
from lusid.models.upsert_instrument_property_request import UpsertInstrumentPropertyRequest
from lusid.models.upsert_instruments_response import UpsertInstrumentsResponse
from lusid.models.upsert_legal_entity_access_metadata_request import UpsertLegalEntityAccessMetadataRequest
from lusid.models.upsert_legal_entity_request import UpsertLegalEntityRequest
from lusid.models.upsert_person_access_metadata_request import UpsertPersonAccessMetadataRequest
from lusid.models.upsert_person_request import UpsertPersonRequest
from lusid.models.upsert_portfolio_access_metadata_request import UpsertPortfolioAccessMetadataRequest
from lusid.models.upsert_portfolio_group_access_metadata_request import UpsertPortfolioGroupAccessMetadataRequest
from lusid.models.upsert_portfolio_transactions_response import UpsertPortfolioTransactionsResponse
from lusid.models.upsert_quote_access_metadata_rule_request import UpsertQuoteAccessMetadataRuleRequest
from lusid.models.upsert_quote_request import UpsertQuoteRequest
from lusid.models.upsert_quotes_response import UpsertQuotesResponse
from lusid.models.upsert_recipe_request import UpsertRecipeRequest
from lusid.models.upsert_reference_portfolio_constituents_request import UpsertReferencePortfolioConstituentsRequest
from lusid.models.upsert_reference_portfolio_constituents_response import UpsertReferencePortfolioConstituentsResponse
from lusid.models.upsert_result_values_data_request import UpsertResultValuesDataRequest
from lusid.models.upsert_returns_response import UpsertReturnsResponse
from lusid.models.upsert_single_structured_data_response import UpsertSingleStructuredDataResponse
from lusid.models.upsert_structured_data_response import UpsertStructuredDataResponse
from lusid.models.upsert_structured_result_data_request import UpsertStructuredResultDataRequest
from lusid.models.upsert_transaction_properties_response import UpsertTransactionPropertiesResponse
from lusid.models.user import User
from lusid.models.valuation_request import ValuationRequest
from lusid.models.valuation_schedule import ValuationSchedule
from lusid.models.valuations_reconciliation_request import ValuationsReconciliationRequest
from lusid.models.value_type import ValueType
from lusid.models.vendor_library import VendorLibrary
from lusid.models.vendor_model_rule import VendorModelRule
from lusid.models.version import Version
from lusid.models.version_summary_dto import VersionSummaryDto
from lusid.models.versioned_resource_list_of_a2_b_data_record import VersionedResourceListOfA2BDataRecord
from lusid.models.versioned_resource_list_of_a2_b_movement_record import VersionedResourceListOfA2BMovementRecord
from lusid.models.versioned_resource_list_of_output_transaction import VersionedResourceListOfOutputTransaction
from lusid.models.versioned_resource_list_of_portfolio_holding import VersionedResourceListOfPortfolioHolding
from lusid.models.versioned_resource_list_of_transaction import VersionedResourceListOfTransaction
from lusid.models.versioned_resource_list_with_warnings_of_portfolio_holding import VersionedResourceListWithWarningsOfPortfolioHolding
from lusid.models.virtual_document import VirtualDocument
from lusid.models.virtual_document_row import VirtualDocumentRow
from lusid.models.warning import Warning
from lusid.models.weekend_mask import WeekendMask
from lusid.models.weighted_instrument import WeightedInstrument
from lusid.models.weighted_instruments import WeightedInstruments
from lusid.models.yield_curve_data import YieldCurveData
from lusid.models.yield_curve_data_all_of import YieldCurveDataAllOf
| 69.489209
| 146
| 0.914567
| 5,714
| 48,295
| 7.439622
| 0.176059
| 0.141849
| 0.217008
| 0.029217
| 0.312044
| 0.19546
| 0.101341
| 0.027476
| 0.012468
| 0
| 0
| 0.000769
| 0.057149
| 48,295
| 694
| 147
| 69.589337
| 0.932799
| 0.005611
| 0
| 0
| 1
| 0
| 0.000188
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.998512
| 0
| 0.998512
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d9b96bf018bc0b37ce947344981c9eed4ae4930d
| 82
|
py
|
Python
|
Grammar/02Var and types/name.py
|
Abraham-Thomas/shiyanlou-code
|
ae3b940b406ba4af942dd51627fd93e85effe5b9
|
[
"MIT"
] | null | null | null |
Grammar/02Var and types/name.py
|
Abraham-Thomas/shiyanlou-code
|
ae3b940b406ba4af942dd51627fd93e85effe5b9
|
[
"MIT"
] | null | null | null |
Grammar/02Var and types/name.py
|
Abraham-Thomas/shiyanlou-code
|
ae3b940b406ba4af942dd51627fd93e85effe5b9
|
[
"MIT"
] | null | null | null |
name = "ada lovelace"
print(name.title())
print(name.upper())
print(name.lower())
| 16.4
| 21
| 0.695122
| 12
| 82
| 4.75
| 0.583333
| 0.473684
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085366
| 82
| 4
| 22
| 20.5
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.75
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
d9c72f3f6f4070204e4838d601ae63ffd46bd91a
| 81
|
py
|
Python
|
sheraf/version.py
|
yaal-coop/sheraf
|
774e3781bc6ff2e16c6cc39f268d475b5e64fcea
|
[
"MIT"
] | null | null | null |
sheraf/version.py
|
yaal-coop/sheraf
|
774e3781bc6ff2e16c6cc39f268d475b5e64fcea
|
[
"MIT"
] | null | null | null |
sheraf/version.py
|
yaal-coop/sheraf
|
774e3781bc6ff2e16c6cc39f268d475b5e64fcea
|
[
"MIT"
] | null | null | null |
__version_info__ = (0, 5, 29)
__version__ = "{}.{}.{}".format(*__version_info__)
| 27
| 50
| 0.654321
| 9
| 81
| 4.333333
| 0.666667
| 0.564103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054795
| 0.098765
| 81
| 2
| 51
| 40.5
| 0.479452
| 0
| 0
| 0
| 0
| 0
| 0.098765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 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
|
d9d15e62456ff7d48261b3277cfe5d6120348f16
| 581
|
py
|
Python
|
scripts/SIR_demo/demo_generate_grfn.py
|
mikiec84/delphi
|
2e517f21e76e334c7dfb14325d25879ddf26d10d
|
[
"Apache-2.0"
] | 25
|
2018-03-03T11:57:57.000Z
|
2022-01-16T21:19:54.000Z
|
scripts/SIR_demo/demo_generate_grfn.py
|
mikiec84/delphi
|
2e517f21e76e334c7dfb14325d25879ddf26d10d
|
[
"Apache-2.0"
] | 385
|
2018-02-21T16:52:06.000Z
|
2022-02-17T07:44:56.000Z
|
scripts/SIR_demo/demo_generate_grfn.py
|
mikiec84/delphi
|
2e517f21e76e334c7dfb14325d25879ddf26d10d
|
[
"Apache-2.0"
] | 19
|
2018-03-20T01:08:11.000Z
|
2021-09-29T01:04:49.000Z
|
from delphi.GrFN.networks import GroundedFunctionNetwork
# -----------------------------------------------------------------------------
#
# -----------------------------------------------------------------------------
print('Running demo_generate_grfn.py')
source_fortran_file = 'DiscreteSIR-noarrays.f'
print(f' source_fortran_file: {source_fortran_file}')
grfn = GroundedFunctionNetwork.from_fortran_file(source_fortran_file)
agraph = grfn.to_AGraph()
agraph.draw('graph.pdf', prog='dot')
# -----------------------------------------------------------------------------
| 32.277778
| 79
| 0.46988
| 44
| 581
| 5.909091
| 0.545455
| 0.211538
| 0.261538
| 0.184615
| 0.215385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061962
| 581
| 17
| 80
| 34.176471
| 0.477064
| 0.401033
| 0
| 0
| 0
| 0
| 0.317784
| 0.186589
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.285714
| 0
| 0
| 0
| null | 1
| 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d9e62aa9ac63839a40b5c572a1d42bf84a01795a
| 77
|
py
|
Python
|
externals.py
|
CodeBleu/mcserver
|
32c3927ee8ef9e1d14d2d99bd2258f4b5b5e3b46
|
[
"MIT"
] | 3
|
2020-08-29T13:33:30.000Z
|
2020-10-03T15:40:30.000Z
|
externals.py
|
CodeBleu/mcserver
|
32c3927ee8ef9e1d14d2d99bd2258f4b5b5e3b46
|
[
"MIT"
] | 3
|
2020-10-10T17:06:19.000Z
|
2020-11-14T15:21:26.000Z
|
externals.py
|
CodeBleu/mcserver
|
32c3927ee8ef9e1d14d2d99bd2258f4b5b5e3b46
|
[
"MIT"
] | 1
|
2020-10-10T13:09:27.000Z
|
2020-10-10T13:09:27.000Z
|
# Intentionally empty
# This is used as a singleton to store various objects
| 25.666667
| 54
| 0.792208
| 12
| 77
| 5.083333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 77
| 2
| 55
| 38.5
| 0.968254
| 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
|
d9fe0c906fc58d6d96421fabd711385d3f9fa781
| 23
|
py
|
Python
|
pytorch3dunet/__version__.py
|
ciubecca/3dunet-cavity
|
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
|
[
"MIT"
] | null | null | null |
pytorch3dunet/__version__.py
|
ciubecca/3dunet-cavity
|
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
|
[
"MIT"
] | null | null | null |
pytorch3dunet/__version__.py
|
ciubecca/3dunet-cavity
|
cfcc827773b18a95d221ab86c1afc5e2f7c30ecb
|
[
"MIT"
] | null | null | null |
__version__ = '1.3.1'
| 11.5
| 22
| 0.608696
| 4
| 23
| 2.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0.173913
| 23
| 1
| 23
| 23
| 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
|
8a134286d99e02a2390da2f7536940a9b0ea9077
| 108
|
py
|
Python
|
config_template.py
|
oholsen/scales
|
ca721581cf989a77a7653341d87ef7d17056aee0
|
[
"MIT"
] | null | null | null |
config_template.py
|
oholsen/scales
|
ca721581cf989a77a7653341d87ef7d17056aee0
|
[
"MIT"
] | null | null | null |
config_template.py
|
oholsen/scales
|
ca721581cf989a77a7653341d87ef7d17056aee0
|
[
"MIT"
] | null | null | null |
wifi_ssid = ""
wifi_password = ""
mqtt_username = ""
mqtt_password = ""
mqtt_address = ""
mqtt_port = 8883
| 13.5
| 18
| 0.675926
| 13
| 108
| 5.153846
| 0.615385
| 0.358209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044944
| 0.175926
| 108
| 7
| 19
| 15.428571
| 0.707865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.333333
| 0
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
8a1badef2077a22a3a21bb75cb08ac622c211d09
| 91
|
py
|
Python
|
BOJ/15000~15999/15036.py
|
shinkeonkim/today-ps
|
f3e5e38c5215f19579bb0422f303a9c18c626afa
|
[
"Apache-2.0"
] | null | null | null |
BOJ/15000~15999/15036.py
|
shinkeonkim/today-ps
|
f3e5e38c5215f19579bb0422f303a9c18c626afa
|
[
"Apache-2.0"
] | null | null | null |
BOJ/15000~15999/15036.py
|
shinkeonkim/today-ps
|
f3e5e38c5215f19579bb0422f303a9c18c626afa
|
[
"Apache-2.0"
] | null | null | null |
input()
print(sum([16 // i if i != 0 else 32 for i in [*map(int, input().split())]]) / 16)
| 30.333333
| 82
| 0.549451
| 18
| 91
| 2.777778
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094595
| 0.186813
| 91
| 2
| 83
| 45.5
| 0.581081
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
8a2a86ae7d9771dcdccd215459c392299909a04c
| 313
|
py
|
Python
|
src/metrics/precision.py
|
Jud1cator/training-pipeline
|
d129c54985c67844b391701228f35dc014203aaa
|
[
"MIT"
] | null | null | null |
src/metrics/precision.py
|
Jud1cator/training-pipeline
|
d129c54985c67844b391701228f35dc014203aaa
|
[
"MIT"
] | null | null | null |
src/metrics/precision.py
|
Jud1cator/training-pipeline
|
d129c54985c67844b391701228f35dc014203aaa
|
[
"MIT"
] | null | null | null |
import numpy as np
from src.metrics.abstract_metric import AbstractMetric
class Precision(AbstractMetric):
def __init__(self):
super().__init__()
def get_value(self, confusion_matrix: np.ndarray):
return np.mean(np.nan_to_num(np.diag(confusion_matrix) / confusion_matrix.sum(axis=0)))
| 26.083333
| 95
| 0.738019
| 43
| 313
| 5.023256
| 0.697674
| 0.208333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003788
| 0.15655
| 313
| 11
| 96
| 28.454545
| 0.814394
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.142857
| 0.857143
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8a4221429957ef1467a7a6e1af818ac1ceef26ee
| 10,548
|
py
|
Python
|
spark/pyspark/examples/render/nyc_taxi.py
|
DragonDriver/arctern
|
1bf720ae13681efff5f986f5378c84d0546515a5
|
[
"Apache-2.0"
] | 1
|
2020-04-26T08:16:41.000Z
|
2020-04-26T08:16:41.000Z
|
spark/pyspark/examples/render/nyc_taxi.py
|
gracezzzzz/arctern
|
bd364f7e5e234e24216a1754f8f50ac4f838f2f2
|
[
"Apache-2.0"
] | null | null | null |
spark/pyspark/examples/render/nyc_taxi.py
|
gracezzzzz/arctern
|
bd364f7e5e234e24216a1754f8f50ac4f838f2f2
|
[
"Apache-2.0"
] | null | null | null |
# Copyright (C) 2019-2020 Zilliz. 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.
import time
from arctern.util import save_png
from arctern.util.vega import vega_pointmap, vega_heatmap, vega_choroplethmap, vega_weighted_pointmap, vega_icon
from pyspark.sql import SparkSession
from arctern_pyspark import register_funcs
from arctern_pyspark import heatmap
from arctern_pyspark import pointmap
from arctern_pyspark import choroplethmap
from arctern_pyspark import weighted_pointmap
from arctern_pyspark import icon_viz
def draw_point_map(spark):
start_time = time.time()
# file 0_5M_nyc_taxi_and_building.csv could be obtained from arctern-turoial warehouse under zilliztech account. The link on github is https://github.com/zilliztech/arctern-tutorial
df = spark.read.format("csv").option("header", True).option("delimiter", ",").schema(
"VendorID string, tpep_pickup_datetime timestamp, tpep_dropoff_datetime timestamp, passenger_count long, trip_distance double, pickup_longitude double, pickup_latitude double, dropoff_longitude double, dropoff_latitude double, fare_amount double, tip_amount double, total_amount double, buildingid_pickup long, buildingid_dropoff long, buildingtext_pickup string, buildingtext_dropoff string").load(
"file:///tmp/0_5M_nyc_taxi_and_building.csv").cache()
df.createOrReplaceTempView("nyc_taxi")
register_funcs(spark)
res = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
vega = vega_pointmap(1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], point_size=3, point_color="#2DEF4A", opacity=0.5, coordinate_system="EPSG:4326")
res = pointmap(vega, res)
save_png(res, '/tmp/pointmap.png')
spark.sql("show tables").show()
spark.catalog.dropGlobalTempView("nyc_taxi")
print("--- %s seconds ---" % (time.time() - start_time))
def draw_weighted_point_map(spark):
start_time = time.time()
df = spark.read.format("csv").option("header", True).option("delimiter", ",").schema(
"VendorID string, tpep_pickup_datetime timestamp, tpep_dropoff_datetime timestamp, passenger_count long, trip_distance double, pickup_longitude double, pickup_latitude double, dropoff_longitude double, dropoff_latitude double, fare_amount double, tip_amount double, total_amount double, buildingid_pickup long, buildingid_dropoff long, buildingtext_pickup string, buildingtext_dropoff string").load(
"file:///tmp/0_5M_nyc_taxi_and_building.csv").cache()
df.createOrReplaceTempView("nyc_taxi")
register_funcs(spark)
# single color and single stroke width
res1 = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
vega1 = vega_weighted_pointmap(1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], color_gradient=["#87CEEB"], opacity=1.0, coordinate_system="EPSG:4326")
res1 = weighted_pointmap(vega1, res1)
save_png(res1, '/tmp/weighted_pointmap_0_0.png')
# multiple color and single stroke width
res2 = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point, tip_amount as c from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
vega2 = vega_weighted_pointmap(1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], color_gradient=["#0000FF", "#FF0000"], color_bound=[0, 2], opacity=1.0, coordinate_system="EPSG:4326")
res2 = weighted_pointmap(vega2, res2)
save_png(res2, '/tmp/weighted_pointmap_1_0.png')
# single color and multiple stroke width
res3 = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point, fare_amount as s from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
vega3 = vega_weighted_pointmap(1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], color_gradient=["#87CEEB"], size_bound=[0, 10], opacity=1.0, coordinate_system="EPSG:4326")
res3 = weighted_pointmap(vega3, res3)
save_png(res3, '/tmp/weighted_pointmap_0_1.png')
# multiple color and multiple stroke width
res4 = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point, tip_amount as c, fare_amount as s from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
vega4 = vega_weighted_pointmap(1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], color_gradient=["#0000FF", "#FF0000"], color_bound=[0, 2], size_bound=[0, 10], opacity=1.0, coordinate_system="EPSG:4326")
res4 = weighted_pointmap(vega4, res4)
save_png(res4, '/tmp/weighted_pointmap_1_1.png')
spark.sql("show tables").show()
spark.catalog.dropGlobalTempView("nyc_taxi")
print("--- %s seconds ---" % (time.time() - start_time))
def draw_heat_map(spark):
start_time = time.time()
df = spark.read.format("csv").option("header", True).option("delimiter", ",").schema(
"VendorID string, tpep_pickup_datetime timestamp, tpep_dropoff_datetime timestamp, passenger_count long, trip_distance double, pickup_longitude double, pickup_latitude double, dropoff_longitude double, dropoff_latitude double, fare_amount double, tip_amount double, total_amount double, buildingid_pickup long, buildingid_dropoff long, buildingtext_pickup string, buildingtext_dropoff string").load(
"file:///tmp/0_5M_nyc_taxi_and_building.csv").cache()
df.createOrReplaceTempView("nyc_taxi")
register_funcs(spark)
res = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point, passenger_count as w from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
res.show()
vega = vega_heatmap(1024, 896, bounding_box=[-73.998427, 40.730309, -73.954348, 40.780816], map_zoom_level=10.0, coordinate_system='EPSG:4326')
res = heatmap(vega, res)
save_png(res, '/tmp/heatmap.png')
spark.sql("show tables").show()
spark.catalog.dropGlobalTempView("nyc_taxi")
print("--- %s seconds ---" % (time.time() - start_time))
def draw_choropleth_map(spark):
start_time = time.time()
df = spark.read.format("csv").option("header", True).option("delimiter", ",").schema(
"VendorID string, tpep_pickup_datetime timestamp, tpep_dropoff_datetime timestamp, passenger_count long, trip_distance double, pickup_longitude double, pickup_latitude double, dropoff_longitude double, dropoff_latitude double, fare_amount double, tip_amount double, total_amount double, buildingid_pickup long, buildingid_dropoff long, buildingtext_pickup string, buildingtext_dropoff string").load(
"file:///tmp/0_5M_nyc_taxi_and_building.csv").cache()
df.createOrReplaceTempView("nyc_taxi")
register_funcs(spark)
res = spark.sql("select ST_GeomFromText(buildingtext_dropoff) as polygon, passenger_count as w from nyc_taxi where (buildingtext_dropoff!='')")
vega1 = vega_choroplethmap(1900, 1410, bounding_box=[-73.994092, 40.753893, -73.977588, 40.759642], color_gradient=["#0000FF", "#FF0000"], color_bound=[2.5, 5], opacity=1.0, coordinate_system='EPSG:4326')
res1 = choroplethmap(vega1, res)
save_png(res1, '/tmp/choroplethmap1.png')
spark.sql("show tables").show()
spark.catalog.dropGlobalTempView("nyc_taxi")
print("--- %s seconds ---" % (time.time() - start_time))
def draw_icon_viz(spark):
start_time = time.time()
df = spark.read.format("csv").option("header", True).option("delimiter", ",").schema(
"VendorID string, tpep_pickup_datetime timestamp, tpep_dropoff_datetime timestamp, passenger_count long, trip_distance double, pickup_longitude double, pickup_latitude double, dropoff_longitude double, dropoff_latitude double, fare_amount double, tip_amount double, total_amount double, buildingid_pickup long, buildingid_dropoff long, buildingtext_pickup string, buildingtext_dropoff string").load(
"file:///tmp/0_5M_nyc_taxi_and_building.csv").cache()
df.createOrReplaceTempView("nyc_taxi")
register_funcs(spark)
res = spark.sql("select ST_Point(pickup_longitude, pickup_latitude) as point from nyc_taxi where ST_Within(ST_Point(pickup_longitude, pickup_latitude), ST_GeomFromText('POLYGON ((-73.998427 40.730309, -73.954348 40.730309, -73.954348 40.780816 ,-73.998427 40.780816, -73.998427 40.730309))'))")
icon_path = "/tmp/taxi.png"
vega = vega_icon(1024, 896, [-73.998427, 40.730309, -73.954348, 40.780816], icon_path, "EPSG:4326")
res = icon_viz(vega, res)
save_png(res, '/tmp/icon_viz.png')
spark.sql("show tables").show()
spark.catalog.dropGlobalTempView("nyc_taxi")
print("--- %s seconds ---" % (time.time() - start_time))
if __name__ == "__main__":
spark_session = SparkSession \
.builder \
.appName("Python Testmap") \
.getOrCreate()
spark_session.conf.set("spark.sql.execution.arrow.pyspark.enabled", "true")
draw_heat_map(spark_session)
draw_point_map(spark_session)
draw_choropleth_map(spark_session)
draw_weighted_point_map(spark_session)
draw_icon_viz(spark_session)
spark_session.stop()
| 65.925
| 407
| 0.751612
| 1,477
| 10,548
| 5.140826
| 0.150982
| 0.029501
| 0.036876
| 0.044251
| 0.761623
| 0.723298
| 0.710786
| 0.69867
| 0.678125
| 0.678125
| 0
| 0.110895
| 0.12372
| 10,548
| 159
| 408
| 66.339623
| 0.710592
| 0.086272
| 0
| 0.443396
| 0
| 0.113208
| 0.523339
| 0.121011
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04717
| false
| 0.066038
| 0.09434
| 0
| 0.141509
| 0.04717
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
8a76b37073351919c890c7f98f504fb283ca3836
| 92
|
py
|
Python
|
src/tt_web/tt_web/utils.py
|
al-arz/the-tale
|
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
|
[
"BSD-3-Clause"
] | null | null | null |
src/tt_web/tt_web/utils.py
|
al-arz/the-tale
|
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
|
[
"BSD-3-Clause"
] | null | null | null |
src/tt_web/tt_web/utils.py
|
al-arz/the-tale
|
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
|
[
"BSD-3-Clause"
] | null | null | null |
import json
def load_config(path):
with open(path) as f:
return json.load(f)
| 11.5
| 27
| 0.630435
| 15
| 92
| 3.8
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.271739
| 92
| 7
| 28
| 13.142857
| 0.850746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
8a9a2f20da7c317bb3bca32c20412b7f8f4bb0e8
| 85
|
py
|
Python
|
djdelt/apps.py
|
scott2b/django-gdelt
|
51f8c5d212bc1b066a774c57a9fc7bfd87d529c5
|
[
"MIT"
] | null | null | null |
djdelt/apps.py
|
scott2b/django-gdelt
|
51f8c5d212bc1b066a774c57a9fc7bfd87d529c5
|
[
"MIT"
] | 2
|
2020-06-05T18:20:10.000Z
|
2021-06-10T20:21:47.000Z
|
djdelt/apps.py
|
scott2b/django-gdelt
|
51f8c5d212bc1b066a774c57a9fc7bfd87d529c5
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class GdeltConfig(AppConfig):
name = 'gdelt'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 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
|
8abfab879280d9974b3090b64685c37e2aab5b6d
| 29
|
py
|
Python
|
research/environments/__init__.py
|
MinRegret/TigerControl
|
b1ca0617cbb2198f9d5cb37f725f3d7accbab08f
|
[
"Apache-2.0"
] | 31
|
2019-11-08T06:01:54.000Z
|
2021-11-20T04:50:43.000Z
|
research/environments/__init__.py
|
johnhallman/ctsb
|
b1ca0617cbb2198f9d5cb37f725f3d7accbab08f
|
[
"Apache-2.0"
] | 32
|
2019-06-27T15:05:04.000Z
|
2019-08-07T04:23:47.000Z
|
research/environments/__init__.py
|
MinRegret/tigercontrol
|
b1ca0617cbb2198f9d5cb37f725f3d7accbab08f
|
[
"Apache-2.0"
] | 3
|
2020-09-30T17:06:50.000Z
|
2021-04-12T22:39:34.000Z
|
# import all environments
| 5.8
| 25
| 0.724138
| 3
| 29
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241379
| 29
| 4
| 26
| 7.25
| 0.954545
| 0.793103
| 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
|
8ac429b3af0a305b60d48fb27d7217b910446a98
| 951
|
py
|
Python
|
server/budgettrackerbackend/budgets/serializers.py
|
gmulz/budget-tracker-2
|
0abc144d50420875853e89080ec5cac27cc256a4
|
[
"MIT"
] | null | null | null |
server/budgettrackerbackend/budgets/serializers.py
|
gmulz/budget-tracker-2
|
0abc144d50420875853e89080ec5cac27cc256a4
|
[
"MIT"
] | null | null | null |
server/budgettrackerbackend/budgets/serializers.py
|
gmulz/budget-tracker-2
|
0abc144d50420875853e89080ec5cac27cc256a4
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from .models import User, Income, Category, Transaction, RecurringExpense
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ['name', 'id']
class IncomeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Income
fields = ['date', 'description', 'income', 'user']
class CategorySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Category
fields = ['description', 'id', 'is_recurring']
class TransactionSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Transaction
fields = ['description', 'date', 'cost', 'category', 'user', 'id']
class RecurringExpenseSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = RecurringExpense
fields = ['description', 'cost', 'category', 'user', 'id']
| 33.964286
| 74
| 0.698212
| 79
| 951
| 8.379747
| 0.35443
| 0.279456
| 0.317221
| 0.347432
| 0.385196
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191378
| 951
| 28
| 75
| 33.964286
| 0.860858
| 0
| 0
| 0.227273
| 0
| 0
| 0.12395
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.090909
| 0
| 0.545455
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
8ac9e18c3dddced14dc100863498a4a076a5bc13
| 5,575
|
py
|
Python
|
tests/unit/dataactvalidator/test_b11_object_class_program_activity_2.py
|
brianherman/data-act-broker-backend
|
80eb055b9d245046192f7ad4fd0be7d0e11d2dec
|
[
"CC0-1.0"
] | null | null | null |
tests/unit/dataactvalidator/test_b11_object_class_program_activity_2.py
|
brianherman/data-act-broker-backend
|
80eb055b9d245046192f7ad4fd0be7d0e11d2dec
|
[
"CC0-1.0"
] | 3
|
2021-08-22T11:47:45.000Z
|
2022-03-29T22:06:49.000Z
|
tests/unit/dataactvalidator/test_b11_object_class_program_activity_2.py
|
brianherman/data-act-broker-backend
|
80eb055b9d245046192f7ad4fd0be7d0e11d2dec
|
[
"CC0-1.0"
] | 1
|
2020-07-17T23:50:56.000Z
|
2020-07-17T23:50:56.000Z
|
from tests.unit.dataactcore.factories.staging import ObjectClassProgramActivityFactory
from tests.unit.dataactcore.factories.domain import ObjectClassFactory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
_FILE = 'b11_object_class_program_activity_2'
def test_column_headers(database):
expected_subset = {'row_number', 'object_class', 'uniqueid_TAS', 'uniqueid_ObjectClass'}
actual = set(query_columns(_FILE, database))
assert (actual & expected_subset) == expected_subset
def test_success(database):
""" Test valid object class code (3 digits) """
op = ObjectClassProgramActivityFactory(object_class='object_class')
oc = ObjectClassFactory(object_class_code='object_class')
assert number_of_errors(_FILE, database, models=[op, oc]) == 0
def test_success_all_zero(database):
""" Test not returning a warning on '000' when all monetary values are 0 """
op = ObjectClassProgramActivityFactory(object_class='000', deobligations_recov_by_pro_cpe=0,
gross_outlay_amount_by_pro_cpe=0, gross_outlay_amount_by_pro_fyb=0,
gross_outlays_delivered_or_cpe=0, gross_outlays_delivered_or_fyb=0,
gross_outlays_undelivered_cpe=0, gross_outlays_undelivered_fyb=0,
obligations_delivered_orde_cpe=0, obligations_delivered_orde_fyb=0,
obligations_incurred_by_pr_cpe=0, obligations_undelivered_or_cpe=0,
obligations_undelivered_or_fyb=0, ussgl480100_undelivered_or_cpe=0,
ussgl480100_undelivered_or_fyb=0, ussgl480200_undelivered_or_cpe=0,
ussgl480200_undelivered_or_fyb=0, ussgl483100_undelivered_or_cpe=0,
ussgl483200_undelivered_or_cpe=0, ussgl487100_downward_adjus_cpe=0,
ussgl487200_downward_adjus_cpe=0, ussgl488100_upward_adjustm_cpe=0,
ussgl488200_upward_adjustm_cpe=0, ussgl490100_delivered_orde_cpe=0,
ussgl490100_delivered_orde_fyb=0, ussgl490200_delivered_orde_cpe=0,
ussgl490800_authority_outl_cpe=0, ussgl490800_authority_outl_fyb=0,
ussgl493100_delivered_orde_cpe=0, ussgl497100_downward_adjus_cpe=0,
ussgl497200_downward_adjus_cpe=0, ussgl498100_upward_adjustm_cpe=0,
ussgl498200_upward_adjustm_cpe=0)
assert number_of_errors(_FILE, database, models=[op]) == 0
def test_failure(database):
""" Test invalid object class code (3 digits) """
# This should return because if it's '0000' '000', '00', '0' a warning should be returned
op = ObjectClassProgramActivityFactory(object_class='0000')
assert number_of_errors(_FILE, database, models=[op]) == 1
op = ObjectClassProgramActivityFactory(object_class='000')
assert number_of_errors(_FILE, database, models=[op]) == 1
op = ObjectClassProgramActivityFactory(object_class='00')
assert number_of_errors(_FILE, database, models=[op]) == 1
op = ObjectClassProgramActivityFactory(object_class='0')
assert number_of_errors(_FILE, database, models=[op]) == 1
def test_fail_nonzero(database):
""" Test returning a warning on '000' when not all monetary values are 0 """
# even one non-zero should return a warning
op = ObjectClassProgramActivityFactory(object_class='000', deobligations_recov_by_pro_cpe=1,
gross_outlay_amount_by_pro_cpe=0, gross_outlay_amount_by_pro_fyb=0,
gross_outlays_delivered_or_cpe=0, gross_outlays_delivered_or_fyb=0,
gross_outlays_undelivered_cpe=0, gross_outlays_undelivered_fyb=0,
obligations_delivered_orde_cpe=0, obligations_delivered_orde_fyb=0,
obligations_incurred_by_pr_cpe=0, obligations_undelivered_or_cpe=0,
obligations_undelivered_or_fyb=0, ussgl480100_undelivered_or_cpe=0,
ussgl480100_undelivered_or_fyb=0, ussgl480200_undelivered_or_cpe=0,
ussgl480200_undelivered_or_fyb=0, ussgl483100_undelivered_or_cpe=0,
ussgl483200_undelivered_or_cpe=0, ussgl487100_downward_adjus_cpe=0,
ussgl487200_downward_adjus_cpe=0, ussgl488100_upward_adjustm_cpe=0,
ussgl488200_upward_adjustm_cpe=0, ussgl490100_delivered_orde_cpe=0,
ussgl490100_delivered_orde_fyb=0, ussgl490200_delivered_orde_cpe=0,
ussgl490800_authority_outl_cpe=0, ussgl490800_authority_outl_fyb=0,
ussgl493100_delivered_orde_cpe=0, ussgl497100_downward_adjus_cpe=0,
ussgl497200_downward_adjus_cpe=0, ussgl498100_upward_adjustm_cpe=0,
ussgl498200_upward_adjustm_cpe=0)
assert number_of_errors(_FILE, database, models=[op]) == 1
| 64.825581
| 110
| 0.627265
| 587
| 5,575
| 5.502555
| 0.199319
| 0.055728
| 0.022291
| 0.052632
| 0.773994
| 0.726006
| 0.709907
| 0.709907
| 0.697523
| 0.697214
| 0
| 0.091193
| 0.31157
| 5,575
| 85
| 111
| 65.588235
| 0.750391
| 0.063498
| 0
| 0.627119
| 0
| 0
| 0.024832
| 0.006737
| 0
| 0
| 0
| 0
| 0.135593
| 1
| 0.084746
| false
| 0
| 0.050847
| 0
| 0.135593
| 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
|
8acb8b84523768a73d670415955f8348bb913183
| 471
|
py
|
Python
|
28_tipe_data_set.py
|
bejo-cyber/bejo-world
|
15b22fef330bf304918d406ba6a3f9e3addb5f11
|
[
"Apache-2.0"
] | null | null | null |
28_tipe_data_set.py
|
bejo-cyber/bejo-world
|
15b22fef330bf304918d406ba6a3f9e3addb5f11
|
[
"Apache-2.0"
] | null | null | null |
28_tipe_data_set.py
|
bejo-cyber/bejo-world
|
15b22fef330bf304918d406ba6a3f9e3addb5f11
|
[
"Apache-2.0"
] | null | null | null |
# set, himpunan:
super_hero = {'superman','ironman','hulk','flash'}
print(super_hero)
print('1=====================')
super_hero.add('gundala')
super_hero.add('121')
print(super_hero)
print('2=====================')
super_hero.add('hulk')
print(super_hero)
print(sorted(super_hero))
print('3=====================')
ganjil = {1,3,5,7,9}
genap = {2,4,6,8,10}
prima = {2,3,5,7}
print(ganjil.union(genap))
print(ganjil.intersection(prima))
| 17.444444
| 51
| 0.556263
| 64
| 471
| 3.96875
| 0.4375
| 0.283465
| 0.220472
| 0.224409
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.051345
| 0.131635
| 471
| 26
| 52
| 18.115385
| 0.569682
| 0.029724
| 0
| 0.1875
| 0
| 0
| 0.244131
| 0.15493
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5625
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
8ad3d817afb2b715960d5eabcf3a5091d842d401
| 159
|
py
|
Python
|
tests/skl_datasets/BinaryClass_500/skl_dataset_BinaryClass_500_AdaBoostClassifier_1_code_gen.py
|
antoinecarme/sklearn_model_explanation
|
feeeb75576931f4a05a786d936babc0a664eef46
|
[
"BSD-3-Clause"
] | 13
|
2017-12-22T09:12:51.000Z
|
2021-07-26T06:31:54.000Z
|
tests/skl_datasets/BinaryClass_500/skl_dataset_BinaryClass_500_AdaBoostClassifier_1_code_gen.py
|
antoinecarme/sklearn_model_explanation
|
feeeb75576931f4a05a786d936babc0a664eef46
|
[
"BSD-3-Clause"
] | 11
|
2017-09-19T20:00:35.000Z
|
2018-02-05T07:59:06.000Z
|
tests/skl_datasets/BinaryClass_500/skl_dataset_BinaryClass_500_AdaBoostClassifier_1_code_gen.py
|
antoinecarme/sklearn_model_explanation
|
feeeb75576931f4a05a786d936babc0a664eef46
|
[
"BSD-3-Clause"
] | 4
|
2017-12-11T12:33:32.000Z
|
2020-02-09T15:08:56.000Z
|
from sklearn_explain.tests.skl_datasets import skl_datasets_test as skltest
skltest.test_class_dataset_and_model("BinaryClass_500" , "AdaBoostClassifier_1")
| 31.8
| 80
| 0.867925
| 22
| 159
| 5.818182
| 0.818182
| 0.171875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.069182
| 159
| 4
| 81
| 39.75
| 0.837838
| 0
| 0
| 0
| 0
| 0
| 0.220126
| 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
|
76d9b3cff22f1c5f68ffeb121820fee38db35755
| 198
|
py
|
Python
|
ml-serving/ml_serving/inference.py
|
gasparian/ml-serving-template
|
02d2e4c73617647e42c455e7ff79105422d08681
|
[
"MIT"
] | 6
|
2021-03-07T22:11:00.000Z
|
2022-03-08T15:04:49.000Z
|
ml-serving/ml_serving/inference.py
|
gasparian/ml-serving-template
|
02d2e4c73617647e42c455e7ff79105422d08681
|
[
"MIT"
] | null | null | null |
ml-serving/ml_serving/inference.py
|
gasparian/ml-serving-template
|
02d2e4c73617647e42c455e7ff79105422d08681
|
[
"MIT"
] | null | null | null |
import abc
from typing import Any
class PredictorBase(abc.ABC):
def __init__(self, *args, **kwargs):
pass
@abc.abstractmethod
def predict(self, data: Any) -> Any:
pass
| 18
| 40
| 0.636364
| 25
| 198
| 4.88
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.257576
| 198
| 10
| 41
| 19.8
| 0.829932
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
76e1f3c38bd7417723a6716db22bb9a7a3b6ff34
| 50
|
py
|
Python
|
keras/datasets/__init__.py
|
tsheaff/keras
|
ee227dda766d769b7499a5549e8ed77b5e88105b
|
[
"Apache-2.0"
] | 37,222
|
2017-12-13T00:52:55.000Z
|
2022-03-31T22:34:35.000Z
|
keras/datasets/__init__.py
|
amirsadafi/keras
|
f1e9c76675981ee6683f54a3ce569212d551d12d
|
[
"Apache-2.0"
] | 7,624
|
2017-12-13T01:03:40.000Z
|
2022-03-31T23:57:24.000Z
|
keras/datasets/__init__.py
|
amirsadafi/keras
|
f1e9c76675981ee6683f54a3ce569212d551d12d
|
[
"Apache-2.0"
] | 14,914
|
2017-12-13T02:30:46.000Z
|
2022-03-30T14:49:16.000Z
|
"""Small NumPy datasets for debugging/testing."""
| 25
| 49
| 0.74
| 6
| 50
| 6.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 50
| 1
| 50
| 50
| 0.822222
| 0.86
| 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
|
0a02c7d0bccb925adc3626e13df63a21b04eadb7
| 51
|
py
|
Python
|
powerpool/__init__.py
|
sigwo/powerpool
|
197d525d99b3dbdeff67436a5975d2741d7c0ef9
|
[
"BSD-2-Clause"
] | 16
|
2017-08-17T23:48:18.000Z
|
2021-10-05T16:15:03.000Z
|
powerpool/__init__.py
|
sigwo/powerpool
|
197d525d99b3dbdeff67436a5975d2741d7c0ef9
|
[
"BSD-2-Clause"
] | null | null | null |
powerpool/__init__.py
|
sigwo/powerpool
|
197d525d99b3dbdeff67436a5975d2741d7c0ef9
|
[
"BSD-2-Clause"
] | 5
|
2017-07-17T16:31:14.000Z
|
2021-10-05T16:15:34.000Z
|
__version__ = "0.6.2"
__version_info__ = (0, 6, 2)
| 17
| 28
| 0.647059
| 9
| 51
| 2.666667
| 0.555556
| 0.166667
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 0.156863
| 51
| 2
| 29
| 25.5
| 0.418605
| 0
| 0
| 0
| 0
| 0
| 0.098039
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 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
|
0a07f62d23c1176ebf26a5d9c10e8a16b7b8bad9
| 5,610
|
py
|
Python
|
tests/test_nft.py
|
HathorNetwork/python-hathorlib
|
2b534de8e4c6e15a30db2d681636338cf4c1718b
|
[
"Apache-2.0"
] | null | null | null |
tests/test_nft.py
|
HathorNetwork/python-hathorlib
|
2b534de8e4c6e15a30db2d681636338cf4c1718b
|
[
"Apache-2.0"
] | 1
|
2021-08-23T13:28:28.000Z
|
2021-09-14T18:58:03.000Z
|
tests/test_nft.py
|
HathorNetwork/python-hathorlib
|
2b534de8e4c6e15a30db2d681636338cf4c1718b
|
[
"Apache-2.0"
] | 2
|
2021-08-24T14:15:29.000Z
|
2022-02-08T21:36:11.000Z
|
"""
Copyright (c) Hathor Labs and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
import unittest
from hathorlib.base_transaction import TxOutput, tx_or_block_from_bytes
from hathorlib.scripts import DataScript
class HathorNFTTestCase(unittest.TestCase):
def test_is_nft(self):
# Normal tx
data = bytes.fromhex('000100010100c994a3f1b46ddeb7134f65cb18b1b11ca7e19d59875a704b2bb2f79f6700b60000694630440'
'220066d379c43ee73c3704730a44d66a077fb2b1cee2b399cbcf87f34d2b2d84308022032e0a93662094c5d'
'b4ed022708981717d06038924535257d181c2fa9f62a6ff9210310a7cd9cae728ddf8c7fef342f963b1cab1'
'97d97b28124ebbd0208d60d9f08780000000200001976a914e7c8133e7611a0ef57830f4321661ff9e5c42f'
'4188ac40200000218def41612cefe10200002d0403a9e39e8176b2e8ca6728f7c8393cea3403f4432c047e5'
'b28cb0470009ed2ab70b799729bcdbaa8edc064bd78fb258ea23fe6688272acad587445ab0000000c')
tx = tx_or_block_from_bytes(data)
self.assertFalse(tx.is_nft_creation_standard())
self.assertTrue(tx.is_standard())
# Create token tx
data2 = bytes.fromhex('0002010400b25b5385d9bbe80018a98884fdb2d63de3404c23e1b6695df34c103755b56900006a473045022'
'100b05b56237bd425ceeedc1bed82660239ae5cba5790e58980072a6d7a0b00ad500220729c456675abbee1'
'2b084ea841779ec26fe9d4ac4c3a6b2b004678ba697c66e72102c79cca85e51de1e3e85a232477d3be574aa'
'8d83c975321ac1993143d18401f3c0000006401001976a914bdd06a2ec4f180e5f3f5752671a771544c3936'
'4a88ac0000000181001976a914bdd06a2ec4f180e5f3f5752671a771544c39364a88ac0000000281001976a'
'914bdd06a2ec4f180e5f3f5752671a771544c39364a88ac0000138700001976a914439d757c69635d48ddb2'
'a106a18ea5c1ce158d8488ac0106544f4b454e3104544b4e314032320a39bd7d606127f3ff02009ed2ab70b'
'799729bcdbaa8edc064bd78fb258ea23fe6688272acad587445ab00d9741624399388d196e5e409595e65a1'
'803764ee078f34ebb2bda63ff6a63a000104d8')
tx2 = tx_or_block_from_bytes(data2)
self.assertFalse(tx2.is_nft_creation_standard())
self.assertTrue(tx2.is_standard())
# NFT tx
data3 = bytes.fromhex('00020103000023117762f80fad7c28eea89e793036e8e5855038eee4deea02c53d7513e700006a473045022'
'100eab17bbadcd5297695847c7e81a9d9c8b7995b9816a8cb2db4f68721eef22d44022043e8b9498a557cd2'
'f8f4e957241cc78fee4daf0e149de5b9529048ee1ca0140e2103e42187c715fbdd129ef40bf9c6c9c63a6e0'
'd72d478d121fa23c6078fa5049457000000010000060454455354ac0000012c01001976a91495b3e7b7559a'
'2b1ffa6c337fc6aeff74e963796588ac0000000281001976a914e7b6fadc93b5553781d73ac908134c0bbc5'
'14e6b88ac01065465737474740354535440200000218def416127d5800200d9741624399388d196e5e40959'
'5e65a1803764ee078f34ebb2bda63ff6a63a001a2603c9a5947233dedb1160e9468e95563e76945ae58d829'
'118e17e668dc900000053')
tx3 = tx_or_block_from_bytes(data3)
self.assertTrue(tx3.is_nft_creation_standard())
self.assertTrue(tx3.is_standard())
# NFT custom tx with 2 data script outputs
tx4 = tx_or_block_from_bytes(data3)
# Add new data script output, creating a token creation tx with 2 script data outputs
# This should be rejected as a standard NFT
new_output = TxOutput(1, tx4.outputs[0].script, 0)
tx4.outputs = [tx4.outputs[0], new_output] + tx4.outputs[1:]
self.assertFalse(tx4.is_nft_creation_standard())
self.assertFalse(tx4.is_standard())
def test_script_data(self):
# Create NFT script data test
data = 'nft data test'
obj_data = DataScript(data)
human = obj_data.to_human_readable()
self.assertEqual(human['type'], 'Data')
self.assertEqual(human['data'], data)
script = obj_data.get_script()
parsed_obj = DataScript.parse_script(script)
self.assertEqual(parsed_obj.data, data)
# Parse output script from real NFT
data = bytes.fromhex('00020103000023117762f80fad7c28eea89e793036e8e5855038eee4deea02c53d7513e700006a473045022'
'100eab17bbadcd5297695847c7e81a9d9c8b7995b9816a8cb2db4f68721eef22d44022043e8b9498a557cd2'
'f8f4e957241cc78fee4daf0e149de5b9529048ee1ca0140e2103e42187c715fbdd129ef40bf9c6c9c63a6e0'
'd72d478d121fa23c6078fa5049457000000010000060454455354ac0000012c01001976a91495b3e7b7559a'
'2b1ffa6c337fc6aeff74e963796588ac0000000281001976a914e7b6fadc93b5553781d73ac908134c0bbc5'
'14e6b88ac01065465737474740354535440200000218def416127d5800200d9741624399388d196e5e40959'
'5e65a1803764ee078f34ebb2bda63ff6a63a001a2603c9a5947233dedb1160e9468e95563e76945ae58d829'
'118e17e668dc900000053')
tx = tx_or_block_from_bytes(data)
nft_script = DataScript.parse_script(tx.outputs[0].script)
self.assertEqual(nft_script.data, 'TEST')
self.assertFalse(tx.outputs[0].is_standard_script())
self.assertTrue(tx.outputs[1].is_standard_script())
| 61.648352
| 119
| 0.713369
| 327
| 5,610
| 12.045872
| 0.324159
| 0.006093
| 0.013709
| 0.019802
| 0.391978
| 0.376492
| 0.338157
| 0.325971
| 0.325971
| 0.325971
| 0
| 0.423086
| 0.238681
| 5,610
| 90
| 120
| 62.333333
| 0.499181
| 0.076471
| 0
| 0.25
| 0
| 0
| 0.491483
| 0.485869
| 0
| 0
| 0
| 0
| 0.21875
| 1
| 0.03125
| false
| 0
| 0.046875
| 0
| 0.09375
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0a1a98776353339978cb2ea4181cf30c450cea6e
| 108
|
py
|
Python
|
pyang/transforms/__init__.py
|
JieZhang0822/pyang
|
961abbbbe4108de5ba2964569274ba9ea4aacd6a
|
[
"ISC"
] | 466
|
2015-03-25T13:13:39.000Z
|
2022-03-29T08:30:07.000Z
|
pyang/transforms/__init__.py
|
JieZhang0822/pyang
|
961abbbbe4108de5ba2964569274ba9ea4aacd6a
|
[
"ISC"
] | 657
|
2015-03-24T13:22:31.000Z
|
2022-03-31T10:39:52.000Z
|
pyang/transforms/__init__.py
|
JieZhang0822/pyang
|
961abbbbe4108de5ba2964569274ba9ea4aacd6a
|
[
"ISC"
] | 347
|
2015-03-19T12:05:17.000Z
|
2022-03-31T12:29:58.000Z
|
"""Package pyang.transforms: transform plugins for YANG.
Modules:
* edit: YANG edit transform plugin
"""
| 13.5
| 56
| 0.731481
| 13
| 108
| 6.076923
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157407
| 108
| 7
| 57
| 15.428571
| 0.868132
| 0.916667
| 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
|
0a1f7cb8f9bb2926ba8b6fc922a9b4a6e6e2cce6
| 202
|
py
|
Python
|
Curso-em-video/Aula_12.py
|
JhonAI13/Curso_python
|
27dedb0effa2c26140f46392e993b8e7a27d6eb3
|
[
"MIT"
] | null | null | null |
Curso-em-video/Aula_12.py
|
JhonAI13/Curso_python
|
27dedb0effa2c26140f46392e993b8e7a27d6eb3
|
[
"MIT"
] | null | null | null |
Curso-em-video/Aula_12.py
|
JhonAI13/Curso_python
|
27dedb0effa2c26140f46392e993b8e7a27d6eb3
|
[
"MIT"
] | null | null | null |
#faça um algoritimo que leia um preço de um produto e mostre seu novo preço, com desconto de 5%
n = int(input('Qual o valor do produto?:'))
print('O valor do produto descontado 5% é:',n * 0.05,'Reais')
| 50.5
| 95
| 0.707921
| 39
| 202
| 3.666667
| 0.717949
| 0.083916
| 0.111888
| 0.20979
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02994
| 0.173267
| 202
| 3
| 96
| 67.333333
| 0.826347
| 0.465347
| 0
| 0
| 0
| 0
| 0.607477
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
0a23696bb3facf06fc5ad75415e403029791c27b
| 63
|
py
|
Python
|
PythonBasics/Python_In-BuiltModules/ExecuteModule.py
|
abhinavsatheesh/Python
|
9ae1a7a040522f5989c34f17d2d0764b301fa23a
|
[
"Apache-2.0"
] | null | null | null |
PythonBasics/Python_In-BuiltModules/ExecuteModule.py
|
abhinavsatheesh/Python
|
9ae1a7a040522f5989c34f17d2d0764b301fa23a
|
[
"Apache-2.0"
] | null | null | null |
PythonBasics/Python_In-BuiltModules/ExecuteModule.py
|
abhinavsatheesh/Python
|
9ae1a7a040522f5989c34f17d2d0764b301fa23a
|
[
"Apache-2.0"
] | null | null | null |
my_desert='''print ('Dosa')
print ('Idli')'''
exec(my_desert)
| 21
| 28
| 0.634921
| 9
| 63
| 4.222222
| 0.666667
| 0.421053
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 63
| 3
| 29
| 21
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.467742
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
0a249eb68208edc458bd77de552a26b53c49a4a3
| 366
|
py
|
Python
|
entities/token_representation.py
|
ktodorov/historical-ocr
|
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
|
[
"MIT"
] | 1
|
2021-07-29T09:27:06.000Z
|
2021-07-29T09:27:06.000Z
|
entities/token_representation.py
|
ktodorov/historical-ocr
|
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
|
[
"MIT"
] | 5
|
2021-08-12T13:38:54.000Z
|
2021-08-30T08:55:34.000Z
|
src/entities/token_representation.py
|
budh333/UnSilence_VOC
|
3ba8f302f82df2d512d453c6b76dffb50d4f64db
|
[
"MIT"
] | null | null | null |
from typing import List
class TokenRepresentation:
def __init__(self, token: str, vocabulary_ids: List[List[int]]):
self._token = token
self._vocabulary_ids = vocabulary_ids
@property
def token(self) -> str:
return self._token
@property
def vocabulary_ids(self) -> List[List[int]]:
return self._vocabulary_ids
| 22.875
| 68
| 0.666667
| 44
| 366
| 5.25
| 0.363636
| 0.281385
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240437
| 366
| 16
| 69
| 22.875
| 0.830935
| 0
| 0
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.090909
| 0.181818
| 0.636364
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
0a2586d7e1874e8ca79ba94674abca86141dfa90
| 5,066
|
py
|
Python
|
backend/config/settings/base.py
|
code-for-canada/django-nginx-reactjs-docker
|
12b2f79872273bb0ac4736d709b8e0904bc54258
|
[
"MIT"
] | 3
|
2019-01-04T10:53:03.000Z
|
2020-01-29T16:20:38.000Z
|
backend/config/settings/base.py
|
code-for-canada/django-nginx-reactjs-docker
|
12b2f79872273bb0ac4736d709b8e0904bc54258
|
[
"MIT"
] | 215
|
2019-01-04T11:34:03.000Z
|
2019-07-22T13:36:18.000Z
|
backend/config/settings/base.py
|
code-for-canada/django-nginx-reactjs-docker
|
12b2f79872273bb0ac4736d709b8e0904bc54258
|
[
"MIT"
] | 8
|
2019-01-08T22:45:11.000Z
|
2020-01-29T16:20:40.000Z
|
"""
Django settings for backend project.
Generated by 'django-admin startproject' using Django 2.1.4.
Since the start of the project, we have upgraded the version to 2.1.7
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
import datetime
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "%qviowlmp*kitbai+y!%1y=jdl_o3_#7+_ud6l9uwn$$=bxt1y"
ALLOWED_HOSTS = "*"
CORS_ORIGIN_ALLOW_ALL = True
# Application definition
INSTALLED_APPS = [
# Personal,
"custom_models",
# BASE
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
# Requirements
"corsheaders",
"rest_framework",
"djoser",
"rest_framework_swagger",
"rest_framework.authtoken",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"corsheaders.middleware.CorsMiddleware",
]
ROOT_URLCONF = "config.urls"
WSGI_APPLICATION = "config.wsgi.application"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
]
},
}
]
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
},
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
]
REST_FRAMEWORK = {
"DEFAULT_PERMISSION_CLASSES": (
"rest_framework.permissions.IsAuthenticatedOrReadOnly",
),
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.SessionAuthentication",
"rest_framework.authentication.BasicAuthentication",
"rest_framework_jwt.authentication.JSONWebTokenAuthentication",
),
}
LANGUAGE_CODE = "en-us"
TIME_ZONE = "Canada/Eastern"
USE_I18N = True
USE_L10N = True
USE_TZ = True
CORS_ALLOW_HEADERS = [
"accept",
"accept-encoding",
"authorization",
"content-disposition",
"content-type",
"origin",
"user-agent",
"x-csrftoken",
"x-requested-with",
]
# Allow the user to log in by email or username
AUTH_USER_MODEL = "custom_models.User"
# JWT settings for authentication
JWT_AUTH = {
"JWT_EXPIRATION_DELTA": datetime.timedelta(hours=1),
"JWT_ALLOW_REFRESH": True,
}
SIMPLE_JWT = {"AUTH_HEADER_TYPES": ("JWT",)}
# Swagger settings for documentation
SWAGGER_SETTINGS = {
"LOGIN_URL": "rest_framework:login",
"LOGOUT_URL": "rest_framework:logout",
}
# Djoser settings for Rest Login (https://djoser.readthedocs.io/en/latest/settings.html)
DJOSER = {
"SET_PASSWORD_RETYPE": True,
"SEND_ACTIVATION_EMAIL": False,
"PERMISSIONS": {
# Admin Only
"activation": ["rest_framework.permissions.IsAdminUser"], #
"set_username": ["rest_framework.permissions.IsAdminUser"],
"user_delete": ["rest_framework.permissions.IsAdminUser"],
"user_list": ["rest_framework.permissions.IsAdminUser"],
"password_reset": ["rest_framework.permissions.IsAdminUser"],
# Authenticated
"token_destroy": ["rest_framework.permissions.IsAuthenticated"],
# Current User or Admin
"user": ["djoser.permissions.CurrentUserOrAdmin"],
"set_password": ["djoser.permissions.CurrentUserOrAdmin"],
# Any
"password_reset_confirm": ["rest_framework.permissions.AllowAny"],
"user_create": ["rest_framework.permissions.AllowAny"],
"token_create": ["rest_framework.permissions.AllowAny"],
},
}
| 32.267516
| 91
| 0.681603
| 511
| 5,066
| 6.581213
| 0.41683
| 0.073446
| 0.071365
| 0.052037
| 0.145406
| 0.090098
| 0.043711
| 0.043711
| 0.023788
| 0
| 0
| 0.006129
| 0.194828
| 5,066
| 156
| 92
| 32.474359
| 0.818338
| 0.203908
| 0
| 0.018519
| 1
| 0
| 0.611948
| 0.473247
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.083333
| 0.018519
| 0
| 0.018519
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
0a25c8f7c2b484c2bb6120a95271afd30b8cc5ec
| 166
|
py
|
Python
|
problem0749.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
problem0749.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
problem0749.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
###########################
#
# #749 Near Power Sums - Project Euler
# https://projecteuler.net/problem=749
#
# Code by Kevin Marciniak
#
###########################
| 18.444444
| 38
| 0.46988
| 15
| 166
| 5.2
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041096
| 0.120482
| 166
| 8
| 39
| 20.75
| 0.493151
| 0.578313
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6a8a6a25c7843181e81bf1a1c56e7c7ee6d82651
| 13,012
|
py
|
Python
|
riemann_keys/tests/bip39_test_vectors.py
|
summa-tx/riemann-keys
|
ea4213bb542dbd12d4196a0254b0ce2ebae7cb5a
|
[
"Apache-2.0",
"MIT"
] | 8
|
2019-03-01T17:51:23.000Z
|
2020-08-03T15:55:31.000Z
|
riemann_keys/tests/bip39_test_vectors.py
|
summa-tx/riemann-keys
|
ea4213bb542dbd12d4196a0254b0ce2ebae7cb5a
|
[
"Apache-2.0",
"MIT"
] | 8
|
2019-02-26T20:20:29.000Z
|
2021-02-02T22:06:16.000Z
|
riemann_keys/tests/bip39_test_vectors.py
|
summa-tx/riemann-keys
|
ea4213bb542dbd12d4196a0254b0ce2ebae7cb5a
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
# flake8: noqa
# https://github.com/trezor/python-mnemonic/blob/master/vectors.json
trezor_vectors = {
"english": [
{
"id": 0,
"entropy": "00000000000000000000000000000000",
"mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
"salt": "TREZOR",
"binary": "00000000000 00000000000 00000000000 00000000000 00000000000 00000000000 00000000000 00000000000 00000000000 00000000000 00000000000 0000000",
"checksum": "0011",
"seed": "c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04",
"root": {
"private_key": "cbedc75b0d6412c85c79bc13875112ef912fd1e756631b5a00330866f22ff184",
"public_key": "02f632717d78bf73e74aa8461e2e782532abae4eed5110241025afb59ebfd3d2fd",
"xpub": "xpub661MyMwAqRbcGB88KaFbLGiYAat55APKhtWg4uYMkXAmfuSTbq2QYsn9sKJCj1YqZPafsboef4h4YbXXhNhPwMbkHTpkf3zLhx7HvFw1NDy",
"xpriv": "xprv9s21ZrQH143K3h3fDYiay8mocZ3afhfULfb5GX8kCBdno77K4HiA15Tg23wpbeF1pLfs1c5SPmYHrEpTuuRhxMwvKDwqdKiGJS9XFKzUsAF",
"parent_fingerprint": "00",
"fingerprint": "b4e3f5ed",
"depth": 0,
"index": 0,
"chain_code": "a3fa8c983223306de0f0f65e74ebb1e98aba751633bf91d5fb56529aa5c132c1"
},
"derived_node": {
"path": "m/7'/13'/8'/65'/6/44/16/18'/7",
"public_key": "026381791f9bf7ec99538a408d61c911737a30488c78004feb34a73295776c2f17",
"private_key": "b4749323ef65b3898c8cf3f9978fa437c9113a3a91b26320a1047032ab9eaf47",
"xpub": "xpub6Qo94BJ44WgahcCbte4pYt2UU5AGBrkt4PyKWzG3KA9AR1EbERqbTo69Wtc4cXnB2DiuFcxwEDRNdQh1GXwF1jqHrwZS3KRS6X7eaceREJd",
"xpriv": "xprvABonefmAE98HV888ncXpBk5jv3KmnQ32hB3iibrRkpcBYCuSgtXLuzmffeBwvMLcouHL2WdJEZiiXJDB6cMDKytYPy37Em7BNCytyBhJd5A",
"parent_fingerprint": "fc4ca6e2",
"fingerprint": "264f90ed",
"depth": 9,
"index": 7,
"chain_code": "3c063c0a452d20fba1b1cc476a886def7096116dd0cb8400d90f6f55507bcca6"
}
}
]
}
# generated with: https://iancoleman.io/bip39/#english
test_vectors = {
"english": [
{
"id": 0,
"entropy": "a4e3fc4c0161698a22707cfbf30f7f83",
"mnemonic": "pilot cable basic actress bird shallow mean auto winner observe that all",
"salt": None,
"binary": "10100100111 00011111111 00010011000 00000010110 00010110100 11000101000 10001001110 00001111100 11111011111 10011000011 11011111111 0000011",
"checksum": "0011",
"seed": "af44c7ad86ba0a5f46d4c1e785c846db14e0f3d62b69c2ab7efa012a9c9155c024975d6897e36fe9e9e6f0bde55fdf325ff308914ed1b316da0f755f9dd7347d",
"root": {
"private_key": "c6796958d07afe0af1ba9a11da2b7a22d6226b4ff7ff5324c7c876cfc1ea0f1c",
"public_key": "029cfe11e5f33a2601083ff5e29d9b7f134f5edc6b7636674a7286ecf6d23804df",
"xpub": "xpub661MyMwAqRbcFXwuU8c1uEfmER2GW8A7XfaR9Cw41RCGr1xmr4WaLdU9cGPvcJXaaNYLFuu9bMimhKmGgaFja9BxcBAo98Eim1UuUu1dXAn",
"xpriv": "xprv9s21ZrQH143K33sSN751Y6j2gPBn6fSGASepLpXST5fHyDddJXCKnq9fm1gRmHk4CPPcEF9gBmJvPBf74ExYM6Ybe6zwA7HfX8dQkRFY9S4",
"parent_fingerprint": "00",
"fingerprint": "f3ac0f3f",
"depth": 0,
"index": 0,
"chain_code": "6399431d3f454a4acbe0f1cbb2d9a392a43dbea34e7fea952bdda675adde6e6e"
},
"derived_node": {
"path": "m/55'/16'/34'/20/19'/97/21'/88'",
"public_key": "039b8a22c4fb43cb4b52596fc2050357dd9771950d6b6881c6e4b2e78e1943f51d",
"private_key": "258dc521c0581a788a2f08fd64be0f4d29c0c7384031960e6b6986526bcb039f",
"xpub": "xpub6NjKMZDHrzmR8m4poa48Xzj3qeS32QQBbfXffSK5N4F6SLE35fFrBT9qECJ77LMic44hNnWTR86qVjE8r4DsMSNVztB1vyoYNvhzrg91zXV",
"xpriv": "xprvA9jxx3gQ2dD7vGzMhYX8ArnKHcbYcwgLESc4s3uToii7ZXttY7wbdeqMNtRdhhepm7cEKKparnDqeigAPgj7KTj7Gw5ZGUKCRBYbkd3sdGo",
"parent_fingerprint": "e33b22ce",
"fingerprint": "93195471",
"depth": 8,
"index": 2147483736,
"chain_code": "18eb1b59d8a529c9fdbfbce7f6cb03cc9b1bd80b2fc5abee1944b32a32c136f8"
}
},
{
"id": 1,
"entropy": "8cfc94f3846c43fa893b4950155de2369772c91e",
"mnemonic": "mind tool diagram angle service wool ceiling hard exotic priority joy honey jaguar goose kit",
"salt": None,
"binary": "10001100111 11100100101 00111100111 00001000110 11000100001 11111101010 00100100111 01101001001 01010000000 10101010111 01111000100 01101101001 01110111001 01100100100 011110",
"checksum": "10111",
"seed": "82555df2fd8c76fca417c83fc7ed0552a0310299eed41d3a45cf49e1ac056e21126e64d988052b9dbc0e04bd6b3580c51ab6a4ec5a62c5dba2039bd372e7d137",
"root": {
"private_key": "9fee59092ebbedc782277cf75bc85f9db0ea559818eb20de865c4897eb2144f4",
"public_key": "0357ffdd29d20d72d2061c154353835b9cd34016d6f63755a04d70a7033e2919b3",
"xpub": "xpub661MyMwAqRbcFyPp6zb6ZPcsuqVkvUm2Y61Gn7cRrkp2xxCD8ot9tgJQDKG6R6DWopMQrVoUhMChoCZcS4PKSFFx5AoNPAGFizikrRVTmpn",
"xpriv": "xprv9s21ZrQH143K3VKLzy46CFg9MofGX23BAs5fyjCpJRH469s4bGZuLsyvN2qGCAYoJYmHyT6XVVkhm7DHGyHSyYPintmfgxYrwKHzCgCthir",
"parent_fingerprint": "00",
"fingerprint": "94db54c0",
"depth": 0,
"index": 0,
"chain_code": "8faa80cab7372c9e12e2f54a445e434b5d2cb310bc92d7e304b914360a89278a"
},
"derived_node": {
"path": "m/96'/2'/10/81'/60'/90'",
"public_key": "0229d3838c6703a16aa9e7f8604dd308f36980ca891783f9e46dcc8d0a7c7da5ed",
"private_key": "6f7ae238af855eb9e0cee63333a4c05ef4c24a54a6951dcdf298ea13c85e2050",
"xpub": "xpub6JuoVny9rzjMruCwjgP66H9bLt97ow3jgg6Sjt5Eny85LQKoQzA6E9xhmFcVoQR2PoYnTTDMcXnyo1MZPHeW4PFBxaN6VitafnfA3csorkr",
"xpriv": "xprvA5vT6HSG2dB4eR8Uder5j9CrnrJdQUKtKTAqwVfdEdb6TbzesSqqgMeDv17Qa6M5jxRcbhDTTfzzBxuJqMURrsXnRXNJUwkRsqNmTHEs6Qx",
"parent_fingerprint": "db9f3893",
"fingerprint": "11b20e3d",
"depth": 6,
"index": 2147483738,
"chain_code": "91f4c0395a78095692132cb1f632834ab821c373057ccdb5637f7f9f34837fdd"
}
},
{
"id": 2,
"entropy": "15bf57143a38579300d9f4cbd65adaebe01398fbeb8f44f0",
"mnemonic": "between wide shallow inner lyrics sister address direct slim ready repeat style abuse small use impose eager liberty",
"salt": None,
"binary": "00010101101 11111010101 11000101000 01110100011 10000101011 11001001100 00000011011 00111110100 11001011110 10110010110 10110110101 11010111110 00000001001 11001100011 11101111101 01110001111 01000100111 10000",
"checksum": "000111",
"seed": "db6b9728bce174c1c14976415cfe06d63509e127f38ba265cf672315b5ed15953828f0fe5e9922654c07d3284f7ac11f814b564e87f94210d3bcc153ec6f698b",
"root": {
"private_key": "3a4014ab104dc69ba3820e3c1e9740998dfdd0b912f1f83268c639bac5fa64f0",
"public_key": "03230ac7166adf9664a911a4d4785a60e79e983f950b99fe9dc228dd1438c0aa36",
"xpub": "xpub661MyMwAqRbcFtZZGjnmsUKVffkBYUraocCexn2maSi1keXzdsaam5fwHRrwFaLNe1dCjqQQMgcGSQfaiD5BFuDbvy3cdkWrq3939hHHns9",
"xpriv": "xprv9s21ZrQH143K3QV6AiFmWLNm7duh928jSPH4APdA27B2srCr6LGLDHMTS94eTRRBfnoLErXZEXbkAHpybohWnb4tp8sv3cSK7nJKtpcwJ4U",
"parent_fingerprint": "00",
"fingerprint": "b46fe1d0",
"depth": 0,
"index": 0,
"chain_code": "874c576e48fdc3ebf6f0822b4d18498d0a545d6684dfd683ef215fd0273870e8"
},
"derived_node": {
"path": "m/87/19/76/25'/96'",
"public_key": "03540f45d9145cd5c9bdbf67b674df050255ac19380b0b6f3cc57dff99e17b836a",
"private_key": "c3c055a5154dafa361e82d585393d82a8bf3f82cbe96f7c4e2e758de7ac90a0e",
"xpub": "xpub6FwAvDCcTWuqD2hVZHoi3WhtWZbf2XBeo36HRFwCLLk85DxzvHau5dmx8o7VKsdrv98yigghdX6PkgeGvoe4LZ39Hoex2ZhGtJ53W4Tdnmn",
"xpriv": "xprvA2wpWhfid9MXzYd2TGGhgNm9xXmAd4ToRpAgcsXan1D9CRdrNkGeXqTUHWzAimdLSuZCMCqMhu545mtYP4mj13q5RWDbuyBHBbwMeaPcAyU",
"parent_fingerprint": "46ae4850",
"fingerprint": "94d1cc4b",
"depth": 5,
"index": 2147483744,
"chain_code": "309cff07ed70166ebe30ec31ee7a4c261fa9dfa6bdae249d498a84f4d224d472"
}
},
{
"id": 3,
"entropy": "a05a7afb69e2cd81c838a7d1ad4132d06bef59042b0388512881b61a",
"mnemonic": "park stable salute stable coast science can belt spider head erosion patch same prosper awful gather marriage matter call history pluck",
"salt": None,
"binary": "10100000010 11010011110 10111110110 11010011110 00101100110 11000000111 00100000111 00010100111 11010001101 01101010000 01001100101 10100000110 10111110111 10101100100 00010000101 01100000011 10001000010 10001001010 00100000011 01101100001 1010",
"checksum": "0110101",
"seed": "1929655fd266457fc620dd471f424b8351999338c837db07ec362dab19f11dbb2c2aff18d0a063a9d91239f81181d0fcebe327c37803b45012a8163fe3b716b6",
"root": {
"private_key": "a01b94f79e8c29ee63b8c27e40ef63f1cfe8f4cac870d0de5d20e889b1d8a13a",
"public_key": "031225fa5e457da949ab1021931887131c7a53c06df0fce4d6a3dd5819aa5776e0",
"xpub": "xpub661MyMwAqRbcFJsyHbfuQsjnh3qjSfXkxkEXa5JHoSbyU7UNoiXU3FXfcKUbdFqC5cyxexpUAYPZP6K9AU9C4FjfuiX743buQgF5k7BwUND",
"xpriv": "xprv9s21ZrQH143K2poWBa8u3jo4921F3CoubXJvmgtgF74zbK9EGBDDVTDBm3acAnd1cvowkj1pvi7PK3Ab6XrwYfJPWmQtCp5kor3tbqkreJ6",
"parent_fingerprint": "00",
"fingerprint": "056dd4ec",
"depth": 0,
"index": 0,
"chain_code": "4cf7eb64f359de9cdb7f2c05baf3267a2f1f96e1fc68333c60e92ff3dbbf0b78"
},
"derived_node": {
"path": "m/85'/15/76",
"public_key": "02029099fda4c09fa365c85cf785fb790270125bc0d9a584e1707ca2d85209eab2",
"private_key": "921255b836b8215d67d18949b217f3b3edf77cc0d185d37ff85da85d6ca0657e",
"xpub": "xpub6CnpKCiJ2WSFtjfzoreA69jdgCrLK2vVrzEhvJHHEDjREWLU2SYKwVkMVML9Gt22pMY2aa4RdEXedECPgyoegRy76vaPNpj8QzFwAxeRKmn",
"xpriv": "xprv9yoTuhBQC8sxgFbXhq79j1nu8B1quaCeVmK77usfftCSMi1KUuE5PhRse7PaX8uh8stKfMGjNGN6ZiXVXBL54daSjmLvEe57u3m8mbGvHGv",
"parent_fingerprint": "9aedbb6f",
"fingerprint": "6ad6b30a",
"depth": 3,
"index": 76,
"chain_code": "ec33efe03c9ad429a6e2cba47cdbc396ae2bded480c628f760396794e6f52729"
}
},
{
"id": 4,
"entropy": "39281ecca67d16aa629115340d8ad4923bd49ec2d6f17669fce458087ee89a92",
"mnemonic": "decrease domain rebel erupt sphere festival medal cargo cross hobby release caught run exhaust area taste island exit decorate quote margin inmate heart frog",
"salt": None,
"binary": "00111001001 01000000111 10110011001 01001100111 11010001011 01010101001 10001010010 00100010101 00110100000 01101100010 10110101001 00100100011 10111101010 01001111011 00001011010 11011110001 01110110011 01001111111 00111001000 10110000000 10000111111 01110100010 01101010010 010",
"checksum": "11101001",
"seed": "c11b0ff978d88c0ae9f7c349733bbd1b7baf2237663e3064a4c62bc4f5a578e4fb14fc43c38f85bfe83a15790397d7a301df5233d7d520cd2cc974cd33ae47b2",
"root": {
"private_key": "36f0fcac8ff8e73506ae26aa1db732918e0db5c5635330eaed951e12eacedf3e",
"public_key": "02800f0237e39dce74f506c508985d4d71f8020342d7dfe781ca5cfb73e63eb43e",
"xpub": "xpub661MyMwAqRbcGYp55aa3wf9WqTuPGdFnwyhFBALErewiMiBkeDrXsZ6qDbUbawSiHVgqvqobbNdosLY7aJgsNVv4DtwPAWKEjgCaSEjvdBg",
"xpriv": "xprv9s21ZrQH143K44jbyZ33aXCnHS4tsAXwakmeNmvdJKQjUurc6gYHKknMNKtdTiC7jPbnEBmTWDEJ4HpxobatUpEKQgrshDpv8R1NrCkdWyT",
"parent_fingerprint": "00",
"fingerprint": "ea6be3d5",
"depth": 0,
"index": 0,
"chain_code": "c989c416cf4c4e3d3708c25893ab6c01bcb9893e153929ab9204eb374ab76a63"
},
"derived_node": {
"path": "m/51'",
"public_key": "028f08404abc652f3170f471591cab170f153a0772adf69d33116212f9219537cc",
"private_key": "e74f8cedbafd94797fd0d21ecb06ccac46721602ccb8a0fe86cdb54335d03691",
"xpub": "xpub69cS8waJoeNVm5qKbGi2eyspJLHgP1zyZWgFJt2knTHGUhF45C8tthWzJ5cJTKQA77UvXkKvpdGh49ewZhDyQD2vFcSyTz3qjvstaxjPd4F",
"xpriv": "xprv9vd5jS3QyGpCYbkrVFB2Hqw5kJTByZH8CHkeWVd9E7kHbtuuXepeLuCWSqFQy8o3iwPrPyw5trAwCpW9HvecxQkCNBeHUHmXiAu9mUWDviW",
"parent_fingerprint": "ea6be3d5",
"fingerprint": "97f01095",
"depth": 1,
"index": 2147483699,
"chain_code": "bfad5d31ac996363d635dad2304f9582e81ddd7cc8249c3cd5b327706103cb6e"
}
},
]
}
public_path_mnemonic = "decrease domain rebel erupt sphere festival medal cargo cross hobby release caught run exhaust area taste island exit decorate quote margin inmate heart frog"
public_path = [
'xpub661MyMwAqRbcGYp55aa3wf9WqTuPGdFnwyhFBALErewiMiBkeDrXsZ6qDbUbawSiHVgqvqobbNdosLY7aJgsNVv4DtwPAWKEjgCaSEjvdBg',
'xpub69cS8waATyqVK5tryNLyKKHMHzieRM4AQdG5aR9VSe29cJp4EyTrMDLHUi198chSiY86Dh1V57UPCdwSsNUPDKjhSeXvZ3ejvW76pRGFpQe',
'xpub6AB84inF91Uf26fue9dETg5rkNhDwEsWN2kpB7vJWHHuakuMeKPL7onruexAnWhLkEMv7Rjq2aA1z8h6iz4XX6tfRaiuZY83TQi4MR29UCN']
| 61.668246
| 298
| 0.767292
| 659
| 13,012
| 15.060698
| 0.540212
| 0.012091
| 0.019043
| 0.022569
| 0.066096
| 0.061259
| 0.048564
| 0.048564
| 0.048564
| 0.048564
| 0
| 0.359332
| 0.152628
| 13,012
| 210
| 299
| 61.961905
| 0.540813
| 0.010144
| 0
| 0.2
| 0
| 0.02439
| 0.776699
| 0.500816
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.117073
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6aad0dbd250a4dfd71629974cbab58aac61aae61
| 24
|
py
|
Python
|
cosmos/ingestion/ingest/process/detection/src/torch_model/model/backbone/__init__.py
|
ilmcconnell/Cosmos
|
84245034727c30e20ffddee9e02c7e96f3aa115e
|
[
"Apache-2.0"
] | 30
|
2019-03-14T08:24:34.000Z
|
2022-03-09T06:05:44.000Z
|
cosmos/ingestion/ingest/process/detection/src/torch_model/model/backbone/__init__.py
|
ilmcconnell/Cosmos
|
84245034727c30e20ffddee9e02c7e96f3aa115e
|
[
"Apache-2.0"
] | 78
|
2019-02-07T22:14:48.000Z
|
2022-03-09T05:59:18.000Z
|
cosmos/ingestion/ingest/process/detection/src/torch_model/model/backbone/__init__.py
|
ilmcconnell/Cosmos
|
84245034727c30e20ffddee9e02c7e96f3aa115e
|
[
"Apache-2.0"
] | 11
|
2019-03-02T01:20:06.000Z
|
2022-03-25T07:25:46.000Z
|
"""
Backbone module
"""
| 6
| 15
| 0.583333
| 2
| 24
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 24
| 3
| 16
| 8
| 0.7
| 0.625
| 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
|
6ab5defa305d699ee01d62ba43252d9033331b79
| 207
|
py
|
Python
|
99-Python_Miscellaneous/test_syslog.py
|
spendyala/deeplearning-docker
|
1dcd03e2e65cb1897daf9dfffeab018f97fc0780
|
[
"MIT"
] | null | null | null |
99-Python_Miscellaneous/test_syslog.py
|
spendyala/deeplearning-docker
|
1dcd03e2e65cb1897daf9dfffeab018f97fc0780
|
[
"MIT"
] | 1
|
2021-02-02T22:47:32.000Z
|
2021-02-02T22:47:32.000Z
|
99-Python_Miscellaneous/test_syslog.py
|
spendyala/deeplearning-docker
|
1dcd03e2e65cb1897daf9dfffeab018f97fc0780
|
[
"MIT"
] | null | null | null |
import logging
import logging.config
import logging.handlers
logger = logging.getLogger()
handler = logging.handlers.SysLogHandler(address='/var/run/syslog')
logger.addHandler(handler)
logger.info('Test')
| 25.875
| 67
| 0.801932
| 25
| 207
| 6.64
| 0.6
| 0.23494
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077295
| 207
| 7
| 68
| 29.571429
| 0.86911
| 0
| 0
| 0
| 0
| 0
| 0.091787
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.428571
| 0
| 0.428571
| 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
|
6ac0708ae6a8cb6211bf6cd34c7f2dfead7bbca1
| 32
|
py
|
Python
|
storage/__init__.py
|
LordMudaID/musikvideostream
|
1e1ed8afd7a2308a09db19b323943397169c02e5
|
[
"MIT"
] | null | null | null |
storage/__init__.py
|
LordMudaID/musikvideostream
|
1e1ed8afd7a2308a09db19b323943397169c02e5
|
[
"MIT"
] | null | null | null |
storage/__init__.py
|
LordMudaID/musikvideostream
|
1e1ed8afd7a2308a09db19b323943397169c02e5
|
[
"MIT"
] | null | null | null |
""" temporary image storage """
| 16
| 31
| 0.65625
| 3
| 32
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 32
| 1
| 32
| 32
| 0.777778
| 0.71875
| 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
|
6ac54521d0ece8fe597a4ffc5a7b71bb78ca6bed
| 201
|
py
|
Python
|
src/timer/model/thread_item.py
|
jakob-bagterp/timer_for_python
|
351d0fa1336cfb001f7813225d46383f82f34a1e
|
[
"MIT"
] | 1
|
2021-12-06T18:04:26.000Z
|
2021-12-06T18:04:26.000Z
|
src/timer/model/thread_item.py
|
jakob-bagterp/timer_for_python
|
351d0fa1336cfb001f7813225d46383f82f34a1e
|
[
"MIT"
] | null | null | null |
src/timer/model/thread_item.py
|
jakob-bagterp/timer_for_python
|
351d0fa1336cfb001f7813225d46383f82f34a1e
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
@dataclass(frozen = True)
class ThreadItem:
"""Class to define a thread's name, start time, and decimals."""
name: str
start_time: int
decimals: int
| 20.1
| 68
| 0.696517
| 27
| 201
| 5.148148
| 0.740741
| 0.129496
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21393
| 201
| 9
| 69
| 22.333333
| 0.879747
| 0.288557
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.833333
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
6ac83f391398da0fef5098632172ec5acfc6d4ff
| 1,312
|
py
|
Python
|
playground/config.py
|
rajat4665/thenewboston-python
|
df842c793fe7bfd8731fd8746abf25747c9e569e
|
[
"MIT"
] | null | null | null |
playground/config.py
|
rajat4665/thenewboston-python
|
df842c793fe7bfd8731fd8746abf25747c9e569e
|
[
"MIT"
] | 3
|
2021-03-30T14:03:41.000Z
|
2021-09-22T19:30:31.000Z
|
playground/config.py
|
rajat4665/thenewboston-python
|
df842c793fe7bfd8731fd8746abf25747c9e569e
|
[
"MIT"
] | null | null | null |
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
BLOCKS_DIR = os.path.join(BASE_DIR, 'blocks')
SIGNED_REQUESTS_DIR = os.path.join(BASE_DIR, 'signed_requests')
SIGNING_KEY_DIR = os.path.join(BASE_DIR, 'signing_keys')
# Account numbers
BANK_ACCOUNT_NUMBER = '5e12967707909e62b2bb2036c209085a784fabbc3deccefee70052b6181c8ed8'
BANK_NID_ACCOUNT_NUMBER = 'd5356888dc9303e44ce52b1e06c3165a7759b9df1e6a6dfbd33ee1c3df1ab4d1'
CV_ACCOUNT_NUMBER = '4d2ec91f37bc553bc538e91195669b666e26b2ea3e4e31507e38102a758d4f86'
CV_NID_ACCOUNT_NUMBER = '59479a31c3b91d96bb7a0b3e07f18d4bf301f1bb0bde05f8d36d9611dcbe7cbf'
BUCKY_ACCOUNT_NUMBER = '484b3176c63d5f37d808404af1a12c4b9649cd6f6769f35bdf5a816133623fbc'
CHRISTOPHER_ACCOUNT_NUMBER = 'a29baa6ba36f6db707f8f8dacfa82d5e8a28fa616e8cc96cf6d7790f551d79f2'
JUSTIN_ACCOUNT_NUMBER = '3214108063cda7b259782c57ff8cec343ad2f1ad35baf38c3503db5cf6f3b2f7'
KRISTY_ACCOUNT_NUMBER = 'db1a9ac3c356ab744ab4ad5256bb86c2f6dfaa7c1aece1f026a08dbd8c7178f2'
TREASURY_ACCOUNT_NUMBER = '0cdd4ba04456ca169baca3d66eace869520c62fe84421329086e03d91a68acdb'
PV_ACCOUNT_NUMBER = 'ad1f8845c6a1abb6011a2a434a079a087c460657aad54329a84b406dce8bf314'
PV_NID_ACCOUNT_NUMBER = '3afdf37573f1a511def0bd85553404b7091a76bcd79cdcebba1310527b167521'
# Bank fees
BANK_TX_FEE = 1
# Validator fees
PV_TX_FEE = 4
| 48.592593
| 95
| 0.89253
| 100
| 1,312
| 11.27
| 0.44
| 0.126886
| 0.031943
| 0.034605
| 0.053239
| 0.053239
| 0
| 0
| 0
| 0
| 0
| 0.341385
| 0.053354
| 1,312
| 26
| 96
| 50.461538
| 0.566023
| 0.030488
| 0
| 0
| 0
| 0
| 0.58123
| 0.555205
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.055556
| 0
| 0.055556
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6ad20f98ba5976b236bc81752a68e499dbfee01f
| 11,921
|
py
|
Python
|
src/validate_trace.py
|
jacoblee628/systemsproject
|
16444b15c4d589a765c27584995673f9d897ab75
|
[
"MIT"
] | null | null | null |
src/validate_trace.py
|
jacoblee628/systemsproject
|
16444b15c4d589a765c27584995673f9d897ab75
|
[
"MIT"
] | null | null | null |
src/validate_trace.py
|
jacoblee628/systemsproject
|
16444b15c4d589a765c27584995673f9d897ab75
|
[
"MIT"
] | null | null | null |
import re
import numpy as np
import pandas as pd
import read_write as rw
def validate_trace(trace, obs_srs_file_path, active_prd_path, prd_prefix="US", srs_prefix="TC"):
# Load lists of obsolete srs and active prd
obs_srs = pd.read_csv(obs_srs_file_path)
obs_srs_list = obs_srs["Formatted ID"].unique()
active_prd = pd.read_excel(active_prd_path)
active_prd_list = active_prd["ID"].unique()
# Gather all the errors into this list of dfs
invalid_dfs = []
# Run the tests
trace, invalid = _check_prd_has_srs(trace, prd_prefix, srs_prefix)
invalid_dfs.extend(invalid)
trace, invalid = _check_srs_has_test(trace, prd_prefix, srs_prefix)
invalid_dfs.extend(invalid)
trace, invalid = _check_srs_has_prd(trace, prd_prefix, srs_prefix)
invalid_dfs.extend(invalid)
trace, invalid = _check_prd_ref_by_srs_exists(trace, active_prd_list, prd_prefix, srs_prefix)
invalid_dfs.extend(invalid)
trace, invalid = _check_srs_exists(trace, obs_srs_list, prd_prefix, srs_prefix)
invalid_dfs.extend(invalid)
trace, invalid = _check_prd_exists(trace, active_prd_list, prd_prefix, srs_prefix)
invalid_dfs.extend(invalid)
return trace, invalid_dfs
def _check_prd_has_srs(trace, prd_prefix, srs_prefix):
"""check whether each PRD has SRS
invalid data frame will contain rows where PRDs do not have SRS
Args:
trace (pd.DataFrame): trace matrix
prd_prefix (str): string that PRD starts with
srs_prefix (str): string that SRS starts with
Returns:
valid_df (pd.DataFrame): data frame with all valid rows of trace matrix
invalid_df (pd.DataFrame): data frame with all invalid rows of trace matrix
"""
# Get rid of n/a values
valid_df = trace.loc[-trace['PRD'].str.startswith(prd_prefix)]
trace = trace.loc[trace['PRD'].str.startswith(prd_prefix)]
for val in trace['SRS ID']:
val=str(val)
if not val.startswith(srs_prefix):
val = np.nan
# Get number of unique SRS for each PRD
group = trace.groupby('PRD')['SRS ID'].nunique()
num_unique = pd.DataFrame({'PRD':group.index, 'SRS ID':group.values})
# Get df of rows where PRD exists but SRS does not
invalid = num_unique.loc[num_unique["SRS ID"] == 0]
invalid = pd.DataFrame(invalid, columns=['PRD', 'SRS ID'])
invalid_df = pd.DataFrame()
for val in invalid['PRD']:
invalid_df = invalid_df.append(trace[trace['PRD'] == val])
invalid_df = invalid_df.sort_index()
valid = num_unique.loc[num_unique["SRS ID"] != 0]
valid = pd.DataFrame(valid, columns=['PRD', 'SRS ID'])
for val in valid['PRD']:
valid_df = valid_df.append(trace[trace['PRD'] == val])
valid_df = valid_df.sort_index()
invalid_df.insert(0, "Error:", "PRD does not have SRS")
return valid_df, invalid_df
def _check_srs_has_test(trace, prd_prefix, srs_prefix):
"""check whether each SRS has a test
invalid data frame will contain rows where SRSs do not have a test
Args:
trace (DataFrame): trace matrix
prd_prefix (string): string that PRD starts with
srs_prefix (string): string that SRS starts with
Returns:
valid_df (DataFrame): data frame with all valid rows of trace matrix
invalid_df (DataFrame): data frame with all invalid rows of trace matrix
"""
# Get rid of n/a values
valid_df = trace.loc[-trace['SRS ID'].str.startswith(prd_prefix)]
trace = trace.loc[trace['SRS ID'].str.startswith(srs_prefix)]
for val in trace['Test Name']:
val = str(val)
if not len(val) > 5:
val = np.nan
# Get number of unique tests for each SRS
group = trace.groupby('SRS ID')['Test Name'].nunique()
num_unique = pd.DataFrame({'SRS ID':group.index, 'Test Name':group.values})
# Get df of rows where SRS exists but test does not
invalid = num_unique.loc[num_unique["Test Name"] == 0]
invalid = pd.DataFrame(invalid, columns=['SRS ID', 'Test Name'])
invalid_df = pd.DataFrame()
for val in invalid['SRS ID']:
invalid_df = invalid_df.append(trace[trace['SRS ID'] == val])
invalid_df = invalid_df.sort_index()
# create valid df
valid = num_unique.loc[num_unique["Test Name"] != 0]
valid = pd.DataFrame(valid, columns=['SRS ID', 'Test Name'])
for val in valid['SRS ID']:
valid_df = valid_df.append(trace[trace['SRS ID'] == val])
valid_df = valid_df.sort_index()
invalid_df.insert(0, "Error:", "SRS does not have test")
return valid_df, invalid_df
def _check_srs_has_prd(trace, prd_prefix, srs_prefix):
"""check whether each SRS has PRD
invalid rows will contain rows where SRSs do not have a PRD
Args:
trace (DataFrame): trace matrix
prd_prefix (string): string that PRD starts with
srs_prefix (string): string that SRS starts with
Returns:
valid_df (DataFrame): data frame with all valid rows of trace matrix
invalid_df (DataFrame): data frame with all invalid rows of trace matrix
"""
# Get rid of n/a values
valid_df = trace.loc[-trace['SRS ID'].str.startswith(prd_prefix)]
trace = trace.loc[trace['SRS ID'].str.startswith(srs_prefix)]
for val in trace['PRD']:
val=str(val)
if not val.startswith(prd_prefix):
val = np.nan
# Get number of unique PRD for each SRS
group = trace.groupby('SRS ID')['PRD'].nunique()
num_unique = pd.DataFrame({'SRS ID':group.index, 'PRD':group.values})
# Get df of rows where SRS exists but PRD does not
invalid = num_unique.loc[num_unique["PRD"] == 0]
invalid = pd.DataFrame(invalid, columns=['SRS ID', 'PRD'])
invalid_df = pd.DataFrame()
for val in invalid['SRS ID']:
invalid_df = invalid_df.append(trace[trace['SRS ID'] == val])
invalid_df = invalid_df.sort_index()
# Create valid df
valid = num_unique.loc[num_unique["PRD"] != 0]
valid = pd.DataFrame(valid, columns=['SRS ID', 'PRD'])
for val in valid['SRS ID']:
valid_df = valid_df.append(trace[trace['SRS ID'] == val])
valid_df = valid_df.sort_index()
invalid_df.insert(0, "Error:", "SRS does not have PRD")
return valid_df, invalid_df
def _check_prd_ref_by_srs_exists(trace, active_prd_list, prd_prefix, srs_prefix):
"""check whether all PRD referenced by SRS exist
invalid rows will contain rows where PRDs referenced by SRSs do not exist
Args:
trace (DataFrame): trace matrix
active_prd_list (list): list of PRDs that are active
prd_prefix (string): string that PRD starts with
srs_prefix (string): string that SRS starts with
Returns:
valid_df (DataFrame): data frame with all valid rows of trace matrix
invalid_df (DataFrame): data frame with all invalid rows of trace matrix
"""
trace["PRD_clean"] = trace["PRD"]
# function to clean PRD column
def _get_req_list(string, prefix):
string = string.replace(",", " ")
test_list = string.split()
req_list = []
for val in test_list:
if val.startswith(prefix) & val[-1].isdigit():
req_list.append(val)
return req_list
trace["PRD_clean"] = trace["PRD_clean"].apply(lambda row: get_req_list(row, prd_prefix))
# Valid if PRDs are all in active list
trace["valid"] = trace["PRD_clean"].apply(lambda lst: all((True for x in lst if x in active_prd_list)))
invalid_df = trace[(trace['valid'] == False) & (trace['PRD_clean'].str.len() != 0)]
invalid_df = invalid_df.drop(columns=['PRD_clean', 'valid'])
# create valid df by subtracting invalid from trace
if (len(invalid_df.index) == 0):
valid_df = trace
valid_df = valid_df.drop(columns=['PRD_clean', 'valid'])
else:
valid_df = trace.merge(invalid_df, how='left', indicator=True)
valid_df = valid_df[valid_df['_merge'] == 'left_only']
valid_df = valid_df.drop(columns=['_merge', 'PRD_clean', 'valid'])
valid_df = valid_df.sort_index()
invalid_df.insert(0, "Error:", "PRD referenced by SRS does not exist")
return valid_df, invalid_df
def _check_srs_exists(trace, obs_srs_list, prd_prefix, srs_prefix):
"""check whether all SRSs referenced by tests exist
invalid rows will contain rows where SRSs referenced by tests do not exist
Args:
trace (DataFrame): trace matrix
obs_srs_list (list): list of SRS that are obsolete
prd_prefix (string): string that PRD starts with
srs_prefix (string): string that SRS starts with
Returns:
valid_df (DataFrame): data frame with all valid rows of trace matrix
invalid_df (DataFrame): data frame with all invalid rows of trace matrix
"""
trace["srs_list"] = trace["Test Name"]
# function to clean column and put into list
def _get_req_list(string, prefix):
test_list = string.split()
req_list = []
for val in test_list:
if val.startswith(prefix):
req_list.append(val)
return req_list
trace["srs_list"] = trace["Test Name"].apply(lambda row: get_req_list(row, srs_prefix))
# Valid if SRS are all not in obsolete list
trace["invalid"] = trace["srs_list"].apply(lambda lst: all((True for x in lst if x in obs_srs_list)))
# Create valid and invalid dfs
valid_df = trace[trace['invalid'] == False]
valid_df = valid_df.drop(columns=['srs_list', 'invalid'])
invalid_df = trace[trace['invalid'] == True]
invalid_df = invalid_df.drop(columns=['srs_list', 'invalid'])
invalid_df.insert(0, "Error:", "Test references obsolete SRS")
return valid_df, invalid_df
def _check_prd_exists(trace, active_prd_list, prd_prefix, srs_prefix):
"""check whether all PRD referenced by tests exist
invalid rows will contain rows where PRDs referenced by tests are not active
Args:
trace (DataFrame): trace matrix
active_prd_list (list): list of PRDs that are active
prd_prefix (string): string that PRD starts with
srs_prefix (string): string that SRS starts with
Returns:
valid_df (DataFrame): data frame with all valid rows of trace matrix
invalid_df (DataFrame): data frame with all invalid rows of trace matrix
"""
trace["prd_list"] = trace["Test Name"]
# function to clean column and put into list
def _get_req_list(string, prefix):
test_list = string.split()
req_list = []
for val in test_list:
if val.startswith(prefix) & val[-1].isdigit():
req_list.append(val)
return req_list
trace["prd_list"] = trace["prd_list"].apply(lambda row: get_req_list(row, prd_prefix))
# Valid if PRD are all in active list
trace["valid"] = trace["prd_list"].apply(lambda lst: all((True for x in lst if x in active_prd_list)))
# Create invalid and valid dfs
invalid_df = trace[(trace['valid'] == False) & (trace['prd_list'].str.len() != 0)]
invalid_df = invalid_df.drop(columns=['prd_list', 'valid'])
if (len(invalid_df.index) == 0):
valid_df = trace
valid_df = valid_df.drop(columns=['prd_list', 'valid'])
else:
valid_df = trace.merge(invalid_df, how='left', indicator=True)
valid_df = valid_df[valid_df['_merge'] == 'left_only']
valid_df = valid_df.drop(columns=['_merge', 'prd_list', 'valid'])
invalid_df.insert(0, "Error:", "PRD referenced by test does not exist")
return valid_df, invalid_df
| 36.79321
| 107
| 0.644661
| 1,724
| 11,921
| 4.268561
| 0.078306
| 0.050414
| 0.029352
| 0.030439
| 0.859492
| 0.837342
| 0.813562
| 0.767903
| 0.632151
| 0.583096
| 0
| 0.002117
| 0.247043
| 11,921
| 323
| 108
| 36.907121
| 0.817736
| 0.297123
| 0
| 0.460526
| 0
| 0
| 0.104177
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.065789
| false
| 0
| 0.026316
| 0
| 0.157895
| 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
|
6ad25091226fb6483b1ef6d3b2d0e4eefc973377
| 116
|
py
|
Python
|
Python/checkoddnum.py
|
chathu1996/hacktoberfest2020
|
eaf64ac051709984cde916259e90cb24213b5c2f
|
[
"MIT"
] | 71
|
2020-10-06T05:53:59.000Z
|
2021-11-27T03:14:42.000Z
|
Python/checkoddnum.py
|
chathu1996/hacktoberfest2020
|
eaf64ac051709984cde916259e90cb24213b5c2f
|
[
"MIT"
] | 92
|
2020-10-05T19:18:14.000Z
|
2021-10-09T04:35:16.000Z
|
Python/checkoddnum.py
|
chathu1996/hacktoberfest2020
|
eaf64ac051709984cde916259e90cb24213b5c2f
|
[
"MIT"
] | 572
|
2020-10-05T20:11:28.000Z
|
2021-10-10T16:28:29.000Z
|
a=int(input("Enter a number"))
if a%2==0:
print(a,"is an Even Number")
else:
print(a,"is an Odd Number")
| 19.333333
| 34
| 0.594828
| 23
| 116
| 3
| 0.608696
| 0.173913
| 0.231884
| 0.289855
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021978
| 0.215517
| 116
| 5
| 35
| 23.2
| 0.736264
| 0
| 0
| 0
| 0
| 0
| 0.405172
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 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
|
0a76b37bf58105f51e9cf66916739fabfae724dd
| 218
|
py
|
Python
|
BMS_Sender.py
|
akashbhasker/stream-bms-data-DivyaK-bit
|
ce75cf92b2fa52940b511751a14545ac350c137a
|
[
"MIT"
] | null | null | null |
BMS_Sender.py
|
akashbhasker/stream-bms-data-DivyaK-bit
|
ce75cf92b2fa52940b511751a14545ac350c137a
|
[
"MIT"
] | null | null | null |
BMS_Sender.py
|
akashbhasker/stream-bms-data-DivyaK-bit
|
ce75cf92b2fa52940b511751a14545ac350c137a
|
[
"MIT"
] | null | null | null |
import Battery_Parameter_Handler
alert_Duration = 10
def startSender():
Battery_Parameter_Handler.startSender(["Charge_rate" ,"Temperature"],"Console",alert_Duration)
if __name__ == '__main__':
startSender()
| 24.222222
| 98
| 0.775229
| 23
| 218
| 6.695652
| 0.695652
| 0.207792
| 0.298701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.110092
| 218
| 9
| 99
| 24.222222
| 0.783505
| 0
| 0
| 0
| 0
| 0
| 0.16895
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.333333
| 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
|
0a7e9f18d18663ff179843c552bb723e384020f5
| 1,740
|
py
|
Python
|
17B-162/HI/imaging/HI_convolve_to_14B.py
|
e-koch/VLA_Lband
|
8fca7b2de0b88ce5c5011b34bf3936c69338d0b0
|
[
"MIT"
] | 1
|
2021-03-08T23:19:12.000Z
|
2021-03-08T23:19:12.000Z
|
17B-162/HI/imaging/HI_convolve_to_14B.py
|
e-koch/VLA_Lband
|
8fca7b2de0b88ce5c5011b34bf3936c69338d0b0
|
[
"MIT"
] | null | null | null |
17B-162/HI/imaging/HI_convolve_to_14B.py
|
e-koch/VLA_Lband
|
8fca7b2de0b88ce5c5011b34bf3936c69338d0b0
|
[
"MIT"
] | null | null | null |
'''
For comparison, smooth and regrid to the 14B data.
'''
import os
from cube_analysis.reprojection import reproject_cube
from paths import (data_path, fourteenB_wGBT_HI_file_dict,
seventeenB_02kms_wGBT_HI_file_dict,
seventeenB_HI_data_02kms_wGBT_path,
seventeenB_1kms_wGBT_HI_file_dict,
seventeenB_HI_data_1kms_wGBT_path)
out_folder = seventeenB_HI_data_02kms_wGBT_path("14B_match",
no_check=True)
if not os.path.exists(out_folder):
os.mkdir(out_folder)
out_name = seventeenB_02kms_wGBT_HI_file_dict['Cube'].split("/")[-1].rstrip(".fits") + \
".14B_match.fits"
reproject_cube(seventeenB_02kms_wGBT_HI_file_dict['Cube'],
fourteenB_wGBT_HI_file_dict['Cube'],
out_name,
output_folder=out_folder,
save_spectral=False,
is_huge=True,
reproject_type='spatial',
common_beam=True,
verbose=True,
chunk=40)
out_folder = seventeenB_HI_data_1kms_wGBT_path("14B_match",
no_check=True)
if not os.path.exists(out_folder):
os.mkdir(out_folder)
out_name = seventeenB_1kms_wGBT_HI_file_dict['Cube'].split("/")[-1].rstrip(".fits") + \
".14B_match.fits"
reproject_cube(seventeenB_1kms_wGBT_HI_file_dict['Cube'],
fourteenB_wGBT_HI_file_dict['Cube'],
out_name,
output_folder=out_folder,
save_spectral=False,
is_huge=True,
reproject_type='spatial',
common_beam=True,
verbose=True,
chunk=40)
| 31.071429
| 88
| 0.598276
| 206
| 1,740
| 4.592233
| 0.262136
| 0.057082
| 0.095137
| 0.133192
| 0.875264
| 0.831924
| 0.731501
| 0.649049
| 0.649049
| 0.649049
| 0
| 0.025941
| 0.313218
| 1,740
| 55
| 89
| 31.636364
| 0.76569
| 0.028736
| 0
| 0.666667
| 0
| 0
| 0.058299
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 0.076923
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 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
|
0a8814a9e89b29b2c68bddc494424c9c967f6041
| 23
|
py
|
Python
|
wechart_base_api_class/__init__.py
|
FrankWangJQ/wechart-apitest
|
7c66132108917d6bc1e20ae65c186dc623a95fec
|
[
"Apache-2.0"
] | null | null | null |
wechart_base_api_class/__init__.py
|
FrankWangJQ/wechart-apitest
|
7c66132108917d6bc1e20ae65c186dc623a95fec
|
[
"Apache-2.0"
] | null | null | null |
wechart_base_api_class/__init__.py
|
FrankWangJQ/wechart-apitest
|
7c66132108917d6bc1e20ae65c186dc623a95fec
|
[
"Apache-2.0"
] | null | null | null |
__version__ = 'V_0.1.0'
| 23
| 23
| 0.695652
| 5
| 23
| 2.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0.086957
| 23
| 1
| 23
| 23
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0.291667
| 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
|
0a99514a389dbee9d39fe3073afd81f6eaf7d5bf
| 141
|
py
|
Python
|
EnvMS/tests.py
|
smileboywtu/django-demo
|
1ddc83abcd363814180056b9cc2ec1a4f804cc9d
|
[
"MIT"
] | 1
|
2016-07-30T03:22:13.000Z
|
2016-07-30T03:22:13.000Z
|
EnvMS/tests.py
|
smileboywtu/django-demo
|
1ddc83abcd363814180056b9cc2ec1a4f804cc9d
|
[
"MIT"
] | null | null | null |
EnvMS/tests.py
|
smileboywtu/django-demo
|
1ddc83abcd363814180056b9cc2ec1a4f804cc9d
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# 测试环境管理API
# Created: 2016-7-27
# Copyright: (c) 2016<smileboywtu@gmail.com>
from django.test import TestCase
| 11.75
| 44
| 0.666667
| 19
| 141
| 4.947368
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102564
| 0.170213
| 141
| 11
| 45
| 12.818182
| 0.700855
| 0.659574
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0ab267fc3e92547d18a89664ca4dcf40a03876a4
| 83
|
py
|
Python
|
napari_filters/_tests/test_function.py
|
tdmorello/napari-filters
|
f689024a312bf3af37377acdf9259d5b8520cb3e
|
[
"BSD-3-Clause"
] | null | null | null |
napari_filters/_tests/test_function.py
|
tdmorello/napari-filters
|
f689024a312bf3af37377acdf9259d5b8520cb3e
|
[
"BSD-3-Clause"
] | null | null | null |
napari_filters/_tests/test_function.py
|
tdmorello/napari-filters
|
f689024a312bf3af37377acdf9259d5b8520cb3e
|
[
"BSD-3-Clause"
] | null | null | null |
# from napari_filters import threshold, image_arithmetic
# add your tests here...
| 20.75
| 56
| 0.783133
| 11
| 83
| 5.727273
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144578
| 83
| 3
| 57
| 27.666667
| 0.887324
| 0.927711
| 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
|
0ab961059f4d580d140ae97399e7476b96b8ed71
| 81
|
py
|
Python
|
python/fek.py
|
ankitr/N-lang
|
ac6d20a5b688d5281a86dfdaba35938eaa402500
|
[
"MIT"
] | null | null | null |
python/fek.py
|
ankitr/N-lang
|
ac6d20a5b688d5281a86dfdaba35938eaa402500
|
[
"MIT"
] | null | null | null |
python/fek.py
|
ankitr/N-lang
|
ac6d20a5b688d5281a86dfdaba35938eaa402500
|
[
"MIT"
] | null | null | null |
import re
def paer(args):
print(args[0])
def _values():
return {"paer": None}
| 11.571429
| 22
| 0.654321
| 13
| 81
| 4
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014706
| 0.160494
| 81
| 7
| 22
| 11.571429
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.2
| 0.2
| 0.8
| 0.2
| 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
|
0ac1c8aca091b9a0948fdc67d2361274749c06c3
| 929
|
py
|
Python
|
staking/domain/model/stake_holder.py
|
prashantramangupta/snet-staking-service
|
ae59b951f735486dad48a928425e8925b4b14ae9
|
[
"MIT"
] | null | null | null |
staking/domain/model/stake_holder.py
|
prashantramangupta/snet-staking-service
|
ae59b951f735486dad48a928425e8925b4b14ae9
|
[
"MIT"
] | 9
|
2020-02-19T08:03:45.000Z
|
2020-02-19T09:18:17.000Z
|
staking/domain/model/stake_holder.py
|
prashantramangupta/snet-staking-service
|
ae59b951f735486dad48a928425e8925b4b14ae9
|
[
"MIT"
] | 3
|
2020-02-14T09:17:58.000Z
|
2021-06-09T11:16:52.000Z
|
class StakeHolder:
def __init__(self, staker, amount_pending_for_approval, amount_approved, block_no_created):
self._staker = staker
self._amount_pending_for_approval = amount_pending_for_approval
self._amount_approved = amount_approved
self._block_no_created = block_no_created
def to_dict(self):
return {
"staker": self._staker,
"amount_pending_for_approval": self._amount_pending_for_approval,
"amount_approved": self._amount_approved,
"block_no_created": self._block_no_created
}
@property
def staker(self):
return self._staker
@property
def amount_pending_for_approval(self):
return self._amount_pending_for_approval
@property
def amount_approved(self):
return self._amount_approved
@property
def block_no_created(self):
return self._block_no_created
| 29.967742
| 95
| 0.692142
| 108
| 929
| 5.407407
| 0.166667
| 0.155822
| 0.191781
| 0.287671
| 0.5
| 0.40411
| 0
| 0
| 0
| 0
| 0
| 0
| 0.243272
| 929
| 30
| 96
| 30.966667
| 0.830725
| 0
| 0
| 0.16
| 0
| 0
| 0.068891
| 0.029064
| 0
| 0
| 0
| 0
| 0
| 1
| 0.24
| false
| 0
| 0
| 0.2
| 0.48
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
0ad2ef8073688326d37a929bf6f5e133b5dfe84a
| 117
|
py
|
Python
|
search/__init__.py
|
vanng822/geosearch
|
587bb6945da041277fdbf40cdb9e1f99ffee60a1
|
[
"MIT"
] | null | null | null |
search/__init__.py
|
vanng822/geosearch
|
587bb6945da041277fdbf40cdb9e1f99ffee60a1
|
[
"MIT"
] | null | null | null |
search/__init__.py
|
vanng822/geosearch
|
587bb6945da041277fdbf40cdb9e1f99ffee60a1
|
[
"MIT"
] | null | null | null |
from engine import Engine
from filters import Filter, TagFilter, RadiusFilter
from sorting import sort_by_popularity
| 29.25
| 51
| 0.863248
| 16
| 117
| 6.1875
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119658
| 117
| 3
| 52
| 39
| 0.961165
| 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
|
0af7db5046437752b2d512b58d41d321bb1030fd
| 96
|
py
|
Python
|
pyCFOF/__init__.py
|
luk-f/pyCFOF
|
dca9dd16150c41f4be70beb9734c735f84f77268
|
[
"BSD-3-Clause"
] | null | null | null |
pyCFOF/__init__.py
|
luk-f/pyCFOF
|
dca9dd16150c41f4be70beb9734c735f84f77268
|
[
"BSD-3-Clause"
] | 5
|
2020-05-23T16:17:04.000Z
|
2021-06-21T13:37:45.000Z
|
pyCFOF/__init__.py
|
luk-f/pyCFOF
|
dca9dd16150c41f4be70beb9734c735f84f77268
|
[
"BSD-3-Clause"
] | null | null | null |
from ._cfof import ConcentrationFreeOutlierFactor
__all__ = ['ConcentrationFreeOutlierFactor']
| 24
| 49
| 0.854167
| 6
| 96
| 12.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 96
| 3
| 50
| 32
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.3125
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| 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
|
0afddfa6e60641bd5882b95879af506982c59fd8
| 131
|
py
|
Python
|
tw_serverinfo/utility/__init__.py
|
DaRealFreak/Teeworlds-ServerInfo
|
ed3f281d91ecc7bd4f2e1fff27e86effaed68b02
|
[
"MIT"
] | 6
|
2018-10-14T10:12:23.000Z
|
2019-08-12T23:27:32.000Z
|
tw_serverinfo/utility/__init__.py
|
DaRealFreak/Teeworlds-ServerInfo
|
ed3f281d91ecc7bd4f2e1fff27e86effaed68b02
|
[
"MIT"
] | 4
|
2018-10-14T14:59:47.000Z
|
2020-09-25T09:50:18.000Z
|
tw_serverinfo/utility/__init__.py
|
DaRealFreak/Teeworlds-ServerInfo
|
ed3f281d91ecc7bd4f2e1fff27e86effaed68b02
|
[
"MIT"
] | null | null | null |
#!/usr/local/bin/python
# coding: utf-8
from tw_serverinfo.utility.countries import custom_countries
__all__ = [custom_countries]
| 21.833333
| 60
| 0.801527
| 18
| 131
| 5.444444
| 0.833333
| 0.306122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008403
| 0.091603
| 131
| 5
| 61
| 26.2
| 0.815126
| 0.274809
| 0
| 0
| 0
| 0
| 0
| 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
|
e403effafd5c0c1f0384b98b7c4d02d03176d079
| 3,792
|
py
|
Python
|
pypy/module/__pypy__/test/test_intop.py
|
m4sterchain/mesapy
|
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
|
[
"Apache-2.0",
"OpenSSL"
] | 381
|
2018-08-18T03:37:22.000Z
|
2022-02-06T23:57:36.000Z
|
pypy/module/__pypy__/test/test_intop.py
|
m4sterchain/mesapy
|
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
|
[
"Apache-2.0",
"OpenSSL"
] | 16
|
2018-09-22T18:12:47.000Z
|
2022-02-22T20:03:59.000Z
|
pypy/module/__pypy__/test/test_intop.py
|
m4sterchain/mesapy
|
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
|
[
"Apache-2.0",
"OpenSSL"
] | 30
|
2018-08-20T03:16:34.000Z
|
2022-01-12T17:39:22.000Z
|
class AppTestIntOp:
spaceconfig = dict(usemodules=['__pypy__'])
def w_intmask(self, n):
import sys
n &= (sys.maxsize*2+1)
if n > sys.maxsize:
n -= 2*(sys.maxsize+1)
return int(n)
def test_intmask(self):
import sys
assert self.intmask(sys.maxsize) == sys.maxsize
assert self.intmask(sys.maxsize+1) == -sys.maxsize-1
assert self.intmask(-sys.maxsize-2) == sys.maxsize
N = 2 ** 128
assert self.intmask(N+sys.maxsize) == sys.maxsize
assert self.intmask(N+sys.maxsize+1) == -sys.maxsize-1
assert self.intmask(N-sys.maxsize-2) == sys.maxsize
def test_int_add(self):
import sys
from __pypy__ import intop
assert intop.int_add(40, 2) == 42
assert intop.int_add(sys.maxsize, 1) == -sys.maxsize-1
assert intop.int_add(-2, -sys.maxsize) == sys.maxsize
def test_int_sub(self):
import sys
from __pypy__ import intop
assert intop.int_sub(40, -2) == 42
assert intop.int_sub(sys.maxsize, -1) == -sys.maxsize-1
assert intop.int_sub(-2, sys.maxsize) == sys.maxsize
def test_int_mul(self):
import sys
from __pypy__ import intop
assert intop.int_mul(40, -2) == -80
assert intop.int_mul(-sys.maxsize, -sys.maxsize) == (
self.intmask(sys.maxsize ** 2))
def test_int_floordiv(self):
import sys
from __pypy__ import intop
assert intop.int_floordiv(41, 3) == 13
assert intop.int_floordiv(41, -3) == -13
assert intop.int_floordiv(-41, 3) == -13
assert intop.int_floordiv(-41, -3) == 13
assert intop.int_floordiv(-sys.maxsize, -1) == sys.maxsize
assert intop.int_floordiv(sys.maxsize, -1) == -sys.maxsize
def test_int_mod(self):
import sys
from __pypy__ import intop
assert intop.int_mod(41, 3) == 2
assert intop.int_mod(41, -3) == 2
assert intop.int_mod(-41, 3) == -2
assert intop.int_mod(-41, -3) == -2
assert intop.int_mod(-sys.maxsize, -1) == 0
assert intop.int_mod(sys.maxsize, -1) == 0
def test_int_lshift(self):
import sys
from __pypy__ import intop
if sys.maxsize == 2**31-1:
bits = 32
else:
bits = 64
assert intop.int_lshift(42, 3) == 42 << 3
assert intop.int_lshift(0, 3333) == 0
assert intop.int_lshift(1, bits-2) == 1 << (bits-2)
assert intop.int_lshift(1, bits-1) == -sys.maxsize-1 == (-1) << (bits-1)
assert intop.int_lshift(-1, bits-2) == (-1) << (bits-2)
assert intop.int_lshift(-1, bits-1) == -sys.maxsize-1
assert intop.int_lshift(sys.maxsize // 3, 2) == (
self.intmask((sys.maxsize // 3) << 2))
assert intop.int_lshift(-sys.maxsize // 3, 2) == (
self.intmask((-sys.maxsize // 3) << 2))
def test_int_rshift(self):
from __pypy__ import intop
assert intop.int_rshift(42, 3) == 42 >> 3
assert intop.int_rshift(-42, 3) == (-42) >> 3
assert intop.int_rshift(0, 3333) == 0
assert intop.int_rshift(-1, 0) == -1
assert intop.int_rshift(-1, 1) == -1
def test_uint_rshift(self):
import sys
from __pypy__ import intop
if sys.maxsize == 2**31-1:
bits = 32
else:
bits = 64
N = 1 << bits
assert intop.uint_rshift(42, 3) == 42 >> 3
assert intop.uint_rshift(-42, 3) == (N-42) >> 3
assert intop.uint_rshift(0, 3333) == 0
assert intop.uint_rshift(-1, 0) == -1
assert intop.uint_rshift(-1, 1) == sys.maxsize
assert intop.uint_rshift(-1, bits-2) == 3
assert intop.uint_rshift(-1, bits-1) == 1
| 36.114286
| 80
| 0.567774
| 541
| 3,792
| 3.805915
| 0.083179
| 0.199126
| 0.224381
| 0.073822
| 0.834386
| 0.771734
| 0.647887
| 0.581836
| 0.531812
| 0.427878
| 0
| 0.068529
| 0.29193
| 3,792
| 104
| 81
| 36.461538
| 0.698324
| 0
| 0
| 0.271739
| 0
| 0
| 0.002111
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.108696
| false
| 0
| 0.184783
| 0
| 0.326087
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7c1a169f048134204195356c11c23af6444c91f6
| 1,559
|
py
|
Python
|
setup.py
|
fanfanpsu/django-mptt
|
388bbd7c2171b46c838a279262b8c78975c4320a
|
[
"MIT"
] | null | null | null |
setup.py
|
fanfanpsu/django-mptt
|
388bbd7c2171b46c838a279262b8c78975c4320a
|
[
"MIT"
] | null | null | null |
setup.py
|
fanfanpsu/django-mptt
|
388bbd7c2171b46c838a279262b8c78975c4320a
|
[
"MIT"
] | 1
|
2019-04-17T18:03:38.000Z
|
2019-04-17T18:03:38.000Z
|
#!/usr/bin/env python
from setuptools import find_packages, setup
setup(
name='django-mptt',
description=(
'Utilities for implementing Modified Preorder Tree Traversal '
'with your Django Models and working with trees of Model instances.'
),
version=__import__('mptt').__version__,
author='Craig de Stigter',
author_email='craig.ds@gmail.com',
url='http://github.com/django-mptt/django-mptt',
license='MIT License',
packages=find_packages(exclude=['tests', 'tests.*']),
include_package_data=True,
install_requires=[
'django-js-asset',
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
'Topic :: Utilities',
],
)
| 34.644444
| 76
| 0.600385
| 155
| 1,559
| 5.948387
| 0.554839
| 0.206074
| 0.27115
| 0.140998
| 0.058568
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017241
| 0.255933
| 1,559
| 44
| 77
| 35.431818
| 0.777586
| 0.012829
| 0
| 0.05
| 0
| 0
| 0.606632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.05
| 0
| 0.05
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7c30b5f9ec252a135800721c5da830e9c70dc53c
| 177
|
py
|
Python
|
visit/forms.py
|
project-sabai/Sabai-Backend
|
fbc25d6ec774900d2602f6f8cf57544d873f401a
|
[
"MIT"
] | null | null | null |
visit/forms.py
|
project-sabai/Sabai-Backend
|
fbc25d6ec774900d2602f6f8cf57544d873f401a
|
[
"MIT"
] | 9
|
2020-06-05T22:10:47.000Z
|
2021-06-10T18:38:13.000Z
|
visit/forms.py
|
project-sabai/Sabai-Backend
|
fbc25d6ec774900d2602f6f8cf57544d873f401a
|
[
"MIT"
] | 1
|
2019-09-01T04:41:58.000Z
|
2019-09-01T04:41:58.000Z
|
from django import forms
from clinicmodels.models import Visit
class VisitForm(forms.ModelForm):
class Meta:
model = Visit
fields = ['patient', 'status']
| 17.7
| 38
| 0.677966
| 20
| 177
| 6
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.237288
| 177
| 9
| 39
| 19.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0.073864
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
7c4a79936cc7ab69415fab96ebd3a750fcb993c0
| 271
|
py
|
Python
|
frontend/email_css.py
|
mepsd/CLAC
|
ee15111e9ad12e51fe349d3339319e30b3b69d9e
|
[
"CC0-1.0"
] | 126
|
2015-03-24T17:37:33.000Z
|
2022-03-29T18:37:39.000Z
|
frontend/email_css.py
|
mepsd/CLAC
|
ee15111e9ad12e51fe349d3339319e30b3b69d9e
|
[
"CC0-1.0"
] | 1,815
|
2015-03-16T21:01:30.000Z
|
2019-09-09T18:47:29.000Z
|
frontend/email_css.py
|
mepsd/CLAC
|
ee15111e9ad12e51fe349d3339319e30b3b69d9e
|
[
"CC0-1.0"
] | 69
|
2015-03-27T23:44:26.000Z
|
2021-02-14T09:45:28.000Z
|
import pathlib
from django.utils.safestring import mark_safe
CSS_PATH = (pathlib.Path(__file__).resolve().parent /
'static' / 'frontend' / 'built' / 'style' / 'email.min.css')
def get():
return mark_safe(CSS_PATH.read_text(encoding='utf-8')) # nosec
| 24.636364
| 72
| 0.675277
| 36
| 271
| 4.833333
| 0.777778
| 0.091954
| 0.126437
| 0.172414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004444
| 0.169742
| 271
| 10
| 73
| 27.1
| 0.768889
| 0.01845
| 0
| 0
| 0
| 0
| 0.159091
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 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
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
7c4bd2460ee06b53b6e2c4bbaf49597325c5f788
| 115
|
py
|
Python
|
main/main.py
|
genisyskernel/project-genisys-ia
|
ba79d9e81ae6d3f10b179a65ae0856ceec38a1e1
|
[
"MIT"
] | null | null | null |
main/main.py
|
genisyskernel/project-genisys-ia
|
ba79d9e81ae6d3f10b179a65ae0856ceec38a1e1
|
[
"MIT"
] | null | null | null |
main/main.py
|
genisyskernel/project-genisys-ia
|
ba79d9e81ae6d3f10b179a65ae0856ceec38a1e1
|
[
"MIT"
] | null | null | null |
# MAIN #
from interface import gui
# Start Main #
if __name__ == '__main__':
# Start GUI frame #
gui.GUI
| 12.777778
| 26
| 0.626087
| 15
| 115
| 4.266667
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269565
| 115
| 8
| 27
| 14.375
| 0.761905
| 0.286957
| 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
|
7c53c076f9cf97793b75527655e140cb17f31a90
| 264
|
py
|
Python
|
pulumi/infra/path.py
|
inickles/grapl
|
f906aba74b2249c9c7d7b1afe6fc540551cdee8b
|
[
"Apache-2.0"
] | 313
|
2018-10-15T05:58:39.000Z
|
2020-04-21T20:31:39.000Z
|
pulumi/infra/path.py
|
graplsec/grapl
|
68386b425c8e9e34f7380a078279b67b316fe2a0
|
[
"Apache-2.0"
] | 33
|
2018-10-16T00:47:10.000Z
|
2020-03-16T22:32:45.000Z
|
pulumi/infra/path.py
|
graplsec/grapl
|
68386b425c8e9e34f7380a078279b67b316fe2a0
|
[
"Apache-2.0"
] | 29
|
2018-11-18T08:39:14.000Z
|
2020-04-09T20:59:15.000Z
|
from pathlib import Path
def path_from_root(from_root: str) -> Path:
"""
To access something in the Grapl repo root, we have to reference two dirs
up because the Pulumi cwd is `${GRAPL_ROOT}/pulumi/grapl`
"""
return Path("../..") / from_root
| 26.4
| 77
| 0.666667
| 40
| 264
| 4.275
| 0.625
| 0.140351
| 0.140351
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.219697
| 264
| 9
| 78
| 29.333333
| 0.830097
| 0.496212
| 0
| 0
| 0
| 0
| 0.044248
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| 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
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.