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
148ab088832163146ba115098ef43d81aed9229b
22
py
Python
tests/pokeapi.py
JuntaoZhong/pokemon-database-webapp
a29d70a0107cd29a6dc456aba40f6f0152d3bb00
[ "MIT" ]
null
null
null
tests/pokeapi.py
JuntaoZhong/pokemon-database-webapp
a29d70a0107cd29a6dc456aba40f6f0152d3bb00
[ "MIT" ]
23
2021-03-04T01:27:35.000Z
2021-03-15T21:56:44.000Z
webapp/tests/pokeapi.py
rossgk2/cs257
1031d731c8712bcb300fefc79cce534c9650470c
[ "MIT" ]
null
null
null
class pokeapi(): pass
11
16
0.727273
3
22
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
2
17
11
0.842105
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
14bee1a86653d9655048ae339535bdac544f8fdb
807
py
Python
Python WebSite/customerManager.py
Brktrlw/E-Trade-System-With-Python-Flask
0e6568083c07abe8bf3f6df4eb0fecb700ea8862
[ "MIT" ]
1
2021-10-04T16:39:01.000Z
2021-10-04T16:39:01.000Z
Python WebSite/customerManager.py
Brktrlw/E-Trade-System-With-Python-Flask
0e6568083c07abe8bf3f6df4eb0fecb700ea8862
[ "MIT" ]
null
null
null
Python WebSite/customerManager.py
Brktrlw/E-Trade-System-With-Python-Flask
0e6568083c07abe8bf3f6df4eb0fecb700ea8862
[ "MIT" ]
null
null
null
from passlib.hash import sha256_crypt from baseDatabaseManager import BaseDatabaseManager class CustomerManager(): @staticmethod def addCustomer(customerName,customerUserName,customerMail,customerPassword): BaseDatabaseManager.databaseType.addCustomer(customerName,customerUserName,customerMail,sha256_crypt.encrypt(customerPassword)) @staticmethod def updateCustomer(customerName,customerUserName,customerMail,customerPassword): # Veritabanından müşteri güncellediğimiz method BaseDatabaseManager.databaseType.updateCustomer(customerName,customerUserName,customerMail,customerPassword) @staticmethod def getCustomerData(customerId): customerData=BaseDatabaseManager.databaseType.getCustomerData(customerId) return customerData
21.810811
135
0.810409
58
807
11.241379
0.465517
0.171779
0.245399
0.257669
0.214724
0
0
0
0
0
0
0.008584
0.133829
807
36
136
22.416667
0.924177
0.055762
0
0.230769
0
0
0
0
0
0
0
0
0
1
0.230769
false
0.384615
0.153846
0
0.538462
0
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
1ad5435c563684ec168f7c937c09885002ca37a8
40
py
Python
tiankafei-code-python/demo/package1/ModuleB.py
tiankafei/java
9ff39cb47b8f2144851856b4412b1b0b7781cb09
[ "Apache-2.0" ]
1
2021-08-23T03:10:33.000Z
2021-08-23T03:10:33.000Z
tiankafei-code-python/demo/package1/ModuleB.py
tiankafei/java
9ff39cb47b8f2144851856b4412b1b0b7781cb09
[ "Apache-2.0" ]
8
2020-09-02T15:14:03.000Z
2021-01-08T00:34:26.000Z
tiankafei-code-python/demo/package1/ModuleB.py
tiankafei/java
9ff39cb47b8f2144851856b4412b1b0b7781cb09
[ "Apache-2.0" ]
2
2020-11-25T07:58:22.000Z
2021-01-28T00:15:11.000Z
# 作者:甜咖啡 # 新建时间:2021/4/6 20:29 a = 100
8
21
0.575
10
40
2.3
1
0
0
0
0
0
0
0
0
0
0
0.419355
0.225
40
4
22
10
0.322581
0.65
0
0
0
0
0
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
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1adcddbf8ce0e8420e19693da504fd06b6dd6d90
31
py
Python
bin/Python27/Lib/site-packages/smop/version.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/smop/version.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/smop/version.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
__version__ = '0.23+g59c3fa4'
15.5
30
0.709677
4
31
4.5
1
0
0
0
0
0
0
0
0
0
0
0.259259
0.129032
31
1
31
31
0.407407
0
0
0
0
0
0.433333
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
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2113ab1eec68369c5c73f72b85a627ba9fc14d80
166
py
Python
app.py
jayrav13/presidency
f18721d5df9af161cc01f503b6657d9b06fea0e9
[ "MIT" ]
14
2016-11-05T03:43:26.000Z
2021-03-25T14:55:19.000Z
app.py
jayrav13/presidency
f18721d5df9af161cc01f503b6657d9b06fea0e9
[ "MIT" ]
5
2017-01-30T21:39:34.000Z
2021-06-10T19:30:57.000Z
app.py
jayrav13/presidency
f18721d5df9af161cc01f503b6657d9b06fea0e9
[ "MIT" ]
2
2016-11-22T08:36:07.000Z
2017-01-28T16:36:29.000Z
#!venv/bin/python from presidency import app import os if __name__ == '__main__': app.run(debug=True, host=os.environ.get('HOST'), port=int(os.environ.get('PORT')))
27.666667
83
0.722892
27
166
4.148148
0.703704
0.160714
0.214286
0
0
0
0
0
0
0
0
0
0.090361
166
6
83
27.666667
0.741722
0.096386
0
0
0
0
0.106667
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2123b0ed1119577ae24207fa71c88c656be9b032
325
py
Python
examples/boilerplate/eventHandler/events.py
Sakuk3/DefCurse
22c7de689c2d4ec859ca70ecbe0d014034adfadc
[ "MIT" ]
null
null
null
examples/boilerplate/eventHandler/events.py
Sakuk3/DefCurse
22c7de689c2d4ec859ca70ecbe0d014034adfadc
[ "MIT" ]
null
null
null
examples/boilerplate/eventHandler/events.py
Sakuk3/DefCurse
22c7de689c2d4ec859ca70ecbe0d014034adfadc
[ "MIT" ]
null
null
null
from dataclasses import replace import models def _quit(model: models.Model, event: str): return replace(model, exit=True) def _switch_modes(model: models.Model, event: str): return replace(model, mode=int(not bool(model.mode))) def _default(model: models.Model, event: str): return model
19.117647
57
0.692308
44
325
5.022727
0.454545
0.149321
0.217195
0.285068
0.515837
0.515837
0.380091
0.380091
0
0
0
0
0.203077
325
16
58
20.3125
0.853282
0
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.25
0.375
1
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
1
0
0
5
2127192f19ddf7f9c37e3f02a67326aa07e1e5cc
183
py
Python
GANs/ops/__init__.py
devzhk/Implicit-Competitive-Regularization
71bda29f2db18d1d7ae9860e4a761ff61cbec756
[ "Apache-2.0" ]
107
2019-10-15T15:55:20.000Z
2021-12-27T02:02:50.000Z
GANs/ops/__init__.py
AzR919/Implicit-Competitive-Regularization
d69b66b1843cf72d94a1b0957aa30eb34e46af53
[ "Apache-2.0" ]
11
2019-10-16T09:41:23.000Z
2020-12-16T08:44:38.000Z
GANs/ops/__init__.py
AzR919/Implicit-Competitive-Regularization
d69b66b1843cf72d94a1b0957aa30eb34e46af53
[ "Apache-2.0" ]
26
2019-10-15T03:38:41.000Z
2021-03-25T11:52:08.000Z
# This package is adapted from https://github.com/rosinality/stylegan2-pytorch/tree/master/op from .fused_act import FusedLeakyReLU, fused_leaky_relu from .upfirdn2d import upfirdn2d
45.75
93
0.836066
26
183
5.769231
0.807692
0
0
0
0
0
0
0
0
0
0
0.017964
0.087432
183
3
94
61
0.88024
0.497268
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
1
0
0
5
21306fac462b2b17859601fa6cc9877642f9e766
89
py
Python
zerohc/__init__.py
David-Lor/ZeroHealthCheck
a0af07a647edfa223bd64d1ab36ad7a8345413f7
[ "ISC" ]
1
2020-12-10T03:36:22.000Z
2020-12-10T03:36:22.000Z
zerohc/__init__.py
David-Lor/ZeroHealthCheck
a0af07a647edfa223bd64d1ab36ad7a8345413f7
[ "ISC" ]
null
null
null
zerohc/__init__.py
David-Lor/ZeroHealthCheck
a0af07a647edfa223bd64d1ab36ad7a8345413f7
[ "ISC" ]
null
null
null
from .hearth import Hearth from .stethoscope import Stethoscope from .cli import run_cli
22.25
36
0.831461
13
89
5.615385
0.461538
0
0
0
0
0
0
0
0
0
0
0
0.134831
89
3
37
29.666667
0.948052
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
1
0
0
5
dcc5ed44131ee3507a23a0479cf64530bffbe687
101
py
Python
commandfrog/config.py
amagee/commandfrog
3136c4447ca8a96fdbbfb837d61d42d63b5e19dc
[ "MIT" ]
null
null
null
commandfrog/config.py
amagee/commandfrog
3136c4447ca8a96fdbbfb837d61d42d63b5e19dc
[ "MIT" ]
null
null
null
commandfrog/config.py
amagee/commandfrog
3136c4447ca8a96fdbbfb837d61d42d63b5e19dc
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class Config: ask_for_sudo_password: bool = False
14.428571
39
0.792079
13
101
5.923077
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.168317
101
6
40
16.833333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
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
0
1
1
0
0
1
0
0
5
dce12b4144fbaa5e3f70cee6a71e9fb393f9d576
124
py
Python
hooks/hook-en_core_web_sm.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
hooks/hook-en_core_web_sm.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
hooks/hook-en_core_web_sm.py
gbmarc1/ExploranceAnonymizer
ff3616ef929269b5c8420266b3c32225cfa4b4a3
[ "MIT" ]
null
null
null
from PyInstaller.utils.hooks import collect_data_files datas = collect_data_files("en_core_web_sm", include_py_files=True)
31
67
0.854839
20
124
4.85
0.8
0.226804
0.329897
0
0
0
0
0
0
0
0
0
0.072581
124
3
68
41.333333
0.843478
0
0
0
0
0
0.112903
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
1
0
0
0
0
5
0d1a03b4cbfcfe8af478bebd0c96549539281465
98
py
Python
telegram/chat/singleton_bot.py
StepanBarantsev/course_management
627d003d8ed63a5cc64485a191c4b98e91796a45
[ "Apache-2.0" ]
null
null
null
telegram/chat/singleton_bot.py
StepanBarantsev/course_management
627d003d8ed63a5cc64485a191c4b98e91796a45
[ "Apache-2.0" ]
null
null
null
telegram/chat/singleton_bot.py
StepanBarantsev/course_management
627d003d8ed63a5cc64485a191c4b98e91796a45
[ "Apache-2.0" ]
null
null
null
import telebot import telegram.config bot = telebot.TeleBot(telegram.config.ConfigTelegram.TOKEN)
24.5
59
0.846939
12
98
6.916667
0.583333
0.337349
0
0
0
0
0
0
0
0
0
0
0.071429
98
4
59
24.5
0.912088
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
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
1
0
0
5
370ac9a36047c293bc4c8214f22444793fb1c935
23
py
Python
test.py
langkelwb/learn-python
015cb6c61fa1ec9acc7b74efbdeb9c2b5d19fefb
[ "MIT" ]
null
null
null
test.py
langkelwb/learn-python
015cb6c61fa1ec9acc7b74efbdeb9c2b5d19fefb
[ "MIT" ]
null
null
null
test.py
langkelwb/learn-python
015cb6c61fa1ec9acc7b74efbdeb9c2b5d19fefb
[ "MIT" ]
null
null
null
print('test 第一个python')
23
23
0.782609
3
23
6
1
0
0
0
0
0
0
0
0
0
0
0
0.043478
23
1
23
23
0.818182
0
0
0
0
0
0.583333
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
2ec5d4bdf150b2745e457f4f5922e2668c5a505c
93
py
Python
klass/admin.py
joseph0919/Student_Management_Django
085e839a86ac574f5ebe83a4911c5808841f50cd
[ "MIT" ]
null
null
null
klass/admin.py
joseph0919/Student_Management_Django
085e839a86ac574f5ebe83a4911c5808841f50cd
[ "MIT" ]
null
null
null
klass/admin.py
joseph0919/Student_Management_Django
085e839a86ac574f5ebe83a4911c5808841f50cd
[ "MIT" ]
null
null
null
from django.contrib import admin from klass.models import Klass admin.site.register(Klass)
15.5
32
0.817204
14
93
5.428571
0.642857
0
0
0
0
0
0
0
0
0
0
0
0.11828
93
5
33
18.6
0.926829
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2eda4c3759d12569a05c1eac92646880d179dd82
73
py
Python
tests/module_fake_http_and_cli.py
pnijhara/hug
95e2f66baa57494b8751b43ad3da6c2d0e2d535d
[ "MIT" ]
6,045
2015-08-12T11:11:39.000Z
2019-04-07T16:42:28.000Z
tests/module_fake_http_and_cli.py
Warlockk/hug
95e2f66baa57494b8751b43ad3da6c2d0e2d535d
[ "MIT" ]
623
2015-08-12T16:08:45.000Z
2019-04-07T23:07:47.000Z
tests/module_fake_http_and_cli.py
Warlockk/hug
95e2f66baa57494b8751b43ad3da6c2d0e2d535d
[ "MIT" ]
426
2015-08-13T04:23:01.000Z
2019-04-07T20:46:41.000Z
import hug @hug.get() @hug.cli() def made_up_go(): return "Going!"
9.125
19
0.616438
12
73
3.583333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.191781
73
7
20
10.428571
0.728814
0
0
0
0
0
0.082192
0
0
0
0
0
0
1
0.2
true
0
0.2
0.2
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
1
0
0
5
2eddcaf2fca464a3b81026b801e515b1dcc7cf33
60
py
Python
mygym/tictactoe/envs/__init__.py
wakamori/mygym
04784410820054c989bfff5c3b57595a42dd38ac
[ "MIT" ]
null
null
null
mygym/tictactoe/envs/__init__.py
wakamori/mygym
04784410820054c989bfff5c3b57595a42dd38ac
[ "MIT" ]
null
null
null
mygym/tictactoe/envs/__init__.py
wakamori/mygym
04784410820054c989bfff5c3b57595a42dd38ac
[ "MIT" ]
null
null
null
from mygym.tictactoe.envs.tictactoe_env import TicTacToeEnv
30
59
0.883333
8
60
6.5
0.875
0
0
0
0
0
0
0
0
0
0
0
0.066667
60
1
60
60
0.928571
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
1
0
0
5
2c0102522897bee01e5cd739a3786444e70c5630
762
py
Python
src/main.py
arthurflor/signatures
e6ae5e5996df438e533420d80eda288d849db28c
[ "MIT" ]
null
null
null
src/main.py
arthurflor/signatures
e6ae5e5996df438e533420d80eda288d849db28c
[ "MIT" ]
null
null
null
src/main.py
arthurflor/signatures
e6ae5e5996df438e533420d80eda288d849db28c
[ "MIT" ]
1
2020-09-05T19:10:26.000Z
2020-09-05T19:10:26.000Z
import classifier.decision_tree as decision_tree import util.data as data def main(): data.DATASET = "characters" # data.DATASET = "signatures" repeat, save = 30, True # features, labels = data.loadDataset(data.DATASET, "mi_hu") # decision_tree.random_forest(features, labels, repeat, save) # decision_tree.cart(features, labels, repeat, save) # decision_tree.c45(features, labels, repeat, save) # del features, labels features, labels = data.loadDataset(data.DATASET, "cnn") decision_tree.random_forest(features, labels, repeat, save) # decision_tree.cart(features, labels, repeat, save) # decision_tree.c45(features, labels, repeat, save) # del features, labels if __name__ == '__main__': main()
33.130435
65
0.7021
93
762
5.548387
0.311828
0.271318
0.232558
0.27907
0.713178
0.713178
0.55814
0.55814
0.55814
0.55814
0
0.009631
0.182415
762
23
66
33.130435
0.81862
0.511811
0
0
0
0
0.057851
0
0
0
0
0
0
1
0.111111
true
0
0.222222
0
0.333333
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2580048651c15234f27c4966de5811ad9804364d
91
py
Python
CodetagCrawler/__init__.py
jonoddram/CodetagCrawler
6b6eaed738aef91fead3d2aaf3ab96e1cecd0cdf
[ "MIT" ]
null
null
null
CodetagCrawler/__init__.py
jonoddram/CodetagCrawler
6b6eaed738aef91fead3d2aaf3ab96e1cecd0cdf
[ "MIT" ]
null
null
null
CodetagCrawler/__init__.py
jonoddram/CodetagCrawler
6b6eaed738aef91fead3d2aaf3ab96e1cecd0cdf
[ "MIT" ]
null
null
null
from .cli import process from .comment_processing import * from .metadata_handler import *
22.75
33
0.813187
12
91
6
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.131868
91
3
34
30.333333
0.911392
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
1
0
0
5
25828a0f8383bfd925e34eb1f8ee098f12550e42
133
py
Python
src/accounts/models.py
gvrossom/ants
b361c44b03dd9a4f9ed17aaff63fcf37b4f41c72
[ "MIT" ]
null
null
null
src/accounts/models.py
gvrossom/ants
b361c44b03dd9a4f9ed17aaff63fcf37b4f41c72
[ "MIT" ]
null
null
null
src/accounts/models.py
gvrossom/ants
b361c44b03dd9a4f9ed17aaff63fcf37b4f41c72
[ "MIT" ]
null
null
null
from django.db import models # Check lib models here: https://github.com/fusionbox/django-authtools/blob/master/authtools/models.py
33.25
102
0.804511
20
133
5.35
0.8
0
0
0
0
0
0
0
0
0
0
0
0.082707
133
3
103
44.333333
0.877049
0.75188
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
1
0
0
5
258a746776a43df6a1438fa919ce1caa9b95d4fb
7,898
py
Python
tests/test_diagrams.py
athrn/kognitivo
15822338778213c09ea654ec4e06a300129f9478
[ "Apache-2.0" ]
80
2017-11-13T21:58:55.000Z
2022-01-03T20:10:42.000Z
tests/test_diagrams.py
athrn/kognitivo
15822338778213c09ea654ec4e06a300129f9478
[ "Apache-2.0" ]
null
null
null
tests/test_diagrams.py
athrn/kognitivo
15822338778213c09ea654ec4e06a300129f9478
[ "Apache-2.0" ]
21
2017-11-14T09:47:41.000Z
2021-11-23T06:44:31.000Z
from tests import control, assertions def test_diagram_labels(): from screens.activity.diagrams.base import DiagramLabelsContainer labels_container = DiagramLabelsContainer() assert not labels_container.children labels_container.values = [1, 2] assert len(labels_container.children), 2 assert labels_container.children[1].text == "1" def test_diagram_labels_empty(): from screens.activity.diagrams.base import DiagramLabelsContainer labels_container = DiagramLabelsContainer() assert not labels_container.children labels_container.values = [] assert not labels_container.children def test_diagram_elements_zero_data(): from screens.activity.diagrams.base import DiagramElementsContainer elements_container = DiagramElementsContainer() elements_container.values = [0, 0, 0] assert elements_container.normal_level_line.points == [] def test_diagram_elements_container(): from screens.activity.diagrams.base import DiagramElementsContainer elements_container = DiagramElementsContainer() assert elements_container.fill_color is None assert elements_container.normal_level_line is None assert elements_container.normal_level_label is None assert elements_container.half_level_line is None assert elements_container.half_level_label is None elements_container.values = [1, 2] assert elements_container.fill_color is not None assert elements_container.normal_level_line is not None assert elements_container.normal_level_label is not None assert elements_container.half_level_line is not None assert elements_container.half_level_label is not None elements_container.color = (1, 1, 0) def test_diagram_elements_container_empty(): from screens.activity.diagrams.base import DiagramElementsContainer elements_container = DiagramElementsContainer() elements_container.values = [] assert elements_container.fill_color is None assert elements_container.normal_level_line is None assert elements_container.normal_level_label is None assert elements_container.half_level_line is None assert elements_container.half_level_label is None def test_diagram_elements_container_placement_inside(): from screens.activity.diagrams.base import DiagramElementsContainer elements_container = DiagramElementsContainer() elements_container.values = [1, 2, 3, 4] assert elements_container.normal_level_line.points[1] == elements_container.height * .25 assert elements_container.half_level_line.points[1] == elements_container.height * .125 assert elements_container.normal_level_label.y == elements_container.height * .25 assert elements_container.half_level_label.y == elements_container.height * .125 def test_diagram_elements_container_placement_under_100(running_app): from screens.activity.diagrams.base import DiagramElementsContainer elements_container = DiagramElementsContainer() elements_container.values = [0.1, 0.2, 0.3, 0.4] assert elements_container.normal_level_line.points[1] == running_app.root_window.height assert elements_container.half_level_line.points[1] == running_app.root_window.height assert elements_container.normal_level_label.y == running_app.root_window.height assert elements_container.half_level_label.y == running_app.root_window.height def test_bar_diagram_elements_container(): from screens.activity.diagrams.base import BarDiagramElementsContainer bar_container = BarDiagramElementsContainer() assert bar_container.bars is None bar_container.values = [1, 2, 3, 4] assert len(bar_container.bars) == 4 # max bar + ellipse half size has the whole height of container assert bar_container.bars[3][0].size[1] / 2 + bar_container.bars[3][1].size[1] == bar_container.height def test_bar_diagram_elements_zero_negative_data(): from screens.activity.diagrams.base import BarDiagramElementsContainer bar_container = BarDiagramElementsContainer() assert bar_container.bars is None bar_container.values = [-1, 0, 0, 4] assert bar_container.bars[0][0].size == (0, 0) assert bar_container.bars[0][1].size == (0, 0) assert bar_container.bars[1][0].size == (0, 0) assert bar_container.bars[1][1].size == (0, 0) def test_filled_line_diagram_elements_container(): from screens.activity.diagrams.base import FilledLineDiagramElementsContainer elements_container = FilledLineDiagramElementsContainer() assert elements_container.quads is None elements_container.values = [1, 2, 3, 4] assert len(elements_container.quads) == 3 assert elements_container.quads[2].points[5] == elements_container.height def test_filled_line_diagram_elements_zero_negative(): from screens.activity.diagrams.base import FilledLineDiagramElementsContainer elements_container = FilledLineDiagramElementsContainer() assert elements_container.quads is None elements_container.values = [-1, 0, 0, 4] assert elements_container.quads[0].points[3] == 0 assert elements_container.quads[1].points[3] == 0 def test_filled_line_diagram_elements_length_1(): from screens.activity.diagrams.base import FilledLineDiagramElementsContainer elements_container = FilledLineDiagramElementsContainer() assert elements_container.quads is None elements_container.values = [-1] def test_abstract_diagram(): from screens.activity.diagrams.base import Diagram, DiagramElementsContainer, DiagramLabelsContainer diagram = Diagram() diagram.labels_container = DiagramLabelsContainer() diagram.elements_container = DiagramElementsContainer() diagram.values = {1: 3, 2: 4} assert diagram.labels_container.values == [1, 2] assert diagram.elements_container.values == [3, 4] diagram.color = (1, 1, 1, 1) assert diagram.elements_container.fill_color.rgba == diagram.color def test_day_stats_diagram_empty_ok(empty_data, running_app, root_manager): from screens.activity.diagrams import ActivityDayStats import settings diagram = ActivityDayStats() for family in [None, settings.ANALYTICS_FAMILY, settings.ATTENTION_FAMILY, settings.REACTION_FAMILY, settings.MEMORY_FAMILY]: diagram.family = family assert diagram.color == settings.ACTIVITY_COLORS_TRANSPARENT[family] from library_widgets import OkCancelPopup assertions.assert_modal_view_shown(running_app, OkCancelPopup) popup = control.get_popups(running_app)[0] control.press(popup.ok_button) assert root_manager.current == 'tasks' assertions.assert_modal_view_not_shown(running_app, OkCancelPopup) def test_day_stats_diagram_empty_cancel(empty_data, running_app, root_manager): from screens.activity.diagrams import ActivityDayStats import settings diagram = ActivityDayStats() for family in [None, settings.ANALYTICS_FAMILY, settings.ATTENTION_FAMILY, settings.REACTION_FAMILY, settings.MEMORY_FAMILY]: diagram.family = family assert diagram.color == settings.ACTIVITY_COLORS_TRANSPARENT[family] from library_widgets import OkCancelPopup assertions.assert_modal_view_shown(running_app, OkCancelPopup) popup = control.get_popups(running_app)[0] control.press(popup.cancel_button) assert root_manager.current == 'activity' assertions.assert_modal_view_not_shown(running_app, OkCancelPopup) def test_day_stats_diagram_not_empty(not_empty_data, running_app, root_manager): from screens.activity.diagrams import ActivityDayStats import settings diagram = ActivityDayStats() diagram.family = None from library_widgets import OkCancelPopup assertions.assert_modal_view_not_shown(running_app, OkCancelPopup) assert diagram.values # press again to trigger animations diagram.family = settings.ATTENTION_FAMILY
38.906404
106
0.78121
960
7,898
6.152083
0.108333
0.178463
0.11683
0.073146
0.834406
0.805113
0.751947
0.712834
0.652387
0.592279
0
0.015868
0.14624
7,898
202
107
39.09901
0.860003
0.012028
0
0.503546
0
0
0.001795
0
0
0
0
0
0.411348
1
0.113475
false
0
0.163121
0
0.276596
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
1
0
0
0
0
0
0
0
0
0
5
d32e41dc506a94dc3895ad0746108b8539a12fff
34,171
py
Python
models/Deep-learning/dataset/dataset_utils.py
jingyi7777/CasRx_guide_efficiency
c9e900e4c4a73215f09852bd621b30e8dcb039e8
[ "MIT" ]
null
null
null
models/Deep-learning/dataset/dataset_utils.py
jingyi7777/CasRx_guide_efficiency
c9e900e4c4a73215f09852bd621b30e8dcb039e8
[ "MIT" ]
null
null
null
models/Deep-learning/dataset/dataset_utils.py
jingyi7777/CasRx_guide_efficiency
c9e900e4c4a73215f09852bd621b30e8dcb039e8
[ "MIT" ]
null
null
null
from itertools import chain from typing import TextIO from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold import tensorflow as tf from utils import base_positions, flip_dict, linearfold_positions import numpy as np import re import sklearn import pdb dataset_csv_path = 'dataset/integrated_features.csv' #dataset_filtered_csv_path = 'dataset/integrated_guide_feature_filtered_ver3.csv' # filtered guides with essential off targets dataset_filtered_csv_path = 'dataset/integrated_guide_feature_filtered_new_ver3.csv' #new unchopped ratio gene_fasta_path = 'dataset/essential_transcripts.fasta' linearfold_fasta_path = 'dataset/guides_linearfold_v.txt' linearfold_fasta_path_c = 'dataset/guides_linearfold_c.txt' genes = ['RPS14', 'CDC5L', 'POLR2I', 'RPS7', 'XAB2', 'RPS19BP1', 'RPL23A', 'SUPT6H', 'PRPF31', 'U2AF1', 'PSMD7', 'Hsp10', 'RPS13', 'PHB', 'RPS9', 'EIF5B', 'RPS6', 'RPS11', 'SUPT5H', 'SNRPD2', 'RPL37', 'RPSA', 'COPS6', 'DDX51', 'EIF4A3', 'KARS', 'RPL5', 'RPL32', 'SF3A1', 'RPS3A', 'SF3B3', 'POLR2D', 'RPS15A', 'RPL31', 'PRPF19', 'SF3B2', 'RPS4X', 'CSE1L', 'RPL6', 'COPZ1', 'PSMB2', 'RPL7', 'PHB2', 'ARCN1', 'RPA2', 'NUP98', 'RPS3', 'EEF2', 'USP39', 'PSMD1', 'NUP93', 'AQR', 'RPL34', 'PSMA1', 'RPS27A'] bprna_features = {'X', 'H', 'E', 'S', 'M', 'I', 'B'} one_hot_gene_selection = dict( (gene, i) for i, gene in enumerate(genes)) # convert above to dictionary that will have 1 hot encoding def parse_gene_fasta_into_dict(): fasta_file = open(gene_fasta_path) gene_dict = {} cur_gene = None for line in fasta_file: if '(' in line: gene = line[line.find('(') + 1:line.find(')')] gene_dict[gene] = [] cur_gene = gene else: for char in line: if char in base_positions.keys(): gene_dict[cur_gene].append(char) return gene_dict def parse_guide_linearfold_fasta_into_dict(): fasta_file = open(linearfold_fasta_path) seq_dict = {} score_dict = {} def parse_one_example(fasta: TextIO): descr_line = fasta.readline() if not descr_line: return None, None, None guide_seq = fasta.readline().strip()[36:] linearfold_and_result = fasta.readline() match = re.match('([\\.|\\(|\\)]+) \((\-?[0-9]*\.[0-9]+)\)', linearfold_and_result) linseq, score = match.groups() score = float(score) assert '>' in descr_line return guide_seq, linseq, score while True: key, seq, score = parse_one_example(fasta_file) if key is None: break seq_dict[key] = seq score_dict[key] = score fasta_file.close() return seq_dict, score_dict def parse_guide_linearfold_fasta_into_dict_contrafold(): fasta_file = open(linearfold_fasta_path_c) seq_dict = {} score_dict = {} def parse_one_example(fasta: TextIO): descr_line = fasta.readline() if not descr_line: return None, None, None guide_seq = fasta.readline().strip()[36:] linearfold_and_result = fasta.readline() match = re.match('([\\.|\\(|\\)]+) \((\-?[0-9]*\.[0-9]+)\)', linearfold_and_result) linseq, score = match.groups() score = float(score) assert '>' in descr_line return guide_seq, linseq, score while True: key, seq, score = parse_one_example(fasta_file) if key is None: break seq_dict[key] = seq score_dict[key] = score fasta_file.close() return seq_dict, score_dict def parse_target_flanks_linearfold_fasta_into_dict_contrafold(flank_len = 5): flank_num = flank_len fname = 'dataset/linfold_guides_nearby'+str(flank_num)+'_output.txt' fasta_file = open(fname) seq_dict = {} score_dict = {} def parse_one_example(fasta: TextIO): descr_line = fasta.readline() if not descr_line: return None, None, None target_seq = fasta.readline().strip() #target with flanks linearfold_and_result = fasta.readline() match = re.match('([\\.|\\(|\\)]+) \((\-?[0-9]*\.[0-9]+)\)', linearfold_and_result) linseq, score = match.groups() score = float(score) assert '>' in descr_line return target_seq, linseq, score #return target seq with flanks while True: key, seq, score = parse_one_example(fasta_file) if key is None: break seq_dict[key] = seq score_dict[key] = score fasta_file.close() return seq_dict, score_dict def parse_target_flanks_constraints_linearfold_fasta_into_dict_contrafold(flank_len = 5): flank_num = flank_len fname = 'dataset/linfold_guides_constrains_nearby'+str(flank_num)+'_output.txt' fasta_file = open(fname) seq_dict = {} score_dict = {} def parse_one_example(fasta: TextIO): descr_line = fasta.readline() if not descr_line: return None, None, None target_seq = fasta.readline().strip() #target with flanks constraints = fasta.readline() linearfold_and_result = fasta.readline() match = re.match('([\\.|\\(|\\)]+) \((\-?[0-9]*\.[0-9]+)\)', linearfold_and_result) linseq, score = match.groups() score = float(score) assert '>' in descr_line return target_seq, linseq, score #return target seq with flanks while True: key, seq, score = parse_one_example(fasta_file) #key is target seq with flanks if key is None: break seq_dict[key] = seq #linfold_seq score_dict[key] = score #linfold_score fasta_file.close() return seq_dict, score_dict def one_hot_encode_linearfold(seq, remove_universal_start=False): if remove_universal_start: # all linearfold guides have a constant 36 pair starter sequence seq = seq[36:] output_len = len(seq) encoded_seq = np.zeros((output_len, 3), dtype=np.float32) for i, fold in enumerate(seq): encoded_seq[i][linearfold_positions[fold]] = 1 return encoded_seq def one_hot_encode_linearfold_onechannel(seq, remove_universal_start=False): if remove_universal_start: # all linearfold guides have a constant 36 pair starter sequence seq = seq[36:] output_len = len(seq) encoded_seq = np.zeros((output_len, 1), dtype=np.float32) for i, fold in enumerate(seq): if fold != '.': #pair with other bases encoded_seq[i,0] = 1 return encoded_seq def one_hot_encode_sequence(seq, pad_to_len=-1): output_len = len(seq) if pad_to_len > 0: assert pad_to_len >= output_len output_len = pad_to_len encoded_seq = np.zeros((output_len, 4), dtype=np.float32) for i, base in enumerate(seq): encoded_seq[i][base_positions[base]] = 1 return encoded_seq def encoded_to_str(encoded_seq): indices = np.argmax(encoded_seq, axis=1) return ''.join([base_positions[i] for i in indices]) def complement_str(string): return ''.join([flip_dict[char] for char in string]) def complement_encoding(seq): encoded_seq = np.zeros((len(seq), 4)) for i, base in enumerate(seq): encoded_seq[i][base_positions[flip_dict[base]]] = 1 return encoded_seq def reverse_complement_encoding(seq): return np.flip(complement_encoding(seq), axis=0) def reverse_complement(encoding): return reverse_complement_encoding(encoded_to_str(encoding)) def get_gene_encodings(pad=True): gene_dict_of_strings = parse_gene_fasta_into_dict() pad_to_len = -1 # means do not pad if pad: pad_to_len = max(len(string) for string in gene_dict_of_strings.values()) encoded_genes = {} for gene in gene_dict_of_strings.keys(): encoded_genes[gene] = one_hot_encode_sequence(gene_dict_of_strings[gene], pad_to_len=pad_to_len) return encoded_genes def create_gene_splits(gene_strings, values_to_split: list, seed=113): if seed: np.random.seed(seed) non_train_genes = np.random.choice(genes, 11, replace=False) val_genes = non_train_genes[:5] test_genes = non_train_genes[5:] print('val:', val_genes) print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test def create_gene_splits_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index assert split >= 0 and split < kfold if kfold == 5: non_train_genes = genes[split * 11: (split + 1) * 11] val_genes = non_train_genes[:5] test_genes = non_train_genes[5:] elif kfold == 11: num_genes = len(genes) val_genes = genes[split * 5: (split + 1) * 5] if split != 10: test_genes = genes[((split + 1) * 5): (split + 2) * 5] else: test_genes = genes[0:5] print('val:', val_genes) print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test def create_gene_splits_filter1_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_1 = ['RPS6', 'PRPF19', 'RPL34', 'Hsp10', 'POLR2I', 'EIF5B', 'RPL31', 'RPS3A', 'CSE1L', 'XAB2', 'PSMD7', 'SUPT6H', 'EEF2', 'RPS11', 'SNRPD2', 'RPL37', 'SF3B3', 'DDX51', 'RPL7', 'RPS9', 'KARS', 'SF3A1', 'RPL32', 'PSMB2', 'RPS7', 'EIF4A3', 'U2AF1', 'PSMA1', 'PHB', 'POLR2D', 'RPSA', 'RPL23A', 'NUP93', 'AQR', 'RPA2', 'SUPT5H', 'RPL6', 'RPS13', 'SF3B2', 'RPS27A', 'PRPF31', 'COPZ1', 'RPS4X', 'PSMD1', 'RPS14', 'NUP98', 'USP39', 'CDC5L', 'RPL5', 'PHB2', 'RPS15A', 'RPS3', 'ARCN1', 'COPS6'] assert split >= 0 and split < kfold if kfold == 9: val_genes = genes_filter_1[split * 6: (split + 1) * 6] if split != 8: test_genes = genes_filter_1[((split + 1) * 6): (split + 2) * 6] else: test_genes = genes_filter_1[0:6] print('val:', val_genes) print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test def create_gene_splits_filter1_new_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_1_new = ['RPS6', 'PRPF19', 'RPL34', 'Hsp10', 'POLR2I', 'DDX51', 'RPL31', 'RPS3A', 'CSE1L', 'XAB2', 'PSMD7', 'EIF5B', 'EEF2', 'RPS11', 'SNRPD2', 'RPL37', 'SF3B3', 'SUPT6H', 'RPL7', 'RPS9', 'KARS', 'SF3A1', 'RPL32', 'PSMB2', 'RPS7', 'EIF4A3', 'U2AF1', 'PSMA1', 'PHB', 'POLR2D', 'RPSA', 'RPL23A', 'NUP93', 'AQR', 'RPA2', 'SUPT5H', 'RPL6', 'RPS13', 'SF3B2', 'RPS27A', 'PRPF31', 'COPZ1', 'RPS4X', 'PSMD1', 'RPS14', 'NUP98', 'USP39', 'COPS6', 'RPL5', 'PHB2', 'RPS15A', 'RPS3', 'ARCN1', 'CDC5L'] assert split >= 0 and split < kfold if kfold == 9: val_genes = genes_filter_1_new[split * 6: (split + 1) * 6] if split != 8: test_genes = genes_filter_1_new[((split + 1) * 6): (split + 2) * 6] else: test_genes = genes_filter_1_new[0:6] print('val:', val_genes) print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test def create_gene_splits_filter2_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_2 = ['COPZ1', 'RPS27A', 'PSMA1', 'SNRPD2', 'EIF4A3', 'RPS4X', 'ARCN1', 'POLR2I', 'SF3B3', 'RPS15A', 'RPL6', 'RPS9', 'EIF5B', 'RPA2', 'XAB2', 'NUP93', 'RPS11', 'RPL7', 'SUPT6H', 'PHB', 'Hsp10', 'U2AF1', 'RPL5', 'RPS7', 'PSMB2', 'USP39', 'AQR', 'RPS14', 'RPL23A', 'RPSA', 'SUPT5H', 'RPL32', 'NUP98', 'PRPF19', 'PSMD1', 'RPS13', 'COPS6', 'SF3A1', 'RPS3', 'KARS', 'PHB2', 'RPL31', 'DDX51', 'PSMD7', 'RPL34', 'CSE1L', 'EEF2', 'RPS3A', 'POLR2D', 'PRPF31', 'RPL37', 'SF3B2', 'RPS6'] assert split >= 0 and split < kfold if kfold == 9: if split != 8: val_genes = genes_filter_2[split * 6: (split + 1) * 6] test_genes = genes_filter_2[((split + 1) * 6): min((split + 2) * 6,53)] else: val_genes = genes_filter_2[split * 6: 53] test_genes = genes_filter_2[0:6] print('val:', val_genes) print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test def create_gene_splits_filter5_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_5 = ['RPS6', 'SF3B2', 'RPL34', 'USP39', 'PSMD7', 'RPL31', 'RPS9', 'KARS', 'NUP98', 'POLR2D', 'RPS4X', 'PRPF19', 'RPS3', 'SF3A1', 'SUPT5H', 'EEF2', 'RPS13', 'NUP93', 'PHB', 'RPL32', 'RPL7', 'RPS15A', 'AQR', 'PSMA1', 'DDX51', 'RPL5', 'RPS3A', 'CSE1L', 'PRPF31', 'POLR2I', 'RPS7', 'PSMD1', 'SNRPD2', 'XAB2', 'RPA2', 'RPSA', 'RPL23A', 'Hsp10', 'RPS27A', 'SUPT6H', 'RPL6', 'RPS11', 'U2AF1', 'SF3B3', 'EIF5B', 'PHB2', 'EIF4A3', 'RPS14', 'RPL37', 'ARCN1'] assert split >= 0 and split < kfold if kfold == 10: val_genes = genes_filter_5[split * 5: (split + 1) * 5] if split != 9: test_genes = genes_filter_5[((split + 1) * 5): (split + 2) * 5] else: test_genes = genes_filter_5[0:5] print('val:', val_genes) print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test def create_gene_splits_no_test_kfold(gene_strings, values_to_split: list, kfold, split): assert split >= 0 and split < kfold if kfold == 5: non_train_genes = genes[split * 11: (split + 1) * 11] val_genes = non_train_genes[:5] test_genes = non_train_genes[5:] elif kfold == 11: num_genes = len(genes) val_genes = genes[split * 5: (split + 1) * 5] # if split != 10: # test_genes = genes[((split + 1) * 5): (split + 2) * 5] # else: # test_genes = genes[0:5] print('val:', val_genes) # print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) # test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) # train_ids = list((set(range(len(gene_strings))) - set(val_ids) - set(test_ids))) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] # test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter1_no_test_kfold(gene_strings, values_to_split: list, kfold, split): genes_filter_1 = ['RPS6', 'PRPF19', 'RPL34', 'Hsp10', 'POLR2I', 'EIF5B', 'RPL31', 'RPS3A', 'CSE1L', 'XAB2', 'PSMD7', 'SUPT6H', 'EEF2', 'RPS11', 'SNRPD2', 'RPL37', 'SF3B3', 'DDX51', 'RPL7', 'RPS9', 'KARS', 'SF3A1', 'RPL32', 'PSMB2', 'RPS7', 'EIF4A3', 'U2AF1', 'PSMA1', 'PHB', 'POLR2D', 'RPSA', 'RPL23A', 'NUP93', 'AQR', 'RPA2', 'SUPT5H', 'RPL6', 'RPS13', 'SF3B2', 'RPS27A', 'PRPF31', 'COPZ1', 'RPS4X', 'PSMD1', 'RPS14', 'NUP98', 'USP39', 'CDC5L', 'RPL5', 'PHB2', 'RPS15A', 'RPS3', 'ARCN1', 'COPS6'] assert split >= 0 and split < kfold if kfold == 9: val_genes = genes_filter_1[split * 6: (split + 1) * 6] #if split != 8: # test_genes = genes_filter_1[((split + 1) * 6): (split + 2) * 6] #else: # test_genes = genes_filter_1[0:6] print('val:', val_genes) #print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter1_test_asval_kfold(gene_strings, values_to_split: list, kfold, split): genes_filter_1 = ['RPS6', 'PRPF19', 'RPL34', 'Hsp10', 'POLR2I', 'EIF5B', 'RPL31', 'RPS3A', 'CSE1L', 'XAB2', 'PSMD7', 'SUPT6H', 'EEF2', 'RPS11', 'SNRPD2', 'RPL37', 'SF3B3', 'DDX51', 'RPL7', 'RPS9', 'KARS', 'SF3A1', 'RPL32', 'PSMB2', 'RPS7', 'EIF4A3', 'U2AF1', 'PSMA1', 'PHB', 'POLR2D', 'RPSA', 'RPL23A', 'NUP93', 'AQR', 'RPA2', 'SUPT5H', 'RPL6', 'RPS13', 'SF3B2', 'RPS27A', 'PRPF31', 'COPZ1', 'RPS4X', 'PSMD1', 'RPS14', 'NUP98', 'USP39', 'CDC5L', 'RPL5', 'PHB2', 'RPS15A', 'RPS3', 'ARCN1', 'COPS6'] assert split >= 0 and split < kfold if kfold == 9: val_genes = genes_filter_1[split * 6: (split + 1) * 6] if split != 8: test_genes = genes_filter_1[((split + 1) * 6): (split + 2) * 6] else: test_genes = genes_filter_1[0:6] val_genes = val_genes + test_genes print('val:', val_genes) #print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter2_no_test_kfold(gene_strings, values_to_split: list, kfold, split): genes_filter_2 = ['COPZ1', 'RPS27A', 'PSMA1', 'SNRPD2', 'EIF4A3', 'RPS4X', 'ARCN1', 'POLR2I', 'SF3B3', 'RPS15A', 'RPL6', 'RPS9', 'EIF5B', 'RPA2', 'XAB2', 'NUP93', 'RPS11', 'RPL7', 'SUPT6H', 'PHB', 'Hsp10', 'U2AF1', 'RPL5', 'RPS7', 'PSMB2', 'USP39', 'AQR', 'RPS14', 'RPL23A', 'RPSA', 'SUPT5H', 'RPL32', 'NUP98', 'PRPF19', 'PSMD1', 'RPS13', 'COPS6', 'SF3A1', 'RPS3', 'KARS', 'PHB2', 'RPL31', 'DDX51', 'PSMD7', 'RPL34', 'CSE1L', 'EEF2', 'RPS3A', 'POLR2D', 'PRPF31', 'RPL37', 'SF3B2', 'RPS6'] assert split >= 0 and split < kfold if kfold == 9: if split != 8: val_genes = genes_filter_2[split * 6: (split + 1) * 6] #test_genes = genes_filter_2[((split + 1) * 6): min((split + 2) * 6,53)] else: val_genes = genes_filter_2[split * 6: 53] #test_genes = genes_filter_2[0:6] print('val:', val_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter2_test_asval_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_2 = ['COPZ1', 'RPS27A', 'PSMA1', 'SNRPD2', 'EIF4A3', 'RPS4X', 'ARCN1', 'POLR2I', 'SF3B3', 'RPS15A', 'RPL6', 'RPS9', 'EIF5B', 'RPA2', 'XAB2', 'NUP93', 'RPS11', 'RPL7', 'SUPT6H', 'PHB', 'Hsp10', 'U2AF1', 'RPL5', 'RPS7', 'PSMB2', 'USP39', 'AQR', 'RPS14', 'RPL23A', 'RPSA', 'SUPT5H', 'RPL32', 'NUP98', 'PRPF19', 'PSMD1', 'RPS13', 'COPS6', 'SF3A1', 'RPS3', 'KARS', 'PHB2', 'RPL31', 'DDX51', 'PSMD7', 'RPL34', 'CSE1L', 'EEF2', 'RPS3A', 'POLR2D', 'PRPF31', 'RPL37', 'SF3B2', 'RPS6'] assert split >= 0 and split < kfold if kfold == 9: if split != 8: val_genes = genes_filter_2[split * 6: (split + 1) * 6] test_genes = genes_filter_2[((split + 1) * 6): min((split + 2) * 6,53)] else: val_genes = genes_filter_2[split * 6: 53] test_genes = genes_filter_2[0:6] val_genes = val_genes + test_genes print('val:', val_genes) #print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter5_test_asval_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_5 = ['RPS6', 'SF3B2', 'RPL34', 'USP39', 'PSMD7', 'RPL31', 'RPS9', 'KARS', 'NUP98', 'POLR2D', 'RPS4X', 'PRPF19', 'RPS3', 'SF3A1', 'SUPT5H', 'EEF2', 'RPS13', 'NUP93', 'PHB', 'RPL32', 'RPL7', 'RPS15A', 'AQR', 'PSMA1', 'DDX51', 'RPL5', 'RPS3A', 'CSE1L', 'PRPF31', 'POLR2I', 'RPS7', 'PSMD1', 'SNRPD2', 'XAB2', 'RPA2', 'RPSA', 'RPL23A', 'Hsp10', 'RPS27A', 'SUPT6H', 'RPL6', 'RPS11', 'U2AF1', 'SF3B3', 'EIF5B', 'PHB2', 'EIF4A3', 'RPS14', 'RPL37', 'ARCN1'] assert split >= 0 and split < kfold if kfold == 10: val_genes = genes_filter_5[split * 5: (split + 1) * 5] if split != 9: test_genes = genes_filter_5[((split + 1) * 5): (split + 2) * 5] else: test_genes = genes_filter_5[0:5] val_genes = val_genes + test_genes print('val:', val_genes) #print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter5_new_test_asval_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_5_new = ['EIF5B', 'RPL37', 'CSE1L', 'PSMD1', 'RPS13', 'ARCN1', 'SF3A1', 'RPL34', 'RPS11', 'EEF2', 'RPA2', 'PHB', 'KARS', 'RPS3A', 'RPS4X', 'SUPT6H', 'PSMA1', 'RPS14', 'EIF4A3', 'RPL5', 'POLR2I', 'SF3B3', 'AQR', 'RPS9', 'RPL31', 'PSMD7', 'RPL32', 'Hsp10', 'PRPF19', 'RPSA', 'SUPT5H', 'XAB2', 'RPS3', 'PHB2', 'RPL6', 'PRPF31', 'USP39', 'NUP93', 'RPL23A', 'RPS7', 'DDX51', 'NUP98', 'U2AF1', 'SF3B2', 'RPL7', 'POLR2D', 'RPS27A', 'SNRPD2', 'RPS15A', 'RPS6'] assert split >= 0 and split < kfold if kfold == 10: val_genes = genes_filter_5_new[split * 5: (split + 1) * 5] if split != 9: test_genes = genes_filter_5_new[((split + 1) * 5): (split + 2) * 5] else: test_genes = genes_filter_5_new[0:5] val_genes = val_genes + test_genes print('val:', val_genes) #print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_filter6_test_asval_kfold(gene_strings, values_to_split: list, kfold, split): # use number [0, 1, 2, 3, 4] as index genes_filter_6 = ['SUPT6H', 'Hsp10', 'RPS14', 'PSMD1', 'RPL31', 'RPA2', 'NUP98', 'RPL34', 'RPS7', 'EEF2', 'ARCN1', 'SF3A1', 'RPS15A', 'PRPF19', 'PHB2', 'SUPT5H', 'PSMA1', 'RPS3', 'RPL23A', 'RPSA', 'POLR2I', 'RPS27A', 'NUP93', 'RPS13', 'RPL6', 'DDX51', 'PHB', 'SNRPD2', 'RPS9', 'RPL7', 'PSMD7', 'USP39', 'KARS', 'SF3B2', 'RPS6', 'POLR2D', 'RPL37', 'CSE1L', 'EIF4A3', 'RPS3A', 'PRPF31', 'SF3B3', 'AQR', 'RPS11', 'RPL5', 'RPL32', 'XAB2', 'U2AF1', 'RPS4X'] assert split >= 0 and split < kfold if kfold == 10: if split != 9: val_genes = genes_filter_6[split * 5: (split + 1) * 5] test_genes = genes_filter_6[((split + 1) * 5): min((split + 2) * 5,49)] else: val_genes = genes_filter_6[split * 5:] test_genes = genes_filter_6[0:5] val_genes = val_genes + test_genes print('val:', val_genes) #print('test:', test_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) #test_ids = list(chain(*[np.where(gene_strings == g)[0] for g in test_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] #test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val def create_gene_splits_no_test_nbt_val_kfold(gene_strings, values_to_split: list, kfold, split): assert split >= 0 and split < kfold if kfold == 5: non_train_genes = genes[split * 11: (split + 1) * 11] val_genes = non_train_genes[:5] test_genes = non_train_genes[5:] elif kfold == 11: num_genes = len(genes) val_genes = genes[split * 5: (split + 1) * 5]+['CD46','CD55','CD71'] print('val:', val_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] return train, val def create_gene_splits_no_test_cd_val_kfold(gene_strings, values_to_split: list, kfold, split): assert split >= 0 and split < kfold if kfold == 5: non_train_genes = genes[split * 11: (split + 1) * 11] val_genes = non_train_genes[:5] test_genes = non_train_genes[5:] elif kfold == 11: num_genes = len(genes) val_genes = genes[split * 5: (split + 1) * 5]+['CD58','CD81'] print('val:', val_genes) val_ids = list(chain(*[np.where(gene_strings == g)[0] for g in val_genes])) train_ids = list((set(range(len(gene_strings))) - set(val_ids))) train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] return train, val def create_dataset_inputs_and_outputs(input_list, outputs, classes): num_inputs = len(input_list) split_data = train_test_split(*input_list, outputs, classes, test_size=.1, stratify=classes) remaining_classes = split_data[-2] val_outputs = split_data[-3] remaining_outputs = split_data[-4] val_inputs = tuple(split_data[1:-4:2]) remaining_inputs = tuple(split_data[:-4:2]) split_data = train_test_split(*remaining_inputs, remaining_outputs, test_size=.1, stratify=remaining_classes) test_outputs = split_data[-1] train_outputs = split_data[-2] test_inputs = tuple(split_data[1:-2:2]) train_inputs = tuple(split_data[:-2:2]) return (train_inputs, train_outputs), (val_inputs, val_outputs), (test_inputs, test_outputs) def create_guide_splits_kfold(values_to_split: list, kfold, split): kf = KFold(n_splits=kfold, shuffle=True, random_state=42) ss = 0 for train_index, test_index in kf.split(values_to_split[-1]): if ss == int(split): #print("TRAIN:", train_index, "TEST:", test_index) val_ids = np.random.choice(train_index, size=len(test_index), replace=False) test_ids = test_index train_ids = list(set(train_index) - set(val_ids)) #X_train, X_test = np.array(all_cols[0])[train_index], np.array(all_cols[0])[test_index] #y_train, y_test = np.array(all_cols[1])[train_index], np.array(all_cols[1])[test_index] train = [[arr[i] for i in train_ids] for arr in values_to_split] val = [[arr[i] for i in val_ids] for arr in values_to_split] test = [[arr[i] for i in test_ids] for arr in values_to_split] return train, val, test else: ss += 1 def prep_dataset(d: tf.data.Dataset, batch_size=16): d = d.batch(batch_size).prefetch(tf.data.experimental.AUTOTUNE) return d if __name__ == '__main__': encodings = get_gene_encodings(pad=False) lens = dict([(gene, len(encoding)) for gene, encoding in encodings.items()]) print(lens) # pad right def get_nearby_encoding(guide_encoding, guide_loc, gene_encoding, num_bases_either_side=10, pad=True, rcomp=False, flag_dim=False): n = num_bases_either_side gene_len = len(gene_encoding) guide_len = len(guide_encoding) guide_index = int(np.round(guide_loc * gene_len)) if abs(guide_index - guide_loc * gene_len) > 1e-2: print("rounded %f to %d" % (guide_loc * gene_len, guide_index)) reverse_comp = reverse_complement(guide_encoding) assert np.all(reverse_comp == gene_encoding[guide_index:guide_index + guide_len]) min_index = max(guide_index - n, 0) max_index = min(guide_index + guide_len + n, gene_len) gene_out = gene_encoding[min_index:max_index] expected_len = guide_len + num_bases_either_side * 2 if pad and len(gene_out) < expected_len: padded = np.zeros((expected_len, 4)) padded[0:len(gene_out), :] = gene_out gene_out = padded if rcomp: gene_out = reverse_complement(gene_out) if flag_dim: new_out = np.zeros((gene_out.shape[0], 5)) new_out[:, :4] = gene_out new_out[num_bases_either_side:-num_bases_either_side, 4] = 1 gene_out = new_out return gene_out def get_nearby_encoding_rv(guide_encoding, guide_loc, gene_encoding, num_bases_either_side=3, left = True, right = True, pad=True): n = num_bases_either_side gene_len = len(gene_encoding) guide_len = len(guide_encoding) guide_index = int(guide_loc) #flank seq on both sides min_index = max(guide_index - n, 0) max_index = min(guide_index + guide_len + n, gene_len) expected_len = guide_len + num_bases_either_side * 2 if left == False: #only add right flanking seq from the gene min_index = guide_index expected_len = guide_len + num_bases_either_side if right == False: max_index = guide_index + guide_len expected_len = guide_len + num_bases_either_side gene_out = gene_encoding[min_index:max_index] guide_flanks_encode = reverse_complement(gene_out) if pad and (len(gene_out) < expected_len): padded = np.zeros((expected_len, 4)) if max_index == gene_len: #end of gene #padded[0:len(gene_out), :] = gene_out padded[-len(gene_out):, :] = guide_flanks_encode else: #padded[-len(gene_out):, :] = gene_out padded[0:len(gene_out), :] = guide_flanks_encode guide_flanks_encode = padded return guide_flanks_encode def normalize(a: np.ndarray): """ :param a: numpy array of size N x D, where N is number of examples, D is number of features :return: a, normalized so that all feature columns are now between 0 and 1 """ a_normed, norms = sklearn.preprocessing.normalize(a, norm='max', axis=0, return_norm=True) print("Norms:", norms) return a_normed
40.534994
131
0.618214
4,995
34,171
3.990991
0.066066
0.026887
0.043692
0.017557
0.785804
0.756208
0.735039
0.730023
0.72014
0.702884
0
0.050128
0.224723
34,171
842
132
40.583135
0.702363
0.091774
0
0.676519
0
0
0.118614
0.011083
0
0
0
0
0.034483
1
0.065681
false
0
0.01642
0.004926
0.154351
0.041051
0
0
0
null
0
0
0
0
1
1
1
1
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
5
d3488053fbbf5c41265d2de286c1455772c4345b
1,561
py
Python
extend/3Dplot.py
JiabinTan/LUNA16
d6f08b699752977ead75fddc67cfa6e54e1c296f
[ "MIT" ]
null
null
null
extend/3Dplot.py
JiabinTan/LUNA16
d6f08b699752977ead75fddc67cfa6e54e1c296f
[ "MIT" ]
null
null
null
extend/3Dplot.py
JiabinTan/LUNA16
d6f08b699752977ead75fddc67cfa6e54e1c296f
[ "MIT" ]
null
null
null
from skimage import measure from mpl_toolkits.mplot3d.art3d import Poly3DCollection import matplotlib.pyplot as plt import sys ''' 输入 image:3D数据 threshold: 阈值 数值建议在400左右调整 输出 plot ''' def plot_3d(image, threshold=-300): # Position the scan upright, # so the head of the patient would be at the top facing the camera p = image.transpose(2, 1, 0) p = p[:, :, ::-1] verts, faces, norm, val = measure.marching_cubes_lewiner(p, threshold) fig = plt.figure(figsize=(10, 10)) ax = fig.add_subplot(111, projection='3d') # Fancy indexing: `verts[faces]` to generate a collection of triangles mesh = Poly3DCollection(verts[faces], alpha=0.1) face_color = [0.5, 0.5, 1] mesh.set_facecolor(face_color) ax.add_collection3d(mesh) ax.set_xlim(0, p.shape[0]) ax.set_ylim(0, p.shape[1]) ax.set_zlim(0, p.shape[2]) plt.show() def plot_3d_k(image, threshold=-300): # Position the scan upright, # so the head of the patient would be at the top facing the camera p = image.transpose(2, 1, 0) verts, faces, norm, val = measure.marching_cubes_lewiner(p, threshold) fig = plt.figure(figsize=(10, 10)) ax = fig.add_subplot(111, projection='3d') # Fancy indexing: `verts[faces]` to generate a collection of triangles mesh = Poly3DCollection(verts[faces], alpha=0.70) face_color = [0.45, 0.45, 0.75] mesh.set_facecolor(face_color) ax.add_collection3d(mesh) ax.set_xlim(0, p.shape[0]) ax.set_ylim(0, p.shape[1]) ax.set_zlim(0, p.shape[2]) plt.show()
26.016667
74
0.672646
249
1,561
4.120482
0.337349
0.013645
0.040936
0.048733
0.79922
0.79922
0.79922
0.79922
0.79922
0.79922
0
0.058307
0.19795
1,561
59
75
26.457627
0.761182
0.205637
0
0.645161
0
0
0.003404
0
0
0
0
0
0
1
0.064516
false
0
0.129032
0
0.193548
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
d34b0c3ed7f44bacbfc0c916ca14c32bd26ff18f
18,995
py
Python
tests/test_storage.py
tsuru/varnishapi
d63a8c8c5f9c837855509fc5af59d8213c1c91d6
[ "BSD-3-Clause" ]
3
2015-05-04T03:20:09.000Z
2016-02-19T10:35:35.000Z
tests/test_storage.py
tsuru/varnishapi
d63a8c8c5f9c837855509fc5af59d8213c1c91d6
[ "BSD-3-Clause" ]
3
2015-01-02T13:18:56.000Z
2021-02-08T20:17:14.000Z
tests/test_storage.py
tsuru/varnishapi
d63a8c8c5f9c837855509fc5af59d8213c1c91d6
[ "BSD-3-Clause" ]
5
2015-01-02T13:11:45.000Z
2016-08-26T06:14:35.000Z
# Copyright 2014 varnishapi authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import unittest import freezegun import pymongo from feaas import storage class InstanceTestCase(unittest.TestCase): def test_init_with_units(self): units = [storage.Unit(id="i-0800"), storage.Unit(id="i-0801")] instance = storage.Instance(name="something", units=units) for unit in units: self.assertEqual(instance, unit.instance) def test_to_dict(self): instance = storage.Instance(name="myinstance", state="created") expected = {"name": "myinstance", "state": "created"} self.assertEqual(expected, instance.to_dict()) def test_add_unit(self): unit1 = storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800") unit2 = storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801") instance = storage.Instance() instance.add_unit(unit1) instance.add_unit(unit2) self.assertEqual([unit1, unit2], instance.units) self.assertEqual(instance, unit1.instance) self.assertEqual(instance, unit2.instance) def test_remove_unit(self): unit1 = storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800") unit2 = storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801") instance = storage.Instance() instance.add_unit(unit1) instance.add_unit(unit2) self.assertEqual([unit1, unit2], instance.units) instance.remove_unit(unit1) self.assertEqual([unit2], instance.units) class UnitTestCase(unittest.TestCase): def test_to_dict(self): instance = storage.Instance(name="myinstance") unit = storage.Unit(id="i-0800", dns_name="instance.cloud.tsuru.io", secret="abc123", state="started", instance=instance) expected = {"id": "i-0800", "dns_name": "instance.cloud.tsuru.io", "secret": "abc123", "state": "started", "instance_name": "myinstance"} self.assertEqual(expected, unit.to_dict()) class BindTestCase(unittest.TestCase): def test_to_dict(self): instance = storage.Instance(name="myinstance") bind = storage.Bind("wat.g1.cloud.tsuru.io", instance) expected = {"app_host": "wat.g1.cloud.tsuru.io", "instance_name": "myinstance", "created_at": bind.created_at, "state": bind.state} self.assertEqual(expected, bind.to_dict()) class MongoDBStorageTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.client = pymongo.MongoClient('localhost', 27017) @classmethod def tearDownClass(cls): cls.client.drop_database("feaas_test") def setUp(self): self.storage = storage.MongoDBStorage(dbname="feaas_test") def test_store_instance(self): instance = storage.Instance(name="secret") self.storage.store_instance(instance) self.addCleanup(self.client.feaas_test.instances.remove, {"name": "secret"}) instance = self.client.feaas_test.instances.find_one({"name": "secret"}) expected = {"name": "secret", "_id": instance["_id"], "state": "creating"} self.assertEqual(expected, instance) def test_store_instance_with_units(self): units = [storage.Unit(dns_name="instance.cloud.tsuru.io", id="i-0800")] instance = storage.Instance(name="secret", units=units) self.storage.store_instance(instance) self.addCleanup(self.client.feaas_test.instances.remove, {"name": "secret"}) self.addCleanup(self.client.feaas_test.units.remove, {"instance_name": "secret"}) instance = self.client.feaas_test.instances.find_one({"name": "secret"}) expected = {"name": "secret", "_id": instance["_id"], "state": "creating"} self.assertEqual(expected, instance) unit = self.client.feaas_test.units.find_one({"id": "i-0800", "instance_name": "secret"}) expected = units[0].to_dict() expected["_id"] = unit["_id"] self.assertEqual(expected, unit) def test_store_instance_update_with_units(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802")] instance = storage.Instance(name="secret", units=units) self.storage.store_instance(instance) self.addCleanup(self.client.feaas_test.instances.remove, {"name": "secret"}) self.addCleanup(self.client.feaas_test.units.remove, {"instance_name": "secret"}) self.assert_units(units, "secret") new_units = units[1:] instance.units = new_units self.storage.store_instance(instance) self.assert_units(new_units, "secret") def test_store_instance_update_without_units(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802")] instance = storage.Instance(name="secret", units=units) self.storage.store_instance(instance) self.addCleanup(self.client.feaas_test.instances.remove, {"name": "secret"}) self.addCleanup(self.client.feaas_test.units.remove, {"instance_name": "secret"}) instance.units = [] instance.state = "started" self.storage.store_instance(instance, save_units=False) self.assert_units(units, instance.name) got_instance = self.storage.retrieve_instance(name=instance.name) self.assertEqual("started", got_instance.state) def test_retrieve_instance(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802")] instance = storage.Instance(name="what", units=units) self.storage.store_instance(instance) self.addCleanup(self.client.feaas_test.instances.remove, {"name": instance.name}) self.addCleanup(self.client.feaas_test.units.remove, {"instance_name": instance.name}) got_instance = self.storage.retrieve_instance(name="what") self.assertEqual([u.to_dict() for u in units], [u.to_dict() for u in got_instance.units]) self.assertEqual(instance.to_dict(), got_instance.to_dict()) def test_retrieve_instance_check_liveness(self): instance = storage.Instance(name="what", state="removed") self.storage.store_instance(instance) self.addCleanup(self.client.feaas_test.instances.remove, {"name": instance.name}) with self.assertRaises(storage.InstanceNotFoundError): self.storage.retrieve_instance(name="what", check_liveness=True) def test_retrieve_instance_not_found(self): with self.assertRaises(storage.InstanceNotFoundError): self.storage.retrieve_instance(name="secret") def test_retrieve_instance_by_state(self): instance1 = storage.Instance(name="where", state="creating") self.storage.store_instance(instance1) self.addCleanup(self.client.feaas_test.instances.remove, {"name": instance1.name}) instance2 = storage.Instance(name="when", state="creating") self.storage.store_instance(instance2) self.addCleanup(self.client.feaas_test.instances.remove, {"name": instance2.name}) instance3 = storage.Instance(name="who", state="starting") self.storage.store_instance(instance3) self.addCleanup(self.client.feaas_test.instances.remove, {"name": instance3.name}) instance = self.storage.retrieve_instance(state="creating") self.assertEqual(instance1.name, instance.name) self.assertEqual(instance1.state, instance.state) def test_remove_instance(self): instance = storage.Instance(name="years") self.storage.store_instance(instance) self.storage.remove_instance(instance.name) self.assertIsNone(self.client.feaas_test.instances.find_one({"name": instance.name})) def test_remove_instance_with_units(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802")] instance = storage.Instance(name="secret", units=units) self.storage.store_instance(instance) self.storage.remove_instance(instance.name) self.assertIsNone(self.client.feaas_test.units.find_one({"instance_name": instance.name})) def test_remove_instance_with_binds(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802")] instance = storage.Instance(name="secret", units=units) self.storage.store_instance(instance) bind = storage.Bind("myapp.cloud.tsuru.io", instance) self.storage.store_bind(bind) self.storage.remove_instance(instance.name) self.assertIsNone(self.client.feaas_test.binds.find_one({"instance_name": instance.name})) def test_store_scale_job(self): job = {"instance": "myapp", "quantity": 2, "state": "done"} self.storage.store_scale_job(job) self.addCleanup(self.client.feaas_test.scale_jobs.remove, {"instance": "myapp"}) got_job = self.client.feaas_test.scale_jobs.find_one() self.assertEqual(job, got_job) def test_store_scale_job_no_state(self): job = {"instance": "myapp", "quantity": 2} self.storage.store_scale_job(job) self.addCleanup(self.client.feaas_test.scale_jobs.remove, {"instance": "myapp"}) self.assertEqual("pending", job["state"]) got_job = self.client.feaas_test.scale_jobs.find_one() self.assertEqual(job, got_job) def test_get_scale_job(self): job1 = {"instance": "myapp", "quantity": 2} self.storage.store_scale_job(job1) job2 = {"instance": "myapp", "quantity": 3} self.storage.store_scale_job(job2) self.addCleanup(self.client.feaas_test.scale_jobs.remove, {"instance": "myapp"}) got_job = self.storage.get_scale_job() expected_job = self.client.feaas_test.scale_jobs.find_one() self.assertEqual(expected_job, got_job) self.assertEqual("processing", got_job["state"]) def test_get_scale_job_not_found(self): job = self.storage.get_scale_job() self.assertIsNone(job) def test_get_scale_job_no_pending_job(self): job1 = {"instance": "myapp", "quantity": 2, "state": "processing"} self.storage.store_scale_job(job1) job2 = {"instance": "myapp", "quantity": 2, "state": "done"} self.storage.store_scale_job(job2) self.addCleanup(self.client.feaas_test.scale_jobs.remove, {"instance": "myapp"}) job = self.storage.get_scale_job() self.assertIsNone(job) def test_reset_scale_job(self): job = {"instance": "myapp", "quantity": 2, "state": "processing"} self.storage.store_scale_job(job) self.addCleanup(self.client.feaas_test.scale_jobs.remove, {"instance": "myapp"}) self.storage.reset_scale_job(job) self.assertEqual("pending", job["state"]) persisted_job = self.client.feaas_test.scale_jobs.find_one() self.assertEqual(job, persisted_job) def test_reset_scale_job_no_id(self): job = {"instance": "myapp", "quantity": 2, "state": "processing"} with self.assertRaises(ValueError) as cm: self.storage.reset_scale_job(job) exc = cm.exception self.assertEqual(("job is not persisted",), exc.args) def test_finish_scale_job(self): job = {"instance": "myapp", "quantity": 2, "state": "processing"} self.storage.store_scale_job(job) self.addCleanup(self.client.feaas_test.scale_jobs.remove, {"instance": "myapp"}) self.storage.finish_scale_job(job) self.assertEqual("done", job["state"]) persisted_job = self.client.feaas_test.scale_jobs.find_one() self.assertEqual(job, persisted_job) def test_finish_scale_job_no_id(self): job = {"instance": "myapp", "quantity": 2, "state": "processing"} with self.assertRaises(ValueError) as cm: self.storage.finish_scale_job(job) exc = cm.exception self.assertEqual(("job is not persisted",), exc.args) @freezegun.freeze_time("2014-02-16 12:00:01") def test_store_bind(self): instance = storage.Instance(name="years") bind = storage.Bind(app_host="something.where.com", instance=instance) self.storage.store_bind(bind) self.addCleanup(self.client.feaas_test.binds.remove, {"instance_name": "years"}) got = self.client.feaas_test.binds.find_one({"instance_name": "years"}) expected = bind.to_dict() expected["_id"] = got["_id"] expected["created_at"] = got["created_at"] self.assertEqual(expected, got) @freezegun.freeze_time("2014-02-16 12:00:01") def test_retrieve_binds(self): instance = storage.Instance(name="years") bind1 = storage.Bind(app_host="something.where.com", instance=instance) self.storage.store_bind(bind1) bind2 = storage.Bind(app_host="belong.where.com", instance=instance) self.storage.store_bind(bind2) self.addCleanup(self.client.feaas_test.binds.remove, {"instance_name": "years"}) binds = self.storage.retrieve_binds(instance_name="years") binds = [b.to_dict() for b in binds] self.assertEqual([bind1.to_dict(), bind2.to_dict()], binds) @freezegun.freeze_time("2014-02-16 12:00:01") def test_retrieve_binds_limit(self): instance = storage.Instance(name="years") bind1 = storage.Bind(app_host="something.where.com", instance=instance) self.storage.store_bind(bind1) bind2 = storage.Bind(app_host="belong.where.com", instance=instance) self.storage.store_bind(bind2) self.addCleanup(self.client.feaas_test.binds.remove, {"instance_name": "years"}) binds = self.storage.retrieve_binds(instance_name="years", limit=1) binds = [b.to_dict() for b in binds] self.assertEqual([bind1.to_dict()], binds) @freezegun.freeze_time("2014-02-16 12:00:01") def test_retrieve_binds_query(self): instance = storage.Instance(name="years") bind1 = storage.Bind(app_host="something.where.com", instance=instance) self.storage.store_bind(bind1) bind2 = storage.Bind(app_host="belong.where.com", instance=instance) self.storage.store_bind(bind2) self.addCleanup(self.client.feaas_test.binds.remove, {"instance_name": "years"}) binds = self.storage.retrieve_binds(app_host="belong.where.com") binds = [b.to_dict() for b in binds] self.assertEqual([bind2.to_dict()], binds) def test_remove_bind(self): instance = storage.Instance(name="years") bind = storage.Bind(app_host="something.where.com", instance=instance) self.storage.store_bind(bind) self.addCleanup(self.client.feaas_test.binds.remove, {"instance_name": "years"}) self.storage.remove_bind(bind) self.assertEqual([], self.storage.retrieve_binds(instance_name="years")) def test_retrieve_units(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802", state="started")] instance = storage.Instance(name="great", units=units) self.storage.store_instance(instance) self.addCleanup(self.storage.remove_instance, instance.name) got_units = self.storage.retrieve_units(state="creating") self.assertEqual([u.to_dict() for u in units[:2]], [u.to_dict() for u in got_units]) def test_retrieve_units_limited(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802", state="started")] instance = storage.Instance(name="great", units=units) self.storage.store_instance(instance) self.addCleanup(self.storage.remove_instance, instance.name) got_units = self.storage.retrieve_units(state="creating", limit=1) self.assertEqual([u.to_dict() for u in units[:1]], [u.to_dict() for u in got_units]) def test_update_units(self): units = [storage.Unit(dns_name="instance1.cloud.tsuru.io", id="i-0800"), storage.Unit(dns_name="instance2.cloud.tsuru.io", id="i-0801"), storage.Unit(dns_name="instance3.cloud.tsuru.io", id="i-0802", state="started")] instance = storage.Instance(name="great", units=units) self.storage.store_instance(instance) self.addCleanup(self.storage.remove_instance, instance.name) units[0].state = "started" units[1].state = "started" self.storage.update_units(units, state="started") got_units = self.storage.retrieve_units(state="started") self.assertEqual([u.to_dict() for u in units], [u.to_dict() for u in got_units]) def test_update_bind(self): instance = storage.Instance(name="great") bind = storage.Bind("wat.g1.cloud.tsuru.io", instance) self.storage.store_bind(bind) self.addCleanup(self.storage.remove_bind, bind) self.storage.update_bind(bind, state="created") bind = self.storage.retrieve_binds(instance_name="great")[0] self.assertEqual("created", bind.state) def assert_units(self, expected_units, instance_name): cursor = self.client.feaas_test.units.find({"instance_name": instance_name}) units = [] expected = [u.to_dict() for u in expected_units] for i, unit in enumerate(cursor): expected[i]["_id"] = unit["_id"] units.append(unit) self.assertEqual(expected, units)
48.956186
98
0.653067
2,336
18,995
5.139555
0.072346
0.065967
0.046227
0.058554
0.80693
0.765617
0.72064
0.705897
0.695902
0.647426
0
0.020446
0.206949
18,995
387
99
49.082687
0.776553
0.008055
0
0.538922
0
0
0.140726
0.04268
0
0
0
0
0.152695
1
0.116766
false
0
0.011976
0
0.140719
0
0
0
0
null
0
0
0
1
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
5
d37984515653bed94632572aeac9fcd45fc326bc
178
py
Python
hosts/admin.py
SarahLN/pentestTracker
33d0ad7f3e6464e3c105ac151ed1c9bb249d0e42
[ "MIT" ]
null
null
null
hosts/admin.py
SarahLN/pentestTracker
33d0ad7f3e6464e3c105ac151ed1c9bb249d0e42
[ "MIT" ]
null
null
null
hosts/admin.py
SarahLN/pentestTracker
33d0ad7f3e6464e3c105ac151ed1c9bb249d0e42
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Attribute) admin.site.register(Host) admin.site.register(AttributeType)
19.777778
34
0.803371
24
178
5.958333
0.541667
0.188811
0.356643
0
0
0
0
0
0
0
0
0
0.101124
178
9
34
19.777778
0.89375
0.146067
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6c907fd3cdf9be1c175cf6040b90f709b910c2ac
897
py
Python
auth/libraries/pip-auth/authlib/test/base.py
FinnStutzenstein/openslides-auth-service
edfb247a2398ae69dd5c0ff44e7cdf692b7c1b80
[ "MIT" ]
2
2020-02-29T17:45:50.000Z
2021-03-12T14:20:47.000Z
auth/libraries/pip-auth/authlib/test/base.py
FinnStutzenstein/openslides-auth-service
edfb247a2398ae69dd5c0ff44e7cdf692b7c1b80
[ "MIT" ]
71
2020-04-08T11:08:10.000Z
2022-01-31T12:48:46.000Z
auth/libraries/pip-auth/authlib/test/base.py
FinnStutzenstein/openslides-auth-service
edfb247a2398ae69dd5c0ff44e7cdf692b7c1b80
[ "MIT" ]
5
2020-02-04T10:30:03.000Z
2021-07-29T05:46:10.000Z
import unittest import jwt from ..auth_handler import AuthHandler from .fake_request import FakeRequest from ..constants import USER_ID_PROPERTY from datetime import datetime class BaseTestEnvironment(unittest.TestCase): auth_handler = AuthHandler() fake_request = FakeRequest() def get_invalid_access_token(self): return "bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzSW4iOiIxMG0iLCJzZXNzaW9uSWQiOiI2NjUzYWMwNmJhNjVkYmQzNDE5NTQwOGQ1MDI5NjU1ZSIsInVzZXJJZCI6MSwaWF0IjoxNTk3MTQ5NDI0LCJleHAiOjE1OTcxNTAwMjR9.z21-bSIj_xZAoCbwXTqqf_ODAIEbbeSehYIE33dmYUs" # noqa def get_malified_access_token(self): return "bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzSW4iOiIxMG0iLCJzZXNzaW9uSWQiOiI2NjUzYWMwNmJhNjVkYmQzNDE5NTQwOGQ1MDI5NjU1ZSIsInVzZXJJZCI6MSwiaWF0IxoxNTk3MTQ5NDI0LCJleHAiOjE1OTcxNTAwMjR9.z21-bSIj_xZAoCbwXTqqf_ODAIEbbeSehYIE33dmYUs" # noqa
44.85
261
0.871795
64
897
11.96875
0.546875
0.028721
0.039164
0.05483
0.279373
0.164491
0
0
0
0
0
0.056442
0.091416
897
19
262
47.210526
0.883436
0.010033
0
0
0
0
0.532203
0.516384
0
0
0
0
0
1
0.153846
false
0
0.461538
0.153846
1
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
9f08eb65b1496b3d5e039a3dec6865678b10b9bc
122
py
Python
iotportal/iotview/admin.py
zserg/iotportal
02bbf1b6478fea18d11745e4e2e2b28a01e1a6d5
[ "MIT" ]
null
null
null
iotportal/iotview/admin.py
zserg/iotportal
02bbf1b6478fea18d11745e4e2e2b28a01e1a6d5
[ "MIT" ]
null
null
null
iotportal/iotview/admin.py
zserg/iotportal
02bbf1b6478fea18d11745e4e2e2b28a01e1a6d5
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import IotView, API admin.site.register(IotView) admin.site.register(API)
17.428571
32
0.803279
18
122
5.444444
0.555556
0.183673
0.346939
0
0
0
0
0
0
0
0
0
0.106557
122
6
33
20.333333
0.899083
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
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
1
0
0
0
0
5
9f3fb779101e0c3771467ae1a1d6d3c24ef3e6fc
64
py
Python
ffdl/hello.py
dolph/object-detection-anki-overdrive-cars
f2c2e5cc3bba2aa409e31437d0f73e7e3101c562
[ "Apache-2.0" ]
5
2018-11-30T19:10:25.000Z
2021-01-11T08:32:29.000Z
ffdl/hello.py
thomassuedbroecker/object-detection-anki-overdrive-cars
1494d8ce8ec24257e8e14eb64afb3a42e806ed6c
[ "Apache-2.0" ]
null
null
null
ffdl/hello.py
thomassuedbroecker/object-detection-anki-overdrive-cars
1494d8ce8ec24257e8e14eb64afb3a42e806ed6c
[ "Apache-2.0" ]
7
2018-10-09T14:16:54.000Z
2020-06-29T14:18:39.000Z
# import os,sys print("successful execution of a custom image")
16
47
0.765625
10
64
4.9
1
0
0
0
0
0
0
0
0
0
0
0
0.140625
64
4
47
16
0.890909
0
0
0
0
0
0.59375
0
0
0
0
0
0
1
0
true
0
0.5
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
0
1
0
1
0
0
1
0
5
9f60b4be6e83ed9e7867fd5e02e27fdebe8c7285
108
py
Python
python/testData/inspections/PyStringFormatInspection/EscapedString.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyStringFormatInspection/EscapedString.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyStringFormatInspection/EscapedString.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
u"{key}".format(key=1) <warning descr="Key 'k' has no corresponding argument">u"{k}"</warning>.format(key=1)
54
85
0.694444
19
108
3.947368
0.578947
0.24
0.266667
0
0
0
0
0
0
0
0
0.019802
0.064815
108
2
85
54
0.722772
0
0
0
0
0
0.412844
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
5
9f6e88000b7c24923c07fbcef186b581dc34695b
55
py
Python
AtC_Beg_Con_071-080/ABC080/A.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Beg_Con_071-080/ABC080/A.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Beg_Con_071-080/ABC080/A.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
n, a, b = map(int, input().split()) print(min(n * a,b))
27.5
35
0.545455
12
55
2.5
0.75
0.133333
0.2
0
0
0
0
0
0
0
0
0
0.145455
55
2
36
27.5
0.638298
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
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
9f99375e36a874444daf07ba5300bcd3f1fbad64
438
py
Python
website/views.py
H0R4T1U/Nebula
d58c107d0ac71471d7bc2b0fbf7754e6dcaae1e4
[ "MIT" ]
2
2021-09-13T20:43:38.000Z
2021-09-14T18:31:45.000Z
website/views.py
H0R4T1U/website
d58c107d0ac71471d7bc2b0fbf7754e6dcaae1e4
[ "MIT" ]
null
null
null
website/views.py
H0R4T1U/website
d58c107d0ac71471d7bc2b0fbf7754e6dcaae1e4
[ "MIT" ]
null
null
null
from django.shortcuts import render def error_400(request, exception): return render(request,'error/400.html', status=400) def error_403(request, exception): return render(request,'error/403.html', status=403) def error_404(request, exception): return render(request,'error/404.html', status=404) def error_500(request, *args, **kwargs): return render(request,'error/500.html', status=500)
25.764706
59
0.694064
58
438
5.172414
0.310345
0.106667
0.253333
0.32
0.4
0.4
0
0
0
0
0
0.099723
0.175799
438
16
60
27.375
0.731302
0
0
0
0
0
0.128146
0
0
0
0
0
0
1
0.444444
false
0
0.111111
0.444444
1
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
1
0
0
5
9fa037c006c73a3c26b43033dfc3c6e86017cfa8
75
py
Python
resource/util.py
TintypeMolly/Yuzuki
94dc874c4000ac918f0b52846927311b3f25ce2c
[ "MIT" ]
6
2015-01-09T06:32:15.000Z
2015-08-15T13:23:34.000Z
resource/util.py
TintypeMolly/Yuzuki
94dc874c4000ac918f0b52846927311b3f25ce2c
[ "MIT" ]
73
2015-01-08T11:38:34.000Z
2015-09-10T09:55:08.000Z
resource/util.py
TintypeMolly/Yuzuki
94dc874c4000ac918f0b52846927311b3f25ce2c
[ "MIT" ]
11
2015-01-09T06:26:12.000Z
2015-03-26T13:16:19.000Z
# -*- coding: utf-8 -*- from helper.resource import YuzukiResource # noqa
25
50
0.693333
9
75
5.777778
1
0
0
0
0
0
0
0
0
0
0
0.015873
0.16
75
2
51
37.5
0.809524
0.346667
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
1
0
0
5
9fa2d95062e24d1bf7b364f90f945908f2e014eb
150
py
Python
modules/wakachi/mecab.py
0-jam/markovify_my_tweets
885dc7cf4d6ee583548caf496752d26d82796bdb
[ "Apache-2.0" ]
null
null
null
modules/wakachi/mecab.py
0-jam/markovify_my_tweets
885dc7cf4d6ee583548caf496752d26d82796bdb
[ "Apache-2.0" ]
1
2019-12-05T06:08:35.000Z
2019-12-05T06:08:35.000Z
modules/wakachi/mecab.py
0-jam/regen_my_sentences
885dc7cf4d6ee583548caf496752d26d82796bdb
[ "Apache-2.0" ]
null
null
null
import MeCab m = MeCab.Tagger('-Owakati') # Split sentence by word def divide_word(sentence): return m.parse(sentence).strip().split()
16.666667
45
0.673333
20
150
5
0.7
0
0
0
0
0
0
0
0
0
0
0
0.193333
150
8
46
18.75
0.826446
0.146667
0
0
0
0
0.067797
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
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
1
1
0
0
5
4c9468b96939fcba835086670ae19ea03878315c
135
py
Python
examples/usage/simple_injectable/factories.py
pauleveritt/wired_injector
0358ed70572b4add8349d9dbde89269046d3a60d
[ "MIT" ]
1
2021-01-08T23:56:57.000Z
2021-01-08T23:56:57.000Z
examples/usage/simple_injectable/factories.py
pauleveritt/wired_injector
0358ed70572b4add8349d9dbde89269046d3a60d
[ "MIT" ]
null
null
null
examples/usage/simple_injectable/factories.py
pauleveritt/wired_injector
0358ed70572b4add8349d9dbde89269046d3a60d
[ "MIT" ]
null
null
null
from dataclasses import dataclass from wired_injector import injectable @injectable() @dataclass class View: name: str = 'View'
13.5
37
0.762963
16
135
6.375
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.17037
135
9
38
15
0.910714
0
0
0
0
0
0.02963
0
0
0
0
0
0
1
0
true
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
1
0
1
0
1
0
0
5
4ce2ebacb1fd58bfa29294f3e9286426605104c6
1,446
py
Python
sequence_models/HMM/forward_backward.py
Elixeus/NLP
ba4fc5ce1c12b72ee39d0d1cc9fa415198ee0791
[ "MIT" ]
null
null
null
sequence_models/HMM/forward_backward.py
Elixeus/NLP
ba4fc5ce1c12b72ee39d0d1cc9fa415198ee0791
[ "MIT" ]
null
null
null
sequence_models/HMM/forward_backward.py
Elixeus/NLP
ba4fc5ce1c12b72ee39d0d1cc9fa415198ee0791
[ "MIT" ]
null
null
null
import numpy as np def forward_backward(): """Hidden Markov models need to solve 3 fundamental problems: 1. For a given HMM model M and an observation sequence O, what is the likelihood of P(O|M); 2. For a given HMM model M and an observation sequence O, what is the best hidden state sequence Q(think of O as words, and Q as syntactic categories); 3. For an observation sequence O, and the set of hidden states, learn the HMM parameters A and B; the forward_backward algorithm (aka Baum-Welch algorithm) gives an answer to the 3rd question: how to learn the parameters A and B of the model lambda given the observation sequence O and the set of hidden states. The forward_backward algorithm is a special case of the Expectation Maximization algorithm. It's an iterative algorithm. It starts with an estimate of the transitional probability matrix A and an emission probability matrix B, and derive better probability with the initial estimates going through iterations. There are 2 intuitions behind the forward_backward algorithm: 1. iteratively estimate the counts; 2. compute the forward probability for an observation for the estimated probabilities, and divide the probability mass among all paths that contributed to this forward probability. Backward probability beta: the probability of seeing the observations from time t+1 to the end, given state i at time t and model lambda Beta_t_i = P(O_t+1, O_t+2...Ot|q_t =i, lambda)"""
90.375
523
0.795297
249
1,446
4.582329
0.421687
0.052585
0.070114
0.057844
0.166521
0.166521
0.166521
0.166521
0.166521
0.091148
0
0.009114
0.165284
1,446
15
524
96.4
0.936205
0.961272
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0
0.5
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
1
1
0
1
0
1
0
0
5
e21bcb824d2b3689530830542795280fee83cbaa
74
py
Python
workspace/module/python-2.7/LxApp/appObjects/__init__.py
no7hings/Lynxi
43c745198a714c2e5aca86c6d7a014adeeb9abf7
[ "MIT" ]
2
2018-03-06T03:33:55.000Z
2019-03-26T03:25:11.000Z
workspace/module/python-2.7/LxApp/appObjects/__init__.py
no7hings/lynxi
43c745198a714c2e5aca86c6d7a014adeeb9abf7
[ "MIT" ]
null
null
null
workspace/module/python-2.7/LxApp/appObjects/__init__.py
no7hings/lynxi
43c745198a714c2e5aca86c6d7a014adeeb9abf7
[ "MIT" ]
null
null
null
# coding:utf-8 from ._appObjToolkit import * from ._appObjCache import *
14.8
29
0.756757
9
74
6
0.777778
0
0
0
0
0
0
0
0
0
0
0.015873
0.148649
74
4
30
18.5
0.84127
0.162162
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
1
0
0
5
e2247e49a7bbac53b38c11d6029771b508440423
1,030
py
Python
jparse/json_actions.py
aedwardg/json-parser
264f62a59ca96505957bc6b4937cec07f5eb9d30
[ "MIT" ]
null
null
null
jparse/json_actions.py
aedwardg/json-parser
264f62a59ca96505957bc6b4937cec07f5eb9d30
[ "MIT" ]
null
null
null
jparse/json_actions.py
aedwardg/json-parser
264f62a59ca96505957bc6b4937cec07f5eb9d30
[ "MIT" ]
null
null
null
from parglare import get_collector from parglare.actions import pass_inner action = get_collector() # Non-terminal rule actions @action("Array") def array_action(context, nodes): return pass_inner(context, nodes) @action("Object") def object_action(context, nodes): # Objects look like this before action: # ['{', [['key', ':', 'value'], ['key', ':', 'value'], ...], '}'] if len(nodes) > 2: members = nodes[1:-1][0] return {member[0]: member[2] for member in members} else: return {} @action("String") def string_action(context, nodes): str = pass_inner(context, nodes) return str if str else "" # Terminal Rule actions @action("INT") def int_action(context, value): return int(value) @action("FLOAT") def float_action(context, value): return float(value) @action("NULL") def null_action(context, value): return None @action("TRUE") def true_action(context, value): return True @action("FALSE") def false_action(context, value): return False
19.433962
69
0.659223
134
1,030
4.970149
0.320896
0.156156
0.135135
0.18018
0
0
0
0
0
0
0
0.007194
0.190291
1,030
52
70
19.807692
0.791367
0.14466
0
0
0
0
0.043379
0
0
0
0
0
0
1
0.25
false
0.09375
0.0625
0.1875
0.59375
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
e24dc05437f42fe2fc24f9eca2ee2e3e456028b5
272
py
Python
RepositoryWalkers/RepositoryWalker.py
Christian-Nunnally/git-chains
cd83f3620424bc96b3ef06d2971c4e65d5ce1ba5
[ "MIT" ]
null
null
null
RepositoryWalkers/RepositoryWalker.py
Christian-Nunnally/git-chains
cd83f3620424bc96b3ef06d2971c4e65d5ce1ba5
[ "MIT" ]
null
null
null
RepositoryWalkers/RepositoryWalker.py
Christian-Nunnally/git-chains
cd83f3620424bc96b3ef06d2971c4e65d5ce1ba5
[ "MIT" ]
null
null
null
from pygit2 import GIT_SORT_TOPOLOGICAL class RepositoryWalker: def __init__(self, repository): self.repository = repository def walk(self, branch): for commit in self.repository.walk(branch.target, GIT_SORT_TOPOLOGICAL): yield commit
30.222222
80
0.716912
32
272
5.84375
0.59375
0.224599
0.192513
0
0
0
0
0
0
0
0
0.004695
0.216912
272
9
81
30.222222
0.873239
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
0
0
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
1
0
0
0
0
1
0
0
5
e29f0839b7ddc3b6d1402aaadbe74064d0d5b2ef
161
py
Python
openfl/__init__.py
sarthakpati/openfl
8edebfd565d94f709a7d7f06d9ee38a7975c066e
[ "Apache-2.0" ]
297
2021-01-13T08:49:35.000Z
2022-03-31T15:06:43.000Z
openfl/__init__.py
sarthakpati/openfl
8edebfd565d94f709a7d7f06d9ee38a7975c066e
[ "Apache-2.0" ]
265
2021-02-02T09:57:33.000Z
2022-03-30T22:51:55.000Z
openfl/__init__.py
sarthakpati/openfl
8edebfd565d94f709a7d7f06d9ee38a7975c066e
[ "Apache-2.0" ]
81
2021-01-18T07:52:36.000Z
2022-03-26T18:55:54.000Z
# Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 """openfl base package.""" # flake8: noqa from .__version__ import __version__
26.833333
43
0.757764
21
161
5.428571
0.952381
0
0
0
0
0
0
0
0
0
0
0.077465
0.118012
161
5
44
32.2
0.725352
0.695652
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
1
0
0
5
2c34cc4592c13b6180c0944222f534e7de5a3f54
15,328
py
Python
test/unit/mongo_rep_admin/run_program.py
mjpernot/mongo-rep-admin
5019325eb9e91cf3fcad6744ebd1681401695f81
[ "MIT" ]
null
null
null
test/unit/mongo_rep_admin/run_program.py
mjpernot/mongo-rep-admin
5019325eb9e91cf3fcad6744ebd1681401695f81
[ "MIT" ]
null
null
null
test/unit/mongo_rep_admin/run_program.py
mjpernot/mongo-rep-admin
5019325eb9e91cf3fcad6744ebd1681401695f81
[ "MIT" ]
null
null
null
#!/usr/bin/python # Classification (U) """Program: run_program.py Description: Unit testing of run_program in mongo_rep_admin.py. Usage: test/unit/mongo_rep_admin/run_program.py Arguments: """ # Libraries and Global Variables # Standard import sys import os if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest # Third-party import mock # Local sys.path.append(os.getcwd()) import mongo_rep_admin import lib.gen_libs as gen_libs import version __version__ = version.__version__ def fetch_priority(repset, args_array, **kwargs): """Function: fetch_priority Description: Stub holder for mongo_rep_admin.fetch_priority function. Arguments: (input) repset -> Replication set instance. (input) args_array -> Array of command line options and values. """ err_msg = "Error Message" mail = kwargs.get("mail", None) status = (False, err_msg) if args_array and repset and mail: status = (False, err_msg) return status def prt_rep_stat(repset, args_array, **kwargs): """Function: prt_rep_stat Description: Stub holder for mongo_rep_admin.prt_rep_stat function. Arguments: (input) repset -> Replication set instance. (input) args_array -> Array of command line options and values. """ mail = kwargs.get("mail", None) status = (True, None) if args_array and repset and mail: status = (True, None) return status class Coll(object): """Class: Coll Description: Class stub holder for mongo_class.Coll class. Methods: __init__ connect coll_cnt coll_find1 """ def __init__(self): """Method: __init__ Description: Class initialization. Arguments: """ self.count = 1 self.conn = True self.errmsg = None def connect(self): """Method: connect Description: Stub holder for mongo_class.Coll.connect method. Arguments: """ return self.conn, self.errmsg def coll_cnt(self): """Method: coll_cnt Description: Stub holder for mongo_class.Coll.coll_cnt method. Arguments: """ return self.count def coll_find1(self): """Method: coll_find1 Description: Stub holder for mongo_class.Coll.coll_find1 method. Arguments: """ return {"_id": "RepSetName"} class RepSet(object): """Class: RepSet Description: Class stub holder for mongo_class.RepSet class. Methods: __init__ connect """ def __init__(self): """Method: __init__ Description: Class initialization. Arguments: """ self.name = "name" self.user = "user" self.japd = None self.host = "host" self.port = 27017 self.auth = "auth" self.conf_file = "conffile" self.auth_db = "authentication_db" self.use_arg = True self.use_uri = False self.conn = True self.errmsg = None def connect(self): """Method: connect Description: Stub holder for mongo_class.RepSet.connect method. Arguments: """ return self.conn, self.errmsg class CfgTest(object): """Class: CfgTest Description: Class which is a representation of a cfg module. Methods: __init__ """ def __init__(self): """Method: __init__ Description: Initialization instance of the CfgTest class. Arguments: """ self.name = "name" self.user = "user" self.japd = None self.host = "host" self.port = 27017 self.auth = "auth" self.conf_file = "conffile" self.repset = "repsetname" self.repset_hosts = "localhost:27017,localhost:27016" self.auth_db = "authentication_db" self.use_arg = True self.use_uri = False class CfgTest2(object): """Class: CfgTest Description: Class which is a representation of a cfg module. Methods: __init__ """ def __init__(self): """Method: __init__ Description: Initialization instance of the CfgTest class. Arguments: """ self.name = "name" self.user = "user" self.japd = None self.host = "host" self.port = 27017 self.auth = "auth" self.conf_file = "conffile" self.repset = "repsetname" self.repset_hosts = "localhost:27017,localhost:27016" self.auth_db = "authentication_db" self.use_arg = True self.use_uri = False self.auth_mech = "SCRAM-SHA-1" class UnitTest(unittest.TestCase): """Class: UnitTest Description: Class which is a representation of a unit testing. Methods: setUp test_func_no_error test_func_error test_auth_mech test_no_auth_mech test_failed_conn_repset test_successful_conn_repset test_failed_conn_coll test_successful_conn_coll test_repset_not_set test_email test_replication test_no_replication """ def setUp(self): """Function: setUp Description: Initialization for unit testing. Arguments: """ self.server = CfgTest() self.server2 = CfgTest() self.server2.repset = None self.server3 = CfgTest2() self.repset = RepSet() self.coll = Coll() self.err_msg = "Error Message" self.args_array = {"-T": True, "-c": "config", "-d": "dirpath"} self.args_array2 = {"-T": True, "-c": "config", "-d": "dirpath", "-e": "Email_Address"} self.args_array3 = {"-P": True, "-c": "config", "-d": "dirpath"} self.func_dict = {"-P": fetch_priority, "-T": prt_rep_stat} @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_func_no_error(self, mock_coll, mock_repset, mock_load): """Function: test_func_no_error Description: Test with no error returned from function call. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server3 self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_func_error(self, mock_coll, mock_repset, mock_load): """Function: test_func_error Description: Test with error returned from function call. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server3 with gen_libs.no_std_out(): self.assertFalse(mongo_rep_admin.run_program(self.args_array3, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_auth_mech(self, mock_coll, mock_repset, mock_load): """Function: test_auth_mech Description: Test with auth_mech passed. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server3 self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_no_auth_mech(self, mock_coll, mock_repset, mock_load): """Function: test_no_auth_mech Description: Test with no auth_mech passed. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_failed_conn_repset(self, mock_coll, mock_repset, mock_load): """Function: test_failed_conn_repset Description: Test with failed connection. Arguments: """ self.repset.conn = False self.repset.errmsg = self.err_msg mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server with gen_libs.no_std_out(): self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_successful_conn_repset(self, mock_coll, mock_repset, mock_load): """Function: test_successful_conn_repset Description: Test with successful connection. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_failed_conn_coll(self, mock_coll, mock_load): """Function: test_failed_conn_coll Description: Test with failed connection. Arguments: """ self.coll.conn = False self.coll.errmsg = self.err_msg mock_coll.return_value = self.coll mock_load.return_value = self.server with gen_libs.no_std_out(): self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_successful_conn_coll(self, mock_coll, mock_repset, mock_load): """Function: test_successful_conn_coll Description: Test with successful connection. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_repset_not_set(self, mock_coll, mock_repset, mock_load): """Function: test_repset_not_set Description: Test with repset name not set in config. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server2 self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_class.setup_mail") @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_email(self, mock_coll, mock_repset, mock_load, mock_mail): """Function: test_email Description: Test with setting up email. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server mock_mail.return_value = "Mail Instance" self.assertFalse(mongo_rep_admin.run_program(self.args_array2, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.prt_msg", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_no_replication(self, mock_coll, mock_load): """Function: test_no_replication Description: Test with no replication setup. Arguments: """ self.coll.count = 0 mock_coll.return_value = self.coll mock_load.return_value = self.server self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) @mock.patch("mongo_rep_admin.mongo_libs.disconnect", mock.Mock(return_value=True)) @mock.patch("mongo_rep_admin.gen_libs.load_module") @mock.patch("mongo_rep_admin.mongo_class.RepSet") @mock.patch("mongo_rep_admin.mongo_class.Coll") def test_replication(self, mock_coll, mock_repset, mock_load): """Function: test_replication Description: Test with replication setup. Arguments: """ mock_coll.return_value = self.coll mock_repset.return_value = self.repset mock_load.return_value = self.server self.assertFalse(mongo_rep_admin.run_program(self.args_array, self.func_dict)) if __name__ == "__main__": unittest.main()
26.023769
77
0.620042
1,829
15,328
4.881356
0.089666
0.058244
0.094646
0.091398
0.799843
0.77957
0.761089
0.722334
0.690636
0.676075
0
0.005279
0.283207
15,328
588
78
26.068027
0.807318
0.222664
0
0.726891
0
0
0.18433
0.157244
0
0
0
0
0.05042
1
0.096639
false
0
0.033613
0
0.176471
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2c3533726cb7a7a534315422701547ebb93b79c2
40
py
Python
run.py
leovp/scrnshot
e5fa739663977955b072a1ae714935e5e4f1fa35
[ "MIT" ]
1
2017-11-22T22:14:12.000Z
2017-11-22T22:14:12.000Z
run.py
leovp/scrnshot
e5fa739663977955b072a1ae714935e5e4f1fa35
[ "MIT" ]
null
null
null
run.py
leovp/scrnshot
e5fa739663977955b072a1ae714935e5e4f1fa35
[ "MIT" ]
null
null
null
from scrnshot.bot import bot bot.run()
10
28
0.75
7
40
4.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.15
40
3
29
13.333333
0.882353
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2c3b4316633c3668e9bd17318591fbc626f25995
988
py
Python
tests/gates/rz/test_update.py
edyounis/QFactor
8ce255b432157e2a0d4e91e0a8c4be0ef4f60a74
[ "BSD-3-Clause-LBNL" ]
3
2020-12-15T17:14:13.000Z
2020-12-17T11:35:37.000Z
tests/gates/rz/test_update.py
edyounis/qFactor
8ce255b432157e2a0d4e91e0a8c4be0ef4f60a74
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/gates/rz/test_update.py
edyounis/qFactor
8ce255b432157e2a0d4e91e0a8c4be0ef4f60a74
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np import unittest as ut from qfactor.gates import RzGate class TestRzGateUpdate ( ut.TestCase ): def test_rzgate_update_1 ( self ): env = RzGate( np.pi/3, 0 ).utry gate = RzGate( 0., 0 ) gate.update( env, 0 ) self.assertTrue( np.allclose( gate.theta, -np.pi/3 ) ) def test_rzgate_update_2 ( self ): env = RzGate( 2*np.pi/3, 0 ).utry gate = RzGate( 0., 0 ) gate.update( env, 0 ) self.assertTrue( np.allclose( gate.theta, -2*np.pi/3 ) ) def test_rzgate_update_3 ( self ): env = RzGate( -2*np.pi/3, 0 ).utry gate = RzGate( 0., 0 ) gate.update( env, 0 ) self.assertTrue( np.allclose( gate.theta, 2*np.pi/3 ) ) def test_rzgate_update_4 ( self ): env = RzGate( -np.pi/3, 0 ).utry gate = RzGate( 0., 0 ) gate.update( env, 0 ) self.assertTrue( np.allclose( gate.theta, np.pi/3 ) ) if __name__ == '__main__': ut.main()
26.702703
64
0.566802
146
988
3.69863
0.219178
0.059259
0.074074
0.140741
0.757407
0.757407
0.757407
0.722222
0.722222
0.722222
0
0.045911
0.294534
988
36
65
27.444444
0.728838
0
0
0.307692
0
0
0.008105
0
0
0
0
0
0.153846
1
0.153846
false
0
0.115385
0
0.307692
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
2c4755fde76bb8498a6a624286ce758b14f8f856
156
py
Python
data_structures/node.py
kgantsov/data_structures_and_algorithms_py
10c60ea10b999bf23ba821c764d712181702c9eb
[ "MIT" ]
null
null
null
data_structures/node.py
kgantsov/data_structures_and_algorithms_py
10c60ea10b999bf23ba821c764d712181702c9eb
[ "MIT" ]
null
null
null
data_structures/node.py
kgantsov/data_structures_and_algorithms_py
10c60ea10b999bf23ba821c764d712181702c9eb
[ "MIT" ]
null
null
null
class Node: data = None next = None def __init__(self, data): self.data = data def __repr__(self): return str(self.data)
14.181818
29
0.564103
20
156
4
0.55
0.3
0
0
0
0
0
0
0
0
0
0
0.339744
156
10
30
15.6
0.776699
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.857143
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
2c5b8865f11cec8bf90fb76dde7499bfe646d0e1
78
py
Python
MeinProgramm.py
ritschmaster/LaTeX-Template
6f8070d6e11ed6453b605cf6acac985edd02b8c1
[ "Apache-2.0" ]
null
null
null
MeinProgramm.py
ritschmaster/LaTeX-Template
6f8070d6e11ed6453b605cf6acac985edd02b8c1
[ "Apache-2.0" ]
null
null
null
MeinProgramm.py
ritschmaster/LaTeX-Template
6f8070d6e11ed6453b605cf6acac985edd02b8c1
[ "Apache-2.0" ]
1
2020-11-27T13:30:06.000Z
2020-11-27T13:30:06.000Z
print("Hallo Welt") print("Dieser Teil wird nicht mehr von Latex angezeigt")
19.5
56
0.75641
12
78
4.916667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.141026
78
3
57
26
0.880597
0
0
0
0
0
0.74026
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
2c63b480790e355ebdac2005e2ad08316141ec31
34
py
Python
test/fixtures/python/corpus/generator-expression.B.py
matsubara0507/semantic
67899f701abc0f1f0cb4374d8d3c249afc33a272
[ "MIT" ]
8,844
2019-05-31T15:47:12.000Z
2022-03-31T18:33:51.000Z
test/fixtures/python/corpus/generator-expression.B.py
matsubara0507/semantic
67899f701abc0f1f0cb4374d8d3c249afc33a272
[ "MIT" ]
401
2019-05-31T18:30:26.000Z
2022-03-31T16:32:29.000Z
test/fixtures/python/corpus/generator-expression.B.py
matsubara0507/semantic
67899f701abc0f1f0cb4374d8d3c249afc33a272
[ "MIT" ]
504
2019-05-31T17:55:03.000Z
2022-03-30T04:15:04.000Z
(f for e in d) (c + 1 for b in a)
11.333333
18
0.5
11
34
1.545455
0.818182
0
0
0
0
0
0
0
0
0
0
0.045455
0.352941
34
2
19
17
0.727273
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
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
1
0
0
0
0
0
0
5
2c8dd7a0906586594b22f2a367bf8f23a40ebb50
47
py
Python
ScopeReaders/__version__.py
smisra87/ScopeReaders
bfce7944a9d005d6ae03923e6b5767056fb3326b
[ "MIT" ]
null
null
null
ScopeReaders/__version__.py
smisra87/ScopeReaders
bfce7944a9d005d6ae03923e6b5767056fb3326b
[ "MIT" ]
null
null
null
ScopeReaders/__version__.py
smisra87/ScopeReaders
bfce7944a9d005d6ae03923e6b5767056fb3326b
[ "MIT" ]
null
null
null
version = '0.0.0' time = '2020-08-30 10:00:25'
15.666667
28
0.595745
11
47
2.545455
0.818182
0.142857
0
0
0
0
0
0
0
0
0
0.425
0.148936
47
2
29
23.5
0.275
0
0
0
0
0
0.510638
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
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2ca0691a0f59c16ae663b12d259cba7fe3b4754a
152
py
Python
app/constants.py
HealYouDown/flo-league
c729cad1daddfb89e997c101bd2da505b7137d98
[ "MIT" ]
null
null
null
app/constants.py
HealYouDown/flo-league
c729cad1daddfb89e997c101bd2da505b7137d98
[ "MIT" ]
3
2021-05-03T19:05:11.000Z
2021-06-12T09:43:02.000Z
app/constants.py
HealYouDown/flo-league
c729cad1daddfb89e997c101bd2da505b7137d98
[ "MIT" ]
null
null
null
import datetime K = 50 SEASON = 5 FIRST_DATE = datetime.datetime(year=2021, month=8, day=1) LAST_DATE = datetime.datetime(year=2021, month=9, day=19)
19
57
0.736842
26
152
4.230769
0.653846
0.218182
0.363636
0.436364
0.6
0.6
0
0
0
0
0
0.121212
0.131579
152
7
58
21.714286
0.712121
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
1
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
5
2ca8918fcf648899bb6628ea1c0dc9f552da7998
159
py
Python
pylib/commons.py
namikazebadri/PythonLibrary
ed0b4e03761ac91ddc54504a61dad450f70dc7cb
[ "MIT" ]
null
null
null
pylib/commons.py
namikazebadri/PythonLibrary
ed0b4e03761ac91ddc54504a61dad450f70dc7cb
[ "MIT" ]
null
null
null
pylib/commons.py
namikazebadri/PythonLibrary
ed0b4e03761ac91ddc54504a61dad450f70dc7cb
[ "MIT" ]
null
null
null
class Mannerism: def __init__(self, name="John Doe"): self.name = name def create(self): return f"Hi {self.name}, how are you today?"
22.714286
52
0.603774
23
159
4
0.695652
0.26087
0
0
0
0
0
0
0
0
0
0
0.27044
159
6
53
26.5
0.793103
0
0
0
0
0
0.264151
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
2cb667ddfd28ecc55067102c40798290b3990be3
45
py
Python
dsw_data_seeder/__main__.py
ds-wizard/data-seeder
27540e117ab881ee38373255a18072a30b1a9a50
[ "Apache-2.0" ]
null
null
null
dsw_data_seeder/__main__.py
ds-wizard/data-seeder
27540e117ab881ee38373255a18072a30b1a9a50
[ "Apache-2.0" ]
null
null
null
dsw_data_seeder/__main__.py
ds-wizard/data-seeder
27540e117ab881ee38373255a18072a30b1a9a50
[ "Apache-2.0" ]
null
null
null
from dsw_data_seeder.cli import main main()
11.25
36
0.8
8
45
4.25
0.875
0
0
0
0
0
0
0
0
0
0
0
0.133333
45
3
37
15
0.871795
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2ccf85406f494a1eb1bad5fbb9817f244399d2fe
33
py
Python
update_list.py
P4tches/CVE-NewsList
4a2ad1602b58fdd2b25704fbe5d329780a5acee2
[ "MIT" ]
null
null
null
update_list.py
P4tches/CVE-NewsList
4a2ad1602b58fdd2b25704fbe5d329780a5acee2
[ "MIT" ]
null
null
null
update_list.py
P4tches/CVE-NewsList
4a2ad1602b58fdd2b25704fbe5d329780a5acee2
[ "MIT" ]
null
null
null
from api import * downloadCVE()
8.25
17
0.727273
4
33
6
1
0
0
0
0
0
0
0
0
0
0
0
0.181818
33
3
18
11
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e2f17cb05119523145f846ac34c7f14539605cca
58
py
Python
QCGym/fidelities/__init__.py
oddgr8/QCGym
66bebe0b4bd5f56e59a161dca3a3121e74b96751
[ "MIT" ]
null
null
null
QCGym/fidelities/__init__.py
oddgr8/QCGym
66bebe0b4bd5f56e59a161dca3a3121e74b96751
[ "MIT" ]
null
null
null
QCGym/fidelities/__init__.py
oddgr8/QCGym
66bebe0b4bd5f56e59a161dca3a3121e74b96751
[ "MIT" ]
null
null
null
from QCGym.fidelities.trace_fidelity import TraceFidelity
29
57
0.896552
7
58
7.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.068966
58
1
58
58
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e2f55eabc89f4c1ccd7dd63d20bef02d73fb9aa8
112
py
Python
scripts/python/install-config.py
jaykrell/cm3
2aae7d9342b8e26680f6419f9296450fae8cbd4b
[ "BSD-4-Clause-UC", "BSD-4-Clause", "BSD-3-Clause" ]
105
2015-03-02T16:58:34.000Z
2022-03-28T07:17:49.000Z
scripts/python/install-config.py
jaykrell/cm3
2aae7d9342b8e26680f6419f9296450fae8cbd4b
[ "BSD-4-Clause-UC", "BSD-4-Clause", "BSD-3-Clause" ]
145
2015-03-18T10:08:17.000Z
2022-03-31T01:27:08.000Z
scripts/python/install-config.py
jaykrell/cm3
2aae7d9342b8e26680f6419f9296450fae8cbd4b
[ "BSD-4-Clause-UC", "BSD-4-Clause", "BSD-3-Clause" ]
26
2015-10-10T09:37:44.000Z
2022-02-23T02:02:05.000Z
#! /usr/bin/env python2 import sys import pylib from pylib import * CopyConfigForDevelopment() or sys.exit(1)
14
41
0.758929
16
112
5.3125
0.75
0
0
0
0
0
0
0
0
0
0
0.020833
0.142857
112
7
42
16
0.864583
0.196429
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
1a603d5aa602908ad78900cfcedf7ba51eb5ae2b
119
py
Python
7KYU/vowel_change.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
4
2021-07-17T22:48:03.000Z
2022-03-25T14:10:58.000Z
7KYU/vowel_change.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
null
null
null
7KYU/vowel_change.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
3
2021-06-14T14:18:16.000Z
2022-03-16T06:02:02.000Z
def vowel_change(txt: str, vow: str) -> str: return ''.join(i.replace(i, vow) if i in 'aeiou' else i for i in txt)
39.666667
73
0.638655
24
119
3.125
0.625
0.08
0
0
0
0
0
0
0
0
0
0
0.201681
119
2
74
59.5
0.789474
0
0
0
0
0
0.042017
0
0
0
0
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
1a9d495d82cad46cf054114b927665ab2675b277
6,194
py
Python
jason.py
ismaeelakram/jason-python
25fef76a527382521f995001335b771a5ba13a60
[ "MIT" ]
null
null
null
jason.py
ismaeelakram/jason-python
25fef76a527382521f995001335b771a5ba13a60
[ "MIT" ]
null
null
null
jason.py
ismaeelakram/jason-python
25fef76a527382521f995001335b771a5ba13a60
[ "MIT" ]
null
null
null
import os import sys import hashlib import argparse import datetime class Jason: def __init__(self): pass def characterize(string): return [char for char in string] def detect_hash(hash): if(len(hash) == 32): hashmethod = 'md5' elif(len(hash) == 40): hashmethod = 'sha1' elif(len(hash) == 64): hashmethod = 'sha256' elif(len(hash) == 96): hashmethod = 'sha384' elif(len(hash) == 128): hashmethod = 'sha512' else: hashmethod = 'none' return hashmethod def commence(): print(f"Starting attack | {datetime.datetime.now()}") @staticmethod def brute(hash): alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !@#$%^&*;" hashmethod = Jason.detect_hash(hash) if(hashmethod == 'none'): print('Hash type not detected. Aborting.') return None else: print(f'Hash type detected: {hashmethod.upper()}') Jason.commence() while True: for l in alphabet: if(hashlib.md5(l.encode('utf-8')).hexdigest() == hash): return l for l in alphabet: for l2 in alphabet: if(hashlib.md5(f'{l}{l2}'.encode('utf-8')).hexdigest() == hash): return l + l2 for l in alphabet: for l2 in alphabet: for l3 in alphabet: if(hashlib.md5(f'{l}{l2}{l3}'.encode('utf-8')).hexdigest() == hash): return l + l2 + l3 for l in alphabet: for l2 in alphabet: for l3 in alphabet: for l4 in alphabet: if(hashlib.md5(f'{l}{l2}{l3}{l4}'.encode('utf-8')).hexdigest() == hash): return l + l2 + l3 + l4 for l in alphabet: for l2 in alphabet: for l3 in alphabet: for l4 in alphabet: for l5 in alphabet: if(hashlib.md5(f'{l}{l2}{l3}{l4}{l5}'.encode('utf-8')).hexdigest() == hash): return l + l2 + l3 + l4 + l5 for l in alphabet: for l2 in alphabet: for l3 in alphabet: for l4 in alphabet: for l5 in alphabet: for l6 in alphabet: if(hashlib.md5(f'{l}{l2}{l3}{l4}{l5}{l6}'.encode('utf-8')).hexdigest() == hash): return l + l2 + l3 + l4 + l5 + l6 for l in alphabet: for l2 in alphabet: for l3 in alphabet: for l4 in alphabet: for l5 in alphabet: for l6 in alphabet: for l7 in alphabet: if(hashlib.md5(f'{l}{l2}{l3}{l4}{l5}{l6}{l7}'.encode('utf-8')).hexdigest() == hash): return l + l2 + l3 + l4 + l5 + l6 + l7 for l in alphabet: for l2 in alphabet: for l3 in alphabet: for l4 in alphabet: for l5 in alphabet: for l6 in alphabet: for l7 in alphabet: for l8 in alphabet: if(hashlib.md5(f'{l}{l2}{l3}{l4}{l5}{l6}{l7}{l8}'.encode('utf-8')).hexdigest() == hash): return l + l2 + l3 + l4 + l5 + l6 + l7 + l8 @staticmethod def dictionary_attack(hash, passlist): hashmethod = Jason.detect_hash(hash) if(hashmethod == 'none'): print('Hash type not detected. Aborting.') return None else: print(f'Hash type detected: {hashmethod.upper()}') for password in passlist: if(hashmethod == 'md5'): newhash = hashlib.md5(password.encode('utf-8')).hexdigest() if newhash == hash: return password elif newhash.upper() == hash: return password elif newhash.lower() == hash: return password if(hashmethod == 'sha1'): newhash = hashlib.sha1(password.encode('utf-8')).hexdigest() if newhash == hash: return password elif newhash.upper() == hash: return password elif newhash.lower() == hash: return password if(hashmethod == 'sha256'): newhash = hashlib.sha256(password.encode('utf-8')).hexdigest() if newhash == hash: return password elif newhash.upper() == hash: return password elif newhash.lower() == hash: return password if(hashmethod == 'sha384'): newhash = hashlib.sha384(password.encode('utf-8')).hexdigest() if newhash == hash: return password elif newhash.upper() == hash: return password elif newhash.lower() == hash: return password if(hashmethod == 'sha512'): newhash = hashlib.sha512(password.encode('utf-8')).hexdigest() if newhash == hash: return password elif newhash.upper() == hash: return password elif newhash.lower() == hash: return password
41.851351
133
0.419438
576
6,194
4.496528
0.121528
0.138996
0.140541
0.095367
0.733205
0.72471
0.72471
0.713127
0.681853
0.661776
0
0.049394
0.480304
6,194
148
134
41.851351
0.755203
0
0
0.57971
0
0
0.086144
0.027778
0
0
0
0
0
1
0.043478
false
0.166667
0.036232
0.007246
0.282609
0.036232
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
1
0
0
0
0
0
5
2025f212bb41116c3b0ce7b02ced5555654ad2fb
153
py
Python
tests/helpers/django_project/api/exceptions.py
hyperleex/dependencies
188843f616670a90e5e4a4c48b2fb954a460c2ee
[ "BSD-2-Clause" ]
null
null
null
tests/helpers/django_project/api/exceptions.py
hyperleex/dependencies
188843f616670a90e5e4a4c48b2fb954a460c2ee
[ "BSD-2-Clause" ]
null
null
null
tests/helpers/django_project/api/exceptions.py
hyperleex/dependencies
188843f616670a90e5e4a4c48b2fb954a460c2ee
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- class NegotiationError(Exception): pass class VersionError(Exception): pass class MetadataError(Exception): pass
12.75
34
0.686275
15
153
7
0.6
0.371429
0.342857
0
0
0
0
0
0
0
0
0.00813
0.196078
153
11
35
13.909091
0.845528
0.137255
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
2037aa53889f56db0468fed98d3b4c776e41636a
28
py
Python
test/login.py
bai649464605/python_flask
1d3a17d33b5128fe97f82ecfb35cd06c03386999
[ "MIT" ]
null
null
null
test/login.py
bai649464605/python_flask
1d3a17d33b5128fe97f82ecfb35cd06c03386999
[ "MIT" ]
null
null
null
test/login.py
bai649464605/python_flask
1d3a17d33b5128fe97f82ecfb35cd06c03386999
[ "MIT" ]
null
null
null
num1=110 num2=220 num3=333
5.6
8
0.75
6
28
3.5
1
0
0
0
0
0
0
0
0
0
0
0.5
0.142857
28
4
9
7
0.375
0
0
0
0
0
0
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
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
2048d0857819bafe7ca4e5f556fd5aefffd23c87
172
py
Python
test_project/spotify/test_command.py
justanotheruser/ubex_test_job
2a63fb6e17c4771c3ed1088dd4a9b32057e59ad7
[ "WTFPL" ]
null
null
null
test_project/spotify/test_command.py
justanotheruser/ubex_test_job
2a63fb6e17c4771c3ed1088dd4a9b32057e59ad7
[ "WTFPL" ]
6
2021-03-19T02:56:42.000Z
2021-09-22T18:58:42.000Z
test_project/spotify/test_command.py
justanotheruser/ubex_test_job
2a63fb6e17c4771c3ed1088dd4a9b32057e59ad7
[ "WTFPL" ]
null
null
null
from io import StringIO from django.core.management import call_command from django.test import TestCase class PlayerTestCase(TestCase): def setUp(self): pass
21.5
47
0.773256
23
172
5.73913
0.73913
0.151515
0
0
0
0
0
0
0
0
0
0
0.174419
172
7
48
24.571429
0.929577
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0.166667
0.5
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
0
1
1
0
1
0
0
5
2055653562b553452776ea6d261768e8731cbf83
104
py
Python
Python/CodingBat/near_hundred.py
dvt32/cpp-journey
afd7db7a1ad106c41601fb09e963902187ae36e6
[ "MIT" ]
1
2018-05-24T11:30:05.000Z
2018-05-24T11:30:05.000Z
Python/CodingBat/near_hundred.py
dvt32/cpp-journey
afd7db7a1ad106c41601fb09e963902187ae36e6
[ "MIT" ]
null
null
null
Python/CodingBat/near_hundred.py
dvt32/cpp-journey
afd7db7a1ad106c41601fb09e963902187ae36e6
[ "MIT" ]
2
2017-08-11T06:53:30.000Z
2017-08-29T12:07:52.000Z
# http://codingbat.com/prob/p124676 def near_hundred(n): return abs(n-100) <= 10 or abs(n-200) <= 10
20.8
45
0.663462
19
104
3.578947
0.789474
0.117647
0
0
0
0
0
0
0
0
0
0.179775
0.144231
104
4
46
26
0.58427
0.317308
0
0
0
0
0
0
0
0
0
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
64584eb26217b255d1ab5671d93624246526ad14
34
py
Python
run.py
serjtroshin/memorises
f6dc8017e749f3e5e3ff09a56e3aecbf2446dc37
[ "MIT" ]
null
null
null
run.py
serjtroshin/memorises
f6dc8017e749f3e5e3ff09a56e3aecbf2446dc37
[ "MIT" ]
2
2021-04-25T09:12:12.000Z
2021-06-02T00:56:10.000Z
run.py
serjtroshin/memorises
f6dc8017e749f3e5e3ff09a56e3aecbf2446dc37
[ "MIT" ]
null
null
null
from bot.main import main main()
8.5
25
0.735294
6
34
4.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.176471
34
3
26
11.333333
0.892857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
64622f8137c2031c9f1e2c36e82170215125d072
138
py
Python
snakegame/snakegame/__init__.py
ascobee/snake-game-cli
3fa16454ad172e029866e9446f47020a1b83f695
[ "MIT" ]
null
null
null
snakegame/snakegame/__init__.py
ascobee/snake-game-cli
3fa16454ad172e029866e9446f47020a1b83f695
[ "MIT" ]
null
null
null
snakegame/snakegame/__init__.py
ascobee/snake-game-cli
3fa16454ad172e029866e9446f47020a1b83f695
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # __init__.py from .game import Game from .apple import Apple from .snake import Snake from .player import Player
17.25
26
0.768116
22
138
4.636364
0.545455
0
0
0
0
0
0
0
0
0
0
0.008547
0.152174
138
7
27
19.714286
0.863248
0.23913
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
1
0
0
5
64942a215c6f5ae54ab8b153d16c5b486bf6611e
235
py
Python
experiment/sale/admin.py
rob-atlas/atlasparts
8d4704f8734945fbcd99baa5bd0f20cd930e814f
[ "MIT" ]
null
null
null
experiment/sale/admin.py
rob-atlas/atlasparts
8d4704f8734945fbcd99baa5bd0f20cd930e814f
[ "MIT" ]
6
2020-06-06T00:04:02.000Z
2021-09-22T19:05:03.000Z
experiment/sale/admin.py
rob-atlas/atlasparts
8d4704f8734945fbcd99baa5bd0f20cd930e814f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Sale, UnleashedLineItem, UnleashedSalesOrder # Register your models here. admin.site.register(Sale) admin.site.register(UnleashedLineItem) admin.site.register(UnleashedSalesOrder)
26.111111
64
0.838298
27
235
7.296296
0.481481
0.137056
0.258883
0
0
0
0
0
0
0
0
0
0.085106
235
8
65
29.375
0.916279
0.110638
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
64ac8679f20acf4499c54863678c424e015c04a2
44
py
Python
Autokey/CapsKeybinds/ctrl alt/pageup.py
MisaghM/Capslock-Keybindings
00332c7d39cf776c43fe13aa08e1c2969747425d
[ "MIT" ]
1
2021-11-05T19:39:36.000Z
2021-11-05T19:39:36.000Z
Autokey/CapsKeybinds/ctrl alt/pageup.py
MisaghM/Capslock-Keybindings
00332c7d39cf776c43fe13aa08e1c2969747425d
[ "MIT" ]
null
null
null
Autokey/CapsKeybinds/ctrl alt/pageup.py
MisaghM/Capslock-Keybindings
00332c7d39cf776c43fe13aa08e1c2969747425d
[ "MIT" ]
null
null
null
keyboard.send_keys("<ctrl>+<alt>+<page_up>")
44
44
0.704545
7
44
4.142857
1
0
0
0
0
0
0
0
0
0
0
0
0
44
1
44
44
0.659091
0
0
0
0
0
0.488889
0.488889
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
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
64b166f444e550b92d2caf34b363dc23e006b0c0
121
py
Python
stable_baselines3/ddpg/policies.py
hzyjerry/stable-baselines3
9dc6c1949fa1f19a1dcdde6858838686ec898412
[ "MIT" ]
26
2021-11-05T08:46:06.000Z
2022-03-22T05:53:57.000Z
stable_baselines3/ddpg/policies.py
hzyjerry/stable-baselines3
9dc6c1949fa1f19a1dcdde6858838686ec898412
[ "MIT" ]
1
2021-11-19T11:13:37.000Z
2021-11-30T09:08:04.000Z
stable_baselines3/ddpg/policies.py
hzyjerry/stable-baselines3
9dc6c1949fa1f19a1dcdde6858838686ec898412
[ "MIT" ]
5
2021-11-05T08:46:12.000Z
2022-03-25T21:56:58.000Z
# DDPG can be view as a special case of TD3 from stable_baselines3.td3.policies import CnnPolicy, MlpPolicy # noqa:F401
40.333333
76
0.793388
20
121
4.75
0.95
0
0
0
0
0
0
0
0
0
0
0.058824
0.157025
121
2
77
60.5
0.872549
0.421488
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
1
0
0
5
b37a7ebc3c399d81a2eda7275f587be970385f99
7,371
py
Python
test/test_command_actions.py
calne-ca/beets-plugin-extended-metadata
305791cb62c4ab9df3763115279f1335d7acc813
[ "MIT" ]
null
null
null
test/test_command_actions.py
calne-ca/beets-plugin-extended-metadata
305791cb62c4ab9df3763115279f1335d7acc813
[ "MIT" ]
null
null
null
test/test_command_actions.py
calne-ca/beets-plugin-extended-metadata
305791cb62c4ab9df3763115279f1335d7acc813
[ "MIT" ]
null
null
null
import unittest from beetsplug.emd.command.actions.add_action import AddExpression from beetsplug.emd.command.actions.copy_action import CopyExpression from beetsplug.emd.command.actions.delete_action import DeleteExpression from beetsplug.emd.command.actions.rename_action import RenameExpression from beetsplug.emd.command.actions.update_action import UpdateExpression class CommandActionsTest(unittest.TestCase): def test_update_expression(self): expression = UpdateExpression('tag1:test1/tag2:test2') self.assertEqual('tag1', expression.source_tag) self.assertEqual('test1', expression.source_value) self.assertEqual('tag2', expression.destination_tag) self.assertEqual('test2', expression.destination_value) def test_add_expression_special_characters(self): self.assertEqual(['test.1'], UpdateExpression('tag1:test.1/tag2:test.2').source_value) self.assertEqual(['test.2'], UpdateExpression('tag1:test.1/tag2:test.2').destination_value) self.assertEqual(["test'1"], UpdateExpression("tag1:test'1/tag2:test'2").source_value) self.assertEqual(["test'2"], UpdateExpression("tag1:test'1/tag2:test'2").destination_value) self.assertEqual(["!test1"], UpdateExpression("tag1:!test1/tag2:!test2").source_value) self.assertEqual(["!test2"], UpdateExpression("tag1:!test1/tag2:!test2").destination_value) self.assertEqual(["test;1"], UpdateExpression("tag1:test;1/tag2:test;2").source_value) self.assertEqual(["test;2"], UpdateExpression("tag1:test;1/tag2:test;2").destination_value) self.assertEqual(["test/1"], UpdateExpression("tag1:test/1/tag2:test/2").source_value) self.assertEqual(["test/2"], UpdateExpression("tag1:test/1/tag2:test/2").destination_value) def test_update_expression_invalid_expression(self): self.assertRaises(Exception, lambda: UpdateExpression('')) self.assertRaises(Exception, lambda: UpdateExpression('tag1/test1')) self.assertRaises(Exception, lambda: UpdateExpression('tag1:test1')) self.assertRaises(Exception, lambda: UpdateExpression('tag1:test1:tag2:test2')) self.assertRaises(Exception, lambda: UpdateExpression('!tag1:test1:tag2:test2')) self.assertRaises(Exception, lambda: UpdateExpression('tag1:test1:!tag2:test2')) def test_copy_expression(self): expression = CopyExpression('tag1/tag2') self.assertEqual('tag1', expression.source_tag) self.assertTrue(expression.is_source_emd) self.assertEqual('tag2', expression.destination_tag) self.assertTrue(expression.is_destination_emd) def test_copy_expression_from_file_metadata(self): expression = CopyExpression('.tag1/tag2') self.assertEqual('tag1', expression.source_tag) self.assertFalse(expression.is_source_emd) self.assertEqual('tag2', expression.destination_tag) self.assertTrue(expression.is_destination_emd) def test_copy_expression_to_file_metadata(self): expression = CopyExpression('tag1/.tag2') self.assertEqual('tag1', expression.source_tag) self.assertTrue(expression.is_source_emd) self.assertEqual('tag2', expression.destination_tag) self.assertFalse(expression.is_destination_emd) def test_copy_expression_from_and_to_file_metadata(self): expression = CopyExpression('.tag1/.tag2') self.assertEqual('tag1', expression.source_tag) self.assertFalse(expression.is_source_emd) self.assertEqual('tag2', expression.destination_tag) self.assertFalse(expression.is_destination_emd) def test_copy_expression_invalid_expression(self): self.assertRaises(Exception, lambda: CopyExpression('')) self.assertRaises(Exception, lambda: CopyExpression('tag1:test1/test1:test2')) self.assertRaises(Exception, lambda: CopyExpression('tag1:tag2')) def test_add_expression(self): expression = AddExpression('tag1:test1') self.assertEqual('tag1', expression.tag) self.assertEqual(['test1'], expression.values) def test_add_expression_multiple_values(self): expression = AddExpression('tag1:test1,test2,test3') self.assertEqual('tag1', expression.tag) self.assertEqual(['test1', 'test2', 'test3'], expression.values) def test_add_expression_special_characters(self): self.assertEqual(['test.1'], AddExpression('tag1:test.1').values) self.assertEqual(["test'1"], AddExpression("tag1:test'1").values) self.assertEqual(["!test1"], AddExpression("tag1:!test1").values) self.assertEqual(["test;1"], AddExpression("tag1:test;1").values) self.assertEqual(["test/1"], AddExpression("tag1:test/1").values) def test_add_expression_invalid_expression(self): self.assertRaises(Exception, lambda: AddExpression('')) self.assertRaises(Exception, lambda: AddExpression('tag1')) self.assertRaises(Exception, lambda: AddExpression('tag1:')) self.assertRaises(Exception, lambda: AddExpression('tag1/test1')) self.assertRaises(Exception, lambda: AddExpression('!tag1:test1')) def test_delete_expression(self): expression = DeleteExpression('tag1:test1') self.assertEqual('tag1', expression.tag) self.assertEqual(['test1'], expression.values) def test_delete_expression_no_value(self): expression = DeleteExpression('tag1') self.assertEqual('tag1', expression.tag) self.assertEqual([], expression.values) def test_delete_expression_multiple_values(self): expression = DeleteExpression('tag1:test1,test2,test3') self.assertEqual('tag1', expression.tag) self.assertEqual(['test1', 'test2', 'test3'], expression.values) def test_delete_expression_special_characters(self): self.assertEqual(['test.1'], DeleteExpression('tag1:test.1').values) self.assertEqual(["test'1"], DeleteExpression("tag1:test'1").values) self.assertEqual(["!test1"], DeleteExpression("tag1:!test1").values) self.assertEqual(["test;1"], DeleteExpression("tag1:test;1").values) self.assertEqual(["test/1"], DeleteExpression("tag1:test/1").values) def test_delete_expression_invalid_expression(self): self.assertRaises(Exception, lambda: DeleteExpression('')) self.assertRaises(Exception, lambda: DeleteExpression('tag1:')) self.assertRaises(Exception, lambda: DeleteExpression('tag1/test1')) self.assertRaises(Exception, lambda: DeleteExpression('!tag1:test1')) def test_rename_expression(self): expression = RenameExpression('tag1/tag2') self.assertEqual('tag1', expression.old_tag) self.assertEqual('tag2', expression.new_tag) def test_rename_expression_invalid_expression(self): self.assertRaises(Exception, lambda: RenameExpression('')) self.assertRaises(Exception, lambda: RenameExpression('tag1')) self.assertRaises(Exception, lambda: RenameExpression('tag1/')) self.assertRaises(Exception, lambda: RenameExpression('tag1:tag2')) self.assertRaises(Exception, lambda: RenameExpression('tag1/!tag2')) self.assertRaises(Exception, lambda: RenameExpression('!tag1/tag2')) self.assertRaises(Exception, lambda: RenameExpression('tag1:tag2,tag3'))
53.80292
99
0.721069
792
7,371
6.564394
0.070707
0.126947
0.120215
0.149067
0.8819
0.790537
0.731294
0.667051
0.603385
0.601847
0
0.028258
0.145435
7,371
136
100
54.198529
0.797111
0
0
0.254386
0
0
0.127527
0.051825
0
0
0
0
0.675439
1
0.166667
false
0
0.052632
0
0.22807
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
1
0
0
0
0
0
0
0
0
0
5
b3ad9dbf5c4f0c0a0f4c97c902c132d080f64492
207
py
Python
portfolio_api/exceptions/__init__.py
kkiyama117/fastAPI_template
b56b3184d7217bc33aabc1c1a40174e06c80e2f3
[ "MIT" ]
null
null
null
portfolio_api/exceptions/__init__.py
kkiyama117/fastAPI_template
b56b3184d7217bc33aabc1c1a40174e06c80e2f3
[ "MIT" ]
null
null
null
portfolio_api/exceptions/__init__.py
kkiyama117/fastAPI_template
b56b3184d7217bc33aabc1c1a40174e06c80e2f3
[ "MIT" ]
null
null
null
from .db import BadRequestException, UserAlreadyExistException, UserNotExistException, DatabaseException __all__ = [DatabaseException, UserAlreadyExistException, UserNotExistException, BadRequestException]
51.75
104
0.884058
12
207
14.916667
0.666667
0.513966
0
0
0
0
0
0
0
0
0
0
0.067633
207
3
105
69
0.927461
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
1
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
5
b3b0d79eb54ffec3fa74b0aeeb1dbf59121dbf51
160
py
Python
acme/acme/util.py
magikid/certbot
f5a88ade54cc34ae216959a84a658986324ea69c
[ "Apache-2.0" ]
5
2021-01-26T08:47:29.000Z
2021-01-30T00:42:12.000Z
acme/acme/util.py
magikid/certbot
f5a88ade54cc34ae216959a84a658986324ea69c
[ "Apache-2.0" ]
1
2021-01-25T14:47:33.000Z
2021-01-25T15:00:46.000Z
acme/acme/util.py
magikid/certbot
f5a88ade54cc34ae216959a84a658986324ea69c
[ "Apache-2.0" ]
1
2020-10-28T05:49:43.000Z
2020-10-28T05:49:43.000Z
"""ACME utilities.""" import six def map_keys(dikt, func): """Map dictionary keys.""" return {func(key): value for key, value in six.iteritems(dikt)}
20
67
0.65625
23
160
4.521739
0.695652
0.153846
0
0
0
0
0
0
0
0
0
0
0.175
160
7
68
22.857143
0.787879
0.225
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
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
1
0
0
1
0
1
0
0
5
b3b28316ce2eb8ec7848181f160dba822be049fc
402
py
Python
python/ql/src/Statements/C_StyleParentheses.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
python/ql/src/Statements/C_StyleParentheses.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
python/ql/src/Statements/C_StyleParentheses.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
#Written in Java or C style def gcd(a, b): while(a != 0 and b != 0): if(a > b): a = a % b else: b = b % a if(a == 0): return (b) return (a) #Written in a more Pythonic style def gcd(a, b): while a != 0 and b != 0: if a > b: a = a % b else: b = b % a if a == 0: return b return a
16.75
33
0.378109
66
402
2.30303
0.272727
0.078947
0.144737
0.157895
0.75
0.75
0.75
0.75
0.75
0.75
0
0.029703
0.497512
402
23
34
17.478261
0.722772
0.144279
0
0.444444
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.333333
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
b3b796dc3b18c4a74651bc71be88e930b72ed11e
49
py
Python
tests/components/mjpeg/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/mjpeg/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/mjpeg/__init__.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the MJPEG IP Camera integration."""
24.5
48
0.714286
7
49
5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
49
1
49
49
0.833333
0.857143
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
375029c52f69952849a4c23523ebd562a233a123
54
py
Python
tests/subfolder/testdata.py
dmahugh/pyfind
b69b959516b8a67a1527e4beb9b4e4d5dd5566e7
[ "MIT" ]
2
2018-11-17T15:44:52.000Z
2019-05-04T10:21:10.000Z
tests/testdata.py
dmahugh/pyfind
b69b959516b8a67a1527e4beb9b4e4d5dd5566e7
[ "MIT" ]
1
2018-11-17T14:00:55.000Z
2018-11-17T14:00:55.000Z
tests/testdata.py
dmahugh/pyfind
b69b959516b8a67a1527e4beb9b4e4d5dd5566e7
[ "MIT" ]
null
null
null
"""test file for pyfind unit tests """ import pathlib
13.5
34
0.722222
8
54
4.875
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
54
3
35
18
0.866667
0.574074
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
1
0
0
5
378fc39a917c10013c3a6393f3a12d34d16cebcd
85
py
Python
src/plugins/BUPT_ncov/exception.py
Nova-Noir/novabot_v2
5e2cdd0981f8556a55ba61b62720668f98baef12
[ "MIT" ]
3
2022-03-21T09:47:32.000Z
2022-03-22T01:58:43.000Z
src/plugins/BUPT_ncov/exception.py
Nova-Noir/novabot_v2
5e2cdd0981f8556a55ba61b62720668f98baef12
[ "MIT" ]
3
2022-02-23T16:53:50.000Z
2022-02-23T16:59:58.000Z
src/plugins/BUPT_ncov/exception.py
Nova-Noir/novabot_v2
5e2cdd0981f8556a55ba61b62720668f98baef12
[ "MIT" ]
1
2022-03-17T12:27:54.000Z
2022-03-17T12:27:54.000Z
class NoLoginException(Exception): pass class ParserError(Exception): pass
12.142857
34
0.741176
8
85
7.875
0.625
0.412698
0
0
0
0
0
0
0
0
0
0
0.188235
85
6
35
14.166667
0.913043
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
37b3a3ede80ab6c2a610beaff37d239d233f033c
791
py
Python
episcanpy/plotting/__init__.py
AbiriAmir/epiScanpy
3b7c0d0c91602bc446888e09a0aa6c21f25e5f48
[ "BSD-3-Clause" ]
null
null
null
episcanpy/plotting/__init__.py
AbiriAmir/epiScanpy
3b7c0d0c91602bc446888e09a0aa6c21f25e5f48
[ "BSD-3-Clause" ]
null
null
null
episcanpy/plotting/__init__.py
AbiriAmir/epiScanpy
3b7c0d0c91602bc446888e09a0aa6c21f25e5f48
[ "BSD-3-Clause" ]
null
null
null
from ..plotting._heatmap import overlap_heatmap, prct_overlap #from ..plotting._features import plot_rank_features from ..plotting._silhouette import silhouette, silhouette_tot from ..plotting._histograms import cluster_composition from ..plotting._scanpy_plotting import pca, tsne, umap, diffmap, draw_graph from ..plotting._scanpy_plotting import pca_loadings, pca_overview, pca_variance_ratio from ..plotting._scanpy_plotting import rank_feat_groups from ..plotting._scanpy_plotting import rank_feat_groups_violin, rank_feat_groups_dotplot from ..plotting._scanpy_plotting import rank_feat_groups_stacked_violin, rank_feat_groups_matrixplot from ..plotting._scanpy_plotting import rank_feat_groups_heatmap, rank_feat_groups_tracksplot from ..plotting._variable_features import cal_var
52.733333
100
0.869785
106
791
6.009434
0.330189
0.207221
0.153846
0.244898
0.398744
0.398744
0.288854
0.288854
0
0
0
0
0.073325
791
14
101
56.5
0.869031
0.064475
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
80d983d1aa6a8904601998b5240760f2bc51a254
210
py
Python
src/spaceone/identity/info/authorization_info.py
choonho/identity
e56263e06e04b4d3ea7b230026c9b2db4e0be685
[ "Apache-2.0" ]
1
2020-07-31T09:42:02.000Z
2020-07-31T09:42:02.000Z
src/spaceone/identity/info/authorization_info.py
choonho/identity
e56263e06e04b4d3ea7b230026c9b2db4e0be685
[ "Apache-2.0" ]
null
null
null
src/spaceone/identity/info/authorization_info.py
choonho/identity
e56263e06e04b4d3ea7b230026c9b2db4e0be685
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from spaceone.core.pygrpc.message_type import * __all__ = ['AuthorizationResponse'] def AuthorizationResponse(auth_data): return change_handler_authorization_response(auth_data)
21
59
0.77619
23
210
6.652174
0.869565
0.104575
0
0
0
0
0
0
0
0
0
0.005376
0.114286
210
9
60
23.333333
0.817204
0.1
0
0
0
0
0.112299
0.112299
0
0
0
0
0
1
0.25
false
0
0.25
0.25
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
1
1
0
0
5
80f07fb684fba4ba37dff488ab163d9ba61a2fc6
66
py
Python
resippy/spectral/spectrum_factories/usgs/ascii/__init__.py
BeamIO-Inc/resippy
37f6b8e865f4836696a9db0a4b17eae2426cdd96
[ "BSD-3-Clause" ]
11
2019-03-30T02:32:13.000Z
2021-11-02T23:15:17.000Z
resippy/spectral/spectrum_factories/usgs/ascii/__init__.py
BeamIO-Inc/resippy
37f6b8e865f4836696a9db0a4b17eae2426cdd96
[ "BSD-3-Clause" ]
10
2019-02-28T21:24:01.000Z
2019-12-31T15:02:03.000Z
resippy/spectral/spectrum_factories/usgs/ascii/__init__.py
BeamIO-Inc/resippy
37f6b8e865f4836696a9db0a4b17eae2426cdd96
[ "BSD-3-Clause" ]
4
2019-08-16T22:20:23.000Z
2021-04-27T08:23:01.000Z
from .usgs_ascii_spectral_factory import UsgsAsciiSpectralFactory
33
65
0.924242
7
66
8.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.060606
66
1
66
66
0.935484
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
1
0
0
5
80fcecb0a64cdca18a573796e2243efaf61d20af
872
py
Python
casparser/regex.py
nirmanp6/casparser
8dae4ec06d410f3299e1203ee89e6d0794bdd92d
[ "MIT" ]
null
null
null
casparser/regex.py
nirmanp6/casparser
8dae4ec06d410f3299e1203ee89e6d0794bdd92d
[ "MIT" ]
null
null
null
casparser/regex.py
nirmanp6/casparser
8dae4ec06d410f3299e1203ee89e6d0794bdd92d
[ "MIT" ]
null
null
null
HEADER_RE = r"(?P<from>\d{2}-[a-zA-Z]{3}-\d{4})\s+to\s+(?P<to>\d{2}-[a-zA-Z]{3}-\d{4})" FOLIO_RE = ( r"Folio\s+No\s*:\s+(.+?)\s+(?:PAN\s*:\s+([A-Z]{5}\d{4}[A-Z])\s+)?" r"KYC\s*:\s*(.+?)\s+PAN\s*:\s*(.+?)$" ) SCHEME_RE = r"([\s\w]+)-\s*\d*\s*(.+?)\s*(?:\(Advisor\s*:\s*(.+?)\))*\s+Registrar\s*:\s*(.*)\s*$" OPEN_UNITS_RE = r"Opening\s+Unit\s+Balance.+?([\d,.]+)" CLOSE_UNITS_RE = r"Closing\s+Unit\s+Balance.+?([\d,.]+)" VALUATION_RE = r"Valuation\s+on\s+(\d{2}-[A-Za-z]{3}-\d{4})\s*:\s*INR\s*([\d,.]+)" NAV_RE = r"NAV\s+on\s+(\d{2}-[A-Za-z]{3}-\d{4})\s*:\s*INR\s*([\d,.]+)" TRANSACTION_RE = ( r"(\d{2}-[A-Za-z]{3}-\d{4})\t\t([^\t]+?)\t\t([(\d,.]+)\)*(?:\t\t([(\d,.]+)\)*\t\t([(\d,.]+)\)*\t\t([(\d,.]+)\)*)*" ) DIVIDEND_RE = r"dividend.+?(reinvest)*.+?@\s+Rs\.\s*([\d\.]+)\s+per\s+unit" DESCRIPTION_TAIL_RE = r"\d{2}-[A-Za-z]{3}-\d{4}\t\t.*(\n[^\t]+)[\t|$]"
43.6
118
0.436927
187
872
1.967914
0.229947
0.070652
0.048913
0.081522
0.388587
0.3125
0.269022
0.269022
0.244565
0.184783
0
0.024361
0.058486
872
19
119
45.894737
0.423873
0
0
0
0
0.466667
0.755734
0.755734
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
03839932226248a4c4d7517146d4a6daa6b6f0a3
163
py
Python
django/microservices_lite/microservices_lite/views.py
raychorn/microservices-framework_light
b441444842ae6e85f608025173a25b07dbb95578
[ "BSD-3-Clause" ]
2
2021-07-13T00:54:32.000Z
2022-01-04T15:36:09.000Z
django/microservices_lite/microservices_lite/views.py
raychorn/microservices-framework_light
b441444842ae6e85f608025173a25b07dbb95578
[ "BSD-3-Clause" ]
null
null
null
django/microservices_lite/microservices_lite/views.py
raychorn/microservices-framework_light
b441444842ae6e85f608025173a25b07dbb95578
[ "BSD-3-Clause" ]
null
null
null
from django.http import HttpResponse, HttpResponseNotFound def catchall(request, exception): # ... return HttpResponseNotFound('<h1>Page not found</h1>')
27.166667
58
0.742331
17
163
7.117647
0.882353
0
0
0
0
0
0
0
0
0
0
0.014286
0.141104
163
5
59
32.6
0.85
0.018405
0
0
0
0
0.14557
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
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
1
1
0
0
0
5
038e125fcfe6d3e72ad2f5f1e457cde68c489683
202
py
Python
p73/solve.py
josephok/ProjectEuler
104e9f2ec910b748745fb346e3bd266d266b3dc8
[ "WTFPL" ]
null
null
null
p73/solve.py
josephok/ProjectEuler
104e9f2ec910b748745fb346e3bd266d266b3dc8
[ "WTFPL" ]
null
null
null
p73/solve.py
josephok/ProjectEuler
104e9f2ec910b748745fb346e3bd266d266b3dc8
[ "WTFPL" ]
null
null
null
from fractions import gcd def getCountOfFractions(): return sum( 1 for d in range( 5, 12001 ) for n in range( int( d / 3 ) + 1, int( d / 2 ) + 1 ) if gcd( n, d ) == 1 ) print( getCountOfFractions() )
33.666667
116
0.623762
34
202
3.705882
0.617647
0.111111
0
0
0
0
0
0
0
0
0
0.077922
0.237624
202
6
117
33.666667
0.74026
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.25
0.25
0.75
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
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
5
03a8cafd2420211e11b9018b7a87b3a72f250fa7
321
py
Python
bast/validator/__init__.py
eltNEG/Bast
e7604849851ebef7c5f3dc801be0fba99f292596
[ "MIT" ]
53
2018-07-26T10:03:56.000Z
2021-03-19T16:49:28.000Z
bast/validator/__init__.py
eltNEG/Bast
e7604849851ebef7c5f3dc801be0fba99f292596
[ "MIT" ]
19
2018-07-22T18:15:28.000Z
2021-06-01T22:26:53.000Z
bast/validator/__init__.py
eltNEG/Bast
e7604849851ebef7c5f3dc801be0fba99f292596
[ "MIT" ]
13
2018-07-16T14:07:17.000Z
2020-06-11T20:59:16.000Z
from .validator import validator from .validator import Field from .validator import Rule from .rules import Rule from .rules import in_list from .rules import length_between from .rules import required_length from .rules import is_email from .rules import matches from .rules import is_alpha_numeric from .rules import *
29.181818
35
0.82866
49
321
5.306122
0.326531
0.276923
0.461538
0.146154
0.169231
0
0
0
0
0
0
0
0.133956
321
11
36
29.181818
0.935252
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
03dbfb4ed3086a229cb4c967939a10c5115113e8
83
py
Python
tracardi_template_plugin/model/configuration.py
Tracardi/tracardi-template-plugin
4af849e21d0a6490931c6bc0866d76229e236ca4
[ "MIT" ]
null
null
null
tracardi_template_plugin/model/configuration.py
Tracardi/tracardi-template-plugin
4af849e21d0a6490931c6bc0866d76229e236ca4
[ "MIT" ]
null
null
null
tracardi_template_plugin/model/configuration.py
Tracardi/tracardi-template-plugin
4af849e21d0a6490931c6bc0866d76229e236ca4
[ "MIT" ]
null
null
null
from pydantic import BaseModel class Configuration(BaseModel): template: str
13.833333
31
0.783133
9
83
7.222222
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.168675
83
5
32
16.6
0.942029
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
1
0
0
5
03e1d520f3718c8faae3f917c35894beae75c870
257
py
Python
tests/test_priors.py
AlexisOlson/chess-tuning-tools
8a66fdcb8e3ad3142f44a752399bede4ff2937ab
[ "Apache-2.0" ]
null
null
null
tests/test_priors.py
AlexisOlson/chess-tuning-tools
8a66fdcb8e3ad3142f44a752399bede4ff2937ab
[ "Apache-2.0" ]
null
null
null
tests/test_priors.py
AlexisOlson/chess-tuning-tools
8a66fdcb8e3ad3142f44a752399bede4ff2937ab
[ "Apache-2.0" ]
null
null
null
import numpy as np from numpy.testing import assert_almost_equal from tune.priors import roundflat def test_roundflat(): assert_almost_equal(roundflat(0.3), 0.0, decimal=0.1) assert roundflat(0.0) == -np.inf assert roundflat(-1.0) == -np.inf
23.363636
57
0.727626
42
257
4.333333
0.452381
0.131868
0.186813
0
0
0
0
0
0
0
0
0.046083
0.155642
257
10
58
25.7
0.792627
0
0
0
0
0
0
0
0
0
0
0
0.571429
1
0.142857
true
0
0.428571
0
0.571429
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
1
0
1
0
0
5
ff13bf3528f213e275ccbd4b424b3e95b2832b2c
184
py
Python
Csharp/Projects/GrovePi/PythonWrappers/ADC.py
yodiwo/plegma
a6fe7735783491fd45769c973d103aec036dde76
[ "Apache-2.0" ]
6
2016-04-25T17:02:31.000Z
2018-02-26T09:38:38.000Z
Csharp/Projects/GrovePi/PythonWrappers/ADC.py
yodiwo/plegma
a6fe7735783491fd45769c973d103aec036dde76
[ "Apache-2.0" ]
null
null
null
Csharp/Projects/GrovePi/PythonWrappers/ADC.py
yodiwo/plegma
a6fe7735783491fd45769c973d103aec036dde76
[ "Apache-2.0" ]
6
2016-04-25T17:02:36.000Z
2018-11-20T03:46:26.000Z
import grove_i2c_adc import time class ADC(object): def __init__(self): self.adc= grove_i2c_adc.ADC() def getData(self): return self.adc.adc_read()
16.727273
38
0.630435
26
184
4.115385
0.5
0.149533
0.205607
0
0
0
0
0
0
0
0
0.014925
0.271739
184
10
39
18.4
0.783582
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.142857
0.857143
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
205f2b531b6d9e7528a7a5301888441b3a956ce5
110
py
Python
tests/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
tests/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
tests/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
try: from django.core.urlresolvers import reverse except ImportError: from django.urls import reverse
22
48
0.781818
14
110
6.142857
0.714286
0.232558
0
0
0
0
0
0
0
0
0
0
0.172727
110
4
49
27.5
0.945055
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
206798b105f98eb913dfbde4ebb07f69e7c1c8b4
2,117
py
Python
tests/test_config.py
nickderobertis/py-finstmt
7903bce83b31e4425ac680020bf7d3536ed1ed11
[ "MIT" ]
3
2021-11-30T21:03:25.000Z
2022-01-04T10:18:54.000Z
tests/test_config.py
nickderobertis/py-finstmt
7903bce83b31e4425ac680020bf7d3536ed1ed11
[ "MIT" ]
23
2020-03-24T18:14:22.000Z
2022-03-12T00:19:51.000Z
tests/test_config.py
whoopnip/py-finstmt
7903bce83b31e4425ac680020bf7d3536ed1ed11
[ "MIT" ]
3
2021-05-15T11:13:08.000Z
2021-11-30T21:03:28.000Z
import json from pathlib import Path from finstmt import FinancialStatements, IncomeStatements, BalanceSheets from finstmt.config_manage.statements import StatementsConfigManager from tests.conftest import DEVELOPMENT_MODE, EXPECT_CONFIG_PATH def check_config(config: StatementsConfigManager, json_path: Path): if DEVELOPMENT_MODE: json_data = config.json(indent=2) json_path.write_text(json_data) return expect_data = json.loads(json_path.read_text()) assert config.dict() == expect_data def test_config_load_cat_annual_stockrow( annual_stockrow_income_stmt_cat: IncomeStatements, annual_stockrow_bs_stmt_cat: BalanceSheets ): stmts = FinancialStatements(annual_stockrow_income_stmt_cat, annual_stockrow_bs_stmt_cat, auto_adjust_config=False) json_path = EXPECT_CONFIG_PATH / 'default-cat-annual-stockrow.json' check_config(stmts.config, json_path) def test_config_load_cat_annual_capiq( annual_capiq_income_stmt: IncomeStatements, annual_capiq_bs_stmt: BalanceSheets ): dates = annual_capiq_income_stmt.dates stmts = FinancialStatements(annual_capiq_income_stmt, annual_capiq_bs_stmt[dates], auto_adjust_config=False) json_path = EXPECT_CONFIG_PATH / 'default-cat-annual-capiq.json' check_config(stmts.config, json_path) def test_config_load_cat_annual_stockrow_no_adjust( annual_stockrow_income_stmt_cat: IncomeStatements, annual_stockrow_bs_stmt_cat: BalanceSheets ): stmts = FinancialStatements(annual_stockrow_income_stmt_cat, annual_stockrow_bs_stmt_cat, auto_adjust_config=False) json_path = EXPECT_CONFIG_PATH / 'no-adjust-cat-annual-stockrow.json' check_config(stmts.config, json_path) def test_config_load_cat_annual_capiq_no_adjust( annual_capiq_income_stmt: IncomeStatements, annual_capiq_bs_stmt: BalanceSheets ): dates = annual_capiq_income_stmt.dates stmts = FinancialStatements(annual_capiq_income_stmt, annual_capiq_bs_stmt[dates], auto_adjust_config=False) json_path = EXPECT_CONFIG_PATH / 'no-adjust-cat-annual-capiq.json' check_config(stmts.config, json_path)
38.490909
119
0.81247
281
2,117
5.661922
0.16726
0.096794
0.064111
0.079195
0.737901
0.737901
0.737901
0.711502
0.711502
0.711502
0
0.000538
0.121871
2,117
54
120
39.203704
0.855299
0
0
0.52381
0
0
0.059518
0.059518
0
0
0
0
0.02381
1
0.119048
false
0
0.119048
0
0.261905
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
2072d4fbfba949dcba4f771d0198ec79b5b06c4e
24
py
Python
Python/hello_world_swahili.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,428
2018-10-03T15:15:17.000Z
2019-03-31T18:38:36.000Z
Python/hello_world_swahili.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,162
2018-10-03T15:05:49.000Z
2018-10-18T14:17:52.000Z
Python/hello_world_swahili.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
3,909
2018-10-03T15:07:19.000Z
2019-03-31T18:39:08.000Z
print('Salamu, Dunia!')
12
23
0.666667
3
24
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
24
1
24
24
0.727273
0
0
0
0
0
0.583333
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
207a1f9d97e5d0ac790d7e06670e606dd518b0cc
34
py
Python
Codeforces/problems/0228/A/228A.py
object-oriented-human/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
2
2021-07-27T10:46:47.000Z
2021-07-27T10:47:57.000Z
Codeforces/problems/0228/A/228A.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
Codeforces/problems/0228/A/228A.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
print(4-len(set(input().split())))
34
34
0.647059
6
34
3.666667
1
0
0
0
0
0
0
0
0
0
0
0.029412
0
34
1
34
34
0.617647
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
2093189c224eedc672f16852ed9d2c3dce96517b
129
py
Python
supervisr/cli/seed/admin.py
BeryJu/supervisr
2305b1e27abb0bfe9fcee93b79e012c62cba712e
[ "MIT" ]
1
2020-01-12T21:33:03.000Z
2020-01-12T21:33:03.000Z
supervisr/cli/seed/admin.py
BeryJu/supervisr
2305b1e27abb0bfe9fcee93b79e012c62cba712e
[ "MIT" ]
null
null
null
supervisr/cli/seed/admin.py
BeryJu/supervisr
2305b1e27abb0bfe9fcee93b79e012c62cba712e
[ "MIT" ]
null
null
null
"""Supervisr module seed app admin""" from supervisr.core.admin import admin_autoregister admin_autoregister('supervisr_seed')
21.5
51
0.813953
16
129
6.375
0.5625
0.333333
0
0
0
0
0
0
0
0
0
0
0.093023
129
5
52
25.8
0.871795
0.24031
0
0
0
0
0.152174
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
20a3553ca0af33d597b5dbadc0fa16d224d1eb45
95
py
Python
workspace_tools/private_settings.py
HeadsUpDisplayInc/mbed
e9f546aef32f7e55ada78715131025cff7472d7f
[ "Apache-2.0" ]
null
null
null
workspace_tools/private_settings.py
HeadsUpDisplayInc/mbed
e9f546aef32f7e55ada78715131025cff7472d7f
[ "Apache-2.0" ]
null
null
null
workspace_tools/private_settings.py
HeadsUpDisplayInc/mbed
e9f546aef32f7e55ada78715131025cff7472d7f
[ "Apache-2.0" ]
null
null
null
from mbed_settings import * # GCC ARM GCC_ARM_PATH = "/opt/gcc-arm-none-eabi-4_9-2015q1/bin/"
19
55
0.736842
18
95
3.666667
0.777778
0.272727
0
0
0
0
0
0
0
0
0
0.083333
0.115789
95
4
56
23.75
0.702381
0.073684
0
0
0
0
0.44186
0.44186
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
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
20dbf1d293659512271d1a06d895c562fa581215
42
py
Python
src/exception/client.py
Twente-Mining/tezos-reward-distributor
8df0745fdb44cbd765084303882545202d2427f3
[ "MIT" ]
26
2020-03-16T14:20:04.000Z
2021-12-18T21:48:19.000Z
src/exception/client.py
Twente-Mining/tezos-reward-distributor
8df0745fdb44cbd765084303882545202d2427f3
[ "MIT" ]
9
2020-03-16T17:49:26.000Z
2021-11-29T14:13:36.000Z
src/exception/client.py
Twente-Mining/tezos-reward-distributor
8df0745fdb44cbd765084303882545202d2427f3
[ "MIT" ]
7
2020-03-16T16:57:15.000Z
2021-11-26T14:17:35.000Z
class ClientException(Exception): pass
21
33
0.785714
4
42
8.25
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
42
2
34
21
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
20e70b41381a8ae511ca188242ce6718651b2670
290
py
Python
texar/evals/__init__.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
25
2019-01-03T09:15:20.000Z
2022-02-12T04:20:59.000Z
texar/evals/__init__.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
4
2019-03-28T11:02:20.000Z
2022-02-15T04:57:33.000Z
texar/evals/__init__.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
9
2019-01-03T02:20:37.000Z
2022-02-12T04:20:50.000Z
# """ Modules of texar library evals. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # pylint: disable=wildcard-import from texar.evals.bleu_moses import * from texar.evals.bleu import * from texar.evals.metrics import *
19.333333
38
0.796552
39
290
5.538462
0.461538
0.185185
0.222222
0.277778
0.222222
0
0
0
0
0
0
0
0.131034
290
14
39
20.714286
0.857143
0.22069
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.166667
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
20edbebc6b324f58c7354916e408fe75e8ba9b1a
11,557
py
Python
day_9_part_2.py
Korred/advent_of_code_2016
8b6e9b51569bf75da9b0fc56cc9e7c1c4dddeb5e
[ "MIT" ]
null
null
null
day_9_part_2.py
Korred/advent_of_code_2016
8b6e9b51569bf75da9b0fc56cc9e7c1c4dddeb5e
[ "MIT" ]
null
null
null
day_9_part_2.py
Korred/advent_of_code_2016
8b6e9b51569bf75da9b0fc56cc9e7c1c4dddeb5e
[ "MIT" ]
null
null
null
import re def unzip_len(file): curr_pos, cnt = 0, 0 marker = re.compile(r'\(([\d]+)x([\d]+)\)') while(True): m = marker.search(file, curr_pos) if m: sub_cnt, rep_cnt = map(int, (m.group(1), m.group(2))) cnt += len(file[curr_pos:m.start()]) + (unzip_len(file[m.end():m.end() + sub_cnt]) * rep_cnt) curr_pos = m.end() + sub_cnt else: return cnt + len(file[curr_pos:]) zipped = '''(4x14)JVWV(84x11)(24x2)YAFPPYWOQJKUKQTJACJAOWYF(25x11)(1x1)J(12x14)CNZKOSNAJVYL(16x3)QADCLDFUVLLZZYKX(44x15)(6x6)SUAXJM(16x4)(1x15)S(4x3)TJLZ(5x13)XVUCL(83x7)(23x9)WIIPUJELAEJXNAEOLOKNVWG(1x5)E(32x1)(17x6)SUTMAPNOOLYENSSXR(4x6)XLCF(4x14)MTLX(5x1)BSVMF(71x8)(14x6)(1x8)G(2x13)US(38x15)(8x8)ARZSGIGT(19x5)CJZJZPFJAVAMGHXJTQD(1x9)R(283x8)(35x10)(8x14)XGYQJNOH(14x10)TAHCPETVDTFJUM(103x2)(1x13)H(23x15)DPMHJRJZEFEMPVRWEVJSJKX(8x1)LZHWFQUN(28x4)BKEVJUTVRNFNLBKSGUDWIUQMUHOH(13x3)UVIUHILLVYMGG(19x4)BEJMSSZUFBNOKATZGTO(79x5)(16x14)THNKRIKYRCDLGHBC(7x13)DKOCVNU(1x15)F(5x6)YGOBW(19x14)ULJKHNBIUHRJREZDDUJ(15x8)ZLSFAJXPJMBJAFB(129x1)(3x15)CSP(6x14)CENZEW(66x4)(4x9)OWJW(15x6)MBDRUKFILMGUIFN(24x8)QZOGFWHDWEKWKAHJCEVCHJEE(1x7)E(2x2)NP(23x2)TKWKUEBAXYXCJGNGVGDNZZP(6863x7)(765x2)(758x9)(489x13)(290x1)(45x1)(7x9)TFWYQXA(5x4)WFXPM(16x13)CAOREKUYBKRJUWMD(28x6)(5x2)TYNVR(5x11)HFMVV(1x11)E(29x2)(6x3)PFFYYG(11x13)VLLEXZNRJPD(99x5)(13x14)UKZMNKGWITWAK(5x7)JHHTK(5x5)FMAIL(22x4)WFKBNNDQSINTFOKWABDSKA(25x3)HRZTKQLJYZOQUVJSSJUVSLFZU(59x1)(12x8)EZPFSSKSKZTC(14x4)AASWPMUULDMISS(9x2)KDYYSAIJY(2x2)KL(11x1)(6x8)(1x6)B(156x3)(20x9)MYEZLSGKMXBRULVFLNWM(94x7)(5x3)VBRTE(19x12)VVJIRLYDDXRKTZUJRJO(19x4)MFQEJOENEJASWKCRKIS(16x10)DPCALBQVPPNEJZVX(4x14)KPXN(2x4)AC(16x13)(10x2)ZSDCNCRPWG(7x9)CKRAALS(3x12)WOX(190x12)(21x1)(15x2)CWEALKHVUJRKUZM(8x1)HMRGTTHX(1x4)M(11x5)FDKJPLSSJXZ(119x15)(112x5)(5x9)NEDAR(18x14)CJZFFRFLLHEKBJROIX(50x14)SMIZJRIFFCKQRHPBTFEHHGMYEYZKMHMLCXGYMOBQWDWBKUKMWG(14x9)UKBZYCSGQOODPD(47x12)(40x14)DKXLLEKAEJVWGQXTCTLETCIUZSYEEWKCKRPLRJCE(2107x14)(1382x12)(30x14)FPWYVMBIVHPTGLYHNVOYPZJNTYGBLD(634x2)(205x13)(8x4)(2x15)SL(80x9)(31x1)JTSPSMAINXBNBRZSMHMHUHJGLRGIPIH(4x7)VTSS(27x15)JFZCAMFRUURZSHSTIVBSKIAPZIX(50x7)(2x2)QT(1x5)J(10x7)INLBBWLCQL(14x10)KWIOCPXLDWKSGM(43x15)(5x13)ILDAJ(2x15)IC(6x7)POOTGI(7x15)ELBGODE(3x3)VKN(145x11)(42x15)(4x15)DZCR(4x9)AUQA(3x8)HJC(2x4)KO(3x4)GNF(7x6)(1x11)V(17x14)MTGGJYEKVTYWMHHUZ(45x9)(1x11)F(5x3)APNHX(21x13)EVNIMEHDVXSNUMKDBPOGP(4x7)DSOZ(23x6)FLGNEPLSWXZINJWHCFCDAFG(223x15)(27x3)(7x7)PAUXORX(4x2)TLPT(1x2)W(40x4)RBVJKPRYUGQSDLQWGFXOOECMZHPXLCPZSEUDGZYU(16x5)QUZGZJYILGSXEUVC(108x5)(2x13)YN(20x3)TYROWFOSZUYJBXBEJRNC(41x3)SIVTZCQLSYVYMXQCVGOFLLTQOEHDRMVBPHQTZGBVB(2x6)WA(14x8)DUUYEPEYZCBBTQ(2x1)EJ(1x8)S(217x7)(38x12)(1x10)S(9x1)(3x15)MYE(11x9)DEJNGHTACYT(2x9)BI(8x3)XBWRQDFS(125x1)(44x12)TGIQMKGHFKZHKBGNSBOLUEWGVFESIODDGFXALDVVAEAB(6x5)(1x1)H(57x5)(16x10)HZFCMNMENWJQEGPN(14x10)BRUJTSJNSNUPWZ(7x15)GHVCAGA(14x4)AXZJRFABNDFCTX(467x4)(29x6)(12x6)UMTKEGMHMLKR(6x9)VTIOBO(84x6)(1x3)L(38x10)(4x10)QQWK(3x10)EZD(13x5)RODNWCXNHDDIN(1x2)D(5x9)QOMXK(11x3)(5x10)XFDOS(183x2)(45x9)(19x13)ZLDTRTVALUZDZFMBLRF(13x1)WLZJWFWHQDTXW(6x15)WXWECV(34x9)(22x8)TUZJKDDHIEPMGAOBLFPIKV(1x1)L(32x14)(7x15)RWLJBXP(12x10)ETCCOCHZBAJR(35x9)(2x8)LN(22x7)BVZUFUJXSEZCASMTJPXJCL(145x6)(8x13)YDNMOBOP(31x7)HLDVSBEFYZNKGTZGYYAOBHNDSEOCOLV(44x1)(17x10)NTEASXSWQIGFJKGBW(6x2)PAIMIB(4x6)ISAI(38x6)PYHNNTLMSKFYIKJPJLEPRZWROAVZEEBZDTZXOA(555x15)(30x15)(14x14)(9x1)PZDIOWWVR(3x15)UPI(8x3)FLACUNUS(234x6)(93x6)(5x11)MSFAR(43x10)LZLKBLPCOVZLUEUNSETMBXZAUXPZOCRAFGIZYWYWFJJ(25x10)SOYROQRUMQRCQDGSCDQMDDXUE(28x5)(7x8)BFZQPAD(10x2)OOMRNMVYMP(95x9)(82x8)(56x9)ADFRMHBZMIRIRXFXFEOUDSSWBXWFSNGFYLYQBKTYIAGDODMYUZBNCXBW(14x7)DECKFWHMDQZEVW(2x7)US(245x8)(237x12)(37x11)(4x5)HSUQ(6x2)CSJSZF(1x15)P(4x12)DHDC(6x2)WDBEKI(86x13)(13x11)LMCFYGVEQYOXG(6x11)FXWKPE(28x14)CXMLNWBEIBXFVYBQFYYXMLEYXTHV(2x1)JM(6x11)JWRQGX(75x2)(19x12)HLEFCHHUNNVPKRHBSNI(3x4)XXO(1x6)G(9x3)DZZZLJAVA(14x12)SVOGFHGOMILNDY(2x11)AE(7x8)CPRSIEM(146x7)(63x4)(40x10)(8x12)HREXHQQV(19x15)NHFTETPZOGQPMTTJWGB(10x7)FFHJQIKKUU(5x2)EZYSH(45x9)AFCEPUTOJXPKWXVHESXCDAVONUSGBXYDGOTJKMWLUDSGZ(10x1)GFFOMDSVJK(2255x8)(1313x13)(195x1)(12x14)JRMGJMPSIAYP(3x12)ZVU(94x8)(88x8)(7x12)QYRZOXQ(3x14)MST(4x6)PWFV(30x14)RGBUFBIYCLOYCEBCLRIRIZMKETCHGD(13x13)PRWWNBYPOSCEG(60x14)(16x15)(10x4)UCXJKCLUSZ(31x3)(11x7)OLFIDYNWARC(9x2)BTJJVYABK(225x7)(22x7)(9x14)MKXZMAXWG(1x14)T(143x9)(92x8)(4x4)EANM(21x12)CJWPGDXEAFVKCURLZVSQY(9x6)MYOKSEXFF(20x8)NWMYBGSNAJETPYOZAHMI(9x11)LLIHLSEGK(29x13)(3x3)ZOU(15x8)ICTPRUAEUAWJZQO(3x14)EJT(40x11)GZXXFRLDZWBUDVWUSOGTJQBZPIUKEOFGEPEJXZLZ(477x9)(102x1)(68x10)(8x8)OEYUDLGQ(29x15)WJZNVYTMKGLBBCKRNCFEXZTXHRFXF(12x11)EONHXGVTERDU(1x9)X(15x2)EUHJXCNQDRKGQEE(78x14)(1x5)W(5x5)FOPSO(56x4)(12x13)LJIFRANVTMFW(2x2)VL(7x5)NAFLCBH(2x9)QX(6x2)JUKNXC(72x12)(8x15)TWYEERLN(16x1)(3x8)PUO(2x13)PQ(9x7)YZMEDORQL(16x4)ANAFFSKWYANYZFYC(197x2)(63x10)(30x14)FKMXZDDPOPETLQAOOHOICGGIRSCNVZ(3x7)NAG(11x12)IUDUKASSBPH(41x14)(2x11)KI(9x8)GWDWTFLRM(13x3)UJAXLOTXDJBAY(1x13)E(10x3)VBYFHVSFGE(50x8)(18x6)PHXVXMBBASFGMIAEPS(7x8)RMTGOVA(9x7)YCVBGFGQE(249x9)(6x6)PTMNTP(2x1)UN(223x15)(3x5)LIN(7x9)QSGULSS(95x12)(9x3)NEOVNFGHW(11x12)SYNKHCNJNRK(5x14)BZFDK(39x6)DWYDUKQFGNRMHHKADEUPMVEAEITNPMGHQVZEUIX(1x14)W(22x3)(1x6)K(1x7)B(5x4)UJYOI(67x4)(22x8)AXLCJBGMPEYBFCPCGAJYOP(33x9)WQRLFGPDCIDEFSFJBCECXNHEAHQQZTHKQ(132x9)(65x8)(3x10)YCV(50x8)(3x14)SGM(7x4)DKYSOFD(3x13)NAV(14x9)ISWITRFROOLPAL(26x3)(5x10)MRQPE(2x6)KE(2x11)YM(10x13)ZKLAZMLQLK(6x14)YPAVRE(624x3)(181x7)(68x13)(21x12)JLXDYPYFCYDMVHQABFMVI(12x10)MDTVSRSDYMUJ(15x4)KQNHDNKHUBTQQPZ(99x13)(1x14)C(9x15)QDNBANFGV(62x5)(4x2)IWFQ(7x12)TFPQQCU(24x5)DBPOBCZBDKYIDTDJODMARSKY(4x14)ZITK(3x14)JKJ(428x14)(284x5)(87x6)(9x9)MUXVSFTMC(7x6)AYXHETP(41x5)DPXBPEIMGTEHUSVZDNISBBLJJGFMQHKVCVYCHKDMC(8x15)NGNYFZOG(96x8)(10x4)BVPKQJEHXR(18x2)MTNUGYYBEEVQSEOVCZ(19x14)DVFFQTKZAPTVHYWUVSR(24x7)HRWIMOXVXCNIFUMDJIAOIHOD(83x7)(3x4)JEH(2x14)KO(24x5)PHBOGUWHYPWSUMUKJVWGPXOI(16x5)SRJFHRSPBJBDCBUL(9x11)ZYRPVDCHL(12x4)OEEUHJYADRUQ(112x4)(54x10)(7x13)ZRHMOKJ(5x3)GYRZA(1x8)R(8x12)QIISRVON(6x1)JYUVAR(5x3)PHVJT(25x2)(19x7)OCSEVRZEXCGBUYDHJPY(5x7)NFXVW(14x8)GSRPSZVARWQODO(274x13)(14x5)TEDYKPFMSZJDPN(210x14)(202x15)(118x6)(37x10)XSRYNNCBPFZEXLJGHEUFGSSKEAGCGHDELXJMZ(3x6)NBD(9x12)WNQSRQMMX(19x14)UQNXQFVPARHPHGANPDL(18x12)QPAVMGIMKGLBVUCUNA(7x2)SVZZKTM(59x3)(33x1)UZSOZNJLLGXZQFAUSLCWLJAZOXYGBOXZB(5x8)OYHIV(4x11)HTHP(11x11)(6x2)PVJINV(1x6)K(7x5)IIFGBET(1703x13)(5x14)LCRHS(853x8)(297x1)(4x8)IATO(138x4)(47x9)(25x8)TKGYAPTVNCAOZGXEHVJSVUZQH(5x4)LTNWY(1x6)T(8x1)LZJDJKHT(66x6)(3x11)CZL(10x14)UFHKIPHXJU(1x4)D(7x14)QRSITNN(14x12)JWWGFGRNGKWEMS(57x2)(51x1)(11x14)DCFZCDZTAGR(11x6)JBUBCJTBMIY(4x12)TBJH(1x4)L(73x13)(66x10)(13x2)DEWJJECFXFDZT(8x11)RKIQWCLS(2x14)MI(2x13)IH(11x3)EIOPIGLPPRU(542x8)(11x9)ZYHQGXLYETL(74x12)(3x7)RIH(3x12)ABZ(51x3)(7x2)FFKYEUF(5x11)GYBQR(5x8)LQDFP(12x8)XZHDEEBHCQNP(162x9)(1x5)P(9x10)(4x3)FNDN(3x12)XHK(27x2)WELDLTBMAEQHHYPTCDJNUSTCKMM(93x9)(6x5)JKWAUT(23x13)ADNVFAMHSDECFUWNHQKYUPD(6x9)OKOOYV(17x11)OANWBVHFTYRMNYIVF(10x12)LXBOALHOLG(52x14)(14x3)KRKNAFDGGAJQVM(15x2)PUZAZWURHFNXCUP(5x14)JKHMQ(209x5)(23x13)QJXALGDLXOLSZMOAOIQIIKM(27x12)UKXUMPJVOIFGFCTMBBULLQQSVNP(13x9)(1x12)W(1x1)Q(68x10)(7x3)TAPFDEL(7x10)MGQVUVE(36x13)MECIHMUCYZGPZSGYFRIZSYNKNUJWRWLLIBCJ(44x15)(2x8)EB(3x5)WIZ(5x2)AWPMR(2x1)BR(7x1)RBGGFSM(824x13)(64x14)NHDVJKXOXWACGUYAPRHAAVEOBOHTKCCVADECJGVEOQDECRIOTDRPFGPSNBQKBWGC(5x7)DBWJW(330x10)(106x15)(4x8)FLQV(90x11)(6x1)CZOTMP(14x9)JKMYLMDZHGLBLS(30x8)XZKWOJVRLLUMPYMOOPXVIZBQMOEQKC(17x3)ZLBFMBAZQDLXHBTSN(171x13)(26x15)DWZFDBQNKLOZOFUDUDNBPJMOJP(27x12)BSYILJVQVEHZYHSBTWGCSXTTYQV(62x13)(41x15)WSIMKZVYWIDEJAQNHLSCUOJRCJNTNFEKLYFTHRBNV(9x7)CVRCEKAPY(28x12)LJGPZASECPTHDMZVTAUQJDMDWJMG(23x2)(16x10)WLDMJKFFUUQJBKKB(2x13)YL(398x3)(10x15)GBMFQKODZR(166x5)(19x8)RVMKTBJCFJRYOYKLABB(45x9)(4x2)AHRP(10x7)SUNWUPGBUI(4x8)AAYR(5x12)LQAOJ(64x6)(32x15)UUKUHLQLRCDNPFBTZCCELMHAEMJALWCW(7x2)OOXKPZV(7x10)TRZQKQQ(14x9)SPOBNBNHQUAXTA(140x7)(9x6)CEURHCCYN(49x10)(2x14)BA(21x2)LXDAOLWMGABWXNJJZNWMT(8x12)DXEJNXWG(64x4)(10x13)OSWHJMSEIX(29x5)QSWOYZGNLFJMNUNQWTXJLULOLXILV(7x5)XBJMJKC(55x1)(1x3)R(42x15)(11x1)RGPKOPUXYKN(11x8)ZEXFAXAEWIK(2x10)KA(1792x5)(779x10)(771x14)(1x9)R(160x12)(1x9)W(60x2)(17x2)(2x5)ZH(5x9)VKZHB(16x9)CLUZMXRXHXGYXKEG(9x13)IKRAARMTI(60x11)(5x12)GULNP(43x9)(1x12)D(1x3)B(16x9)GVMHIYPAPUBHVVHH(3x6)ETP(6x2)EAPQIC(4x13)XPHB(405x8)(2x8)FX(69x8)(4x3)NLCD(1x10)A(3x5)NZH(29x6)(23x5)YUTCGMAZDDYQVCJWKIHNZES(5x4)PXXFA(125x4)(45x3)(1x15)Z(7x8)XMATLKA(4x12)XOVI(1x1)C(4x12)ZUVR(24x6)(18x3)LTRJJBCDXWQJWVRYPC(38x8)(5x7)NEYNO(2x7)UU(15x9)PYETRDIPYYOGDHZ(12x5)RYWDFNFOYUSY(165x10)(27x11)(10x3)YMTTKQWJZI(6x2)VYEQTY(47x12)(14x7)OEZAMELIVXRFQR(12x8)RAWCWKDFYVLO(3x12)UJO(7x6)KEDMOJA(59x8)(4x9)WNGJ(11x15)TVLZNZPPIMC(10x5)BEIIWIAJVW(10x3)HPTIEYPOAC(177x14)(126x6)(3x5)WAF(20x8)(1x14)K(8x8)OJPNYBSI(20x5)(4x14)QFSL(4x10)TRCI(60x4)(7x12)CWDXKIT(11x9)IBHDSDZQYXI(3x14)XFL(14x14)TNPQWJYONMMATN(14x13)FDILKFEJOZJEAN(17x1)(1x6)E(6x4)EKLCDK(998x6)(3x13)BDO(520x8)(30x13)(11x11)URXDXGOIRAS(7x9)TCROBMZ(146x14)(73x1)(66x14)(16x2)UTMVELHWQDZHQSXZ(6x13)JNPFZP(1x7)P(9x11)IJGNOJEHT(6x4)VWGWEO(61x4)(40x9)(14x15)XCVLKPNPVMRNYU(1x5)Y(8x4)ZQMGREOI(9x11)(3x12)XNT(218x15)(5x5)COKBM(11x15)KKNTKSVNPBJ(78x9)(1x8)G(6x7)EWATMT(33x8)IXTNISPBIFCOWLQRSVVLDZDUOFZAOLWYS(15x11)(3x4)HEF(2x6)YG(4x15)SZPH(90x6)(11x3)NQCKGQKMBCJ(52x14)(14x15)AGXIFSMHYCNUDC(1x13)A(6x8)BLRXLS(7x14)WNJVUQI(9x1)(4x4)GBJY(96x10)(89x11)(7x1)(1x13)X(5x6)PPQPV(47x2)(6x3)WKNDXH(29x10)ONKOCGTEIKDCQLDVPMSRSXSOBSUYC(9x2)GKZJOKEZL(454x11)(14x15)COLYFNFJKXYQTN(416x15)(149x4)(23x13)(3x1)FZD(1x11)C(2x13)MD(44x13)(4x14)KRFS(8x1)GUACUOZE(15x7)WWFSKIRRQUXHRBE(61x12)(3x12)MIR(4x15)JATS(6x12)XFFBBR(12x13)XAKILNXBXRDL(5x10)IERHX(212x11)(72x12)(5x4)JNDDK(2x8)IM(12x14)CYRZXNSMMTHR(29x10)EELQQZAEXGXVYOFZDLSUGFWPRSZKN(9x10)XNAZAAQTR(37x1)(2x4)TR(7x1)ZHWZKQC(4x14)BNGX(2x11)UG(68x10)(10x6)XCVUIOZEEP(2x14)YB(12x4)KTBZYWGSTORC(2x11)CJ(11x10)JHNDCOSTTLX(17x15)PJZDEXJVJRDSMHXXN(10x3)KIUZZVAZHI(3x14)BCN(920x5)(831x8)(803x12)(328x5)(198x12)(98x5)(1x4)B(18x9)OHYGZYYYUCLBXBUIYM(19x5)BYDFBZEYKWXNNZFSLNI(16x14)NLOXNNSJLKCYCUZN(13x11)TQTBDLLIRHUWA(88x7)(25x7)TQRRUEPZPSUOUCITJMZROAIAW(2x9)GH(6x14)OVWZUW(7x14)NQECFMF(19x2)PYAROBFSCUQDVOBLFBO(106x8)(32x7)(4x1)ZCKY(17x3)CYYKYEKTAAGICLNIY(61x13)(11x6)UHCPBITWXTA(16x14)LGSTTUVQZISBHTPL(3x6)RMT(7x11)JORYMBJ(4x6)WVSO(443x10)(213x13)(44x3)(3x14)YDU(1x9)F(10x1)BWNYMWFUKM(8x7)UPGXQEGW(69x14)(9x14)FALJFRNYI(9x9)RBOIRPAMU(6x14)TERJIJ(2x8)TD(15x3)KJINFDWSHCQIEUL(80x14)(13x12)YDQKTRXZPSOOB(3x15)OXE(22x15)ATFZSYWRSMRMWFSSBZTWYK(16x8)UBZETPSJACZFSECV(17x2)OJNQOYVYXIOGFTHEW(30x15)WNOSVAFBXUNHLQNMVAXMKLFBMVEKMD(23x6)(17x9)(11x3)XIHYQHJWHVD(125x14)(7x4)ICFHBLA(72x4)(9x15)KJVZFZXXL(18x12)BRLFGPARHILSEGLVFB(3x12)GFX(6x5)TISUXV(7x7)WMQUWIT(28x13)(22x7)YISLXULNQPVSBKABASDWSV(10x14)VETBLITIAF(13x10)QHUXBIHXPZTMC(75x11)(68x10)(61x13)(54x10)(1x2)O(31x7)MEBIZTAYPUAPGQAYWMUTGOIHMRWVBIE(6x6)ZTHNRO(49x11)(43x5)(3x6)OSC(8x8)LJQDDOGZ(15x10)XWHFNHTLUSZUJMQ(140x13)(98x3)(35x9)YQBPVSDYFKTUEVECOYYVSYKBPPIMHGEGJHH(19x3)LYLRVPIJVTJIKIAQSHG(2x5)MD(4x4)GVME(10x6)CDSWCITZPL(4x8)PQFV(2x2)QJ(14x8)LDAXJWGUMKLVRU(110x13)(3x3)UQX(6x10)TGVLKX(11x5)UCBHONGLAUP(66x15)(12x2)YIMWRKDRBRJN(13x12)IZQOYGTUNZTGV(22x3)ZQDTFHLZBTTHCWPKHDDTPY(56x6)(3x3)HEU(10x9)UKOZORNJWY(25x10)YIJVCIZSIGVAZFRSCAPFFKQQM(97x11)(91x3)(8x7)FHJNTEYH(15x13)FOARJPQAZBXCHUD(3x5)CWW(18x15)YNCIIAHKAFMQZCMTRF(16x12)SPSNBWDRIFLOGUZW(148x15)(89x14)(14x5)ETRROSLESWBLWP(7x13)LRPWUCK(5x12)ANFDM(31x3)SPFASFSHXEBCITEEKEPRHJVTSEMHBVL(2x10)QA(46x7)(3x4)JJE(32x7)YVAPHWJEYIOEXKEBJMJQHIHIVLEWSSDP(24x13)(8x14)BZUKOVBV(5x2)XXUYW(2x10)CS''' print("Length of unzipped file: ", unzip_len(zipped))
679.823529
11,050
0.832569
1,508
11,557
6.372016
0.71618
0.003642
0.004579
0.004371
0.003538
0
0
0
0
0
0
0.229725
0.012027
11,557
16
11,051
722.3125
0.611841
0
0
0
0
0.071429
0.95864
0.954833
0
0
0
0
0
1
0.071429
false
0
0.071429
0
0.214286
0.071429
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
457f53e93aa3f918c3ea442acec6ebdd24ca795d
344
py
Python
tests/context.py
efebarlas/ihale
4cd647e1048287e0e106a961f1e360a9c44de0c8
[ "MIT" ]
null
null
null
tests/context.py
efebarlas/ihale
4cd647e1048287e0e106a961f1e360a9c44de0c8
[ "MIT" ]
null
null
null
tests/context.py
efebarlas/ihale
4cd647e1048287e0e106a961f1e360a9c44de0c8
[ "MIT" ]
null
null
null
import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from ihaleGozlemevi.lib import data_driven_design # noqa # pylint: disable=unused-import, wrong-import-position, import-error from ihaleGozlemevi.lib import utils # noqa # pylint: disable=unused-import, wrong-import-position, import-error
49.142857
125
0.784884
50
344
5.28
0.48
0.068182
0.159091
0.204545
0.44697
0.44697
0.44697
0.44697
0.44697
0.44697
0
0.003185
0.087209
344
6
126
57.333333
0.83758
0.421512
0
0
0
0
0.010309
0
0
0
0
0
0
1
0
true
0
0.8
0
0.8
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
45ab6bd0a1a299b5999e39855b53dc908b104989
40
py
Python
py2gmsh/__init__.py
tridelat/py2gmsh
bfa0cd69506af359b39bb95c239a1faf7b47286a
[ "MIT" ]
4
2019-05-24T12:44:53.000Z
2021-01-24T05:30:10.000Z
py2gmsh/__init__.py
tridelat/py2gmsh
bfa0cd69506af359b39bb95c239a1faf7b47286a
[ "MIT" ]
2
2019-10-15T05:33:14.000Z
2020-03-13T09:54:04.000Z
py2gmsh/__init__.py
tridelat/py2gmsh
bfa0cd69506af359b39bb95c239a1faf7b47286a
[ "MIT" ]
5
2019-06-14T05:55:36.000Z
2021-04-01T08:33:35.000Z
from .Mesh import (Mesh, geometry2mesh)
20
39
0.775
5
40
6.2
0.8
0
0
0
0
0
0
0
0
0
0
0.028571
0.125
40
1
40
40
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
0
5
afe7c3dd1bfb0c2f36ddfa24856d45bd02dcb36e
176
py
Python
maestrofinder_app/admin.py
BethanyFolino/MaestroFinder
88a912cfbbe49725d408c796d64216b3bfaafa95
[ "MIT" ]
null
null
null
maestrofinder_app/admin.py
BethanyFolino/MaestroFinder
88a912cfbbe49725d408c796d64216b3bfaafa95
[ "MIT" ]
null
null
null
maestrofinder_app/admin.py
BethanyFolino/MaestroFinder
88a912cfbbe49725d408c796d64216b3bfaafa95
[ "MIT" ]
null
null
null
from django.contrib import admin from maestrofinder_app.models import Musician, Request # Register your models here. admin.site.register(Musician) admin.site.register(Request)
29.333333
54
0.835227
24
176
6.083333
0.583333
0.123288
0.232877
0
0
0
0
0
0
0
0
0
0.090909
176
6
55
29.333333
0.9125
0.147727
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
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
1
0
0
0
0
5
afec68a22746ddfa0ca46a00022a9b5e2b429807
48
py
Python
src/server_py3/aps/src/wes/api/v3/search/__init__.py
kfrime/yonder
cd2f491c24f8552aeadd6ee48c601e1194a2e082
[ "MIT" ]
null
null
null
src/server_py3/aps/src/wes/api/v3/search/__init__.py
kfrime/yonder
cd2f491c24f8552aeadd6ee48c601e1194a2e082
[ "MIT" ]
12
2020-01-04T03:30:02.000Z
2021-06-02T01:22:45.000Z
src/server_py3/aps/src/wes/api/v3/search/__init__.py
kfrime/yonder
cd2f491c24f8552aeadd6ee48c601e1194a2e082
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from . import search
12
23
0.666667
7
48
4.571429
1
0
0
0
0
0
0
0
0
0
0
0.026316
0.208333
48
3
24
16
0.815789
0.4375
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
0
5
aff59ff593ee623ba52d025d0760b984bc8a65da
23
py
Python
PCTC/2018 R2/Q3.py
object-oriented-human/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
1
2022-02-21T15:43:01.000Z
2022-02-21T15:43:01.000Z
PCTC/2018 R2/Q3.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
PCTC/2018 R2/Q3.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
print("E"*len(input()))
23
23
0.608696
4
23
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0
23
1
23
23
0.608696
0
0
0
0
0
0.041667
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
b327c39eab0151db148160f1337539ebaccf6d70
88
py
Python
doubletdetection/__init__.py
granatumx/gbox-doubletdetection
0b8f421d79470a2c7a132eab082482991b9d7d64
[ "MIT" ]
1
2018-11-24T21:57:07.000Z
2018-11-24T21:57:07.000Z
doubletdetection/__init__.py
granatumx/gbox-doubletdetection
0b8f421d79470a2c7a132eab082482991b9d7d64
[ "MIT" ]
null
null
null
doubletdetection/__init__.py
granatumx/gbox-doubletdetection
0b8f421d79470a2c7a132eab082482991b9d7d64
[ "MIT" ]
3
2018-07-12T09:31:59.000Z
2021-07-16T22:41:56.000Z
from .doubletdetection import BoostClassifier, load_mtx, load_10x_h5 from . import plot
29.333333
68
0.840909
12
88
5.916667
0.75
0
0
0
0
0
0
0
0
0
0
0.038462
0.113636
88
2
69
44
0.871795
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
1
0
0
5
b3400b8a564fe7bffdca86a806615498e87f8cb3
103
py
Python
itdagene/app/pages/admin.py
itdagene-ntnu/itdagene
b972cd3d803debccebbc33641397a39834b8d69a
[ "MIT" ]
9
2018-10-17T20:58:09.000Z
2021-12-16T16:16:45.000Z
itdagene/app/pages/admin.py
itdagene-ntnu/itdagene
b972cd3d803debccebbc33641397a39834b8d69a
[ "MIT" ]
177
2018-10-27T18:15:56.000Z
2022-03-28T04:29:06.000Z
itdagene/app/pages/admin.py
itdagene-ntnu/itdagene
b972cd3d803debccebbc33641397a39834b8d69a
[ "MIT" ]
null
null
null
from django.contrib import admin from itdagene.app.pages.models import Page admin.site.register(Page)
20.6
42
0.825243
16
103
5.3125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.097087
103
4
43
25.75
0.913978
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2fa53a5d7a882e41a6d7670efc92e83158c7f854
676
py
Python
medicine/views.py
yhk24356/Open_Source_Programming
d63b6d0393e6615b1d070dbcc49fe542052aa89f
[ "Unlicense", "MIT" ]
null
null
null
medicine/views.py
yhk24356/Open_Source_Programming
d63b6d0393e6615b1d070dbcc49fe542052aa89f
[ "Unlicense", "MIT" ]
null
null
null
medicine/views.py
yhk24356/Open_Source_Programming
d63b6d0393e6615b1d070dbcc49fe542052aa89f
[ "Unlicense", "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def cold_medicine(request): return render(request, 'medicine/cold_medicine.html') def back_pain_medicine(request): return render(request, 'medicine/back_pain_medicine.html') def headache_medicine(request): return render(request, 'medicine/headache_medicine.html') def muscle_pain_medicine(request): return render(request, 'medicine/muscle_pain_medicine.html') def stomachache_medicine(request): return render(request, 'medicine/stomachache_medicine.html') def toothache_medicine(request): return render(request, 'medicine/toothache_medicine.html')
32.190476
64
0.798817
84
676
6.238095
0.27381
0.171756
0.240458
0.30916
0.496183
0.496183
0.175573
0
0
0
0
0
0.106509
676
21
65
32.190476
0.86755
0.034024
0
0
0
0
0.291411
0.291411
0
0
0
0
0
1
0.428571
false
0
0.142857
0.428571
1
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
1
0
0
5
2ff247b2de5feabd164f9764f9e59fd05c8d43b3
59
py
Python
bpreg/inference/__init__.py
MIC-DKFZ/BodyPartRegression
e6c686c97b9c75f80acd3b2e9ea9ec4818b008f0
[ "Apache-2.0" ]
30
2021-07-29T15:16:42.000Z
2022-03-29T13:18:54.000Z
bpreg/inference/__init__.py
MIC-DKFZ/BodyPartRegression
e6c686c97b9c75f80acd3b2e9ea9ec4818b008f0
[ "Apache-2.0" ]
1
2022-01-24T11:28:15.000Z
2022-01-24T11:31:30.000Z
bpreg/inference/__init__.py
MIC-DKFZ/BodyPartRegression
e6c686c97b9c75f80acd3b2e9ea9ec4818b008f0
[ "Apache-2.0" ]
4
2021-08-13T03:43:37.000Z
2022-03-11T07:16:45.000Z
from bpreg.inference.inference_model import InferenceModel
29.5
58
0.898305
7
59
7.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.067797
59
1
59
59
0.945455
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
1
0
0
5
6442ce653390ea808ed18fd94793d8f3c5779bba
133
py
Python
bot/product_filters/__init__.py
hqrrylyu/ob-eshop-telegram-bot
201547cbe309b7302fc2f4c94128d4621064f967
[ "MIT" ]
null
null
null
bot/product_filters/__init__.py
hqrrylyu/ob-eshop-telegram-bot
201547cbe309b7302fc2f4c94128d4621064f967
[ "MIT" ]
6
2019-10-04T14:00:06.000Z
2019-11-13T18:53:55.000Z
bot/product_filters/__init__.py
hqrrylyu/ob-eshop-telegram-bot
201547cbe309b7302fc2f4c94128d4621064f967
[ "MIT" ]
null
null
null
# flake8: noqa from .choices import FILTER_CHOICES_GETTERS, FilterChoice, get_filter_choice from .filters_dict import ProductFilters
33.25
76
0.857143
17
133
6.411765
0.764706
0
0
0
0
0
0
0
0
0
0
0.008333
0.097744
133
3
77
44.333333
0.9
0.090226
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
1
0
0
5
ff38db8d74da1ce5f7f061145664d23d62fd2f58
40
py
Python
avazu_ctr_prediction/__init__.py
aflaisler/kaggle-avazu-ctr
8acbed0f732d72146127076b07f61568212e1d0c
[ "BSD-3-Clause" ]
null
null
null
avazu_ctr_prediction/__init__.py
aflaisler/kaggle-avazu-ctr
8acbed0f732d72146127076b07f61568212e1d0c
[ "BSD-3-Clause" ]
null
null
null
avazu_ctr_prediction/__init__.py
aflaisler/kaggle-avazu-ctr
8acbed0f732d72146127076b07f61568212e1d0c
[ "BSD-3-Clause" ]
null
null
null
"""avazu_ctr_prediction main module."""
20
39
0.75
5
40
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.075
40
1
40
40
0.756757
0.825
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
ff511b22e92d461a0507d78a6cc01351cecb2320
92
py
Python
LaU/functions/__init__.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
51
2019-11-14T01:48:24.000Z
2021-11-09T02:42:22.000Z
LaU/functions/__init__.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
4
2019-11-15T10:14:10.000Z
2020-03-17T12:14:50.000Z
LaU/functions/__init__.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
9
2019-11-14T12:39:03.000Z
2020-03-03T08:27:19.000Z
from .location_aware_upsampling_func import LAUFunction, LDUFunction, LDUMultiOutputFunction
92
92
0.913043
9
92
9
1
0
0
0
0
0
0
0
0
0
0
0
0.054348
92
1
92
92
0.931034
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
1
0
0
5
ff78bf18ed93e5118fa3d03ffc5bdd1ebdd3c9dc
39
py
Python
examples/dd_app/ruleset_settings_local.py
datadealer/dd_app
3806b9b9df165a49f0fca8a249170b4ccd4d0177
[ "Artistic-2.0" ]
2
2018-12-17T10:10:49.000Z
2018-12-17T11:18:32.000Z
examples/dd_app/ruleset_settings_local.py
datadealer/dd_app
3806b9b9df165a49f0fca8a249170b4ccd4d0177
[ "Artistic-2.0" ]
null
null
null
examples/dd_app/ruleset_settings_local.py
datadealer/dd_app
3806b9b9df165a49f0fca8a249170b4ccd4d0177
[ "Artistic-2.0" ]
1
2021-06-06T22:28:12.000Z
2021-06-06T22:28:12.000Z
RULEPATH = '/home/dd_app/src/dd_rules'
19.5
38
0.74359
7
39
3.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.076923
39
1
39
39
0.75
0
0
0
0
0
0.641026
0.641026
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
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5