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
c928ca3a7ac395bf42c3ba3eb48b8ebf2a3d0c3c
247
py
Python
pylibs/pycurses_widgets/__init__.py
Vaporbook/vaxdata
0313828294f539fc103ee1d1657245319b533f6d
[ "MIT" ]
null
null
null
pylibs/pycurses_widgets/__init__.py
Vaporbook/vaxdata
0313828294f539fc103ee1d1657245319b533f6d
[ "MIT" ]
null
null
null
pylibs/pycurses_widgets/__init__.py
Vaporbook/vaxdata
0313828294f539fc103ee1d1657245319b533f6d
[ "MIT" ]
null
null
null
from .screen import Screen from .statusbar import StatusBar from .commandbar import CommandBar from .titlebar import TitleBar from .panel import Panel from .textpanel import TextPanel from .itemlist import ItemList from .tabpanel import TabPanel
24.7
34
0.834008
32
247
6.4375
0.3125
0
0
0
0
0
0
0
0
0
0
0
0.133603
247
9
35
27.444444
0.962617
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
c92e1675713357d0a10233b49d1f365e4c7a3275
301
py
Python
scripts/mysite/secrets.py
wowwh/SI664-scripts
7181b8184dd2cbdb6f7bcb80a851f17a81a0b547
[ "MIT" ]
null
null
null
scripts/mysite/secrets.py
wowwh/SI664-scripts
7181b8184dd2cbdb6f7bcb80a851f17a81a0b547
[ "MIT" ]
null
null
null
scripts/mysite/secrets.py
wowwh/SI664-scripts
7181b8184dd2cbdb6f7bcb80a851f17a81a0b547
[ "MIT" ]
null
null
null
# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'ov_sbg)(^$8&eqe8&urmu(^#(slcloca=mt0^gol6=n+jbm@va' SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '151349406761-dpqoglajnvc3njl4pnc38fm7oif6m8kf.apps.googleusercontent.com' SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'VVgvnVziIn5YxTvVsOqVhdx4'
75.25
106
0.833887
39
301
6.179487
0.769231
0.074689
0.13278
0.182573
0
0
0
0
0
0
0
0.095745
0.063123
301
4
107
75.25
0.758865
0.212625
0
0
0
0
0.618644
0.618644
0
0
0
0
0
1
0
false
0
0
0
0
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c9653ef0f66ac2158854e2e51b1161d3c0ceaf83
85
py
Python
tests/settings/tests.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
2
2020-03-17T00:53:23.000Z
2020-07-16T07:00:33.000Z
tests/settings/tests.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
76
2019-12-05T01:15:57.000Z
2021-09-07T16:47:27.000Z
tests/settings/tests.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
1
2020-02-05T15:09:47.000Z
2020-02-05T15:09:47.000Z
from .base import * EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
21.25
63
0.788235
11
85
6
1
0
0
0
0
0
0
0
0
0
0
0
0.094118
85
3
64
28.333333
0.857143
0
0
0
0
0
0.529412
0.529412
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
a3120aa0b55407f101edf17b84bb9362b89b446b
15,167
py
Python
model/sketch.nyu/models/__init__.py
denyingmxd/Torchssc
9080c8aadd15d6ae6f7698ba64c6c2bae7393a24
[ "MIT" ]
null
null
null
model/sketch.nyu/models/__init__.py
denyingmxd/Torchssc
9080c8aadd15d6ae6f7698ba64c6c2bae7393a24
[ "MIT" ]
null
null
null
model/sketch.nyu/models/__init__.py
denyingmxd/Torchssc
9080c8aadd15d6ae6f7698ba64c6c2bae7393a24
[ "MIT" ]
null
null
null
from .network import Network from .network_sobel import Network_sobel from .network_no_cvae import Network_no_cvae from .network_mapping import Network_mapping from .network_tsdf_and_rgb_to_sketch import Network_tsdf_and_rgb_to_sketch from .network_tsdf_and_rgb_to_sketch_explicit import Network_tsdf_and_rgb_to_sketch_explicit from .network_tsdf_and_rgb_to_sketch_only_refine import Network_tsdf_and_rgb_to_sketch_only_refine from .network_tsdf_and_rgb_to_sketch_explicit_explicit import Network_tsdf_and_rgb_to_sketch_explicit_explicit from .network_tsdf_and_rgb_to_sketch_no_segres import Network_tsdf_and_rgb_to_sketch_no_segres from .network_tsdf_and_rgb_to_sketch_early import Network_tsdf_and_rgb_to_sketch_early from .network_tsdf_and_rgb_to_sketch_only_precision import Network_tsdf_and_rgb_to_sketch_only_precision from .network_tsdf_and_rgb_to_sketch_late import Network_tsdf_and_rgb_to_sketch_late from .network_tsdf_and_rgb_to_sketch_post_loss import Network_tsdf_and_rgb_to_sketch_post_loss from .network_tsdf_and_rgb_to_sketch_explicit_post_loss import Network_tsdf_and_rgb_to_sketch_explicit_post_loss from .network_unet import Network_unet from .network_unet_predict_sketch import Network_unet_predict_sketch from .network_baseline import Network_baseline from .network_s0_post_sketch import Network_s0_post_sketch from .network_s0_tsdf_to_sketch import Network_s0_tsdf_to_sketch from .network_warp import Network_warp from .network_tsdf import Network_tsdf from .network_seg_2d import Network_seg_2d from .network_s_0_late import Network_s_0_late from .network_s_0_late_multi_supervision import Network_s_0_late_multi_supervision from .network_s0_late_ac import Network_s0_late_ac from .network_s0_late_gated import Network_s0_late_gated from .network_s0_late_ac2 import Network_s0_late_ac2 from .network_s0_late_ac3 import Network_s0_late_ac3 from .network_s0_late_ac4 import Network_s0_late_ac4 from .network_s0_late_ac5 import Network_s0_late_ac5 from .network_s0_late_ac6 import Network_s0_late_ac6 from .network_s0_late_ac7 import Network_s0_late_ac7 from .network_s0_late_ac8 import Network_s0_late_ac8 from .network_s0_late_ac9 import Network_s0_late_ac9 from .network_s0_rgb import Network_s0_rgb from .network_deeplabv3 import Network_deeplabv3 from .network_resnet50 import Network_resnet50 from config import config import os from shutil import copy from .network_s0 import Network_s0 import torch.nn as nn def make_model(norm_layer,modelname,eval): if eval: if norm_layer is None: norm_layer = nn.BatchNorm3d else: print('norm layer here wrong') exit() if modelname == 'network2d': net = Network(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer,eval=eval) elif modelname == 'network_no_cvae': net = Network_no_cvae(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, norm_layer=norm_layer,pretrained_model=config.pretrained_model, eval=eval) elif modelname == 'network_sobel': net = Network_sobel(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_mapping': net = Network_mapping(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch': net = Network_tsdf_and_rgb_to_sketch(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_explicit': net= Network_tsdf_and_rgb_to_sketch_explicit(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_only_refine': net = Network_tsdf_and_rgb_to_sketch_only_refine(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_explicit_explicit': net = Network_tsdf_and_rgb_to_sketch_explicit_explicit(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_no_segres': net = Network_tsdf_and_rgb_to_sketch_no_segres(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_only_precision': net = Network_tsdf_and_rgb_to_sketch_only_precision(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_early': net = Network_tsdf_and_rgb_to_sketch_early(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_late': net = Network_tsdf_and_rgb_to_sketch_late(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf_and_rgb_to_sketch_post_loss': net = Network_tsdf_and_rgb_to_sketch_post_loss(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname =='network_tsdf_and_rgb_to_sketch_explicit_post_loss': net = Network_tsdf_and_rgb_to_sketch_explicit_post_loss(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_unet': net = Network_unet(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_unet_predict_sketch': net = Network_unet_predict_sketch(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_baseline': net = Network_baseline(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0': net = Network_s0(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_post_sketch': net = Network_s0_post_sketch(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_tsdf_to_sketch': net = Network_s0_tsdf_to_sketch(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_warp': net = Network_warp(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_tsdf': net = Network_tsdf(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_seg_2d': net = Network_seg_2d(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s_0_late': net = Network_s_0_late(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s_0_late_multi_supervision': net = Network_s_0_late_multi_supervision(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac': net = Network_s0_late_ac(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_gated': net = Network_s0_late_gated(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac2': net = Network_s0_late_ac2(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac3': net = Network_s0_late_ac3(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac4': net = Network_s0_late_ac4(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac5': net = Network_s0_late_ac5(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac6': net = Network_s0_late_ac6(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac7': net = Network_s0_late_ac7(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac8': net = Network_s0_late_ac8(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_late_ac9': net = Network_s0_late_ac9(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_s0_rgb': net = Network_s0_rgb(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_deeplabv3': return Network_deeplabv3(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) elif modelname=='network_resnet50': return Network_resnet50(class_num=config.num_classes, feature=128, bn_momentum=config.bn_momentum, pretrained_model=config.pretrained_model, norm_layer=norm_layer, eval=eval) else: net = None print('no such model') exit() name = type(net).__name__ assert name.lower()==modelname return net __all__ = ["make_model"]
59.478431
137
0.645019
1,793
15,167
4.991634
0.047407
0.080447
0.06257
0.075978
0.795196
0.773743
0.762235
0.728603
0.674749
0.633073
0
0.02132
0.294917
15,167
255
138
59.478431
0.815598
0
0
0.373206
0
0
0.061841
0.03514
0
0
0
0
0.004785
1
0.004785
false
0
0.200957
0
0.220096
0.009569
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
a3208ab8e465937ccf4b8e1e9b9c4c8aaf55a391
994
py
Python
RE_To_NFA.py
PatrickLenis/FLAT_Project_2020
d3bfe17504e58c63c6b094d72cb33721da8a8e8d
[ "MIT" ]
null
null
null
RE_To_NFA.py
PatrickLenis/FLAT_Project_2020
d3bfe17504e58c63c6b094d72cb33721da8a8e8d
[ "MIT" ]
null
null
null
RE_To_NFA.py
PatrickLenis/FLAT_Project_2020
d3bfe17504e58c63c6b094d72cb33721da8a8e8d
[ "MIT" ]
null
null
null
#Generates NFA links out of an AbstractSyntax #Node component data type class Node(object): def __init__(self, type, data, next_r = None, next_l = None): self.type = type self.data = data self.next_r = next_r self.next_l = next_l #Link to option a. def get_next_r(self): return self.next_r def set_next_r(self, next_r): self.next_r = next_r # Link to option b. def get_next_l(self): return self.next_l def set_next_l(self, next_l): self.next_l = next_l # Link to node data def get_data(self): return self.data def set_data(self, data): self.data = data # Link to node type def get_type(self): return self.type def set_type(self, type): self.type = type #NFA data type class NFA_List(object): def __init__(self, start = None, end = None): self.start = start self.end = end
22.590909
66
0.579477
149
994
3.630872
0.208054
0.083179
0.066543
0.072089
0.177449
0.073937
0.073937
0
0
0
0
0
0.337022
994
43
67
23.116279
0.820941
0.152918
0
0.307692
1
0
0
0
0
0
0
0
0
1
0.384615
false
0
0
0.153846
0.615385
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
a331254fc33b6b9f08a49fab84c49498289eb151
175
py
Python
straxen/__init__.py
rynge/straxen
7546177c8d79c8570e0c6e005c5ffdd6eb4c54f6
[ "BSD-3-Clause" ]
null
null
null
straxen/__init__.py
rynge/straxen
7546177c8d79c8570e0c6e005c5ffdd6eb4c54f6
[ "BSD-3-Clause" ]
null
null
null
straxen/__init__.py
rynge/straxen
7546177c8d79c8570e0c6e005c5ffdd6eb4c54f6
[ "BSD-3-Clause" ]
null
null
null
__version__ = '0.2.0' from .utils import * from .common import * from .itp_map import InterpolatingMap from .rundb import RunDB from . import plugins from .contexts import *
19.444444
37
0.76
25
175
5.12
0.52
0.15625
0
0
0
0
0
0
0
0
0
0.020408
0.16
175
9
38
19.444444
0.85034
0
0
0
0
0
0.028409
0
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
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
a3473dfc1618520c49eee9487814445d4719fa00
16,544
py
Python
simulator/simp_py/minya24.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
simulator/simp_py/minya24.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
simulator/simp_py/minya24.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
# This comes with no warranty, implied or otherwise # This data structure was designed to support Proportional fonts # on Arduinos. It can however handle any ttf font that has been converted # using the conversion program. These could be fixed width or proportional # fonts. Individual characters do not have to be multiples of 8 bits wide. # Any width is fine and does not need to be fixed. # The data bits are packed to minimize data requirements, but the tradeoff # is that a header is required per character. # minya24.c # Point Size : 24 # Memory usage : 2807 bytes # # characters : 95 # Header Format (to make Arduino UTFT Compatible): # ------------------------------------------------ # Character Width (Used as a marker to indicate use this format. i.e.: = 0x00) # Character Height # First Character (Reserved. 0x00) # Number Of Characters (Reserved. 0x00) tft_minya24 = [ 0x00, 0x15, 0x00, 0x00, # Individual Character Format: # ---------------------------- # Character Code # Adjusted Y Offset # Width # Height # xOffset # xDelta (the distance to move the cursor. Effective width of the character.) # Data[n] # NOTE: You can remove any of these characters if they are not needed in # your application. The first character number in each Glyph indicates # the ASCII character code. Therefore, these do not have to be sequential. # Just remove all the content for a particular character to save space. # ' ' 0x20,0x13,0x00,0x00,0x00,0x07, # '!' 0x21,0x02,0x05,0x12,0x00,0x05, 0x11,0x8C,0x63,0x18,0xC6,0x31,0x8C,0x42,0x01,0xCE,0x73,0x80, # '"' 0x22,0x01,0x06,0x08,0x00,0x06, 0x01,0xA6,0xDB,0x6D,0xB6,0xC0, # '#' 0x23,0x04,0x0C,0x0E,0x00,0x0B, 0x04,0x80,0x6C,0x0C,0x80,0xD8,0x7F,0xE7,0xFE,0x1B,0x01,0xB0,0x7F,0xE7,0xFC,0x12,0x03,0x20,0x32,0x00,0x00, # '$' 0x24,0x02,0x0A,0x11,0x00,0x0B, 0x04,0x01,0x61,0xF8,0xFE,0x65,0x19,0x06,0x40,0xF0,0x1F,0x01,0xE0,0x4C,0x93,0x7C,0xCF,0xE0,0x60,0x10,0x04,0x00, # '%' 0x25,0x01,0x0D,0x14,0x01,0x0F, 0x00,0x01,0xC1,0x1F,0x19,0x8C,0xCC,0x6C,0x63,0x61,0x36,0x0F,0xB0,0x1B,0x00,0x18,0x01,0x80,0x0C,0x00,0xCE,0x06,0xF8,0x6C,0x66,0x63,0x33,0x13,0x0F,0x98,0x38,0x00,0x00, # '&' 0x26,0x02,0x0E,0x11,0x00,0x0D, 0x0E,0x00,0x7C,0x01,0xB0,0x06,0xC0,0x1E,0x00,0x38,0x00,0xC3,0x07,0x8C,0x37,0x60,0xCD,0x86,0x1E,0x18,0x70,0x41,0xE1,0x07,0xC6,0x33,0x9F,0x86,0x38,0x00, # ''' 0x27,0x02,0x03,0x08,0x00,0x03, 0x6D,0xB6,0xD8, # '(' 0x28,0x01,0x05,0x14,0x02,0x07, 0x00,0x8E,0x66,0x33,0x18,0xC6,0x31,0x8C,0x61,0x0C,0x63,0x8C,0x00, # ')' 0x29,0x01,0x06,0x15,0x00,0x07, 0x01,0x86,0x0C,0x18,0x61,0x82,0x08,0x30,0xC2,0x08,0x61,0x86,0x30,0xC6,0x10,0x00, # '*' 0x2A,0x04,0x0A,0x0D,0x01,0x0B, 0x08,0x03,0x04,0xC1,0xF6,0x7F,0x07,0x81,0xC0,0xF8,0x3F,0x1B,0xCC,0xD8,0x30,0x0C,0x00, # '+' 0x2B,0x06,0x0A,0x0A,0x01,0x0B, 0x00,0x03,0x00,0xC0,0x30,0x7F,0xBF,0xE0,0xC0,0x30,0x0C,0x00,0x00, # ',' 0x2C,0x10,0x05,0x07,0x00,0x05, 0x33,0x9C,0x63,0x20,0x00, # '-' 0x2D,0x09,0x07,0x02,0x00,0x07, 0x7D,0xF8, # '.' 0x2E,0x10,0x04,0x04,0x01,0x05, 0x6E,0xE6, # '/' 0x2F,0x01,0x0C,0x13,0x00,0x0B, 0x00,0x00,0x06,0x00,0x60,0x0C,0x00,0xC0,0x18,0x01,0x80,0x30,0x03,0x00,0x60,0x06,0x00,0xC0,0x0C,0x01,0x80,0x18,0x03,0x00,0x30,0x06,0x00,0x40,0x00, # '0' 0x30,0x08,0x0B,0x0B,0x00,0x0B, 0x0E,0x03,0xE0,0xC6,0x30,0x66,0x0C,0xC0,0x98,0x33,0x06,0x61,0xC7,0xF0,0x7C,0x00, # '1' 0x31,0x08,0x0A,0x0D,0x00,0x09, 0x04,0x1F,0x03,0xC0,0x30,0x0C,0x03,0x00,0xC0,0x30,0x0C,0x03,0x07,0xF9,0xFE,0x00,0x00, # '2' 0x32,0x06,0x0A,0x0E,0x00,0x0A, 0x0E,0x07,0xC3,0x30,0xCC,0x03,0x01,0x80,0x60,0x30,0x18,0x0C,0x03,0x01,0xF8,0x7F,0xC0,0x20, # '3' 0x33,0x08,0x09,0x10,0x00,0x08, 0x78,0x3F,0x81,0x81,0x81,0xC0,0xC0,0xE0,0x78,0x06,0x01,0x01,0x80,0xC0,0xE1,0xE0,0xC0,0x00, # '4' 0x34,0x03,0x0B,0x13,0x00,0x0A, 0x00,0x00,0xC0,0x18,0x03,0x00,0x60,0x08,0x03,0x00,0x60,0x0D,0x83,0x20,0x64,0x18,0x83,0x10,0xC6,0x1F,0xF3,0xFE,0x03,0x00,0x60,0x0C,0x00, # '5' 0x35,0x09,0x0A,0x0E,0x00,0x0A, 0x3F,0x8F,0xE3,0x00,0x80,0x60,0x1F,0x87,0xF0,0x06,0x01,0x80,0x60,0x19,0x86,0x7F,0x07,0x80, # '6' 0x36,0x03,0x0A,0x12,0x00,0x0A, 0x00,0x01,0x80,0xE0,0x30,0x18,0x06,0x03,0x00,0xC0,0x60,0x1B,0x87,0xF1,0x86,0x61,0x90,0x66,0x19,0x86,0x3F,0x07,0x80, # '7' 0x37,0x09,0x0A,0x0E,0x00,0x0A, 0x7F,0x9F,0xF0,0x18,0x0C,0x06,0x01,0x80,0xC0,0x30,0x18,0x06,0x01,0x80,0x40,0x10,0x0C,0x00, # '8' 0x38,0x03,0x0B,0x11,0x00,0x0B, 0x0F,0x07,0xF0,0xC3,0x30,0x66,0x0C,0x63,0x87,0xE0,0xF8,0x39,0xCE,0x19,0x81,0x30,0x34,0x06,0xC1,0x98,0x71,0xFC,0x1F,0x00, # '9' 0x39,0x07,0x0A,0x11,0x00,0x0A, 0x1E,0x0F,0xC6,0x19,0x86,0x41,0x98,0x66,0x18,0xFE,0x1D,0x80,0x40,0x30,0x0C,0x06,0x03,0x01,0xC0,0x20,0x00,0x00, # ':' 0x3A,0x0A,0x05,0x0A,0x00,0x05, 0x33,0x9C,0x60,0x00,0xCE,0x71,0x80, # ';' 0x3B,0x09,0x05,0x0D,0x00,0x06, 0x33,0xDE,0x60,0x00,0x0E,0x73,0x8C,0xC0,0x00, # '<' 0x3C,0x06,0x0A,0x0C,0x00,0x09, 0x00,0x00,0xE0,0x70,0x38,0x1C,0x1C,0x03,0x00,0x70,0x0E,0x01,0xC0,0x10,0x00, # '=' 0x3D,0x09,0x08,0x06,0x01,0x0A, 0xFF,0xFE,0x00,0x00,0x7F,0xFF, # '>' 0x3E,0x06,0x0A,0x0C,0x00,0x09, 0x00,0x18,0x03,0x80,0x70,0x0E,0x00,0xE0,0x30,0x38,0x1C,0x0E,0x02,0x00,0x00, # '?' 0x3F,0x02,0x09,0x12,0x00,0x09, 0x1E,0x1F,0x98,0x6C,0x30,0x18,0x18,0x38,0x30,0x30,0x18,0x0C,0x02,0x01,0x00,0x00,0x60,0x78,0x3C,0x0C,0x00, # '@' 0x40,0x02,0x11,0x11,0x00,0x11, 0x01,0xF0,0x03,0xFE,0x03,0x03,0x83,0x00,0xC3,0x04,0x31,0x1F,0x19,0x9F,0x0C,0xCC,0x86,0x4C,0x43,0x24,0x21,0x12,0x39,0x89,0xF7,0x84,0x71,0x83,0x00,0x00,0xC1,0x80,0x3F,0xC0,0x0F,0x80,0x00, # 'A' 0x41,0x02,0x12,0x13,0x00,0x10, 0x00,0x00,0x01,0xF0,0x00,0x7E,0x00,0x03,0x80,0x01,0xA0,0x00,0x6C,0x00,0x1B,0x00,0x0C,0x40,0x03,0x18,0x01,0x86,0x00,0x61,0x80,0x1F,0xE0,0x0F,0xFC,0x03,0x03,0x01,0x80,0xC0,0x60,0x10,0x18,0x1F,0x9F,0xC7,0xEF,0xF8,0x00, # 'B' 0x42,0x02,0x0E,0x13,0x00,0x0E, 0x7F,0x81,0xFF,0x81,0x86,0x06,0x18,0x18,0xC0,0x66,0x01,0xFC,0x07,0xFC,0x1C,0x30,0x60,0x61,0x81,0x86,0x06,0x18,0x18,0x60,0x61,0x81,0x06,0x0C,0x18,0xE0,0xFE,0x03,0xE0,0x00, # 'C' 0x43,0x02,0x0F,0x12,0x00,0x0F, 0x03,0xF0,0x1F,0xE0,0x70,0xC1,0x80,0x83,0x00,0x04,0x00,0x18,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x03,0x00,0x06,0x00,0x06,0x00,0x0E,0x01,0x0E,0x0E,0x0F,0xF8,0x07,0xE0, # 'D' 0x44,0x02,0x0F,0x13,0x00,0x0F, 0x3F,0xC0,0x7F,0xE0,0x60,0xE0,0xC0,0xC1,0x80,0xC3,0x01,0x86,0x03,0x0C,0x02,0x18,0x04,0x30,0x08,0x60,0x30,0xC0,0x61,0x80,0x83,0x03,0x06,0x0C,0x0C,0x38,0x18,0xE0,0xFF,0x81,0xF8,0x00, # 'E' 0x45,0x02,0x0D,0x13,0x00,0x0D, 0x3F,0xF1,0xFF,0x86,0x0C,0x30,0x61,0x80,0x0C,0x40,0x62,0x03,0xF0,0x1F,0x80,0xC4,0x06,0x20,0x30,0x01,0x80,0x0C,0x00,0x60,0xC3,0x06,0x7F,0xF3,0xFF,0x80,0x00, # 'F' 0x46,0x01,0x0E,0x13,0x00,0x0E, 0x00,0x01,0xFF,0xE7,0xFF,0x86,0x06,0x18,0x18,0x63,0x01,0x8C,0x03,0xF0,0x0F,0xC0,0x63,0x01,0x8C,0x06,0x30,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x3F,0x81,0xFE,0x00,0x00,0x00, # 'G' 0x47,0x01,0x11,0x14,0x00,0x11, 0x00,0x00,0x03,0xC8,0x03,0xFC,0x03,0x0E,0x03,0x03,0x01,0x00,0x01,0x80,0x00,0xC0,0x00,0x60,0x03,0x30,0x3F,0xD8,0x1F,0x0C,0x01,0x86,0x00,0xC3,0x80,0x60,0xC0,0x30,0x70,0x38,0x1C,0x3C,0x07,0xF6,0x01,0xF3,0x80,0x01,0xE0, # 'H' 0x48,0x01,0x10,0x13,0x00,0x10, 0x00,0x00,0x7C,0x0F,0x1C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x08,0x0C,0x08,0x0F,0xF8,0x0F,0xF8,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x1A,0x7C,0x1F,0x7C,0x10, # 'I' 0x49,0x02,0x08,0x13,0x00,0x08, 0x7E,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7E, # 'J' 0x4A,0x01,0x0C,0x14,0x00,0x0B, 0x00,0x00,0x7E,0x07,0xE0,0x18,0x01,0x80,0x18,0x01,0x80,0x18,0x00,0x80,0x08,0x00,0x80,0x18,0x61,0x84,0x18,0x41,0x8C,0x18,0xC3,0x06,0x70,0x7E,0x01,0x80, # 'K' 0x4B,0x02,0x11,0x13,0x00,0x10, 0x7E,0x7E,0x3F,0x3E,0x06,0x06,0x03,0x06,0x01,0x86,0x00,0xC6,0x00,0x66,0x00,0x37,0x00,0x1F,0x80,0x0E,0x60,0x06,0x10,0x03,0x0C,0x01,0x06,0x00,0x81,0x00,0x60,0x80,0x30,0x66,0x7E,0x1B,0x3F,0x0F,0x80,0x01,0x80, # 'L' 0x4C,0x02,0x0D,0x11,0x00,0x0D, 0x7E,0x03,0xF0,0x06,0x00,0x30,0x01,0x80,0x0C,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x06,0x00,0x30,0x01,0x81,0x0C,0x08,0x60,0x4F,0xFF,0x7F,0xF8, # 'M' 0x4D,0x02,0x14,0x12,0x00,0x13, 0x7C,0x07,0x87,0xC0,0x7C,0x0C,0x06,0x00,0xE0,0xE0,0x0E,0x0E,0x00,0xE0,0xE0,0x1B,0x1E,0x01,0xB1,0x60,0x0B,0x16,0x00,0x9B,0x60,0x09,0xA6,0x00,0x9E,0x60,0x08,0xE6,0x00,0x8C,0x60,0x08,0xC6,0x03,0x8C,0x7E,0x78,0x47,0xE0,0x00,0x00, # 'N' 0x4E,0x01,0x12,0x13,0x00,0x12, 0x00,0x00,0x1F,0x03,0xF3,0xC0,0x7C,0x38,0x10,0x0E,0x04,0x03,0xC1,0x00,0xB0,0x40,0x26,0x10,0x09,0x84,0x02,0x31,0x00,0x8C,0x40,0x21,0x90,0x08,0x74,0x06,0x0F,0x01,0x81,0xC0,0x60,0x70,0x78,0x0C,0x3E,0x03,0x00,0x00,0x40, # 'O' 0x4F,0x02,0x11,0x12,0x00,0x11, 0x03,0xE0,0x07,0xFC,0x07,0x07,0x06,0x01,0x82,0x00,0x63,0x00,0x11,0x80,0x0C,0x80,0x06,0x40,0x03,0x20,0x01,0x98,0x00,0xCC,0x00,0x66,0x00,0x31,0x80,0x30,0xE0,0x18,0x38,0x18,0x0F,0xF8,0x01,0xF0,0x00, # 'P' 0x50,0x02,0x0C,0x12,0x00,0x0C, 0x7F,0x07,0xFC,0x10,0x61,0x03,0x10,0x31,0x03,0x10,0x31,0x06,0x10,0xE1,0xFC,0x1E,0x01,0x00,0x18,0x01,0x80,0x18,0x01,0x80,0x7E,0x07,0xF0, # 'Q' 0x51,0x02,0x13,0x15,0x00,0x11, 0x07,0xE0,0x01,0xFE,0x00,0x60,0x70,0x18,0x06,0x06,0x00,0x60,0xC0,0x0C,0x18,0x00,0xC2,0x00,0x18,0x40,0x03,0x08,0x0C,0x61,0x83,0xCC,0x30,0xCD,0x83,0x09,0xE0,0x60,0x3C,0x06,0x07,0x00,0x7F,0xE3,0x07,0xEC,0x40,0x01,0x98,0x00,0x33,0x00,0x03,0xC0,0x00,0x30, # 'R' 0x52,0x02,0x0F,0x13,0x00,0x0F, 0x7F,0x80,0xFF,0xE0,0x60,0xE0,0xC0,0x61,0x80,0xC3,0x01,0x86,0x07,0x0C,0x1C,0x1F,0xF0,0x3F,0x80,0x66,0x00,0xC4,0x01,0x8C,0x63,0x18,0xC6,0x11,0x8C,0x33,0x7E,0x7C,0xFC,0x70,0x00,0x00, # 'S' 0x53,0x01,0x0D,0x13,0x00,0x0D, 0x00,0x60,0x7B,0x07,0xF8,0x71,0xC3,0x06,0x18,0x00,0xC0,0x03,0x80,0x0E,0x00,0x1C,0x00,0x78,0x00,0xC0,0x03,0x30,0x19,0x80,0xCC,0x06,0x30,0x70,0xFF,0x03,0xE0, # 'T' 0x54,0x01,0x0F,0x12,0x00,0x0F, 0x00,0x00,0xFF,0xF9,0xFF,0xF3,0x18,0x66,0x30,0xCC,0x61,0x90,0xC3,0x01,0x80,0x03,0x00,0x06,0x00,0x0C,0x00,0x18,0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x0F,0xE0,0x1F,0xC0, # 'U' 0x55,0x02,0x10,0x11,0x00,0x0F, 0x7C,0x7E,0x7C,0x7E,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x10,0x08,0x18,0x18,0x18,0x18,0x0C,0x30,0x0F,0xF0,0x03,0xC0, # 'V' 0x56,0x01,0x10,0x12,0x00,0x10, 0x00,0x7E,0xFE,0x7E,0x7E,0x18,0x18,0x30,0x18,0x30,0x18,0x20,0x08,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x40,0x0C,0xC0,0x04,0xC0,0x04,0xC0,0x06,0x80,0x07,0x80,0x07,0x80,0x03,0x00,0x03,0x00, # 'W' 0x57,0x01,0x14,0x13,0x00,0x14, 0x00,0x00,0x0F,0xC4,0xFF,0xF0,0x4F,0xE3,0x06,0x10,0x30,0xE3,0x01,0x8E,0x30,0x18,0xE3,0x01,0x8E,0x30,0x19,0xA3,0x01,0x9A,0x20,0x09,0xA6,0x00,0xD2,0x60,0x0D,0x36,0x00,0xF3,0x40,0x0F,0x34,0x00,0x63,0xC0,0x06,0x1C,0x00,0x61,0x80,0x00,0x18,0x00, # 'X' 0x58,0x01,0x10,0x13,0x00,0x10, 0x00,0x00,0x7F,0x7F,0x7E,0x7E,0x0C,0x30,0x06,0x20,0x06,0x60,0x03,0xC0,0x01,0x80,0x01,0x80,0x03,0x80,0x02,0xC0,0x06,0x40,0x04,0x60,0x0C,0x60,0x18,0x30,0x18,0x30,0x7C,0x30,0xFC,0xFE,0x00,0xFF, # 'Y' 0x59,0x01,0x11,0x13,0x00,0x10, 0x00,0x00,0x7F,0x3F,0xBF,0x07,0x03,0x03,0x00,0xC1,0x00,0x31,0x80,0x18,0x80,0x06,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x03,0x00,0x07,0x80,0x03,0xF8,0x00,0x7C,0x00, # 'Z' 0x5A,0x02,0x0E,0x12,0x00,0x0D, 0x7F,0xF9,0xFF,0xE6,0x03,0x18,0x18,0x60,0xC1,0x07,0x00,0x18,0x00,0xC0,0x06,0x00,0x18,0x00,0xC0,0x06,0x00,0x18,0x30,0xC0,0xC3,0x03,0x1F,0xFE,0x7F,0xF8,0x00,0x60, # '[' 0x5B,0x01,0x08,0x14,0x01,0x08, 0x00,0x7C,0x7C,0x40,0x40,0x40,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x7E,0x00, # '\' 0x5C,0x01,0x0A,0x13,0x00,0x0A, 0x00,0x10,0x06,0x01,0x80,0x30,0x0C,0x01,0x80,0x60,0x0C,0x03,0x00,0x60,0x18,0x06,0x00,0xC0,0x30,0x06,0x01,0x80,0x60,0x08, # ']' 0x5D,0x01,0x08,0x14,0x00,0x08, 0x00,0x7C,0x7E,0x04,0x04,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x7C,0xFC, # '^' 0x5E,0x03,0x0B,0x0B,0x00,0x0B, 0x00,0x00,0x40,0x18,0x03,0x00,0xF0,0x32,0x0C,0x63,0x86,0x60,0xC0,0x0C,0x00,0x00, # '_' 0x5F,0x15,0x11,0x02,0xFF,0x0F, 0x7F,0xFF,0x3F,0xFF,0x80, # '`' 0x60,0x00,0x06,0x07,0x00,0x06, 0x01,0x87,0x0C,0x18,0x20,0x00, # 'a' 0x61,0x06,0x0C,0x0D,0x00,0x0B, 0x0E,0x03,0xF0,0x31,0x06,0x10,0x23,0x80,0xF8,0x3D,0x87,0x10,0x61,0x0C,0x18,0x63,0xA7,0xFE,0x1C,0xC0, # 'b' 0x62,0x01,0x0C,0x14,0x00,0x0C, 0x00,0x07,0xC0,0x3C,0x01,0x80,0x18,0x01,0x80,0x18,0x01,0x98,0x1F,0xC1,0xC6,0x18,0x21,0x83,0x10,0x31,0x03,0x18,0x31,0x83,0x18,0x6F,0xC6,0xF7,0xC0,0x30, # 'c' 0x63,0x06,0x0B,0x0D,0x00,0x0B, 0x06,0x03,0xF0,0xC7,0x31,0xE4,0x1C,0x80,0x30,0x06,0x00,0x60,0x0C,0x01,0xC3,0x1F,0xC0,0xF0, # 'd' 0x64,0x01,0x0D,0x13,0x00,0x0D, 0x00,0x00,0x1E,0x00,0xF0,0x01,0x80,0x0C,0x00,0x60,0x03,0x01,0x98,0x3E,0x81,0x9C,0x18,0x60,0xC3,0x04,0x08,0x60,0x41,0x02,0x0C,0x30,0x71,0x91,0xFF,0x87,0x1C, # 'e' 0x65,0x07,0x0B,0x0C,0x00,0x0B, 0x0F,0x03,0xF0,0xC3,0x30,0x66,0x1C,0xDE,0x1E,0x03,0x00,0x60,0x06,0x18,0x7E,0x07,0x80, # 'f' 0x66,0x02,0x0A,0x12,0x00,0x08, 0x07,0x07,0xE1,0xB8,0x4E,0x10,0x04,0x07,0xE1,0xF8,0x18,0x06,0x01,0x80,0x60,0x18,0x06,0x01,0x81,0xF8,0x7E,0x00,0x00, # 'g' 0x67,0x05,0x0A,0x12,0x00,0x0A, 0x00,0x00,0x20,0x18,0x7E,0x3F,0x18,0x64,0x09,0x02,0x61,0x9F,0xC1,0xE0,0x0C,0x01,0x84,0x67,0x19,0x8C,0x7E,0x0F,0x00, # 'h' 0x68,0x02,0x0E,0x12,0x00,0x0D, 0x78,0x01,0xE0,0x01,0x80,0x06,0x00,0x19,0xC0,0x2F,0x80,0xE6,0x07,0x08,0x18,0x20,0x60,0x81,0x82,0x06,0x08,0x18,0x20,0x60,0x81,0x82,0x1F,0x9E,0x7E,0x78,0x00,0x00, # 'i' 0x69,0x02,0x08,0x11,0x00,0x08, 0x30,0x78,0x78,0x30,0x00,0x78,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7F, # 'j' 0x6A,0x02,0x09,0x15,0xFE,0x07, 0x06,0x07,0x03,0x81,0xC0,0x00,0xF8,0x7C,0x06,0x03,0x01,0x80,0xC0,0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x99,0x8F,0xC3,0xC0, # 'k' 0x6B,0x02,0x0D,0x12,0x00,0x0D, 0x78,0x03,0xC0,0x06,0x00,0x37,0xC1,0xBC,0x0C,0xC0,0x6C,0x03,0xC0,0x1C,0x00,0xC0,0x07,0x00,0x3E,0x01,0xB8,0x08,0x61,0xC1,0xCF,0x07,0x00,0x10,0x00,0x00, # 'l' 0x6C,0x02,0x08,0x12,0x00,0x08, 0x78,0x78,0x18,0x08,0x08,0x08,0x08,0x08,0x08,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7E,0x00, # 'm' 0x6D,0x08,0x14,0x0D,0x00,0x14, 0x40,0xC3,0x0F,0xBE,0xF8,0x1E,0x78,0xC1,0xC7,0x0C,0x18,0x20,0xC1,0x82,0x0C,0x10,0x20,0xC1,0x82,0x08,0x18,0x60,0x81,0x84,0x18,0x7E,0x71,0xE7,0xE7,0x9E,0x00,0x00,0x00, # 'n' 0x6E,0x06,0x0E,0x0E,0x00,0x0D, 0x79,0xC1,0xEF,0x81,0xE6,0x07,0x08,0x18,0x30,0x60,0xC1,0x82,0x06,0x08,0x18,0x20,0x60,0x81,0x82,0x1F,0x1E,0x7E,0x78,0x00,0x00, # 'o' 0x6F,0x08,0x0B,0x0C,0x00,0x0C, 0x0F,0x03,0xF8,0xC3,0x30,0x36,0x06,0x80,0xD0,0x1B,0x03,0x60,0x66,0x18,0xFE,0x07,0x80, # 'p' 0x70,0x07,0x0B,0x10,0x00,0x0B, 0x07,0x1F,0xF1,0xE3,0x18,0x23,0x06,0x60,0xCC,0x19,0x82,0x30,0xC6,0x18,0xFE,0x1B,0x83,0x00,0x60,0x1C,0x07,0x80, # 'q' 0x71,0x06,0x0D,0x11,0x00,0x0B, 0x0C,0x01,0xF7,0x0C,0xF8,0xC3,0x04,0x18,0x20,0x41,0x02,0x08,0x10,0x60,0x83,0x04,0x0C,0x60,0x7F,0x01,0xE8,0x00,0xC0,0x06,0xC0,0x1E,0x00,0xE0, # 'r' 0x72,0x08,0x0A,0x0D,0x00,0x09, 0x77,0x3F,0xE3,0xB8,0xCE,0x33,0x0C,0x03,0x00,0xC0,0x30,0x04,0x07,0xC1,0xF0,0x00,0x00, # 's' 0x73,0x05,0x0A,0x0E,0x00,0x0A, 0x03,0x00,0xC1,0xF0,0xFC,0x63,0x18,0x47,0x00,0xF8,0x07,0x80,0x64,0x19,0x86,0x7F,0x07,0x80, # 't' 0x74,0x02,0x09,0x13,0x00,0x09, 0x30,0x18,0x0C,0x06,0x02,0x07,0xE3,0xF8,0x40,0x20,0x10,0x08,0x04,0x02,0x11,0x18,0x84,0x62,0x33,0x0F,0x83,0x00, # 'u' 0x75,0x06,0x0E,0x0E,0x00,0x0D, 0x00,0x03,0xE7,0xC7,0x9F,0x0C,0x30,0x30,0xC0,0xC3,0x03,0x0C,0x0C,0x30,0x30,0xC0,0xC3,0x03,0x0C,0x0E,0x7C,0x1F,0xF8,0x3C,0x00, # 'v' 0x76,0x07,0x0E,0x0D,0x00,0x0D, 0x01,0xFB,0xF3,0xEF,0xC6,0x06,0x18,0x18,0x60,0x31,0x00,0xCC,0x01,0x30,0x06,0x80,0x0A,0x00,0x38,0x00,0xE0,0x01,0x00, # 'w' 0x77,0x08,0x11,0x0D,0x00,0x11, 0x04,0x1F,0xFF,0x6F,0xBE,0x31,0x83,0x1C,0xC1,0x9E,0x40,0x4D,0x20,0x34,0xB0,0x1A,0x78,0x05,0x3C,0x03,0x8E,0x01,0x86,0x00,0x43,0x00,0x00,0x00, # 'x' 0x78,0x08,0x0D,0x0D,0x00,0x0D, 0x0C,0xFB,0xE7,0xDE,0x18,0x31,0x80,0xD8,0x03,0x80,0x18,0x01,0xE0,0x19,0x81,0x8C,0x0E,0x7D,0xF3,0xE4,0x00,0x00, # 'y' 0x79,0x06,0x0F,0x11,0x00,0x0D, 0x7C,0x01,0xF8,0x00,0xC3,0xF0,0xC7,0xE1,0x82,0x01,0x0C,0x03,0x18,0x06,0x20,0x06,0xC0,0x0D,0x00,0x0E,0x00,0x18,0x00,0x30,0x06,0xC0,0x1F,0x00,0x3E,0x00,0x30,0x00, # 'z' 0x7A,0x08,0x0B,0x0B,0x00,0x0B, 0x7F,0xCF,0xF9,0x86,0x31,0x86,0x60,0x1C,0x07,0x00,0xC6,0x30,0xCF,0xF9,0xFF,0x00, # '{' 0x7B,0x02,0x09,0x12,0x00,0x08, 0x07,0x07,0x83,0x01,0x01,0x80,0xC0,0x60,0xE0,0x70,0x0C,0x06,0x03,0x01,0x80,0xC0,0x60,0x30,0x1F,0x03,0x80, # '|' 0x7C,0x02,0x03,0x12,0x01,0x05, 0x49,0x24,0x92,0x6D,0xB6,0xDB,0x6C, # '}' 0x7D,0x02,0x07,0x11,0x00,0x07, 0x30,0xF0,0x20,0x41,0x83,0x02,0x06,0x0E,0x18,0x60,0xC0,0x81,0x83,0x3C,0x78, # '~' 0x7E,0x09,0x0D,0x04,0x00,0x0D, 0x18,0x03,0xF1,0x98,0xFC,0x83,0xC0, # Terminator 0xFF ]
49.981873
251
0.743351
3,073
16,544
4.001302
0.114221
0.027977
0.024398
0.027326
0.135817
0.088809
0.05758
0.040013
0.037085
0.027977
0
0.474732
0.058692
16,544
330
252
50.133333
0.31484
0.102817
0
0
0
0
0
0
0
1
0.780644
0
0
1
0
false
0
0
0
0
0
0
0
0
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
1
1
0
0
0
0
0
0
0
0
0
0
0
4
a34f50aab0058ded87b960ef5eb790d146aa93c7
154
py
Python
cassiopeia/tools/branch_length_estimator/__init__.py
YosefLab/SingleCellLineageTracing
d9133fc80c8314e7935fde037dd86111cac47447
[ "MIT" ]
52
2019-05-14T02:06:24.000Z
2022-03-27T05:22:56.000Z
cassiopeia/tools/branch_length_estimator/__init__.py
sbradford2/Cassiopeia
010072b307f7eadbf10dc4af8b2165e48f1736a7
[ "MIT" ]
88
2019-06-07T15:07:45.000Z
2022-03-22T14:40:03.000Z
cassiopeia/tools/branch_length_estimator/__init__.py
sbradford2/Cassiopeia
010072b307f7eadbf10dc4af8b2165e48f1736a7
[ "MIT" ]
17
2019-05-17T00:46:16.000Z
2022-03-25T00:39:18.000Z
"""Top level for branch length estimator.""" from .IIDExponentialMLE import IIDExponentialMLE from .IIDExponentialBayesian import IIDExponentialBayesian
30.8
58
0.844156
14
154
9.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.097403
154
4
59
38.5
0.935252
0.246753
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
a37a33d45cefca4491180f168768ad1c5b395dcb
753
py
Python
pysbolgraph/S2Model.py
zhfanrui/pysbolgraph
c4914705bd9b22a2b69db0fc4d43049fcb07ad17
[ "BSD-2-Clause" ]
4
2018-06-29T10:43:08.000Z
2019-03-27T22:33:33.000Z
pysbolgraph/S2Model.py
zhfanrui/pysbolgraph
c4914705bd9b22a2b69db0fc4d43049fcb07ad17
[ "BSD-2-Clause" ]
14
2019-01-22T16:03:12.000Z
2019-11-11T19:05:32.000Z
pysbolgraph/S2Model.py
zhfanrui/pysbolgraph
c4914705bd9b22a2b69db0fc4d43049fcb07ad17
[ "BSD-2-Clause" ]
12
2018-07-01T10:59:37.000Z
2021-03-01T08:48:20.000Z
from .S2Identified import S2Identified class S2Model(S2Identified): def __init__(self, g, uri): super(S2Model, self).__init__(g, uri) @property def framework(self): return self.get_uri_property(SBOL2.framework) @framework.setter def framework(self, framework): self.set_uri_property(SBOL2.framework, framework) @property def language(self): return self.get_uri_property(SBOL2.language) @language.setter def language(self, language): self.set_uri_property(SBOL2.language, language) @property def source(self): return self.get_uri_property(SBOL2.source) @source.setter def source(self, source): self.set_uri_property(SBOL2.source, source)
24.290323
57
0.687915
90
753
5.533333
0.222222
0.154618
0.192771
0.10241
0.522088
0.198795
0.198795
0
0
0
0
0.018613
0.215139
753
30
58
25.1
0.824027
0
0
0.136364
0
0
0
0
0
0
0
0
0
1
0.318182
false
0
0.045455
0.136364
0.545455
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
6e606cc3a4ce9729dbbe9a96acb10ef177b88f50
3,529
py
Python
mmtfPyspark/tests/dev/test_interactionFilter.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
59
2018-01-28T06:50:56.000Z
2022-02-10T06:07:12.000Z
mmtfPyspark/tests/dev/test_interactionFilter.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
101
2018-02-01T20:51:10.000Z
2022-01-24T00:50:29.000Z
mmtfPyspark/tests/dev/test_interactionFilter.py
sbliven/mmtf-pyspark
3d444178bdc0d5128aafdb1326fec12b5d7634b5
[ "Apache-2.0" ]
29
2018-01-29T10:09:51.000Z
2022-01-23T18:53:28.000Z
#!/usr/bin/env python import unittest from mmtfPyspark.interactions import InteractionFilter class InteractionFilterTest(unittest.TestCase): def setUp(self): pass def test1(self): inFilter = InteractionFilter() inFilter.set_query_groups(True, ["HOH","ZN"]) self.assertTrue(inFilter.is_query_group('ZN')) self.assertTrue(inFilter.is_query_group('HOH')) self.assertFalse(inFilter.is_query_group('MN')) def test2(self): inFilter = InteractionFilter() inFilter.set_query_groups(False, ["HOH","ZN"]) self.assertFalse(inFilter.is_query_group('ZN')) self.assertFalse(inFilter.is_query_group('HOH')) self.assertTrue(inFilter.is_query_group('MN')) def test3(self): inFilter = InteractionFilter() inFilter.set_target_groups(True, ["HOH","ZN"]) self.assertTrue(inFilter.is_target_group('ZN')) self.assertTrue(inFilter.is_target_group('HOH')) self.assertFalse(inFilter.is_target_group('MN')) def test4(self): inFilter = InteractionFilter() inFilter.set_target_groups(False, ["HOH","ZN"]) self.assertFalse(inFilter.is_target_group('ZN')) self.assertFalse(inFilter.is_target_group('HOH')) self.assertTrue(inFilter.is_target_group('MN')) def test5(self): inFilter = InteractionFilter() self.assertTrue(inFilter.is_query_group('ZN')) self.assertTrue(inFilter.is_target_group('ZN')) self.assertTrue(not inFilter.is_prohibited_target_group('ZN')) def test6(self): inFilter = InteractionFilter() inFilter.set_query_elements(True, ["N","O"]) self.assertTrue(inFilter.is_query_element('O')) self.assertTrue(inFilter.is_query_element('N')) self.assertFalse(inFilter.is_query_element('S')) def test7(self): inFilter = InteractionFilter() inFilter.set_query_elements(False, ["N","O"]) self.assertFalse(inFilter.is_query_element('O')) self.assertFalse(inFilter.is_query_element('N')) self.assertTrue(inFilter.is_query_element('S')) def test8(self): inFilter = InteractionFilter() inFilter.set_target_elements(True, ["N","O"]) self.assertTrue(inFilter.is_target_element('O')) self.assertTrue(inFilter.is_target_element('N')) self.assertFalse(inFilter.is_target_element('S')) def test9(self): inFilter = InteractionFilter() inFilter.set_target_elements(False, ["N","O"]) self.assertFalse(inFilter.is_target_element('O')) self.assertFalse(inFilter.is_target_element('N')) self.assertTrue(inFilter.is_target_element('S')) def test10(self): inFilter = InteractionFilter() inFilter.set_query_atom_names(True, ["CA","CB"]) self.assertFalse(inFilter.is_query_atom_name('C')) self.assertFalse(inFilter.is_query_atom_name('CG')) self.assertTrue(inFilter.is_query_atom_name('CA')) self.assertTrue(inFilter.is_query_atom_name('CB')) def test11(self): inFilter = InteractionFilter() inFilter.set_target_atom_names(True, ["CA","CB"]) self.assertFalse(inFilter.is_target_atom_name('C')) self.assertFalse(inFilter.is_target_atom_name('CG')) self.assertTrue(inFilter.is_target_atom_name('CA')) self.assertTrue(inFilter.is_target_atom_name('CB')) def tearDown(self): pass if __name__ == '__main__': unittest.main()
30.686957
70
0.668745
410
3,529
5.490244
0.143902
0.155486
0.175922
0.191915
0.860951
0.860951
0.66948
0.253665
0.126166
0.088849
0
0.004577
0.195239
3,529
114
71
30.95614
0.788028
0.005667
0
0.223684
0
0
0.029647
0
0
0
0
0
0.460526
1
0.171053
false
0.026316
0.026316
0
0.210526
0
0
0
0
null
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
6e7133d2e2f69001222e0c5f1dc62021dd904ec6
9,480
py
Python
fracture/__init__.py
mikemalinowski/fracture
f9895d4e5f65e4d27bd3265c41eeb87a0878ceaa
[ "MIT" ]
2
2020-10-09T01:40:11.000Z
2020-10-09T14:16:51.000Z
fracture/__init__.py
mikemalinowski/fracture
f9895d4e5f65e4d27bd3265c41eeb87a0878ceaa
[ "MIT" ]
null
null
null
fracture/__init__.py
mikemalinowski/fracture
f9895d4e5f65e4d27bd3265c41eeb87a0878ceaa
[ "MIT" ]
1
2020-10-09T14:16:53.000Z
2020-10-09T14:16:53.000Z
""" # Overview Fracture is a lightweight and flexible data management system. It allows you to interact with data through a trait compositing mechanism, whilst also exposing the ability to quickly query and access information about the data you're exploring. # How it works You start by creating a fracture.Project. The project file is where all the metadata and look up tables are stored - allowing you to easily search for data assets as well as find changes. Fracture comes built-in with a file searching mechanism, but you can extend this with your own search mechanisms too. For instance, if you have data on an FTP, or within Source Control and you want to add that data to the project without having to have it physically on disk you're able to do so by implementing a fracture.ScanProcess plugin. Finally, and probably the most important is the DataElement. This is a class which you can use to express the functionality of data. Rather than having a 1:1 relationship between a DataElement class and a data type the DataElement class supports class compositing. This allows for a piece of data to be represented by more than one class simultaneously. # Examples This example uses the ```dino_example``` data which you can download from https://github.com/mikemalinowski/fracture. To start with, we create a fracture project. To do this we must specify two pieces of information, the first being where we want to save our project file and the second being the locations where we want fracture to look for Scan and Data Plugins. ```python import os import fracture project = fracture.create( project_path=os.path.join(current_path, '_dino.fracture'), plugin_locations=[os.path.join(current_path, 'plugins')] ) ``` This returns a fracture.Project instance which we can then start interacting with, for instance we can define locations where the project should start looking for data: ```python # -- Tell the project where to look for data project.add_scan_location('/usr/my_data')) ``` Finally, with the project made, and at least one search location added we can initiate a search... ```python # -- Now we initiate a scan. This will cycle over all the # -- scan locations and scrape them for data project.scan() ``` Scanning is the process of running over all the scan plugins - of which there is always at least one (the file scraper), and populating the project with information about each piece of data which is found. The process is pretty quick and the amount of data stored is minimal - primarily just the identifier such as the path along with any tags as defined by any DataElement composites which can represent that data. With the project populated we can now start querying the project for data ```python # -- Now we have scanned we can start to run queries over data # -- very quickly. We can search by tags, or use the special # -- * wildcard for item in project.find('*'): # -- By default we get string identifiers back from a find, as # -- this is incredibly quick. However, we can ask for the data # -- composite representation of the item. A data composite is # -- a composition of all the data plugins which can represent # -- this identifier. item = project.get(item) # -- Print the identifier, and the item (which also shows the # -- class composition) print(item.identifier()) print('\t%s' % item) # -- We can start interacting with this data, calling # -- functionality will return a dictionary of all the # -- functionality exposed by all the data plugins representing # -- this item for k, v in item.functionality().items(): print('\t\t%s = %s' % (k, v)) ``` The process of querying is very quick, even for reasonably large data sets. In the example above we're then asking the project to 'get' the item. This process take the identifier and binds all the relevent DataElements together which can possibly represent the data. Binding is particularly useful when there is no obvious hierarchy between two elements. For instance, in the ```dino_example``` data set we have a trait which is ```carnivore``` and a trait which is ```herbivore```. There is no hierarchical relationship between the two, but an omnivore would need both. By using class compositing we avoid complex multi-inheritence situations. Using this same mechanism, if we know the locator of a piece of information, such as a file path, we can get the composited class directly without having to run a query, as shown here: ```python # -- We do not have to utilise the find method to get access to data, # -- and in fact we can get a Composite representation of data even # -- if that data is not within our scan location. data = project.get('/usr/my_data/my_file.txt') ``` For a full demo, download the ```dino_example``` and run main.py # Data Composition As mentioned in the examples, we use class composition to bind traits together to represent data. This means we can have small, self contained traits which do not need rigid hierarchical structures designed for them. There are three main composited methods in the DataElement class, specifically: * label : The first call that returns a positive result is taken * mandatory_tags : All the lists are collated from all compositions and made unique * functionality : All dictionaries are combined into a single dictionary * icon : The first call that returns a positive result is taken Given the ```dino_example``` files, the velociraptor.png file, when passed to ```project.get('/usr/my_data/.../velociraptor.png')``` is expressed as a class formed of the following traits: [Carnivore; File; Image;] where each trait can expose its own information. An implementation of a DataElement plugin looks like this: ```python import re import fracture # -- All plugins must inherit from the fracture.DataElement class in order # -- to be dynamically picked up. class CarnivoreTrait(fracture.DataElement): # -- The data type is mandatory, and is your way of # -- denoting the name of this plugin data_type = 'carnivore' # -- These two lines are not at all required and are here # -- just to make performance better _split = re.compile('/|\.|,|-|:|_', re.I) _has_trait = re.compile('(carnivore|omnivore).*\.', re.I) # -------------------------------------------------------------------------- # -- This method must be re-implemented, and its your oppotunity to # -- decide whether this plugin can viably represent the given data # -- identifier. # -- In this example we use a regex check, but it could be anything # -- you want. The key thing to remember is that this is called a lot, # -- so performance is worth keeping in mind. @classmethod def can_represent(cls, identifier): if CarnivoreTrait._has_trait.search(identifier): return True return False # -------------------------------------------------------------------------- # -- This is your way of exposing functionality in a common and consistent # -- way. If you know the data types you can of course call things directly # -- but this is a good catch up consistent way of exposing functionality # -- and is typically harnessed by user interfaces. def functionality(self): return dict( feed_meat=self.feed_meat, ), ) # -------------------------------------------------------------------------- # -- This should return a 'nice name' for the identifier def label(self): return os.path.basename(self.identifier()) # -------------------------------------------------------------------------- # -- As fracture heavily utilises tags, this is your way of defining a # -- set of tags which are mandatory for anything with this trait def mandatory_tags(self): return ['carnivore', 'meat', 'hunter'] # -------------------------------------------------------------------------- # -- This is here just as a demonstration of a callable function which # -- which can be accessed on the trait def feed_meat(self): print('Would feed this creature some meat...') ``` By placing a trait plugin anywhere within the plugin locations you define for your project will immediately make it accessible. ## ScanProcess By default fracture comes with one built-in scan plugin which handles file scanning, so that is a good example when wanting to write your own - if you have need to do so. This plugin type defines how to find data. If your data is files on a disk such as those in the example above then your scan plugin may do little more than cycle directories and yield file paths. Alternatively if you're caching data from a REST API you might be utilising requests within the scan process and feeding back URL's. # Origin This library is a variation on the tools demonstrated during GDC2018 (A Practical Approach to Developing Forward-Facing Rigs, Tools and Pipelines), which can be explored in more detail here: https://www.gdcvault.com/play/1025427/A-Practical-Approach-to-Developing Slide 55 onward explores this concept. It is also explored in detail on this webpage: https://www.twisted.space/blog/insight-localised-asset-management """ from ._project import icon from ._project import Project from ._scan import ScanProcess from ._element import DataElement from ._access import create from ._access import load from .constants import log
39.3361
83
0.711498
1,415
9,480
4.742756
0.309541
0.008196
0.008345
0.004917
0.038742
0.013411
0.013411
0.013411
0.013411
0.013411
0
0.001948
0.187658
9,480
240
84
39.5
0.869497
0.97827
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
6e75611e944a439f24c89d659dc0e29d97cdc369
2,017
py
Python
tokens.py
brunoorlandin/projeto-compiladores
36cb846ee54a8d8bfeb88644b201f4809c967c09
[ "MIT" ]
null
null
null
tokens.py
brunoorlandin/projeto-compiladores
36cb846ee54a8d8bfeb88644b201f4809c967c09
[ "MIT" ]
null
null
null
tokens.py
brunoorlandin/projeto-compiladores
36cb846ee54a8d8bfeb88644b201f4809c967c09
[ "MIT" ]
1
2022-03-24T00:11:48.000Z
2022-03-24T00:11:48.000Z
''' letras = [a-z] + [A-Z] digito = "0" + "1" + "2" + "3" + "4" + "5" + "6" + "7" + "8" + "9" simbolos = "!" + "@" + "#" + "$" + "%" + "&" + "*" IDENTIFIER: letra.(letra + digito + simbolo)* INTEGER: (digito+) STRING: ".letra*" L_CHAVE: { R_CHAVE: } ATRIBUIDOR: = EOL: ; ## Tipos das variaveis # Para os tipos das variaveis foram utilizados as palavras abaixo: # a palavra "sword" corresponde ao tipo char (string) # a palavra "shield" corresponde ao tipo inteiro # Tokens e expressoes regulares: SWORD: s.w.o.r.d SHIELD: s.h.i.e.l.d ## Operadores aritimeticos # Para os operadores aritimeticos foram utilizadas as palavras abaixo # "buff" significa o operador de adicao (+) # "debuff" significa o operador de subtracao (-) # "heal" significa o operador de multiplicacao (*) # "poison" significa o operador de divisao (/) # Tokens e expressoes regulares: BUFF: b.u.f.f DEFUBB: d.e.b.u.f.f HEAL: h.e.a.l POISON: p.o.i.s.o.n ## Estruturas condicionais # Para as estruturas condicionais foram utilizadas as palavras abaixo # "hit" correspondendo ao se (condicao verdadeira) # "miss" correspondente ao se não (condicao nao veridadeira) # Tokens e expressoes regulares: HIT: h.i.t MISS: m.i.s.s ## Simbolos de comparacao # Para os simbolos de comparacao foram utilizadas as palavras abaixo: # "attack" correspondendo a maior (>) # "defense" correspondendo a maior (<) # "dodge" correspondendo a comparacao de igualdade (==) # "critical" correspondendo a maior (>=) # "block" correspondendo a maior (<=) # Tokens e expressoes regulares ATTACK: a.t.t.a.c.k DEFENSE: d.e.f.e.n.s.e DODGE: d.o.d.g.e CRITICAL: c.r.i.t.i.c.a.l BLOCK: b.l.o.c.k ''' class Token(object): def __init__(self, type, value): self.type = type self.value = value #representação em string da classe def __str__(self): return "Token({type}, {value})".format(type = self.type, value = repr(self.value)) def __repr__(self): return self.__str__()
27.630137
87
0.650967
293
2,017
4.419795
0.389079
0.057915
0.049421
0.080309
0.071815
0
0
0
0
0
0
0.006192
0.199306
2,017
72
88
28.013889
0.795666
0.82945
0
0
0
0
0.08365
0
0
0
0
0
0
1
0.375
false
0
0
0.25
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
6e98de22685effa3db1f6d7261a68d9920976f23
201
py
Python
kattis/nsum/nsum.py
ShengyuanWang/ShengyuanWang.github.io
b43f867a1b140b78f8031725cff212b43ecd001b
[ "MIT" ]
1
2022-01-20T21:12:00.000Z
2022-01-20T21:12:00.000Z
kattis/nsum/nsum.py
ShengyuanWang/ShengyuanWang.github.io
b43f867a1b140b78f8031725cff212b43ecd001b
[ "MIT" ]
null
null
null
kattis/nsum/nsum.py
ShengyuanWang/ShengyuanWang.github.io
b43f867a1b140b78f8031725cff212b43ecd001b
[ "MIT" ]
null
null
null
def addition(nums): return sum(nums) def main(): t = int(input()) nums = list(map(int, input().strip().split())) return addition(nums) if __name__ == "__main__": print(main())
14.357143
50
0.587065
26
201
4.230769
0.615385
0.218182
0
0
0
0
0
0
0
0
0
0
0.223881
201
14
51
14.357143
0.705128
0
0
0
0
0
0.039604
0
0
0
0
0
0
1
0.25
false
0
0
0.125
0.5
0.125
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
6e99bdbe5f2749969968dcf03f1beeef55a28f54
391
py
Python
mlib/requests/sites/const.py
tmunzer/Mist_library
5d44325dc5b59483d9d6803f31fe1568762b04ca
[ "MIT" ]
13
2020-04-21T21:11:56.000Z
2021-07-15T21:42:41.000Z
mlib/requests/sites/const.py
tmunzer/mist_library
812828a6486f59850a12dda4f81dbfd76929ed6b
[ "MIT" ]
null
null
null
mlib/requests/sites/const.py
tmunzer/mist_library
812828a6486f59850a12dda4f81dbfd76929ed6b
[ "MIT" ]
2
2020-06-18T20:07:51.000Z
2020-08-13T16:43:32.000Z
def get_applications(mist_session): uri = "/api/v1/const/applications" resp = mist_session.mist_get(uri) return resp def get_ap_led_status(mist_session): uri = "/api/v1/const/ap_led_status" resp = mist_session.mist_get(uri) return resp def get_ap_models(mist_session): uri = "/api/v1/const/device_models" resp = mist_session.mist_get(uri) return resp
23
39
0.713555
60
391
4.35
0.266667
0.252874
0.16092
0.195402
0.739464
0.739464
0.463602
0.463602
0.329502
0.329502
0
0.009346
0.179028
391
16
40
24.4375
0.803738
0
0
0.5
0
0
0.205656
0.205656
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
0
0
0
null
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
6ea454687e6e26549701f916328614176c2d2f55
222
py
Python
Aula 15/tuplas.py
mateuschaves/curso-python
53b2f3b4bf083ae2ce7ea19dd358f49a36becd9d
[ "MIT" ]
1
2018-07-23T04:03:35.000Z
2018-07-23T04:03:35.000Z
Aula 15/tuplas.py
mateuschaves/curso-python
53b2f3b4bf083ae2ce7ea19dd358f49a36becd9d
[ "MIT" ]
null
null
null
Aula 15/tuplas.py
mateuschaves/curso-python
53b2f3b4bf083ae2ce7ea19dd358f49a36becd9d
[ "MIT" ]
null
null
null
lanche = ('Hambúrguer', 'Suco', 'Pizza', 'Pudim') print(lanche[1]) print(lanche[-1]) print(lanche[0:]) lanche = ('miojo', 'refrigerante', 'pastel', 'bolo') for pos, comida in enumerate(lanche): print(comida, pos)
17.076923
52
0.63964
28
222
5.071429
0.607143
0.232394
0.169014
0.239437
0.246479
0
0
0
0
0
0
0.015707
0.13964
222
12
53
18.5
0.727749
0
0
0
0
0
0.230769
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
1
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
42bcfcb4772fa092908e2294a625a78fcf366fe2
86
py
Python
test/test_most_stones_removed_with_same_row_or_column.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_most_stones_removed_with_same_row_or_column.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_most_stones_removed_with_same_row_or_column.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
solution = MostStonesRemovedWithSameRowOrColumn() assert X == solution.removeStones( )
43
49
0.825581
6
86
11.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.081395
86
2
50
43
0.898734
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
42f558bb59b6e84ad3709224acecd361d85197e2
206
py
Python
pyro/Enums/Event.py
rux616/pyro
8f611f6c4f7a82f7ab1112d4473b172dede50efc
[ "MIT" ]
40
2017-11-12T10:07:00.000Z
2022-02-21T01:44:36.000Z
pyro/Enums/Event.py
rux616/pyro
8f611f6c4f7a82f7ab1112d4473b172dede50efc
[ "MIT" ]
10
2019-11-07T07:50:17.000Z
2021-08-31T22:52:01.000Z
pyro/Enums/Event.py
rux616/pyro
8f611f6c4f7a82f7ab1112d4473b172dede50efc
[ "MIT" ]
12
2019-06-08T19:24:08.000Z
2022-01-29T10:13:30.000Z
from enum import Enum from typing import Union class BuildEvent(Enum): PRE = 0 POST = 1 class ImportEvent(Enum): PRE = 0 POST = 1 Event = Union[BuildEvent, ImportEvent]
12.875
39
0.616505
26
206
4.884615
0.5
0.110236
0.125984
0.188976
0.204724
0
0
0
0
0
0
0.028369
0.315534
206
15
40
13.733333
0.87234
0
0
0.444444
0
0
0
0
0
0
0
0
0
1
0
false
0
0.444444
0
1.111111
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6e4fcb497112993e10874f2400192d1dd99276e1
120
py
Python
routes/api.py
hajidalakhtar/imgmstr
1dede18570ff19375576104c6b99278f28767d1c
[ "MIT" ]
null
null
null
routes/api.py
hajidalakhtar/imgmstr
1dede18570ff19375576104c6b99278f28767d1c
[ "MIT" ]
null
null
null
routes/api.py
hajidalakhtar/imgmstr
1dede18570ff19375576104c6b99278f28767d1c
[ "MIT" ]
null
null
null
from fastapi import APIRouter from src.endpoints import image router = APIRouter() router.include_router(image.router)
24
35
0.825
16
120
6.125
0.5625
0.22449
0
0
0
0
0
0
0
0
0
0
0.108333
120
5
35
24
0.915888
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
2812c148ace346d2590acdfc882adcc4fe747d27
12,480
py
Python
tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/temporal_consistency_test.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
16
2017-06-30T20:05:05.000Z
2022-03-08T21:03:19.000Z
tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/temporal_consistency_test.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
342
2017-06-23T21:37:40.000Z
2022-03-30T16:44:16.000Z
tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/temporal_consistency_test.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
33
2017-07-01T00:12:20.000Z
2022-01-26T18:06:53.000Z
""" Integration test for Temporal Consistency CR implemented in DC-400 """ # Python imports import os from datetime import datetime as dt # Project imports import common from app_identity import PROJECT_ID from cdr_cleaner.cleaning_rules.temporal_consistency import TemporalConsistency, table_dates from tests.integration_tests.data_steward.cdr_cleaner.cleaning_rules.bigquery_tests_base import BaseTest class TemporalConsistencyTest(BaseTest.CleaningRulesTestBase): @classmethod def setUpClass(cls): print('**************************************************************') print(cls.__name__) print('**************************************************************') super().initialize_class_vars() project_id = os.environ.get(PROJECT_ID) cls.project_id = project_id dataset_id = os.environ.get('UNIONED_DATASET_ID') cls.dataset_id = dataset_id sandbox_id = dataset_id + '_sandbox' cls.sandbox_id = sandbox_id cls.rule_instance = TemporalConsistency(project_id, dataset_id, sandbox_id) cls.fq_dataset_id = f'{cls.project_id}.{cls.dataset_id}' cls.fq_sandbox_id = f'{cls.project_id}.{cls.sandbox_id}' for table_name in list(table_dates.keys()) + [common.VISIT_OCCURRENCE]: sandbox_table_name = cls.rule_instance.sandbox_table_for(table_name) cls.fq_sandbox_table_names.append( f'{cls.project_id}.{cls.sandbox_id}.{sandbox_table_name}') cls.fq_table_names.append( f'{cls.project_id}.{cls.dataset_id}.{table_name}') super().setUpClass() def test_temporal_consistency(self): queries = [] co_insert = self.jinja_env.from_string( """ INSERT INTO `{{fq_table_id}}` (condition_occurrence_id, person_id, condition_concept_id, condition_start_date, condition_start_datetime, condition_end_date, condition_end_datetime, condition_type_concept_id, visit_occurrence_id) VALUES (100, 1, 10, date('2019-05-06'), timestamp('2019-05-06 00:00:00'), date('2019-05-19'), timestamp('2019-05-19 00:00:00'), 5, 101), (101, 1, 11, date('2019-05-25'), timestamp('2019-05-25 00:00:00'), date('2019-05-07'), timestamp('2019-05-07 00:00:00'), 6, 101), (102, 1, 12, date('2019-05-06'), timestamp('2019-05-06 00:00:00'), date('2019-05-28'), timestamp('2019-05-28 00:00:00'), 7, 101), (103, 2, 13, date('2020-10-12'), timestamp('2021-10-12 00:00:00'), date('2021-10-12'), timestamp('2021-10-12 00:00:00'), 8, 102), (104, 2, 14, date('2021-10-12'), timestamp('2021-10-12 00:00:00'), date('2021-09-12'), timestamp('2021-09-12 00:00:00'), 9, 102)""" ).render(fq_table_id=self.fq_table_names[0]) queries.append(co_insert) dre_insert = self.jinja_env.from_string( """ INSERT INTO `{{fq_table_id}}` (drug_exposure_id, person_id, drug_concept_id, drug_exposure_start_date, drug_exposure_start_datetime, drug_exposure_end_date, drug_exposure_end_datetime, drug_type_concept_id, visit_occurrence_id) VALUES (101, 1, 10, date('2019-05-06'), timestamp('2019-05-06 00:00:00'), date('2019-05-01'), timestamp('2019-05-01 00:00:00'), 5, 101), (102, 1, 11, date('2019-05-16'), timestamp('2019-05-16 00:00:00'), date('2019-05-19'), timestamp('2019-05-19 00:00:00'), 6, 101), (103, 2, 12, date('2021-10-12'), timestamp('2021-10-12 00:00:00'), date('2021-10-10'), timestamp('2021-10-10 00:00:00'), 7, 102), (104, 2, 10, date('2021-10-12'), timestamp('2021-10-12 00:00:00'), date('2021-10-15'), timestamp('2021-10-15 00:00:00'), 8, 102)""" ).render(fq_table_id=self.fq_table_names[1]) queries.append(dre_insert) dve_insert = self.jinja_env.from_string( """ INSERT INTO `{{fq_table_id}}` (device_exposure_id, person_id, device_concept_id, device_exposure_start_date, device_exposure_start_datetime, device_exposure_end_date, device_exposure_end_datetime, device_type_concept_id, visit_occurrence_id) VALUES (101, 1, 4, date('2019-05-06'), timestamp('2019-05-06 00:00:00'), date('2019-05-14'), timestamp('2019-05-14 00:00:00'), 4, 101), (102, 1, 5, date('2019-05-10'), timestamp('2019-05-10 00:00:00'), date('2019-05-16'), timestamp('2019-05-16 00:00:00'), 4, 101), (103, 2, 6, date('2021-10-12'), timestamp('2021-10-12 00:00:00'), date('2021-10-15'), timestamp('2021-10-15 00:00:00'), 4, 102), (104, 2, 7, date('2021-10-15'), timestamp('2021-10-15 00:00:00'), date('2021-10-10'), timestamp('2021-10-10 00:00:00'), 4, 102)""" ).render(fq_table_id=self.fq_table_names[2]) queries.append(dve_insert) vo_insert = self.jinja_env.from_string( """ INSERT INTO `{{fq_table_id}}` (visit_occurrence_id, person_id, visit_concept_id, visit_start_date, visit_start_datetime, visit_end_date, visit_end_datetime, visit_type_concept_id) VALUES (101, 1, 9201, date('2019-05-06'), timestamp('2019-05-06 00:00:00'), date('2019-05-05'), timestamp('2019-05-05 00:00:00'), 7), (102, 2, 11, date('2021-10-12'), timestamp('2021-10-12 00:00:00'), date('2021-10-18'), timestamp('2021-10-18 00:00:00'), 7), (201, 2, 9201, date('2021-10-01'), timestamp('2021-10-01 00:00:00'), date('2021-09-30'), timestamp('2021-09-30 00:00:00'), 7)""" ).render(fq_table_id=self.fq_table_names[3]) queries.append(vo_insert) self.load_test_data(queries) table_and_counts = [{ 'fq_table_name': self.fq_table_names[0], 'fq_sandbox_table_name': self.fq_sandbox_table_names[0], 'loaded_ids': [100, 101, 102, 103, 104], 'sandboxed_ids': [101, 104], 'fields': [ 'condition_occurrence_id', 'person_id', 'condition_concept_id', 'condition_start_date', 'condition_start_datetime', 'condition_end_date', 'condition_end_datetime', 'condition_type_concept_id', 'visit_occurrence_id' ], 'cleaned_values': [ (100, 1, 10, dt.fromisoformat('2019-05-06').date(), dt.fromisoformat('2019-05-06 00:00:00+00:00'), dt.fromisoformat('2019-05-19').date(), dt.fromisoformat('2019-05-19 00:00:00+00:00'), 5, 101), (101, 1, 11, dt.fromisoformat('2019-05-25').date(), dt.fromisoformat('2019-05-25 00:00:00+00:00'), None, dt.fromisoformat('2019-05-07 00:00:00+00:00'), 6, 101), (102, 1, 12, dt.fromisoformat('2019-05-06').date(), dt.fromisoformat('2019-05-06 00:00:00+00:00'), dt.fromisoformat('2019-05-28').date(), dt.fromisoformat('2019-05-28 00:00:00+00:00'), 7, 101), (103, 2, 13, dt.fromisoformat('2020-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), dt.fromisoformat('2021-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), 8, 102), (104, 2, 14, dt.fromisoformat('2021-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), None, dt.fromisoformat('2021-09-12 00:00:00+00:00'), 9, 102) ] }, { 'fq_table_name': self.fq_table_names[1], 'fq_sandbox_table_name': self.fq_sandbox_table_names[1], 'loaded_ids': [101, 102, 103, 104], 'sandboxed_ids': [101, 103], 'fields': [ 'drug_exposure_id', 'person_id', 'drug_concept_id', 'drug_exposure_start_date', 'drug_exposure_start_datetime', 'drug_exposure_end_date', 'drug_exposure_end_datetime', 'drug_type_concept_id', 'visit_occurrence_id' ], 'cleaned_values': [ (101, 1, 10, dt.fromisoformat('2019-05-06').date(), dt.fromisoformat('2019-05-06 00:00:00+00:00'), None, dt.fromisoformat('2019-05-01 00:00:00+00:00'), 5, 101), (102, 1, 11, dt.fromisoformat('2019-05-16').date(), dt.fromisoformat('2019-05-16 00:00:00+00:00'), dt.fromisoformat('2019-05-19').date(), dt.fromisoformat('2019-05-19 00:00:00+00:00'), 6, 101), (103, 2, 12, dt.fromisoformat('2021-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), None, dt.fromisoformat('2021-10-10 00:00:00+00:00'), 7, 102), (104, 2, 10, dt.fromisoformat('2021-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), dt.fromisoformat('2021-10-15').date(), dt.fromisoformat('2021-10-15 00:00:00+00:00'), 8, 102) ] }, { 'fq_table_name': self.fq_table_names[2], 'fq_sandbox_table_name': self.fq_sandbox_table_names[2], 'loaded_ids': [101, 102, 103, 104], 'sandboxed_ids': [104], 'fields': [ 'device_exposure_id', 'person_id', 'device_concept_id', 'device_exposure_start_date', 'device_exposure_start_datetime', 'device_exposure_end_date', 'device_exposure_end_datetime', 'device_type_concept_id', 'visit_occurrence_id' ], 'cleaned_values': [ (101, 1, 4, dt.fromisoformat('2019-05-06').date(), dt.fromisoformat('2019-05-06 00:00:00+00:00'), dt.fromisoformat('2019-05-14').date(), dt.fromisoformat('2019-05-14 00:00:00+00:00'), 4, 101), (102, 1, 5, dt.fromisoformat('2019-05-10').date(), dt.fromisoformat('2019-05-10 00:00:00+00:00'), dt.fromisoformat('2019-05-16').date(), dt.fromisoformat('2019-05-16 00:00:00+00:00'), 4, 101), (103, 2, 6, dt.fromisoformat('2021-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), dt.fromisoformat('2021-10-15').date(), dt.fromisoformat('2021-10-15 00:00:00+00:00'), 4, 102), (104, 2, 7, dt.fromisoformat('2021-10-15').date(), dt.fromisoformat('2021-10-15 00:00:00+00:00'), None, dt.fromisoformat('2021-10-10 00:00:00+00:00'), 4, 102) ] }, { 'fq_table_name': self.fq_table_names[3], 'fq_sandbox_table_name': self.fq_sandbox_table_names[3], 'loaded_ids': [101, 102, 201], 'sandboxed_ids': [101, 201], 'fields': [ 'visit_occurrence_id', 'person_id', 'visit_concept_id', 'visit_start_date', 'visit_start_datetime', 'visit_end_date', 'visit_end_datetime', 'visit_type_concept_id' ], 'cleaned_values': [ (101, 1, 9201, dt.fromisoformat('2019-05-06').date(), dt.fromisoformat('2019-05-06 00:00:00+00:00'), dt.fromisoformat('2019-05-28').date(), dt.fromisoformat('2019-05-05 00:00:00+00:00'), 7), (102, 2, 11, dt.fromisoformat('2021-10-12').date(), dt.fromisoformat('2021-10-12 00:00:00+00:00'), dt.fromisoformat('2021-10-18').date(), dt.fromisoformat('2021-10-18 00:00:00+00:00'), 7), (201, 2, 9201, dt.fromisoformat('2021-10-01').date(), dt.fromisoformat('2021-10-01 00:00:00+00:00'), dt.fromisoformat('2021-10-01').date(), dt.fromisoformat('2021-09-30 00:00:00+00:00'), 7) ] }] self.default_test(table_and_counts)
52
104
0.546234
1,660
12,480
3.912651
0.081928
0.118245
0.118245
0.07883
0.79846
0.770131
0.732256
0.700693
0.622787
0.561663
0
0.210774
0.284535
12,480
239
105
52.217573
0.516631
0.007853
0
0.260606
0
0
0.274173
0.082863
0
0
0
0
0
1
0.012121
false
0
0.036364
0
0.054545
0.018182
0
0
0
null
0
0
0
0
1
1
1
0
0
0
1
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
282802444c81d6fc5d3c52b8e91ccb6a1be3961e
27
py
Python
squid/constants.py
dcdanko/urban_metagenomics_tutorial
7cbe5420c4769de77158c91d40a73f815bd27b7a
[ "MIT" ]
1
2020-03-20T19:25:16.000Z
2020-03-20T19:25:16.000Z
squid/constants.py
dcdanko/urban_metagenomics_tutorial
7cbe5420c4769de77158c91d40a73f815bd27b7a
[ "MIT" ]
null
null
null
squid/constants.py
dcdanko/urban_metagenomics_tutorial
7cbe5420c4769de77158c91d40a73f815bd27b7a
[ "MIT" ]
1
2020-03-20T19:25:51.000Z
2020-03-20T19:25:51.000Z
NO_TAXA = 'no_taxa_found'
9
25
0.740741
5
27
3.4
0.6
0.705882
0
0
0
0
0
0
0
0
0
0
0.148148
27
2
26
13.5
0.73913
0
0
0
0
0
0.5
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
28499e138521fa59aec3e51c212b45cd606200de
154
py
Python
soda/core/soda/execution/check_outcome.py
duyet/soda-core
92a52e0d7c1e88624d0637123cfcb2610af6d112
[ "Apache-2.0" ]
4
2022-03-23T02:43:42.000Z
2022-03-31T15:20:54.000Z
soda/core/soda/execution/check_outcome.py
duyet/soda-core
92a52e0d7c1e88624d0637123cfcb2610af6d112
[ "Apache-2.0" ]
543
2022-03-22T09:02:17.000Z
2022-03-31T16:29:41.000Z
soda/core/soda/execution/check_outcome.py
duyet/soda-core
92a52e0d7c1e88624d0637123cfcb2610af6d112
[ "Apache-2.0" ]
1
2022-03-27T03:37:55.000Z
2022-03-27T03:37:55.000Z
from enum import Enum class CheckOutcome(Enum): PASS = "pass" WARN = "warn" FAIL = "fail" def __str__(self): return self.name
12.833333
25
0.590909
19
154
4.578947
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.305195
154
11
26
14
0.813084
0
0
0
0
0
0.077922
0
0
0
0
0
0
1
0.142857
false
0.142857
0.142857
0.142857
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
0
1
1
0
0
4
285f18caf7eba2d2753eee0fe11877346fba7996
122
py
Python
atlas/gcp_utils/src/integration/__init__.py
DeepLearnI/atlas
8aca652d7e647b4e88530b93e265b536de7055ed
[ "Apache-2.0" ]
296
2020-03-16T19:55:00.000Z
2022-01-10T19:46:05.000Z
atlas/gcp_utils/src/integration/__init__.py
DeepLearnI/atlas
8aca652d7e647b4e88530b93e265b536de7055ed
[ "Apache-2.0" ]
57
2020-03-17T11:15:57.000Z
2021-07-10T14:42:27.000Z
atlas/gcp_utils/src/integration/__init__.py
DeepLearnI/atlas
8aca652d7e647b4e88530b93e265b536de7055ed
[ "Apache-2.0" ]
38
2020-03-17T21:06:05.000Z
2022-02-08T03:19:34.000Z
from uuid import uuid4 import foundations import integration.config from integration.test_deploy_job import TestDeployJob
24.4
53
0.885246
16
122
6.625
0.6875
0
0
0
0
0
0
0
0
0
0
0.009091
0.098361
122
5
53
24.4
0.954545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
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
28a21904e796102c59cc3d5ef5156a831ce91df3
626
py
Python
source/NVDAObjects/IAccessible/delphi.py
raza-al-pakistani/raza-al-pakistani--v20022.3.1
ac7febbbf4a32a476ee2f15994bbb3e77356c3ca
[ "bzip2-1.0.6" ]
null
null
null
source/NVDAObjects/IAccessible/delphi.py
raza-al-pakistani/raza-al-pakistani--v20022.3.1
ac7febbbf4a32a476ee2f15994bbb3e77356c3ca
[ "bzip2-1.0.6" ]
null
null
null
source/NVDAObjects/IAccessible/delphi.py
raza-al-pakistani/raza-al-pakistani--v20022.3.1
ac7febbbf4a32a476ee2f15994bbb3e77356c3ca
[ "bzip2-1.0.6" ]
null
null
null
from NVDAObjects import behaviors import controlTypes from . import IAccessible class TRichView(IAccessible): def _get_name(self): pass def _get_role(self): return controlTypes.Role.STATICTEXT class TRichViewEdit(IAccessible): def _get_name(self): pass def _get_role(self): return controlTypes.Role.EDITABLETEXT class TGroupBox(IAccessible): def _get_role(self): return controlTypes.Role.GROUPING class Form(behaviors.Dialog): role=controlTypes.Role.DIALOG class TabSheet(behaviors.Dialog): role=controlTypes.Role.PROPERTYPAGE class TRxRichEdit(IAccessible): def _get_name(self): return None
16.473684
39
0.790735
77
626
6.272727
0.337662
0.074534
0.140787
0.130435
0.540373
0.343685
0.343685
0.269151
0.269151
0.269151
0
0
0.127796
626
37
40
16.918919
0.884615
0
0
0.347826
0
0
0
0
0
0
0
0
0
1
0.26087
false
0.086957
0.130435
0.173913
0.913043
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
954750c7b6d60a3044c8e6dab917ee161df1d4f6
5,976
py
Python
trimet_stop_event_api/models.py
hackoregon/provisional-transportation-api
15a74f82f751e9bc60c00eacbe6f16bb2d8905e0
[ "MIT" ]
2
2018-05-30T18:07:16.000Z
2019-05-06T10:01:54.000Z
trimet_stop_event_api/models.py
hackoregon/provisional-transportation-api
15a74f82f751e9bc60c00eacbe6f16bb2d8905e0
[ "MIT" ]
33
2018-05-24T05:00:58.000Z
2020-06-05T18:16:32.000Z
trimet_stop_event_api/models.py
hackoregon/provisional-transportation-api
15a74f82f751e9bc60c00eacbe6f16bb2d8905e0
[ "MIT" ]
3
2018-05-24T03:38:59.000Z
2019-07-10T18:35:31.000Z
from django.db import models from django.contrib.gis.db import models import django.db.models.options as options options.DEFAULT_NAMES = options.DEFAULT_NAMES + ('in_db',) # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desired behavior. # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free to rename the models, but don't rename db_table values or field names. class DisturbanceStops(models.Model): opd_date_x = models.DateField(blank=True, null=True) vehicle_id_x = models.IntegerField(blank=True, null=True) event_no_x = models.IntegerField(blank=True, null=True) event_no_course = models.IntegerField(blank=True, null=True) meters_x = models.IntegerField(blank=True, null=True) act_dep_time_x = models.IntegerField(blank=True, null=True) nom_dep_time_x = models.IntegerField(blank=True, null=True) nom_end_time = models.IntegerField(blank=True, null=True) act_end_time = models.IntegerField(blank=True, null=True) line_id = models.IntegerField(blank=True, null=True) course_id = models.IntegerField(blank=True, null=True) trip_id = models.IntegerField(blank=True, null=True) pattern_id = models.IntegerField(blank=True, null=True) pattern_direction = models.TextField(blank=True, null=True) trip_type = models.IntegerField(blank=True, null=True) pattern_quality = models.IntegerField(blank=True, null=True) block_id = models.IntegerField(blank=True, null=True) passenger_data = models.IntegerField(blank=True, null=True) time_grp_id = models.IntegerField(blank=True, null=True) trip_code = models.IntegerField(blank=True, null=True) driver_id = models.IntegerField(blank=True, null=True) data_source = models.IntegerField(blank=True, null=True) is_additional_trip = models.TextField(blank=True, null=True) trip_role = models.TextField(blank=True, null=True) trip_subrole = models.TextField(blank=True, null=True) event_no_y = models.IntegerField(blank=True, null=True) event_no_trip = models.IntegerField(blank=True, null=True) event_no_prev = models.IntegerField(blank=True, null=True) opd_date_y = models.DateField(blank=True, null=True) vehicle_id_y = models.IntegerField(blank=True, null=True) meters_y = models.IntegerField(blank=True, null=True) act_arr_time = models.IntegerField(blank=True, null=True) act_dep_time_y = models.IntegerField(blank=True, null=True) point_id = models.IntegerField(blank=True, null=True) stop_pos = models.IntegerField(blank=True, null=True) distance_to_next = models.IntegerField(blank=True, null=True) doors_opening = models.IntegerField(blank=True, null=True) positioning_method = models.IntegerField(blank=True, null=True) stop_type = models.IntegerField(blank=True, null=True) gps_longitude = models.FloatField(blank=True, null=True) gps_latitude = models.FloatField(blank=True, null=True) door_open_time = models.IntegerField(blank=True, null=True) point_role = models.TextField(blank=True, null=True) point_action = models.TextField(blank=True, null=True) plan_status = models.TextField(blank=True, null=True) time_diff = models.IntegerField(blank=True, null=True) time_diff_min = models.FloatField(blank=True, null=True) geom_4326 = models.GeometryField(blank=True, null=True) class Meta: managed = False db_table = 'disturbance_stops' in_db = 'trimet_stop_events' class TotalOnsByHour(models.Model): service_date = models.DateField(blank=True, null=True) service_key = models.TextField(blank=True, null=True) weekday = models.TextField(blank=True, null=True) hour_of_day = models.DecimalField(max_digits=65535, decimal_places=65535, blank=True, null=True) total_ons = models.BigIntegerField(blank=True, null=True) class Meta: managed = False db_table = 'total_ons_by_hour' in_db = 'trimet_stop_events' class TrimetStopEvents(models.Model): service_date = models.DateField(blank=True, null=True) vehicle_number = models.IntegerField(blank=True, null=True) train = models.IntegerField(blank=True, null=True) route_number = models.IntegerField(blank=True, null=True) direction = models.IntegerField(blank=True, null=True) trip_number = models.IntegerField(blank=True, null=True) service_key = models.TextField(blank=True, null=True) stop_time = models.IntegerField(blank=True, null=True) arrive_time = models.IntegerField(blank=True, null=True) seconds_late = models.IntegerField(blank=True, null=True) leave_time = models.IntegerField(blank=True, null=True) dwell = models.IntegerField(blank=True, null=True) location_id = models.IntegerField(blank=True, null=True) door = models.IntegerField(blank=True, null=True) lift = models.IntegerField(blank=True, null=True) ons = models.IntegerField(blank=True, null=True) offs = models.IntegerField(blank=True, null=True) estimated_load = models.IntegerField(blank=True, null=True) train_mileage = models.FloatField(blank=True, null=True) from_location = models.IntegerField(blank=True, null=True) mileage_there = models.FloatField(blank=True, null=True) left_there = models.IntegerField(blank=True, null=True) travel_miles = models.FloatField(blank=True, null=True) travel_seconds = models.IntegerField(blank=True, null=True) x_coordinate = models.FloatField(blank=True, null=True) y_coordinate = models.FloatField(blank=True, null=True) geom_point_4326 = models.GeometryField(blank=True, null=True) class Meta: managed = False db_table = 'trimet_stop_events' in_db = 'trimet_stop_events'
49.38843
104
0.743641
823
5,976
5.250304
0.206561
0.166628
0.240685
0.314742
0.758852
0.746124
0.524647
0.249479
0.15066
0.111548
0
0.003538
0.148594
5,976
120
105
49.8
0.845715
0.075803
0
0.131313
0
0
0.020127
0
0
0
0
0
0
1
0
false
0.010101
0.030303
0
0.89899
0
0
0
0
null
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
954824ac2092e776f593f0f7aa406e89d1893e0d
2,301
py
Python
python/oneflow/framework/blob_trait.py
Zhangchangh/oneflow
4ea3935458cc83dcea0abd88dd613f09c57dc01a
[ "Apache-2.0" ]
1
2021-09-13T02:34:53.000Z
2021-09-13T02:34:53.000Z
python/oneflow/framework/blob_trait.py
Zhangchangh/oneflow
4ea3935458cc83dcea0abd88dd613f09c57dc01a
[ "Apache-2.0" ]
null
null
null
python/oneflow/framework/blob_trait.py
Zhangchangh/oneflow
4ea3935458cc83dcea0abd88dd613f09c57dc01a
[ "Apache-2.0" ]
1
2021-01-17T03:34:39.000Z
2021-01-17T03:34:39.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import oneflow def __add__(self, rhs): return oneflow.math.add(self, rhs) def __radd__(self, lhs): return oneflow.math.add(lhs, self) def __sub__(self, rhs): return oneflow.math.subtract(self, rhs) def __rsub__(self, lhs): return oneflow.math.subtract(lhs, self) def __mul__(self, rhs): return oneflow.math.multiply(self, rhs) def __rmul__(self, lhs): return oneflow.math.multiply(lhs, self) def __truediv__(self, rhs): return oneflow.math.divide(self, rhs) def __rtruediv__(self, lhs): return oneflow.math.divide(lhs, self) def __div__(self, rhs): return oneflow.math.divide(self, rhs) def __mod__(self, rhs): return oneflow.math.mod(self, rhs) def __eq__(self, rhs): return oneflow.math.equal(self, rhs) def __ne__(self, rhs): return oneflow.math.not_equal(self, rhs) def __lt__(self, rhs): return oneflow.math.less(self, rhs) def __le__(self, rhs): return oneflow.math.less_equal(self, rhs) def __gt__(self, rhs): return oneflow.math.greater(self, rhs) def __ge__(self, rhs): return oneflow.math.greater_equal(self, rhs) def RegisterBlobOperatorTraitMethod(blob_class): blob_class.__add__ = __add__ blob_class.__radd__ = __radd__ blob_class.__sub__ = __sub__ blob_class.__rsub__ = __rsub__ blob_class.__mul__ = __mul__ blob_class.__rmul__ = __rmul__ blob_class.__truediv__ = __truediv__ blob_class.__rtruediv__ = __rtruediv__ blob_class.__div__ = __div__ blob_class.__mod__ = __mod__ blob_class.__eq__ = __eq__ blob_class.__ne__ = __ne__ blob_class.__lt__ = __lt__ blob_class.__le__ = __le__ blob_class.__gt__ = __gt__ blob_class.__ge__ = __ge__
23.01
72
0.73229
327
2,301
4.504587
0.299694
0.114053
0.184657
0.162933
0.297352
0.13442
0.054311
0.054311
0.054311
0
0
0.004219
0.17601
2,301
99
73
23.242424
0.772679
0.252499
0
0.04
0
0
0
0
0
0
0
0
0
1
0.34
false
0
0.02
0.32
0.68
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
956f8ddc9fb72f072f98a9f1ab8ff44495b8ba94
1,253
py
Python
pyehr/ehr/services/dbmanager/errors.py
madineniguna/EHR
54ab760ca9a52e5c6c32b861ad6cbce41075d59f
[ "MIT" ]
23
2015-01-29T00:15:05.000Z
2021-01-23T18:21:00.000Z
pyehr/ehr/services/dbmanager/errors.py
madineniguna/EHR
54ab760ca9a52e5c6c32b861ad6cbce41075d59f
[ "MIT" ]
2
2015-07-22T13:58:00.000Z
2017-05-02T15:40:33.000Z
pyehr/ehr/services/dbmanager/errors.py
madineniguna/EHR
54ab760ca9a52e5c6c32b861ad6cbce41075d59f
[ "MIT" ]
7
2015-07-10T13:02:01.000Z
2021-02-19T10:51:52.000Z
class DBManagerNotConnectedError(Exception): pass class CascadeDeleteError(Exception): pass class DuplicatedKeyError(Exception): pass class InvalidRecordTypeError(Exception): pass class InvalidJsonStructureError(Exception): pass class UnknownDriverError(Exception): pass class IndexServiceConnectionError(Exception): pass class ConfigurationError(Exception): pass class PredicateException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class ParseSimpleExpressionException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class MissingOperatorError(Exception): pass class MissingLocationExpressionError(Exception): pass class InvalidFieldError(Exception): pass class OptimisticLockError(Exception): pass class RedundantUpdateError(Exception): pass class RecordRestoreFailedError(Exception): pass class RecordRestoreUnnecessaryError(Exception): pass class MissingRevisionError(Exception): pass class OperationNotAllowedError(Exception): pass class QueryCreationException(Exception): pass
14.402299
48
0.743017
106
1,253
8.632075
0.283019
0.255738
0.334426
0.043716
0.159563
0.159563
0.159563
0.159563
0.159563
0.159563
0
0
0.189944
1,253
86
49
14.569767
0.901478
0
0
0.565217
0
0
0
0
0
0
0
0
0
1
0.086957
false
0.391304
0
0.043478
0.565217
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
4
959db8ad7270bdbf9765a194ef5b8687d60b6366
215
py
Python
setup.py
kingbase/AnomalyDetection
14e6d029adf906791fb5d4a6c06251c69e3ca20e
[ "Apache-2.0" ]
null
null
null
setup.py
kingbase/AnomalyDetection
14e6d029adf906791fb5d4a6c06251c69e3ca20e
[ "Apache-2.0" ]
null
null
null
setup.py
kingbase/AnomalyDetection
14e6d029adf906791fb5d4a6c06251c69e3ca20e
[ "Apache-2.0" ]
null
null
null
from setuptools import setup setup( name="anomaly_detection", packages=["anomaly_detection"], version="0.0.2", description="A python implementation of https://github.com/twitter/AnomalyDetection", )
26.875
89
0.730233
25
215
6.2
0.84
0.206452
0
0
0
0
0
0
0
0
0
0.016216
0.139535
215
8
90
26.875
0.821622
0
0
0
0
0
0.50463
0
0
0
0
0
0
1
0
true
0
0.142857
0
0.142857
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
95b0fa3522565e04a77137206085cf90a051d16b
91
py
Python
hongguan/apps.py
bizeasy17/investtrack
3840948896573f3906a5df80ea80859a492f4133
[ "MIT" ]
null
null
null
hongguan/apps.py
bizeasy17/investtrack
3840948896573f3906a5df80ea80859a492f4133
[ "MIT" ]
3
2021-07-15T13:23:28.000Z
2021-12-09T03:32:16.000Z
hongguan/apps.py
bizeasy17/investtrack
3840948896573f3906a5df80ea80859a492f4133
[ "MIT" ]
1
2021-08-19T14:42:59.000Z
2021-08-19T14:42:59.000Z
from django.apps import AppConfig class HongguanConfig(AppConfig): name = 'hongguan'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
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
95beb45ab5722451f82600668e458038dec3c64c
85
py
Python
submissions-api/app/__init__.py
sanger-tol/tol-submissions
8dbbfaa98b1dfa09a09cb54cf1b2eb9d1dca5331
[ "MIT" ]
null
null
null
submissions-api/app/__init__.py
sanger-tol/tol-submissions
8dbbfaa98b1dfa09a09cb54cf1b2eb9d1dca5331
[ "MIT" ]
null
null
null
submissions-api/app/__init__.py
sanger-tol/tol-submissions
8dbbfaa98b1dfa09a09cb54cf1b2eb9d1dca5331
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2021 Genome Research Ltd. # # SPDX-License-Identifier: MIT
21.25
51
0.776471
10
85
6.6
0.9
0
0
0
0
0
0
0
0
0
0
0.053333
0.117647
85
3
52
28.333333
0.826667
0.917647
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
95c3fea2af385dca87865ea3fe478db698858ac5
428
py
Python
bot/implementation.py
LHGames-2018/DCI4espaces
0b5dfed8b99d07f3f13ef4b9861494155922bc8b
[ "MIT" ]
null
null
null
bot/implementation.py
LHGames-2018/DCI4espaces
0b5dfed8b99d07f3f13ef4b9861494155922bc8b
[ "MIT" ]
null
null
null
bot/implementation.py
LHGames-2018/DCI4espaces
0b5dfed8b99d07f3f13ef4b9861494155922bc8b
[ "MIT" ]
null
null
null
# Insert here all custom implementation for the bot. from helper import * def distance(a, b): return abs(b.x - a.x) + abs(b.y - a.y) def distanceTo(target): return lambda tile: distance(tile.Position, target) def sort_by_distance(tile_list, current_point): return sorted(tile_list, key=distanceTo(current_point)) def get_closest(tile_list, current_point): return sort_by_distance(tile_list, current_point)[0]
30.571429
59
0.75
68
428
4.529412
0.5
0.103896
0.146104
0.194805
0.324675
0.220779
0.220779
0
0
0
0
0.002732
0.14486
428
14
60
30.571429
0.838798
0.116822
0
0
0
0
0
0
0
0
0
0
0
1
0.444444
false
0
0.111111
0.444444
1
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
95c76036ab11d86e6a11c58fd789016ccf8e16ea
120
py
Python
src/typeDefs/transformer.py
nagasudhirpulla/wrldc_codebook
8fbc795074e16e2012b29ae875b99aa721a7f021
[ "MIT" ]
null
null
null
src/typeDefs/transformer.py
nagasudhirpulla/wrldc_codebook
8fbc795074e16e2012b29ae875b99aa721a7f021
[ "MIT" ]
21
2021-01-08T18:03:32.000Z
2021-02-02T16:17:34.000Z
src/typeDefs/transformer.py
nagasudhirpulla/wrldc_codebook
8fbc795074e16e2012b29ae875b99aa721a7f021
[ "MIT" ]
null
null
null
from src.typeDefs.element import IElement class ITransformer(IElement): mvaCapacity: str transformerType: str
17.142857
41
0.775
13
120
7.153846
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.166667
120
6
42
20
0.93
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
95cde57cbcb2721688520306c54a462a8afc4d2d
159
py
Python
clearcache/utils.py
fabianhoward/django-clearcache
fdd544239b80aa1f8f35056bb109284ebd1bc301
[ "MIT" ]
26
2020-01-22T09:01:17.000Z
2022-02-20T16:07:31.000Z
clearcache/utils.py
fabianhoward/django-clearcache
fdd544239b80aa1f8f35056bb109284ebd1bc301
[ "MIT" ]
7
2020-10-15T07:28:41.000Z
2021-04-15T11:58:05.000Z
clearcache/utils.py
fabianhoward/django-clearcache
fdd544239b80aa1f8f35056bb109284ebd1bc301
[ "MIT" ]
10
2020-04-28T15:14:30.000Z
2022-03-21T08:46:20.000Z
from django.conf import settings from django.core.cache import caches def clear_cache(cache_name): assert settings.CACHES caches[cache_name].clear()
19.875
36
0.779874
23
159
5.26087
0.521739
0.165289
0
0
0
0
0
0
0
0
0
0
0.144654
159
7
37
22.714286
0.889706
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
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
2504290b78925d23db34256158ed3138efe3aff6
2,571
py
Python
Project/migrations/0004_comment_reply_project_comments_project_pics_project_tags.py
sabreensalama/Cloud-Devops-Capstone
a42c2bd1a9222f7834f579842308ba584b7f5f6e
[ "MIT" ]
null
null
null
Project/migrations/0004_comment_reply_project_comments_project_pics_project_tags.py
sabreensalama/Cloud-Devops-Capstone
a42c2bd1a9222f7834f579842308ba584b7f5f6e
[ "MIT" ]
14
2020-05-30T12:45:46.000Z
2022-03-12T00:32:54.000Z
Project/migrations/0004_comment_reply_project_comments_project_pics_project_tags.py
sabreensalama/Cloud-Devops-Capstone
a42c2bd1a9222f7834f579842308ba584b7f5f6e
[ "MIT" ]
null
null
null
# Generated by Django 2.2.11 on 2020-03-18 20:48 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('Project', '0003_auto_20200318_2024'), ] operations = [ migrations.CreateModel( name='Project_tags', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('prj_tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tproject', to='Project.Projects')), ], ), migrations.CreateModel( name='Project_pics', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('picture', models.ImageField(upload_to='')), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('prj_pic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='oproject', to='Project.Projects')), ], ), migrations.CreateModel( name='Project_comments', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('prj_comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cproject', to='Project.Projects')), ], ), migrations.CreateModel( name='comment_reply', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('reply', models.CharField(max_length=100)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('comment', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='comment', to='Project.Project_comments')), ], ), ]
46.745455
150
0.600545
265
2,571
5.618868
0.260377
0.042982
0.112827
0.134318
0.752183
0.752183
0.723976
0.65816
0.65816
0.625923
0
0.0215
0.258265
2,571
54
151
47.611111
0.759308
0.017892
0
0.625
1
0
0.133175
0.018629
0
0
0
0
0
1
0
false
0
0.041667
0
0.104167
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
251972302537212feab8486644509d781ed0f9b7
161
py
Python
venv/lib/python2.7/site-packages/nano-1.0a3-py2.7.egg/nano/comments/__init__.py
784134748/kubernetes-install
5df59632c2619632e422948b667fb68eab9ff5be
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/nano-1.0a3-py2.7.egg/nano/comments/__init__.py
784134748/kubernetes-install
5df59632c2619632e422948b667fb68eab9ff5be
[ "MIT" ]
1
2021-04-30T20:41:19.000Z
2021-04-30T20:41:19.000Z
venv/lib/python2.7/site-packages/nano-1.0a3-py2.7.egg/nano/comments/__init__.py
784134748/kubernetes-install
5df59632c2619632e422948b667fb68eab9ff5be
[ "MIT" ]
null
null
null
from django.conf import settings default_app_config = 'nano.comments.apps.NanoCommentsConfig' COMMENT_MAX_LENGTH = getattr(settings,'COMMENT_MAX_LENGTH',3000)
26.833333
64
0.838509
21
161
6.142857
0.809524
0.155039
0.248062
0
0
0
0
0
0
0
0
0.026846
0.074534
161
5
65
32.2
0.838926
0
0
0
0
0
0.341615
0.229814
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
251c8efebe3fc1d684de8db342e32422f2356e08
228
py
Python
persons/admin.py
joselpadronc/CRUD_Persons
efce0fbce4af956fc39dd2b6ef668803ab1373f9
[ "MIT" ]
2
2020-11-14T12:04:39.000Z
2020-11-14T18:39:30.000Z
persons/admin.py
joselpadronc/CRUD_Persons
efce0fbce4af956fc39dd2b6ef668803ab1373f9
[ "MIT" ]
null
null
null
persons/admin.py
joselpadronc/CRUD_Persons
efce0fbce4af956fc39dd2b6ef668803ab1373f9
[ "MIT" ]
1
2021-03-17T09:09:39.000Z
2021-03-17T09:09:39.000Z
from django.contrib import admin from .models import Person # Register your models here. class PersonsAdmin(admin.ModelAdmin): list_display = ['name', 'id_card', 'nationality', 'age'] admin.site.register(Person, PersonsAdmin)
28.5
57
0.77193
29
228
6
0.724138
0
0
0
0
0
0
0
0
0
0
0
0.109649
228
8
58
28.5
0.857143
0.114035
0
0
0
0
0.124378
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
252c1c75bc7ed611f20ff0fe6ab666cb43097d6d
79
py
Python
test/test_positions_of_large_groups.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_positions_of_large_groups.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_positions_of_large_groups.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
solution = PositionsOfLargeGroups() assert X == solution.largeGroupPositions( )
39.5
43
0.810127
6
79
10.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.088608
79
2
43
39.5
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
253bfb3d83e19639ec385e4778e4ad42135dde44
49
py
Python
pleque/__init__.py
kripnerl/pleque
af351c4aa4a40aa5bb5bdaa8083575344c0827e2
[ "MIT" ]
13
2018-11-08T11:59:37.000Z
2022-03-14T20:17:38.000Z
pleque/__init__.py
kripnerl/pleque
af351c4aa4a40aa5bb5bdaa8083575344c0827e2
[ "MIT" ]
18
2018-07-31T12:17:37.000Z
2020-05-19T08:36:42.000Z
pleque/__init__.py
kripnerl/pleque
af351c4aa4a40aa5bb5bdaa8083575344c0827e2
[ "MIT" ]
3
2018-08-26T07:50:04.000Z
2021-12-03T11:44:57.000Z
__version__ = '0.0.5' from pleque.core import *
12.25
25
0.693878
8
49
3.75
0.875
0
0
0
0
0
0
0
0
0
0
0.073171
0.163265
49
3
26
16.333333
0.658537
0
0
0
0
0
0.102041
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
254b143a885ec60ae6b4beb93e974509eadb0c73
809
py
Python
8_kyu/find_difference.py
resulemreaygan/codewars
153c6cc8b285164ff0ebea1c041949be0ebeb925
[ "MIT" ]
null
null
null
8_kyu/find_difference.py
resulemreaygan/codewars
153c6cc8b285164ff0ebea1c041949be0ebeb925
[ "MIT" ]
null
null
null
8_kyu/find_difference.py
resulemreaygan/codewars
153c6cc8b285164ff0ebea1c041949be0ebeb925
[ "MIT" ]
null
null
null
from functools import reduce """ Author: Resul Emre AYGAN """ """ Project Description: Difference of Volumes of Cuboids In this simple exercise, you will create a program that will take two lists of integers, a and b. Each list will consist of 3 positive integers above 0, representing the dimensions of cuboids a and b. You must find the difference of the cuboids' volumes regardless of which is bigger. For example, if the parameters passed are ([2, 2, 3], [5, 4, 1]), the volume of a is 12 and the volume of b is 20. Therefore, the function should return 8. Your function will be tested with pre-made examples as well as random ones. If you can, try writing it in one line of code. """ def find_difference(a, b): return abs(reduce((lambda x, y: x * y), a) - reduce((lambda x, y: x * y), b))
32.36
115
0.723115
144
809
4.055556
0.604167
0.013699
0.017123
0.047945
0.054795
0.054795
0
0
0
0
0
0.020031
0.197775
809
24
116
33.708333
0.879815
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
2559a0bfac7faf6c5b6d9b231a8833074fd7b6fd
388
py
Python
prnu_copy_attack/extract/__init__.py
frassom/prnu-copy-attack
234c9579e423bcd214c00281eb2dfdc4f3273438
[ "MIT" ]
null
null
null
prnu_copy_attack/extract/__init__.py
frassom/prnu-copy-attack
234c9579e423bcd214c00281eb2dfdc4f3273438
[ "MIT" ]
null
null
null
prnu_copy_attack/extract/__init__.py
frassom/prnu-copy-attack
234c9579e423bcd214c00281eb2dfdc4f3273438
[ "MIT" ]
1
2021-07-03T21:36:13.000Z
2021-07-03T21:36:13.000Z
# Copyright (c) 2021 Marco Frassineti # # Licensed under the MIT license: https://opensource.org/licenses/MIT # Permission is granted to use, copy, modify, and redistribute the work. # Full license information available in the project LICENSE file. from .prnu import extract_prnu_single from .prnu import extract_prnu from .prnu import extract_prnu_var from .noise import extract_noise
32.333333
72
0.801546
57
388
5.350877
0.649123
0.170492
0.137705
0.206557
0.245902
0
0
0
0
0
0
0.011976
0.139175
388
11
73
35.272727
0.901198
0.613402
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
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
c2639447056ae6ca9def5af4f1c2dfd220b70424
28
py
Python
data/studio21_generated/introductory/3547/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3547/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3547/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def odd_ones_out(numbers):
14
26
0.785714
5
28
4
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
2
27
14
0.8
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
c265103e37758ccd549693fe714ce9ea21221b2c
336
py
Python
emptytime/notice/admin.py
hyeongonkim/OSS-emptytime
fee91bcf2533ee6ae6220efeb2c87bda4d9d8092
[ "MIT" ]
null
null
null
emptytime/notice/admin.py
hyeongonkim/OSS-emptytime
fee91bcf2533ee6ae6220efeb2c87bda4d9d8092
[ "MIT" ]
2
2021-06-04T23:45:05.000Z
2021-06-10T20:11:57.000Z
emptytime/notice/admin.py
hyeongonkim/OSS-emptytime
fee91bcf2533ee6ae6220efeb2c87bda4d9d8092
[ "MIT" ]
2
2021-04-04T14:23:59.000Z
2021-04-07T07:35:31.000Z
from django.contrib import admin from django.contrib import admin # models에서 BlogData를 import 해옵니다. from .models import TitleData, Mytag, KmTitle, RecentTagLink # 아래의 코드를 입력하면 BlogData를 admin 페이지에서 관리할 수 있습니다. admin.site.register(TitleData) admin.site.register(KmTitle) admin.site.register(RecentTagLink) admin.site.register(Mytag)
25.846154
61
0.809524
46
336
5.913043
0.478261
0.132353
0.25
0.169118
0.205882
0
0
0
0
0
0
0
0.113095
336
12
62
28
0.912752
0.232143
0
0.285714
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c26f5b1dd7c09d72004fc78bc660029d32b4ce53
125
py
Python
cvxpy/reductions/dgp2dcp/atom_canonicalizers/xexp_canon.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/reductions/dgp2dcp/atom_canonicalizers/xexp_canon.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/reductions/dgp2dcp/atom_canonicalizers/xexp_canon.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from cvxpy.atoms.elementwise.exp import exp def xexp_canon(expr, args): del expr return args[0] + exp(args[0]), []
17.857143
43
0.672
20
125
4.15
0.7
0.120482
0
0
0
0
0
0
0
0
0
0.019802
0.192
125
6
44
20.833333
0.80198
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c28dabb7ab3fd0769455ebf47c921a191f4a40fd
1,098
py
Python
src/main/python/programmingtheiot/cda/system/BaseSystemUtilTask.py
xinhaiwang/piot-python-components
8c342aa464ce7c377328c45a3f608cd602a274f5
[ "MIT" ]
null
null
null
src/main/python/programmingtheiot/cda/system/BaseSystemUtilTask.py
xinhaiwang/piot-python-components
8c342aa464ce7c377328c45a3f608cd602a274f5
[ "MIT" ]
null
null
null
src/main/python/programmingtheiot/cda/system/BaseSystemUtilTask.py
xinhaiwang/piot-python-components
8c342aa464ce7c377328c45a3f608cd602a274f5
[ "MIT" ]
null
null
null
import programmingtheiot.common.ConfigConst as ConfigConst import logging from programmingtheiot.data.SensorData import SensorData class BaseSystemUtilTask(): """ Shell representation of class for student implementation. """ def __init__(self, sensorName=ConfigConst.NOT_SET): ### # TODO: fill in the details here self.latestSensorData = None pass def __init__(self, name=ConfigConst.NOT_SET, typeID=ConfigConst.DEFAULT_SENSOR_TYPE): self.name = name self.typeID = typeID def getName(self): return self.name def getTypeID(self): return self.typeID def generateTelemetry(self) -> SensorData: ### # TODO: fill in the details here # # NOTE: Use self._getSystemUtil() to retrieve the value from the sub-class pass def getTelemetryValue(self): val = self._getSystemUtil() logging.info(self.__class__.__name__, val) return val def getTelemetryValue(self) -> float: pass def _getSystemUtil(self) -> float: """ Template method implemented by sub-class. Retrieve the system utilization value as a float. @return float """ pass
20.716981
86
0.733151
133
1,098
5.879699
0.443609
0.026854
0.028133
0.033248
0.061381
0.061381
0
0
0
0
0
0
0.177596
1,098
52
87
21.115385
0.866002
0.274135
0
0.166667
0
0
0
0
0
0
0
0.019231
0
1
0.333333
false
0.166667
0.125
0.083333
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
0
0
1
0
0
4
c29419724451c31efb1c9a8f7aa5c86e0a0fb3c7
237
py
Python
tasknum.py
pivandco/university
61ec6ee1af4469b4ce65987b06d6113e098c4041
[ "Unlicense" ]
2
2021-04-28T08:51:54.000Z
2021-08-14T08:07:15.000Z
tasknum.py
pivandco/university
61ec6ee1af4469b4ce65987b06d6113e098c4041
[ "Unlicense" ]
1
2021-05-17T15:44:27.000Z
2021-05-17T15:44:27.000Z
tasknum.py
pivandco/university
61ec6ee1af4469b4ce65987b06d6113e098c4041
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 variant = int(input("Variant: ")) tasks = int(input("Tasks: ")) print("+12:", variant % tasks, (variant + 12) % tasks) print("+13:", variant % tasks, (variant + 13) % tasks) print("Press Enter to exit...") input()
29.625
54
0.624473
32
237
4.625
0.46875
0.243243
0.256757
0
0
0
0
0
0
0
0
0.044118
0.139241
237
7
55
33.857143
0.681373
0.088608
0
0
0
0
0.213953
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
0
0
1
0
4
6c167f25cfe5f6c7093e8eca87ccdae7047b183b
166
py
Python
end_to_end_tests/golden-record/my_test_api_client/models/different_enum.py
oterrier/openapi-python-client
ca8acdbe34b11584143b78afc130684f0690d5bf
[ "MIT" ]
172
2020-02-15T20:14:16.000Z
2021-06-09T07:09:15.000Z
end_to_end_tests/golden-record/my_test_api_client/models/different_enum.py
oterrier/openapi-python-client
ca8acdbe34b11584143b78afc130684f0690d5bf
[ "MIT" ]
410
2020-02-15T19:39:29.000Z
2021-06-09T19:28:57.000Z
end_to_end_tests/golden-record/my_test_api_client/models/different_enum.py
oterrier/openapi-python-client
ca8acdbe34b11584143b78afc130684f0690d5bf
[ "MIT" ]
38
2020-04-12T09:36:27.000Z
2021-06-11T08:57:07.000Z
from enum import Enum class DifferentEnum(str, Enum): DIFFERENT = "DIFFERENT" OTHER = "OTHER" def __str__(self) -> str: return str(self.value)
16.6
31
0.638554
20
166
5.1
0.6
0.137255
0
0
0
0
0
0
0
0
0
0
0.253012
166
9
32
18.444444
0.822581
0
0
0
0
0
0.084337
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0.166667
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
6c399f02c31a728122564227e88235d78c8567ed
440
py
Python
object_modeler/__init__.py
KeyStorke/ObjectModeler
59ba6ffdaf55502a022c53350ab665527651b238
[ "MIT" ]
6
2017-11-18T14:37:03.000Z
2019-10-26T19:53:17.000Z
object_modeler/__init__.py
KeyStorke/ObjectModeler
59ba6ffdaf55502a022c53350ab665527651b238
[ "MIT" ]
null
null
null
object_modeler/__init__.py
KeyStorke/ObjectModeler
59ba6ffdaf55502a022c53350ab665527651b238
[ "MIT" ]
null
null
null
from object_modeler.common import Field from object_modeler.dict_object_model import GenericDictObjectModel, ObjectModel from object_modeler.slots_object_model import GenericSlotsObjectModel, SlotsObjectModel, SlotsObjectModelKwargs from object_modeler.yaml_model import load_model __all__ = ['GenericSlotsObjectModel', 'GenericDictObjectModel', 'ObjectModel', 'Field', 'SlotsObjectModel', 'SlotsObjectModelKwargs', load_model]
55
111
0.845455
42
440
8.5
0.404762
0.112045
0.190476
0
0
0
0
0
0
0
0
0
0.090909
440
7
112
62.857143
0.8925
0
0
0
0
0
0.225
0.152273
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6c4032df7b361b78d0bf7859bd721697bad8e9be
70
py
Python
treeSet/first.py
vishnupsingh523/java-carnival-learning
76b802542092280cd0e149ecd8eb350e9cdf4960
[ "MIT" ]
1
2021-01-23T04:28:07.000Z
2021-01-23T04:28:07.000Z
treeSet/first.py
vishnupsingh523/java-learning-carnival
c5c78ea068147c5239eedeb3443bd049f654306b
[ "MIT" ]
null
null
null
treeSet/first.py
vishnupsingh523/java-learning-carnival
c5c78ea068147c5239eedeb3443bd049f654306b
[ "MIT" ]
null
null
null
def ipl(team, run): run = 184 print(team, run) ipl('KKR',200)
14
20
0.571429
12
70
3.333333
0.666667
0.35
0
0
0
0
0
0
0
0
0
0.113208
0.242857
70
5
21
14
0.641509
0
0
0
0
0
0.042254
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
6c4f268709408c91c20eb1dd6d371a24ff5780d1
108
py
Python
scripts/slave/recipe_modules/luci_config/__init__.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/luci_config/__init__.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/luci_config/__init__.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
1
2020-07-22T09:16:32.000Z
2020-07-22T09:16:32.000Z
DEPS = [ 'recipe_engine/json', 'recipe_engine/raw_io', 'recipe_engine/step', 'recipe_engine/url', ]
15.428571
25
0.675926
14
108
4.857143
0.571429
0.705882
0
0
0
0
0
0
0
0
0
0
0.148148
108
6
26
18
0.73913
0
0
0
0
0
0.675926
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
6c5fa0ac6a94a69694c1e1603df03ee8045807b1
29
py
Python
DForurm/DForurm/__init__.py
hydrospanner/DForurm
b8e9f4b37db8e2b02462976a11e9cd3fe76984d7
[ "MIT" ]
null
null
null
DForurm/DForurm/__init__.py
hydrospanner/DForurm
b8e9f4b37db8e2b02462976a11e9cd3fe76984d7
[ "MIT" ]
null
null
null
DForurm/DForurm/__init__.py
hydrospanner/DForurm
b8e9f4b37db8e2b02462976a11e9cd3fe76984d7
[ "MIT" ]
null
null
null
""" Package for DForurm. """
7.25
20
0.586207
3
29
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.172414
29
3
21
9.666667
0.708333
0.689655
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
6c62ef0289f9a847d4e00f6a27d323e3a948cfa6
70
py
Python
utils/incremental/__init__.py
samils7/BLG561E-Class-Incremental-Learning
dfdf0388d35c6530dc089b8bf701347e9f75fbc2
[ "MIT" ]
241
2020-10-12T08:53:17.000Z
2022-03-30T02:39:38.000Z
2_LUCIR_+DC/utils_incremental/__init__.py
lywang3081/MRDC
7f8ec5060495560d6e307d89341ccf5598dcb85b
[ "MIT" ]
29
2020-12-21T02:46:57.000Z
2022-03-24T07:51:58.000Z
2_LUCIR_+DC/utils_incremental/__init__.py
lywang3081/MRDC
7f8ec5060495560d6e307d89341ccf5598dcb85b
[ "MIT" ]
40
2020-10-14T07:54:31.000Z
2022-03-29T16:54:38.000Z
#!/usr/bin/env python # coding=utf-8 # for incremental train and eval
17.5
32
0.728571
12
70
4.25
1
0
0
0
0
0
0
0
0
0
0
0.016667
0.142857
70
3
33
23.333333
0.833333
0.914286
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
6c805325747c75b6e8c05301ae7537dfc9a59cca
120
py
Python
04/operators.py
EmanueleRossi/pyPG
853996023c0020671bb1b7c3ecbeb7a5db5888a3
[ "Apache-2.0" ]
null
null
null
04/operators.py
EmanueleRossi/pyPG
853996023c0020671bb1b7c3ecbeb7a5db5888a3
[ "Apache-2.0" ]
null
null
null
04/operators.py
EmanueleRossi/pyPG
853996023c0020671bb1b7c3ecbeb7a5db5888a3
[ "Apache-2.0" ]
null
null
null
add1 = 1 add2 = 'Ciao!' add3 = 98.1 print(type(add1)) print(type(add2)) print(add2 + ' ' + str(add1)) print(float(add1))
17.142857
29
0.633333
20
120
3.8
0.5
0.236842
0
0
0
0
0
0
0
0
0
0.116505
0.141667
120
7
30
17.142857
0.621359
0
0
0
0
0
0.049587
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
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
6c855f7cc0755c45fe7f7fd2252b77de10ff8737
30,376
py
Python
test/variant_caller_transforms/varscan_test.py
umich-brcf-bioinf/Jacquard
ff79fcb2ea67ff3c5e222ef1ed24083deb7c3f7c
[ "Apache-2.0" ]
7
2018-10-04T10:21:23.000Z
2020-11-10T07:18:19.000Z
test/variant_caller_transforms/varscan_test.py
umich-brcf-bioinf/Jacquard
ff79fcb2ea67ff3c5e222ef1ed24083deb7c3f7c
[ "Apache-2.0" ]
5
2019-07-22T06:35:14.000Z
2020-11-03T17:05:33.000Z
test/variant_caller_transforms/varscan_test.py
umich-brcf-bioinf/Jacquard
ff79fcb2ea67ff3c5e222ef1ed24083deb7c3f7c
[ "Apache-2.0" ]
3
2017-03-12T22:37:18.000Z
2020-10-19T13:40:38.000Z
# pylint: disable=line-too-long,too-many-public-methods,too-few-public-methods # pylint: disable=invalid-name,global-statement from __future__ import print_function, absolute_import, division from argparse import Namespace from collections import OrderedDict import re import jacquard.utils.logger import jacquard.utils.utils as utils import jacquard.utils.vcf as vcf from jacquard.variant_caller_transforms import varscan from jacquard.variant_caller_transforms.varscan import _HCTag import test.utils.mock_logger import test.utils.test_case as test_case from test.utils.vcf_test import MockFileReader, MockVcfReader, MockVcfRecord class HCTagTestCase(test_case.JacquardBaseTestCase): def test_add_tag_values_highConfidenceDoesNotChangeFilter(self): record = vcf.VcfRecord("chr1", "42", "ref", "alt", vcf_filter="pass") input_reader = MockFileReader("foo.txt", ["chrom\tposition\tref\tvar", "chr1\t42\tref\tvar", "chr2\t50\tref\tvar"]) expected = "pass" actual = _HCTag(input_reader).add_tag_values(record).filter self.assertEquals(expected, actual) def test_add_tag_values_lowConfidencePassingReplacesFilter(self): record = vcf.VcfRecord("chr1", "30", "ref", "alt", vcf_filter="pass") input_reader = MockFileReader("foo.txt", ["chrom\tposition\tref\tvar", "chr1\t42\tref\tvar", "chr2\t50\tref\tvar"]) tag = _HCTag(input_reader) expected = tag._TAG_ID actual = tag.add_tag_values(record).filter self.assertEquals(expected, actual) class GenotypeTagTestCase(test_case.JacquardBaseTestCase): def test_metaheader(self): self.assertEqual('##FORMAT=<ID={0}GT,Number=1,Type=String,Description="Jacquard genotype (based on GT)">'.format(varscan.JQ_VARSCAN_TAG), varscan._GenotypeTag().metaheader) def test_add_tag_values_addsGTTag(self): vcf_record = MockVcfRecord("chr1", "12", "A", "T", vcf_format="AF:GT", samples=["0.2:0/0", "0.4:0/1"]) tag = varscan._GenotypeTag() tag.add_tag_values(vcf_record) expected_sample1 = OrderedDict(sorted({"AF": "0.2", "GT": "0/0", "{}GT".format(varscan.JQ_VARSCAN_TAG): "0/0"}.items())) self.assertEquals(expected_sample1, vcf_record.sample_tag_values[0]) expected_sample2 = OrderedDict(sorted({"AF": "0.4", "GT": "0/1", "{}GT".format(varscan.JQ_VARSCAN_TAG): "0/1"}.items())) self.assertEquals(expected_sample2, vcf_record.sample_tag_values[1]) def test_add_tag_values_missingGTTag(self): vcf_record = MockVcfRecord("chr1", "12", "A", "T", vcf_format="AF", samples=["0.2", "0.4"]) tag = varscan._GenotypeTag() tag.add_tag_values(vcf_record) expected_sample1 = OrderedDict(sorted({"AF": "0.2"}.items())) self.assertEquals(expected_sample1, vcf_record.sample_tag_values[0]) expected_sample2 = OrderedDict(sorted({"AF": "0.4"}.items())) self.assertEquals(expected_sample2, vcf_record.sample_tag_values[1]) class AlleleFreqTagTestCase(test_case.JacquardBaseTestCase): def test_metaheader(self): self.assertEqual('##FORMAT=<ID={0}AF,Number=A,Type=Float,Description="Jacquard allele frequency for VarScan: Decimal allele frequency rounded to 4 digits (based on FREQ)">'.format(varscan.JQ_VARSCAN_TAG), varscan._AlleleFreqTag().metaheader) def test_format_missingAFTag(self): tag = varscan._AlleleFreqTag() line = "CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|F1:F2:F3|SA.1:SA.2:SA.3|SB.1:SB.2:SB.3\n".replace('|', "\t") originalVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(originalVcfRecord.text(), processedVcfRecord.text()) def test_format_presentAFTag(self): tag = varscan._AlleleFreqTag() line = self.entab("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|" "FREQ:F2:F3|" "56.7%:SA.2:SA.3|" "83.4%:SB.2:SB.3\n") expected = self.entab(("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|" "FREQ:F2:F3:{0}AF|" "56.7%:SA.2:SA.3:0.567|" "83.4%:SB.2:SB.3:0.834\n") ).format(varscan.JQ_VARSCAN_TAG) processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) def test_format_multAlt(self): tag = varscan._AlleleFreqTag() line = self.entab("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|" "FREQ:F2:F3|" "56.7%,41%:SA.2:SA.3|" "83.4%,23%:SB.2:SB.3\n") expected = self.entab(("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|" "FREQ:F2:F3:{0}AF|" "56.7%,41%:SA.2:SA.3:0.567,0.41|" "83.4%,23%:SB.2:SB.3:0.834,0.23\n") ).format(varscan.JQ_VARSCAN_TAG) processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) class DepthTagTestCase(test_case.JacquardBaseTestCase): def test_metaheader(self): self.assertEqual('##FORMAT=<ID={0}DP,Number=1,Type=Integer,Description="Jacquard depth for VarScan (based on DP)">'.format(varscan.JQ_VARSCAN_TAG), varscan._DepthTag().metaheader) def test_format_missingDPTag(self): tag = varscan._DepthTag() line = "CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|F1:F2:F3|SA.1:SA.2:SA.3|SB.1:SB.2:SB.3\n".replace('|', "\t") originalVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(originalVcfRecord.text(), processedVcfRecord.text()) def test_format_presentDPTag(self): tag = varscan._DepthTag() line = "CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|DP:F2:F3|2:SA.2:SA.3|4:SB.2:SB.3\n".replace('|', "\t") expected = "CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|DP:F2:F3:{0}DP|2:SA.2:SA.3:2|4:SB.2:SB.3:4\n".format(varscan.JQ_VARSCAN_TAG).replace('|', "\t") processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) class SomaticTagTestCase(test_case.JacquardBaseTestCase): def test_metaheader(self): self.assertEqual('##FORMAT=<ID={0}HC_SOM,Number=1,Type=Integer,Description="Jacquard somatic status for VarScan: 0=non-somatic,1=somatic (based on SOMATIC info tag and if sample is TUMOR)">'.format(varscan.JQ_VARSCAN_TAG), varscan._SomaticTag().metaheader) def test_format_missingSSTag(self): tag = varscan._SomaticTag() line = "CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|F1:F2:F3|SA.1:SA.2:SA.3|SB.1:SB.2:SB.3\n".replace('|', "\t") expected = ("CHROM|POS|ID|REF|ALT|QUAL|FILTER|INFO|F1:F2:F3:{0}HC_SOM|SA.1:SA.2:SA.3:0|SB.1:SB.2:SB.3:0\n").format(varscan.JQ_VARSCAN_TAG).replace('|', "\t") processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) def test_format_presentSSTag_withHC(self): tag = varscan._SomaticTag() line = "CHROM|POS|ID|REF|ALT|QUAL|PASS|SS=2|F1:F2:F3|2:SA.2:SA.3|SB.1:SB.2:SB.3\n".replace('|', "\t") expected = "CHROM|POS|ID|REF|ALT|QUAL|PASS|SS=2|F1:F2:F3:{0}HC_SOM|2:SA.2:SA.3:0|SB.1:SB.2:SB.3:1\n".format(varscan.JQ_VARSCAN_TAG).replace('|', "\t") processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) def test_format_presentSSTag_withoutHCManyFilters(self): tag = varscan._SomaticTag() line = "CHROM|POS|ID|REF|ALT|QUAL|{0};foo|SS=2|F1:F2:F3|2:SA.2:SA.3|SB.1:SB.2:SB.3\n".format(varscan._HCTag._TAG_ID).replace('|', "\t") expected = "CHROM|POS|ID|REF|ALT|QUAL|{0};foo|SS=2|F1:F2:F3:{1}HC_SOM|2:SA.2:SA.3:0|SB.1:SB.2:SB.3:0\n".format(varscan._HCTag._TAG_ID, varscan.JQ_VARSCAN_TAG).replace('|', "\t") processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) def test_format_presentSSTag_withoutHC(self): tag = varscan._SomaticTag() line = "CHROM|POS|ID|REF|ALT|QUAL|{0}|SS=2|F1:F2:F3|2:SA.2:SA.3|SB.1:SB.2:SB.3\n".replace('|', "\t").format(varscan._HCTag._TAG_ID) expected = "CHROM|POS|ID|REF|ALT|QUAL|{0}|SS=2|F1:F2:F3:{1}HC_SOM|2:SA.2:SA.3:0|SB.1:SB.2:SB.3:0\n".format(varscan._HCTag._TAG_ID, varscan.JQ_VARSCAN_TAG).replace('|', "\t") processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) def test_format_SSTag_notEqual2(self): tag = varscan._SomaticTag() line = "CHROM|POS|ID|REF|ALT|QUAL|PASS|SS=5|F1:F2:F3|2:SA.2:SA.3|SB.1:SB.2:SB.3\n".replace('|', "\t") expected = "CHROM|POS|ID|REF|ALT|QUAL|PASS|SS=5|F1:F2:F3:{0}HC_SOM|2:SA.2:SA.3:0|SB.1:SB.2:SB.3:0\n".format(varscan.JQ_VARSCAN_TAG).replace('|', "\t") processedVcfRecord = vcf.VcfRecord.parse_record(line, ["SA", "SB"]) tag.add_tag_values(processedVcfRecord) self.assertEquals(expected, processedVcfRecord.text()) class VarscanTestCase(test_case.JacquardBaseTestCase): def setUp(self): super(VarscanTestCase, self).setUp() self.caller = varscan.Varscan() varscan.logger = test.utils.mock_logger def tearDown(self): test.utils.mock_logger.reset() varscan.logger = jacquard.utils.logger super(VarscanTestCase, self).tearDown() @staticmethod def append_hc_files(readers, file1="snp.somatic.hc.fpfilter.pass", file2="indel.somatic.hc.fpfilter.pass", content1=None, content2=None): if not content1: content1 = [] if not content2: content2 = [] readers.append(MockFileReader(file1, content1)) readers.append(MockFileReader(file2, content2)) @staticmethod def _get_tag_class_names(vcf_reader): return [tag.__class__.__name__ for tag in vcf_reader.tags] def test_validate_vcf_hc_pairs(self): self.caller._validate_vcf_hc_pairs([(MockFileReader("A.vcf"), MockFileReader("A.hc")), (MockFileReader("B.vcf"), MockFileReader("B.hc"))]) self.ok() def test_validate_vcf_hc_pairs_okIfNoHcFiles(self): self.caller._validate_vcf_hc_pairs([(MockFileReader("A.vcf"), None), (MockFileReader("B.vcf"), None)]) self.ok() def test_validate_vcf_hc_pairs_raisesIfMissingHcFiles(self): vcf_hc_pairs = [(MockFileReader("A.vcf"), MockFileReader("A.hc")), (MockFileReader("B.vcf"), None)] self.assertRaisesRegexp(utils.UsageError, r"The VarScan VCF file \[B.vcf\] has no matching high-confidence file.", self.caller._validate_vcf_hc_pairs, vcf_hc_pairs) def test_validate_vcf_hc_pairs_raisesIfNoMissingVcfFiles(self): vcf_hc_pairs = [(MockFileReader("A.vcf"), MockFileReader("A.hc")), (None, MockFileReader("B.hc"))] self.assertRaisesRegexp(utils.UsageError, r"The VarScan high-confidence file \[B.hc\] has no matching VCF file.", self.caller._validate_vcf_hc_pairs, vcf_hc_pairs) def test_get_hc_file_pattern(self): args = Namespace(varscan_hc_filter_file_regex="foo.*") compiled_regex = varscan.Varscan._get_hc_file_pattern(args) self.assertEquals("foo.*", compiled_regex.pattern) def test_get_hc_file_pattern_invalidRegex(self): args = Namespace(varscan_hc_filter_file_regex="*foo") self.assertRaisesRegexp(utils.UsageError, r"The specified regex \[\*foo\] could not be compiled. Review inputs and try again", varscan.Varscan._get_hc_file_pattern, args) def test_validate_filter_file_emptyFile(self): file_reader = MockFileReader("p1.hc.fpfilter.pass", []) caller = varscan.Varscan() valid_reader = caller._validate_filter_file(file_reader) self.assertEquals("p1.hc.fpfilter.pass", valid_reader.file_name) def test_validate_filter_file_validFile(self): file_reader = MockFileReader("p1.hc.fpfilter.pass", ["chrom\tposition"]) caller = varscan.Varscan() valid_reader = caller._validate_filter_file(file_reader) self.assertEquals("p1.hc.fpfilter.pass", valid_reader.file_name) def test_validate_filter_file_invalidFile(self): file_reader = MockFileReader("p1.hc.fpfilter.pass", ["chrom\tpos\tref"]) caller = varscan.Varscan() valid_reader = caller._validate_filter_file(file_reader) self.assertEquals(None, valid_reader) def test_claim_multiplePatients(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=VarScan2", "#chrom", record1] content2 = ["chrom\tposition", "1\t23"] reader1 = MockFileReader("p2.fileA.vcf", content1) reader2 = MockFileReader("p2.fileA.Somatic.hc.fpfilter.pass", content2) reader3 = MockFileReader("p3.fileA.Somatic.hc.fpfilter.pass", content2) reader4 = MockFileReader("p3.fileA.vcf", content1) file_readers = [reader1, reader2, reader3, reader4] caller = varscan.Varscan() dummy, vcf_readers = caller.claim(file_readers) self.assertEquals(2, len(vcf_readers)) self.assertIsInstance(vcf_readers[0], varscan._VarscanVcfReader) self.assertEquals("p2.fileA.vcf", vcf_readers[0]._vcf_reader.file_name) self.assertIn("_HCTag", self._get_tag_class_names(vcf_readers[0])) self.assertIn("_HCTag", self._get_tag_class_names(vcf_readers[1])) self.assertEquals(reader1.file_name, vcf_readers[0]._vcf_reader.file_name) def test_claim_varscanVcfOnly(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("fileA.snp.vcf", content1) reader2 = MockFileReader("fileB.snp.vcf", content1) file_readers = [reader1, reader2] caller = varscan.Varscan() unrecognized_readers, vcf_readers = caller.claim(file_readers) self.assertEquals(0, len(unrecognized_readers)) self.assertEquals([], unrecognized_readers) self.assertEquals(2, len(vcf_readers)) self.assertIsInstance(vcf_readers[0], varscan._VarscanVcfReader) self.assertEquals(reader1.file_name, vcf_readers[0]._vcf_reader.file_name) def test_claim_vcfAndFilterFile(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = [self.entab("chrom|position|ref|var"), record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.indel.Somatic.hc.fpfilter.pass", content1) reader2 = MockFileReader("patientA.indel.vcf", content2) reader3 = MockFileReader("patientA.snp.Somatic.hc.fpfilter.pass", content1) reader4 = MockFileReader("patientA.snp.vcf", content2) reader5 = MockFileReader("patientA.readme", ["foo"]) file_readers = [reader1, reader2, reader3, reader4, reader5] caller = varscan.Varscan() unrecognized_readers, vcf_readers = caller.claim(file_readers) self.assertEquals(1, len(unrecognized_readers)) self.assertEquals([reader5], unrecognized_readers) self.assertEquals(2, len(vcf_readers)) self.assertIsInstance(vcf_readers[0], varscan._VarscanVcfReader) self.assertEquals(reader2.file_name, vcf_readers[0]._vcf_reader.file_name) self.assertEquals(reader1.file_name, vcf_readers[0]._som_hc_file_reader.file_name) self.assertIsInstance(vcf_readers[1], varscan._VarscanVcfReader) self.assertEquals(reader4.file_name, vcf_readers[1]._vcf_reader.file_name) self.assertEquals(reader3.file_name, vcf_readers[1]._som_hc_file_reader.file_name) def test_claim_vcfAndFilterFileNameGiven(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = [self.entab("chrom|position|ref|var"), record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.indel.Somatic.foo.bar", content1) reader2 = MockFileReader("patientA.indel.vcf", content2) reader3 = MockFileReader("patientA.snp.Somatic.foo.bar", content1) reader4 = MockFileReader("patientA.snp.vcf", content2) reader5 = MockFileReader("patientA.readme", ["foo"]) file_readers = [reader1, reader2, reader3, reader4, reader5] caller = varscan.Varscan() caller.hc_file_pattern = re.compile("foo.bar$") unrecognized_readers, vcf_readers = caller.claim(file_readers) self.assertEquals(1, len(unrecognized_readers)) self.assertEquals([reader5], unrecognized_readers) self.assertEquals(2, len(vcf_readers)) self.assertIsInstance(vcf_readers[0], varscan._VarscanVcfReader) self.assertEquals(reader2.file_name, vcf_readers[0]._vcf_reader.file_name) self.assertEquals(reader1.file_name, vcf_readers[0]._som_hc_file_reader.file_name) self.assertIsInstance(vcf_readers[1], varscan._VarscanVcfReader) self.assertEquals(reader4.file_name, vcf_readers[1]._vcf_reader.file_name) self.assertEquals(reader3.file_name, vcf_readers[1]._som_hc_file_reader.file_name) def test_claim_vcfAndInvalidFilterFile(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = [self.entab("chrom|pos|ref|alt"), record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.indel.Somatic.hc.fpfilter.pass", content1) reader2 = MockFileReader("patientA.indel.vcf", content2) reader3 = MockFileReader("patientA.snp.Somatic.hc.fpfilter.pass", content1) reader4 = MockFileReader("patientA.snp.vcf", content2) reader5 = MockFileReader("patientA.readme", ["foo"]) file_readers = [reader1, reader2, reader3, reader4, reader5] caller = varscan.Varscan() self.assertRaisesRegexp(utils.JQException, r"The \[2\] input files \[.*\] match high-confidence file names, but the file header is invalid or missing. Review inputs and try again.", caller.claim, file_readers) def test_claim_vcfAnd6InvalidFilterFiles(self): #pylint: disable=too-many-locals record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = [self.entab("chrom|pos|ref|alt"), record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.snp.Somatic.hc.fpfilter.pass", content1) reader2 = MockFileReader("patientA.snp.vcf", content2) reader3 = MockFileReader("patientB.snp.Somatic.hc.fpfilter.pass", content1) reader4 = MockFileReader("patientB.snp.vcf", content2) reader5 = MockFileReader("patientC.snp.Somatic.hc.fpfilter.pass", content1) reader6 = MockFileReader("patientC.snp.vcf", content2) reader7 = MockFileReader("patientD.snp.Somatic.hc.fpfilter.pass", content1) reader8 = MockFileReader("patientD.snp.vcf", content2) reader9 = MockFileReader("patientE.snp.Somatic.hc.fpfilter.pass", content1) reader10 = MockFileReader("patientE.snp.vcf", content2) reader11 = MockFileReader("patientF.snp.Somatic.hc.fpfilter.pass", content1) reader12 = MockFileReader("patientF.snp.vcf", content2) file_readers = [reader1, reader2, reader3, reader4, reader5, reader6, reader7, reader8, reader9, reader10, reader11, reader12] caller = varscan.Varscan() self.assertRaisesRegexp(utils.JQException, r"The \[6\] input files \[.*\(1 file\(s\) omitted\)\] match high-confidence file names, but the file header is invalid or missing. Review inputs and try again.", caller.claim, file_readers) def test_claim_filterRegexDoesNotMatch(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.vcf", content1) file_readers = [reader1] caller = varscan.Varscan() caller.hc_file_pattern = re.compile("foo.bar$") self.assertRaisesRegexp(utils.UsageError, r"The VarScan high-confidence filename regex \[foo\.bar\$\] didn't match any files in the input directory. The beginning of the high-confidence filename must exactly match a VCF filename up to the .vcf extension. Review inputs/command options and try again.", caller.claim, file_readers) def test_claim_hcHasNoMatchingVCF(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = [self.entab("chrom|position"), record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.snp.vcf", content2) reader2 = MockFileReader("patientA.snp.Somatic.hc.fpfilter.pass", content1) reader3 = MockFileReader("patientB.snp.Somatic.hc.fpfilter.pass", content1) file_readers = [reader1, reader2, reader3] caller = varscan.Varscan() self.assertRaisesRegexp(utils.JQException, r"The VarScan high-confidence file \[patientB.snp.Somatic.hc.fpfilter.pass\] has no matching VCF file.", caller.claim, file_readers) def test_claim_VCFHasNoMatchingHc(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = [self.entab("chrom|position"), record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("patientA.vcf", content2) reader2 = MockFileReader("patientB.vcf", content2) reader3 = MockFileReader("patientB.snp.Somatic.hc.fpfilter.pass", content1) file_readers = [reader1, reader2, reader3] caller = varscan.Varscan() self.assertRaisesRegexp(utils.UsageError, r"The VarScan VCF file \[patientA.vcf\] has no matching high-confidence file.", caller.claim, file_readers) def test_claim_ignoresUnpairedNonVcfFiles(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("fileA.txt", content1) file_readers = [reader1] caller = varscan.Varscan() unrecognized_readers, vcf_readers = caller.claim(file_readers) self.assertEquals(1, len(unrecognized_readers)) self.assertEquals([reader1], unrecognized_readers) self.assertEquals(0, len(vcf_readers)) def test_claim_ignoresOtherCallers(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=Foo", "#chrom", record1] content2 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("fileA.txt", content1) reader2 = MockFileReader("fileA.vcf", content2) file_readers = [reader1, reader2] caller = varscan.Varscan() unrecognized_readers, vcf_readers = caller.claim(file_readers) self.assertEquals(1, len(unrecognized_readers)) self.assertEquals([reader1], unrecognized_readers) self.assertEquals(1, len(vcf_readers)) def test_claim_mismatchingSnpIndelFiles(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("fileA.snp.vcf", content1) reader2 = MockFileReader("fileA.indel.vcf", content1) reader3 = MockFileReader("fileB.indel.vcf", content1) file_readers = [reader1, reader2, reader3] caller = varscan.Varscan() self.assertRaisesRegexp(utils.JQException, r"Some Varscan VCFs were missing either a snp or indel file. Review inputs/command options and try again.", caller.claim, file_readers) actual_log_errors = test.utils.mock_logger.messages["ERROR"] expected_log_errors = ["VarScan VCF [fileB.indel] has no snp file."] self.assertEquals(expected_log_errors, actual_log_errors) def test_claim_allSnpOrIndelOkay(self): record1 = "chr1\t.\t.\t.\t.\t.\t.\t.\t." content1 = ["##foo", "##source=VarScan2", "#chrom", record1] reader1 = MockFileReader("fileA.indel.vcf", content1) reader2 = MockFileReader("fileB.indel.vcf", content1) file_readers = [reader1, reader2] caller = varscan.Varscan() unrecognized_readers, vcf_readers = caller.claim(file_readers) self.assertEquals(0, len(unrecognized_readers)) self.assertEquals(2, len(vcf_readers)) class VarscanVcfReaderTestCase(test_case.JacquardBaseTestCase): def test_metaheaders(self): vcf_reader = MockVcfReader(metaheaders=["##foo", "##source=VarScan2"]) varscan_vcf_reader = varscan._VarscanVcfReader(vcf_reader) metaheaders = varscan_vcf_reader.metaheaders self.assertIn(varscan._AlleleFreqTag().metaheader, metaheaders) self.assertIn(varscan._DepthTag().metaheader, metaheaders) self.assertIn(varscan._SomaticTag().metaheader, metaheaders) self.assertIn("##foo", metaheaders) self.assertIn("##source=VarScan2", metaheaders) self.assertIn("##jacquard.translate.caller=VarScan", metaheaders) def test_vcf_records_newTagsPresent(self): record1 = vcf.VcfRecord(chrom="chr1", pos="21", ref="A", alt="G", sample_tag_values={"sampleA": {"DP": "45"}, "sampleB": {"DP": "67"}}) record2 = vcf.VcfRecord(chrom="chr1", pos="22", ref="A", alt="G", sample_tag_values={"sampleA": {"FREQ": "46%"}, "sampleB": {"FREQ": "68%"}}) vcf_reader = MockVcfReader(records=[record1, record2]) varscan_vcf_reader = varscan._VarscanVcfReader(vcf_reader) vcf_records = [record for record in varscan_vcf_reader.vcf_records()] self.assertEquals(2, len(vcf_records)) self.assertIn("DP", vcf_records[0].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "DP", vcf_records[0].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "HC_SOM", vcf_records[0].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "CALLER_REPORTED", vcf_records[0].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "CALLER_PASSED", vcf_records[0].format_tags) self.assertIn("FREQ", vcf_records[1].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "AF", vcf_records[1].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "HC_SOM", vcf_records[1].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "CALLER_REPORTED", vcf_records[1].format_tags) self.assertIn(varscan.JQ_VARSCAN_TAG + "CALLER_PASSED", vcf_records[1].format_tags) def test_vcf_records_SomHcFileSNP(self): record1 = vcf.VcfRecord(chrom="chr1", pos="21", ref="A", alt="G", vcf_filter="PASS") record2 = vcf.VcfRecord(chrom="chr1", pos="22", ref="A", alt="T", vcf_filter="PASS") vcf_reader = MockVcfReader(records=[record1, record2]) content1 = ["chrom\tposition", "chr1\t21", "chr1\t22"] somatic_hc_reader = MockFileReader("fileA.Somatic.hc.fpfilter.pass", content1) varscan_vcf_reader = varscan._VarscanVcfReader(vcf_reader, somatic_hc_reader) vcf_records = [record for record in varscan_vcf_reader.vcf_records()] self.assertEquals(2, len(vcf_records)) self.assertIn("PASS", vcf_records[0].filter) self.assertIn("PASS", vcf_records[1].filter) def test_open_and_close(self): vcf_reader = MockVcfReader(metaheaders=["##foo", "##source=VarScan2"]) varscan_vcf_reader = varscan._VarscanVcfReader(vcf_reader) varscan_vcf_reader.open() varscan_vcf_reader.close() self.assertTrue(varscan_vcf_reader.open) self.assertTrue(varscan_vcf_reader.close)
52.736111
291
0.630366
3,572
30,376
5.18813
0.092665
0.009821
0.012627
0.01403
0.790471
0.747356
0.701166
0.675858
0.652385
0.614397
0
0.028482
0.232519
30,376
575
292
52.827826
0.766439
0.005037
0
0.522822
0
0.051867
0.199378
0.096231
0
0
0
0
0.192946
1
0.099585
false
0.078838
0.024896
0.002075
0.141079
0.002075
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
665caf05ab4fe084f03d9a0e81fbbea9f94d004b
167
py
Python
aula3/aula3.py
higornobrega/Python_3_Basico_ao_Avancado
d056dffa0954fa33a767c58ce2a7a15f7435d047
[ "MIT" ]
null
null
null
aula3/aula3.py
higornobrega/Python_3_Basico_ao_Avancado
d056dffa0954fa33a767c58ce2a7a15f7435d047
[ "MIT" ]
null
null
null
aula3/aula3.py
higornobrega/Python_3_Basico_ao_Avancado
d056dffa0954fa33a767c58ce2a7a15f7435d047
[ "MIT" ]
null
null
null
#Strings (texto) e aspas em Python #r antes da string informa para o compilador não execultar nada dentro da string #string, comenário_ print(r'Esse é meu \n (str).')
33.4
80
0.754491
29
167
4.310345
0.862069
0.128
0
0
0
0
0
0
0
0
0
0
0.161677
167
5
81
33.4
0.892857
0.778443
0
0
0
0
0.571429
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
666b7274c5fb9f0072b76c756a9e873a2e7833cb
7,075
py
Python
dataformatter.py
stefan863/netflow-parser
e49eca86de10865a2204e72c57522e6264da0baf
[ "MIT" ]
null
null
null
dataformatter.py
stefan863/netflow-parser
e49eca86de10865a2204e72c57522e6264da0baf
[ "MIT" ]
null
null
null
dataformatter.py
stefan863/netflow-parser
e49eca86de10865a2204e72c57522e6264da0baf
[ "MIT" ]
null
null
null
#!/usr/bin/env python import csv import sys import os import argparse def sortOnPorts(INFILE): PORTLIST = [102, 110, 143, 1911, 2000, 21, 22, 23, 2323, 25, 443, 445, 465, 502, 7547, 80 , 8080, 8888, 993, 995] foundPorts = [] filename = INFILE.name with open(filename, newline='') as f: reader = csv.reader(f) try: for row in reader: row[0] = row[0].strip() row[1] = row[1].strip() portnr = float(row[1]) #float because of the outputfile containing 0.0 as a port if portnr in PORTLIST: if portnr not in foundPorts: foundPorts.append(int(portnr)) with open('/tmp/' + row[1] + '.csv', 'a', newline='') as csvfile: #files saved as /tmp/PORTNR.csv writer = csv.writer(csvfile, delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL) writer.writerow([row[0]]) except: pass foundPorts.sort() return foundPorts def portToScanType(argument): switcher = { 102: '/tmp/102.csv | zgrab --senders=2500 --timeout=10 --port=102 --s7 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/102-s7-szl-full_ipv4.json;', 110: '/tmp/110.csv | zgrab --senders=2500 --timeout=5 --port=110 --starttls --banners --pop3 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/110-pop3-starttls-full_ipv4.json;', 143: '/tmp/143.csv | zgrab --senders=2500 --timeout=5 --port=143 --starttls --banners --imap --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/143-imap-starttls-full_ipv4.json;', 1911: '/tmp/1911.csv | zgrab --senders=2500 --timeout=5 --port=1911 --fox --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/1911-fox-device_id-full_ipv4.json;', 2000: '/tmp/2000.csv | zgrab --senders=2500 --timeout=15 --port=20000 --dnp3 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/20000-dnp3-status-full_ipv4.json;', 21: '/tmp/21.csv | zgrab --senders=2500 --timeout=5 --port=21 --banners --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/21-ftp-banner-full_ipv4.json;', 22: '/tmp/22.csv | zgrab --senders=2500 --timeout=5 --port=22 --xssh --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/22-ssh-v2-full_ipv4.json;', 23: '/tmp/23.csv | zgrab --senders=2500 --timeout=5 --port=23 --telnet --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/23-telnet-banner-full_ipv4.json;', 2323: '/tmp/2323.csv | zgrab --senders=2500 --timeout=5 --port=2323 --telnet --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/2323-telnet-banner-full_ipv4.json;', 25: '/tmp/25.csv | zgrab --senders=2500 --timeout=5 --port=25 --starttls --banners --smtp --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/25-smtp-starttls-full_ipv4.json;', 443: '/tmp/443.csv | zgrab --senders=2500 --timeout=5 --port=443 --tls --export-dhe-ciphers --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/443-https-dhe_export-full_ipv4.json; /tmp/443_1.csv | zgrab --senders=2500 --timeout=5 --port=443 --tls --dhe-ciphers --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/443-https-dhe-full_ipv4.json; /tmp/443.csv | zgrab --senders=2500 --timeout=5 --port=443 --tls --export-ciphers --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/443-https-rsa_export-full_ipv4.json; /tmp/443.csv | zgrab --senders=2500 --timeout=5 --port=443 --tls --heartbleed --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/443-https-heartbleed-full_ipv4.json; /tmp/443.csv | zgrab --senders=2500 --timeout=5 --ca-file=/etc/nss-root-store.pem --port=443 --tls --chrome-ciphers --tls-session-ticket --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/443-certificates-and-chrome-ciphers.json; /tmp/443.csv | zgrab --senders=2500 --timeout=5 --tls-version=sslv3 --port=443 --tls --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/443-https-ssl_3-full_ipv4.json;', 445: '/tmp/445.csv | zgrab --senders=2500 --timeout=5 --port=445 --smb --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/445-smb-banner-full_ipv4.json;', 465: '/tmp/465.csv | zgrab --senders=2500 --timeout=5 --port=465 --tls --banners --smtp --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/465-smtps-tls-full_ipv4.json;', 502: '/tmp/502.csv | zgrab --senders=2500 --timeout=5 --port=502 --modbus --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/502-modbus-device_id-full_ipv4.json;', 7547: '/tmp/7547.csv | zgrab --http-max-size=64--http=/ --senders=2500 --timeout=5 --port=7547 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/7547-cwmp-get-full_ipv4.json;', 80: '/tmp/80.csv | zgrab --http-max-size=64 --http=/ --http-max-redirects=5 --port=80 --timeout=5 --follow-localhost-redirects=False --senders=1000 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/80-http-get-full_ipv4.json;', 8080: '/tmp/8080.csv | zgrab --http-max-size=64 --http=/ --http-max-redirects=5 --port=8080 --timeout=5 --follow-localhost-redirects=False --senders=1000 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/8080-http-get-full_ipv4.json;', 8888: '/tmp/8888.csv | zgrab --http-max-size=64--http=/ --http-max-redirects=5 --port=8888 --timeout=5 --follow-localhost-redirects=False --senders=1000 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/8888-http-get-full_ipv4.json;', 993: '/tmp/993.csv | zgrab --senders=2500 --timeout=5 --port=993 --tls --banners --imap --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/993-imaps-tls-full_ipv4.json; sudo zmap -p 993 --whitelist-file=/tmp/993.csv | sudo ztee /home/ubuntu/results-netflow/$(date +%Y%m%d)/993_2.csv | zgrab --senders=2500 --timeout=5 --port=993 --tls --export-dhe-ciphers --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/993-imaps-dhe_export-full_ipv4.json;', 995: '/tmp/995.csv | zgrab --senders=2500 --timeout=5 --port=995 --tls --banners --pop3 --output-file=/home/ubuntu/scanresults-netflow/$(date +%Y%m%d)/995-pop3s-tls-full_ipv4.json;', } return switcher.get(argument, "error") def initScan(portlist): os.system('mkdir scanresults-netflow/$(date +%Y%m%d)/') os.system('mkdir results-netflow/$(date +%Y%m%d)/') os.system('ulimit -n 4096;') for port in portlist: os.system(portToScanType(port)) def main(arguments): parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('infile', help="Input file", type=argparse.FileType('r')) args = parser.parse_args(arguments) INFILE = args.infile portlist = sortOnPorts(INFILE) initScan(portlist) if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
79.494382
1,157
0.652297
1,043
7,075
4.377756
0.182167
0.069864
0.076216
0.082567
0.602278
0.549496
0.533728
0.437144
0.437144
0.405388
0
0.093108
0.146855
7,075
88
1,158
80.397727
0.663353
0.014982
0
0
0
0.307692
0.713609
0.401952
0
0
0
0
0
1
0.061538
false
0.015385
0.061538
0
0.153846
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
666f27e408e7292c3e8736b73b206d482dd6ddc0
204
py
Python
py2/test/all_tests.py
greenarr0w/yass
0f17de682666096bc0294430aa69d1822e661cd8
[ "BSD-3-Clause" ]
null
null
null
py2/test/all_tests.py
greenarr0w/yass
0f17de682666096bc0294430aa69d1822e661cd8
[ "BSD-3-Clause" ]
null
null
null
py2/test/all_tests.py
greenarr0w/yass
0f17de682666096bc0294430aa69d1822e661cd8
[ "BSD-3-Clause" ]
null
null
null
import unittest from typing import cast, Any def load_tests(loader, tests, pattern): return loader.discover('.', "*_test.py") if __name__ == '__main__': cast(Any, unittest).main(verbosity=1)
17
44
0.696078
27
204
4.888889
0.740741
0.106061
0
0
0
0
0
0
0
0
0
0.005848
0.161765
204
11
45
18.545455
0.766082
0
0
0
0
0
0.088235
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
66754f1bde41efbda0241eed3e396b78216fb2f3
74
py
Python
Reset_sound_lib.py
yash-dhingra/musifre
d123b7059356d9304e36a5acd0e13aec1af06185
[ "MIT" ]
10
2022-02-02T16:56:50.000Z
2022-03-22T19:24:27.000Z
Reset_sound_lib.py
Erebus-P/musifre
d123b7059356d9304e36a5acd0e13aec1af06185
[ "MIT" ]
null
null
null
Reset_sound_lib.py
Erebus-P/musifre
d123b7059356d9304e36a5acd0e13aec1af06185
[ "MIT" ]
2
2022-02-02T17:32:59.000Z
2022-02-05T10:40:15.000Z
import pickle with open("data.dat","wb") as file: pickle.dump({},file)
24.666667
35
0.662162
12
74
4.083333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.135135
74
3
36
24.666667
0.765625
0
0
0
0
0
0.133333
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
66987e76b24518eddc6b3e1ca9f6d07bc1cc62c3
51
py
Python
enthought/pyface/preference/api.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/pyface/preference/api.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/pyface/preference/api.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from pyface.preference.api import *
17
35
0.784314
7
51
5.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.137255
51
2
36
25.5
0.909091
0.235294
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
66adf2671409ff38e025b362b858e870c647e3ab
201
py
Python
tasks/apps.py
SpeedyCoder/task-manager
1f7d98bad6b8251e94bd8cd63f14e3f4524c4f72
[ "MIT" ]
null
null
null
tasks/apps.py
SpeedyCoder/task-manager
1f7d98bad6b8251e94bd8cd63f14e3f4524c4f72
[ "MIT" ]
null
null
null
tasks/apps.py
SpeedyCoder/task-manager
1f7d98bad6b8251e94bd8cd63f14e3f4524c4f72
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TasksConfig(AppConfig): name = 'tasks' def ready(self): # Register rules import tasks.rules import tasks.templatetags.helpers
18.272727
41
0.666667
22
201
6.090909
0.727273
0.164179
0.238806
0
0
0
0
0
0
0
0
0
0.263682
201
10
42
20.1
0.905405
0.069652
0
0
0
0
0.027027
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
66bb39c6a187334df89e2083c643e7d4eb121600
326
py
Python
nicelka/convert_file.py
konrad-kocik/nicelka
a174fce9b8c6d4414312120e89e10bb1e10629df
[ "MIT" ]
null
null
null
nicelka/convert_file.py
konrad-kocik/nicelka
a174fce9b8c6d4414312120e89e10bb1e10629df
[ "MIT" ]
null
null
null
nicelka/convert_file.py
konrad-kocik/nicelka
a174fce9b8c6d4414312120e89e10bb1e10629df
[ "MIT" ]
null
null
null
from nicelka.data_normalizer.importer import import_results_from_text_file from nicelka.data_normalizer.exporter import export_results_to_excel_file name = 'Otrębusy po edycji' results = import_results_from_text_file('data', 'report_text_file.txt') export_results_to_excel_file(results, 'data', '{}.xls'.format(name), name)
40.75
74
0.834356
48
326
5.25
0.4375
0.095238
0.119048
0.198413
0.388889
0
0
0
0
0
0
0
0.070552
326
7
75
46.571429
0.831683
0
0
0
0
0
0.159509
0
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
66de4454a5e9740a5cd634f8e72f39325339c247
156
py
Python
mushroom_rl/utils/pybullet/__init__.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
344
2020-01-10T09:45:02.000Z
2022-03-30T09:48:28.000Z
mushroom_rl/utils/pybullet/__init__.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
44
2020-01-23T03:00:56.000Z
2022-03-25T17:14:22.000Z
mushroom_rl/utils/pybullet/__init__.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
93
2020-01-10T21:17:58.000Z
2022-03-31T17:58:52.000Z
from .observation import PyBulletObservationType from .index_map import IndexMap from .viewer import PyBulletViewer from .joints_helper import JointsHelper
31.2
48
0.871795
18
156
7.444444
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.102564
156
4
49
39
0.957143
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
dd0059e939288d0f77e5996d24210bd5e1674de6
274
py
Python
hackerrank/python/math/mod-divmod.py
ParinVachhani/coding-practice
2268215b1e1f26bfe09d0dfb4f94366594a6ef37
[ "MIT" ]
1
2018-05-06T14:03:02.000Z
2018-05-06T14:03:02.000Z
hackerrank/python/math/mod-divmod.py
ParinVachhani/coding-practice
2268215b1e1f26bfe09d0dfb4f94366594a6ef37
[ "MIT" ]
null
null
null
hackerrank/python/math/mod-divmod.py
ParinVachhani/coding-practice
2268215b1e1f26bfe09d0dfb4f94366594a6ef37
[ "MIT" ]
null
null
null
if __name__ == '__main__': a,b = int(input()), int(input()) print(a//b) print(a%b) print(divmod(a,b)) # print('{0}\n{1}\n({0}, {1})'.format(*divmod(int(input()), int(input())))) # a, b = int(input()), int(input()) # print("{d[0]}\n{d[1]}\n{d}".format(d=divmod(a, b)))
24.909091
75
0.536496
51
274
2.72549
0.27451
0.086331
0.23741
0.345324
0.330935
0.330935
0.330935
0
0
0
0
0.02459
0.109489
274
10
76
27.4
0.545082
0.580292
0
0
0
0
0.072072
0
0
0
0
0
0
1
0
true
0
0
0
0
0.6
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
dd3125bc3b40df7d247bc096756b9e82350e719d
200
py
Python
tronx/methods/decorators/__init__.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
8
2021-08-22T06:43:34.000Z
2022-02-24T17:09:49.000Z
tronx/methods/decorators/__init__.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
61
2021-09-12T11:05:33.000Z
2021-12-07T15:26:18.000Z
tronx/methods/decorators/__init__.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
6
2021-09-08T08:43:04.000Z
2022-02-24T17:09:50.000Z
from .on_message import OnMessage from .on_callback import OnCallbackQuery from .on_inline import OnInlineQuery class Decorators( OnMessage, OnInlineQuery, OnCallbackQuery, ): pass
15.384615
40
0.765
21
200
7.142857
0.571429
0.12
0
0
0
0
0
0
0
0
0
0
0.19
200
12
41
16.666667
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.111111
0.333333
0
0.444444
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
4
dd33494e0ddab98cd2d87350732cb5a9b4e558fc
1,382
py
Python
xai/exception.py
ngpgn/contextual-ai
deb119395ced5242f243b2b31c074507e96646c0
[ "Apache-2.0" ]
83
2020-06-17T04:07:29.000Z
2022-03-12T13:45:24.000Z
xai/exception.py
ngpgn/contextual-ai
deb119395ced5242f243b2b31c074507e96646c0
[ "Apache-2.0" ]
15
2020-06-30T09:22:19.000Z
2021-11-11T10:52:40.000Z
xai/exception.py
ngpgn/contextual-ai
deb119395ced5242f243b2b31c074507e96646c0
[ "Apache-2.0" ]
11
2020-06-17T17:01:24.000Z
2022-02-27T18:53:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved # ============================================================================ """ Exception """ from __future__ import absolute_import from __future__ import division from __future__ import print_function ################################################################################ ### ERROR Constants ################################################################################ GENERAL_ERROR = 500 ################################################################################ ### General Exception ################################################################################ class GeneralException(Exception): """General exception.""" def __init__(self, error_message: str, *, error_code=GENERAL_ERROR): super().__init__() self._message = error_message self._code = error_code def __repr__(self): return 'Error {}[{}]'.format(self._message, self._code) def __str__(self): return 'Error {}[{}]'.format(self._message, self._code) ################################################################################ ### Compiler Exception ################################################################################ class CompilerException(GeneralException): """Compiler exception"""
34.55
80
0.409551
92
1,382
5.695652
0.467391
0.057252
0.091603
0.080153
0.152672
0.152672
0.152672
0.152672
0
0
0
0.006525
0.11288
1,382
40
81
34.55
0.420881
0.208394
0
0.142857
0
0
0.040956
0
0
0
0
0
0
1
0.214286
false
0
0.214286
0.142857
0.714286
0.071429
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
dd4aeb2c7e8854c3dcf3a564f4b8c7e6246da487
106
py
Python
mayan/apps/databases/warnings.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/databases/warnings.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/databases/warnings.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
114
2015-01-08T20:21:05.000Z
2018-12-10T19:07:53.000Z
class DatabaseWarning(UserWarning): """ Warning when using unsupported database backends. """
21.2
53
0.698113
9
106
8.222222
1
0
0
0
0
0
0
0
0
0
0
0
0.207547
106
4
54
26.5
0.880952
0.462264
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
dd5f1a60b2788ed9deb512814345790625ab4478
52
py
Python
uq360/algorithms/quantile_regression/__init__.py
Sclare87/UQ360
2378bfa4a8d61f813afbf6854341888434c9eb11
[ "Apache-2.0" ]
148
2021-05-27T20:52:51.000Z
2022-03-16T22:49:48.000Z
uq360/algorithms/quantile_regression/__init__.py
Sclare87/UQ360
2378bfa4a8d61f813afbf6854341888434c9eb11
[ "Apache-2.0" ]
9
2021-06-21T18:45:07.000Z
2021-11-08T14:42:30.000Z
uq360/algorithms/quantile_regression/__init__.py
Sclare87/UQ360
2378bfa4a8d61f813afbf6854341888434c9eb11
[ "Apache-2.0" ]
27
2021-06-01T18:29:02.000Z
2022-03-02T06:56:03.000Z
from .quantile_regression import QuantileRegression
26
51
0.903846
5
52
9.2
1
0
0
0
0
0
0
0
0
0
0
0
0.076923
52
1
52
52
0.958333
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
dd754fe41548ae6eea61d1b6b3cfe6f826ba16c4
23
py
Python
src/sage/dynamics/flat_surfaces/__init__.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
10
2018-06-01T21:54:53.000Z
2022-03-14T20:11:34.000Z
src/sage/dynamics/__init__.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
2
2021-04-02T20:43:29.000Z
2021-04-05T23:38:58.000Z
src/sage/dynamics/__init__.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
15
2020-07-23T10:46:25.000Z
2022-01-25T15:37:24.000Z
r""" Flat surfaces """
5.75
13
0.565217
3
23
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.173913
23
3
14
7.666667
0.684211
0.565217
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
dd8a80c70347c76053e37c64e1b6b644f3030666
161
py
Python
Math_Run/main.py
raafatabualazm/Competitive-Programming-Solutions
3c8c953e9597e64a77e804ba4d3881c8f0354c7a
[ "MIT" ]
null
null
null
Math_Run/main.py
raafatabualazm/Competitive-Programming-Solutions
3c8c953e9597e64a77e804ba4d3881c8f0354c7a
[ "MIT" ]
null
null
null
Math_Run/main.py
raafatabualazm/Competitive-Programming-Solutions
3c8c953e9597e64a77e804ba4d3881c8f0354c7a
[ "MIT" ]
null
null
null
n = 1000 count = 0 for i in range(n): for j in range(n): for k in range(n): if i < j and j < k: count += 1 print(count)
16.1
31
0.447205
29
161
2.482759
0.482759
0.291667
0.333333
0.305556
0
0
0
0
0
0
0
0.066667
0.440994
161
10
32
16.1
0.733333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.125
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
663fd8457b7972da3ec0a779407e8888250c83f1
171
py
Python
bulletwrapper/__init__.py
dnnspark/bulletwrapper
3d034ee27ccf1613e84bd0beaae345eb4cbb9f91
[ "MIT" ]
null
null
null
bulletwrapper/__init__.py
dnnspark/bulletwrapper
3d034ee27ccf1613e84bd0beaae345eb4cbb9f91
[ "MIT" ]
4
2018-10-09T21:33:05.000Z
2018-10-16T07:07:18.000Z
bulletwrapper/__init__.py
dnnspark/bulletwrapper
3d034ee27ccf1613e84bd0beaae345eb4cbb9f91
[ "MIT" ]
null
null
null
# from session import BulletSession, BulletHook, StopSimulation # import os # root = os.path.dirname(os.path.realpath(__file__)) # data_root = os.path.join(root, 'data')
28.5
63
0.748538
23
171
5.347826
0.608696
0.146341
0.162602
0
0
0
0
0
0
0
0
0
0.116959
171
5
64
34.2
0.81457
0.94152
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
664f194b387280a16bb879cee12f9d8c387aef79
447
py
Python
strativ_api/models.py
FahimSifnatul/strativ
b8ed3fad4a2a1e9daeead725d9e7174367a00290
[ "MIT" ]
null
null
null
strativ_api/models.py
FahimSifnatul/strativ
b8ed3fad4a2a1e9daeead725d9e7174367a00290
[ "MIT" ]
null
null
null
strativ_api/models.py
FahimSifnatul/strativ
b8ed3fad4a2a1e9daeead725d9e7174367a00290
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Countries(models.Model): name = models.CharField(max_length=32) alpha2code = models.CharField(max_length=16) capital = models.CharField(max_length=32) population = models.IntegerField() timezones = models.CharField(max_length=16) flag = models.CharField(max_length=64) languages = models.CharField(max_length=256) borders = models.CharField(max_length=256)
37.25
46
0.756152
58
447
5.706897
0.465517
0.317221
0.380665
0.507553
0.477341
0
0
0
0
0
0
0.044271
0.14094
447
12
47
37.25
0.817708
0.053691
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
b083fff1ac160600d412b6902a6e192aedf975d8
163
py
Python
python/datagit/navigate/dmo/__init__.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/datagit/navigate/dmo/__init__.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/datagit/navigate/dmo/__init__.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
from .issue_index_builder import IssueIndexBuilder from .issue_pattern_builder import IssuePatternBuilder from .issue_taxonomy_builder import IssueTaxonomyBuilder
40.75
56
0.907975
18
163
7.888889
0.555556
0.190141
0
0
0
0
0
0
0
0
0
0
0.07362
163
3
57
54.333333
0.940397
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
b0ba6bdaf26087edbd8cde4be001de641091d1a9
378
py
Python
axonius_api_client/cli/grp_system/grp_discover/__init__.py
geransmith/axonius_api_client
09fd564d62f0ddf7aa44db14a509eaafaf0c930f
[ "MIT" ]
null
null
null
axonius_api_client/cli/grp_system/grp_discover/__init__.py
geransmith/axonius_api_client
09fd564d62f0ddf7aa44db14a509eaafaf0c930f
[ "MIT" ]
3
2021-05-18T14:28:30.000Z
2021-09-06T20:01:56.000Z
axonius_api_client/cli/grp_system/grp_discover/__init__.py
geransmith/axonius_api_client
09fd564d62f0ddf7aa44db14a509eaafaf0c930f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Command line interface for Axonius API Client.""" import click from ...context import AliasedGroup from . import cmd_get, cmd_start, cmd_stop @click.group(cls=AliasedGroup) def discover(): """Group: Discover and Lifecycle management.""" discover.add_command(cmd_get.cmd) discover.add_command(cmd_start.cmd) discover.add_command(cmd_stop.cmd)
22.235294
52
0.751323
53
378
5.188679
0.509434
0.12
0.196364
0.229091
0.174545
0
0
0
0
0
0
0.002994
0.116402
378
16
53
23.625
0.820359
0.293651
0
0
0
0
0
0
0
0
0
0
0
1
0.125
true
0
0.375
0
0.5
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
0
1
0
0
0
0
4
b0cf93e391317af52cde877a4173db8885adc531
135
py
Python
codev/template-library/python/namespace/third-party/modules/ModuleA.py
creative-sensor/echo-home
14ed0da26e455ff19425ea9fc2a5e81bba8ca2c2
[ "MIT" ]
null
null
null
codev/template-library/python/namespace/third-party/modules/ModuleA.py
creative-sensor/echo-home
14ed0da26e455ff19425ea9fc2a5e81bba8ca2c2
[ "MIT" ]
2
2021-05-11T10:33:39.000Z
2022-01-22T11:35:20.000Z
codev/template-library/python/namespace/third-party/modules/ModuleA.py
creative-sensor/echo-home
14ed0da26e455ff19425ea9fc2a5e81bba8ca2c2
[ "MIT" ]
null
null
null
def printNumber(number): print(number) def printText(text): print("Text: " + text) class SimpleA: """ Empty Class """
11.25
26
0.607407
15
135
5.466667
0.6
0
0
0
0
0
0
0
0
0
0
0
0.237037
135
11
27
12.272727
0.796117
0.081481
0
0
0
0
0.052632
0
0
0
0
0
0
1
0.4
false
0
0
0
0.6
0.8
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
0
1
1
0
4
b0f120ad271743ba4f02b31f4ea46603c4a2bfd8
69
py
Python
xlib/face/EMaskType.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
xlib/face/EMaskType.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
xlib/face/EMaskType.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
from enum import IntEnum class EMaskType(IntEnum): UNDEFINED = 0
17.25
25
0.753623
9
69
5.777778
0.888889
0
0
0
0
0
0
0
0
0
0
0.017857
0.188406
69
4
26
17.25
0.910714
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
b0f8b2d65dfa9756e8dfdaabcd697e76263a3e27
12
py
Python
public_test/__init__.py
digismoothie/public-test
d57cb0573c41c601fab7d81ce96161a81e8fe927
[ "MIT" ]
null
null
null
public_test/__init__.py
digismoothie/public-test
d57cb0573c41c601fab7d81ce96161a81e8fe927
[ "MIT" ]
null
null
null
public_test/__init__.py
digismoothie/public-test
d57cb0573c41c601fab7d81ce96161a81e8fe927
[ "MIT" ]
null
null
null
ANSWER = 42
6
11
0.666667
2
12
4
1
0
0
0
0
0
0
0
0
0
0
0.222222
0.25
12
1
12
12
0.666667
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
7c081db1316d96853c3d7d2baa599261fa2f4b72
108
py
Python
src/sdk/analytics/analytics_handler.py
jzlotek/drexel-tms-parser
9d5582a441d490a8099252994f9e41dca36acf81
[ "Apache-2.0" ]
null
null
null
src/sdk/analytics/analytics_handler.py
jzlotek/drexel-tms-parser
9d5582a441d490a8099252994f9e41dca36acf81
[ "Apache-2.0" ]
6
2021-03-09T00:34:54.000Z
2022-02-17T19:35:47.000Z
src/sdk/analytics/analytics_handler.py
jzlotek/drexel-tms-parser
9d5582a441d490a8099252994f9e41dca36acf81
[ "Apache-2.0" ]
null
null
null
# Only sc, cn should be queried # create plot for sc, cn based on year/quarter and number per year/quarter
27
74
0.75
20
108
4.05
0.8
0.098765
0
0
0
0
0
0
0
0
0
0
0.194444
108
3
75
36
0.931034
0.944444
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
9ff0d36ffbcc23c455e78bc489e6617033747dd0
165
py
Python
mash_place_ui/config.py
MashSoftware/place
41b4bea35cf1f1db80b839b8184b39ab02497c13
[ "MIT" ]
null
null
null
mash_place_ui/config.py
MashSoftware/place
41b4bea35cf1f1db80b839b8184b39ab02497c13
[ "MIT" ]
null
null
null
mash_place_ui/config.py
MashSoftware/place
41b4bea35cf1f1db80b839b8184b39ab02497c13
[ "MIT" ]
null
null
null
import os SECRET_KEY = os.getenv('SECRET_KEY', '4odS$gCbD7Y@*Erd') GA_KEY = os.getenv('GA_KEY') PLACE_API_URL = os.getenv('PLACE_API_URL', 'http://localhost:5000')
27.5
67
0.727273
28
165
4
0.535714
0.214286
0.196429
0
0
0
0
0
0
0
0
0.039735
0.084848
165
5
68
33
0.701987
0
0
0
0
0
0.4
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9ffff21747e21e6641b9004e465acd648ad7a18e
298
py
Python
wysdom/base_schema/__init__.py
jetavator/wysdom
4c67c82a9df66370da5cf5347abd7450a52d3d03
[ "Apache-2.0" ]
1
2021-04-20T07:40:28.000Z
2021-04-20T07:40:28.000Z
wysdom/base_schema/__init__.py
jetavator/wysdom
4c67c82a9df66370da5cf5347abd7450a52d3d03
[ "Apache-2.0" ]
69
2020-05-13T07:13:49.000Z
2021-05-06T18:26:21.000Z
wysdom/base_schema/__init__.py
jetavator/wysdom
4c67c82a9df66370da5cf5347abd7450a52d3d03
[ "Apache-2.0" ]
null
null
null
from .Schema import Schema from .SchemaAnything import SchemaAnything from .SchemaType import SchemaType from .SchemaPrimitive import SchemaPrimitive from .SchemaNone import SchemaNone from .SchemaConst import SchemaConst from .SchemaEnum import SchemaEnum from .SchemaPattern import SchemaPattern
33.111111
44
0.865772
32
298
8.0625
0.3125
0
0
0
0
0
0
0
0
0
0
0
0.107383
298
8
45
37.25
0.969925
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
b0035e1c40830183be5dd355787710d306097c8f
121
py
Python
api/__init__.py
Kac001/sangfor_sslvpn_api
e029bda7739147d6cb6fb20ff5af6f347d397cc9
[ "MIT" ]
3
2021-01-17T14:46:39.000Z
2021-08-06T02:57:43.000Z
api/__init__.py
Kac001/sangfor_sslvpn_api
e029bda7739147d6cb6fb20ff5af6f347d397cc9
[ "MIT" ]
null
null
null
api/__init__.py
Kac001/sangfor_sslvpn_api
e029bda7739147d6cb6fb20ff5af6f347d397cc9
[ "MIT" ]
1
2021-11-26T06:47:55.000Z
2021-11-26T06:47:55.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Copyright (C) 2021 All rights reserved. # # @Author Kaco # @Version 1.0
15.125
41
0.619835
18
121
4.166667
1
0
0
0
0
0
0
0
0
0
0
0.07
0.173554
121
7
42
17.285714
0.68
0.884298
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
b027e5c6cb598b82f82efe650de37af553ae487b
2,221
py
Python
stubs.min/System/Windows/__init___parts/AttachedPropertyBrowsableWhenAttributePresentAttribute.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/__init___parts/AttachedPropertyBrowsableWhenAttributePresentAttribute.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/__init___parts/AttachedPropertyBrowsableWhenAttributePresentAttribute.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class AttachedPropertyBrowsableWhenAttributePresentAttribute(AttachedPropertyBrowsableAttribute,_Attribute): """ Specifies that an attached property is only browsable on an element that also has another specific �.NET Framework attribute�applied to its class definition. AttachedPropertyBrowsableWhenAttributePresentAttribute(attributeType: Type) """ def Equals(self,obj): """ Equals(self: AttachedPropertyBrowsableWhenAttributePresentAttribute,obj: object) -> bool Determines whether the current System.Windows.AttachedPropertyBrowsableWhenAttributePresentAttribute�.NET Framework attribute is equal to a specified object. obj: The System.Windows.AttachedPropertyBrowsableWhenAttributePresentAttribute to compare to the current System.Windows.AttachedPropertyBrowsableWhenAttributePresentAttribute. Returns: true if the specified System.Windows.AttachedPropertyBrowsableWhenAttributePresentAttribute is equal to the current System.Windows.AttachedPropertyBrowsableWhenAttributePresentAttribute; otherwise,false. """ pass def GetHashCode(self): """ GetHashCode(self: AttachedPropertyBrowsableWhenAttributePresentAttribute) -> int Returns the hash code for this System.Windows.AttachedPropertyBrowsableWhenAttributePresentAttribute�.NET Framework attribute. Returns: An unsigned 32-bit integer value. """ pass def __eq__(self,*args): """ x.__eq__(y) <==> x==y """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,attributeType): """ __new__(cls: type,attributeType: Type) """ pass def __ne__(self,*args): pass AttributeType=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the type of the �.NET Framework attribute�that must also be applied on a class. Get: AttributeType(self: AttachedPropertyBrowsableWhenAttributePresentAttribute) -> Type """
38.293103
215
0.74471
214
2,221
7.471963
0.383178
0.04878
0.251407
0.055034
0.315822
0.280801
0.181989
0.070669
0.070669
0.070669
0.002701
0.00109
0.173796
2,221
57
216
38.964912
0.86703
0.65421
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0.4
0
0
0.533333
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
1
0
0
1
0
0
4
b05711fb700a74c07935ad71ffd5fdbb235ec318
25
py
Python
data/studio21_generated/introductory/4464/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4464/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4464/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def feast(beast, dish):
12.5
23
0.68
4
25
4.25
1
0
0
0
0
0
0
0
0
0
0
0
0.16
25
2
24
12.5
0.809524
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
b069ada9dca294e010de419e643c2eac1c570615
328
py
Python
trackproof/sample.py
AbigailMcGovern/trackproof
583a6b01d275a181954f5f6c922529162adc95e3
[ "BSD-3-Clause" ]
null
null
null
trackproof/sample.py
AbigailMcGovern/trackproof
583a6b01d275a181954f5f6c922529162adc95e3
[ "BSD-3-Clause" ]
null
null
null
trackproof/sample.py
AbigailMcGovern/trackproof
583a6b01d275a181954f5f6c922529162adc95e3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pandas as pd # Reinforcement learning to find boxes/tracks in which errors are found (+1 for every error identified possibly pentalty for correct segments) # Input # Image & tracks or subsection (might be too computationally intensive to process the whole thing) # Output: # chosen track segment
32.8
142
0.780488
48
328
5.333333
0.895833
0
0
0
0
0
0
0
0
0
0
0.003717
0.179878
328
10
143
32.8
0.947955
0.841463
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
c6b67313462a040a089e9fc777c4667a81e45a37
134
py
Python
chconsole/launch/__init__.py
mincode/chconsole
ab8ca8a38bd47ecb1aa7ff90225f57e042aaad6e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
chconsole/launch/__init__.py
mincode/chconsole
ab8ca8a38bd47ecb1aa7ff90225f57e042aaad6e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
chconsole/launch/__init__.py
mincode/chconsole
ab8ca8a38bd47ecb1aa7ff90225f57e042aaad6e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from .launch import Launch, start_console, start_chconsole, start_qtconsole __author__ = 'Manfred Minimair <manfred@minimair.org>'
22.333333
75
0.80597
16
134
6.3125
0.6875
0.29703
0
0
0
0
0
0
0
0
0
0
0.11194
134
5
76
26.8
0.84874
0
0
0
0
0
0.293233
0.165414
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
c6d008cf9f9e3483339356fc24012f0c13054502
669
py
Python
sitemap_xml_generator.py
isNPComplete/sitemap_generator
9a139c508bc47f7caa983d8eb2a86bbc2fe0ba83
[ "MIT" ]
null
null
null
sitemap_xml_generator.py
isNPComplete/sitemap_generator
9a139c508bc47f7caa983d8eb2a86bbc2fe0ba83
[ "MIT" ]
null
null
null
sitemap_xml_generator.py
isNPComplete/sitemap_generator
9a139c508bc47f7caa983d8eb2a86bbc2fe0ba83
[ "MIT" ]
null
null
null
class XML_Generator(object): def __init__(self, links): self.xml_sitemap = "<!-- Service provided by David Qian --> \n" self.xml_sitemap += '<?xml version="1.0" encoding="UTF-8"?> \n' self.xml_sitemap += '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> \n' for link in links: self.xml_sitemap += '\t<url>\n' self.xml_sitemap += '\t\t<loc>'+link+'</loc>\n' self.xml_sitemap += '\t</url>\n' self.xml_sitemap += '</urlset>' def generate_xml_sitemap_file(self): outputFile = open('sitemap.xml', 'w') outputFile.write(self.xml_sitemap) outputFile.close() def generate_xml_sitemap_standard_output(self): print self.xml_sitemap
31.857143
87
0.68012
100
669
4.34
0.45
0.253456
0.290323
0.172811
0.218894
0.152074
0.152074
0.152074
0.152074
0
0
0.008621
0.133034
669
20
88
33.45
0.739655
0
0
0
0
0.0625
0.304805
0
0
0
0
0
0
0
null
null
0
0
null
null
0.0625
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
05aad2bb9cfc7a97c18536cd0bb0707fb0245011
145
py
Python
learningPython/mundo1/desafios/desafio5.py
SrTesch/LearningC
cd6d4c131c3e4617f8a19243ebf443dd78f621a2
[ "MIT" ]
null
null
null
learningPython/mundo1/desafios/desafio5.py
SrTesch/LearningC
cd6d4c131c3e4617f8a19243ebf443dd78f621a2
[ "MIT" ]
null
null
null
learningPython/mundo1/desafios/desafio5.py
SrTesch/LearningC
cd6d4c131c3e4617f8a19243ebf443dd78f621a2
[ "MIT" ]
null
null
null
n1 = int(input('Digite um valor: ')) print('O número que você digitou foi {}. O seu antecessor é {} e seu sucessor é {}'.format(n1, n1-1, n1+1))
48.333333
107
0.648276
27
145
3.481481
0.740741
0.06383
0
0
0
0
0
0
0
0
0
0.05
0.172414
145
3
107
48.333333
0.733333
0
0
0
0
0
0.630137
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
05bb68eac33827c65bef783a0f4f60ff251cd570
355
py
Python
server/utils.py
tomy0000000/TSkr
a88c52396a08adcf50b65c5d17dea552fae50dc4
[ "MIT" ]
1
2019-12-25T14:50:31.000Z
2019-12-25T14:50:31.000Z
server/utils.py
tomy0000000/TSkr
a88c52396a08adcf50b65c5d17dea552fae50dc4
[ "MIT" ]
null
null
null
server/utils.py
tomy0000000/TSkr
a88c52396a08adcf50b65c5d17dea552fae50dc4
[ "MIT" ]
null
null
null
"""A Series of Helper Function which can be used by tasks""" import logging def build_logger(): """""" # logging.config.dictConfig(LOGGING_CONFIG) def send_notification(): """""" pass def save_data(): """Save file which can be retrieved with get_data""" pass def get_data(): """Retrieve file saved by save_data""" pass
18.684211
60
0.650704
48
355
4.666667
0.604167
0.071429
0.089286
0
0
0
0
0
0
0
0
0
0.216901
355
18
61
19.722222
0.805755
0.498592
0
0.375
0
0
0
0
0
0
0
0
0
1
0.5
true
0.375
0.125
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
1
0
0
4
05c645e53d13e697185bc9c614b13555fa5389b7
52
py
Python
startup/stage.py
coderubrika/python-startup
b2732f1a27203b12d1c6d48c21a5e194e8d15c90
[ "MIT" ]
null
null
null
startup/stage.py
coderubrika/python-startup
b2732f1a27203b12d1c6d48c21a5e194e8d15c90
[ "MIT" ]
null
null
null
startup/stage.py
coderubrika/python-startup
b2732f1a27203b12d1c6d48c21a5e194e8d15c90
[ "MIT" ]
null
null
null
def stage(cfg): print('startup by "Stage" mode')
26
36
0.653846
8
52
4.25
0.875
0
0
0
0
0
0
0
0
0
0
0
0.173077
52
2
36
26
0.790698
0
0
0
0
0
0.433962
0
0
0
0
0
0
1
0.5
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
05cfcc399e9ff8dbe4d335df1000b2d8d8645d37
144
py
Python
cnn-from-scratch/fc.py
glide23/dl
9fd9ae1d011602819a1a04e18c814c2baca253bf
[ "Apache-2.0" ]
null
null
null
cnn-from-scratch/fc.py
glide23/dl
9fd9ae1d011602819a1a04e18c814c2baca253bf
[ "Apache-2.0" ]
null
null
null
cnn-from-scratch/fc.py
glide23/dl
9fd9ae1d011602819a1a04e18c814c2baca253bf
[ "Apache-2.0" ]
null
null
null
# fully-connected layer from scratch in numpy import numpy as np def fc_feedforward(x,W,b): output = np.matmul(W,x) + b return output
18
45
0.701389
25
144
4
0.76
0
0
0
0
0
0
0
0
0
0
0
0.208333
144
7
46
20.571429
0.877193
0.298611
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
05db40ecd996d745cbf2e8ffe75a274826ddcf4d
160
py
Python
coffea/nanoevents/__init__.py
dntaylor/coffea
6d0b1e5678c840b60a9bf87d6e01341115d26735
[ "BSD-3-Clause" ]
null
null
null
coffea/nanoevents/__init__.py
dntaylor/coffea
6d0b1e5678c840b60a9bf87d6e01341115d26735
[ "BSD-3-Clause" ]
null
null
null
coffea/nanoevents/__init__.py
dntaylor/coffea
6d0b1e5678c840b60a9bf87d6e01341115d26735
[ "BSD-3-Clause" ]
null
null
null
"""NanoEvents and helpers """ from coffea.nanoevents.factory import NanoEventsFactory import coffea.nanoevents.methods __all__ = [ "NanoEventsFactory", ]
16
55
0.76875
15
160
7.933333
0.666667
0.268908
0
0
0
0
0
0
0
0
0
0
0.13125
160
9
56
17.777778
0.856115
0.1375
0
0
0
0
0.130769
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
af133635f98494e8eee6e40349135bc34d8aa15e
89
py
Python
double.py
imerla1/git-course-repo
0c49a2b47597bd1770cc9a647f5e6424af225372
[ "MIT" ]
2
2022-02-06T19:38:53.000Z
2022-02-24T18:44:14.000Z
double.py
imerla1/git-course-repo
0c49a2b47597bd1770cc9a647f5e6424af225372
[ "MIT" ]
null
null
null
double.py
imerla1/git-course-repo
0c49a2b47597bd1770cc9a647f5e6424af225372
[ "MIT" ]
null
null
null
def double(x): # Doubles X return x * 2 if __name__ == "__main__": print(double(5))
12.714286
26
0.629213
14
89
3.428571
0.785714
0
0
0
0
0
0
0
0
0
0
0.028571
0.213483
89
6
27
14.833333
0.657143
0.101124
0
0
0
0
0.102564
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
af3c17a94324ad326fbff6feb79ae4ef3cd18282
266
py
Python
suslab/users/controllers.py
AyushMukherjee/things-library
73ea5af4c2f335bc36de08b14f2bf556498dd8d1
[ "MIT" ]
1
2022-01-31T19:19:34.000Z
2022-01-31T19:19:34.000Z
suslab/users/controllers.py
AyushMukherjee/things-library
73ea5af4c2f335bc36de08b14f2bf556498dd8d1
[ "MIT" ]
20
2021-04-18T05:09:34.000Z
2021-11-01T14:40:03.000Z
suslab/users/controllers.py
AyushMukherjee/things-library
73ea5af4c2f335bc36de08b14f2bf556498dd8d1
[ "MIT" ]
2
2021-05-09T07:31:28.000Z
2021-12-07T06:59:53.000Z
from flask import request, render_template, url_for, redirect from flask_security import SQLAlchemyUserDatastore def get_user_datastore(): from suslab.users.models import User, Role from suslab import db return SQLAlchemyUserDatastore(db, User, Role)
26.6
61
0.796992
34
266
6.088235
0.617647
0.086957
0
0
0
0
0
0
0
0
0
0
0.154135
266
9
62
29.555556
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
true
0
0.666667
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
af85354400d9949d9c59bd8a894b00b33da0e92c
306
py
Python
lfc_contact_form/forms.py
diefenbach/lfc-contact-form
0b000ce2e3c9cd4d1f2933fdbab982b404e18185
[ "BSD-3-Clause" ]
null
null
null
lfc_contact_form/forms.py
diefenbach/lfc-contact-form
0b000ce2e3c9cd4d1f2933fdbab982b404e18185
[ "BSD-3-Clause" ]
null
null
null
lfc_contact_form/forms.py
diefenbach/lfc-contact-form
0b000ce2e3c9cd4d1f2933fdbab982b404e18185
[ "BSD-3-Clause" ]
null
null
null
from django import forms from django.utils.translation import ugettext_lazy as _ class ContactForm(forms.Form): name = forms.CharField(label=_(u'Your name')) email = forms.EmailField(label=_(u'Your email address')) message = forms.CharField(label=_(u'Your message'), widget=forms.Textarea())
34
80
0.745098
41
306
5.439024
0.560976
0.080717
0.134529
0.179372
0.215247
0
0
0
0
0
0
0
0.130719
306
8
81
38.25
0.838346
0
0
0
0
0
0.127451
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
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
af9a5ea4161b22c57b1916b620e4dc5546247bee
90
py
Python
Chapter 06 - Files and Exceptions/Assignments/6.4 Exceptions/51363.py
EllisBarnes00/COP-1000
8509e59e8a566c77295c714ddcb0f557c470358b
[ "Unlicense" ]
null
null
null
Chapter 06 - Files and Exceptions/Assignments/6.4 Exceptions/51363.py
EllisBarnes00/COP-1000
8509e59e8a566c77295c714ddcb0f557c470358b
[ "Unlicense" ]
1
2021-06-07T03:55:29.000Z
2021-06-07T03:56:47.000Z
Chapter 06 - Files and Exceptions/Assignments/6.4 Exceptions/51363.py
EllisBarnes00/COP-1000
8509e59e8a566c77295c714ddcb0f557c470358b
[ "Unlicense" ]
null
null
null
try: print(budget/(num_boys + num_girls)) except ZeroDivisionError: print("unavailable")
22.5
37
0.777778
11
90
6.181818
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.088889
90
4
38
22.5
0.829268
0
0
0
0
0
0.120879
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
afb6812f3bbaac885f2667b16a60ff3a8e7dcce6
91
py
Python
river_engine/core/synchronizer.py
cysnake4713/river
579ca1f6bdf45a3e51e35a181cf1912edfe724e7
[ "Apache-2.0" ]
null
null
null
river_engine/core/synchronizer.py
cysnake4713/river
579ca1f6bdf45a3e51e35a181cf1912edfe724e7
[ "Apache-2.0" ]
null
null
null
river_engine/core/synchronizer.py
cysnake4713/river
579ca1f6bdf45a3e51e35a181cf1912edfe724e7
[ "Apache-2.0" ]
null
null
null
class Synchronizer: def sync(self, sync_item): pass class SyncItem: pass
11.375
30
0.637363
11
91
5.181818
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.296703
91
7
31
13
0.890625
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.2
false
0.4
0
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
1
0
0
1
0
0
4
afc2c55882ebd230d80486a1311b07b06767678a
983
py
Python
tests/test_attrs.py
sbuss/pydockerfile
aa6a6d7dc79a3682ef3c56aad8228cc24b41973d
[ "MIT" ]
null
null
null
tests/test_attrs.py
sbuss/pydockerfile
aa6a6d7dc79a3682ef3c56aad8228cc24b41973d
[ "MIT" ]
null
null
null
tests/test_attrs.py
sbuss/pydockerfile
aa6a6d7dc79a3682ef3c56aad8228cc24b41973d
[ "MIT" ]
2
2015-10-16T14:32:50.000Z
2017-02-09T18:02:01.000Z
from tests.fixtures import basic_dockerfile # nopep8 from tests.fixtures import dockerfile_with_comments # nopep8 basic_dockerfile # shut up pep8 dockerfile_with_comments # shut up pep8 def test_from(basic_dockerfile): assert basic_dockerfile.FROM assert len(basic_dockerfile.FROM) == 1 assert basic_dockerfile.FROM[0].args == "ubuntu:trusty" def test_many(basic_dockerfile): assert basic_dockerfile.RUN assert len(basic_dockerfile.RUN) == 3 assert basic_dockerfile.RUN[0].cmd == "RUN" assert basic_dockerfile.RUN[0].args == "apt-get update" assert basic_dockerfile.RUN[1].args == "apt-get install -y python" assert basic_dockerfile.RUN[2].args == "apt-get install -y python-pip" def test_comments(dockerfile_with_comments): assert len(dockerfile_with_comments.FROM) == 1 assert len(dockerfile_with_comments.RUN) == 1 assert len(dockerfile_with_comments.CMD) == 1 assert len(getattr(dockerfile_with_comments, '#')) == 3
35.107143
74
0.749746
137
983
5.160584
0.248175
0.275813
0.217822
0.169731
0.374823
0.158416
0
0
0
0
0
0.017943
0.149542
983
27
75
36.407407
0.827751
0.039674
0
0
0
0
0.090522
0
0
0
0
0
0.65
1
0.15
false
0
0.1
0
0.25
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
1
0
0
0
0
0
0
0
0
0
4
bb970afede1ceb2d9ae6c225722776b94e2b2a80
337
py
Python
assist/util.py
colonelzentor/assist
55e4ff2dcf048652872fe6dc21d9492600acc1ba
[ "MIT" ]
1
2021-04-14T19:51:32.000Z
2021-04-14T19:51:32.000Z
assist/util.py
colonelzentor/assist
55e4ff2dcf048652872fe6dc21d9492600acc1ba
[ "MIT" ]
null
null
null
assist/util.py
colonelzentor/assist
55e4ff2dcf048652872fe6dc21d9492600acc1ba
[ "MIT" ]
null
null
null
def verify_value(name, value, min_value=None, max_value=None, units='unitless'): if value is not None and ((min_value is not None and value < min_value) or (max_value is not None and value > max_value)): raise ValueError("Value for '{}' [{} ({})] outside of bounds [{}, {}]".format(name, value, units, min_value, max_value))
84.25
128
0.682493
53
337
4.169811
0.396226
0.144796
0.135747
0.190045
0.276018
0.199095
0
0
0
0
0
0
0.166172
337
3
129
112.333333
0.786477
0
0
0
0
0
0.175074
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.333333
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
bba6d6bcfb5649d2ea70309e9365d61a73e48477
1,616
py
Python
src/datashare/azext_datashare/generated/_client_factory.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/datashare/azext_datashare/generated/_client_factory.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/datashare/azext_datashare/generated/_client_factory.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- def cf_datashare(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from ..vendored_sdks.datashare import DataShareManagementClient return get_mgmt_service_client(cli_ctx, DataShareManagementClient) def cf_account(cli_ctx, *_): return cf_datashare(cli_ctx).account def cf_consumer_invitation(cli_ctx, *_): return cf_datashare(cli_ctx).consumer_invitation def cf_data_set(cli_ctx, *_): return cf_datashare(cli_ctx).data_set def cf_data_set_mapping(cli_ctx, *_): return cf_datashare(cli_ctx).data_set_mapping def cf_invitation(cli_ctx, *_): return cf_datashare(cli_ctx).invitation def cf_share(cli_ctx, *_): return cf_datashare(cli_ctx).share def cf_provider_share_subscription(cli_ctx, *_): return cf_datashare(cli_ctx).provider_share_subscription def cf_share_subscription(cli_ctx, *_): return cf_datashare(cli_ctx).share_subscription def cf_consumer_source_data_set(cli_ctx, *_): return cf_datashare(cli_ctx).consumer_source_data_set def cf_synchronization_setting(cli_ctx, *_): return cf_datashare(cli_ctx).synchronization_setting def cf_trigger(cli_ctx, *_): return cf_datashare(cli_ctx).trigger
29.381818
95
0.673267
196
1,616
5.096939
0.260204
0.144144
0.168168
0.204204
0.427427
0.427427
0.427427
0.34034
0.207207
0
0
0
0.142327
1,616
54
96
29.925926
0.720779
0.207921
0
0
0
0
0
0
0
0
0
0
0
1
0.461538
false
0
0.076923
0.423077
1
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
bbbab7491f97a2fe7a9ce869b4be98162075c512
3,199
py
Python
dia/libs/Properties.py
sosie-js/dia-test
eebf777c65487002ac9cb6cd4dd9e97466ba0f93
[ "CC0-1.0" ]
null
null
null
dia/libs/Properties.py
sosie-js/dia-test
eebf777c65487002ac9cb6cd4dd9e97466ba0f93
[ "CC0-1.0" ]
null
null
null
dia/libs/Properties.py
sosie-js/dia-test
eebf777c65487002ac9cb6cd4dd9e97466ba0f93
[ "CC0-1.0" ]
null
null
null
""" pydia: Properties.py - 2021.11 ================================================ Template code generated from UML diagrams of PyDia with 'dia2code -t python ../dia2code/PyDiaObjects.dia' Note: Experimental, will be obsolete if we found a way to use libdia /pydia libraries Author: SoSie@sos-productions.com License: LGPL """ import _once _once.imported['Properties']=None if not 'Property' in _once.imported.keys() : from dia.libs.Property import Property class Properties(dict): """Class Properties A dictionary interface to dia.Object's standard properties. Many propertiescan be get and set through this. If there is a specific method to change anobjects property like o.move() or o.move_handle() use that instead. """ # Attributes: # Operations def __init__(self, props, *args): dict.__init__(self, args) #I wonder if we really need this for prop in props.values(): name = prop["name"] type = prop["type"] value = prop["value"] visible = prop["visible"] self.__dict__[name] =Property(name, type, value, visible) def __setitem__(self, name, type, value, visible): prop = Property(name, type, value, visible) self.__dict__[key] = prop #item def __getitem__(self, key): #Make object subscritable ie if 'properties' is an instance of Properties #make properties[key] possible, equivalent in our case to properties.get(key)""" return self.__dict__[key] def get (self, key) : """get(key: str) -> Property returns the property matching the key """ val = self[key] return val def __repr__(self): return repr(self.__dict__) def __len__(self): return len(self.__dict__) def __delitem__(self, key): del self.__dict__[key] def clear(self): return self.__dict__.clear() def copy(self): return self.__dict__.copy() def has_key(self, k): """has_key(key: str) -> bool returns True if a property matching the key exists else False """ return k in self.__dict__ def update(self, *args, **kwargs): return self.__dict__.update(*args, **kwargs) def keys(self): """keys() -> list of str Get the list of property names """ return self.__dict__.keys() def values(self): return self.__dict__.values() def items(self): return self.__dict__.items() def pop(self, *args): return self.__dict__.pop(*args) def __cmp__(self, dict_): return self.__cmp__(self.__dict__, dict_) def __contains__(self, item): return item in self.__dict__ def __iter__(self): return iter(self.__dict__) def __unicode__(self): return unicode(repr(self.__dict__)) _once.imported['Properties']= Properties for name, object in _once.imported.items(): globals()[name]=object """ foo={"n1":{"name":"n1","type":"t1","value":"v1","visible":"d1"}} bar=Properties(foo) print(bar.keys()) print("--") print(bar.has_key("n1")) print(bar.get("n1")) """
27.34188
89
0.612379
401
3,199
4.558603
0.356608
0.083151
0.061269
0.039387
0.030635
0
0
0
0
0
0
0.006284
0.253829
3,199
117
90
27.34188
0.759531
0.305721
0
0
1
0
0.024628
0
0
0
0
0
0
1
0.351852
false
0
0.111111
0.240741
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
bbe4b12f6b3e182108d649e06e456db47e10f5e0
99
py
Python
src/sampleinfo/main.py
Manjunathsk92/sampleinfo
7b365818caebb97022a02d636e171988c99ae033
[ "MIT" ]
null
null
null
src/sampleinfo/main.py
Manjunathsk92/sampleinfo
7b365818caebb97022a02d636e171988c99ae033
[ "MIT" ]
null
null
null
src/sampleinfo/main.py
Manjunathsk92/sampleinfo
7b365818caebb97022a02d636e171988c99ae033
[ "MIT" ]
null
null
null
import platform def main(): return(platform.platform()) if __name__=='__main__': main()
11
31
0.656566
11
99
5.181818
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.191919
99
8
32
12.375
0.7125
0
0
0
0
0
0.080808
0
0
0
0
0
0
1
0.2
true
0
0.2
0.2
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
0
0
0
4
a5287e7dc00aa5ccbe0fa1c1aadfdd66cb4ef2c1
52
py
Python
python/testData/formatter/spacesAfterFromInYieldFrom_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/formatter/spacesAfterFromInYieldFrom_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/formatter/spacesAfterFromInYieldFrom_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def g(): yield 42 def f(): yield from g()
7.428571
18
0.480769
9
52
2.777778
0.666667
0
0
0
0
0
0
0
0
0
0
0.060606
0.365385
52
6
19
8.666667
0.69697
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
a5327ef2536404024198d6379e1c3168625c4bc8
159
py
Python
src/oolongt/__init__.py
schmamps/textteaser
e948ac6c0a4a4a44c7011206d7df236529d7813d
[ "MIT" ]
2
2020-02-18T09:13:13.000Z
2021-06-12T13:16:13.000Z
src/oolongt/__init__.py
schmamps/textteaser
e948ac6c0a4a4a44c7011206d7df236529d7813d
[ "MIT" ]
null
null
null
src/oolongt/__init__.py
schmamps/textteaser
e948ac6c0a4a4a44c7011206d7df236529d7813d
[ "MIT" ]
1
2019-05-05T14:43:53.000Z
2019-05-05T14:43:53.000Z
"""package init""" from .constants import BUILTIN, DEFAULT_IDIOM, DEFAULT_LENGTH # noqa: F401 from .text import score_body_sentences, summarize # noqa: F401
39.75
75
0.773585
21
159
5.666667
0.761905
0.134454
0
0
0
0
0
0
0
0
0
0.043478
0.132075
159
3
76
53
0.818841
0.220126
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