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
94e0a76fde2cf1e193101637e66e23379e96d8e0
224
py
Python
cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py
ghassanmas/edx-cookiecutters
b186021f7322d9c493f1875fff797ebae33157b0
[ "Apache-2.0" ]
23
2016-09-13T17:57:46.000Z
2020-03-29T09:30:48.000Z
cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py
ghassanmas/edx-cookiecutters
b186021f7322d9c493f1875fff797ebae33157b0
[ "Apache-2.0" ]
40
2020-05-11T16:50:12.000Z
2021-12-20T02:19:23.000Z
cookiecutter-django-app/{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/__init__.py
ghassanmas/edx-cookiecutters
b186021f7322d9c493f1875fff797ebae33157b0
[ "Apache-2.0" ]
7
2017-05-31T14:13:52.000Z
2020-05-12T21:18:48.000Z
""" {{ cookiecutter.project_short_description }}. """ __version__ = '{{ cookiecutter.version }}' default_app_config = '{{ cookiecutter.app_name }}.apps.{{ cookiecutter.config_class_name }}' # pylint: disable=invalid-name
28
124
0.723214
22
224
6.863636
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.102679
224
7
125
32
0.751244
0.334821
0
0
0
0
0.673759
0.361702
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
94f4ba6ed64d50cbeeb879a9d70560a5dacf3d3b
321
py
Python
rssant_worker/main.py
zuzhi/rssant
06d985845f6af3be7097e6d718afba7eeb195ec8
[ "BSD-3-Clause" ]
1,176
2019-12-24T01:51:22.000Z
2022-03-29T06:00:25.000Z
rssant_worker/main.py
zuzhi/rssant
06d985845f6af3be7097e6d718afba7eeb195ec8
[ "BSD-3-Clause" ]
33
2020-03-06T03:29:46.000Z
2022-03-11T06:24:26.000Z
rssant_worker/main.py
zuzhi/rssant
06d985845f6af3be7097e6d718afba7eeb195ec8
[ "BSD-3-Clause" ]
110
2019-12-29T05:49:24.000Z
2022-03-28T06:44:21.000Z
import os if os.getenv('MODULE_GRAPH_HOOKER') in ('1', 'true', 'True'): import module_graph module_graph.setup_hooker(save_to='data/rssant_worker_module_graph.json', verbose=True) from rssant_common.actor_helper import start_actor # noqa: F402 if __name__ == "__main__": start_actor('worker', port=6792)
26.75
91
0.744548
47
321
4.638298
0.617021
0.201835
0
0
0
0
0
0
0
0
0
0.028674
0.130841
321
11
92
29.181818
0.752688
0.031153
0
0
0
0
0.252427
0.116505
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
a20ea27ba3117ed58af13893be1fa36390eb8161
219
py
Python
BAEKJOON/Python/2439.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
BAEKJOON/Python/2439.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
BAEKJOON/Python/2439.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
num = int(input()) for i in range(num): no_star = num-i-1 yes_star = i+1 for i1 in range(no_star): print(" ",sep="",end="") for i2 in range(yes_star): print("*",sep="",end="") print()
24.333333
32
0.515982
36
219
3.027778
0.444444
0.192661
0.220183
0.275229
0
0
0
0
0
0
0
0.025157
0.273973
219
9
33
24.333333
0.660377
0
0
0
0
0
0.009091
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bf4644e52957de9dd091d9578f984983baf2e266
142
py
Python
gmenu/apps.py
Ione03/gmenu
ef427cee6fcdbf2e3aa5b6532f7c01499b9748e8
[ "MIT" ]
null
null
null
gmenu/apps.py
Ione03/gmenu
ef427cee6fcdbf2e3aa5b6532f7c01499b9748e8
[ "MIT" ]
null
null
null
gmenu/apps.py
Ione03/gmenu
ef427cee6fcdbf2e3aa5b6532f7c01499b9748e8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class GmenuConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'gmenu'
20.285714
56
0.753521
17
142
6.176471
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.15493
142
6
57
23.666667
0.875
0
0
0
0
0
0.239437
0.204225
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
bf47205a4f9eeafd2447693a448c4ddc628fc8cd
3,405
py
Python
pyadept/rcommands.py
semeniuta/pyadept
cd8677ef4e6033c811f1783d23de459778b83737
[ "BSD-3-Clause" ]
2
2018-10-05T10:08:46.000Z
2020-05-14T18:45:09.000Z
pyadept/rcommands.py
semeniuta/pyadept
cd8677ef4e6033c811f1783d23de459778b83737
[ "BSD-3-Clause" ]
null
null
null
pyadept/rcommands.py
semeniuta/pyadept
cd8677ef4e6033c811f1783d23de459778b83737
[ "BSD-3-Clause" ]
1
2020-12-01T15:45:50.000Z
2020-12-01T15:45:50.000Z
import numpy as np from pyadept.strutil import vec_to_str DELIMITER = b'\r\n' BREAK_CMD = b'break' + DELIMITER def join_commands(*commands): return JoinedCommand(commands) def create_motion_command(template, vec, break_move=True): vec_bytes = vec_to_str(vec) cmd_bytes = template.format(vec_bytes).encode() + DELIMITER if break_move: return cmd_bytes, BREAK_CMD return cmd_bytes, class RobotCommand(object): def get_messages(self): return DELIMITER, def __repr__(self): class_name = self.__class__.__name__ return '{}[{}]'.format(class_name, self._repr_args()) def _repr_args(self): return '' def __len__(self): return sum((len(msg) for msg in self.get_messages())) class JoinedCommand(RobotCommand): def __init__(self, commands): messages = tuple() for cmd in commands: messages += cmd.get_messages() self._messages = messages self._commands_str = ','.join((str(cmd) for cmd in commands)) def get_messages(self): return self._messages def _repr_args(self): return self._commands_str class DirectCommand(RobotCommand): def __init__(self, cmd): self._cmd = cmd def get_messages(self): return self._cmd.encode() + DELIMITER, def _repr_args(self): return '"{}"'.format(self._cmd) class SetSpeed(RobotCommand): def __init__(self, speed_factor): self._speed_factor = speed_factor def get_messages(self): return 'set_speed:{:d}'.format(self._speed_factor).encode() + DELIMITER, def _repr_args(self): return '{:d}'.format(self._speed_factor) class MotionCommand(RobotCommand): def __init__(self, template, vec, break_move=True): assert len(vec) == 6 self._template = template self._vec = vec self._break = break_move def get_messages(self): return create_motion_command(self._template, self._vec, self._break) def _repr_args(self): vs = vec_to_str(self._vec) return '{}, break={}'.format(vs, self._break) class MoveToPose(MotionCommand): def __init__(self, pose, break_move=True): template = 'move_to:{:s}' super(MoveToPose, self).__init__(template, pose, break_move) class MoveRelWorld(MotionCommand): def __init__(self, pose, break_move=True): template = 'move_rel_world:{:s}' super(MoveRelWorld, self).__init__(template, pose, break_move) class MoveJoints(MotionCommand): def __init__(self, jconf, break_move=True): template = 'move_joints:{:s}' super(MoveJoints, self).__init__(template, jconf, break_move) class MoveRelJoints(MotionCommand): def __init__(self, jconf, break_move=True): template = 'move_rel_joints:{:s}' super(MoveRelJoints, self).__init__(template, jconf, break_move) class MoveRelTool(MotionCommand): def __init__(self, pose, break_move=True): template = 'move_rel_tool:{:s}' super(MoveRelTool, self).__init__(template, pose, break_move) class MoveToolZ(MoveRelTool): def __init__(self, z, break_move=True): self._z = z pose = np.array([0, 0, z, 0, 0, 0]) super(MoveToolZ, self).__init__(pose, break_move) def _repr_args(self): return 'z={:.3f}, break={}'.format(self._z, self._break)
23.482759
80
0.6558
422
3,405
4.879147
0.177725
0.069937
0.053424
0.043711
0.389995
0.279747
0.251093
0.132589
0.132589
0.132589
0
0.002651
0.224376
3,405
144
81
23.645833
0.776978
0
0
0.188235
0
0
0.044934
0
0
0
0
0
0.011765
1
0.294118
false
0
0.023529
0.141176
0.635294
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
0
0
1
1
0
0
3
bf8cd3b23bb4289ca1b26b3b9af9020a678e5fa8
13,980
py
Python
src/utils/log.py
jcyrss/hytest
f3a5e53524fcf2917c95721146eb797ffabe4c11
[ "Apache-2.0" ]
8
2021-08-08T01:11:09.000Z
2022-03-07T07:50:08.000Z
src/utils/log.py
Vincentlz/hytest
f3a5e53524fcf2917c95721146eb797ffabe4c11
[ "Apache-2.0" ]
null
null
null
src/utils/log.py
Vincentlz/hytest
f3a5e53524fcf2917c95721146eb797ffabe4c11
[ "Apache-2.0" ]
6
2021-09-07T05:38:24.000Z
2022-03-22T09:52:02.000Z
_f=' case_st_lable' _e='green' _d='tag' _c=' fail' _b='folder_header' _a='executetime' _Z='folder_body' _Y='%Y%m%d_%H%M%S' _X='用例' _W='log' _V='info error-info' _U='%Y-%m-%d %H:%M:%S' _T='abort' _S='fail' _R='pass' _Q='utf8' _P='case_count' _O='case_count_toberun' _N='label' _M='Traceback:\n' _L='suite' _K='case_teardown_fail' _J='suite_teardown_fail' _I='case_setup_fail' _H='suite_setup_fail' _G='class' _F='\n' _E='case_pass' _D='case_abort' _C='case_fail' _B='bright_red' _A=None import logging,os,time from logging.handlers import RotatingFileHandler from rich.console import Console from rich.theme import Theme from hytest.product import version from datetime import datetime from hytest.common import GSTORE from .runner import Collector os.makedirs(_W,exist_ok=True) logger=logging.getLogger('my_logger') logger.setLevel(logging.DEBUG) logFile=os.path.join(_W,'testresult.log') handler=RotatingFileHandler(logFile,maxBytes=1024*1024*30,backupCount=2,encoding=_Q) handler.setLevel(logging.DEBUG) formatter=logging.Formatter(fmt='%(message)s') handler.setFormatter(formatter) handler.doRollover() logger.addHandler(handler) console=Console(theme=Theme(inherit=False)) print=console.print class LogLevel:level=0 class Stats: def test_start(self,_title='Test Report'):self.result={_O:Collector.case_number,_P:0,_E:0,_C:0,_D:0,_H:0,_I:0,_J:0,_K:0,'case_pass_list':[],'case_fail_list':[],'case_abort_list':[]};self.start_time=time.time() def test_end(self,runner): A='---ret---';self.end_time=time.time();self.test_duration=self.end_time-self.start_time if self.result[_C]or self.result[_D]or self.result[_H]or self.result[_I]or self.result[_J]or self.result[_K]:GSTORE[A]=1 else:GSTORE[A]=0 def enter_case(self,caseId,name,case_className):self.result[_P]+=1 def case_result(self,case): if case.execRet==_R:self.result[_E]+=1 elif case.execRet==_S:self.result[_C]+=1 elif case.execRet==_T:self.result[_D]+=1 def setup_fail(self,name,utype,e,stacktrace): if utype==_L:self.result[_H]+=1 else:self.result[_I]+=1 def teardown_fail(self,name,utype,e,stacktrace): if utype==_L:self.result[_J]+=1 else:self.result[_K]+=1 stats=Stats() class ConsoleLogger: def test_end(self,runner):A='white';ret=stats.result;print(f"\n\n ========= 测试耗时 : {stats.test_duration:.3f} 秒 =========\n");print(f"\n 预备执行用例数量 : {ret[_O]}");print(f"\n 实际执行用例数量 : {ret[_P]}");print(f"\n 通过 : {ret[_E]}",style=_e);num=ret[_C];style=A if num==0 else _B;print(f"\n 失败 : {num}",style=style);num=ret[_D];style=A if num==0 else _B;print(f"\n 异常 : {num}",style=style);num=ret[_H];style=A if num==0 else _B;print(f"\n 套件初始化失败 : {num}",style=style);num=ret[_J];style=A if num==0 else _B;print(f"\n 套件清除 失败 : {num}",style=style);num=ret[_I];style=A if num==0 else _B;print(f"\n 用例初始化失败 : {num}",style=style);num=ret[_K];style=A if num==0 else _B;print(f"\n 用例清除 失败 : {num}",style=style) def enter_suite(self,name,suitetype): if suitetype=='file':print(f"\n\n>>> {name}",style='bold bright_black') def enter_case(self,caseId,name,case_className):print(f"\n* {name}",style='bright_white') def case_steps(self,name):... def case_result(self,case): if case.execRet==_R:print(' PASS',style=_e) elif case.execRet==_S:print(f" FAIL\n{case.error}",style=_B) elif case.execRet==_T:print(f" ABORT\n{case.error}",style='magenta') def setup(self,name,utype):... def teardown(self,name,utype):... def setup_fail(self,name,utype,e,stacktrace):utype='套件'if utype==_L else _X;print(f"\n{utype} 初始化失败 | {name} | {e}",style=_B) def teardown_fail(self,name,utype,e,stacktrace):utype='套件'if utype==_L else _X;print(f"\n{utype} 清除失败 | {name} | {e}",style=_B) def debug(self,msg): if LogLevel.level>0:print(f"{msg}") def criticalInfo(self,msg):print(f"{msg}",style=_B) class TextLogger: def test_start(self,_title=''):startTime=time.strftime(_Y,time.localtime(stats.start_time));logger.info(f"\n\n ========= 测试开始 : {startTime} =========\n") def test_end(self,runner):endTime=time.strftime(_Y,time.localtime(stats.end_time));logger.info(f"\n\n ========= 测试结束 : {endTime} =========\n");logger.info(f"\n 耗时 : {stats.end_time-stats.start_time:.3f} 秒\n");ret=stats.result;logger.info(f"\n 预备执行用例数量 : {ret[_O]}");logger.info(f"\n 实际执行用例数量 : {ret[_P]}");logger.info(f"\n 通过 : {ret[_E]}");logger.info(f"\n 失败 : {ret[_C]}");logger.info(f"\n 异常 : {ret[_D]}");logger.info(f"\n 套件初始化失败 : {ret[_H]}");logger.info(f"\n 套件清除 失败 : {ret[_J]}");logger.info(f"\n 用例初始化失败 : {ret[_I]}");logger.info(f"\n 用例清除 失败 : {ret[_K]}") def enter_suite(self,name,suitetype):logger.info(f"\n\n>>> {name}") def enter_case(self,caseId,name,case_className):curTime=datetime.now().strftime(_U);logger.info(f"\n* {name} - {curTime}") def case_steps(self,name):logger.info(f"\n [ case execution steps ]") def case_result(self,case): if case.execRet==_R:logger.info(' PASS ') else: stacktrace=_M+case.stacktrace.split(_F,3)[3] if case.execRet==_S:logger.info(f" FAIL {case.error} \n{stacktrace}") elif case.execRet==_T:logger.info(f" ABORT {case.error} \n{stacktrace}") def setup(self,name,utype):logger.info(f"\n[ {utype} setup ] {name}") def teardown(self,name,utype):logger.info(f"\n[ {utype} teardown ] {name}") def setup_fail(self,name,utype,e,stacktrace):stacktrace=_M+stacktrace.split(_F,3)[3];logger.info(f"{utype} setup fail | {e} \n{stacktrace}") def teardown_fail(self,name,utype,e,stacktrace):stacktrace=_M+stacktrace.split(_F,3)[3];logger.info(f"{utype} teardown fail | {e} \n{stacktrace}") def info(self,msg):logger.info(msg) def debug(self,msg): if LogLevel.level>0:logger.debug(msg) def step(self,stepNo,desc):logger.info(f"\n-- 第 {stepNo} 步 -- {desc} \n") def checkpoint_pass(self,desc):logger.info(f"\n** 检查点 ** {desc} ----> 通过\n") def checkpoint_fail(self,desc):logger.info(f"\n** 检查点 ** {desc} ----> !! 不通过!!\n") def criticalInfo(self,msg):logger.info(f"!!! {msg} !!!") def log_img(self,imgPath,width=_A):logger.info(f"图 {imgPath}") from dominate.tags import * from dominate.util import raw from dominate import document class HtmlLogger: def __init__(self):self.curEle=_A def test_start(self,_title=''): A='menu-item' with open(os.path.join(os.path.dirname(__file__),'report.css'),encoding=_Q)as f:_css_style=f.read() with open(os.path.join(os.path.dirname(__file__),'report.js'),encoding=_Q)as f:_js=f.read() self.doc=document(title=f"测试报告");self.doc.head.add(meta(charset='UTF-8'),style(raw(_css_style)),script(raw(_js),type='text/javascript'));self.main=self.doc.body.add(div(_class='main_section'));self.main.add(h1(f"测试报告 - hytest v{version}",style='font-family: auto'));self.main.add(h3(f"统计结果"));resultDiv=self.main.add(div(_class='result'));self.result_table,self.result_barchart=resultDiv.add(table(_class='result_table'),div(_class='result_barchart'));_,self.logDiv=self.main.add(div(h3('执行日志',style='display:inline'),style='margin-top:2em'),div(_class='exec_log'));self.ev=div(div('∧',_class=A,onclick='previous_error()',title='上一个错误'),div('∨',_class=A,onclick='next_error()',title='下一个错误'),_class='error_jumper');self.main.add(div(div('页首',_class=A,onclick='document.querySelector("body").scrollIntoView()'),div('教程',_class=A,onclick='window.open("http://www.byhy.net/tut/auto/hytest/01", "_blank"); '),div('精简',_class=A,id='display_mode',onclick='toggle_folder_all_cases()'),self.ev,id='float_menu'));self.curEle=self.main;self.curSuiteEle=_A;self.curCaseEle=_A;self.curCaseLableEle=_A;self.curSetupEle=_A;self.curTeardownEle=_A;self.suitepath2element={} def test_end(self,runner): B='%Y%m%d %H:%M:%S';A='color:red';execStartTime=time.strftime(B,time.localtime(stats.start_time));execEndTime=time.strftime(B,time.localtime(stats.end_time));ret=stats.result;errorNum=0;trs=[];trs.append(tr(td('开始时间'),td(f"{execStartTime}")));trs.append(tr(td('结束时间'),td(f"{execEndTime}")));trs.append(tr(td('耗时'),td(f"{stats.test_duration:.3f} 秒")));trs.append(tr(td('预备执行用例数量'),td(f"{ret[_O]}")));trs.append(tr(td('实际执用例行数量'),td(f"{ret[_P]}")));trs.append(tr(td('通过'),td(f"{ret[_E]}")));case_count_toberun=ret[_O];num=ret[_C];style=''if num==0 else A;trs.append(tr(td('失败'),td(f"{num}",style=style)));errorNum+=num;num=ret[_D];style=''if num==0 else A;trs.append(tr(td('异常'),td(f"{num}",style=style)));errorNum+=num;blocked_num=case_count_toberun-ret[_E]-ret[_C]-ret[_D];style=''if blocked_num==0 else A;trs.append(tr(td('阻塞'),td(f"{blocked_num}",style=style)));num=ret[_H];style=''if num==0 else A;trs.append(tr(td('套件初始化失败'),td(f"{num}",style=style)));errorNum+=num;num=ret[_J];style=''if num==0 else A;trs.append(tr(td('套件清除失败'),td(f"{num}",style=style)));errorNum+=num;num=ret[_I];style=''if num==0 else A;trs.append(tr(td('用例初始化失败'),td(f"{num}",style=style)));errorNum+=num;num=ret[_K];style=''if num==0 else A;trs.append(tr(td('用例清除失败'),td(f"{num}",style=style)));errorNum+=num;self.ev['display']='none'if errorNum==0 else'block';self.result_table.add(tbody(*trs)) def add_barchar_item(statName,percent,color): if type(percent)==str:barPercentStr=percent;percentStr='-' else:barPercent=1 if 0<percent<=1 else percent;barPercentStr=f"{barPercent}%";percentStr=f"{percent}%" self.result_barchart.add(div(span(statName),div(div(percentStr,style=f"width: {barPercentStr}; background-color: {color};",_class='barchart_bar'),_class='barchart_barbox'),_class='barchar_item')) def percentCalc(upper,lower):percent=str(round(upper*100/lower,2));percent=percent[:-2]if percent.endswith('.0')else percent;return percent percent=percentCalc(ret[_E],case_count_toberun);add_barchar_item(f"用例通过 {percent}% : {ret[_E]} 个",float(percent),'#04AA6D');percent=percentCalc(ret[_C],case_count_toberun);add_barchar_item(f"用例失败 {percent}% : {ret[_C]} 个",float(percent),'#bb4069');percent=percentCalc(ret[_D],case_count_toberun);add_barchar_item(f"用例异常 {percent}% : {ret[_D]} 个",float(percent),'#9c27b0');percent=percentCalc(blocked_num,case_count_toberun);add_barchar_item(f"用例阻塞 {percent}% : {blocked_num} 个",float(percent),'#dcbdbd');htmlcontent=self.doc.render();timestamp=time.strftime(_Y,time.localtime(stats.start_time));reportFile=os.path.join(_W,f"log_{timestamp}.html") with open(reportFile,'w',encoding=_Q)as f:f.write(htmlcontent) try:os.startfile(reportFile) except: try:os.system(f"open {reportFile}") except:... def enter_suite(self,name,suitetype):_class='suite_'+suitetype;enterInfo='进入目录'if suitetype=='dir'else'进入文件';self.curEle=self.logDiv.add(div(div(span(enterInfo,_class=_N),span(name)),_class=_class,id=f"{_class} {name}"));self.curSuiteEle=self.curEle;self.curSuiteFilePath=name;self.suitepath2element[name]=self.curEle def enter_case(self,caseId,name,case_className):self.curCaseLableEle=span(_X,_class='label caselabel');self.curCaseBodyEle=div(span(f"{self.curSuiteFilePath}::{case_className}",_class='case_class_path'),_class=_Z);self.curCaseEle=self.curSuiteEle.add(div(div(self.curCaseLableEle,span(name,_class='casename'),span(datetime.now().strftime(_U),_class=_a),_class=_b),self.curCaseBodyEle,_class='case',id=f"case_{caseId:08}"));self.curEle=self.curCaseBodyEle def case_steps(self,name):ele=div(span('测试步骤',_class=_N),_class='test_steps',id='test_steps '+name);self.curEle=self.curCaseBodyEle.add(ele) def case_result(self,case): if case.execRet==_R:self.curCaseEle[_G]+=' pass';self.curCaseLableEle+=' PASS' else: stacktrace=_M+case.stacktrace.split(_F,3)[3] if case.execRet==_S: if', in CHECK_POINT'in stacktrace:stacktrace=stacktrace.rsplit(_F,4)[0] self.curCaseEle[_G]+=_c;self.curCaseLableEle+=' FAIL';self.curEle+=div(f"{case.error} \n{stacktrace}",_class=_V) elif case.execRet==_T:self.curCaseEle[_G]+=' abort';self.curCaseLableEle+=' ABORT';self.curEle+=div(f"{case.error} \n{stacktrace}",_class=_V) def setup(self,name,utype): _class=f"{utype}_setup setup" if utype==_L:stHeaderEle=div(span('套件初始化',_class=_N),span(name),span(datetime.now().strftime(_U),_class=_a),_class=_b);stBodyEle=self.curEle=div(_class=_Z);self.curSetupEle=div(stHeaderEle,stBodyEle,_class=_class,id=f"{_class} {name}");self.curSuiteEle.add(self.curSetupEle) else:self.curSetupEle=self.curEle=div(span('用例初始化',_class=_N),_class=_class,id=f"{_class} {name}");self.curCaseBodyEle.add(self.curSetupEle);self.curEle[_G]+=_f def teardown(self,name,utype): _class=f"{utype}_teardown teardown" if utype==_L:stHeaderEle=div(span('套件清除',_class=_N),span(name),span(datetime.now().strftime(_U),_class=_a),_class=_b);stBodyEle=self.curEle=div(_class=_Z);self.curTeardownEle=div(stHeaderEle,stBodyEle,_class=_class,id=f"{_class} {name}");self.curSuiteEle.add(self.curTeardownEle) else:self.curTeardownEle=self.curEle=div(span('用例清除',_class=_N),_class=_class,id=f"{_class} {name}");self.curCaseBodyEle.add(self.curTeardownEle);self.curEle[_G]+=_f def setup_fail(self,name,utype,e,stacktrace):self.curSetupEle[_G]+=_c;stacktrace=_M+stacktrace.split(_F,3)[3];self.curEle+=div(f"{utype} setup fail | {e} \n{stacktrace}",_class=_V) def teardown_fail(self,name,utype,e,stacktrace):self.curTeardownEle[_G]+=_c;stacktrace=_M+stacktrace.split(_F,3)[3];self.curEle+=div(f"{utype} teardown fail | {e} \n{stacktrace}",_class=_V) def info(self,msg): if self.curEle is _A:return self.curEle+=div(msg,_class='info') def step(self,stepNo,desc): if self.curEle is _A:return self.curEle+=div(span(f"第 {stepNo} 步",_class=_d),span(desc),_class='case_step') def checkpoint_pass(self,desc): if self.curEle is _A:return self.curEle+=div(span(f"检查点 PASS",_class=_d),span(desc),_class='checkpoint_pass') def checkpoint_fail(self,desc): if self.curEle is _A:return self.curEle+=div(span(f"检查点 FAIL",_class=_d),span(desc),_class='checkpoint_fail') def log_img(self,imgPath,width=_A): if self.curEle is _A:return self.curEle+=div(img(src=imgPath,width='aa'if width is _A else width,_class='screenshot')) from .signal import signal signal.register([stats,ConsoleLogger(),TextLogger(),HtmlLogger()])
80.809249
1,374
0.721388
2,324
13,980
4.154905
0.148021
0.007249
0.029619
0.024855
0.43082
0.356877
0.307891
0.268227
0.213857
0.17326
0
0.007336
0.063949
13,980
173
1,375
80.809249
0.730399
0
0
0.098266
0
0.00578
0.221086
0.014305
0
0
0
0
0
1
0.300578
false
0.052023
0.069364
0
0.404624
0.063584
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
3
bfcc3bf3ce4a6a7791d6831071ec72ca44993852
25
py
Python
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/simpleAssignment.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/simpleAssignment.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/simpleAssignment.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
x = 42 # ty<caret>pe: int
25
25
0.6
6
25
2.5
1
0
0
0
0
0
0
0
0
0
0
0.1
0.2
25
1
25
25
0.65
0.64
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
44acf77d849af78689caf76f78bd3a87709f0bd6
1,112
py
Python
problems/dfs/Solution417.py
akalu/cs-problems-python
9b1bd8e3932be62135a38a77f955ded9a766b654
[ "MIT" ]
null
null
null
problems/dfs/Solution417.py
akalu/cs-problems-python
9b1bd8e3932be62135a38a77f955ded9a766b654
[ "MIT" ]
null
null
null
problems/dfs/Solution417.py
akalu/cs-problems-python
9b1bd8e3932be62135a38a77f955ded9a766b654
[ "MIT" ]
null
null
null
""" Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" touches the right and bottom edges. Water can only flow in four directions (up, down, left, or right) from a cell to another one with height equal or lower. Find the list of grid coordinates where water can flow to both the Pacific and Atlantic ocean. Example: Given the following 5x5 matrix: Pacific ~ ~ ~ ~ ~ ~ 1 2 2 3 (5) * ~ 3 2 3 (4)(4) * ~ 2 4 (5) 3 1 * ~ (6)(7) 1 4 5 * ~ (5) 1 1 2 4 * * * * * * Atlantic Return: [[0, 4], [1, 3], [1, 4], [2, 2], [3, 0], [3, 1], [4, 0]] (positions with parentheses in above matrix) IDEA: find the points which are peaks and meeting points in the same time use marker +1 for one area and marker +2 for another one; the meeting point will have 1+2 == 3 """ class Solution417: pass
30.888889
97
0.566547
173
1,112
3.641619
0.485549
0.012698
0.047619
0
0
0
0
0
0
0
0
0.067493
0.347122
1,112
35
98
31.771429
0.800275
0.883094
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
3
44cd2971fc2d0fb346116f5807babe8620e40891
221
py
Python
gdsfactory/gdsdiff/sample.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
null
null
null
gdsfactory/gdsdiff/sample.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
null
null
null
gdsfactory/gdsdiff/sample.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
null
null
null
import gdsfactory as gf from gdsfactory.gdsdiff.gdsdiff import gdsdiff if __name__ == "__main__": c1 = gf.components.straight(length=2) c2 = gf.components.straight(length=3) c = gdsdiff(c1, c2) c.show()
22.1
46
0.696833
31
221
4.709677
0.580645
0.164384
0.273973
0.356164
0
0
0
0
0
0
0
0.033333
0.18552
221
9
47
24.555556
0.777778
0
0
0
0
0
0.036199
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
44d7658584167ad1f72604c07e855eaac8a27727
123
py
Python
CLASESYOBJETOS1.py
Germiprogramer/POO
c84bb9cf7e3bc1a003193375121489aa80daf03c
[ "Apache-2.0" ]
null
null
null
CLASESYOBJETOS1.py
Germiprogramer/POO
c84bb9cf7e3bc1a003193375121489aa80daf03c
[ "Apache-2.0" ]
null
null
null
CLASESYOBJETOS1.py
Germiprogramer/POO
c84bb9cf7e3bc1a003193375121489aa80daf03c
[ "Apache-2.0" ]
null
null
null
class Auto: marca = "" modelo = 0 placa = "" taxi = Auto() print(taxi.modelo) #se imprime el modelo únicamente
15.375
32
0.617886
16
123
4.75
0.75
0
0
0
0
0
0
0
0
0
0
0.010989
0.260163
123
8
32
15.375
0.824176
0.252033
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0.666667
0.166667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
7807f36da3c8917bfeb72b16ca3098a963e923cd
134
py
Python
gateway/api_manager/urls.py
BitingCat/superm
f358d325bc8b087df508592d986a2d1e60d03959
[ "Apache-2.0" ]
null
null
null
gateway/api_manager/urls.py
BitingCat/superm
f358d325bc8b087df508592d986a2d1e60d03959
[ "Apache-2.0" ]
null
null
null
gateway/api_manager/urls.py
BitingCat/superm
f358d325bc8b087df508592d986a2d1e60d03959
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url import os from gateway.api_manager import views urlpatterns = [ url(r'^superm$', views.superm) ]
13.4
37
0.746269
20
134
4.95
0.7
0
0
0
0
0
0
0
0
0
0
0
0.149254
134
9
38
14.888889
0.868421
0
0
0
0
0
0.059701
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
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
782a6e70bb1c62e99b1c75451a5570b2a5aaefd1
1,545
py
Python
tests/regressiontests/admin_util/tests.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
tests/regressiontests/admin_util/tests.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
tests/regressiontests/admin_util/tests.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.contrib.admin.util import NestedObjects from models import Count class NestedObjectsTests(TestCase): """ Tests for ``NestedObject`` utility collection. """ def setUp(self): self.n = NestedObjects() self.objs = [Count.objects.create(num=i) for i in range(5)] def _check(self, target): self.assertEquals(self.n.nested(lambda obj: obj.num), target) def _add(self, obj, parent=None): # don't bother providing the extra args that NestedObjects ignores self.n.add(None, None, obj, None, parent) def test_unrelated_roots(self): self._add(self.objs[0]) self._add(self.objs[1]) self._add(self.objs[2], self.objs[1]) self._check([0, 1, [2]]) def test_siblings(self): self._add(self.objs[0]) self._add(self.objs[1], self.objs[0]) self._add(self.objs[2], self.objs[0]) self._check([0, [1, 2]]) def test_duplicate_instances(self): self._add(self.objs[0]) self._add(self.objs[1]) dupe = Count.objects.get(num=1) self._add(dupe, self.objs[0]) self._check([0, 1]) def test_non_added_parent(self): self._add(self.objs[0], self.objs[1]) self._check([0]) def test_cyclic(self): self._add(self.objs[0], self.objs[2]) self._add(self.objs[1], self.objs[0]) self._add(self.objs[2], self.objs[1]) self._add(self.objs[0], self.objs[2]) self._check([0, [1, [2]]])
26.186441
74
0.603236
227
1,545
3.973568
0.268722
0.203991
0.158537
0.216186
0.421286
0.412417
0.400222
0.339246
0.303769
0.215078
0
0.030612
0.238835
1,545
58
75
26.637931
0.736395
0.072492
0
0.305556
0
0
0
0
0
0
0
0
0.027778
1
0.222222
false
0
0.083333
0
0.333333
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
782d89dac1dfccbb2a0576e3f87a042fe314d75a
167
py
Python
problem0616.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0616.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0616.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
########################### # # #616 Creative numbers - Project Euler # https://projecteuler.net/problem=616 # # Code by Kevin Marciniak # ###########################
18.555556
39
0.479042
14
167
5.714286
0.928571
0
0
0
0
0
0
0
0
0
0
0.040541
0.113772
167
8
40
20.875
0.5
0.580838
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
783f8c5198e30e4f05f207b05946f413e6a68383
5,727
py
Python
Euler 13.py
Babnik21/Euler
e73f27ca477c58940a8212b17cd86fce9684e15b
[ "MIT" ]
null
null
null
Euler 13.py
Babnik21/Euler
e73f27ca477c58940a8212b17cd86fce9684e15b
[ "MIT" ]
null
null
null
Euler 13.py
Babnik21/Euler
e73f27ca477c58940a8212b17cd86fce9684e15b
[ "MIT" ]
null
null
null
#ce stevilko zapisemo kot string je problem super enostaven stevilka = "37107287533902102798797998220837590246510135740250 \n\ 46376937677490009712648124896970078050417018260538 \n\ 74324986199524741059474233309513058123726617309629 \n\ 91942213363574161572522430563301811072406154908250 \n\ 23067588207539346171171980310421047513778063246676 \n\ 89261670696623633820136378418383684178734361726757 \n\ 28112879812849979408065481931592621691275889832738 \n\ 44274228917432520321923589422876796487670272189318 \n\ 47451445736001306439091167216856844588711603153276 \n\ 70386486105843025439939619828917593665686757934951 \n\ 62176457141856560629502157223196586755079324193331 \n\ 64906352462741904929101432445813822663347944758178 \n\ 92575867718337217661963751590579239728245598838407 \n\ 58203565325359399008402633568948830189458628227828 \n\ 80181199384826282014278194139940567587151170094390 \n\ 35398664372827112653829987240784473053190104293586 \n\ 86515506006295864861532075273371959191420517255829 \n\ 71693888707715466499115593487603532921714970056938 \n\ 54370070576826684624621495650076471787294438377604 \n\ 53282654108756828443191190634694037855217779295145 \n\ 36123272525000296071075082563815656710885258350721 \n\ 45876576172410976447339110607218265236877223636045 \n\ 17423706905851860660448207621209813287860733969412 \n\ 81142660418086830619328460811191061556940512689692 \n\ 51934325451728388641918047049293215058642563049483 \n\ 62467221648435076201727918039944693004732956340691 \n\ 15732444386908125794514089057706229429197107928209 \n\ 55037687525678773091862540744969844508330393682126 \n\ 18336384825330154686196124348767681297534375946515 \n\ 80386287592878490201521685554828717201219257766954 \n\ 78182833757993103614740356856449095527097864797581 \n\ 16726320100436897842553539920931837441497806860984 \n\ 48403098129077791799088218795327364475675590848030 \n\ 87086987551392711854517078544161852424320693150332 \n\ 59959406895756536782107074926966537676326235447210 \n\ 69793950679652694742597709739166693763042633987085 \n\ 41052684708299085211399427365734116182760315001271 \n\ 65378607361501080857009149939512557028198746004375 \n\ 35829035317434717326932123578154982629742552737307 \n\ 94953759765105305946966067683156574377167401875275 \n\ 88902802571733229619176668713819931811048770190271 \n\ 25267680276078003013678680992525463401061632866526 \n\ 36270218540497705585629946580636237993140746255962 \n\ 24074486908231174977792365466257246923322810917141 \n\ 91430288197103288597806669760892938638285025333403 \n\ 34413065578016127815921815005561868836468420090470 \n\ 23053081172816430487623791969842487255036638784583 \n\ 11487696932154902810424020138335124462181441773470 \n\ 63783299490636259666498587618221225225512486764533 \n\ 67720186971698544312419572409913959008952310058822 \n\ 95548255300263520781532296796249481641953868218774 \n\ 76085327132285723110424803456124867697064507995236 \n\ 37774242535411291684276865538926205024910326572967 \n\ 23701913275725675285653248258265463092207058596522 \n\ 29798860272258331913126375147341994889534765745501 \n\ 18495701454879288984856827726077713721403798879715 \n\ 38298203783031473527721580348144513491373226651381 \n\ 34829543829199918180278916522431027392251122869539 \n\ 40957953066405232632538044100059654939159879593635 \n\ 29746152185502371307642255121183693803580388584903 \n\ 41698116222072977186158236678424689157993532961922 \n\ 62467957194401269043877107275048102390895523597457 \n\ 23189706772547915061505504953922979530901129967519 \n\ 86188088225875314529584099251203829009407770775672 \n\ 11306739708304724483816533873502340845647058077308 \n\ 82959174767140363198008187129011875491310547126581 \n\ 97623331044818386269515456334926366572897563400500 \n\ 42846280183517070527831839425882145521227251250327 \n\ 55121603546981200581762165212827652751691296897789 \n\ 32238195734329339946437501907836945765883352399886 \n\ 75506164965184775180738168837861091527357929701337 \n\ 62177842752192623401942399639168044983993173312731 \n\ 32924185707147349566916674687634660915035914677504 \n\ 99518671430235219628894890102423325116913619626622 \n\ 73267460800591547471830798392868535206946944540724 \n\ 76841822524674417161514036427982273348055556214818 \n\ 97142617910342598647204516893989422179826088076852 \n\ 87783646182799346313767754307809363333018982642090 \n\ 10848802521674670883215120185883543223812876952786 \n\ 71329612474782464538636993009049310363619763878039 \n\ 62184073572399794223406235393808339651327408011116 \n\ 66627891981488087797941876876144230030984490851411 \n\ 60661826293682836764744779239180335110989069790714 \n\ 85786944089552990653640447425576083659976645795096 \n\ 66024396409905389607120198219976047599490197230297 \n\ 64913982680032973156037120041377903785566085089252 \n\ 16730939319872750275468906903707539413042652315011 \n\ 94809377245048795150954100921645863754710598436791 \n\ 78639167021187492431995700641917969777599028300699 \n\ 15368713711936614952811305876380278410754449733078 \n\ 40789923115535562561142322423255033685442488917353 \n\ 44889911501440648020369068063960672322193204149535 \n\ 41503128880339536053299340368006977710650566631954 \n\ 81234880673210146739058568557934581403627822703280 \n\ 82616570773948327592232845941706525094512325230608 \n\ 22918802058777319719839450180888072429661980811197 \n\ 77158542502016545090413245809786882778948721859617 \n\ 72107838435069186155435662884062257473692284509516 \n\ 20849603980134001723930671666823555245252804609722 \n\ 53503534226472524250874054075591789781264330331690" stevilka = [int(i) for i in stevilka.split(" \n")] vsota = sum(stevilka) while len(str(vsota)) > 10: vsota = (vsota - vsota%10)//10 print(vsota)
49.37069
66
0.91706
233
5,727
22.540773
0.527897
0.002666
0
0
0
0
0
0
0
0
0
0.913004
0.042605
5,727
115
67
49.8
0.044866
0.010127
0
0
0
0
0.000529
0
0
0
0
0
0
1
0
false
0
0
0
0
0.009524
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
784d108b6268f8877b4e86d9af933400fa7c6a6e
341
py
Python
dataent/patches/v4_2/print_with_letterhead.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
dataent/patches/v4_2/print_with_letterhead.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
6
2020-03-24T17:15:56.000Z
2022-02-10T18:41:31.000Z
dataent/patches/v4_2/print_with_letterhead.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Dataent Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import dataent def execute(): dataent.reload_doc("core", "doctype", "print_settings") print_settings = dataent.get_doc("Print Settings") print_settings.with_letterhead = 1 print_settings.save()
28.416667
69
0.782991
45
341
5.666667
0.688889
0.254902
0.141176
0.203922
0
0
0
0
0
0
0
0.016611
0.117302
341
11
70
31
0.830565
0.281525
0
0
0
0
0.161157
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.428571
0.571429
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
78778c152bb481987b9b0fa41ad4c6ca47520ed9
126
py
Python
apps/notifications/forms.py
TransparentHealth/smh-organization
ca32d1cbb7600e8b22e43e06edab83c323a2404d
[ "Apache-2.0" ]
3
2019-03-03T22:41:00.000Z
2020-04-16T04:07:07.000Z
apps/notifications/forms.py
TransparentHealth/smh_app
ca32d1cbb7600e8b22e43e06edab83c323a2404d
[ "Apache-2.0" ]
112
2019-03-04T14:20:50.000Z
2020-04-29T21:32:07.000Z
apps/notifications/forms.py
TransparentHealth/smh-organization
ca32d1cbb7600e8b22e43e06edab83c323a2404d
[ "Apache-2.0" ]
2
2019-08-01T13:08:28.000Z
2019-12-06T15:53:25.000Z
from django import forms class DismissNotificationForm(forms.Form): pk = forms.IntegerField(required=True, min_value=1)
21
55
0.785714
16
126
6.125
0.875
0
0
0
0
0
0
0
0
0
0
0.009091
0.126984
126
5
56
25.2
0.881818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
78859d3a0ec32800a98db67e89c1c45c1d8a70f3
216
py
Python
liaoxuefeng.com/023-PartialFunction.py
snownothing/Python
9b9e909b66db1c1eccfa41225919acdcd59ab4e3
[ "MIT" ]
null
null
null
liaoxuefeng.com/023-PartialFunction.py
snownothing/Python
9b9e909b66db1c1eccfa41225919acdcd59ab4e3
[ "MIT" ]
null
null
null
liaoxuefeng.com/023-PartialFunction.py
snownothing/Python
9b9e909b66db1c1eccfa41225919acdcd59ab4e3
[ "MIT" ]
null
null
null
# !/usr/bin/env python # coding: utf-8 print int('123', base = 8) def int2(x, base = 2): return int(x, base) print int2('10010') import functools int2 = functools.partial(int, base = 2) print int2('10010')
13.5
39
0.643519
35
216
3.971429
0.571429
0.071942
0.201439
0
0
0
0
0
0
0
0
0.12
0.189815
216
15
40
14.4
0.674286
0.157407
0
0.285714
0
0
0.072626
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.428571
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
3
789a940855a4fdec7e550813b2608db3bb1d258c
2,096
py
Python
sphinxcontrib/confluencebuilder/translator/shared.py
richardhofman6/sphinxcontrib-confluencebuilder
617fbb99b13751feafe793773268da87a3448849
[ "BSD-2-Clause" ]
null
null
null
sphinxcontrib/confluencebuilder/translator/shared.py
richardhofman6/sphinxcontrib-confluencebuilder
617fbb99b13751feafe793773268da87a3448849
[ "BSD-2-Clause" ]
null
null
null
sphinxcontrib/confluencebuilder/translator/shared.py
richardhofman6/sphinxcontrib-confluencebuilder
617fbb99b13751feafe793773268da87a3448849
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinxcontrib.confluencebuilder.translator.shared ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2016-2018 by the contributors (see AUTHORS file). :license: BSD, see LICENSE.txt for details. """ from __future__ import (absolute_import, print_function, unicode_literals) from ..std.sphinx import DEFAULT_HIGHLIGHT_STYLE from docutils import nodes from sphinx.writers.text import TextTranslator import sys # supported confluence list types class ConflueceListType(object): BULLET = 1 ENUMERATED = 2 # abstract sphinx translator for sphinxcontrib.confluencebuilder class ConfluenceTranslator(TextTranslator): def __init__(self, document, builder): TextTranslator.__init__(self, document, builder) if self.builder.config.highlight_language: self._highlight = self.builder.config.highlight_language else: self._highlight = DEFAULT_HIGHLIGHT_STYLE self._linenothreshold = sys.maxsize def visit_centered(self, node): # centered is deprecated; ignore # http://www.sphinx-doc.org/en/stable/markup/para.html#directive-centered pass def depart_centered(self, node): pass def visit_highlightlang(self, node): # update the translator's highlight language from the defined directive # http://www.sphinx-doc.org/en/stable/markup/code.html#directive-highlight self._highlight = node.get('lang', DEFAULT_HIGHLIGHT_STYLE) self._linenothreshold = node.get('linenothreshold', sys.maxsize) raise nodes.SkipNode def visit_start_of_file(self, node): # ignore managing state of inlined documents pass def depart_start_of_file(self, node): pass def visit_meta(self, node): # always ignore meta nodes as they are html-specific # http://docutils.sourceforge.net/docs/ref/rst/directives.html#meta raise nodes.SkipNode def unknown_visit(self, node): raise NotImplementedError('unknown node: ' + node.__class__.__name__)
34.360656
82
0.694179
239
2,096
5.891213
0.468619
0.039773
0.044744
0.03267
0.201705
0.046875
0.046875
0.046875
0
0
0
0.006548
0.198473
2,096
60
83
34.933333
0.831548
0.351622
0
0.1875
0
0
0.024943
0
0
0
0
0
0
1
0.25
false
0.125
0.15625
0
0.53125
0.03125
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
78b58b48b827ca39fceb691318d6f8b6d3109a50
1,985
py
Python
RealDataset_SocialChemical/datasets/dataset.py
GKAT-NeurIPS2021/GKAT_Experiments
38eda546bfedfaf5a86999309c30595d9fe83cc7
[ "MIT" ]
3
2021-07-29T05:20:45.000Z
2022-01-07T01:24:44.000Z
RealDataset_SocialChemical/datasets/dataset.py
GKAT-NeurIPS2021/GKAT_Experiments
38eda546bfedfaf5a86999309c30595d9fe83cc7
[ "MIT" ]
null
null
null
RealDataset_SocialChemical/datasets/dataset.py
GKAT-NeurIPS2021/GKAT_Experiments
38eda546bfedfaf5a86999309c30595d9fe83cc7
[ "MIT" ]
null
null
null
import numpy as np class GraphDataset: def __init__(self, data): self.data = data def __getitem__(self, index): return self.data[index] def __len__(self): return len(self.data) def get_targets(self): targets = [d.y.item() for d in self.data] return np.array(targets) def get_data(self): return self.data def augment(self, v_outs=None, e_outs=None, g_outs=None, o_outs=None): """ v_outs must have shape |G|x|V_g| x L x ? x ... e_outs must have shape |G|x|E_g| x L x ? x ... g_outs must have shape |G| x L x ? x ... o_outs has arbitrary shape, it is a handle for saving extra things where L = |prev_outputs_to_consider|. The graph order in which these are saved i.e. first axis, should reflect the ones in which they are saved in the original dataset. :param v_outs: :param e_outs: :param g_outs: :param o_outs: :return: """ for index in range(len(self)): if v_outs is not None: self[index].v_outs = v_outs[index] if e_outs is not None: self[index].e_outs = e_outs[index] if g_outs is not None: self[index].g_outs = g_outs[index] if o_outs is not None: self[index].o_outs = o_outs[index] class GraphDatasetSubset(GraphDataset): """ Subsets the dataset according to a list of indices. """ def __init__(self, data, indices): #print(np.array(indices).max()) #print("597 in indices:", 597 in indices) self.data = data self.indices = indices def __getitem__(self, index): #print(index) return self.data[self.indices[index]] def __len__(self): return len(self.indices) def get_targets(self): targets = [self.data[i].y.item() for i in self.indices] return np.array(targets)
29.191176
98
0.580353
291
1,985
3.766323
0.264605
0.072993
0.032847
0.047445
0.239051
0.183394
0.051095
0
0
0
0
0.004438
0.318892
1,985
67
99
29.626866
0.806213
0.29068
0
0.294118
0
0
0
0
0
0
0
0
0
1
0.294118
false
0
0.029412
0.147059
0.588235
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
0
0
1
1
0
0
3
78bb9f6fead8743af1a26622df014e1a85ee9267
5,002
py
Python
domonic/CDN.py
Jordan-Cottle/domonic
05d70af0d1564d3ba80c860bb5f5bfe089293b18
[ "MIT" ]
1
2022-03-09T03:39:04.000Z
2022-03-09T03:39:04.000Z
domonic/CDN.py
Jordan-Cottle/domonic
05d70af0d1564d3ba80c860bb5f5bfe089293b18
[ "MIT" ]
null
null
null
domonic/CDN.py
Jordan-Cottle/domonic
05d70af0d1564d3ba80c860bb5f5bfe089293b18
[ "MIT" ]
null
null
null
""" domonic.CDN ==================================== Refs to some useful .js and .css libs. use for prototyping. wget anything in later and create your own local references once ur happy TODO - integrity/cross origin/module? WARNING/NOTE - dont use. this isn't released or documented. just ideas atm... """ # class CDN_TEXT(object): # lorem ipusm generator # fake names class CDN_IMG(object): """ CDN images """ # - icons # - UI - emojis ''' # SOME EXAMPLES. NOT ALL ARE HTTPS: http://placehold.it/350x150 http://unsplash.it/200/300 http://lorempixel.com/400/200 http://dummyimage.com/600x300/000/fff # https://dummyimage.com/420x320/ff7f7f/333333.png&text=Sample http://placekitten.com/200/300 https://placeimg.com/640/480/any http://placebear.com/g/200/300 https://ipsumimage.appspot.com/140x100, ff7700 https://www.fillmurray.com/640/360 https://baconmockup.com/640/360 https://placebeard.it/640x360 https://www.placecage.com/640/360 https://www.stevensegallery.com/640/360 https://fakeimg.pl/640x360 # https://fakeimg.pl/420x320/ff0000,128/333333,255/?text=Sample&font=lobster https://picsum.photos/640/360 https://via.placeholder.com/420x320/ff7f7f/333333?text=Sample https://keywordimg.com/420x320/random http://www.dummysrc.com/430x320.png/22c5fc/17202A ''' PLACEHOLDER_SERVICE = "loremflickr.com" @staticmethod def PLACEHOLDER(width=100, height=100, HTTP="", seperator='/'): """ to update do CDN_IMG.PLACEHOLDER_SERVICE = "placebear.com/g" usage : img(_src=CDN_IMG.PLACEHOLDER(300,100)) default HTTP is none, to let the browser decide # use optional seperator if the site uses x instead of slash img(_src=CDN_IMG.PLACEHOLDER(300,100,'x')) """ return f"{HTTP}://{CDN_IMG.PLACEHOLDER_SERVICE}/{width}{seperator}{height}" class CDN_JS(object): """ You will need to append the lib version number if you add any libs here # obvious candidates... https://github.com/sorrycc/awesome-javascript """ JQUERY_3_5_1 = "https://code.jquery.com/jquery-3.5.1.min.js" JQUERY_UI = "https://code.jquery.com/ui/1.12.0/jquery-ui.min.js" UNDERSCORE = "https://cdn.jsdelivr.net/npm/underscore@1.11.0/underscore-min.js" BOOTSTRAP_4 = "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" POPPER_1_16_1 = "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" BOOTSTRAP_5_ALPHA = "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js" D3_6_1_0 = "https://cdnjs.cloudflare.com/ajax/libs/d3/6.1.0/d3.min.js" MODERNIZER_2_8_3 = "https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" MOMENT_2_27_0 = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js" PIXI_5_3_3 = "https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.3.3/pixi.min.js" SOCKET_1_4_5 = "https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js" X3DOM = "https://www.x3dom.org/download/x3dom.js" AFRAME_1_2 = "https://aframe.io/releases/1.2.0/aframe.min.js" BRYTHON_3_9_5 = "https://cdnjs.cloudflare.com/ajax/libs/brython/3.9.5/brython.min.js" MATHML = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=MML_HTMLorMML" # polyfill mathml # def find_on_cdn(): # https://cdn.jsdelivr.net/npm/ # https://cdnjs.cloudflare.com/ajax/libs/ # def dl(self, path=None): # download # if path none domonic.JS_MASTER < strip off name to get default assets folder if non passed class CDN_CSS(object): """ Preferably use version numbers if available. user LATEST if it always gets the latest """ BOOTSTRAP_5_ALPHA = "https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js" BOOTSTRAP_4 = "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" MARX = "https://unpkg.com/marx-css/css/marx.min.css" # version? MVP = "https://unpkg.com/mvp.css" # version? WATER_LATEST = "https://cdn.jsdelivr.net/gh/kognise/water.css@latest/water.min.css" # note 'latest' in cdn url BALLOON = "https://unpkg.com/balloon-css/balloon.min.css" THREE_DOTS_0_2_0 = "https://cdnjs.cloudflare.com/ajax/libs/three-dots/0.2.0/three-dots.min.css" MILLIGRAM_1_3_0 = "https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.css" X3DOM = "https://www.x3dom.org/download/x3dom.css" FONTAWESOME_5_7_1 = "https://use.fontawesome.com/releases/v5.7.1/css/all.css" MDI_5_4_55 = "https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css" # icons # find_on_cdn(): # https://unpkg.com/ # https://cdnjs.cloudflare.com/ajax/libs/ # def dl(self, path=domonic.JS_MASTER): # download class CDN_FONT(object): @staticmethod def google(family): return "http://fonts.googleapis.com/css?family=" + '+'.join(family)
43.877193
118
0.686325
765
5,002
4.398693
0.329412
0.020802
0.065379
0.075186
0.253492
0.227043
0.217831
0.104309
0.104309
0.104309
0
0.071797
0.147941
5,002
113
119
44.265487
0.717738
0.256897
0
0.108108
0
0.513514
0.640301
0.024482
0
0
0
0.00885
0
1
0.054054
false
0
0
0.027027
0.945946
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
78bcb186211d7461ff0a6ae1e7dbc5b9a2291c4d
873
py
Python
ovaas/models.py
OVaaS/ovaas2-backend
db51304161760e2b81b9a497634dded59123bc7d
[ "Apache-2.0" ]
null
null
null
ovaas/models.py
OVaaS/ovaas2-backend
db51304161760e2b81b9a497634dded59123bc7d
[ "Apache-2.0" ]
2
2021-11-02T12:43:18.000Z
2021-11-12T08:31:35.000Z
ovaas/models.py
OVaaS/ovaas2-backend
db51304161760e2b81b9a497634dded59123bc7d
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth import get_user_model # Create your models here. User = get_user_model() class GUIType(models.TextChoices): img = "image_upload", "Image Upload" draw = "draw", "Draw" class Demo(models.Model): name_ja = models.CharField(max_length=128) name_en = models.CharField(max_length=128) description_ja = models.TextField() description_en = models.TextField() endpoint_url = models.CharField(max_length=128) thumbnail_uri = models.CharField(max_length=128) gui_type = models.CharField(max_length=128, choices=GUIType.choices) created_by = models.ForeignKey(User, on_delete=models.CASCADE) class DeployStatus(models.Model): status = models.CharField(max_length=10) message = models.CharField(max_length=50) created_by = models.ForeignKey(User, on_delete=models.CASCADE)
31.178571
72
0.750286
117
873
5.401709
0.410256
0.166139
0.199367
0.265823
0.371835
0.158228
0.158228
0.158228
0.158228
0
0
0.025435
0.14433
873
27
73
32.333333
0.820616
0.027491
0
0.105263
0
0
0.03778
0
0
0
0
0
0
1
0
false
0
0.105263
0
0.947368
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
78c4a426cafffab51634f30f2aa6fb1438ab7cd4
628
py
Python
TopQuarkAnalysis/TopJetCombination/python/TtSemiLepHypHitFit_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
TopQuarkAnalysis/TopJetCombination/python/TtSemiLepHypHitFit_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
TopQuarkAnalysis/TopJetCombination/python/TtSemiLepHypHitFit_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 # # produce hitFit hypothesis with all necessary # ingredients # ## std sequence to perform kinematic fit import TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Muons_cfi hitFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Muons_cfi.hitFitTtSemiLepEvent.clone() ## configure hitFit hypothesis from TopQuarkAnalysis.TopJetCombination.TtSemiLepHypHitFit_cfi import * ## make hypothesis makeHypothesis_hitFitTask = cms.Task( hitFitTtSemiLepEventHypothesis, ttSemiLepHypHitFit ) makeHypothesis_hitFit = cms.Sequence(makeHypothesis_hitFitTask)
29.904762
122
0.851911
56
628
9.410714
0.625
0.060721
0.182163
0.201139
0.212524
0
0
0
0
0
0
0
0.095541
628
20
123
31.4
0.927817
0.221338
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
151ffc58c6a6ef36936b69dd40f5de9b75b14892
1,927
py
Python
idcheckio_python_client/models/__init__.py
alma/python-IDCHECKIO
66c9f086a5f776820b4b2ae14df114f2f1d6e6a2
[ "Apache-2.0" ]
null
null
null
idcheckio_python_client/models/__init__.py
alma/python-IDCHECKIO
66c9f086a5f776820b4b2ae14df114f2f1d6e6a2
[ "Apache-2.0" ]
null
null
null
idcheckio_python_client/models/__init__.py
alma/python-IDCHECKIO
66c9f086a5f776820b4b2ae14df114f2f1d6e6a2
[ "Apache-2.0" ]
1
2022-03-24T07:20:47.000Z
2022-03-24T07:20:47.000Z
# coding: utf-8 """ IdCheck.IO API Check identity documents OpenAPI spec version: 0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ # import models into model package from .check_summary_of_the_submitted_document import CheckSummaryOfTheSubmittedDocument from .classification_of_the_submitted_document import ClassificationOfTheSubmittedDocument from .control import Control from .control_group import ControlGroup from .detailed_information_of_the_holder_of_the_submitted_document import DetailedInformationOfTheHolderOfTheSubmittedDocument from .detailed_information_of_the_submitted_document import DetailedInformationOfTheSubmittedDocument from .error_response import ErrorResponse from .event_date import EventDate from .extracted_image import ExtractedImage from .generic_data import GenericData from .health_response import HealthResponse from .image import Image from .image_indicator import ImageIndicator from .image_list_response import ImageListResponse from .image_request import ImageRequest from .mrz import Mrz from .mrz_list_response import MrzListResponse from .mrz_request import MrzRequest from .mrz_response import MrzResponse from .report_response import ReportResponse from .result_response import ResultResponse from .task_response import TaskResponse from .user_response import UserResponse
37.784314
126
0.827193
247
1,927
6.291498
0.522267
0.081081
0.036036
0.056628
0.104891
0
0
0
0
0
0
0.004207
0.136482
1,927
50
127
38.54
0.929688
0.366373
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
15716dcdfb7770f4233ff53085e3d94e6459e8ac
94
py
Python
simple_orm/table/__init__.py
Dakhnovskiy/simple_orm
c5d89259589b779c905bb2161a59cc7e0888a8cf
[ "Apache-2.0" ]
null
null
null
simple_orm/table/__init__.py
Dakhnovskiy/simple_orm
c5d89259589b779c905bb2161a59cc7e0888a8cf
[ "Apache-2.0" ]
null
null
null
simple_orm/table/__init__.py
Dakhnovskiy/simple_orm
c5d89259589b779c905bb2161a59cc7e0888a8cf
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'Dmitriy.Dakhnovskiy' from .base_table import BaseTable
18.8
34
0.712766
11
94
5.636364
1
0
0
0
0
0
0
0
0
0
0
0.012346
0.138298
94
4
35
23.5
0.753086
0.223404
0
0
0
0
0.267606
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
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
1579cab3ef9ed7a4d7bf29ebae9393c84448a852
105
py
Python
zhangliqiang/20180402/h4.py
python20180319howmework/homework
c826d7aa4c52f8d22f739feb134d20f0b2c217cd
[ "Apache-2.0" ]
null
null
null
zhangliqiang/20180402/h4.py
python20180319howmework/homework
c826d7aa4c52f8d22f739feb134d20f0b2c217cd
[ "Apache-2.0" ]
null
null
null
zhangliqiang/20180402/h4.py
python20180319howmework/homework
c826d7aa4c52f8d22f739feb134d20f0b2c217cd
[ "Apache-2.0" ]
null
null
null
#4. 利用reduce实现列表中元素求积 from functools import reduce r = reduce(lambda x, y : x * y, (1,3,5)) print(r)
11.666667
40
0.657143
18
105
3.833333
0.777778
0.057971
0
0
0
0
0
0
0
0
0
0.047619
0.2
105
8
41
13.125
0.77381
0.190476
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
157dc1ed4781a29f5affc988be663111c64005ab
509
py
Python
exercise25/exercise.py
check69/advent_code_2020
cae1a04babb7d0c7b8de76b2836476b406390047
[ "MIT" ]
null
null
null
exercise25/exercise.py
check69/advent_code_2020
cae1a04babb7d0c7b8de76b2836476b406390047
[ "MIT" ]
null
null
null
exercise25/exercise.py
check69/advent_code_2020
cae1a04babb7d0c7b8de76b2836476b406390047
[ "MIT" ]
null
null
null
from typing import List FileData = List[str] def read_file(filename: str) -> FileData: with open(filename, "r") as file: return file.readlines() def first_exercise(data: FileData) -> int: return 0 def second_exercise(data: FileData) -> int: return 0 def main(): data = read_file("data") print("The result of the first exercise is: ", first_exercise(data)) print("The result of the second exercise is: ", second_exercise(data)) if __name__ == "__main__": main()
18.178571
74
0.666012
70
509
4.642857
0.428571
0.147692
0.104615
0.141538
0.344615
0.344615
0.203077
0
0
0
0
0.005
0.214145
509
27
75
18.851852
0.8075
0
0
0.133333
0
0
0.172888
0
0
0
0
0
0
1
0.266667
false
0
0.066667
0.133333
0.533333
0.133333
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
0
0
1
1
0
0
3
158cb011887f3c76cab1428a5f9f814fdc90be6c
11,800
py
Python
google/ads/google_ads/v6/proto/resources/campaign_draft_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/resources/campaign_draft_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/resources/campaign_draft_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v6/resources/campaign_draft.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.ads.google_ads.v6.proto.enums import campaign_draft_status_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_campaign__draft__status__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='google/ads/googleads/v6/resources/campaign_draft.proto', package='google.ads.googleads.v6.resources', syntax='proto3', serialized_options=b'\n%com.google.ads.googleads.v6.resourcesB\022CampaignDraftProtoP\001ZJgoogle.golang.org/genproto/googleapis/ads/googleads/v6/resources;resources\242\002\003GAA\252\002!Google.Ads.GoogleAds.V6.Resources\312\002!Google\\Ads\\GoogleAds\\V6\\Resources\352\002%Google::Ads::GoogleAds::V6::Resources', create_key=_descriptor._internal_create_key, serialized_pb=b'\n6google/ads/googleads/v6/resources/campaign_draft.proto\x12!google.ads.googleads.v6.resources\x1a\x39google/ads/googleads/v6/enums/campaign_draft_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/api/annotations.proto\"\xad\x05\n\rCampaignDraft\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x05\xfa\x41(\n&googleads.googleapis.com/CampaignDraft\x12\x1a\n\x08\x64raft_id\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x45\n\rbase_campaign\x18\n \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CampaignH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x0b \x01(\tH\x02\x88\x01\x01\x12\x46\n\x0e\x64raft_campaign\x18\x0c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x03\x88\x01\x01\x12_\n\x06status\x18\x06 \x01(\x0e\x32J.google.ads.googleads.v6.enums.CampaignDraftStatusEnum.CampaignDraftStatusB\x03\xe0\x41\x03\x12(\n\x16has_experiment_running\x18\r \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12(\n\x16long_running_operation\x18\x0e \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01:q\xea\x41n\n&googleads.googleapis.com/CampaignDraft\x12\x44\x63ustomers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}B\x0b\n\t_draft_idB\x10\n\x0e_base_campaignB\x07\n\x05_nameB\x11\n\x0f_draft_campaignB\x19\n\x17_has_experiment_runningB\x19\n\x17_long_running_operationB\xff\x01\n%com.google.ads.googleads.v6.resourcesB\x12\x43\x61mpaignDraftProtoP\x01ZJgoogle.golang.org/genproto/googleapis/ads/googleads/v6/resources;resources\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V6.Resources\xca\x02!Google\\Ads\\GoogleAds\\V6\\Resources\xea\x02%Google::Ads::GoogleAds::V6::Resourcesb\x06proto3' , dependencies=[google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_campaign__draft__status__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) _CAMPAIGNDRAFT = _descriptor.Descriptor( name='CampaignDraft', full_name='google.ads.googleads.v6.resources.CampaignDraft', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='resource_name', full_name='google.ads.googleads.v6.resources.CampaignDraft.resource_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005\372A(\n&googleads.googleapis.com/CampaignDraft', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='draft_id', full_name='google.ads.googleads.v6.resources.CampaignDraft.draft_id', index=1, number=9, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='base_campaign', full_name='google.ads.googleads.v6.resources.CampaignDraft.base_campaign', index=2, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005\372A#\n!googleads.googleapis.com/Campaign', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='name', full_name='google.ads.googleads.v6.resources.CampaignDraft.name', index=3, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='draft_campaign', full_name='google.ads.googleads.v6.resources.CampaignDraft.draft_campaign', index=4, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003\372A#\n!googleads.googleapis.com/Campaign', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='status', full_name='google.ads.googleads.v6.resources.CampaignDraft.status', index=5, number=6, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='has_experiment_running', full_name='google.ads.googleads.v6.resources.CampaignDraft.has_experiment_running', index=6, number=13, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='long_running_operation', full_name='google.ads.googleads.v6.resources.CampaignDraft.long_running_operation', index=7, number=14, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'\352An\n&googleads.googleapis.com/CampaignDraft\022Dcustomers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_draft_id', full_name='google.ads.googleads.v6.resources.CampaignDraft._draft_id', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_base_campaign', full_name='google.ads.googleads.v6.resources.CampaignDraft._base_campaign', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_name', full_name='google.ads.googleads.v6.resources.CampaignDraft._name', index=2, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_draft_campaign', full_name='google.ads.googleads.v6.resources.CampaignDraft._draft_campaign', index=3, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_has_experiment_running', full_name='google.ads.googleads.v6.resources.CampaignDraft._has_experiment_running', index=4, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_long_running_operation', full_name='google.ads.googleads.v6.resources.CampaignDraft._long_running_operation', index=5, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=243, serialized_end=928, ) _CAMPAIGNDRAFT.fields_by_name['status'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_campaign__draft__status__pb2._CAMPAIGNDRAFTSTATUSENUM_CAMPAIGNDRAFTSTATUS _CAMPAIGNDRAFT.oneofs_by_name['_draft_id'].fields.append( _CAMPAIGNDRAFT.fields_by_name['draft_id']) _CAMPAIGNDRAFT.fields_by_name['draft_id'].containing_oneof = _CAMPAIGNDRAFT.oneofs_by_name['_draft_id'] _CAMPAIGNDRAFT.oneofs_by_name['_base_campaign'].fields.append( _CAMPAIGNDRAFT.fields_by_name['base_campaign']) _CAMPAIGNDRAFT.fields_by_name['base_campaign'].containing_oneof = _CAMPAIGNDRAFT.oneofs_by_name['_base_campaign'] _CAMPAIGNDRAFT.oneofs_by_name['_name'].fields.append( _CAMPAIGNDRAFT.fields_by_name['name']) _CAMPAIGNDRAFT.fields_by_name['name'].containing_oneof = _CAMPAIGNDRAFT.oneofs_by_name['_name'] _CAMPAIGNDRAFT.oneofs_by_name['_draft_campaign'].fields.append( _CAMPAIGNDRAFT.fields_by_name['draft_campaign']) _CAMPAIGNDRAFT.fields_by_name['draft_campaign'].containing_oneof = _CAMPAIGNDRAFT.oneofs_by_name['_draft_campaign'] _CAMPAIGNDRAFT.oneofs_by_name['_has_experiment_running'].fields.append( _CAMPAIGNDRAFT.fields_by_name['has_experiment_running']) _CAMPAIGNDRAFT.fields_by_name['has_experiment_running'].containing_oneof = _CAMPAIGNDRAFT.oneofs_by_name['_has_experiment_running'] _CAMPAIGNDRAFT.oneofs_by_name['_long_running_operation'].fields.append( _CAMPAIGNDRAFT.fields_by_name['long_running_operation']) _CAMPAIGNDRAFT.fields_by_name['long_running_operation'].containing_oneof = _CAMPAIGNDRAFT.oneofs_by_name['_long_running_operation'] DESCRIPTOR.message_types_by_name['CampaignDraft'] = _CAMPAIGNDRAFT _sym_db.RegisterFileDescriptor(DESCRIPTOR) CampaignDraft = _reflection.GeneratedProtocolMessageType('CampaignDraft', (_message.Message,), { 'DESCRIPTOR' : _CAMPAIGNDRAFT, '__module__' : 'google.ads.googleads.v6.resources.campaign_draft_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.resources.CampaignDraft) }) _sym_db.RegisterMessage(CampaignDraft) DESCRIPTOR._options = None _CAMPAIGNDRAFT.fields_by_name['resource_name']._options = None _CAMPAIGNDRAFT.fields_by_name['draft_id']._options = None _CAMPAIGNDRAFT.fields_by_name['base_campaign']._options = None _CAMPAIGNDRAFT.fields_by_name['draft_campaign']._options = None _CAMPAIGNDRAFT.fields_by_name['status']._options = None _CAMPAIGNDRAFT.fields_by_name['has_experiment_running']._options = None _CAMPAIGNDRAFT.fields_by_name['long_running_operation']._options = None _CAMPAIGNDRAFT._options = None # @@protoc_insertion_point(module_scope)
64.480874
1,689
0.79678
1,591
11,800
5.54494
0.13325
0.046248
0.053956
0.068012
0.752097
0.711517
0.615053
0.478463
0.441963
0.422467
0
0.04272
0.081525
11,800
182
1,690
64.835165
0.771268
0.02822
0
0.376543
1
0.018519
0.354487
0.313897
0
0
0
0
0
1
0
false
0
0.049383
0
0.049383
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
15b3103b6182bc5b254439b61e878924238c7af3
212
py
Python
contrib/examples/actions/print_config.py
padamel/files4coding
3a0479cc9244efd632d14a48c8dc6fd1367edf3e
[ "Apache-2.0" ]
null
null
null
contrib/examples/actions/print_config.py
padamel/files4coding
3a0479cc9244efd632d14a48c8dc6fd1367edf3e
[ "Apache-2.0" ]
2
2021-09-19T19:48:15.000Z
2021-09-19T19:48:16.000Z
contrib/examples/actions/print_config.py
padamel/files4coding
3a0479cc9244efd632d14a48c8dc6fd1367edf3e
[ "Apache-2.0" ]
null
null
null
from pprint import pprint from st2common.runners.base_action import Action class PrintConfigAction(Action): def run(self): print("=========") pprint(self.config) print("=========")
19.272727
48
0.608491
22
212
5.818182
0.636364
0
0
0
0
0
0
0
0
0
0
0.006024
0.216981
212
10
49
21.2
0.76506
0
0
0.285714
0
0
0.084906
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.571429
0.571429
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
1
0
3
ec59e713b0d0d17ceb783b3e53bc5213783303f5
208
py
Python
homeassistant/components/wemo/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/wemo/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/wemo/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Constants for the Belkin Wemo component.""" DOMAIN = "wemo" SERVICE_SET_HUMIDITY = "set_humidity" SERVICE_RESET_FILTER_LIFE = "reset_filter_life" WEMO_SUBSCRIPTION_EVENT = f"{DOMAIN}_subscription_event"
26
56
0.802885
27
208
5.740741
0.592593
0.141935
0.193548
0
0
0
0
0
0
0
0
0
0.096154
208
7
57
29.714286
0.824468
0.192308
0
0
0
0
0.37037
0.166667
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
ec60e845881e6051f208432552c3af2afd7ffeee
679
py
Python
lib/models/sii_token.py
Daia-Systems-SPA/sii-dte-py
a1030f4abf3d4004fdede88072cc8621214158bf
[ "MIT" ]
null
null
null
lib/models/sii_token.py
Daia-Systems-SPA/sii-dte-py
a1030f4abf3d4004fdede88072cc8621214158bf
[ "MIT" ]
null
null
null
lib/models/sii_token.py
Daia-Systems-SPA/sii-dte-py
a1030f4abf3d4004fdede88072cc8621214158bf
[ "MIT" ]
1
2020-10-04T00:37:48.000Z
2020-10-04T00:37:48.000Z
import datetime class Token(): _token_string = '' _expiry_date = None def __init__(self, token_string): self._token_string = token_string """ Expire after 10 min """ self._expiry_date = datetime.datetime.now() + datetime.timedelta(0,60*10) def __str__(self): return _token_string def get_token(self): if not self._is_expired(): return self._token_string else: raise TokenExpiredError() def _is_expired(self): return datetime.datetime.now() >= self._expiry_date def to_json(self): return '{"token":"' + self._token_string + '", "expiry":"' + str(self._expiry_date) + '"}' class TokenExpiredError(Exception): """ Raised on token expiration """
23.413793
92
0.706922
88
679
5.068182
0.397727
0.172646
0.134529
0
0
0
0
0
0
0
0
0.012195
0.154639
679
28
93
24.25
0.764808
0.038292
0
0
0
0
0.040453
0
0
0
0
0
0
1
0.263158
false
0
0.052632
0.157895
0.736842
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
0
0
1
1
0
0
3
ec63fe14fa9e569e0e9db8ad89909f7212dee7c0
193
py
Python
backend/app/api/api_v1/endpoints/job_classes.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
backend/app/api/api_v1/endpoints/job_classes.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
backend/app/api/api_v1/endpoints/job_classes.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
from fastapi import APIRouter from ....core.jobs import JobBase router = APIRouter() @router.get("") async def get_job_classes(): return [j.meta_info() for j in JobBase.__subclasses__()]
21.444444
60
0.73057
27
193
4.962963
0.740741
0
0
0
0
0
0
0
0
0
0
0
0.139896
193
8
61
24.125
0.807229
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
ec651b25d70a03441a32b1472067abddb009977d
2,709
py
Python
GearBot/Util/Permissioncheckers.py
TheMelvin/Gearbot
2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a
[ "MIT" ]
null
null
null
GearBot/Util/Permissioncheckers.py
TheMelvin/Gearbot
2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a
[ "MIT" ]
null
null
null
GearBot/Util/Permissioncheckers.py
TheMelvin/Gearbot
2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a
[ "MIT" ]
null
null
null
from discord.ext import commands from Util import Configuration def is_owner(): async def predicate(ctx): return ctx.bot.is_owner(ctx.author) return commands.check(predicate) def is_trusted(ctx): return is_user("TRUSTED", ctx) or is_mod(ctx) def is_mod(ctx:commands.Context): return is_user("MOD", ctx) or (hasattr(ctx.author, "roles") and ctx.channel.permissions_for(ctx.author).ban_members) or is_admin(ctx) def is_admin(ctx:commands.Context): return is_user("ADMIN", ctx) or (hasattr(ctx.author, "roles") and ctx.channel.permissions_for(ctx.author).administrator) def is_server_owner(ctx): return ctx.guild is not None and ctx.author == ctx.guild.owner def is_user(perm_type, ctx): if ctx.guild is None: return False if not hasattr(ctx.author, "roles"): return False roles = Configuration.getConfigVar(ctx.guild.id, f"{perm_type}_ROLES") for role in ctx.author.roles: if role.id in roles: return True return False def mod_only(): async def predicate(ctx): return is_mod(ctx) return commands.check(predicate) def is_dev(ctx:commands.Context): if ctx.guild is None: return False devrole = Configuration.getConfigVar(ctx.guild.id, "DEV_ROLE") if devrole != 0: for role in ctx.author.roles: if role.id == devrole: return True return is_admin(ctx) def devOnly(): async def predicate(ctx): return is_dev(ctx) return commands.check(predicate) def is_server(ctx, id): return ctx.guild is not None and ctx.guild.id == id def bc_only(): async def predicate(ctx): return is_server(ctx, 309218657798455298) return commands.check(predicate) def no_testers(): async def predicate(ctx): return not is_server(ctx, 197038439483310086) return commands.check(predicate) def check_permission(ctx:commands.Context, default): name = ctx.command.qualified_name.split(" ")[0] if ctx.guild is None: return default command_overrides = Configuration.getConfigVar(ctx.guild.id, "COMMAND_OVERRIDES") cog_overrides = Configuration.getConfigVar(ctx.guild.id, "COG_OVERRIDES") cog_name = type(ctx.cog).__name__ if name in command_overrides: return check_perm_lvl(ctx, command_overrides[name]) elif cog_name in cog_overrides: return check_perm_lvl(ctx, cog_overrides[cog_name]) else: return default def public(ctx): return True def disabled(ctx): return False perm_checks = [ public, is_trusted, is_mod, is_admin, is_server_owner, disabled ] def check_perm_lvl(ctx, lvl): return perm_checks[lvl](ctx)
26.821782
137
0.689553
384
2,709
4.708333
0.182292
0.054757
0.047013
0.05531
0.502765
0.400996
0.240044
0.134956
0.102876
0.068584
0
0.017757
0.210041
2,709
100
138
27.09
0.827103
0
0
0.320513
0
0
0.031746
0
0
0
0
0
0
1
0.205128
false
0
0.025641
0.102564
0.602564
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
0
0
1
1
0
0
3
eca33565545aa314f2500c1fc721dccae39cc8d7
494
py
Python
Speech/loss/SoftmaxLoss.py
sxontheway/BalanceFL
43bb7539c932b7b6f7ad03f94a724452ae3855a3
[ "MIT" ]
null
null
null
Speech/loss/SoftmaxLoss.py
sxontheway/BalanceFL
43bb7539c932b7b6f7ad03f94a724452ae3855a3
[ "MIT" ]
null
null
null
Speech/loss/SoftmaxLoss.py
sxontheway/BalanceFL
43bb7539c932b7b6f7ad03f94a724452ae3855a3
[ "MIT" ]
null
null
null
"""Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. This source code is licensed under the license found in the LICENSE file in the root directory of this source tree. Portions of the source code are from the OLTR project which notice below and in LICENSE in the root directory of this source tree. Copyright (c) 2019, Zhongqi Miao All rights reserved. """ import torch.nn as nn def create_loss(): print('Loading Softmax Loss.') return nn.CrossEntropyLoss()
22.454545
59
0.757085
78
494
4.782051
0.615385
0.080429
0.091153
0.096515
0.182306
0.182306
0.182306
0.182306
0
0
0
0.009901
0.182186
494
21
60
23.52381
0.913366
0.755061
0
0
0
0
0.185841
0
0
0
0
0
0
1
0.25
true
0
0.25
0
0.75
0.25
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
1
0
0
0
1
0
0
3
ecce92ef0c81b0fe0ec5c41632dcfd5e4b125ddc
436
py
Python
SN/socialcircle/forms.py
samzek/social_circle
071190bfb2b5b465fb669d8713698da9030be50f
[ "Apache-2.0" ]
3
2015-06-03T09:48:28.000Z
2015-06-25T16:54:32.000Z
SN/socialcircle/forms.py
samzek/social_circle
071190bfb2b5b465fb669d8713698da9030be50f
[ "Apache-2.0" ]
null
null
null
SN/socialcircle/forms.py
samzek/social_circle
071190bfb2b5b465fb669d8713698da9030be50f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.forms import ModelForm from models import SCUser,Post from django import forms class modifyUser(ModelForm): class Meta: model = SCUser fields = ['first_name','last_name','username','email','birth_date','password','address','user_bio','profile_image'] class insertFile(ModelForm): class Meta: model = Post fields = ['file','content']
22.947368
123
0.662844
53
436
5.358491
0.679245
0.070423
0.126761
0.161972
0
0
0
0
0
0
0
0.002841
0.192661
436
18
124
24.222222
0.803977
0.09633
0
0.181818
0
0
0.227621
0
0
0
0
0
0
1
0
false
0.090909
0.272727
0
0.636364
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
ecea0e953b8a3b5674749c92e29add6bece88812
1,833
py
Python
resolwe/flow/finders.py
jkokosar/resolwe
c23db01494ef863fb2f8e130a59198cfd10bc7aa
[ "Apache-2.0" ]
null
null
null
resolwe/flow/finders.py
jkokosar/resolwe
c23db01494ef863fb2f8e130a59198cfd10bc7aa
[ "Apache-2.0" ]
null
null
null
resolwe/flow/finders.py
jkokosar/resolwe
c23db01494ef863fb2f8e130a59198cfd10bc7aa
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import os from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import import_string class BaseProcessesFinder(object): """ A base processes loader to be used for custom staticfiles finder classes. """ def find_processes(self): raise NotImplementedError('subclasses of BaseProcessesLoader must provide a find_processes() method') def find_descriptors(self): raise NotImplementedError('subclasses of BaseProcessesLoader must provide a find_descriptors() method') class FileSystemProcessesFinder(BaseProcessesFinder): def find_processes(self): return getattr(settings, 'FLOW_PROCESSES_DIRS', ()) def find_descriptors(self): return getattr(settings, 'FLOW_DESCRIPTORS_DIRS', ()) class AppDirectoriesFinder(BaseProcessesFinder): def _find_folders(self, folder_name): found_folders = [] for app_config in apps.get_app_configs(): folder_path = os.path.join(app_config.path, folder_name) if os.path.isdir(folder_path): found_folders.append(folder_path) return found_folders def find_processes(self): return self._find_folders('processes') def find_descriptors(self): return self._find_folders('descriptors') def get_finders(): for finder_path in settings.FLOW_PROCESSES_FINDERS: yield get_finder(finder_path) def get_finder(import_path): Finder = import_string(import_path) if not issubclass(Finder, BaseProcessesFinder): raise ImproperlyConfigured( 'Finder "{}" is not a subclass of "{}"'.format(Finder, BaseProcessesFinder)) return Finder()
31.067797
111
0.729951
209
1,833
6.167464
0.358852
0.038014
0.037238
0.046548
0.252909
0.116369
0.116369
0.116369
0.116369
0.116369
0
0
0.19258
1,833
58
112
31.603448
0.870946
0.039825
0
0.162162
0
0
0.139655
0.012069
0
0
0
0
0
1
0.243243
false
0
0.216216
0.108108
0.702703
0.027027
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
0
0
1
1
0
0
3
01cdb444753f4488357a72f809510aad06386257
1,898
py
Python
pyIPCMI/Base/__init__.py
mithro/pyIPCMI
dd3bb6ddbf150fffb7b104d96e0ab786e0558fd2
[ "Apache-2.0" ]
5
2018-05-12T22:38:28.000Z
2020-10-10T17:22:37.000Z
pyIPCMI/Base/__init__.py
mithro/pyIPCMI
dd3bb6ddbf150fffb7b104d96e0ab786e0558fd2
[ "Apache-2.0" ]
5
2019-10-13T01:39:38.000Z
2020-09-28T04:36:38.000Z
pyIPCMI/Base/__init__.py
mithro/pyIPCMI
dd3bb6ddbf150fffb7b104d96e0ab786e0558fd2
[ "Apache-2.0" ]
4
2018-05-12T22:38:32.000Z
2019-05-19T21:27:37.000Z
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t; python-indent-offset: 2 -*- # vim: tabstop=2:shiftwidth=2:noexpandtab # kate: tab-width 2; replace-tabs off; indent-width 2; # # ============================================================================== # Authors: Patrick Lehmann # # Python Package: Saves the pyIPCMI configuration as python source code. # # License: # ============================================================================== # Copyright 2017-2018 Patrick Lehmann - Bötzingen, Germany # Copyright 2007-2016 Technische Universität Dresden - Germany # Chair of VLSI-Design, Diagnostics and Architecture # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # load dependencies from lib.ExtendedConfigParser import ExtendedConfigParser from pyIPCMI.Base.Logging import ILogable __api__ = [ 'IHost' ] __all__ = __api__ class IHost(ILogable): """This is a type hint class (interface description) for a host instance. It's needed until pyIPCMI requires Python 3.6. """ # instance fields Platform = "string" Config = ExtendedConfigParser() # methods def SaveAndReloadConfiguration(self): pass # Syntax not supported by Python 3.5 -> requires 3.6 # Platform : str = None # Config : ExtendedConfigParser = None
33.892857
85
0.630137
218
1,898
5.431193
0.642202
0.050676
0.015203
0.027027
0
0
0
0
0
0
0
0.020395
0.17334
1,898
55
86
34.509091
0.734226
0.805585
0
0
0
0
0.033639
0
0
0
0
0
0
1
0.1
false
0.1
0.2
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
01d20ae8c1699ccf74ba7109b2ee121b6533f768
147
py
Python
mock_study/project/constants.py
lockeCucumber/Study
f2e64d51c32e8d8bff5d18427e1697149298327c
[ "MIT" ]
null
null
null
mock_study/project/constants.py
lockeCucumber/Study
f2e64d51c32e8d8bff5d18427e1697149298327c
[ "MIT" ]
null
null
null
mock_study/project/constants.py
lockeCucumber/Study
f2e64d51c32e8d8bff5d18427e1697149298327c
[ "MIT" ]
null
null
null
# coding: utf8 import os BASE_URL = 'http://jsonplaceholder.typicode.com' SKIP_REAL = os.getenv('SKIP_REAL', False) # 一般会考虑本地开发环境一些测试跳过,所以设置一个全局变量
29.4
72
0.77551
19
147
5.842105
0.842105
0.144144
0
0
0
0
0
0
0
0
0
0.007519
0.095238
147
5
72
29.4
0.827068
0.278912
0
0
0
0
0.423077
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
01daf9291c59f9ecfac44642085f4a9a36facf4d
2,450
py
Python
rewriting/terms.py
ethframe/scratchpad
29287f24f805e32b302984447c914b55eae82f08
[ "MIT" ]
1
2021-07-29T08:59:06.000Z
2021-07-29T08:59:06.000Z
rewriting/terms.py
ethframe/scratchpad
29287f24f805e32b302984447c914b55eae82f08
[ "MIT" ]
null
null
null
rewriting/terms.py
ethframe/scratchpad
29287f24f805e32b302984447c914b55eae82f08
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import List from .matching import ( ConstantOpBuilder, Context, Matchable, PatternBuilder, VarOpBuilder ) class Term(Matchable['TermOp']): pass @dataclass class Val(Term): value: str def handle_match_op(self, op: 'TermOp', ctx: Context['TermOp']) -> bool: return op.handle_val(self, ctx) @dataclass class Func(Term): name: str args: List[Term] def handle_match_op(self, op: 'TermOp', ctx: Context['TermOp']) -> bool: return op.handle_func(self, ctx) class TermOp: def handle_term(self, term: Term, ctx: Context['TermOp']) -> bool: return False def handle_func(self, term: Func, ctx: Context['TermOp']) -> bool: return self.handle_term(term, ctx) def handle_val(self, term: Val, ctx: Context['TermOp']) -> bool: return self.handle_term(term, ctx) class MatchFunc(TermOp): def __init__(self, name: str, arity: int): self.name = name self.arity = arity def handle_func(self, term: Func, ctx: Context[TermOp]) -> bool: if self.name != term.name or self.arity != len(term.args): return False ctx.push_terms(reversed(term.args)) return True class MatchVal(TermOp): def __init__(self, value: str): self.value = value def handle_val(self, term: Val, ctx: Context[TermOp]) -> bool: return self.value == term.value class BindVar(TermOp): def handle_term(self, term: Term, ctx: Context[TermOp]) -> bool: ctx.push_var(term) return True class MatchVar(TermOp): def __init__(self, idx: int): self.idx = idx def handle_term(self, term: Term, ctx: Context[TermOp]) -> bool: return ctx.get_var(self.idx) == term class MatchAny(TermOp): def handle_term(self, term: Term, ctx: Context[TermOp]) -> bool: return True def func(name: str, *args: PatternBuilder[TermOp]) -> PatternBuilder[TermOp]: builder = PatternBuilder[TermOp].from_op( ConstantOpBuilder(MatchFunc(name, len(args))) ) for arg in args: builder = builder.concat(arg) return builder def val(value: str) -> PatternBuilder[TermOp]: return PatternBuilder.from_op(ConstantOpBuilder(MatchVal(value))) def v(name: str) -> PatternBuilder[TermOp]: return PatternBuilder.from_op(VarOpBuilder(name, BindVar, MatchVar)) _ = PatternBuilder.from_op(ConstantOpBuilder(MatchAny()))
25
77
0.66
312
2,450
5.067308
0.176282
0.056926
0.101202
0.126502
0.428843
0.428843
0.428843
0.366856
0.366856
0.366856
0
0
0.214694
2,450
97
78
25.257732
0.821726
0
0
0.222222
0
0
0.019592
0
0
0
0
0
0
1
0.253968
false
0.015873
0.047619
0.15873
0.714286
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
0
0
1
1
0
0
3
01ec2eb83db8877fbe9b047aa6571bb80b06575c
213
py
Python
nnga/utils/helper.py
rafaelsdellama/nnga
9c04fd0c5f68644345d197db44b1bc6f6c780a30
[ "MIT" ]
1
2021-12-28T23:40:41.000Z
2021-12-28T23:40:41.000Z
nnga/utils/helper.py
rafaelsdellama/nnga
9c04fd0c5f68644345d197db44b1bc6f6c780a30
[ "MIT" ]
null
null
null
nnga/utils/helper.py
rafaelsdellama/nnga
9c04fd0c5f68644345d197db44b1bc6f6c780a30
[ "MIT" ]
null
null
null
import tensorflow as tf import gc def dump_tensors(): """ https://forums.fast.ai/t/gpu-memory-not-being-freed-after-training-is-over/10265/6 """ tf.keras.backend.clear_session() gc.collect()
19.363636
86
0.676056
32
213
4.4375
0.90625
0
0
0
0
0
0
0
0
0
0
0.033708
0.164319
213
10
87
21.3
0.764045
0.384977
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
bf0fd2afe78b1e2ad990c12cd0e56c85a69e381d
83
py
Python
python.py
MjKay1/Pandas-and-Bokeh
23e3a6fcd0301f7701c1c5720b86b81926f9fcbc
[ "Unlicense" ]
null
null
null
python.py
MjKay1/Pandas-and-Bokeh
23e3a6fcd0301f7701c1c5720b86b81926f9fcbc
[ "Unlicense" ]
null
null
null
python.py
MjKay1/Pandas-and-Bokeh
23e3a6fcd0301f7701c1c5720b86b81926f9fcbc
[ "Unlicense" ]
null
null
null
import pandas data = pandas.read_csv('data/gapminder_gdp_oceania.csv') print(data)
20.75
56
0.807229
13
83
4.923077
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.072289
83
3
57
27.666667
0.831169
0
0
0
0
0
0.361446
0.361446
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
bf155524d39c386738d32b78d8657cf2e8ac4e0f
293
py
Python
clinicadl/utils/network/__init__.py
sophieloiz/clinicadl
d26a1c6ce4f6da9de59e3d15c27ae3be2d33bc9d
[ "MIT" ]
null
null
null
clinicadl/utils/network/__init__.py
sophieloiz/clinicadl
d26a1c6ce4f6da9de59e3d15c27ae3be2d33bc9d
[ "MIT" ]
null
null
null
clinicadl/utils/network/__init__.py
sophieloiz/clinicadl
d26a1c6ce4f6da9de59e3d15c27ae3be2d33bc9d
[ "MIT" ]
null
null
null
from .autoencoder.models import AE_Conv4_FC3, AE_Conv5_FC3 from .cnn.models import Conv4_FC3, Conv5_FC3, Stride_Conv5_FC3, resnet18 from .cnn.random import RandomArchitecture from .vae.vanilla_vae import ( Vanilla3DdenseVAE, Vanilla3DVAE, VanillaDenseVAE, VanillaSpatialVAE, )
29.3
72
0.798635
36
293
6.25
0.527778
0.106667
0
0
0
0
0
0
0
0
0
0.055556
0.139932
293
9
73
32.555556
0.837302
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.444444
0
0.444444
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
bf1aae88684e54295fc7d7c2d5ed877f7a14c648
157
py
Python
admin/apps.py
rodlukas/UP-admin
08f36de0773f39c6222da82016bf1384af2cce18
[ "MIT" ]
4
2019-07-19T17:39:04.000Z
2022-03-22T21:02:15.000Z
admin/apps.py
rodlukas/UP-admin
08f36de0773f39c6222da82016bf1384af2cce18
[ "MIT" ]
53
2019-08-04T14:25:40.000Z
2022-03-26T20:30:55.000Z
admin/apps.py
rodlukas/UP-admin
08f36de0773f39c6222da82016bf1384af2cce18
[ "MIT" ]
3
2020-03-09T07:11:03.000Z
2020-09-11T01:22:50.000Z
""" Konfigurace Django aplikace admin. """ from django.apps import AppConfig class AdminConfig(AppConfig): name = "admin" verbose_name = "ÚPadmin"
15.7
34
0.713376
17
157
6.529412
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.178344
157
9
35
17.444444
0.860465
0.216561
0
0
0
0
0.104348
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
bf1c5d7af21265d26444113979db55007a7cfb64
29
py
Python
examples/__init__.py
DannyGoodall/codefurther
b6b1dc21e39f2ede9b9ac2a6c06d5816c87a610a
[ "Apache-2.0" ]
1
2015-07-01T16:21:59.000Z
2015-07-01T16:21:59.000Z
examples/__init__.py
DannyGoodall/codefurther
b6b1dc21e39f2ede9b9ac2a6c06d5816c87a610a
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
DannyGoodall/codefurther
b6b1dc21e39f2ede9b9ac2a6c06d5816c87a610a
[ "Apache-2.0" ]
null
null
null
__author__ = 'Danny Goodall'
14.5
28
0.758621
3
29
6
1
0
0
0
0
0
0
0
0
0
0
0
0.137931
29
1
29
29
0.72
0
0
0
0
0
0.448276
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bf1f8eb5906edde2845a41d14ef448bd75014ce7
1,040
py
Python
tests/extensions/pdf/test_renderer.py
alexschiller/modular-file-renderer
43d59f2a8f4eb210fe8cb844b0a5a1a0ae057a0d
[ "Apache-2.0" ]
null
null
null
tests/extensions/pdf/test_renderer.py
alexschiller/modular-file-renderer
43d59f2a8f4eb210fe8cb844b0a5a1a0ae057a0d
[ "Apache-2.0" ]
null
null
null
tests/extensions/pdf/test_renderer.py
alexschiller/modular-file-renderer
43d59f2a8f4eb210fe8cb844b0a5a1a0ae057a0d
[ "Apache-2.0" ]
null
null
null
import pytest from mfr.core.provider import ProviderMetadata from mfr.extensions.pdf import PdfRenderer @pytest.fixture def metadata(): return ProviderMetadata('test', '.pdf', 'text/plain', '1234', 'http://wb.osf.io/file/test.pdf?token=1234') @pytest.fixture def file_path(): return '/tmp/test.pdf' @pytest.fixture def url(): return 'http://osf.io/file/test.pdf' @pytest.fixture def assets_url(): return 'http://mfr.osf.io/assets' @pytest.fixture def export_url(): return 'http://mfr.osf.io/export?url=' + url() @pytest.fixture def renderer(metadata, file_path, url, assets_url, export_url): return PdfRenderer(metadata, file_path, url, assets_url, export_url) class TestPdfRenderer: def test_render_pdf(self, renderer, metadata, assets_url): body = renderer.render() assert '<base href="{}/{}/web/">'.format(assets_url, 'pdf') in body assert '<div id="viewer" class="pdfViewer"></div>' in body assert 'DEFAULT_URL = \'{}\''.format(metadata.download_url) in body
23.111111
110
0.689423
142
1,040
4.943662
0.330986
0.111111
0.136752
0.037037
0.266382
0.165242
0.105413
0.105413
0
0
0
0.009081
0.152885
1,040
44
111
23.636364
0.787741
0
0
0.222222
0
0
0.229808
0.023077
0
0
0
0
0.111111
1
0.259259
false
0
0.111111
0.222222
0.62963
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
0
0
1
1
0
0
3
bf3a501755b78c7fc3712365a7125b728750c56d
497
py
Python
smbf/lib/session_ok.py
Alpha-Demon404/RE-14
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
39
2020-02-26T09:44:36.000Z
2022-03-23T00:18:25.000Z
smbf/lib/session_ok.py
B4BY-DG/reverse-enginnering
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
15
2020-05-14T10:07:26.000Z
2022-01-06T02:55:32.000Z
smbf/lib/session_ok.py
B4BY-DG/reverse-enginnering
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
41
2020-03-16T22:36:38.000Z
2022-03-17T14:47:19.000Z
# Filenames : # Python bytecode : 3.8 # Time succses decompiled Sat Sep 26 13:17:38 2020 # Selector <module> in line 1 file # Timestamp in code : 2020-06-27 04:07:18 import requests ses = requests.Session() from bs4 import BeautifulSoup as parser class browser: def __init__(self, kuki): self._browser__kuki = {'cookie': kuki} def get(self, link): return parser(ses.get(('https://mbasic.facebook.com' + link), headers=(self._browser__kuki)).content, 'html.parser')
24.85
124
0.690141
72
497
4.625
0.75
0.066066
0.09009
0
0
0
0
0
0
0
0
0.074074
0.185111
497
19
125
26.157895
0.748148
0.315895
0
0
0
0
0.13253
0
0
0
0
0
0
1
0.25
false
0
0.25
0.125
0.75
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
0
0
1
1
0
0
3
1722e1bc2522475bf1abe2be156b72964c609133
573
py
Python
set3/p3_8.py
matheuspercario/python-mit
fc4ae1e546f33e9a77fd4c51a4ddc0854ab06617
[ "MIT" ]
null
null
null
set3/p3_8.py
matheuspercario/python-mit
fc4ae1e546f33e9a77fd4c51a4ddc0854ab06617
[ "MIT" ]
null
null
null
set3/p3_8.py
matheuspercario/python-mit
fc4ae1e546f33e9a77fd4c51a4ddc0854ab06617
[ "MIT" ]
null
null
null
# PYTHON - MIT - UNICAMP # ============================================================================= # Created By : Matheus Percário Bruder # Created Date : February 7th, 2021 # ============================================================================ def f_1(a): return 2 * a def f_2(b): return 3 * b def composite_result(f, g, x): return f(g(x)) def composite(f, g): def inner_func(x): return f(g(x)) return inner_func # print(composite_result(f_1, f_2, 5)) # composite_f1_2 = composite(f_1, f_2) # print(composite_f1_2(5))
19.758621
79
0.458988
73
573
3.410959
0.39726
0.032129
0.036145
0.072289
0.080321
0
0
0
0
0
0
0.04034
0.17801
573
28
80
20.464286
0.488323
0.609075
0
0.2
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.4
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
1738c203fb24e9f67f6c94adff022615f21af1f8
1,197
py
Python
test/regexp/python2.py
kylebarron/MagicPython
da6fa0793e2c85d3bf7709ff1d4f65ccf468db11
[ "MIT" ]
1,482
2015-10-16T21:59:32.000Z
2022-03-30T11:44:40.000Z
test/regexp/python2.py
kylebarron/MagicPython
da6fa0793e2c85d3bf7709ff1d4f65ccf468db11
[ "MIT" ]
226
2015-10-15T15:53:44.000Z
2022-03-25T03:08:27.000Z
test/regexp/python2.py
kylebarron/MagicPython
da6fa0793e2c85d3bf7709ff1d4f65ccf468db11
[ "MIT" ]
129
2015-10-20T02:41:49.000Z
2022-03-22T01:44:36.000Z
a = r' (?x) foo ' # comment a : source.python : source.python = : keyword.operator.assignment.python, source.python : source.python r : source.python, storage.type.string.python, string.regexp.quoted.single.python ' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python : invalid.illegal.newline.python, source.python, string.regexp.quoted.single.python : source.python ( : punctuation.parenthesis.begin.python, source.python ? : invalid.illegal.operator.python, source.python x : source.python ) : punctuation.parenthesis.end.python, source.python : source.python foo : source.python ' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python : invalid.illegal.newline.python, source.python, string.quoted.docstring.single.python # : comment.line.number-sign.python, punctuation.definition.comment.python, source.python comment : comment.line.number-sign.python, source.python
44.333333
112
0.636591
123
1,197
6.195122
0.227642
0.283465
0.330709
0.125984
0.603675
0.454068
0.414698
0.414698
0.312336
0
0
0
0.25731
1,197
26
113
46.038462
0.857143
0
0
0.190476
0
0.095238
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
173d06acf3cf5bd7493cf25b0c6f41cbc47cf052
977
py
Python
corpus/exceptions.py
looselycoupled/partisan-discourse
8579924094c92e25e21ce59a26232269cf6b34bc
[ "Apache-2.0" ]
25
2017-02-27T19:44:23.000Z
2021-04-11T00:11:49.000Z
corpus/exceptions.py
looselycoupled/partisan-discourse
8579924094c92e25e21ce59a26232269cf6b34bc
[ "Apache-2.0" ]
26
2016-07-16T15:41:07.000Z
2016-10-11T16:44:04.000Z
corpus/exceptions.py
looselycoupled/partisan-discourse
8579924094c92e25e21ce59a26232269cf6b34bc
[ "Apache-2.0" ]
9
2016-08-08T17:19:34.000Z
2020-03-04T00:31:26.000Z
# corpus.exceptions # Custom exceptions for corpus handling. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Mon Jul 18 09:57:26 2016 -0400 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: exceptions.py [63935bc] benjamin@bengfort.com $ """ Custom exceptions for corpus handling. """ ########################################################################## ## Corpus Exceptions ########################################################################## class CorpusException(Exception): """ Something went wrong in the corpus app. """ pass class BitlyAPIError(CorpusException): """ Something went wrong trying to shorten a url. """ pass class FetchError(CorpusException): """ Something went wrong trying to fetch a url using requests. """ pass class NLTKError(CorpusException): """ Something went wrong when using NLTK. """ pass
21.23913
74
0.579324
95
977
5.957895
0.578947
0.091873
0.127208
0.174912
0.261484
0.144876
0
0
0
0
0
0.031447
0.186285
977
45
75
21.711111
0.680503
0.542477
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
3
17952b6df72029d76f72e43b7c53730bd3ee7420
150
py
Python
vetores_matrizes/exemplo_bb.py
andersonmarques/programacao_2_ufra
94a22559eed817a429309d8da338431416608c0c
[ "MIT" ]
null
null
null
vetores_matrizes/exemplo_bb.py
andersonmarques/programacao_2_ufra
94a22559eed817a429309d8da338431416608c0c
[ "MIT" ]
null
null
null
vetores_matrizes/exemplo_bb.py
andersonmarques/programacao_2_ufra
94a22559eed817a429309d8da338431416608c0c
[ "MIT" ]
null
null
null
import numpy as np valor_aplicado = np.array([5000, 6000, 7000, 8000]) juros = np.array([1, 2, 3, 4]) saida = valor_aplicado * juros print(saida)
15
51
0.68
25
150
4
0.72
0.26
0
0
0
0
0
0
0
0
0
0.16129
0.173333
150
9
52
16.666667
0.645161
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.2
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bd786333da1270439f5a0534168a3541f4ceff6c
111
py
Python
virtual/Lib/site-packages/pylint/test/input/func_noerror_yield_return_mix.py
JamesKimari/pitch-one
aac9007716bf2e3b6446588a06508fac068f3d20
[ "MIT" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
virtual/lib/python3.6/site-packages/pylint/test/input/func_noerror_yield_return_mix.py
evantoh/patient-management-system
6637eb1344775633759165260ed99843581c0e72
[ "Unlicense" ]
32
2018-05-01T05:24:43.000Z
2022-03-11T23:20:39.000Z
virtual/lib/python3.6/site-packages/pylint/test/input/func_noerror_yield_return_mix.py
evantoh/patient-management-system
6637eb1344775633759165260ed99843581c0e72
[ "Unlicense" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
""" module doc """ __revision__ = None def somegen(): """this kind of mix is OK""" yield 1 return
13.875
32
0.576577
15
111
4
1
0
0
0
0
0
0
0
0
0
0
0.0125
0.279279
111
7
33
15.857143
0.7375
0.297297
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
bd7ca3778c63b42f6055e223a59905b275b8c2fc
1,281
py
Python
ethosu/vela/test/test_model_reader.py
DemonGiggle/vela
298e383d2dbab465ddd4995a6ebc6f8bc07c8719
[ "Apache-2.0" ]
1
2021-12-01T17:16:14.000Z
2021-12-01T17:16:14.000Z
ethosu/vela/test/test_model_reader.py
DemonGiggle/vela
298e383d2dbab465ddd4995a6ebc6f8bc07c8719
[ "Apache-2.0" ]
null
null
null
ethosu/vela/test/test_model_reader.py
DemonGiggle/vela
298e383d2dbab465ddd4995a6ebc6f8bc07c8719
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the License); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Description: # Unit tests for model_reader. import pytest from ethosu.vela import model_reader from ethosu.vela.errors import InputFileError def test_read_model_incorrect_extension(tmpdir): # Tests read_model with a file name that does not end with .tflite with pytest.raises(InputFileError): model_reader.read_model("no_tflite_file.txt", model_reader.ModelReaderOptions()) def test_read_model_file_not_found(tmpdir): # Tests read_model with a .tflite file that does not exist with pytest.raises(FileNotFoundError): model_reader.read_model("non_existing.tflite", model_reader.ModelReaderOptions())
37.676471
89
0.779859
190
1,281
5.142105
0.536842
0.061412
0.026612
0.032753
0.051177
0.051177
0
0
0
0
0
0.009217
0.153005
1,281
33
90
38.818182
0.891244
0.606557
0
0
0
0
0.076446
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
3
bd8031a5c133b457ce688112eb2e76fc2cc5af7d
54
py
Python
test.py
periclescy/research-qre
7fafbc7120235fe6cb75a2f5477922d813c31066
[ "OLDAP-2.3" ]
null
null
null
test.py
periclescy/research-qre
7fafbc7120235fe6cb75a2f5477922d813c31066
[ "OLDAP-2.3" ]
null
null
null
test.py
periclescy/research-qre
7fafbc7120235fe6cb75a2f5477922d813c31066
[ "OLDAP-2.3" ]
null
null
null
for i in range(4): print(i) print("Hello world")
10.8
20
0.611111
10
54
3.3
0.8
0
0
0
0
0
0
0
0
0
0
0.02381
0.222222
54
4
21
13.5
0.761905
0
0
0
0
0
0.203704
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
bd8b4af603fe82e4afc80393a64f4cdf97c3311e
337
py
Python
dfmbot/fb_dfmbot/models.py
acjh/dfm-bot
34a7d53861acea6a7287c9b4816806db864adb31
[ "MIT" ]
null
null
null
dfmbot/fb_dfmbot/models.py
acjh/dfm-bot
34a7d53861acea6a7287c9b4816806db864adb31
[ "MIT" ]
null
null
null
dfmbot/fb_dfmbot/models.py
acjh/dfm-bot
34a7d53861acea6a7287c9b4816806db864adb31
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models # Create your models here. class Person(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) fbid = models.CharField(max_length=64, primary_key=True) last_message = models.CharField(max_length=255)
28.083333
60
0.774481
48
337
5.166667
0.583333
0.241935
0.290323
0.387097
0.241935
0.241935
0
0
0
0
0
0.031034
0.139466
337
11
61
30.636364
0.824138
0.071217
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.285714
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bd8bd77a5f4099e04b2c3dc2363a8eb44444ab90
16,569
py
Python
routelift_api/stops/tests.py
BitMask-Technologies/route-lift-api
7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8
[ "MIT" ]
null
null
null
routelift_api/stops/tests.py
BitMask-Technologies/route-lift-api
7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8
[ "MIT" ]
7
2021-06-24T16:12:09.000Z
2021-08-05T16:09:22.000Z
routelift_api/stops/tests.py
BitMask-Technologies/route-lift-api
7ac78c6cce523fc5a3852dca7b289fe3a5f3afa8
[ "MIT" ]
null
null
null
from datetime import datetime from django.contrib.auth.hashers import make_password from Logistics.models import LogisticCompanies from roles_and_permissions.operations import Operations from roles_and_permissions.resource_categories import ResourceCategories from roles_and_permissions.utils import createStaffRole from .models import StopFeedback, Stops import uuid from django.conf import settings from django.test import Client, TestCase from Users.models import Drivers # Create your tests here. client = Client() secret = settings.ROOT_SECRET content_type = "application/json" class StopTests(TestCase): @classmethod def setUpTestData(cls): global secret global content_type payload = { "name": "New Logistics5", "email": "info@newlogistics5.com", "phone": "08099514386", "address": "plot 7, The providince street", "city": "Shasha", "state": "Lagos", "country": "Nigeria", "description": "the powerful logistics", "motto": "the best", "administratorLastName": "Umoh", "administratorFirstName": "Simeon", "administratorUsername": "simeone05", "administratorEmail": "simeoneumoh@gmail.com", "administratorPhone": "08099514739", "administratorPassword": "mickey01" } response = client.post( '/v1/logistics', payload, content_type=content_type, HTTP_Secret=secret ) print(response) login_payload = { "userIdentity": "08099514739", "password": "mickey01", } driver_payload = { "firstname": "Simeone", "lastname": "Umoh", "username": "simlogistics", "email": "simonumoh@mailinator.com", "phone": "+234567890", "password": "whatever1" } login_response = client.post(path="/v1/login", data=login_payload, content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, follow=True, secure=False, HTTP_ACCEPT='application/json', ) driver_response = client.post(path="/v1/users/drivers", data=driver_payload, follow=True, secure=False, HTTP_ACCEPT='application/json', content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, HTTP_Token=login_response.json()['data'][ 'accessToken'] ) print(driver_response) company = LogisticCompanies.objects.first() driver = Drivers.objects.get(user_name="simlogistics") stop = Stops.objects.create( id=int(str(uuid.uuid4().int)[::6]), sender_name='Simeon Umoh', sender_address='14 Ogidi Crescent, Lagos', sender_phone='08099514739', sender_email='simeoneumoh@gmail.com', receiver_name='Matthew Odeyemi', receiver_address='Plot 8 the Providence Street', receiver_phone='08160267172', receiver_email='mattode@outlook.com', vehicle_type='motorcycle', additional_note='apartment', stop_time_window='50', load_capacity='large', stop_duration='10', priority_level='normail', driver=driver, company=company ) stop.save() def test_createStop(self): login_payload = { "userIdentity": "08099514739", "password": "mickey01", } login_response = client.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_Secret=secret, ) driverId = Drivers.objects.get(user_name="simlogistics").id payload = { "senderName": "Simeon Umoh", "senderAddress": "14 Ogidi Crescent, Lagos", "senderPhone": "08099514739", "senderEmail": "simeoneumoh@gmail.com", "receiverName": "Matthew Odeyemi", "receiverAddress": "Plot 8 the Providence Street", "receiverPhone": "08160267172", "receiverEmail": "mattode@outlook.com", "vehicleType": "motorcycle", "additionalNote": "Bring to the apartment", "stopTimeWindow": "50", "driverId": driverId, "loadCapacity": "large", "stopDuration": "10", "priorityLevel": "normal" } response = client.post('/v1/stops', payload, content_type=content_type, HTTP_Token=login_response.json()[ 'data']['accessToken'] ) # Check that the response is 200 OK. self.assertEqual(response.status_code, 200) def test_retrieveCompanyStops(self): login_payload = { "userIdentity": "08099514739", "password": "mickey01", } login_response = client.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_Secret=secret, ) response = client.get('/v1/stops', content_type=content_type, HTTP_Token=login_response.json()[ 'data']['accessToken'] ) # Check that the response is 200 OK. self.assertEqual(response.status_code, 200) def test_updateStop(self): login_payload = { "userIdentity": "08099514739", "password": "mickey01", } login_response = client.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_Secret=secret, ) stopId = Stops.objects.first().id driverId = Drivers.objects.get(user_name="simlogistics").id payload = { "senderName": "Simeon Umoh", "senderAddress": "14 Ogidi Crescent, Lagos", "senderPhone": "08099514739", "senderEmail": "simeoneumoh@gmail.com", "receiverName": "Matthew Odeyemi", "receiverAddress": "Plot 8 the Providence Street", "receiverPhone": "08160267172", "receiverEmail": "mattode@outlook.com", "vehicleType": "motorcycle", "additionalNote": "Bring to the apartment", "stopTimeWindow": "50", "driverId": driverId, "loadCapacity": "large", "stopDuration": "10", "priorityLevel": "normal" } response = client.put(f'/v1/stops/{stopId}', payload, content_type=content_type, HTTP_Token=login_response.json()[ 'data']['accessToken'] ) # Check that the response is 200 OK. self.assertEqual(response.status_code, 200) def test_updateStopStatus(self): login_payload = { "userIdentity": "08099514739", "password": "mickey01", } login_response = client.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_Secret=secret, ) print(login_response.status_code) stopId = Stops.objects.first().id payload = { "feedback": "Completed" } response = client.put(f'/v1/stops/{stopId}?status=arrived', payload, content_type=content_type, HTTP_Token=login_response.json()[ 'data']['accessToken'] ) # Check that the response is 200 OK. self.assertEqual(response.status_code, 200) def test_retrieveStop(self): login_payload = { "userIdentity": "08099514739", "password": "mickey01", } login_response = client.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_Secret=secret, ) stopId = Stops.objects.first().id response = client.get(f'/v1/stops/{stopId}', content_type=content_type, HTTP_Token=login_response.json()[ 'data']['accessToken'] ) # Check that the response is 200 OK. self.assertEqual(response.status_code, 200) def test_deleteStop(self): login_payload = { "userIdentity": "08099514739", "password": "mickey01", } login_response = client.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_Secret=secret, ) stopId = Stops.objects.first().id response = client.delete(f'/v1/stops/{stopId}', content_type=content_type, HTTP_Token=login_response.json()[ 'data']['accessToken'] ) # Check that the response is 200 OK. self.assertEqual(response.status_code, 200) class FeedbackTest(TestCase): """feedback test begin""" @classmethod def setUpTestData(cls): company = LogisticCompanies.objects.create( id=1, name="First Company", email="test@mail.com", phone="08123456789", address="address", city="city", state="state", country="country", logo="logo", description="description", motto="motto", paid_until="2021-08-08", created_at=datetime.now() ) company.save() resources = ResourceCategories.list() operations = Operations.list() permissions = {resource: operations for resource in resources} role = createStaffRole( "company_admin", permissions, company ) role.save() driver = Drivers.objects.create( id=int(str(uuid.uuid4().int)[::6]), first_name="Benevolent", last_name="Gand", user_name="bcx", phone="08111111111", email="test@mail.com", password=make_password("password"), role=role, company=company, created_at=datetime.now() ) driver.save() stop = Stops.objects.create( id=int(str(uuid.uuid4().int)[::6]), sender_name='Simeon Umoh', sender_address='14 Ogidi Crescent, Lagos', sender_phone='08099514739', sender_email='simeoneumoh@gmail.com', receiver_name='Matthew Odeyemi', receiver_address='Plot 8 the Providence Street', receiver_phone='08160267172', receiver_email='mattode@outlook.com', vehicle_type='motorcycle', additional_note='apartment', stop_time_window='50', load_capacity='large', stop_duration='10', priority_level='normail', driver=driver, company=company ) stop.save() stop_feedback = StopFeedback.objects.create( message="This is an automated message", # file=file, stop=stop ) stop_feedback.save() def test_create_stop_feedback(self): """pass""" browser = Client() login_payload = { "userIdentity": "bcx", "password": "password", } stop = Stops.objects.get(receiver_phone='08160267172').id feedback_payload = { "message": "message", "stop": stop } login_response = browser.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, follow=True, secure=False, HTTP_ACCEPT='application/json', ) response = browser.post(path="/v1/stops/feedback", data=feedback_payload, follow=True, secure=False, HTTP_ACCEPT='application/json', content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, HTTP_Token=login_response.json()['data'][ 'accessToken'] ) self.assertEqual(response.status_code, 200) def test_get_all_stop_feedbacks(self): browser = Client() login_payload = { "userIdentity": "bcx", "password": "password", } login_response = browser.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, follow=True, secure=False, HTTP_ACCEPT='application/json', ) response = browser.get(path="/v1/stops/feedback", follow=True, secure=False, HTTP_ACCEPT='application/json', content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, HTTP_Token=login_response.json()['data']['accessToken']) self.assertEqual(response.status_code, 200) def test_retrieve_stop_feedback(self): """pass""" browser = Client() login_payload = { "userIdentity": "bcx", "password": "password", } login_response = browser.post(path="/v1/login?user_type=staff", data=login_payload, content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, follow=True, secure=False, HTTP_ACCEPT='application/json', ) feedback_id = StopFeedback.objects.first().id response = browser.get(path="/v1/stops/feedback/{}".format(feedback_id), follow=True, secure=False, HTTP_ACCEPT='application/json', content_type="application/json", HTTP_SECRET=settings.TEST_SECRET, HTTP_Token=login_response.json()['data']['accessToken'] ) self.assertEqual(response.status_code, 200) # def test_delete_stop_feedback(self): # """pass""" # browser = Client() # login_payload = { # "userIdentity": "bcx", # "password": "password", # } # login_response = browser.put(path="/v1/login?user_type=staff", data=login_payload, # content_type="application/json", # HTTP_SECRET=settings.TEST_SECRET, follow=True, # secure=False, HTTP_ACCEPT='application/json', ) # feedback_id = StopFeedback.objects.first().id # response = browser.delete(path="/v1/stop/feedback/{}".format(feedback_id), # follow=True, secure=False, # HTTP_ACCEPT='application/json', # content_type="application/json", # HTTP_SECRET=settings.TEST_SECRET, # HTTP_Token=login_response.json()['data'][ # 'accessToken'] # ) # self.assertEqual(response.status_code, 200)
41.735516
124
0.5153
1,387
16,569
5.991348
0.165105
0.042359
0.045006
0.053189
0.725752
0.718652
0.704091
0.689892
0.689892
0.6858
0
0.035389
0.377512
16,569
396
125
41.840909
0.770312
0.080874
0
0.551929
0
0
0.205861
0.033915
0
0
0
0
0.026706
1
0.032641
false
0.041543
0.032641
0
0.071217
0.008902
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bd97ac57a2038b6973c0d833aeb1a199dd43dec5
1,607
py
Python
d16/p1.py
Jamie-Chang/advent2019
130ccdc2a320d0a8d926a781a41fd74389e403a9
[ "Apache-2.0" ]
null
null
null
d16/p1.py
Jamie-Chang/advent2019
130ccdc2a320d0a8d926a781a41fd74389e403a9
[ "Apache-2.0" ]
null
null
null
d16/p1.py
Jamie-Chang/advent2019
130ccdc2a320d0a8d926a781a41fd74389e403a9
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from typing import Callable, Iterable, Iterator, List from itertools import chain, cycle, islice, repeat import numpy as np BASE_PATTERN = [0, 1, 0, -1] def read_lines() -> Iterator[str]: with (Path(__file__).parent / "input.txt").open("r") as f: for line in f: yield line.rstrip() def get_inputs() -> Iterator[int]: line = list(read_lines())[0] for i in line: yield int(i) def repeat_each(pattern, repeats: int): return chain(*map(lambda i: repeat(i, repeats), pattern)) def generate_pattern(base: Iterable[int], repeats: int, length: int) -> Iterator[int]: """Generate the pattern as specified by the algorithm. Example: >>> list(generate_pattern([0, 1, 0, -1], 2, 15)) [0, 1, 1, 0, 0, -1, -1, 0, 0, 1, 1, 0, 0, -1, -1] """ return islice(cycle(repeat_each(base, repeats)), 1, length + 1) def create_filter_matrix(length: int) -> np.array: return np.array( [list(generate_pattern(BASE_PATTERN, i + 1, length)) for i in range(length)] ) def create_input_vector() -> np.array: return np.array(list(get_inputs())) def create_last_digit_filter() -> Callable: return np.vectorize(lambda i: abs(i) % 10) def perform_fft(iterations: int) -> np.array: vector = create_input_vector() filter_matrix = create_filter_matrix(len(vector)) last_digit_filter = create_last_digit_filter() for _ in range(iterations): vector = last_digit_filter(filter_matrix @ vector) return vector # print(list(generate_pattern(2, 10))) print(perform_fft(100)[:8])
26.344262
86
0.657747
236
1,607
4.313559
0.313559
0.015717
0.011788
0.011788
0.083497
0.061886
0.014735
0.014735
0.014735
0.014735
0
0.030445
0.202862
1,607
61
87
26.344262
0.764247
0.128189
0
0
0
0
0.007252
0
0
0
0
0
0
1
0.242424
false
0
0.121212
0.121212
0.545455
0.030303
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
0
0
1
1
0
0
3
bda2bb0b49a3956bff9896df11bb2cfb1702c6a1
1,022
py
Python
vscode/extensions/magicstack.magicpython-1.0.12/test/regexp/python2.py
nlimpid/dotfiles
b78d08707992f742f984f556fa58349c2ccd095d
[ "MIT" ]
5
2017-02-22T10:17:39.000Z
2021-04-06T16:36:13.000Z
test/regexp/python2.py
Setonas/MagicSetonas
ef76da5f27a0506b194c58072b81424e3ce985d7
[ "MIT" ]
4
2019-06-16T09:52:03.000Z
2019-08-18T02:11:35.000Z
vscode/extensions/magicstack.magicpython-1.0.12/test/regexp/python2.py
nlimpid/dotfiles
b78d08707992f742f984f556fa58349c2ccd095d
[ "MIT" ]
1
2020-08-29T02:30:52.000Z
2020-08-29T02:30:52.000Z
a = r' (?x) foo ' a : source.python : source.python = : keyword.operator.assignment.python, source.python : source.python r : source.python, storage.type.string.python, string.regexp.quoted.single.python ' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python : invalid.illegal.newline.python, source.python, string.regexp.quoted.single.python : source.python ( : punctuation.parenthesis.begin.python, source.python ? : invalid.illegal.operator.python, source.python x : source.python ) : punctuation.parenthesis.end.python, source.python : source.python foo : source.python ' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python : invalid.illegal.newline.python, source.python, string.quoted.docstring.single.python
42.583333
112
0.622309
103
1,022
6.174757
0.23301
0.301887
0.339623
0.150943
0.638365
0.544025
0.496855
0.496855
0.374214
0
0
0
0.272994
1,022
23
113
44.434783
0.855989
0
0
0.2
0
0.1
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
bda3f5b55352390d17d7c5c49807550e4e3deac1
297
py
Python
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/images/api/serializers.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
176
2019-07-03T00:20:15.000Z
2022-03-14T07:51:22.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/images/api/serializers.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
121
2019-06-24T20:47:27.000Z
2022-03-28T02:16:18.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/images/api/serializers.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
144
2019-06-18T18:48:43.000Z
2022-03-31T12:14:46.000Z
"""App API serializers. """ import logging from rest_framework import serializers from ..models import Image logger = logging.getLogger(__name__) class ImageSerializer(serializers.ModelSerializer): """ImageSerializer.""" class Meta: model = Image fields = "__all__"
15.631579
51
0.703704
29
297
6.896552
0.689655
0
0
0
0
0
0
0
0
0
0
0
0.198653
297
18
52
16.5
0.840336
0.124579
0
0
0
0
0.028226
0
0
0
0
0
0
1
0
false
0
0.375
0
0.625
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
bdbebeb76abb18683215eb78cded4e0d06667190
191
py
Python
adapters/lumi/WXCJKG13LM.py
russdan/domoticz-zigbee2mqtt-plugin
d47895eab44bc87fc19ce151698d2afe9554fadc
[ "MIT" ]
146
2018-09-19T11:38:48.000Z
2022-03-21T11:54:12.000Z
adapters/lumi/WXCJKG13LM.py
russdan/domoticz-zigbee2mqtt-plugin
d47895eab44bc87fc19ce151698d2afe9554fadc
[ "MIT" ]
783
2018-09-28T17:07:14.000Z
2022-03-31T10:18:27.000Z
adapters/lumi/WXCJKG13LM.py
russdan/domoticz-zigbee2mqtt-plugin
d47895eab44bc87fc19ce151698d2afe9554fadc
[ "MIT" ]
147
2018-09-25T18:39:51.000Z
2022-03-01T19:31:27.000Z
from adapters.lumi.aqara_opple_switch import AqaraOppleSwitch class WXCJKG13LM(AqaraOppleSwitch): def __init__(self): buttons_count = 6 super().__init__(buttons_count)
21.222222
61
0.743455
21
191
6.190476
0.809524
0.184615
0
0
0
0
0
0
0
0
0
0.019231
0.183246
191
8
62
23.875
0.814103
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
bdd0adc5de287fb179800281e8709f5913da7913
878
py
Python
tests/utils/init_test.py
swinton/mopidy
c32c73f5112c29ef7ccccf36a508c571adb39759
[ "Apache-2.0" ]
null
null
null
tests/utils/init_test.py
swinton/mopidy
c32c73f5112c29ef7ccccf36a508c571adb39759
[ "Apache-2.0" ]
null
null
null
tests/utils/init_test.py
swinton/mopidy
c32c73f5112c29ef7ccccf36a508c571adb39759
[ "Apache-2.0" ]
null
null
null
from mopidy import utils from tests import unittest class GetClassTest(unittest.TestCase): def test_loading_module_that_does_not_exist(self): with self.assertRaises(ImportError): utils.get_class('foo.bar.Baz') def test_loading_class_that_does_not_exist(self): with self.assertRaises(ImportError): utils.get_class('unittest.FooBarBaz') def test_loading_incorrect_class_path(self): with self.assertRaises(ImportError): utils.get_class('foobarbaz') def test_import_error_message_contains_complete_class_path(self): try: utils.get_class('foo.bar.Baz') except ImportError as e: self.assertIn('foo.bar.Baz', str(e)) def test_loading_existing_class(self): cls = utils.get_class('unittest.TestCase') self.assertEqual(cls.__name__, 'TestCase')
31.357143
69
0.6959
109
878
5.284404
0.385321
0.060764
0.112847
0.125
0.359375
0.359375
0.305556
0.305556
0.222222
0.222222
0
0
0.210706
878
27
70
32.518519
0.831169
0
0
0.25
0
0
0.096811
0
0
0
0
0
0.25
1
0.25
false
0
0.35
0
0.65
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
0
1
0
1
0
0
3
bddccaa847cf3d70df32c8b547be9368dbd1d908
20
py
Python
api/views/consts.py
tarikyayla/reddit_dashboard
e5ecf3349a5c9333793c3ae5375bc4a0e501a16c
[ "MIT" ]
null
null
null
api/views/consts.py
tarikyayla/reddit_dashboard
e5ecf3349a5c9333793c3ae5375bc4a0e501a16c
[ "MIT" ]
null
null
null
api/views/consts.py
tarikyayla/reddit_dashboard
e5ecf3349a5c9333793c3ae5375bc4a0e501a16c
[ "MIT" ]
1
2020-11-27T23:24:09.000Z
2020-11-27T23:24:09.000Z
GET_FROM_REDDIT = 1
10
19
0.8
4
20
3.5
1
0
0
0
0
0
0
0
0
0
0
0.058824
0.15
20
1
20
20
0.764706
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
bddda4c040819b870403559ed00ebaab7190ea8f
679
py
Python
rxsci/internal/utils.py
maki-nage/rxsci
64c9956752cbdd4c65aa9f054b6b28318a056625
[ "MIT" ]
3
2021-05-03T13:40:46.000Z
2022-03-06T07:59:30.000Z
rxsci/internal/utils.py
maki-nage/rxsci
64c9956752cbdd4c65aa9f054b6b28318a056625
[ "MIT" ]
9
2020-10-22T21:08:10.000Z
2021-08-05T09:01:26.000Z
rxsci/internal/utils.py
maki-nage/rxsci
64c9956752cbdd4c65aa9f054b6b28318a056625
[ "MIT" ]
2
2021-01-05T16:48:54.000Z
2021-08-07T12:51:01.000Z
class NotSet(object): """Sentinel value.""" def __eq__(self, other): return self is other def __repr__(self): return 'NotSet' class StateNotSet(object): def __eq__(self, other): return self is other def __repr__(self): return 'NotSet' def value(self): return 0 class StateSet(object): def __eq__(self, other): return self is other def __repr__(self): return 'Set' def value(self): return 1 class StateCleared(object): def __eq__(self, other): return self is other def __repr__(self): return 'Cleared' def value(self): return 2
15.431818
28
0.584683
81
679
4.506173
0.246914
0.191781
0.09863
0.153425
0.608219
0.608219
0.608219
0.608219
0.608219
0.608219
0
0.006508
0.32106
679
43
29
15.790698
0.785249
0.022091
0
0.653846
0
0
0.033537
0
0
0
0
0
0
1
0.423077
false
0
0
0.423077
1
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
bde1d05ede2b3e57e640969726cd7f09fb8e5559
155
py
Python
assignment2/earth_electrons.py
guozhonghao1994/ec602
e8f6b61e5cdad64e9fe943fc4f61d1fc9ad85f74
[ "Unlicense" ]
3
2018-11-14T16:07:31.000Z
2018-11-15T16:44:51.000Z
assignment2/earth_electrons.py
guozhonghao1994/ec602
e8f6b61e5cdad64e9fe943fc4f61d1fc9ad85f74
[ "Unlicense" ]
null
null
null
assignment2/earth_electrons.py
guozhonghao1994/ec602
e8f6b61e5cdad64e9fe943fc4f61d1fc9ad85f74
[ "Unlicense" ]
null
null
null
#Copyright 2017 Zhonghao Guo gzh1994@bu.edu import sys estimate=3.91*10**38 lower=3.72*10**38 upper=4.11*10**38 print(estimate) print(lower) print(upper)
17.222222
43
0.754839
30
155
3.9
0.666667
0.102564
0
0
0
0
0
0
0
0
0
0.205674
0.090323
155
8
44
19.375
0.624113
0.270968
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.428571
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
da1134de439d802fe50733f5cc4818017bddfa77
1,469
py
Python
uninstall.py
Manisso/LFSET
df5f104687daf66ef4a0cb9808a0ce377415e2dc
[ "MIT" ]
8
2019-05-29T22:49:04.000Z
2021-02-28T21:05:28.000Z
uninstall.py
Manisso/LFSET
df5f104687daf66ef4a0cb9808a0ce377415e2dc
[ "MIT" ]
null
null
null
uninstall.py
Manisso/LFSET
df5f104687daf66ef4a0cb9808a0ce377415e2dc
[ "MIT" ]
2
2019-06-09T17:52:31.000Z
2019-09-09T17:14:46.000Z
#!/usr/bin/env python # -*- codeing: UTF-8 -*- import time import sys import os print(''' ____ ___ .__ __ .__ .__ .____ __________________________________________ | | \____ |__| ____ _______/ |______ | | | | ______ ___.__. | | \_ _____/ _____/\_ _____/\__ ___/ | | / \| |/ \ / ___/\ __\__ \ | | | | \____ < | | ______ | | | __) \_____ \ | __)_ | | | | / | \ | | \\___ \ | | / __ \| |_| |__ | |_> >___ | /_____/ | |___| \ / \ | \ | | |______/|___| /__|___| /____ > |__| (____ /____/____/ /\ | __// ____| |_______ \___ / /_______ //_______ / |____| \/ \/ \/ \/ \/ |__| \/ \/ \/ \/ \/ ''') ch = raw_input('Do you REALLY want to uninstall LFSET? (N/y): ') if ch == 'N': print("Have a good day!") elif ch == 'y': print('sorry you didnt like it :( BUT, HAVE A GOOD DAY :))))') time.sleep(5) os.system('clear') os.system('cd .. && cd .. && cd ..') os.system('rm -rf etc') os.system('rm -rf files') os.system('rm -rf tools') os.system('rm -rf .git') os.system('rm -rf LICENSE') os.system('rm -rf README.md') print('All files uninstalled, after 10sec this file will be del...') time.sleep(10) os.system('sudo rm -rf uninstall.py')
43.205882
136
0.429544
111
1,469
3.585586
0.54955
0.180905
0.150754
0.180905
0
0
0
0
0
0
0
0.006572
0.378489
1,469
33
137
44.515152
0.429354
0.029272
0
0
0
0.142857
0.79073
0.029494
0
0
0
0
0
1
0
false
0
0.107143
0
0.107143
0.142857
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
da1332cc41c82ca79874cad9790e459f7a50414e
591
py
Python
payments/tests.py
asm3ft/cs3240-quickthooters
53000deca2d4a4ff4244cde76f36e7adcfb52784
[ "MIT", "PostgreSQL", "Unlicense" ]
null
null
null
payments/tests.py
asm3ft/cs3240-quickthooters
53000deca2d4a4ff4244cde76f36e7adcfb52784
[ "MIT", "PostgreSQL", "Unlicense" ]
9
2021-04-08T21:41:10.000Z
2022-03-12T00:26:00.000Z
payments/tests.py
asm3ft/cs3240-quickthooters
53000deca2d4a4ff4244cde76f36e7adcfb52784
[ "MIT", "PostgreSQL", "Unlicense" ]
null
null
null
from django.test import TestCase from django.test import RequestFactory, TestCase from .views import charge, HomePageView from login.models import Profile from django.contrib.auth.models import User # class PaymentViewsTestCase(TestCase): # def setUp(self): # # Every test needs access to the request factory. # self.factory = RequestFactory() # self.user = User.objects.create_user( # username='jacob', email='jacob@…', password='top_secret') # def charge_view_test(self): # # tbd # self.assertEquals(1, 1)
26.863636
71
0.663283
69
591
5.666667
0.57971
0.076726
0.071611
0.102302
0
0
0
0
0
0
0
0.004454
0.240271
591
21
72
28.142857
0.859688
0.588832
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
da1588b9217dc470ed263275774b3681de6ca380
642
py
Python
MTRF/r3l/r3l/robot/robot.py
facebookresearch/MTRF
2fee8f3f1c2150fcecc2db2fa9e122a664a72d72
[ "Apache-2.0" ]
2
2021-11-29T10:09:56.000Z
2022-02-01T05:48:32.000Z
MTRF/r3l/r3l/robot/robot.py
facebookresearch/MTRF
2fee8f3f1c2150fcecc2db2fa9e122a664a72d72
[ "Apache-2.0" ]
null
null
null
MTRF/r3l/r3l/robot/robot.py
facebookresearch/MTRF
2fee8f3f1c2150fcecc2db2fa9e122a664a72d72
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates # Copyright (c) MTRF authors import abc class Robot(metaclass=abc.ABCMeta): def __init__(self, env=None): self._env = env if env: self._sim = env.sim else: self._sim = None @property @abc.abstractmethod def is_hardware(self): raise NotImplementedError @abc.abstractmethod def step(self, action): raise NotImplementedError @abc.abstractmethod def set_state(self, state): raise NotImplementedError @abc.abstractmethod def get_obs_dict(self): raise NotImplementedError
21.4
49
0.640187
71
642
5.633803
0.507042
0.17
0.2
0.3075
0.33
0
0
0
0
0
0
0
0.281931
642
29
50
22.137931
0.867679
0.115265
0
0.380952
0
0
0
0
0
0
0
0
0
1
0.238095
false
0
0.047619
0
0.333333
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
0
0
0
0
3
da1b4387561fab9dc87a8b4f0a9f01c7e63f73be
308
py
Python
pyschieber/deck.py
Murthy10/pyschieber
f9db28c9553b8f321f6ed71cff04eff7879af5f6
[ "MIT" ]
5
2018-01-17T08:11:14.000Z
2018-11-27T11:37:15.000Z
pyschieber/deck.py
Murthy10/pyschieber
f9db28c9553b8f321f6ed71cff04eff7879af5f6
[ "MIT" ]
4
2018-05-09T08:41:05.000Z
2018-11-16T08:07:39.000Z
pyschieber/deck.py
Murthy10/pyschieber
f9db28c9553b8f321f6ed71cff04eff7879af5f6
[ "MIT" ]
3
2018-04-20T07:39:30.000Z
2018-11-10T12:44:08.000Z
from pyschieber.suit import Suit from pyschieber.card import Card class Deck: def __init__(self): self.cards = [] for suit in Suit: self.cards += [Card(suit=suit, value=i) for i in range(6, 15)] def __str__(self): return str([str(card) for card in self.cards])
23.692308
74
0.62013
46
308
3.978261
0.434783
0.147541
0
0
0
0
0
0
0
0
0
0.013333
0.269481
308
12
75
25.666667
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
da36cd3ef7bb152a5c978fa2a7968dad8b22592a
28
py
Python
image_predictor/__init__.py
shakedlokits/pyArt
ffac65e91b7f97f0fa95f4ee7bfffcff4f6249aa
[ "Unlicense" ]
3
2017-03-26T16:42:18.000Z
2021-12-30T06:28:34.000Z
image_predictor/__init__.py
shakedlokits/pyArt
ffac65e91b7f97f0fa95f4ee7bfffcff4f6249aa
[ "Unlicense" ]
null
null
null
image_predictor/__init__.py
shakedlokits/pyArt
ffac65e91b7f97f0fa95f4ee7bfffcff4f6249aa
[ "Unlicense" ]
null
null
null
__author__ = 'shakedlokits'
14
27
0.785714
2
28
9
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
1
28
28
0.72
0
0
0
0
0
0.428571
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
da43c8aa3780e6b294ec06869cbcdecb77cd3961
196
py
Python
ex001 a ex114/ex008.py
kesia-barros/exercicios-python
12a019e61c4b29fa29803f394b15d0af304c2ff0
[ "MIT" ]
null
null
null
ex001 a ex114/ex008.py
kesia-barros/exercicios-python
12a019e61c4b29fa29803f394b15d0af304c2ff0
[ "MIT" ]
null
null
null
ex001 a ex114/ex008.py
kesia-barros/exercicios-python
12a019e61c4b29fa29803f394b15d0af304c2ff0
[ "MIT" ]
null
null
null
m = float(input("Digite os metros a serem convertidos: ")) c = 100 * m mm = 1000 * m print("{} metros tem {:.0f} centimetros!".format(m, c)) print("{} metros tem {:.0f} milimetros!".format(m, mm))
39.2
58
0.632653
31
196
4
0.612903
0.048387
0.225806
0.258065
0
0
0
0
0
0
0
0.054217
0.153061
196
5
59
39.2
0.692771
0
0
0
0
0
0.522843
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
da46e9da88a69412b02b4465644d5259231c811b
274
py
Python
genaperiodic.py
gmayankcse15/Poller-and-Deferrable-Server
9c4c5cae670c6e97959570592135b5c22bdfa4f7
[ "MIT" ]
null
null
null
genaperiodic.py
gmayankcse15/Poller-and-Deferrable-Server
9c4c5cae670c6e97959570592135b5c22bdfa4f7
[ "MIT" ]
null
null
null
genaperiodic.py
gmayankcse15/Poller-and-Deferrable-Server
9c4c5cae670c6e97959570592135b5c22bdfa4f7
[ "MIT" ]
null
null
null
import numpy as np arr_time = np.random.exponential(3, 3) print(arr_time) Exec_Time = np.random.exponential(1, 3) print(Exec_Time) for i in range(0,3): print "A(",round(arr_time[i],1),",",round(Exec_Time[i],1),")" ''' Output A(0.3, 1.1) A(2.5, 2.0) A(0.0, 4.7) '''
13.7
63
0.627737
58
274
2.862069
0.413793
0.126506
0.144578
0.277108
0
0
0
0
0
0
0
0.084746
0.138686
274
20
64
13.7
0.618644
0
0
0
0
0
0.0181
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.428571
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
3
da774b4615481a7592e47b528fe32fca5d803722
56
py
Python
aioface/storages/fsm/types.py
kirillkuzin/aioface
c19f89f3f0f6ccb95832030444f2ece8fda7de62
[ "MIT" ]
1
2020-09-12T21:10:54.000Z
2020-09-12T21:10:54.000Z
aioface/storages/fsm/types.py
kirillkuzin/aioface
c19f89f3f0f6ccb95832030444f2ece8fda7de62
[ "MIT" ]
null
null
null
aioface/storages/fsm/types.py
kirillkuzin/aioface
c19f89f3f0f6ccb95832030444f2ece8fda7de62
[ "MIT" ]
null
null
null
import typing State = typing.NewType('State', object)
11.2
39
0.732143
7
56
5.857143
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.142857
56
4
40
14
0.854167
0
0
0
0
0
0.089286
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
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
da7e18ea9112e331d9b45cb4a08cb02a217b0d65
53
py
Python
001146StepikPyBegin/Stepik001146PyBeginсh06p01st08C07_fraction_20200419.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001146StepikPyBegin/Stepik001146PyBeginсh06p01st08C07_fraction_20200419.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001146StepikPyBegin/Stepik001146PyBeginсh06p01st08C07_fraction_20200419.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
num1 = float(input()) # num1 = 44.45 print(num1 % 1)
13.25
21
0.603774
9
53
3.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0.186047
0.188679
53
3
22
17.666667
0.55814
0.226415
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
da8089058869977e8a1f3875a6acbaed71ba57b4
651
py
Python
src/turret/core/cli.py
VanJanssen/turret
a3b87940aa7ed07df7a60e7633f795c0fec26462
[ "MIT" ]
1
2018-01-09T12:40:00.000Z
2018-01-09T12:40:00.000Z
src/turret/core/cli.py
VanJanssen/turret
a3b87940aa7ed07df7a60e7633f795c0fec26462
[ "MIT" ]
42
2018-01-05T11:45:56.000Z
2019-03-11T09:41:11.000Z
src/turret/core/cli.py
VanJanssen/turret
a3b87940aa7ed07df7a60e7633f795c0fec26462
[ "MIT" ]
1
2017-08-29T15:54:28.000Z
2017-08-29T15:54:28.000Z
# -*- coding: utf-8 -*- """Entry point for the command line interface of Turret. The command line interface is split across multiple files, to increase modulairity and maintainability. Every component of Turret has its own subcommand, the CLI for this is in the `cli.py` file of this component. This file imports the subcommands for those components and adds them to the main group. """ import click from turret.raw.cli import raw from turret.scout.cli import scout @click.group() @click.version_option(message='Turret %(version)s') def main(): """Entry point for the Turret CLI.""" pass main.add_command(scout) main.add_command(raw)
23.25
76
0.749616
102
651
4.754902
0.519608
0.041237
0.053608
0.065979
0
0
0
0
0
0
0
0.001832
0.16129
651
27
77
24.111111
0.886447
0.631336
0
0
0
0
0.078947
0
0
0
0
0
0
1
0.111111
true
0.111111
0.333333
0
0.444444
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
3
e518de7808c648780c618b4d314bc02b24cf5ad5
197
py
Python
urbanairship/reports/__init__.py
kaellis/airship-python-library
d583138a1c12442020a3ae93d35817624ed6afb5
[ "Apache-2.0" ]
null
null
null
urbanairship/reports/__init__.py
kaellis/airship-python-library
d583138a1c12442020a3ae93d35817624ed6afb5
[ "Apache-2.0" ]
null
null
null
urbanairship/reports/__init__.py
kaellis/airship-python-library
d583138a1c12442020a3ae93d35817624ed6afb5
[ "Apache-2.0" ]
null
null
null
from .reports import ( IndividualResponseStats, ResponseList, DevicesReport, OptInList, OptOutList, PushList, ResponseReportList, AppOpensList, TimeInAppList, )
16.416667
28
0.685279
12
197
11.25
1
0
0
0
0
0
0
0
0
0
0
0
0.253807
197
11
29
17.909091
0.918367
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.090909
0
0.090909
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
e51c14edee81c07664d02c94e1ae537e4d6867aa
396
py
Python
django_coverage_plugin/__init__.py
joshuadavidthomas/django_coverage_plugin
c4ec0691906dc0923c494efc9c9236d3aa21be73
[ "Apache-2.0" ]
172
2015-01-03T20:26:42.000Z
2022-02-18T20:38:59.000Z
django_coverage_plugin/__init__.py
joshuadavidthomas/django_coverage_plugin
c4ec0691906dc0923c494efc9c9236d3aa21be73
[ "Apache-2.0" ]
71
2015-01-17T19:22:53.000Z
2022-02-03T09:09:35.000Z
django_coverage_plugin/__init__.py
joshuadavidthomas/django_coverage_plugin
c4ec0691906dc0923c494efc9c9236d3aa21be73
[ "Apache-2.0" ]
31
2015-01-18T14:32:46.000Z
2022-02-18T20:39:07.000Z
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt """Django Template Coverage Plugin""" from .plugin import DjangoTemplatePluginException # noqa from .plugin import DjangoTemplatePlugin def coverage_init(reg, options): reg.add_file_tracer(DjangoTemplatePlugin(options))
33
86
0.800505
50
396
6.24
0.74
0.089744
0.102564
0
0
0
0
0
0
0
0
0.005587
0.09596
396
11
87
36
0.865922
0.505051
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
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
0
1
0
1
0
0
3
e5371254ed22fa060db8dd66fc1b046f1463cc0b
928
py
Python
tests/sample/comprehension.py
JarryShaw/walrus
cb748496974c4c8b1a68907d46eff2845db75e84
[ "MIT" ]
4
2020-06-01T17:38:15.000Z
2022-03-26T12:01:16.000Z
tests/sample/comprehension.py
pybpc/walrus
cb748496974c4c8b1a68907d46eff2845db75e84
[ "MIT" ]
23
2020-05-31T09:24:49.000Z
2021-02-22T19:29:23.000Z
tests/sample/comprehension.py
pybpc/walrus
cb748496974c4c8b1a68907d46eff2845db75e84
[ "MIT" ]
1
2019-11-09T00:34:37.000Z
2019-11-09T00:34:37.000Z
comp1 = [x1 := x * x for x in range(10)] print(comp1) print(x1) print(globals().get('x')) def f2(): comp2 = [x2 := x ** 3 for x in range(9)] print(comp2) print(x2) print(locals().get('x')) def f3(): global x3 comp3 = [x3 := x ** 4 for x in range(8)] print(comp3) print(locals().get('x')) def f4(): x4 = 0 def g4(): nonlocal x4 comp4 = [x4 := x ** 5 for x in range(7)] print(comp4) print(locals().get('x')) g4() print(x4) def f5(): comp5 = [[x5 := i for i in range(3)] for j in range(2)] print(comp5) print(x5) print(locals().get('i')) print(locals().get('j')) f2() print(globals().get('x')) print(globals().get('x2')) f3() print(globals().get('x')) print(globals().get('x3')) f4() print(globals().get('x')) print(globals().get('x4')) f5() print(globals().get('i')) print(globals().get('j')) print(globals().get('x5'))
17.509434
59
0.528017
148
928
3.310811
0.25
0.244898
0.306122
0.089796
0.263265
0.189796
0.189796
0
0
0
0
0.065734
0.229526
928
52
60
17.846154
0.61958
0
0
0.166667
0
0
0.020474
0
0
0
0
0
0
1
0.119048
false
0
0
0
0.119048
0.571429
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
e547362978e6693dbe91b5bc878d2ea775c9f025
1,561
py
Python
comp_modules/Quicksort.py
SpyrosMouselinos/CompSciStructs
e45743cc4fdf103d4cc0b48d62086226e1cbe726
[ "Apache-2.0" ]
null
null
null
comp_modules/Quicksort.py
SpyrosMouselinos/CompSciStructs
e45743cc4fdf103d4cc0b48d62086226e1cbe726
[ "Apache-2.0" ]
null
null
null
comp_modules/Quicksort.py
SpyrosMouselinos/CompSciStructs
e45743cc4fdf103d4cc0b48d62086226e1cbe726
[ "Apache-2.0" ]
null
null
null
import random def partition(array, low, high): pivot = array[(low + high) // 2] left = low - 1 right = high + 1 while(True): left += 1 while array[left] < pivot: left += 1 right -= 1 while array[right] > pivot: right -= 1 if left >= right: return right array[left], array[right] = array[right], array[left] def quicksort(array, low, high): if low < high: pivot = partition(array, low, high) quicksort(array=array, low=low, high=pivot) quicksort(array=array, low=pivot+1, high=high) return def randomized_partition(array, low, high): pivot = array[random.randint(low, high)] left = low - 1 right = high + 1 while(True): left += 1 while array[left] < pivot: left += 1 right -= 1 while array[right] > pivot: right -= 1 if left >= right: return right array[left], array[right] = array[right], array[left] def randomized_quicksort(array, low, high): if low < high: pivot = randomized_partition(array, low, high) quicksort(array=array, low=low, high=pivot) quicksort(array=array, low=pivot+1, high=high) return def qsort(array, mode='normal'): if mode == 'normal': quicksort(array, 0, len(array) -1) elif mode == 'randomized': randomized_quicksort(array, 0, len(array) -1) return array
22.623188
61
0.53171
184
1,561
4.48913
0.13587
0.101695
0.101695
0.101695
0.849879
0.825666
0.692494
0.692494
0.607748
0.607748
0
0.018738
0.350416
1,561
69
62
22.623188
0.795858
0
0
0.680851
0
0
0.014085
0
0
0
0
0
0
1
0.106383
false
0
0.021277
0
0.234043
0
0
0
0
null
0
0
0
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
e54d49eead1974109248b8035d8a201f05e5a2c9
1,886
py
Python
os_xenapi/client/host_agent.py
jonarrien/openstack-xenapi
8961dcbdecfbe7c3e3b5d05e71011c3a70d273a6
[ "Apache-2.0" ]
null
null
null
os_xenapi/client/host_agent.py
jonarrien/openstack-xenapi
8961dcbdecfbe7c3e3b5d05e71011c3a70d273a6
[ "Apache-2.0" ]
null
null
null
os_xenapi/client/host_agent.py
jonarrien/openstack-xenapi
8961dcbdecfbe7c3e3b5d05e71011c3a70d273a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Citrix Systems # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. def version(session, uuid, dom_id, timeout): args = {'id': uuid, 'dom_id': dom_id, 'timeout': timeout} return session.call_plugin('agent.py', 'version', args) def key_init(session, uuid, dom_id, timeout, pub=''): args = {'id': uuid, 'dom_id': dom_id, 'timeout': timeout, 'pub': pub} return session.call_plugin('agent.py', 'key_init', args) def agent_update(session, uuid, dom_id, timeout, url='', md5sum=''): args = {'id': uuid, 'dom_id': dom_id, 'timeout': timeout, 'url': url, 'md5sum': md5sum} return session.call_plugin('agent.py', 'agentupdate', args) def password(session, uuid, dom_id, timeout, enc_pass=''): args = {'id': uuid, 'dom_id': dom_id, 'timeout': timeout, 'enc_pass': enc_pass} return session.call_plugin('agent.py', 'password', args) def inject_file(session, uuid, dom_id, timeout, b64_path='', b64_contents=''): args = {'id': uuid, 'dom_id': dom_id, 'timeout': timeout, 'b64_path': b64_path, 'b64_contents': b64_contents} return session.call_plugin('agent.py', 'inject_file', args) def reset_network(session, uuid, dom_id, timeout): args = {'id': uuid, 'dom_id': dom_id, 'timeout': timeout} return session.call_plugin('agent.py', 'resetnetwork', args)
39.291667
78
0.671262
267
1,886
4.595506
0.344569
0.07335
0.08802
0.07824
0.425428
0.350448
0.252649
0.252649
0.252649
0.141809
0
0.015023
0.188229
1,886
47
79
40.12766
0.786414
0.306999
0
0.272727
0
0
0.181748
0
0
0
0
0
0
1
0.272727
false
0.136364
0
0
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
e552e80c6cecaff697d61ab26de1caa136a85aa7
100
py
Python
taobaotmcpy/__init__.py
baocaixiong/taobao-tmc-python
7fea2e481f303aae172606bcc9e17d3ce5500abe
[ "MIT" ]
3
2015-09-17T14:35:45.000Z
2017-01-23T13:18:48.000Z
taobaotmcpy/__init__.py
baocaixiong/taobao-tmc-python
7fea2e481f303aae172606bcc9e17d3ce5500abe
[ "MIT" ]
null
null
null
taobaotmcpy/__init__.py
baocaixiong/taobao-tmc-python
7fea2e481f303aae172606bcc9e17d3ce5500abe
[ "MIT" ]
7
2016-03-29T07:02:50.000Z
2020-06-01T07:37:18.000Z
# coding: utf8 __author__ = 'baocaixiong' __all__ = ['TmcClient'] from tmcclient import TmcClient
14.285714
31
0.75
10
100
6.7
0.8
0
0
0
0
0
0
0
0
0
0
0.011765
0.15
100
6
32
16.666667
0.776471
0.12
0
0
0
0
0.232558
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e56779436b35301359589f1c68b90f43fe79050c
395
py
Python
leetcode/maximum_difference_between_node_and_ancestor/maximum_difference_between_node_and_ancestor.py
sagasu/python-algorithms
d630777a3f17823165e4d72ab780ede7b10df752
[ "MIT" ]
null
null
null
leetcode/maximum_difference_between_node_and_ancestor/maximum_difference_between_node_and_ancestor.py
sagasu/python-algorithms
d630777a3f17823165e4d72ab780ede7b10df752
[ "MIT" ]
null
null
null
leetcode/maximum_difference_between_node_and_ancestor/maximum_difference_between_node_and_ancestor.py
sagasu/python-algorithms
d630777a3f17823165e4d72ab780ede7b10df752
[ "MIT" ]
null
null
null
class Solution: def maxAncestorDiff(self, root: Optional[TreeNode]) -> int: def dfs(root, mn, mx): if not root: return 0 res = max(abs(root.val - mn), abs(root.val - mx)) mn, mx = min(mn, root.val), max(mx, root.val) return max(res, dfs(root.left, mn, mx), dfs(root.right, mn, mx)) return dfs(root, root.val, root.val)
43.888889
76
0.546835
59
395
3.661017
0.389831
0.194444
0.092593
0
0
0
0
0
0
0
0
0.003636
0.303797
395
9
77
43.888889
0.781818
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
e5c399ccf40bc25cefef6274b5920b5a4ae32549
7,048
py
Python
dssm/train.py
nlpming/tensorflow-DSMM
dc982cc49bf03f474da2895e4dd4fb37061c0271
[ "MIT" ]
null
null
null
dssm/train.py
nlpming/tensorflow-DSMM
dc982cc49bf03f474da2895e4dd4fb37061c0271
[ "MIT" ]
null
null
null
dssm/train.py
nlpming/tensorflow-DSMM
dc982cc49bf03f474da2895e4dd4fb37061c0271
[ "MIT" ]
null
null
null
#!/usr/bin/env python #encoding=utf-8 ''' @Time : 2020/10/25 22:28:30 @Author : zhiyang.zzy @Contact : zhiyangchou@gmail.com @Desc : 训练相似度模型 1. siamese network,分别使用 cosine、曼哈顿距离 2. triplet loss ''' # here put the import lib from model.bert_classifier import BertClassifier import os import time from numpy.lib.arraypad import pad import nni from tensorflow.python.ops.gen_io_ops import write_file import yaml import logging import argparse logging.basicConfig(level=logging.INFO) import data_input from config import Config from model.siamese_network import SiamenseRNN, SiamenseBert from data_input import Vocabulary, get_test from util import write_file def train_siamese(): # 读取配置 # conf = Config() cfg_path = "./configs/config.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) # 读取数据 data_train, data_val, data_test = data_input.get_lcqmc() # data_train = data_train[:100] print("train size:{},val size:{}, test size:{}".format( len(data_train), len(data_val), len(data_test))) model = SiamenseRNN(cfg) model.fit(data_train, data_val, data_test) pass def predict_siamese(file_='./results/'): # 加载配置 cfg_path = "./configs/config.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) # 将 seq转为id, vocab = Vocabulary(meta_file='./data/vocab.txt', max_len=cfg['max_seq_len'], allow_unk=1, unk='[UNK]', pad='[PAD]') test_arr, query_arr = get_test(file_, vocab) # 加载模型 model = SiamenseRNN(cfg) model.restore_session(cfg["checkpoint_dir"]) test_label, test_prob = model.predict(test_arr) out_arr = [x + [test_label[i]] + [test_prob[i]] for i, x in enumerate(query_arr)] write_file(out_arr, file_ + '.siamese.predict', ) pass def train_siamese_bert(): # 读取配置 # conf = Config() cfg_path = "./configs/config_bert.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) # 自动调参的参数,每次会更新一组搜索空间中的参数 tuner_params= nni.get_next_parameter() cfg.update(tuner_params) # vocab: 将 seq转为id, vocab = Vocabulary(meta_file='./data/vocab.txt', max_len=cfg['max_seq_len'], allow_unk=1, unk='[UNK]', pad='[PAD]') # 读取数据 data_train, data_val, data_test = data_input.get_lcqmc_bert(vocab) # data_train = data_train[:100] print("train size:{},val size:{}, test size:{}".format( len(data_train), len(data_val), len(data_test))) model = SiamenseBert(cfg) model.fit(data_train, data_val, data_test) pass def predict_siamese_bert(file_="./results/input/test"): # 读取配置 # conf = Config() cfg_path = "./configs/config_bert.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) os.environ["CUDA_VISIBLE_DEVICES"] = "4" # vocab: 将 seq转为id, vocab = Vocabulary(meta_file='./data/vocab.txt', max_len=cfg['max_seq_len'], allow_unk=1, unk='[UNK]', pad='[PAD]') # 读取数据 test_arr, query_arr = data_input.get_test_bert(file_, vocab) print("test size:{}".format(len(test_arr))) model = SiamenseBert(cfg) model.restore_session(cfg["checkpoint_dir"]) test_label, test_prob = model.predict(test_arr) out_arr = [x + [test_label[i]] + [test_prob[i]] for i, x in enumerate(query_arr)] write_file(out_arr, file_ + '.siamese.bert.predict', ) pass def train_bert(): # 读取配置 # conf = Config() cfg_path = "./configs/bert_classify.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) # 自动调参的参数,每次会更新一组搜索空间中的参数 tuner_params= nni.get_next_parameter() cfg.update(tuner_params) # vocab: 将 seq转为id, vocab = Vocabulary(meta_file='./data/vocab.txt', max_len=cfg['max_seq_len'], allow_unk=1, unk='[UNK]', pad='[PAD]') # 读取数据 data_train, data_val, data_test = data_input.get_lcqmc_bert(vocab, is_merge=1) # data_train = data_train[:100] print("train size:{},val size:{}, test size:{}".format( len(data_train), len(data_val), len(data_test))) model = BertClassifier(cfg) model.fit(data_train, data_val, data_test) pass def predict_bert(file_="./results/input/test"): # 读取配置 # conf = Config() cfg_path = "./configs/bert_classify.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) # vocab: 将 seq转为id, vocab = Vocabulary(meta_file='./data/vocab.txt', max_len=cfg['max_seq_len'], allow_unk=1, unk='[UNK]', pad='[PAD]') # 读取数据 test_arr, query_arr = data_input.get_test_bert(file_, vocab, is_merge=1) print("test size:{}".format(len(test_arr))) model = BertClassifier(cfg) model.restore_session(cfg["checkpoint_dir"]) test_label, test_prob = model.predict(test_arr) out_arr = [x + [test_label[i]] + [test_prob[i]] for i, x in enumerate(query_arr)] write_file(out_arr, file_ + '.bert.predict', ) pass def siamese_bert_sentence_embedding(file_="./results/input/test.single"): # 输入一行是一个query,输出是此query对应的向量 # 读取配置 cfg_path = "./configs/config_bert.yml" cfg = yaml.load(open(cfg_path, encoding='utf-8'), Loader=yaml.FullLoader) cfg['batch_size'] = 64 os.environ["CUDA_VISIBLE_DEVICES"] = "7" # vocab: 将 seq转为id, vocab = Vocabulary(meta_file='./data/vocab.txt', max_len=cfg['max_seq_len'], allow_unk=1, unk='[UNK]', pad='[PAD]') # 读取数据 test_arr, query_arr = data_input.get_test_bert_single(file_, vocab) print("test size:{}".format(len(test_arr))) model = SiamenseBert(cfg) model.restore_session(cfg["checkpoint_dir"]) test_label = model.predict_embedding(test_arr) test_label = [",".join([str(y) for y in x]) for x in test_label] out_arr = [[x, test_label[i]] for i, x in enumerate(query_arr)] print("write to file...") write_file(out_arr, file_ + '.siamese.bert.embedding', ) pass if __name__ == "__main__": os.environ["CUDA_VISIBLE_DEVICES"] = "4" ap = argparse.ArgumentParser() ap.add_argument("--method", default="bert", type=str, help="train/predict") ap.add_argument("--mode", default="train", type=str, help="train/predict") ap.add_argument("--file", default="./results/input/test", type=str, help="train/predict") args = ap.parse_args() if args.mode == 'train' and args.method == 'rnn': train_siamese() elif args.mode == 'predict' and args.method == 'rnn': predict_siamese(args.file) elif args.mode == 'train' and args.method == 'bert_siamese': train_siamese_bert() elif args.mode == 'predict' and args.method == 'bert_siamese': predict_siamese_bert(args.file) elif args.mode == 'train' and args.method == 'bert': train_bert() elif args.mode == 'predict' and args.method == 'bert': predict_bert(args.file) elif args.mode == 'predict' and args.method == 'bert_siamese_embedding': # 此处输出句子的 embedding,如果想要使用向量召回 # 建议训练模型的时候,损失函数使用功能和faiss一致的距离度量,例如faiss中使用是l2,那么损失函数用l2 # faiss距离用cos,损失函数用cosin,或者损失中有一项是cosin相似度损失 siamese_bert_sentence_embedding(args.file)
40.045455
119
0.678065
1,001
7,048
4.541459
0.16983
0.029696
0.025737
0.021557
0.715794
0.703256
0.678179
0.658821
0.630004
0.601408
0
0.008202
0.169694
7,048
175
120
40.274286
0.768626
0.109393
0
0.512397
0
0
0.172309
0.035617
0
0
0
0
0
1
0.057851
false
0.057851
0.115702
0
0.173554
0.057851
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
e5e752f6a18aedce35c0b66c9dcf5c5d4d5eb6e8
677
py
Python
stack_reverse_string.py
kromagg/Python
1ade4c3ac8f0ef24735c22437d3716cc7388f6a1
[ "MIT" ]
null
null
null
stack_reverse_string.py
kromagg/Python
1ade4c3ac8f0ef24735c22437d3716cc7388f6a1
[ "MIT" ]
null
null
null
stack_reverse_string.py
kromagg/Python
1ade4c3ac8f0ef24735c22437d3716cc7388f6a1
[ "MIT" ]
null
null
null
class Stack: def __init__(self): self.items = [] def is_empty(self): # return len(self.items) == 0 return not self.items def push(self, item): self.items.append(item) def pop(self): return self.items.pop() def peek(self): return self.items[-1] def size(self): return len(self.items) def __str__(self): return str(self.items) if __name__ == "__main__": string = ".koob doog a htiw nohtyP nraeL" reversed_string = "" s = Stack() for char in string: s.push(char) while not s.is_empty(): reversed_string += s.pop() print(reversed_string)
18.297297
45
0.568685
89
677
4.089888
0.41573
0.197802
0.098901
0.093407
0.120879
0
0
0
0
0
0
0.004283
0.310192
677
37
46
18.297297
0.775161
0.039882
0
0
0
0
0.058552
0
0
0
0
0
0
1
0.291667
false
0
0
0.208333
0.541667
0.041667
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
0
0
1
1
0
0
3
e5f095d1388f9625e63f8d8fbeb39317cd585f8c
68
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.11-list-del-function.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.11-list-del-function.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.11-list-del-function.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
li = [1, 2, 3, 3, 4, 5, 6] del(li[1]) print(li) del(li) print(li)
8.5
26
0.5
17
68
2
0.529412
0.176471
0
0
0
0
0
0
0
0
0
0.150943
0.220588
68
7
27
9.714286
0.490566
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
00555a4b5e6cf01b88abb2844e7dfc38a61a5022
1,128
py
Python
dia/libs/Color.py
sosie-js/dia-test
eebf777c65487002ac9cb6cd4dd9e97466ba0f93
[ "CC0-1.0" ]
null
null
null
dia/libs/Color.py
sosie-js/dia-test
eebf777c65487002ac9cb6cd4dd9e97466ba0f93
[ "CC0-1.0" ]
null
null
null
dia/libs/Color.py
sosie-js/dia-test
eebf777c65487002ac9cb6cd4dd9e97466ba0f93
[ "CC0-1.0" ]
null
null
null
""" pydia: Color.py - 2021.09 ================================================ Template code generated from UML diagrams of PyDia with 'dia2code -t python ../dia2code/PyDiaObjects.dia' Note: Experimental, will be obsolete if we found a way to use libdia /pydia libraries Author: SoSie@sos-productions.com License: LGPL """ import _once _once.imported['Color']=None class Color: """Class Color A color either defined by a color string or by a tuple with three elements (r, g, b) with type float 0.0 ... 1.0 or range int 0 ... 65535""" # Attributes: alpha = None # () double: alpha color component [0 .. 1.0] blue = None # () double: blue color component [0 .. 1.0] green = None # () double: green color component [0 .. 1.0] red = None # () double: red color component [0 .. 1.0] # Operations def __init__(self) : self.alpha = None # self.blue = None # self.green = None # self.red = None # pass _once.imported['Color']= Color for name, object in _once.imported.items(): globals()[name]=object
28.2
140
0.586879
150
1,128
4.36
0.533333
0.015291
0.022936
0.097859
0.103976
0
0
0
0
0
0
0.035885
0.258865
1,128
39
141
28.923077
0.746411
0.593972
0
0
1
0
0.024155
0
0
0
0
0
0
1
0.0625
false
0.0625
0.25
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
006d4b069c073fc8a7916d998a0ff677902b8203
105,769
py
Python
python/src/toit/model/device_pb2.py
toitware/ap
4b72d7ed43efe6b7e79bee1bfb5a9fc81fa16edb
[ "MIT" ]
7
2020-03-20T14:10:53.000Z
2021-11-28T04:05:24.000Z
python/src/toit/model/device_pb2.py
toitware/ap
4b72d7ed43efe6b7e79bee1bfb5a9fc81fa16edb
[ "MIT" ]
9
2020-03-19T06:54:17.000Z
2022-03-17T05:07:00.000Z
python/src/toit/model/device_pb2.py
toitware/ap
4b72d7ed43efe6b7e79bee1bfb5a9fc81fa16edb
[ "MIT" ]
1
2021-08-15T16:31:07.000Z
2021-08-15T16:31:07.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: toit/model/device.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from toit.model import data_pb2 as toit_dot_model_dot_data__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='toit/model/device.proto', package='toit.model', syntax='proto3', serialized_options=b'\n\030io.toit.proto.toit.modelB\013DeviceProtoZ&github.com/toitware/api.git/toit/model', create_key=_descriptor._internal_create_key, serialized_pb=b'\n\x17toit/model/device.proto\x12\ntoit.model\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x15toit/model/data.proto\"\xf0\x02\n\x0c\x44\x65viceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\rstarted_after\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0b\n\x03sdk\x18\x03 \x01(\t\x12\x30\n\x06\x62roker\x18\x04 \x01(\x0b\x32 .toit.model.DeviceBrokerSettings\x12\x38\n\nconnection\x18\x05 \x01(\x0b\x32$.toit.model.DeviceConnectionSettings\x12\r\n\x05model\x18\x06 \x01(\t\x12\x31\n\rfactory_after\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x07runtime\x18\x08 \x01(\x0b\x32!.toit.model.DeviceRuntimeSettings\x12\x30\n\x07modules\x18\t \x01(\x0b\x32\x1f.toit.model.DeviceModulesConfig\"u\n\x13\x44\x65viceModulesConfig\x12\x32\n\x0esync_requested\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07modules\x18\x02 \x01(\x0b\x32\x19.toit.model.DeviceModules\"s\n\x15\x44\x65viceRuntimeSettings\x12,\n\x07logging\x18\x01 \x01(\x0b\x32\x1b.toit.model.LoggingSettings\x12,\n\x07metrics\x18\x02 \x01(\x0b\x32\x1b.toit.model.MetricsSettings\";\n\x0fLoggingSettings\x12(\n\x05level\x18\x01 \x01(\x0e\x32\x19.toit.model.LogData.Level\"?\n\x0fMetricsSettings\x12,\n\x05level\x18\x01 \x01(\x0e\x32\x1d.toit.model.MetricsData.Level\"\x9d\x01\n\x18\x44\x65viceConnectionSettings\x12.\n\x0bmax_offline\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0b\x63onnections\x18\x02 \x03(\x0b\x32\x1d.toit.model.ConnectionSetting\x12\x1d\n\x15\x65vent_queue_threshold\x18\x03 \x01(\r\"c\n\x11\x43onnectionSetting\x12%\n\x04wifi\x18\x01 \x01(\x0b\x32\x17.toit.model.WifiSetting\x12\'\n\x05nbiot\x18\x02 \x01(\x0b\x32\x18.toit.model.NBIoTSetting\"-\n\x0bWifiSetting\x12\x0c\n\x04ssid\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"I\n\x0cNBIoTSetting\x12\x0b\n\x03\x61pn\x18\x01 \x01(\t\x12\r\n\x05\x62\x61nds\x18\x02 \x03(\x03\x12\x10\n\x08operator\x18\x03 \x01(\t\x12\x0b\n\x03pin\x18\x04 \x01(\t\"T\n\x14\x44\x65viceBrokerSettings\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x03\x12\n\n\x02\x63n\x18\x03 \x01(\t\x12\x14\n\x08protocol\x18\x04 \x01(\tB\x02\x18\x01\"\xaa\x03\n\x0c\x44\x65viceStatus\x12\x14\n\x08revision\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\r\n\x05\x65poch\x18\x06 \x01(\x0c\x12\x16\n\x0estate_revision\x18\x05 \x01(\x03\x12+\n\x07updated\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0f\x63onfig_revision\x18\x03 \x01(\x03\x12\x0b\n\x03sdk\x18\x04 \x01(\t\x12\r\n\x05model\x18\x07 \x01(\t\x12(\n\x06\x63onfig\x18\x08 \x01(\x0b\x32\x18.toit.model.DeviceConfig\x12\x11\n\tconnected\x18\t \x01(\x08\x12*\n\x04\x62oot\x18\n \x01(\x0b\x32\x1c.toit.model.DeviceBootStatus\x12(\n\x06health\x18\x0b \x01(\x0b\x32\x18.toit.model.DeviceHealth\x12\x36\n\nconnection\x18\x0c \x01(\x0b\x32\".toit.model.DeviceConnectionStatus\x12\x30\n\x07modules\x18\r \x01(\x0b\x32\x1f.toit.model.DeviceModulesStatus\"s\n\x13\x44\x65viceModulesStatus\x12\x30\n\x0clast_updated\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07modules\x18\x02 \x01(\x0b\x32\x19.toit.model.DeviceModules\";\n\rDeviceModules\x12*\n\x08\x63\x65llular\x18\x01 \x01(\x0b\x32\x18.toit.model.DeviceModule\".\n\x0c\x44\x65viceModule\x12\r\n\x05model\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"W\n\x16\x44\x65viceConnectionStatus\x12\r\n\x05index\x18\x01 \x01(\x03\x12.\n\x04type\x18\x02 \x01(\x0e\x32 .toit.model.DeviceConnectionType\"\x8c\x01\n\x10\x44\x65viceBootStatus\x12-\n\tlast_boot\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nin_factory\x18\x02 \x01(\x08\x12\x35\n\x11last_factory_boot\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfb\x04\n\x0c\x44\x65viceHealth\x12-\n\x05power\x18\x01 \x01(\x0b\x32\x1e.toit.model.DeviceHealth.Power\x12<\n\rbattery_curve\x18\x02 \x01(\x0b\x32%.toit.model.DeviceHealth.BatteryCurve\x12;\n\x0c\x63onnectivity\x18\x03 \x01(\x0b\x32%.toit.model.DeviceHealth.Connectivity\x1a\xc0\x01\n\x05Power\x12\x33\n\x05value\x18\x01 \x01(\x0b\x32$.toit.model.DeviceHealth.Power.Value\x12\x30\n\x0clast_updated\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aP\n\x05Value\x12\x11\n\x07\x62\x61ttery\x18\x01 \x01(\x01H\x00\x12+\n\tpluggedin\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x42\x07\n\x05power\x1aO\n\x0c\x42\x61tteryCurve\x12\r\n\x05slope\x18\x01 \x01(\x01\x12\x30\n\x0clast_updated\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xac\x01\n\x0c\x43onnectivity\x12-\n\tlast_seen\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tconnected\x18\x02 \x01(\x08\x12?\n\x08\x63heckins\x18\x03 \x03(\x0b\x32-.toit.model.DeviceHealth.Connectivity.Checkin\x1a\x19\n\x07\x43heckin\x12\x0e\n\x06missed\x18\x01 \x01(\x08\"y\n\x10HardwareIdentity\x12\x13\n\x0bhardware_id\x18\x01 \x01(\x0c\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x03\x12\r\n\x05\x62\x61tch\x18\x03 \x01(\t\x12\x13\n\x0bprivate_key\x18\x04 \x01(\x0c\x12\x13\n\x0b\x63\x65rtificate\x18\x05 \x01(\x0c\"\x85\x01\n\x14HardwareIdentityInfo\x12\x1b\n\x13\x66\x61\x63tory_sdk_version\x18\x01 \x01(\t\x12\x12\n\nflashed_by\x18\x02 \x01(\x0c\x12\r\n\x05iccid\x18\x03 \x01(\t\x12\x0f\n\x07\x63hip_id\x18\x04 \x01(\t\x12\x1c\n\x14\x66\x61\x63tory_device_model\x18\x05 \x01(\t\"S\n\x0cHardwareInfo\x12\x13\n\x0bhardware_id\x18\x01 \x01(\x0c\x12\x15\n\rhardware_fqdn\x18\x02 \x01(\t\x12\x17\n\x0forganization_id\x18\x04 \x01(\x0c\"\x96\x01\n\x14HardwareToDeviceInfo\x12\x13\n\x0bhardware_id\x18\x01 \x01(\x0c\x12\x11\n\tdevice_id\x18\x02 \x01(\x0c\x12)\n\x05\x62ound\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x07unbound\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd5\t\n\x0b\x44\x65viceEvent\x12\x11\n\tdevice_id\x18\x01 \x01(\x0c\x12\x10\n\x08\x65vent_id\x18\x02 \x01(\x0c\x12+\n\x07\x63reated\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x04type\x18\x04 \x01(\x0e\x32\x1c.toit.model.DeviceEvent.Type\x12\x0b\n\x03msg\x18\x05 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x06 \x01(\x0c\x12\x34\n\tinitiater\x18\x07 \x01(\x0b\x32!.toit.model.DeviceEvent.Initiater\x12\x31\n\x0binformation\x18\x08 \x03(\x0b\x32\x1c.toit.model.DeviceEvent.Info\x1a\x8b\x02\n\tInitiater\x12:\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32(.toit.model.DeviceEvent.Initiater.DeviceH\x00\x12<\n\x07\x63onsole\x18\x02 \x01(\x0b\x32).toit.model.DeviceEvent.Initiater.ConsoleH\x00\x12\x36\n\x04user\x18\x03 \x01(\x0b\x32&.toit.model.DeviceEvent.Initiater.UserH\x00\x1a\x1b\n\x06\x44\x65vice\x12\x11\n\tdevice_id\x18\x01 \x01(\x0c\x1a\t\n\x07\x43onsole\x1a\x17\n\x04User\x12\x0f\n\x07user_id\x18\x01 \x01(\x0c\x42\x0b\n\tinitiater\x1a\xaf\x04\n\x04Info\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".toit.model.DeviceEvent.Info.Value\x1a\xe6\x03\n\x05Value\x12\x41\n\tprimitive\x18\x01 \x01(\x0b\x32,.toit.model.DeviceEvent.Info.Value.PrimitiveH\x00\x12\x37\n\x04\x64iff\x18\x02 \x01(\x0b\x32\'.toit.model.DeviceEvent.Info.Value.DiffH\x00\x12\x39\n\x05\x65rror\x18\x03 \x01(\x0b\x32(.toit.model.DeviceEvent.Info.Value.ErrorH\x00\x1a\x86\x01\n\tPrimitive\x12?\n\x04type\x18\x01 \x01(\x0e\x32\x31.toit.model.DeviceEvent.Info.Value.Primitive.Type\x12\r\n\x05value\x18\x02 \x01(\x0c\")\n\x04Type\x12\x0b\n\x07INVALID\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\n\n\x06STRING\x10\x02\x1a|\n\x04\x44iff\x12:\n\x04\x66rom\x18\x01 \x01(\x0b\x32,.toit.model.DeviceEvent.Info.Value.Primitive\x12\x38\n\x02to\x18\x02 \x01(\x0b\x32,.toit.model.DeviceEvent.Info.Value.Primitive\x1a\x16\n\x05\x45rror\x12\r\n\x05\x65rror\x18\x01 \x01(\tB\x07\n\x05value\"\x83\x01\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rCONFIG_CHANGE\x10\x01\x12\x11\n\rSTATUS_CHANGE\x10\x02\x12\x0f\n\x0bNEXT_ACTION\x10\x03\x12\x11\n\rDEVICE_ACTION\x10\x04\x12\x12\n\x0eQUEUE_OVERFLOW\x10\x05\x12\x10\n\x0cREQUEST_FILE\x10\x06*\x9c\x01\n\x14\x44\x65viceConnectionType\x12\"\n\x1e\x44\x45VICE_CONNECTION_TYPE_UNKNOWN\x10\x00\x12\x1f\n\x1b\x44\x45VICE_CONNECTION_TYPE_WIFI\x10\x01\x12 \n\x1c\x44\x45VICE_CONNECTION_TYPE_NBIOT\x10\x02\x12\x1d\n\x19\x44\x45VICE_CONNECTION_TYPE_OS\x10\x03*\xda\x01\n\x10\x44\x65viceChangeType\x12\x19\n\x15\x44\x45VICE_CHANGE_UNKNOWN\x10\x00\x12\x17\n\x13\x44\x45VICE_CHANGE_ADDED\x10\x01\x12\x19\n\x15\x44\x45VICE_CHANGE_DELETED\x10\x02\x12\x19\n\x15\x44\x45VICE_CHANGE_CHANGED\x10\x03\x12\x1f\n\x17\x44\x45VICE_CHANGE_HEARTBEAT\x10\x04\x1a\x02\x08\x01\x12\x1b\n\x17\x44\x45VICE_CHANGE_CONNECTED\x10\x05\x12\x1e\n\x1a\x44\x45VICE_CHANGE_DISCONNECTED\x10\x06*L\n\x17\x44\x65viceSessionChangeType\x12\x10\n\x0cUNKNOWN_TYPE\x10\x00\x12\r\n\tCONNECTED\x10\x01\x12\x10\n\x0c\x44ISCONNECTED\x10\x02*\xb4\x03\n\x0c\x44\x65viceAction\x12\x19\n\x15\x44\x45VICE_ACTION_UNKNOWN\x10\x00\x12\x15\n\x11\x44\x45VICE_ACTION_NOP\x10\x01\x12\x18\n\x14\x44\x45VICE_ACTION_REBOOT\x10\x02\x12\x1b\n\x17\x44\x45VICE_ACTION_NEW_EPOCH\x10\x03\x12\x1f\n\x1b\x44\x45VICE_ACTION_REPORT_CONFIG\x10\x04\x12!\n\x1d\x44\x45VICE_ACTION_FACTORY_PROMOTE\x10\x05\x12\x1f\n\x1b\x44\x45VICE_ACTION_UPDATE_CONFIG\x10\x06\x12!\n\x1d\x44\x45VICE_ACTION_UPDATE_FIRMWARE\x10\x07\x12\x1f\n\x1b\x44\x45VICE_ACTION_FACTORY_RESET\x10\x08\x12\x1b\n\x17\x44\x45VICE_ACTION_RECONCILE\x10\t\x12)\n%DEVICE_ACTION_UPDATE_PARTIAL_FIRMWARE\x10\n\x12 \n\x1c\x44\x45VICE_ACTION_REPORT_MODULES\x10\x0b\x12(\n$DEVICE_ACTION_UPDATE_MODULE_CELLULAR\x10\x0c*-\n\x10\x44\x65viceModuleType\x12\x0b\n\x07Unknown\x10\x00\x12\x0c\n\x08\x43\x65llular\x10\x01\x42O\n\x18io.toit.proto.toit.modelB\x0b\x44\x65viceProtoZ&github.com/toitware/api.git/toit/modelb\x06proto3' , dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,toit_dot_model_dot_data__pb2.DESCRIPTOR,]) _DEVICECONNECTIONTYPE = _descriptor.EnumDescriptor( name='DeviceConnectionType', full_name='toit.model.DeviceConnectionType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='DEVICE_CONNECTION_TYPE_UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CONNECTION_TYPE_WIFI', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CONNECTION_TYPE_NBIOT', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CONNECTION_TYPE_OS', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4621, serialized_end=4777, ) _sym_db.RegisterEnumDescriptor(_DEVICECONNECTIONTYPE) DeviceConnectionType = enum_type_wrapper.EnumTypeWrapper(_DEVICECONNECTIONTYPE) _DEVICECHANGETYPE = _descriptor.EnumDescriptor( name='DeviceChangeType', full_name='toit.model.DeviceChangeType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_ADDED', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_DELETED', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_CHANGED', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_HEARTBEAT', index=4, number=4, serialized_options=b'\010\001', type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_CONNECTED', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_CHANGE_DISCONNECTED', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4780, serialized_end=4998, ) _sym_db.RegisterEnumDescriptor(_DEVICECHANGETYPE) DeviceChangeType = enum_type_wrapper.EnumTypeWrapper(_DEVICECHANGETYPE) _DEVICESESSIONCHANGETYPE = _descriptor.EnumDescriptor( name='DeviceSessionChangeType', full_name='toit.model.DeviceSessionChangeType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_TYPE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONNECTED', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DISCONNECTED', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=5000, serialized_end=5076, ) _sym_db.RegisterEnumDescriptor(_DEVICESESSIONCHANGETYPE) DeviceSessionChangeType = enum_type_wrapper.EnumTypeWrapper(_DEVICESESSIONCHANGETYPE) _DEVICEACTION = _descriptor.EnumDescriptor( name='DeviceAction', full_name='toit.model.DeviceAction', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_NOP', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_REBOOT', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_NEW_EPOCH', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_REPORT_CONFIG', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_FACTORY_PROMOTE', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_UPDATE_CONFIG', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_UPDATE_FIRMWARE', index=7, number=7, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_FACTORY_RESET', index=8, number=8, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_RECONCILE', index=9, number=9, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_UPDATE_PARTIAL_FIRMWARE', index=10, number=10, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_REPORT_MODULES', index=11, number=11, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION_UPDATE_MODULE_CELLULAR', index=12, number=12, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=5079, serialized_end=5515, ) _sym_db.RegisterEnumDescriptor(_DEVICEACTION) DeviceAction = enum_type_wrapper.EnumTypeWrapper(_DEVICEACTION) _DEVICEMODULETYPE = _descriptor.EnumDescriptor( name='DeviceModuleType', full_name='toit.model.DeviceModuleType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='Unknown', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='Cellular', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=5517, serialized_end=5562, ) _sym_db.RegisterEnumDescriptor(_DEVICEMODULETYPE) DeviceModuleType = enum_type_wrapper.EnumTypeWrapper(_DEVICEMODULETYPE) DEVICE_CONNECTION_TYPE_UNKNOWN = 0 DEVICE_CONNECTION_TYPE_WIFI = 1 DEVICE_CONNECTION_TYPE_NBIOT = 2 DEVICE_CONNECTION_TYPE_OS = 3 DEVICE_CHANGE_UNKNOWN = 0 DEVICE_CHANGE_ADDED = 1 DEVICE_CHANGE_DELETED = 2 DEVICE_CHANGE_CHANGED = 3 DEVICE_CHANGE_HEARTBEAT = 4 DEVICE_CHANGE_CONNECTED = 5 DEVICE_CHANGE_DISCONNECTED = 6 UNKNOWN_TYPE = 0 CONNECTED = 1 DISCONNECTED = 2 DEVICE_ACTION_UNKNOWN = 0 DEVICE_ACTION_NOP = 1 DEVICE_ACTION_REBOOT = 2 DEVICE_ACTION_NEW_EPOCH = 3 DEVICE_ACTION_REPORT_CONFIG = 4 DEVICE_ACTION_FACTORY_PROMOTE = 5 DEVICE_ACTION_UPDATE_CONFIG = 6 DEVICE_ACTION_UPDATE_FIRMWARE = 7 DEVICE_ACTION_FACTORY_RESET = 8 DEVICE_ACTION_RECONCILE = 9 DEVICE_ACTION_UPDATE_PARTIAL_FIRMWARE = 10 DEVICE_ACTION_REPORT_MODULES = 11 DEVICE_ACTION_UPDATE_MODULE_CELLULAR = 12 Unknown = 0 Cellular = 1 _DEVICEEVENT_INFO_VALUE_PRIMITIVE_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='toit.model.DeviceEvent.Info.Value.Primitive.Type', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='INVALID', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='JSON', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='STRING', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4284, serialized_end=4325, ) _sym_db.RegisterEnumDescriptor(_DEVICEEVENT_INFO_VALUE_PRIMITIVE_TYPE) _DEVICEEVENT_TYPE = _descriptor.EnumDescriptor( name='Type', full_name='toit.model.DeviceEvent.Type', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONFIG_CHANGE', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='STATUS_CHANGE', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NEXT_ACTION', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DEVICE_ACTION', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='QUEUE_OVERFLOW', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='REQUEST_FILE', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4487, serialized_end=4618, ) _sym_db.RegisterEnumDescriptor(_DEVICEEVENT_TYPE) _DEVICECONFIG = _descriptor.Descriptor( name='DeviceConfig', full_name='toit.model.DeviceConfig', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='toit.model.DeviceConfig.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='started_after', full_name='toit.model.DeviceConfig.started_after', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sdk', full_name='toit.model.DeviceConfig.sdk', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='broker', full_name='toit.model.DeviceConfig.broker', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connection', full_name='toit.model.DeviceConfig.connection', index=4, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='model', full_name='toit.model.DeviceConfig.model', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='factory_after', full_name='toit.model.DeviceConfig.factory_after', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='runtime', full_name='toit.model.DeviceConfig.runtime', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='modules', full_name='toit.model.DeviceConfig.modules', index=8, number=9, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=157, serialized_end=525, ) _DEVICEMODULESCONFIG = _descriptor.Descriptor( name='DeviceModulesConfig', full_name='toit.model.DeviceModulesConfig', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='sync_requested', full_name='toit.model.DeviceModulesConfig.sync_requested', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='modules', full_name='toit.model.DeviceModulesConfig.modules', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=527, serialized_end=644, ) _DEVICERUNTIMESETTINGS = _descriptor.Descriptor( name='DeviceRuntimeSettings', full_name='toit.model.DeviceRuntimeSettings', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='logging', full_name='toit.model.DeviceRuntimeSettings.logging', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='metrics', full_name='toit.model.DeviceRuntimeSettings.metrics', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=646, serialized_end=761, ) _LOGGINGSETTINGS = _descriptor.Descriptor( name='LoggingSettings', full_name='toit.model.LoggingSettings', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='level', full_name='toit.model.LoggingSettings.level', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=763, serialized_end=822, ) _METRICSSETTINGS = _descriptor.Descriptor( name='MetricsSettings', full_name='toit.model.MetricsSettings', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='level', full_name='toit.model.MetricsSettings.level', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=824, serialized_end=887, ) _DEVICECONNECTIONSETTINGS = _descriptor.Descriptor( name='DeviceConnectionSettings', full_name='toit.model.DeviceConnectionSettings', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='max_offline', full_name='toit.model.DeviceConnectionSettings.max_offline', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connections', full_name='toit.model.DeviceConnectionSettings.connections', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='event_queue_threshold', full_name='toit.model.DeviceConnectionSettings.event_queue_threshold', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=890, serialized_end=1047, ) _CONNECTIONSETTING = _descriptor.Descriptor( name='ConnectionSetting', full_name='toit.model.ConnectionSetting', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='wifi', full_name='toit.model.ConnectionSetting.wifi', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='nbiot', full_name='toit.model.ConnectionSetting.nbiot', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1049, serialized_end=1148, ) _WIFISETTING = _descriptor.Descriptor( name='WifiSetting', full_name='toit.model.WifiSetting', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='ssid', full_name='toit.model.WifiSetting.ssid', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='password', full_name='toit.model.WifiSetting.password', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1150, serialized_end=1195, ) _NBIOTSETTING = _descriptor.Descriptor( name='NBIoTSetting', full_name='toit.model.NBIoTSetting', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='apn', full_name='toit.model.NBIoTSetting.apn', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bands', full_name='toit.model.NBIoTSetting.bands', index=1, number=2, type=3, cpp_type=2, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='operator', full_name='toit.model.NBIoTSetting.operator', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pin', full_name='toit.model.NBIoTSetting.pin', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1197, serialized_end=1270, ) _DEVICEBROKERSETTINGS = _descriptor.Descriptor( name='DeviceBrokerSettings', full_name='toit.model.DeviceBrokerSettings', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='host', full_name='toit.model.DeviceBrokerSettings.host', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='port', full_name='toit.model.DeviceBrokerSettings.port', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='cn', full_name='toit.model.DeviceBrokerSettings.cn', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='protocol', full_name='toit.model.DeviceBrokerSettings.protocol', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1272, serialized_end=1356, ) _DEVICESTATUS = _descriptor.Descriptor( name='DeviceStatus', full_name='toit.model.DeviceStatus', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='revision', full_name='toit.model.DeviceStatus.revision', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='epoch', full_name='toit.model.DeviceStatus.epoch', index=1, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='state_revision', full_name='toit.model.DeviceStatus.state_revision', index=2, number=5, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='updated', full_name='toit.model.DeviceStatus.updated', index=3, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='config_revision', full_name='toit.model.DeviceStatus.config_revision', index=4, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sdk', full_name='toit.model.DeviceStatus.sdk', index=5, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='model', full_name='toit.model.DeviceStatus.model', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='config', full_name='toit.model.DeviceStatus.config', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connected', full_name='toit.model.DeviceStatus.connected', index=8, number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='boot', full_name='toit.model.DeviceStatus.boot', index=9, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='health', full_name='toit.model.DeviceStatus.health', index=10, number=11, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connection', full_name='toit.model.DeviceStatus.connection', index=11, number=12, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='modules', full_name='toit.model.DeviceStatus.modules', index=12, number=13, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1359, serialized_end=1785, ) _DEVICEMODULESSTATUS = _descriptor.Descriptor( name='DeviceModulesStatus', full_name='toit.model.DeviceModulesStatus', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='last_updated', full_name='toit.model.DeviceModulesStatus.last_updated', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='modules', full_name='toit.model.DeviceModulesStatus.modules', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1787, serialized_end=1902, ) _DEVICEMODULES = _descriptor.Descriptor( name='DeviceModules', full_name='toit.model.DeviceModules', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cellular', full_name='toit.model.DeviceModules.cellular', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1904, serialized_end=1963, ) _DEVICEMODULE = _descriptor.Descriptor( name='DeviceModule', full_name='toit.model.DeviceModule', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='model', full_name='toit.model.DeviceModule.model', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='version', full_name='toit.model.DeviceModule.version', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1965, serialized_end=2011, ) _DEVICECONNECTIONSTATUS = _descriptor.Descriptor( name='DeviceConnectionStatus', full_name='toit.model.DeviceConnectionStatus', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='index', full_name='toit.model.DeviceConnectionStatus.index', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='type', full_name='toit.model.DeviceConnectionStatus.type', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2013, serialized_end=2100, ) _DEVICEBOOTSTATUS = _descriptor.Descriptor( name='DeviceBootStatus', full_name='toit.model.DeviceBootStatus', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='last_boot', full_name='toit.model.DeviceBootStatus.last_boot', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='in_factory', full_name='toit.model.DeviceBootStatus.in_factory', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='last_factory_boot', full_name='toit.model.DeviceBootStatus.last_factory_boot', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2103, serialized_end=2243, ) _DEVICEHEALTH_POWER_VALUE = _descriptor.Descriptor( name='Value', full_name='toit.model.DeviceHealth.Power.Value', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='battery', full_name='toit.model.DeviceHealth.Power.Value.battery', index=0, number=1, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pluggedin', full_name='toit.model.DeviceHealth.Power.Value.pluggedin', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='power', full_name='toit.model.DeviceHealth.Power.Value.power', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=2545, serialized_end=2625, ) _DEVICEHEALTH_POWER = _descriptor.Descriptor( name='Power', full_name='toit.model.DeviceHealth.Power', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='value', full_name='toit.model.DeviceHealth.Power.value', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='last_updated', full_name='toit.model.DeviceHealth.Power.last_updated', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEHEALTH_POWER_VALUE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2433, serialized_end=2625, ) _DEVICEHEALTH_BATTERYCURVE = _descriptor.Descriptor( name='BatteryCurve', full_name='toit.model.DeviceHealth.BatteryCurve', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='slope', full_name='toit.model.DeviceHealth.BatteryCurve.slope', index=0, number=1, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='last_updated', full_name='toit.model.DeviceHealth.BatteryCurve.last_updated', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2627, serialized_end=2706, ) _DEVICEHEALTH_CONNECTIVITY_CHECKIN = _descriptor.Descriptor( name='Checkin', full_name='toit.model.DeviceHealth.Connectivity.Checkin', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='missed', full_name='toit.model.DeviceHealth.Connectivity.Checkin.missed', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2856, serialized_end=2881, ) _DEVICEHEALTH_CONNECTIVITY = _descriptor.Descriptor( name='Connectivity', full_name='toit.model.DeviceHealth.Connectivity', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='last_seen', full_name='toit.model.DeviceHealth.Connectivity.last_seen', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connected', full_name='toit.model.DeviceHealth.Connectivity.connected', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='checkins', full_name='toit.model.DeviceHealth.Connectivity.checkins', index=2, number=3, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEHEALTH_CONNECTIVITY_CHECKIN, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2709, serialized_end=2881, ) _DEVICEHEALTH = _descriptor.Descriptor( name='DeviceHealth', full_name='toit.model.DeviceHealth', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='power', full_name='toit.model.DeviceHealth.power', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='battery_curve', full_name='toit.model.DeviceHealth.battery_curve', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connectivity', full_name='toit.model.DeviceHealth.connectivity', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEHEALTH_POWER, _DEVICEHEALTH_BATTERYCURVE, _DEVICEHEALTH_CONNECTIVITY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2246, serialized_end=2881, ) _HARDWAREIDENTITY = _descriptor.Descriptor( name='HardwareIdentity', full_name='toit.model.HardwareIdentity', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='hardware_id', full_name='toit.model.HardwareIdentity.hardware_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sequence_number', full_name='toit.model.HardwareIdentity.sequence_number', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='batch', full_name='toit.model.HardwareIdentity.batch', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='private_key', full_name='toit.model.HardwareIdentity.private_key', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='certificate', full_name='toit.model.HardwareIdentity.certificate', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2883, serialized_end=3004, ) _HARDWAREIDENTITYINFO = _descriptor.Descriptor( name='HardwareIdentityInfo', full_name='toit.model.HardwareIdentityInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='factory_sdk_version', full_name='toit.model.HardwareIdentityInfo.factory_sdk_version', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='flashed_by', full_name='toit.model.HardwareIdentityInfo.flashed_by', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='iccid', full_name='toit.model.HardwareIdentityInfo.iccid', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='chip_id', full_name='toit.model.HardwareIdentityInfo.chip_id', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='factory_device_model', full_name='toit.model.HardwareIdentityInfo.factory_device_model', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3007, serialized_end=3140, ) _HARDWAREINFO = _descriptor.Descriptor( name='HardwareInfo', full_name='toit.model.HardwareInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='hardware_id', full_name='toit.model.HardwareInfo.hardware_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hardware_fqdn', full_name='toit.model.HardwareInfo.hardware_fqdn', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='organization_id', full_name='toit.model.HardwareInfo.organization_id', index=2, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3142, serialized_end=3225, ) _HARDWARETODEVICEINFO = _descriptor.Descriptor( name='HardwareToDeviceInfo', full_name='toit.model.HardwareToDeviceInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='hardware_id', full_name='toit.model.HardwareToDeviceInfo.hardware_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='device_id', full_name='toit.model.HardwareToDeviceInfo.device_id', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bound', full_name='toit.model.HardwareToDeviceInfo.bound', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='unbound', full_name='toit.model.HardwareToDeviceInfo.unbound', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3228, serialized_end=3378, ) _DEVICEEVENT_INITIATER_DEVICE = _descriptor.Descriptor( name='Device', full_name='toit.model.DeviceEvent.Initiater.Device', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='device_id', full_name='toit.model.DeviceEvent.Initiater.Device.device_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3846, serialized_end=3873, ) _DEVICEEVENT_INITIATER_CONSOLE = _descriptor.Descriptor( name='Console', full_name='toit.model.DeviceEvent.Initiater.Console', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3875, serialized_end=3884, ) _DEVICEEVENT_INITIATER_USER = _descriptor.Descriptor( name='User', full_name='toit.model.DeviceEvent.Initiater.User', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='user_id', full_name='toit.model.DeviceEvent.Initiater.User.user_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3886, serialized_end=3909, ) _DEVICEEVENT_INITIATER = _descriptor.Descriptor( name='Initiater', full_name='toit.model.DeviceEvent.Initiater', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='device', full_name='toit.model.DeviceEvent.Initiater.device', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='console', full_name='toit.model.DeviceEvent.Initiater.console', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='toit.model.DeviceEvent.Initiater.user', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEEVENT_INITIATER_DEVICE, _DEVICEEVENT_INITIATER_CONSOLE, _DEVICEEVENT_INITIATER_USER, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='initiater', full_name='toit.model.DeviceEvent.Initiater.initiater', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=3655, serialized_end=3922, ) _DEVICEEVENT_INFO_VALUE_PRIMITIVE = _descriptor.Descriptor( name='Primitive', full_name='toit.model.DeviceEvent.Info.Value.Primitive', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='type', full_name='toit.model.DeviceEvent.Info.Value.Primitive.type', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='value', full_name='toit.model.DeviceEvent.Info.Value.Primitive.value', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _DEVICEEVENT_INFO_VALUE_PRIMITIVE_TYPE, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4191, serialized_end=4325, ) _DEVICEEVENT_INFO_VALUE_DIFF = _descriptor.Descriptor( name='Diff', full_name='toit.model.DeviceEvent.Info.Value.Diff', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='from', full_name='toit.model.DeviceEvent.Info.Value.Diff.from', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='to', full_name='toit.model.DeviceEvent.Info.Value.Diff.to', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4327, serialized_end=4451, ) _DEVICEEVENT_INFO_VALUE_ERROR = _descriptor.Descriptor( name='Error', full_name='toit.model.DeviceEvent.Info.Value.Error', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='error', full_name='toit.model.DeviceEvent.Info.Value.Error.error', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4453, serialized_end=4475, ) _DEVICEEVENT_INFO_VALUE = _descriptor.Descriptor( name='Value', full_name='toit.model.DeviceEvent.Info.Value', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='primitive', full_name='toit.model.DeviceEvent.Info.Value.primitive', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='diff', full_name='toit.model.DeviceEvent.Info.Value.diff', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='error', full_name='toit.model.DeviceEvent.Info.Value.error', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEEVENT_INFO_VALUE_PRIMITIVE, _DEVICEEVENT_INFO_VALUE_DIFF, _DEVICEEVENT_INFO_VALUE_ERROR, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='value', full_name='toit.model.DeviceEvent.Info.Value.value', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=3998, serialized_end=4484, ) _DEVICEEVENT_INFO = _descriptor.Descriptor( name='Info', full_name='toit.model.DeviceEvent.Info', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='key', full_name='toit.model.DeviceEvent.Info.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='value', full_name='toit.model.DeviceEvent.Info.value', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEEVENT_INFO_VALUE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3925, serialized_end=4484, ) _DEVICEEVENT = _descriptor.Descriptor( name='DeviceEvent', full_name='toit.model.DeviceEvent', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='device_id', full_name='toit.model.DeviceEvent.device_id', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='event_id', full_name='toit.model.DeviceEvent.event_id', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='created', full_name='toit.model.DeviceEvent.created', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='type', full_name='toit.model.DeviceEvent.type', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msg', full_name='toit.model.DeviceEvent.msg', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='data', full_name='toit.model.DeviceEvent.data', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='initiater', full_name='toit.model.DeviceEvent.initiater', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='information', full_name='toit.model.DeviceEvent.information', index=7, number=8, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_DEVICEEVENT_INITIATER, _DEVICEEVENT_INFO, ], enum_types=[ _DEVICEEVENT_TYPE, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3381, serialized_end=4618, ) _DEVICECONFIG.fields_by_name['started_after'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICECONFIG.fields_by_name['broker'].message_type = _DEVICEBROKERSETTINGS _DEVICECONFIG.fields_by_name['connection'].message_type = _DEVICECONNECTIONSETTINGS _DEVICECONFIG.fields_by_name['factory_after'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICECONFIG.fields_by_name['runtime'].message_type = _DEVICERUNTIMESETTINGS _DEVICECONFIG.fields_by_name['modules'].message_type = _DEVICEMODULESCONFIG _DEVICEMODULESCONFIG.fields_by_name['sync_requested'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEMODULESCONFIG.fields_by_name['modules'].message_type = _DEVICEMODULES _DEVICERUNTIMESETTINGS.fields_by_name['logging'].message_type = _LOGGINGSETTINGS _DEVICERUNTIMESETTINGS.fields_by_name['metrics'].message_type = _METRICSSETTINGS _LOGGINGSETTINGS.fields_by_name['level'].enum_type = toit_dot_model_dot_data__pb2._LOGDATA_LEVEL _METRICSSETTINGS.fields_by_name['level'].enum_type = toit_dot_model_dot_data__pb2._METRICSDATA_LEVEL _DEVICECONNECTIONSETTINGS.fields_by_name['max_offline'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _DEVICECONNECTIONSETTINGS.fields_by_name['connections'].message_type = _CONNECTIONSETTING _CONNECTIONSETTING.fields_by_name['wifi'].message_type = _WIFISETTING _CONNECTIONSETTING.fields_by_name['nbiot'].message_type = _NBIOTSETTING _DEVICESTATUS.fields_by_name['updated'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICESTATUS.fields_by_name['config'].message_type = _DEVICECONFIG _DEVICESTATUS.fields_by_name['boot'].message_type = _DEVICEBOOTSTATUS _DEVICESTATUS.fields_by_name['health'].message_type = _DEVICEHEALTH _DEVICESTATUS.fields_by_name['connection'].message_type = _DEVICECONNECTIONSTATUS _DEVICESTATUS.fields_by_name['modules'].message_type = _DEVICEMODULESSTATUS _DEVICEMODULESSTATUS.fields_by_name['last_updated'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEMODULESSTATUS.fields_by_name['modules'].message_type = _DEVICEMODULES _DEVICEMODULES.fields_by_name['cellular'].message_type = _DEVICEMODULE _DEVICECONNECTIONSTATUS.fields_by_name['type'].enum_type = _DEVICECONNECTIONTYPE _DEVICEBOOTSTATUS.fields_by_name['last_boot'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEBOOTSTATUS.fields_by_name['last_factory_boot'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEHEALTH_POWER_VALUE.fields_by_name['pluggedin'].message_type = google_dot_protobuf_dot_empty__pb2._EMPTY _DEVICEHEALTH_POWER_VALUE.containing_type = _DEVICEHEALTH_POWER _DEVICEHEALTH_POWER_VALUE.oneofs_by_name['power'].fields.append( _DEVICEHEALTH_POWER_VALUE.fields_by_name['battery']) _DEVICEHEALTH_POWER_VALUE.fields_by_name['battery'].containing_oneof = _DEVICEHEALTH_POWER_VALUE.oneofs_by_name['power'] _DEVICEHEALTH_POWER_VALUE.oneofs_by_name['power'].fields.append( _DEVICEHEALTH_POWER_VALUE.fields_by_name['pluggedin']) _DEVICEHEALTH_POWER_VALUE.fields_by_name['pluggedin'].containing_oneof = _DEVICEHEALTH_POWER_VALUE.oneofs_by_name['power'] _DEVICEHEALTH_POWER.fields_by_name['value'].message_type = _DEVICEHEALTH_POWER_VALUE _DEVICEHEALTH_POWER.fields_by_name['last_updated'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEHEALTH_POWER.containing_type = _DEVICEHEALTH _DEVICEHEALTH_BATTERYCURVE.fields_by_name['last_updated'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEHEALTH_BATTERYCURVE.containing_type = _DEVICEHEALTH _DEVICEHEALTH_CONNECTIVITY_CHECKIN.containing_type = _DEVICEHEALTH_CONNECTIVITY _DEVICEHEALTH_CONNECTIVITY.fields_by_name['last_seen'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEHEALTH_CONNECTIVITY.fields_by_name['checkins'].message_type = _DEVICEHEALTH_CONNECTIVITY_CHECKIN _DEVICEHEALTH_CONNECTIVITY.containing_type = _DEVICEHEALTH _DEVICEHEALTH.fields_by_name['power'].message_type = _DEVICEHEALTH_POWER _DEVICEHEALTH.fields_by_name['battery_curve'].message_type = _DEVICEHEALTH_BATTERYCURVE _DEVICEHEALTH.fields_by_name['connectivity'].message_type = _DEVICEHEALTH_CONNECTIVITY _HARDWARETODEVICEINFO.fields_by_name['bound'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _HARDWARETODEVICEINFO.fields_by_name['unbound'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEEVENT_INITIATER_DEVICE.containing_type = _DEVICEEVENT_INITIATER _DEVICEEVENT_INITIATER_CONSOLE.containing_type = _DEVICEEVENT_INITIATER _DEVICEEVENT_INITIATER_USER.containing_type = _DEVICEEVENT_INITIATER _DEVICEEVENT_INITIATER.fields_by_name['device'].message_type = _DEVICEEVENT_INITIATER_DEVICE _DEVICEEVENT_INITIATER.fields_by_name['console'].message_type = _DEVICEEVENT_INITIATER_CONSOLE _DEVICEEVENT_INITIATER.fields_by_name['user'].message_type = _DEVICEEVENT_INITIATER_USER _DEVICEEVENT_INITIATER.containing_type = _DEVICEEVENT _DEVICEEVENT_INITIATER.oneofs_by_name['initiater'].fields.append( _DEVICEEVENT_INITIATER.fields_by_name['device']) _DEVICEEVENT_INITIATER.fields_by_name['device'].containing_oneof = _DEVICEEVENT_INITIATER.oneofs_by_name['initiater'] _DEVICEEVENT_INITIATER.oneofs_by_name['initiater'].fields.append( _DEVICEEVENT_INITIATER.fields_by_name['console']) _DEVICEEVENT_INITIATER.fields_by_name['console'].containing_oneof = _DEVICEEVENT_INITIATER.oneofs_by_name['initiater'] _DEVICEEVENT_INITIATER.oneofs_by_name['initiater'].fields.append( _DEVICEEVENT_INITIATER.fields_by_name['user']) _DEVICEEVENT_INITIATER.fields_by_name['user'].containing_oneof = _DEVICEEVENT_INITIATER.oneofs_by_name['initiater'] _DEVICEEVENT_INFO_VALUE_PRIMITIVE.fields_by_name['type'].enum_type = _DEVICEEVENT_INFO_VALUE_PRIMITIVE_TYPE _DEVICEEVENT_INFO_VALUE_PRIMITIVE.containing_type = _DEVICEEVENT_INFO_VALUE _DEVICEEVENT_INFO_VALUE_PRIMITIVE_TYPE.containing_type = _DEVICEEVENT_INFO_VALUE_PRIMITIVE _DEVICEEVENT_INFO_VALUE_DIFF.fields_by_name['from'].message_type = _DEVICEEVENT_INFO_VALUE_PRIMITIVE _DEVICEEVENT_INFO_VALUE_DIFF.fields_by_name['to'].message_type = _DEVICEEVENT_INFO_VALUE_PRIMITIVE _DEVICEEVENT_INFO_VALUE_DIFF.containing_type = _DEVICEEVENT_INFO_VALUE _DEVICEEVENT_INFO_VALUE_ERROR.containing_type = _DEVICEEVENT_INFO_VALUE _DEVICEEVENT_INFO_VALUE.fields_by_name['primitive'].message_type = _DEVICEEVENT_INFO_VALUE_PRIMITIVE _DEVICEEVENT_INFO_VALUE.fields_by_name['diff'].message_type = _DEVICEEVENT_INFO_VALUE_DIFF _DEVICEEVENT_INFO_VALUE.fields_by_name['error'].message_type = _DEVICEEVENT_INFO_VALUE_ERROR _DEVICEEVENT_INFO_VALUE.containing_type = _DEVICEEVENT_INFO _DEVICEEVENT_INFO_VALUE.oneofs_by_name['value'].fields.append( _DEVICEEVENT_INFO_VALUE.fields_by_name['primitive']) _DEVICEEVENT_INFO_VALUE.fields_by_name['primitive'].containing_oneof = _DEVICEEVENT_INFO_VALUE.oneofs_by_name['value'] _DEVICEEVENT_INFO_VALUE.oneofs_by_name['value'].fields.append( _DEVICEEVENT_INFO_VALUE.fields_by_name['diff']) _DEVICEEVENT_INFO_VALUE.fields_by_name['diff'].containing_oneof = _DEVICEEVENT_INFO_VALUE.oneofs_by_name['value'] _DEVICEEVENT_INFO_VALUE.oneofs_by_name['value'].fields.append( _DEVICEEVENT_INFO_VALUE.fields_by_name['error']) _DEVICEEVENT_INFO_VALUE.fields_by_name['error'].containing_oneof = _DEVICEEVENT_INFO_VALUE.oneofs_by_name['value'] _DEVICEEVENT_INFO.fields_by_name['value'].message_type = _DEVICEEVENT_INFO_VALUE _DEVICEEVENT_INFO.containing_type = _DEVICEEVENT _DEVICEEVENT.fields_by_name['created'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _DEVICEEVENT.fields_by_name['type'].enum_type = _DEVICEEVENT_TYPE _DEVICEEVENT.fields_by_name['initiater'].message_type = _DEVICEEVENT_INITIATER _DEVICEEVENT.fields_by_name['information'].message_type = _DEVICEEVENT_INFO _DEVICEEVENT_TYPE.containing_type = _DEVICEEVENT DESCRIPTOR.message_types_by_name['DeviceConfig'] = _DEVICECONFIG DESCRIPTOR.message_types_by_name['DeviceModulesConfig'] = _DEVICEMODULESCONFIG DESCRIPTOR.message_types_by_name['DeviceRuntimeSettings'] = _DEVICERUNTIMESETTINGS DESCRIPTOR.message_types_by_name['LoggingSettings'] = _LOGGINGSETTINGS DESCRIPTOR.message_types_by_name['MetricsSettings'] = _METRICSSETTINGS DESCRIPTOR.message_types_by_name['DeviceConnectionSettings'] = _DEVICECONNECTIONSETTINGS DESCRIPTOR.message_types_by_name['ConnectionSetting'] = _CONNECTIONSETTING DESCRIPTOR.message_types_by_name['WifiSetting'] = _WIFISETTING DESCRIPTOR.message_types_by_name['NBIoTSetting'] = _NBIOTSETTING DESCRIPTOR.message_types_by_name['DeviceBrokerSettings'] = _DEVICEBROKERSETTINGS DESCRIPTOR.message_types_by_name['DeviceStatus'] = _DEVICESTATUS DESCRIPTOR.message_types_by_name['DeviceModulesStatus'] = _DEVICEMODULESSTATUS DESCRIPTOR.message_types_by_name['DeviceModules'] = _DEVICEMODULES DESCRIPTOR.message_types_by_name['DeviceModule'] = _DEVICEMODULE DESCRIPTOR.message_types_by_name['DeviceConnectionStatus'] = _DEVICECONNECTIONSTATUS DESCRIPTOR.message_types_by_name['DeviceBootStatus'] = _DEVICEBOOTSTATUS DESCRIPTOR.message_types_by_name['DeviceHealth'] = _DEVICEHEALTH DESCRIPTOR.message_types_by_name['HardwareIdentity'] = _HARDWAREIDENTITY DESCRIPTOR.message_types_by_name['HardwareIdentityInfo'] = _HARDWAREIDENTITYINFO DESCRIPTOR.message_types_by_name['HardwareInfo'] = _HARDWAREINFO DESCRIPTOR.message_types_by_name['HardwareToDeviceInfo'] = _HARDWARETODEVICEINFO DESCRIPTOR.message_types_by_name['DeviceEvent'] = _DEVICEEVENT DESCRIPTOR.enum_types_by_name['DeviceConnectionType'] = _DEVICECONNECTIONTYPE DESCRIPTOR.enum_types_by_name['DeviceChangeType'] = _DEVICECHANGETYPE DESCRIPTOR.enum_types_by_name['DeviceSessionChangeType'] = _DEVICESESSIONCHANGETYPE DESCRIPTOR.enum_types_by_name['DeviceAction'] = _DEVICEACTION DESCRIPTOR.enum_types_by_name['DeviceModuleType'] = _DEVICEMODULETYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) DeviceConfig = _reflection.GeneratedProtocolMessageType('DeviceConfig', (_message.Message,), { 'DESCRIPTOR' : _DEVICECONFIG, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceConfig) }) _sym_db.RegisterMessage(DeviceConfig) DeviceModulesConfig = _reflection.GeneratedProtocolMessageType('DeviceModulesConfig', (_message.Message,), { 'DESCRIPTOR' : _DEVICEMODULESCONFIG, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceModulesConfig) }) _sym_db.RegisterMessage(DeviceModulesConfig) DeviceRuntimeSettings = _reflection.GeneratedProtocolMessageType('DeviceRuntimeSettings', (_message.Message,), { 'DESCRIPTOR' : _DEVICERUNTIMESETTINGS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceRuntimeSettings) }) _sym_db.RegisterMessage(DeviceRuntimeSettings) LoggingSettings = _reflection.GeneratedProtocolMessageType('LoggingSettings', (_message.Message,), { 'DESCRIPTOR' : _LOGGINGSETTINGS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.LoggingSettings) }) _sym_db.RegisterMessage(LoggingSettings) MetricsSettings = _reflection.GeneratedProtocolMessageType('MetricsSettings', (_message.Message,), { 'DESCRIPTOR' : _METRICSSETTINGS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.MetricsSettings) }) _sym_db.RegisterMessage(MetricsSettings) DeviceConnectionSettings = _reflection.GeneratedProtocolMessageType('DeviceConnectionSettings', (_message.Message,), { 'DESCRIPTOR' : _DEVICECONNECTIONSETTINGS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceConnectionSettings) }) _sym_db.RegisterMessage(DeviceConnectionSettings) ConnectionSetting = _reflection.GeneratedProtocolMessageType('ConnectionSetting', (_message.Message,), { 'DESCRIPTOR' : _CONNECTIONSETTING, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.ConnectionSetting) }) _sym_db.RegisterMessage(ConnectionSetting) WifiSetting = _reflection.GeneratedProtocolMessageType('WifiSetting', (_message.Message,), { 'DESCRIPTOR' : _WIFISETTING, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.WifiSetting) }) _sym_db.RegisterMessage(WifiSetting) NBIoTSetting = _reflection.GeneratedProtocolMessageType('NBIoTSetting', (_message.Message,), { 'DESCRIPTOR' : _NBIOTSETTING, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.NBIoTSetting) }) _sym_db.RegisterMessage(NBIoTSetting) DeviceBrokerSettings = _reflection.GeneratedProtocolMessageType('DeviceBrokerSettings', (_message.Message,), { 'DESCRIPTOR' : _DEVICEBROKERSETTINGS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceBrokerSettings) }) _sym_db.RegisterMessage(DeviceBrokerSettings) DeviceStatus = _reflection.GeneratedProtocolMessageType('DeviceStatus', (_message.Message,), { 'DESCRIPTOR' : _DEVICESTATUS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceStatus) }) _sym_db.RegisterMessage(DeviceStatus) DeviceModulesStatus = _reflection.GeneratedProtocolMessageType('DeviceModulesStatus', (_message.Message,), { 'DESCRIPTOR' : _DEVICEMODULESSTATUS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceModulesStatus) }) _sym_db.RegisterMessage(DeviceModulesStatus) DeviceModules = _reflection.GeneratedProtocolMessageType('DeviceModules', (_message.Message,), { 'DESCRIPTOR' : _DEVICEMODULES, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceModules) }) _sym_db.RegisterMessage(DeviceModules) DeviceModule = _reflection.GeneratedProtocolMessageType('DeviceModule', (_message.Message,), { 'DESCRIPTOR' : _DEVICEMODULE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceModule) }) _sym_db.RegisterMessage(DeviceModule) DeviceConnectionStatus = _reflection.GeneratedProtocolMessageType('DeviceConnectionStatus', (_message.Message,), { 'DESCRIPTOR' : _DEVICECONNECTIONSTATUS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceConnectionStatus) }) _sym_db.RegisterMessage(DeviceConnectionStatus) DeviceBootStatus = _reflection.GeneratedProtocolMessageType('DeviceBootStatus', (_message.Message,), { 'DESCRIPTOR' : _DEVICEBOOTSTATUS, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceBootStatus) }) _sym_db.RegisterMessage(DeviceBootStatus) DeviceHealth = _reflection.GeneratedProtocolMessageType('DeviceHealth', (_message.Message,), { 'Power' : _reflection.GeneratedProtocolMessageType('Power', (_message.Message,), { 'Value' : _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), { 'DESCRIPTOR' : _DEVICEHEALTH_POWER_VALUE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceHealth.Power.Value) }) , 'DESCRIPTOR' : _DEVICEHEALTH_POWER, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceHealth.Power) }) , 'BatteryCurve' : _reflection.GeneratedProtocolMessageType('BatteryCurve', (_message.Message,), { 'DESCRIPTOR' : _DEVICEHEALTH_BATTERYCURVE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceHealth.BatteryCurve) }) , 'Connectivity' : _reflection.GeneratedProtocolMessageType('Connectivity', (_message.Message,), { 'Checkin' : _reflection.GeneratedProtocolMessageType('Checkin', (_message.Message,), { 'DESCRIPTOR' : _DEVICEHEALTH_CONNECTIVITY_CHECKIN, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceHealth.Connectivity.Checkin) }) , 'DESCRIPTOR' : _DEVICEHEALTH_CONNECTIVITY, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceHealth.Connectivity) }) , 'DESCRIPTOR' : _DEVICEHEALTH, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceHealth) }) _sym_db.RegisterMessage(DeviceHealth) _sym_db.RegisterMessage(DeviceHealth.Power) _sym_db.RegisterMessage(DeviceHealth.Power.Value) _sym_db.RegisterMessage(DeviceHealth.BatteryCurve) _sym_db.RegisterMessage(DeviceHealth.Connectivity) _sym_db.RegisterMessage(DeviceHealth.Connectivity.Checkin) HardwareIdentity = _reflection.GeneratedProtocolMessageType('HardwareIdentity', (_message.Message,), { 'DESCRIPTOR' : _HARDWAREIDENTITY, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.HardwareIdentity) }) _sym_db.RegisterMessage(HardwareIdentity) HardwareIdentityInfo = _reflection.GeneratedProtocolMessageType('HardwareIdentityInfo', (_message.Message,), { 'DESCRIPTOR' : _HARDWAREIDENTITYINFO, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.HardwareIdentityInfo) }) _sym_db.RegisterMessage(HardwareIdentityInfo) HardwareInfo = _reflection.GeneratedProtocolMessageType('HardwareInfo', (_message.Message,), { 'DESCRIPTOR' : _HARDWAREINFO, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.HardwareInfo) }) _sym_db.RegisterMessage(HardwareInfo) HardwareToDeviceInfo = _reflection.GeneratedProtocolMessageType('HardwareToDeviceInfo', (_message.Message,), { 'DESCRIPTOR' : _HARDWARETODEVICEINFO, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.HardwareToDeviceInfo) }) _sym_db.RegisterMessage(HardwareToDeviceInfo) DeviceEvent = _reflection.GeneratedProtocolMessageType('DeviceEvent', (_message.Message,), { 'Initiater' : _reflection.GeneratedProtocolMessageType('Initiater', (_message.Message,), { 'Device' : _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), { 'DESCRIPTOR' : _DEVICEEVENT_INITIATER_DEVICE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Initiater.Device) }) , 'Console' : _reflection.GeneratedProtocolMessageType('Console', (_message.Message,), { 'DESCRIPTOR' : _DEVICEEVENT_INITIATER_CONSOLE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Initiater.Console) }) , 'User' : _reflection.GeneratedProtocolMessageType('User', (_message.Message,), { 'DESCRIPTOR' : _DEVICEEVENT_INITIATER_USER, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Initiater.User) }) , 'DESCRIPTOR' : _DEVICEEVENT_INITIATER, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Initiater) }) , 'Info' : _reflection.GeneratedProtocolMessageType('Info', (_message.Message,), { 'Value' : _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), { 'Primitive' : _reflection.GeneratedProtocolMessageType('Primitive', (_message.Message,), { 'DESCRIPTOR' : _DEVICEEVENT_INFO_VALUE_PRIMITIVE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Info.Value.Primitive) }) , 'Diff' : _reflection.GeneratedProtocolMessageType('Diff', (_message.Message,), { 'DESCRIPTOR' : _DEVICEEVENT_INFO_VALUE_DIFF, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Info.Value.Diff) }) , 'Error' : _reflection.GeneratedProtocolMessageType('Error', (_message.Message,), { 'DESCRIPTOR' : _DEVICEEVENT_INFO_VALUE_ERROR, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Info.Value.Error) }) , 'DESCRIPTOR' : _DEVICEEVENT_INFO_VALUE, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Info.Value) }) , 'DESCRIPTOR' : _DEVICEEVENT_INFO, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent.Info) }) , 'DESCRIPTOR' : _DEVICEEVENT, '__module__' : 'toit.model.device_pb2' # @@protoc_insertion_point(class_scope:toit.model.DeviceEvent) }) _sym_db.RegisterMessage(DeviceEvent) _sym_db.RegisterMessage(DeviceEvent.Initiater) _sym_db.RegisterMessage(DeviceEvent.Initiater.Device) _sym_db.RegisterMessage(DeviceEvent.Initiater.Console) _sym_db.RegisterMessage(DeviceEvent.Initiater.User) _sym_db.RegisterMessage(DeviceEvent.Info) _sym_db.RegisterMessage(DeviceEvent.Info.Value) _sym_db.RegisterMessage(DeviceEvent.Info.Value.Primitive) _sym_db.RegisterMessage(DeviceEvent.Info.Value.Diff) _sym_db.RegisterMessage(DeviceEvent.Info.Value.Error) DESCRIPTOR._options = None _DEVICECHANGETYPE.values_by_name["DEVICE_CHANGE_HEARTBEAT"]._options = None _DEVICEBROKERSETTINGS.fields_by_name['protocol']._options = None _DEVICESTATUS.fields_by_name['revision']._options = None # @@protoc_insertion_point(module_scope)
43.960515
9,518
0.764695
13,116
105,769
5.817627
0.042696
0.042252
0.073456
0.067939
0.757981
0.686674
0.652784
0.633663
0.619535
0.607452
0
0.036646
0.116887
105,769
2,405
9,519
43.978794
0.78026
0.025726
0
0.68206
1
0.005329
0.152881
0.112639
0
0
0
0
0
1
0
false
0.000888
0.003996
0
0.003996
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0079f297c584e9b44763df6266d390de66486944
2,056
py
Python
snorkel/models/__init__.py
jmbanda/snorkelBioMed
db26600326d1ef34129d1c35d2d618b62be2dcf3
[ "Apache-2.0" ]
1
2017-01-20T07:02:02.000Z
2017-01-20T07:02:02.000Z
snorkel/models/__init__.py
jmbanda/snorkelBioMed
db26600326d1ef34129d1c35d2d618b62be2dcf3
[ "Apache-2.0" ]
1
2017-01-20T07:03:48.000Z
2017-01-20T07:09:24.000Z
snorkel/models/__init__.py
jmbanda/snorkelBioMed
db26600326d1ef34129d1c35d2d618b62be2dcf3
[ "Apache-2.0" ]
null
null
null
""" Subpackage for all built-in Snorkel data models. To ensure correct behavior, this subpackage should always be treated as a single module (with one exception described below). This rule means that all data models should be imported from this subpackage, not directly from individual submodules. For example, the correct way to import the Corpus class is .. code-block:: python from snorkel.models import Corpus The only exception is importing SnorkelBase or other classes in order to extend Snorkel's data models. To ensure that any additional data models are included in the storage backend, these must be imported and the extending subtypes defined before importing `snorkel.models`. For example, the correct way to define a new type of Context is: .. code-block:: python from snorkel.models.context import Context from sqlalchemy import Column, String, ForeignKey class NewType(Context): # Declares name for storage table __tablename__ = 'newtype' # Connects NewType records to generic Context records id = Column(String, ForeignKey('context.id', ondelete='CASCADE'), primary_key=True) # Polymorphism information for SQLAlchemy __mapper_args__ = { 'polymorphic_identity': 'newtype', } # Rest of class definition here # The entire storage schema, including NewType, can now be initialized with the following import import snorkel.models """ from .meta import SnorkelBase, SnorkelSession, snorkel_engine, snorkel_postgres from .context import Context, Document, Sentence, TemporarySpan, Span from .context import construct_stable_id, split_stable_id from .candidate import Candidate, candidate_subclass from .annotation import Feature, FeatureKey, Label, LabelKey, GoldLabel, GoldLabelKey, StableLabel, Prediction, PredictionKey from .parameter import Parameter # This call must be performed after all classes that extend SnorkelBase are # declared to ensure the storage schema is initialized SnorkelBase.metadata.create_all(snorkel_engine)
42.833333
125
0.770914
268
2,056
5.839552
0.507463
0.025559
0.015335
0.023003
0.075399
0.075399
0.04345
0
0
0
0
0
0.177529
2,056
47
126
43.744681
0.925488
0.766051
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.857143
0
0.857143
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
00943f666ce9066fcbaea31c3b37d0e129d1aff9
267
py
Python
app/display_modules/microbe_directory/models.py
MetaGenScope/metagenscope-server
609cd57c626c857c8efde8237a1f22f4d1e6065d
[ "MIT" ]
null
null
null
app/display_modules/microbe_directory/models.py
MetaGenScope/metagenscope-server
609cd57c626c857c8efde8237a1f22f4d1e6065d
[ "MIT" ]
null
null
null
app/display_modules/microbe_directory/models.py
MetaGenScope/metagenscope-server
609cd57c626c857c8efde8237a1f22f4d1e6065d
[ "MIT" ]
null
null
null
"""Microbe Directory display models.""" from app.extensions import mongoDB as mdb class MicrobeDirectoryResult(mdb.EmbeddedDocument): # pylint: disable=too-few-public-methods """Set of microbe directory results.""" samples = mdb.DictField(required=True)
26.7
93
0.752809
31
267
6.483871
0.870968
0.159204
0
0
0
0
0
0
0
0
0
0
0.134831
267
9
94
29.666667
0.87013
0.400749
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
009db34ecc937dec5fe63e6719a39ee6b748575b
6,376
py
Python
c_pyvizio/c_vizio.py
cbishop76/c_pyvizio
d260225e78d5939139c1342a367efb60c2a999b1
[ "MIT" ]
null
null
null
c_pyvizio/c_vizio.py
cbishop76/c_pyvizio
d260225e78d5939139c1342a367efb60c2a999b1
[ "MIT" ]
null
null
null
c_pyvizio/c_vizio.py
cbishop76/c_pyvizio
d260225e78d5939139c1342a367efb60c2a999b1
[ "MIT" ]
null
null
null
import logging from urllib.parse import urlsplit import requests import xmltodict from .cmd_input import GetInputsListCommand, GetCurrentInputCommand, ChangeInputCommand from .cmd_pmode import GetPmodesListCommand, GetCurrentPmodeCommand, ChangePmodeCommand from .cmd_pair import BeginPairCommand, CancelPairCommand, PairChallengeCommand from .cmd_power import GetPowerStateCommand from .cmd_remote import EmulateRemoteCommand from .cmd_settings import GetCurrentAudioCommand from .discovery import discover from .protocol import invoke_api, invoke_api_auth, KeyCodes _LOGGER = logging.getLogger(__name__) MAX_VOLUME = { 'tv': 100, 'soundbar': 31 } class DeviceDescription(object): def __init__(self, ip, name, model, udn): self.ip = ip self.name = name self.model = model self.udn = udn class c_Vizio(object): def __init__(self, device_id, ip, name, auth_token="", device_type="tv"): self._device_type = device_type.lower() if self._device_type != "tv" and self._device_type != "soundbar": raise Exception("Invalid device type specified. Use either 'tv' or 'soundbar'") self._ip = ip self._name = name self._device_id = device_id self._auth_token = auth_token def __invoke_api(self, cmd): return invoke_api(self._ip, cmd, _LOGGER) def __invoke_api_may_need_auth(self, cmd): if self._auth_token is None or "" == self._auth_token: if self._device_type == "soundbar": return invoke_api(self._ip, cmd, _LOGGER) else: raise Exception("Empty auth token. To target a soundbar and bypass auth requirements, pass 'soundbar' as device_type") return invoke_api_auth(self._ip, cmd, self._auth_token, _LOGGER) def __remote(self, key_list): key_codes = [] if isinstance(key_list, list) is False: key_list = [key_list] for key in key_list: if key not in KeyCodes.CODES[self._device_type]: _LOGGER.error("Key Code of '%s' not found for device type of '%s'", key, self._device_type) return False else: key_codes.append(KeyCodes.CODES[self._device_type][key]) cmd = EmulateRemoteCommand(key_codes, self._device_type) result = self.__invoke_api_may_need_auth(cmd) return result is not None def __remote_multiple(self, key_code, num): key_codes = [] for ii in range(0, num): key_codes.append(key_code) return self.__remote(key_codes) @staticmethod def discovery(): results = [] devices = discover("urn:dial-multiscreen-org:device:dial:1") for dev in devices: data = xmltodict.parse(requests.get(dev.location, verify=False).text) if "root" not in data or "device" not in data["root"]: continue root = data["root"]["device"] manufacturer = root["manufacturer"] if manufacturer is None or "VIZIO" != manufacturer: continue split_url = urlsplit(dev.location) device = DeviceDescription(split_url.hostname, root["friendlyName"], root["modelName"], root["UDN"]) results.append(device) return results def start_pair(self): return self.__invoke_api(BeginPairCommand(self._device_id, self._name, self._device_type)) def stop_pair(self): return self.__invoke_api(CancelPairCommand(self._device_id, self._name, self._device_type)) def pair(self, ch_type, token, pin): return self.__invoke_api(PairChallengeCommand(self._device_id, ch_type, token, pin, self._device_type)) def get_inputs(self): return self.__invoke_api_may_need_auth(GetInputsListCommand(self._device_type)) def get_current_input(self): return self.__invoke_api_may_need_auth(GetCurrentInputCommand(self._device_type)) def get_pmodes(self): return self.__invoke_api_may_need_auth(GetPmodesListCommand(self._device_type)) def get_current_pmode(self): return self.__invoke_api_may_need_auth(GetCurrentPmodeCommand(self._device_type)) def get_power_state(self): return self.__invoke_api_may_need_auth(GetPowerStateCommand(self._device_type)) def pow_on(self): return self.__remote("POW_ON") def pow_off(self): return self.__remote("POW_OFF") def pow_toggle(self): return self.__remote("POW_TOGGLE") def vol_up(self, num=1): return self.__remote_multiple("VOL_UP", num) def vol_down(self, num=1): return self.__remote_multiple("VOL_DOWN", num) def get_current_volume(self): return self.__invoke_api_may_need_auth(GetCurrentAudioCommand(self._device_type)) def get_max_volume(self): return MAX_VOLUME[self._device_type] def ch_up(self, num=1): return self.__remote_multiple("CH_UP", num) def ch_down(self, num=1): return self.__remote_multiple("CH_DOWN", num) def ch_prev(self): return self.__remote("CH_PREV") def mute_on(self): return self.__remote("MUTE_ON") def mute_off(self): return self.__remote("MUTE_OFF") def mute_toggle(self): return self.__remote("MUTE_TOGGLE") def input_next(self): # HACK: Single call just invoking overlay menu with current input return self.__remote_multiple("INPUT_NEXT", 2) def input_switch(self, name): cur_input = self.get_current_input() if cur_input is None: _LOGGER.error("Couldn't detect current input") return False return self.__invoke_api_may_need_auth(ChangeInputCommand(cur_input.id, name, self._device_type)) def pmode_switch(self, name): cur_pmode = self.get_current_pmode() if cur_pmode is None: _LOGGER.error("Couldn't detect current picture mode") return False return self.__invoke_api_may_need_auth(ChangePmodeCommand(cur_pmode.id, name, self._device_type)) def play(self): return self.__remote("PLAY") def pause(self): return self.__remote("PAUSE") def remote(self, key): return self.__remote(key) def get_device_keys(self): return KeyCodes.CODES[self._device_type].keys()
33.914894
134
0.672992
816
6,376
4.903186
0.197304
0.067483
0.073482
0.050987
0.303424
0.217446
0.172957
0.145964
0.03899
0
0
0.002455
0.233532
6,376
187
135
34.096257
0.816247
0.009881
0
0.079137
0
0
0.080494
0.006021
0
0
0
0
0
1
0.251799
false
0.007194
0.086331
0.194245
0.618705
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
0
0
1
1
0
0
3
00a1fb82dbb69af4873042c32811b5e206348686
21
py
Python
models/notes/constants.py
choeminjun/src_server_1.2
82e564e694e4f3011faf02c6de026d8a3b137680
[ "Apache-2.0" ]
null
null
null
models/notes/constants.py
choeminjun/src_server_1.2
82e564e694e4f3011faf02c6de026d8a3b137680
[ "Apache-2.0" ]
null
null
null
models/notes/constants.py
choeminjun/src_server_1.2
82e564e694e4f3011faf02c6de026d8a3b137680
[ "Apache-2.0" ]
null
null
null
COLLECTION = "notes"
10.5
20
0.714286
2
21
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
21
1
21
21
0.833333
0
0
0
0
0
0.238095
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
00aa5172246ad3368cb7cb431fad007e1000af85
844
py
Python
pt2/modules/residual_encoder.py
ishine/Parallel-Tacotron-2
138c29e6211d417464cb3386eb6740b1afe7f3b8
[ "MIT" ]
null
null
null
pt2/modules/residual_encoder.py
ishine/Parallel-Tacotron-2
138c29e6211d417464cb3386eb6740b1afe7f3b8
[ "MIT" ]
null
null
null
pt2/modules/residual_encoder.py
ishine/Parallel-Tacotron-2
138c29e6211d417464cb3386eb6740b1afe7f3b8
[ "MIT" ]
null
null
null
import torch from .lconv import LConvBlock class ResidualEncoder(torch.nn.Module): def __init__(self, dim): super().__init__() self.stack1 = torch.nn.Sequential( LConvBlock(dim, 17, 0.1), LConvBlock(dim, 17, 0.1), LConvBlock(dim, 17, 0.1), torch.nn.LayerNorm(dim) ) self.stack2 = torch.nn.Sequential( LConvBlock(dim, 3, 0.1), LConvBlock(dim, 3, 0.1), LConvBlock(dim, 3, 0.1), LConvBlock(dim, 3, 0.1), LConvBlock(dim, 3, 0.1), LConvBlock(dim, 3, 0.1), torch.nn.LayerNorm(dim) ) self.projection = torch.nn.Linear(dim, dim*2) def forward(self, x): x = self.stack1(x) x = self.stack2(x) mean, std = torch.split(self.projection(x), 2, dim=-1) return std, mean
29.103448
62
0.547393
113
844
4.017699
0.274336
0.257709
0.185022
0.231278
0.5
0.42511
0.42511
0.323789
0.323789
0.323789
0
0.063356
0.308057
844
28
63
30.142857
0.714041
0
0
0.347826
0
0
0
0
0
0
0
0
0
1
0.086957
false
0
0.086957
0
0.26087
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
00b2d316baa5beed5667ff4eb88780b74052fb8e
602
py
Python
py_abac/policy/conditions/attribute/equals.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
47
2019-10-17T03:23:01.000Z
2022-02-26T03:27:03.000Z
py_abac/policy/conditions/attribute/equals.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
17
2020-02-24T02:17:34.000Z
2022-02-15T20:11:19.000Z
py_abac/policy/conditions/attribute/equals.py
ketgo/pyabac
8a44107a00f712bbb9c6cd3ecad155ef696cf035
[ "Apache-2.0" ]
10
2019-12-24T04:13:21.000Z
2021-08-01T08:21:41.000Z
""" Equals attribute condition """ from marshmallow import post_load from .base import AttributeCondition, AttributeConditionSchema class EqualsAttribute(AttributeCondition): """ Condition for attribute value equals that of another """ def _is_satisfied(self, what) -> bool: return what == self.value class EqualsAttributeSchema(AttributeConditionSchema): """ JSON schema for equals attribute condition """ @post_load def post_load(self, data, **_): # pylint: disable=missing-docstring,no-self-use return EqualsAttribute(**data)
22.296296
84
0.697674
60
602
6.9
0.583333
0.057971
0.115942
0
0
0
0
0
0
0
0
0
0.212625
602
26
85
23.153846
0.873418
0.280731
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.222222
0.888889
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
00b81a87969d737a3477ea34c5a1bf0ec74eb40b
614
py
Python
tests/test_audio/conftest.py
gregorybchris/semigenre
62dd1bf22359c66009c5564417033ce5efc15870
[ "Apache-2.0" ]
null
null
null
tests/test_audio/conftest.py
gregorybchris/semigenre
62dd1bf22359c66009c5564417033ce5efc15870
[ "Apache-2.0" ]
null
null
null
tests/test_audio/conftest.py
gregorybchris/semigenre
62dd1bf22359c66009c5564417033ce5efc15870
[ "Apache-2.0" ]
null
null
null
"""Test configuration for semigenre.audio tests.""" import os import pytest from unittest.mock import MagicMock from semigenre.audio.library import Library @pytest.fixture(scope='session') def small_library(): """Test fixture for a Library object.""" # TODO: Make this path work from any directory filename = os.path.join(os.path.dirname(__file__), 'data', 'library.xml') return Library(filename) @pytest.fixture(scope='session') def playable_track(): """Test fixture for a Track object.""" track = MagicMock() track.location = './tests/test_play/data/track.mp3' return track
25.583333
77
0.714984
81
614
5.333333
0.493827
0.064815
0.083333
0.115741
0.12963
0
0
0
0
0
0
0.001934
0.15798
614
23
78
26.695652
0.833656
0.258958
0
0.153846
0
0
0.138952
0.072893
0
0
0
0.043478
0
1
0.153846
false
0
0.307692
0
0.615385
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
0
0
0
1
0
1
0
0
3
00be8ae8187812f5646537143480e2c61ecd6d1a
728
py
Python
Algorithms/distinct_prime_factors.py
StokicDusan/Python-misc
c12f1603ef4dc7bf9ff55994cdbd6cf1dafcfee1
[ "MIT" ]
null
null
null
Algorithms/distinct_prime_factors.py
StokicDusan/Python-misc
c12f1603ef4dc7bf9ff55994cdbd6cf1dafcfee1
[ "MIT" ]
12
2021-04-15T21:22:26.000Z
2022-02-18T15:09:56.000Z
Algorithms/distinct_prime_factors.py
StokicDusan/Python-misc
c12f1603ef4dc7bf9ff55994cdbd6cf1dafcfee1
[ "MIT" ]
null
null
null
def distinct_prime_factors(x: int) -> list: factors = [] """ Returns a list of distinct prime factors of the number x """ loop = 2 while loop <= x: if x % loop == 0: while x//loop == x/loop: x //= loop factors.append(loop) else: loop += 1 return factors def test_distinct_prime_factors() -> None: """ >>> distinct_prime_factors(1) [] >>> distinct_prime_factors(40) [2, 5] >>> distinct_prime_factors(165) [3, 5, 11] >>> distinct_prime_factors(701) [701] >>> distinct_prime_factors(2187) [3] """ pass if __name__ == "__main__": from doctest import testmod testmod()
19.675676
43
0.532967
85
728
4.294118
0.435294
0.284932
0.438356
0.054795
0
0
0
0
0
0
0
0.053942
0.337912
728
36
44
20.222222
0.70332
0.258242
0
0
0
0
0.019417
0
0
0
0
0
0
1
0.125
false
0.0625
0.0625
0
0.25
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
00c5eb269fea4254ff8e08f38dc39aedd8dfb3e9
1,868
py
Python
tools/embeds.py
OneFoggyScreen/Amicable-Bot
9900877cc6e0cf1d2a512366264b278a156f0c78
[ "MIT" ]
1
2021-02-12T02:42:15.000Z
2021-02-12T02:42:15.000Z
tools/embeds.py
OneFoggyScreen/Amicable-Bot
9900877cc6e0cf1d2a512366264b278a156f0c78
[ "MIT" ]
null
null
null
tools/embeds.py
OneFoggyScreen/Amicable-Bot
9900877cc6e0cf1d2a512366264b278a156f0c78
[ "MIT" ]
null
null
null
#Makes embeds easy to use and with none of the clutter. #--------- Libaries ---------# import discord, sys sys.path.append("../") from settings import * #--------- Code ---------# def baseEmbed(Title, ImageURL, EmbedColor=Default_Color, FooterText=Name, FooterIconURL=BotImage): """ A basic embed that has a name, profile picture, title, and image content """ embedVar = discord.Embed(title=str(Title), color=EmbedColor) embedVar.set_image(url=str(ImageURL)) embedVar.set_footer(text=FooterText, icon_url=FooterIconURL) return embedVar def TwoFieldEmbed(Title, FieldOne, FieldTwo, EmbedColor=Default_Color, FooterText=Name, FooterIconURL=BotImage, i1=True, i2=True): """ A basic embed that has a name, title, and two fields for text Takes Field values in a double, 0 being the name and 1 being the value. """ embedVar = discord.Embed(title=str(Title), color=EmbedColor) embedVar.add_field(name=str(FieldOne[0]), value=str(FieldOne[1]), inline=i1) embedVar.add_field(name=str(FieldTwo[0]), value=str(FieldTwo[1]), inline=i2) embedVar.set_footer(text=FooterText, icon_url=FooterIconURL) return embedVar def ThreeFieldEmbed(Title, FieldOne, FieldTwo, FieldThree, EmbedColor=Default_Color, FooterText=Name, FooterIconURL=BotImage, i1=True, i2=True, i3=True): """ A basic embed that has a name, title, and three fields for text Takes Field values in a double, 0 being the name and 1 being the value. """ embedVar = discord.Embed(title=str(Title), color=EmbedColor) embedVar.add_field(name=str(FieldOne[0]), value=str(FieldOne[1]), inline=i1) embedVar.add_field(name=str(FieldTwo[0]), value=str(FieldTwo[1]), inline=i2) embedVar.add_field(name=str(FieldThree[0]), value=str(FieldThree[1]), inline=i3) embedVar.set_footer(text=FooterText, icon_url=FooterIconURL) return embedVar
53.371429
153
0.722698
262
1,868
5.09542
0.274809
0.041199
0.059925
0.074906
0.767041
0.755805
0.755805
0.69588
0.69588
0.653933
0
0.014944
0.140257
1,868
35
154
53.371429
0.816314
0.243041
0
0.619048
0
0
0.00218
0
0
0
0
0
0
1
0.142857
false
0
0.095238
0
0.380952
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
0
0
0
0
0
0
0
0
0
3
00c951149e26bfb25258146a4daa0d6d4a19ac04
207
py
Python
parser/team23/instruccion/expresion_validacion.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/team23/instruccion/expresion_validacion.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/team23/instruccion/expresion_validacion.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from abstract.instruccion import * from tools.tabla_tipos import * class expresion_validacion(instruccion): def __init__(self,comando,dato, line, column, num_nodo): super().__init__(line,column)
34.5
60
0.763285
26
207
5.653846
0.769231
0.136054
0
0
0
0
0
0
0
0
0
0
0.135266
207
6
61
34.5
0.821229
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
da95cab06fd694279584ccd6c329d758cd79a0c0
362
py
Python
tips/str_bytes.py
maesbrisa/pythonessie
88484458ee3e13fb3bad714e49e8b34297fda5a9
[ "MIT" ]
null
null
null
tips/str_bytes.py
maesbrisa/pythonessie
88484458ee3e13fb3bad714e49e8b34297fda5a9
[ "MIT" ]
6
2020-07-29T11:44:11.000Z
2020-08-18T15:52:58.000Z
tips/str_bytes.py
maesbrisa/pythonessie
88484458ee3e13fb3bad714e49e8b34297fda5a9
[ "MIT" ]
null
null
null
def to_string(bytes_or_string): if isinstance(bytes_or_string, bytes): string = bytes_or_string.decode('utf-8') else: string = bytes_or_string return string def to_bytes(bytes_or_string): if isinstance(bytes_or_string,str): byte = bytes_or_string.encode('utf-8') else: byte = bytes_or_string return byte
24.133333
48
0.676796
52
362
4.365385
0.288462
0.246696
0.45815
0.251101
0.334802
0.334802
0.334802
0.334802
0
0
0
0.00722
0.234807
362
14
49
25.857143
0.812274
0
0
0.166667
0
0
0.027624
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
daa650264ca8e83a7c86604ab68eff2fe2f3357c
357
py
Python
casepro/msgs/migrations/0054_auto_20161201_1454.py
rapidpro/ureport-partners
16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd
[ "BSD-3-Clause" ]
21
2015-07-21T15:57:49.000Z
2021-11-04T18:26:35.000Z
casepro/msgs/migrations/0054_auto_20161201_1454.py
rapidpro/ureport-partners
16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd
[ "BSD-3-Clause" ]
357
2015-05-22T07:26:45.000Z
2022-03-12T01:08:28.000Z
casepro/msgs/migrations/0054_auto_20161201_1454.py
rapidpro/ureport-partners
16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd
[ "BSD-3-Clause" ]
24
2015-05-28T12:30:25.000Z
2021-11-19T01:57:38.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.10 on 2016-12-01 14:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("msgs", "0053_faq")] operations = [migrations.AlterField(model_name="outgoing", name="text", field=models.TextField(max_length=800))]
27.461538
116
0.731092
48
357
5.270833
0.833333
0
0
0
0
0
0
0
0
0
0
0.07717
0.128852
357
12
117
29.75
0.736334
0.190476
0
0
1
0
0.083916
0
0
0
0
0
0
1
0
false
0
0.4
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
dace81c02ecfe88dcde9a79af889af15ed3ee59f
63
py
Python
pyschism/io/__init__.py
pmav99/pyschism
b533d29b881da6cd4f408e91a4749f86451c042a
[ "Apache-2.0" ]
null
null
null
pyschism/io/__init__.py
pmav99/pyschism
b533d29b881da6cd4f408e91a4749f86451c042a
[ "Apache-2.0" ]
null
null
null
pyschism/io/__init__.py
pmav99/pyschism
b533d29b881da6cd4f408e91a4749f86451c042a
[ "Apache-2.0" ]
null
null
null
from pyschism.io.bctides import Bctides __all__ = ['Bctides']
15.75
39
0.761905
8
63
5.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.126984
63
3
40
21
0.8
0
0
0
0
0
0.111111
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
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
daf74249a6fb322cbc113ac8d72e67fa77ee0be4
95
py
Python
tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial3_Solution_f0861370.py
liuxiaomiao123/NeuroMathAcademy
16a7969604a300bf9fbb86f8a5b26050ebd14c65
[ "CC-BY-4.0" ]
2
2020-07-03T04:39:09.000Z
2020-07-12T02:08:31.000Z
tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial3_Solution_f0861370.py
NinaHKivanani/course-content
3c91dd1a669cebce892486ba4f8086b1ef2e1e49
[ "CC-BY-4.0" ]
1
2020-06-22T22:57:03.000Z
2020-06-22T22:57:03.000Z
tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial3_Solution_f0861370.py
NinaHKivanani/course-content
3c91dd1a669cebce892486ba4f8086b1ef2e1e49
[ "CC-BY-4.0" ]
1
2021-08-06T08:05:01.000Z
2021-08-06T08:05:01.000Z
score, evectors, evals = pca(X) with plt.xkcd(): plot_eigenvalues(evals) plt.xlim([0,100])
19
31
0.684211
15
95
4.266667
0.866667
0
0
0
0
0
0
0
0
0
0
0.04878
0.136842
95
5
32
19
0.731707
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
dafce01a1c13646ea816c979ed62d0361b09fc3a
330
py
Python
simplejson_test/testdata/allennlp/data/tokenizers/tmp.py
rahman-mahmudur/PyART
36591cd10b2b7a560bbcb47a6cf744b72466f92a
[ "Apache-2.0" ]
7
2021-03-20T21:12:51.000Z
2022-01-30T09:26:52.000Z
DataFlowEvaluation/data/allennlp/data/tokenizers/tmp.py
PYART0/PyART-demo
9a889662fb2610b7be2687a8304620855e7c76de
[ "Apache-2.0" ]
null
null
null
DataFlowEvaluation/data/allennlp/data/tokenizers/tmp.py
PYART0/PyART-demo
9a889662fb2610b7be2687a8304620855e7c76de
[ "Apache-2.0" ]
4
2021-03-25T14:10:09.000Z
2022-03-09T09:23:30.000Z
from typing import List from overrides import overrides from allennlp.data.tokenizers.token import Token from allennlp.data.tokenizers.tokenizer import Tokenizer @Tokenizer.register("just_spaces") class WhitespaceTokenizer(Tokenizer): @overrides def tokenize(self, text: str) -> List[Token]: reveal_type(text)
23.571429
56
0.775758
40
330
6.35
0.55
0.094488
0.125984
0.204724
0
0
0
0
0
0
0
0
0.142424
330
14
57
23.571429
0.897527
0
0
0
0
0
0.033233
0
0
0
0
0
0
1
0.111111
false
0
0.444444
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
daff7eb461dc9d52057318faa8c976ebd75932d5
2,056
py
Python
finitio/types/set_type.py
llambeau/finitio.py
27c2799709993c6edb9d9038290792ed90a97346
[ "0BSD" ]
1
2016-02-06T17:16:22.000Z
2016-02-06T17:16:22.000Z
finitio/types/set_type.py
llambeau/finitio.py
27c2799709993c6edb9d9038290792ed90a97346
[ "0BSD" ]
null
null
null
finitio/types/set_type.py
llambeau/finitio.py
27c2799709993c6edb9d9038290792ed90a97346
[ "0BSD" ]
null
null
null
from ..support.decorators import TypeType from .collection_type import CollectionType from ..exceptions import UndressError @TypeType("set", ['element_type', 'metadata']) class SetType(CollectionType): def _include(self, value, world): if not isinstance(value, set) and not isinstance(value, list): return False if not all(self.element_type.include(v, world) for v in value): return False return True def _m_dress(self, value, monad): if not isinstance(value, set) and not isinstance(value, list): msg = 'set/list expected, got `{0}`'.format(value) return monad.failure(self, [msg, [value]]) def mapper(elm, _idx): return self.element_type.m_dress(elm, monad) def on_failure(causes): msg = "Invalid ${typeName}" return monad.failure(self, [msg, ["Set"]], causes) m = monad.map(list(value), mapper, on_failure) def finalise(_set): duplicates = set([x for x in _set if _set.count(x) > 1]) if len(duplicates): msg = "Duplicate values: `${duplicates}`" dupstr = [str(dup) for dup in duplicates] err = monad.failure(self, [msg, [', '.join(dupstr)]]) def cause_failure(cause): return monad.failure(self, "Invalid Set", [cause]) return err.on_failure(cause_failure) else: return m return m.on_success(finalise) def _undress(self, value, as_type): if not isinstance(as_type, CollectionType): raise UndressError('Unable to undress `{0}` to `{1}' .format(value, as_type)) return super(self, SetType).undress(value, as_type) def low(self): return SetType(self.element_type.low()) def resolve_proxies(self, system): return self.element_type.resolve_proxies(system) def __repr__(self): return '{' + '{0}'.format(self.element_type) + '}'
33.16129
71
0.587549
243
2,056
4.839506
0.312757
0.056122
0.063776
0.056122
0.12415
0.081633
0.081633
0.081633
0.081633
0.081633
0
0.003444
0.293774
2,056
61
72
33.704918
0.806474
0
0
0.090909
0
0
0.075389
0
0
0
0
0
0
1
0.227273
false
0
0.068182
0.113636
0.636364
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
0
0
1
1
0
0
3