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
179f95f9e72c1e37abd3d8bfd907121a3e471e18
992
py
Python
Gathered CTF writeups/ctf-7867/2020/osu-ctf-autumn/cookie_monster/1/alt/crack.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:00:41.000Z
2022-03-27T06:00:41.000Z
Gathered CTF writeups/ctf-7867/2020/osu-ctf-autumn/cookie_monster/1/alt/crack.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
null
null
null
Gathered CTF writeups/ctf-7867/2020/osu-ctf-autumn/cookie_monster/1/alt/crack.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:01:42.000Z
2022-03-27T06:01:42.000Z
import base64 cookies = {} u = 'xxxxxxx' cookies['name'] = 'gLeo7iVSypsn/drBfy3RbNqzjyybmzeMf7kRLIBfjMOw5q6quh7obDIhswwefiJ/' u = '我_xxxxxx' cookies['name_to_role'] = 'PWcy62SAOrsP5g6T3NFrE30kGeiwGNdQMVb1PUmSSIuUUEeu2MALDRwSEM/HUPvE' u = '我_administrators' cookies['admins'] = 'PWcy62SAOrsP5g6T3NFrE7D7rtDFzVt3hvNeWiz0otGzyCGGy/RtajYLllJgyL40' u = '我"zzzzzzzzzzzzzzz' cookies['zzz'] = 'U2l/OSWmJxArnhzkfE7elbHB6v0jFqSd7KzxFzedWXras48sm5s3jH+5ESyAX4zDsOauqroe6GwyIbMMHn4ifw==' u = '我": ' cookies['quote_colon'] = 'U2l/OSWmJxArnhzkfE7elVllHkQOfGWG7yCYJzrclBfas48sm5s3jH+5ESyAX4zDsOauqroe6GwyIbMMHn4ifw==' u = '我" ' cookies['quote'] = 'U2l/OSWmJxArnhzkfE7elT4irMNU1cVFIEzx4Mm5Y9Tas48sm5s3jH+5ESyAX4zDsOauqroe6GwyIbMMHn4ifw==' u = '我_} ' cookies['closing_bracket'] = 'PWcy62SAOrsP5g6T3NFrE3fvkbcAz1yplNd9r2En5wvas48sm5s3jH+5ESyAX4zDsOauqroe6GwyIbMMHn4ifw==' for name, value in cookies: cookies[name] = base64.b64decode(value) print(cookies)
33.066667
119
0.777218
67
992
11.402985
0.522388
0.015707
0.129581
0.157068
0.117801
0
0
0
0
0
0
0.101367
0.114919
992
29
120
34.206897
0.768793
0
0
0
0
0
0.705645
0.548387
0
1
0
0
0
1
0
false
0
0.052632
0
0.052632
0.052632
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
4
bd598ca3cc77c6b222adcb1c0a2c33b8225e5f2a
149
py
Python
Hackerrank_Python/Hackerrank_Python_Editorial/List_comprehension_Editorial.py
theeksha101/problem_solving
431c4ff224035bb98ad67ead963860329dd4c9ff
[ "MIT" ]
1
2021-09-09T10:28:49.000Z
2021-09-09T10:28:49.000Z
Hackerrank_Python/Hackerrank_Python_Editorial/List_comprehension_Editorial.py
theeksha101/problem_solving
431c4ff224035bb98ad67ead963860329dd4c9ff
[ "MIT" ]
null
null
null
Hackerrank_Python/Hackerrank_Python_Editorial/List_comprehension_Editorial.py
theeksha101/problem_solving
431c4ff224035bb98ad67ead963860329dd4c9ff
[ "MIT" ]
null
null
null
a, b, c, n = [int(input()) for _ in range(4)] print([[x, y, z] for x in range(a + 1) for y in range(b + 1) for z in range(c + 1) if x + y + z != n])
49.666667
102
0.516779
37
149
2.054054
0.432432
0.368421
0.078947
0
0
0
0
0
0
0
0
0.036364
0.261745
149
2
103
74.5
0.654545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
bd5f8822e425787f82483b09e41f64e3bfdb96f1
250
py
Python
repo2docker/contentproviders/__init__.py
yacchin1205/repo2docker
6077c76ccb0da122d64af20ac99ec71a0334a246
[ "BSD-3-Clause" ]
null
null
null
repo2docker/contentproviders/__init__.py
yacchin1205/repo2docker
6077c76ccb0da122d64af20ac99ec71a0334a246
[ "BSD-3-Clause" ]
null
null
null
repo2docker/contentproviders/__init__.py
yacchin1205/repo2docker
6077c76ccb0da122d64af20ac99ec71a0334a246
[ "BSD-3-Clause" ]
null
null
null
from .git import Git from .base import Local from .zenodo import Zenodo from .figshare import Figshare from .dataverse import Dataverse from .hydroshare import Hydroshare from .mercurial import Mercurial from .rdm import RDM from .weko3 import WEKO3
25
34
0.82
36
250
5.694444
0.333333
0
0
0
0
0
0
0
0
0
0
0.009346
0.144
250
9
35
27.777778
0.948598
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
bda4fac70c385399c907c12f81d3e00da86e2aec
60
py
Python
src/ambit_stochastics/helpers/__init__.py
danleonte/Ambit_Stochastics
02e10f7103db4f849b041c97b2e496732211bad6
[ "MIT" ]
2
2022-01-20T01:22:12.000Z
2022-01-27T10:33:53.000Z
src/ambit_stochastics/helpers/__init__.py
danleonte/Ambit_Stochastics
02e10f7103db4f849b041c97b2e496732211bad6
[ "MIT" ]
null
null
null
src/ambit_stochastics/helpers/__init__.py
danleonte/Ambit_Stochastics
02e10f7103db4f849b041c97b2e496732211bad6
[ "MIT" ]
null
null
null
"""Auxiliary functions for the Ambit Stochastics package."""
60
60
0.783333
7
60
6.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.1
60
1
60
60
0.87037
0.9
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
da445de3bc0414cde1c5cd5fe1f79743dcc444cc
189
py
Python
mayan/apps/dashboards/dashboards.py
atitaya1412/Mayan-EDMS
bda9302ba4b743e7d829ad118b8b836221888172
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/dashboards/dashboards.py
atitaya1412/Mayan-EDMS
bda9302ba4b743e7d829ad118b8b836221888172
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/dashboards/dashboards.py
atitaya1412/Mayan-EDMS
bda9302ba4b743e7d829ad118b8b836221888172
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
from django.utils.translation import ugettext_lazy as _ from .classes import Dashboard dashboard_administrator = Dashboard( name='administrator', label=_('Administrator dashboard') )
23.625
60
0.798942
20
189
7.35
0.65
0.29932
0
0
0
0
0
0
0
0
0
0
0.121693
189
7
61
27
0.885542
0
0
0
0
0
0.190476
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
da45e0a6556a0ccda69c647a11868691f6445588
193
py
Python
Sanctuary/Cogs/Utils/file_handling.py
LeoHartUK/Sanctuary
8d1d2ddb3a18bcf62a0cecc47bf152f88c90d2b1
[ "MIT" ]
null
null
null
Sanctuary/Cogs/Utils/file_handling.py
LeoHartUK/Sanctuary
8d1d2ddb3a18bcf62a0cecc47bf152f88c90d2b1
[ "MIT" ]
null
null
null
Sanctuary/Cogs/Utils/file_handling.py
LeoHartUK/Sanctuary
8d1d2ddb3a18bcf62a0cecc47bf152f88c90d2b1
[ "MIT" ]
1
2018-10-01T12:44:24.000Z
2018-10-01T12:44:24.000Z
def read_file(filename:str) -> str: with open(filename) as a: return a.read() def write_file(filename:str, content:str) -> None: with open(filename, 'w') as a: a.write(content) return
19.3
50
0.689119
32
193
4.09375
0.4375
0.183206
0.229008
0
0
0
0
0
0
0
0
0
0.160622
193
9
51
21.444444
0.808642
0
0
0
0
0
0.005181
0
0
0
0
0
0
1
0.285714
false
0
0
0
0.571429
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
da461444ba638011595133665a04d1266120dfea
241
py
Python
modules/__init__.py
igilitschenski/DeepBingham
c4f7cf47d251a7dafb5b465cb282ded844e96dcc
[ "MIT" ]
21
2020-04-07T23:21:31.000Z
2022-02-18T05:44:58.000Z
modules/__init__.py
igilitschenski/DeepBingham
c4f7cf47d251a7dafb5b465cb282ded844e96dcc
[ "MIT" ]
3
2020-05-03T15:11:49.000Z
2020-12-25T12:37:10.000Z
modules/__init__.py
igilitschenski/DeepBingham
c4f7cf47d251a7dafb5b465cb282ded844e96dcc
[ "MIT" ]
6
2020-10-01T18:14:26.000Z
2022-01-10T13:30:19.000Z
from .maad import maad_biternion, maad_bingham, maad_mse from .bingham_loss import BinghamLoss from .bingham_mixture_loss import BinghamMixtureLoss from .mse import MSELoss from .von_mises import VonMisesLoss from .cosine import CosineLoss
34.428571
57
0.854772
33
241
6.030303
0.484848
0.110553
0
0
0
0
0
0
0
0
0
0
0.112033
241
6
58
40.166667
0.929907
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
da5080e38a8d652f457c3c93932cc4fdede50558
692
py
Python
util_types/two_dim.py
yuga-n/ModelLearner
3193efd5eb15172ba8231a34829942040fcb0fc5
[ "MIT" ]
null
null
null
util_types/two_dim.py
yuga-n/ModelLearner
3193efd5eb15172ba8231a34829942040fcb0fc5
[ "MIT" ]
null
null
null
util_types/two_dim.py
yuga-n/ModelLearner
3193efd5eb15172ba8231a34829942040fcb0fc5
[ "MIT" ]
1
2021-09-14T14:52:28.000Z
2021-09-14T14:52:28.000Z
# -*- coding: utf-8 -*- from typing import Union from typing import Tuple from typing import Callable def build_square_type(base_type: type): """ 任意の同じ型1変数か2組のタプルのアノテーションを作成する :param base_type: 基本となる型 :return: アノテーションされる型 """ return Union[base_type, Tuple[base_type, base_type]] raw_cal = build_square_type(int) def init_get_pair(base_type: type): annotate_type = build_square_type(base_type) def get_pair(value: annotate_type)->Tuple[base_type, base_type]: return (value, value) if type(value) is base_type else value return get_pair def init_pair_type(base_type: type): return build_square_type(base_type), init_get_pair(base_type)
23.066667
68
0.736994
101
692
4.732673
0.29703
0.217573
0.150628
0.119247
0.328452
0.104603
0
0
0
0
0
0.005245
0.17341
692
29
69
23.862069
0.83042
0.141619
0
0
0
0
0
0
0
0
0
0
0
1
0.307692
false
0
0.230769
0.153846
0.846154
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
da626df452e9449bc6775031d5c7e05f0a33baae
154
py
Python
chapter2/chapter2_type_hints_10.py
GoodMonsters/Building-Data-Science-Applications-with-FastAPI
d2218d225c5b93723ecf46c19619ed5d3f2473e6
[ "MIT" ]
107
2021-03-26T20:18:51.000Z
2022-03-26T03:38:08.000Z
chapter2/chapter2_type_hints_10.py
GoodMonsters/Building-Data-Science-Applications-with-FastAPI
d2218d225c5b93723ecf46c19619ed5d3f2473e6
[ "MIT" ]
4
2021-06-09T08:48:21.000Z
2021-12-27T09:04:43.000Z
chapter2/chapter2_type_hints_10.py
GoodMonsters/Building-Data-Science-Applications-with-FastAPI
d2218d225c5b93723ecf46c19619ed5d3f2473e6
[ "MIT" ]
58
2021-03-12T20:51:19.000Z
2022-03-27T15:49:49.000Z
from typing import Any, cast def f(x: Any) -> Any: return x a = f("a") # inferred type is "Any" a = cast(str, f("a")) # forced type to be "str"
15.4
48
0.571429
29
154
3.034483
0.586207
0.045455
0
0
0
0
0
0
0
0
0
0
0.25974
154
9
49
17.111111
0.77193
0.298701
0
0
0
0
0.019048
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
da64038e443b2b81ab731f93cfd909d01c1100b4
168
py
Python
wordpress/__init__.py
myles/python-wordpress
c2f63a1ff00afa7fc576ef36fc286b63e5aae9b6
[ "MIT" ]
36
2017-02-23T09:16:23.000Z
2022-03-27T19:28:31.000Z
wordpress/__init__.py
myles/python-wordpress
c2f63a1ff00afa7fc576ef36fc286b63e5aae9b6
[ "MIT" ]
5
2017-01-26T13:41:57.000Z
2018-11-16T00:13:32.000Z
wordpress/__init__.py
myles/python-wordpress
c2f63a1ff00afa7fc576ef36fc286b63e5aae9b6
[ "MIT" ]
8
2017-01-27T17:38:10.000Z
2019-07-05T17:31:49.000Z
import logging from logging import NullHandler from .api import WordPress # NOQA F401 __all__ = ['WordPress'] logging.getLogger(__name__).addHandler(NullHandler())
18.666667
53
0.785714
19
168
6.526316
0.631579
0
0
0
0
0
0
0
0
0
0
0.020408
0.125
168
8
54
21
0.823129
0.053571
0
0
0
0
0.057325
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
da83e3335e84727dc4051907666cefff5915d369
190
py
Python
tests/_display/test__document.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
16
2021-04-16T02:01:29.000Z
2022-01-01T08:53:49.000Z
tests/_display/test__document.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
613
2021-03-24T03:37:38.000Z
2022-03-26T10:58:37.000Z
tests/_display/test__document.py
simon-ritchie/apyscript
c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279
[ "MIT" ]
2
2021-06-20T07:32:58.000Z
2021-12-26T08:22:11.000Z
import apysc as ap from apysc._expression import var_names class TestDocument: def test___init__(self) -> None: assert ap.document.variable_name == var_names.DOCUMENT
21.111111
63
0.721053
25
190
5.12
0.76
0.125
0
0
0
0
0
0
0
0
0
0
0.215789
190
8
64
23.75
0.85906
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
e51346d4dd2fa31ed4153450b5e95e2394505cf3
159
py
Python
conditional_filtering.py
chitru/Data-Manipulation-and-Analysis-with-Pandas
dea528dbdb4049eca992141389b9e59dead7109e
[ "MIT" ]
null
null
null
conditional_filtering.py
chitru/Data-Manipulation-and-Analysis-with-Pandas
dea528dbdb4049eca992141389b9e59dead7109e
[ "MIT" ]
null
null
null
conditional_filtering.py
chitru/Data-Manipulation-and-Analysis-with-Pandas
dea528dbdb4049eca992141389b9e59dead7109e
[ "MIT" ]
null
null
null
import pandas as pd df = pd.read_csv('intel.csv') #print(df) #my_open = df['Open'] > 40 #print(my_open) #print(df[my_open]) print(df[df['Open'] <= 55.8 ])
13.25
30
0.628931
30
159
3.2
0.466667
0.21875
0.1875
0.270833
0
0
0
0
0
0
0
0.036765
0.144654
159
12
30
13.25
0.669118
0.415094
0
0
0
0
0.144444
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
e51db710d550f583dd9268af11dcf1783567b1a4
162
py
Python
args_paser/hyunjoowhoon.py
HarryBaek/share_5GUAV_2020
7f2b7f4b39be4123ced7085dec11cc0c15895be1
[ "Apache-2.0" ]
null
null
null
args_paser/hyunjoowhoon.py
HarryBaek/share_5GUAV_2020
7f2b7f4b39be4123ced7085dec11cc0c15895be1
[ "Apache-2.0" ]
null
null
null
args_paser/hyunjoowhoon.py
HarryBaek/share_5GUAV_2020
7f2b7f4b39be4123ced7085dec11cc0c15895be1
[ "Apache-2.0" ]
null
null
null
pass # 3개의 값을 갖는다 # 여러분 마음 # -first 49 -second 30 -third 0 # 곱샘과 나눗샘 --> function 처리 # basic sentence 틀에서 벗어나지 말것 # exception 처리 --> 중간 중단 없음. # 최종 결과는 print()
14.727273
31
0.635802
29
162
3.551724
0.965517
0
0
0
0
0
0
0
0
0
0
0.04918
0.246914
162
10
32
16.2
0.795082
0.864198
0
0
0
0
0
0
0
0
0
0
0
1
0
true
1
0
0
0
0
1
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
4
e56e27743eaccc027371ffbd3cdabc65cd1617d0
181
py
Python
template_profiler_panel/apps.py
tufedtm/django-debug-toolbar-template-profiler
07f0797e681391f79faf451e75c3571531571fd7
[ "BSD-2-Clause-FreeBSD" ]
56
2015-01-09T22:55:05.000Z
2022-02-17T22:09:15.000Z
template_profiler_panel/apps.py
tufedtm/django-debug-toolbar-template-profiler
07f0797e681391f79faf451e75c3571531571fd7
[ "BSD-2-Clause-FreeBSD" ]
15
2015-07-06T17:55:32.000Z
2022-02-22T22:16:02.000Z
template_profiler_panel/apps.py
tufedtm/django-debug-toolbar-template-profiler
07f0797e681391f79faf451e75c3571531571fd7
[ "BSD-2-Clause-FreeBSD" ]
19
2015-07-03T08:52:30.000Z
2022-03-09T15:08:48.000Z
from django.apps import AppConfig class TemplateProfilerPanelAppConfig(AppConfig): name = "template_profiler_panel" verbose_name = "Debug Toolbar Template Profiler Panel"
25.857143
58
0.801105
19
181
7.473684
0.736842
0.225352
0.295775
0
0
0
0
0
0
0
0
0
0.143646
181
6
59
30.166667
0.916129
0
0
0
0
0
0.331492
0.127072
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e5afe066f6d99ded1d568c982f807e1a55d86be8
314
py
Python
packages/gtk-doc.py
NobodyNada/bockbuild
35bff25b50f67962bd47086a1b1ce64106dc01bd
[ "MIT" ]
20
2015-01-27T04:56:21.000Z
2020-07-26T09:43:01.000Z
packages/gtk-doc.py
NobodyNada/bockbuild
35bff25b50f67962bd47086a1b1ce64106dc01bd
[ "MIT" ]
72
2015-03-15T18:55:24.000Z
2022-02-16T15:51:58.000Z
packages/gtk-doc.py
NobodyNada/bockbuild
35bff25b50f67962bd47086a1b1ce64106dc01bd
[ "MIT" ]
33
2015-01-22T13:10:33.000Z
2022-03-31T21:07:46.000Z
GnomePackage('gtk-doc', version_major='1', version_minor='18', configure_flags=['--with-xml-catalog="%{staged_profile}/share/xml/catalog"'], sources=['http://ftp.gnome.org/pub/gnome/sources/%{name}/%{version}/%{name}-%{version}.tar.bz2'], override_properties={'build_dependency': True} )
78.5
238
0.665605
38
314
5.342105
0.789474
0.098522
0
0
0
0
0
0
0
0
0
0.014286
0.10828
314
3
239
104.666667
0.710714
0
0
0
0
0.333333
0.528662
0.178344
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
e5bee7fb2a8e4ba2b4dc46dd410f805f8777c2a1
151
py
Python
utils/load_yuhun_json.py
JiatLn/yhshow-be
c6a6a6f16b74e16e93257af6d3941d7cdcbfd78e
[ "MIT" ]
null
null
null
utils/load_yuhun_json.py
JiatLn/yhshow-be
c6a6a6f16b74e16e93257af6d3941d7cdcbfd78e
[ "MIT" ]
null
null
null
utils/load_yuhun_json.py
JiatLn/yhshow-be
c6a6a6f16b74e16e93257af6d3941d7cdcbfd78e
[ "MIT" ]
null
null
null
import json def load_json_file(filename): with open(filename, encoding='utf-8') as f: json_file = json.load(f) return json_file
16.777778
47
0.655629
23
151
4.130435
0.608696
0.252632
0
0
0
0
0
0
0
0
0
0.008772
0.245033
151
8
48
18.875
0.824561
0
0
0
0
0
0.033333
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
e5dd7942f5b3eefd809d93f84c0affea71f8efcb
239
py
Python
tests/base_test.py
solidfire/solidfire-sdk-python
49fe23e2e9383dcd75723d680ffd18a475dccea5
[ "Apache-2.0" ]
20
2016-02-18T16:43:09.000Z
2020-12-12T06:26:44.000Z
tests/base_test.py
solidfire/solidfire-sdk-python
49fe23e2e9383dcd75723d680ffd18a475dccea5
[ "Apache-2.0" ]
39
2016-02-18T16:37:21.000Z
2021-10-04T21:22:22.000Z
tests/base_test.py
solidfire/solidfire-sdk-python
49fe23e2e9383dcd75723d680ffd18a475dccea5
[ "Apache-2.0" ]
12
2016-03-18T17:15:27.000Z
2020-10-02T17:45:14.000Z
#!/usr/bin/env python """Copyright (c) NetApp Inc. 2016.""" import unittest from solidfire.factory import ElementFactory class SolidFireBaseTest(unittest.TestCase): cluster = "10.117.61.42" user = "admin" password = "admin"
19.916667
44
0.702929
29
239
5.793103
0.896552
0
0
0
0
0
0
0
0
0
0
0.065
0.16318
239
11
45
21.727273
0.775
0.217573
0
0
0
0
0.121547
0
0
0
0
0
0
1
0
false
0.166667
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
e5fd087135dbf8aa6c25f7728b4c9d04e6e56030
234
py
Python
youtube_title_parse/fallback_title.py
DanB288/youtube_title_parse
965b4a6a4d233ac20a6bbd974a26490d6306059c
[ "MIT" ]
15
2018-10-28T09:30:18.000Z
2022-02-08T11:40:15.000Z
youtube_title_parse/fallback_title.py
DanB288/youtube_title_parse
965b4a6a4d233ac20a6bbd974a26490d6306059c
[ "MIT" ]
12
2020-04-19T12:54:14.000Z
2021-05-19T20:34:40.000Z
youtube_title_parse/fallback_title.py
DanB288/youtube_title_parse
965b4a6a4d233ac20a6bbd974a26490d6306059c
[ "MIT" ]
4
2020-05-24T17:18:07.000Z
2021-11-12T20:50:42.000Z
# -*- coding: utf-8 -*- """ Fallback to given title when no title/artist detected """ def fallback_title(title): """ Fallback method """ def fallback_t(artist): return [artist, title] return fallback_t
14.625
53
0.611111
28
234
5
0.535714
0.157143
0
0
0
0
0
0
0
0
0
0.005747
0.25641
234
15
54
15.6
0.798851
0.393162
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
f9279a351c4791c860077ae22146986ede28be42
155
py
Python
test_app/test_app/apps.py
vercer-cmt/django-query-preparer
555dfd4d9293949b7f36f2c679e284753ba86301
[ "MIT" ]
6
2020-02-17T10:41:47.000Z
2021-08-20T00:19:52.000Z
test_app/test_app/apps.py
vercer-cmt/django-query-preparer
555dfd4d9293949b7f36f2c679e284753ba86301
[ "MIT" ]
null
null
null
test_app/test_app/apps.py
vercer-cmt/django-query-preparer
555dfd4d9293949b7f36f2c679e284753ba86301
[ "MIT" ]
null
null
null
# Copyright (c) 2020, Vercer Ltd. Rights set out in LICENCE.txt from django.apps import AppConfig class TestAppConfig(AppConfig): name = "test_app"
19.375
63
0.741935
22
155
5.181818
0.954545
0
0
0
0
0
0
0
0
0
0
0.03125
0.174194
155
7
64
22.142857
0.859375
0.393548
0
0
0
0
0.086957
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
0068fba9d41e53a799f126aa7360628dcf7f27fd
94
py
Python
frzout/__init__.py
j-f-paquet/frzout-duke2020
b30e4a97e52cf6e573e3d2bfe0e9804169f89704
[ "MIT" ]
1
2018-05-31T18:15:26.000Z
2018-05-31T18:15:26.000Z
frzout/__init__.py
j-f-paquet/frzout-duke2020
b30e4a97e52cf6e573e3d2bfe0e9804169f89704
[ "MIT" ]
2
2019-03-22T18:58:29.000Z
2021-03-01T03:54:13.000Z
frzout/__init__.py
j-f-paquet/frzout-duke2020
b30e4a97e52cf6e573e3d2bfe0e9804169f89704
[ "MIT" ]
3
2019-05-03T19:23:34.000Z
2020-10-02T19:42:41.000Z
# -*- coding: utf-8 -*- from ._frzout import * from .species import * __version__ = '1.0.0'
13.428571
23
0.617021
13
94
4.076923
0.769231
0
0
0
0
0
0
0
0
0
0
0.052632
0.191489
94
6
24
15.666667
0.644737
0.223404
0
0
0
0
0.070423
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
00972c15d30ff5897425d4cf96b7b3b42924c247
112
py
Python
terraform/lambda/public_lambda_0/src/index.py
davidjeddy/aws_terraform_lambda_vpc_endpoint
1730baf4796079a07978e9bfab68ed9a5879ae69
[ "RSA-MD" ]
5
2020-04-02T05:49:20.000Z
2020-12-31T13:10:48.000Z
terraform/lambda/public_lambda_0/src/index.py
davidjeddy/aws_terraform_lambda_vpc_endpoint
1730baf4796079a07978e9bfab68ed9a5879ae69
[ "RSA-MD" ]
null
null
null
terraform/lambda/public_lambda_0/src/index.py
davidjeddy/aws_terraform_lambda_vpc_endpoint
1730baf4796079a07978e9bfab68ed9a5879ae69
[ "RSA-MD" ]
null
null
null
def lambda_handler(event, context): print('event:', event) print('context:', context) return True
16
35
0.651786
13
112
5.538462
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.205357
112
6
36
18.666667
0.808989
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
4
00a7fd0216e8a6874070712a06556425d9547cef
64
py
Python
pytranus/tranusio/__init__.py
tcapelle/pytranus
8abcdeca85252071854611822bffc83c01ea5267
[ "MIT" ]
1
2021-12-06T12:14:14.000Z
2021-12-06T12:14:14.000Z
pytranus/tranusio/__init__.py
tcapelle/pytranus
8abcdeca85252071854611822bffc83c01ea5267
[ "MIT" ]
null
null
null
pytranus/tranusio/__init__.py
tcapelle/pytranus
8abcdeca85252071854611822bffc83c01ea5267
[ "MIT" ]
1
2021-07-15T16:44:09.000Z
2021-07-15T16:44:09.000Z
from lcalparam import LcalParam from lcalio import L1sParam, L1s
32
32
0.859375
9
64
6.111111
0.666667
0
0
0
0
0
0
0
0
0
0
0.035714
0.125
64
2
32
32
0.946429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
00e69ff551e12f5db30e5e8b816aee5f83b74ffd
2,648
py
Python
tests/test_risk_profile.py
jdvelasq/smart-choice
152b13ddae682622e61a1dfb5b0a920c632480ab
[ "MIT" ]
1
2017-05-15T09:51:14.000Z
2017-05-15T09:51:14.000Z
tests/test_risk_profile.py
jdvelasq/smart-choice
152b13ddae682622e61a1dfb5b0a920c632480ab
[ "MIT" ]
null
null
null
tests/test_risk_profile.py
jdvelasq/smart-choice
152b13ddae682622e61a1dfb5b0a920c632480ab
[ "MIT" ]
1
2017-09-23T18:56:28.000Z
2017-09-23T18:56:28.000Z
""" Risk profile """ from smart_choice.decisiontree import DecisionTree from smart_choice.examples import oil_tree_example, stguide from smart_choice.risk_profile import RiskProfile from tests.capsys import check_capsys def test_stguide_fig_5_8a(capsys): """Fig. 5.8 (a) --- Plot distribution""" nodes = stguide() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() risk_profile = RiskProfile(decisiontree=tree, idx=0, cumulative=False, single=True) print(risk_profile) check_capsys("./tests/files/stguide_fig_5_8a.txt", capsys) def test_stguide_fig_5_8b(capsys): """Fig. 5.8 (b) --- Plot distribution""" nodes = stguide() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() risk_profile = RiskProfile(decisiontree=tree, idx=0, cumulative=True, single=True) print(risk_profile) check_capsys("./tests/files/stguide_fig_5_8b.txt", capsys) def test_stguide_fig_5_8c(capsys): """Fig. 5.8 (c) --- Plot distribution""" nodes = stguide() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() risk_profile = RiskProfile(decisiontree=tree, idx=0, cumulative=False, single=False) print(risk_profile) check_capsys("./tests/files/stguide_fig_5_8c.txt", capsys) def test_stguide_fig_5_10(capsys): """Fig. 5.10 --- Cumulative plot distribution""" nodes = stguide() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() risk_profile = RiskProfile(decisiontree=tree, idx=0, cumulative=True, single=False) print(risk_profile) check_capsys("./tests/files/stguide_fig_5_10.txt", capsys) def test_stguide_fig_7_15(capsys): """Fig. 7.15 --- Plot distribution""" nodes = stguide() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() risk_profile = RiskProfile(decisiontree=tree, idx=23, cumulative=True, single=True) print(risk_profile) check_capsys("./tests/files/stguide_fig_7_15.txt", capsys) def test_oilexample_pag_32(capsys): """Typical risk profile""" nodes = oil_tree_example() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() risk_profile = RiskProfile(decisiontree=tree, idx=0, cumulative=False, single=False) print(risk_profile) check_capsys("./tests/files/oilexample_pag_32.txt", capsys) def test_oilexample_pag_33(capsys): """Typical risk profile""" nodes = oil_tree_example() tree = DecisionTree(nodes=nodes) tree.evaluate() tree.rollback() tree.display(policy_suggestion=True) check_capsys("./tests/files/oilexample_pag_33.txt", capsys)
29.098901
88
0.710725
343
2,648
5.265306
0.154519
0.097453
0.048726
0.100775
0.824474
0.824474
0.738649
0.693798
0.693798
0.693798
0
0.022932
0.160121
2,648
90
89
29.422222
0.789119
0.088369
0
0.610169
0
0
0.101266
0.101266
0
0
0
0
0
1
0.118644
false
0
0.067797
0
0.186441
0.101695
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
dab37c95293f3d96e3ceac8ee3059cb49418b50e
105
py
Python
testCombinWaveFiles.py
Anna1015/WorkAtTokyo
ed37b746c38c2f668feac20044fe4dec38336086
[ "Apache-2.0" ]
1
2020-05-07T16:01:34.000Z
2020-05-07T16:01:34.000Z
testCombinWaveFiles.py
Anna1015/WorkAtTokyo
ed37b746c38c2f668feac20044fe4dec38336086
[ "Apache-2.0" ]
null
null
null
testCombinWaveFiles.py
Anna1015/WorkAtTokyo
ed37b746c38c2f668feac20044fe4dec38336086
[ "Apache-2.0" ]
1
2020-03-23T05:00:53.000Z
2020-03-23T05:00:53.000Z
from pydub import AudioSegment import os import wave filePath = '' files = os.listdir(filePath)
13.125
31
0.714286
13
105
5.769231
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.219048
105
7
32
15
0.914634
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
dab37f5b13d8f4748284e2cc2fbc5541f9551790
110
py
Python
Python_proficiency_test/latex/codes/4.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
6
2020-04-24T08:16:51.000Z
2021-11-01T09:50:46.000Z
Python_proficiency_test/latex/codes/4.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
null
null
null
Python_proficiency_test/latex/codes/4.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
4
2021-02-17T20:21:31.000Z
2022-02-14T12:43:23.000Z
list1 = ['1','2','3'] list3 = list1 print(list1 is list3) print(list1 == list3) print(id(list1) == id(list3))
18.333333
29
0.627273
18
110
3.833333
0.444444
0.289855
0
0
0
0
0
0
0
0
0
0.126316
0.136364
110
5
30
22
0.6
0
0
0
0
0
0.027273
0
0
0
0
0
0
1
0
false
0
0
0
0
0.6
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
dabe9f132e3425a0e3896cb73347f9de5f4cf2e3
27
py
Python
sogs/__init__.py
Bilb/session-pysogs
eb6f13e26d16f0119e87b41ffb86813c3c177ab9
[ "MIT" ]
233
2016-04-03T11:12:51.000Z
2022-02-20T06:08:16.000Z
sogs/__init__.py
Bilb/session-pysogs
eb6f13e26d16f0119e87b41ffb86813c3c177ab9
[ "MIT" ]
14
2019-12-12T20:21:19.000Z
2022-01-07T17:48:10.000Z
sogs/__init__.py
Bilb/session-pysogs
eb6f13e26d16f0119e87b41ffb86813c3c177ab9
[ "MIT" ]
31
2017-04-06T00:48:25.000Z
2022-02-15T08:16:37.000Z
__version__ = "0.3.0.dev0"
13.5
26
0.666667
5
27
2.8
0.8
0
0
0
0
0
0
0
0
0
0
0.166667
0.111111
27
1
27
27
0.416667
0
0
0
0
0
0.37037
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
dac48a2c914f9084b07f05254aa8e4a104522d99
32,391
py
Python
modules/em-fceux/src/drivers/em/scripts/mesh2obj.py
webrcade/webrcade-app-fceux
445e9496b74c9dd2eb37a7a904160dfe9da5068b
[ "Apache-2.0" ]
null
null
null
modules/em-fceux/src/drivers/em/scripts/mesh2obj.py
webrcade/webrcade-app-fceux
445e9496b74c9dd2eb37a7a904160dfe9da5068b
[ "Apache-2.0" ]
null
null
null
modules/em-fceux/src/drivers/em/scripts/mesh2obj.py
webrcade/webrcade-app-fceux
445e9496b74c9dd2eb37a7a904160dfe9da5068b
[ "Apache-2.0" ]
null
null
null
""" Simple script to output .obj file from raw source code mesh data. This was needed because original .obj file was lost... """ # Mesh vertex data goes here: screen_mesh = { 'v': [-0.94531,-0.69442,-0.09204,-0.92179,-0.70385,-0.08774,-0.95354,-0.67555,-0.09366,-0.9504,-0.68597,-0.09303,-0.95584,-0.65062,-0.09413,-0.92179,-0.65072,-0.08774,-0.12211,-0.65072,-0.01034,-0.12211,-0.70385,-0.01034,-0.94531,0.69469,-0.09204,-0.95354,0.67581,-0.09366,-0.92179,0.70412,-0.08774,-0.93872,0.70008,-0.09079,-0.95584,0.65084,-0.09412,-0.92179,0.6509,-0.08774,-0.12211,0.70412,-0.01034,-0.12211,0.6509,-0.01034,-0.95584,-0.13004,-0.07819,-0.92179,-0.13007,-0.0718,-0.92179,0.13025,-0.0718,-0.95584,0.13026,-0.07819,-0.12211,0.13025,0.00559,-0.12211,-0.13007,0.00559,-0.66398,-0.70385,-0.05165,-0.66398,-0.65072,-0.05165,-0.36834,-0.70385,-0.02216,-0.36834,-0.65072,-0.02216,-0.66398,0.6509,-0.05165,-0.66398,0.70412,-0.05165,-0.36834,0.6509,-0.02216,-0.36834,0.70412,-0.02216,-0.66398,0.13025,-0.03571,-0.66398,-0.13007,-0.03571,-0.36834,0.13025,-0.00623,-0.36834,-0.13007,-0.00623,-0.95584,0.39055,-0.08483,-0.92179,0.39057,-0.07844,-0.92179,-0.3904,-0.07844,-0.95584,-0.39032,-0.08483,-0.12211,-0.3904,-0.00105,-0.12211,0.39057,-0.00105,-0.66398,-0.3904,-0.04235,-0.66398,0.39057,-0.04235,-0.36834,-0.3904,-0.01287,-0.36834,0.39057,-0.01287,-0.93872,-0.69981,-0.09079,-0.9504,0.68624,-0.09303,0.94531,-0.69442,-0.09204,0.92179,-0.70385,-0.08774,0.95354,-0.67555,-0.09366,0.9504,-0.68597,-0.09303,0.95584,-0.65062,-0.09413,0.92179,-0.65072,-0.08774,0.12211,-0.65072,-0.01034,0.12211,-0.70385,-0.01034,0.94531,0.69469,-0.09204,0.95354,0.67581,-0.09366,0.92179,0.70412,-0.08774,0.93872,0.70008,-0.09079,0.95584,0.65084,-0.09412,0.92179,0.6509,-0.08774,0.12211,0.70412,-0.01034,0.12211,0.6509,-0.01034,0.95584,-0.13004,-0.07819,0.92179,-0.13007,-0.0718,0.92179,0.13025,-0.0718,0.95584,0.13026,-0.07819,0.12211,0.13025,0.00559,0.12211,-0.13007,0.00559,0.66398,-0.70385,-0.05165,0.66398,-0.65072,-0.05165,0.36834,-0.70385,-0.02216,0.36834,-0.65072,-0.02216,0.66398,0.6509,-0.05165,0.66398,0.70412,-0.05165,0.36834,0.6509,-0.02216,0.36834,0.70412,-0.02216,0.66398,0.13025,-0.03571,0.66398,-0.13007,-0.03571,0.36834,0.13025,-0.00623,0.36834,-0.13007,-0.00623,0.95584,0.39055,-0.08483,0.92179,0.39057,-0.07844,0.92179,-0.3904,-0.07844,0.95584,-0.39032,-0.08483,0.12211,-0.3904,-0.00105,0.12211,0.39057,-0.00105,0.66398,-0.3904,-0.04235,0.66398,0.39057,-0.04235,0.36834,-0.3904,-0.01287,0.36834,0.39057,-0.01287,0.93872,-0.69981,-0.09079,0.9504,0.68624,-0.09303], 'vn': [-0.17728,0.00775,0.9841,-0.15812,0.00174,0.9874,-0.1814,0.00244,0.9834,-0.18638,0.00293,0.98245,-0.184,-0.01779,0.98276,-0.16156,-0.01758,0.98669,-0.02396,-0.01782,0.99954,-0.02396,0,0.99969,-0.17728,-0.00775,0.9841,-0.18146,-0.00238,0.98337,-0.15812,-0.00171,0.9874,-0.17405,-0.01511,0.98462,-0.18394,0.01779,0.98276,-0.16153,0.01758,0.98669,-0.02396,0,0.99969,-0.02396,0.01782,0.99954,-0.18433,-0.01254,0.98276,-0.16147,-0.01257,0.98679,-0.16147,0.01257,0.98679,-0.1843,0.01254,0.98276,-0.02396,0.01273,0.9996,-0.02396,-0.01273,0.9996,-0.11896,0,0.99289,-0.11896,-0.0177,0.99274,-0.07361,0,0.99728,-0.07361,-0.01779,0.9971,-0.11896,0.0177,0.99274,-0.11896,0,0.99289,-0.07361,0.01779,0.9971,-0.07361,0,0.99728,-0.11893,0.01263,0.9928,-0.11893,-0.01263,0.9928,-0.07358,0.0127,0.99719,-0.07358,-0.0127,0.99719,-0.18427,0.03006,0.98239,-0.16144,0.03018,0.98639,-0.16147,-0.03018,0.98639,-0.1843,-0.03006,0.98239,-0.02396,-0.03058,0.99924,-0.02396,0.03058,0.99924,-0.1189,-0.03037,0.99243,-0.1189,0.03037,0.99243,-0.07358,-0.03049,0.9968,-0.07358,0.03049,0.9968,-0.17405,0.01511,0.98462,-0.18638,-0.00293,0.98245,0.17728,0.00775,0.9841,0.15812,0.00174,0.9874,0.1814,0.00244,0.9834,0.18638,0.00293,0.98245,0.184,-0.01779,0.98276,0.16156,-0.01758,0.98669,0.02396,-0.01782,0.99954,0.02396,0,0.99969,0.17728,-0.00775,0.9841,0.18146,-0.00238,0.98337,0.15812,-0.00171,0.9874,0.17405,-0.01511,0.98462,0.18394,0.01779,0.98276,0.16153,0.01758,0.98669,0.02396,0,0.99969,0.02396,0.01782,0.99954,0.18433,-0.01254,0.98276,0.16147,-0.01257,0.98679,0.16147,0.01257,0.98679,0.1843,0.01254,0.98276,0.02396,0.01273,0.9996,0.02396,-0.01273,0.9996,0.11896,0,0.99289,0.11896,-0.0177,0.99274,0.07361,0,0.99728,0.07361,-0.01779,0.9971,0.11896,0.0177,0.99274,0.11896,0,0.99289,0.07361,0.01779,0.9971,0.07361,0,0.99728,0.11893,0.01263,0.9928,0.11893,-0.01263,0.9928,0.07358,0.0127,0.99719,0.07358,-0.0127,0.99719,0.18427,0.03006,0.98239,0.16144,0.03018,0.98639,0.16147,-0.03018,0.98639,0.1843,-0.03006,0.98239,0.02396,-0.03058,0.99924,0.02396,0.03058,0.99924,0.1189,-0.03037,0.99243,0.1189,0.03037,0.99243,0.07358,-0.03049,0.9968,0.07358,0.03049,0.9968,0.17405,0.01511,0.98462,0.18638,-0.00293,0.98245], 'vt': [0.03776,0.017,0.04923,0.01044,0.03374,0.03012,0.03527,0.02287,0.03262,0.04746,0.04923,0.04739,0.43941,0.04739,0.43941,0.01044,0.03776,0.983,0.03374,0.96988,0.04923,0.98956,0.04097,0.98675,0.03262,0.95251,0.04923,0.95255,0.43941,0.98956,0.43941,0.95255,0.03262,0.40948,0.04923,0.40945,0.04923,0.59048,0.03262,0.59049,0.43941,0.59048,0.43941,0.40945,0.17502,0.01044,0.17502,0.04739,0.31926,0.01044,0.31926,0.04739,0.17502,0.95255,0.17502,0.98956,0.31926,0.95255,0.31926,0.98956,0.17502,0.59048,0.17502,0.40945,0.31926,0.59048,0.31926,0.40945,0.03262,0.7715,0.04923,0.77152,0.04923,0.22842,0.03262,0.22847,0.43941,0.22842,0.43941,0.77152,0.17502,0.22842,0.17502,0.77152,0.31926,0.22842,0.31926,0.77152,0.04097,0.01325,0.03527,0.97713,0.96178,0.017,0.95031,0.01044,0.9658,0.03012,0.96427,0.02287,0.96692,0.04746,0.95031,0.04739,0.56013,0.04739,0.56013,0.01044,0.96178,0.983,0.9658,0.96988,0.95031,0.98956,0.95857,0.98675,0.96692,0.95251,0.95031,0.95255,0.56013,0.98956,0.56013,0.95255,0.96692,0.40948,0.95031,0.40945,0.95031,0.59048,0.96692,0.59049,0.56013,0.59048,0.56013,0.40945,0.82452,0.01044,0.82452,0.04739,0.68028,0.01044,0.68028,0.04739,0.82452,0.95255,0.82452,0.98956,0.68028,0.95255,0.68028,0.98956,0.82452,0.59048,0.82452,0.40945,0.68028,0.59048,0.68028,0.40945,0.96692,0.7715,0.95031,0.77152,0.95031,0.22842,0.96692,0.22847,0.56013,0.22842,0.56013,0.77152,0.82452,0.22842,0.82452,0.77152,0.68028,0.22842,0.68028,0.77152,0.04097,0.01325,0.03527,0.97713], 'f': [0,1,2,4,2,1,8,9,10,12,13,10,17,18,19,23,5,1,25,23,22,6,25,24,27,10,13,29,27,26,14,29,28,18,17,31,30,31,33,32,33,21,35,13,12,18,35,34,36,37,4,17,16,37,40,36,5,31,17,36,41,26,13,30,41,35,42,40,23,33,31,40,43,28,26,32,43,41,38,42,25,21,33,42,39,15,28,20,39,43,0,44,1,8,45,9,38,52,84,46,49,48,50,51,47,54,57,56,58,55,56,65,64,63,47,51,69,68,69,71,70,71,52,59,56,73,72,73,75,74,75,60,77,63,64,79,77,76,66,67,79,58,59,81,80,81,64,82,51,50,63,82,83,86,69,51,77,86,82,59,72,87,81,87,76,88,71,69,79,88,86,72,74,89,87,89,78,84,52,71,67,84,88,74,61,85,89,85,66,46,47,90,54,55,91,3,0,2,5,4,1,11,8,10,9,12,10,16,17,19,66,85,20,24,25,22,66,20,21,22,23,1,7,6,24,26,27,13,28,29,26,15,14,28,30,18,31,32,30,33,20,32,21,34,35,12,19,18,34,5,36,4,36,17,37,40,31,36,23,40,5,35,41,13,18,30,35,25,42,23,42,33,40,41,43,26,30,32,41,6,38,25,38,21,42,43,39,28,32,20,43,38,6,52,61,15,39,21,84,67,61,39,85,85,39,20,14,15,61,47,46,48,48,50,47,67,66,21,55,54,56,59,58,56,62,65,63,68,47,69,70,68,71,53,70,52,72,59,73,74,72,75,61,74,60,76,77,64,78,79,76,78,66,79,80,58,81,65,80,64,83,82,50,62,63,83,82,86,51,63,77,82,81,59,87,64,81,76,86,88,69,77,79,86,87,72,89,76,87,78,88,84,71,79,67,88,89,74,85,78,89,66,52,6,7,52,7,53,21,38,84,14,61,60] } # Second mesh without uvs: rim_mesh = { 'v': [-0.92179,-0.70385,-0.08774,-0.85625,-0.82889,0.04949,-0.85625,-0.7769,0.04842,-0.12226,0.82944,0.04949,-0.12226,0.7737,0.04842,-0.12211,-0.70385,-0.01034,-0.12226,-0.7769,0.04842,-0.12226,-0.82889,0.04949,-0.85625,0.7737,0.04842,-0.85625,0.82944,0.04949,-0.92179,0.70412,-0.08774,-0.12211,0.70412,-0.01034,-0.61159,0.7737,0.04842,-0.61159,0.82944,0.04949,-0.36693,0.7737,0.04842,-0.36693,0.82944,0.04949,-0.66398,-0.70385,-0.05165,-0.36834,-0.70385,-0.02216,-0.61159,-0.82889,0.04949,-0.61159,-0.7769,0.04842,-0.36693,-0.82889,0.04949,-0.36693,-0.7769,0.04842,-0.66398,0.70412,-0.05165,-0.36834,0.70412,-0.02216,-0.92179,-0.70385,-0.05992,-0.66398,-0.70385,-0.02901,-0.36834,-0.70385,-0.00376,-0.12211,-0.70385,0.00636,-0.12211,0.70412,0.00636,-0.36834,0.70412,-0.00376,-0.66398,0.70412,-0.02901,-0.92179,0.70412,-0.05992,-0.91126,-0.73581,-0.04243,-0.65517,-0.73028,-0.01593,-0.12215,0.72216,0.01441,-0.36811,0.7242,0.00573,-0.65517,0.7293,-0.01593,-0.91126,0.73456,-0.04243,-0.36811,-0.72493,0.00573,-0.12215,-0.72278,0.01441,-0.89682,-0.75863,-0.01854,-0.87849,-0.77234,0.01174,-0.64351,-0.75128,0.00134,-0.62898,-0.76681,0.02279,-0.89682,0.7563,-0.01854,-0.87849,0.76935,0.01174,-0.12219,0.73975,0.0241,-0.12224,0.75693,0.03544,-0.3678,0.74248,0.01759,-0.3674,0.75898,0.03182,-0.64351,0.74929,0.00134,-0.62898,0.76409,0.02279,-0.3678,-0.74412,0.01759,-0.3674,-0.76146,0.03182,-0.12219,-0.74127,0.0241,-0.12224,-0.7593,0.03544,-1.03609,0.39057,0.04949,-1.03609,0.13025,0.04949,0.94531,-0.69442,-0.09204,0.92179,-0.70385,-0.08774,0.95354,-0.67555,-0.09366,0.9504,-0.68597,-0.09303,0.95584,-0.65062,-0.09413,0.98964,-0.74261,0.04842,0.99371,-0.71548,0.04842,1.03609,-0.80122,0.04949,1.03434,-0.81286,0.04949,0.98344,-0.75549,0.04842,1.03141,-0.81897,0.04949,0.9738,-0.76585,0.04842,1.02686,-0.82385,0.04949,0.96183,-0.77252,0.04842,1.02119,-0.82701,0.04949,0.9366,-0.7769,0.04842,1.01037,-0.82889,0.04949,0.85625,-0.82889,0.04949,0.85625,-0.7769,0.04842,0.96183,0.76932,0.04842,0.9366,0.7737,0.04842,1.01037,0.82944,0.04949,1.02119,0.82756,0.04949,0.9738,0.76265,0.04842,1.02686,0.8244,0.04949,0.98344,0.75229,0.04842,1.03141,0.81952,0.04949,0.98964,0.73941,0.04842,1.03434,0.81342,0.04949,0.99371,0.71228,0.04842,1.03609,0.80178,0.04949,0.99371,0.6509,0.04842,0.12226,0.82944,0.04949,0.12226,0.7737,0.04842,0.12211,-0.70385,-0.01034,0.12226,-0.7769,0.04842,0.12226,-0.82889,0.04949,0.85625,0.7737,0.04842,0.85625,0.82944,0.04949,0.94531,0.69469,-0.09204,0.95354,0.67581,-0.09366,0.92179,0.70412,-0.08774,0.93872,0.70008,-0.09079,0.95584,0.65084,-0.09412,0.99371,-0.65072,0.04842,0.99371,-0.3904,0.04842,0.99371,-0.13007,0.04842,0.99371,0.13025,0.04842,0.99371,0.39057,0.04842,0.12211,0.70412,-0.01034,0.95584,-0.13004,-0.07819,0.95584,0.13026,-0.07819,0.61159,0.7737,0.04842,0.61159,0.82944,0.04949,0.36693,0.7737,0.04842,0.36693,0.82944,0.04949,0.66398,-0.70385,-0.05165,0.36834,-0.70385,-0.02216,0.61159,-0.82889,0.04949,0.61159,-0.7769,0.04842,0.36693,-0.82889,0.04949,0.36693,-0.7769,0.04842,0.66398,0.70412,-0.05165,0.36834,0.70412,-0.02216,0.95584,0.39055,-0.08483,0.95584,-0.39032,-0.08483,0.95584,-0.65062,-0.06538,0.95354,-0.67555,-0.06499,0.9504,-0.68597,-0.06445,0.94531,-0.69442,-0.0636,0.93872,-0.69981,-0.09079,0.93872,-0.69981,-0.06253,0.92179,-0.70385,-0.05992,0.66398,-0.70385,-0.02901,0.36834,-0.70385,-0.00376,0.12211,-0.70385,0.00636,0.12211,0.70412,0.00636,0.36834,0.70412,-0.00376,0.66398,0.70412,-0.02901,0.92179,0.70412,-0.05992,0.93872,0.70008,-0.06253,0.94531,0.69469,-0.0636,0.9504,0.68624,-0.09303,0.9504,0.68624,-0.06445,0.95354,0.67581,-0.06499,0.95584,0.65084,-0.06538,0.95584,0.39055,-0.05742,0.95584,0.13026,-0.05174,0.95584,-0.13004,-0.05174,0.95584,-0.39032,-0.05742,0.97241,-0.679,-0.04955,0.97018,-0.70489,-0.04922,0.96696,-0.71638,-0.04877,0.96173,-0.72567,-0.04805,0.95492,-0.73163,-0.04714,0.93833,-0.73581,-0.04497,0.93833,0.73456,-0.04496,0.95493,0.73036,-0.04714,0.96173,0.72441,-0.04805,0.96696,0.71514,-0.04877,0.97018,0.70365,-0.04922,0.97241,0.67772,-0.04955,0.91126,-0.73581,-0.04243,0.65517,-0.73028,-0.01593,0.97241,0.65087,-0.04955,0.97241,0.39056,-0.04272,0.12215,0.72216,0.01441,0.36811,0.7242,0.00573,0.65517,0.7293,-0.01593,0.91126,0.73456,-0.04243,0.36811,-0.72493,0.00573,0.12215,-0.72278,0.01441,0.97241,0.13025,-0.03784,0.97241,-0.13005,-0.03784,0.97241,-0.39036,-0.04272,0.97241,-0.65066,-0.04955,0.98424,-0.69928,-0.0253,0.98175,-0.72584,-0.02507,0.99135,-0.71144,0.00736,0.98823,-0.73842,0.00748,0.97798,-0.73811,-0.02473,0.98348,-0.75114,0.00766,0.97195,-0.748,-0.0242,0.97597,-0.7614,0.00796,0.96418,-0.75435,-0.02351,0.96648,-0.76797,0.00834,0.94631,-0.75863,-0.02193,0.94573,-0.77234,0.0092,0.89682,-0.75863,-0.01854,0.87849,-0.77234,0.01174,0.94631,0.7563,-0.02193,0.96418,0.752,-0.02351,0.94573,0.76935,0.0092,0.96648,0.76499,0.00834,0.97195,0.74565,-0.0242,0.97597,0.7584,0.00796,0.97798,0.73578,-0.02473,0.98348,0.74816,0.00766,0.98175,0.72351,-0.02507,0.98823,0.73543,0.00748,0.98424,0.69692,-0.0253,0.99135,0.70844,0.00736,0.98424,0.65088,-0.0253,0.99135,0.6509,0.00736,0.64351,-0.75128,0.00134,0.62898,-0.76681,0.02279,0.89682,0.7563,-0.01854,0.87849,0.76935,0.01174,0.98424,0.39057,-0.02018,0.99135,0.39057,0.0102,0.98424,-0.65069,-0.0253,0.99135,-0.65072,0.00736,0.12219,0.73975,0.0241,0.12224,0.75693,0.03544,0.3678,0.74248,0.01759,0.3674,0.75898,0.03182,0.64351,0.74929,0.00134,0.62898,0.76409,0.02279,0.3678,-0.74412,0.01759,0.3674,-0.76146,0.03182,0.12219,-0.74127,0.0241,0.12224,-0.7593,0.03544,0.98424,0.13025,-0.01652,0.99135,0.13025,0.01223,0.98424,-0.13006,-0.01652,0.99135,-0.13007,0.01223,0.98424,-0.39039,-0.02018,0.99135,-0.39039,0.0102,1.03609,0.6509,0.04949,1.03609,-0.65072,0.04949,1.03609,-0.3904,0.04949,1.03609,-0.13007,0.04949,1.03609,0.13025,0.04949,1.03609,0.39057,0.04949,-1.03609,-0.13007,0.04949,-1.03609,-0.3904,0.04949,-1.03609,-0.65072,0.04949,-1.03609,0.6509,0.04949,-0.99135,-0.39039,0.0102,-0.98424,-0.39039,-0.02018,-0.99135,-0.13007,0.01223,-0.98424,-0.13006,-0.01652,-0.99135,0.13025,0.01223,-0.98424,0.13025,-0.01652,-0.99135,-0.65072,0.00736,-0.98424,-0.65069,-0.0253,-0.99135,0.39057,0.0102,-0.98424,0.39057,-0.02018,-0.99135,0.6509,0.00736,-0.98424,0.65088,-0.0253,-0.99135,0.70844,0.00736,-0.98424,0.69692,-0.0253,-0.98823,0.73543,0.00748,-0.98175,0.72351,-0.02507,-0.98348,0.74816,0.00766,-0.97798,0.73578,-0.02473,-0.97597,0.7584,0.00796,-0.97195,0.74565,-0.0242,-0.96648,0.76499,0.00834,-0.94573,0.76935,0.0092,-0.96418,0.752,-0.02351,-0.94631,0.7563,-0.02193,-0.94573,-0.77234,0.0092,-0.94631,-0.75863,-0.02193,-0.96648,-0.76797,0.00834,-0.96418,-0.75435,-0.02351,-0.97597,-0.7614,0.00796,-0.97195,-0.748,-0.0242,-0.98348,-0.75114,0.00766,-0.97798,-0.73811,-0.02473,-0.98823,-0.73842,0.00748,-0.99135,-0.71144,0.00736,-0.98175,-0.72584,-0.02507,-0.98424,-0.69928,-0.0253,-0.97241,-0.65066,-0.04955,-0.97241,-0.39036,-0.04272,-0.97241,-0.13005,-0.03784,-0.97241,0.13025,-0.03784,-0.97241,0.39056,-0.04272,-0.97241,0.65087,-0.04955,-0.97241,0.67772,-0.04955,-0.97018,0.70365,-0.04922,-0.96696,0.71514,-0.04877,-0.96173,0.72441,-0.04805,-0.95493,0.73036,-0.04714,-0.93833,0.73456,-0.04496,-0.93833,-0.73581,-0.04497,-0.95492,-0.73163,-0.04714,-0.96173,-0.72567,-0.04805,-0.96696,-0.71638,-0.04877,-0.97018,-0.70489,-0.04922,-0.97241,-0.679,-0.04955,-0.95584,-0.39032,-0.05742,-0.95584,-0.13004,-0.05174,-0.95584,0.13026,-0.05174,-0.95584,0.39055,-0.05742,-0.95584,0.65084,-0.06538,-0.95354,0.67581,-0.06499,-0.9504,0.68624,-0.06445,-0.9504,0.68624,-0.09303,-0.94531,0.69469,-0.0636,-0.93872,0.70008,-0.06253,-0.93872,-0.69981,-0.06253,-0.93872,-0.69981,-0.09079,-0.94531,-0.69442,-0.0636,-0.9504,-0.68597,-0.06445,-0.95354,-0.67555,-0.06499,-0.95584,-0.65062,-0.06538,-0.95584,-0.39032,-0.08483,-0.95584,0.39055,-0.08483,-0.95584,0.13026,-0.07819,-0.95584,-0.13004,-0.07819,-0.99371,0.39057,0.04842,-0.99371,0.13025,0.04842,-0.99371,-0.13007,0.04842,-0.99371,-0.3904,0.04842,-0.99371,-0.65072,0.04842,-0.95584,0.65084,-0.09412,-0.93872,0.70008,-0.09079,-0.95354,0.67581,-0.09366,-0.94531,0.69469,-0.09204,-0.99371,0.6509,0.04842,-1.03609,0.80178,0.04949,-0.99371,0.71228,0.04842,-1.03434,0.81342,0.04949,-0.98964,0.73941,0.04842,-1.03141,0.81952,0.04949,-0.98344,0.75229,0.04842,-1.02686,0.8244,0.04949,-0.9738,0.76265,0.04842,-1.02119,0.82756,0.04949,-1.01037,0.82944,0.04949,-0.9366,0.7737,0.04842,-0.96183,0.76932,0.04842,-1.01037,-0.82889,0.04949,-0.9366,-0.7769,0.04842,-1.02119,-0.82701,0.04949,-0.96183,-0.77252,0.04842,-1.02686,-0.82385,0.04949,-0.9738,-0.76585,0.04842,-1.03141,-0.81897,0.04949,-0.98344,-0.75549,0.04842,-1.03434,-0.81286,0.04949,-1.03609,-0.80122,0.04949,-0.99371,-0.71548,0.04842,-0.98964,-0.74261,0.04842,-0.95584,-0.65062,-0.09413,-0.9504,-0.68597,-0.09303,-0.95354,-0.67555,-0.09366,-0.94531,-0.69442,-0.09204], 'vn': [0.12851,0.9917,-0,0,0.02063,0.99979,-0.00061,0.66988,0.74242,0,-0.01923,0.99979,-0.00415,-0.33503,0.94217,0,1,-0,-0.00421,0.32484,0.94574,0,0.02063,0.99979,-0.00058,-0.6715,0.74099,0,-0.01923,0.99979,0.12851,-0.9917,-0,0,-1,-0,-0.00604,-0.57906,0.81524,0,-0.01923,0.99979,-0.00949,-0.42405,0.90558,0,-0.01923,0.99979,0,1,-0,0,0.99997,-0,0,0.02063,0.99979,-0.00629,0.57314,0.81942,0,0.02063,0.99979,-0.00967,0.41408,0.91015,0,-1,-0,0,-0.99997,-0,0.01987,0.83657,0.54747,-0.05731,0.83862,0.54167,-0.03442,0.83581,0.5479,-0.01147,0.83074,0.55651,-0.01132,-0.83563,0.54915,-0.03397,-0.84082,0.54021,-0.05655,-0.84365,0.53386,0.02133,-0.84204,0.53896,-0.08322,0.58238,0.80862,-0.08667,0.51448,0.85308,-0.0181,-0.44572,0.89499,-0.05362,-0.48515,0.87277,-0.08551,-0.53261,0.84201,-0.08194,-0.60021,0.79562,-0.05423,0.46736,0.88238,-0.01825,0.42845,0.90335,-0.05179,0.81335,0.57942,-0.01935,0.95874,0.28358,-0.06754,0.70418,0.70675,-0.03732,0.86581,0.49895,-0.05033,-0.82568,0.56188,-0.01856,-0.96219,0.27168,-0.01569,-0.5179,0.85528,-0.01111,-0.5833,0.81216,-0.04471,-0.59902,0.79946,-0.02863,-0.70229,0.71126,-0.06595,-0.72076,0.68999,-0.03604,-0.87564,0.48158,-0.04547,0.58022,0.81317,-0.0293,0.68499,0.72796,-0.0159,0.49944,0.86618,-0.01126,0.56481,0.8251,0.02527,0,0.99966,0.02527,0,0.99966,-0.76473,0.64431,-0,-0.12851,0.9917,-0,-0.98202,0.18873,-0,-0.91659,0.39976,-0,-0.99893,0.04611,-0,-0.62261,0.19221,0.75854,-0.67302,0.05228,0.73772,-0.02029,0.00244,0.99979,-0.01511,0.00565,0.99985,-0.53679,0.36561,0.76034,-0.01141,0.00824,0.99988,-0.40007,0.51076,0.76095,-0.00848,0.01071,0.99988,-0.20899,0.60689,0.76678,-0.00552,0.01364,0.99988,-0.0502,0.65459,0.75426,-0.00226,0.0174,0.99982,0,0.02063,0.99979,0.00061,0.66988,0.74242,-0.20972,-0.60823,0.76553,-0.05039,-0.65606,0.75298,-0.00211,-0.01642,0.99985,-0.00525,-0.01306,0.99988,-0.40098,-0.51164,0.75985,-0.00815,-0.01035,0.99991,-0.53774,-0.36595,0.75951,-0.01105,-0.00803,0.99988,-0.6231,-0.19205,0.75817,-0.01477,-0.00555,0.99985,-0.67321,-0.0521,0.7376,-0.02011,-0.00244,0.99979,-0.69558,0,0.71841,0,-0.01923,0.99979,0.00415,-0.33503,0.94217,0,1,-0,0.00421,0.32484,0.94574,0,0.02063,0.99979,0.00058,-0.6715,0.74099,0,-0.01923,0.99979,-0.76473,-0.64431,-0,-0.98202,-0.18867,-0,-0.12851,-0.9917,-0,-0.46486,-0.88537,-0,-0.99893,-0.04605,-0,-0.69558,0,0.71841,-0.69411,-0.00018,0.71984,-0.69286,-0.00015,0.72103,-0.69286,0.00015,0.72103,-0.69411,0.00018,0.71984,0,-1,-0,-1,0,-0,-1,0,-0,0.00604,-0.57906,0.81524,0,-0.01923,0.99979,0.00949,-0.42405,0.90558,0,-0.01923,0.99979,0,1,-0,0,0.99997,-0,0,0.02063,0.99979,0.00629,0.57314,0.81942,0,0.02063,0.99979,0.00967,0.41408,0.91015,0,-1,-0,0,-0.99997,-0,-1,0,-0,-0.99997,0,-0,-0.91504,0.02838,0.40229,-0.87289,0.16337,0.4597,-0.77093,0.36164,0.52428,-0.58687,0.57555,0.56944,-0.46486,0.88537,-0,-0.27787,0.76547,0.58034,-0.01987,0.83657,0.54747,0.05731,0.83862,0.54167,0.03442,0.83581,0.5479,0.01147,0.83074,0.55651,0.01132,-0.83563,0.54915,0.03397,-0.84082,0.54021,0.05655,-0.84365,0.53386,-0.02133,-0.84204,0.53896,-0.28065,-0.77026,0.57262,-0.59026,-0.57814,0.56328,-0.91659,-0.39976,-0,-0.77343,-0.36296,0.51961,-0.87396,-0.16401,0.45744,-0.9151,-0.02866,0.40214,-0.91144,0.01019,0.41127,-0.90506,0.00464,0.42521,-0.90506,-0.00464,0.42521,-0.91144,-0.01019,0.41127,-0.78445,0.03793,0.61901,-0.71096,0.14399,0.68831,-0.58788,0.28065,0.75866,-0.42051,0.41679,0.80587,-0.18482,0.54344,0.81881,0.01099,0.59078,0.80673,0.00729,-0.60732,0.7944,-0.19291,-0.55638,0.80819,-0.42982,-0.42451,0.79687,-0.59548,-0.28431,0.75134,-0.71535,-0.14508,0.68349,-0.78573,-0.03809,0.61736,0.08322,0.58238,0.80862,0.08667,0.51448,0.85308,-0.80642,0.00708,0.5913,-0.78762,0.01407,0.61599,0.0181,-0.44572,0.89499,0.05362,-0.48515,0.87277,0.08551,-0.53261,0.84201,0.08194,-0.60021,0.79562,0.05423,0.46736,0.88238,0.01825,0.42845,0.90335,-0.77206,0.0065,0.63549,-0.77206,-0.0065,0.63549,-0.78762,-0.01407,0.61596,-0.80642,-0.00708,0.59127,-0.93432,0.05029,0.35279,-0.89251,0.19129,0.4084,-0.98706,0.06436,0.14673,-0.95602,0.24259,0.16474,-0.79485,0.38203,0.47142,-0.85885,0.47777,0.18467,-0.62325,0.58251,0.52171,-0.67675,0.7084,0.20038,-0.33793,0.76159,0.55296,-0.38243,0.89679,0.22242,-0.06342,0.82678,0.55889,-0.09854,0.96429,0.2458,0.05179,0.81335,0.57942,0.01935,0.95874,0.28358,-0.06653,-0.83776,0.54195,-0.34339,-0.7698,0.53798,-0.09934,-0.96692,0.23484,-0.38426,-0.8984,0.2125,-0.62886,-0.58727,0.50951,-0.6784,-0.70904,0.19236,-0.7991,-0.38411,0.46248,-0.85983,-0.4781,0.17908,-0.8948,-0.19163,0.40318,-0.95663,-0.24226,0.16166,-0.93493,-0.0502,0.35115,-0.98721,-0.06415,0.14585,-0.94436,0.00281,0.32887,-0.99072,0.00058,0.13581,0.06754,0.70418,0.70675,0.03732,0.86581,0.49895,0.05033,-0.82568,0.56188,0.01856,-0.96219,0.27168,-0.93722,0.00623,0.34858,-0.98944,0.00168,0.1449,-0.94436,-0.00281,0.32887,-0.99072,-0.00058,0.13581,0.01569,-0.5179,0.85528,0.01111,-0.5833,0.81216,0.04471,-0.59902,0.79946,0.02863,-0.70229,0.71126,0.06595,-0.72076,0.68999,0.03604,-0.87564,0.48158,0.04547,0.58022,0.81317,0.0293,0.68499,0.72796,0.0159,0.49944,0.86618,0.01126,0.56481,0.8251,-0.93103,0.00308,0.36488,-0.98825,0.00092,0.15265,-0.93103,-0.00308,0.36488,-0.98825,-0.00092,0.15265,-0.93722,-0.00623,0.34858,-0.98944,-0.00168,0.1449,-0.02527,0,0.99966,-0.02527,0,0.99966,-0.02527,0,0.99966,-0.02527,0,0.99966,-0.02527,0,0.99966,-0.02527,0,0.99966,0.02527,0,0.99966,0.02527,0,0.99966,0.02527,0,0.99966,0.02527,0,0.99966,0.98944,-0.00168,0.1449,0.93722,-0.00623,0.34858,0.98825,-0.00092,0.15265,0.93103,-0.00308,0.36488,0.98825,0.00092,0.15265,0.93103,0.00308,0.36488,0.99072,-0.00058,0.13581,0.94436,-0.00281,0.32887,0.98944,0.00168,0.1449,0.93722,0.00623,0.34858,0.99072,0.00058,0.13581,0.94436,0.00281,0.32887,0.98721,-0.06415,0.14585,0.93493,-0.0502,0.35115,0.95663,-0.24226,0.16166,0.8948,-0.19163,0.40318,0.85983,-0.4781,0.17908,0.7991,-0.38411,0.46248,0.6784,-0.70904,0.19233,0.62886,-0.58727,0.50951,0.38426,-0.8984,0.21247,0.09934,-0.96692,0.23484,0.34339,-0.7698,0.53798,0.06653,-0.83776,0.54195,0.09854,0.96429,0.2458,0.06342,0.82678,0.55889,0.38243,0.89679,0.22239,0.33793,0.76159,0.55296,0.67675,0.7084,0.20038,0.62325,0.58251,0.52171,0.85885,0.47777,0.18467,0.79485,0.38203,0.47142,0.95602,0.24259,0.16474,0.98706,0.06436,0.14673,0.89251,0.19129,0.4084,0.93432,0.05029,0.35279,0.80642,-0.00708,0.59127,0.78762,-0.01407,0.61596,0.77206,-0.0065,0.63549,0.77206,0.0065,0.63549,0.78759,0.01407,0.61599,0.80642,0.00708,0.5913,0.78573,-0.03809,0.61736,0.71535,-0.14508,0.68349,0.59548,-0.28431,0.75134,0.42982,-0.42451,0.79687,0.19291,-0.55638,0.80819,-0.00729,-0.60732,0.7944,-0.01099,0.59078,0.80673,0.18482,0.54344,0.81881,0.42051,0.41679,0.80584,0.58788,0.28065,0.75866,0.71096,0.14399,0.68831,0.78445,0.03793,0.61901,0.91144,-0.01019,0.41127,0.90506,-0.00464,0.42521,0.90506,0.00464,0.42521,0.91144,0.01019,0.41127,0.9151,-0.02866,0.40214,0.87396,-0.16401,0.45744,0.77343,-0.36296,0.51961,0.91659,-0.39976,-0,0.59026,-0.57814,0.56328,0.28065,-0.77026,0.57262,0.27787,0.76547,0.58034,0.46486,0.88537,-0,0.58687,0.57555,0.56944,0.77093,0.36164,0.52428,0.87289,0.16337,0.4597,0.91504,0.02838,0.40229,0.99997,0,-0,1,0,-0,1,0,-0,1,0,-0,0.69411,0.00018,0.71984,0.69286,0.00015,0.72103,0.69286,-0.00015,0.72103,0.69411,-0.00018,0.71984,0.69558,0,0.71841,0.99893,-0.04605,-0,0.46486,-0.88537,-0,0.98202,-0.18867,-0,0.76473,-0.64431,-0,0.69558,0,0.71841,0.02011,-0.00244,0.99979,0.67321,-0.0521,0.7376,0.01477,-0.00555,0.99985,0.6231,-0.19205,0.75817,0.01105,-0.00803,0.99988,0.53774,-0.36595,0.75951,0.00815,-0.01035,0.99991,0.40098,-0.51164,0.75985,0.00525,-0.01306,0.99988,0.00211,-0.01642,0.99985,0.05039,-0.65606,0.75298,0.20972,-0.60823,0.76553,0.00226,0.0174,0.99982,0.0502,0.65459,0.75426,0.00552,0.01364,0.99988,0.20899,0.60689,0.76678,0.00848,0.01071,0.99988,0.40007,0.51076,0.76092,0.01141,0.00824,0.99988,0.53679,0.36561,0.76034,0.01511,0.00565,0.99985,0.02029,0.00244,0.99979,0.67302,0.05228,0.73772,0.62261,0.19221,0.75854,0.99893,0.04611,-0,0.91659,0.39976,-0,0.98202,0.18873,-0,0.76473,0.64431,-0], 'f': [13,9,8,15,13,12,3,15,14,18,19,2,21,19,18,6,21,20,0,24,25,16,25,26,17,26,27,23,11,28,22,23,29,10,22,30,24,32,33,34,35,29,35,36,30,36,37,31,25,33,38,26,38,39,32,40,42,40,41,43,41,2,19,211,91,47,46,48,35,47,49,48,4,14,49,48,50,36,49,51,50,14,12,51,50,44,37,51,45,44,12,8,45,33,42,52,42,43,53,43,19,21,38,52,54,52,53,55,53,21,6,66,65,64,68,66,63,70,68,67,71,72,70,73,74,72,76,75,74,80,79,78,82,80,77,83,84,82,85,86,84,87,88,86,106,105,231,79,96,95,105,104,230,95,96,111,110,111,113,112,113,90,116,75,76,116,117,119,118,119,93,125,124,62,126,125,60,127,126,61,129,127,58,130,129,128,131,130,59,132,131,114,133,132,115,121,135,134,120,136,135,99,137,136,100,138,137,97,139,138,140,141,139,98,142,141,101,143,142,144,143,101,145,144,122,146,145,109,123,147,146,62,124,147,124,125,149,125,126,150,126,127,151,127,129,152,130,153,152,137,138,155,139,156,155,141,157,156,142,158,157,143,159,158,130,131,161,143,144,163,135,165,164,136,166,165,137,167,166,131,132,168,132,133,169,144,145,170,145,146,171,147,172,171,124,173,172,148,149,175,174,175,177,176,177,63,149,150,178,175,178,179,177,179,67,150,151,180,178,180,181,179,181,69,151,152,182,180,182,183,181,183,71,153,184,182,182,184,185,183,185,73,153,160,186,184,186,187,185,187,76,154,155,189,189,191,190,191,77,78,156,192,189,192,193,191,193,81,77,157,194,192,194,195,193,195,83,81,158,196,194,196,197,195,197,85,83,159,198,196,198,199,197,199,87,85,162,200,198,200,201,199,201,89,87,160,161,202,186,202,203,187,203,117,154,188,204,188,190,205,190,78,95,162,163,206,200,206,207,201,207,106,173,148,174,208,174,176,209,176,64,165,212,210,212,213,211,213,112,91,166,214,212,214,215,213,215,110,112,167,204,214,204,205,215,205,95,110,161,168,216,202,216,217,203,217,119,168,169,218,216,218,219,217,219,93,163,170,220,206,220,221,207,221,105,170,171,222,220,222,223,221,223,104,172,224,222,224,225,223,225,103,104,173,208,224,208,209,225,209,102,103,130,160,153,143,162,159,137,154,167,124,148,173,28,107,134,3,4,91,12,13,8,14,15,12,4,3,14,1,18,2,20,21,18,7,6,20,16,0,25,17,16,26,5,17,27,29,23,28,30,22,29,31,10,30,25,24,33,28,34,29,29,35,30,30,36,31,26,25,38,27,26,39,33,32,42,42,40,43,43,41,19,210,211,46,164,210,34,211,47,46,34,46,35,46,47,48,47,4,49,35,48,36,48,49,50,49,14,51,36,50,37,50,51,44,51,12,45,38,33,52,52,42,53,53,43,21,39,38,54,54,52,55,55,53,6,313,233,314,319,235,310,312,232,313,93,6,7,210,46,34,54,218,39,218,169,39,6,93,55,55,219,54,219,218,54,93,219,55,28,11,107,39,169,27,93,7,94,63,66,64,67,68,63,169,133,27,69,70,67,69,71,70,71,73,72,73,76,74,77,80,78,81,82,77,81,83,82,83,85,84,85,87,86,87,89,88,78,79,95,64,65,102,110,95,111,112,110,113,91,112,90,117,116,76,118,116,119,94,118,93,60,125,62,61,126,60,58,127,61,128,129,58,59,130,128,114,131,59,115,132,114,92,133,115,107,121,134,121,120,135,120,99,136,99,100,137,100,97,138,97,140,139,140,98,141,98,101,142,122,144,101,109,145,122,108,146,109,108,123,146,123,62,147,148,124,149,149,125,150,150,126,151,151,127,152,129,130,152,154,137,155,138,139,155,139,141,156,141,142,157,142,143,158,160,130,161,162,143,163,134,135,164,135,136,165,136,137,166,161,131,168,168,132,169,163,144,170,170,145,171,146,147,171,147,124,172,174,148,175,176,174,177,64,176,63,175,149,178,177,175,179,63,177,67,178,150,180,179,178,181,67,179,69,180,151,182,181,180,183,69,181,71,152,153,182,183,182,185,71,183,73,184,153,186,185,184,187,73,185,76,188,154,189,188,189,190,190,191,78,155,156,189,189,192,191,191,193,77,156,157,192,192,194,193,193,195,81,157,158,194,194,196,195,195,197,83,158,159,196,196,198,197,197,199,85,159,162,198,198,200,199,199,201,87,186,160,202,187,186,203,76,187,117,167,154,204,204,188,205,205,190,95,200,162,206,201,200,207,89,201,106,208,173,174,209,208,176,102,209,64,164,165,210,210,212,211,211,213,91,165,166,212,212,214,213,213,215,112,166,167,214,214,204,215,215,205,110,202,161,216,203,202,217,117,203,119,216,168,218,217,216,219,119,217,93,206,163,220,207,206,221,106,207,105,220,170,222,221,220,223,105,221,104,171,172,222,222,224,223,223,225,104,172,173,224,224,208,225,225,209,103,91,4,47,3,91,90,164,34,28,134,164,28,104,229,230,105,230,231,103,228,229,106,231,226,102,227,228,89,226,88,65,227,102,104,103,229,89,106,226,103,102,228,92,27,133,92,5,27,341,314,234,319,320,235,314,233,234,310,235,56,313,232,233,311,56,57,312,57,232,236,313,242,237,236,243,273,237,272,238,312,236,239,238,237,274,239,273,311,312,240,240,238,241,241,239,275,310,311,244,244,240,245,245,241,276,314,342,242,242,269,243,243,271,272,319,310,246,246,244,247,247,245,277,248,321,246,249,248,247,278,249,277,250,323,248,251,250,249,279,251,278,252,325,250,253,252,251,280,253,279,254,327,252,255,254,253,281,255,280,256,331,254,258,256,255,282,258,281,257,330,256,259,257,258,259,258,283,335,333,262,262,260,263,285,263,284,337,335,264,264,262,265,265,263,286,339,337,266,266,264,267,267,265,287,343,339,268,268,266,270,270,267,288,342,343,269,269,268,271,271,270,289,290,273,305,291,274,290,275,274,292,276,275,293,277,276,294,295,279,294,296,280,295,298,281,296,299,282,298,286,285,302,287,286,303,288,287,304,289,288,305,306,290,344,309,291,306,309,308,291,308,307,292,307,315,293,317,295,315,297,296,317,318,298,297,316,299,318,301,347,300,347,345,302,345,346,303,346,344,304,342,314,341,321,320,319,323,322,321,325,324,323,327,326,325,327,331,326,331,330,328,335,334,333,337,336,335,337,339,336,339,343,338,343,342,340,305,272,289,294,278,277,242,313,314,243,236,242,272,237,243,236,312,313,237,238,236,273,239,237,240,312,238,241,238,239,275,239,274,244,311,240,245,240,241,276,241,275,242,342,269,243,269,271,272,271,289,246,310,244,247,244,245,277,245,276,246,321,319,247,248,246,277,249,247,248,323,321,249,250,248,278,251,249,250,325,323,251,252,250,279,253,251,252,327,325,253,254,252,280,255,253,254,331,327,255,256,254,281,258,255,256,330,331,258,257,256,283,258,282,262,333,260,263,260,261,284,263,261,264,335,262,265,262,263,286,263,285,266,337,264,267,264,265,287,265,286,268,339,266,270,266,267,288,267,287,269,343,268,271,268,270,289,270,288,305,273,272,290,274,273,292,274,291,293,275,292,294,276,293,294,279,278,295,280,279,296,281,280,298,282,281,302,285,300,303,286,302,304,287,303,305,288,304,344,290,305,306,291,290,291,308,292,292,307,293,293,315,294,315,295,294,317,296,295,297,298,296,318,299,298,300,347,302,302,345,303,303,346,304,304,344,305,311,57,312,310,56,311,321,322,320,323,324,322,325,326,324,326,331,328,328,330,329,333,334,332,335,336,334,336,339,338,338,343,340,340,342,341,45,8,257,44,45,259,37,44,283,333,2,260,260,41,261,261,40,284,283,282,31,300,285,24,10,31,316,0,301,24,330,8,329,333,332,2,31,37,283,24,284,32,257,8,330,259,45,257,283,44,259,260,2,41,261,41,40,284,40,32,31,282,299,24,285,284,316,31,299,24,301,300,329,8,9,2,332,1] } def writeSplits(type, spl): lines = [type + ' ' + ' '.join(v) + '\n' for v in spl] f.writelines(lines) #for v in spl: # print(type + ' ' + ' '.join(v)) def split(a, n): return [a[i:i+n] for i in range(0, len(a), n)] def writeVertices(type, n, a): a = [str(f) for f in a] writeSplits(type, split(a, n)) def writeFaces(a, has_vt, has_vn): def fmerge(f): f = str(f+1) if has_vt and has_vn: return f+'/'+f+'/'+f elif has_vt: return f+'/'+f elif has_vn: return f+'//'+f else: return f a = [fmerge(f) for f in a] writeSplits('f', split(a, 3)) def writeMesh(mesh): for type, a in mesh.iteritems(): vertex_ns = { 'v': 3, 'vn': 3, 'vt': 2 } if type in vertex_ns: writeVertices(type, vertex_ns[type], a) elif type == 'f': writeFaces(a, 'vt' in mesh, 'vn' in mesh) def mesh2Obj(fn, mesh): global f f = open(fn, 'w') f.write('g all\ns 1\n') writeMesh(mesh) f.close() def weld(v1, v2, thresh): for i in range(0, len(v1), 3): r2min = thresh jmin = -1 for j in range(0, len(v2), 3): d = [v2[j+k] - v1[i+k] for k in range(3)] r2 = sum(v*v for v in d) if r2 < thresh and r2 < r2min: r2min = r2 jmin = j if jmin != -1: for k in range(3): avg = (v1[i+k] + v2[jmin+k]) / 2.0 v1[i+k] = v2[jmin+k] = avg weld(screen_mesh['v'], rim_mesh['v'], 0.001) mesh2Obj('screen.obj', screen_mesh) mesh2Obj('rim.obj', rim_mesh)
368.079545
8,760
0.70109
8,048
32,391
2.819831
0.143017
0.008196
0.011721
0.002291
0.668503
0.65872
0.634661
0.435534
0.432273
0.372962
0
0.68243
0.014232
32,391
87
8,761
372.310345
0.028312
0.006792
0
0.086957
0
0
0.001928
0
0
0
0
0
0
1
0.115942
false
0
0
0.014493
0.188406
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
dadf47e94a6afd9150ffd8052f7e4e422e4ed775
187
py
Python
tutorials/unittests/python/tests/test_factorial.py
sherryspain/UCSC-Software-Testing
507a0857ac52283a2ce6ed612a80e7a6fd611649
[ "MIT" ]
null
null
null
tutorials/unittests/python/tests/test_factorial.py
sherryspain/UCSC-Software-Testing
507a0857ac52283a2ce6ed612a80e7a6fd611649
[ "MIT" ]
null
null
null
tutorials/unittests/python/tests/test_factorial.py
sherryspain/UCSC-Software-Testing
507a0857ac52283a2ce6ed612a80e7a6fd611649
[ "MIT" ]
null
null
null
import unittest from python.src import get_factorial class test_factorial(unittest.TestCase): def test_factorial_returns_24(self): self.assertEqual(24, get_factorial.factorial(4))
23.375
50
0.818182
26
187
5.653846
0.615385
0.163265
0
0
0
0
0
0
0
0
0
0.029762
0.101604
187
7
51
26.714286
0.845238
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
dafef9f351903c4d03be4046f4e50575d890bdc8
115
py
Python
packages/@aws-cdk/lambda-layer-awscli/test/lambda-handler/index.py
danwiltshire/aws-cdk
199bd32358a28e194f973bf088cc33f41ddfb567
[ "Apache-2.0" ]
2,484
2018-07-31T15:31:14.000Z
2019-07-11T16:09:50.000Z
packages/@aws-cdk/lambda-layer-awscli/test/lambda-handler/index.py
danwiltshire/aws-cdk
199bd32358a28e194f973bf088cc33f41ddfb567
[ "Apache-2.0" ]
2,206
2018-07-31T14:18:29.000Z
2019-07-11T15:29:30.000Z
packages/@aws-cdk/lambda-layer-awscli/test/lambda-handler/index.py
Nexuscompute/aws-cdk
f4f6e40aa0e56ba55761a56bee542e756046cda6
[ "Apache-2.0" ]
401
2018-07-31T16:03:17.000Z
2019-07-11T16:40:42.000Z
import subprocess def handler(event, context): subprocess.check_call(["/opt/awscli/aws", "--version"]) return
19.166667
57
0.721739
14
115
5.857143
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.113043
115
5
58
23
0.803922
0
0
0
0
0
0.208696
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
9752555b18494dfa5415dba155757ea42e5d47ff
351
py
Python
app/model/user.py
deadheadtn/POC_storytel
f81345cbcf4fc03571122170910247c92897d36f
[ "MIT" ]
null
null
null
app/model/user.py
deadheadtn/POC_storytel
f81345cbcf4fc03571122170910247c92897d36f
[ "MIT" ]
null
null
null
app/model/user.py
deadheadtn/POC_storytel
f81345cbcf4fc03571122170910247c92897d36f
[ "MIT" ]
null
null
null
from app import db class Users(db.Model): id = db.Column(db.Integer, primary_key=True) public_id =db.Column(db.String(50)) name = db.Column(db.String(50)) password = db.Column(db.String(50)) admin = db.Column(db.Boolean) @classmethod def find_by_username(cls, user): return cls.query.filter_by(name = user).first()
27
53
0.672365
55
351
4.2
0.563636
0.17316
0.21645
0.207792
0.233766
0
0
0
0
0
0
0.020979
0.185185
351
12
54
29.25
0.786713
0
0
0
0
0
0
0
0
0
0
0
0
1
0.1
false
0.1
0.1
0.1
0.9
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
1
0
0
1
0
0
4
976aa90d2306c9f3460308f32d07c445c449645b
243
py
Python
students/K33402/Kondrashov_Egor/LR2/commerce/auctions/admin.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
7
2021-09-02T08:20:58.000Z
2022-01-12T11:48:07.000Z
students/K33402/Kondrashov_Egor/LR2/commerce/auctions/admin.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
76
2021-09-17T23:01:50.000Z
2022-03-18T16:42:03.000Z
students/K33402/Kondrashov_Egor/LR2/commerce/auctions/admin.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
60
2021-09-04T16:47:39.000Z
2022-03-21T04:41:27.000Z
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Listing) admin.site.register(ListingComment) admin.site.register(Bid) admin.site.register(WatchList) admin.site.register(ListingCategory)
24.3
36
0.81893
32
243
6.21875
0.46875
0.226131
0.427136
0
0
0
0
0
0
0
0
0
0.078189
243
9
37
27
0.888393
0.106996
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.285714
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
976b08f303dbf852132283558069f0e5e7a72a03
290
py
Python
tests/test_utils.py
RobertoRoos/pyads
fd1c36198a31711bc7611e0ef1e2ac725f020468
[ "MIT" ]
138
2017-12-12T11:19:05.000Z
2022-03-13T10:49:36.000Z
tests/test_utils.py
RobertoRoos/pyads
fd1c36198a31711bc7611e0ef1e2ac725f020468
[ "MIT" ]
258
2018-01-09T17:07:18.000Z
2022-03-28T21:02:02.000Z
tests/test_utils.py
RobertoRoos/pyads
fd1c36198a31711bc7611e0ef1e2ac725f020468
[ "MIT" ]
68
2017-12-13T19:53:40.000Z
2022-03-28T01:07:17.000Z
from unittest import TestCase from pyads.utils import deprecated class UtilsTestCase(TestCase): def test_deprecated_decorator(self): @deprecated() def deprecated_fct(): pass with self.assertWarns(DeprecationWarning): deprecated_fct()
20.714286
50
0.675862
28
290
6.857143
0.642857
0.135417
0
0
0
0
0
0
0
0
0
0
0.258621
290
13
51
22.307692
0.893023
0
0
0
0
0
0
0
0
0
0
0
0.111111
1
0.222222
false
0.111111
0.222222
0
0.555556
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
9787043c65e285ee2a0e3b68e09869d2ef67e982
24
py
Python
owslib/__init__.py
bradh/OWSLib
38282ae839db47eab02e7fbcbce3199f4dfeea7b
[ "BSD-3-Clause" ]
1
2015-03-16T05:22:04.000Z
2015-03-16T05:22:04.000Z
owslib/__init__.py
bradh/OWSLib
38282ae839db47eab02e7fbcbce3199f4dfeea7b
[ "BSD-3-Clause" ]
null
null
null
owslib/__init__.py
bradh/OWSLib
38282ae839db47eab02e7fbcbce3199f4dfeea7b
[ "BSD-3-Clause" ]
1
2021-04-10T21:23:49.000Z
2021-04-10T21:23:49.000Z
__version__ = '0.8-dev'
12
23
0.666667
4
24
3
1
0
0
0
0
0
0
0
0
0
0
0.095238
0.125
24
1
24
24
0.47619
0
0
0
0
0
0.291667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
979d8ab06362a85004234b1f95a650f1156a7072
134
py
Python
Post/api/pagination.py
mrvafa/blog-api
cef0773b3199bfb785126ce82567fd7fc78e6c89
[ "MIT" ]
null
null
null
Post/api/pagination.py
mrvafa/blog-api
cef0773b3199bfb785126ce82567fd7fc78e6c89
[ "MIT" ]
null
null
null
Post/api/pagination.py
mrvafa/blog-api
cef0773b3199bfb785126ce82567fd7fc78e6c89
[ "MIT" ]
null
null
null
from rest_framework.pagination import PageNumberPagination class PostPageNumberPagination(PageNumberPagination): page_size = 10
22.333333
58
0.850746
12
134
9.333333
0.916667
0
0
0
0
0
0
0
0
0
0
0.016807
0.11194
134
5
59
26.8
0.92437
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
1
0
0
4
97a9d169b780a01808ab19d667046e5731670041
2,706
py
Python
common/tests/test_numpy_fast.py
jamcar23/openpilot
8a609b73710f723686c1a944770c5b19f209a0ca
[ "MIT" ]
5
2020-12-23T01:49:04.000Z
2021-08-28T23:42:52.000Z
common/tests/test_numpy_fast.py
jamcar23/openpilot
8a609b73710f723686c1a944770c5b19f209a0ca
[ "MIT" ]
60
2020-09-03T15:23:38.000Z
2021-12-17T12:39:50.000Z
common/tests/test_numpy_fast.py
jamcar23/openpilot
8a609b73710f723686c1a944770c5b19f209a0ca
[ "MIT" ]
2
2020-12-07T20:04:19.000Z
2022-03-05T08:00:03.000Z
import numpy as np import unittest from common.numpy_fast import interp class InterpTest(unittest.TestCase): def test_correctness_controls(self): _A_CRUISE_MIN_BP = np.asarray([0., 5., 10., 20., 40.]) _A_CRUISE_MIN_V = np.asarray([-1.0, -.8, -.67, -.5, -.30]) v_ego_arr = [-1, -1e-12, 0, 4, 5, 6, 7, 10, 11, 15.2, 20, 21, 39, 39.999999, 40, 41] expected = np.interp(v_ego_arr, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V) actual = interp(v_ego_arr, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V) np.testing.assert_equal(actual, expected) for v_ego in v_ego_arr: expected = np.interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V) actual = interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V) np.testing.assert_equal(actual, expected) def test_short_bp_long_v(self): bp_test_cases = ([0], [0, 5], [0., 5., 10.], [0., 5., 10., 20], [-1., 2., 13., 16]) bp_expected_cases = ([0, 0, 0, 0, 0], [0, 5, 5, 5, 5], [0., 5., 10., 10., 10.], [0., 5., 10., 20., 20.], [-1., 2., 13., 16, 16.]) _A_CRUISE_MIN_V = np.asarray([-1.0, -.8, -.67, -.5, -.30]) v_ego_arr = [-1, -1e-12, 0, 4, 5, 6, 7, 10, 11, 15.2, 20, 21, 39, 39.999999, 40, 41] for bp_a, bp_e in zip(bp_test_cases, bp_expected_cases): with self.subTest(msg='Checking if bp_a equals bp_e', bp_a=bp_a, bp_e=bp_e): expected = np.interp(v_ego_arr, bp_e, _A_CRUISE_MIN_V) actual = interp(v_ego_arr, bp_a, _A_CRUISE_MIN_V) np.testing.assert_equal(actual, expected) for v_ego in v_ego_arr: expected = np.interp(v_ego, bp_e, _A_CRUISE_MIN_V) actual = interp(v_ego, bp_a, _A_CRUISE_MIN_V) np.testing.assert_equal(actual, expected) def test_long_bp_short_v(self): _A_CRUISE_MIN_BP = np.asarray([0., 5., 10., 20., 40.]) v_test_cases = ([-1.0], [-1.0, -.8], [-1.0, -.8, -.67], [-1.0, -.8, -.67, -.5]) v_expected_cases = ([-1.0, -1., -1., -1., -1.], [-1.0, -.8, -.8, -.8, -.8], [-1.0, -.8, -.67, -.67, -.67], [-1.0, -.8, -.67, -.5, -.5]) v_ego_arr = [-1, -1e-12, 0, 4, 5, 6, 7, 10, 11, 15.2, 20, 21, 39, 39.999999, 40, 41] for v_a, v_e in zip(v_test_cases, v_expected_cases): with self.subTest(msg='Checking if v_a equals v_e', v_a=v_a, v_e=v_e): expected = np.interp(v_ego_arr, _A_CRUISE_MIN_BP, v_e) actual = interp(v_ego_arr, _A_CRUISE_MIN_BP, v_a) np.testing.assert_equal(actual, expected) for v_ego in v_ego_arr: expected = np.interp(v_ego, _A_CRUISE_MIN_BP, v_e) actual = interp(v_ego, _A_CRUISE_MIN_BP, v_a) np.testing.assert_equal(actual, expected) if __name__ == "__main__": unittest.main()
42.28125
139
0.597931
502
2,706
2.868526
0.135458
0.058333
0.138889
0.083333
0.766667
0.734722
0.723611
0.70625
0.649306
0.645139
0
0.109583
0.22099
2,706
63
140
42.952381
0.573529
0
0
0.395833
0
0
0.022912
0
0
0
0
0
0.125
1
0.0625
false
0
0.0625
0
0.145833
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
97aceb53e7f1dbcaf4f82c5005cf1af8fc591b83
162
py
Python
main_ignore.py
WarriorsSami/Alexis
52cd2a995d1f483331fa85d34ce5b4315f2f154d
[ "Apache-2.0" ]
null
null
null
main_ignore.py
WarriorsSami/Alexis
52cd2a995d1f483331fa85d34ce5b4315f2f154d
[ "Apache-2.0" ]
null
null
null
main_ignore.py
WarriorsSami/Alexis
52cd2a995d1f483331fa85d34ce5b4315f2f154d
[ "Apache-2.0" ]
null
null
null
from WebDriverCreator import WebDriverCreator from util import getAppConfig from app import App import time config = getAppConfig() App = App(config) App.run()
16.2
45
0.802469
21
162
6.190476
0.428571
0.138462
0
0
0
0
0
0
0
0
0
0
0.141975
162
9
46
18
0.935252
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
97d291bab2edc45cd37a69551c650d3004de40f8
26,691
py
Python
FunctionalTest/RAS/VistA-FOIA/Packages/Problem List/PLMain01_suite.py
JimDeanSpivey/ATF-for-Vista-FOIA
fbc07e98e307dee192fa1ca8cbf0137895376847
[ "Apache-2.0" ]
1
2015-12-10T20:45:34.000Z
2015-12-10T20:45:34.000Z
FunctionalTest/RAS/VistA-FOIA/Packages/Problem List/PLMain01_suite.py
JimDeanSpivey/ATF-for-Vista-FOIA
fbc07e98e307dee192fa1ca8cbf0137895376847
[ "Apache-2.0" ]
null
null
null
FunctionalTest/RAS/VistA-FOIA/Packages/Problem List/PLMain01_suite.py
JimDeanSpivey/ATF-for-Vista-FOIA
fbc07e98e307dee192fa1ca8cbf0137895376847
[ "Apache-2.0" ]
null
null
null
''' Created on Mar 9, 2012 @author: pbradley ''' import sys sys.path = ['./FunctionalTest/RAS/lib'] + ['./dataFiles'] + ['./lib/vista'] + sys.path from PLActions import PLActions from ORActions import ORActions import TestHelper def pl_test001(test_suite_details): ''' NIST Inpatient Test ''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='333224444', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.editinactivate(ssn='333224444', probnum='4', resdate='08/29/2010') pl.editinactivate(ssn='333224444', probnum='3', resdate='08/29/2010') pl.verplist(ssn='333224444', vlist=['Essential Hypertension', 'Chronic airway obstruction']) pl.verify(ssn='333224444', probnum='1', itemnum='1', evalue='Essential Hypertension') pl.verify(ssn='333224444', probnum='2', itemnum='1', evalue='Chronic airway obstruction') pl.verify(ssn='333224444', probnum='1', itemnum='1', evalue='Acute myocardial', view='IA') pl.verify(ssn='333224444', probnum='2', itemnum='1', evalue='Congestive Heart Failure', view='IA') for i in range(4): pl.rem(ssn='333224444') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test002(test_suite_details): ''' Restore Removed Problems ''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='888776666', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.editinactivate(ssn='888776666', probnum='4', resdate='08/29/2010') pl.editinactivate(ssn='888776666', probnum='3', resdate='08/29/2010') pl.verplist(ssn='888776666', vlist=['Essential Hypertension', 'Chronic airway obstruction']) pl.verify(ssn='888776666', probnum='1', itemnum='1', evalue='Essential Hypertension') pl.verify(ssn='888776666', probnum='2', itemnum='1', evalue='Chronic airway obstruction') pl.verify(ssn='888776666', probnum='1', itemnum='1', evalue='Acute myocardial', view='IA') pl.verify(ssn='888776666', probnum='2', itemnum='1', evalue='Congestive Heart Failure', view='IA') for i in range(4): pl.rem(ssn='888776666') pl.checkempty(ssn='888776666') pl.replace(ssn='888776666', probnum='1') pl.verify(ssn='888776666', probnum='1', itemnum='1', evalue='Essential Hypertension') pl.rem(ssn='888776666') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test003(test_suite_details): ''' Change Problem Data ''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='656771234', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.editsimple(ssn='656771234', probnum='1', itemnum='1', chgval='787.1') pl.editsimple(ssn='656771234', probnum='1', itemnum='2', chgval='3/26/12') pl.editsimple(ssn='656771234', probnum='1', itemnum='4', chgval='MANAGER') pl.editsimple(ssn='656771234', probnum='1', itemnum='5', chgval='VISTA') pl.verify(ssn='656771234', probnum='1', itemnum='1', evalue='Heartburn') pl.verify(ssn='656771234', probnum='1', itemnum='2', evalue='3/26/12') pl.verify(ssn='656771234', probnum='1', itemnum='4', evalue='MANAGER,SYSTEM') pl.verify(ssn='656771234', probnum='1', itemnum='5', evalue='VISTA') for i in range(4): pl.rem(ssn='656771234') pl.checkempty(ssn='656771234') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test004(test_suite_details): ''' Create Problem Selection List, add/modify/remove categories and problems ''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1) pl.signon() pl.createsellist(listname="List001", clinic='VISTA') pl.createcat(listname='List001', catname='cat001') pl.createcat(listname='List001', catname='cat002') pl.catad(listname='List001', catname='cat001', icd='787.1') pl.catad(listname='List001', catname='cat001', icd='786.50') pl.catad(listname='List001', catname='cat001', icd='100.0') pl.catad(listname='List001', catname='cat002', icd='780.50') pl.catad(listname='List001', catname='cat002', icd='292.0') pl.catad(listname='List001', catname='cat002', icd='304.90') pl.sellistad(listname='List001', catname='cat001') pl.sellistad(listname='List001', catname='cat002') pl.versellist(ssn='656454321', clinic='VISTA', vlist=['List001', 'cat001', 'Heartburn', 'chest pain', 'Leptospirosis', 'cat002', 'Sleep Disturbance', 'Drug withdrawal', 'drug dependence']) pl.add(ssn='656454321', clinic='VISTA', probnum='1', comment='this is a test', onsetdate='t', status='Active', acutechronic='A', service='N', evalue='Heartburn') pl.verify(ssn='656454321', probnum='1', itemnum='1', evalue='Heartburn') pl.rem(ssn='656454321') pl.sellistrm(listname='List001') pl.sellistrm(listname='List001') pl.catdl(listname='List001', catname='cat001') pl.catdl(listname='List001', catname='cat002') pl.sellistrfu(listname='List001', username='Alexander') pl.sellistdl(listname='List001') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test005(test_suite_details): ''' Create Problem Selection List, assign to user, and add problem ''' '''Separate VistA Instances to allow concurrent logins in case of future use of tstart and trollback when these features are available''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: test_driver.testname = test_driver.testname + "_01" VistA1 = test_driver.connect_VistA(test_suite_details) pl1 = PLActions(VistA1) pl1.signon() pl1.createsellist(listname="List002", clinic='') pl1.sellistgal(listname="List002", username='Alexander') pl1.createcat(listname='List002', catname='cat011') pl1.createcat(listname='List002', catname='cat022') pl1.catad(listname='List002', catname='cat011', icd='787.1') pl1.catad(listname='List002', catname='cat011', icd='786.50') pl1.catad(listname='List002', catname='cat011', icd='100.0') pl1.catad(listname='List002', catname='cat022', icd='780.50') pl1.catad(listname='List002', catname='cat022', icd='292.0') pl1.catad(listname='List002', catname='cat022', icd='304.90') pl1.sellistad(listname='List002', catname='cat011') pl1.sellistad(listname='List002', catname='cat022') test_driver.testname = test_driver.testname + "_02" VistA2 = test_driver.connect_VistA(test_suite_details) pl2 = PLActions(VistA2, user='fakedoc1', code='1Doc!@#$') pl2.signon() pl2.versellist(ssn='345623902', clinic='', vlist=['List002', 'cat011', 'Heartburn', 'chest pain', 'Leptospirosis', 'cat022', 'Sleep Disturbance', 'Drug withdrawal', 'drug dependence']) pl2.add(ssn='345623902', clinic='', probnum='1', comment='this is a test', onsetdate='t', status='Active', acutechronic='A', service='N', evalue='Heartburn') pl2.verify(ssn='345623902', probnum='1', itemnum='1', evalue='Heartburn') pl2.rem(ssn='345623902') pl1.sellistrm(listname='List002') pl1.sellistrm(listname='List002') pl1.catdl(listname='List002', catname='cat011') pl1.catdl(listname='List002', catname='cat022') pl1.sellistrfu(listname='List002', username='Alexander') pl1.sellistdl(listname='List002') pl2.signoff() pl1.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test006 (test_suite_details): ''' Create Selection List from IB Encounter Form''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA, user='fakenurse1', code='1Nur!@#$') pl.signon() pl.createibform('LAB', 'FORM1', 'Group1', ['428.0', '410.90', '401.9']) pl.sellistib('FORM1', 'List003', 'LAB') pl.versellist(ssn='345238901', clinic='LAB', vlist=['List003', 'Group1', 'Congestive Heart Failure', 'Acute myocardial', 'Essential Hypertension']) pl.add(ssn='345238901', clinic='LAB', probnum='1', comment='this is a test', onsetdate='t', status='Active', acutechronic='A', service='N', evalue='Congestive') pl.verify(ssn='345238901', probnum='1', itemnum='1', evalue='Congestive') pl.rem('345238901') pl.sellistrm(listname='List003') pl.catdl(listname='List003', catname='Group1') pl.sellistrfu(listname='List003', username='Alexander') pl.sellistdl(listname='List003') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test007 (test_suite_details): ''' Add problems and View Patients by Problems (PL menu items 4 & 5)''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='655447777', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.addcsv(ssn='543236666', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.addcsv(ssn='345678233', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.verlistpats(vlist=['EIGHT,PATIENT', 'ONE,PATIENT', 'TWELVE,PATIENT']) pl.verpatsrch(prob='428.0', vlist=['EIGHT,PATIENT', 'ONE,PATIENT', 'TWELVE,PATIENT']) for i in range(4): pl.rem('655447777') pl.rem('543236666') pl.rem('345678233') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test008 (test_suite_details): ''' Add problem via data entry as clerk and change as doctor''' '''Multiple VistA instances to allow concurrent logins for when tstart and trollback become available and implemented''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: test_driver.testname = test_driver.testname + "_01" VistA1 = test_driver.connect_VistA(test_suite_details) pl1 = PLActions(VistA1, user='fakeclerk1', code='1Cle!@#$') pl1.signon() pl1.dataentry(ssn='666551234', provider='Alexander', clinic='', problem='chest pain', comment='test', onsetdate='t', status='Active', acutechronic='A', service='N') pl1.signoff() test_driver.testname = test_driver.testname + "_01" VistA2 = test_driver.connect_VistA(test_suite_details) pl2 = PLActions(VistA2, user='fakedoc1', code='1Doc!@#$') pl2.signon() pl2.editsimple(ssn='666551234', probnum='1', itemnum='1', chgval='786.50') pl2.verplist(ssn='666551234', vlist=['Unspecified chest pain']) pl2.rem('666551234') pl2.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test009 (test_suite_details): ''' Verify Problem List through Order Entry package''' '''Multiple VistA instances to allow concurrent logins for when tstart and trollback become available and implemented''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: test_driver.testname = test_driver.testname + "_01" VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='323678904', pfile='./FunctionalTest/dataFiles/NISTinpatientdata0.csv') pl.verplist(ssn='323678904', vlist=['Essential Hypertension', 'Chronic airway obstruction', 'Acute myocardial', 'Congestive Heart Failure']) pl.signoff() test_driver.testname = test_driver.testname + "_02" VistA2 = test_driver.connect_VistA(test_suite_details) oentry = ORActions(VistA2) oentry.signon() oentry.verproblems(ssn='323678904', vlist=['Essential Hypertension', 'Chronic airway obstruction', 'Acute myocardial', 'Congestive Heart Failure']) oentry.signoff() test_driver.testname = test_driver.testname + "_03" VistA3 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA3, user='fakedoc1', code='1Doc!@#$') pl.signon() for i in range(4): pl.rem('323678904') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test010(test_suite_details): ''' Add problems to Problem List and then Remove them. ''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='323554545', pfile='./FunctionalTest/dataFiles/probdata0.csv') pl.verplist(ssn='323554545', vlist=['drug abuse', 'Arterial embolism']) pl.rem(ssn='323554545') pl.rem(ssn='323554545') pl.checkempty(ssn='323554545') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test011(test_suite_details): ''' Add a problem, add comments, and then remove to/from Problem List. ''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='656451234', pfile='./FunctionalTest/dataFiles/probdata0.csv') pl.verplist(ssn='656451234', vlist=['drug abuse', 'Arterial embolism']) pl.comcm(ssn='656451234', probnum='1', comment='this is XZY a test') pl.rem(ssn='656451234') pl.rem(ssn='656451234') pl.checkempty(ssn='656451234') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test012(test_suite_details): '''Problem List Menu Testing''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: ''' TODO: need to rethink how to make multiple test connects happen with different test names? Using sys._getframe().f_code.co_name works in a single connect per test paradigm. ''' test_driver.testname = test_driver.testname + "_01" VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.addcsv(ssn='656451234', pfile='./FunctionalTest/dataFiles/probdata0.csv') pl.detview(ssn='656451234', probnum='2', vlist1=['ACTIVE', 'ALEXANDER', '444.21'], vlist2=['hurts']) pl.rem(ssn='656451234') pl.rem(ssn='656451234') pl.checkempty(ssn='656451234') pl.signoff() test_driver.testname = test_driver.testname + "_02" VistA2 = test_driver.connect_VistA(test_suite_details) p2 = PLActions(VistA2, user='fakeclerk1', code='1Cle!@#$') p2.signon() p2.dataentry(ssn='656451234', provider='Alexander', clinic='', problem='305.91', comment='Test', onsetdate='t', status='a', acutechronic='A', service='n') p2.signoff() test_driver.testname = test_driver.testname + "_03" VistA3 = test_driver.connect_VistA(test_suite_details) p3 = PLActions(VistA3, user='fakedoc1', code='1Doc!@#$') p3.signon() p3.verifyproblem(ssn='656451234', problem='305.91') p3.signoff() test_driver.testname = test_driver.testname + "_04" VistA4 = test_driver.connect_VistA(test_suite_details) p4 = PLActions(VistA4, user='fakedoc1', code='1Doc!@#$') p4.signon() p4.selectnewpatient(ssn1='656451234', name1='SIX,', ss2='323554545', name2='NINE,') p4.signoff() test_driver.testname = test_driver.testname + "_05" VistA5 = test_driver.connect_VistA(test_suite_details) p5 = PLActions(VistA5, user='fakedoc1', code='1Doc!@#$') p5.signon() p5.addcsv(ssn='656451234', pfile='./FunctionalTest/dataFiles/probdata0.csv') p5.printproblemlist(ssn='656451234', vlist=['PROBLEM LIST', '305.91']) p5.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def pl_test013(test_suite_details): #Tests the remainder of the selection list Build menu options testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) pl = PLActions(VistA1, user='fakedoc1', code='1Doc!@#$') pl.signon() pl.createsellist(listname="List001", clinic='VISTA') pl.createsellist(listname="List002", clinic='VISTA') pl.createcat(listname='List001', catname='cat001') pl.createcat(listname='List001', catname='cat002') pl.catad(listname='List001', catname='cat001', icd='787.1') pl.catad(listname='List001', catname='cat001', icd='786.50') pl.catad(listname='List001', catname='cat001', icd='100.0') pl.catad(listname='List001', catname='cat002', icd='780.50') pl.catad(listname='List001', catname='cat002', icd='292.0') pl.catad(listname='List001', catname='cat002', icd='304.90') pl.sellistad(listname='List001', catname='cat001') pl.sellistad(listname='List001', catname='cat002') pl.resequencecat(listname='List001', catnames=['cat001', 'cat002']) pl.categorydisp(listname='List001', catname='cat001') pl.changesellist(list1='List001', list2='List002') pl.sellistrm(listname='List001') pl.sellistrm(listname='List001') pl.catdl(listname='List001', catname='cat001') pl.catdl(listname='List001', catname='cat002') pl.sellistrfu(listname='List001', username='Alexander') pl.sellistdl(listname='List001') pl.sellistdl(listname='List002') pl.signoff() test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def startmon(test_suite_details): '''Starts Coverage Monitor''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: VistA1 = test_driver.connect_VistA(test_suite_details) VistA1.startCoverage(routines=['GMPL*']) #TODO: move out of OSEHRA helper? ''' Close Vista ''' VistA1.write('^\r^\r^\r') VistA1.write('h\r') test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) def stopmon (test_suite_details): ''' STOP MONITOR''' testname = sys._getframe().f_code.co_name test_driver = TestHelper.TestDriver(testname) test_driver.pre_test_run(test_suite_details) try: # Connect to VistA VistA1 = test_driver.connect_VistA(test_suite_details) VistA1.stopCoverage(path=(test_suite_details.result_dir + '/' + 'ProblemList_coverage.txt')) #TODO: move out of OSEHRA helper? ''' Close Vista ''' VistA1.write('^\r^\r^\r') VistA1.write('h\r') test_driver.post_test_run(test_suite_details) except TestHelper.TestError, e: test_driver.exception_handling(test_suite_details, e) else: test_driver.try_else_handling(test_suite_details) finally: test_driver.finally_handling(test_suite_details) test_driver.end_method_handling(test_suite_details) ''' def connect_VistA(testname, result_dir): # Connect to VistA logging.debug('Connect_VistA') from OSEHRAHelper import ConnectToMUMPS,PROMPT VistA = ConnectToMUMPS(logfile=result_dir + '/' + testname + '.txt', instance='', namespace='') if VistA.type=='cache': try: VistA.ZN('VISTA') except IndexError,no_namechange: pass VistA.wait(PROMPT) return VistA '''
45.625641
162
0.651456
3,097
26,691
5.400387
0.116242
0.090882
0.123408
0.086099
0.789178
0.748401
0.72012
0.665949
0.637369
0.608311
0
0.072672
0.21895
26,691
584
163
45.703767
0.729601
0.005283
0
0.689379
0
0
0.156847
0.022297
0
0
0
0.005137
0
0
null
null
0
0.008016
null
null
0.002004
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
8ae79799648a9dfd0b002515cdfe82378a6b0f0a
42
py
Python
tools/extra/pypackager/opae/tools/packager/__init__.py
trixirt/opae-sdk
71ac5d4a7923826bc3b6c8e971b5b3b48a08044d
[ "BSD-3-Clause" ]
null
null
null
tools/extra/pypackager/opae/tools/packager/__init__.py
trixirt/opae-sdk
71ac5d4a7923826bc3b6c8e971b5b3b48a08044d
[ "BSD-3-Clause" ]
null
null
null
tools/extra/pypackager/opae/tools/packager/__init__.py
trixirt/opae-sdk
71ac5d4a7923826bc3b6c8e971b5b3b48a08044d
[ "BSD-3-Clause" ]
null
null
null
from packager import main __all__=['main']
21
25
0.785714
6
42
4.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.095238
42
2
26
21
0.763158
0
0
0
0
0
0.093023
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8aeaf8f1dcbf05a0cd9071a9ce4cb03c7bec25a7
821
py
Python
application/model/entity/product.py
UniversidadeDeVassouras/labproginter-2020.2-LucasLeal-p2
dc0185381e3ca86b5213b8393d12bca0cdee4c7c
[ "Apache-2.0" ]
2
2021-01-06T14:19:26.000Z
2021-09-10T01:43:51.000Z
application/model/entity/product.py
UniversidadeDeVassouras/labproginter-2020.2-LucasLeal-p2
dc0185381e3ca86b5213b8393d12bca0cdee4c7c
[ "Apache-2.0" ]
null
null
null
application/model/entity/product.py
UniversidadeDeVassouras/labproginter-2020.2-LucasLeal-p2
dc0185381e3ca86b5213b8393d12bca0cdee4c7c
[ "Apache-2.0" ]
1
2020-12-22T13:51:39.000Z
2020-12-22T13:51:39.000Z
class Product: def __init__(self, id, name, image, old_price, price, description, installments, value): self._id = id self.name = name self.image = image self.old_price = old_price self.price = price self.description = description self.installments = installments self.value = value def get_id(self): return self._id def get_name(self): return self.name def get_image(self): return self.image def get_old_price(self): return self.old_price def get_price(self): return self.price def get_description(self): return self.description def get_installments(self): return self.installments def get_value(self): return self.value
24.147059
92
0.601705
98
821
4.846939
0.153061
0.101053
0.235789
0.08
0
0
0
0
0
0
0
0
0.325213
821
34
93
24.147059
0.857401
0
0
0
0
0
0
0
0
0
0
0
0
1
0.346154
false
0
0
0.307692
0.692308
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8afd8b212f7592d99d2d966ecdb09403bdd0ae8d
72
py
Python
src/demo/__init__.py
weijinqian0/feature_eda
cf2167eeac726fb33ce2ae5c7051412815601b8b
[ "Apache-2.0" ]
6
2020-12-09T11:06:49.000Z
2021-09-13T08:00:55.000Z
src/demo/__init__.py
weijinqian0/feature_eda
cf2167eeac726fb33ce2ae5c7051412815601b8b
[ "Apache-2.0" ]
null
null
null
src/demo/__init__.py
weijinqian0/feature_eda
cf2167eeac726fb33ce2ae5c7051412815601b8b
[ "Apache-2.0" ]
3
2020-11-15T15:23:39.000Z
2021-07-17T08:06:46.000Z
base_data_path = '/Users/weijinqian/Documents/feature/feature_eda/data'
36
71
0.833333
10
72
5.7
0.8
0
0
0
0
0
0
0
0
0
0
0
0.041667
72
1
72
72
0.826087
0
0
0
0
0
0.722222
0.722222
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c100959f7f1a432e5567a2883e17e9aec87b6505
175
py
Python
algorithms/1431. Kids With the Greatest Number of Candies.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
1
2020-12-02T13:54:30.000Z
2020-12-02T13:54:30.000Z
algorithms/1431. Kids With the Greatest Number of Candies.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
algorithms/1431. Kids With the Greatest Number of Candies.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
class Solution: def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]: maxn = max(candies) return [x+extraCandies >= maxn for x in candies]
35
81
0.697143
23
175
5.304348
0.695652
0
0
0
0
0
0
0
0
0
0
0
0.177143
175
4
82
43.75
0.847222
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c1295543558c81b0b89ab6067ca0e0276be5eeb3
1,815
py
Python
controller/secondary/secondary.py
JakobProssinger/-StratoFlight-System-Control
1ebd154b4e15709d244fb88d5e54746102356acf
[ "MIT" ]
2
2021-12-14T16:25:01.000Z
2022-01-11T16:58:47.000Z
controller/secondary/secondary.py
JakobProssinger/-StratoFlight-System-Control
1ebd154b4e15709d244fb88d5e54746102356acf
[ "MIT" ]
1
2022-01-24T21:07:16.000Z
2022-01-24T21:07:16.000Z
controller/secondary/secondary.py
JakobProssinger/-StratoFlight-System-Control
1ebd154b4e15709d244fb88d5e54746102356acf
[ "MIT" ]
null
null
null
""" @File: secondary.py @Descrption: @Author: Prossinger Jakob @Date: 8 March 2022 @Todo: * """ import RPi.GPIO as GPIO class Secondary(): # TODO change to global SHUTDOWN_REQUEST = GPIO.HIGH NOT_SHUTDOWN_REQUEST = GPIO.LOW SHUTDOWN = GPIO.LOW NOT_SHUTDOWN = GPIO.HIGH def __init__(self, raspberry_name: str, request_pin: int, power_off_pin: int, shutdown_voltage: float, power_on_voltage: float): self.name: str = raspberry_name self.request_pin: int = request_pin self.power_off_pin: int = power_off_pin self._request_status: bool = Secondary.NOT_SHUTDOWN_REQUEST self._power_status: bool = Secondary.NOT_SHUTDOWN self.shutdown_voltage: float = shutdown_voltage self.power_on_voltage: float = power_on_voltage def get_Name(self) -> str: return self.name def get_Power_status(self) -> bool: return self._power_status def get_Request_status(self) -> bool: return self._request_status def get_Shutdown_voltage(self) -> float: return self.shutdown_voltage def get_Power_on_voltage(self) -> float: return self.power_on_voltage def request_shutdown(self) -> None: GPIO.output(self.request_pin, Secondary.SHUTDOWN_REQUEST) self._request_status = Secondary.SHUTDOWN_REQUEST def shutdown(self) -> None: GPIO.output(self.power_off_pin, Secondary.SHUTDOWN) self._power_status = Secondary.SHUTDOWN def turn_on(self) -> None: GPIO.output(self.power_off_pin, Secondary.NOT_SHUTDOWN) self._power_status = Secondary.NOT_SHUTDOWN GPIO.output(self.request_pin, Secondary.NOT_SHUTDOWN_REQUEST) self._request_status = Secondary.NOT_SHUTDOWN_REQUEST
31.842105
87
0.685399
229
1,815
5.100437
0.196507
0.069349
0.10274
0.038527
0.496575
0.219178
0.071918
0.071918
0.071918
0
0
0.003592
0.233058
1,815
56
88
32.410714
0.835489
0.082094
0
0
0
0
0
0
0
0
0
0.035714
0
1
0.25
false
0
0.027778
0.138889
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
1
0
0
1
0
0
0
1
1
0
0
4
c1368d024a8f2e3b9683a5aa4b64e1fbadbe5105
227
py
Python
nativerl/python/pathmind_training/__init__.py
SkymindIO/nativerl
48f1a9897ca67fd892165818904fe8a33c5c19d4
[ "Apache-2.0" ]
3
2022-02-14T09:48:53.000Z
2022-02-20T15:06:01.000Z
nativerl/python/pathmind_training/__init__.py
SkymindIO/nativerl
48f1a9897ca67fd892165818904fe8a33c5c19d4
[ "Apache-2.0" ]
1
2022-02-16T11:38:44.000Z
2022-02-16T19:33:42.000Z
nativerl/python/pathmind_training/__init__.py
SkymindIO/nativerl
48f1a9897ca67fd892165818904fe8a33c5c19d4
[ "Apache-2.0" ]
1
2022-02-14T09:48:54.000Z
2022-02-14T09:48:54.000Z
from .environments import get_environment from .loggers import get_loggers from .scheduler import get_scheduler from .stopper import Stopper from .utils import modify_anylogic_db_properties, write_completion_report, write_file
37.833333
85
0.872247
31
227
6.096774
0.548387
0.142857
0
0
0
0
0
0
0
0
0
0
0.096916
227
5
86
45.4
0.921951
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
c15cb5cd95ca4abd851ca6484134e57e8fe8039a
472
py
Python
Scripts/RandomPath/Field.py
EddyArellanes/Python
edbcd3ac88974f92a038f75024675a043310c98c
[ "MIT" ]
null
null
null
Scripts/RandomPath/Field.py
EddyArellanes/Python
edbcd3ac88974f92a038f75024675a043310c98c
[ "MIT" ]
null
null
null
Scripts/RandomPath/Field.py
EddyArellanes/Python
edbcd3ac88974f92a038f75024675a043310c98c
[ "MIT" ]
null
null
null
class Field: def __init__(self): self.drunk_coordinates = {} def add_drunk(self, drunk, coordinate): self.drunk_coordinates[drunk] = coordinate def move_drunk(self, drunk): delta_x, delta_y = drunk.walk() current_coordinate = self.drunk_coordinates[drunk] new_coordinate = current_coordinate.move(delta_x, delta_x) self.drunk_coordinates[drunk] = new_coordinate def get_coordinate(self, drunk): return self.drunk_coordinates[drunk]
31.466667
62
0.741525
61
472
5.409836
0.295082
0.218182
0.30303
0.30303
0.366667
0.230303
0
0
0
0
0
0
0.161017
472
15
63
31.466667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.083333
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
c16cfde128b4d03f5e89229525395da347117147
391
py
Python
commands/base.py
bopopescu/Atharia
6fbfb02f88281d0421f6287c4d093d766e747a58
[ "MIT" ]
1
2020-07-03T06:40:24.000Z
2020-07-03T06:40:24.000Z
commands/base.py
bopopescu/Atharia
6fbfb02f88281d0421f6287c4d093d766e747a58
[ "MIT" ]
null
null
null
commands/base.py
bopopescu/Atharia
6fbfb02f88281d0421f6287c4d093d766e747a58
[ "MIT" ]
1
2020-07-22T09:38:18.000Z
2020-07-22T09:38:18.000Z
""" Base commands used for Atharia """ from evennia.commands.default.muxcommand import MuxCommand, MuxAccountCommand from .mixins import ArxCommmandMixin class ArxCommand(ArxCommmandMixin, MuxCommand): """Base command for Characters for Atharia""" pass class ArxPlayerCommand(ArxCommmandMixin, MuxAccountCommand): """Base command for Players/Accounts for Atharia""" pass
24.4375
77
0.774936
40
391
7.575
0.525
0.09901
0.092409
0
0
0
0
0
0
0
0
0
0.143223
391
15
78
26.066667
0.904478
0.296675
0
0.333333
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
c18401c4297e392d00b5581074ea144e042e640c
315
py
Python
questionnaires/templatetags/questionnaires_tags.py
bart-merix/iogt
04270c27456aadeb0874eae0859733d19e56f005
[ "BSD-2-Clause" ]
null
null
null
questionnaires/templatetags/questionnaires_tags.py
bart-merix/iogt
04270c27456aadeb0874eae0859733d19e56f005
[ "BSD-2-Clause" ]
null
null
null
questionnaires/templatetags/questionnaires_tags.py
bart-merix/iogt
04270c27456aadeb0874eae0859733d19e56f005
[ "BSD-2-Clause" ]
null
null
null
from django import template register = template.Library() @register.inclusion_tag('questionnaires/tags/surveys_list.html') def render_surveys_list(surveys): return {'surveys': surveys} @register.inclusion_tag('questionnaires/tags/polls_list.html') def render_polls_list(polls): return {'polls': polls}
22.5
64
0.777778
39
315
6.076923
0.435897
0.14346
0.168776
0.28692
0.320675
0
0
0
0
0
0
0
0.101587
315
13
65
24.230769
0.837456
0
0
0
0
0
0.266667
0.228571
0
0
0
0
0
1
0.25
false
0
0.125
0.25
0.625
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
c1b44d855daa47e53834f0530cfd5911ceda600c
208
py
Python
app/__init__.py
mihir3k/smmry
f2d2847b5f4d5ef4f48c40a53d2ef45c487bae0f
[ "MIT" ]
null
null
null
app/__init__.py
mihir3k/smmry
f2d2847b5f4d5ef4f48c40a53d2ef45c487bae0f
[ "MIT" ]
21
2021-03-01T06:05:17.000Z
2021-04-05T07:24:58.000Z
app/__init__.py
mihirwastaken/smmry
f2d2847b5f4d5ef4f48c40a53d2ef45c487bae0f
[ "MIT" ]
null
null
null
from flask import Flask from app import config app = Flask(__name__, template_folder='templates/build', static_folder='templates/build/static') app.config.from_object(config.Config) from app import routes
23.111111
96
0.807692
30
208
5.366667
0.433333
0.086957
0.161491
0.322981
0
0
0
0
0
0
0
0
0.100962
208
8
97
26
0.860963
0
0
0
0
0
0.177885
0.105769
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c1ba26b3e8b7b7c3454555b57408fc28e7d48f19
75
py
Python
gitlabci_local/__main__.py
starr-dusT/gitlab-ci
06537e44a65a4521e887959c6634e63b024c51e9
[ "Apache-2.0" ]
null
null
null
gitlabci_local/__main__.py
starr-dusT/gitlab-ci
06537e44a65a4521e887959c6634e63b024c51e9
[ "Apache-2.0" ]
null
null
null
gitlabci_local/__main__.py
starr-dusT/gitlab-ci
06537e44a65a4521e887959c6634e63b024c51e9
[ "Apache-2.0" ]
null
null
null
# Components from gitlabci_local.cli.main import main # Entrypoint main()
12.5
40
0.786667
10
75
5.8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.133333
75
5
41
15
0.892308
0.28
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c1c275239c60a67624bd1e8f5ba5cbf40964f148
7,245
py
Python
task_adaptation/data/kitti_test.py
ajschumacher/task_adaptation
d2a72ed68e1f5b9d9a97561f03cf70b3f79bdad4
[ "Apache-2.0" ]
null
null
null
task_adaptation/data/kitti_test.py
ajschumacher/task_adaptation
d2a72ed68e1f5b9d9a97561f03cf70b3f79bdad4
[ "Apache-2.0" ]
null
null
null
task_adaptation/data/kitti_test.py
ajschumacher/task_adaptation
d2a72ed68e1f5b9d9a97561f03cf70b3f79bdad4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 Google LLC. # # 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. """Tests for kitti.py.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from task_adaptation.data import data_testing_lib from task_adaptation.data import kitti import tensorflow as tf class KittiDataCountTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataCountTest, self).setUp( data_wrapper=kitti.KittiData(task="count_all"), num_classes=16, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataCountLeftTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataCountLeftTest, self).setUp( data_wrapper=kitti.KittiData(task="count_left"), num_classes=16, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataCountFarTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataCountFarTest, self).setUp( data_wrapper=kitti.KittiData(task="count_far"), num_classes=16, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataCountNearTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataCountNearTest, self).setUp( data_wrapper=kitti.KittiData(task="count_near"), num_classes=16, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataClosestDistanceTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataClosestDistanceTest, self).setUp( data_wrapper=kitti.KittiData(task="closest_object_distance"), num_classes=5, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataClosestXLocTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataClosestXLocTest, self).setUp( data_wrapper=kitti.KittiData(task="closest_object_x_location"), num_classes=5, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataCountVehiclesTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataCountVehiclesTest, self).setUp( data_wrapper=kitti.KittiData(task="count_vehicles"), num_classes=4, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class KittiDataClosestVehicleTest(data_testing_lib.BaseTfdsDataTest): """See base class for usage and test descriptions.""" def setUp(self): super(KittiDataClosestVehicleTest, self).setUp( data_wrapper=kitti.KittiData(task="closest_vehicle_distance"), num_classes=4, expected_num_samples=dict( train=5077, val=634, trainval=5711, test=634, ), required_tensors_shapes={ "image": (None, None, 3), "label": (), }, tfds_label_key_map={}) class TestPreprocessing(tf.test.TestCase): def test_count_vehicles(self): sess = tf.Session() x = {"image": tf.constant([0])} x["objects"] = {"type": tf.constant([0])} self.assertEqual(1, sess.run(kitti._count_vehicles_pp(x)["label"])) x["objects"] = {"type": tf.constant([3])} self.assertEqual(0, sess.run(kitti._count_vehicles_pp(x)["label"])) x["objects"] = {"type": tf.constant([0, 1])} self.assertEqual(2, sess.run(kitti._count_vehicles_pp(x)["label"])) x["objects"] = {"type": tf.constant([0, 1, 2])} self.assertEqual(3, sess.run(kitti._count_vehicles_pp(x)["label"])) x["objects"] = {"type": tf.constant([0, 1, 2, 2, 2, 2, 2])} self.assertEqual(3, sess.run(kitti._count_vehicles_pp(x)["label"])) def test_closest_vehicle(self): sess = tf.Session() x = {"image": tf.constant([0])} x["objects"] = { "type": tf.constant([0]), "location": tf.constant([[0.0, 0.0, 1.0]]), } self.assertEqual(0, sess.run(kitti._closest_vehicle_distance_pp(x)["label"])) x["objects"] = { "type": tf.constant([0]), "location": tf.constant([[0.0, 0.0, 10.0]]), } self.assertEqual(1, sess.run(kitti._closest_vehicle_distance_pp(x)["label"])) x["objects"] = { "type": tf.constant([0]), "location": tf.constant([[0.0, 0.0, 30.0]]), } self.assertEqual(2, sess.run(kitti._closest_vehicle_distance_pp(x)["label"])) x["objects"] = { "type": tf.constant([4]), "location": tf.constant([[0.0, 0.0, 30.0]]), } self.assertEqual(3, sess.run(kitti._closest_vehicle_distance_pp(x)["label"])) x["objects"] = { "type": tf.constant([0, 1]), "location": tf.constant([[0.0, 0.0, 30.0], [0.0, 0.0, 1.0]]), } self.assertEqual(0, sess.run(kitti._closest_vehicle_distance_pp(x)["label"])) if __name__ == "__main__": tf.test.main()
30.313808
78
0.604003
846
7,245
4.977541
0.182033
0.009024
0.039183
0.033246
0.734267
0.720969
0.712895
0.705058
0.643315
0.613156
0
0.039635
0.258247
7,245
238
79
30.441176
0.743952
0.133333
0
0.650273
0
0
0.067846
0.011576
0
0
0
0
0.054645
1
0.054645
false
0
0.032787
0
0.136612
0.005464
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c1e3429b261e7c3f62b08920f5fdf01fab7c2808
443
py
Python
src/models/empf/evolving/clustering/__init__.py
nayronmorais/EMPF
4baf87dcbd0689cbe43ec3d8775f489ee7742426
[ "MIT" ]
null
null
null
src/models/empf/evolving/clustering/__init__.py
nayronmorais/EMPF
4baf87dcbd0689cbe43ec3d8775f489ee7742426
[ "MIT" ]
null
null
null
src/models/empf/evolving/clustering/__init__.py
nayronmorais/EMPF
4baf87dcbd0689cbe43ec3d8775f489ee7742426
[ "MIT" ]
null
null
null
"""That package provide implementation of evolving clustering methods.""" from . import _base from . import esbm from . import autocloud from . import oec from . import microtedaclus __all__ = ['esbm', 'autocloud', 'oec', 'microtedaclus'] ON_FIRST_CLUSTER = _base.BaseClusteringMethod.ON_FIRST_CLUSTER ON_KNOWED_CLUSTER = _base.BaseClusteringMethod.ON_KNOWED_CLUSTER ON_TRANSITION_CLUSTER = _base.BaseClusteringMethod.ON_TRANSITION_CLUSTER
31.642857
73
0.817156
52
443
6.576923
0.423077
0.146199
0.27193
0.289474
0
0
0
0
0
0
0
0
0.103837
443
13
74
34.076923
0.861461
0.151242
0
0
0
0
0.078378
0
0
0
0
0
0
1
0
false
0
0.555556
0
0.555556
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
1
0
0
4
c1e7f83e2c6c1b95e49b1575237c5ef9af5f0814
179
py
Python
rmcalyse/general_functions/distance_class.py
antgobar/rmcalyse
dee40416bfd7cf73a4ede6eb309b484397e11310
[ "MIT" ]
3
2021-02-17T18:09:16.000Z
2021-03-12T12:36:19.000Z
rmcalyse/general_functions/distance_class.py
antgobar/rmcalyse
dee40416bfd7cf73a4ede6eb309b484397e11310
[ "MIT" ]
null
null
null
rmcalyse/general_functions/distance_class.py
antgobar/rmcalyse
dee40416bfd7cf73a4ede6eb309b484397e11310
[ "MIT" ]
1
2021-03-12T12:37:24.000Z
2021-03-12T12:37:24.000Z
import numpy as np class distance(): def __init__(self, cell_parameters, atomic_positions, basis=False): self.positions = atomic_positions self.basis = None
22.375
71
0.703911
22
179
5.409091
0.727273
0.252101
0
0
0
0
0
0
0
0
0
0
0.217877
179
7
72
25.571429
0.85
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
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
1
0
0
4
c1e96a3e33c696e04bd63075eba4c04205ebf7f1
283
py
Python
globals.py
NathanKolbow/Kovaaks-Thing
0f3ffc2cd50242d21f07f08072f93f1e9beee873
[ "MIT" ]
null
null
null
globals.py
NathanKolbow/Kovaaks-Thing
0f3ffc2cd50242d21f07f08072f93f1e9beee873
[ "MIT" ]
null
null
null
globals.py
NathanKolbow/Kovaaks-Thing
0f3ffc2cd50242d21f07f08072f93f1e9beee873
[ "MIT" ]
null
null
null
GRAPH_SIZE = (800, 800) GRAPH_BOUNDARIES = ((0, 0), (1000, 1000)) GRAPH_PADDING = 20 GRAPH_COORDS_BOTTOM_LEFT = (0 - GRAPH_PADDING, 0 - GRAPH_PADDING) GRAPH_COORDS_TOP_RIGHT = (GRAPH_BOUNDARIES[1][0] + GRAPH_PADDING, GRAPH_BOUNDARIES[1][1] + GRAPH_PADDING)
40.428571
80
0.681979
39
283
4.564103
0.358974
0.337079
0.219101
0.202247
0
0
0
0
0
0
0
0.105263
0.194346
283
6
81
47.166667
0.675439
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
de117d8bc13876d137a2678c2c1644d435a2a0bf
23,085
py
Python
tests/chain_integration/database_integration/test_graph_sync.py
trustlines-network/relay-server
8ad441c995d82b6eb5e85803133ac3b108239d42
[ "MIT" ]
7
2017-07-21T09:13:56.000Z
2019-03-06T05:38:45.000Z
tests/chain_integration/database_integration/test_graph_sync.py
trustlines-network/relay-server
8ad441c995d82b6eb5e85803133ac3b108239d42
[ "MIT" ]
223
2019-06-28T13:49:09.000Z
2021-10-20T18:04:59.000Z
tests/chain_integration/database_integration/test_graph_sync.py
trustlines-network/relay-server
8ad441c995d82b6eb5e85803133ac3b108239d42
[ "MIT" ]
5
2019-04-07T14:31:02.000Z
2022-03-08T10:25:42.000Z
from typing import cast import pytest from tests.chain_integration.conftest import CurrencyNetworkProxy from relay.blockchain.currency_network_events import ( BalanceUpdateEvent, BalanceUpdateEventType, TrustlineUpdateEvent, TrustlineUpdateEventType, ) from relay.ethindex_db.ethindex_db import CurrencyNetworkEthindexDB from relay.ethindex_db.sync_updates import ( BalanceUpdateFeedUpdate, NetworkFreezeFeedUpdate, NetworkUnfreezeFeedUpdate, TrustlineUpdateFeedUpdate, ensure_graph_sync_id_file_exists, get_graph_updates_feed, write_graph_sync_id_file, ) from relay.network_graph.graph import CurrencyNetworkGraph ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" @pytest.fixture(autouse=True, scope="session") def fix_ensure_graph_sync_id_file_exists(): ensure_graph_sync_id_file_exists() write_graph_sync_id_file(0) @pytest.fixture(autouse=True) def delete_event_feed_table( generic_db_connection, currency_network_with_trustlines_and_interests, currency_network_with_trustlines_and_interests_session, currency_network_with_trustlines, currency_network_with_trustlines_session, chain_cleanup, ): query_string = """ DELETE FROM graphfeed *; """ with generic_db_connection: with generic_db_connection.cursor() as cur: cur.execute(query_string) class Graph(CurrencyNetworkGraph): def apply_events_on_graph(self, events): for event in events: if type(event) == BalanceUpdateEvent: self.update_balance(event.from_, event.to, event.value, event.timestamp) elif type(event) == TrustlineUpdateEvent: self.update_trustline( event.from_, event.to, event.creditline_given, event.creditline_received, event.interest_rate_given, event.interest_rate_received, ) def apply_feed_updates_on_graph(self, feed_updates): for update in feed_updates: self.update_from_feed(update) def assert_equal_graphs( feed_graph: CurrencyNetworkGraph, event_graph: CurrencyNetworkGraph ): trustlines_of_feed = feed_graph.get_trustlines_list() trustlines_of_event = event_graph.get_trustlines_list() for trustline in trustlines_of_feed: if trustline not in trustlines_of_event: assert ( False ), f"Found trustline in graph from feed not in graph from events {trustline}" else: feed_data = feed_graph.graph.get_edge_data(trustline[0], trustline[1]) event_data = event_graph.graph.get_edge_data(trustline[0], trustline[1]) assert feed_data["creditline_ab"] == event_data["creditline_ab"] assert feed_data["creditline_ba"] == event_data["creditline_ba"] assert feed_data["interest_ab"] == event_data["interest_ab"] assert feed_data["interest_ba"] == event_data["interest_ba"] assert feed_data["is_frozen"] == event_data["is_frozen"] assert feed_data["balance_ab"] == event_data["balance_ab"] if feed_data["balance_ab"] != 0: assert feed_data["m_time"] == event_data["m_time"] def test_get_event_feed_trustline_update( currency_network: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, ): from_ = accounts[0] to = accounts[1] creditline_given = 100 creditline_received = 200 interest_rate_given = 1 interest_rate_received = 2 currency_network.update_trustline_with_accept( from_, to, creditline_given, creditline_received, interest_rate_given, interest_rate_received, ) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) assert len(feed_updates) == 1 update = feed_updates[0] assert type(update) == TrustlineUpdateFeedUpdate update = cast(TrustlineUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.creditline_received == creditline_received assert update.creditline_given == creditline_given assert update.interest_rate_given == interest_rate_given assert update.interest_rate_received == interest_rate_received def test_get_event_feed_balance_update( currency_network_with_trustlines_and_interests_session: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, ): currency_network = currency_network_with_trustlines_and_interests_session from_ = accounts[0] to = accounts[1] value = 123 currency_network.transfer_on_path(value, [from_, to]) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) assert len(feed_updates) == 1 update = feed_updates[0] assert type(update) == BalanceUpdateFeedUpdate update = cast(BalanceUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.value == -value def test_get_event_feed_reversed_trustline_update_to_empty( currency_network: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, chain, replace_blocks_with_empty_from_snapshot, ): """Test that if the chain reverts, we get a new information in the feed informing that the trustline is null""" from_ = accounts[0] to = accounts[1] creditline_given = 100 creditline_received = 200 interest_rate_given = 1 interest_rate_received = 2 snapshot = chain.take_snapshot() currency_network.update_trustline_with_accept( from_, to, creditline_given, creditline_received, interest_rate_given, interest_rate_received, ) wait_for_ethindex_to_sync() replace_blocks_with_empty_from_snapshot(snapshot) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) print("feed updates") for update in feed_updates: print(update) print() assert len(feed_updates) == 2 update = feed_updates[0] assert type(update) == TrustlineUpdateFeedUpdate update = cast(TrustlineUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.creditline_received == creditline_received assert update.creditline_given == creditline_given assert update.interest_rate_given == interest_rate_given assert update.interest_rate_received == interest_rate_received second_update = feed_updates[1] assert type(second_update) == TrustlineUpdateFeedUpdate second_update = cast(TrustlineUpdateFeedUpdate, second_update) assert second_update.from_ == from_ assert second_update.to == to assert second_update.creditline_received == 0 assert second_update.creditline_given == 0 assert second_update.interest_rate_given == 0 assert second_update.interest_rate_received == 0 def test_get_event_feed_reversed_trustline_update_to_old( currency_network: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, chain, replace_blocks_with_empty_from_snapshot, ): """Test that if the chain reverts, we get a new information in the feed informing about the old trustline state""" from_ = accounts[0] to = accounts[1] creditline_given = 100 creditline_received = 200 interest_rate_given = 1 interest_rate_received = 2 currency_network.update_trustline_with_accept( from_, to, creditline_given, creditline_received, interest_rate_given, interest_rate_received, ) snapshot = chain.take_snapshot() wait_for_ethindex_to_sync() currency_network.update_trustline_with_accept( from_, to, 2 * creditline_given, 2 * creditline_received, 2 * interest_rate_given, 2 * interest_rate_received, ) wait_for_ethindex_to_sync() replace_blocks_with_empty_from_snapshot(snapshot) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == TrustlineUpdateFeedUpdate update = cast(TrustlineUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.creditline_received == creditline_received assert update.creditline_given == creditline_given assert update.interest_rate_given == interest_rate_given assert update.interest_rate_received == interest_rate_received def test_get_event_feed_reversed_balance_update_to_empty( currency_network_with_trustlines_and_interests_session: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, replace_blocks_with_empty_from_snapshot, chain, ): """Test that if the chain reverts a balance update, we get the information of a null balance update""" currency_network = currency_network_with_trustlines_and_interests_session from_ = accounts[0] to = accounts[1] value = 123 snapshot = chain.take_snapshot() currency_network.transfer_on_path(value, [from_, to]) wait_for_ethindex_to_sync() replace_blocks_with_empty_from_snapshot(snapshot) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) assert len(feed_updates) == 2 update = feed_updates[1] assert type(update) == BalanceUpdateFeedUpdate update = cast(BalanceUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.value == 0 def test_get_event_feed_reversed_balance_update_to_old( currency_network_with_trustlines_and_interests_session: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, replace_blocks_with_empty_from_snapshot, chain, ): """Test that if the chain reverts a balance update, we get the information of the old balance update""" currency_network = currency_network_with_trustlines_and_interests_session from_ = accounts[0] to = accounts[1] value = 123 currency_network.transfer_on_path(value, [from_, to]) snapshot = chain.take_snapshot() wait_for_ethindex_to_sync() currency_network.transfer_on_path(value, [from_, to]) replace_blocks_with_empty_from_snapshot(snapshot) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == BalanceUpdateFeedUpdate update = cast(BalanceUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.value == -value def test_get_event_feed_replaced_trustline_update( currency_network: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, chain, ): """Test that if the chain reverts replacing the trustline update, we get information about the new trustline""" from_ = accounts[0] to = accounts[1] creditline_given = 100 creditline_received = 200 interest_rate_given = 1 interest_rate_received = 2 snapshot = chain.take_snapshot() currency_network.update_trustline_with_accept( from_, to, creditline_given, creditline_received, interest_rate_given, interest_rate_received, ) wait_for_ethindex_to_sync() chain.revert_to_snapshot(snapshot) currency_network.update_trustline_with_accept( from_, to, 2 * creditline_given, 2 * creditline_received, 2 * interest_rate_given, 2 * interest_rate_received, ) chain.mine_block() wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == TrustlineUpdateFeedUpdate update = cast(TrustlineUpdateFeedUpdate, update) assert update.from_ == from_ assert update.to == to assert update.creditline_received == 2 * creditline_received assert update.creditline_given == 2 * creditline_given assert update.interest_rate_given == 2 * interest_rate_given assert update.interest_rate_received == 2 * interest_rate_received def test_get_event_feed_replaced_balance_update( currency_network_with_trustlines_and_interests_session: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, chain, ): """Test that we can revert a chain with a balance update and replace the balance update and still get the correct update""" currency_network = currency_network_with_trustlines_and_interests_session from_ = accounts[0] to = accounts[1] value = 123 snapshot = chain.take_snapshot() currency_network.transfer_on_path(value, [from_, to]) wait_for_ethindex_to_sync() chain.revert_to_snapshot(snapshot) currency_network.transfer_on_path(2 * value, [from_, to]) chain.mine_block() wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] update = cast(BalanceUpdateFeedUpdate, update) assert type(update) == BalanceUpdateFeedUpdate assert update.from_ == from_ assert update.to == to assert update.value == -2 * value def test_get_event_feed_network_freeze( test_currency_network_v1: CurrencyNetworkProxy, wait_for_ethindex_to_sync, generic_db_connection, ): currency_network = test_currency_network_v1 currency_network.freeze_network() wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == NetworkFreezeFeedUpdate def test_get_event_feed_network_unfreeze( test_currency_network_v1: CurrencyNetworkProxy, wait_for_ethindex_to_sync, generic_db_connection, ): currency_network = test_currency_network_v1 currency_network.freeze_network() currency_network.unfreeze_network() wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == NetworkUnfreezeFeedUpdate def test_get_event_feed_reversed_network_freeze( test_currency_network_v1: CurrencyNetworkProxy, wait_for_ethindex_to_sync, generic_db_connection, chain, replace_blocks_with_empty_from_snapshot, ): currency_network = test_currency_network_v1 snapshot = chain.take_snapshot() currency_network.freeze_network() wait_for_ethindex_to_sync() replace_blocks_with_empty_from_snapshot(snapshot) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == NetworkUnfreezeFeedUpdate def test_get_event_feed_reversed_network_unfreeze( test_currency_network_v1: CurrencyNetworkProxy, wait_for_ethindex_to_sync, generic_db_connection, chain, replace_blocks_with_empty_from_snapshot, ): currency_network = test_currency_network_v1 snapshot = chain.take_snapshot() currency_network.freeze_network() currency_network.unfreeze_network() wait_for_ethindex_to_sync() replace_blocks_with_empty_from_snapshot(snapshot) wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) update = feed_updates[len(feed_updates) - 1] assert type(update) == NetworkFreezeFeedUpdate def sync_if_enough_transactions_sent( transactions_sent, transactions_between_sync, graph, connection, wait_for_ethindex_to_sync, ): if transactions_sent % transactions_between_sync == 0: wait_for_ethindex_to_sync() graph.apply_feed_updates_on_graph(get_graph_updates_feed(connection)) @pytest.fixture def revert_if_enough_transactions_sent(replace_blocks_with_empty_from_snapshot): def revert(snapshot, transactions_sent, transactions_between_revert): if transactions_sent % transactions_between_revert == 0: return replace_blocks_with_empty_from_snapshot(snapshot) return snapshot return revert @pytest.mark.parametrize("transactions_between_sync", [1, 2, 3, 4]) @pytest.mark.parametrize("transactions_between_revert", [1, 2, 3, 4]) def test_sync_same_graphs( currency_network_with_trustlines_and_interests_session: CurrencyNetworkProxy, ethindex_db_for_currency_network_with_trustlines_and_interests: CurrencyNetworkEthindexDB, wait_for_ethindex_to_sync, accounts, generic_db_connection, transactions_between_sync, transactions_between_revert, chain, revert_if_enough_transactions_sent, ): currency_network = currency_network_with_trustlines_and_interests_session assert get_graph_updates_feed(generic_db_connection) == [] event_graph = Graph( currency_network.capacity_imbalance_fee_divisor, currency_network.default_interest_rate, currency_network.custom_interests, currency_network.prevent_mediator_interests, ) feed_graph = Graph( currency_network.capacity_imbalance_fee_divisor, currency_network.default_interest_rate, currency_network.custom_interests, currency_network.prevent_mediator_interests, ) # Make sure the feed graph starts with the proper state before getting updated with feed updates wait_for_ethindex_to_sync() events = ethindex_db_for_currency_network_with_trustlines_and_interests.get_all_contract_events( event_types=[BalanceUpdateEventType, TrustlineUpdateEventType] ) feed_graph.apply_events_on_graph(events) transactions_sent = 0 snapshot = chain.take_snapshot() # tx 1 currency_network.transfer_on_path( 123, [accounts[0], accounts[1], accounts[2], accounts[3]] ) transactions_sent += 1 sync_if_enough_transactions_sent( transactions_sent, transactions_between_sync, feed_graph, generic_db_connection, wait_for_ethindex_to_sync, ) snapshot = revert_if_enough_transactions_sent( snapshot, transactions_sent, transactions_between_revert ) # tx 2 currency_network.transfer_on_path(321, [accounts[4], accounts[3], accounts[2]]) transactions_sent += 1 sync_if_enough_transactions_sent( transactions_sent, transactions_between_sync, feed_graph, generic_db_connection, wait_for_ethindex_to_sync, ) snapshot = revert_if_enough_transactions_sent( snapshot, transactions_sent, transactions_between_revert ) # tx 3 currency_network.update_trustline_with_accept( accounts[0], accounts[1], 123123123, 321321321, 222, 333 ) transactions_sent += 1 sync_if_enough_transactions_sent( transactions_sent, transactions_between_sync, feed_graph, generic_db_connection, wait_for_ethindex_to_sync, ) snapshot = revert_if_enough_transactions_sent( snapshot, transactions_sent, transactions_between_revert ) # tx 4 currency_network.update_trustline_with_accept( accounts[0], accounts[1], 100000000, 200000000, 200, 300 ) transactions_sent += 1 sync_if_enough_transactions_sent( transactions_sent, transactions_between_sync, feed_graph, generic_db_connection, wait_for_ethindex_to_sync, ) snapshot = revert_if_enough_transactions_sent( snapshot, transactions_sent, transactions_between_revert ) # tx 5 currency_network.update_trustline_with_accept( accounts[0], accounts[1], 123123123, 321321321, 222, 333 ) revert_if_enough_transactions_sent( snapshot, transactions_sent, transactions_between_revert ) wait_for_ethindex_to_sync() feed_graph.apply_feed_updates_on_graph( get_graph_updates_feed(generic_db_connection) ) events = ethindex_db_for_currency_network_with_trustlines_and_interests.get_all_contract_events( event_types=[BalanceUpdateEventType, TrustlineUpdateEventType] ) event_graph.apply_events_on_graph(events) assert_equal_graphs(feed_graph, event_graph) def test_sync_with_reordering_of_events( currency_network_with_trustlines_and_interests_session: CurrencyNetworkProxy, wait_for_ethindex_to_sync, accounts, generic_db_connection, chain, ): """Test that if we have a reordering of events with the same values, we still get a correct graph from syncing""" currency_network = currency_network_with_trustlines_and_interests_session feed_graph = Graph( currency_network.capacity_imbalance_fee_divisor, currency_network.default_interest_rate, currency_network.custom_interests, currency_network.prevent_mediator_interests, ) from_ = accounts[0] to = accounts[1] credit_limit_1 = 1_000_000 credit_limit_2 = 2_000_000 time_1 = 2_000_000_000 snapshot = chain.take_snapshot() chain.time_travel(time_1) currency_network_with_trustlines_and_interests_session.update_trustline_with_accept( from_, to, credit_limit_1, credit_limit_1 ) currency_network_with_trustlines_and_interests_session.update_trustline_with_accept( from_, to, credit_limit_2, credit_limit_2 ) wait_for_ethindex_to_sync() chain.revert_to_snapshot(snapshot) chain.time_travel(time_1) currency_network_with_trustlines_and_interests_session.update_trustline_with_accept( from_, to, credit_limit_2, credit_limit_2 ) currency_network_with_trustlines_and_interests_session.update_trustline_with_accept( from_, to, credit_limit_1, credit_limit_1 ) chain.mine_block() wait_for_ethindex_to_sync() feed_updates = get_graph_updates_feed(generic_db_connection) feed_graph.apply_feed_updates_on_graph(feed_updates) trustline_data = feed_graph.graph.get_edge_data(from_, to) assert trustline_data["creditline_ab"] == credit_limit_1 assert trustline_data["creditline_ba"] == credit_limit_1 def test_sync_network_freeze_on_graph(): feed_graph = CurrencyNetworkGraph(is_frozen=False) network_freeze_update = NetworkFreezeFeedUpdate(address=ZERO_ADDRESS, timestamp=0) assert feed_graph.is_frozen is False feed_graph.update_from_feed(network_freeze_update) assert feed_graph.is_frozen def test_sync_network_unfreeze_on_graph(): feed_graph = CurrencyNetworkGraph(is_frozen=True) network_unfreeze_update = NetworkUnfreezeFeedUpdate( address=ZERO_ADDRESS, timestamp=0 ) assert feed_graph.is_frozen feed_graph.update_from_feed(network_unfreeze_update) assert feed_graph.is_frozen is False
33.025751
118
0.747152
2,774
23,085
5.742249
0.069214
0.076276
0.042376
0.048026
0.80457
0.768159
0.731873
0.697721
0.6846
0.656727
0
0.016308
0.189864
23,085
698
119
33.073066
0.835419
0.03734
0
0.681109
0
0
0.018216
0.004238
0
0
0.001894
0
0.131716
1
0.041594
false
0
0.012132
0
0.060659
0.005199
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a9ac24ced845c9108c46c364c81708ef07ca929c
117
py
Python
tests/test_unitteststage.py
chrislat5/devops-bookstore-frontend
a9cf0018d591eac1d3ae799cf0a95bfaa5e92783
[ "MIT" ]
null
null
null
tests/test_unitteststage.py
chrislat5/devops-bookstore-frontend
a9cf0018d591eac1d3ae799cf0a95bfaa5e92783
[ "MIT" ]
null
null
null
tests/test_unitteststage.py
chrislat5/devops-bookstore-frontend
a9cf0018d591eac1d3ae799cf0a95bfaa5e92783
[ "MIT" ]
null
null
null
import unittest class GetBooksTest(unittest.TestCase): def test_true(self): self.assertEqual(123, 123)
16.714286
38
0.717949
14
117
5.928571
0.785714
0
0
0
0
0
0
0
0
0
0
0.063158
0.188034
117
6
39
19.5
0.810526
0
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
a9ed85510991fa80fa989f531b205bd6803ac6c5
54
py
Python
run.py
phoemur/blog
d9287a9eaf4977fb9b8989f9acb1c33e5dc425c4
[ "MIT" ]
null
null
null
run.py
phoemur/blog
d9287a9eaf4977fb9b8989f9acb1c33e5dc425c4
[ "MIT" ]
null
null
null
run.py
phoemur/blog
d9287a9eaf4977fb9b8989f9acb1c33e5dc425c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python from app import app app.run()
9
21
0.685185
10
54
3.7
0.8
0
0
0
0
0
0
0
0
0
0
0
0.166667
54
5
22
10.8
0.822222
0.37037
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
a9ef8ecc24233210fd426d629862426e6daf7e2d
93
py
Python
Python_Codes_for_BJ/stage16 동적 계획법 기초/피보나치 함수.py
ch96an/BaekJoonSolution
25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33
[ "MIT" ]
null
null
null
Python_Codes_for_BJ/stage16 동적 계획법 기초/피보나치 함수.py
ch96an/BaekJoonSolution
25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33
[ "MIT" ]
null
null
null
Python_Codes_for_BJ/stage16 동적 계획법 기초/피보나치 함수.py
ch96an/BaekJoonSolution
25594fda5ba1c0c4d26ff0828ec8dcf2f6572d33
[ "MIT" ]
null
null
null
for _ in range(int(input())): a,b=1,0 for i in range(int(input())): a,b=b,a+b print(a,b)
18.6
30
0.580645
23
93
2.304348
0.478261
0.150943
0.377358
0.566038
0.641509
0.641509
0
0
0
0
0
0.025641
0.16129
93
5
31
18.6
0.653846
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a9f2ed8edd73c9832bd2179efe3441c32052c454
25
py
Python
settings.py
charlieguo0610/StormPlane
e165f2488b52ea0d3d12d3d2182ac737a7c37ad5
[ "MIT" ]
null
null
null
settings.py
charlieguo0610/StormPlane
e165f2488b52ea0d3d12d3d2182ac737a7c37ad5
[ "MIT" ]
null
null
null
settings.py
charlieguo0610/StormPlane
e165f2488b52ea0d3d12d3d2182ac737a7c37ad5
[ "MIT" ]
null
null
null
WIDTH = 800 HEIGHT = 600
8.333333
12
0.68
4
25
4.25
1
0
0
0
0
0
0
0
0
0
0
0.315789
0.24
25
2
13
12.5
0.578947
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a9fe7849e3e41ade9040728be211af4fae0abfac
190
py
Python
leprikon/admin/printsetup.py
leprikon-cz/leprikon
b1bec36fb6bcf0220bffccca53b6f200f9e95910
[ "BSD-3-Clause" ]
4
2018-10-29T17:46:09.000Z
2021-12-16T08:57:48.000Z
leprikon/admin/printsetup.py
leprikon-cz/leprikon
b1bec36fb6bcf0220bffccca53b6f200f9e95910
[ "BSD-3-Clause" ]
68
2016-07-11T07:48:54.000Z
2022-03-18T01:32:06.000Z
leprikon/admin/printsetup.py
leprikon-cz/leprikon
b1bec36fb6bcf0220bffccca53b6f200f9e95910
[ "BSD-3-Clause" ]
2
2016-07-12T20:39:53.000Z
2020-10-10T03:14:42.000Z
from django.contrib import admin from ..models.printsetup import PrintSetup @admin.register(PrintSetup) class PrintSetupAdmin(admin.ModelAdmin): list_display = ("name", "background")
21.111111
42
0.778947
21
190
7
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.115789
190
8
43
23.75
0.875
0
0
0
0
0
0.073684
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
e712b44afe1630d6006fda9023f8662770951398
217
py
Python
Exams/Exam_16_August_2020_TAKE_3/project/hardware/heavy_hardware.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
1
2021-05-27T07:59:17.000Z
2021-05-27T07:59:17.000Z
Exams/Exam_16_August_2020_TAKE_3/project/hardware/heavy_hardware.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Exams/Exam_16_August_2020_TAKE_3/project/hardware/heavy_hardware.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
from project.hardware.hardware import Hardware class HeavyHardware(Hardware): def __init__(self, name: str, capacity: int, memory: int): super().__init__(name, 'Heavy', capacity * 2, int(memory * 0.75))
31
73
0.700461
28
217
5.142857
0.678571
0.125
0
0
0
0
0
0
0
0
0
0.022099
0.165899
217
6
74
36.166667
0.773481
0
0
0
0
0
0.023041
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
e721e039e5f878e53b6c91a8fcf503bcdb6dde1f
183
py
Python
ctapipe/calib/__init__.py
watsonjj/ctapipe
fc98748d7a38f50040f1fbe3ce5e174ad8c0ba0a
[ "BSD-3-Clause" ]
53
2015-06-23T15:24:20.000Z
2021-09-23T22:30:58.000Z
ctapipe/calib/__init__.py
watsonjj/ctapipe
fc98748d7a38f50040f1fbe3ce5e174ad8c0ba0a
[ "BSD-3-Clause" ]
1,537
2015-06-24T11:27:16.000Z
2022-03-31T16:17:08.000Z
ctapipe/calib/__init__.py
watsonjj/ctapipe
fc98748d7a38f50040f1fbe3ce5e174ad8c0ba0a
[ "BSD-3-Clause" ]
275
2015-07-09T14:09:28.000Z
2022-03-17T22:25:51.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Calibration """ from .camera import CameraCalibrator, GainSelector __all__ = ["CameraCalibrator", "GainSelector"]
22.875
63
0.759563
20
183
6.75
0.85
0.414815
0
0
0
0
0
0
0
0
0
0.006289
0.131148
183
7
64
26.142857
0.842767
0.404372
0
0
0
0
0.277228
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
e73a7575d92f73458546db629ee5ef34f518f3da
494
py
Python
pypy/objspace/flow/test/test___import__.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/objspace/flow/test/test___import__.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
null
null
null
pypy/objspace/flow/test/test___import__.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
from py.test import raises def test___import_(): import os mod = os.name raises(TypeError, __import__, ()) assert __import__(mod).__name__ == os.name assert __import__(mod, None).__name__ == os.name assert __import__(mod, None, None).__name__ == os.name assert __import__(mod, None, None, None).__name__ == os.name raises(TypeError, __import__, (mod, None, None, None, None)) # XXX this will have to be adjusted for Python 2.5 pretty soon-ish :-)
41.166667
74
0.672065
68
494
4.235294
0.382353
0.166667
0.208333
0.166667
0.597222
0.329861
0.329861
0.243056
0.243056
0
0
0.005128
0.210526
494
12
74
41.166667
0.733333
0.137652
0
0
0
0
0
0
0
0
0
0
0.4
1
0.1
false
0
0.9
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
e74e7859d83a2dcccb795d04e67c571d2f8b8f50
43,283
py
Python
oops_fhir/r4/code_system/v3_observation_interpretation.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/code_system/v3_observation_interpretation.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/code_system/v3_observation_interpretation.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["v3ObservationInterpretation"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class v3ObservationInterpretation: """ v3 Code System ObservationInterpretation One or more codes providing a rough qualitative interpretation of the observation, such as "normal" / "abnormal", "low" / "high", "better" / "worse", "resistant" / "susceptible", "expected" / "not expected". The value set is intended to be for ANY use where coded representation of an interpretation is needed. Status: active - Version: 2018-08-12 Copyright None http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation """ underscore_genetic_observation_interpretation = CodeSystemConcept( { "code": "_GeneticObservationInterpretation", "concept": [ { "code": "CAR", "definition": "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.", "display": "Carrier", }, { "code": "Carrier", "definition": 'The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This code is currently the same string as the print name for this concept and is inconsistent with the conventions being used for the other codes in the coding system, as it is a full word with initial capitalization, rather than an all upper case mnemonic. The recommendation from OO is to deprecate the code "Carrier" and to add "CAR" as the new active code representation for this concept.', "display": "Carrier", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2013-07-28"}, ], }, ], "definition": 'Codes that specify interpretation of genetic analysis, such as "positive", "negative", "carrier", "responsive", etc.', "display": "GeneticObservationInterpretation", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ GeneticObservationInterpretation Codes that specify interpretation of genetic analysis, such as "positive", "negative", "carrier", "responsive", etc. """ underscore_observation_interpretation_change = CodeSystemConcept( { "code": "_ObservationInterpretationChange", "concept": [ { "code": "B", "definition": "The current result or observation value has improved compared to the previous result or observation value (the change is significant as defined in the respective test procedure).\r\n\n [Note: This can be applied to quantitative or qualitative observations.]", "display": "Better", }, { "code": "D", "definition": "The current result has decreased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure).", "display": "Significant change down", }, { "code": "U", "definition": "The current result has increased from the previous result for a quantitative observation (the change is significant as defined in the respective test procedure).", "display": "Significant change up", }, { "code": "W", "definition": "The current result or observation value has degraded compared to the previous result or observation value (the change is significant as defined in the respective test procedure).\r\n\n [Note: This can be applied to quantitative or qualitative observations.]", "display": "Worse", }, ], "definition": "Interpretations of change of quantity and/or severity. At most one of B or W and one of U or D allowed.", "display": "ObservationInterpretationChange", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ ObservationInterpretationChange Interpretations of change of quantity and/or severity. At most one of B or W and one of U or D allowed. """ underscore_observation_interpretation_exceptions = CodeSystemConcept( { "code": "_ObservationInterpretationExceptions", "concept": [ { "code": "<", "definition": "The result is below the minimum detection limit (the test procedure or equipment is the limiting factor).\r\n\n Synonyms: Below analytical limit, low off scale.", "display": "Off scale low", }, { "code": ">", "definition": "The result is above the maximum quantifiable limit (the test procedure or equipment is the limiting factor).\r\n\n Synonyms: Above analytical limit, high off scale.", "display": "Off scale high", }, { "code": "AC", "definition": 'A valid result cannot be obtained for the specified component / analyte due to the presence of anti-complementary substances in the sample.\r\n\n \n \n Deprecation Comment: \n This code is being deprecated to match the status in V2 Table 0078 "Interpretation Codes.', "display": "Anti-complementary substances present", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2016-11-10"}, ], }, { "code": "IE", "definition": 'There is insufficient evidence that the species in question is a good target for therapy with the drug. A categorical interpretation is not possible.\r\n\n [Note: A MIC with "IE" and/or a comment may be reported (without an accompanying S, I or R-categorization).]', "display": "Insufficient evidence", }, { "code": "QCF", "definition": 'A result cannot be considered valid for the specified component / analyte or organism due to failure in the quality control testing component.\r\n\n \n \n Deprecation Comment: \n This code is being deprecated to match the status in V2 Table 0078 "Interpretation Codes.', "display": "Quality control failure", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2016-11-10"}, ], }, { "code": "TOX", "definition": 'A valid result cannot be obtained for the specified organism or cell line due to the presence of cytotoxic substances in the sample or culture.\r\n\n \n \n Deprecation Comment: \n This code is being deprecated to match the status in V2 Table 0078 "Interpretation Codes.', "display": "Cytotoxic substance present", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2016-11-10"}, ], }, ], "definition": "Technical exceptions resulting in the inability to provide an interpretation. At most one allowed. Does not imply normality or severity.", "display": "ObservationInterpretationExceptions", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ ObservationInterpretationExceptions Technical exceptions resulting in the inability to provide an interpretation. At most one allowed. Does not imply normality or severity. """ underscore_observation_interpretation_normality = CodeSystemConcept( { "code": "_ObservationInterpretationNormality", "concept": [ { "code": "A", "concept": [ { "code": "AA", "concept": [ { "code": "HH", "definition": "The result for a quantitative observation is above a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n Synonym: Above upper panic limits.", "display": "Critical high", }, { "code": "LL", "definition": "The result for a quantitative observation is below a reference level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n Synonym: Below lower panic limits.", "display": "Critical low", }, ], "definition": "The result or observation value is outside a reference range or expected norm at a level at which immediate action should be considered for patient safety (as defined for the respective test procedure).\r\n\n [Note: Typically applies to non-numeric results. Analogous to critical/panic limits for numeric results.]", "display": "Critical abnormal", }, { "code": "H", "concept": [ { "code": "H>", "definition": "A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'H' and 'HH'.]\r\n\n \n Deprecation Comment: The code 'H>' is being deprecated in order to align with the use of the code 'HU' for \"Very high\" in V2 Table 0078 \"Interpretation Codes\".\r\n\n [Note: The use of code 'H>' is non-preferred, as this code is deprecated and on track to be retired; use code 'HU' instead.", "display": "Significantly high", "property": [ {"code": "status", "valueCode": "deprecated"}, { "code": "deprecationDate", "valueDateTime": "2015-03-23", }, {"code": "child", "valueCode": "HH"}, ], }, { "code": "HU", "definition": "A test result that is significantly higher than the reference (normal) or therapeutic interval, but has not reached the critically high value and might need special attention, as defined by the laboratory or the clinician.", "display": "Significantly high", "property": [{"code": "child", "valueCode": "HH"}], }, ], "definition": "The result for a quantitative observation is above the upper limit of the reference range (as defined for the respective test procedure).\r\n\n Synonym: Above high normal", "display": "High", }, { "code": "L", "concept": [ { "code": "L<", "definition": "A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician.[Note: This level is situated between 'L' and 'LL'.]\r\n\n \n Deprecation Comment: The code 'L<' is being deprecated in order to align with the use of the code 'LU' for \"Very low\" in V2 Table 0078 \"Interpretation Codes\".\r\n\n [Note: The use of code 'L<' is non-preferred, as this code is deprecated and on track to be retired; use code 'LU' instead.", "display": "Significantly low", "property": [ {"code": "status", "valueCode": "deprecated"}, { "code": "deprecationDate", "valueDateTime": "2015-03-23", }, {"code": "child", "valueCode": "LL"}, ], }, { "code": "LU", "definition": "A test result that is significantly lower than the reference (normal) or therapeutic interval, but has not reached the critically low value and might need special attention, as defined by the laboratory or the clinician.", "display": "Significantly low", "property": [{"code": "child", "valueCode": "LL"}], }, ], "definition": "The result for a quantitative observation is below the lower limit of the reference range (as defined for the respective test procedure).\r\n\n Synonym: Below low normal", "display": "Low", }, ], "definition": "The result or observation value is outside the reference range or expected norm (as defined for the respective test procedure).\r\n\n [Note: Typically applies to non-numeric results.]", "display": "Abnormal", }, { "code": "N", "definition": "The result or observation value is within the reference range or expected norm (as defined for the respective test procedure).\r\n\n [Note: Applies to numeric or non-numeric results.]", "display": "Normal", }, ], "definition": 'Interpretation of normality or degree of abnormality (including critical or "alert" level). Concepts in this category are mutually exclusive, i.e., at most one is allowed.', "display": "ObservationInterpretationNormality", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ ObservationInterpretationNormality Interpretation of normality or degree of abnormality (including critical or "alert" level). Concepts in this category are mutually exclusive, i.e., at most one is allowed. """ underscore_observation_interpretation_susceptibility = CodeSystemConcept( { "code": "_ObservationInterpretationSusceptibility", "concept": [ { "code": "I", "definition": 'Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with uncertain therapeutic effect. Reference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm)\nProjects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as intermediate by applying the appropriate breakpoints in a defined phenotypic test system.]\r\n\n [Note 2: This class of susceptibility implies that an infection due to the isolate can be appropriately treated in body sites where the drugs are physiologically concentrated or when a high dosage of drug can be used.]\r\n\n [Note 3: This class also indicates a "buffer zone," to prevent small, uncontrolled, technical factors from causing major discrepancies in interpretations.]\r\n\n [Note 4: These breakpoints can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]', "display": "Intermediate", }, { "code": "MS", "definition": "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012).", "display": "moderately susceptible", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2013-07-28"}, ], }, { "code": "NCL", "definition": "Use when not enough clinical trial data published by the Clinical and Laboratory Standards Institutes (CLSI) is available to establish the breakpoints for susceptible / intermediate and resistant.", "display": "No CLSI defined breakpoint", }, { "code": "NS", "definition": 'A category used for isolates for which only a susceptible interpretive criterion has been designated because of the absence or rare occurrence of resistant strains. Isolates that have MICs above or zone diameters below the value indicated for the susceptible breakpoint should be reported as non-susceptible.\r\n\n NOTE 1: An isolate that is interpreted as non-susceptible does not necessarily mean that the isolate has a resistance mechanism. It is possible that isolates with MICs above the susceptible breakpoint that lack resistance mechanisms may be encountered within the wild-type distribution subsequent to the time the susceptible-only breakpoint is set. \r\n\n NOTE 2: For strains yielding results in the "nonsusceptible" category, organism identification and antimicrobial susceptibility test results should be confirmed.\r\n\n Synonym: decreased susceptibility.', "display": "Non-susceptible", }, { "code": "R", "concept": [ { "code": "SYN-R", "definition": "A category for isolates where the bacteria (e.g. enterococci) are not susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will not be effective. \r\n\n \n Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside.\r\n\n \n Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found.", "display": "Synergy - resistant", } ], "definition": "Bacterial strain inhibited in vitro by a concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic failure.\nReference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm) \nProjects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as resistant by applying the appropriate breakpoints in a defined phenotypic test system.]\r\n\n [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]", "display": "Resistant", }, { "code": "S", "concept": [ { "code": "SDD", "definition": 'A category that includes isolates with antimicrobial agent minimum inhibitory concentrations (MICs) that approach usually attainable blood and tissue levels and for which response rates may be lower than for susceptible isolates.\r\n\n Reference: CLSI document M44-A2 2009 "Method for antifungal disk diffusion susceptibility testing of yeasts; approved guideline - second edition" - page 2.', "display": "Susceptible-dose dependent", }, { "code": "SYN-S", "definition": "A category for isolates where the bacteria (e.g. enterococci) are susceptible in vitro to a combination therapy (e.g., high-level aminoglycoside and cell wall active agent). This is predictive that this combination therapy will be effective. \r\n\n \n Usage Note: Since the use of penicillin or ampicillin alone often results in treatment failure of serious enterococcal or other bacterial infections, combination therapy is usually indicated to enhance bactericidal activity. The synergy between a cell wall active agent (such as penicillin, ampicillin, or vancomycin) and an aminoglycoside (such as gentamicin, kanamycin or streptomycin) is best predicted by screening for high-level bacterial resistance to the aminoglycoside.\r\n\n \n Open Issue: The print name of the code is very general and the description is very specific to a pair of classes of agents, which may lead to confusion of these concepts in the future should other synergies be found.", "display": "Synergy - susceptible", }, ], "definition": "Bacterial strain inhibited by in vitro concentration of an antimicrobial agent that is associated with a high likelihood of therapeutic success.\nReference: CLSI (http://www.clsi.org/Content/NavigationMenu/Resources/HarmonizedTerminologyDatabase/Harmonized_Terminolo.htm)\nSynonym (earlier term): Sensitive Projects: ISO 20776-1, ISO 20776-2\r\n\n [Note 1: Bacterial strains are categorized as susceptible by applying the appropriate breakpoints in a defined phenotypic system.]\r\n\n [Note 2: This breakpoint can be altered due to changes in circumstances (e.g., changes in commonly used drug dosages, emergence of new resistance mechanisms).]", "display": "Susceptible", }, { "code": "VS", "definition": "The patient is considered as carrier based on the testing results. A carrier is an individual who carries an altered form of a gene which can lead to having a child or offspring in future generations with a genetic disorder.\r\n\n \n \n Deprecation Comment: \n This antimicrobial susceptibility test interpretation concept is recommended by OO to be deprecated as it is no longer recommended for use in susceptibility testing by CLSI (reference CLSI document M100-S22; Vol. 32 No.3; CLSI Performance Standards for Antimicrobial Susceptibility Testing; Twenty-Second Informational Supplement. Jan 2012).", "display": "very susceptible", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2013-07-28"}, ], }, ], "definition": "Interpretations of anti-microbial susceptibility testing results (microbiology). At most one allowed.", "display": "ObservationInterpretationSusceptibility", "property": [ {"code": "notSelectable", "valueBoolean": True}, {"code": "child", "valueCode": "IE"}, ], } ) """ ObservationInterpretationSusceptibility Interpretations of anti-microbial susceptibility testing results (microbiology). At most one allowed. """ ex = CodeSystemConcept( { "code": "EX", "concept": [ { "code": "HX", "definition": 'The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported.\n\r\n\n Example: A positive result on a Hepatitis screening test.\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held.', "display": "above high threshold", }, { "code": "LX", "definition": 'The numeric observation/test result is interpreted as being below the low threshold value for a particular protocol within which the result is being reported.\r\n\n Example: A Total White Blood Cell Count falling below a protocol-defined threshold value of 3000/mm^3\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held.', "display": "below low threshold", }, ], "definition": 'The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported.\n\r\n\n Example: A positive result on a Hepatitis screening test.\n Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects.\nThese concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes.\nMembers of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held.', "display": "outside threshold", } ) """ outside threshold The observation/test result is interpreted as being outside the inclusion range for a particular protocol within which the result is being reported. Example: A positive result on a Hepatitis screening test. Open Issue: EX, HX, LX: These three concepts do not seem to meet a clear need in the vocabulary, and their use in observation interpretation appears likely to be covered by other existing concepts (e.g., A, H, L). The only apparent significant difference is their reference to use in protocols for exclusion of study subjects. These concepts/codes were proposed by RCRIM for use in the CTLaboratory message. They were submitted and approved in the November 2005 Harmonization cycle in proposal "030103C_VOCAB_RCRIM_l_quade_RCRIM Obs Interp_20051028154455". However, this proposal was not fully implemented in the vocabulary. The proposal recommended creation of the x_ClinicalResearchExclusion domain in ObservationInterpretation with a value set including those three concepts/codes, but there is no subdomain of that name or equivalent with a binding to either of the value sets that contain these concepts/codes. Members of the OO WG have recently attempted to contact members of RCRIM regarding these concepts, both by email and at the recent WGM in Atlanta, without response. It is felt by OO that the best course of action to take at this time is to add this comprehensive Open Issue rather than deprecate these three concepts at this time, until further discussion is held. """ hm = CodeSystemConcept( { "code": "HM", "definition": 'Hold for Medical Review\r\n\n \n Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 "Interpretation Codes."', "display": "Hold for Medical Review", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2016-11-10"}, ], } ) """ Hold for Medical Review Hold for Medical Review Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 "Interpretation Codes." """ observation_interpretation_detection = CodeSystemConcept( { "code": "ObservationInterpretationDetection", "concept": [ { "code": "IND", "concept": [ { "code": "E", "definition": "The test or procedure was successfully performed, but the results are borderline and can neither be declared positive / negative nor detected / not detected according to the current established criteria.", "display": "Equivocal", } ], "definition": 'The specified component / analyte, organism or clinical sign could neither be declared positive / negative nor detected / not detected by the performed test or procedure.\r\n\n \n Usage Note: For example, if the specimen was degraded, poorly processed, or was missing the required anatomic factory, then "indeterminate" (i.e. "cannot be determined") is the appropriate response, not "equivocal".', "display": "Indeterminate", }, { "code": "NEG", "concept": [ { "code": "ND", "definition": "The presence of the specified component / analyte, organism or clinical sign could not be determined within the limit of detection of the performed test or procedure.", "display": "Not detected", } ], "definition": "An absence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure.\r\n\n [Note: Negative does not necessarily imply the complete absence of the specified item.]", "display": "Negative", }, { "code": "POS", "concept": [ { "code": "DET", "definition": "The measurement of the specified component / analyte, organism or clinical sign above the limit of detection of the performed test or procedure.", "display": "Detected", } ], "definition": "A presence finding of the specified component / analyte, organism or clinical sign based on the established threshold of the performed test or procedure.", "display": "Positive", }, ], "definition": 'Interpretations of the presence or absence of a component / analyte or organism in a test or of a sign in a clinical observation. In keeping with laboratory data processing practice, these concepts provide a categorical interpretation of the "meaning" of the quantitative value for the same observation.', "display": "ObservationInterpretationDetection", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ ObservationInterpretationDetection Interpretations of the presence or absence of a component / analyte or organism in a test or of a sign in a clinical observation. In keeping with laboratory data processing practice, these concepts provide a categorical interpretation of the "meaning" of the quantitative value for the same observation. """ observation_interpretation_expectation = CodeSystemConcept( { "code": "ObservationInterpretationExpectation", "concept": [ { "code": "EXP", "definition": 'This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Expected" (e.g., presence of drugs in a patient that is taking prescription medication for pain management).', "display": "Expected", }, { "code": "UNE", "definition": 'This result has been evaluated in light of known contraindicators. Once those contraindicators have been taken into account the result is determined to be "Unexpected" (e.g., presence of non-prescribed drugs in a patient that is taking prescription medication for pain management).', "display": "Unexpected", }, ], "definition": "Interpretation of the observed result taking into account additional information (contraindicators) about the patient's situation. Concepts in this category are mutually exclusive, i.e., at most one is allowed.", "display": "ObservationInterpretationExpectation", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ ObservationInterpretationExpectation Interpretation of the observed result taking into account additional information (contraindicators) about the patient's situation. Concepts in this category are mutually exclusive, i.e., at most one is allowed. """ obx = CodeSystemConcept( { "code": "OBX", "definition": 'Interpretation qualifiers in separate OBX segments\r\n\n \n Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 "Interpretation Codes."', "display": "Interpretation qualifiers in separate OBX segments", "property": [ {"code": "status", "valueCode": "deprecated"}, {"code": "deprecationDate", "valueDateTime": "2016-11-10"}, ], } ) """ Interpretation qualifiers in separate OBX segments Interpretation qualifiers in separate OBX segments Usage Note: This code is not intended for use in V3 artifacts. It is included in the code system to maintain alignment with the V2 Table 0078 "Interpretation Codes." """ reactivity_observation_interpretation = CodeSystemConcept( { "code": "ReactivityObservationInterpretation", "concept": [ { "code": "NR", "definition": "An absence finding used to indicate that the specified component / analyte did not react measurably with the reagent.", "display": "Non-reactive", }, { "code": "RR", "concept": [ { "code": "WR", "definition": "A weighted presence finding used to indicate that the specified component / analyte reacted with the reagent, but below the reliably measurable limit of the performed test.", "display": "Weakly reactive", } ], "definition": "A presence finding used to indicate that the specified component / analyte reacted with the reagent above the reliably measurable limit of the performed test.", "display": "Reactive", }, ], "definition": "Interpretations of the presence and level of reactivity of the specified component / analyte with the reagent in the performed laboratory test.", "display": "ReactivityObservationInterpretation", "property": [{"code": "notSelectable", "valueBoolean": True}], } ) """ ReactivityObservationInterpretation Interpretations of the presence and level of reactivity of the specified component / analyte with the reagent in the performed laboratory test. """ class Meta: resource = _resource
83.881783
1,642
0.590578
4,651
43,283
5.480972
0.15115
0.005178
0.005296
0.005217
0.734387
0.706065
0.698611
0.695198
0.687941
0.663267
0
0.01124
0.340203
43,283
515
1,643
84.04466
0.881399
0.011344
0
0.2343
0
0.137681
0.702842
0.026289
0
0
0
0
0
1
0
false
0
0.007246
0
0.038647
0.007246
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e753112dc2148b961e629a06ae87375f4b5b68e4
10,606
py
Python
wiki/views.py
cusele/DB_OPS
f666bc56844cb6985937314190508ed393ce2171
[ "Apache-2.0" ]
null
null
null
wiki/views.py
cusele/DB_OPS
f666bc56844cb6985937314190508ed393ce2171
[ "Apache-2.0" ]
null
null
null
wiki/views.py
cusele/DB_OPS
f666bc56844cb6985937314190508ed393ce2171
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time,os from django.shortcuts import render from django.contrib.auth.decorators import permission_required from django.contrib.auth.decorators import login_required from wiki.models import Tag,Post,Category from django.contrib.auth.models import User from OpsManage.utils.logger import logger from OpsManage.utils import base # Create your views here. from django.http import HttpResponse,JsonResponse from django.views.decorators.csrf import csrf_exempt @login_required() @permission_required('OpsManage.can_add_wiki_post',login_url='/noperm/') def article_add(request): if request.method == "GET": tagList = Tag.objects.all() categoryList = Category.objects.all() return render(request,'wiki/wiki_post.html',{"user":request.user,"tagList":tagList,"categoryList":categoryList}) elif request.method == "POST": title = request.POST.get('title') content = request.POST.get('content') category = request.POST.get('category') tags = request.POST.getlist('tag[]') try: category = Category.objects.get(id=category) except Exception ,ex: logger.warn(msg="获取分类失败: {ex}".format(ex=str(ex))) return JsonResponse({'msg':"获取分类失败: {ex}".format(ex=str(ex)),"code":500,'data':[]}) try: article = Post.objects.create(title=title,content=content,category=category, author=User.objects.get(username=request.user)) except Exception ,ex: logger.warn(msg="创建文章失败: {ex}".format(ex=str(ex))) return JsonResponse({'msg':"创建文章失败: {ex}".format(ex=str(ex)),"code":500,'data':[]}) try: for tg in tags: tag = Tag.objects.get(id=tg) article.tags.add(tag) except Exception ,ex: logger.warn(msg="创建文章标签失败: {ex}".format(ex=str(ex))) return JsonResponse({'msg':"文章添加成功","code":200,'data':[]}) @login_required() @csrf_exempt def upload_image(request): if request.method == 'POST': f = request.FILES["upload"] callback = request.GET.get('CKEditorFuncNum','1') if f: try: datePath = time.strftime("%Y/%m/%d/",time.localtime()) path = os.getcwd() + "/upload/wiki/" + datePath filePath = path + f.name if os.path.isdir(os.path.dirname(filePath)) is not True:os.makedirs(os.path.dirname(filePath)) with open(filePath, 'wb+') as destination: for chunk in f.chunks(): destination.write(chunk) except Exception, ex: logger.error(msg="上传图片失败: {ex}".format(ex=ex)) res = "<script>window.parent.CKEDITOR.tools.callFunction("+callback+",'/"+ 'wiki/upload/' + datePath + f.name +"', '');</script>" return HttpResponse (res) else: return JsonResponse({'msg':"图片上传失败","code":500,'data':[]}) @login_required() @permission_required('OpsManage.can_edit_wiki_post',login_url='/noperm/') def article_edit(request,pid): try: article = Post.objects.select_related().get(id=pid) except Exception,ex: logger.error(msg="文章不存在: {ex}".format(ex=ex)) return render(request,'wiki/wiki_edit.html',{"user":request.user,"errorInfo":ex}) if request.method == "GET": tagList = Tag.objects.all() categoryList = Category.objects.all() article.tag = [ t.id for t in article.tags.all() ] return render(request,'wiki/wiki_edit.html',{"user":request.user,"tagList":tagList,"categoryList":categoryList,"article":article}) elif request.method == "POST": title = request.POST.get('title') content = request.POST.get('content') category = request.POST.get('category') tags = request.POST.getlist('tag[]') try: category = Category.objects.get(id=category) except Exception ,ex: logger.warn(msg="获取分类失败: {ex}".format(ex=str(ex))) return JsonResponse({'msg':"获取分类失败: {ex}".format(ex=str(ex)),"code":500,'data':[]}) try: Post.objects.filter(id=pid).update(title=title,content=content,category=category, author=User.objects.get(username=request.user)) except Exception ,ex: logger.warn(msg="更新文章失败: {ex}".format(ex=str(ex))) return JsonResponse({'msg':"更新文章失败: {ex}".format(ex=str(ex)),"code":500,'data':[]}) try: newTagsList = [] for tg in tags: newTagsList.append(int(tg)) except Exception ,ex: logger.warn(msg="获取文章标签失败: {ex}".format(ex=ex)) try: oldTagsList = [ t.id for t in article.tags.all() ] addTagsList = list(set(newTagsList).difference(set(oldTagsList))) delTagsList = list(set(oldTagsList).difference(set(newTagsList))) for tg in addTagsList: tag = Tag.objects.get(id=tg) article.tags.add(tag) for tg in delTagsList: tag = Tag.objects.get(id=tg) article.tags.remove(tag) except Exception ,ex: logger.warn(msg="更新文章标签失败: {ex}".format(ex=ex)) return JsonResponse({'msg':"文章添加成功","code":200,'data':[]}) @login_required() @permission_required('OpsManage.can_read_wiki_post',login_url='/noperm/') def article_index(request): tagList = Tag.objects.all() categoryList = [] for ds in Category.objects.all(): ds.post_count = Post.objects.filter(category=ds).count() categoryList.append(ds) postList = Post.objects.all().order_by('-id')[:10] dateList = Post.objects.raw('SELECT id,DATE_FORMAT( created_time, "%%Y/%%m" ) as cdate , COUNT(*) as count FROM opsmanage_wiki_post GROUP BY DATE_FORMAT( created_time, "%%Y/%%m" );') return render(request,'wiki/wiki_base.html',{"user":request.user,"tagList":tagList,"categoryList":categoryList,"postList":postList,"dateList":dateList}) @login_required() @permission_required('OpsManage.can_read_wiki_post',login_url='/noperm/') def article_show(request,pid): try: article = Post.objects.select_related().get(id=pid) except Exception,ex: logger.error(msg="文章不存在: {ex}".format(ex=ex)) return render(request,'wiki/wiki_show.html',{"user":request.user,"errorInfo":ex}) if request.method == "GET": tagList = Tag.objects.all() categoryList = Category.objects.all() article.tag = [ t.id for t in article.tags.all() ] postList = Post.objects.all().order_by('-id')[:5] categoryList = [] for ds in Category.objects.all(): ds.post_count = Post.objects.filter(category=ds).count() categoryList.append(ds) dateList = Post.objects.raw('SELECT id,DATE_FORMAT( created_time, "%%Y/%%m" ) as cdate , COUNT(*) as count FROM opsmanage_wiki_post GROUP BY DATE_FORMAT( created_time, "%%Y/%%m" );') return render(request,'wiki/wiki_show.html',{"user":request.user,"tagList":tagList, "categoryList":categoryList,"article":article, "postList":postList,"dateList":dateList}) @login_required() @permission_required('OpsManage.can_read_wiki_post',login_url='/noperm/') def article_category(request,pid): try: category = Category.objects.get(id=pid) except Exception,ex: logger.warn(msg="分类不存在: {ex}".format(ex=ex)) return render(request,'wiki/wiki_base.html',{"user":request.user,"errorInfo":"分类不存在: {ex}".format(ex=ex)}) categoryList = [] for ds in Category.objects.all(): ds.post_count = Post.objects.filter(category=ds).count() categoryList.append(ds) postList = Post.objects.filter(category=category).order_by('-id') dateList = Post.objects.raw('SELECT id,DATE_FORMAT( created_time, "%%Y/%%m" ) as cdate , COUNT(*) as count FROM opsmanage_wiki_post GROUP BY DATE_FORMAT( created_time, "%%Y/%%m" );') tagList = Tag.objects.all() return render(request,'wiki/wiki_base.html',{"user":request.user,"postList":postList,"dateList":dateList,"tagList":tagList,"categoryList":categoryList}) @login_required() @permission_required('OpsManage.can_read_wiki_post',login_url='/noperm/') def article_tag(request,pid): try: tag = Tag.objects.get(id=pid) except Exception,ex: logger.warn(msg="标签不存在: {ex}".format(ex=ex)) return render(request,'wiki/wiki_base.html',{"user":request.user,"errorInfo":"标签不存在: {ex}".format(ex=ex)}) categoryList = [] for ds in Category.objects.all(): ds.post_count = Post.objects.filter(category=ds).count() categoryList.append(ds) postList = Post.objects.filter(tags=tag.id).order_by('-id') dateList = Post.objects.raw('SELECT id,DATE_FORMAT( created_time, "%%Y/%%m" ) as cdate , COUNT(*) as count FROM opsmanage_wiki_post GROUP BY DATE_FORMAT( created_time, "%%Y/%%m" );') tagList = Tag.objects.all() return render(request,'wiki/wiki_base.html',{"user":request.user,"postList":postList,"dateList":dateList,"tagList":tagList,"categoryList":categoryList}) @login_required() @permission_required('OpsManage.can_read_wiki_post',login_url='/noperm/') def article_archive(request,month): try: archiveDate = base.getMonthFirstDayAndLastDay(month.split('/')[0],month.split('/')[1]) except Exception,ex: return render(request,'wiki/wiki_base.html',{"user":request.user,"errorInfo":"归档时间不存在: {ex}".format(ex=ex)}) categoryList = [] for ds in Category.objects.all(): ds.post_count = Post.objects.filter(category=ds).count() categoryList.append(ds) postList = Post.objects.raw('''SELECT * FROM opsmanage_wiki_post WHERE created_time>='{startime}' AND created_time<='{endtime}' ORDER BY id DESC;'''.format(startime=str(archiveDate[0]) +' 00:00:00',endtime=str(archiveDate[1]) + ' 23:59:59')) dateList = Post.objects.raw('SELECT id,DATE_FORMAT( created_time, "%%Y/%%m" ) as cdate , COUNT(*) as count FROM opsmanage_wiki_post GROUP BY DATE_FORMAT( created_time, "%%Y/%%m" );') tagList = Tag.objects.all() return render(request,'wiki/wiki_base.html',{"user":request.user,"postList":postList,"dateList":dateList,"tagList":tagList,"categoryList":categoryList})
50.990385
245
0.628041
1,289
10,606
5.076804
0.138092
0.023227
0.029034
0.042176
0.767268
0.75871
0.728606
0.687653
0.651895
0.643032
0
0.00503
0.21271
10,606
207
246
51.236715
0.778683
0.004243
0
0.597884
0
0.026455
0.210551
0.028036
0.005291
0
0
0
0
0
null
null
0
0.058201
null
null
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
e763cb34b5a36842ed301c671043edbbebab63ae
130
py
Python
pyiid/experiments/elasticscatter/mpi_wrappers/__init__.py
ZhouHUB/pyIID
6114fb5ae4388061c7aae9f5b0b2e41aa4ca4341
[ "BSD-3-Clause" ]
null
null
null
pyiid/experiments/elasticscatter/mpi_wrappers/__init__.py
ZhouHUB/pyIID
6114fb5ae4388061c7aae9f5b0b2e41aa4ca4341
[ "BSD-3-Clause" ]
13
2016-04-25T18:36:42.000Z
2016-06-12T20:57:35.000Z
pyiid/experiments/elasticscatter/mpi_wrappers/__init__.py
ZhouHUB/pyIID
6114fb5ae4388061c7aae9f5b0b2e41aa4ca4341
[ "BSD-3-Clause" ]
null
null
null
__author__ = 'christopher' # TODO: How to deal with multiple GPUs per Node? # TODO: How to use all the CPU + GPU power of a Node?
32.5
53
0.715385
23
130
3.869565
0.826087
0.157303
0.202247
0
0
0
0
0
0
0
0
0
0.207692
130
3
54
43.333333
0.864078
0.753846
0
0
0
0
0.37931
0
0
0
0
0.333333
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
1
0
0
0
0
0
0
0
0
0
0
4
e77458f666f9ec612d4eec4b6be950d3ed840316
101
py
Python
backend/comedianModel/apps.py
crowdbotics-apps/test14-28665
182788839dd9b1149196428183ee91dfd67231a3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/comedianModel/apps.py
crowdbotics-apps/test14-28665
182788839dd9b1149196428183ee91dfd67231a3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/comedianModel/apps.py
crowdbotics-apps/test14-28665
182788839dd9b1149196428183ee91dfd67231a3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.apps import AppConfig class ComedianmodelConfig(AppConfig): name = "comedianModel"
16.833333
37
0.782178
10
101
7.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.148515
101
5
38
20.2
0.918605
0
0
0
0
0
0.128713
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
e7bdba27293ceefad06ca2d67cbc5c57685f7273
1,714
py
Python
bamboolean/ast.py
mlazowik/bamboolean
9e50cce7781410d20a8440273d93b41bee5568a3
[ "MIT" ]
null
null
null
bamboolean/ast.py
mlazowik/bamboolean
9e50cce7781410d20a8440273d93b41bee5568a3
[ "MIT" ]
null
null
null
bamboolean/ast.py
mlazowik/bamboolean
9e50cce7781410d20a8440273d93b41bee5568a3
[ "MIT" ]
null
null
null
from typing import List, Any, Union from .lexer import Token class AST: """Abstract Syntax Tree """ def tree_repr(self) -> List[Any]: raise NotImplementedError def __str__(self) -> str: return str(self.tree_repr()) def __repr__(self) -> str: return self.__str__() class TokenBasedAST(AST): def __init__(self, token: Token) -> None: self.token = token self.value = token.value def tree_repr(self): return self.token.tree_repr() class Var(TokenBasedAST): pass class Num(TokenBasedAST): pass class Bool(TokenBasedAST): pass class String(TokenBasedAST): pass ASTValueType = Union[String, Bool, Num] class Constraint(AST): def __init__(self, var: Var, rel_op: Token, value: ASTValueType): self.var = var self.rel_op = rel_op self.value = value def tree_repr(self) -> List[Any]: return [ self.var.tree_repr(), self.rel_op.tree_repr(), self.value.tree_repr(), ] class UnOp(AST): def __init__(self, op: Token, right: AST) -> None: self.op = op self.right = right def tree_repr(self) -> List[Any]: return [ self.op.tree_repr(), self.right.tree_repr(), ] class BinOp(AST): def __init__(self, left: AST, op: Token, right: AST) -> None: self.left = left self.op = op self.right = right def tree_repr(self) -> List[Any]: return [ self.left.tree_repr(), self.op.tree_repr(), self.right.tree_repr(), ] class NoOp(AST): def tree_repr(self) -> List[Any]: return ['noop']
19.477273
69
0.573512
213
1,714
4.389671
0.178404
0.136898
0.141176
0.096257
0.347594
0.320856
0.252406
0.22246
0.188235
0.115508
0
0
0.304551
1,714
87
70
19.701149
0.784396
0.011669
0
0.344828
0
0
0.002371
0
0
0
0
0
0
1
0.206897
false
0.068966
0.034483
0.12069
0.534483
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
1
1
0
0
4
99da487196c5140ad8db6b47f90ceb2f1adc8a71
179
py
Python
lib/__about__.py
alexandrseverinov/squarified-treemap
5aa083a0bca093201a22813cbb9e775178f4cb93
[ "MIT" ]
1
2019-10-26T13:50:16.000Z
2019-10-26T13:50:16.000Z
lib/__about__.py
alexandrseverinov/squarified-treemap
5aa083a0bca093201a22813cbb9e775178f4cb93
[ "MIT" ]
null
null
null
lib/__about__.py
alexandrseverinov/squarified-treemap
5aa083a0bca093201a22813cbb9e775178f4cb93
[ "MIT" ]
null
null
null
__all__ = ["__title__", "__url__", "__version__"] __title__ = "squarified_treemap" __url__ = "https://github.com/alexandrseverinov/squarified_treemap.git" __version__ = "0.1.1"
25.571429
71
0.748603
19
179
5.473684
0.684211
0.326923
0
0
0
0
0
0
0
0
0
0.018405
0.089385
179
6
72
29.833333
0.619632
0
0
0
0
0
0.608939
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
99e780385e63f3344a8ff3da30b18e0668e28970
98
py
Python
rest_tracker/apps.py
TannerBurns/rest_tracker
1747f087046052633e84f827717fd5d9cb0f2ab9
[ "MIT" ]
1
2020-08-17T13:52:24.000Z
2020-08-17T13:52:24.000Z
rest_tracker/apps.py
TannerBurns/rest_tracker
1747f087046052633e84f827717fd5d9cb0f2ab9
[ "MIT" ]
null
null
null
rest_tracker/apps.py
TannerBurns/rest_tracker
1747f087046052633e84f827717fd5d9cb0f2ab9
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TrackerCoreConfig(AppConfig): name = 'rest_tracker'
16.333333
35
0.77551
11
98
6.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
36
19.6
0.903614
0
0
0
0
0
0.122449
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
820326ee4c0d6e32ba6efeaac348e4818da1feb3
68
py
Python
src/scruples/demos/__init__.py
allenai/scruples
9a43459c507e57d89ab8442a4f3985cedecb8710
[ "Apache-2.0" ]
29
2020-05-09T10:55:45.000Z
2022-03-28T16:18:02.000Z
src/scruples/demos/__init__.py
allenai/scruples
9a43459c507e57d89ab8442a4f3985cedecb8710
[ "Apache-2.0" ]
null
null
null
src/scruples/demos/__init__.py
allenai/scruples
9a43459c507e57d89ab8442a4f3985cedecb8710
[ "Apache-2.0" ]
6
2020-10-05T12:24:28.000Z
2021-12-06T19:51:06.000Z
"""Demos for scruples.""" from . import ( norms, scoracle)
11.333333
25
0.573529
7
68
5.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.264706
68
5
26
13.6
0.78
0.279412
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
82099719c721f882aaeee2993df5036a71731273
111
py
Python
LuoguCodes/AT663.py
Anguei/OI-Codes
0ef271e9af0619d4c236e314cd6d8708d356536a
[ "MIT" ]
null
null
null
LuoguCodes/AT663.py
Anguei/OI-Codes
0ef271e9af0619d4c236e314cd6d8708d356536a
[ "MIT" ]
null
null
null
LuoguCodes/AT663.py
Anguei/OI-Codes
0ef271e9af0619d4c236e314cd6d8708d356536a
[ "MIT" ]
null
null
null
ans = 0 for i in range(int(raw_input())): ans += [0, 1][sum(map(int, raw_input().split())) < 20] print ans
22.2
58
0.585586
21
111
3
0.714286
0.126984
0.349206
0
0
0
0
0
0
0
0
0.054945
0.18018
111
4
59
27.75
0.637363
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
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
1
0
0
0
0
0
0
0
0
4
820a4dda04c8d50ebe955cea2375d176637e5908
23,858
py
Python
big-fish/bigfish/plot/plot_images.py
Henley13/paper_translation_factories_2020
77558ed70467cf91062abf62e46c794bfbc08e4a
[ "BSD-3-Clause" ]
2
2020-09-03T20:50:53.000Z
2020-10-02T14:39:31.000Z
big-fish/bigfish/plot/plot_images.py
Henley13/paper_translation_factories_2020
77558ed70467cf91062abf62e46c794bfbc08e4a
[ "BSD-3-Clause" ]
4
2020-01-15T10:26:14.000Z
2020-10-01T18:36:39.000Z
big-fish/bigfish/plot/plot_images.py
Henley13/paper_translation_factories_2020
77558ed70467cf91062abf62e46c794bfbc08e4a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Function to plot 2-d images. """ import bigfish.stack as stack import matplotlib.pyplot as plt import numpy as np from .utils import save_plot, get_minmax_values from skimage.segmentation import find_boundaries from matplotlib.colors import ListedColormap # TODO clean this script (remove useless functions) # TODO add parameter to show the figure def plot_yx(tensor, r=0, c=0, z=0, rescale=False, title=None, framesize=(8, 8), remove_frame=False, path_output=None, ext="png", show=True): """Plot the selected yx plan of the selected dimensions of an image. Parameters ---------- tensor : np.ndarray A 2-d, 3-d or 5-d tensor with shape (y, x), (z, y, x) or (r, c, z, y, x) respectively. r : int Index of the round to keep. c : int Index of the channel to keep. z : int Index of the z slice to keep. rescale : bool Rescale pixel values of the image (made by default in matplotlib). title : str Title of the image. framesize : tuple Size of the frame used to plot with 'plt.figure(figsize=framesize)'. remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. show : bool Show the figure or not. Returns ------- """ # check parameters stack.check_array(tensor, ndim=[2, 3, 5], dtype=[np.uint8, np.uint16, np.float32, np.float64, bool]) stack.check_parameter(r=int, c=int, z=int, rescale=bool, title=(str, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list)) # get the 2-d tensor xy_tensor = None if tensor.ndim == 2: xy_tensor = tensor elif tensor.ndim == 3: xy_tensor = tensor[z, :, :] elif tensor.ndim == 5: xy_tensor = tensor[r, c, z, :, :] # get minimum and maximum value of the image vmin, vmax = None, None if not rescale: vmin, vmax = get_minmax_values(tensor) # plot if remove_frame: fig = plt.figure(figsize=framesize, frameon=False) ax = fig.add_axes([0, 0, 1, 1]) ax.axis('off') else: plt.figure(figsize=framesize) if not rescale: plt.imshow(xy_tensor, vmin=vmin, vmax=vmax) else: plt.imshow(xy_tensor) if title is not None and not remove_frame: plt.title(title, fontweight="bold", fontsize=25) if not remove_frame: plt.tight_layout() if path_output is not None: save_plot(path_output, ext) if show: plt.show() else: plt.close() return def plot_images(tensors, rescale=False, titles=None, framesize=(15, 5), remove_frame=False, path_output=None, ext="png", show=True): """Plot or subplot of 2-d images. Parameters ---------- tensors : np.ndarray or List[np.ndarray] Images with shape (y, x). rescale : bool Rescale pixel values of the image (made by default in matplotlib). titles : List[str] Titles of the subplots. framesize : tuple Size of the frame used to plot with 'plt.figure(figsize=framesize)'. remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. show : bool Show the figure or not. Returns ------- """ # enlist image if necessary if isinstance(tensors, np.ndarray): tensors = [tensors] # check parameters stack.check_parameter(tensors=list, rescale=bool, titles=(str, list, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list), show=bool) for tensor in tensors: stack.check_array(tensor, ndim=2, dtype=[np.uint8, np.uint16, np.int64, np.float32, np.float64, bool]) # we plot 3 images by row maximum nrow = int(np.ceil(len(tensors)/3)) ncol = min(len(tensors), 3) # plot one image if len(tensors) == 1: if titles is not None: title = titles[0] else: title = None plot_yx(tensors[0], rescale=rescale, title=title, framesize=framesize, remove_frame=remove_frame, path_output=path_output, ext=ext, show=show) return # plot multiple images fig, ax = plt.subplots(nrow, ncol, figsize=framesize) # one row if len(tensors) in [2, 3]: for i, tensor in enumerate(tensors): if remove_frame: ax[i].axis("off") if not rescale: vmin, vmax = get_minmax_values(tensor) ax[i].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[i].imshow(tensor) if titles is not None: ax[i].set_title(titles[i], fontweight="bold", fontsize=10) # several rows else: # we complete the row with empty frames r = nrow * 3 - len(tensors) tensors_completed = [tensor for tensor in tensors] + [None] * r for i, tensor in enumerate(tensors_completed): row = i // 3 col = i % 3 if tensor is None: ax[row, col].set_visible(False) continue if remove_frame: ax[row, col].axis("off") if not rescale: vmin, vmax = get_minmax_values(tensor) ax[row, col].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[row, col].imshow(tensor) if titles is not None: ax[row, col].set_title(titles[i], fontweight="bold", fontsize=10) plt.tight_layout() if path_output is not None: save_plot(path_output, ext) if show: plt.show() else: plt.close() return def plot_channels_2d(tensor, r=0, z=0, rescale=False, titles=None, framesize=(15, 5), remove_frame=False, path_output=None, ext="png"): """Subplot the yx plan of the selected dimensions of an image for all channels. Parameters ---------- tensor : np.ndarray, np.uint A 5-d tensor with shape (r, c, z, y, x). r : int Index of the round to keep. z : int Index of the z slice to keep. rescale : bool Rescale pixel values of the image (made by default in matplotlib). titles : List[str] Titles of the subplots (one per channel). framesize : tuple Size of the frame used to plot with 'plt.figure(figsize=framesize)'. remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. Returns ------- """ # check parameters stack.check_array(tensor, ndim=5, dtype=[np.uint8, np.uint16]) stack.check_parameter(r=int, z=int, rescale=bool, titles=(list, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list)) # get the number of channels nb_channels = tensor.shape[1] # get the minimum and maximal values of the tensor dtype vmin, vmax = None, None if not rescale: vmin, vmax = get_minmax_values(tensor) # plot fig, ax = plt.subplots(1, nb_channels, sharex='col', figsize=framesize) for i in range(nb_channels): if not rescale: ax[i].imshow(tensor[r, i, z, :, :], vmin=vmin, vmax=vmax) else: ax[i].imshow(tensor[r, i, z, :, :]) if titles is not None: ax[i].set_title(titles[i], fontweight="bold", fontsize=10) if remove_frame: ax[i].axis("off") plt.tight_layout() if path_output is not None: save_plot(path_output, ext) plt.show() return def plot_illumination_surface(illumination_surface, r=0, framesize=(15, 15), titles=None, path_output=None, ext="png"): """Subplot the yx plan of the dimensions of an illumination surface for all channels. Parameters ---------- illumination_surface : np.ndarray, np.float A 4-d tensor with shape (r, c, y, x) approximating the average differential of illumination in our stack of images, for each channel and each round. r : int Index of the round to keep. framesize : tuple Size of the frame used to plot with 'plt.figure(figsize=framesize)'. titles : List[str] Titles of the subplots (one per channel). path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. Returns ------- """ # TODO add title in the plot and remove axes # TODO add parameter for vmin and vmax # check tensor stack.check_array(illumination_surface, ndim=4, dtype=[np.float32, np.float64]) # get the number of channels nb_channels = illumination_surface.shape[1] # plot fig, ax = plt.subplots(1, nb_channels, sharex='col', figsize=framesize) for i in range(nb_channels): ax[i].imshow(illumination_surface[r, i, :, :]) if titles is not None: ax[i].set_title(titles[i], fontweight="bold", fontsize=15) plt.tight_layout() save_plot(path_output, ext) plt.show() return def plot_segmentation(tensor, mask, rescale=False, title=None, framesize=(15, 5), remove_frame=False, path_output=None, ext="png", show=True): """Plot result of a 2-d segmentation, with labelled instances if available. Parameters ---------- tensor : np.ndarray A 2-d tensor with shape (y, x). mask : np.ndarray A 2-d image with shape (y, x). rescale : bool Rescale pixel values of the image (made by default in matplotlib). title : str Title of the image. framesize : tuple Size of the frame used to plot with 'plt.figure(figsize=framesize)'. remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. show : bool Show the figure or not. Returns ------- """ # check parameters stack.check_array(tensor, ndim=2, dtype=[np.uint8, np.uint16, np.float32, np.float64, bool]) stack.check_array(mask, ndim=2, dtype=[np.uint8, np.uint16, np.int64, bool]) stack.check_parameter(rescale=bool, title=(str, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list)) # get minimum and maximum value of the image vmin, vmax = None, None if not rescale: vmin, vmax = get_minmax_values(tensor) # plot fig, ax = plt.subplots(1, 3, sharex='col', figsize=framesize) # image if not rescale: ax[0].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[0].imshow(tensor) if title is not None: ax[0].set_title(title, fontweight="bold", fontsize=10) if remove_frame: ax[0].axis("off") # label ax[1].imshow(mask) if title is not None: ax[1].set_title("Segmentation", fontweight="bold", fontsize=10) if remove_frame: ax[1].axis("off") # superposition if not rescale: ax[2].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[2].imshow(tensor) masked = np.ma.masked_where(mask == 0, mask) ax[2].imshow(masked, cmap=ListedColormap(['red']), alpha=0.5) if title is not None: ax[2].set_title("Surface", fontweight="bold", fontsize=10) if remove_frame: ax[2].axis("off") plt.tight_layout() if path_output is not None: save_plot(path_output, ext) if show: plt.show() else: plt.close() return def plot_segmentation_boundary(tensor, mask_nuc=None, mask_cyt=None, rescale=False, title=None, framesize=(10, 10), remove_frame=False, path_output=None, ext="png", show=True): """Plot the boundary of the segmented objects. Parameters ---------- tensor : np.ndarray A 2-d tensor with shape (y, x). mask_nuc : np.ndarray A 2-d image with shape (y, x). mask_cyt : np.ndarray A 2-d image with shape (y, x). rescale : bool Rescale pixel values of the image (made by default in matplotlib). title : str Title of the image. framesize : tuple Size of the frame used to plot with 'plt.figure(figsize=framesize)'. remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. show : bool Show the figure or not. Returns ------- """ # check parameters stack.check_array(tensor, ndim=2, dtype=[np.uint8, np.uint16, np.float32, np.float64, bool]) if mask_nuc is not None: stack.check_array(mask_nuc, ndim=2, dtype=[np.uint8, np.uint16, np.int64, bool]) if mask_cyt is not None: stack.check_array(mask_cyt, ndim=2, dtype=[np.uint8, np.uint16, np.int64, bool]) stack.check_parameter(rescale=bool, title=(str, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list), show=bool) # get minimum and maximum value of the image vmin, vmax = None, None if not rescale: vmin, vmax = get_minmax_values(tensor) # get boundaries boundaries_nuc = None boundaries_cyt = None if mask_nuc is not None: boundaries_nuc = find_boundaries(mask_nuc, mode='thick') boundaries_nuc = np.ma.masked_where(boundaries_nuc == 0, boundaries_nuc) if mask_cyt is not None: boundaries_cyt = find_boundaries(mask_cyt, mode='thick') boundaries_cyt = np.ma.masked_where(boundaries_cyt == 0, boundaries_cyt) # plot if remove_frame: fig = plt.figure(figsize=framesize, frameon=False) ax = fig.add_axes([0, 0, 1, 1]) ax.axis('off') else: plt.figure(figsize=framesize) if not rescale: plt.imshow(tensor, vmin=vmin, vmax=vmax) else: plt.imshow(tensor) if mask_nuc is not None: plt.imshow(boundaries_nuc, cmap=ListedColormap(['blue'])) if mask_cyt is not None: plt.imshow(boundaries_cyt, cmap=ListedColormap(['red'])) if title is not None and not remove_frame: plt.title(title, fontweight="bold", fontsize=25) if not remove_frame: plt.tight_layout() if path_output is not None: save_plot(path_output, ext) if show: plt.show() else: plt.close() return def plot_spot_detection(tensor, spots, radius_yx, rescale=False, title=None, framesize=(15, 5), remove_frame=False, path_output=None, ext="png", show=True): """Plot detected spot on a 2-d image. Parameters ---------- tensor : np.ndarray A 2-d tensor with shape (y, x). spots : np.ndarray, np.int64 Coordinate of the spots with shape (nb_spots, 3) or (nb_spots, 2) for 3-d or 2-d images respectively. radius_yx : float or int Radius yx of the detected spots. rescale : bool Rescale pixel values of the image (made by default in matplotlib). title : str Title of the image. framesize : tuple Size of the frame used to plot (plt.figure(figsize=framesize). remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. show : bool Show the figure or not. Returns ------- """ # TODO check coordinates shape # check parameters stack.check_array(tensor, ndim=2, dtype=[np.uint8, np.uint16, np.float32, np.float64]) stack.check_array(spots, ndim=2, dtype=[np.int64]) stack.check_parameter(radius_yx=(float, int), rescale=bool, title=(str, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list), show=bool) # get minimum and maximum value of the image vmin, vmax = None, None if not rescale: vmin, vmax = get_minmax_values(tensor) # plot fig, ax = plt.subplots(1, 2, sharex='col', figsize=framesize) # image if not rescale: ax[0].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[0].imshow(tensor) if title is not None: ax[0].set_title(title, fontweight="bold", fontsize=10) if remove_frame: ax[0].axis("off") # spots if not rescale: ax[1].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[1].imshow(tensor) for spot_coordinate in spots: _, y, x = spot_coordinate c = plt.Circle((x, y), radius_yx, color="red", linewidth=1, fill=False) ax[1].add_patch(c) if title is not None: ax[1].set_title("All detected spots", fontweight="bold", fontsize=10) if remove_frame: ax[1].axis("off") plt.tight_layout() if path_output is not None: save_plot(path_output, ext) if show: plt.show() else: plt.close() return def plot_foci_detection(tensor, spots, foci, radius_spots_yx, rescale=False, title=None, framesize=(15, 10), remove_frame=False, path_output=None, ext="png", show=True): """Plot detected spots and foci on a 2-d image. Parameters ---------- tensor : np.ndarray A 2-d tensor with shape (y, x). spots : np.ndarray, np.int64 Coordinate of the spots with shape (nb_spots, 3). foci : np.ndarray, np.int64 Array with shape (nb_foci, 5). One coordinate per dimension (zyx coordinates), number of RNAs in the foci and index of the foci. radius_spots_yx : float or int Radius yx of the detected spots. rescale : bool Rescale pixel values of the image (made by default in matplotlib). title : str Title of the image. framesize : tuple Size of the frame used to plot (plt.figure(figsize=framesize). remove_frame : bool Remove axes and frame. path_output : str Path to save the image (without extension). ext : str or List[str] Extension used to save the plot. If it is a list of strings, the plot will be saved several times. show : bool Show the figure or not. Returns ------- """ # TODO check coordinates shape # TODO allow a plot for a specific z-slice # check parameters stack.check_array(tensor, ndim=2, dtype=[np.uint8, np.uint16, np.float32, np.float64]) stack.check_array(foci, ndim=2, dtype=[np.int64]) stack.check_parameter(spots=(np.ndarray, type(None)), radius_spots_yx=(float, int), rescale=bool, title=(str, type(None)), framesize=tuple, remove_frame=bool, path_output=(str, type(None)), ext=(str, list), show=bool) if spots is not None: stack.check_array(spots, ndim=2, dtype=[np.int64]) # get minimum and maximum value of the image vmin, vmax = None, None if not rescale: vmin, vmax = get_minmax_values(tensor) # plot fig, ax = plt.subplots(1, 2, sharex='col', figsize=framesize) # image if not rescale: ax[0].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[0].imshow(tensor) if title is not None: ax[0].set_title(title, fontweight="bold", fontsize=10) if remove_frame: ax[0].axis("off") # spots and foci if not rescale: ax[1].imshow(tensor, vmin=vmin, vmax=vmax) else: ax[1].imshow(tensor) if spots is not None: for (_, y, x) in spots: c = plt.Circle((x, y), radius_spots_yx, color="red", linewidth=1, fill=False) ax[1].add_patch(c) title_ = "Detected spots and foci" else: title_ = "Detected foci" for (_, y, x, _, _) in foci: c = plt.Circle((x, y), radius_spots_yx * 2, color="blue", linewidth=2, fill=False) ax[1].add_patch(c) if title is not None: ax[1].set_title(title_, fontweight="bold", fontsize=10) if remove_frame: ax[1].axis("off") plt.tight_layout() if path_output is not None: save_plot(path_output, ext) if show: plt.show() else: plt.close() return
31.268676
79
0.541789
3,022
23,858
4.196228
0.07677
0.017349
0.020582
0.023657
0.774071
0.751991
0.727466
0.712641
0.672108
0.654286
0
0.016402
0.361137
23,858
762
80
31.309711
0.815575
0.3043
0
0.680488
0
0
0.014672
0
0
0
0
0.005249
0
1
0.019512
false
0
0.014634
0
0.056098
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
820e46fb715916326f9e0ad665bfcd1b22977ea0
186
py
Python
example/voting_pages/__init__.py
mroohian/Leaf
5bb0901fbda2793ca6dba728ef159f1a55b39f28
[ "BSD-3-Clause" ]
null
null
null
example/voting_pages/__init__.py
mroohian/Leaf
5bb0901fbda2793ca6dba728ef159f1a55b39f28
[ "BSD-3-Clause" ]
null
null
null
example/voting_pages/__init__.py
mroohian/Leaf
5bb0901fbda2793ca6dba728ef159f1a55b39f28
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from leaf import leaf_world from home_page import HomePage leaf_world.base_url = 'http://127.0.0.1' leaf_world.available_pages.update({ 'home': HomePage })
18.6
40
0.709677
29
186
4.344828
0.655172
0.214286
0
0
0
0
0
0
0
0
0
0.04375
0.139785
186
10
41
18.6
0.74375
0.112903
0
0
0
0
0.121951
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4136d2b413aaee930d1e34a0aeff13ef0c289246
4,800
py
Python
_ML/models/contrib/models_keras.py
TSchlosser13/Hexnet
0f42ce3cb731f40dc9c28d7cd08077252ff2403f
[ "MIT" ]
10
2019-12-29T14:59:19.000Z
2021-12-27T13:11:03.000Z
_ML/models/contrib/models_keras.py
TSchlosser13/Hexnet
0f42ce3cb731f40dc9c28d7cd08077252ff2403f
[ "MIT" ]
3
2019-12-19T12:41:16.000Z
2022-03-15T16:37:11.000Z
_ML/models/contrib/models_keras.py
TSchlosser13/Hexnet
0f42ce3cb731f40dc9c28d7cd08077252ff2403f
[ "MIT" ]
1
2020-04-22T06:51:05.000Z
2020-04-22T06:51:05.000Z
'''**************************************************************************** * models_keras.py: Keras Models ****************************************************************************** * v0.1 - 01.03.2019 * * Copyright (c) 2019 Tobias Schlosser (tobias@tobias-schlosser.net) * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************''' import tensorflow as tf def model_keras_DenseNet121(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.DenseNet121(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_DenseNet169(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.DenseNet169(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_DenseNet201(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.DenseNet201(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_InceptionResNetV2(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.InceptionResNetV2(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_InceptionV3(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.InceptionV3(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_MobileNet(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.MobileNet(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_MobileNetV2(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.MobileNetV2(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_NASNetLarge(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.NASNetLarge(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_NASNetMobile(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.NASNetMobile(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_ResNet50(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.ResNet50(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_ResNet50V2(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.ResNet50V2(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_ResNet101(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.ResNet101(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_ResNet101V2(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.ResNet101V2(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_ResNet152(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.ResNet152(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_ResNet152V2(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.ResNet152V2(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_VGG16(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.VGG16(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_VGG19(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.VGG19(input_shape=input_shape, classes=classes, weights=weights, **kwargs) def model_keras_Xception(input_shape, classes, weights=None, **kwargs): return tf.keras.applications.Xception(input_shape=input_shape, classes=classes, weights=weights, **kwargs)
56.470588
116
0.761042
618
4,800
5.763754
0.216828
0.1516
0.171814
0.12128
0.633071
0.633071
0.633071
0.633071
0.633071
0.617911
0
0.019297
0.093125
4,800
84
117
57.142857
0.798989
0.293958
0
0
0
0
0
0
0
0
0
0
0
1
0.486486
false
0
0.027027
0.486486
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
1
0
0
4
41378d4d6dd36bb736961b94f799929ad9eb9ad9
64
py
Python
mayan/apps/reviewers/__init__.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/reviewers/__init__.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/reviewers/__init__.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
default_app_config = 'mayan.apps.reviewers.apps.ReviewersConfig'
64
64
0.859375
8
64
6.625
0.875
0
0
0
0
0
0
0
0
0
0
0
0.03125
64
1
64
64
0.854839
0
0
0
0
0
0.630769
0.630769
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4153abcb17a2af436a923bd2e0323e584d7cad80
62
py
Python
aio_graphite_api/cluster/__init__.py
yunstanford/aio-graphite-api
819b82c451c23ce5928e711202bde79a5399c3da
[ "Apache-2.0" ]
1
2016-12-09T04:14:16.000Z
2016-12-09T04:14:16.000Z
aio_graphite_api/cluster/__init__.py
yunstanford/aio-graphite-api
819b82c451c23ce5928e711202bde79a5399c3da
[ "Apache-2.0" ]
1
2017-02-06T22:15:07.000Z
2017-02-06T23:01:04.000Z
aio_graphite_api/cluster/__init__.py
yunstanford/aio-graphite-api
819b82c451c23ce5928e711202bde79a5399c3da
[ "Apache-2.0" ]
null
null
null
from .cluster import init_cluster __all__ = ["init_cluster"]
15.5
33
0.774194
8
62
5.25
0.625
0.52381
0
0
0
0
0
0
0
0
0
0
0.129032
62
3
34
20.666667
0.777778
0
0
0
0
0
0.193548
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
41577ee470bad853c4255171830655f3cb5853ad
359
py
Python
EventTypes.py
jpinsonault/diskusage
b950023cb5e1f24a969070c8d681e3d28f05309b
[ "MIT" ]
null
null
null
EventTypes.py
jpinsonault/diskusage
b950023cb5e1f24a969070c8d681e3d28f05309b
[ "MIT" ]
null
null
null
EventTypes.py
jpinsonault/diskusage
b950023cb5e1f24a969070c8d681e3d28f05309b
[ "MIT" ]
null
null
null
class StopApplication: def __init__(self, exception=None): self.exception = exception class ExceptionOccured: def __init__(self, exception): self.exception = exception class KeyStroke: def __init__(self, key): self.key = key class ButtonEvent: def __init__(self, identifier): self.identifier = identifier
18.894737
39
0.679666
37
359
6.162162
0.324324
0.122807
0.192982
0.175439
0
0
0
0
0
0
0
0
0.239554
359
18
40
19.944444
0.835165
0
0
0.166667
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
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
1
0
0
4
416359c3f8b03b54f4665b821889db4af1a7047b
2,456
py
Python
app/models.py
alligalli/Flaskp
c2fadf68fd339aef7fbfe3361822dc2f146ebd20
[ "MIT" ]
null
null
null
app/models.py
alligalli/Flaskp
c2fadf68fd339aef7fbfe3361822dc2f146ebd20
[ "MIT" ]
null
null
null
app/models.py
alligalli/Flaskp
c2fadf68fd339aef7fbfe3361822dc2f146ebd20
[ "MIT" ]
1
2020-10-27T17:46:44.000Z
2020-10-27T17:46:44.000Z
from datetime import datetime from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from . import db, login_manager class User(UserMixin, db.Model): __tablename__ = 'Users' id = db.Column(db.Integer, primary_key=True) username = db.Column(db.Unicode(64), unique=True, index=True) email = db.Column(db.Unicode(64)) password_hash = db.Column(db.String(128)) created_at = db.Column(db.DateTime, default=datetime.now) role_id = db.Column(db.Integer, db.ForeignKey('Roles.id')) post_author_id = db.relationship('Post', backref='post_author', lazy='dynamic') project_author_id = db.relationship('Project', backref='project_author', lazy='dynamic') @property def password(self): raise AttributeError('password is not a readable attribute') @password.setter def password(self, password): self.password_hash = generate_password_hash(password) def verify_password(self, password): return check_password_hash(self.password_hash, password) def __unicode__(self): return self.username def __repr__(self): return self.username class Role(db.Model): __tablename__ = 'Roles' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.Unicode(64), unique=True) users = db.relationship('User', backref='role', lazy='dynamic') def __unicode__(self): return self.name def __repr__(self): return self.name class Post(db.Model): __tablename__ = 'Posts' id = db.Column(db.Integer, primary_key=True) title = db.Column(db.Unicode(64)) body = db.Column(db.UnicodeText) timestamp = db.Column(db.DateTime, index=True, default=datetime.utcnow) post_author_id = db.Column(db.Integer, db.ForeignKey('Users.id')) slug = db.Column(db.String(80), unique=True) def __unicode__(self): return self.title class Project(db.Model): __tablename__ = 'Projects' id = db.Column(db.Integer, primary_key=True) title = db.Column(db.Unicode(64)) body = db.Column(db.UnicodeText) timestamp = db.Column(db.DateTime, index=True, default=datetime.utcnow) project_author_id = db.Column(db.Integer, db.ForeignKey('Users.id')) slug = db.Column(db.String(80), unique=True) def __unicode__(self): return self.title @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id))
33.189189
92
0.699511
331
2,456
4.963746
0.229607
0.097383
0.121729
0.051126
0.457699
0.391357
0.391357
0.337188
0.297018
0.297018
0
0.008408
0.17671
2,456
73
93
33.643836
0.804154
0
0
0.413793
1
0
0.060261
0
0
0
0
0
0
1
0.172414
false
0.155172
0.068966
0.137931
0.913793
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
1
1
0
0
4
4196155a1c1d1467ceeb3fb794dbc6afa82580b7
55
py
Python
Lib/test/test_import/__main__.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
1
2018-06-21T18:21:24.000Z
2018-06-21T18:21:24.000Z
Lib/test/test_import/__main__.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
Lib/test/test_import/__main__.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
zaimportuj unittest unittest.main('test.test_import')
13.75
33
0.818182
7
55
6.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.072727
55
3
34
18.333333
0.862745
0
0
0
0
0
0.290909
0
0
0
0
0
0
0
null
null
0
1
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
41a6e9bbe6c8b0b30001ce058ee71e73400c685c
178
py
Python
FAQ/forms.py
n3trob3/nimrodage
578eb14e2e8f7dc7ae58913b6131fd60c1596c0b
[ "Apache-2.0" ]
null
null
null
FAQ/forms.py
n3trob3/nimrodage
578eb14e2e8f7dc7ae58913b6131fd60c1596c0b
[ "Apache-2.0" ]
null
null
null
FAQ/forms.py
n3trob3/nimrodage
578eb14e2e8f7dc7ae58913b6131fd60c1596c0b
[ "Apache-2.0" ]
null
null
null
from django import forms from .models import NewQuestion class NewQuestionForm(forms.ModelForm): class Meta: model = NewQuestion fields = ('name','email','question',)
25.428571
40
0.730337
20
178
6.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.162921
178
7
41
25.428571
0.872483
0
0
0
0
0
0.098266
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
41c14dcb2d3840a152f67295e40464c758836f14
207
py
Python
Leetcode/78. Subsets/solution1.py
asanoviskhak/Outtalent
c500e8ad498f76d57eb87a9776a04af7bdda913d
[ "MIT" ]
51
2020-07-12T21:27:47.000Z
2022-02-11T19:25:36.000Z
Leetcode/78. Subsets/solution1.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
null
null
null
Leetcode/78. Subsets/solution1.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
32
2020-07-27T13:54:24.000Z
2021-12-25T18:12:50.000Z
from itertools import combinations, chain class Solution: def subsets(self, nums: List[int]) -> List[List[int]]: return chain.from_iterable(combinations(nums, s) for s in range(len(nums) + 1))
29.571429
87
0.700483
30
207
4.8
0.7
0.097222
0
0
0
0
0
0
0
0
0
0.005848
0.173913
207
6
88
34.5
0.836257
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
68c1c025cceaedff85044bcca05e04bc5425925d
109
py
Python
playwright_har_tracer/__init__.py
ninoseki/playwright-har-tracer
942578b4b550c3978ef6e122af521eeb112dac93
[ "MIT" ]
3
2021-05-28T12:30:05.000Z
2022-02-05T15:27:26.000Z
playwright_har_tracer/__init__.py
ninoseki/playwright-har-tracer
942578b4b550c3978ef6e122af521eeb112dac93
[ "MIT" ]
null
null
null
playwright_har_tracer/__init__.py
ninoseki/playwright-har-tracer
942578b4b550c3978ef6e122af521eeb112dac93
[ "MIT" ]
null
null
null
from .constants import __version__ from .har_tracer import HarTracer __all__ = ["HarTracer", "__version__"]
21.8
38
0.788991
12
109
6.083333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.119266
109
4
39
27.25
0.760417
0
0
0
0
0
0.183486
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
68cfd2c9dee5d8988dd51f0cd6a5af5b4ffce7a1
72
py
Python
grr/server/grr_response_server/rdfvalues/__init__.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
3
2018-09-30T01:31:29.000Z
2019-04-22T11:44:54.000Z
grr/server/grr_response_server/rdfvalues/__init__.py
tomchop/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
2
2022-01-15T03:18:12.000Z
2022-02-13T22:02:43.000Z
grr/server/grr_response_server/rdfvalues/__init__.py
tomchop/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
2
2020-08-24T00:22:03.000Z
2020-11-14T08:34:43.000Z
#!/usr/bin/env python """RDF values package for server-only classes."""
24
49
0.708333
11
72
4.636364
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
72
2
50
36
0.796875
0.888889
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ec20385d682f760513e3e5cd4a12ed9f89f47d83
208
py
Python
config/asgi.py
profiq/moving-fast
333620d6f88af43099f987f3e515a2d3728fb1ee
[ "MIT" ]
null
null
null
config/asgi.py
profiq/moving-fast
333620d6f88af43099f987f3e515a2d3728fb1ee
[ "MIT" ]
3
2021-03-19T01:12:43.000Z
2022-01-13T01:18:37.000Z
config/asgi.py
martasd/moving-fast-backend
bf729a70dfa466391c949f6ddf901fc0026b241a
[ "MIT" ]
null
null
null
import os import django from channels.routing import get_default_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.docker") django.setup() application = get_default_application()
23.111111
73
0.836538
26
208
6.461538
0.615385
0.119048
0.25
0
0
0
0
0
0
0
0
0
0.076923
208
8
74
26
0.875
0
0
0
0
0
0.211538
0.211538
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ec314ec1139c7a51250dac94dcacba209227fb6b
29
py
Python
version.py
mwiens91/OoT-Randomizer
d2243392df3cb1d4b5870f84a8030ebce7ad5f1a
[ "MIT" ]
null
null
null
version.py
mwiens91/OoT-Randomizer
d2243392df3cb1d4b5870f84a8030ebce7ad5f1a
[ "MIT" ]
null
null
null
version.py
mwiens91/OoT-Randomizer
d2243392df3cb1d4b5870f84a8030ebce7ad5f1a
[ "MIT" ]
null
null
null
__version__ = '5.1.76 f.LUM'
14.5
28
0.655172
6
29
2.5
1
0
0
0
0
0
0
0
0
0
0
0.16
0.137931
29
1
29
29
0.44
0
0
0
0
0
0.413793
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ec57cfeb1d86341a2db6340e72584ffabdddcae1
430
py
Python
alttprbot_racetime/handlers/twwr.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
15
2019-10-15T21:35:59.000Z
2022-03-31T19:49:39.000Z
alttprbot_racetime/handlers/twwr.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
12
2019-10-06T01:33:13.000Z
2022-03-10T14:35:16.000Z
alttprbot_racetime/handlers/twwr.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
28
2019-11-25T23:49:56.000Z
2022-03-10T04:03:31.000Z
from .core import SahasrahBotCoreHandler class GameHandler(SahasrahBotCoreHandler): async def intro(self): pass async def ex_help(self, args, message): pass async def ex_lock(self, args, message): pass async def ex_unlock(self, args, message): pass async def ex_cancel(self, args, message): pass async def ex_tournamentrace(self, args, message): pass
19.545455
53
0.648837
52
430
5.269231
0.365385
0.175182
0.218978
0.255474
0.423358
0.423358
0.423358
0
0
0
0
0
0.276744
430
21
54
20.47619
0.881029
0
0
0.428571
0
0
0
0
0
0
0
0
0
1
0
true
0.428571
0.071429
0
0.142857
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
6b65d6c529db4333743bbe28e5aae788d4fb9e1b
49
py
Python
c__59.py
fhansmann/coding-challenges
eebb37565c72e05b77383c24e8273a1e4019b58e
[ "MIT" ]
null
null
null
c__59.py
fhansmann/coding-challenges
eebb37565c72e05b77383c24e8273a1e4019b58e
[ "MIT" ]
null
null
null
c__59.py
fhansmann/coding-challenges
eebb37565c72e05b77383c24e8273a1e4019b58e
[ "MIT" ]
null
null
null
import re s = input() print(re.findall("\d+",s))
12.25
26
0.612245
9
49
3.333333
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.122449
49
3
27
16.333333
0.697674
0
0
0
0
0
0.061224
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
6ba182d5eecc6b963f3f9a0fedc00ec1cf92872f
37
py
Python
tests/test_drivermanager.py
manifoldai/pyjdbc
bf5ad84af8d413b7e2144d6cc08234597a689b1d
[ "Apache-2.0" ]
2
2021-02-10T09:03:33.000Z
2021-09-26T06:33:38.000Z
tests/test_drivermanager.py
manifoldai/pyjdbc
bf5ad84af8d413b7e2144d6cc08234597a689b1d
[ "Apache-2.0" ]
6
2021-01-06T19:37:37.000Z
2021-07-21T13:40:07.000Z
tests/test_drivermanager.py
manifoldai/pyjdbc
bf5ad84af8d413b7e2144d6cc08234597a689b1d
[ "Apache-2.0" ]
1
2021-07-21T14:51:09.000Z
2021-07-21T14:51:09.000Z
""" Test DriverManager interface """
9.25
28
0.702703
3
37
8.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.135135
37
3
29
12.333333
0.8125
0.756757
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
6bf747ea08ea2c017cb2f3a6f7175f6905e8e9bc
581
py
Python
NeuralNetworks/NeuralNetworkGPU/utils/cost.py
CodeBulletin/ML_Library
14dee1db335ee6932711bd148d5f12a4471cd7e5
[ "MIT" ]
null
null
null
NeuralNetworks/NeuralNetworkGPU/utils/cost.py
CodeBulletin/ML_Library
14dee1db335ee6932711bd148d5f12a4471cd7e5
[ "MIT" ]
null
null
null
NeuralNetworks/NeuralNetworkGPU/utils/cost.py
CodeBulletin/ML_Library
14dee1db335ee6932711bd148d5f12a4471cd7e5
[ "MIT" ]
null
null
null
import cupy as cp class MSE: @staticmethod def cost(x, y): return (x - y)**2 @staticmethod def d_cost(x, y): return 2 * (x - y) class MAE: @staticmethod def cost(x, y): return cp.abs(x - y) @staticmethod def d_cost(x, y): h = (x-y) h[h <= 0] = -1 h[h >= 0] = 1 return h class CrossEntropy: @staticmethod def cost(x, y): return -(y * cp.log(x)) @staticmethod def d_cost(x, y): return -(y/(x+1e-8) + (1-y)/((1-x)+1e-8))
16.6
50
0.445783
85
581
3.011765
0.270588
0.078125
0.140625
0.234375
0.628906
0.621094
0.21875
0
0
0
0
0.034582
0.402754
581
34
51
17.088235
0.70317
0
0
0.48
0
0
0
0
0
0
0
0
0
1
0.24
false
0
0.04
0.2
0.64
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
6bf9cb8696a89af627ea4b7a263242f48cf490c2
86
py
Python
djmapache/commonapp/forms.py
plungerman/django-djmapache
3dfef0a207464e65b281974e30f20fa97354ed08
[ "MIT" ]
null
null
null
djmapache/commonapp/forms.py
plungerman/django-djmapache
3dfef0a207464e65b281974e30f20fa97354ed08
[ "MIT" ]
11
2019-12-06T16:03:05.000Z
2022-03-04T17:10:25.000Z
djmapache/commonapp/forms.py
carthage-college/django-djmapache
901f7f5eff37553212129509f2b062fff4fec0ed
[ "MIT" ]
null
null
null
from django import forms class UploadForm(forms.Form): phile = forms.FileField()
17.2
29
0.744186
11
86
5.818182
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.162791
86
4
30
21.5
0.888889
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
1
0
0
4
6bff0d2653e733c34a773caf2ad24413f006fb7b
5,330
py
Python
test_hw5.py
tri2sing/LinearAlgebraPython
f3dde94f02f146089607eb520ebd4467becb5f9e
[ "Apache-2.0" ]
1
2017-02-26T23:29:33.000Z
2017-02-26T23:29:33.000Z
test_hw5.py
tri2sing/LinearAlgebraPython
f3dde94f02f146089607eb520ebd4467becb5f9e
[ "Apache-2.0" ]
null
null
null
test_hw5.py
tri2sing/LinearAlgebraPython
f3dde94f02f146089607eb520ebd4467becb5f9e
[ "Apache-2.0" ]
null
null
null
from vec import Vec from mat import Mat from vecutil import list2vec from matutil import listlist2mat from GF2 import one import hw5 S = [list2vec(v) for v in [[1,0,0],[0,1,0],[0,0,1]]] B = [list2vec(v) for v in [[1,1,0],[0,1,1],[1,0,1]]] for (z, w) in hw5.morph(S, B): print("injecting ", str(z.D) + str(z.f)) print("ejecting ", str(w.D) + str(w.f)) print() #injecting {0, 1, 2}{0: 1, 1: 1, 2: 0} #ejecting {0, 1, 2}{0: 1, 1: 0, 2: 0} #injecting {0, 1, 2}{0: 0, 1: 1, 2: 1} #ejecting {0, 1, 2}{0: 0, 1: 1, 2: 0} #injecting {0, 1, 2}{0: 1, 1: 0, 2: 1} #ejecting {0, 1, 2}{0: 0, 1: 0, 2: 1} # # [(Vec({0, 1, 2},{0: 1, 1: 1, 2: 0}), Vec({0, 1, 2},{0: 1, 1: 0, 2: 0})), # (Vec({0, 1, 2},{0: 0, 1: 1, 2: 1}), Vec({0, 1, 2},{0: 0, 1: 1, 2: 0})), # (Vec({0, 1, 2},{0: 1, 1: 0, 2: 1}), Vec({0, 1, 2},{0: 0, 1: 0, 2: 1})) # ] L = [Vec({0, 1, 2},{0: 1, 1: 0, 2: 0}), Vec({0, 1, 2},{0: 0, 1: 1, 2: 0}), Vec({0, 1, 2},{0: 0, 1: 0, 2: 1}), Vec({0, 1, 2},{0: 1, 1: 1, 2: 1}), Vec({0, 1, 2},{0: 1, 1: 1, 2: 0}), Vec({0, 1, 2},{0: 0, 1: 1, 2: 1})] print(hw5.my_is_independent(L)) #False print(hw5.my_is_independent(L[:2])) #True print(hw5.my_is_independent(L[:3])) #True print(hw5.my_is_independent(L[1:4])) #True print(hw5.my_is_independent(L[0:4])) #False print(hw5.my_is_independent(L[2:])) #False print(hw5.my_is_independent(L[2:5])) #False a0 = Vec({'a','b','c','d'}, {'a':1}) a1 = Vec({'a','b','c','d'}, {'b':1}) a2 = Vec({'a','b','c','d'}, {'c':1}) a3 = Vec({'a','b','c','d'}, {'a':1,'c':3}) L = hw5.subset_basis([a0,a1,a2,a3]) V = [Vec({'c', 'b', 'a', 'd'},{'a': 1}), Vec({'c', 'b', 'a', 'd'},{'b': 1}), Vec({'c', 'b', 'a', 'd'},{'c': 1})] print('\nSubset Basis') print (L==V) for l in L: print(l.D) print(l.f) print() U_basis = [Vec({0, 1, 2, 3, 4, 5},{0: 2, 1: 1, 2: 0, 3: 0, 4: 6, 5: 0}), Vec({0, 1, 2, 3, 4, 5},{0: 11, 1: 5, 2: 0, 3: 0, 4: 1, 5: 0}), Vec({0, 1, 2, 3, 4, 5},{0: 3, 1: 1.5, 2: 0, 3: 0, 4: 7.5, 5: 0})] V_basis = [Vec({0, 1, 2, 3, 4, 5},{0: 0, 1: 0, 2: 7, 3: 0, 4: 0, 5: 1}), Vec({0, 1, 2, 3, 4, 5},{0: 0, 1: 0, 2: 15, 3: 0, 4: 0, 5: 2})] w = Vec({0, 1, 2, 3, 4, 5},{0: 2, 1: 5, 2: 0, 3: 0, 4: 1, 5: 0}) refM = (Vec({0, 1, 2, 3, 4, 5},{0: 2.0, 1: 4.999999999999972, 2: 0.0, 3: 0.0, 4: 1.0, 5: 0.0}), Vec({0, 1, 2, 3, 4, 5},{0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0})) retV = hw5.direct_sum_decompose(U_basis, V_basis, w) print('\ndirect sum decompose') print(type(retV)) print (refM == retV) print('\nis invertible') M = Mat(({0, 1, 2, 3}, {0, 1, 2, 3}), {(0, 1): 0, (1, 2): 1, (3, 2): 0, (0, 0): 1, (3, 3): 4, (3, 0): 0, (3, 1): 0, (1, 1): 2, (2, 1): 0, (0, 2): 1, (2, 0): 0, (1, 3): 0, (2, 3): 1, (2, 2): 3, (1, 0): 0, (0, 3): 0}) print(hw5.is_invertible(M)) A = Mat(({0, 1}, {0, 1, 2}), {(0, 1): 2, (1, 2): 1, (0, 0): 1, (1, 0): 3, (0, 2): 3, (1, 1): 1}) print(hw5.is_invertible(A)) B = Mat(({0, 1, 2, 3}, {0, 1, 2, 3}), {(0, 1): 0, (1, 2): 1, (3, 2): 0, (0, 0): 1, (3, 3): 4, (3, 0): 0, (3, 1): 0, (1, 1): 2, (2, 1): 0, (0, 2): 1, (2, 0): 0, (1, 3): 0, (2, 3): 1, (2, 2): 3, (1, 0): 0, (0, 3): 0}) print(hw5.is_invertible(B)) C = Mat(({0, 1, 2}, {0, 1}), {(0, 1): 0, (2, 0): 2, (0, 0): 1, (1, 0): 0, (1, 1): 1, (2, 1): 1}) print(hw5.is_invertible(C)) D = Mat(({0, 1, 2}, {0, 1, 2}), {(0, 1): 5, (1, 2): 2, (0, 0): 1, (2, 0): 4, (1, 0): 2, (2, 2): 7, (0, 2): 8, (2, 1): 6, (1, 1): 5}) print(hw5.is_invertible(D)) E = Mat(({0, 1, 2, 3, 4}, {0, 1, 2, 3, 4}), {(1, 2): 7, (3, 2): 7, (0, 0): 3, (3, 0): 1, (0, 4): 3, (1, 4): 2, (1, 3): 4, (2, 3): 0, (2, 1): 56, (2, 4): 5, (4, 2): 6, (1, 0): 2, (0, 3): 7, (4, 0): 2, (0, 1): 5, (3, 3): 4, (4, 1): 4, (3, 1): 23, (4, 4): 5, (0, 2): 7, (2, 0): 2, (4, 3): 8, (2, 2): 9, (3, 4): 2, (1, 1): 4}) print(hw5.is_invertible(E)) print('\nfind inverse') M = Mat(({0, 1, 2}, {0, 1, 2}), {(0, 1): one, (1, 2): 0, (0, 0): 0, (2, 0): 0, (1, 0): one, (2, 2): one, (0, 2): 0, (2, 1): 0, (1, 1): 0}) N = hw5.find_matrix_inverse(M) NRef = Mat(({0, 1, 2}, {0, 1, 2}), {(0, 1): one, (2, 0): 0, (0, 0): 0, (2, 2): one, (1, 0): one, (1, 2): 0, (1, 1): 0, (2, 1): 0, (0, 2): 0}) print(N == NRef) print('\ntriangular inverse') A = listlist2mat([[1, .5, .2, 4],[0, 1, .3, .9],[0,0,1,.1],[0,0,0,1]]) N = hw5.find_triangular_matrix_inverse(A) NRef = Mat(({0, 1, 2, 3}, {0, 1, 2, 3}), {(0, 1): -0.5, (1, 2): -0.3, (3, 2): 0.0, (0, 0): 1.0, (3, 3): 1.0, (3, 0): 0.0, (3, 1): 0.0, (2, 1): 0.0, (0, 2): -0.05000000000000002, (2, 0): 0.0, (1, 3): -0.87, (2, 3): -0.1, (2, 2): 1.0, (1, 0): 0.0, (0, 3): -3.545, (1, 1): 1.0}) print(N == NRef) A = Mat(({0, 1, 2, 3}, {0, 1, 2, 3}), {(0, 1): 2, (1, 2): 3, (3, 2): 0, (0, 0): 1, (3, 3): 4, (3, 0): 0, (3, 1): 0, (1, 1): 2, (2, 1): 0, (0, 2): 3, (2, 0): 0, (1, 3): 4, (2, 3): 4, (2, 2): 3, (1, 0): 0, (0, 3): 4}) Ainv = hw5.find_triangular_matrix_inverse(A) B = Mat(({0, 1, 2, 3}, {0, 1, 2, 3}), {(0, 1): 4, (1, 2): 5, (3, 2): 0, (0, 0): 7, (3, 3): 4, (3, 0): 0, (3, 1): 0, (1, 1): 2, (2, 1): 0, (0, 2): 2, (2, 0): 0, (1, 3): 6, (2, 3): 4, (2, 2): 7, (1, 0): 0, (0, 3): 5}) Binv = hw5.find_triangular_matrix_inverse(B) B = Mat(({0, 1, 2, 3}, {0, 1, 2, 3}), {(0, 1): 3, (1, 2): 6, (3, 2): 0, (0, 0): 6, (3, 3): 2345, (3, 0): 0, (3, 1): 0, (1, 1): 4, (2, 1): 0, (0, 2): 4, (2, 0): 0, (1, 3): 23, (2, 3): 2, (2, 2): 6, (1, 0): 0, (0, 3): 8}) Cinv = hw5.find_triangular_matrix_inverse(C)
48.454545
322
0.421201
1,292
5,330
1.705882
0.063467
0.107078
0.073503
0.049002
0.633848
0.515427
0.414701
0.339837
0.288113
0.240018
0
0.243868
0.212195
5,330
109
323
48.899083
0.281019
0.091932
0
0.057971
0
0
0.02904
0
0
0
0
0
0
1
0
false
0
0.086957
0
0.086957
0.42029
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
1
0
4
d42586812a101d4aeb58f774f7fcc62ad2e3abc9
177
py
Python
parsing/tests/__init__.py
sprymix/parsing
4f9602e54e035ace5fe04bfdfd117eb89be9e865
[ "MIT" ]
29
2015-08-06T10:16:11.000Z
2020-12-29T06:03:05.000Z
parsing/tests/__init__.py
MagicStack/parsing
4f9602e54e035ace5fe04bfdfd117eb89be9e865
[ "MIT" ]
1
2017-04-18T18:43:05.000Z
2017-04-18T18:46:59.000Z
parsing/tests/__init__.py
MagicStack/parsing
4f9602e54e035ace5fe04bfdfd117eb89be9e865
[ "MIT" ]
7
2015-06-08T07:38:37.000Z
2021-06-01T19:21:22.000Z
import os.path import unittest def suite() -> unittest.TestSuite: start = os.path.dirname(os.path.dirname(__file__)) return unittest.defaultTestLoader.discover(start)
22.125
54
0.757062
22
177
5.909091
0.590909
0.138462
0.2
0
0
0
0
0
0
0
0
0
0.129944
177
7
55
25.285714
0.844156
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
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d46a9059db2fc0fe923fc61111c03a86dc11927f
160
py
Python
4-preprocessing/dividing_languages/polyglot/tokenize/__init__.py
correia-marcos/Innovation-on-brazilian-economic-research
98bc677618ec2dff062db42cda7279a5e7065a32
[ "MIT" ]
null
null
null
4-preprocessing/dividing_languages/polyglot/tokenize/__init__.py
correia-marcos/Innovation-on-brazilian-economic-research
98bc677618ec2dff062db42cda7279a5e7065a32
[ "MIT" ]
null
null
null
4-preprocessing/dividing_languages/polyglot/tokenize/__init__.py
correia-marcos/Innovation-on-brazilian-economic-research
98bc677618ec2dff062db42cda7279a5e7065a32
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from .base import WordTokenizer, SentenceTokenizer __all__ = ['WordTokenizer', 'SentenceTokenizer']
17.777778
50
0.6625
15
160
6.8
0.866667
0.588235
0
0
0
0
0
0
0
0
0
0.007692
0.1875
160
8
51
20
0.776923
0.2625
0
0
0
0
0.258621
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d477d018368919b87cf44d32768c80869926dc04
75
py
Python
login.py
zzxnndx/test29
e8582db4bfa178f2502f7ebad2de42b9ab925f67
[ "MIT" ]
null
null
null
login.py
zzxnndx/test29
e8582db4bfa178f2502f7ebad2de42b9ab925f67
[ "MIT" ]
null
null
null
login.py
zzxnndx/test29
e8582db4bfa178f2502f7ebad2de42b9ab925f67
[ "MIT" ]
null
null
null
num = 1 num =1111 num =3333333333334 num = 4 num4 =12312312 num3 =123123
9.375
18
0.706667
12
75
4.416667
0.75
0
0
0
0
0
0
0
0
0
0
0.59322
0.213333
75
7
19
10.714286
0.305085
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d4805f0d7dffa3e46d2090382ccbe62a710ff386
58
py
Python
00-basics/08-if_00.py
ralexrivero/python_fundation
34a855db7380d3d91db6a8f02d97f287d038ef5f
[ "Apache-2.0" ]
1
2021-09-19T04:09:48.000Z
2021-09-19T04:09:48.000Z
00-basics/08-if_00.py
ralexrivero/python_fundation
34a855db7380d3d91db6a8f02d97f287d038ef5f
[ "Apache-2.0" ]
null
null
null
00-basics/08-if_00.py
ralexrivero/python_fundation
34a855db7380d3d91db6a8f02d97f287d038ef5f
[ "Apache-2.0" ]
null
null
null
if True: print("Holberton") else: print("School")
11.6
22
0.603448
7
58
5
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.224138
58
4
23
14.5
0.777778
0
0
0
0
0
0.258621
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
2e184a3aa4fb40b003245aa8cc79c3354b6baf64
232
py
Python
Shawn/threads.py
merlin-neurotech/Backend
7845a2ab087d184056aef1e5d43f6eccaef136eb
[ "MIT" ]
2
2020-01-06T16:58:10.000Z
2020-02-01T19:41:44.000Z
Shawn/threads.py
merlin-neurotech/Backend
7845a2ab087d184056aef1e5d43f6eccaef136eb
[ "MIT" ]
null
null
null
Shawn/threads.py
merlin-neurotech/Backend
7845a2ab087d184056aef1e5d43f6eccaef136eb
[ "MIT" ]
2
2019-12-26T19:03:49.000Z
2020-02-09T17:36:04.000Z
import threading def runFunc(functionToRun, argsToRun=None): if argsToRun: func = threading.Thread(target=functionToRun, kwargs=argsToRun) else: func = threading.Thread(target=functionToRun) func.run()
23.2
71
0.706897
24
232
6.833333
0.583333
0.158537
0.231707
0.304878
0.463415
0
0
0
0
0
0
0
0.198276
232
9
72
25.777778
0.88172
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.285714
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2e51ea7603a899744dfd41cdc9d7f8f241f09608
243
py
Python
pysp2/testing/__init__.py
ARM-DOE/PySP2
4f464d03bc4b2c20e123853b1465c266f485e05d
[ "BSD-2-Clause" ]
null
null
null
pysp2/testing/__init__.py
ARM-DOE/PySP2
4f464d03bc4b2c20e123853b1465c266f485e05d
[ "BSD-2-Clause" ]
1
2022-02-28T22:48:04.000Z
2022-02-28T22:48:04.000Z
pysp2/testing/__init__.py
ARM-DOE/PySP2
4f464d03bc4b2c20e123853b1465c266f485e05d
[ "BSD-2-Clause" ]
1
2022-02-25T14:07:21.000Z
2022-02-25T14:07:21.000Z
""" ========================= pysp2.tests (pysp2.tests) ========================= .. currentmodule:: pydda.tests This module contains links to test files for PySP2 .. autosummary:: :toctree: generated/ """ from .sample_files import *
15.1875
50
0.55144
23
243
5.782609
0.782609
0.150376
0
0
0
0
0
0
0
0
0
0.014423
0.144033
243
15
51
16.2
0.625
0.839506
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
2e5330ea431121f50da65829e4469503454941d2
1,590
py
Python
motions/angular_velocity_models.py
AlexeyKonakov/state-space-estimation
ba30243211aded0db5b56ece134ab70d0b27ed03
[ "MIT" ]
null
null
null
motions/angular_velocity_models.py
AlexeyKonakov/state-space-estimation
ba30243211aded0db5b56ece134ab70d0b27ed03
[ "MIT" ]
null
null
null
motions/angular_velocity_models.py
AlexeyKonakov/state-space-estimation
ba30243211aded0db5b56ece134ab70d0b27ed03
[ "MIT" ]
null
null
null
from __future__ import annotations from abc import ABC, abstractmethod import numpy as np from bayesian_framework.inference.stochastic_models.stochastic_processes import WienerProcessValueProvider class AngularVelocityProvider(ABC): @abstractmethod def eval(self, k: int) -> np.ndarray: """ Evaluate angular velocity at discrete time = k. :param k: discrete time, int, [-]. :return: the angular velocity vector in 3-space at time = k; numpy array of size (3,), rad. """ pass class WienerModelAngularVelocityProvider(AngularVelocityProvider): """ Model of angular velocity where angular velocity is standard Wiener Process (Brownian motion). Angular velocity for each axis (in 3D space) are independent. """ def __init__(self, initial_angular_velocity: np.ndarray, delta: float, dt: float, n: int): """ Initialize instance of WienerAccelerationModelProvider :param initial_angular_velocity: initial angular velocity :param delta: 'velocity' of Wiener process. :param dt: float, The time step. :param n: int, The number of steps to take. """ self._values_provider = WienerProcessValueProvider(initial_angular_velocity, delta, dt, n) def eval(self, k: int) -> np.ndarray: """ Evaluate angular velocity at discrete time = k. :param k: discrete time, int, [-]. :return: the angular velocity vector in 3-space at time = k; numpy array of size (3,), rad. """ return self._values_provider.eval(k)
36.136364
106
0.677987
188
1,590
5.62234
0.388298
0.156102
0.083254
0.022706
0.280038
0.280038
0.280038
0.280038
0.280038
0.280038
0
0.004122
0.237107
1,590
43
107
36.976744
0.867271
0.465409
0
0.153846
0
0
0
0
0
0
0
0
0
1
0.230769
false
0.076923
0.307692
0
0.769231
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
1
0
1
0
0
4
2e5dbaf7c916e4a8b1323ad9d21633f842fa62d2
95
py
Python
src/minisentry/apps.py
anti1869/minisentry
43b9685f33eeb55adbb78d3ec7afa05204e65f38
[ "Apache-2.0" ]
3
2021-07-02T01:54:03.000Z
2022-01-21T11:38:36.000Z
src/minisentry/apps.py
anti1869/minisentry
43b9685f33eeb55adbb78d3ec7afa05204e65f38
[ "Apache-2.0" ]
null
null
null
src/minisentry/apps.py
anti1869/minisentry
43b9685f33eeb55adbb78d3ec7afa05204e65f38
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class MinisentryConfig(AppConfig): name = "minisentry"
15.833333
34
0.768421
10
95
7.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.157895
95
5
35
19
0.9125
0
0
0
0
0
0.105263
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
2e747662f6e52008074632930672258dc8cda3de
124
py
Python
web/archivo/forms.py
euribates/hipatia
1f1d71c07be1ed0b43abc4b2b7ad32940fcfd2f4
[ "MIT" ]
null
null
null
web/archivo/forms.py
euribates/hipatia
1f1d71c07be1ed0b43abc4b2b7ad32940fcfd2f4
[ "MIT" ]
null
null
null
web/archivo/forms.py
euribates/hipatia
1f1d71c07be1ed0b43abc4b2b7ad32940fcfd2f4
[ "MIT" ]
null
null
null
from django import forms class SearchForm(forms.Form): query = forms.CharField(label='Texto a buscar', max_length=180)
24.8
67
0.758065
18
124
5.166667
0.888889
0
0
0
0
0
0
0
0
0
0
0.028037
0.137097
124
4
68
31
0.841122
0
0
0
0
0
0.112903
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
cf0f840e1c3ebf77797e0fed0677b0d518edda5a
135
pyw
Python
evernote.pyw
kojinho10/application_switcher
1437501dd2f5fe900fc55e96a3651db34f969455
[ "MIT" ]
null
null
null
evernote.pyw
kojinho10/application_switcher
1437501dd2f5fe900fc55e96a3651db34f969455
[ "MIT" ]
null
null
null
evernote.pyw
kojinho10/application_switcher
1437501dd2f5fe900fc55e96a3651db34f969455
[ "MIT" ]
null
null
null
import switcher3 window = switcher3.Window(None,"- Evernote", "evernote") window.activate_app() #window.debug() #window.show_scope()
16.875
56
0.748148
16
135
6.1875
0.625
0.30303
0
0
0
0
0
0
0
0
0
0.01626
0.088889
135
7
57
19.285714
0.788618
0.244444
0
0
0
0
0.18
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4