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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9420191fe2dbb3b415b5e2e46d21dc0f013989e3 | 1,058 | py | Python | python/anyascii/_data/_06d.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_06d.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_06d.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | b='Pan Jie Ye Hui Hui Zai Cheng Yin Wei Hou Jian Yang Lie Si Ji Er Xing Fu Sa Se Zhi Yin Wu Xi Kao Zhu Jiang Luo Luo An Dong Ti Mou Lei Yi Mi Quan Jin Po Wei Xiao Xie Hong Xu Su Kuang Tao Qie Ju Er Zhou Ru Ping Xun Xiong Zhi Guang Huan Ming Huo Wa Qia Pai Wu Qu Liu Yi Jia Jing Qian Jiang Jiao Zhen Shi Zhuo Ce Fa Hui Ji Liu Chan Hun Hu Nong Xun Jin Lie Qiu Wei Zhe Jun Han Bang Mang Zhuo You Xi Bo Dou Huan Hong Yi Pu Ying Lan Hao Lang Han Li Geng Fu Wu Lian Chun Feng Yi Yu Tong Lao Hai Jin Jia Chong Jiong Mei Sui Cheng Pei Xian Shen Tu Kun Ping Nie Han Jing Xiao She Nian Tu Yong Xiao Xian Ting E Su Tun Juan Cen Ti Li Shui Si Lei Shui Tao Du Lao Lai Lian Wei Wo Yun Huan Di Heng Run Jian Zhang Se Fu Guan Xing Shou Shuan Ya Chuo Zhang Ye Kong Wo Han Tuo Dong He Wo Ju She Liang Hun Ta Zhuo Dian Qie De Juan Zi Xi Xiao Qi Gu Guo Yan Lin Tang Zhou Peng Hao Chang Shu Qi Fang Zhi Lu Nao Ju Tao Cong Lei Zhe Ping Fei Song Tian Pi Dan Yu Ni Yu Lu Gan Mi Jing Ling Lun Yin Cui Qu Huai Yu Nian Shen Biao Chun Hu Yuan Lai Hun Qing Yan Qian Tian Miao Zhi Yin Bo' | 1,058 | 1,058 | 0.756144 | 257 | 1,058 | 3.11284 | 0.638132 | 0.015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.241021 | 1,058 | 1 | 1,058 | 1,058 | 0.996264 | 0 | 0 | 0 | 0 | 1 | 0.995279 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
94250dc80c4412fbeeb874906eaa229eb1d466c9 | 278 | py | Python | library/models/output_link.py | pipebio/api-examples | 7936471963540e0fcffc4342103848ae031ac815 | [
"BSD-3-Clause"
] | 2 | 2021-05-26T19:24:07.000Z | 2021-05-26T19:24:18.000Z | library/models/output_link.py | pipebio/api-examples | 7936471963540e0fcffc4342103848ae031ac815 | [
"BSD-3-Clause"
] | 2 | 2021-02-04T20:35:07.000Z | 2021-02-11T08:09:24.000Z | library/models/output_link.py | pipebio/api-examples | 7936471963540e0fcffc4342103848ae031ac815 | [
"BSD-3-Clause"
] | null | null | null |
class OutputLink:
expiry_timestamp: str
url: str
def __init__(self, url: str, expiry_timestamp: str):
self.url = url
self.expiry_timestamp = expiry_timestamp
def to_json(self):
return {'url': self.url, 'expires': self.expiry_timestamp} | 25.272727 | 66 | 0.658273 | 35 | 278 | 4.942857 | 0.371429 | 0.433526 | 0.208092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.241007 | 278 | 11 | 66 | 25.272727 | 0.819905 | 0 | 0 | 0 | 0 | 0 | 0.035971 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0.125 | 0.75 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
947f39617f80a8ee339752c5d95e698ca99488d5 | 171 | py | Python | utils/__init__.py | loopdigga96/numbers_recognition | dd1110d3fd18b5ca20278a010c550aeaad495e19 | [
"Apache-2.0"
] | 1 | 2020-07-03T14:51:22.000Z | 2020-07-03T14:51:22.000Z | utils/__init__.py | loopdigga96/numbers_recognition | dd1110d3fd18b5ca20278a010c550aeaad495e19 | [
"Apache-2.0"
] | null | null | null | utils/__init__.py | loopdigga96/numbers_recognition | dd1110d3fd18b5ca20278a010c550aeaad495e19 | [
"Apache-2.0"
] | null | null | null | from .metrics import word_error_rate, IterMeter, Metrics
from .model import ASRModel
from .preprocessing import greedy_decode, AudioDataset, TextTransform, data_processing | 57 | 86 | 0.859649 | 21 | 171 | 6.809524 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093567 | 171 | 3 | 86 | 57 | 0.922581 | 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 |
8473ed81cb56c385c53c514914164b2084361823 | 46 | py | Python | abc/149/a/answer.py | TakuyaNoguchi/atcoder | d079402e6fe9c9aaf3a6fc9272331ee71fc497da | [
"MIT"
] | null | null | null | abc/149/a/answer.py | TakuyaNoguchi/atcoder | d079402e6fe9c9aaf3a6fc9272331ee71fc497da | [
"MIT"
] | null | null | null | abc/149/a/answer.py | TakuyaNoguchi/atcoder | d079402e6fe9c9aaf3a6fc9272331ee71fc497da | [
"MIT"
] | null | null | null | S, T = input().split()
print(''.join([T, S])) | 15.333333 | 22 | 0.5 | 8 | 46 | 2.875 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 46 | 3 | 23 | 15.333333 | 0.575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0.5 | 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 |
8483b0f308e6222314f4f20ec3e00b99b1637048 | 89 | py | Python | mentiq/admin.py | kamransadixov/qanun | e134ee8d71b234f6ce95a818db9e39ebdea41b29 | [
"MIT"
] | null | null | null | mentiq/admin.py | kamransadixov/qanun | e134ee8d71b234f6ce95a818db9e39ebdea41b29 | [
"MIT"
] | 6 | 2021-03-19T02:30:26.000Z | 2022-03-12T00:26:39.000Z | mentiq/admin.py | kamransadixov/qanun | e134ee8d71b234f6ce95a818db9e39ebdea41b29 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Mentiq
admin.site.register(Mentiq)
| 17.8 | 32 | 0.820225 | 13 | 89 | 5.615385 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11236 | 89 | 4 | 33 | 22.25 | 0.924051 | 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 |
8483b2f709cfb95125cf6017892b77d2cfdc057a | 60 | py | Python | segmentation_models_pytorch/unet_variations/__init__.py | Olimon660/segmentation_models.pytorch | 28f9d56cc5bb61b33432b6fd038d13161da9ea6b | [
"MIT"
] | null | null | null | segmentation_models_pytorch/unet_variations/__init__.py | Olimon660/segmentation_models.pytorch | 28f9d56cc5bb61b33432b6fd038d13161da9ea6b | [
"MIT"
] | null | null | null | segmentation_models_pytorch/unet_variations/__init__.py | Olimon660/segmentation_models.pytorch | 28f9d56cc5bb61b33432b6fd038d13161da9ea6b | [
"MIT"
] | null | null | null | from .model import AttU_Net, R2AttU_Net, NestedUNet, R2U_Net | 60 | 60 | 0.833333 | 10 | 60 | 4.7 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037037 | 0.1 | 60 | 1 | 60 | 60 | 0.833333 | 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 |
84adf1409e5700f5b458adfa5e25c7ae3e1af53c | 83 | py | Python | app/logic/gitfeeder/models/__init__.py | imvu/bluesteel | ab52133249a693b3cd2d8593c5d47408a3b0fce6 | [
"MIT"
] | 10 | 2017-01-13T06:28:04.000Z | 2020-11-18T13:00:26.000Z | app/logic/gitfeeder/models/__init__.py | imvu/bluesteel | ab52133249a693b3cd2d8593c5d47408a3b0fce6 | [
"MIT"
] | null | null | null | app/logic/gitfeeder/models/__init__.py | imvu/bluesteel | ab52133249a693b3cd2d8593c5d47408a3b0fce6 | [
"MIT"
] | 2 | 2018-03-29T14:10:53.000Z | 2019-11-20T08:21:57.000Z | """ Automatic file """
from app.logic.gitfeeder.models.FeedModel import FeedEntry
| 20.75 | 58 | 0.771084 | 10 | 83 | 6.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108434 | 83 | 3 | 59 | 27.666667 | 0.864865 | 0.168675 | 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 |
84b4c3ce3893e4b585c2fb41740a21f738433108 | 82 | py | Python | libs/uix/kv/activity/baseclass/startscreen.py | keydach/skraffy | 3681f4acf2396456346ff6225b33a5a6f67a0857 | [
"MIT"
] | null | null | null | libs/uix/kv/activity/baseclass/startscreen.py | keydach/skraffy | 3681f4acf2396456346ff6225b33a5a6f67a0857 | [
"MIT"
] | null | null | null | libs/uix/kv/activity/baseclass/startscreen.py | keydach/skraffy | 3681f4acf2396456346ff6225b33a5a6f67a0857 | [
"MIT"
] | null | null | null | from kivy.uix.boxlayout import BoxLayout
class StartScreen(BoxLayout):
pass
| 13.666667 | 40 | 0.780488 | 10 | 82 | 6.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.158537 | 82 | 5 | 41 | 16.4 | 0.927536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
84cd1018553faf908fc2619671cd4f7b936166e6 | 121 | py | Python | careplus/admin.py | stemado/satb | 7ef5698db8125072e3609da3766d3e80feff6e40 | [
"MIT"
] | null | null | null | careplus/admin.py | stemado/satb | 7ef5698db8125072e3609da3766d3e80feff6e40 | [
"MIT"
] | 8 | 2020-03-24T15:42:15.000Z | 2022-01-13T00:44:54.000Z | careplus/admin.py | stemado/satb | 7ef5698db8125072e3609da3766d3e80feff6e40 | [
"MIT"
] | null | null | null | from django.contrib import admin
from careplus.medications.models import Medication
admin.site.register(Medication)
| 24.2 | 51 | 0.826446 | 15 | 121 | 6.666667 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115702 | 121 | 4 | 52 | 30.25 | 0.934579 | 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 |
ca2386f4cf92eb266334f9752c1d1f4a2783046b | 260 | py | Python | services/ui_backend_service/data/db/tables/__init__.py | runsascoded/metaflow-service | ac7770dfeae17fd060129d408fa3bb472fc00b86 | [
"Apache-2.0"
] | 103 | 2019-12-04T04:41:08.000Z | 2022-03-29T16:20:45.000Z | services/ui_backend_service/data/db/tables/__init__.py | runsascoded/metaflow-service | ac7770dfeae17fd060129d408fa3bb472fc00b86 | [
"Apache-2.0"
] | 42 | 2019-12-16T23:15:44.000Z | 2022-02-18T17:33:32.000Z | services/ui_backend_service/data/db/tables/__init__.py | valayDave/metaflow-service | 65e19aef268e9e707522ee0695fd4ebaee42aa69 | [
"Apache-2.0"
] | 36 | 2019-12-12T17:46:46.000Z | 2022-01-21T04:53:24.000Z | from .flow import AsyncFlowTablePostgres
from .run import AsyncRunTablePostgres
from .step import AsyncStepTablePostgres
from .task import AsyncTaskTablePostgres
from .metadata import AsyncMetadataTablePostgres
from .artifact import AsyncArtifactTablePostgres
| 37.142857 | 48 | 0.884615 | 24 | 260 | 9.583333 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.092308 | 260 | 6 | 49 | 43.333333 | 0.974576 | 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 |
ca265aa6f3a0b520a5d81fe8659d2a0afe542d52 | 112 | py | Python | yosim/alerts/admin.py | thoongnv/yosim | 22bcaceb2c40735363496d9404970a73c4b944bc | [
"MIT"
] | 2 | 2022-02-15T03:41:13.000Z | 2022-02-15T03:44:46.000Z | yosim/alerts/admin.py | thoongnv/yosim | 22bcaceb2c40735363496d9404970a73c4b944bc | [
"MIT"
] | 5 | 2021-06-08T22:26:24.000Z | 2022-03-12T00:21:35.000Z | yosim/alerts/admin.py | thoongnv/yosim | 22bcaceb2c40735363496d9404970a73c4b944bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Alert
admin.site.register(Alert)
| 16 | 32 | 0.723214 | 16 | 112 | 5.0625 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0.142857 | 112 | 6 | 33 | 18.666667 | 0.833333 | 0.1875 | 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 |
ca6899f240449939d3634b3bce4faae44ebb408a | 5,216 | py | Python | testrepo/horizon/basesetup.py | Rydor/horizon-selenium | 4ad65e996492399609af1d4cc1ac4185ac973caf | [
"Apache-2.0"
] | 1 | 2017-01-18T16:25:32.000Z | 2017-01-18T16:25:32.000Z | testrepo/horizon/basesetup.py | Rydor/horizon-selenium | 4ad65e996492399609af1d4cc1ac4185ac973caf | [
"Apache-2.0"
] | null | null | null | testrepo/horizon/basesetup.py | Rydor/horizon-selenium | 4ad65e996492399609af1d4cc1ac4185ac973caf | [
"Apache-2.0"
] | null | null | null | import config
import logging
import time
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.proxy import *
from selenium.webdriver.support.ui import WebDriverWait, Select
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
log_format = "%(asctime)s %(name)s [%(levelname)s] %(message)s"
logging.basicConfig(format=log_format, filename='horizon.log',
level=logging.ERROR)
class BaseSetup(object):
def login_with_credentials(self):
try:
"""
This is used to test remotely and through Jenkins.
Ensure when committing code that this value is not commented out.
"""
# self.driver = webdriver.PhantomJS()
"""
:service_args: configuration management for phantomjs
This is used for testing headless and locally.
"""
# service_args = ['--proxy=localhost:9999', '--proxy-type=socks5'
service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=any']
self.driver = webdriver.PhantomJS(service_args=service_args)
"""
FIREFOX
The next few lines are needed if you want to execute
tests in firefox for the visual display of the tests.
"""
# myProxy = "localhost:9999"
# proxy = Proxy({
# 'proxyType': ProxyType.MANUAL,
# 'socksProxy': myProxy
# })
# caps = DesiredCapabilities.FIREFOX
# caps["marionette"] = True
# self.driver = webdriver.Firefox(proxy=proxy)
# self.driver = webdriver.Firefox(capabilities=caps)
# self.driver = webdriver.Firefox()
"""
This will create the session within which all actions take place
"""
# self.driver.set_window_size(1920, 1080)
self.driver.maximize_window()
conf = config.app['horizon']
user = conf['username']
passwd = conf['horizon_password']
ext_vip = conf['external_lb_vip_address']
url = "https://{0}/".format(ext_vip)
self.driver.get(url)
userbox = self.driver.find_element_by_id('id_username')
passbox = self.driver.find_element_by_id('id_password')
userbox.send_keys(user)
passbox.send_keys(passwd)
self.driver.find_element_by_id('loginBtn').submit()
# time.sleep(1)
"""
element is used to ensure the page has fully
loaded before we start accessing the page elements
"""
element = WebDriverWait(self.driver, 10).until(
ec.text_to_be_present_in_element((By.CSS_SELECTOR, "h1"),
"Projects")
)
# time.sleep(5)
except Exception, e:
self.driver.save_screenshot('setup.png')
logging.error(
"Setup failed... {}".format(e), exc_info=True)
raise
def login_no_credentials(self):
try:
"""
This is used to test remotely and through Jenkins.
Ensure when committing code that this value is not commented out.
"""
# self.driver = webdriver.PhantomJS()
"""
:service_args: configuration management for phantomjs
This is used for testing headless and locally.
"""
# service_args = ['--proxy=localhost:9999', '--proxy-type=socks5'
service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=any']
self.driver = webdriver.PhantomJS(service_args=service_args)
"""
FIREFOX
The next few lines are needed if you want to execute
tests in firefox for the visual display of the tests.
"""
# myProxy = "localhost:9999"
# proxy = Proxy({
# 'proxyType': ProxyType.MANUAL,
# 'socksProxy': myProxy
# })
# caps = DesiredCapabilities.FIREFOX
# caps["marionette"] = True
# self.driver = webdriver.Firefox(proxy=proxy)
# self.driver = webdriver.Firefox(capabilities=caps)
# self.driver = webdriver.Firefox()
"""
This will create the session within which all actions take place
"""
# self.driver.set_window_size(1920, 1080)
self.driver.maximize_window()
conf = config.app['horizon']
self.user = conf['username']
self.passwd = conf['horizon_password']
ext_vip = conf['external_lb_vip_address']
url = "https://{0}/".format(ext_vip)
self.driver.get(url)
except Exception, e:
self.driver.save_screenshot('setup.png')
logging.error(
"Setup failed... {}".format(e), exc_info=True)
raise
if __name__ == '__main__':
unittest.main()
| 38.072993 | 78 | 0.564801 | 540 | 5,216 | 5.331481 | 0.325926 | 0.076415 | 0.065995 | 0.054185 | 0.717263 | 0.717263 | 0.708579 | 0.689823 | 0.689823 | 0.689823 | 0 | 0.011819 | 0.334931 | 5,216 | 136 | 79 | 38.352941 | 0.818103 | 0.173121 | 0 | 0.45614 | 0 | 0 | 0.125541 | 0.031302 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.070175 | 0.175439 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
ca78ee81c86fcc79eb9bd20ccd3da161c3dd38e9 | 25 | py | Python | tests/java/org/python/indexer/data/test.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 577 | 2020-06-04T16:34:44.000Z | 2022-03-31T11:46:07.000Z | tests/java/org/python/indexer/data/test.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 174 | 2015-01-08T20:37:09.000Z | 2020-06-03T16:48:59.000Z | tests/java/org/python/indexer/data/test.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 162 | 2015-02-07T02:14:38.000Z | 2020-05-30T16:42:03.000Z | class Foo:
pass
Foo()
| 5 | 10 | 0.6 | 4 | 25 | 3.75 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.28 | 25 | 4 | 11 | 6.25 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0 | 0 | 0.333333 | 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 |
0461e9201e5dbd5e7696a3992c34381604d86046 | 129 | py | Python | projects/automation_cookbook/directory.py | SavantLogics/Visual_Studio_Python_Scripts-master | 9e3c5f8a8f685f9ae51045af9260ccc28f89d72f | [
"MIT"
] | null | null | null | projects/automation_cookbook/directory.py | SavantLogics/Visual_Studio_Python_Scripts-master | 9e3c5f8a8f685f9ae51045af9260ccc28f89d72f | [
"MIT"
] | null | null | null | projects/automation_cookbook/directory.py | SavantLogics/Visual_Studio_Python_Scripts-master | 9e3c5f8a8f685f9ae51045af9260ccc28f89d72f | [
"MIT"
] | null | null | null | import delorean
# Example using dir
dir(delorean)
# This lists all definitions available in the x module.
print(dir(delorean)) | 18.428571 | 55 | 0.775194 | 19 | 129 | 5.263158 | 0.789474 | 0.22 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155039 | 129 | 7 | 56 | 18.428571 | 0.917431 | 0.550388 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0.333333 | 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 |
046e977f88df040ef0205efeb9dd1867bd8ce1af | 20,291 | py | Python | tests/unit/mock/config/parser/cisco_nxos/nxos_full_received.py | minitriga/netutils | b63174b6b3d01046fac498968ec53f80f7d2d5ed | [
"Apache-2.0"
] | null | null | null | tests/unit/mock/config/parser/cisco_nxos/nxos_full_received.py | minitriga/netutils | b63174b6b3d01046fac498968ec53f80f7d2d5ed | [
"Apache-2.0"
] | null | null | null | tests/unit/mock/config/parser/cisco_nxos/nxos_full_received.py | minitriga/netutils | b63174b6b3d01046fac498968ec53f80f7d2d5ed | [
"Apache-2.0"
] | 1 | 2022-01-26T22:10:51.000Z | 2022-01-26T22:10:51.000Z | from netutils.config.parser import ConfigLine
data = [
ConfigLine(config_line="version 9.3(3) Bios:version", parents=()),
ConfigLine(config_line="hostname jcy-spine-01", parents=()),
ConfigLine(config_line="vdc jcy-spine-01 id 1", parents=()),
ConfigLine(config_line=" limit-resource vlan minimum 16 maximum 4094", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line=" limit-resource vrf minimum 2 maximum 4096", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line=" limit-resource port-channel minimum 0 maximum 511", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line=" limit-resource u4route-mem minimum 128 maximum 128", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line=" limit-resource u6route-mem minimum 96 maximum 96", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line=" limit-resource m4route-mem minimum 58 maximum 58", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line=" limit-resource m6route-mem minimum 8 maximum 8", parents=("vdc jcy-spine-01 id 1",)),
ConfigLine(config_line="feature nxapi", parents=()),
ConfigLine(config_line="feature bash-shell", parents=()),
ConfigLine(config_line="feature scp-server", parents=()),
ConfigLine(config_line="cfs eth distribute", parents=()),
ConfigLine(config_line="feature bgp", parents=()),
ConfigLine(config_line="feature interface-vlan", parents=()),
ConfigLine(config_line="feature hsrp", parents=()),
ConfigLine(config_line="feature vpc", parents=()),
ConfigLine(config_line="feature lldp", parents=()),
ConfigLine(config_line="banner motd ^C", parents=()),
ConfigLine(config_line="This is a test,\nbanner message.^C", parents=("banner motd ^C",)),
ConfigLine(config_line="logging level aaa 4", parents=()),
ConfigLine(config_line="logging level acllog 4", parents=()),
ConfigLine(config_line="logging level aclmgr 4", parents=()),
ConfigLine(config_line="logging level adbm 4", parents=()),
ConfigLine(config_line="logging level ascii-cfg 4", parents=()),
ConfigLine(config_line="logging level bootvar 4", parents=()),
ConfigLine(config_line="logging level callhome 4", parents=()),
ConfigLine(config_line="logging level capability 4", parents=()),
ConfigLine(config_line="logging level cdp 4", parents=()),
ConfigLine(config_line="logging level cert_enroll 4", parents=()),
ConfigLine(config_line="logging level cfs 4", parents=()),
ConfigLine(config_line="logging level clk_mgr 4", parents=()),
ConfigLine(config_line="logging level confcheck 4", parents=()),
ConfigLine(config_line="logging level copp 4", parents=()),
ConfigLine(config_line="logging level dhclient 4", parents=()),
ConfigLine(config_line="logging level diag_port_lb 4", parents=()),
ConfigLine(config_line="logging level diagclient 4", parents=()),
ConfigLine(config_line="logging level diagmgr 4", parents=()),
ConfigLine(config_line="logging level eltm 4", parents=()),
ConfigLine(config_line="logging level eth_dstats 4", parents=()),
ConfigLine(config_line="logging level eth_port_channel 4", parents=()),
ConfigLine(config_line="logging level ethpm 4", parents=()),
ConfigLine(config_line="logging level evmc 4", parents=()),
ConfigLine(config_line="logging level evms 4", parents=()),
ConfigLine(config_line="logging level feature-mgr 4", parents=()),
ConfigLine(config_line="logging level fs-daemon 4", parents=()),
ConfigLine(config_line="logging level hsrp 4", parents=()),
ConfigLine(config_line="logging level ifmgr 4", parents=()),
ConfigLine(config_line="logging level interface-vlan 4", parents=()),
ConfigLine(config_line="logging level ipfib 4", parents=()),
ConfigLine(config_line="logging level l2fm 4", parents=()),
ConfigLine(config_line="logging level l2pt 4", parents=()),
ConfigLine(config_line="logging level licmgr 4", parents=()),
ConfigLine(config_line="logging level lim 4", parents=()),
ConfigLine(config_line="logging level module 4", parents=()),
ConfigLine(config_line="logging level monitor 4", parents=()),
ConfigLine(config_line="logging level mvsh 4", parents=()),
ConfigLine(config_line="logging level ntp 4", parents=()),
ConfigLine(config_line="logging level otm 4", parents=()),
ConfigLine(config_line="logging level pfstat 4", parents=()),
ConfigLine(config_line="logging level platform 4", parents=()),
ConfigLine(config_line="logging level plcmgr 4", parents=()),
ConfigLine(config_line="logging level plugin 4", parents=()),
ConfigLine(config_line="logging level radius 4", parents=()),
ConfigLine(config_line="logging level res_mgr 4", parents=()),
ConfigLine(config_line="logging level sal 4", parents=()),
ConfigLine(config_line="logging level securityd 4", parents=()),
ConfigLine(config_line="logging level session-mgr 4", parents=()),
ConfigLine(config_line="logging level sksd 4", parents=()),
ConfigLine(config_line="logging level snmpd 4", parents=()),
ConfigLine(config_line="logging level snmpmib_proc 4", parents=()),
ConfigLine(config_line="logging level spanning-tree 4", parents=()),
ConfigLine(config_line="logging level stripcl 4", parents=()),
ConfigLine(config_line="logging level template_manager 4", parents=()),
ConfigLine(config_line="logging level ufdm 4", parents=()),
ConfigLine(config_line="logging level vdc_mgr 4", parents=()),
ConfigLine(config_line="logging level virtual-service 4", parents=()),
ConfigLine(config_line="logging level vlan_mgr 4", parents=()),
ConfigLine(config_line="logging level vpc 4", parents=()),
ConfigLine(config_line="logging level vshd 4", parents=()),
ConfigLine(config_line="logging level xbar 4", parents=()),
ConfigLine(config_line="logging level xmlma 4", parents=()),
ConfigLine(config_line="logging level urib 4", parents=()),
ConfigLine(config_line="logging level igmp 4", parents=()),
ConfigLine(config_line="logging level mrib 4", parents=()),
ConfigLine(config_line="logging level m6rib 4", parents=()),
ConfigLine(config_line="logging level arp 4", parents=()),
ConfigLine(config_line="logging level clis 4", parents=()),
ConfigLine(config_line="logging level netstack 4", parents=()),
ConfigLine(config_line="logging level bgp 4", parents=()),
ConfigLine(config_line="logging level icmpv6 4", parents=()),
ConfigLine(config_line="logging level adjmgr 4", parents=()),
ConfigLine(config_line="logging level pktmgr 4", parents=()),
ConfigLine(config_line="logging level ecp 4", parents=()),
ConfigLine(config_line="logging level rpm 4", parents=()),
ConfigLine(config_line="logging level smm 4", parents=()),
ConfigLine(config_line="logging level u6rib 4", parents=()),
ConfigLine(config_line="logging level lldp 4", parents=()),
ConfigLine(config_line="no password strength-check", parents=()),
ConfigLine(config_line="username admin password 5 <redacted_config> role network-admin", parents=()),
ConfigLine(config_line="username ntc password 5 <redacted_config> role network-admin", parents=()),
ConfigLine(config_line="username ntc passphrase lifetime 99999 warntime 14 gracetime 3", parents=()),
ConfigLine(config_line="ip domain-lookup", parents=()),
ConfigLine(config_line="ip domain-name infra.ntc.com", parents=()),
ConfigLine(config_line="ip access-list PERMIT_ROUTES", parents=()),
ConfigLine(config_line=" 10 permit ip any any", parents=("ip access-list PERMIT_ROUTES",)),
ConfigLine(config_line="copp profile strict", parents=()),
ConfigLine(config_line="snmp-server contact John Smith", parents=()),
ConfigLine(config_line="snmp-server location Network to Code - NYC | NY", parents=()),
ConfigLine(
config_line="snmp-server user ntc network-admin auth md5 0xe15d7e7768418903040d565987788402 priv 0xe15d7e7768418903040d565987788402 localizedkey",
parents=(),
),
ConfigLine(
config_line="snmp-server user admin auth md5 0x3c0c5d5139941831378b36418799e1cc priv 0x3c0c5d5139941831378b36418799e1cc localizedkey engineID 128:0:0:9:3:82:208:168:0:27:1",
parents=(),
),
ConfigLine(config_line="snmp-server host 10.1.1.1 traps version 2c networktocode", parents=()),
ConfigLine(config_line="rmon event 1 description FATAL(1) owner PMON@FATAL", parents=()),
ConfigLine(config_line="rmon event 2 description CRITICAL(2) owner PMON@CRITICAL", parents=()),
ConfigLine(config_line="rmon event 3 description ERROR(3) owner PMON@ERROR", parents=()),
ConfigLine(config_line="rmon event 4 description WARNING(4) owner PMON@WARNING", parents=()),
ConfigLine(config_line="rmon event 5 description INFORMATION(5) owner PMON@INFO", parents=()),
ConfigLine(config_line="snmp-server community secure group network-admin", parents=()),
ConfigLine(config_line="snmp-server community networktocode group network-operator", parents=()),
ConfigLine(config_line="ntp server 10.1.1.1 use-vrf default", parents=()),
ConfigLine(config_line="ntp server 10.2.2.2 prefer use-vrf default", parents=()),
ConfigLine(config_line="ip route 0.0.0.0/0 10.0.0.2", parents=()),
ConfigLine(config_line="vlan 1,248", parents=()),
ConfigLine(config_line="vlan 248", parents=()),
ConfigLine(config_line=" name vlan248", parents=("vlan 248",)),
ConfigLine(config_line="route-map PERMIT_CONN_ROUTES permit 10", parents=()),
ConfigLine(config_line=" match ip address PERMIT_ROUTES", parents=("route-map PERMIT_CONN_ROUTES permit 10",)),
ConfigLine(config_line="vrf context management", parents=()),
ConfigLine(config_line="logging level sysmgr 4", parents=()),
ConfigLine(config_line="nxapi ssl ciphers weak", parents=()),
ConfigLine(config_line="nxapi ssl protocols TLSv1", parents=()),
ConfigLine(config_line="interface Vlan1", parents=()),
ConfigLine(config_line="interface Ethernet1/1", parents=()),
ConfigLine(config_line=" no switchport", parents=("interface Ethernet1/1",)),
ConfigLine(config_line=" mac-address 0000.1100.2222", parents=("interface Ethernet1/1",)),
ConfigLine(config_line=" ip address 10.10.10.5/30", parents=("interface Ethernet1/1",)),
ConfigLine(config_line=" no shutdown", parents=("interface Ethernet1/1",)),
ConfigLine(config_line="interface Ethernet1/2", parents=()),
ConfigLine(config_line=" no switchport", parents=("interface Ethernet1/2",)),
ConfigLine(config_line=" mac-address 0011.1111.2222", parents=("interface Ethernet1/2",)),
ConfigLine(config_line=" ip address 10.10.10.9/30", parents=("interface Ethernet1/2",)),
ConfigLine(config_line=" no shutdown", parents=("interface Ethernet1/2",)),
ConfigLine(config_line="interface Ethernet1/3", parents=()),
ConfigLine(config_line=" no switchport", parents=("interface Ethernet1/3",)),
ConfigLine(config_line=" mac-address 0022.1122.2222", parents=("interface Ethernet1/3",)),
ConfigLine(config_line=" ip address 10.10.10.13/30", parents=("interface Ethernet1/3",)),
ConfigLine(config_line=" no shutdown", parents=("interface Ethernet1/3",)),
ConfigLine(config_line="interface Ethernet1/4", parents=()),
ConfigLine(config_line=" no switchport", parents=("interface Ethernet1/4",)),
ConfigLine(config_line=" mac-address 0033.1133.2222", parents=("interface Ethernet1/4",)),
ConfigLine(config_line=" ip address 10.10.10.17/30", parents=("interface Ethernet1/4",)),
ConfigLine(config_line=" no shutdown", parents=("interface Ethernet1/4",)),
ConfigLine(config_line="interface Ethernet1/5", parents=()),
ConfigLine(config_line=" no switchport", parents=("interface Ethernet1/5",)),
ConfigLine(config_line=" mac-address 0044.1144.2222", parents=("interface Ethernet1/5",)),
ConfigLine(config_line=" ip address 10.10.11.6/30", parents=("interface Ethernet1/5",)),
ConfigLine(config_line=" no shutdown", parents=("interface Ethernet1/5",)),
ConfigLine(config_line="interface Ethernet1/6", parents=()),
ConfigLine(config_line="interface Ethernet1/7", parents=()),
ConfigLine(config_line="interface Ethernet1/8", parents=()),
ConfigLine(config_line="interface Ethernet1/9", parents=()),
ConfigLine(config_line="interface Ethernet1/10", parents=()),
ConfigLine(config_line="interface Ethernet1/11", parents=()),
ConfigLine(config_line="interface Ethernet1/12", parents=()),
ConfigLine(config_line="interface Ethernet1/13", parents=()),
ConfigLine(config_line="interface Ethernet1/14", parents=()),
ConfigLine(config_line="interface Ethernet1/15", parents=()),
ConfigLine(config_line="interface Ethernet1/16", parents=()),
ConfigLine(config_line="interface Ethernet1/17", parents=()),
ConfigLine(config_line="interface Ethernet1/18", parents=()),
ConfigLine(config_line="interface Ethernet1/19", parents=()),
ConfigLine(config_line="interface Ethernet1/20", parents=()),
ConfigLine(config_line="interface Ethernet1/21", parents=()),
ConfigLine(config_line="interface Ethernet1/22", parents=()),
ConfigLine(config_line="interface Ethernet1/23", parents=()),
ConfigLine(config_line="interface Ethernet1/24", parents=()),
ConfigLine(config_line="interface Ethernet1/25", parents=()),
ConfigLine(config_line="interface Ethernet1/26", parents=()),
ConfigLine(config_line="interface Ethernet1/27", parents=()),
ConfigLine(config_line="interface Ethernet1/28", parents=()),
ConfigLine(config_line="interface Ethernet1/29", parents=()),
ConfigLine(config_line="interface Ethernet1/30", parents=()),
ConfigLine(config_line="interface Ethernet1/31", parents=()),
ConfigLine(config_line="interface Ethernet1/32", parents=()),
ConfigLine(config_line="interface Ethernet1/33", parents=()),
ConfigLine(config_line="interface Ethernet1/34", parents=()),
ConfigLine(config_line="interface Ethernet1/35", parents=()),
ConfigLine(config_line="interface Ethernet1/36", parents=()),
ConfigLine(config_line="interface Ethernet1/37", parents=()),
ConfigLine(config_line="interface Ethernet1/38", parents=()),
ConfigLine(config_line="interface Ethernet1/39", parents=()),
ConfigLine(config_line="interface Ethernet1/40", parents=()),
ConfigLine(config_line="interface Ethernet1/41", parents=()),
ConfigLine(config_line="interface Ethernet1/42", parents=()),
ConfigLine(config_line="interface Ethernet1/43", parents=()),
ConfigLine(config_line="interface Ethernet1/44", parents=()),
ConfigLine(config_line="interface Ethernet1/45", parents=()),
ConfigLine(config_line="interface Ethernet1/46", parents=()),
ConfigLine(config_line="interface Ethernet1/47", parents=()),
ConfigLine(config_line="interface Ethernet1/48", parents=()),
ConfigLine(config_line="interface Ethernet1/49", parents=()),
ConfigLine(config_line="interface Ethernet1/50", parents=()),
ConfigLine(config_line="interface Ethernet1/51", parents=()),
ConfigLine(config_line="interface Ethernet1/52", parents=()),
ConfigLine(config_line="interface Ethernet1/53", parents=()),
ConfigLine(config_line="interface Ethernet1/54", parents=()),
ConfigLine(config_line="interface Ethernet1/55", parents=()),
ConfigLine(config_line="interface Ethernet1/56", parents=()),
ConfigLine(config_line="interface Ethernet1/57", parents=()),
ConfigLine(config_line="interface Ethernet1/58", parents=()),
ConfigLine(config_line="interface Ethernet1/59", parents=()),
ConfigLine(config_line="interface Ethernet1/60", parents=()),
ConfigLine(config_line="interface Ethernet1/61", parents=()),
ConfigLine(config_line="interface Ethernet1/62", parents=()),
ConfigLine(config_line="interface Ethernet1/63", parents=()),
ConfigLine(config_line="interface Ethernet1/64", parents=()),
ConfigLine(config_line="interface mgmt0", parents=()),
ConfigLine(config_line=" description MANAGEMENT_DO_NOT_CHANGE", parents=("interface mgmt0",)),
ConfigLine(config_line=" vrf member management", parents=("interface mgmt0",)),
ConfigLine(config_line=" ip address 10.0.0.15/24", parents=("interface mgmt0",)),
ConfigLine(config_line="interface loopback0", parents=()),
ConfigLine(config_line=" ip address 10.0.10.4/32", parents=("interface loopback0",)),
ConfigLine(config_line="line console", parents=()),
ConfigLine(config_line="line vty", parents=()),
ConfigLine(config_line="router bgp 65250", parents=()),
ConfigLine(config_line=" router-id 10.0.10.4", parents=("router bgp 65250",)),
ConfigLine(config_line=" log-neighbor-changes", parents=("router bgp 65250",)),
ConfigLine(config_line=" address-family ipv4 unicast", parents=("router bgp 65250",)),
ConfigLine(
config_line=" redistribute direct route-map PERMIT_CONN_ROUTES",
parents=("router bgp 65250", " address-family ipv4 unicast"),
),
ConfigLine(config_line=" neighbor 10.10.10.6", parents=("router bgp 65250",)),
ConfigLine(config_line=" remote-as 65250", parents=("router bgp 65250", " neighbor 10.10.10.6")),
ConfigLine(config_line=" address-family ipv4 unicast", parents=("router bgp 65250", " neighbor 10.10.10.6")),
ConfigLine(config_line=" neighbor 10.10.10.10", parents=("router bgp 65250",)),
ConfigLine(config_line=" remote-as 65250", parents=("router bgp 65250", " neighbor 10.10.10.10")),
ConfigLine(config_line=" address-family ipv4 unicast", parents=("router bgp 65250", " neighbor 10.10.10.10")),
ConfigLine(config_line=" neighbor 10.10.10.14", parents=("router bgp 65250",)),
ConfigLine(config_line=" remote-as 65250", parents=("router bgp 65250", " neighbor 10.10.10.14")),
ConfigLine(config_line=" address-family ipv4 unicast", parents=("router bgp 65250", " neighbor 10.10.10.14")),
ConfigLine(config_line=" neighbor 10.10.10.18", parents=("router bgp 65250",)),
ConfigLine(config_line=" remote-as 65250", parents=("router bgp 65250", " neighbor 10.10.10.18")),
ConfigLine(config_line=" address-family ipv4 unicast", parents=("router bgp 65250", " neighbor 10.10.10.18")),
ConfigLine(config_line=" neighbor 10.10.11.5", parents=("router bgp 65250",)),
ConfigLine(config_line=" remote-as 65251", parents=("router bgp 65250", " neighbor 10.10.11.5")),
ConfigLine(config_line=" address-family ipv4 unicast", parents=("router bgp 65250", " neighbor 10.10.11.5")),
ConfigLine(config_line="logging level l3vm 4", parents=()),
ConfigLine(config_line="logging server 10.125.1.171 6 port 7008", parents=()),
ConfigLine(config_line="logging source-interface mgmt0", parents=()),
ConfigLine(config_line="logging level kernel 4", parents=()),
ConfigLine(config_line="logging level user 4", parents=()),
ConfigLine(config_line="logging level mail 4", parents=()),
ConfigLine(config_line="logging level daemon 4", parents=()),
ConfigLine(config_line="logging level auth 4", parents=()),
ConfigLine(config_line="logging level syslog 4", parents=()),
ConfigLine(config_line="logging level lpr 4", parents=()),
ConfigLine(config_line="logging level news 4", parents=()),
ConfigLine(config_line="logging level uucp 4", parents=()),
ConfigLine(config_line="logging level cron 4", parents=()),
ConfigLine(config_line="logging level authpri 4", parents=()),
ConfigLine(config_line="logging level ftp 4", parents=()),
ConfigLine(config_line="logging level local0 4", parents=()),
ConfigLine(config_line="logging level local1 4", parents=()),
ConfigLine(config_line="logging level local2 4", parents=()),
ConfigLine(config_line="logging level local3 4", parents=()),
ConfigLine(config_line="logging level local4 4", parents=()),
ConfigLine(config_line="logging level local5 4", parents=()),
ConfigLine(config_line="logging level local6 4", parents=()),
ConfigLine(config_line="logging level local7 4", parents=()),
ConfigLine(config_line="logging origin-id hostname", parents=()),
ConfigLine(config_line="boot nxos bootflash:/nxos.9.3.3.bin sup-1", parents=()),
]
| 71.447183 | 181 | 0.713568 | 2,490 | 20,291 | 5.695984 | 0.141365 | 0.30459 | 0.380738 | 0.409293 | 0.819573 | 0.755482 | 0.511316 | 0.191779 | 0.131777 | 0.10576 | 0 | 0.056457 | 0.127938 | 20,291 | 283 | 182 | 71.699647 | 0.745069 | 0 | 0 | 0.028369 | 0 | 0.003546 | 0.39865 | 0.010547 | 0 | 0 | 0.006702 | 0 | 0 | 1 | 0 | false | 0.014184 | 0.003546 | 0 | 0.003546 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
0470afc6f9462896de530d382069eae45e288c32 | 4,982 | py | Python | transactions/forms.py | Shavia-bit/conec_0 | 8683cc2e8c1ebb7b70bcadc4a2587e84fd08939e | [
"MIT"
] | null | null | null | transactions/forms.py | Shavia-bit/conec_0 | 8683cc2e8c1ebb7b70bcadc4a2587e84fd08939e | [
"MIT"
] | null | null | null | transactions/forms.py | Shavia-bit/conec_0 | 8683cc2e8c1ebb7b70bcadc4a2587e84fd08939e | [
"MIT"
] | null | null | null | from django import forms
from django.forms import formset_factory
from .models import (
Supplier,
PurchaseBill,
PurchaseItem,
PurchaseBillDetails,
SaleBill,
SaleItem,
SaleBillDetails
)
from inventory.models import Stock
# form used to select a supplier
class SelectSupplierForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['supplier'].queryset = Supplier.objects.filter(is_deleted=False)
self.fields['supplier'].widget.attrs.update({'class': 'textinput form-control'})
class Meta:
model = PurchaseBill
fields = ['supplier']
# form used to render a single stock item form
class PurchaseItemForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['stock'].queryset = Stock.objects.filter(is_deleted=False)
self.fields['stock'].widget.attrs.update({'class': 'textinput form-control setprice stock', 'required': 'true'})
self.fields['quantity'].widget.attrs.update({'class': 'textinput form-control setprice quantity', 'min': '0', 'required': 'true'})
self.fields['perprice'].widget.attrs.update({'class': 'textinput form-control setprice price', 'min': '0', 'required': 'true'})
class Meta:
model = PurchaseItem
fields = ['stock', 'quantity', 'perprice']
# formset used to render multiple 'PurchaseItemForm'
PurchaseItemFormset = formset_factory(PurchaseItemForm, extra=1)
# form used to accept the other details for purchase bill
class PurchaseDetailsForm(forms.ModelForm):
class Meta:
model = PurchaseBillDetails
fields = ['eway','veh', 'destination', 'po', 'cgst', 'sgst', 'igst', 'cess', 'tcs', 'total']
# form used for supplier
class SupplierForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['name'].widget.attrs.update({'class': 'textinput form-control', 'pattern' : '[a-zA-Z\s]{1,50}', 'title' : 'Alphabets and Spaces only'})
self.fields['phone'].widget.attrs.update({'class': 'textinput form-control', 'maxlength': '13', 'pattern' : '[0-9]{13}', 'title' : 'Numbers only'})
self.fields['email'].widget.attrs.update({'class': 'textinput form-control'})
self.fields['gstin'].widget.attrs.update({'class': 'textinput form-control', 'maxlength': '4', 'pattern' : '[A-Z0-9]{4}', 'title' : 'GSTIN Format Required'})
class Meta:
model = Supplier
fields = ['name', 'phone', 'address', 'email', 'gstin']
widgets = {
'address' : forms.Textarea(
attrs = {
'class' : 'textinput form-control',
'rows' : '4'
}
)
}
# form used to get customer details
class SaleForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['name'].widget.attrs.update({'class': 'textinput form-control', 'pattern' : '[a-zA-Z\s]{1,50}', 'title' : 'Alphabets and Spaces only', 'required': 'true'})
self.fields['phone'].widget.attrs.update({'class': 'textinput form-control', 'maxlength': '13', 'pattern' : '[0-9]{13}', 'title' : 'Numbers only', 'required': 'true'})
self.fields['email'].widget.attrs.update({'class': 'textinput form-control'})
self.fields['gstin'].widget.attrs.update({'class': 'textinput form-control', 'maxlength': '4', 'pattern' : '[A-Z0-9]{4}', 'title' : 'GSTIN Format Required'})
class Meta:
model = SaleBill
fields = ['name', 'phone', 'address', 'email', 'gstin']
widgets = {
'address' : forms.Textarea(
attrs = {
'class' : 'textinput form-control',
'rows' : '4'
}
)
}
# form used to render a single stock item form
class SaleItemForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['stock'].queryset = Stock.objects.filter(is_deleted=False)
self.fields['stock'].widget.attrs.update({'class': 'textinput form-control setprice stock', 'required': 'true'})
self.fields['quantity'].widget.attrs.update({'class': 'textinput form-control setprice quantity', 'min': '0', 'required': 'true'})
self.fields['perprice'].widget.attrs.update({'class': 'textinput form-control setprice price', 'min': '0', 'required': 'true'})
class Meta:
model = SaleItem
fields = ['stock', 'quantity', 'perprice']
# formset used to render multiple 'SaleItemForm'
SaleItemFormset = formset_factory(SaleItemForm, extra=1)
# form used to accept the other details for sales bill
class SaleDetailsForm(forms.ModelForm):
class Meta:
model = SaleBillDetails
fields = ['eway','veh', 'destination', 'po', 'cgst', 'sgst', 'igst', 'cess', 'tcs', 'total']
| 46.12963 | 175 | 0.622842 | 550 | 4,982 | 5.558182 | 0.201818 | 0.058881 | 0.100098 | 0.139025 | 0.786719 | 0.76055 | 0.76055 | 0.734707 | 0.734707 | 0.699378 | 0 | 0.00861 | 0.207346 | 4,982 | 107 | 176 | 46.560748 | 0.76551 | 0.077077 | 0 | 0.523256 | 0 | 0 | 0.28095 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05814 | false | 0 | 0.046512 | 0 | 0.267442 | 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 |
04724734efb835991f3971a5dcc84fd106ffe5c1 | 533 | py | Python | ssz/constants.py | vaporyproject/py-ssz | 4968148ff7fd86d53d7d082fc0f218d18fc6a4c9 | [
"MIT"
] | null | null | null | ssz/constants.py | vaporyproject/py-ssz | 4968148ff7fd86d53d7d082fc0f218d18fc6a4c9 | [
"MIT"
] | null | null | null | ssz/constants.py | vaporyproject/py-ssz | 4968148ff7fd86d53d7d082fc0f218d18fc6a4c9 | [
"MIT"
] | null | null | null | BYTES_PREFIX_LENGTH = 4
# This constant was added here for optimization of calculating below value only once
MAX_LEN_SERIALIZED_BYTES_OBJECT = 2 ** (BYTES_PREFIX_LENGTH * 8)
CONTAINER_PREFIX_LENGTH = 4
# This constant was added here for optimization of calculating below value only once
MAX_LEN_SERIALIZED_CONTAINER_OBJECT = 2 ** (CONTAINER_PREFIX_LENGTH * 8)
LIST_PREFIX_LENGTH = 4
# This constant was added here for optimization of calculating below value only once
MAX_LEN_SERIALIZED_LIST_OBJECT = 2 ** (LIST_PREFIX_LENGTH * 8)
| 44.416667 | 84 | 0.816135 | 81 | 533 | 5.074074 | 0.308642 | 0.175182 | 0.094891 | 0.124088 | 0.722628 | 0.722628 | 0.722628 | 0.722628 | 0.722628 | 0.722628 | 0 | 0.019608 | 0.138837 | 533 | 11 | 85 | 48.454545 | 0.875817 | 0.465291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 |
b6b8d6d955dcdb6a7a8aa999e21c61f7ca64010e | 4,506 | py | Python | tests/test_config.py | dfdeshom/docker-services | 2055e0869129113637b8e4dd2554683349d632d0 | [
"MIT"
] | 5 | 2018-04-20T19:56:23.000Z | 2020-04-12T09:44:27.000Z | tests/test_config.py | dfdeshom/docker-services | 2055e0869129113637b8e4dd2554683349d632d0 | [
"MIT"
] | null | null | null | tests/test_config.py | dfdeshom/docker-services | 2055e0869129113637b8e4dd2554683349d632d0 | [
"MIT"
] | 1 | 2020-05-29T21:53:17.000Z | 2020-05-29T21:53:17.000Z | import atexit
import os
from docker_services import parse_services, start_docker_services, stop_docker_service
def test_parse_services_normal():
config = '''
postgres: postgres:10
redis: redis:latest
'''
services = parse_services(config)
assert len(services) == 2
assert services['postgres']['name'] == 'postgres'
assert services['postgres']['image'] == 'postgres:10'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis:latest'
def test_parse_services_mixed():
config = '''
postgres:
redis: redis:latest
'''
services = parse_services(config)
assert len(services) == 2
assert services['postgres']['name'] == 'postgres'
assert services['postgres']['image'] == 'postgres'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis:latest'
def test_parse_services_mixed_no_version():
config = '''
postgres:
redis: redis
'''
services = parse_services(config)
assert len(services) == 2
assert services['postgres']['name'] == 'postgres'
assert services['postgres']['image'] == 'postgres'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis'
def test_parse_services_mixed_no_image():
config = '''
postgres:
redis:
'''
services = parse_services(config)
assert len(services) == 2
assert services['postgres']['name'] == 'postgres'
assert services['postgres']['image'] == 'postgres'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis'
def test_parse_services_with_options():
config = '''
postgres:
name: pgdb
image: postgres:10
redis:
image: redis:latest
'''
services = parse_services(config)
assert len(services) == 2
assert services['pgdb']['name'] == 'pgdb'
assert services['pgdb']['image'] == 'postgres:10'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis:latest'
def test_parse_services_with_options_mixed():
config = '''
postgres:
name: pgdb
image: postgres:10
redis: redis:latest
'''
services = parse_services(config)
assert len(services) == 2
assert services['pgdb']['name'] == 'pgdb'
assert services['pgdb']['image'] == 'postgres:10'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis:latest'
def test_parse_services_with_variables():
config = '''
postgres:
image: postgres:10
environment:
POSTGRES_USERNAME: myuser
POSTGRES_PASSWORD: $3cr3t
POSTGRES_DB: mydb
_templates:
POSTGRES_PORT: "{env[POSTGRES_PORT_5432_TCP_PORT]/}"
DATABASE_URL: "postgres://myuser:$3cr3t@localhost:{env[POSTGRES_PORT_5432_TCP_PORT]/mydb}"
redis: redis:latest
'''
services = parse_services(config)
assert len(services) == 2
assert services['postgres']['name'] == 'postgres'
assert services['postgres']['image'] == 'postgres:10'
assert services['redis']['name'] == 'redis'
assert services['redis']['image'] == 'redis:latest'
def test_parse_services_with_variables_and_containers():
config = '''
postgres:
image: postgres:10
environment:
POSTGRES_USERNAME: myuser
POSTGRES_PASSWORD: $3cr3t
POSTGRES_DB: mydb
_templates:
POSTGRES_PORT: "{env[POSTGRES_PORT_5432_TCP_PORT]}"
DATABASE_URL: "postgres://{env[POSTGRES_USERNAME]}:{env[POSTGRES_PASSWORD]}@localhost:{env[POSTGRES_PORT_5432_TCP_PORT]}/{env[POSTGRES_DB]}"
redis: redis:latest
'''
for service in start_docker_services(config):
# Ensure services are removed at exit
atexit.register(stop_docker_service, service)
assert 'DATABASE_URL' in os.environ
assert os.environ['POSTGRES_PORT'] == os.environ['POSTGRES_PORT_5432_TCP_PORT']
# POSTGRES_PORT is a number, no ValueError when casting to int
port = int(os.environ['POSTGRES_PORT'])
# it is a positive integer
assert port > 0
database_url = 'postgres://myuser:$3cr3t@localhost:{port}/mydb'.format(port=port)
assert os.environ['DATABASE_URL'] == database_url
| 32.185714 | 160 | 0.616289 | 478 | 4,506 | 5.612971 | 0.144351 | 0.146105 | 0.099143 | 0.059635 | 0.76817 | 0.759597 | 0.730898 | 0.704808 | 0.679091 | 0.679091 | 0 | 0.015817 | 0.242344 | 4,506 | 139 | 161 | 32.417266 | 0.770064 | 0.026853 | 0 | 0.77193 | 0 | 0.008772 | 0.455251 | 0.079452 | 0 | 0 | 0 | 0 | 0.342105 | 1 | 0.070175 | false | 0.026316 | 0.026316 | 0 | 0.096491 | 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 |
b6f56beba76a8fbe087e2e3e8613dde1af458c5d | 85 | py | Python | scripts/make-env.py | rscohn2/IntelPythonExamples | a58714e68a1ee09e991060f13ca2e3ff063917ea | [
"MIT"
] | 2 | 2016-06-28T20:24:02.000Z | 2016-07-28T20:38:31.000Z | scripts/make-env.py | rscohn2/IntelPythonExamples | a58714e68a1ee09e991060f13ca2e3ff063917ea | [
"MIT"
] | null | null | null | scripts/make-env.py | rscohn2/IntelPythonExamples | a58714e68a1ee09e991060f13ca2e3ff063917ea | [
"MIT"
] | null | null | null | import os
os.system('conda create -n nb -c rscohn2 intelpython3_examples python=3')
| 21.25 | 73 | 0.776471 | 14 | 85 | 4.642857 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.040541 | 0.129412 | 85 | 3 | 74 | 28.333333 | 0.837838 | 0 | 0 | 0 | 0 | 0 | 0.714286 | 0.25 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
f3dcd760af5c4347adf599b81f95a7dd7cea694f | 348 | py | Python | src/tkfplaygroundpy/tests/test_core.py | tkf/tkfplaygroundpy | bf3ca6c6b2d784fbfb330c63849f7286cfc688eb | [
"MIT"
] | null | null | null | src/tkfplaygroundpy/tests/test_core.py | tkf/tkfplaygroundpy | bf3ca6c6b2d784fbfb330c63849f7286cfc688eb | [
"MIT"
] | null | null | null | src/tkfplaygroundpy/tests/test_core.py | tkf/tkfplaygroundpy | bf3ca6c6b2d784fbfb330c63849f7286cfc688eb | [
"MIT"
] | null | null | null | from packaging.version import Version # type: ignore
from pkg_resources import get_distribution
from .. import __version__
def f(x: int) -> int:
return x
# def g(x: int) -> str:
# return x
def test_always_pass():
pass
def test_version():
assert Version(get_distribution("tkfplaygroundpy").version) == Version(__version__)
| 16.571429 | 87 | 0.706897 | 46 | 348 | 5.043478 | 0.478261 | 0.112069 | 0.086207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.189655 | 348 | 20 | 88 | 17.4 | 0.822695 | 0.135057 | 0 | 0 | 0 | 0 | 0.050505 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 1 | 0.333333 | false | 0.222222 | 0.333333 | 0.111111 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 5 |
f3e1a6071daf7468d6bbf38d6546d2815bb792ca | 5,113 | py | Python | app/controllers/sample.py | jnlp-snowman/easy-japanese-checker | 87aaa13d8888a9f4191e379f794f0acb9b7fb7b0 | [
"MIT"
] | null | null | null | app/controllers/sample.py | jnlp-snowman/easy-japanese-checker | 87aaa13d8888a9f4191e379f794f0acb9b7fb7b0 | [
"MIT"
] | null | null | null | app/controllers/sample.py | jnlp-snowman/easy-japanese-checker | 87aaa13d8888a9f4191e379f794f0acb9b7fb7b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import logging
from bottle import route, template, post, get, request, HTTPResponse, redirect
from easy_japanese import EasyJapanese, MecabTagger, EasyJapanese2
from config_reader import read_config
# ロガー
logging.basicConfig(level=logging.DEBUG)
# コンフィグファイルの読み込み
config = read_config()
TAGGER_DIR = config.get('settings', 'mecab_systemdic')
# やさしい日本語インスタンスの生成
# easy_japanese = EasyJapanese(TAGGER_DIR) # user1
easy_japanese_2 = EasyJapanese2(TAGGER_DIR) # user2
logging.debug(TAGGER_DIR)
# 公開用
@route('/')
def index():
"""
やさしい日本語チェッカーにリダイレクト。
"""
redirect("/checker")
## User2用
# tokenize_2
@route('/register2')
def register_page():
"""
登録ページ
"""
return template("register2")
@route('/checker')
def checker_page():
"""
やさしい日本語チェッカー
"""
return template("checker2")
@route('/words2')
def show_words_from_db():
"""
やさしい日本語の単語一覧を出力
"""
from collections import defaultdict
try:
easy_unidic_view_words=easy_japanese_2.get_register_words()
except Exception as e:
logging.debug(type(e))
logging.debug(e.args)
return "データベースエラー"
word_dic = defaultdict(list)
if easy_unidic_view_words is None:
return template("show_words", word_dic=word_dic)
for word in easy_unidic_view_words:
if word.POS == None:
word.POS = "未知語"
# 名詞の分類
if word.POS == "名詞":
if word.POS_s1 == "普通名詞" and word.POS_s2 == "サ変可能":
word.POS = "サ変名詞"
elif word.POS_s1 == "普通名詞" and (word.POS_s2 == "形状詞可能" or word.POS_s2 == "サ変形状詞可能"):
word.POS = "形状詞"
word_dic[word.POS].append(word)
return template("show_words", word_dic=word_dic)
@get('/api/tokenize_2')
def tokenize():
"""
GETリクエストで送られてきた単語を分割し、返す
"""
text = request.query.input_text
if text == "":
result = ""
else:
result = easy_japanese_2.parse2web_register(text)
body = json.dumps(result)
r = HTTPResponse(status=200, body=body)
r.set_header('Content-Type', 'application/json')
return r
@post('/api/check_easy_2')
def check_easy():
"""
形態素を選択した際に、記録を反映する。
"""
unidic_id = request.json['unidic_id']
surface = request.json['surface']
morph_type = easy_japanese_2.change_easy(unidic_id, surface)
body = json.dumps(morph_type)
r = HTTPResponse(status=200, body=body)
r.set_header('Content-Type', 'application/json')
return r
@get('/api/easy_morph_count_2')
def get_number_of_easy_morph():
"""
"""
number = easy_japanese_2.get_number_of_easy_morph()
body = json.dumps(number)
r = HTTPResponse(status=200, body=body)
r.set_header('Content-Type', 'application/json')
return r
## User1用
# @route('/register')
# def index():
# """
# """
# return template("sample")
# @route('/checker')
# def page_checker():
# return template("checker")
# @route('/words')
# def show_words_from_db():
# from collections import defaultdict
# try:
# easy_unidic_view_words=easy_japanese.get_register_words()
# except Exception as e:
# logging.debug(type(e))
# logging.debug(e.args)
# return "データベースエラー"
# word_dic = defaultdict(list)
# if easy_unidic_view_words is None:
# return template("show_words", word_dic=word_dic)
# for word in easy_unidic_view_words:
# if word.POS == None:
# word.POS = "未知語"
# # 名詞の分類
# if word.POS == "名詞":
# if word.POS_s1 == "普通名詞" and word.POS_s2 == "サ変可能":
# word.POS = "サ変名詞"
# elif word.POS_s1 == "普通名詞" and (word.POS_s2 == "形状詞可能" or word.POS_s2 == "サ変形状詞可能"):
# word.POS = "形状詞"
# word_dic[word.POS].append(word)
# return template("show_words", word_dic=word_dic)
# @get('/api/tokenize')
# def tokenize():
# """
# GETリクエストで送られてきた単語を分割し、返す
# """
# text = request.query.input_text
# if text == "":
# result = ""
# else:
# result = easy_japanese.parse2web_register(text)
# body = json.dumps(result)
# r = HTTPResponse(status=200, body=body)
# r.set_header('Content-Type', 'application/json')
# return r
# @post('/api/check_easy')
# def check_easy():
# """
# 形態素を選択した際に、記録を反映する。
# """
# unidic_id = request.json['unidic_id']
# surface = request.json['surface']
# morph_type = easy_japanese.change_easy(unidic_id, surface)
# body = json.dumps(morph_type)
# r = HTTPResponse(status=200, body=body)
# r.set_header('Content-Type', 'application/json')
# return r
# @get('/api/easy_morph_count')
# def get_number_of_easy_morph():
# """
# """
# number = easy_japanese.get_number_of_easy_morph()
# body = json.dumps(number)
# r = HTTPResponse(status=200, body=body)
# r.set_header('Content-Type', 'application/json')
# return r
# # 文編集
# @route('/edit_sentence')
# def route_edit_sentence():
# return template("edit_sentence", users=easy_japanese.get_users())
| 24.347619 | 98 | 0.623509 | 624 | 5,113 | 4.889423 | 0.201923 | 0.050475 | 0.027532 | 0.037365 | 0.731563 | 0.719764 | 0.719764 | 0.719764 | 0.719764 | 0.692888 | 0 | 0.012732 | 0.231958 | 5,113 | 209 | 99 | 24.464115 | 0.764197 | 0.469392 | 0 | 0.161765 | 0 | 0 | 0.11616 | 0.009087 | 0 | 0 | 0 | 0 | 0 | 1 | 0.102941 | false | 0 | 0.088235 | 0 | 0.308824 | 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 |
f3e1e9771689a88797240e508141392af6f10c4d | 306 | py | Python | PythonCodeFile/Libraries.py | voooids/AIExample-for-Ship-Classification | 20d5a10e296899d8279dcc82b90e4c5653bfe554 | [
"MIT"
] | null | null | null | PythonCodeFile/Libraries.py | voooids/AIExample-for-Ship-Classification | 20d5a10e296899d8279dcc82b90e4c5653bfe554 | [
"MIT"
] | null | null | null | PythonCodeFile/Libraries.py | voooids/AIExample-for-Ship-Classification | 20d5a10e296899d8279dcc82b90e4c5653bfe554 | [
"MIT"
] | null | null | null | # 1. import All libraries
import tensorflow as tf
from tensorflow.keras.applications import VGG16
from tensorflow.keras.utils import plot_model
from tensorflow.keras.models import load_model
import numpy as np
from sklearn.model_selection import train_test_split
import os
import matplotlib.pyplot as plt
| 30.6 | 52 | 0.849673 | 47 | 306 | 5.425532 | 0.574468 | 0.164706 | 0.223529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011111 | 0.117647 | 306 | 9 | 53 | 34 | 0.933333 | 0.075163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
f3f32c9dad7fc3c62e19fb0563e392f5c6c54cf8 | 64 | py | Python | monoloco/monoloco/prep/__init__.py | galvinw/fairmotdocker | 032d50a4025788b97ca36b0d97b7df15ddb5986c | [
"MIT"
] | null | null | null | monoloco/monoloco/prep/__init__.py | galvinw/fairmotdocker | 032d50a4025788b97ca36b0d97b7df15ddb5986c | [
"MIT"
] | null | null | null | monoloco/monoloco/prep/__init__.py | galvinw/fairmotdocker | 032d50a4025788b97ca36b0d97b7df15ddb5986c | [
"MIT"
] | 2 | 2021-11-15T03:01:28.000Z | 2021-11-15T03:20:20.000Z |
from .preprocess_kitti import parse_ground_truth, factory_file
| 21.333333 | 62 | 0.875 | 9 | 64 | 5.777778 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09375 | 64 | 2 | 63 | 32 | 0.896552 | 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 |
6d2a659dc2d7f14e757da3c8c6b46996095db15b | 29 | py | Python | modules/2.79/bpy/types/Available.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/Available.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/Available.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | class Available:
pass
| 4.833333 | 16 | 0.62069 | 3 | 29 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.344828 | 29 | 5 | 17 | 5.8 | 0.947368 | 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 |
6d4c49878e3994edd0c7de98ef5439d579da7072 | 1,084 | py | Python | session01_Decorators/test_timelimit.py | morales-gregorio/Python-Module-of-the-Week | 2c68e20be3e174be9b91c92ac872806dd982e7d2 | [
"MIT"
] | 15 | 2017-06-22T11:57:38.000Z | 2022-03-31T13:34:07.000Z | session01_Decorators/test_timelimit.py | morales-gregorio/Python-Module-of-the-Week | 2c68e20be3e174be9b91c92ac872806dd982e7d2 | [
"MIT"
] | 3 | 2019-10-16T10:32:55.000Z | 2020-01-09T09:24:48.000Z | session01_Decorators/test_timelimit.py | morales-gregorio/Python-Module-of-the-Week | 2c68e20be3e174be9b91c92ac872806dd982e7d2 | [
"MIT"
] | 6 | 2016-10-07T12:50:24.000Z | 2019-11-28T11:15:04.000Z | #!/usr/bin/env python3
import sys, time
import pytest
def test_we_can_import_module():
pytest.importorskip('timelimit')
def test_context_manager_exists():
timelimit = pytest.importorskip('timelimit')
timelimit.timelimit
def test_context_manager_can_be_used():
timelimit = pytest.importorskip('timelimit')
with timelimit.timelimit(1):
pass
def test_sleep_1():
timelimit = pytest.importorskip('timelimit')
with timelimit.timelimit(2):
time.sleep(1)
def test_sleep_2():
timelimit = pytest.importorskip('timelimit')
with pytest.raises(RuntimeError):
with timelimit.timelimit(1):
time.sleep(2)
@pytest.mark.xfail
def test_sleep_nested():
# We expect this test to fail, because there's only one alarm timer,
# so we cannot nest them…
timelimit = pytest.importorskip('timelimit')
with pytest.raises(RuntimeError):
with timelimit.timelimit(1):
with timelimit.timelimit(5):
time.sleep(2)
if __name__ == '__main__':
pytest.main([__file__] + sys.argv[1:])
| 24.636364 | 72 | 0.685424 | 133 | 1,084 | 5.383459 | 0.390977 | 0.175978 | 0.226257 | 0.251397 | 0.488827 | 0.405028 | 0.405028 | 0.243017 | 0.243017 | 0.243017 | 0 | 0.013889 | 0.202952 | 1,084 | 43 | 73 | 25.209302 | 0.811343 | 0.103321 | 0 | 0.413793 | 0 | 0 | 0.063983 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.206897 | false | 0.034483 | 0.310345 | 0 | 0.517241 | 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 | 1 | 0 | 1 | 0 | 0 | 5 |
6d652c951c0f3a4c239ebdda0a3b56d310d249fc | 190 | py | Python | app.py | IqbalLx/news-please | 3f420a2bc2e2f202c96ba4fbb3c928a4c84ead4c | [
"Apache-2.0"
] | null | null | null | app.py | IqbalLx/news-please | 3f420a2bc2e2f202c96ba4fbb3c928a4c84ead4c | [
"Apache-2.0"
] | null | null | null | app.py | IqbalLx/news-please | 3f420a2bc2e2f202c96ba4fbb3c928a4c84ead4c | [
"Apache-2.0"
] | null | null | null | from newsplease import NewsPlease as nwpl
article = nwpl.from_url('https://www.cnbcindonesia.com/tech/20201224100526-37-211378/mohon-maaf-ini-alasan-vaksin-covid-19-tak-bisa-akhiri-pandem') | 63.333333 | 147 | 0.815789 | 29 | 190 | 5.310345 | 0.896552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132597 | 0.047368 | 190 | 3 | 147 | 63.333333 | 0.718232 | 0 | 0 | 0 | 0 | 0.5 | 0.628272 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
edb548720a4b2f46ef28c066041886221b34c30a | 700 | py | Python | bubbleimg/filters/__init__.py | aileisun/bubblepy | 054e7a3993659e7002f243c75253c2cb71d4fa73 | [
"MIT"
] | 3 | 2017-11-20T23:16:09.000Z | 2021-05-19T09:38:01.000Z | bubbleimg/filters/__init__.py | aileisun/bubblepy | 054e7a3993659e7002f243c75253c2cb71d4fa73 | [
"MIT"
] | null | null | null | bubbleimg/filters/__init__.py | aileisun/bubblepy | 054e7a3993659e7002f243c75253c2cb71d4fa73 | [
"MIT"
] | 3 | 2017-07-17T09:31:11.000Z | 2021-05-19T09:38:07.000Z | # __init__.py
# ALS 2016/05/02
__all__ = ['main','filtertools']
from bubbleimg.filters import main
from bubbleimg.filters import filtertools
from bubbleimg.filters import getzrange_batch
from bubbleimg.filters import getzrange_line
from bubbleimg.filters import getllambda
from bubbleimg.filters import surveysetup
from bubbleimg.filters import inttools
from bubbleimg.filters.filtertools import getFilterResponseFunc
from bubbleimg.filters.filtertools import getNormTransFunc
from bubbleimg.filters.filtertools import getFilterCentroids
from bubbleimg.filters.filtertools import getlocalpath
from bubbleimg.filters.filtertools import accessFile
from bubbleimg.filters.getllambda import getllambda | 36.842105 | 63 | 0.865714 | 82 | 700 | 7.268293 | 0.292683 | 0.283557 | 0.436242 | 0.305369 | 0.508389 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012539 | 0.088571 | 700 | 19 | 64 | 36.842105 | 0.92163 | 0.037143 | 0 | 0 | 0 | 0 | 0.022321 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.928571 | 0 | 0.928571 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
edc1efc7df24d09309e1c0286fa2442de722e3c7 | 390 | py | Python | A-vs-An/AvsAn-Python/AvsAn_test.py | JTOne123/a-vs-an | 70cd049f8a0efc8373cce9104870a764eb48b559 | [
"Apache-2.0"
] | null | null | null | A-vs-An/AvsAn-Python/AvsAn_test.py | JTOne123/a-vs-an | 70cd049f8a0efc8373cce9104870a764eb48b559 | [
"Apache-2.0"
] | null | null | null | A-vs-An/AvsAn-Python/AvsAn_test.py | JTOne123/a-vs-an | 70cd049f8a0efc8373cce9104870a764eb48b559 | [
"Apache-2.0"
] | null | null | null |
from AvsAn import AvsAn
result = AvsAn.getInstance().query("")
print result
result = AvsAn.getInstance().query("x")
print result
result = AvsAn.getInstance().query("\"x")
print result
result = AvsAn.getInstance().query("unanticipated result")
print result
result = AvsAn.getInstance().query("unanimous vote")
print result
result = AvsAn.getInstance().query("honest decision")
print result | 26 | 58 | 0.758974 | 48 | 390 | 6.166667 | 0.270833 | 0.222973 | 0.445946 | 0.547297 | 0.648649 | 0.648649 | 0.391892 | 0.391892 | 0.391892 | 0.391892 | 0 | 0 | 0.097436 | 390 | 15 | 59 | 26 | 0.840909 | 0 | 0 | 0.461538 | 0 | 0 | 0.130769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.076923 | null | null | 0.461538 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
edc8465c17ccde6a7db454136edaf578b2cfe178 | 1,565 | py | Python | tests/test_tsmath.py | sainjacobs/pydsm | 1f2175ae0e6d2a545a22b641617fd225a6a09bd1 | [
"MIT"
] | 3 | 2020-05-11T22:55:34.000Z | 2021-05-19T19:49:11.000Z | tests/test_tsmath.py | sainjacobs/pydsm | 1f2175ae0e6d2a545a22b641617fd225a6a09bd1 | [
"MIT"
] | 6 | 2020-02-12T23:18:38.000Z | 2022-02-18T20:31:53.000Z | tests/test_tsmath.py | sainjacobs/pydsm | 1f2175ae0e6d2a545a22b641617fd225a6a09bd1 | [
"MIT"
] | 1 | 2021-07-07T18:55:44.000Z | 2021-07-07T18:55:44.000Z | import pytest
import pydsm
import numpy as np
import pandas as pd
from pydsm.functions import tsmath
@pytest.fixture
def linear_timeseries():
'''
A simple increasing time series to use for averaging functions
```
01JAN2000 0100 - 0
01JAN2000 0200 - 1
....
01JAN2000 2200 - 21
01JAN2000 2300 - 22
02JAN2000 0000 - 23
```
'''
nvals=100
return pd.DataFrame(np.arange(0,nvals), columns=['values'], index=pd.date_range(start='01JAN2000 0100',periods=nvals,freq='H'))
def test_per_aver(linear_timeseries):
tsavg=tsmath.per_aver(linear_timeseries)
assert tsavg.loc['02JAN2000'].values[0] == sum(range(0,24))/24
def test_per_max(linear_timeseries):
tsmax=tsmath.per_max(linear_timeseries)
assert tsmax.loc['02JAN2000'].values[0] == 23
def test_per_min(linear_timeseries):
tsmin=tsmath.per_min(linear_timeseries)
assert tsmin.loc['02JAN2000'].values[0] == 0
def test_mse(linear_timeseries):
assert 0 == tsmath.mse(linear_timeseries.iloc[:,0],linear_timeseries.iloc[:,0])
def test_rmse(linear_timeseries):
assert 0 == tsmath.rmse(linear_timeseries.iloc[:,0],linear_timeseries.iloc[:,0])
def test_nse(linear_timeseries):
assert 1 == tsmath.nash_sutcliffe(linear_timeseries.iloc[:,0,],linear_timeseries.iloc[:,0])
def test_percent_bias(linear_timeseries):
assert 0 == tsmath.percent_bias(linear_timeseries.iloc[:,0],linear_timeseries.iloc[:,0])
def test_mean_error(linear_timeseries):
assert 0 == tsmath.mean_error(linear_timeseries.iloc[:,0], linear_timeseries.iloc[:,0]) | 32.604167 | 131 | 0.729073 | 220 | 1,565 | 4.995455 | 0.327273 | 0.320291 | 0.181984 | 0.191083 | 0.322111 | 0.216561 | 0.216561 | 0.216561 | 0.178344 | 0.178344 | 0 | 0.08599 | 0.138019 | 1,565 | 48 | 132 | 32.604167 | 0.728688 | 0.110543 | 0 | 0 | 0 | 0 | 0.035688 | 0 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.321429 | false | 0 | 0.178571 | 0 | 0.535714 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
edc9e47a82138bb8f5bc52b0b9b07ad65103dc7c | 90 | py | Python | guestbook/admin.py | dagothar/django-guestbook | ed3e9608f3b973187bd7987557b3b04375cb1549 | [
"MIT"
] | null | null | null | guestbook/admin.py | dagothar/django-guestbook | ed3e9608f3b973187bd7987557b3b04375cb1549 | [
"MIT"
] | null | null | null | guestbook/admin.py | dagothar/django-guestbook | ed3e9608f3b973187bd7987557b3b04375cb1549 | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
admin.site.register(models.Entry)
| 15 | 33 | 0.8 | 13 | 90 | 5.538462 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122222 | 90 | 5 | 34 | 18 | 0.911392 | 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 |
b61edf751c741366a3487f340db34e8b18ad14e4 | 57 | py | Python | enthought/pyface/wizard/simple_wizard.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/pyface/wizard/simple_wizard.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/pyface/wizard/simple_wizard.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from pyface.wizard.simple_wizard import *
| 19 | 41 | 0.807018 | 8 | 57 | 5.625 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122807 | 57 | 2 | 42 | 28.5 | 0.9 | 0.210526 | 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 |
b62021a0c59b8428409ce061e4dd5d51dead537d | 61 | py | Python | sqlpack/__init__.py | Snowflake-Labs/sqlpacks | 42c85ca102be334c6332ecf726055fd2d0dd80e9 | [
"Apache-2.0"
] | null | null | null | sqlpack/__init__.py | Snowflake-Labs/sqlpacks | 42c85ca102be334c6332ecf726055fd2d0dd80e9 | [
"Apache-2.0"
] | 2 | 2021-08-11T17:36:11.000Z | 2022-01-14T14:57:48.000Z | sqlpack/__init__.py | Snowflake-Labs/sqlpacks | 42c85ca102be334c6332ecf726055fd2d0dd80e9 | [
"Apache-2.0"
] | 1 | 2021-08-11T16:16:15.000Z | 2021-08-11T16:16:15.000Z | from .pack import print_sql, print_sample_data, list, search
| 30.5 | 60 | 0.819672 | 10 | 61 | 4.7 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114754 | 61 | 1 | 61 | 61 | 0.87037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 5 |
b648a97d39c4f9d9f85392df3b4202c29d3793e3 | 33 | py | Python | olc/__init__.py | pombredanne/olc | b708dc0143beaf209df1e0b9f8b18c1c3a1445ef | [
"CNRI-Python"
] | 2 | 2019-04-30T12:48:48.000Z | 2020-12-18T13:16:27.000Z | olc/__init__.py | pombredanne/olc | b708dc0143beaf209df1e0b9f8b18c1c3a1445ef | [
"CNRI-Python"
] | null | null | null | olc/__init__.py | pombredanne/olc | b708dc0143beaf209df1e0b9f8b18c1c3a1445ef | [
"CNRI-Python"
] | 1 | 2019-08-27T10:57:31.000Z | 2019-08-27T10:57:31.000Z | from .license_collector import *
| 16.5 | 32 | 0.818182 | 4 | 33 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.896552 | 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 |
b64fbc6fdffd2247971e9c869fb5a7a8df8fa9ff | 55 | py | Python | loss/__init__.py | VisualComputingInstitute/dcm-net | e021c69d7a27fc985450b6afadef0a3327161a1c | [
"MIT"
] | 100 | 2020-03-20T03:02:21.000Z | 2022-03-24T10:09:22.000Z | loss/__init__.py | VisualComputingInstitute/dcm-net | e021c69d7a27fc985450b6afadef0a3327161a1c | [
"MIT"
] | 13 | 2020-06-10T09:12:54.000Z | 2021-12-02T19:22:09.000Z | loss/__init__.py | VisualComputingInstitute/dcm-net | e021c69d7a27fc985450b6afadef0a3327161a1c | [
"MIT"
] | 11 | 2020-05-08T20:00:52.000Z | 2021-12-07T07:10:07.000Z | from .weighted_cross_entropy_loss import WeightedCELoss | 55 | 55 | 0.927273 | 7 | 55 | 6.857143 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.054545 | 55 | 1 | 55 | 55 | 0.923077 | 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 |
b65e8c197368eeadbf7e45848e22587bd8afccbc | 181 | py | Python | tests/__init__.py | FrNecas/sandcastle | ece539650770fea057877f0c97074acf506fada4 | [
"MIT"
] | 5 | 2019-06-19T11:14:54.000Z | 2019-08-06T14:33:28.000Z | tests/__init__.py | FrNecas/sandcastle | ece539650770fea057877f0c97074acf506fada4 | [
"MIT"
] | 97 | 2020-08-03T14:31:03.000Z | 2022-03-28T10:42:19.000Z | tests/__init__.py | FrNecas/sandcastle | ece539650770fea057877f0c97074acf506fada4 | [
"MIT"
] | 8 | 2019-06-18T13:19:46.000Z | 2020-02-06T11:38:17.000Z | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
from sandcastle.utils import set_logging
# set logging to debug while testing
set_logging(level=10)
| 22.625 | 47 | 0.80663 | 26 | 181 | 5.538462 | 0.807692 | 0.208333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012739 | 0.132597 | 181 | 7 | 48 | 25.857143 | 0.904459 | 0.60221 | 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 | 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 |
b66e27460059a46963c79b9f79545889d74cc0d3 | 69 | py | Python | game/__init__.py | CuriosityLabTAU/simon-says-hello | 41a86dae8a9be5e67b022b534b84d34444d83a29 | [
"Apache-2.0"
] | 1 | 2017-07-09T09:53:42.000Z | 2017-07-09T09:53:42.000Z | game/__init__.py | CuriosityLabTAU/simon-says-hello | 41a86dae8a9be5e67b022b534b84d34444d83a29 | [
"Apache-2.0"
] | null | null | null | game/__init__.py | CuriosityLabTAU/simon-says-hello | 41a86dae8a9be5e67b022b534b84d34444d83a29 | [
"Apache-2.0"
] | null | null | null | from child_kinect import *
from simon import *
from nao_move import * | 23 | 26 | 0.797101 | 11 | 69 | 4.818182 | 0.636364 | 0.377358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15942 | 69 | 3 | 27 | 23 | 0.913793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 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 |
b6872688f69cac140d8b39de7e752496fb74728f | 249 | py | Python | user/admin.py | urosjevremovic/Learning-platform | eedf0d4decea0be42fa70e2e90388b87d506a819 | [
"MIT"
] | null | null | null | user/admin.py | urosjevremovic/Learning-platform | eedf0d4decea0be42fa70e2e90388b87d506a819 | [
"MIT"
] | 6 | 2020-02-11T23:07:33.000Z | 2021-09-08T00:06:32.000Z | user/admin.py | urosjevremovic/Learning-platform | eedf0d4decea0be42fa70e2e90388b87d506a819 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from user.models import User
@admin.register(User)
class UserAdmin(UserAdmin):
list_display = ['username', 'password', 'date_of_birth', 'photo', 'email', 'bio']
| 24.9 | 85 | 0.751004 | 33 | 249 | 5.575758 | 0.636364 | 0.108696 | 0.184783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.120482 | 249 | 9 | 86 | 27.666667 | 0.840183 | 0 | 0 | 0 | 0 | 0 | 0.168675 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.166667 | 0.5 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
b6903eeaab2e71f29cf4d09f0a561ed08e072cb1 | 117 | py | Python | {{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/conftest.py | anthonyalmarza/django-rest-sqlite-template | 2313d8b49fb11ad53f75cd8d09de4107287dca6c | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/conftest.py | anthonyalmarza/django-rest-sqlite-template | 2313d8b49fb11ad53f75cd8d09de4107287dca6c | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/{{ cookiecutter.project_name }}/conftest.py | anthonyalmarza/django-rest-sqlite-template | 2313d8b49fb11ad53f75cd8d09de4107287dca6c | [
"MIT"
] | null | null | null | import pytest
from rest_framework.test import APIClient
@pytest.fixture()
def api_client():
return APIClient()
| 14.625 | 41 | 0.769231 | 15 | 117 | 5.866667 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145299 | 117 | 7 | 42 | 16.714286 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | true | 0 | 0.4 | 0.2 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 5 |
fcb610632ccf665d3b1fc2c43f439318285b9385 | 145 | py | Python | src/csharpyml/notebook/__init__.py | sdpython/csharpyml | f814af89c5b988924a7f31fe71ec6eb515292070 | [
"MIT"
] | 4 | 2018-06-07T06:34:32.000Z | 2020-02-12T17:39:58.000Z | src/csharpyml/notebook/__init__.py | sdpython/csharpyml | f814af89c5b988924a7f31fe71ec6eb515292070 | [
"MIT"
] | 13 | 2018-05-21T23:06:58.000Z | 2018-12-30T17:57:11.000Z | src/csharpyml/notebook/__init__.py | sdpython/csharpyml | f814af89c5b988924a7f31fe71ec6eb515292070 | [
"MIT"
] | null | null | null | # *-* coding: utf-8 -*-
"""
@file
@brief Uses `pythonnet <https://github.com/sdpython/pythonnet>`_.
"""
from .csmlmagics import register_magics
| 18.125 | 65 | 0.682759 | 17 | 145 | 5.705882 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007813 | 0.117241 | 145 | 7 | 66 | 20.714286 | 0.75 | 0.648276 | 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 |
fcb6e36472be462875e97918adf35e7eb00d697c | 217 | py | Python | tests/tcustommodulename.py | denim2x/nimpy | e0c2ad504867578dc94765b80ac190cf0c2025df | [
"MIT"
] | 1,076 | 2018-01-29T13:55:52.000Z | 2022-03-27T02:42:44.000Z | tests/tcustommodulename.py | denim2x/nimpy | e0c2ad504867578dc94765b80ac190cf0c2025df | [
"MIT"
] | 197 | 2018-01-29T11:22:52.000Z | 2022-03-30T09:40:15.000Z | tests/tcustommodulename.py | denim2x/nimpy | e0c2ad504867578dc94765b80ac190cf0c2025df | [
"MIT"
] | 65 | 2018-06-28T18:17:00.000Z | 2022-03-18T13:18:54.000Z |
# The _mycustommodulename module is built from custommodulename.nim file
import _mycustommodulename
assert(_mycustommodulename.hello() == 5)
assert(_mycustommodulename.__doc__ == """This is the doc
for my module""")
| 31 | 72 | 0.797235 | 25 | 217 | 6.6 | 0.68 | 0.290909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005181 | 0.110599 | 217 | 6 | 73 | 36.166667 | 0.849741 | 0.322581 | 0 | 0 | 0 | 0 | 0.201389 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
1e22f057ff958a9693614947c28466d69b0ad98b | 27 | py | Python | viberio/db_api/__init__.py | bostud/Viber_bot | 076113433837aab942f86a0f73275c50037ed8f9 | [
"MIT"
] | null | null | null | viberio/db_api/__init__.py | bostud/Viber_bot | 076113433837aab942f86a0f73275c50037ed8f9 | [
"MIT"
] | null | null | null | viberio/db_api/__init__.py | bostud/Viber_bot | 076113433837aab942f86a0f73275c50037ed8f9 | [
"MIT"
] | null | null | null | from .postgresql import db
| 13.5 | 26 | 0.814815 | 4 | 27 | 5.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 27 | 1 | 27 | 27 | 0.956522 | 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 |
1e28a03cde89f35ab8fde5049e02778ff57ace9a | 29 | py | Python | bevy/app/app/__init__.py | ZechCodes/bevy.app | c56bd1dba456969807abd8b71f8f02a68c23025d | [
"MIT"
] | null | null | null | bevy/app/app/__init__.py | ZechCodes/bevy.app | c56bd1dba456969807abd8b71f8f02a68c23025d | [
"MIT"
] | null | null | null | bevy/app/app/__init__.py | ZechCodes/bevy.app | c56bd1dba456969807abd8b71f8f02a68c23025d | [
"MIT"
] | null | null | null | from bevy.app.app import App
| 14.5 | 28 | 0.793103 | 6 | 29 | 3.833333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137931 | 29 | 1 | 29 | 29 | 0.92 | 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 |
1e845377d9ba0f0913b9373524b984bbf8de5b75 | 143 | py | Python | notion2md/__main__.py | Nekojirou/notion2md | 6065a0d073f193fbe6a38f35be1992429e89ce0c | [
"MIT"
] | null | null | null | notion2md/__main__.py | Nekojirou/notion2md | 6065a0d073f193fbe6a38f35be1992429e89ce0c | [
"MIT"
] | null | null | null | notion2md/__main__.py | Nekojirou/notion2md | 6065a0d073f193fbe6a38f35be1992429e89ce0c | [
"MIT"
] | null | null | null | from .export_manager import export_cli
from .convert_manager import convert_cli
if __name__ == "__main__":
export_cli()
convert_cli()
| 20.428571 | 40 | 0.762238 | 19 | 143 | 5 | 0.473684 | 0.273684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160839 | 143 | 6 | 41 | 23.833333 | 0.791667 | 0 | 0 | 0 | 0 | 0 | 0.055944 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
1ea2e90c66dc87d45b01c6ffb81a304b002b6884 | 175 | py | Python | recursive_count_items.py | arafat-al-mahmud/algorithms-python | 75e62e510163a7cb2c877db4a8a6fc329c4fee4c | [
"MIT"
] | null | null | null | recursive_count_items.py | arafat-al-mahmud/algorithms-python | 75e62e510163a7cb2c877db4a8a6fc329c4fee4c | [
"MIT"
] | null | null | null | recursive_count_items.py | arafat-al-mahmud/algorithms-python | 75e62e510163a7cb2c877db4a8a6fc329c4fee4c | [
"MIT"
] | null | null | null | def recursive_count_items(list):
if(len(list) == 0):
return 0
return 1 + recursive_count_items(list[1:])
print(recursive_count_items([1,2,4,5,0,-1, 3])) #7
| 19.444444 | 50 | 0.64 | 30 | 175 | 3.533333 | 0.533333 | 0.396226 | 0.537736 | 0.433962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084507 | 0.188571 | 175 | 8 | 51 | 21.875 | 0.661972 | 0.005714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.6 | 0.2 | 0 | 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 | 1 | 0 | 0 | 5 |
1eb067cf7d8e1f5daed14fa317fee53df9f29f20 | 87 | py | Python | fieldy/Util.py | NeverDefineUs/fieldy | e0941a0be5af4a8f59c4ac334a174f616542d4ff | [
"MIT"
] | null | null | null | fieldy/Util.py | NeverDefineUs/fieldy | e0941a0be5af4a8f59c4ac334a174f616542d4ff | [
"MIT"
] | 3 | 2019-05-21T05:59:10.000Z | 2019-05-24T03:31:44.000Z | fieldy/Util.py | NeverDefineUs/fieldy | e0941a0be5af4a8f59c4ac334a174f616542d4ff | [
"MIT"
] | null | null | null | def get_base_types():
return ["string", "integer", "float", "boolean", "any", "date"] | 43.5 | 65 | 0.632184 | 11 | 87 | 4.818182 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114943 | 87 | 2 | 65 | 43.5 | 0.688312 | 0 | 0 | 0 | 0 | 0 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 5 |
1ed65d514a6f10c00feff396e163553622fa6e79 | 134 | py | Python | src/python/v2/base/environ.py | youngzil/quickstart-python | 988aabb9357ee35aa06ec0d18c36d201b9e640b1 | [
"Apache-2.0"
] | null | null | null | src/python/v2/base/environ.py | youngzil/quickstart-python | 988aabb9357ee35aa06ec0d18c36d201b9e640b1 | [
"Apache-2.0"
] | null | null | null | src/python/v2/base/environ.py | youngzil/quickstart-python | 988aabb9357ee35aa06ec0d18c36d201b9e640b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
print "环境变量";
for key in os.environ.keys():
print key, "=", os.environ[key]
| 14.888889 | 35 | 0.597015 | 21 | 134 | 3.809524 | 0.714286 | 0.225 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009091 | 0.179104 | 134 | 8 | 36 | 16.75 | 0.718182 | 0.283582 | 0 | 0 | 0 | 0 | 0.053191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.25 | null | null | 0.5 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
948fd0cbba89b5072c6fa57f41942a2820715ef0 | 98 | py | Python | logger.py | exqlnet/wjx-api | 64ee3d2d3b929dbce21e10aca82961eaed156b29 | [
"Apache-2.0"
] | 6 | 2019-07-17T02:05:17.000Z | 2021-08-18T09:05:51.000Z | logger.py | exqlnet/wjx-api | 64ee3d2d3b929dbce21e10aca82961eaed156b29 | [
"Apache-2.0"
] | 1 | 2020-10-21T03:36:05.000Z | 2021-03-19T12:24:48.000Z | logger.py | exqlnet/wjx-api | 64ee3d2d3b929dbce21e10aca82961eaed156b29 | [
"Apache-2.0"
] | 1 | 2020-11-13T08:33:52.000Z | 2020-11-13T08:33:52.000Z | # encoding=utf-8
from datetime import datetime
def log(*info):
print(datetime.now(), *info)
| 14 | 32 | 0.693878 | 14 | 98 | 4.857143 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012195 | 0.163265 | 98 | 6 | 33 | 16.333333 | 0.817073 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
94e12682bbebd2e672f16375b3fa2cb6f1cb919e | 31 | py | Python | JDjango/frames/encryptionFrame/__init__.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjango/frames/encryptionFrame/__init__.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjango/frames/encryptionFrame/__init__.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | from .encryptionFrame import *
| 15.5 | 30 | 0.806452 | 3 | 31 | 8.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.925926 | 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 |
94f50b713aa545764cf0fdd8c6d6c8cc5440a396 | 3,157 | py | Python | demo/Demo_images.py | hasii2011/metamenus | 6399df693f130dcc36daae4d3b2d24dd75f2ceb1 | [
"BSD-3-Clause"
] | null | null | null | demo/Demo_images.py | hasii2011/metamenus | 6399df693f130dcc36daae4d3b2d24dd75f2ceb1 | [
"BSD-3-Clause"
] | 17 | 2021-11-07T19:52:31.000Z | 2021-11-21T22:19:13.000Z | demo/Demo_images.py | hasii2011/metamenus | 6399df693f130dcc36daae4d3b2d24dd75f2ceb1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Images for menubar used in DemoMetaMenus, from the Metamenus demo
#
# generated with wx.tools.img2py
from wx.lib.embeddedimage import PyEmbeddedImage
#-------------------------------------------------------------------------------
bmp1 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAkZJ'
b'REFUOI19kUlMU1EUhr/7+mj7Si0gpQ8oxCEGAxsSHCEmTUhcuKuJRrvqCoe4dOfClTvWhsRI'
b'4saNJg7BRHFoiEgIIESEBK2GMKilpbaF0In2veeCQloK/snNucM5//n/cwUFBAKBrK7rOfaA'
b'JEmmcDg86fP5LgErZQl2u/1iPp839lvpdNoIBoNGf3//OOAoIS9EY6/OxUgmk/j9/lN9fX1v'
b'AOdugv9ClmXy+TzRaJSenp7O3t7eAaAeQBQseBOJxPPtgpXoGk9eT7EaT2FgUOtQaGkw4Var'
b'0TSNmpoaPB7P9VAo9EAu7mQYBh9G5xiejuD3dnG0USG9afB7NcOjF6OcluF8VxuKoiCEMJVZ'
b'iK2leDm8yIn2Fka+LJFM5Zj5EWZocoGujuO8nYiQ2MiW2is+DAzNIpSDvJtYwm6rIPLqO+sb'
b'WVbXMgyOLbMQSvHs/Sy3fOf2Jpj+GWXmj4VcXqPBVcntK+0MTv7i4f3PaLkckmTi63xsfwUm'
b's8x8NIMAguEY30IbaEAWGeWAFYAK85ZrXdcpm0Fnq4pkMWO2WqlyVGKukLHKElXVdhSbFVmx'
b'cKbVtb+C7pOH6fj0l7iox2XTqLIImmsV2podJI1K7HqEC2ePlBBIAJqmFWRp3PG6cGfGaaqr'
b'5ulomsCc4FiTintzirteJ0Jsffd2TYkCXddxN9Rx72Y3H0fGWF5cR0iCDtWB54YHm82GYRg7'
b'/ssInE7nzuPVy40lxCXDNpl29qIQD6mqek0vytxdVHQvAOLx+GNg7h/C2gAvPM00PgAAAABJ'
b'RU5ErkJggg==')
#-------------------------------------------------------------------------------
bmp2 = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAg1J'
b'REFUOI2tkk9Ik3EYxz/v75XNtbfp68olbc5GQUm3LnUopQ5dAgv6Q12s8OAhqc5iUZdCCKwk'
b'SKhOHswFKh2siA4a4qkRqdmWf8hlg5xYItO9754uupxTiug5Pb/n+zzf7/PnB//T6pqbJRAO'
b'Zx5Go1Le3i5Ax59q1Cq/Pjj/U4719GhGfz+exka6u7pO/z1BaEf9iQsXtS3V1bxNLxEZGuJ2'
b'4ps4Ll8SwLERgQagPJ5k8eCgWaRrpAS+zyRxLCzgXJhHVe5ltuoQdvyrtmEH3jevzH2fRpnR'
b'dYypOE5dkbrWRKr1AbZlI5a1Xq3kvHaDKEgAw0b7I/EN9Enwy6SYvc8FqFidW3j4oHjv3vpN'
b'sKekRO6FQtlA6eteCX6Oivd9RFQw8C5Hye3uNB+35e1FgIllf8I3MizlsagYLXcE8GfnLfK8'
b'9E/HbWUWP11vJgDMtlapGItJ6ciwoKuu1djW7mey6WpDzuwqt5wn7qoj6EojPdAHduZ4DloR'
b'YHNtLcD5fGmlbm77EMnsnByT7bGYAENrU3SfLxGKfZTCM6dkRbxgGTNcVxqanC43GhqLvWEc'
b'B/ZXaoY791SWxeLUOOaN60x3dO4CRguy4FKKRdsmo2m4as7iqjkHa+4vIqRti7n7LQBxWP6J'
b'K13gMcKUlR0FKAr4mUvOoDsLsWd/gNiQtmBs/AVwEpjP38M/2C+1McaX7nKVrAAAAABJRU5E'
b'rkJggg==')
#-------------------------------------------------------------------------------
the_snake = PyEmbeddedImage(
b'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAXxJ'
b'REFUWIW1V1GuwyAMc6p3k72jvJ6ad5TeJfvYYCFNQgOdpUkbQ7UxJqFEiMEA1+8EjKanQdET'
b'GWBmFpPpdhGuAE0uRXS/FwX9eOSaUIpRrvCKiE0TM8AoYoy5ERIRtCvM3AnOojmgiVFswiqk'
b'kq/C3AItQuMO4goiGKuPsJ8yAJTX+EwWtvEUhbcr9dOEF0xloRmccsHDhAt5ByJMuNAEEEDY'
b'AezB7Oi/SXSngAA6AH54RKtbZKA7ZAfAv8EedvZGYkQWRs2sCRiRu2IsIW8Bp2AbIZ0OIb3E'
b'U5SLU66MkG7AZ/VHMsHsFUVBNBIa3gcy5PRvTNJZKOfxe+tAAM+FtIDasrX1/GdM9gqTGL8s'
b'wLorZGG5ELdjQf6NIgRccOCb5EMBGXLzFMjnzAgwMdOQip8hNwPm6sX5ldfFaPVShIXlOhCS'
b'e271C7Hh7r+o60PIpiQgG9KlY9ghcXltqwy67PDdMHUEheVX74bDZhT2/UnSlICTEP2AxZfT'
b'JzRlqacgirChAAAAAElFTkSuQmCC')
#-------------------------------------------------------------------------------
#
##
### eof
| 50.919355 | 80 | 0.777003 | 152 | 3,157 | 16.131579 | 0.723684 | 0.019576 | 0.046493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108421 | 0.070953 | 3,157 | 61 | 81 | 51.754098 | 0.727583 | 0.138739 | 0 | 0 | 1 | 0 | 0.843195 | 0.835799 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.026316 | 0 | 0.026316 | 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 | 1 | 0 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
a21d756fa1ecc7a7a1cb5b3cf95bbc1b6b377bc2 | 284 | py | Python | gravityspytools/home/views.py | olipatane/gravityspytools | abc9b81cbbcaea1df765ef21a62af4123a0e28b3 | [
"BSD-3-Clause"
] | 4 | 2019-03-11T12:32:24.000Z | 2020-12-01T06:31:39.000Z | gravityspytools/home/views.py | johnwick211/gravityspytools | 23ef83e36ed934f7c39440bf43f4d5c7b7b4abb0 | [
"BSD-3-Clause"
] | 19 | 2018-01-29T21:28:39.000Z | 2020-07-14T18:38:23.000Z | gravityspytools/home/views.py | johnwick211/gravityspytools | 23ef83e36ed934f7c39440bf43f4d5c7b7b4abb0 | [
"BSD-3-Clause"
] | 4 | 2018-02-02T16:47:16.000Z | 2020-12-01T06:31:49.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from login.utils import make_authorization_url
# Create your views here.
def index(request):
return render(request, 'index.html', context={'loginurl': make_authorization_url()})
| 28.4 | 88 | 0.767606 | 37 | 284 | 5.648649 | 0.72973 | 0.162679 | 0.191388 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004016 | 0.123239 | 284 | 9 | 89 | 31.555556 | 0.835341 | 0.158451 | 0 | 0 | 0 | 0 | 0.076271 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.6 | 0.2 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 5 |
a21f1598496d8f6be36cd709e5bcf2cc3ee91c4e | 153 | py | Python | fullthrottleapp/admin.py | Pranjali16/FullThrottle-Project | bb6fbd3783d22c2e47ad85687e18f02a30c69799 | [
"Apache-2.0"
] | null | null | null | fullthrottleapp/admin.py | Pranjali16/FullThrottle-Project | bb6fbd3783d22c2e47ad85687e18f02a30c69799 | [
"Apache-2.0"
] | null | null | null | fullthrottleapp/admin.py | Pranjali16/FullThrottle-Project | bb6fbd3783d22c2e47ad85687e18f02a30c69799 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(User)
admin.site.register(ActivityPeriod)
| 21.857143 | 36 | 0.771242 | 20 | 153 | 5.9 | 0.6 | 0.152542 | 0.288136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.143791 | 153 | 6 | 37 | 25.5 | 0.900763 | 0.169935 | 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 |
bf56623797dd981c112e4b3bb5f1c8a9a934e3ac | 220 | py | Python | nextcord/ext/errors/check_failure.py | abrahammurciano/nextcord | e55be422a1b923fc498b04f82172d5a0d263eb71 | [
"MIT"
] | null | null | null | nextcord/ext/errors/check_failure.py | abrahammurciano/nextcord | e55be422a1b923fc498b04f82172d5a0d263eb71 | [
"MIT"
] | null | null | null | nextcord/ext/errors/check_failure.py | abrahammurciano/nextcord | e55be422a1b923fc498b04f82172d5a0d263eb71 | [
"MIT"
] | null | null | null | from .command_error import CommandError
class CheckFailure(CommandError):
"""Exception raised when the predicates in :attr:`.Command.checks` have failed.
This inherits from :exc:`CommandError`
"""
pass | 24.444444 | 83 | 0.727273 | 25 | 220 | 6.36 | 0.84 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177273 | 220 | 9 | 84 | 24.444444 | 0.878453 | 0.527273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
bf5cc9165760d5b97eac26883dbc7b567d1aabab | 149 | py | Python | Core/Settings/MessageBox.py | F-Society-Freaks/Telegram-RAT | afb50a428421d7ce21858173dda8acaa6ecce1da | [
"MIT"
] | 1 | 2020-07-05T04:51:17.000Z | 2020-07-05T04:51:17.000Z | Core/Settings/MessageBox.py | gmhacx/Telegram-RAT | afb50a428421d7ce21858173dda8acaa6ecce1da | [
"MIT"
] | null | null | null | Core/Settings/MessageBox.py | gmhacx/Telegram-RAT | afb50a428421d7ce21858173dda8acaa6ecce1da | [
"MIT"
] | 3 | 2021-04-10T02:30:43.000Z | 2021-06-04T04:29:20.000Z | # Import modules
from ctypes import windll
# MessageBox Output
def MessageBox(Message):
windll.user32.MessageBoxW(0, Message, u'', 0x10) | 16.555556 | 49 | 0.718121 | 18 | 149 | 5.944444 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.049587 | 0.187919 | 149 | 9 | 49 | 16.555556 | 0.834711 | 0.214765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037383 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
bf8b2c474cbb432a868dd882d75ec3e48d8862e4 | 192 | py | Python | src/keydra/exceptions.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 12 | 2021-05-04T10:47:02.000Z | 2022-03-10T13:25:04.000Z | src/keydra/exceptions.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 17 | 2021-05-04T00:53:49.000Z | 2022-01-18T10:01:49.000Z | src/keydra/exceptions.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 9 | 2021-05-04T00:46:38.000Z | 2022-02-16T02:55:50.000Z | class ConfigException(Exception):
pass
class InvalidSecretProvider(Exception):
pass
class DistributionException(Exception):
pass
class RotationException(Exception):
pass
| 12.8 | 39 | 0.760417 | 16 | 192 | 9.125 | 0.4375 | 0.356164 | 0.369863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177083 | 192 | 14 | 40 | 13.714286 | 0.924051 | 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 | 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 |
bfabe880edf88d2b4a6ec4ac048bba2bfd67db64 | 219 | py | Python | backend/asynchronous_handler.py | jossM/streamflow | 5c01db1439b25709c0a78a962b42142bfa692279 | [
"Apache-2.0"
] | null | null | null | backend/asynchronous_handler.py | jossM/streamflow | 5c01db1439b25709c0a78a962b42142bfa692279 | [
"Apache-2.0"
] | null | null | null | backend/asynchronous_handler.py | jossM/streamflow | 5c01db1439b25709c0a78a962b42142bfa692279 | [
"Apache-2.0"
] | null | null | null | from typing import Type, Callable
import asyncio
def make_async(synchronous_function: Callable[Any, _T]):
async def wrapper(*args, **kwargs):
return asyncio.to_thread(synchronous_function, *args, **kwargs)
| 31.285714 | 71 | 0.748858 | 28 | 219 | 5.678571 | 0.678571 | 0.238994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146119 | 219 | 6 | 72 | 36.5 | 0.850267 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 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 |
44f0c98967c372ab51644355ca5ad3a827001f14 | 230 | py | Python | default_vs_none.py | tebeka/pythonwise | 56f8cb7aa792c3ad6a3dc754e15f6a04890d694a | [
"BSD-3-Clause"
] | 21 | 2016-11-16T20:08:56.000Z | 2021-12-11T23:13:05.000Z | default_vs_none.py | tebeka/pythonwise | 56f8cb7aa792c3ad6a3dc754e15f6a04890d694a | [
"BSD-3-Clause"
] | 1 | 2020-10-05T08:35:31.000Z | 2020-10-05T08:35:31.000Z | default_vs_none.py | tebeka/pythonwise | 56f8cb7aa792c3ad6a3dc754e15f6a04890d694a | [
"BSD-3-Clause"
] | 8 | 2016-11-12T22:54:55.000Z | 2021-02-10T10:46:23.000Z | from dataclasses import dataclass
@dataclass
class Location:
x: int
y: int
def get_default(locs, name):
return locs.get(name, Location(0, 0))
def get_none(locs, name):
return locs.get(name) or Location(0, 0)
| 14.375 | 43 | 0.682609 | 36 | 230 | 4.305556 | 0.5 | 0.077419 | 0.180645 | 0.232258 | 0.322581 | 0.322581 | 0 | 0 | 0 | 0 | 0 | 0.021978 | 0.208696 | 230 | 15 | 44 | 15.333333 | 0.82967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.111111 | 0.222222 | 0.888889 | 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 |
78650cc4d8c87dc48993aec608ca9c67ddf1a7d1 | 136 | py | Python | fcl/__init__.py | ddomurad/3d_printer_foam_cutter | e3646c9e1f3bfa815e8480b97922d9d008d970a3 | [
"MIT"
] | null | null | null | fcl/__init__.py | ddomurad/3d_printer_foam_cutter | e3646c9e1f3bfa815e8480b97922d9d008d970a3 | [
"MIT"
] | null | null | null | fcl/__init__.py | ddomurad/3d_printer_foam_cutter | e3646c9e1f3bfa815e8480b97922d9d008d970a3 | [
"MIT"
] | 1 | 2021-01-10T13:11:03.000Z | 2021-01-10T13:11:03.000Z | from fcl.options import Options
from fcl.path_planner import PathPlanner
from fcl.gcode_generator.gcode_generator import GcodeGenerator
| 34 | 62 | 0.882353 | 19 | 136 | 6.157895 | 0.526316 | 0.179487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.088235 | 136 | 3 | 63 | 45.333333 | 0.943548 | 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 |
787e417885800637f900b2e2438297b7000e8115 | 398 | py | Python | titan/api_pkg/itemlist/props.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/api_pkg/itemlist/props.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/api_pkg/itemlist/props.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | from moonleap.typespec.type_spec_store import type_spec_store
def item_list_type_spec(item_list):
return type_spec_store().get(item_list.item_type.name)
def item_list_item_type(item_list):
return item_list.item.item_type
def named_item_list_output_field_name(named_item_list):
return (
named_item_list.name if named_item_list.name else named_item_list.typ.item_name
)
| 24.875 | 87 | 0.80402 | 67 | 398 | 4.298507 | 0.283582 | 0.305556 | 0.225694 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130653 | 398 | 15 | 88 | 26.533333 | 0.83237 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.111111 | 0.333333 | 0.777778 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
15622fbade8ba0a0269b00722bee5bd2aa6e7833 | 198 | py | Python | src/bot/util/environ.py | achillesrasquinha/bot | d908892a1026af155c81572ef507c05239b2549a | [
"MIT"
] | null | null | null | src/bot/util/environ.py | achillesrasquinha/bot | d908892a1026af155c81572ef507c05239b2549a | [
"MIT"
] | null | null | null | src/bot/util/environ.py | achillesrasquinha/bot | d908892a1026af155c81572ef507c05239b2549a | [
"MIT"
] | null | null | null | from bpyutils.util.environ import getenv as bpy_getenv
from bot.__attr__ import __name__
NAME = __name__.upper()
def getenv(*args, **kwargs):
return bpy_getenv(prefix = NAME, *args, **kwargs) | 24.75 | 54 | 0.747475 | 28 | 198 | 4.785714 | 0.607143 | 0.134328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.141414 | 198 | 8 | 55 | 24.75 | 0.788235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0.2 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 5 |
156dfc01fd458c54802a1ecc8387437e8946d8cf | 169 | py | Python | rabbitark/utils/extractor_dict.py | kijk2869/rabbit-ark | 4381b12f2912a339f1c6b25e96119fb63cfec843 | [
"MIT"
] | null | null | null | rabbitark/utils/extractor_dict.py | kijk2869/rabbit-ark | 4381b12f2912a339f1c6b25e96119fb63cfec843 | [
"MIT"
] | null | null | null | rabbitark/utils/extractor_dict.py | kijk2869/rabbit-ark | 4381b12f2912a339f1c6b25e96119fb63cfec843 | [
"MIT"
] | null | null | null | from typing import Any, Dict
from rabbitark.extractor import Hitomi, Pixiv, Youtube
extractor: Dict[str, Any] = {"hitomi": Hitomi, "pixiv": Pixiv, "youtube": Youtube}
| 28.166667 | 82 | 0.733728 | 22 | 169 | 5.636364 | 0.5 | 0.177419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136095 | 169 | 5 | 83 | 33.8 | 0.849315 | 0 | 0 | 0 | 0 | 0 | 0.106509 | 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 |
159910b17bf205a5e1d55e9b9489c79d1e0d3c27 | 54 | py | Python | SVM_CIFAR10/HW1/f16RBE595/classifiers/__init__.py | PRAkTIKal24/DL_Perception | dee8226787c3a98e56184a248300251dc1478707 | [
"MIT"
] | null | null | null | SVM_CIFAR10/HW1/f16RBE595/classifiers/__init__.py | PRAkTIKal24/DL_Perception | dee8226787c3a98e56184a248300251dc1478707 | [
"MIT"
] | null | null | null | SVM_CIFAR10/HW1/f16RBE595/classifiers/__init__.py | PRAkTIKal24/DL_Perception | dee8226787c3a98e56184a248300251dc1478707 | [
"MIT"
] | null | null | null | from f16RBE595.classifiers.linear_classifier import *
| 27 | 53 | 0.87037 | 6 | 54 | 7.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 0.074074 | 54 | 1 | 54 | 54 | 0.82 | 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 |
ec61fe899b925afa0995ae493e577b7f1a2973a8 | 108 | py | Python | axelerate/__init__.py | joaopdss/aXeleRate | 791c8b29056ed11bd0ed306e620664577ec9724c | [
"MIT"
] | 148 | 2020-03-18T01:36:20.000Z | 2022-03-24T08:56:45.000Z | axelerate/__init__.py | joaopdss/aXeleRate | 791c8b29056ed11bd0ed306e620664577ec9724c | [
"MIT"
] | 55 | 2020-03-29T14:36:44.000Z | 2022-02-17T22:35:03.000Z | axelerate/__init__.py | joaopdss/aXeleRate | 791c8b29056ed11bd0ed306e620664577ec9724c | [
"MIT"
] | 57 | 2020-04-01T14:22:53.000Z | 2022-01-31T13:09:49.000Z | from .train import setup_training
from .infer import setup_inference
from .evaluate import setup_evaluation
| 27 | 38 | 0.861111 | 15 | 108 | 6 | 0.6 | 0.366667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 108 | 3 | 39 | 36 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 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 |
ec7dc02debaf708dd6b775762a7f9749896d76b3 | 117 | py | Python | RappCloud/Service/__init__.py | robotics-4-all/r4a_RAPP_cloud_api_python | 4b738be562b77525bc94e6e8463c1e126bdbf3b5 | [
"Apache-2.0"
] | 1 | 2018-02-14T23:04:54.000Z | 2018-02-14T23:04:54.000Z | RappCloud/Service/__init__.py | robotics-4-all/r4a_RAPP_cloud_api_python | 4b738be562b77525bc94e6e8463c1e126bdbf3b5 | [
"Apache-2.0"
] | 1 | 2017-04-21T11:51:28.000Z | 2017-04-21T11:51:28.000Z | RappCloud/Service/__init__.py | robotics-4-all/r4a_RAPP_cloud_api_python | 4b738be562b77525bc94e6e8463c1e126bdbf3b5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
## @file RappCloud/Service/__init__.py
#
from RappPlatformService import RappPlatformService
| 16.714286 | 51 | 0.794872 | 13 | 117 | 6.846154 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102564 | 117 | 6 | 52 | 19.5 | 0.847619 | 0.478632 | 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 |
01a23139110c3015ad7e1a341bb70eab92aff54c | 50 | py | Python | subsets/__init__.py | benjcunningham/subsets | 806a1934650e5cfb3306e6528a6a56c148e399c4 | [
"MIT"
] | null | null | null | subsets/__init__.py | benjcunningham/subsets | 806a1934650e5cfb3306e6528a6a56c148e399c4 | [
"MIT"
] | 9 | 2018-11-08T03:37:34.000Z | 2018-11-22T22:20:27.000Z | subsets/__init__.py | benjcunningham/subsets | 806a1934650e5cfb3306e6528a6a56c148e399c4 | [
"MIT"
] | null | null | null | """subsets
"""
from subsets.subset import Subset
| 10 | 33 | 0.72 | 6 | 50 | 6 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14 | 50 | 4 | 34 | 12.5 | 0.837209 | 0.14 | 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 |
01af7663221d114f4585fee37bd4a1dd5592714c | 13,118 | py | Python | scitbx/math/des_3_240_21.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/math/des_3_240_21.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/math/des_3_240_21.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Below are flex arrays with x,y,z points for numerical integration on a sphere with unit weights, a so called
spherical t-design
The design implemented below contains 241 points and provides exact integrals over the surface for polynomial
functions on that sphere up to order 21.
The design has been taken from
http://www2.research.att.com/~njas/sphdesigns/dim3/
"""
from __future__ import division
from scitbx.array_family import flex
t_x = flex.double([ 0.892653535763 , 0.412534053425 , -0.892653535806 , -0.181618610614 , -0.412534053477 , -0.181618610451 , -0.412534053317 , 0.1816186104 , 0.412534053328 , 0.181618610581 , 0.892653535868 , -0.892653535855 , -0.292093742593 , -0.295767028027 , 0.292093742448 , 0.909507070148 , 0.295767028145 , 0.909507070189 , 0.295767027907 , -0.909507070101 , -0.295767027835 , -0.909507070219 , -0.292093742541 , 0.292093742862 , -0.575225718038 , 0.0241205727861 , 0.575225718116 , 0.817639022556 , -0.0241205730415 , 0.817639022458 , -0.0241205728182 , -0.817639022544 , 0.024120572713 , -0.8176390226 , -0.575225717925 , 0.575225717908 , -0.128833161725 , 0.0522476406944 , 0.12883316184 , 0.99028894795 , -0.0522476403885 , 0.990288947978 , -0.0522476403904 , -0.990288947961 , 0.0522476405278 , -0.990288947971 , -0.12883316179 , 0.128833161857 , 0.718006386035 , 0.657446876287 , -0.718006386109 , -0.228539787737 , -0.657446876241 , -0.228539787679 , -0.657446876361 , 0.228539787703 , 0.657446876304 , 0.228539787785 , 0.718006385881 , -0.718006385891 , 0.863176473118 , 0.468181816438 , -0.863176473194 , 0.189029529126 , -0.468181816393 , 0.189029528792 , -0.468181816411 , -0.189029528898 , 0.468181816509 , -0.189029529002 , 0.863176473135 , -0.863176473123 , 0.772632856847 , -0.517059450567 , -0.772632856806 , 0.368358511648 , 0.517059450494 , 0.36835851172 , 0.517059450583 , -0.368358511567 , -0.517059450502 , -0.36835851147 , 0.772632856935 , -0.772632856927 , -0.847819231915 , -0.0663257759136 , 0.847819231883 , -0.526121128349 , 0.0663257758461 , -0.526121128459 , 0.0663257759458 , 0.52612112845 , -0.0663257758772 , 0.526121128505 , -0.847819231822 , 0.84781923185 , 0.00980574322923 , 0.942983815809 , -0.00980574337969 , 0.332694109227 , -0.942983815774 , 0.332694109398 , -0.942983815776 , -0.332694109319 , 0.942983815775 , -0.332694109456 , 0.00980574330114 , -0.00980574328771 , 0.785599248371 , -0.405156944932 , -0.785599248202 , -0.467634120611 , 0.405156945136 , -0.467634120812 , 0.405156944842 , 0.467634120787 , -0.405156945 , 0.467634120894 , 0.785599248313 , -0.785599248281 , -0.737331999131 , 0.620851500949 , 0.73733199906 , -0.266242251949 , -0.620851501079 , -0.266242252012 , -0.620851501072 , 0.266242252114 , 0.620851501187 , 0.266242251932 , -0.737331998948 , 0.737331998835 , 0.726871469166 , -0.0274882821828 , -0.726871469173 , -0.68622318645 , 0.0274882823516 , -0.686223186546 , 0.0274882822668 , 0.686223186661 , -0.027488282251 , 0.686223186609 , 0.72687146907 , -0.72687146908 , 0.665363385721 , 0.580860267577 , -0.665363385677 , 0.468927408341 , -0.580860267528 , 0.468927408373 , -0.580860267641 , -0.468927408468 , 0.580860267387 , -0.468927408376 , 0.665363385652 , -0.665363385752 , -0.580125367305 , -0.779099598054 , 0.580125367187 , 0.237609710696 , 0.779099598065 , 0.237609710819 , 0.77909959817 , -0.237609710812 , -0.779099598075 , -0.237609710609 , -0.58012536709 , 0.580125367218 , 0.95866802536 , 0.10111360589 , -0.958668025326 , -0.265954236634 , -0.101113606003 , -0.265954236715 , -0.101113605825 , 0.265954236287 , 0.101113605802 , 0.265954236516 , 0.95866802545 , -0.958668025479 , -0.784431814417 , 0.284319024823 , 0.784431814443 , 0.551207239435 , -0.28431902464 , 0.551207239408 , -0.284319024715 , -0.551207239418 , 0.284319024477 , -0.551207239227 , -0.784431814655 , 0.784431814542 , 0.166663878535 , 0.979468778892 , -0.166663878322 , 0.113419851853 , -0.979468778908 , 0.113419852024 , -0.979468778891 , -0.113419851942 , 0.979468778888 , -0.113419851887 , 0.166663878513 , -0.166663878526 , 0.903542635391 , 0.0990026905112 , -0.903542635384 , 0.416904273958 , -0.0990026904149 , 0.416904273844 , -0.0990026904642 , -0.416904274206 , 0.099002690128 , -0.416904274114 , 0.903542635279 , -0.903542635234 , 0.278762404536 , 0.349312185586 , -0.278762404541 , -0.894579520734 , -0.349312185467 , -0.894579520789 , -0.349312185551 , 0.894579520785 , 0.34931218555 , 0.894579520782 , 0.278762404438 , -0.278762404443 , 0.555896230179 , -0.676833211682 , -0.555896230315 , 0.48257246591 , 0.676833211458 , 0.482572465903 , 0.676833211636 , -0.482572466151 , -0.676833211438 , -0.482572465972 , 0.555896230193 , -0.555896230194 , ])
t_y = flex.double([ 0.412534053657 , -0.181618610642 , -0.412534053628 , 0.89265353574 , -0.181618610423 , -0.892653535763 , 0.181618610612 , -0.892653535812 , 0.18161861042 , 0.892653535811 , -0.412534053473 , 0.412534053535 , -0.295767027993 , 0.909507070089 , 0.29576702804 , -0.292093742927 , 0.909507070084 , 0.292093742689 , -0.909507070148 , 0.292093743159 , -0.909507070047 , -0.292093742722 , 0.295767027793 , -0.295767027748 , 0.0241205728251 , 0.817639022511 , -0.0241205729792 , -0.575225718103 , 0.817639022441 , 0.575225718229 , -0.817639022581 , 0.575225718124 , -0.817639022527 , -0.575225718035 , -0.0241205727111 , 0.0241205725942 , 0.0522476407202 , 0.990288947959 , -0.05224764032 , -0.128833161925 , 0.990288947968 , 0.128833161878 , -0.990288947962 , 0.128833161897 , -0.990288947953 , -0.128833161936 , -0.0522476403376 , 0.0522476405515 , 0.657446876256 , -0.228539787832 , -0.657446876171 , 0.718006385947 , -0.228539787714 , -0.718006386031 , 0.228539787861 , -0.718006385857 , 0.228539787874 , 0.718006385814 , -0.657446876363 , 0.657446876372 , 0.468181816653 , 0.189029529197 , -0.468181816576 , 0.863176473064 , 0.189029528897 , -0.863176473144 , -0.189029529128 , -0.86317647309 , -0.189029528931 , 0.863176473107 , -0.468181816649 , 0.468181816699 , -0.517059450696 , 0.368358511586 , 0.517059450647 , 0.772632856806 , 0.368358511817 , -0.772632856802 , -0.368358511487 , -0.772632856859 , -0.368358511666 , 0.772632856856 , 0.517059450692 , -0.517059450634 , -0.0663257759002 , -0.526121128258 , 0.0663257758199 , -0.847819231767 , -0.526121128407 , 0.847819231709 , 0.526121128344 , 0.847819231701 , 0.526121128306 , -0.847819231665 , 0.066325775941 , -0.0663257759967 , 0.942983815843 , 0.33269410954 , -0.942983815787 , 0.00980574320427 , 0.332694109636 , -0.00980574329891 , -0.33269410963 , -0.00980574318851 , -0.332694109635 , 0.00980574338976 , -0.942983815753 , 0.942983815791 , -0.405156945312 , -0.46763412065 , 0.405156945434 , 0.785599248335 , -0.467634120868 , -0.785599248146 , 0.467634120861 , -0.78559924825 , 0.467634120871 , 0.785599248234 , 0.405156945117 , -0.405156945197 , 0.620851501014 , -0.266242252155 , -0.620851501089 , -0.737331999103 , -0.266242252234 , 0.737331998996 , 0.266242252223 , 0.737331998833 , 0.266242252328 , -0.737331998939 , -0.620851501183 , 0.620851501306 , -0.0274882823504 , -0.686223186448 , 0.0274882823719 , 0.726871469185 , -0.686223186491 , -0.72687146909 , 0.68622318647 , -0.726871468983 , 0.686223186523 , 0.726871469033 , 0.0274882823356 , -0.0274882823097 , 0.580860267739 , 0.468927408489 , -0.58086026772 , 0.665363385822 , 0.468927408679 , -0.665363385699 , -0.468927408553 , -0.665363385848 , -0.468927408655 , 0.665363385651 , -0.580860267791 , 0.580860267548 , -0.779099597924 , 0.23760971091 , 0.779099597978 , -0.580125367276 , 0.237609711147 , 0.580125367047 , -0.23760971085 , 0.580125367157 , -0.237609711045 , -0.580125367022 , 0.779099598152 , -0.779099597967 , 0.101113605901 , -0.265954236477 , -0.101113606095 , 0.958668025295 , -0.265954236656 , -0.958668025246 , 0.265954236415 , -0.958668025394 , 0.265954236261 , 0.958668025323 , -0.101113605909 , 0.101113605789 , 0.284319025007 , 0.551207239321 , -0.284319024888 , -0.784431814292 , 0.551207239348 , 0.784431814401 , -0.55120723916 , 0.784431814427 , -0.551207239394 , -0.784431814511 , -0.284319024758 , 0.28431902469 , 0.979468778867 , 0.113419852011 , -0.979468778877 , 0.166663878465 , 0.113419852233 , -0.166663878213 , -0.113419852089 , -0.166663878384 , -0.113419852253 , 0.16666387842 , -0.979468778859 , 0.979468778852 , 0.0990026906796 , 0.416904273754 , -0.0990026906479 , 0.903542635194 , 0.4169042737 , -0.903542635238 , -0.416904273937 , -0.90354263511 , -0.416904274064 , 0.903542635131 , -0.0990026904671 , 0.0990026902458 , 0.349312185537 , -0.894579520609 , -0.349312185503 , 0.278762404728 , -0.894579520678 , -0.278762404659 , 0.894579520683 , -0.27876240468 , 0.894579520679 , 0.278762404556 , -0.349312185507 , 0.349312185429 , -0.676833211737 , 0.48257246604 , 0.676833211523 , 0.555896230165 , 0.482572466093 , -0.555896230368 , -0.482572466072 , -0.55589623023 , -0.482572466328 , 0.555896230268 , 0.676833211589 , -0.676833211456 , ])
t_z = flex.double([ -0.181618610454 , 0.892653535832 , -0.181618610307 , 0.412534053635 , -0.892653535852 , -0.412534053658 , 0.892653535888 , 0.412534053574 , -0.892653535922 , -0.412534053497 , 0.181618610358 , 0.181618610278 , 0.90950707017 , -0.292093742812 , 0.909507070202 , -0.295767027734 , 0.292093742707 , 0.295767027842 , -0.292093742749 , -0.295767027647 , 0.292093743136 , 0.295767027718 , -0.909507070252 , -0.909507070164 , 0.817639022597 , -0.575225718162 , 0.817639022538 , 0.0241205726715 , 0.575225718252 , -0.0241205729845 , -0.575225718061 , 0.0241205726061 , 0.575225718143 , -0.0241205727922 , -0.81763902268 , -0.817639022696 , 0.990288947974 , -0.12883316185 , 0.99028894798 , 0.0522476406846 , 0.128833161908 , -0.052247640269 , -0.128833161948 , 0.0522476405472 , 0.128833161961 , -0.0522476402555 , -0.990288947985 , -0.990288947966 , -0.228539787596 , 0.718006385932 , -0.228539787605 , 0.657446876302 , -0.718006386011 , -0.657446876231 , 0.718006385854 , 0.657446876413 , -0.718006385902 , -0.657446876432 , 0.228539787771 , 0.228539787715 , 0.18902952894 , 0.863176473178 , 0.18902952878 , 0.468181816677 , -0.863176473268 , -0.468181816665 , 0.863176473208 , 0.468181816722 , -0.863176473198 , -0.468181816649 , -0.189029528872 , -0.189029528802 , 0.368358511462 , 0.772632856874 , 0.368358511616 , -0.517059450625 , -0.772632856813 , 0.517059450578 , 0.77263285691 , -0.517059450602 , -0.772632856879 , 0.517059450677 , -0.368358511284 , -0.36835851138 , -0.526121128113 , -0.847819231824 , -0.526121128174 , -0.0663257759179 , 0.847819231736 , 0.0663257757814 , -0.847819231767 , -0.0663257759656 , 0.847819231796 , 0.0663257759818 , 0.526121128258 , 0.526121128205 , 0.332694109444 , 0.00980574321495 , 0.332694109596 , 0.94298381592 , -0.0098057433158 , -0.942983815858 , 0.00980574330467 , 0.942983815887 , -0.00980574323076 , -0.942983815837 , -0.332694109697 , -0.332694109587 , -0.467634120466 , 0.785599248458 , -0.467634120645 , -0.405156945215 , -0.785599248222 , 0.40515694535 , 0.785599248378 , -0.405156945177 , -0.785599248291 , 0.405156945084 , 0.467634120732 , 0.467634120717 , -0.266242251992 , -0.737331999127 , -0.266242252015 , 0.620851501066 , 0.737331998989 , -0.620851501166 , -0.737331998999 , 0.620851501316 , 0.737331998864 , -0.620851501268 , 0.266242252105 , 0.266242252132 , -0.686223186468 , 0.726871469191 , -0.686223186459 , -0.0274882822863 , -0.726871469144 , 0.0274882824203 , 0.726871469167 , -0.0274882823482 , -0.726871469117 , 0.0274882823239 , 0.68622318657 , 0.68622318656 , 0.468927408353 , 0.665363385766 , 0.468927408438 , 0.580860267633 , -0.665363385675 , -0.580860267748 , 0.665363385665 , 0.5808602675 , -0.665363385816 , -0.5808602678 , -0.468927408386 , -0.468927408545 , 0.237609710919 , -0.580125367136 , 0.237609711033 , -0.779099598014 , 0.580125367023 , 0.779099598147 , -0.580125367003 , -0.779099598067 , 0.580125367051 , 0.779099598229 , -0.237609710698 , -0.237609710992 , -0.26595423639 , 0.958668025337 , -0.265954236438 , 0.101113605881 , -0.958668025275 , -0.101113606126 , 0.958668025361 , 0.101113605856 , -0.958668025406 , -0.101113605926 , 0.265954236065 , 0.265954236005 , 0.551207239203 , -0.784431814401 , 0.551207239226 , 0.284319024903 , 0.784431814448 , -0.284319024653 , -0.784431814553 , 0.284319024564 , 0.784431814475 , -0.284319024701 , -0.551207238993 , -0.551207239188 , 0.113419851953 , 0.166663878345 , 0.113419852175 , 0.97946877889 , -0.166663878101 , -0.979468778913 , 0.166663878297 , 0.979468778894 , -0.166663878207 , -0.979468778894 , -0.113419852053 , -0.11341985209 , 0.416904273508 , 0.903542635296 , 0.416904273531 , 0.0990026905819 , -0.903542635331 , -0.0990026906638 , 0.903542635216 , 0.0990026903016 , -0.903542635195 , -0.0990026904964 , -0.4169042738 , -0.41690427395 , -0.894579520698 , 0.278762404762 , -0.89457952071 , 0.349312185292 , -0.27876240469 , -0.349312185207 , 0.278762404568 , 0.349312185199 , -0.278762404581 , -0.349312185307 , 0.894579520741 , 0.894579520769 , 0.482572465815 , 0.555896230051 , 0.482572465958 , -0.676833211681 , -0.555896230278 , 0.676833211519 , 0.555896230079 , -0.676833211456 , -0.555896230097 , 0.676833211552 , -0.482572466006 , -0.482572466192 , ])
| 655.9 | 4,225 | 0.743787 | 1,524 | 13,118 | 6.396982 | 0.505249 | 0.003077 | 0.003385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.807984 | 0.115871 | 13,118 | 19 | 4,226 | 690.421053 | 0.032592 | 0.027748 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
01dfc317decf0e72a8f731c9dc70575922ff6b4e | 96 | py | Python | ethereum_gasprice/controller/__init__.py | Elastoo-Team/ethereum-gasprice-py | 66340068464991acfcbec0f7e06e6dca41735a16 | [
"MIT"
] | 4 | 2021-02-05T10:30:07.000Z | 2021-02-26T03:11:13.000Z | ethereum_gasprice/controller/__init__.py | Elastoo-Team/ethereum-gasprice-py | 66340068464991acfcbec0f7e06e6dca41735a16 | [
"MIT"
] | 6 | 2021-02-05T12:55:58.000Z | 2021-03-04T17:53:48.000Z | ethereum_gasprice/controller/__init__.py | Elastoo-Team/ethereum-gasprice-py | 66340068464991acfcbec0f7e06e6dca41735a16 | [
"MIT"
] | null | null | null | from .async_wrapper import AsyncGaspriceController
from .sync_wrapper import GaspriceController
| 32 | 50 | 0.895833 | 10 | 96 | 8.4 | 0.7 | 0.309524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 96 | 2 | 51 | 48 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 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 |
bf04bf246a9348d6257f0da1123f623db5e68bf7 | 40 | py | Python | cluster/errors.py | IndicoDataSolutions/ClusterRSS | 6b1eefd919e38a585a964a594b2c3ee0b3af4bab | [
"MIT"
] | 6 | 2016-05-24T19:45:59.000Z | 2018-06-22T09:10:06.000Z | cluster/errors.py | IndicoDataSolutions/ClusterRSS | 6b1eefd919e38a585a964a594b2c3ee0b3af4bab | [
"MIT"
] | 10 | 2016-02-17T19:44:21.000Z | 2016-07-05T17:08:19.000Z | cluster/errors.py | IndicoDataSolutions/ClusterRSS | 6b1eefd919e38a585a964a594b2c3ee0b3af4bab | [
"MIT"
] | 2 | 2016-10-06T21:28:35.000Z | 2020-09-02T13:51:26.000Z | class ClusterError(Exception):
pass
| 13.333333 | 30 | 0.75 | 4 | 40 | 7.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.175 | 40 | 2 | 31 | 20 | 0.909091 | 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 |
1726667044a8f8514687bcf0987ad23a50f897be | 60 | py | Python | hello-world.py | jun-is-lazy/GCI | 81eeb5f7fccbaffbcbbb7d1f42243a24ae6d43f1 | [
"Apache-2.0"
] | null | null | null | hello-world.py | jun-is-lazy/GCI | 81eeb5f7fccbaffbcbbb7d1f42243a24ae6d43f1 | [
"Apache-2.0"
] | 1 | 2019-12-09T02:53:28.000Z | 2019-12-09T02:53:28.000Z | hello-world.py | jun-is-lazy/GCI | 81eeb5f7fccbaffbcbbb7d1f42243a24ae6d43f1 | [
"Apache-2.0"
] | null | null | null | print("Hello world!!!")
print("This is for Google Code In")
| 20 | 35 | 0.683333 | 10 | 60 | 4.1 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 60 | 2 | 36 | 30 | 0.788462 | 0 | 0 | 0 | 0 | 0 | 0.666667 | 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 |
1752b19f76ec0bf51d38af94fafad6a4eca39a57 | 131 | py | Python | RecoVertex/BeamSpotProducer/python/BeamSpotFakeConditionsEarly10TeVCollision_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoVertex/BeamSpotProducer/python/BeamSpotFakeConditionsEarly10TeVCollision_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoVertex/BeamSpotProducer/python/BeamSpotFakeConditionsEarly10TeVCollision_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from RecoVertex.BeamSpotProducer.BeamSpotFakeConditionsEarly10TeVCollision_cfi import *
| 26.2 | 87 | 0.885496 | 12 | 131 | 9.583333 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016529 | 0.076336 | 131 | 4 | 88 | 32.75 | 0.933884 | 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 |
1762780685a620d640683d00f15c01e623e4d0f9 | 979 | py | Python | tests/test_common.py | NotTani/slotscheck | ee91463d22704bd85db31464dbefb04931d24afc | [
"MIT"
] | null | null | null | tests/test_common.py | NotTani/slotscheck | ee91463d22704bd85db31464dbefb04931d24afc | [
"MIT"
] | null | null | null | tests/test_common.py | NotTani/slotscheck | ee91463d22704bd85db31464dbefb04931d24afc | [
"MIT"
] | null | null | null | import urllib
from datetime import date
from decimal import Decimal
from enum import Enum
from fractions import Fraction
from random import Random
from slotscheck.common import SlotsStatus, slot_status, walk_classes
def test_walk_classes():
assert len(set(walk_classes(urllib))) == 54
def test_slot_status():
assert slot_status(type) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(tuple) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(dict) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(float) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(Decimal) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(Enum) is SlotsStatus.NO_SLOTS
assert slot_status(Random) is SlotsStatus.NO_SLOTS
assert slot_status(Fraction) is SlotsStatus.HAS_SLOTS
assert slot_status(date) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(AssertionError) is SlotsStatus.NOT_PUREPYTHON
assert slot_status(RuntimeError) is SlotsStatus.NOT_PUREPYTHON
| 36.259259 | 68 | 0.813075 | 134 | 979 | 5.723881 | 0.261194 | 0.169492 | 0.229465 | 0.271186 | 0.477184 | 0.477184 | 0.477184 | 0 | 0 | 0 | 0 | 0.002364 | 0.135853 | 979 | 26 | 69 | 37.653846 | 0.904255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.571429 | 1 | 0.095238 | true | 0 | 0.333333 | 0 | 0.428571 | 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 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
1779ac72c6fdba88807356537b3dcf632f1d958b | 182 | py | Python | nitorch/nn/generators/__init__.py | wyli/nitorch | 3ecd18944cf45fb9193c4c6ffc32953c4d1c71ac | [
"MIT"
] | 1 | 2021-04-09T21:24:47.000Z | 2021-04-09T21:24:47.000Z | nitorch/nn/generators/__init__.py | wyli/nitorch | 3ecd18944cf45fb9193c4c6ffc32953c4d1c71ac | [
"MIT"
] | null | null | null | nitorch/nn/generators/__init__.py | wyli/nitorch | 3ecd18944cf45fb9193c4c6ffc32953c4d1c71ac | [
"MIT"
] | null | null | null | """Random sampling (mainly aimed at augmentation)"""
from ._distribution import *
from ._field import *
from ._mixture import *
from ._spatial import *
from ._augmentation import *
| 22.75 | 52 | 0.752747 | 21 | 182 | 6.285714 | 0.571429 | 0.30303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148352 | 182 | 7 | 53 | 26 | 0.851613 | 0.252747 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 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 |
17a23b3b8780e26feab7a9090cb1f63e123a0358 | 102 | py | Python | frontend/frontend/config/admin.py | jsaalfeld/OpenSlides-manager | 54b48424894a19e24d6b2bf0a9ff068a1ea976b0 | [
"MIT"
] | null | null | null | frontend/frontend/config/admin.py | jsaalfeld/OpenSlides-manager | 54b48424894a19e24d6b2bf0a9ff068a1ea976b0 | [
"MIT"
] | 2 | 2018-07-13T06:28:42.000Z | 2018-07-13T06:33:32.000Z | frontend/frontend/config/admin.py | jsaalfeld/OpenSlides-manager | 54b48424894a19e24d6b2bf0a9ff068a1ea976b0 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import BackendConfig
admin.site.register(BackendConfig) | 25.5 | 34 | 0.852941 | 13 | 102 | 6.692308 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.088235 | 102 | 4 | 34 | 25.5 | 0.935484 | 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 |
bd6b9a0202acf53420a1d82f5aed3996a116d5e5 | 1,147 | py | Python | sdks/python/test/test_PrivateGooglePlayConnectionSecretResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_PrivateGooglePlayConnectionSecretResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_PrivateGooglePlayConnectionSecretResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcenter_sdk
from PrivateGooglePlayConnectionSecretResponse.clsPrivateGooglePlayConnectionSecretResponse import PrivateGooglePlayConnectionSecretResponse # noqa: E501
from appcenter_sdk.rest import ApiException
class TestPrivateGooglePlayConnectionSecretResponse(unittest.TestCase):
"""PrivateGooglePlayConnectionSecretResponse unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testPrivateGooglePlayConnectionSecretResponse(self):
"""Test PrivateGooglePlayConnectionSecretResponse"""
# FIXME: construct object with mandatory attributes with example values
# model = appcenter_sdk.models.clsPrivateGooglePlayConnectionSecretResponse.PrivateGooglePlayConnectionSecretResponse() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
| 28.675 | 154 | 0.773322 | 98 | 1,147 | 8.887755 | 0.632653 | 0.027555 | 0.112514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01147 | 0.163906 | 1,147 | 39 | 155 | 29.410256 | 0.896767 | 0.464691 | 0 | 0.214286 | 0 | 0 | 0.013986 | 0 | 0 | 0 | 0 | 0.025641 | 0 | 1 | 0.214286 | false | 0.214286 | 0.357143 | 0 | 0.642857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
bd8fde647fe6d93afe83331befc71a2e7b0bb599 | 97 | py | Python | tests/conftest.py | vmagamedov/pi | 6ee98af69b757d96aa4eddc32513309e0fe05d1d | [
"BSD-3-Clause"
] | 7 | 2016-06-24T04:49:48.000Z | 2020-06-29T17:34:12.000Z | tests/conftest.py | vmagamedov/pi | 6ee98af69b757d96aa4eddc32513309e0fe05d1d | [
"BSD-3-Clause"
] | 11 | 2016-06-19T13:16:59.000Z | 2019-11-02T13:14:19.000Z | tests/conftest.py | vmagamedov/pi | 6ee98af69b757d96aa4eddc32513309e0fe05d1d | [
"BSD-3-Clause"
] | null | null | null | import pytest
@pytest.fixture()
def loop(event_loop):
"""Shortcut"""
return event_loop
| 12.125 | 21 | 0.680412 | 12 | 97 | 5.333333 | 0.666667 | 0.28125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185567 | 97 | 7 | 22 | 13.857143 | 0.810127 | 0.082474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
bd9fc8ec643ad0e7af00c45adae6866d84057f0d | 21 | py | Python | atividadeCGI/models/massa_model.py | Lucas-WF/Network-OS-1 | 9ed7243d516fbfcf4915622b8f2b6ea4ac00c16f | [
"MIT"
] | null | null | null | atividadeCGI/models/massa_model.py | Lucas-WF/Network-OS-1 | 9ed7243d516fbfcf4915622b8f2b6ea4ac00c16f | [
"MIT"
] | null | null | null | atividadeCGI/models/massa_model.py | Lucas-WF/Network-OS-1 | 9ed7243d516fbfcf4915622b8f2b6ea4ac00c16f | [
"MIT"
] | null | null | null | class Massa:
pass | 10.5 | 12 | 0.666667 | 3 | 21 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.285714 | 21 | 2 | 13 | 10.5 | 0.933333 | 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 |
bdda498e6e9ec4ef206a73373f549de3582e8924 | 94 | py | Python | test/tests/platform_test.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | test/tests/platform_test.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/tests/platform_test.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | import platform
print type(platform.python_implementation())
# print platform._sys_version()
| 18.8 | 44 | 0.819149 | 11 | 94 | 6.727273 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085106 | 94 | 4 | 45 | 23.5 | 0.860465 | 0.308511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.5 | null | null | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 5 |
da6c2ff6799d3f1828901af3d8bb2af3176a9cf5 | 277 | py | Python | hiicart/gateway/paypal_express/urls.py | hiidef/hiicart | 424ee64b5f298c377df35a59cc8b5c4b05c885f0 | [
"MIT"
] | 1 | 2016-07-15T05:10:24.000Z | 2016-07-15T05:10:24.000Z | hiicart/gateway/paypal_express/urls.py | hiidef/hiicart | 424ee64b5f298c377df35a59cc8b5c4b05c885f0 | [
"MIT"
] | null | null | null | hiicart/gateway/paypal_express/urls.py | hiidef/hiicart | 424ee64b5f298c377df35a59cc8b5c4b05c885f0 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns
urlpatterns = patterns('',
(r'get_details/?$', 'hiicart.gateway.paypal_express.views.get_details'),
(r'finalize/?$', 'hiicart.gateway.paypal_express.views.finalize'),
(r'ipn/?$', 'hiicart.gateway.paypal_express.views.ipn'),
)
| 34.625 | 76 | 0.711191 | 34 | 277 | 5.647059 | 0.5 | 0.21875 | 0.3125 | 0.421875 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097473 | 277 | 7 | 77 | 39.571429 | 0.768 | 0 | 0 | 0 | 0 | 0 | 0.592058 | 0.480144 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0 | 0 | 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 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
e50c1db937368bd4d1b7997a8574e1f59e6f1150 | 50 | py | Python | cqd/__init__.py | KiddoZhu/KGReasoning | fce04172e460ddab7bfad6bfb2cf159dd5fdcbbf | [
"MIT"
] | 9 | 2021-06-28T18:13:41.000Z | 2021-12-31T11:55:30.000Z | cqd/__init__.py | KiddoZhu/KGReasoning | fce04172e460ddab7bfad6bfb2cf159dd5fdcbbf | [
"MIT"
] | 3 | 2021-09-21T20:14:05.000Z | 2022-03-27T09:36:28.000Z | cqd/__init__.py | KiddoZhu/KGReasoning | fce04172e460ddab7bfad6bfb2cf159dd5fdcbbf | [
"MIT"
] | 2 | 2021-12-29T20:46:03.000Z | 2021-12-30T13:55:13.000Z | # -*- coding: utf-8 -*-
from cqd.base import CQD
| 12.5 | 24 | 0.6 | 8 | 50 | 3.75 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025 | 0.2 | 50 | 3 | 25 | 16.666667 | 0.725 | 0.42 | 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 |
e51c944b4feebc117e016bacfb1ec9460a1b7d7a | 86 | py | Python | srv/sampleScript.py | cchampou/dvb-forge | 65537bb3ed3f24071ce913ec500becdce915a02f | [
"MIT"
] | 1 | 2020-01-31T23:47:03.000Z | 2020-01-31T23:47:03.000Z | srv/sampleScript.py | cchampou/dvb-forge | 65537bb3ed3f24071ce913ec500becdce915a02f | [
"MIT"
] | 6 | 2021-03-09T11:38:12.000Z | 2022-02-26T15:09:58.000Z | srv/sampleScript.py | cchampou/dvb-forge | 65537bb3ed3f24071ce913ec500becdce915a02f | [
"MIT"
] | null | null | null |
import sys;
import time;
print "Script started"
time.sleep(5);
print "Script ended"
| 10.75 | 22 | 0.732558 | 13 | 86 | 4.846154 | 0.692308 | 0.349206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013699 | 0.151163 | 86 | 7 | 23 | 12.285714 | 0.849315 | 0 | 0 | 0 | 0 | 0 | 0.305882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.4 | null | null | 0.4 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
e54197c4f858f034f8f8a7b05705ae14c9fd4c68 | 24 | py | Python | src/no2amaranth/__init__.py | esden/no2amaranth | 9efd1ff009f0b06be5189be0dceebc3e6fa63613 | [
"RSA-MD"
] | null | null | null | src/no2amaranth/__init__.py | esden/no2amaranth | 9efd1ff009f0b06be5189be0dceebc3e6fa63613 | [
"RSA-MD"
] | 2 | 2021-12-15T05:50:58.000Z | 2021-12-15T05:51:19.000Z | src/no2amaranth/__init__.py | esden/no2amaranth | 9efd1ff009f0b06be5189be0dceebc3e6fa63613 | [
"RSA-MD"
] | 1 | 2021-12-15T00:33:03.000Z | 2021-12-15T00:33:03.000Z | from .amaranth import *
| 12 | 23 | 0.75 | 3 | 24 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 24 | 1 | 24 | 24 | 0.9 | 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 |
e57c7b5a32a61009ca85f7174dc02f8127ab63df | 32 | py | Python | Uber_Duper_Simulation_Python/main3_cython.py | as3boyan/Uber-Duper-Simulation | a3942831a1acf08479f06fd8cfe8896ec00ac32c | [
"MIT"
] | null | null | null | Uber_Duper_Simulation_Python/main3_cython.py | as3boyan/Uber-Duper-Simulation | a3942831a1acf08479f06fd8cfe8896ec00ac32c | [
"MIT"
] | null | null | null | Uber_Duper_Simulation_Python/main3_cython.py | as3boyan/Uber-Duper-Simulation | a3942831a1acf08479f06fd8cfe8896ec00ac32c | [
"MIT"
] | null | null | null | from main_2_2_7 import run
run() | 16 | 26 | 0.8125 | 8 | 32 | 2.875 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107143 | 0.125 | 32 | 2 | 27 | 16 | 0.714286 | 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 |
e59f234898e12a1a28d9f3b53fabecf2a0f4cf1b | 164 | py | Python | tests/integration/conftest.py | Nightfurex/build-magic | ed6c5e36cd98a760a9cc1939589833722126e088 | [
"MIT"
] | 10 | 2020-12-11T07:33:32.000Z | 2022-03-27T20:48:12.000Z | tests/integration/conftest.py | Nightfurex/build-magic | ed6c5e36cd98a760a9cc1939589833722126e088 | [
"MIT"
] | 89 | 2021-03-31T06:48:11.000Z | 2022-03-23T02:17:17.000Z | tests/integration/conftest.py | Nightfurex/build-magic | ed6c5e36cd98a760a9cc1939589833722126e088 | [
"MIT"
] | 3 | 2021-06-14T20:15:04.000Z | 2022-02-10T18:20:28.000Z | from click.testing import CliRunner
import pytest
@pytest.fixture
def cli():
"""Provides a CliRunner object for invoking cli calls."""
return CliRunner()
| 18.222222 | 61 | 0.731707 | 21 | 164 | 5.714286 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.176829 | 164 | 8 | 62 | 20.5 | 0.888889 | 0.310976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | true | 0 | 0.4 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
e5a2dfea30292e05b25ebe924df17ed69619a390 | 247 | py | Python | install.py | zooksman/unichain | d69063080fa45f7ddc2d5df858cd4d3237e47b2b | [
"BSD-3-Clause"
] | 3 | 2018-01-03T05:14:11.000Z | 2018-12-14T06:14:36.000Z | install.py | zooksman/unichain | d69063080fa45f7ddc2d5df858cd4d3237e47b2b | [
"BSD-3-Clause"
] | null | null | null | install.py | zooksman/unichain | d69063080fa45f7ddc2d5df858cd4d3237e47b2b | [
"BSD-3-Clause"
] | null | null | null | import subprocess
subprocess.call(["easy_install", "Savoir"])
subprocess.call(["pip3", "install", "cryptography"])
subprocess.call(["easy_install", "jinja2"])
subprocess.call(["pip3", "install", "git+https://github.com/webpy/webpy#egg=web.py"])
| 35.285714 | 85 | 0.716599 | 30 | 247 | 5.833333 | 0.566667 | 0.32 | 0.205714 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012876 | 0.05668 | 247 | 6 | 86 | 41.166667 | 0.738197 | 0 | 0 | 0 | 0 | 0 | 0.465587 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.2 | 0 | 0.2 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
e5b933bb8cf82b827e65710486224fb323fed0a4 | 235 | py | Python | aiourlshortener/exceptions.py | das7pad/aiourlshortener | 457e6ceb2d2674a60dbca455e214b52c0a3ed484 | [
"MIT"
] | 3 | 2018-02-02T07:08:59.000Z | 2021-01-23T17:01:19.000Z | aiourlshortener/exceptions.py | das7pad/aiourlshortener | 457e6ceb2d2674a60dbca455e214b52c0a3ed484 | [
"MIT"
] | 7 | 2018-01-28T15:38:55.000Z | 2018-03-31T12:34:44.000Z | aiourlshortener/exceptions.py | das7pad/aiourlshortener | 457e6ceb2d2674a60dbca455e214b52c0a3ed484 | [
"MIT"
] | 1 | 2018-01-27T13:21:13.000Z | 2018-01-27T13:21:13.000Z | class UnknownAioUrlShortenerError(Exception):
pass
class FetchError(Exception):
"""A error occurred while fetching a remote resource"""
class ShorteningError(Exception):
pass
class ExpandingError(Exception):
pass
| 15.666667 | 59 | 0.748936 | 23 | 235 | 7.652174 | 0.608696 | 0.221591 | 0.204545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.174468 | 235 | 14 | 60 | 16.785714 | 0.907216 | 0.208511 | 0 | 0.428571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.428571 | 0 | 0 | 0.571429 | 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 |
e5cb007dab2d01f11d72c140cdbfc23788f39e15 | 69 | py | Python | run_rain_table.py | amoodie/rain-table_jeffskwang | a378a24f2c239e5b8076a864e7f924c3c6397185 | [
"MIT"
] | null | null | null | run_rain_table.py | amoodie/rain-table_jeffskwang | a378a24f2c239e5b8076a864e7f924c3c6397185 | [
"MIT"
] | null | null | null | run_rain_table.py | amoodie/rain-table_jeffskwang | a378a24f2c239e5b8076a864e7f924c3c6397185 | [
"MIT"
] | null | null | null | import rain_table
print('launching activity...\n')
rain_table.run() | 13.8 | 32 | 0.753623 | 10 | 69 | 5 | 0.8 | 0.36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086957 | 69 | 5 | 33 | 13.8 | 0.793651 | 0 | 0 | 0 | 0 | 0 | 0.328571 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0.333333 | 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 |
e5e4e62bfc79d4bc2d67ab275c60b3131322d5b1 | 154 | py | Python | Scripts/testLevel.py | P3D-Space-Tech-Demo/Section-3-Space-Station | 1751f61e2eb35343909347014973695478c682a7 | [
"BSD-3-Clause"
] | null | null | null | Scripts/testLevel.py | P3D-Space-Tech-Demo/Section-3-Space-Station | 1751f61e2eb35343909347014973695478c682a7 | [
"BSD-3-Clause"
] | 1 | 2021-05-19T22:50:41.000Z | 2021-06-02T03:00:04.000Z | Scripts/mission.py | P3D-Space-Tech-Demo/Section2SpaceflightDocking | d47c18f6e53a92564130f0fa1b70d72cfb1f6229 | [
"BSD-3-Clause"
] | null | null | null |
def activateSpawner(levelObj):
levelObj.activateSpawner("Cube.041")
levelObj.activateSpawner("Cube.047")
levelObj.activateSpawner("Cube.048") | 30.8 | 40 | 0.753247 | 15 | 154 | 7.733333 | 0.466667 | 0.594828 | 0.698276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.065693 | 0.11039 | 154 | 5 | 41 | 30.8 | 0.781022 | 0 | 0 | 0 | 0 | 0 | 0.155844 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
f90fb6f75377e21c8b71b61e51922ea44d5a80fe | 277 | py | Python | src/tictactoe/console/input/Input.py | dawidcdv/tictactoe | d42016ce7765bba8d1852e82de4e08648ce4d62a | [
"MIT"
] | null | null | null | src/tictactoe/console/input/Input.py | dawidcdv/tictactoe | d42016ce7765bba8d1852e82de4e08648ce4d62a | [
"MIT"
] | null | null | null | src/tictactoe/console/input/Input.py | dawidcdv/tictactoe | d42016ce7765bba8d1852e82de4e08648ce4d62a | [
"MIT"
] | null | null | null | from src.tictactoe.console.input.InputAdapter import InputAdapter
class Input:
def __init__(self, adapter : InputAdapter):
self.adapter = adapter
def askForPosition(self) -> int:
return self.adapter.convertToGamePosition(input("Podaj wspolrzedne "))
| 27.7 | 78 | 0.732852 | 29 | 277 | 6.862069 | 0.62069 | 0.165829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.176895 | 277 | 9 | 79 | 30.777778 | 0.872807 | 0 | 0 | 0 | 0 | 0 | 0.064982 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 0.166667 | 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 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
00606a37ebff7564c84ff6e4c362fa139085e980 | 4,504 | py | Python | utils/models.py | Vaden4d/logo-classifier | 18c397e52352da8e79868158123c13bf0417130f | [
"MIT"
] | null | null | null | utils/models.py | Vaden4d/logo-classifier | 18c397e52352da8e79868158123c13bf0417130f | [
"MIT"
] | null | null | null | utils/models.py | Vaden4d/logo-classifier | 18c397e52352da8e79868158123c13bf0417130f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import pytorch_lightning as pl
from efficientnet_pytorch import EfficientNet
from pytorch_lightning.metrics.classification import F1
from mixmatch_pytorch import get_mixmatch_loss
class EfficientNetModel(pl.LightningModule):
def __init__(self, loss, weight=None, num_classes=2):
super().__init__()
self.efficient_net = EfficientNet.from_pretrained('efficientnet-b1',
num_classes=num_classes)
in_features = self.efficient_net._fc.in_features
self.efficient_net._fc = nn.Linear(in_features,
num_classes)
with torch.no_grad():
if weight is not None:
self.efficient_net._fc.bias.data = weight
self.num_classes = num_classes
self.loss = loss
self.metric = F1(num_classes=self.num_classes, average="none")
self.train_metric = self.metric.clone()
self.val_metric = self.metric.clone()
def forward(self,x):
out = self.efficient_net(x)
return out
def configure_optimizers(self):
optimizer = torch.optim.Adam(self.parameters(), lr=1e-4)
return optimizer
def training_step(self, batch, batch_idx):
x, y = batch["features"], batch["targets"]
y_hat = self(x)
loss = self.loss(y_hat, y)
f1_score = self.train_metric(y_hat, y.argmax(dim=-1))[1]
self.log("train_loss", loss, on_step=False, on_epoch=True, prog_bar=True, logger=True)
return loss
def training_epoch_end(self, outs):
self.log('train_acc_f1', self.train_metric.compute()[1], prog_bar=True, logger=True)
def validation_step(self, batch, batch_idx):
x, y = batch["features"], batch["targets"]
y_hat = self(x)
loss = self.loss(y_hat, y)
f1_score = self.val_metric(y_hat, y.argmax(dim=-1))[1]
self.log("val_loss", loss, prog_bar=True, logger=True)
def validation_epoch_end(self, outs):
self.log('val_acc_f1', self.val_metric.compute()[1], prog_bar=True, logger=True)
class EfficientNetSSL(pl.LightningModule):
def __init__(self, loss, weight=None, num_classes=2, T=0.5):
super().__init__()
self.efficient_net = EfficientNet.from_pretrained('efficientnet-b1',
num_classes=num_classes)
in_features = self.efficient_net._fc.in_features
self.efficient_net._fc = nn.Linear(in_features,
num_classes)
with torch.no_grad():
if weight is not None:
self.efficient_net._fc.bias.data = weight
self.num_classes = num_classes
self.criterion_labeled = loss
self.loss = get_mixmatch_loss(
criterion_labeled=self.criterion_labeled,
output_transform=nn.Softmax(dim=-1),
K=2,
weight_unlabeled=1.0,
criterion_unlabeled=nn.MSELoss()
)
self.train_metric = F1(num_classes=self.num_classes, average="none")
self.val_metric = F1(num_classes=self.num_classes, average="none")
def forward(self, x):
out = self.efficient_net(x)
return out
def configure_optimizers(self):
optimizer = torch.optim.Adam(self.parameters(), lr=1e-4)
return optimizer
def training_step(self, batch, batch_idx):
x, y = batch["features"], batch["targets"]
logits = self(x)
loss = self.loss(logits, y)
f1 = self.train_metric(logits, y.argmax(dim=-1))[1]
self.log("train_loss", loss, on_step=False, on_epoch=True, prog_bar=True, logger=True)
#self.log("train_f1", f1, on_step=False, on_epoch=True, prog_bar=True, logger=True)
return loss
def training_epoch_end(self, outs):
self.log('train_acc_f1', self.train_metric.compute()[1], prog_bar=True, logger=True)
def validation_step(self, batch, batch_idx):
x, y = batch["features"], batch["targets"]
logits = self(x)
loss = self.criterion_labeled(logits, y)
f1 = self.val_metric(logits, y.argmax(dim=-1))[1]
self.log("val_loss", loss, prog_bar=True, logger=True)
#self.log("val_f1", f1, prog_bar=True, logger=True)
def validation_epoch_end(self, outs):
self.log('val_acc_f1', self.val_metric.compute()[1], prog_bar=True, logger=True) | 39.508772 | 94 | 0.62611 | 600 | 4,504 | 4.461667 | 0.166667 | 0.067239 | 0.059768 | 0.063504 | 0.790811 | 0.789316 | 0.789316 | 0.784087 | 0.784087 | 0.759059 | 0 | 0.012579 | 0.258659 | 4,504 | 114 | 95 | 39.508772 | 0.789158 | 0.029307 | 0 | 0.659341 | 0 | 0 | 0.041638 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.076923 | 0 | 0.318681 | 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 |
0065fbcb1b2ce8a2ba53e071b430828830f7f35a | 3,424 | py | Python | tests/test_polyflow/test_schedule.py | granularai/polyaxon-schemas | 017ae74701f21f12f0b25e75379681ea5d8baa9e | [
"MIT"
] | null | null | null | tests/test_polyflow/test_schedule.py | granularai/polyaxon-schemas | 017ae74701f21f12f0b25e75379681ea5d8baa9e | [
"MIT"
] | null | null | null | tests/test_polyflow/test_schedule.py | granularai/polyaxon-schemas | 017ae74701f21f12f0b25e75379681ea5d8baa9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from unittest import TestCase
from hestia.tz_utils import local_now
from marshmallow import ValidationError
from polyaxon_schemas.polyflow.schedule import (
CronScheduleConfig,
IntervalScheduleConfig,
ScheduleSchema
)
class TestScheduleConfigs(TestCase):
def test_interval_schedule(self):
config_dict = {'frequency': 2, 'start_at': 'foo'}
with self.assertRaises(ValidationError):
IntervalScheduleConfig.from_dict(config_dict)
config_dict = {'frequency': 'foo', 'start_at': local_now().isoformat()}
with self.assertRaises(ValidationError):
IntervalScheduleConfig.from_dict(config_dict)
config_dict = {'kind': 'cron',
'frequency': 2,
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat()}
with self.assertRaises(ValidationError):
IntervalScheduleConfig.from_dict(config_dict)
config_dict = {
'frequency': 2,
'start_at': local_now().isoformat()
}
IntervalScheduleConfig.from_dict(config_dict)
config_dict = {
'frequency': 2,
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat()
}
IntervalScheduleConfig.from_dict(config_dict)
config_dict = {
'kind': 'interval',
'frequency': 2,
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat(),
'depends_on_past': False,
}
IntervalScheduleConfig.from_dict(config_dict)
def test_cron_schedule(self):
config_dict = {'cron': 2, 'start_at': 'foo'}
with self.assertRaises(ValidationError):
CronScheduleConfig.from_dict(config_dict)
config_dict = {'kind': 'interval',
'cron': '0 0 * * *',
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat()}
with self.assertRaises(ValidationError):
CronScheduleConfig.from_dict(config_dict)
config_dict = {
'cron': '0 0 * * *',
}
CronScheduleConfig.from_dict(config_dict)
config_dict = {
'cron': '0 0 * * *',
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat()
}
CronScheduleConfig.from_dict(config_dict)
config_dict = {
'kind': 'cron',
'cron': '0 0 * * *',
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat(),
'depends_on_past': False,
}
CronScheduleConfig.from_dict(config_dict)
def test_schedule(self):
configs = [
{
'kind': 'interval',
'frequency': 2,
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat(),
'depends_on_past': False,
},
{
'kind': 'cron',
'cron': '0 0 * * *',
'start_at': local_now().isoformat(),
'end_at': local_now().isoformat(),
'depends_on_past': False,
}
]
ScheduleSchema().load(configs, many=True)
| 32 | 79 | 0.5441 | 310 | 3,424 | 5.709677 | 0.174194 | 0.124294 | 0.158192 | 0.19322 | 0.777966 | 0.752542 | 0.713559 | 0.713559 | 0.663842 | 0.663842 | 0 | 0.007857 | 0.3309 | 3,424 | 106 | 80 | 32.301887 | 0.764732 | 0.006133 | 0 | 0.636364 | 0 | 0 | 0.119083 | 0 | 0 | 0 | 0 | 0 | 0.056818 | 1 | 0.034091 | false | 0 | 0.056818 | 0 | 0.102273 | 0.011364 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
006f3a7558111c7d27acad4e2d9118022e4d4e03 | 6,975 | py | Python | tests/router_test.py | aio-libs-abandoned/aiorest | 3caf0ad8018d96bd681843b54aa07c86803fbec8 | [
"MIT"
] | 3 | 2018-02-07T04:16:53.000Z | 2018-04-26T21:56:59.000Z | tests/router_test.py | aio-libs-abandoned/aiorest | 3caf0ad8018d96bd681843b54aa07c86803fbec8 | [
"MIT"
] | null | null | null | tests/router_test.py | aio-libs-abandoned/aiorest | 3caf0ad8018d96bd681843b54aa07c86803fbec8 | [
"MIT"
] | null | null | null | import unittest
from unittest import mock
import asyncio
import aiohttp
from aiorest import RESTServer, Request
import json
class RouterTests(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(None)
self.server = RESTServer(hostname='example.com', loop=self.loop)
def tearDown(self):
self.loop.close()
def test_add_url(self):
handler = lambda id: None
self.server.add_url('post', '/post/{id}', handler)
self.assertEqual(1, len(self.server._urls))
entry = self.server._urls[0]
self.assertEqual('POST', entry.method)
self.assertIs(handler, entry.handler)
self.assertEqual('^/post/(?P<id>[^{}/]+)$', entry.regex.pattern)
def test_add_url_invalid1(self):
with self.assertRaises(ValueError):
self.server.add_url('post', '/post/{id', lambda: None)
def test_add_url_invalid2(self):
with self.assertRaises(ValueError):
self.server.add_url('post', '/post/{id{}}', lambda: None)
def test_add_url_invalid3(self):
with self.assertRaises(ValueError):
self.server.add_url('post', '/post/{id{}', lambda: None)
def test_add_url_invalid4(self):
with self.assertRaises(ValueError):
self.server.add_url('post', '/post/{id"}', lambda: None)
def test_add_url_invalid5(self):
with self.assertRaises(ValueError):
self.server.add_url('post', '/post"{id}', lambda: None)
def test_dispatch_not_found(self):
m = mock.Mock()
self.server.add_url('post', '/post/{id}', m)
self.server.add_url('get', '/post/{id}', m)
@asyncio.coroutine
def go():
with self.assertRaises(aiohttp.HttpProcessingError) as ctx:
request = Request('host', aiohttp.RawRequestMessage(
'POST', '/not/found', '1.1', {}, True, None),
None, loop=self.loop)
yield from self.server.dispatch(request)
self.assertEqual(404, ctx.exception.code)
self.assertFalse(m.called)
self.loop.run_until_complete(go())
def test_dispatch_method_not_allowed(self):
m = mock.Mock()
self.server.add_url('post', '/post/{id}', m)
self.server.add_url('get', '/post/{id}', m)
@asyncio.coroutine
def go():
with self.assertRaises(aiohttp.HttpProcessingError) as ctx:
request = Request('host', aiohttp.RawRequestMessage(
'DELETE', '/post/123', '1.1', {}, True, None),
None, loop=self.loop)
yield from self.server.dispatch(request)
self.assertEqual(405, ctx.exception.code)
self.assertEqual((('Allow', 'GET, POST'),), ctx.exception.headers)
self.assertFalse(m.called)
self.loop.run_until_complete(go())
def test_dispatch(self):
def f(request):
return {'a': 1, 'b': 2}
self.server.add_url('get', '/post/{id}', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/post/123', '1.1', {}, True, None),
None, loop=self.loop)
ret = self.loop.run_until_complete(self.server.dispatch(request))
# json.loads is required to avoid items order in dict
self.assertEqual({"b": 2, "a": 1}, json.loads(ret))
def test_dispatch_with_ending_slash(self):
def f(request):
return {'a': 1, 'b': 2}
self.server.add_url('get', '/post/{id}/', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/post/123/', '1.1', {}, True, None),
None, loop=self.loop)
ret = self.loop.run_until_complete(self.server.dispatch(request))
# json.loads is required to avoid items order in dict
self.assertEqual({"b": 2, "a": 1}, json.loads(ret))
def test_dispatch_with_ending_slash_not_found1(self):
def f(request):
return {'a': 1, 'b': 2}
self.server.add_url('get', '/post/{id}/', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/post/123', '1.1', {}, True, None),
None, loop=self.loop)
with self.assertRaises(aiohttp.HttpProcessingError) as ctx:
self.loop.run_until_complete(self.server.dispatch(request))
self.assertEqual(404, ctx.exception.code)
def test_dispatch_with_ending_slash_not_found2(self):
def f(request):
return {'a': 1, 'b': 2}
self.server.add_url('get', '/post/{id}/', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/po/123', '1.1', {}, True, None),
None, loop=self.loop)
with self.assertRaises(aiohttp.HttpProcessingError) as ctx:
self.loop.run_until_complete(self.server.dispatch(request))
self.assertEqual(404, ctx.exception.code)
def test_dispatch_bad_signature(self):
def f():
return {'a': 1, 'b': 2}
self.server.add_url('get', '/post/{id}', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/post/123', '1.1', {}, True, None),
None, loop=self.loop)
@asyncio.coroutine
def go():
with self.assertRaises(aiohttp.HttpProcessingError) as ctx:
yield from self.server.dispatch(request)
self.assertEqual(500, ctx.exception.code)
self.loop.run_until_complete(go())
def test_dispatch_http_exception_from_handler(self):
def f(request):
raise aiohttp.HttpProcessingError(
code=401,
headers=(('WWW-Authenticate', 'Basic'),))
self.server.add_url('get', '/post/{id}', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/post/123', '1.1', {}, True, None),
None, loop=self.loop)
@asyncio.coroutine
def go():
with self.assertRaises(aiohttp.HttpProcessingError) as ctx:
yield from self.server.dispatch(request)
self.assertEqual(401, ctx.exception.code)
self.assertEqual((('WWW-Authenticate', 'Basic'),),
ctx.exception.headers)
self.loop.run_until_complete(go())
def test_dispatch_with_request(self):
def f(req):
self.assertIsInstance(req, Request)
self.assertEqual('GET', req.method)
self.assertEqual('/post/123', req.path)
return {'a': 1, 'b': 2}
self.server.add_url('get', '/post/{id}', f)
request = Request('host', aiohttp.RawRequestMessage(
'GET', '/post/123', '1.1', {}, True, None),
None, loop=self.loop)
ret = self.loop.run_until_complete(self.server.dispatch(request))
# json.loads is required to avoid items order in dict
self.assertEqual({"b": 2, "a": 1}, json.loads(ret))
| 37.299465 | 78 | 0.586667 | 837 | 6,975 | 4.777778 | 0.135006 | 0.072518 | 0.055264 | 0.068017 | 0.770443 | 0.754939 | 0.754939 | 0.743186 | 0.743186 | 0.722681 | 0 | 0.0181 | 0.263369 | 6,975 | 186 | 79 | 37.5 | 0.760218 | 0.022222 | 0 | 0.6 | 0 | 0 | 0.078345 | 0.003374 | 0 | 0 | 0 | 0 | 0.213793 | 1 | 0.193103 | false | 0 | 0.041379 | 0.034483 | 0.282759 | 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 |
007731a0b31aea8674d923ff69a5e5ede35f5830 | 2,721 | py | Python | test/test_box_filter.py | dmarnerides/boardom | b7eec437b43398ac8dd8d2755dca9bbe7a8ff8a3 | [
"BSD-2-Clause"
] | 2 | 2021-10-05T15:52:50.000Z | 2021-11-22T00:05:03.000Z | test/test_box_filter.py | dmarnerides/boardom | b7eec437b43398ac8dd8d2755dca9bbe7a8ff8a3 | [
"BSD-2-Clause"
] | null | null | null | test/test_box_filter.py | dmarnerides/boardom | b7eec437b43398ac8dd8d2755dca9bbe7a8ff8a3 | [
"BSD-2-Clause"
] | null | null | null | import pytest
import torch
import boardom as bd
class TestBoxFilter:
def test_boxfilter1d_works(self):
odd = torch.Tensor([1, 2, 3, 2, 1])
assert torch.equal(bd.box_filter1d(odd, k=1), odd)
assert torch.equal(bd.box_filter1d(odd, k=2), torch.Tensor([3, 5, 5, 3, 1]))
assert torch.equal(bd.box_filter1d(odd, k=3), torch.Tensor([3, 6, 7, 6, 3]))
assert torch.equal(bd.box_filter1d(odd, k=4), torch.Tensor([6, 8, 8, 6, 3]))
assert torch.equal(bd.box_filter1d(odd, k=5), torch.Tensor([6, 8, 9, 8, 6]))
with pytest.raises(RuntimeError):
bd.box_filter1d(odd, k=6)
with pytest.raises(RuntimeError):
bd.box_filter1d(odd, k=0)
even = torch.Tensor([1, 2, 3, 2])
assert torch.equal(bd.box_filter1d(even, k=1), even)
assert torch.equal(bd.box_filter1d(even, k=2), torch.Tensor([3, 5, 5, 2]))
assert torch.equal(bd.box_filter1d(even, k=3), torch.Tensor([3, 6, 7, 5]))
assert torch.equal(bd.box_filter1d(even, k=4), torch.Tensor([6, 8, 7, 5]))
# Check a 2d tensor input example
even_2d = torch.Tensor([1, 2, 3, 2]).view(1, 4)
assert torch.equal(bd.box_filter1d(even_2d, k=1), even_2d)
assert torch.equal(
bd.box_filter1d(even_2d, k=2), torch.Tensor([3, 5, 5, 2]).view(1, 4)
)
assert torch.equal(
bd.box_filter1d(even_2d, k=3), torch.Tensor([3, 6, 7, 5]).view(1, 4)
)
assert torch.equal(
bd.box_filter1d(even_2d, k=4), torch.Tensor([6, 8, 7, 5]).view(1, 4)
)
even_2d2 = torch.Tensor([1, 2, 3, 2]).view(4, 1)
assert torch.equal(bd.box_filter1d(even_2d2, k=1), even_2d2)
assert torch.equal(
bd.box_filter1d(even_2d2, k=2, dim=0), torch.Tensor([3, 5, 5, 2]).view(4, 1)
)
assert torch.equal(
bd.box_filter1d(even_2d2, k=3, dim=0), torch.Tensor([3, 6, 7, 5]).view(4, 1)
)
assert torch.equal(
bd.box_filter1d(even_2d2, k=4, dim=0), torch.Tensor([6, 8, 7, 5]).view(4, 1)
)
def test_box_filter_2d_works(self):
a = torch.ones(3, 3)
assert torch.equal(
bd.box_filter2d(a, (2, 2)),
torch.Tensor([[4, 4, 2], [4, 4, 2], [2, 2, 1]]),
)
def test_box_filter_nd_works(self):
a = torch.ones(3, 3, 3)
assert torch.equal(
bd.box_filternd(a, (2, 2, 2), dims=(-1, -2, -3)),
torch.Tensor(
[
[[8, 8, 4], [8, 8, 4], [4, 4, 2]],
[[8, 8, 4], [8, 8, 4], [4, 4, 2]],
[[4, 4, 2], [4, 4, 2], [2, 2, 1]],
]
),
)
| 38.871429 | 88 | 0.523705 | 439 | 2,721 | 3.148064 | 0.109339 | 0.075977 | 0.219971 | 0.247467 | 0.828509 | 0.796671 | 0.765557 | 0.624457 | 0.483357 | 0.304631 | 0 | 0.105236 | 0.298052 | 2,721 | 69 | 89 | 39.434783 | 0.618325 | 0.011393 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.316667 | 1 | 0.05 | false | 0 | 0.05 | 0 | 0.116667 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
00b842b452109733b02e2b2dd8a007c9c0ccb98a | 208 | py | Python | downloader/downloader.py | BlackKnight7/scrapy-vedio | fa71bde2c864ae1e23205016723e1006847325a8 | [
"MIT"
] | null | null | null | downloader/downloader.py | BlackKnight7/scrapy-vedio | fa71bde2c864ae1e23205016723e1006847325a8 | [
"MIT"
] | null | null | null | downloader/downloader.py | BlackKnight7/scrapy-vedio | fa71bde2c864ae1e23205016723e1006847325a8 | [
"MIT"
] | null | null | null | import urllib.request
url = 'http://v2.mukewang.com/410739b7-cd23-441d-aeaf-521f93648420/L.mp4?auth_key=1470217158-0-0-130c44d5978d70486c269a2ea119b4ba'
path = 'L.mp4';
urllib.request.urlretrieve(url, path) | 34.666667 | 130 | 0.798077 | 29 | 208 | 5.689655 | 0.758621 | 0.157576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.304569 | 0.052885 | 208 | 6 | 131 | 34.666667 | 0.532995 | 0 | 0 | 0 | 0 | 0.25 | 0.607656 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
00ddbdc596292f38623e8dab7a191599a06409f5 | 68 | py | Python | controller/test/test_arm_chooser.py | FilippoRanza/rr-scheduler | 8fc06f9d0ffe514ab6a94fd8a330f1cfd45b56c3 | [
"MIT"
] | 1 | 2022-01-13T13:59:28.000Z | 2022-01-13T13:59:28.000Z | controller/test/test_arm_chooser.py | FilippoRanza/rr-scheduler | 8fc06f9d0ffe514ab6a94fd8a330f1cfd45b56c3 | [
"MIT"
] | null | null | null | controller/test/test_arm_chooser.py | FilippoRanza/rr-scheduler | 8fc06f9d0ffe514ab6a94fd8a330f1cfd45b56c3 | [
"MIT"
] | null | null | null | #! /usr/bin/python
import pytest
from controller import controller
| 13.6 | 33 | 0.794118 | 9 | 68 | 6 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132353 | 68 | 4 | 34 | 17 | 0.915254 | 0.25 | 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 |
da9ba344b9f98f766776e34ee07106326af77c14 | 91 | py | Python | src/housie/models/__init__.py | Eclair24/housie | 7892002914c2ced422f89cd8c050993c2f931deb | [
"Apache-2.0"
] | 1 | 2020-08-10T07:44:01.000Z | 2020-08-10T07:44:01.000Z | src/housie/models/__init__.py | Eclair24/housie | 7892002914c2ced422f89cd8c050993c2f931deb | [
"Apache-2.0"
] | 1 | 2020-12-07T16:31:05.000Z | 2020-12-09T09:04:58.000Z | src/housie/models/__init__.py | Eclair24/housie | 7892002914c2ced422f89cd8c050993c2f931deb | [
"Apache-2.0"
] | 1 | 2020-10-01T17:54:19.000Z | 2020-10-01T17:54:19.000Z | from .board import Board, demo_board
from .ticket import Ticket, load_tickets, demo_ticket
| 30.333333 | 53 | 0.824176 | 14 | 91 | 5.142857 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.120879 | 91 | 2 | 54 | 45.5 | 0.9 | 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 |
daa4df4b4e5e4a09133e645f95d35bedbb1f3f73 | 1,299 | py | Python | pywinEA/error/exceptions.py | FernandoGaGu/pywinEA | 7dc2e62668851fcf6b4d88d6696c69a2d4a570ec | [
"MIT"
] | 1 | 2021-05-27T18:12:57.000Z | 2021-05-27T18:12:57.000Z | pywinEA/error/exceptions.py | FernandoGaGu/pywinEA | 7dc2e62668851fcf6b4d88d6696c69a2d4a570ec | [
"MIT"
] | null | null | null | pywinEA/error/exceptions.py | FernandoGaGu/pywinEA | 7dc2e62668851fcf6b4d88d6696c69a2d4a570ec | [
"MIT"
] | 1 | 2021-04-16T01:11:03.000Z | 2021-04-16T01:11:03.000Z | # Module that defines the types of exceptions that the module can throw.
#
# Author: Fernando García <ga.gu.fernando@gmail.com>
#
class UnfittedAlgorithm(Exception):
"""
Exception thrown when trying to access parameters or methods with untrained algorithm
"""
pass
class MinimumNumberOfFeaturesAchieved(Exception):
"""
Exception thrown when the algorithm has converged to less than two features.
"""
pass
class ImpossibleProcessLabels(Exception):
"""
Exception thrown when algorithm cannot process class labels.
"""
class FileExists(Exception):
"""
Exception thrown when trying to overwrite existing files.
"""
pass
class ImpossibleHandleMissing(Exception):
"""
Exception thrown when data contains missing values and no way has been provided to handle it.
"""
class InconsistentParameters(Exception):
"""
Exception thrown when the parameters provided to the algorithm are inconsistent.
"""
class FeaturesFunctionError(Exception):
"""
Exception thrown when there is a failure due to the function to evaluate the number of features of a solution.
"""
class UnsuitableClassifier(Exception):
"""
Exception thrown when a classifier is not suitable to perform a certain task.
"""
| 23.196429 | 114 | 0.714396 | 147 | 1,299 | 6.312925 | 0.530612 | 0.155172 | 0.206897 | 0.241379 | 0.144397 | 0.077586 | 0 | 0 | 0 | 0 | 0 | 0 | 0.21555 | 1,299 | 55 | 115 | 23.618182 | 0.910697 | 0.591994 | 0 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.272727 | 0 | 0 | 0.727273 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 5 |
dab569c01f9fc3e6423329fa8da3bb2c1c5d4840 | 40 | py | Python | cli.py | projecteru2/citadel-cli | a825949fb2fdbf8cfbda77feb66ca581db22bd5c | [
"MIT"
] | 3 | 2017-11-03T08:13:26.000Z | 2018-08-25T02:59:26.000Z | cli.py | projecteru2/citadel-cli | a825949fb2fdbf8cfbda77feb66ca581db22bd5c | [
"MIT"
] | null | null | null | cli.py | projecteru2/citadel-cli | a825949fb2fdbf8cfbda77feb66ca581db22bd5c | [
"MIT"
] | null | null | null | from corecli.cli.cli import main
main()
| 13.333333 | 32 | 0.775 | 7 | 40 | 4.428571 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 40 | 2 | 33 | 20 | 0.885714 | 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 |
daeb0e7282e0a3647077ac33d10b1fd4a31be646 | 260 | py | Python | .hypothesis/eval_source/hypothesis_temporary_module_e7ac20823eddd3e706aaf44693170920005cb871.py | keybar/keybar | 46bd0dee310ed4ac1d680f5fe75326aeb109aebc | [
"BSD-3-Clause"
] | 4 | 2015-06-17T07:44:29.000Z | 2021-03-06T01:29:17.000Z | .hypothesis/eval_source/hypothesis_temporary_module_e7ac20823eddd3e706aaf44693170920005cb871.py | keybar/keybar | 46bd0dee310ed4ac1d680f5fe75326aeb109aebc | [
"BSD-3-Clause"
] | 18 | 2015-01-12T20:57:26.000Z | 2022-03-11T23:11:38.000Z | .hypothesis/eval_source/hypothesis_temporary_module_e7ac20823eddd3e706aaf44693170920005cb871.py | keybar/keybar | 46bd0dee310ed4ac1d680f5fe75326aeb109aebc | [
"BSD-3-Clause"
] | 1 | 2015-01-19T07:24:00.000Z | 2015-01-19T07:24:00.000Z | from hypothesis.utils.conventions import not_set
def accept(f):
def basic(basic=not_set, generate_parameter=not_set, generate=not_set, simplify=not_set, copy=not_set):
return f(basic, generate_parameter, generate, simplify, copy)
return basic
| 37.142857 | 107 | 0.769231 | 38 | 260 | 5.052632 | 0.421053 | 0.1875 | 0.145833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142308 | 260 | 6 | 108 | 43.333333 | 0.860987 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.2 | 0.2 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
daf730c1cac2b579868861044d354bff50848333 | 148 | py | Python | pymab/offline_eval/__init__.py | smn-ailab/pymab | 31cea5c01643dce114780a46bd35c9b49deca35b | [
"MIT"
] | 1 | 2019-05-09T09:38:56.000Z | 2019-05-09T09:38:56.000Z | pymab/offline_eval/__init__.py | smn-ailab/pymab | 31cea5c01643dce114780a46bd35c9b49deca35b | [
"MIT"
] | 1 | 2019-02-18T01:09:24.000Z | 2019-02-18T01:09:24.000Z | pymab/offline_eval/__init__.py | smn-ailab/pymab | 31cea5c01643dce114780a46bd35c9b49deca35b | [
"MIT"
] | 1 | 2019-06-24T11:14:58.000Z | 2019-06-24T11:14:58.000Z | from .data_generator import DataGenerator
from .ope import (DirectMethod, DREstimator, IPSEstimator, MRDREstimator,
ReplayMethod)
| 37 | 73 | 0.743243 | 13 | 148 | 8.384615 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.202703 | 148 | 3 | 74 | 49.333333 | 0.923729 | 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 |
9719a9021b69d70ce53348102f1f34c1d00c2869 | 950 | py | Python | MotorControl2/lewansoul-lx16a/setup.py | albertgo98/BipedalRobot | dc354061fceec5317f441901f842afc889167edb | [
"MIT"
] | 51 | 2018-10-19T17:14:17.000Z | 2022-03-01T03:56:19.000Z | lewansoul-lx16a/setup.py | samuellihn/lewansoul-lx16a | 0654bddaa662f1becdeb7f1e5e596c474be3777d | [
"MIT"
] | 9 | 2018-10-14T21:19:43.000Z | 2021-09-20T13:20:44.000Z | lewansoul-lx16a/setup.py | samuellihn/lewansoul-lx16a | 0654bddaa662f1becdeb7f1e5e596c474be3777d | [
"MIT"
] | 21 | 2018-10-10T10:57:02.000Z | 2021-08-30T18:15:58.000Z | from setuptools import setup
setup(
name='lewansoul_lx16a',
version='0.1',
description='Driver to control LewanSoul LX-16A servos',
author='Maxim Kulkin',
author_email='maxim.kulkin@gmail.com',
url='https://github.com/maximkulkin/lewansoul-lx16a',
py_modules=['lewansoul_lx16a', 'lewansoul_lx16a_controller'],
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
install_requires=['pyserial'],
)
| 36.538462 | 70 | 0.632632 | 95 | 950 | 6.252632 | 0.578947 | 0.223906 | 0.294613 | 0.218855 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02981 | 0.223158 | 950 | 25 | 71 | 38 | 0.775068 | 0 | 0 | 0 | 0 | 0 | 0.632632 | 0.050526 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.041667 | 0 | 0.041667 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
97234db8bead75396c1419223042e7dba8a5c488 | 990 | py | Python | 53/test/test_sentence_similarity_controller_api.py | apitore/apitore-sdk-python | c0814c5635ddd09e9a20fcb155b62122bee41d33 | [
"Apache-2.0"
] | 3 | 2018-08-21T06:14:33.000Z | 2019-10-18T23:05:50.000Z | 53/test/test_sentence_similarity_controller_api.py | apitore/apitore-sdk-python | c0814c5635ddd09e9a20fcb155b62122bee41d33 | [
"Apache-2.0"
] | null | null | null | 53/test/test_sentence_similarity_controller_api.py | apitore/apitore-sdk-python | c0814c5635ddd09e9a20fcb155b62122bee41d33 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Sentence Similarity
Sentence Similarity.<BR />[Endpoint] https://api.apitore.com/api/53 # noqa: E501
OpenAPI spec version: 0.0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.api.sentence_similarity_controller_api import SentenceSimilarityControllerApi # noqa: E501
from swagger_client.rest import ApiException
class TestSentenceSimilarityControllerApi(unittest.TestCase):
"""SentenceSimilarityControllerApi unit test stubs"""
def setUp(self):
self.api = swagger_client.api.sentence_similarity_controller_api.SentenceSimilarityControllerApi() # noqa: E501
def tearDown(self):
pass
def test_eval_using_post(self):
"""Test case for eval_using_post
Text similarity using word2vec # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 23.571429 | 120 | 0.726263 | 112 | 990 | 6.169643 | 0.5 | 0.104197 | 0.049204 | 0.069465 | 0.136035 | 0.136035 | 0.136035 | 0 | 0 | 0 | 0 | 0.023602 | 0.186869 | 990 | 41 | 121 | 24.146341 | 0.834783 | 0.361616 | 0 | 0.142857 | 1 | 0 | 0.013913 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0.142857 | 0.357143 | 0 | 0.642857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.