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
88b535e59e295e4ff6b018711f628e31e0fbef49
151
py
Python
LovaszSoftmax/tensorflow/__init__.py
ljhclover/pytorch_Unet_CZI
92a3c295077562161d747157fdcba998132d4a94
[ "Apache-2.0" ]
null
null
null
LovaszSoftmax/tensorflow/__init__.py
ljhclover/pytorch_Unet_CZI
92a3c295077562161d747157fdcba998132d4a94
[ "Apache-2.0" ]
null
null
null
LovaszSoftmax/tensorflow/__init__.py
ljhclover/pytorch_Unet_CZI
92a3c295077562161d747157fdcba998132d4a94
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2020-02-26 18:00 # @Author : Zonas # @Email : zonas.wang@gmail # @File : __init__.py.py # @Software: PyCharm
25.166667
29
0.576159
21
151
3.952381
0.904762
0
0
0
0
0
0
0
0
0
0
0.110169
0.218543
151
6
30
25.166667
0.59322
0.92053
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
ee008187ea91d978373878b61ba13b6c974769f9
217
py
Python
server/src/bookshelf/bind.py
levii/gumo-example
87692973228f08d1e8d2c6a726940550d1518669
[ "MIT" ]
null
null
null
server/src/bookshelf/bind.py
levii/gumo-example
87692973228f08d1e8d2c6a726940550d1518669
[ "MIT" ]
8
2020-05-20T17:02:08.000Z
2022-02-11T02:50:40.000Z
server/src/bookshelf/bind.py
levii/gumo-example
87692973228f08d1e8d2c6a726940550d1518669
[ "MIT" ]
null
null
null
from bookshelf.application.book.repository import BookRepository from bookshelf.infrastructure.repository import DatastoreBookRepository def bind(binder): binder.bind(BookRepository, to=DatastoreBookRepository)
31
71
0.857143
21
217
8.857143
0.619048
0.139785
0
0
0
0
0
0
0
0
0
0
0.082949
217
6
72
36.166667
0.934673
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.5
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
1
0
0
0
0
4
ee09bfc0ace8003371277ddcaaad9355f61308bb
957
py
Python
tml/utils.py
rcrowther/django-tml
ffb6b6a0b34a96e7c9002a58ba78783bf6b5d9e4
[ "BSD-3-Clause" ]
3
2020-09-23T04:36:22.000Z
2021-03-06T15:02:33.000Z
tml/utils.py
rcrowther/django-tml
ffb6b6a0b34a96e7c9002a58ba78783bf6b5d9e4
[ "BSD-3-Clause" ]
null
null
null
tml/utils.py
rcrowther/django-tml
ffb6b6a0b34a96e7c9002a58ba78783bf6b5d9e4
[ "BSD-3-Clause" ]
null
null
null
from collections import deque class Stack(): # Python drains def __init__(self): self.stack = deque() @property def isEmpty(self): return (len(self.stack) == 0) @property def length(self): return len(self.stack) def push(self, e): self.stack.appendleft(e) def pop(self): ''' return top element from stack. If empty, None ''' r = None if (self.stack): r = self.stack.popleft() return r def head(self): ''' return top element on stack, if empty, None ''' r = None if (self.stack): r = self.stack[0] return r def reverse(self): return reversed(self.stack) def __repr__(self): xe = ', '.join((str(e) for e in self.stack)) return "Stack({})".format(xe)
19.9375
52
0.470219
106
957
4.169811
0.367925
0.20362
0.058824
0.076923
0.289593
0.190045
0.190045
0.190045
0.190045
0.190045
0
0.003584
0.416928
957
47
53
20.361702
0.78853
0.117032
0
0.296296
0
0
0.014067
0
0
0
0
0
0
1
0.296296
false
0
0.037037
0.111111
0.592593
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
ee23dac3f2701bc79cc68e8b6c81448e86fe3ca1
123
py
Python
lesson01/monkey/ipt4.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
lesson01/monkey/ipt4.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
lesson01/monkey/ipt4.py
herrywen-nanj/51reboot
1130c79a360e1b548a6eaad176eb60f8bed22f40
[ "Apache-2.0" ]
null
null
null
num1 = int(input("Please input your num1:")) num2 = int(input("Please input your num2:")) s = num1 + num2 print(s)
9.461538
44
0.626016
19
123
4.052632
0.421053
0.207792
0.363636
0.493506
0.597403
0
0
0
0
0
0
0.061856
0.211382
123
12
45
10.25
0.731959
0
0
0
0
0
0.383333
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
ee43de24a6087ae474afc4b1906653c714b59a12
35,483
py
Python
lib/medipy/gui/colormaps.py
bsavelev/medipy
f0da3750a6979750d5f4c96aedc89ad5ae74545f
[ "CECILL-B" ]
null
null
null
lib/medipy/gui/colormaps.py
bsavelev/medipy
f0da3750a6979750d5f4c96aedc89ad5ae74545f
[ "CECILL-B" ]
null
null
null
lib/medipy/gui/colormaps.py
bsavelev/medipy
f0da3750a6979750d5f4c96aedc89ad5ae74545f
[ "CECILL-B" ]
1
2022-03-04T05:47:08.000Z
2022-03-04T05:47:08.000Z
########################################################################## # MediPy - Copyright (C) Universite de Strasbourg # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for details. ########################################################################## import colorsys import medipy.base colormaps = { "blue" : [[0.0, 0.0, x/256.0, 1.0] for x in range(256)], "gray" : [[x/256.0, x/256.0, x/256.0, 1.0] for x in range(256)], "rainbow" : [[0.0, 0.0, 0.0, 1.0]]+[list(colorsys.hsv_to_rgb(h/256.0, 1.0, 1.0))+[1.0] for h in range(1, 256)], "purple" : [[x/256.0, 0.0, x/256.0, 1.0] for x in range(256)], "gray_invert2" : [[0.0, 0.0, 0.0, 1.0]]+[[(254-x)/256.0, (254-x)/256.0, (254-x)/256.0, 1.0] for x in range(255)], "yellow" : [[x/256.0, x/256.0, 0.0, 1.0] for x in range(256)], "rainbow2" : [[1.0, 0.19999999999999996, 0.92000000000000015, 1.0], [1.0, 0.19999999999999996, 0.93599999999999939, 1.0], [1.0, 0.19999999999999996, 0.95199999999999974, 1.0], [1.0, 0.19999999999999996, 0.96800000000000019, 1.0], [1.0, 0.19999999999999996, 0.98399999999999932, 1.0], [0.99999999999999933, 0.19999999999999996, 1.0, 1.0], [0.98399999999999999, 0.19999999999999996, 1.0, 1.0], [0.96799999999999964, 0.19999999999999996, 1.0, 1.0], [0.95200000000000018, 0.19999999999999996, 1.0, 1.0], [0.93599999999999994, 0.19999999999999996, 1.0, 1.0], [0.9199999999999996, 0.19999999999999996, 1.0, 1.0], [0.90400000000000025, 0.19999999999999996, 1.0, 1.0], [0.8879999999999999, 0.19999999999999996, 1.0, 1.0], [0.87199999999999955, 0.19999999999999996, 1.0, 1.0], [0.85600000000000021, 0.19999999999999996, 1.0, 1.0], [0.83999999999999986, 0.19999999999999996, 1.0, 1.0], [0.82399999999999951, 0.19999999999999996, 1.0, 1.0], [0.80800000000000016, 0.19999999999999996, 1.0, 1.0], [0.79199999999999982, 0.19999999999999996, 1.0, 1.0], [0.77599999999999947, 0.19999999999999996, 1.0, 1.0], [0.76000000000000012, 0.19999999999999996, 1.0, 1.0], [0.74399999999999977, 0.19999999999999996, 1.0, 1.0], [0.72799999999999943, 0.19999999999999996, 1.0, 1.0], [0.71200000000000008, 0.19999999999999996, 1.0, 1.0], [0.69599999999999973, 0.19999999999999996, 1.0, 1.0], [0.67999999999999938, 0.19999999999999996, 1.0, 1.0], [0.66400000000000003, 0.19999999999999996, 1.0, 1.0], [0.64799999999999969, 0.19999999999999996, 1.0, 1.0], [0.63199999999999923, 0.19999999999999996, 1.0, 1.0], [0.61599999999999999, 0.19999999999999996, 1.0, 1.0], [0.59999999999999964, 0.19999999999999996, 1.0, 1.0], [0.5840000000000003, 0.19999999999999996, 1.0, 1.0], [0.56799999999999995, 0.19999999999999996, 1.0, 1.0], [0.5519999999999996, 0.19999999999999996, 1.0, 1.0], [0.53600000000000025, 0.19999999999999996, 1.0, 1.0], [0.51999999999999991, 0.19999999999999996, 1.0, 1.0], [0.50399999999999956, 0.19999999999999996, 1.0, 1.0], [0.48800000000000021, 0.19999999999999996, 1.0, 1.0], [0.47199999999999986, 0.19999999999999996, 1.0, 1.0], [0.45599999999999952, 0.19999999999999996, 1.0, 1.0], [0.44000000000000017, 0.19999999999999996, 1.0, 1.0], [0.42399999999999982, 0.19999999999999996, 1.0, 1.0], [0.40799999999999947, 0.19999999999999996, 1.0, 1.0], [0.39200000000000013, 0.19999999999999996, 1.0, 1.0], [0.37599999999999978, 0.19999999999999996, 1.0, 1.0], [0.35999999999999943, 0.19999999999999996, 1.0, 1.0], [0.34400000000000008, 0.19999999999999996, 1.0, 1.0], [0.32799999999999974, 0.19999999999999996, 1.0, 1.0], [0.31199999999999933, 0.19999999999999996, 1.0, 1.0], [0.29600000000000004, 0.19999999999999996, 1.0, 1.0], [0.27999999999999969, 0.19999999999999996, 1.0, 1.0], [0.26399999999999929, 0.19999999999999996, 1.0, 1.0], [0.248, 0.19999999999999996, 1.0, 1.0], [0.23199999999999962, 0.19999999999999996, 1.0, 1.0], [0.21599999999999925, 0.19999999999999996, 1.0, 1.0], [0.19999999999999996, 0.19999999999999996, 1.0, 1.0], [0.19999999999999996, 0.2159999999999998, 1.0, 1.0], [0.19999999999999996, 0.23199999999999962, 1.0, 1.0], [0.19999999999999996, 0.248, 1.0, 1.0], [0.19999999999999996, 0.26399999999999985, 1.0, 1.0], [0.19999999999999996, 0.28000000000000019, 1.0, 1.0], [0.19999999999999996, 0.29600000000000004, 1.0, 1.0], [0.19999999999999996, 0.31199999999999989, 1.0, 1.0], [0.19999999999999996, 0.32799999999999974, 1.0, 1.0], [0.19999999999999996, 0.34399999999999953, 1.0, 1.0], [0.19999999999999996, 0.35999999999999993, 1.0, 1.0], [0.19999999999999996, 0.37599999999999978, 1.0, 1.0], [0.19999999999999996, 0.39199999999999957, 1.0, 1.0], [0.19999999999999996, 0.40799999999999997, 1.0, 1.0], [0.19999999999999996, 0.42399999999999982, 1.0, 1.0], [0.19999999999999996, 0.43999999999999967, 1.0, 1.0], [0.19999999999999996, 0.45600000000000002, 1.0, 1.0], [0.19999999999999996, 0.47199999999999986, 1.0, 1.0], [0.19999999999999996, 0.48799999999999971, 1.0, 1.0], [0.19999999999999996, 0.504, 1.0, 1.0], [0.19999999999999996, 0.51999999999999991, 1.0, 1.0], [0.19999999999999996, 0.53599999999999981, 1.0, 1.0], [0.19999999999999996, 0.55200000000000005, 1.0, 1.0], [0.19999999999999996, 0.56799999999999995, 1.0, 1.0], [0.19999999999999996, 0.58399999999999985, 1.0, 1.0], [0.19999999999999996, 0.60000000000000009, 1.0, 1.0], [0.19999999999999996, 0.61599999999999944, 1.0, 1.0], [0.19999999999999996, 0.6319999999999999, 1.0, 1.0], [0.19999999999999996, 0.64800000000000013, 1.0, 1.0], [0.19999999999999996, 0.66399999999999948, 1.0, 1.0], [0.19999999999999996, 0.67999999999999994, 1.0, 1.0], [0.19999999999999996, 0.69599999999999973, 1.0, 1.0], [0.19999999999999996, 0.71200000000000008, 1.0, 1.0], [0.19999999999999996, 0.72799999999999998, 1.0, 1.0], [0.19999999999999996, 0.74399999999999977, 1.0, 1.0], [0.19999999999999996, 0.75999999999999956, 1.0, 1.0], [0.19999999999999996, 0.77600000000000002, 1.0, 1.0], [0.19999999999999996, 0.79200000000000037, 1.0, 1.0], [0.19999999999999996, 0.80799999999999961, 1.0, 1.0], [0.19999999999999996, 0.82400000000000007, 1.0, 1.0], [0.19999999999999996, 0.83999999999999986, 1.0, 1.0], [0.19999999999999996, 0.85599999999999965, 1.0, 1.0], [0.19999999999999996, 0.87200000000000011, 1.0, 1.0], [0.19999999999999996, 0.8879999999999999, 1.0, 1.0], [0.19999999999999996, 0.90399999999999969, 1.0, 1.0], [0.19999999999999996, 0.92000000000000015, 1.0, 1.0], [0.19999999999999996, 0.93599999999999994, 1.0, 1.0], [0.19999999999999996, 0.95199999999999974, 1.0, 1.0], [0.19999999999999996, 0.96800000000000019, 1.0, 1.0], [0.19999999999999996, 0.98399999999999932, 1.0, 1.0], [0.19999999999999996, 0.99999999999999978, 1.0, 1.0], [0.19999999999999996, 1.0, 0.98399999999999999, 1.0], [0.19999999999999996, 1.0, 0.96799999999999975, 1.0], [0.19999999999999996, 1.0, 0.95200000000000007, 1.0], [0.19999999999999996, 1.0, 0.93600000000000017, 1.0], [0.19999999999999996, 1.0, 0.92000000000000015, 1.0], [0.19999999999999996, 1.0, 0.90400000000000003, 1.0], [0.19999999999999996, 1.0, 0.8879999999999999, 1.0], [0.19999999999999996, 1.0, 0.87200000000000011, 1.0], [0.19999999999999996, 1.0, 0.85600000000000021, 1.0], [0.19999999999999996, 1.0, 0.83999999999999986, 1.0], [0.19999999999999996, 1.0, 0.82400000000000007, 1.0], [0.19999999999999996, 1.0, 0.80799999999999994, 1.0], [0.19999999999999996, 1.0, 0.79200000000000004, 1.0], [0.19999999999999996, 1.0, 0.77600000000000025, 1.0], [0.19999999999999996, 1.0, 0.7599999999999999, 1.0], [0.19999999999999996, 1.0, 0.74399999999999999, 1.0], [0.19999999999999996, 1.0, 0.72799999999999998, 1.0], [0.19999999999999996, 1.0, 0.71200000000000008, 1.0], [0.19999999999999996, 1.0, 0.69600000000000029, 1.0], [0.19999999999999996, 1.0, 0.67999999999999994, 1.0], [0.19999999999999996, 1.0, 0.66400000000000003, 1.0], [0.19999999999999996, 1.0, 0.64799999999999991, 1.0], [0.19999999999999996, 1.0, 0.63200000000000012, 1.0], [0.19999999999999996, 1.0, 0.61599999999999999, 1.0], [0.19999999999999996, 1.0, 0.59999999999999987, 1.0], [0.19999999999999996, 1.0, 0.58400000000000007, 1.0], [0.19999999999999996, 1.0, 0.56799999999999995, 1.0], [0.19999999999999996, 1.0, 0.55200000000000005, 1.0], [0.19999999999999996, 1.0, 0.53600000000000003, 1.0], [0.19999999999999996, 1.0, 0.51999999999999991, 1.0], [0.19999999999999996, 1.0, 0.504, 1.0], [0.19999999999999996, 1.0, 0.48799999999999999, 1.0], [0.19999999999999996, 1.0, 0.47200000000000014, 1.0], [0.19999999999999996, 1.0, 0.45600000000000002, 1.0], [0.19999999999999996, 1.0, 0.43999999999999995, 1.0], [0.19999999999999996, 1.0, 0.42400000000000004, 1.0], [0.19999999999999996, 1.0, 0.40799999999999997, 1.0], [0.19999999999999996, 1.0, 0.3919999999999999, 1.0], [0.19999999999999996, 1.0, 0.376, 1.0], [0.19999999999999996, 1.0, 0.35999999999999993, 1.0], [0.19999999999999996, 1.0, 0.34400000000000008, 1.0], [0.19999999999999996, 1.0, 0.32799999999999996, 1.0], [0.19999999999999996, 1.0, 0.31199999999999989, 1.0], [0.19999999999999996, 1.0, 0.29600000000000004, 1.0], [0.19999999999999996, 1.0, 0.27999999999999992, 1.0], [0.19999999999999996, 1.0, 0.26400000000000012, 1.0], [0.19999999999999996, 1.0, 0.24800000000000028, 1.0], [0.19999999999999996, 1.0, 0.23200000000000043, 1.0], [0.19999999999999996, 1.0, 0.21600000000000005, 1.0], [0.20000000000000048, 1.0, 0.19999999999999996, 1.0], [0.2159999999999998, 1.0, 0.19999999999999996, 1.0], [0.23200000000000015, 1.0, 0.19999999999999996, 1.0], [0.24799999999999947, 1.0, 0.19999999999999996, 1.0], [0.26399999999999985, 1.0, 0.19999999999999996, 1.0], [0.28000000000000019, 1.0, 0.19999999999999996, 1.0], [0.29599999999999949, 1.0, 0.19999999999999996, 1.0], [0.31199999999999989, 1.0, 0.19999999999999996, 1.0], [0.32799999999999918, 1.0, 0.19999999999999996, 1.0], [0.34399999999999953, 1.0, 0.19999999999999996, 1.0], [0.35999999999999993, 1.0, 0.19999999999999996, 1.0], [0.37600000000000033, 1.0, 0.19999999999999996, 1.0], [0.39199999999999957, 1.0, 0.19999999999999996, 1.0], [0.40799999999999997, 1.0, 0.19999999999999996, 1.0], [0.42400000000000038, 1.0, 0.19999999999999996, 1.0], [0.43999999999999967, 1.0, 0.19999999999999996, 1.0], [0.45600000000000002, 1.0, 0.19999999999999996, 1.0], [0.47199999999999931, 1.0, 0.19999999999999996, 1.0], [0.48799999999999971, 1.0, 0.19999999999999996, 1.0], [0.504, 1.0, 0.19999999999999996, 1.0], [0.52000000000000046, 1.0, 0.19999999999999996, 1.0], [0.53599999999999981, 1.0, 0.19999999999999996, 1.0], [0.55200000000000005, 1.0, 0.19999999999999996, 1.0], [0.56799999999999939, 1.0, 0.19999999999999996, 1.0], [0.58399999999999985, 1.0, 0.19999999999999996, 1.0], [0.60000000000000009, 1.0, 0.19999999999999996, 1.0], [0.61599999999999944, 1.0, 0.19999999999999996, 1.0], [0.6319999999999999, 1.0, 0.19999999999999996, 1.0], [0.64800000000000013, 1.0, 0.19999999999999996, 1.0], [0.66400000000000059, 1.0, 0.19999999999999996, 1.0], [0.67999999999999994, 1.0, 0.19999999999999996, 1.0], [0.69600000000000029, 1.0, 0.19999999999999996, 1.0], [0.71199999999999952, 1.0, 0.19999999999999996, 1.0], [0.72799999999999998, 1.0, 0.19999999999999996, 1.0], [0.74400000000000033, 1.0, 0.19999999999999996, 1.0], [0.75999999999999956, 1.0, 0.19999999999999996, 1.0], [0.77600000000000002, 1.0, 0.19999999999999996, 1.0], [0.79199999999999926, 1.0, 0.19999999999999996, 1.0], [0.80799999999999961, 1.0, 0.19999999999999996, 1.0], [0.82400000000000007, 1.0, 0.19999999999999996, 1.0], [0.84000000000000041, 1.0, 0.19999999999999996, 1.0], [0.85599999999999965, 1.0, 0.19999999999999996, 1.0], [0.87200000000000011, 1.0, 0.19999999999999996, 1.0], [0.88799999999999935, 1.0, 0.19999999999999996, 1.0], [0.90399999999999969, 1.0, 0.19999999999999996, 1.0], [0.92000000000000015, 1.0, 0.19999999999999996, 1.0], [0.93599999999999939, 1.0, 0.19999999999999996, 1.0], [0.95199999999999974, 1.0, 0.19999999999999996, 1.0], [0.96800000000000019, 1.0, 0.19999999999999996, 1.0], [0.98400000000000054, 1.0, 0.19999999999999996, 1.0], [1.0, 0.99999999999999978, 0.19999999999999996, 1.0], [1.0, 0.98399999999999999, 0.19999999999999996, 1.0], [1.0, 0.96800000000000019, 0.19999999999999996, 1.0], [1.0, 0.95200000000000018, 0.19999999999999996, 1.0], [1.0, 0.93599999999999994, 0.19999999999999996, 1.0], [1.0, 0.92000000000000015, 0.19999999999999996, 1.0], [1.0, 0.90399999999999969, 0.19999999999999996, 1.0], [1.0, 0.8879999999999999, 0.19999999999999996, 1.0], [1.0, 0.87200000000000011, 0.19999999999999996, 1.0], [1.0, 0.85599999999999965, 0.19999999999999996, 1.0], [1.0, 0.83999999999999986, 0.19999999999999996, 1.0], [1.0, 0.82400000000000007, 0.19999999999999996, 1.0], [1.0, 0.80800000000000016, 0.19999999999999996, 1.0], [1.0, 0.79200000000000037, 0.19999999999999996, 1.0], [1.0, 0.77600000000000002, 0.19999999999999996, 1.0], [1.0, 0.76000000000000012, 0.19999999999999996, 1.0], [1.0, 0.74399999999999977, 0.19999999999999996, 1.0], [1.0, 0.72799999999999998, 0.19999999999999996, 1.0], [1.0, 0.71200000000000008, 0.19999999999999996, 1.0], [1.0, 0.69599999999999973, 0.19999999999999996, 1.0], [1.0, 0.67999999999999994, 0.19999999999999996, 1.0], [1.0, 0.66400000000000003, 0.19999999999999996, 1.0], [1.0, 0.64800000000000013, 0.19999999999999996, 1.0], [1.0, 0.63200000000000034, 0.19999999999999996, 1.0], [1.0, 0.61599999999999999, 0.19999999999999996, 1.0], [1.0, 0.59999999999999964, 0.19999999999999996, 1.0], [1.0, 0.58399999999999985, 0.19999999999999996, 1.0], [1.0, 0.56799999999999995, 0.19999999999999996, 1.0], [1.0, 0.55200000000000005, 0.19999999999999996, 1.0], [1.0, 0.53599999999999981, 0.19999999999999996, 1.0], [1.0, 0.51999999999999991, 0.19999999999999996, 1.0], [1.0, 0.504, 0.19999999999999996, 1.0], [1.0, 0.48800000000000021, 0.19999999999999996, 1.0], [1.0, 0.47200000000000042, 0.19999999999999996, 1.0], [1.0, 0.45600000000000002, 0.19999999999999996, 1.0], [1.0, 0.43999999999999967, 0.19999999999999996, 1.0], [1.0, 0.42399999999999982, 0.19999999999999996, 1.0], [1.0, 0.40799999999999997, 0.19999999999999996, 1.0], [1.0, 0.39200000000000013, 0.19999999999999996, 1.0], [1.0, 0.37599999999999978, 0.19999999999999996, 1.0], [1.0, 0.35999999999999993, 0.19999999999999996, 1.0], [1.0, 0.34400000000000008, 0.19999999999999996, 1.0], [1.0, 0.32800000000000029, 0.19999999999999996, 1.0], [1.0, 0.31200000000000039, 0.19999999999999996, 1.0], [1.0, 0.29599999999999949, 0.19999999999999996, 1.0], [1.0, 0.27999999999999969, 0.19999999999999996, 1.0], [1.0, 0.26399999999999985, 0.19999999999999996, 1.0], [1.0, 0.248, 0.19999999999999996, 1.0], [1.0, 0.23200000000000015, 0.19999999999999996, 1.0], [1.0, 0.2159999999999998, 0.19999999999999996, 1.0], [1.0, 0.19999999999999996, 0.19999999999999996, 1.0]], "green" : [[0.0, x/256.0, 0.0, 1.0] for x in range(256)], "hot_iron" : [[0.0, 0, 0, 1.0], [0.011700140041559396, 0, 0, 1.0], [0.023283861744547444, 0, 0, 1.0], [0.034752323490787239, 0, 0, 1.0], [0.046106672136010683, 0, 0, 1.0], [0.057348043124544189, 0, 0, 1.0], [0.068477560602854551, 0, 0, 1.0], [0.079496337531964154, 0, 0, 1.0], [0.0904054757987484, 0, 0, 1.0], [0.10120606632612471, 0, 0, 1.0], [0.11189918918214657, 0, 0, 1.0], [0.12248591368801034, 0, 0, 1.0], [0.13296729852498906, 0, 0, 1.0], [0.14334439184030084, 0, 0, 1.0], [0.15361823135192484, 0, 0, 1.0], [0.16378984445237393, 0, 0, 1.0], [0.17386024831143437, 0, 0, 1.0], [0.18383044997788411, 0, 0, 1.0], [0.19370144648019844, 0, 0, 1.0], [0.20347422492625331, 0, 0, 1.0], [0.21314976260203738, 0, 0, 1.0], [0.22272902706938119, 0, 0, 1.0], [0.2322129762627142, 0, 0, 1.0], [0.24160255858485913, 0, 0, 1.0], [0.25089871300187283, 0, 0, 1.0], [0.26010236913694396, 0, 0, 1.0], [0.26921444736335565, 0, 0, 1.0], [0.27823585889652386, 0, 0, 1.0], [0.28716750588511986, 0, 0, 1.0], [0.29601028150128555, 0, 0, 1.0], [0.30476507002995168, 0, 0, 1.0], [0.31343274695726675, 0, 0, 1.0], [0.32201417905814639, 0, 0, 1.0], [0.33051022448295214, 0, 0, 1.0], [0.33892173284330651, 0, 0, 1.0], [0.34724954529705493, 0, 0, 1.0], [0.35549449463238297, 0, 0, 1.0], [0.36365740535109464, 0, 0, 1.0], [0.37173909375106462, 0, 0, 1.0], [0.37974036800786737, 0, 0, 1.0], [0.38766202825559637, 0, 0, 1.0], [0.39550486666687795, 0, 0, 1.0], [0.40326966753208893, 0, 0, 1.0], [0.41095720733778635, 0, 0, 1.0], [0.41856825484435711, 0, 0, 1.0], [0.42610357116289466, 0, 0, 1.0], [0.43356390983131016, 0, 0, 1.0], [0.44095001688968738, 0, 0, 1.0], [0.44826263095488728, 0, 0, 1.0], [0.45550248329441023, 0, 0, 1.0], [0.46267029789952357, 0, 0, 1.0], [0.46976679155766088, 0, 0, 1.0], [0.47679267392410157, 0, 0, 1.0], [0.48374864759293756, 0, 0, 1.0], [0.4906354081673322, 0, 0, 1.0], [0.49745364432908196, 0, 0, 1.0], [0.5042040379074848, 0, 0, 1.0], [0.51088726394752404, 0, 0, 1.0], [0.51750399077737286, 0, 0, 1.0], [0.52405488007522849, 0, 0, 1.0], [0.53054058693547967, 0, 0, 1.0], [0.53696175993421713, 0, 0, 1.0], [0.5433190411940918, 0, 0, 1.0], [0.54961306644852748, 0, 0, 1.0], [0.55584446510529451, 0, 0, 1.0], [0.56201386030945155, 0, 0, 1.0], [0.5681218690056602, 0, 0, 1.0], [0.57416910199987992, 0, 0, 1.0], [0.58015616402044967, 0, 0, 1.0], [0.58608365377856064, 0, 0, 1.0], [0.59195216402812845, 0, 0, 1.0], [0.59776228162506828, 0, 0, 1.0], [0.60351458758598164, 0, 0, 1.0], [0.6092096571462583, 0, 0, 1.0], [0.61484805981760016, 0, 0, 1.0], [0.62043035944497316, 0, 0, 1.0], [0.62595711426299161, 0, 0, 1.0], [0.63142887695174332, 0, 0, 1.0], [0.63684619469205683, 0, 0, 1.0], [0.64220960922022052, 0, 0, 1.0], [0.64751965688215707, 0, 0, 1.0], [0.65277686868705742, 0, 0, 1.0], [0.65798177036048311, 0, 0, 1.0], [0.66313488239693907, 0, 0, 1.0], [0.66823672011192314, 0, 0, 1.0], [0.67328779369345826, 0, 0, 1.0], [0.67828860825311188, 0, 0, 1.0], [0.68323966387650759, 0, 0, 1.0], [0.68814145567333329, 0, 0, 1.0], [0.69299447382685342, 0, 0, 1.0], [0.69779920364292802, 0, 0, 1.0], [0.70255612559854219, 0, 0, 1.0], [0.70726571538985583, 0, 0, 1.0], [0.71192844397977273, 0, 0, 1.0], [0.71654477764503721, 0, 0, 1.0], [0.72111517802286307, 0, 0, 1.0], [0.72564010215709673, 0, 0, 1.0], [0.73012000254392251, 0, 0, 1.0], [0.73455532717711203, 0, 0, 1.0], [0.73894651959282498, 0, 0, 1.0], [0.74329401891396218, 0.0, 0, 1.0], [0.74759825989407869, 0.0064516129032258064, 0, 1.0], [0.75185967296085932, 0.012903225806451613, 0, 1.0], [0.75607868425916225, 0.01935483870967742, 0, 1.0], [0.76025571569363271, 0.025806451612903226, 0, 1.0], [0.76439118497089542, 0.032258064516129031, 0, 1.0], [0.7684855056413239, 0.03870967741935484, 0, 1.0], [0.77253908714039765, 0.045161290322580643, 0, 1.0], [0.77655233482964414, 0.051612903225806452, 0, 1.0], [0.78052565003717689, 0.058064516129032261, 0, 1.0], [0.78445943009782781, 0.064516129032258063, 0, 1.0], [0.78835406839288102, 0.070967741935483872, 0, 1.0], [0.79220995438941155, 0.077419354838709681, 0, 1.0], [0.79602747367923243, 0.08387096774193549, 0, 1.0], [0.79980700801745364, 0.090322580645161285, 0, 1.0], [0.80354893536065897, 0.096774193548387094, 0, 1.0], [0.80725362990470095, 0.1032258064516129, 0, 1.0], [0.81092146212212102, 0.10967741935483871, 0, 1.0], [0.81455279879919762, 0.11612903225806452, 0, 1.0], [0.81814800307262447, 0.12258064516129032, 0, 1.0], [0.82170743446582517, 0.12903225806451613, 0, 1.0], [0.82523144892490519, 0.13548387096774195, 0, 1.0], [0.82872039885424686, 0.14193548387096774, 0, 1.0], [0.83217463315175089, 0.14838709677419354, 0, 1.0], [0.83559449724372525, 0.15483870967741936, 0, 1.0], [0.83898033311942932, 0.16129032258064516, 0, 1.0], [0.842332479365272, 0.16774193548387098, 0, 1.0], [0.84565127119867167, 0.17419354838709677, 0, 1.0], [0.84893704050157692, 0.18064516129032257, 0, 1.0], [0.85219011585365656, 0.18709677419354839, 0, 1.0], [0.85541082256515644, 0.19354838709677419, 0, 1.0], [0.85859948270943154, 0.20000000000000001, 0, 1.0], [0.86175641515515389, 0.20645161290322581, 0, 1.0], [0.86488193559819859, 0.2129032258064516, 0, 1.0], [0.8679763565932147, 0.21935483870967742, 0, 1.0], [0.87103998758488033, 0.22580645161290322, 0, 1.0], [0.87407313493884764, 0.23225806451612904, 0, 1.0], [0.87707610197237962, 0.23870967741935484, 0, 1.0], [0.88004918898468221, 0.24516129032258063, 0, 1.0], [0.88299269328693419, 0.25161290322580643, 0, 1.0], [0.88590690923201898, 0.25806451612903225, 0, 1.0], [0.88879212824395903, 0.26451612903225807, 0, 1.0], [0.89164863884706047, 0.2709677419354839, 0, 1.0], [0.89447672669476352, 0.27741935483870966, 0, 1.0], [0.89727667459821014, 0.28387096774193549, 0, 1.0], [0.90004876255452382, 0.29032258064516131, 0, 1.0], [0.90279326777481017, 0.29677419354838708, 0, 1.0], [0.90551046471187846, 0.3032258064516129, 0, 1.0], [0.90820062508768662, 0.30967741935483872, 0, 1.0], [0.91086401792051408, 0.31612903225806449, 0, 1.0], [0.91350090955186369, 0.32258064516129031, 0, 1.0], [0.91611156367309599, 0.32903225806451614, 0, 1.0], [0.91869624135179839, 0.33548387096774196, 0, 1.0], [0.92125520105789316, 0.34193548387096773, 0, 1.0], [0.92378869868948288, 0.34838709677419355, 0, 1.0], [0.92629698759844226, 0.35483870967741937, 0, 1.0], [0.9287803186157525, 0.36129032258064514, 0, 1.0], [0.93123894007658459, 0.36774193548387096, 0, 1.0], [0.93367309784513342, 0.37419354838709679, 0, 1.0], [0.93608303533920456, 0.38064516129032255, 0, 1.0], [0.9384689935545556, 0.38709677419354838, 0, 1.0], [0.94083121108899626, 0.3935483870967742, 0, 1.0], [0.94316992416624856, 0.40000000000000002, 0, 1.0], [0.94548536665956928, 0.40645161290322579, 0, 1.0], [0.9477777701151372, 0.41290322580645161, 0, 1.0], [0.95004736377520826, 0.41935483870967744, 0, 1.0], [0.95229437460103983, 0.4258064516129032, 0, 1.0], [0.9545190272955868, 0.43225806451612903, 0, 1.0], [0.95672154432597289, 0.43870967741935485, 0, 1.0], [0.9589021459457362, 0.44516129032258067, 0, 1.0], [0.96106105021685606, 0.45161290322580644, 0, 1.0], [0.9631984730315587, 0.45806451612903226, 0, 1.0], [0.96531462813390667, 0.46451612903225808, 0, 1.0], [0.96740972714117368, 0.47096774193548385, 0, 1.0], [0.96948397956500665, 0.47741935483870968, 0, 1.0], [0.97153759283237595, 0.4838709677419355, 0, 1.0], [0.97357077230632028, 0.49032258064516127, 0, 1.0], [0.97558372130648097, 0.49677419354838709, 0, 1.0], [0.97757664112943565, 0.50322580645161286, 0, 1.0], [0.97954973106882737, 0.50967741935483868, 0, 1.0], [0.98150318843529427, 0.5161290322580645, 0, 1.0], [0.98343720857620098, 0.52258064516129032, 0, 1.0], [0.98535198489517306, 0.52903225806451615, 0, 1.0], [0.98724770887143831, 0.53548387096774197, 0, 1.0], [0.98912457007897414, 0.54193548387096779, 0, 1.0], [0.99098275620546505, 0.54838709677419351, 0, 1.0], [0.99282245307107242, 0.55483870967741933, 0, 1.0], [0.99464384464701594, 0.56129032258064515, 0, 1.0], [0.99644711307397082, 0.56774193548387097, 0, 1.0], [0.99823243868028277, 0.5741935483870968, 0, 1.0], [1.0, 0.58064516129032262, 0.0, 1.0], [1.0, 0.58709677419354833, 0.011899038461538461, 1.0], [1.0, 0.59354838709677415, 0.023798076923076922, 1.0], [1.0, 0.59999999999999998, 0.035697115384615383, 1.0], [1.0, 0.6064516129032258, 0.047596153846153844, 1.0], [1.0, 0.61290322580645162, 0.059495192307692304, 1.0], [1.0, 0.61935483870967745, 0.071394230769230765, 1.0], [1.0, 0.62580645161290327, 0.083293269230769226, 1.0], [1.0, 0.63225806451612898, 0.095192307692307687, 1.0], [1.0, 0.6387096774193548, 0.10709134615384615, 1.0], [1.0, 0.64516129032258063, 0.11899038461538461, 1.0], [1.0, 0.65161290322580645, 0.13088942307692308, 1.0], [1.0, 0.65806451612903227, 0.14278846153846153, 1.0], [1.0, 0.6645161290322581, 0.15468750000000001, 1.0], [1.0, 0.67096774193548392, 0.16658653846153845, 1.0], [1.0, 0.67741935483870963, 0.17848557692307693, 1.0], [1.0, 0.68387096774193545, 0.19038461538461537, 1.0], [1.0, 0.69032258064516128, 0.20228365384615385, 1.0], [1.0, 0.6967741935483871, 0.2141826923076923, 1.0], [1.0, 0.70322580645161292, 0.22608173076923077, 1.0], [1.0, 0.70967741935483875, 0.23798076923076922, 1.0], [1.0, 0.71612903225806457, 0.24987980769230769, 1.0], [1.0, 0.72258064516129028, 0.26177884615384617, 1.0], [1.0, 0.7290322580645161, 0.27367788461538461, 1.0], [1.0, 0.73548387096774193, 0.28557692307692306, 1.0], [1.0, 0.74193548387096775, 0.29747596153846156, 1.0], [1.0, 0.74838709677419357, 0.30937500000000001, 1.0], [1.0, 0.75483870967741939, 0.32127403846153846, 1.0], [1.0, 0.76129032258064511, 0.33317307692307691, 1.0], [1.0, 0.76774193548387093, 0.34507211538461541, 1.0], [1.0, 0.77419354838709675, 0.35697115384615385, 1.0], [1.0, 0.78064516129032258, 0.3688701923076923, 1.0], [1.0, 0.7870967741935484, 0.38076923076923075, 1.0], [1.0, 0.79354838709677422, 0.39266826923076925, 1.0], [1.0, 0.80000000000000004, 0.4045673076923077, 1.0], [1.0, 0.80645161290322576, 0.41646634615384615, 1.0], [1.0, 0.81290322580645158, 0.42836538461538459, 1.0], [1.0, 0.8193548387096774, 0.44026442307692309, 1.0], [1.0, 0.82580645161290323, 0.45216346153846154, 1.0], [1.0, 0.83225806451612905, 0.46406249999999999, 1.0], [1.0, 0.83870967741935487, 0.47596153846153844, 1.0], [1.0, 0.84516129032258069, 0.48786057692307694, 1.0], [1.0, 0.85161290322580641, 0.49975961538461539, 1.0], [1.0, 0.85806451612903223, 0.51165865384615383, 1.0], [1.0, 0.86451612903225805, 0.52355769230769234, 1.0], [1.0, 0.87096774193548387, 0.53545673076923073, 1.0], [1.0, 0.8774193548387097, 0.54735576923076923, 1.0], [1.0, 0.88387096774193552, 0.55925480769230773, 1.0], [1.0, 0.89032258064516134, 0.57115384615384612, 1.0], [1.0, 0.89677419354838706, 0.58305288461538463, 1.0], [1.0, 0.90322580645161288, 0.59495192307692313, 1.0], [1.0, 0.9096774193548387, 0.60685096153846152, 1.0], [1.0, 0.91612903225806452, 0.61875000000000002, 1.0], [1.0, 0.92258064516129035, 0.63064903846153841, 1.0], [1.0, 0.92903225806451617, 0.64254807692307692, 1.0], [1.0, 0.93548387096774188, 0.65444711538461542, 1.0], [1.0, 0.9419354838709677, 0.66634615384615381, 1.0], [1.0, 0.94838709677419353, 0.67824519230769231, 1.0], [1.0, 0.95483870967741935, 0.69014423076923082, 1.0], [1.0, 0.96129032258064517, 0.70204326923076921, 1.0], [1.0, 0.967741935483871, 0.71394230769230771, 1.0], [1.0, 0.97419354838709682, 0.7258413461538461, 1.0], [1.0, 0.98064516129032253, 0.7377403846153846, 1.0], [1.0, 0.98709677419354835, 0.74963942307692311, 1.0], [1.0, 0.99354838709677418, 0.7615384615384615, 1.0], [1.0, 1.0, 0.7734375, 1.0]], "gray_invert" : [[(255-x)/256.0, (255-x)/256.0, (255-x)/256.0, 1.0] for x in range(256)], "cyan" : [[0.0, x/256.0, x/256.0, 1.0] for x in range(256)], "copper" : [[min(1.0, (x*1.2)/256.), (x*0.8)/256., (x*0.5)/256., 1.0] for x in range(256)], "red" : [[x/256.0, 0.0, 0.0, 1.0] for x in range(256)], "cool" : [[0.0, 0.0, 0.0, 1.0]]+[[x/256., (256-x)/256., 1.0, 1.0] for x in range(1,256)], } stage_colormaps = { "fmri" : [((-0.69999999999999996, -0.59999999999999998), (0.99610894941634243, 0.0, 0.99610894941634243, 1.0)), ((-0.59999999999999998, -0.40000000000000002), (0.75391775387197679, 0.24219119554436561, 0.99610894941634243, 1.0)), ((-0.40000000000000002, -0.20000000000000001), (0.50391393911650262, 0.49219501029983981, 0.99610894941634243, 1.0)), ((-0.20000000000000001, 0.0), (0.25000381475547417, 0.74610513466086825, 0.99610894941634243, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 0.20000000000000001), (0.0, 0.0, 1.0, 1.0)), ((0.20000000000000001, 0.40000000000000002), (0.0, 1.0, 0.0, 1.0)), ((0.40000000000000002, 0.59999999999999998), (1.0, 1.0, 0.0, 1.0)), ((0.59999999999999998, 0.69999999999999996), (1.0, 0.0, 0.0, 1.0))], "p_value" : [((89.0, 90.0), (0.0, 0.0, 0.0, 0.0)), ((90.0, 94.0), (0.0, 0.0, 1.0, 1.0)), ((94.0, 96.0), (0.0, 1.0, 0.0, 1.0)), ((96.0, 98.0), (1.0, 1.0, 0.0, 1.0)), ((98.0, 99.0), (1.0, 0.0, 0.0, 1.0))], "z_score" : [((-6.0, -5.0), (0.99610894941634243, 0.19607843137254902, 0.92941176470588238, 1.0)), ((-5.0, -4.0), (0.83924620431830321, 0.19836728465705347, 0.99610894941634243, 1.0)), ((-4.0, -3.0), (0.54509803921568623, 0.19607843137254902, 0.99610894941634243, 1.0)), ((-3.0, -2.0), (0.50391393911650262, 0.49219501029983981, 0.99610894941634243, 1.0)), ((-2.0, -1.0), (0.17596704051270315, 0.80257877470054173, 0.99610894941634243, 1.0)), ((-1.0, 0.0), (0.25000381475547417, 0.99610894941634243, 0.99610894941634243, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 1.0), (0.0, 0.0, 1.0, 1.0)), ((1.0, 2.0), (0.0, 1.0, 0.0, 1.0)), ((2.0, 3.0), (1.0, 1.0, 0.0, 1.0)), ((3.0, 4.0), (1.0, 0.78431372549019607, 0.19607843137254902, 1.0)), ((4.0, 5.0), (1.0, 0.42275120164797436, 0.24034485389486535, 1.0)), ((5.0, 6.0), (1.0, 0.0, 0.0, 1.0))], "stats" : [((-1.0, -0.90000000000000002), (0.99610894941634243, 0.19607843137254902, 0.92941176470588238, 1.0)), ((-0.90000000000000002, -0.80000000000000004), (0.83924620431830321, 0.19836728465705347, 0.99610894941634243, 1.0)), ((-0.80000000000000004, -0.69999999999999996), (0.54509803921568623, 0.19607843137254902, 0.99610894941634243, 1.0)), ((-0.69999999999999996, -0.59999999999999998), (0.50391393911650262, 0.49219501029983981, 0.99610894941634243, 1.0)), ((-0.59999999999999998, -0.5), (0.17596704051270315, 0.80257877470054173, 0.99610894941634243, 1.0)), ((-0.5, 0.0), (0.25000381475547417, 0.99610894941634243, 0.99610894941634243, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 0.5), (0.0, 0.0, 1.0, 1.0)), ((0.5, 0.59999999999999998), (0.0, 1.0, 0.0, 1.0)), ((0.59999999999999998, 0.69999999999999996), (1.0, 1.0, 0.0, 1.0)), ((0.69999999999999996, 0.80000000000000004), (1.0, 0.78431372549019607, 0.19607843137254902, 1.0)), ((0.80000000000000004, 0.90000000000000002), (1.0, 0.42275120164797436, 0.24034485389486535, 1.0)), ((0.90000000000000002, 1.0), (1.0, 0.0, 0.0, 1.0))], "sep" : [((-1.0, 0.0), (0.0, 1.0, 0.0, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 1.0), (1.0, 0.0, 0.0, 1.0))], "epi2" : [((-26.0, -25.0), (0.99610894941634243, 0.19607843137254902, 0.92941176470588238, 1.0)), ((-25.0, -20.0), (0.83924620431830321, 0.19836728465705347, 0.99610894941634243, 1.0)), ((-20.0, -15.0), (0.54509803921568623, 0.19607843137254902, 0.99610894941634243, 1.0)), ((-15.0, -10.0), (0.50391393911650262, 0.49219501029983981, 0.99610894941634243, 1.0)), ((-10.0, -5.0), (0.17596704051270315, 0.80257877470054173, 0.99610894941634243, 1.0)), ((-5.0, 0.0), (0.25000381475547417, 0.99610894941634243, 0.99610894941634243, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 5.0), (0.0, 0.0, 1.0, 1.0)), ((5.0, 10.0), (0.0, 1.0, 0.0, 1.0)), ((10.0, 15.0), (1.0, 1.0, 0.0, 1.0)), ((15.0, 20.0), (1.0, 0.78431372549019607, 0.19607843137254902, 1.0)), ((20.0, 25.0), (1.0, 0.42275120164797436, 0.24034485389486535, 1.0)), ((25.0, 26.0), (1.0, 0.0, 0.0, 1.0))], "epi" : [((-16.0, -15.0), (0.99610894941634243, 0.0, 0.99610894941634243, 1.0)), ((-15.0, -10.0), (0.75391775387197679, 0.24219119554436561, 0.99610894941634243, 1.0)), ((-10.0, -5.0), (0.50391393911650262, 0.49219501029983981, 0.99610894941634243, 1.0)), ((-5.0, 0.0), (0.25000381475547417, 0.74610513466086825, 0.99610894941634243, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 5.0), (0.0, 0.0, 1.0, 1.0)), ((5.0, 10.0), (0.0, 1.0, 0.0, 1.0)), ((10.0, 15.0), (1.0, 1.0, 0.0, 1.0)), ((15.0, 16.0), (1.0, 0.0, 0.0, 1.0))], "label128" : [((0, 1), (0.0, 0.0, 0.0, 0.0)), ((1, 2), (0.19999999999999996, 0.59199999999999997, 1.0, 1.0)), ((2, 3), (0.19999999999999996, 0.90399999999999969, 1.0, 1.0)), ((3, 4), (0.19999999999999996, 1.0, 0.78400000000000014, 1.0)), ((4, 5), (0.19999999999999996, 1.0, 0.47200000000000014, 1.0)), ((5, 6), (0.23999999999999982, 1.0, 0.19999999999999996, 1.0)), ((6, 7), (0.55200000000000005, 1.0, 0.19999999999999996, 1.0)), ((7, 8), (0.86399999999999988, 1.0, 0.19999999999999996, 1.0)), ((8, 9), (1.0, 0.82400000000000007, 0.19999999999999996, 1.0)), ((9, 10), (1.0, 0.51199999999999979, 0.19999999999999996, 1.0)), ((10, 11), (1.0, 0.19999999999999996, 0.19999999999999996, 1.0))], "fmri_retard" : [((-4, -3), (0.0, 0.0, 0.0, 0.0)), ((-3, -2), (0.86285714285714266, 0.19999999999999996, 1.0, 1.0)), ((-2, -1), (0.71428571428571463, 0.19999999999999996, 1.0, 1.0)), ((-1, 0), (0.56571428571428539, 0.19999999999999996, 1.0, 1.0)), ((0, 1), (0.41714285714285737, 0.19999999999999996, 1.0, 1.0)), ((1, 2), (0.26857142857142829, 0.19999999999999996, 1.0, 1.0)), ((2, 3), (0.19999999999999996, 0.27999999999999969, 1.0, 1.0)), ((3, 4), (0.19999999999999996, 0.42857142857142827, 1.0, 1.0)), ((4, 5), (0.19999999999999996, 0.57714285714285685, 1.0, 1.0)), ((5, 6), (0.19999999999999996, 0.72571428571428542, 1.0, 1.0)), ((6, 7), (0.19999999999999996, 0.874285714285714, 1.0, 1.0)), ((7, 8), (0.19999999999999996, 1.0, 0.97714285714285731, 1.0)), ((8, 9), (0.19999999999999996, 1.0, 0.82857142857142874, 1.0)), ((9, 10), (0.19999999999999996, 1.0, 0.68000000000000016, 1.0)), ((10, 11), (0.19999999999999996, 1.0, 0.53142857142857158, 1.0)), ((11, 12), (0.19999999999999996, 1.0, 0.38285714285714301, 1.0)), ((12, 13), (0.19999999999999996, 1.0, 0.23428571428571437, 1.0)), ((13, 14), (0.31428571428571439, 1.0, 0.19999999999999996, 1.0)), ((14, 15), (0.46285714285714241, 1.0, 0.19999999999999996, 1.0)), ((15, 16), (0.61142857142857154, 1.0, 0.19999999999999996, 1.0)), ((16, 17), (0.75999999999999956, 1.0, 0.19999999999999996, 1.0)), ((17, 18), (0.9085714285714287, 1.0, 0.19999999999999996, 1.0))], "stats2" : [((-1.0, -0.999), (1.0, 0.0, 0.71999694819562066, 1.0)), ((-0.999, -0.995), (0.99610894941634243, 0.19607843137254902, 0.92941176470588238, 1.0)), ((-0.995, -0.98999999999999999), (0.83924620431830321, 0.19836728465705347, 0.99610894941634243, 1.0)), ((-0.98999999999999999, -0.94999999999999996), (0.50391393911650262, 0.49219501029983981, 0.99610894941634243, 1.0)), ((-0.94999999999999996, -0.90000000000000002), (0.17596704051270315, 0.80257877470054173, 0.99610894941634243, 1.0)), ((-0.90000000000000002, 0.0), (0.25000381475547417, 0.99610894941634243, 0.99610894941634243, 1.0)), ((0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), ((0.0, 0.90000000000000002), (0.0, 0.0, 1.0, 1.0)), ((0.90000000000000002, 0.94999999999999996), (0.0, 1.0, 0.0, 1.0)), ((0.94999999999999996, 0.98999999999999999), (1.0, 1.0, 0.0, 1.0)), ((0.98999999999999999, 0.995), (1.0, 0.78431372549019607, 0.19607843137254902, 1.0)), ((0.995, 0.999), (1.0, 0.42275120164797436, 0.24034485389486535, 1.0)), ((0.999, 1.0), (1.0, 0.0, 0.0, 1.0))], "freehand" : [((0.0, 1.0), (0.0, 0.0, 0.0, 0.0)), ((1.0, 2.0), (1.0, 0.57813382162203408, 0.1210955977721828, 1.0)), ((2.0, 3.0), (0.050782024872205692, 0.58594644083314262, 0.089845120927748531, 1.0)), ((3.0, 4.0), (0.45685511558709085, 0.12890821698329138, 0.64844739452201117, 1.0)), ((4.0, 5.0), (0.27734798199435418, 0.64844739452201117, 1.0, 1.0)), ((5.0, 6.0), (0.90626382848859388, 0.35938048371099413, 0.070313572899977111, 1.0)), ((6.0, 7.0), (0.85548180361638815, 0.50782024872205689, 0.96485847257190815, 1.0)), ((7.0, 8.0), (0.01953154802777142, 0.18750286106660563, 0.71876096742198825, 1.0)), ((8.0, 9.0), (1.0, 1.0, 0.58594644083314262, 1.0)), ((9.0, 10.0), (1.0, 1.0, 0.0, 1.0)), ((10.0, 11.0), (1.0, 0.8359502555886168, 0.36719310292210272, 1.0)), ((11.0, 12.0), (0.39844357976653699, 1.0, 0.18750286106660563, 1.0)), ((12.0, 13.0), (1.0, 1.0, 1.0, 1.0))], } def get_colormap_from_name(name) : """ Look up the colormaps and stage_colormaps dictionaries for a colormap. """ if name in colormaps.keys() : colormap = colormaps[name] elif name in stage_colormaps.keys() : colormap = stage_colormaps[name] else : raise medipy.base.Exception("Unknown colormap : %s"%(name)) return colormap
669.490566
13,713
0.696446
5,577
35,483
4.428008
0.13215
0.087791
0.086131
0.074185
0.498036
0.444705
0.431504
0.315813
0.289006
0.217169
0
0.738181
0.087958
35,483
52
13,714
682.365385
0.024906
0.008962
0
0
0
0
0.004999
0
0
0
0
0
0
1
0.025641
false
0
0.051282
0
0.102564
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ee8d3203006d76c063e05056fc0cfa2fd4ba735d
122
py
Python
bucky/__main__.py
ktallaksen/bucky
da4ad0c440463dbf3da275dfdfacd42e2fdb3464
[ "MIT" ]
null
null
null
bucky/__main__.py
ktallaksen/bucky
da4ad0c440463dbf3da275dfdfacd42e2fdb3464
[ "MIT" ]
null
null
null
bucky/__main__.py
ktallaksen/bucky
da4ad0c440463dbf3da275dfdfacd42e2fdb3464
[ "MIT" ]
null
null
null
"""Make bucky callable from cmd line.""" if __name__ == "__main__": from .cli.main import main as _main _main()
17.428571
40
0.647541
17
122
4.058824
0.705882
0
0
0
0
0
0
0
0
0
0
0
0.221311
122
6
41
20.333333
0.726316
0.278689
0
0
0
0
0.097561
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
c98a20b987e88fb111fec6c63f15e3ec8540a5fe
4,563
py
Python
CMS/tests.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
1
2020-09-21T16:35:16.000Z
2020-09-21T16:35:16.000Z
CMS/tests.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
14
2020-03-25T10:29:26.000Z
2022-01-13T03:45:38.000Z
CMS/tests.py
methods/phe-cv19-site
fd5f877b8a0725a9893fa3c24a54e9495e749744
[ "MIT" ]
null
null
null
from unittest import TestCase from CMS.test.utils import MethodsTestCase class MethodsTestUtilsTests(MethodsTestCase): def test_methods_base_test_case_assert_is_true_returns_true_when_passed_true(self): self.assertIsTrue(True) def test_methods_base_test_case_assert_is_true_returns_false_when_passed_false(self): try: self.assertIsTrue(False) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_true_returns_false_when_passed_a_truthy_value(self): try: truthy_variable = 'A string' self.assertIsTrue(truthy_variable) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_true_returns_false_when_passed_a_falsey_value(self): try: falsey_variable = None self.assertIsTrue(falsey_variable) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_false_returns_true_when_passed_false(self): self.assertIsFalse(False) def test_methods_base_test_case_assert_is_false_returns_false_when_passed_true(self): try: self.assertIsFalse(True) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_false_returns_false_when_passed_a_truthy_value(self): try: truthy_variable = 'A string' self.assertIsFalse(truthy_variable) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_false_returns_false_when_passed_a_falsey_value(self): try: falsey_variable = None self.assertIsFalse(falsey_variable) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_none_returns_true_when_passed_none(self): self.assertIsNone(None) def test_methods_base_test_case_assert_is_none_returns_false_when_passed_something_other_than_none(self): try: self.assertIsNone("test") # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_methods_base_test_case_assert_is_not_none_returns_true_when_not_passed_something_other_than_none(self): self.assertIsNotNone('Anything that is not none') def test_methods_base_test_case_assert_is_not_none_returns_false_when_passed_none(self): try: self.assertIsNone(None) # 'Test failed to produce expected assertion error' self.assertTrue(False) except AssertionError: # 'Test produced expected assertion error' self.assertTrue(True) def test_get_context_value_loads_the_correct_value_for_a_valid_key(self): key = 'testKey' value = 'A short test string' context = { key: value, } result = self.get_context_value(context, key) self.assertEqual(result, value) def test_get_context_value_throws_a_key_error_when_passed_an_invalid_key(self): key = 'testKey' value = 'A short test string' invalidKey = 'wrongKey' context = { key: value, } try: self.get_context_value(context, invalidKey) self.assertFalse('Test failed to produce expected key error') except KeyError: self.assertTrue('Test produced expected key error')
36.214286
116
0.678501
523
4,563
5.544933
0.131931
0.082069
0.121379
0.143448
0.781724
0.717586
0.695517
0.695517
0.695517
0.666552
0
0
0.265176
4,563
125
117
36.504
0.864897
0.159325
0
0.566265
0
0
0.046621
0
0
0
0
0
0.614458
1
0.168675
false
0.156627
0.024096
0
0.204819
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
1
0
0
0
0
0
4
c98c46e5d18fe46f7eb44f302f6b43005dc0fdf3
87
py
Python
app/wanted/apps.py
nakashi120/practice-partner-app-api
086ef5f861b4dfb184e46a6e44197b860919731e
[ "MIT" ]
null
null
null
app/wanted/apps.py
nakashi120/practice-partner-app-api
086ef5f861b4dfb184e46a6e44197b860919731e
[ "MIT" ]
null
null
null
app/wanted/apps.py
nakashi120/practice-partner-app-api
086ef5f861b4dfb184e46a6e44197b860919731e
[ "MIT" ]
null
null
null
from django.apps import AppConfig class WantedConfig(AppConfig): name = 'wanted'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
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
c9988f4b7a756631462c178c56b3862c3c021443
897
py
Python
tests/test_bernoulli.py
andrebienemann/pdlpy
8b26e7cc0350ccf5b89c5b2588a56994bd6db743
[ "MIT" ]
3
2021-05-01T13:28:09.000Z
2022-02-16T19:00:56.000Z
tests/test_bernoulli.py
andrebienemann/pdlpy
8b26e7cc0350ccf5b89c5b2588a56994bd6db743
[ "MIT" ]
null
null
null
tests/test_bernoulli.py
andrebienemann/pdlpy
8b26e7cc0350ccf5b89c5b2588a56994bd6db743
[ "MIT" ]
null
null
null
from unittest import TestCase from pdlpy import Bernoulli class TestBernoulli(TestCase): def setUp(self): self.bernoulli = Bernoulli(0.0) def test_str(self): self.assertEqual( "Bernoulli(p=0.00, mean=0.00, median=0.00, mode=0.00, var=0.00)", str(self.bernoulli), ) def test_mean(self): self.assertEqual(0.0, self.bernoulli.mean) def test_median(self): self.assertEqual(0.0, self.bernoulli.median) def test_mode(self): self.assertEqual(0.0, self.bernoulli.mode) def test_var(self): self.assertEqual(0.0, self.bernoulli.var) def test_pmf(self): self.assertEqual(0.0, self.bernoulli.pmf(1)) self.assertEqual(1.0, self.bernoulli.pmf(0)) def test_cdf(self): self.assertEqual(1.0, self.bernoulli.cdf(1)) self.assertEqual(1.0, self.bernoulli.cdf(0))
25.628571
77
0.633222
128
897
4.382813
0.1875
0.231729
0.199643
0.178253
0.477718
0.477718
0.477718
0
0
0
0
0.053623
0.230769
897
34
78
26.382353
0.75942
0
0
0
0
0.041667
0.069119
0
0
0
0
0
0.375
1
0.333333
false
0
0.083333
0
0.458333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
c99c5a67945b8a3a3544d481e979c791ab45fe23
187
py
Python
httpcore/_ssl.py
abranjith/httpcore
de629324b1e2b375fe1d6c61b0daf8d9430559ca
[ "BSD-3-Clause" ]
1
2021-12-13T13:22:59.000Z
2021-12-13T13:22:59.000Z
httpcore/_ssl.py
abranjith/httpcore
de629324b1e2b375fe1d6c61b0daf8d9430559ca
[ "BSD-3-Clause" ]
null
null
null
httpcore/_ssl.py
abranjith/httpcore
de629324b1e2b375fe1d6c61b0daf8d9430559ca
[ "BSD-3-Clause" ]
null
null
null
import ssl import certifi def default_ssl_context() -> ssl.SSLContext: context = ssl.create_default_context() context.load_verify_locations(certifi.where()) return context
18.7
50
0.759358
23
187
5.913043
0.565217
0.147059
0
0
0
0
0
0
0
0
0
0
0.15508
187
9
51
20.777778
0.860759
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c9b126bfda58d357d1eef036a93bf0a989858088
147
py
Python
django_school/classroom/apps.py
joemash/django-schools
72173dfc88972d5e8b6e7b579476584bc4902f90
[ "MIT" ]
null
null
null
django_school/classroom/apps.py
joemash/django-schools
72173dfc88972d5e8b6e7b579476584bc4902f90
[ "MIT" ]
null
null
null
django_school/classroom/apps.py
joemash/django-schools
72173dfc88972d5e8b6e7b579476584bc4902f90
[ "MIT" ]
1
2022-01-24T13:19:30.000Z
2022-01-24T13:19:30.000Z
from django.apps import AppConfig class ClassroomConfig(AppConfig): name = 'classroom' def ready(self): import classroom.signals
18.375
33
0.714286
16
147
6.5625
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.210884
147
7
34
21
0.905172
0
0
0
0
0
0.061224
0
0
0
0
0
0
1
0.2
false
0
0.4
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
c9b59a064a3d455567e5b1bb96cb60c7e53e13f6
193
py
Python
pontoon/sync/exceptions.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
1,145
2015-05-15T01:08:16.000Z
2022-03-31T14:23:45.000Z
pontoon/sync/exceptions.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
1,365
2015-05-04T21:54:18.000Z
2022-03-30T16:53:49.000Z
pontoon/sync/exceptions.py
foss4/pontoon
0503cc78f00e1e9d23c1ca885fe74a627563fc82
[ "BSD-3-Clause" ]
667
2015-05-04T21:33:45.000Z
2022-03-30T10:25:33.000Z
class ParseError(RuntimeError): """Exception to raise when parsing fails.""" class SyncError(RuntimeError): """Error class for general errors relating to the project sync process."""
27.571429
78
0.735751
23
193
6.173913
0.826087
0
0
0
0
0
0
0
0
0
0
0
0.160622
193
6
79
32.166667
0.876543
0.554404
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
c9d8b31700e7e73ce186f3d9a14c11b59ebd1db3
135
py
Python
application/tests/test_application.py
jamesalzuk/early-detection-index
d783c3799eb919d4c5588d40ddf4c164d2c676ba
[ "BSD-3-Clause" ]
null
null
null
application/tests/test_application.py
jamesalzuk/early-detection-index
d783c3799eb919d4c5588d40ddf4c164d2c676ba
[ "BSD-3-Clause" ]
null
null
null
application/tests/test_application.py
jamesalzuk/early-detection-index
d783c3799eb919d4c5588d40ddf4c164d2c676ba
[ "BSD-3-Clause" ]
null
null
null
from application import create_app from flask import Flask def test_create_app(): app = create_app() assert isinstance(app, Flask)
16.875
34
0.785185
20
135
5.1
0.5
0.264706
0
0
0
0
0
0
0
0
0
0
0.148148
135
7
35
19.285714
0.886957
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
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
c9d97f79e87d71b99954971bf7b6f1a55c413da0
160
py
Python
esuits/logout/views.py
junkhp/esuites_database_modification
ac2b706a7cc8488cbe83a77d7ce062f5b8228463
[ "MIT" ]
4
2020-11-02T18:25:13.000Z
2021-03-15T07:56:41.000Z
esuits/logout/views.py
junkhp/esuites_database_modification
ac2b706a7cc8488cbe83a77d7ce062f5b8228463
[ "MIT" ]
9
2021-02-01T03:20:59.000Z
2021-03-06T08:15:04.000Z
esuits/logout/views.py
junkhp/esuites_database_modification
ac2b706a7cc8488cbe83a77d7ce062f5b8228463
[ "MIT" ]
4
2020-11-03T16:52:37.000Z
2020-11-11T16:31:26.000Z
from django.contrib.auth import logout from django.shortcuts import redirect def logoutfunc(request): logout(request) return redirect('esuits:index')
20
38
0.775
20
160
6.2
0.7
0.16129
0
0
0
0
0
0
0
0
0
0
0.14375
160
7
39
22.857143
0.905109
0
0
0
0
0
0.075
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c9dd233fada4c2a6216c2c1ae567954517219b7d
158
py
Python
lang-python/src/test/resources/tiny_py_interpreter/tinypy/tests/scope1.py
nrs011/steady
bddae18072cd5b330a866a299b4f8419608f8559
[ "BSD-3-Clause", "Apache-2.0", "MIT" ]
357
2018-10-16T08:02:37.000Z
2020-01-23T11:32:21.000Z
lang-python/src/test/resources/tiny_py_interpreter/tinypy/tests/scope1.py
mendickxiao/vulnerability-assessment-tool
dc64eb9b970aea95f825f974940aed4b54caba8d
[ "Apache-2.0" ]
90
2018-10-16T14:13:30.000Z
2019-12-16T17:57:40.000Z
lang-python/src/test/resources/tiny_py_interpreter/tinypy/tests/scope1.py
mendickxiao/vulnerability-assessment-tool
dc64eb9b970aea95f825f974940aed4b54caba8d
[ "Apache-2.0" ]
84
2018-10-15T22:36:43.000Z
2020-01-07T01:30:00.000Z
var = 'foo' def ex2(): var = 'bar' print('inside the function var is ', var) ex2() print('outside the function var is ', var) # should be bar, foo
14.363636
45
0.607595
25
158
3.84
0.52
0.229167
0.291667
0.333333
0.395833
0
0
0
0
0
0
0.016807
0.246835
158
10
46
15.8
0.789916
0.113924
0
0
0
0
0.445255
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.166667
0.333333
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
c9df45fbab104ffcc3a870f0716f7a090739b764
133
py
Python
hellotome/hello.py
vinzegtz/hellotome
2bd241b8b67f2625758a33ab99c9a5d2adc9e225
[ "MIT" ]
null
null
null
hellotome/hello.py
vinzegtz/hellotome
2bd241b8b67f2625758a33ab99c9a5d2adc9e225
[ "MIT" ]
null
null
null
hellotome/hello.py
vinzegtz/hellotome
2bd241b8b67f2625758a33ab99c9a5d2adc9e225
[ "MIT" ]
null
null
null
class Hello: def __init__(self, name): self.name = name def greeting(self): print(f'Hello {self.name}')
19
35
0.56391
17
133
4.176471
0.529412
0.338028
0
0
0
0
0
0
0
0
0
0
0.308271
133
7
35
19
0.771739
0
0
0
0
0
0.126866
0
0
0
0
0
0
1
0.4
false
0
0
0
0.6
0.2
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
4e7934d350136a29303b996816bf16225513d527
205
py
Python
videoio/__init__.py
vguzov/videoio
04689c75528656bf4d4a8b451b0168c494e45471
[ "Apache-2.0" ]
13
2020-08-20T14:40:30.000Z
2022-03-29T11:09:55.000Z
videoio/__init__.py
vguzov/videoio
04689c75528656bf4d4a8b451b0168c494e45471
[ "Apache-2.0" ]
null
null
null
videoio/__init__.py
vguzov/videoio
04689c75528656bf4d4a8b451b0168c494e45471
[ "Apache-2.0" ]
null
null
null
__version__ = '0.2.4' from .video_rgb import videoread, videosave, VideoReader, VideoWriter from .video_uint16 import uint16read, uint16save, Uint16Reader, Uint16Writer from .info import read_video_params
41
76
0.829268
26
205
6.230769
0.769231
0.111111
0
0
0
0
0
0
0
0
0
0.070652
0.102439
205
4
77
51.25
0.809783
0
0
0
0
0
0.02439
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4ea15bf9cce0565f1b93650c6120fcfec53f2453
4,498
py
Python
bling/incoming_test.py
Elizabeth-Warren/bling-open
a5fd82d1a8d62ea74afada88b4fe1219e9144fc5
[ "MIT" ]
1
2020-09-16T16:57:27.000Z
2020-09-16T16:57:27.000Z
bling/incoming_test.py
Elizabeth-Warren/bling-open
a5fd82d1a8d62ea74afada88b4fe1219e9144fc5
[ "MIT" ]
null
null
null
bling/incoming_test.py
Elizabeth-Warren/bling-open
a5fd82d1a8d62ea74afada88b4fe1219e9144fc5
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock import pytest from bling.incoming import FIRST_MESSAGE_RESPONSE, IncomingHandler from bling.transport import IncomingMesage, OutgoingMessage from bling.helpscout.mailboxes import Mailbox from bling.phone import Phone from bling.helpscout.client import Conversation, NewCustomer, Thread, ThreadType @pytest.fixture def handler(): hs_client = MagicMock() transport = MagicMock() return IncomingHandler(hs_client, transport) @pytest.fixture def mailbox(): return Mailbox( transport_type="twilio", phone=Phone.parse("+15556667777"), id=1, mc_campaign_id="", ) def test_no_existing_conversation(handler, mailbox): handler.hs_client.find_conversations.return_value = [] handler.handle_message( IncomingMesage( mailbox=mailbox, from_phone=Phone.parse("+15558889999"), body="Some text", ) ) # should create a new conversation and send a welcome text handler.hs_client.create_conversation.assert_called_with( Conversation( subject=f"Request from 555-888-9999", customer=NewCustomer( email="5558889999@helpscout-blackhole-local.elizabethwarren.com", phone="555-888-9999", firstName="555-888-9999", ), mailboxId=mailbox.id, threads=[ Thread( customer=NewCustomer( email="5558889999@helpscout-blackhole-local.elizabethwarren.com", phone="555-888-9999", firstName="555-888-9999", ), type=ThreadType.CUSTOMER, text="Some text", imported=False, ) ], ) ) assert handler.hs_client.add_thread_to_conversation.call_count == 0 handler.transport.send_response.assert_called_with( OutgoingMessage( mailbox=mailbox, to_phone=Phone.parse("+15558889999"), body=FIRST_MESSAGE_RESPONSE, ) ) def test_existing_conversation(handler, mailbox): handler.hs_client.find_conversations.return_value = [ {"id": 456, "threads": 50}, {"id": 123, "threads": 90}, ] handler.handle_message( IncomingMesage( mailbox=mailbox, from_phone=Phone.parse("+15558889999"), body="Some text" ) ) # Should add to a existing conversation and not send a welcome text handler.hs_client.add_thread_to_conversation.assert_called_with( 456, Thread( customer=NewCustomer( email="5558889999@helpscout-blackhole-local.elizabethwarren.com", phone="555-888-9999", firstName="555-888-9999", ), type=ThreadType.CUSTOMER, text="Some text", imported=False, ), ) assert handler.hs_client.create_conversation.call_count == 0 assert handler.transport.send_response.call_count == 0 def test_existing_long_conversation(handler, mailbox): handler.hs_client.find_conversations.return_value = [ {"id": 456, "threads": 90}, {"id": 123, "threads": 50}, ] handler.handle_message( IncomingMesage( mailbox=mailbox, from_phone=Phone.parse("+15558889999"), body="Some text" ) ) # Should create a new conversation but not send a welcome text handler.hs_client.create_conversation.assert_called_with( Conversation( subject=f"Request from 555-888-9999", customer=NewCustomer( email="5558889999@helpscout-blackhole-local.elizabethwarren.com", phone="555-888-9999", firstName="555-888-9999", ), mailboxId=mailbox.id, threads=[ Thread( customer=NewCustomer( email="5558889999@helpscout-blackhole-local.elizabethwarren.com", phone="555-888-9999", firstName="555-888-9999", ), type=ThreadType.CUSTOMER, text="Some text", imported=False, ) ], ) ) assert handler.hs_client.add_thread_to_conversation.call_count == 0 assert handler.transport.send_response.call_count == 0
31.236111
89
0.587594
434
4,498
5.935484
0.202765
0.02795
0.046584
0.065994
0.729814
0.715839
0.715839
0.70691
0.692547
0.692547
0
0.082682
0.31703
4,498
143
90
31.454545
0.755859
0.040685
0
0.566667
0
0
0.140571
0.06495
0
0
0
0
0.075
1
0.041667
false
0
0.083333
0.008333
0.141667
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
095408e1ed694186b3fca09d7c4aed993b579199
260
py
Python
Warmup-2/string_bits.py
SleepNoMore/CodingBat
de49348a2d125f46635a936dad2818bcb63a7f05
[ "MIT" ]
null
null
null
Warmup-2/string_bits.py
SleepNoMore/CodingBat
de49348a2d125f46635a936dad2818bcb63a7f05
[ "MIT" ]
null
null
null
Warmup-2/string_bits.py
SleepNoMore/CodingBat
de49348a2d125f46635a936dad2818bcb63a7f05
[ "MIT" ]
null
null
null
''' Given a string, return a new string made of every other char starting with the first, so "Hello" yields "Hlo". ''' def string_bits(str): return str[0::2] # string_bits('Hello') → 'Hlo' # string_bits('Hi') → 'H' # string_bits('Heeololeo') → 'Hello'
18.571429
55
0.653846
43
260
3.930233
0.627907
0.236686
0
0
0
0
0
0
0
0
0
0.009346
0.176923
260
13
56
20
0.766355
0.765385
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
0961e2582ec9d4c3f85cece2b777d95b0b15694d
194
py
Python
Python The Hard way problems/ex1.py
oreillyh/Python-problems
5284d2b0b57a9e9c05c10214f1105e159a392950
[ "Apache-2.0" ]
null
null
null
Python The Hard way problems/ex1.py
oreillyh/Python-problems
5284d2b0b57a9e9c05c10214f1105e159a392950
[ "Apache-2.0" ]
null
null
null
Python The Hard way problems/ex1.py
oreillyh/Python-problems
5284d2b0b57a9e9c05c10214f1105e159a392950
[ "Apache-2.0" ]
null
null
null
print ("hello world") print ("hello again") print ("I like typing this.") print("This is fun") print('Yay! Printing.') print ("I'd much rather you 'not'.") print ('I "said" do not touch this.')
24.25
37
0.654639
32
194
3.96875
0.625
0.141732
0
0
0
0
0
0
0
0
0
0
0.149485
194
7
38
27.714286
0.769697
0
0
0
0
0
0.613402
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
11a74e540762cc7966022981147e98859ca74642
580
py
Python
logical/converter/qiskit/transpiler/_fencedobjs.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
null
null
null
logical/converter/qiskit/transpiler/_fencedobjs.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
1
2019-04-09T02:22:38.000Z
2019-04-09T02:22:38.000Z
logical/converter/qiskit/transpiler/_fencedobjs.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
null
null
null
from ._transpilererror import TranspilerAccessError class FencedObject(): pass def __init__(self, instance, attributes_to_fence): pass def __getattribute__(self, name): pass def __getitem__(self, key): pass def __setitem__(self, key, value): pass def _check_if_fenced(self, name): pass class FencedPropertySet(FencedObject): pass def __init__(self, property_set_instance): pass class FencedDAGCircuit(FencedObject): pass def __init__(self, dag_circuit_instance): pass
15.263158
54
0.663793
60
580
5.85
0.483333
0.139601
0.162393
0.196581
0.230769
0
0
0
0
0
0
0
0.267241
580
37
55
15.675676
0.825882
0
0
0.47619
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.47619
0.047619
0
0.52381
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
11b7dd413e67aefcf922bf357a2aa8fb5196fd39
991
py
Python
src/config/datamodel/gelf.py
diraven/pipsqueak3
5b6ea19dbc22944beaccf41e5f2589bf31fa8bb5
[ "BSD-3-Clause" ]
17
2018-03-14T23:21:50.000Z
2020-11-23T15:30:36.000Z
src/config/datamodel/gelf.py
diraven/pipsqueak3
5b6ea19dbc22944beaccf41e5f2589bf31fa8bb5
[ "BSD-3-Clause" ]
145
2018-03-24T19:31:32.000Z
2021-01-12T09:25:37.000Z
src/config/datamodel/gelf.py
diraven/pipsqueak3
5b6ea19dbc22944beaccf41e5f2589bf31fa8bb5
[ "BSD-3-Clause" ]
23
2018-03-14T23:21:39.000Z
2021-03-26T15:19:34.000Z
""" Logging configuration datamodel Copyright (c) 2020 The Fuel Rat Mischief, All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE.md """ from typing import Optional import attr @attr.dataclass(frozen=True) class GelfConfig: enabled: bool = attr.ib(validator=attr.validators.instance_of(bool)) port: Optional[int] = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(int))) host: Optional[str] = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(str))) log_level: str = attr.ib(default="DEBUG", validator=attr.validators.instance_of(str)) send_context: bool = attr.ib(validator=attr.validators.instance_of(bool), default=False) @attr.dataclass class LoggingConfigRoot: gelf: GelfConfig = attr.ib(validator=attr.validators.instance_of(GelfConfig)) base_logger: str = attr.ib(validator=attr.validators.instance_of(str)) log_file: str = attr.ib(validator=attr.validators.instance_of(str))
30.030303
103
0.765893
135
991
5.533333
0.4
0.187416
0.246319
0.257028
0.526104
0.526104
0.461847
0.409639
0.409639
0.16332
0
0.005688
0.113017
991
32
104
30.96875
0.844141
0.15439
0
0
0
0
0.006024
0
0
0
0
0
0
1
0
true
0
0.142857
0
0.857143
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
0
0
1
0
0
4
11cf15e203f85206617b5e2e8305f7847e5f6120
137
py
Python
templates/python/auth/__init__.py
adriangonz/seldon-deploy-sdk
c5504838630a87053387cec57ec2e1e7251971e2
[ "Apache-2.0" ]
6
2021-02-18T14:37:54.000Z
2022-01-13T13:27:43.000Z
templates/python/auth/__init__.py
adriangonz/seldon-deploy-sdk
c5504838630a87053387cec57ec2e1e7251971e2
[ "Apache-2.0" ]
14
2021-01-04T16:32:03.000Z
2021-12-13T17:53:59.000Z
templates/python/auth/__init__.py
adriangonz/seldon-deploy-sdk
c5504838630a87053387cec57ec2e1e7251971e2
[ "Apache-2.0" ]
7
2021-03-17T09:05:55.000Z
2022-01-05T10:39:56.000Z
from .session import SessionAuthenticator from .openid import OIDCAuthenticator __all__ = ["SessionAuthenticator", "OIDCAuthenticator"]
27.4
55
0.832117
11
137
10
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.094891
137
4
56
34.25
0.887097
0
0
0
0
0
0.270073
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
11e24ebcc176c596a1f407a676d9dea2fd16e242
126
py
Python
cromdriver/__init__.py
Gokender/cromdriver
ce3bb6217bd5614cebfe0530d26751eae189b11b
[ "MIT" ]
null
null
null
cromdriver/__init__.py
Gokender/cromdriver
ce3bb6217bd5614cebfe0530d26751eae189b11b
[ "MIT" ]
null
null
null
cromdriver/__init__.py
Gokender/cromdriver
ce3bb6217bd5614cebfe0530d26751eae189b11b
[ "MIT" ]
null
null
null
from cromdriver.cromdriver import updating_chromedriver, get_chromedriver_path __version__ = '0.4.2' updating_chromedriver()
25.2
78
0.849206
15
126
6.6
0.733333
0.40404
0
0
0
0
0
0
0
0
0
0.025862
0.079365
126
5
79
25.2
0.827586
0
0
0
0
0
0.03937
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ee9ed8846cad39b86baa26369d0eaf50b2a57772
96
py
Python
pythonCore/ch03/E02.py
Furzoom/learnpython
a3034584e481d4e7c55912d9da06439688aa67ea
[ "MIT" ]
null
null
null
pythonCore/ch03/E02.py
Furzoom/learnpython
a3034584e481d4e7c55912d9da06439688aa67ea
[ "MIT" ]
null
null
null
pythonCore/ch03/E02.py
Furzoom/learnpython
a3034584e481d4e7c55912d9da06439688aa67ea
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python is a dynamic type programming language.
19.2
48
0.666667
14
96
4.571429
0.928571
0
0
0
0
0
0
0
0
0
0
0.0125
0.166667
96
4
49
24
0.7875
0.927083
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
eee7ee664f30da9defcb2d8d464e4ae09b591dc9
269
py
Python
scrapli_cfg/platform/core/cisco_nxos/__init__.py
m1009d/scrapli_cfg
0d967f22be802ba57446f83b02a0703606546ec7
[ "MIT" ]
15
2021-03-14T18:27:15.000Z
2022-02-08T17:05:33.000Z
scrapli_cfg/platform/core/cisco_nxos/__init__.py
m1009d/scrapli_cfg
0d967f22be802ba57446f83b02a0703606546ec7
[ "MIT" ]
21
2021-05-23T13:58:40.000Z
2022-03-02T14:38:00.000Z
scrapli_cfg/platform/core/cisco_nxos/__init__.py
m1009d/scrapli_cfg
0d967f22be802ba57446f83b02a0703606546ec7
[ "MIT" ]
1
2021-10-04T12:48:14.000Z
2021-10-04T12:48:14.000Z
"""scrapli_cfg.platform.core.cisco_nxos""" from scrapli_cfg.platform.core.cisco_nxos.async_platform import AsyncScrapliCfgNXOS from scrapli_cfg.platform.core.cisco_nxos.sync_platform import ScrapliCfgNXOS __all__ = ( "AsyncScrapliCfgNXOS", "ScrapliCfgNXOS", )
29.888889
83
0.814126
31
269
6.677419
0.419355
0.144928
0.26087
0.318841
0.487923
0.487923
0.338164
0
0
0
0
0
0.089219
269
8
84
33.625
0.844898
0.133829
0
0
0
0
0.145374
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
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
e115e44476f03ef395879b33b189ebd92234f816
286
py
Python
Task2B.py
xd2w/Lent_Computing
ad7f772618363dd82f21d21d5df5636ec997fe3c
[ "MIT" ]
null
null
null
Task2B.py
xd2w/Lent_Computing
ad7f772618363dd82f21d21d5df5636ec997fe3c
[ "MIT" ]
null
null
null
Task2B.py
xd2w/Lent_Computing
ad7f772618363dd82f21d21d5df5636ec997fe3c
[ "MIT" ]
1
2022-02-02T21:30:35.000Z
2022-02-02T21:30:35.000Z
from floodsystem.stationdata import build_station_list from floodsystem.stationdata import update_water_levels from floodsystem.flood import stations_level_over_threshold stations = build_station_list() update_water_levels(stations) print(stations_level_over_threshold(stations, 0.8))
35.75
59
0.884615
38
286
6.289474
0.473684
0.188285
0.217573
0.267782
0.284519
0
0
0
0
0
0
0.007491
0.066434
286
7
60
40.857143
0.88764
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0.166667
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
010126ea7d80f449ed84e9162f36c1b46e090671
198
py
Python
src/cfehome/asgi.py
aditya2222/Django-Chat-Application
170973326acc8d6d89b3e6083e8e73daf9d9c76f
[ "MIT" ]
null
null
null
src/cfehome/asgi.py
aditya2222/Django-Chat-Application
170973326acc8d6d89b3e6083e8e73daf9d9c76f
[ "MIT" ]
null
null
null
src/cfehome/asgi.py
aditya2222/Django-Chat-Application
170973326acc8d6d89b3e6083e8e73daf9d9c76f
[ "MIT" ]
null
null
null
# With this module we are no longer using the wsgi and now we are using the asgi. This is especially done for production import os import django from channels.routing import get_default_application
39.6
120
0.823232
34
198
4.735294
0.794118
0.062112
0
0
0
0
0
0
0
0
0
0
0.161616
198
4
121
49.5
0.96988
0.59596
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
013ddd2a6e62050a5239e89a116089b64ab1667a
97
py
Python
mobileapps_store/tests/factories.py
arteria/django-mobileapps-store
c06a907852e81689a1d81ec9c439298f7bf45297
[ "MIT" ]
3
2016-09-16T10:44:30.000Z
2021-05-14T03:47:11.000Z
mobileapps_store/tests/factories.py
arteria/django-mobileapps-store
c06a907852e81689a1d81ec9c439298f7bf45297
[ "MIT" ]
null
null
null
mobileapps_store/tests/factories.py
arteria/django-mobileapps-store
c06a907852e81689a1d81ec9c439298f7bf45297
[ "MIT" ]
null
null
null
"""Factories for the mobileapps_store app.""" # import factory # from ..models import YourModel
19.4
45
0.742268
12
97
5.916667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.14433
97
4
46
24.25
0.855422
0.886598
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
017efb5088c823639bd2b7d50bb111b2c880ee89
716
py
Python
iterator_iterable.py
AnakinJiang/PythonDemo
4e8e8296b098ce541c588fafdf07cf2d6d955d38
[ "MIT" ]
null
null
null
iterator_iterable.py
AnakinJiang/PythonDemo
4e8e8296b098ce541c588fafdf07cf2d6d955d38
[ "MIT" ]
null
null
null
iterator_iterable.py
AnakinJiang/PythonDemo
4e8e8296b098ce541c588fafdf07cf2d6d955d38
[ "MIT" ]
null
null
null
# lis = [x*x for x in range(10)] # print(lis) # #生成器 # generator_ex = (x*x for x in range(10)) # print(generator_ex) # generator_ex = (x*x for x in range(10)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) # print(next(generator_ex)) def fib(max): n,a,b =0,0,1 while n < max: a,b =b,a+b yield b n = n+1 # print(a) return 'done' def test_fib(): #fibonacci数列 a = fib(10) print(fib(10)) if __name__ == "__main__": test_fib()
21.69697
41
0.627095
117
716
3.632479
0.239316
0.362353
0.465882
0.517647
0.698824
0.698824
0.698824
0.698824
0.651765
0.651765
0
0.024476
0.201117
716
33
42
21.69697
0.718531
0.629888
0
0
0
0
0.04898
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.25
0.083333
0
0
0
null
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
018d0c689aea87c8bc2831f82c94a91ef6564bca
212
py
Python
modules/test_empty.py
janbodnar/Python-Course
51705ab5a2adef52bcdb99a800e94c0d67144a38
[ "BSD-2-Clause" ]
13
2017-08-22T12:26:07.000Z
2021-07-29T16:13:50.000Z
modules/test_empty.py
janbodnar/Python-Course
51705ab5a2adef52bcdb99a800e94c0d67144a38
[ "BSD-2-Clause" ]
1
2021-02-08T10:24:33.000Z
2021-02-08T10:24:33.000Z
modules/test_empty.py
janbodnar/Python-Course
51705ab5a2adef52bcdb99a800e94c0d67144a38
[ "BSD-2-Clause" ]
17
2018-08-13T11:10:33.000Z
2021-07-29T16:14:02.000Z
#!/usr/bin/python # test_empty.py import empty import sys def main(): print (__name__) print (empty.__name__) print (empty.__doc__) print (sys.__name__) if __name__ == '__main__': main()
12.470588
26
0.646226
27
212
4.148148
0.518519
0.160714
0.25
0
0
0
0
0
0
0
0
0
0.221698
212
16
27
13.25
0.678788
0.141509
0
0
0
0
0.044444
0
0
0
0
0
0
1
0.111111
true
0
0.222222
0
0.333333
0.444444
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
1
0
0
0
0
1
0
4
6d6780360db252639739c9109adfcc66ceee13ff
760
py
Python
gh-pages/tools/pushWebsite.py
valentjn/class-notes
c1ecdff11abbc4a338117583c8c252c0e9a497fd
[ "CC0-1.0" ]
8
2020-07-28T07:27:51.000Z
2022-03-07T13:51:29.000Z
gh-pages/tools/pushWebsite.py
valentjn/class-notes
c1ecdff11abbc4a338117583c8c252c0e9a497fd
[ "CC0-1.0" ]
null
null
null
gh-pages/tools/pushWebsite.py
valentjn/class-notes
c1ecdff11abbc4a338117583c8c252c0e9a497fd
[ "CC0-1.0" ]
2
2020-10-12T16:14:29.000Z
2020-10-15T04:10:49.000Z
#!/usr/bin/python3 import os import shutil import subprocess def main(): os.chdir(os.path.join(os.path.dirname(__file__), "..")) if os.path.isdir(".git"): shutil.rmtree(".git") subprocess.run(["git", "init", "-b", "gh-pages"]) subprocess.run(["git", "add", "."]) subprocess.run(["git", "add", "-f", "_data/sidebars/sidebar.yml"]) subprocess.run(["git", "add", "-f", "_includes/lectures"]) subprocess.run(["git", "add", "-f", "images/lectures"]) subprocess.run(["git", "add", "-f", "pages/index.md", "pages/table-of-contents.md", "pages/lectures"]) subprocess.run(["git", "commit", "-m", "Update gh-pages"]) subprocess.run(["git", "push", "-f", "origin", "gh-pages"]) shutil.rmtree(".git") if __name__ == "__main__": main()
28.148148
85
0.605263
100
760
4.46
0.43
0.233184
0.286996
0.213004
0.318386
0.125561
0
0
0
0
0
0.001497
0.121053
760
26
86
29.230769
0.666168
0.022368
0
0
0
0
0.32345
0.070081
0
0
0
0
0
1
0.055556
true
0
0.166667
0
0.222222
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
1
0
0
0
0
0
0
4
6d7b9984862d75c78308be9b62612ade5b2d0d61
229
py
Python
ants/contrib_exp/djangoitem.py
wcong/scale-crawl
52918d18c94a9a69c3b2495286e3384ba57ad6f8
[ "BSD-3-Clause" ]
18
2015-01-16T02:25:03.000Z
2018-11-18T03:47:07.000Z
ants/contrib_exp/djangoitem.py
wcong/ants
52918d18c94a9a69c3b2495286e3384ba57ad6f8
[ "BSD-3-Clause" ]
15
2015-01-12T02:28:23.000Z
2015-02-03T03:41:07.000Z
ants/contrib_exp/djangoitem.py
wcong/scale-crawl
52918d18c94a9a69c3b2495286e3384ba57ad6f8
[ "BSD-3-Clause" ]
5
2015-01-22T12:38:38.000Z
2019-06-07T14:35:07.000Z
import warnings from ants.utils.exceptions import ScrapyDeprecationWarning warnings.warn("Module `ants.contrib_exp.djangoitem` is deprecated, use `ants.contrib.djangoitem` instead", ScrapyDeprecationWarning, stacklevel=2)
28.625
106
0.820961
25
229
7.48
0.72
0.117647
0
0
0
0
0
0
0
0
0
0.004831
0.09607
229
7
107
32.714286
0.898551
0
0
0
0
0
0.390351
0.236842
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
6da6b407f817c1e45dc918bfd1798caaf4685a61
75
py
Python
TSIS_1/topic_3/c.py
GMKanat/PP2_spring
423617d559c5690f689741aaa152b9fee5082baf
[ "MIT" ]
null
null
null
TSIS_1/topic_3/c.py
GMKanat/PP2_spring
423617d559c5690f689741aaa152b9fee5082baf
[ "MIT" ]
null
null
null
TSIS_1/topic_3/c.py
GMKanat/PP2_spring
423617d559c5690f689741aaa152b9fee5082baf
[ "MIT" ]
null
null
null
a = int(input()) if a > 0: print(1) elif a== 0: print(0) else: print(-1)
10.714286
16
0.546667
16
75
2.5625
0.5625
0.097561
0.341463
0
0
0
0
0
0
0
0
0.084746
0.213333
75
7
17
10.714286
0.610169
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
6db929c791af2391e08fa04f0d4042c0a75445bd
1,193
py
Python
Aula22 09-12 Class/exercicios/exercicio2.py
Renanrbsc/PadawanPython
6dc06a502d59127d0f180847e19b40c581baddd0
[ "MIT" ]
null
null
null
Aula22 09-12 Class/exercicios/exercicio2.py
Renanrbsc/PadawanPython
6dc06a502d59127d0f180847e19b40c581baddd0
[ "MIT" ]
null
null
null
Aula22 09-12 Class/exercicios/exercicio2.py
Renanrbsc/PadawanPython
6dc06a502d59127d0f180847e19b40c581baddd0
[ "MIT" ]
null
null
null
# Aula 21 - 09-12-2019 # Como Tratar e Trabalhar Erros!!! # Com base no seguinte dado bruto: dadobruto = '1;Arnaldo;23;m;alexcabeludo2@hotmail.com;014908648117' # 1) Faça uma classe cliente que receba como parametro o dado bruto. # 2) A classe deve iniciar (__init__) guardando o dado bruto nume variável chamada self.dado_bruto # 3) As variáveis código cliente (inteiro), nome, idade (inteiro), sexo, email, telefone # devem iniciar com o valor None # 4) Crie um metodo que pegue o valor bruto e adicione nas variáveis: # código cliente (inteiro), nome, idade (inteiro), sexo, email, telefone # convertendo os valores de string para inteiros quando necessários. # (Faça da forma que vocês conseguirem! O importante é o resultado e não como chegaram nele!) # 5) Crie um metodo salvar que pegue os seguintes dados do cliente e salve em um arquivo. # código cliente (inteiro), nome, idade (inteiro), sexo, email, telefone # 6) crie um metodo que possa atualizar os dados do cliente (código cliente (inteiro), # nome, idade (inteiro), sexo, email, telefone). Este metodo deverá alterar tambem o dado bruto para # que na hora de salvar o dado num arquivo, o mesmo não estaja desatualizado.
56.809524
100
0.755239
187
1,193
4.791444
0.545455
0.050223
0.089286
0.107143
0.256696
0.256696
0.256696
0.256696
0.256696
0.138393
0
0.032258
0.168483
1,193
20
101
59.65
0.870968
0.912825
0
0
0
0
0.609195
0.609195
0
0
0
0.05
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
null
0
0
1
0
0
0
0
0
0
0
0
0
0
4
6dc2b260063b0cc65d0692eb931e065666fd821f
84
py
Python
filecho/__main__.py
jadbin/filecho
5f6ce8fa2be095fd224fbe3e129e60af57118c0a
[ "Apache-2.0" ]
1
2018-06-11T12:58:06.000Z
2018-06-11T12:58:06.000Z
filecho/__main__.py
jadbin/filecho
5f6ce8fa2be095fd224fbe3e129e60af57118c0a
[ "Apache-2.0" ]
null
null
null
filecho/__main__.py
jadbin/filecho
5f6ce8fa2be095fd224fbe3e129e60af57118c0a
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from filecho.cli import main if __name__ == "__main__": main()
12
28
0.666667
12
84
4
0.833333
0
0
0
0
0
0
0
0
0
0
0.014925
0.202381
84
6
29
14
0.701493
0.142857
0
0
0
0
0.114286
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
097904764fb9bbe81993f372f8e13856c9c7d3cc
83
py
Python
characters/Calamardo.py
paulsupo/Say_my_name_acm
5c6ece46d6b25ad0353ccc9fc6acd3ab052e40c4
[ "Apache-2.0" ]
null
null
null
characters/Calamardo.py
paulsupo/Say_my_name_acm
5c6ece46d6b25ad0353ccc9fc6acd3ab052e40c4
[ "Apache-2.0" ]
1
2021-06-12T23:21:29.000Z
2021-06-12T23:21:29.000Z
characters/Calamardo.py
raymond1242/ucsp-git
9cda2bf330629af1663f4fa1f4f0c15aef4f482b
[ "Apache-2.0" ]
5
2021-06-12T22:32:41.000Z
2021-06-12T22:34:12.000Z
class Calamardo: def SayName(self): print("Calamardo: BOB ESPONJAAA! ")
27.666667
43
0.650602
9
83
6
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.228916
83
3
43
27.666667
0.84375
0
0
0
0
0
0.309524
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
099b7650d9d0dbe17b85650dd93cd06083626eef
218
py
Python
Project_phase_2/app/views.py
MuhammadWaleedUsman/Flask-Todolist
584179c0cef11ee7dda089f81cd1ca3b9050a556
[ "MIT" ]
1
2021-03-27T12:20:20.000Z
2021-03-27T12:20:20.000Z
Project_phase_2/app/views.py
MuhammadWaleedUsman/Flask-Todolist
584179c0cef11ee7dda089f81cd1ca3b9050a556
[ "MIT" ]
null
null
null
Project_phase_2/app/views.py
MuhammadWaleedUsman/Flask-Todolist
584179c0cef11ee7dda089f81cd1ca3b9050a556
[ "MIT" ]
null
null
null
from flask import Flask, render_template import socket from app import app @app.route('/') def home(): roll_number = 'i19-2140' return "Roll number = {} Hostname = {}".format(roll_number, socket.gethostname())
27.25
85
0.706422
29
218
5.206897
0.62069
0.198676
0
0
0
0
0
0
0
0
0
0.032609
0.155963
218
7
86
31.142857
0.788043
0
0
0
0
0
0.178899
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
0.714286
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
09b47d2a8b235674ab3c3a998e76cb4bf051d2a6
21
py
Python
data/studio21_generated/introductory/4157/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4157/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4157/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def group_check(s):
10.5
19
0.714286
4
21
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
21
2
20
10.5
0.777778
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
09cb5e422cbf11f0f36e2783c74e72dd58f703a6
175
py
Python
hdcs_manager/source/hsm/hsm/agent/__init__.py
isabella232/HDCS
1a5ae046e3ff947cc7a42219b9b1959766687612
[ "Apache-2.0" ]
null
null
null
hdcs_manager/source/hsm/hsm/agent/__init__.py
isabella232/HDCS
1a5ae046e3ff947cc7a42219b9b1959766687612
[ "Apache-2.0" ]
1
2021-02-23T19:10:26.000Z
2021-02-23T19:10:26.000Z
hdcs_manager/source/hsm/hsm/agent/__init__.py
isabella232/HDCS
1a5ae046e3ff947cc7a42219b9b1959766687612
[ "Apache-2.0" ]
null
null
null
import logging from hsm.agent import api as agent_api LOG = logging.getLogger(__name__) def API(*args, **kwargs): api = agent_api.API return api(*args, **kwargs)
14.583333
38
0.697143
26
175
4.461538
0.538462
0.137931
0.224138
0
0
0
0
0
0
0
0
0
0.188571
175
11
39
15.909091
0.816901
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
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
09dfa3a90eea5e48bf909608e84e495eed85080a
8,814
py
Python
test/register_file_test.py
YoSTEALTH/Liburing
f17cec63a7bc4e8328583e1c985345f7a0a16400
[ "CC0-1.0" ]
41
2020-01-08T02:07:56.000Z
2022-01-28T15:50:26.000Z
test/register_file_test.py
YoSTEALTH/Liburing
f17cec63a7bc4e8328583e1c985345f7a0a16400
[ "CC0-1.0" ]
15
2020-02-26T14:35:19.000Z
2021-09-10T21:54:25.000Z
test/register_file_test.py
YoSTEALTH/Liburing
f17cec63a7bc4e8328583e1c985345f7a0a16400
[ "CC0-1.0" ]
4
2020-01-07T16:52:07.000Z
2020-11-05T20:34:03.000Z
from os import O_TMPFILE, O_RDWR, O_CREAT from pytest import mark, raises from os.path import join from random import randint from liburing import AT_FDCWD, IOSQE_FIXED_FILE, io_uring, io_uring_cqes, iovec, io_uring_queue_init, \ io_uring_get_sqe, io_uring_prep_openat, io_uring_prep_write, io_uring_prep_read, \ io_uring_prep_close, io_uring_queue_exit, io_uring_register_files, skip_os, files, \ io_uring_register_files_update, io_uring_unregister_files, statx, io_uring_prep_statx, \ ffi from test_helper import submit_wait_result version = '5.5' from_buffer = ffi.from_buffer @mark.skipif(skip_os(version), reason=f'Requires Linux {version}+') def test_register_file(): ring = io_uring() cqes = io_uring_cqes() write = bytearray(b'hello world') read = bytearray(11) iov = iovec(write, read) try: assert io_uring_queue_init(2, ring, 0) == 0 # open - create local testing file. sqe = io_uring_get_sqe(ring) io_uring_prep_openat(sqe, AT_FDCWD, b'.', O_TMPFILE | O_RDWR, 0o700) fd = submit_wait_result(ring, cqes) # register `fds` fds = files(fd) # `int[fd]` index = 0 assert io_uring_register_files(ring, fds, len(fds)) == 0 # close sqe = io_uring_get_sqe(ring) io_uring_prep_close(sqe, fd) assert submit_wait_result(ring, cqes) == 0 # write - using registered file index vs fd sqe = io_uring_get_sqe(ring) io_uring_prep_write(sqe, index, iov[0].iov_base, iov[0].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # read - using registered file index vs fd sqe = io_uring_get_sqe(ring) io_uring_prep_read(sqe, index, iov[1].iov_base, iov[1].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # confirm assert write == read finally: # note: let exit also unregister fds io_uring_queue_exit(ring) @mark.skipif(skip_os(version), reason=f'Requires Linux {version}+') def test_register_file_update(): ring = io_uring() cqes = io_uring_cqes() write = bytearray(b'hello world') read = bytearray(11) iov = iovec(write, read) fds = files(-1, -1, -1, -1) # prep 4 fd spots index = 2 # only use index ``2`` of the `fds` try: assert io_uring_queue_init(2, ring, 0) == 0 # register 4 `fds` assert io_uring_register_files(ring, fds, len(fds)) == 0 # open - create local testing file. sqe = io_uring_get_sqe(ring) io_uring_prep_openat(sqe, AT_FDCWD, b'.', O_TMPFILE | O_RDWR, 0o700) fd = submit_wait_result(ring, cqes) fds[index] = fd fd2 = files(fd) # `int[fd]` # register - update only the index ``2`` value assert io_uring_register_files_update(ring, index, fd2, 1) == 1 # close sqe = io_uring_get_sqe(ring) io_uring_prep_close(sqe, fds[index]) assert submit_wait_result(ring, cqes) == 0 # write - using registered file index vs fd sqe = io_uring_get_sqe(ring) io_uring_prep_write(sqe, index, iov[0].iov_base, iov[0].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # read - using registered file index vs fd sqe = io_uring_get_sqe(ring) io_uring_prep_read(sqe, index, iov[1].iov_base, iov[1].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # confirm assert write == read # unregister assert io_uring_unregister_files(ring) == 0 finally: io_uring_queue_exit(ring) @mark.skipif(skip_os(version), reason=f'Requires Linux {version}+') def test_register_fd_close(): ring = io_uring() cqes = io_uring_cqes() write = bytearray(b'hello world') read = bytearray(11) iov = iovec(write, read) try: assert io_uring_queue_init(2, ring, 0) == 0 # open - create local testing file. sqe = io_uring_get_sqe(ring) io_uring_prep_openat(sqe, AT_FDCWD, b'.', O_TMPFILE | O_RDWR, 0o700) fd = submit_wait_result(ring, cqes) # register `fds` fds = files(fd) # `int[fd]` index = 0 assert io_uring_register_files(ring, fds, len(fds)) == 0 # close - right away after registering fd sqe = io_uring_get_sqe(ring) io_uring_prep_close(sqe, fd) assert submit_wait_result(ring, cqes) == 0 # write - using registered file index and closed fd sqe = io_uring_get_sqe(ring) io_uring_prep_write(sqe, index, iov[0].iov_base, iov[0].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # read - using registered file index and closed fd sqe = io_uring_get_sqe(ring) io_uring_prep_read(sqe, index, iov[1].iov_base, iov[1].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # confirm assert write == read # unregister - index fds = files(-1) assert io_uring_register_files_update(ring, index, fds, 1) == 1 # re-read - should not be able to since index was unregistered with raises(OSError): # [Errno 9] Bad file descriptor sqe = io_uring_get_sqe(ring) io_uring_prep_read(sqe, index, iov[1].iov_base, iov[1].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 finally: io_uring_queue_exit(ring) @mark.skipif(skip_os(version), reason=f'Requires Linux {version}+') def test_multiple_register_fd_mix(tmpdir): ring = io_uring() cqes = io_uring_cqes() loop = randint(2, 5) data = b'hello world' write = [bytearray(data) for _ in range(loop)] iov = iovec(*write) fds = files(-1 for _ in range(loop)) # prep fds try: assert io_uring_queue_init(2, ring, 0) == 0 # initialize register assert io_uring_register_files(ring, fds, len(fds)) == 0 for index in range(loop): # index = 0, 1, ... path = join(tmpdir, f'register-fd-mix-{index}.txt').encode() # open sqe = io_uring_get_sqe(ring) io_uring_prep_openat(sqe, AT_FDCWD, path, O_CREAT | O_RDWR, 0o700) fd = submit_wait_result(ring, cqes) # register update if index == 1: # skip registering middle one! fd1 = fd else: fds = files(fd) assert io_uring_register_files_update(ring, index, fds, 1) == 1 # close registered fd only sqe = io_uring_get_sqe(ring) io_uring_prep_close(sqe, fd) assert submit_wait_result(ring, cqes) == 0 # write for index in range(loop): sqe = io_uring_get_sqe(ring) if index == 1: # write using fd io_uring_prep_write(sqe, fd1, iov[index].iov_base, iov[index].iov_len, 0) else: # write using registered file index io_uring_prep_write(sqe, index, iov[index].iov_base, iov[index].iov_len, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 # read for index in range(loop): path = join(tmpdir, f'register-fd-mix-{index}.txt').encode() stat = statx() sqe = io_uring_get_sqe(ring) io_uring_prep_statx(sqe, AT_FDCWD, path, 0, 0, stat) assert submit_wait_result(ring, cqes) == 0 length = stat[0].stx_size # get written file size # note: even though size is known, get it using statx read = bytearray(length) buffer = from_buffer(read) sqe = io_uring_get_sqe(ring) if index == 1: io_uring_prep_read(sqe, fd1, buffer, length, 0) else: # read using registered file index io_uring_prep_read(sqe, index, buffer, length, 0) sqe.flags |= IOSQE_FIXED_FILE assert submit_wait_result(ring, cqes) == 11 assert read == data # close for index in range(loop): if index == 1: sqe = io_uring_get_sqe(ring) io_uring_prep_close(sqe, fd1) assert submit_wait_result(ring, cqes) == 0 else: # unregister file index fds = files(-1) assert io_uring_register_files_update(ring, index, fds, 1) == 1 finally: io_uring_queue_exit(ring)
36.421488
109
0.606762
1,239
8,814
4.039548
0.114609
0.109091
0.057143
0.051948
0.753846
0.724276
0.716484
0.682318
0.674126
0.646154
0
0.020934
0.295439
8,814
241
110
36.572614
0.785024
0.123327
0
0.752941
0
0
0.026559
0.00703
0
0
0
0
0.188235
1
0.023529
false
0
0.035294
0
0.058824
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
61debbf616c512b08dd21cb8d07a0c18654a4de6
1,477
py
Python
Configuration/Generator/python/Herwig7Settings/Herwig7PSWeightsSettings_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Generator/python/Herwig7Settings/Herwig7PSWeightsSettings_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Generator/python/Herwig7Settings/Herwig7PSWeightsSettings_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms herwig7PSWeightsSettingsBlock = cms.PSet( hw_PSWeights_settings = cms.vstring( 'cd /', 'cd /Herwig/Shower', 'do ShowerHandler:AddVariation RedHighAll 1.141 1.141 All', 'do ShowerHandler:AddVariation RedLowAll 0.707 0.707 All', 'do ShowerHandler:AddVariation DefHighAll 2 2 All', 'do ShowerHandler:AddVariation DefLowAll 0.5 0.5 All', 'do ShowerHandler:AddVariation ConHighAll 4 4 All', 'do ShowerHandler:AddVariation ConLowAll 0.25 0.25 All', 'do ShowerHandler:AddVariation RedHighHard 1.141 1.141 Hard', 'do ShowerHandler:AddVariation RedLowHard 0.707 0.707 Hard', 'do ShowerHandler:AddVariation DefHighHard 2 2 Hard', 'do ShowerHandler:AddVariation DefLowHard 0.5 0.5 Hard', 'do ShowerHandler:AddVariation ConHighHard 4 4 Hard', 'do ShowerHandler:AddVariation ConLowHard 0.25 0.25 Hard', 'do ShowerHandler:AddVariation RedHighSecondary 1.141 1.141 Secondary', 'do ShowerHandler:AddVariation RedLowSecondary 0.707 0.707 Secondary', 'do ShowerHandler:AddVariation DefHighSecondary 2 2 Secondary', 'do ShowerHandler:AddVariation DefLowSecondary 0.5 0.5 Secondary', 'do ShowerHandler:AddVariation ConHighSecondary 4 4 Secondary', 'do ShowerHandler:AddVariation ConLowSecondary 0.25 0.25 Secondary', 'set SplittingGenerator:Detuning 2.0', 'cd /', ) )
50.931034
80
0.701422
174
1,477
5.942529
0.287356
0.261122
0.470019
0.174081
0
0
0
0
0
0
0
0.080172
0.214624
1,477
28
81
52.75
0.811207
0
0
0.074074
0
0
0.731212
0.335139
0
0
0
0
0
1
0
false
0
0.037037
0
0.037037
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1104de99ae4c20879cd02ceb3a10a393153e1b3d
217
py
Python
environments/obstacle_car/utils.py
lhk/baselines
18eab9df4f74b5dac276bce64c13554d518618f7
[ "MIT" ]
null
null
null
environments/obstacle_car/utils.py
lhk/baselines
18eab9df4f74b5dac276bce64c13554d518618f7
[ "MIT" ]
null
null
null
environments/obstacle_car/utils.py
lhk/baselines
18eab9df4f74b5dac276bce64c13554d518618f7
[ "MIT" ]
1
2021-03-17T13:26:49.000Z
2021-03-17T13:26:49.000Z
import pygame def rotate(surface, rect, angle): rotated_surface = pygame.transform.rotate(surface, angle) rotated_rect = rotated_surface.get_rect(center=rect.center) return rotated_surface, rotated_rect
27.125
63
0.778802
28
217
5.821429
0.428571
0.257669
0
0
0
0
0
0
0
0
0
0
0.138249
217
7
64
31
0.871658
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
110b87611a970b12df2ff269b7a1ce97fd2f00bd
151
py
Python
tests/procs/tools.py
ion201/xonsh
7cf0307a0d53d198b8c05c83456d86af14c0daa4
[ "BSD-2-Clause-FreeBSD" ]
3
2020-11-01T13:51:47.000Z
2021-03-21T03:40:18.000Z
tests/procs/tools.py
ion201/xonsh
7cf0307a0d53d198b8c05c83456d86af14c0daa4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/procs/tools.py
ion201/xonsh
7cf0307a0d53d198b8c05c83456d86af14c0daa4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import platform import pytest ON_WINDOWS = platform.system() == "Windows" skip_if_on_windows = pytest.mark.skipif(ON_WINDOWS, reason="Unix stuff")
16.777778
72
0.768212
21
151
5.285714
0.619048
0.243243
0
0
0
0
0
0
0
0
0
0
0.119205
151
8
73
18.875
0.834586
0
0
0
0
0
0.112583
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
11189422529399bb6d84e873092331bc105e630c
2,914
py
Python
xcv/roi.py
boo13/xCV
9287ba0289420f5d3460821ad2e95c1dab08d1b8
[ "MIT" ]
2
2019-06-05T17:21:03.000Z
2019-07-10T01:34:23.000Z
xcv/roi.py
boo13/xCV
9287ba0289420f5d3460821ad2e95c1dab08d1b8
[ "MIT" ]
6
2019-07-16T21:46:42.000Z
2022-01-13T01:30:15.000Z
xcv/roi.py
boo13/xCV
9287ba0289420f5d3460821ad2e95c1dab08d1b8
[ "MIT" ]
1
2019-07-16T21:44:20.000Z
2019-07-16T21:44:20.000Z
import numpy as np # from collections import namedtuple # ROI = namedtuple('ROI', 'x1 y1 x2 y2') # home_team_score = ROI(x1=110, y1=101, x2=123, y2=92) class ROI: def __init__(self, frame_w=640, frame_h=480): self.frame_w = frame_w self.frame_h = frame_h # self._letterbox() self._scoreboard_clock() self._scoreboard_score() def make(self, x1, y1, x2, y2): return np.array([[(x1, y1), (x2, y1), (x2, y2), (x1, y2)]]) def _letterbox(self, is_letterboxed=True): if is_letterboxed: self.without_letterbox = self.make(0, 0, self.frame_w, 0) def _scoreboard_score(self): _score_y1 = 92 _score_y2 = 101 self.score_home = self.make(117, _score_y1, 123, _score_y2) self.score_away = self.make(128, _score_y1, 138, _score_y2) def _scoreboard_clock(self): _clock_y1 = 92 _clock_y2 = 100 self.clock_digit_hour = self.make(36, _clock_y1, 41, _clock_y2) self.clock_mins_tens = self.make(41, _clock_y1, 46, _clock_y2) self.clock_mins_ones = self.make(49, _clock_y1, 54, _clock_y2) def show_all(self): return def _WIP_stuff(self): # Hard-coded ROI values # ROI_SquadManage = np.array([[(0, 0), (640, 0), (640, 400), (0, 500)]]) # ROI_SinglePlayerSeason_AreYouSure = np.array( # [[(170, 232), (200, 232), (200, 272), (170, 272)]] # ) # ROI_InGameMenu_Resume = np.array( # [[(420, 172), (454, 172), (454, 206), (420, 206)]] # ) # ROI_InGameMenu_Time = np.array( # [[(305, 110), (335, 110), (335, 100), (305, 100)]] # ) # ROI_btnStrip = np.array([[(610, 384), (30, 384), (30, 365), (610, 365)]]) # ROI_AwayTeamScore = np.array( # [[(126, 101), (138, 101), (138, 92), (126, 92)]] # ) # ROI_HomeTeamScore = np.array( # [[(110, 101), (123, 101), (123, 92), (110, 92)]] # ) # ROI_HomeTeamName = np.array([[(80, 101), (108, 101), (108, 92), (80, 92)]]) # ROI_AwayTeamName = np.array( # [[(142, 101), (168, 101), (168, 92), (142, 92)]] # ) # ROI_TeamBadgeLeft = np.array( # [[(30, 400), (60, 400), (60, 375), (30, 375)]] # ) # ROI_TeamBadgeRight = np.array( # [[(610, 400), (580, 400), (580, 375), (610, 375)]] # ) # ROI_halftimeMarker = np.array( # [[(305, 110), (335, 110), (335, 100), (305, 100)]] # ) # ROI_mainMenuCart = np.array( # [[(560, 100), (580, 100), (580, 88), (560, 88)]] # ) # ROI_Menu_StartGame_PlayMatch = np.array( # [[(97, 337), (117, 337), (117, 357), (97, 357)]] # ) # ROI_Menu_Squad = np.array([[(484, 81), (506, 81), (506, 94), (484, 94)]]) return roi = ROI()
33.883721
85
0.513384
374
2,914
3.770053
0.304813
0.079433
0.012766
0.011348
0.076596
0.048227
0.048227
0.048227
0.048227
0.048227
0
0.205331
0.304736
2,914
85
86
34.282353
0.490622
0.48696
0
0.068966
0
0
0
0
0
0
0
0
0
1
0.241379
false
0
0.034483
0.103448
0.413793
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
0
0
0
0
0
1
0
0
0
1
0
0
0
4
111b003833b8b5ad53bf8988ed90df4b63451608
245
py
Python
src/badabump/versions/__init__.py
playpauseandstop/badabump
fe5bf0589772735da82845eb02ed7a7482d9b1c7
[ "BSD-3-Clause" ]
2
2021-04-03T09:35:44.000Z
2022-02-24T06:51:15.000Z
src/badabump/versions/__init__.py
playpauseandstop/badabump
fe5bf0589772735da82845eb02ed7a7482d9b1c7
[ "BSD-3-Clause" ]
109
2020-10-26T11:35:24.000Z
2022-03-01T05:03:38.000Z
src/badabump/versions/__init__.py
playpauseandstop/badabump
fe5bf0589772735da82845eb02ed7a7482d9b1c7
[ "BSD-3-Clause" ]
1
2021-07-20T07:43:40.000Z
2021-07-20T07:43:40.000Z
from badabump.versions.calver import CalVer from badabump.versions.pre_release import PreRelease from badabump.versions.semver import SemVer from badabump.versions.version import Version __all__ = ("CalVer", "PreRelease", "SemVer", "Version")
30.625
55
0.812245
30
245
6.466667
0.366667
0.247423
0.412371
0
0
0
0
0
0
0
0
0
0.097959
245
7
56
35
0.877828
0
0
0
0
0
0.118367
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
113851f9c4928d47b1cf3214e4cdff762fe9964c
98
py
Python
bilim/api.py
MirjahonMirsaidov/bilim
56438727ac1db1ece6f85e3c5c3a4ec3ee08f891
[ "MIT" ]
null
null
null
bilim/api.py
MirjahonMirsaidov/bilim
56438727ac1db1ece6f85e3c5c3a4ec3ee08f891
[ "MIT" ]
null
null
null
bilim/api.py
MirjahonMirsaidov/bilim
56438727ac1db1ece6f85e3c5c3a4ec3ee08f891
[ "MIT" ]
null
null
null
from rest_framework import routers from main import views router = routers.DefaultRouter()
9.8
34
0.77551
12
98
6.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.183673
98
9
35
10.888889
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
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
fec312acbc7db1cafae8480d83f0b1550bc3c92b
132
py
Python
stage/forms.py
lake-county-public-library/cmhc-admin
1e5893a94efc22ce2f93df95515e95d99fcbc8dc
[ "Apache-2.0" ]
null
null
null
stage/forms.py
lake-county-public-library/cmhc-admin
1e5893a94efc22ce2f93df95515e95d99fcbc8dc
[ "Apache-2.0" ]
null
null
null
stage/forms.py
lake-county-public-library/cmhc-admin
1e5893a94efc22ce2f93df95515e95d99fcbc8dc
[ "Apache-2.0" ]
1
2021-01-17T14:59:05.000Z
2021-01-17T14:59:05.000Z
from django import forms class CsvForm(forms.Form): csv_filename = forms.CharField(label='', initial='cmhc.csv', max_length=100)
26.4
78
0.757576
19
132
5.157895
0.842105
0
0
0
0
0
0
0
0
0
0
0.025424
0.106061
132
4
79
33
0.805085
0
0
0
0
0
0.060606
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
fef99ef2d11532bf5a7583373fe577e039cf8077
203
py
Python
tests/conftest.py
somespecialone/random-user-agent
ee245869d208359ba8d88496eda38b5a95129d11
[ "MIT" ]
2
2022-03-09T21:49:25.000Z
2022-03-12T05:53:17.000Z
tests/conftest.py
somespecialone/random-user-agent
ee245869d208359ba8d88496eda38b5a95129d11
[ "MIT" ]
1
2022-03-21T17:27:01.000Z
2022-03-21T17:27:01.000Z
tests/conftest.py
somespecialone/random-user-agent
ee245869d208359ba8d88496eda38b5a95129d11
[ "MIT" ]
null
null
null
import pytest from fastapi.testclient import TestClient @pytest.fixture(scope="session") def client(): from src import main with TestClient(main.app) as test_client: yield test_client
18.454545
45
0.738916
27
203
5.481481
0.62963
0.135135
0
0
0
0
0
0
0
0
0
0
0.187192
203
10
46
20.3
0.89697
0
0
0
0
0
0.034483
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0
0.571429
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
0
1
0
1
0
0
4
3a458876d851ccdc250c61916ff71434c9aad5de
98
py
Python
vplot/colors.py
VirtualPlanetaryLaboratory/vplot
cb391860aa0659af33d8054c14441de9fbafcd25
[ "MIT" ]
null
null
null
vplot/colors.py
VirtualPlanetaryLaboratory/vplot
cb391860aa0659af33d8054c14441de9fbafcd25
[ "MIT" ]
15
2018-08-10T22:06:24.000Z
2021-05-13T17:09:03.000Z
vplot/colors.py
VirtualPlanetaryLaboratory/vplot
cb391860aa0659af33d8054c14441de9fbafcd25
[ "MIT" ]
2
2018-11-28T22:56:33.000Z
2018-12-16T01:20:35.000Z
red = "#c91111" orange = "#e09401" pale_blue = "#13aed5" dark_blue = "#1321d8" purple = "#642197"
16.333333
21
0.642857
12
98
5.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0.289157
0.153061
98
5
22
19.6
0.445783
0
0
0
0
0
0.357143
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
28ba01d38ab36a36f4791cc0a13e0f8e36f78815
125
py
Python
src/utils/list_utils.py
aidkilda/understanding-drl-navigation
0d637c2390a935ec1182d4f2d5165644d98d6404
[ "MIT" ]
null
null
null
src/utils/list_utils.py
aidkilda/understanding-drl-navigation
0d637c2390a935ec1182d4f2d5165644d98d6404
[ "MIT" ]
null
null
null
src/utils/list_utils.py
aidkilda/understanding-drl-navigation
0d637c2390a935ec1182d4f2d5165644d98d6404
[ "MIT" ]
null
null
null
def flatten(list): """ Flattens a list of lists into a list.""" return [item for sublist in list for item in sublist]
41.666667
57
0.68
21
125
4.047619
0.619048
0.117647
0
0
0
0
0
0
0
0
0
0
0.224
125
3
57
41.666667
0.876289
0.296
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
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
1
0
0
0
0
1
0
0
4
28c5a525f856d6172c7462a1ffe28bac6eb72068
94
py
Python
lineup_site/lineup_app/apps.py
lamsond/bleacher-drum
ab7a90d4f343b504b6bd54886ef90a17d57885c3
[ "Unlicense" ]
null
null
null
lineup_site/lineup_app/apps.py
lamsond/bleacher-drum
ab7a90d4f343b504b6bd54886ef90a17d57885c3
[ "Unlicense" ]
null
null
null
lineup_site/lineup_app/apps.py
lamsond/bleacher-drum
ab7a90d4f343b504b6bd54886ef90a17d57885c3
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig class LineupAppConfig(AppConfig): name = 'lineup_app'
15.666667
33
0.765957
11
94
6.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.159574
94
5
34
18.8
0.898734
0
0
0
0
0
0.106383
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
28e5c432511ed613275b88d9fb995347ad640d60
85
py
Python
tex/code/bin/swipe.py
cdluminate/robdml
51ffcdbd2b316b0550a073f4c19edbef7bbbe704
[ "Apache-2.0" ]
5
2021-10-29T20:24:03.000Z
2022-03-23T11:35:09.000Z
tex/code/bin/swipe.py
cdluminate/robdml
51ffcdbd2b316b0550a073f4c19edbef7bbbe704
[ "Apache-2.0" ]
null
null
null
tex/code/bin/swipe.py
cdluminate/robdml
51ffcdbd2b316b0550a073f4c19edbef7bbbe704
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append('.') import robrank as rr rr.cmdline.Swipe(sys.argv[1:])
14.166667
30
0.717647
15
85
4.066667
0.733333
0
0
0
0
0
0
0
0
0
0
0.013158
0.105882
85
5
31
17
0.789474
0
0
0
0
0
0.011765
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
28e968b002a29dce5f4e31e7ca3ba4e890d55076
8,063
py
Python
tests/st/mindelec/architecture/test_block.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
3
2021-11-10T06:17:50.000Z
2022-03-21T14:25:30.000Z
tests/st/mindelec/architecture/test_block.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
null
null
null
tests/st/mindelec/architecture/test_block.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
1
2021-12-05T11:41:29.000Z
2021-12-05T11:41:29.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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. # ============================================================================ """ test block """ import pytest import numpy as np from mindspore import nn, context from mindspore import Tensor, Parameter from mindelec.architecture import LinearBlock, ResBlock from mindelec.architecture import InputScaleNet, FCSequential, MultiScaleFCCell context.set_context(mode=context.GRAPH_MODE, device_target="Ascend") class Net(nn.Cell): """ Net definition """ def __init__(self, input_channels, output_channels, weight='normal', bias='zeros', has_bias=True): super(Net, self).__init__() self.fc = LinearBlock(input_channels, output_channels, weight, bias, has_bias) def construct(self, input_x): return self.fc(input_x) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_linear(): """test linear block""" weight = Tensor(np.random.randint(0, 255, [8, 64]).astype(np.float32)) bias = Tensor(np.random.randint(0, 255, [8]).astype(np.float32)) net = Net(64, 8, weight=weight, bias=bias) input_data = Tensor(np.random.randint(0, 255, [128, 64]).astype(np.float32)) output = net(input_data) print(output.asnumpy()) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_linear_nobias(): """test linear block with no bias""" weight = Tensor(np.random.randint(0, 255, [8, 64]).astype(np.float32)) net = Net(64, 8, weight=weight, has_bias=False) input_data = Tensor(np.random.randint(0, 255, [128, 64]).astype(np.float32)) output = net(input_data) print(output.asnumpy()) class Net1(nn.Cell): """ Net definition """ def __init__(self, input_channels, output_channels, weight='normal', bias='zeros', has_bias=True, activation=None): super(Net1, self).__init__() self.fc = ResBlock(input_channels, output_channels, weight, bias, has_bias, activation) def construct(self, input_x): return self.fc(input_x) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_res(): """test res block""" weight = Tensor(np.random.randint(0, 255, [8, 8]).astype(np.float32)) bias = Tensor(np.random.randint(0, 255, [8]).astype(np.float32)) net = Net1(8, 8, weight=weight, bias=bias) input_data = Tensor(np.random.randint(0, 255, [128, 8]).astype(np.float32)) output = net(input_data) print(output.asnumpy()) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_res_nobias(): """test res block with no bias""" weight = Tensor(np.random.randint(0, 255, [8, 8]).astype(np.float32)) net = Net1(8, 8, weight=weight, has_bias=False) input_data = Tensor(np.random.randint(0, 255, [128, 8]).astype(np.float32)) output = net(input_data) print(output.asnumpy()) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_res_activation(): """test res block with activation""" weight = Tensor(np.random.randint(0, 255, [8, 8]).astype(np.float32)) bias = Tensor(np.random.randint(0, 255, [8]).astype(np.float32)) net = Net1(8, 8, weight=weight, bias=bias, activation='sin') input_data = Tensor(np.random.randint(0, 255, [128, 8]).astype(np.float32)) output = net(input_data) print(output.asnumpy()) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_res_channel_error(): with pytest.raises(ValueError): ResBlock(3, 6) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_input_scale(): """test input scale cell""" inputs = np.random.uniform(size=(16, 3)) + 3.0 inputs = Tensor(inputs.astype(np.float32)) input_scale = [1.0, 2.0, 4.0] input_center = [3.5, 3.5, 3.5] net = InputScaleNet(input_scale, input_center) output = net(inputs).asnumpy() assert np.all(output[:, 0] <= 0.5) and np.all(output[:, 0] >= -0.5) assert np.all(output[:, 1] <= 1.0) and np.all(output[:, 0] >= -1.0) assert np.all(output[:, 2] <= 2.0) and np.all(output[:, 0] >= -2.0) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_fc_sequential(): """test fc sequential cell""" inputs = np.ones((16, 3)) inputs = Tensor(inputs.astype(np.float32)) net = FCSequential(3, 3, 5, 32, weight_init="ones", bias_init="zeros") output = net(inputs).asnumpy() target = np.ones((16, 3)) * -31.998459 assert np.allclose(output, target, rtol=5e-2) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_mulscale_without_latent(): """test multi-scale net without latent vector""" inputs = np.ones((16, 3)) + 3.0 inputs = Tensor(inputs.astype(np.float32)) input_scale = [1.0, 2.0, 4.0] input_center = [3.5, 3.5, 3.5] net = MultiScaleFCCell(3, 3, 5, 32, weight_init="ones", bias_init="zeros", input_scale=input_scale, input_center=input_center) output = net(inputs).asnumpy() target = np.ones((16, 3)) * -61.669254 assert np.allclose(output, target, rtol=5e-2) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_mulscale_with_latent(): """test multi-scale net with latent vector and input scale""" inputs = np.ones((64, 3)) + 3.0 inputs = Tensor(inputs.astype(np.float32)) num_scenarios = 4 latent_size = 16 latent_init = np.ones((num_scenarios, latent_size)).astype(np.float32) latent_vector = Parameter(Tensor(latent_init), requires_grad=True) input_scale = [1.0, 2.0, 4.0] input_center = [3.5, 3.5, 3.5] net = MultiScaleFCCell(3, 3, 5, 32, weight_init="ones", bias_init="zeros", input_scale=input_scale, input_center=input_center, latent_vector=latent_vector) output = net(inputs).asnumpy() target = np.ones((64, 3)) * -57.8849 assert np.allclose(output, target, rtol=5e-2) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_mulscale_with_latent_noscale(): """test multi-scale net with latent vector""" inputs = np.ones((64, 3)) inputs = Tensor(inputs.astype(np.float32)) num_scenarios = 4 latent_size = 16 latent_init = np.ones((num_scenarios, latent_size)).astype(np.float32) latent_vector = Parameter(Tensor(latent_init), requires_grad=True) net = MultiScaleFCCell(3, 3, 5, 32, weight_init="ones", bias_init="zeros", latent_vector=latent_vector) output = net(inputs).asnumpy() target = np.ones((64, 3)) * -105.62799 assert np.allclose(output, target, rtol=5e-2)
35.835556
107
0.679028
1,144
8,063
4.617133
0.156469
0.083302
0.074972
0.099962
0.771299
0.753881
0.736274
0.717153
0.693866
0.674934
0
0.051274
0.177601
8,063
224
108
35.995536
0.745287
0.122907
0
0.690909
0
0
0.009585
0
0
0
0
0
0.042424
1
0.090909
false
0
0.036364
0.012121
0.151515
0.030303
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
e93da0b3d5c32915fa43632854d9902608388e76
2,538
py
Python
apps/inventario/models.py
FREDY4478/poyectoanalisissistemas
bd628db233dd11c81e459991c753f27a495c49db
[ "Unlicense" ]
null
null
null
apps/inventario/models.py
FREDY4478/poyectoanalisissistemas
bd628db233dd11c81e459991c753f27a495c49db
[ "Unlicense" ]
1
2022-03-12T01:02:46.000Z
2022-03-12T01:02:46.000Z
apps/inventario/models.py
FREDY4478/poyectoanalisissistemas
bd628db233dd11c81e459991c753f27a495c49db
[ "Unlicense" ]
null
null
null
from django.db import models from django.utils import timezone # Create your models here. class equipo(models.Model): id = models.AutoField(primary_key=True) marca = models.CharField(max_length=200) modelo = models.CharField(max_length=200) serie = models.CharField(max_length=250) rotulo = models.IntegerField(default=0) fecha_ing= models.DateField() tipo = models.CharField(max_length=100) activo = models.BooleanField(default=False) descripcion = models.CharField(max_length=600) class asignacion(models.Model): id = models.AutoField(primary_key=True) usuario_asig = models.CharField(max_length=350) cargo = models.CharField(max_length=150) departamento = models.CharField(max_length=300) fecha_entrega = models.DateField() marca_equipo_asig = models.CharField(max_length=200) modelo_equipo_asig = models.CharField(max_length=200) serie_equipo_asig = models.CharField(max_length=250) rotulo_equipo_asig = models.IntegerField(default=0) tipo_equipo = models.CharField(max_length=100) activo = models.BooleanField(default=False) class telefono(models.Model): id = models.AutoField(primary_key=True) marca_tel = models.CharField(max_length=200) modelo_tel = models.CharField(max_length=200) serie_tel = models.CharField(max_length=250) numero_tel = models.IntegerField(default=0) fecha_ing_tel = models.DateField() usuario_asig_tel = models.CharField(max_length=200) departamento_usuario = models.CharField(max_length=250) class pda(models.Model): id = models.AutoField(primary_key=True) ot = models.CharField(max_length=200) modelo_pda = models.CharField(max_length=350) serie_pda = models.CharField(max_length=250) fecha_ing = models.DateField() fecha_desp = models.DateField() serie_bateria = models.CharField(max_length=250) num_inventario = models.CharField(max_length=250) sucursal = models.CharField(max_length=200) region = models.CharField(max_length=250) estado = models.CharField(max_length=100) dias_st = models.IntegerField(default=0) descripcion_pda = models.CharField(max_length=250) class usuario(models.Model): id = models.AutoField(primary_key=True) nombre = models.CharField(max_length= 50) apellido = models.CharField(max_length = 50) cargo = models.CharField(max_length= 50) email = models.CharField(max_length = 30, null = True, blank = True) clave = models.CharField(max_length = 30, null = True, blank = True)
39.65625
76
0.744287
332
2,538
5.493976
0.213855
0.254934
0.305921
0.407895
0.709978
0.524671
0.277412
0.236842
0.167763
0.069079
0
0.042771
0.152482
2,538
63
77
40.285714
0.805207
0.009456
0
0.166667
0
0
0
0
0
0
0
0
0
1
0
false
0
0.037037
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
e940bd4d2d5a2123940ba679e3f906643ae9b28e
206
py
Python
actions/run_cmdlet.py
cognifloyd/stackstorm-activedirectory
495f092aaae424234823461550b559cb82f11184
[ "Apache-2.0" ]
6
2018-06-14T00:50:50.000Z
2021-12-01T21:51:13.000Z
actions/run_cmdlet.py
cognifloyd/stackstorm-activedirectory
495f092aaae424234823461550b559cb82f11184
[ "Apache-2.0" ]
4
2017-10-30T03:30:54.000Z
2019-07-22T16:35:24.000Z
actions/run_cmdlet.py
cognifloyd/stackstorm-activedirectory
495f092aaae424234823461550b559cb82f11184
[ "Apache-2.0" ]
7
2017-06-13T19:39:25.000Z
2021-02-26T09:42:19.000Z
from lib import action class RunCmdlet(action.BaseAction): def run(self, **kwargs): cmdlet = kwargs['cmdlet'] del kwargs['cmdlet'] return self.run_ad_cmdlet(cmdlet, **kwargs)
20.6
51
0.645631
25
206
5.24
0.6
0.274809
0
0
0
0
0
0
0
0
0
0
0.23301
206
9
52
22.888889
0.829114
0
0
0
0
0
0.058252
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
e9446f82f1104720c83c82f39fe56829a287930d
103
py
Python
longboxed/comics/__init__.py
timbueno/longboxed
b5969739bbc3226fa1a6e851ee1c7b3f978b0631
[ "MIT" ]
9
2015-06-17T07:39:17.000Z
2022-01-16T21:58:41.000Z
longboxed/comics/__init__.py
timbueno/longboxed
b5969739bbc3226fa1a6e851ee1c7b3f978b0631
[ "MIT" ]
21
2015-02-04T01:35:33.000Z
2021-02-18T03:11:29.000Z
longboxed/comics/__init__.py
timbueno/longboxed
b5969739bbc3226fa1a6e851ee1c7b3f978b0631
[ "MIT" ]
2
2015-09-02T22:32:07.000Z
2019-05-14T23:29:50.000Z
# -*- coding: utf-8 -*- """ longboxed.comics ~~~~~~~~~~~~~~~~ longboxed comics package """
14.714286
28
0.456311
8
103
5.875
0.75
0.638298
0
0
0
0
0
0
0
0
0
0.012658
0.23301
103
7
29
14.714286
0.582278
0.796117
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
3a85af17e7ac68c6f10c4a2e2dfb8669c2455c9e
185
py
Python
tests/__init__.py
Leovalcante/tmanager
df6d893e7fde41fe2722bb8f5259a88440ed2214
[ "MIT" ]
null
null
null
tests/__init__.py
Leovalcante/tmanager
df6d893e7fde41fe2722bb8f5259a88440ed2214
[ "MIT" ]
1
2019-09-13T14:14:47.000Z
2019-11-21T17:01:46.000Z
tests/__init__.py
Leovalcante/tmanager
df6d893e7fde41fe2722bb8f5259a88440ed2214
[ "MIT" ]
null
null
null
NO_SUCH_OPTION_ERROR_TEMPLATE = "Error: no such option: {}" NO_SUCH_COMMAND_ERROR_TEMPLATE = "Error: No such command \"{}\"" MISSING_COMMAND_ERROR_TEMPLATE = "Error: Missing command."
37
64
0.772973
25
185
5.28
0.28
0.181818
0.409091
0.30303
0.363636
0
0
0
0
0
0
0
0.108108
185
4
65
46.25
0.8
0
0
0
0
0
0.389189
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3a92100a8171561dd22c6962e88bd013a9b9d5b5
2,104
py
Python
tests/test_vmc_client.py
restapicoding/VMware-SDK
edc387a76227be1ad7c03e5eeaf603351574f70c
[ "MIT" ]
589
2017-03-09T19:01:22.000Z
2022-03-23T08:18:32.000Z
tests/test_vmc_client.py
restapicoding/VMware-SDK
edc387a76227be1ad7c03e5eeaf603351574f70c
[ "MIT" ]
244
2017-03-09T19:37:36.000Z
2022-03-29T07:14:21.000Z
tests/test_vmc_client.py
restapicoding/VMware-SDK
edc387a76227be1ad7c03e5eeaf603351574f70c
[ "MIT" ]
304
2017-03-09T19:15:01.000Z
2022-03-31T04:26:59.000Z
#!/usr/bin/env python """ * ******************************************************* * Copyright (c) VMware, Inc. 2019. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, * EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED * WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, * NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. """ __author__ = 'VMware, Inc.' from vmware.vapi.vmc.client import create_vmc_client from vmware.vapi.bindings.stub import ApiClient, StubFactoryBase client = create_vmc_client('1234') def test_orgs_client(): assert hasattr(client, 'Orgs') def test_locale_client(): assert hasattr(client, 'Locale') def test_account_link_client(): assert hasattr(client.orgs, 'AccountLink') assert hasattr(client.orgs, 'account_link') assert isinstance(client.orgs.account_link, StubFactoryBase) def test_providers_client(): assert hasattr(client.orgs, 'Providers') def test_reservations_client(): assert hasattr(client.orgs, 'Reservations') assert hasattr(client.orgs, 'reservations') assert isinstance(client.orgs.reservations, StubFactoryBase) def test_sddcs_client(): assert hasattr(client.orgs, 'Sddcs') assert hasattr(client.orgs, 'sddcs') assert isinstance(client.orgs.sddcs, StubFactoryBase) def test_sddcTemplates_client(): assert hasattr(client.orgs, 'SddcTemplates') def test_storage_client(): assert hasattr(client.orgs, 'storage') assert isinstance(client.orgs.storage, StubFactoryBase) def test_subscriptions_client(): assert hasattr(client.orgs, 'Subscriptions') assert hasattr(client.orgs, 'subscriptions') assert isinstance(client.orgs.subscriptions, StubFactoryBase) def test_tbrs_client(): assert hasattr(client.orgs, 'tbrs') assert isinstance(client.orgs.tbrs, StubFactoryBase) def test_tasks_client(): assert hasattr(client.orgs, 'Tasks')
28.053333
68
0.716255
241
2,104
6.116183
0.33195
0.135685
0.193351
0.218453
0.296472
0.14654
0
0
0
0
0
0.004384
0.132605
2,104
74
69
28.432432
0.803288
0.259506
0
0
0
0
0.094839
0
0
0
0
0
0.583333
1
0.305556
false
0
0.055556
0
0.361111
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
3aa06de6f1ab36c7485d45c1b437c63a22abe590
229
py
Python
event/use_trinket.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
event/use_trinket.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
event/use_trinket.py
dannl/hunter-sim-classic
e32cccc8431cc3e78b08067dd58e10fec52aac6a
[ "MIT" ]
null
null
null
from event import Event class UseTrinket(Event): def act(self): self.trinket.perform() def __init__(self, trinket, priority): super().__init__('use_trinket', priority) self.trinket = trinket
16.357143
49
0.646288
26
229
5.346154
0.538462
0.23741
0
0
0
0
0
0
0
0
0
0
0.244541
229
13
50
17.615385
0.803468
0
0
0
0
0
0.048458
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
3abd9e158b96bd5b2af9f860127258340dbb3eb3
9,123
py
Python
smart-filter/filter.py
reip-project/reip-pipelines
c6a8341e963b73f6fd08d63513876590e5af3d62
[ "BSD-3-Clause-Clear" ]
null
null
null
smart-filter/filter.py
reip-project/reip-pipelines
c6a8341e963b73f6fd08d63513876590e5af3d62
[ "BSD-3-Clause-Clear" ]
null
null
null
smart-filter/filter.py
reip-project/reip-pipelines
c6a8341e963b73f6fd08d63513876590e5af3d62
[ "BSD-3-Clause-Clear" ]
null
null
null
import os import cv2 import time import functools import numpy as np # import matplotlib.pyplot as plt import reip import reip.blocks as B import reip.blocks.ml import reip.blocks.audio import reip.blocks.encrypt import reip.blocks.os_watch import reip.blocks.upload from numpy_io import NumpyWriter from direct_io import DirectWriter, DirectReader from bundles import Bundle from usb_cam import UsbCamGStreamer from dummies import Generator, BlackHole from cv_utils import ImageConvert, ImageDisplay, ImageWriter from ai import ObjectDetector from motion import MotionDetector from controls import BulkUSB, Follower, Controller, ConsoleInput # DATA_DIR = './data' DATA_DIR = '/mnt/ssd/data' MODEL_DIR = './models' def mono_object(): with reip.Task("Cam"): cam = UsbCamGStreamer(name="Cam", filename=DATA_DIR + "/video/%d_{time}.avi", dev=0, bundle=None, rate=15, debug=False, verbose=False) with reip.Task("Det"): det = ObjectDetector(name="Detector", labels_dir=MODEL_DIR, max_rate=None, thr=0.1, model = "ssd-mobilenet-v2", draw=True, cuda_out=False, zero_copy=False, debug=True, verbose=False) cam.to(det, throughput='large', strategy="latest") det.to(ImageWriter(name="Writer", path=DATA_DIR + "/objects/"), throughput='large').to(BlackHole(name="Writer_BH")) # det.to(ImageDisplay(name="Display"), throughput='large', strategy="latest").to(BlackHole(name="Display_BH")) def mono_motion(): with reip.Task("Cam"): cam = UsbCamGStreamer(name="Cam", filename=DATA_DIR + "/video/%d_{time}.avi", dev=1, bundle=None, rate=15, debug=False, verbose=False) with reip.Task("Det"): det = MotionDetector(name="Detector", do_hist=True, debug=True, verbose=False) cam.to(det, throughput='large', strategy="latest") det.to(ImageWriter(name="Writer", path=DATA_DIR + "/motion/", make_bgr=False), throughput='large').to(BlackHole(name="Writer_BH")) # det.to(ImageDisplay(name="Display", make_bgr=False), throughput='large', strategy="latest").to(BlackHole(name="Display_BH")) def mono_both(): # with reip.Task("Cam"): cam = UsbCamGStreamer(name="Cam", filename=DATA_DIR + "/video/%d_{time}.avi", dev=0, bundle=None, rate=15, debug=False, verbose=False) # with reip.Task("Det_Objects"): det = ObjectDetector(name="Objects_Detector", labels_dir=MODEL_DIR, max_rate=None, thr=0.1, model = "ssd-mobilenet-v2", draw=True, cuda_out=False, zero_copy=False, debug=True, verbose=False) cam.to(det, throughput='large', strategy="latest") det.to(ImageWriter(name="Objects_Writer", path=DATA_DIR + "/objects/"), throughput='large').to(BlackHole(name="Objects_Writer_BH")) # det.to(ImageDisplay(name="Objects_Display"), throughput='large', strategy="latest").to(BlackHole(name="Objects_Display_BH")) # with reip.Task("Det_Motion"): det = MotionDetector(name="Motion_Detector", do_hist=True, debug=True, verbose=False) cam.to(det, throughput='large', strategy="latest") det.to(ImageWriter(name="Motion_Writer", path=DATA_DIR + "/motion/", make_bgr=False), throughput='large').to(BlackHole(name="Motion_Writer_BH")) # det.to(ImageDisplay(name="Motion_Display", make_bgr=False), throughput='large', strategy="latest").to(BlackHole(name="Motion_Display_BH")) def stereo(): # with reip.Task("Cam_Task_0"): cam_0 = UsbCamGStreamer(name="Cam_0", filename=DATA_DIR + "/video/%d_{time}.avi", dev=0, bundle=None, rate=6, debug=True, verbose=False) # with reip.Task("Cam_Task_1"): cam_1 = UsbCamGStreamer(name="Cam_1", filename=DATA_DIR + "/video/%d_{time}.avi", dev=1, bundle=None, rate=6, debug=True, verbose=False) # with reip.Task("Detector_Task"): det = ObjectDetector(name="Detector", n_inputs=2, labels_dir=MODEL_DIR, max_rate=None, thr=0.1, draw=False, cuda_out=False, zero_copy=False, debug=True, verbose=False) det.model = "ssd-mobilenet-v2" cam_0.to(det, throughput='large', strategy="latest", index=0) cam_1.to(det, throughput='large', strategy="latest", index=1) det_gr = Bundle(name="Detection_Bundle", size=10, meta_only=True) det_wr = NumpyWriter(name="Detection_Writer", filename_template=DATA_DIR + "/det/detections_%d") det.to(det_gr).to(det_wr).to(BlackHole(name="Black_Hole_Detector")) # bh_disp = BlackHole(name="Black_Hole_Display") # disp = ImageDisplay(name="Display", make_bgr=True) # det.to(disp, throughput='large', strategy="latest").to(bh_disp) def audio(): audio1s = B.audio.Mic(block_duration=1, channels=16, device="hw:2,0", dtype=np.int32)#.to(B.Debug('audio pcm')) audio10s = audio1s.to(B.FastRebuffer(size=10)) audio10s.to(B.audio.AudioFile(os.path.join(DATA_DIR, 'audio/{time}.wav'))) weightings = 'ZAC' spl = audio1s.to(B.audio.SPL(calibration=72.54, weighting=weightings)) # write to file spl_headers = [f'l{w}eq' for w in weightings.lower()] spl.to(B.Csv(os.path.join(DATA_DIR, 'spl/{time}.csv'), headers=spl_headers, max_rows=10)) with reip.Task("Embeddings_Task"): emb = audio1s.to(B.ml.Tflite(os.path.join(MODEL_DIR, 'quantized_default_int8.tflite'), input_features=functools.partial(B.audio.ml_stft_inputs, sr=8000, duration=1, hop_size=0.1, n_fft=1024, n_mels=64, hop_length=160), name='embedding-model')) emb.to(B.Csv(os.path.join(DATA_DIR, 'emb/{time}.csv'), max_rows=10)) clsf_path = os.path.join(MODEL_DIR, 'mlp_ust.tflite') class_names = ['engine', 'machinery_impact', 'non_machinery_impact', 'powered_saw', 'alert_signal', 'music', 'human_voice', 'dog'] clsf = emb.to(B.ml.Tflite(clsf_path, name='classification-model')) clsf.to(B.Csv(os.path.join(DATA_DIR, 'clsf/{time}.csv'), headers=class_names, max_rows=10)) def all(audio_length=10): rate, timestamp = 4, str(time.time()) with reip.Task("Cam_Task_0"): cam_0 = UsbCamGStreamer(name="Cam_0", filename=DATA_DIR + "/video/%d_"+timestamp+".avi", dev=0, bundle=None, rate=rate, debug=False, verbose=False) # with reip.Task("Cam_Task_1"): # cam_1 = UsbCamGStreamer(name="Cam_1", filename=DATA_DIR + "/video/%d_"+timestamp+".avi", dev=1, # bundle=None, rate=rate, debug=False, verbose=False) with reip.Task("Detector_Task"): det = ObjectDetector(name="Detector", n_inputs=1, labels_dir=MODEL_DIR, max_rate=None, thr=0.1, draw=False, cuda_out=False, zero_copy=False, debug=True, verbose=False) det.model = "ssd-mobilenet-v2" cam_0.to(det, throughput='large', strategy="latest", index=0) # cam_1.to(det, throughput='large', strategy="latest", index=1) det_gr = Bundle(name="Detection_Bundle", size=10, meta_only=True) det_wr = NumpyWriter(name="Detection_Writer", filename_template=DATA_DIR + "/det/"+timestamp+"_%d") det.to(det_gr).to(det_wr).to(BlackHole(name="Black_Hole_Detector")) with reip.Task("Mic_Array_Task"): audio1s = B.audio.Mic(name="Mic_rray", block_duration=1, channels=16, device="hw:2,0", dtype=np.int32)#.to(B.Debug('audio pcm')) audio_ns = audio1s.to(B.FastRebuffer(size=audio_length)) with reip.Task("Audio_Writer_Task"): audio_ns.to(B.audio.AudioFile(os.path.join(DATA_DIR, 'audio/{time}.wav')), throughput='large').to(BlackHole(name="Black_Hole_Audio_Writer")) with reip.Task("SPL_Task"): weightings = 'ZAC' spl = audio1s.to(B.audio.SPL(name="SPL", calibration=72.54, weighting=weightings), throughput='large') # write to file spl_headers = [f'l{w}eq' for w in weightings.lower()] spl.to(B.Csv(os.path.join(DATA_DIR, 'spl/{time}.csv'), headers=spl_headers, max_rows=10)).to(BlackHole(name="Black_Hole_SPL")) # with reip.Task("Audio_AI_Task"): # emb = audio1s.to(B.ml.Tflite(os.path.join(MODEL_DIR, 'quantized_default_int8.tflite'), # input_features=functools.partial(B.audio.ml_stft_inputs, sr=8000, duration=1, hop_size=0.1, n_fft=1024, n_mels=64, hop_length=160), # name='embedding-model'), throughput='large') # emb.to(B.Csv(os.path.join(DATA_DIR, 'emb/{time}.csv'), max_rows=10)) # clsf_path = os.path.join(MODEL_DIR, 'mlp_ust.tflite') # class_names = ['engine', 'machinery_impact', 'non_machinery_impact', 'powered_saw', 'alert_signal', 'music', 'human_voice', 'dog'] # clsf = emb.to(B.ml.Tflite(clsf_path, name='classification-model')) # clsf.to(B.Csv(os.path.join(DATA_DIR, 'clsf/{time}.csv'), headers=class_names, max_rows=10)) if __name__ == '__main__': # If camera got stcuk and does not open, run: # sudo service nvargus-daemon restart # mono_object() # mono_motion() mono_both() # stereo() # audio() # all() reip.default_graph().run(duration=60, stats_interval=2)
44.720588
149
0.667653
1,294
9,123
4.534776
0.167697
0.027437
0.03681
0.064247
0.771643
0.74165
0.719325
0.719325
0.693933
0.693933
0
0.018758
0.170229
9,123
203
150
44.940887
0.756407
0.232928
0
0.292453
0
0
0.153946
0.007474
0
0
0
0
0
1
0.056604
false
0
0.198113
0
0.254717
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3ae72960b023edebfb9b6a3587a9d3a635728bc0
308
py
Python
assign_rights/admin.py
RockefellerArchiveCenter/aquila
b7fc805484ab6e71fc56e2184637165fbc7f445b
[ "MIT" ]
null
null
null
assign_rights/admin.py
RockefellerArchiveCenter/aquila
b7fc805484ab6e71fc56e2184637165fbc7f445b
[ "MIT" ]
150
2020-06-26T13:31:40.000Z
2022-03-16T16:51:27.000Z
assign_rights/admin.py
RockefellerArchiveCenter/aquila
b7fc805484ab6e71fc56e2184637165fbc7f445b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Grouping, RightsShell, User @admin.register(Grouping) class GroupingAdmin(admin.ModelAdmin): pass @admin.register(RightsShell) class RightsShellAdmin(admin.ModelAdmin): pass @admin.register(User) class UserAdmin(admin.ModelAdmin): pass
16.210526
47
0.775974
35
308
6.828571
0.457143
0.16318
0.238494
0.200837
0.267782
0
0
0
0
0
0
0
0.133117
308
18
48
17.111111
0.895131
0
0
0.272727
0
0
0
0
0
0
0
0
0
1
0
true
0.272727
0.181818
0
0.454545
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
aaf124572ac8151994f6c38aafbbc6177a49f00c
1,162
py
Python
test.py
heph/awstrust
e83e8cf13ef9879eaf98657db5f99ce8a4657341
[ "Apache-2.0" ]
1
2020-02-27T19:40:02.000Z
2020-02-27T19:40:02.000Z
test.py
heph/awstrust
e83e8cf13ef9879eaf98657db5f99ce8a4657341
[ "Apache-2.0" ]
null
null
null
test.py
heph/awstrust
e83e8cf13ef9879eaf98657db5f99ce8a4657341
[ "Apache-2.0" ]
null
null
null
import awstrust test_doc = """-----BEGIN PKCS7----- MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEggGoewog ICJkZXZwYXlQcm9kdWN0Q29kZXMiIDogbnVsbCwKICAicHJpdmF0ZUlwIiA6ICIxMC4yMS4xMC4x MjAiLAogICJhdmFpbGFiaWxpdHlab25lIiA6ICJ1cy13ZXN0LTJhIiwKICAiYWNjb3VudElkIiA6 ICI3MjY2NjA4Mjg1NTIiLAogICJ2ZXJzaW9uIiA6ICIyMDEwLTA4LTMxIiwKICAiaW5zdGFuY2VJ ZCIgOiAiaS1jMDBlNzU1NCIsCiAgImJpbGxpbmdQcm9kdWN0cyIgOiBudWxsLAogICJpbnN0YW5j ZVR5cGUiIDogImM0LjJ4bGFyZ2UiLAogICJwZW5kaW5nVGltZSIgOiAiMjAxNi0xMi0xNFQwMjoy Mzo1M1oiLAogICJhcmNoaXRlY3R1cmUiIDogIng4Nl82NCIsCiAgImltYWdlSWQiIDogImFtaS0z ODMzOTk1OCIsCiAgImtlcm5lbElkIiA6IG51bGwsCiAgInJhbWRpc2tJZCIgOiBudWxsLAogICJy ZWdpb24iIDogInVzLXdlc3QtMiIKfQAAAAAAADGCARcwggETAgEBMGkwXDELMAkGA1UEBhMCVVMx GTAXBgNVBAgTEFdhc2hpbmd0b24gU3RhdGUxEDAOBgNVBAcTB1NlYXR0bGUxIDAeBgNVBAoTF0Ft YXpvbiBXZWIgU2VydmljZXMgTExDAgkAlrpI2eVeGmcwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJ AzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE2MTIxNDAyMjQwNlowIwYJKoZIhvcNAQkE MRYEFGmllXlaywI6YZzjBq+xvKt+h6JwMAkGByqGSM44BAMELjAsAhRkA+0vaHSKEN3DLsNMyoJ7 mImIKgIUaPkUH6EkAhp9Rc4oiIzm2OhKjGQAAAAAAAA= -----END PKCS7-----""" print(awstrust.verify_pkcs7(test_doc))
55.333333
76
0.947504
31
1,162
35.419355
0.83871
0.01275
0
0
0
0
0
0
0
0
0
0.080915
0.021515
1,162
20
77
58.1
0.884785
0
0
0
0
0
0.935456
0.888124
0
1
0
0
0
1
0
false
0
0.055556
0
0.055556
0.055556
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
4
c90a7e46809c4eaddc650ddbf657af687bba4353
177
py
Python
oscar/apps/address/models.py
owad/django-oscar
cfa69e37dc9abc97a7aff5c8616da319e1771008
[ "BSD-3-Clause" ]
1
2022-03-17T19:26:13.000Z
2022-03-17T19:26:13.000Z
oscar/apps/address/models.py
aykut/django-oscar
ca3629e74ea1e0affc55d3de4e97f523e352d267
[ "BSD-3-Clause" ]
null
null
null
oscar/apps/address/models.py
aykut/django-oscar
ca3629e74ea1e0affc55d3de4e97f523e352d267
[ "BSD-3-Clause" ]
1
2019-03-23T10:26:02.000Z
2019-03-23T10:26:02.000Z
from oscar.apps.address.abstract_models import AbstractUserAddress, AbstractCountry class UserAddress(AbstractUserAddress): pass class Country(AbstractCountry): pass
19.666667
83
0.819209
17
177
8.470588
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.124294
177
9
84
19.666667
0.929032
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0
true
0.4
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
c93dc6894b0f3e5af222d5d0eecc3303846a65f6
120
py
Python
ripple.py
hoffie/ripple
2aaa11499f24776ac565ea816f120ec3b2f6197b
[ "MIT" ]
1
2020-12-02T16:25:10.000Z
2020-12-02T16:25:10.000Z
ripple.py
hoffie/ripple
2aaa11499f24776ac565ea816f120ec3b2f6197b
[ "MIT" ]
null
null
null
ripple.py
hoffie/ripple
2aaa11499f24776ac565ea816f120ec3b2f6197b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys from ripple.cli import dispatch if __name__ == '__main__': dispatch(sys.argv[1:])
17.142857
31
0.708333
18
120
4.277778
0.833333
0
0
0
0
0
0
0
0
0
0
0.009804
0.15
120
6
32
20
0.745098
0.166667
0
0
0
0
0.080808
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c95bcf1f453e336edc79d1cb9b4b50fc4014f8f2
223
py
Python
demos/python/sdk_wireless_camera_control/open_gopro/demos/__init__.py
Natureshadow/OpenGoPro
05110123cfbf6584288b813f2d4896d3a091480e
[ "MIT" ]
210
2021-06-05T20:06:17.000Z
2022-03-31T18:13:17.000Z
demos/python/sdk_wireless_camera_control/open_gopro/demos/__init__.py
Natureshadow/OpenGoPro
05110123cfbf6584288b813f2d4896d3a091480e
[ "MIT" ]
73
2021-06-01T21:22:44.000Z
2022-03-31T18:33:24.000Z
demos/python/sdk_wireless_camera_control/open_gopro/demos/__init__.py
Natureshadow/OpenGoPro
05110123cfbf6584288b813f2d4896d3a091480e
[ "MIT" ]
70
2021-06-07T03:59:04.000Z
2022-03-26T10:51:15.000Z
# __init__.py/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). # This copyright was auto-generated on Wed, Sep 1, 2021 5:05:46 PM """Demos to show how to use Open GoPro package"""
44.6
99
0.695067
39
223
3.871795
0.820513
0.119205
0
0
0
0
0
0
0
0
0
0.086957
0.174888
223
4
100
55.75
0.733696
0.932735
0
null
1
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
c9740e0967a39ad2aca81aa5113d31530c561221
129
py
Python
mapentity/__init__.py
TheoLechemia/mapentity-project
41c78ead51d4733dcbef69c557fa6eec0ade71f7
[ "BSD-3-Clause" ]
1
2016-11-21T23:46:52.000Z
2016-11-21T23:46:52.000Z
mapentity/__init__.py
TheoLechemia/mapentity-project
41c78ead51d4733dcbef69c557fa6eec0ade71f7
[ "BSD-3-Clause" ]
null
null
null
mapentity/__init__.py
TheoLechemia/mapentity-project
41c78ead51d4733dcbef69c557fa6eec0ade71f7
[ "BSD-3-Clause" ]
null
null
null
from .settings import app_settings from .registry import Registry __all__ = ['app_settings', 'registry'] registry = Registry()
18.428571
38
0.767442
15
129
6.2
0.4
0.236559
0
0
0
0
0
0
0
0
0
0
0.131783
129
6
39
21.5
0.830357
0
0
0
0
0
0.155039
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
c97b90c76aff2c3ce0b9c3c8bdf68737a278f3b3
6,854
py
Python
gui/src/post_goal.py
magnusoy/Sparkie
428b716a50cd0c274670971ee007e82571a04a80
[ "MIT" ]
15
2020-03-07T12:25:50.000Z
2021-11-27T03:13:47.000Z
gui/src/post_goal.py
magnusoy/Sparkie
428b716a50cd0c274670971ee007e82571a04a80
[ "MIT" ]
null
null
null
gui/src/post_goal.py
magnusoy/Sparkie
428b716a50cd0c274670971ee007e82571a04a80
[ "MIT" ]
9
2020-04-08T04:37:34.000Z
2021-11-27T03:13:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import roslib import rospy import sys from std_msgs.msg import UInt8 import numpy as np from move_base_msgs.msg import MoveBaseActionGoal, MoveBaseActionFeedback, MoveBaseGoal from actionlib_msgs.msg import GoalID, GoalStatusArray from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal import actionlib from actionlib_msgs.msg import * def post_goal(filename): """Read mission and extract goal""" with open(filename, 'r') as file: content = file.read() json = json.loads(content) goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = json['x_lin'] goal.target_pose.pose.position.y = json['y_lin'] goal.target_pose.pose.orientation.z = json['z_ori'] goal.target_pose.pose.orientation.w = json['w_lin'] move_base.send_goal(goal) print("Sending goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) rospy.init_node('movebase_client_py', anonymous=True) move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction) result_publisher = rospy.Publisher('goal_reached', UInt8, queue_size=1) move_base.wait_for_server() print('Connected to server') num_goal_reached = sys.argv[1] goal_file = sys.argv[2] post_goal(goal_file) """ if num_goal_reached == '0': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 0.415 goal.target_pose.pose.position.y = -0.031 goal.target_pose.pose.orientation.z = 0.000 goal.target_pose.pose.orientation.w = 0.999 move_base.send_goal(goal) print("Sending 0 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '1': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 1.666 goal.target_pose.pose.position.y = -0.555 goal.target_pose.pose.orientation.z = -0.081 goal.target_pose.pose.orientation.w = 0.997 move_base.send_goal(goal) print("Sending 1 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '2': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 2.566 goal.target_pose.pose.position.y = -0.502 goal.target_pose.pose.orientation.z = 0.016 goal.target_pose.pose.orientation.w = 1.000 move_base.send_goal(goal) print("Sending 2 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '3': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 3.526 goal.target_pose.pose.position.y = -0.865 goal.target_pose.pose.orientation.z = -0.050 goal.target_pose.pose.orientation.w = 1.000 move_base.send_goal(goal) print("Sending 3 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '4': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 5.066 goal.target_pose.pose.position.y = 0.128 goal.target_pose.pose.orientation.z = 0.165 goal.target_pose.pose.orientation.w = 0.986 move_base.send_goal(goal) print("Sending 4 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '5': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 7.100 goal.target_pose.pose.position.y = -0.327 goal.target_pose.pose.orientation.z = -0.348 goal.target_pose.pose.orientation.w = 0.936 move_base.send_goal(goal) print("Sending 5 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '6': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 7.457 goal.target_pose.pose.position.y = -1.349 goal.target_pose.pose.orientation.z = -0.698 goal.target_pose.pose.orientation.w = 0.716 move_base.send_goal(goal) print("Sending 6 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) elif num_goal_reached == '7': goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 7.457 goal.target_pose.pose.position.y = -2.321 goal.target_pose.pose.orientation.z = -0.698 goal.target_pose.pose.orientation.w = 0.716 move_base.send_goal(goal) print("Sending 7 goal") wait = move_base.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: rospy.loginfo("Goal execution done!") result_publisher.publish(1) """
36.652406
87
0.694923
978
6,854
4.696319
0.133947
0.11757
0.164598
0.141084
0.847376
0.834749
0.804921
0.666014
0.666014
0.666014
0
0.028418
0.183688
6,854
187
88
36.652406
0.792493
0.010505
0
0
0
0
0.115568
0
0
0
0
0
0
1
0.026316
false
0
0.263158
0
0.289474
0.052632
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c980a004916376ac482a1c15fe2e4c1ef2e343ba
202
py
Python
All_Source_Code/SteelPlateFaults/SteelPlateFaults_6.py
APMonitor/pds
fa9a7ec920802de346dcdf7f5dd92d752142c16f
[ "MIT" ]
11
2021-01-21T09:46:29.000Z
2022-03-16T19:33:10.000Z
All_Source_Code/SteelPlateFaults/SteelPlateFaults_6.py
the-mahapurush/pds
7cb4087dd8e75cb1e9b2a4283966c798175f61f7
[ "MIT" ]
1
2022-03-16T19:47:09.000Z
2022-03-16T20:11:50.000Z
All_Source_Code/SteelPlateFaults/SteelPlateFaults_6.py
the-mahapurush/pds
7cb4087dd8e75cb1e9b2a4283966c798175f61f7
[ "MIT" ]
12
2021-02-08T21:11:11.000Z
2022-03-20T12:42:49.000Z
import matplotlib.pyplot as plt plt.semilogy(result.history['loss'],label='loss') plt.semilogy(result.history['val_loss'],label='val_loss') plt.legend() plt.ylabel('Loss') plt.xlabel('Epoch') plt.show()
28.857143
57
0.752475
31
202
4.83871
0.516129
0.14
0.226667
0.32
0
0
0
0
0
0
0
0
0.044554
202
7
58
28.857143
0.777202
0
0
0
0
0
0.162562
0
0
0
0
0
0
1
0
true
0
0.142857
0
0.142857
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
a321eab8b23fa13aec90695ca32283896dc84414
180
py
Python
Desafio017.py
cesarsouza5995/cursoenvideo
85f48e9682dcca4f3ddb172513f7af2db18677e4
[ "MIT" ]
null
null
null
Desafio017.py
cesarsouza5995/cursoenvideo
85f48e9682dcca4f3ddb172513f7af2db18677e4
[ "MIT" ]
null
null
null
Desafio017.py
cesarsouza5995/cursoenvideo
85f48e9682dcca4f3ddb172513f7af2db18677e4
[ "MIT" ]
null
null
null
""" Aula 008 Desafio 17 Faça um programa que leia o comprimento do cateto oposto e do cateto adjacente de um triângulo retângulo, calcule e mostre o comprimento da hipotenusa. """
30
151
0.783333
29
180
4.862069
0.793103
0.170213
0
0
0
0
0
0
0
0
0
0.033557
0.172222
180
5
152
36
0.912752
0.95
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
a322d1222133233cc3f4884693f6fd84755faec3
282
py
Python
HackerRank/Problem Solving/Print the Elements of a Linked List.py
AkashSCIENTIST/CompetitiveSolutions
236db303a21c7195ebf721394a54ce9df70782f5
[ "Apache-2.0" ]
null
null
null
HackerRank/Problem Solving/Print the Elements of a Linked List.py
AkashSCIENTIST/CompetitiveSolutions
236db303a21c7195ebf721394a54ce9df70782f5
[ "Apache-2.0" ]
null
null
null
HackerRank/Problem Solving/Print the Elements of a Linked List.py
AkashSCIENTIST/CompetitiveSolutions
236db303a21c7195ebf721394a54ce9df70782f5
[ "Apache-2.0" ]
null
null
null
# Complete the printLinkedList function below. # # For your reference: # # SinglyLinkedListNode: # int data # SinglyLinkedListNode next # # def printLinkedList(head): if(head is not None): print(head.data) printLinkedList(head.next)
15.666667
47
0.634752
27
282
6.62963
0.703704
0.212291
0
0
0
0
0
0
0
0
0
0
0.280142
282
17
48
16.588235
0.881773
0.457447
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.75
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
0
0
1
0
4
a32558db92e6a33ebd3a0486270c5fabe588ef7a
50
py
Python
spiketools/stats/__init__.py
claire98han/SpikeTools
f1cdffd50e2cbdb75961a716425c4665aa930f54
[ "Apache-2.0" ]
1
2022-03-09T19:40:37.000Z
2022-03-09T19:40:37.000Z
spiketools/stats/__init__.py
claire98han/SpikeTools
f1cdffd50e2cbdb75961a716425c4665aa930f54
[ "Apache-2.0" ]
35
2021-09-28T15:13:31.000Z
2021-11-26T04:38:08.000Z
spiketools/stats/__init__.py
claire98han/SpikeTools
f1cdffd50e2cbdb75961a716425c4665aa930f54
[ "Apache-2.0" ]
4
2021-09-28T14:56:24.000Z
2022-03-09T21:00:31.000Z
"""Statistics related functions and utilities."""
25
49
0.76
5
50
7.6
1
0
0
0
0
0
0
0
0
0
0
0
0.1
50
1
50
50
0.844444
0.86
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
a36c7ba0781b4b112d6b66a19d8fd6d1481cb993
265
py
Python
Python_OOP_Softuni/Inheritance_Exercise/venv/person/project/person.py
borisboychev/SoftUni
22062312f08e29a1d85377a6d41ef74966d37e99
[ "MIT" ]
1
2020-12-14T23:25:19.000Z
2020-12-14T23:25:19.000Z
Python_OOP_Softuni/Inheritance_Exercise/venv/person/project/person.py
borisboychev/SoftUni
22062312f08e29a1d85377a6d41ef74966d37e99
[ "MIT" ]
null
null
null
Python_OOP_Softuni/Inheritance_Exercise/venv/person/project/person.py
borisboychev/SoftUni
22062312f08e29a1d85377a6d41ef74966d37e99
[ "MIT" ]
null
null
null
class Person: def __init__(self, name, age): self.name = name self.age = age class Child(Person): def __init__(self, name, age): super().__init__(name, age) # """"Test Code""" # child = Child('Boris', 18) # print(child.__dict__)
17.666667
35
0.588679
34
265
4.117647
0.441176
0.171429
0.185714
0.242857
0.342857
0.342857
0
0
0
0
0
0.01005
0.249057
265
15
36
17.666667
0.693467
0.245283
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0
0.571429
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
a3786d4b7646c3d1ec235d3796d2dd57a868bbc5
221
py
Python
Universidad/Modulos/Academica/admin.py
Griselberto/DESARROLLO-WEB-ICIT
267a5c919ded6357ad91b89d92a5f0c658b49ae9
[ "MIT" ]
null
null
null
Universidad/Modulos/Academica/admin.py
Griselberto/DESARROLLO-WEB-ICIT
267a5c919ded6357ad91b89d92a5f0c658b49ae9
[ "MIT" ]
null
null
null
Universidad/Modulos/Academica/admin.py
Griselberto/DESARROLLO-WEB-ICIT
267a5c919ded6357ad91b89d92a5f0c658b49ae9
[ "MIT" ]
null
null
null
from django.contrib import admin from Modulos.Academica.models import * # Register ypur models here admin.site.register(Carrera) admin.site.register(Estudiante) admin.site.register(Curso) admin.site.register(Matricula)
22.1
38
0.819005
30
221
6.033333
0.533333
0.198895
0.375691
0
0
0
0
0
0
0
0
0
0.085973
221
9
39
24.555556
0.89604
0.113122
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
a3863fe062850e791f83458470e4f635480e5839
868
py
Python
dataworkspace/dataworkspace/apps/core/boto3_client.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
1
2019-06-10T08:22:56.000Z
2019-06-10T08:22:56.000Z
dataworkspace/dataworkspace/apps/core/boto3_client.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
2
2019-05-17T13:10:42.000Z
2019-06-17T10:48:46.000Z
dataworkspace/dataworkspace/apps/core/boto3_client.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
null
null
null
import logging import boto3 from django.conf import settings logger = logging.getLogger("app") def get_s3_client(): if settings.S3_LOCAL_ENDPOINT_URL: logger.debug("using local S3 endpoint %s", settings.S3_LOCAL_ENDPOINT_URL) return boto3.client("s3", endpoint_url=settings.S3_LOCAL_ENDPOINT_URL) return boto3.client("s3") def get_sts_client(): if settings.STS_LOCAL_ENDPOINT_URL: logger.debug("get_sts_client using %s", settings.STS_LOCAL_ENDPOINT_URL) return boto3.client("sts", endpoint_url=settings.STS_LOCAL_ENDPOINT_URL) return boto3.client("sts") def get_iam_client(): if settings.STS_LOCAL_ENDPOINT_URL: logger.debug("get_iam_client using %s", settings.STS_LOCAL_ENDPOINT_URL) return boto3.client("iam", endpoint_url=settings.STS_LOCAL_ENDPOINT_URL) return boto3.client("iam")
28
82
0.746544
124
868
4.903226
0.193548
0.217105
0.236842
0.217105
0.754934
0.694079
0.694079
0.694079
0.694079
0.526316
0
0.0191
0.15553
868
30
83
28.933333
0.810368
0
0
0.105263
0
0
0.104839
0
0
0
0
0
0
1
0.157895
false
0
0.157895
0
0.631579
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
a391a7b5c012c0477ac0c78163c4ed5204707c86
389
py
Python
dnsmanager/api/views.py
erdnaxe/django-dnsmanager
5c00c8f6ca98678d5e8f02243622419f602d4daa
[ "BSD-3-Clause" ]
8
2019-12-21T10:07:49.000Z
2021-08-27T23:51:54.000Z
dnsmanager/api/views.py
constellation-project/django-dnsmanager
5c00c8f6ca98678d5e8f02243622419f602d4daa
[ "BSD-3-Clause" ]
6
2019-12-21T09:45:14.000Z
2021-03-27T10:14:28.000Z
dnsmanager/api/views.py
constellation-project/django-dnsmanager
5c00c8f6ca98678d5e8f02243622419f602d4daa
[ "BSD-3-Clause" ]
3
2020-07-19T23:15:53.000Z
2021-03-26T19:00:20.000Z
from rest_framework import viewsets from .serializers import RecordPolymorphicSerializer, ZoneSerializer from ..models import Record, Zone class RecordViewSet(viewsets.ModelViewSet): queryset = Record.objects.all() serializer_class = RecordPolymorphicSerializer class ZoneViewSet(viewsets.ModelViewSet): queryset = Zone.objects.all() serializer_class = ZoneSerializer
25.933333
68
0.804627
37
389
8.378378
0.513514
0.129032
0.180645
0.16129
0
0
0
0
0
0
0
0
0.131105
389
14
69
27.785714
0.91716
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6e5e6e1d5d65bc497865409aecba32fdc3fc26ec
364
py
Python
numerai/__init__.py
gansanay/numerai
b96fda1fdf40c63a857f4de91c776b9564ea6308
[ "MIT" ]
19
2017-03-11T13:32:13.000Z
2021-03-04T06:00:10.000Z
numerai/__init__.py
gansanay/numerai
b96fda1fdf40c63a857f4de91c776b9564ea6308
[ "MIT" ]
null
null
null
numerai/__init__.py
gansanay/numerai
b96fda1fdf40c63a857f4de91c776b9564ea6308
[ "MIT" ]
4
2017-03-11T21:24:19.000Z
2018-05-09T07:57:15.000Z
# -*- coding: utf-8 -*- __title__ = 'numerai' from numerai.classes.numerapi import NumerAPI from numerai.classes.round import Round from numerai.features.univariateselection import pearson from numerai.features.univariateselection import kolmogorov_smirnov from numerai.viz.visualization import plot_learning_curve from numerai.viz.visualization import plot_PCA
33.090909
67
0.840659
45
364
6.622222
0.466667
0.221477
0.120805
0.255034
0.543624
0.248322
0
0
0
0
0
0.00303
0.093407
364
10
68
36.4
0.9
0.057692
0
0
0
0
0.020528
0
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6e7c505fb3e0abb1305847ac5d2b00214a5dc57a
439
gyp
Python
binding.gyp
st-matskevich/electron-archiver
2098c2885c6ce22819ab0e9a3125ba6cd1d9f8d9
[ "CC0-1.0" ]
null
null
null
binding.gyp
st-matskevich/electron-archiver
2098c2885c6ce22819ab0e9a3125ba6cd1d9f8d9
[ "CC0-1.0" ]
1
2021-01-28T20:53:27.000Z
2021-01-28T20:53:27.000Z
binding.gyp
st-matskevich/electron-archiver
2098c2885c6ce22819ab0e9a3125ba6cd1d9f8d9
[ "CC0-1.0" ]
null
null
null
{ "targets": [ { "target_name": "compressor", "sources": [ "./dev/compressor/bit_reader.cpp", "./dev/compressor/bit_writer.cpp", "./dev/compressor/encoding.cpp", "./dev/compressor/tree_node.cpp", "./dev/compressor/huffman.cpp", "./dev/compressor/node_wrapper.cpp" ], "include_dirs": [ "<!(node -e \"require('nan')\")" ] } ] }
36.583333
129
0.487472
39
439
5.333333
0.512821
0.375
0.384615
0
0
0
0
0
0
0
0
0
0.312073
439
12
130
36.583333
0.688742
0
0
0
0
0
0.556818
0.413636
0
0
0
0
0
1
0
true
0
0
0
0
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
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
6e833e3cb42159434e9db341fbb2e5f3353af05d
140
py
Python
pacetrack/dal.py
hatnote/pacetrack
c63aede71aba5f98df8a4212d15f0adc6eb4de7c
[ "BSD-2-Clause" ]
7
2018-11-29T23:25:02.000Z
2019-11-09T05:13:42.000Z
pacetrack/dal.py
hatnote/pacetrack
c63aede71aba5f98df8a4212d15f0adc6eb4de7c
[ "BSD-2-Clause" ]
null
null
null
pacetrack/dal.py
hatnote/pacetrack
c63aede71aba5f98df8a4212d15f0adc6eb4de7c
[ "BSD-2-Clause" ]
1
2018-12-07T22:18:20.000Z
2018-12-07T22:18:20.000Z
# -*- coding: utf-8 -*- import os # TODO: someday DB_CONFIG_PATH = os.path.expanduser('~/replica.my.cnf') # Available by default on Labs
20
87
0.678571
21
140
4.428571
0.904762
0
0
0
0
0
0
0
0
0
0
0.008475
0.157143
140
6
88
23.333333
0.779661
0.457143
0
0
0
0
0.222222
0
0
0
0
0.166667
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
4
6e9854b490e9fd532355e07ff3033f8136aa22be
122
py
Python
sept_example/sept_example.py
dilnoza92/sept_example
e31dde5e53ae2813b39583d242e732b04528a334
[ "MIT" ]
null
null
null
sept_example/sept_example.py
dilnoza92/sept_example
e31dde5e53ae2813b39583d242e732b04528a334
[ "MIT" ]
null
null
null
sept_example/sept_example.py
dilnoza92/sept_example
e31dde5e53ae2813b39583d242e732b04528a334
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Main module.""" a=4 b=5 def addition(var1,var2): return var1+var2 c=addition(a,b) print c
12.2
24
0.606557
22
122
3.363636
0.727273
0.216216
0
0
0
0
0
0
0
0
0
0.069307
0.172131
122
9
25
13.555556
0.663366
0.172131
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.166667
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
6e9b6dbb8c5fe81199d4da5c1bf8f6c3c6a54740
95
py
Python
CyTrack/CyTracking/apps.py
M2I-HABET/CyTrack
4bd53aebf422d027790597a3d592e0066c700523
[ "MIT" ]
null
null
null
CyTrack/CyTracking/apps.py
M2I-HABET/CyTrack
4bd53aebf422d027790597a3d592e0066c700523
[ "MIT" ]
9
2020-02-11T23:51:30.000Z
2021-07-02T16:07:14.000Z
CyTrack/CyTracking/apps.py
M2I-HABET/CyTrack
4bd53aebf422d027790597a3d592e0066c700523
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CytrackingConfig(AppConfig): name = 'CyTracking'
15.833333
34
0.768421
10
95
7.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.157895
95
5
35
19
0.9125
0
0
0
0
0
0.105263
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6ec7558463d2ed4691ab88a6762252a777457774
589
py
Python
env/lib/python3.6/site-packages/voting/__init__.py
Nyash-Mauro/Instagram-clone
39f3b660b3bdd59996fa88816712c906d0e3fba5
[ "MIT" ]
13
2019-03-13T11:51:58.000Z
2021-09-29T05:56:52.000Z
env/lib/python3.6/site-packages/voting/__init__.py
Nyash-Mauro/Instagram-clone
39f3b660b3bdd59996fa88816712c906d0e3fba5
[ "MIT" ]
20
2019-05-24T01:02:53.000Z
2021-06-01T23:55:54.000Z
env/lib/python3.6/site-packages/voting/__init__.py
Nyash-Mauro/Instagram-clone
39f3b660b3bdd59996fa88816712c906d0e3fba5
[ "MIT" ]
3
2019-12-13T09:23:55.000Z
2021-09-27T23:42:15.000Z
"""Module level accessible objects.""" from voting._version import __version__ from voting._version import __description__ from voting._version import __url__ from voting._version import __title__ from voting._version import __author__ from voting._version import __author_email__ from voting._version import __license__ from voting._version import __copyright__ from voting._version import __docs_copyright__ __all__ = ( __version__, __description__, __url__, __title__, __author__, __author_email__, __license__, __copyright__, __docs_copyright__, )
25.608696
46
0.79966
63
589
6.063492
0.269841
0.235602
0.400524
0.541885
0.151832
0
0
0
0
0
0
0
0.152801
589
22
47
26.772727
0.765531
0.054329
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.45
0
0.45
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
42db954cf70d9a54bff4a4f39e3982711b49a8b7
142
py
Python
deep_reinforcement_learning/train.py
ximingxing/Deep-Learning-in-Action
38d5d3d6990553ff9d3ea771d8e83f8b47241b9a
[ "MIT" ]
1
2020-09-16T09:17:37.000Z
2020-09-16T09:17:37.000Z
deep_reinforcement_learning/train.py
ximingxing/Deep-Learning-in-Action
38d5d3d6990553ff9d3ea771d8e83f8b47241b9a
[ "MIT" ]
1
2021-05-13T05:20:07.000Z
2021-05-13T05:20:07.000Z
deep_reinforcement_learning/train.py
ximingxing/Deep-Learning-in-Action
38d5d3d6990553ff9d3ea771d8e83f8b47241b9a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ @Project: Deep-Learning-in-Action @File: train.py @Author: 轩名 @Date: 2021/8/17 5:14 下午 """
14.2
33
0.612676
24
142
3.625
0.958333
0
0
0
0
0
0
0
0
0
0
0.090164
0.140845
142
9
34
15.777778
0.622951
0.908451
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
6e044759938b986b49fd74660148e356aa5d0a15
91
py
Python
rotary_online/rotary_online/doctype/club/club_dashboard.py
RotaractIndia/rotary_online
d6d7bfd0dbc2ac52160a8a7969f64ab9ee93abac
[ "MIT" ]
1
2021-05-31T08:09:29.000Z
2021-05-31T08:09:29.000Z
rotary_online/rotary_online/doctype/club/club_dashboard.py
RotaractIndia/rotary_online
d6d7bfd0dbc2ac52160a8a7969f64ab9ee93abac
[ "MIT" ]
null
null
null
rotary_online/rotary_online/doctype/club/club_dashboard.py
RotaractIndia/rotary_online
d6d7bfd0dbc2ac52160a8a7969f64ab9ee93abac
[ "MIT" ]
1
2021-05-31T08:09:30.000Z
2021-05-31T08:09:30.000Z
from frappe import _ def get_data(): return { 'heatmap': True, 'fieldname': 'club' }
13
21
0.637363
11
91
5.090909
1
0
0
0
0
0
0
0
0
0
0
0
0.208791
91
7
22
13
0.777778
0
0
0
0
0
0.217391
0
0
0
0
0
0
1
0.166667
true
0
0.166667
0.166667
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
0
0
0
4
6e409a83e63d0869aa2a7d83e44de77a0fae2089
515
py
Python
src/chaospy/quad/collection/genz_keister/__init__.py
yoon-gu/chaospy
fe541840a79882008f38764cd7ba4935a4fd4fa3
[ "BSD-3-Clause" ]
1
2018-08-22T01:51:25.000Z
2018-08-22T01:51:25.000Z
src/chaospy/quad/collection/genz_keister/__init__.py
TribleCircle/chaospy
f22aa31e2a338a32a6d09b810c5b629c10a87236
[ "BSD-3-Clause" ]
null
null
null
src/chaospy/quad/collection/genz_keister/__init__.py
TribleCircle/chaospy
f22aa31e2a338a32a6d09b810c5b629c10a87236
[ "BSD-3-Clause" ]
1
2019-11-24T17:16:30.000Z
2019-11-24T17:16:30.000Z
""" Hermite Genz-Keister quadrature rules Adapted from John Burkardt's implementation in Matlab Licensing --------- This code is distributed under the GNU LGPL license. """ from .gk16 import quad_genz_keister_16 from .gk18 import quad_genz_keister_18 from .gk22 import quad_genz_keister_22 from .gk24 import quad_genz_keister_24 COLLECTION = { 16: quad_genz_keister_16, 18: quad_genz_keister_18, 22: quad_genz_keister_22, 24: quad_genz_keister_24, } from .genz_keister import quad_genz_keister
21.458333
53
0.784466
79
515
4.772152
0.43038
0.320955
0.35809
0.278515
0
0
0
0
0
0
0
0.073059
0.149515
515
23
54
22.391304
0.787671
0.32233
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.454545
0
0.454545
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
6e525b06dbce1b4c240d4c36f1974645b9d52796
269
py
Python
src/vbr/pgrest/relationship.py
a2cps/python-vbr
9d5d4480386d0530450d59157e0da6937320f928
[ "BSD-3-Clause" ]
1
2021-05-26T19:08:29.000Z
2021-05-26T19:08:29.000Z
src/vbr/pgrest/relationship.py
a2cps/python-vbr
9d5d4480386d0530450d59157e0da6937320f928
[ "BSD-3-Clause" ]
7
2021-05-04T13:12:39.000Z
2022-03-09T21:04:33.000Z
src/vbr/pgrest/relationship.py
a2cps/python-vbr
9d5d4480386d0530450d59157e0da6937320f928
[ "BSD-3-Clause" ]
2
2021-04-20T14:46:52.000Z
2021-06-07T20:28:28.000Z
__all__ = [] class relationship(object): """Stub for SQLalchemy-like relationship""" def __init__(self, *args, **kwargs): pass class backref(object): """Stub for SQLalchemy-like backref""" def __init__(self, *args, **kwargs): pass
16.8125
47
0.620818
29
269
5.344828
0.517241
0.129032
0.167742
0.296774
0.670968
0.322581
0
0
0
0
0
0
0.234201
269
15
48
17.933333
0.752427
0.260223
0
0.571429
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.285714
0
0
0.571429
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
1
0
1
0
0
0
0
0
4
2890365e773af94e9254d1bd676a3fdd5c211ebb
214
py
Python
databass/compile/project.py
ivychen/databass-public
ddb706dfb14c828075842e49d086b7fe5aa29a83
[ "MIT" ]
6
2019-11-06T20:57:19.000Z
2022-01-06T22:09:14.000Z
databass/compile/project.py
ivychen/databass-public
ddb706dfb14c828075842e49d086b7fe5aa29a83
[ "MIT" ]
1
2020-09-13T02:04:02.000Z
2020-09-13T14:59:19.000Z
databass/compile/project.py
ivychen/databass-public
ddb706dfb14c828075842e49d086b7fe5aa29a83
[ "MIT" ]
22
2019-01-31T15:20:06.000Z
2022-03-22T19:52:18.000Z
from ..ops import GroupBy from .translator import * class ProjectTranslator(Translator): def __init__(self, *args, **kwargs): super(ProjectTranslator, self).__init__(*args, **kwargs) self.v_out = None
21.4
60
0.719626
25
214
5.8
0.64
0.137931
0
0
0
0
0
0
0
0
0
0
0.154206
214
9
61
23.777778
0.801105
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
289a3e992b40970ebef1d8f90152707b325aa1ed
302
py
Python
germanium/util/parent_node.py
bmustiata/germanium-python-api
cb7b14279a263bbbfa8b8d72eaba14778648eda9
[ "BSD-3-Clause" ]
null
null
null
germanium/util/parent_node.py
bmustiata/germanium-python-api
cb7b14279a263bbbfa8b8d72eaba14778648eda9
[ "BSD-3-Clause" ]
null
null
null
germanium/util/parent_node.py
bmustiata/germanium-python-api
cb7b14279a263bbbfa8b8d72eaba14778648eda9
[ "BSD-3-Clause" ]
null
null
null
from ._action_element_finder import _element from .find_germanium_object import find_germanium_object def parent_node_g(context, selector): germanium = find_germanium_object(context) element = _element(germanium, selector) return germanium.js("return arguments[0].parentNode;", element)
30.2
67
0.801325
37
302
6.189189
0.513514
0.170306
0.248908
0
0
0
0
0
0
0
0
0.003774
0.122517
302
9
68
33.555556
0.860377
0
0
0
0
0
0.102649
0.07947
0
0
0
0
0
1
0.166667
false
0
0.333333
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
95375d547b4dbcf24845874485e292321321cda0
7,750
py
Python
tests/test_ape_vaults.py
bejaxer/Coordinape-Protocol
d5691a409730718675babc154d4876fcd13f5699
[ "MIT" ]
1
2022-01-25T00:27:25.000Z
2022-01-25T00:27:25.000Z
tests/test_ape_vaults.py
bejaxer/Coordinape-Protocol
d5691a409730718675babc154d4876fcd13f5699
[ "MIT" ]
null
null
null
tests/test_ape_vaults.py
bejaxer/Coordinape-Protocol
d5691a409730718675babc154d4876fcd13f5699
[ "MIT" ]
null
null
null
from brownie import accounts, chain, reverts, Wei from eth_account.messages import encode_defunct, encode_intended_validator, SignableMessage from eth_abi import encode_single import web3 def setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter): set_fee_call = ape_reg.setFeeRegistry.encode_input(ape_fee) set_router_call = ape_reg.setRouter.encode_input(ape_router) set_distro_call = ape_reg.setDistributor.encode_input(ape_distro) set_factory_call = ape_reg.setFactory.encode_input(ape_factory) ape_reg.schedule(ape_reg, set_fee_call, '', '', 0, {'from':minter}) ape_reg.schedule(ape_reg, set_router_call, '', '', 0, {'from':minter}) ape_reg.schedule(ape_reg, set_distro_call, '', '', 0, {'from':minter}) ape_reg.schedule(ape_reg, set_factory_call, '', '', 0, {'from':minter}) ape_reg.execute(ape_reg, set_fee_call, '', '', 0, {'from':minter}) ape_reg.execute(ape_reg, set_router_call, '', '', 0, {'from':minter}) ape_reg.execute(ape_reg, set_distro_call, '', '', 0, {'from':minter}) ape_reg.execute(ape_reg, set_factory_call, '', '', 0, {'from':minter}) def test_vault_creation(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) assert ape_vault.owner() == user assert ape_vault.token() == usdc usdc_vault = '0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9' assert ape_vault.vault() == usdc_vault def test_router(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] amount = 1_000_000_000_000 usdc.transfer(user, amount, {'from':big_usdc}) usdc.approve(ape_router, 2 ** 256 -1, {'from':user}) tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) assert ape_vault.owner() == user assert ape_vault.token() == usdc usdc_vault = interface.IERC20('0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9') assert ape_vault.vault() == usdc_vault with reverts('ApeRouter: Vault does not exist'): ape_router.delegateDeposit(usdc, usdc, amount, {'from':user}) with reverts(''): ape_router.delegateDeposit(ape_vault, usdc_vault, amount, {'from':user}) with reverts('ApeRouter: yearn Vault not identical'): dai = '0x6b175474e89094c44da98b954eedeac495271d0f' ape_router.delegateDeposit(ape_vault, dai, amount, {'from':user}) ape_router.delegateDeposit(ape_vault, usdc, amount, {'from':user}) assert usdc_vault.balanceOf(ape_vault) > 0 assert ape_vault.underlyingValue() == amount def test_vault_exit(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] amount = 1_000_000_000_000 usdc.transfer(user, amount, {'from':big_usdc}) usdc.approve(ape_router, 2 ** 256 -1, {'from':user}) tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) usdc_vault = interface.IERC20('0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9') ape_router.delegateDeposit(ape_vault, usdc, amount, {'from':user}) yv_bal = usdc_vault.balanceOf(ape_vault) ape_vault.exitVaultToken(False, {'from':user}) assert usdc_vault.balanceOf(user) == yv_bal def test_vault_exit_underlying(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] amount = 1_000_000_000_000 usdc.transfer(user, amount, {'from':big_usdc}) usdc.approve(ape_router, 2 ** 256 -1, {'from':user}) tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) usdc_vault = interface.IERC20('0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9') ape_router.delegateDeposit(ape_vault, usdc, amount, {'from':user}) yv_bal = usdc_vault.balanceOf(ape_vault) ape_vault.exitVaultToken(True, {'from':user}) assert usdc_vault.balanceOf(ape_vault) <= Wei('1_000_000 ether') // 1000 assert usdc.balanceOf(user) > 0 def test_vault_withdraw_underlying(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] amount = 1_000_000_000_000 usdc.transfer(user, amount, {'from':big_usdc}) usdc.approve(ape_router, 2 ** 256 -1, {'from':user}) tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) usdc_vault = interface.IERC20('0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9') ape_router.delegateDeposit(ape_vault, usdc, amount, {'from':user}) yv_bal = usdc_vault.balanceOf(ape_vault) expected = 200_000_000_000 ape_vault.apeWithdrawUnderlying(expected, {'from':user}) assert usdc.balanceOf(user) >= expected * 99 // 100 def test_migrate(): pass def test_circle_allowance(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] circle = '0x0000000000000000000000000000000000000001' token = usdc amount = 20_000_000_000 interval = 60 * 60 * 14 # 14 days epochs = 4 tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) ape_vault.updateAllowance(circle, usdc, 20_000_000_000, interval, epochs, {'from':user}) (debt, intervalStart, epochs) = ape_distro.currentAllowances(ape_vault, circle, token) assert ape_distro.allowances(ape_vault, circle, token) == (amount, interval) assert debt == 0 and epochs == 4 def test_vault_circle_admin(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) circle = '0x0000000000000000000000000000000000000001' ape_vault.approveCircleAdmin(circle, user, {'from':user}) assert ape_distro.vaultApprovals(ape_vault, circle) == user ape_vault.approveCircleAdmin(circle, ape_vault, {'from':user}) assert ape_distro.vaultApprovals(ape_vault, circle) == ape_vault def test_tap_revert(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, big_usdc, usdc, ApeVaultWrapper, minter, interface): setup_protocol(ape_reg, ape_fee, ape_distro, ape_router, ape_factory, minter) user = accounts[0] tx = ape_factory.createApeVault(usdc, '0x0000000000000000000000000000000000000000', {'from':user}) ape_vault = ApeVaultWrapper.at(tx.new_contracts[0]) circle = '0x0000000000000000000000000000000000000001' with reverts(''): ape_vault.tap(10, 1, {'from':user})
58.270677
142
0.745677
1,001
7,750
5.475524
0.114885
0.056924
0.027915
0.037219
0.765554
0.740923
0.725962
0.70042
0.681992
0.65426
0
0.115282
0.133677
7,750
133
143
58.270677
0.701072
0.000903
0
0.536585
0
0
0.122449
0.092224
0
0
0.092224
0
0.130081
1
0.081301
false
0.00813
0.03252
0
0.113821
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
956c50b3efbe63cc968efe479eac77bd991eef70
183
py
Python
(3)Algorithms/itertools_chain_from_iterable.py
mass9/Python
66499164e36a4fe9630029d34b292ab06f849b2f
[ "MIT" ]
null
null
null
(3)Algorithms/itertools_chain_from_iterable.py
mass9/Python
66499164e36a4fe9630029d34b292ab06f849b2f
[ "MIT" ]
null
null
null
(3)Algorithms/itertools_chain_from_iterable.py
mass9/Python
66499164e36a4fe9630029d34b292ab06f849b2f
[ "MIT" ]
null
null
null
from itertools import * def make_iterables_to_chain(): yield[1,2,3] yield['a','b','c'] for i in chain.from_iterable(make_iterables_to_chain()): print(i,end=' ') print()
18.3
56
0.666667
30
183
3.833333
0.7
0.226087
0.26087
0.347826
0
0
0
0
0
0
0
0.019481
0.15847
183
9
57
20.333333
0.727273
0
0
0
0
0
0.021858
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.285714
0.285714
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
95bfe9bb37e2a8545334f64d484cd81e668cc24e
140
py
Python
django/cantusdb_project/main_app/models/century.py
DDMAL/CantusDB
63c7b8df3c703008bd331097c7fb5e72c8890bb0
[ "MIT" ]
2
2020-10-16T09:50:54.000Z
2021-07-29T08:38:34.000Z
django/cantusdb_project/main_app/models/century.py
DDMAL/CantusDB
63c7b8df3c703008bd331097c7fb5e72c8890bb0
[ "MIT" ]
65
2020-05-11T19:22:30.000Z
2022-03-30T22:30:02.000Z
django/cantusdb_project/main_app/models/century.py
DDMAL/CantusDB
63c7b8df3c703008bd331097c7fb5e72c8890bb0
[ "MIT" ]
null
null
null
from django.db import models from main_app.models import BaseModel class Century(BaseModel): name = models.CharField(max_length=255)
17.5
43
0.785714
20
140
5.4
0.75
0
0
0
0
0
0
0
0
0
0
0.025
0.142857
140
7
44
20
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
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
95c0e12d36edc717bbc2989b76310565343c2d9e
380
py
Python
src/rubrix/client/sdk/metrics/models.py
davidkartchner/rubrix
33faa006d7498a806a9fd594036d4a42c7d70da2
[ "Apache-2.0" ]
888
2021-03-26T20:39:21.000Z
2022-03-31T18:09:37.000Z
src/rubrix/client/sdk/metrics/models.py
davidkartchner/rubrix
33faa006d7498a806a9fd594036d4a42c7d70da2
[ "Apache-2.0" ]
805
2021-04-29T09:24:44.000Z
2022-03-31T18:29:34.000Z
src/rubrix/client/sdk/metrics/models.py
davidkartchner/rubrix
33faa006d7498a806a9fd594036d4a42c7d70da2
[ "Apache-2.0" ]
72
2021-04-30T08:53:36.000Z
2022-03-31T10:48:33.000Z
from typing import Optional from pydantic import BaseModel, Field class MetricInfo(BaseModel): """Metric info data model for retrieve dataset metrics information""" id: str = Field(description="The metric id") name: str = Field(description="The metric name") description: Optional[str] = Field( default=None, description="The metric description" )
27.142857
73
0.715789
45
380
6.044444
0.555556
0.088235
0.220588
0.161765
0.205882
0
0
0
0
0
0
0
0.192105
380
13
74
29.230769
0.885993
0.165789
0
0
0
0
0.160772
0
0
0
0
0
0
1
0
true
0
0.25
0
0.75
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
0
0
1
0
0
4
95cbd41a4868bccc95561cb5ea69b30e00294ecb
1,009
py
Python
rust-python-benchmark/bench-src/string_bench.py
wenym1/WasmEdge
c9db885e1186656a4ded179ba1b86a391e68bc48
[ "Apache-2.0" ]
1
2022-02-22T02:04:23.000Z
2022-02-22T02:04:23.000Z
rust-python-benchmark/bench-src/string_bench.py
wenym1/WasmEdge
c9db885e1186656a4ded179ba1b86a391e68bc48
[ "Apache-2.0" ]
null
null
null
rust-python-benchmark/bench-src/string_bench.py
wenym1/WasmEdge
c9db885e1186656a4ded179ba1b86a391e68bc48
[ "Apache-2.0" ]
null
null
null
LOOP_COUNT = 100000 FIRST = "first" SECOND = "second" FIRST_SECOND = "first_second" def run_multi_time(func): def wrapper(): for _ in range(LOOP_COUNT): func() return wrapper @run_multi_time def concat_test(): FIRST + SECOND @run_multi_time def contains_test(): SECOND in FIRST FIRST in FIRST_SECOND @run_multi_time def eq_test(): FIRST_SECOND == FIRST + "_" + SECOND @run_multi_time def compare_test(): FIRST > SECOND FIRST_SECOND < SECOND @run_multi_time def take_char_test(): FIRST[3] SECOND[2] @run_multi_time def take_slice_test(): FIRST_SECOND[3:8] @run_multi_time def repeat_test(): FIRST_SECOND * 3 @run_multi_time def capitalize_test(): FIRST_SECOND.capitalize() @run_multi_time def count_test(): (FIRST_SECOND * 3).count("i") if __name__ == "__main__": global_var = {} global_var.update(globals()) for name in global_var: if name.endswith("_test"): global_var[name]()
14.623188
40
0.666006
140
1,009
4.392857
0.264286
0.23252
0.195122
0.219512
0.265041
0.126829
0
0
0
0
0
0.015365
0.225966
1,009
68
41
14.838235
0.772087
0
0
0.2
0
0
0.037661
0
0
0
0
0
0
1
0.244444
false
0
0
0
0.266667
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
95e88620469c3e43002914a589127da50565b04c
102
py
Python
djangocli/__init__.py
ZhuoZhuoCrayon/AcousticKeyBoard-Web
0a0ead78aec7ed03898fd51e076aa57df966508c
[ "MIT" ]
5
2021-03-08T02:39:02.000Z
2021-09-10T03:40:29.000Z
djangocli/__init__.py
ZhuoZhuoCrayon/AcousticKeyBoard-Web
0a0ead78aec7ed03898fd51e076aa57df966508c
[ "MIT" ]
80
2021-03-05T15:17:37.000Z
2021-11-15T01:46:59.000Z
djangocli/__init__.py
ZhuoZhuoCrayon/AcousticKeyBoard-Web
0a0ead78aec7ed03898fd51e076aa57df966508c
[ "MIT" ]
1
2021-09-10T03:49:40.000Z
2021-09-10T03:49:40.000Z
# -*- coding: utf-8 -*- from djangocli.core.celery import app as celery_app __all__ = ["celery_app"]
20.4
51
0.696078
15
102
4.333333
0.733333
0.276923
0
0
0
0
0
0
0
0
0
0.011494
0.147059
102
4
52
25.5
0.735632
0.205882
0
0
0
0
0.126582
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
2514ba3b3f663906c41fa047c771ecd771e77344
96
py
Python
SignalR/__init__.py
sam-mosleh/SignalR-Client
981b4084d146d830c9c29880752c832877fab45c
[ "MIT" ]
null
null
null
SignalR/__init__.py
sam-mosleh/SignalR-Client
981b4084d146d830c9c29880752c832877fab45c
[ "MIT" ]
null
null
null
SignalR/__init__.py
sam-mosleh/SignalR-Client
981b4084d146d830c9c29880752c832877fab45c
[ "MIT" ]
null
null
null
from .SignalRClient import SignalRClient, SignalRHub __all__ = ['SignalRClient', 'SignalRHub']
24
52
0.791667
8
96
9
0.625
0.638889
0
0
0
0
0
0
0
0
0
0
0.104167
96
3
53
32
0.837209
0
0
0
0
0
0.239583
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
25188c127633e601223238be56e7836dd561765d
251
py
Python
Block/BlockGravel.py
uuk0/mcpython-3
6dc7fc9f2610c999c9b690536b867a78eff25699
[ "MIT" ]
null
null
null
Block/BlockGravel.py
uuk0/mcpython-3
6dc7fc9f2610c999c9b690536b867a78eff25699
[ "MIT" ]
null
null
null
Block/BlockGravel.py
uuk0/mcpython-3
6dc7fc9f2610c999c9b690536b867a78eff25699
[ "MIT" ]
null
null
null
import Block.IBlock import globals as G @G.blockhandler class Gravel(Block.IBlock.IBlock): @staticmethod def getName(): return "minecraft:gravel" def get_drop(self): #todo: add flint return {self.getName(): 1}
15.6875
34
0.645418
31
251
5.193548
0.677419
0.136646
0
0
0
0
0
0
0
0
0
0.005319
0.250996
251
15
35
16.733333
0.851064
0.059761
0
0
0
0
0.06867
0
0
0
0
0.066667
0
1
0.222222
false
0
0.222222
0.222222
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
2530d51b15654a19e61bded885d2d43fa7079767
160
py
Python
tests/test_marker.py
datadavev/pytest-pyppeteer
dce25f8960a102818c14b0c158146c3368d6d66a
[ "MIT" ]
13
2020-08-26T03:03:47.000Z
2022-03-31T07:46:31.000Z
tests/test_marker.py
datadavev/pytest-pyppeteer
dce25f8960a102818c14b0c158146c3368d6d66a
[ "MIT" ]
20
2020-08-19T08:11:02.000Z
2022-03-31T07:39:30.000Z
tests/test_marker.py
datadavev/pytest-pyppeteer
dce25f8960a102818c14b0c158146c3368d6d66a
[ "MIT" ]
2
2020-09-09T05:26:23.000Z
2021-02-20T09:24:45.000Z
import asyncio import pytest @pytest.mark.options(devtools=True) async def test_marker(pyppeteer): await pyppeteer.new_page() await asyncio.sleep(2)
16
35
0.7625
22
160
5.454545
0.772727
0
0
0
0
0
0
0
0
0
0
0.007299
0.14375
160
9
36
17.777778
0.868613
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
254aa08658e73b74b32019f1879c67a22fc09b27
1,971
py
Python
Cogs/admin/load.py
ThomasHartmannDev/Khal-War-Riders-Bot
b7b0b3b4cbc0251c8f7fac549d07523e4d8fc532
[ "MIT" ]
null
null
null
Cogs/admin/load.py
ThomasHartmannDev/Khal-War-Riders-Bot
b7b0b3b4cbc0251c8f7fac549d07523e4d8fc532
[ "MIT" ]
null
null
null
Cogs/admin/load.py
ThomasHartmannDev/Khal-War-Riders-Bot
b7b0b3b4cbc0251c8f7fac549d07523e4d8fc532
[ "MIT" ]
null
null
null
import discord from discord.ext import commands class Load(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(name='load') async def load(self, ctx, cog_ca: str = None): await ctx.send(ctx.author.id) if cog_ca is None: cog_ca_e = discord.Embed( description="Digite Uma Cog para eu carregar") await ctx.send(embed=cog_ca_e) else: try: self.bot.load_extension('Cogs.' + cog_ca) await ctx.send(f"Cog [{cog_ca}] Carregada !!!") except Exception as ex: await ctx.send(f"Ocorreu um erro ao carregar a Cog `{cog_ca}`: {ex}") @commands.command(name='unload') async def unload(self, ctx, cog_ca: str = None): await ctx.send(ctx.author.id) if cog_ca is None: cog_ca_e = discord.Embed( description="Digite Uma Cog para eu descarregar") await ctx.send(embed=cog_ca_e) else: try: self.bot.unload_extension('Cogs.' + cog_ca) await ctx.send(f"Cog [{cog_ca}] Descarregada !!!") except Exception as ex: await ctx.send(f"Ocorreu um erro ao descarregar a Cog `{cog_ca}`: {ex}") @commands.command(name='reload') async def reload(self, ctx, cog_ca: str = None): await ctx.send(ctx.author.id) if cog_ca is None: cog_ca_e = discord.Embed( description="Digite Uma Cog para eu recarregar") await ctx.send(embed=cog_ca_e) else: try: self.bot.unload_extension('Cogs.' + cog_ca) self.bot.load_extension('Cogs.' + cog_ca) await ctx.send(f"Cog [{cog_ca}] Recarregada !!!") except Exception as ex: await ctx.send(f"Ocorreu um erro ao recarregar a Cog `{cog_ca}`: {ex}") def setup(bot): bot.add_cog(Load(bot))
35.836364
88
0.560629
267
1,971
4
0.209738
0.102996
0.134831
0.073034
0.740637
0.730337
0.730337
0.730337
0.674157
0.674157
0
0
0.325216
1,971
54
89
36.5
0.803008
0
0
0.531915
0
0
0.191781
0
0
0
0
0
0
1
0.042553
false
0
0.042553
0
0.106383
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c252f7c45bde07d2aa814ab07bba18a44a0aad7f
364
py
Python
coding_interviews/leetcode/medium/binary-tree-inorder-traversal/binary-tree-inorder-traversal.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
coding_interviews/leetcode/medium/binary-tree-inorder-traversal/binary-tree-inorder-traversal.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
coding_interviews/leetcode/medium/binary-tree-inorder-traversal/binary-tree-inorder-traversal.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
# https://leetcode.com/problems/binary-tree-inorder-traversal class Solution: def __init__(self): self.inorder_list = [] def inorder_traversal(self, root): if root: self.inorder_traversal(root.left) self.inorder_list.append(root.val) self.inorder_traversal(root.right) return self.inorder_list
28
61
0.653846
43
364
5.302326
0.488372
0.241228
0.197368
0.210526
0
0
0
0
0
0
0
0
0.244505
364
13
62
28
0.829091
0.162088
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0
0
0.444444
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
c26f5e6df0078080cf128ec0d403902cea266c94
61
py
Python
credentials.py
RUSH-AI-Dev/covid19-news-api
55d07beafedb74ffae01f1702f3ac72658b6e794
[ "Apache-2.0" ]
null
null
null
credentials.py
RUSH-AI-Dev/covid19-news-api
55d07beafedb74ffae01f1702f3ac72658b6e794
[ "Apache-2.0" ]
null
null
null
credentials.py
RUSH-AI-Dev/covid19-news-api
55d07beafedb74ffae01f1702f3ac72658b6e794
[ "Apache-2.0" ]
null
null
null
host = "mongodb+srv://............." * cluster = "cmklcovid"
30.5
39
0.491803
5
61
6
1
0
0
0
0
0
0
0
0
0
0
0
0.114754
61
2
40
30.5
0.555556
0
0
0
0
0
0.590164
0.442623
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4