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
736f7afd3feb0d8bc50355ce826f01fc601ffd36
11,932
py
Python
pyleecan/Methods/Slot/HoleM51/build_geometry.py
harshasunder-1/pyleecan
32ae60f98b314848eb9b385e3652d7fc50a77420
[ "Apache-2.0" ]
2
2019-06-08T15:04:39.000Z
2020-09-07T13:32:22.000Z
pyleecan/Methods/Slot/HoleM51/build_geometry.py
harshasunder-1/pyleecan
32ae60f98b314848eb9b385e3652d7fc50a77420
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Slot/HoleM51/build_geometry.py
harshasunder-1/pyleecan
32ae60f98b314848eb9b385e3652d7fc50a77420
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from numpy import exp, pi, cos, sin, tan from ....Classes.Segment import Segment from ....Classes.Arc1 import Arc1 from ....Classes.SurfLine import SurfLine from ....Functions.Geometry.inter_line_circle import inter_line_circle def build_geometry(self, alpha=0, delta=0, is_simplified=False): """Compute the curve (Line) needed to plot the Hole. The ending point of a curve is the starting point of the next curve in the list Parameters ---------- self : HoleM51 A HoleM51 object alpha : float Angle to rotate the hole (Default value = 0) [rad] delta : complex Complex to translate the hole (Default value = 0) is_simplified : bool True to avoid line superposition Returns ------- surf_list: list List of SurfLine needed to draw the HoleM51 """ if self.get_is_stator(): # check if the slot is on the stator st = "_Stator" else: st = "_Rotor" Rbo = self.get_Rbo() # comp point coordinate (in complex) alpha = self.comp_alpha() Wslot = 2 * sin(self.W1 / 2) * (Rbo - self.H1) L = 0.5 * (Wslot - self.W0) / cos(alpha) # ||P2,P5|| # Center of the hole Z0 = Rbo - self.H0 Z2 = Z0 + 1j * self.W0 / 2 Z25 = Z0 - 1j * self.W0 / 2 Z15 = Z25 - self.H2 Z1 = Z2 - 1j * self.W2 Z26 = Z1 - 1j * self.W3 Z12 = Z2 - self.H2 Z13 = Z12 - 1j * self.W2 Z14 = Z13 - 1j * self.W3 Z11 = Z12 + 1j * tan(alpha / 2) * self.H2 Z16 = Z15 - 1j * tan(alpha / 2) * self.H2 # Draw the left side with center P2, and X axis =(P2,P5), Y axis=(P2,P10) Z3 = self.W4 * exp(1j * (pi / 2 - alpha)) + Z2 Z4 = (self.W4 + self.W5) * exp(1j * (pi / 2 - alpha)) + Z2 Z5 = (Rbo - self.H1) * exp(1j * self.W1 / 2) Z10 = (1j * self.H2) * exp(1j * (pi / 2 - alpha)) + Z2 Z9 = (1j * self.H2 + self.W4) * exp(1j * (pi / 2 - alpha)) + Z2 Z8 = (1j * self.H2 + self.W4 + self.W5) * exp(1j * (pi / 2 - alpha)) + Z2 Z7 = (1j * self.H2 + L) * exp(1j * (pi / 2 - alpha)) + Z2 # Draw the right side with center P25, X axis (P25,P23), Y axis(P25,P17) Z24 = self.W6 * exp(-1j * (pi / 2 - alpha)) + Z25 Z23 = (self.W6 + self.W7) * exp(-1j * (pi / 2 - alpha)) + Z25 Z22 = (Rbo - self.H1) * exp(-1j * self.W1 / 2) Z17 = (1j * self.H2) * exp(-1j * (pi / 2 - alpha)) + Z25 Z18 = (-1j * self.H2 + self.W6) * exp(-1j * (pi / 2 - alpha)) + Z25 Z19 = (-1j * self.H2 + self.W6 + self.W7) * exp(-1j * (pi / 2 - alpha)) + Z25 Z20 = (-1j * self.H2 + L) * exp(-1j * (pi / 2 - alpha)) + Z25 # Z6 is the intersection of the line [Z7,Z10] and Circle centre # (0,0) radius Rbo - H1 Zint = inter_line_circle(Z7, Z10, Rbo - self.H1) # Select the point with Re(Z) > 0 if Zint[0].real > 0: Z6 = Zint[0] else: Z6 = Zint[1] Z21 = Z6.conjugate() surf_list = list() # Create all the surfaces for all the cases # Air surface bore around magnet_0 curve_list = list() curve_list.append(Arc1(Z21, Z22, Rbo - self.H1)) curve_list.append(Segment(Z22, Z23)) curve_list.append(Segment(Z23, Z19)) curve_list.append(Segment(Z19, Z21)) point_ref = (Z21 + Z22 + Z23 + Z19) / 4 S1 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Surface for magnet_0 curve_list = list() if is_simplified: curve_list.append(Segment(Z24, Z18)) curve_list.append(Segment(Z19, Z23)) else: curve_list.append(Segment(Z24, Z18)) curve_list.append(Segment(Z18, Z19)) curve_list.append(Segment(Z19, Z23)) curve_list.append(Segment(Z23, Z24)) point_ref = (Z24 + Z18 + Z19 + Z23) / 4 # Defining type of magnetization of the magnet if self.magnet_0: if self.magnet_0.type_magnetization == 0: type_mag = "_Radial" else: type_mag = "_Parallel" else: type_mag = "None" magnet_label = "HoleMagnet" + st + type_mag + "_N_R0_T0_S0" S2 = SurfLine(line_list=curve_list, label=magnet_label, point_ref=point_ref) # Air surface between magnet_0 and magnet_1 curve_list = list() curve_list.append(Segment(Z24, Z25)) curve_list.append(Segment(Z25, Z26)) curve_list.append(Segment(Z26, Z14)) curve_list.append(Segment(Z14, Z16)) curve_list.append(Segment(Z16, Z18)) curve_list.append(Segment(Z18, Z24)) point_ref = (Z25 + Z16) / 2 S3 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Surface for magnet_1 curve_list = list() if is_simplified: curve_list.append(Segment(Z1, Z13)) curve_list.append(Segment(Z14, Z26)) else: curve_list.append(Segment(Z26, Z1)) curve_list.append(Segment(Z1, Z13)) curve_list.append(Segment(Z13, Z14)) curve_list.append(Segment(Z14, Z26)) point_ref = (Z26 + Z1 + Z13 + Z14) / 4 # Defining type of magnetization of the magnet if self.magnet_1: if self.magnet_1.type_magnetization == 0: type_mag = "_Radial" else: type_mag = "_Parallel" else: type_mag = "None" magnet_label = "HoleMagnet" + st + type_mag + "_N_R0_T1_S0" S4 = SurfLine(line_list=curve_list, label=magnet_label, point_ref=point_ref) # Air surface between magnet_1 and magnet_2 curve_list = list() curve_list.append(Segment(Z1, Z2)) curve_list.append(Segment(Z2, Z3)) curve_list.append(Segment(Z3, Z9)) curve_list.append(Segment(Z9, Z11)) curve_list.append(Segment(Z11, Z13)) curve_list.append(Segment(Z13, Z1)) point_ref = (Z11 + Z2) / 2 S5 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Surface for magnet_2 curve_list = list() if is_simplified: curve_list.append(Segment(Z4, Z8)) curve_list.append(Segment(Z9, Z3)) else: curve_list.append(Segment(Z4, Z8)) curve_list.append(Segment(Z8, Z9)) curve_list.append(Segment(Z9, Z3)) curve_list.append(Segment(Z3, Z4)) point_ref = (Z4 + Z8 + Z9 + Z3) / 4 # Defining type of magnetization of the magnet if self.magnet_2: if self.magnet_2.type_magnetization == 0: type_mag = "_Radial" else: type_mag = "_Parallel" else: type_mag = "None" magnet_label = "HoleMagnet" + st + type_mag + "_N_R0_T2_S0" S6 = SurfLine(line_list=curve_list, label=magnet_label, point_ref=point_ref) # Air surface bore around magnet_2 curve_list = list() curve_list.append(Arc1(Z5, Z6, Rbo - self.H1)) curve_list.append(Segment(Z6, Z8)) curve_list.append(Segment(Z8, Z4)) curve_list.append(Segment(Z4, Z5)) point_ref = (Z4 + Z5 + Z6 + Z8) / 4 S7 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Air surface bore around magnet_2 (no magnet_2 and magnet_1) curve_list = list() curve_list.append(Arc1(Z5, Z6, Rbo - self.H1)) curve_list.append(Segment(Z6, Z11)) curve_list.append(Segment(Z11, Z13)) curve_list.append(Segment(Z13, Z1)) curve_list.append(Segment(Z1, Z2)) curve_list.append(Segment(Z2, Z5)) point_ref = (Z2 + Z11) / 2 S8 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Air surface bore around magnet_0 (no magnet_0 and magnet_1) curve_list = list() curve_list.append(Arc1(Z21, Z22, Rbo - self.H1)) curve_list.append(Segment(Z22, Z25)) curve_list.append(Segment(Z25, Z26)) curve_list.append(Segment(Z26, Z14)) curve_list.append(Segment(Z14, Z16)) curve_list.append(Segment(Z16, Z21)) point_ref = (Z25 + Z16) / 2 S9 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Air surface bore around magnet_1 (no magnet_1 and magnet_0 and magnet_2) curve_list = list() curve_list.append(Segment(Z24, Z25)) curve_list.append(Segment(Z25, Z2)) curve_list.append(Segment(Z2, Z3)) curve_list.append(Segment(Z3, Z9)) curve_list.append(Segment(Z9, Z11)) curve_list.append(Segment(Z11, Z16)) curve_list.append(Segment(Z16, Z18)) curve_list.append(Segment(Z18, Z24)) point_ref = (Z1 + Z13) / 2 S10 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Air surface bore around magnet_1 (no magnet_1 and no magnet_0 and magnet_2) curve_list = list() curve_list.append(Arc1(Z21, Z22, Rbo - self.H1)) curve_list.append(Segment(Z22, Z25)) curve_list.append(Segment(Z25, Z2)) curve_list.append(Segment(Z2, Z3)) curve_list.append(Segment(Z3, Z9)) curve_list.append(Segment(Z9, Z11)) curve_list.append(Segment(Z11, Z16)) curve_list.append(Segment(Z16, Z21)) point_ref = (Z1 + Z13) / 2 S11 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Air surface bore around magnet_1 (no magnet_1 and magnet_0 and no magnet_2) curve_list = list() curve_list.append(Arc1(Z5, Z6, Rbo - self.H1)) curve_list.append(Segment(Z6, Z11)) curve_list.append(Segment(Z11, Z16)) curve_list.append(Segment(Z16, Z18)) curve_list.append(Segment(Z18, Z24)) curve_list.append(Segment(Z24, Z25)) curve_list.append(Segment(Z25, Z2)) curve_list.append(Segment(Z2, Z5)) point_ref = (Z1 + Z13) / 2 S12 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Air surface No magnet curve_list = list() curve_list.append(Arc1(Z5, Z6, Rbo - self.H1)) curve_list.append(Segment(Z6, Z11)) curve_list.append(Segment(Z11, Z16)) curve_list.append(Segment(Z16, Z21)) curve_list.append(Arc1(Z21, Z22, Rbo - self.H1)) curve_list.append(Segment(Z22, Z25)) curve_list.append(Segment(Z25, Z2)) curve_list.append(Segment(Z2, Z5)) point_ref = (Z1 + Z13) / 2 S13 = SurfLine(line_list=curve_list, label="Hole" + st, point_ref=point_ref) # Create the surface list by selecting the correct ones if self.magnet_0 and self.magnet_1 and self.magnet_2: S1.label = S1.label + "_R0_T0_S0" # Hole S3.label = S3.label + "_R0_T1_S0" # Hole S5.label = S5.label + "_R0_T2_S0" # Hole S7.label = S7.label + "_R0_T3_S0" # Hole surf_list = [S1, S2, S3, S4, S5, S6, S7] elif not self.magnet_0 and self.magnet_1 and self.magnet_2: S9.label = S9.label + "_R0_T0_S0" # Hole S5.label = S5.label + "_R0_T1_S0" # Hole S7.label = S7.label + "_R0_T2_S0" # Hole surf_list = [S9, S4, S5, S6, S7] elif self.magnet_0 and not self.magnet_1 and self.magnet_2: S1.label = S1.label + "_R0_T0_S0" # Hole S10.label = S10.label + "_R0_T1_S0" # Hole S7.label = S7.label + "_R0_T2_S0" # Hole surf_list = [S1, S2, S10, S6, S7] elif not self.magnet_0 and not self.magnet_1 and self.magnet_2: S11.label = S11.label + "_R0_T0_S0" # Hole S7.label = S7.label + "_R0_T1_S0" # Hole surf_list = [S11, S6, S7] elif self.magnet_0 and self.magnet_1 and not self.magnet_2: S1.label = S1.label + "_R0_T0_S0" # Hole S3.label = S3.label + "_R0_T1_S0" # Hole S8.label = S8.label + "_R0_T2_S0" # Hole surf_list = [S1, S2, S3, S4, S8] elif not self.magnet_0 and self.magnet_1 and not self.magnet_2: S9.label = S9.label + "_R0_T0_S0" # Hole S8.label = S8.label + "_R0_T1_S0" # Hole surf_list = [S9, S4, S8] elif self.magnet_0 and not self.magnet_1 and not self.magnet_2: S1.label = S1.label + "_R0_T0_S0" # Hole S12.label = S12.label + "_R0_T1_S0" # Hole surf_list = [S1, S2, S12] elif not self.magnet_0 and not self.magnet_1 and not self.magnet_2: S13.label = S13.label + "_R0_T0_S0" # Hole surf_list = [S13] for surf in surf_list: surf.rotate(alpha) surf.translate(delta) return surf_list
38.24359
81
0.625377
1,858
11,932
3.829925
0.103875
0.136594
0.17285
0.22878
0.779511
0.748876
0.702361
0.679736
0.651068
0.636453
0
0.088379
0.244217
11,932
311
82
38.366559
0.70071
0.147251
0
0.514768
0
0
0.035416
0
0
0
0
0
0
1
0.004219
false
0
0.021097
0
0.029536
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7382476ebad7da4e55b6293da0a1583eb89c6e1d
76
py
Python
scripts/alldisabler.py
swagkarna/Python-RAT
4ea062218150d2a5a73368b9ccaa12c2fe452859
[ "MIT" ]
1
2022-03-01T23:31:01.000Z
2022-03-01T23:31:01.000Z
scripts/alldisabler.py
swagkarna/Python-RAT
4ea062218150d2a5a73368b9ccaa12c2fe452859
[ "MIT" ]
null
null
null
scripts/alldisabler.py
swagkarna/Python-RAT
4ea062218150d2a5a73368b9ccaa12c2fe452859
[ "MIT" ]
2
2022-03-03T22:42:22.000Z
2022-03-06T11:20:13.000Z
from ctypes import windll while True: windll.user32.BlockInput(True)
19
34
0.75
10
76
5.7
0.8
0
0
0
0
0
0
0
0
0
0
0.032258
0.184211
76
4
34
19
0.887097
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
738990e6ca8a71f79ebc6e5ecf9f444e383a9dce
91
py
Python
olftrans/errors.py
FlyBrainLab/OlfTrans
3f873eafba3a21b8fcb27231b49835df1d3cbc0c
[ "BSD-3-Clause" ]
null
null
null
olftrans/errors.py
FlyBrainLab/OlfTrans
3f873eafba3a21b8fcb27231b49835df1d3cbc0c
[ "BSD-3-Clause" ]
null
null
null
olftrans/errors.py
FlyBrainLab/OlfTrans
3f873eafba3a21b8fcb27231b49835df1d3cbc0c
[ "BSD-3-Clause" ]
null
null
null
class MissingFileException(Exception): pass class MissingFileWarning(Warning): pass
22.75
38
0.791209
8
91
9
0.75
0
0
0
0
0
0
0
0
0
0
0
0.142857
91
4
39
22.75
0.923077
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
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
73f4c98919f2fc709294dacaa5a2b3e9f2a2a1d7
179
py
Python
src/use_cases/create_auth/create_auth.py
pagbot/pagbot-auth
4402437210a047fe0cd530afce0a56f9d7a9b564
[ "MIT" ]
null
null
null
src/use_cases/create_auth/create_auth.py
pagbot/pagbot-auth
4402437210a047fe0cd530afce0a56f9d7a9b564
[ "MIT" ]
null
null
null
src/use_cases/create_auth/create_auth.py
pagbot/pagbot-auth
4402437210a047fe0cd530afce0a56f9d7a9b564
[ "MIT" ]
null
null
null
class CreateAuth: def __init__(self, repository): self.auth_repository = repository async def create(self): return await self.auth_repository.create()
17.9
50
0.687151
20
179
5.85
0.55
0.136752
0.307692
0
0
0
0
0
0
0
0
0
0.234637
179
9
51
19.888889
0.854015
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
73fffb2b6e36335d81a7cd057562b7d6b1797c3a
112
py
Python
local_settings_yemi_asmallorange_com.py
abrar78/cinepura
f0cf3c95d34433e80d24d61ee9c7bb3fb75ec0fb
[ "BSD-3-Clause" ]
1
2016-05-08T07:49:15.000Z
2016-05-08T07:49:15.000Z
local_settings_yemi_asmallorange_com.py
abrar78/cinepura
f0cf3c95d34433e80d24d61ee9c7bb3fb75ec0fb
[ "BSD-3-Clause" ]
null
null
null
local_settings_yemi_asmallorange_com.py
abrar78/cinepura
f0cf3c95d34433e80d24d61ee9c7bb3fb75ec0fb
[ "BSD-3-Clause" ]
1
2020-10-02T15:03:56.000Z
2020-10-02T15:03:56.000Z
DEBUG = True APP_DIR = '/home/harish/django_projects/cinepura/' STATIC_MEDIA_PREFIX = '/static_media/cinepura'
22.4
50
0.785714
15
112
5.533333
0.8
0.26506
0
0
0
0
0
0
0
0
0
0
0.089286
112
5
51
22.4
0.813725
0
0
0
0
0
0.530973
0.530973
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fb69e9eb3e1f570d1afc4aa5c725f69b2ad0d521
187
py
Python
testproject/testproject/admin.py
mkay849/django-relativedelta
34e036906204213d9c42e586889e1190fb867cb3
[ "MIT" ]
null
null
null
testproject/testproject/admin.py
mkay849/django-relativedelta
34e036906204213d9c42e586889e1190fb867cb3
[ "MIT" ]
null
null
null
testproject/testproject/admin.py
mkay849/django-relativedelta
34e036906204213d9c42e586889e1190fb867cb3
[ "MIT" ]
null
null
null
from django.contrib import admin from testapp.models import Interval @admin.register(Interval) class IntervalAdmin(admin.ModelAdmin): list_display = ['value'] list_filter = ['value']
20.777778
38
0.780749
23
187
6.26087
0.695652
0
0
0
0
0
0
0
0
0
0
0
0.112299
187
8
39
23.375
0.86747
0
0
0
0
0
0.053476
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
fb763435a9a77e517e176897feba238237107623
231
py
Python
coord2vec/common/itertools.py
jonzarecki/coord2vec
4f267fdd87af7b3d3558ca834b88e9ab7c309c18
[ "Apache-2.0" ]
null
null
null
coord2vec/common/itertools.py
jonzarecki/coord2vec
4f267fdd87af7b3d3558ca834b88e9ab7c309c18
[ "Apache-2.0" ]
null
null
null
coord2vec/common/itertools.py
jonzarecki/coord2vec
4f267fdd87af7b3d3558ca834b88e9ab7c309c18
[ "Apache-2.0" ]
1
2021-01-25T09:21:17.000Z
2021-01-25T09:21:17.000Z
from typing import List, TypeVar from future.moves import itertools _S = TypeVar('_S') def flatten(l: List[List[_S]]) -> List[_S]: return list(itertools.chain.from_iterable([(i if isinstance(i, list) else [i]) for i in l]))
25.666667
96
0.701299
38
231
4.131579
0.552632
0.063694
0
0
0
0
0
0
0
0
0
0
0.151515
231
8
97
28.875
0.80102
0
0
0
0
0
0.008658
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
fb858ea6552d43efb3a98a694c69b9b852d8cfc9
189
py
Python
py3plex/algorithms/hedwig/learners/__init__.py
SkBlaz/supertest
5d99034af820cc10c8f70271b55cc90c42328709
[ "BSD-3-Clause" ]
79
2018-10-22T14:54:04.000Z
2020-03-05T05:34:35.000Z
py3plex/algorithms/hedwig/learners/__init__.py
SkBlaz/supertest
5d99034af820cc10c8f70271b55cc90c42328709
[ "BSD-3-Clause" ]
6
2019-02-19T16:33:14.000Z
2019-12-16T10:23:25.000Z
py3plex/algorithms/hedwig/learners/__init__.py
SkBlaz/Py3Plex
5d99034af820cc10c8f70271b55cc90c42328709
[ "BSD-3-Clause" ]
16
2019-02-19T16:30:29.000Z
2020-02-13T05:57:16.000Z
from .learner import Learner as HeuristicLearner from .optimal import OptimalLearner # here add random rules, as well as bottom-up search __all__ = ["HeuristicLearner", "OptimalLearner"]
27
52
0.793651
23
189
6.347826
0.695652
0
0
0
0
0
0
0
0
0
0
0
0.137566
189
6
53
31.5
0.895706
0.26455
0
0
0
0
0.218978
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
fb89c121ea8640e66c908bcc61215f51ebfa97a1
165
py
Python
udemy/python-video-workbook/my_progress/082.py
djrgit/coursework
2a91da9b76cb1acbd12f3d8049f15d2e71f475a1
[ "MIT" ]
null
null
null
udemy/python-video-workbook/my_progress/082.py
djrgit/coursework
2a91da9b76cb1acbd12f3d8049f15d2e71f475a1
[ "MIT" ]
null
null
null
udemy/python-video-workbook/my_progress/082.py
djrgit/coursework
2a91da9b76cb1acbd12f3d8049f15d2e71f475a1
[ "MIT" ]
3
2018-08-13T23:14:22.000Z
2019-01-11T22:50:07.000Z
# Exercise 82 - Astronomy from datetime import datetime import ephem j = ephem.Jupiter() j.compute('1230/1/1') print((j.sun_distance * ephem.meters_per_au) / 1000)
20.625
52
0.745455
26
165
4.615385
0.730769
0.233333
0
0
0
0
0
0
0
0
0
0.083333
0.127273
165
7
53
23.571429
0.75
0.139394
0
0
0
0
0.057143
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0.2
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
fbce880bcb66811f438bed34e07d11bd59a11593
924
py
Python
terrascript/ovh/d.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
terrascript/ovh/d.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
terrascript/ovh/d.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
# terrascript/ovh/d.py import terrascript class ovh_cloud_region(terrascript.Data): pass class ovh_cloud_regions(terrascript.Data): pass class ovh_dedicated_installation_templates(terrascript.Data): pass class ovh_dedicated_server(terrascript.Data): pass class ovh_dedicated_server_boots(terrascript.Data): pass class ovh_dedicated_servers(terrascript.Data): pass class ovh_domain_zone(terrascript.Data): pass class ovh_iploadbalancing(terrascript.Data): pass class ovh_me_installation_templates(terrascript.Data): pass class ovh_me_installation_template(terrascript.Data): pass class ovh_me_paymentmean_bankaccount(terrascript.Data): pass class ovh_me_paymentmean_creditcard(terrascript.Data): pass class ovh_me_ssh_key(terrascript.Data): pass class ovh_me_ssh_keys(terrascript.Data): pass class ovh_vracks(terrascript.Data): pass
14.4375
61
0.778139
117
924
5.837607
0.247863
0.175695
0.417277
0.491947
0.761347
0.603221
0.497804
0
0
0
0
0
0.152597
924
63
62
14.666667
0.872286
0.021645
0
0.483871
0
0
0
0
0
0
0
0
0
1
0
true
0.483871
0.032258
0
0.516129
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
836d3612559d2331dfc098932f0cb0bc4f7e3b9b
89
py
Python
py_tdlib/constructors/json_value_boolean.py
Mr-TelegramBot/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
24
2018-10-05T13:04:30.000Z
2020-05-12T08:45:34.000Z
py_tdlib/constructors/json_value_boolean.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
3
2019-06-26T07:20:20.000Z
2021-05-24T13:06:56.000Z
py_tdlib/constructors/json_value_boolean.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
5
2018-10-05T14:29:28.000Z
2020-08-11T15:04:10.000Z
from ..factory import Type class jsonValueBoolean(Type): value = None # type: "Bool"
14.833333
29
0.707865
11
89
5.727273
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.179775
89
5
30
17.8
0.863014
0.134831
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
83b05802382ed1bac6914a30645a3e520c4f1418
794
py
Python
redo/__init__.py
benozol/redo_api
7e2a88acdd8d666130398f0f483f182b403a9732
[ "Apache-2.0" ]
null
null
null
redo/__init__.py
benozol/redo_api
7e2a88acdd8d666130398f0f483f182b403a9732
[ "Apache-2.0" ]
null
null
null
redo/__init__.py
benozol/redo_api
7e2a88acdd8d666130398f0f483f182b403a9732
[ "Apache-2.0" ]
null
null
null
""" A very thin python API to DJB’s redo === redo_api reads and writes files with extensions csv, pickle, txt, json, yaml, and h5, xls(x). redo_api additionaly reads files with extensions py (to python module), and without extension (no data). Example python do script: ```python #!/usr/bin/env python3 import redo # Get first redo snippet, assuming that there is only ones arg, = redo.snippets # Run redo-ifchange on the dependency file and get its data dep = redo.ifchange("{arg}.dependency.csv") result = process(dep) redo.output(result) # Write resulting data to the temporary file ``` """ from .redo import read_data, ifchange, ifchange_ignore, write_data, output, print, push, pop, popjoin, exit try: from .redo import target, base, temp, parent except ImportError: pass
24.060606
107
0.736776
123
794
4.715447
0.642276
0.024138
0.065517
0
0
0
0
0
0
0
0
0.003021
0.166247
794
32
108
24.8125
0.873112
0.746851
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.2
0.6
0
0.6
0.2
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
83b5b3784b1494fbd81f4443aca8a8fa51121a2e
294
py
Python
correios_utils/__init__.py
douglasgusson/correios-utils
47ba9cb36c8e953e6fc2d74e52dff25b2d2e8e30
[ "MIT" ]
null
null
null
correios_utils/__init__.py
douglasgusson/correios-utils
47ba9cb36c8e953e6fc2d74e52dff25b2d2e8e30
[ "MIT" ]
null
null
null
correios_utils/__init__.py
douglasgusson/correios-utils
47ba9cb36c8e953e6fc2d74e52dff25b2d2e8e30
[ "MIT" ]
null
null
null
from .correios import ( Cotacao, FormatoEncomenda, SimNao, Servico, realizar_cotacao, get_descricao_servico, ) __all__ = [ "Cotacao", "Servico", "FormatoEncomenda", "SimNao", "realizar_cotacao", "get_descricao_servico", ] __version__ = "0.1.2"
14.7
28
0.629252
26
294
6.576923
0.576923
0.25731
0.210526
0.315789
0.397661
0
0
0
0
0
0
0.013636
0.251701
294
19
29
15.473684
0.763636
0
0
0
0
0
0.265306
0.071429
0
0
0
0
0
1
0
false
0
0.058824
0
0.058824
0
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
83ed9323011b7fac926c0cc84997f852adf65905
294
py
Python
src/api/app/api_utils.py
abdala9512/mlops-course-practice
dd83dce26546fa61bb006d0032d7f0b576bd13bf
[ "MIT" ]
1
2021-12-23T05:22:46.000Z
2021-12-23T05:22:46.000Z
src/api/app/api_utils.py
abdala9512/mlops-course-practice
dd83dce26546fa61bb006d0032d7f0b576bd13bf
[ "MIT" ]
null
null
null
src/api/app/api_utils.py
abdala9512/mlops-course-practice
dd83dce26546fa61bb006d0032d7f0b576bd13bf
[ "MIT" ]
null
null
null
from pydantic import BaseModel import pandas as pd import os def transform_to_dataframe(class_model: BaseModel) -> pd.DataFrame: transition_dictionary = {key:[value] for key, value in class_model.dict().items()} data_frame = pd.DataFrame(transition_dictionary) return data_frame
29.4
86
0.772109
40
294
5.475
0.625
0.091324
0.191781
0.283105
0
0
0
0
0
0
0
0
0.146259
294
10
87
29.4
0.87251
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
0.714286
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
f7b2b24e09806d9a845a942c419993a272507966
117
py
Python
generic_template/__init__.py
fjchen7/generic-template
e93148a7eca04b63b527052d03a8a6804274aebd
[ "Apache-2.0" ]
3
2021-06-29T18:48:30.000Z
2021-09-09T15:04:39.000Z
generic_template/__init__.py
fjchen7/generic-template
e93148a7eca04b63b527052d03a8a6804274aebd
[ "Apache-2.0" ]
99
2019-09-02T04:06:13.000Z
2022-03-28T12:08:51.000Z
generic_template/__init__.py
ITProKyle/ansible-playbook-workstation
380895acc40235ec20a52e9e433a08b068b9740f
[ "Apache-2.0" ]
3
2021-09-01T17:48:15.000Z
2022-03-26T21:16:41.000Z
"""Blank file for Python transversal. This can be deleted or renamed to store the source code of your project. """
19.5
72
0.74359
19
117
4.578947
1
0
0
0
0
0
0
0
0
0
0
0
0.188034
117
5
73
23.4
0.915789
0.923077
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
f7cf81498893582aafa6cc7e86b9c984634919ef
163
py
Python
test/python/test.py
burgholzer/template
e7ef1d69377add39d109787d9e4da9e0f8b0a702
[ "MIT" ]
null
null
null
test/python/test.py
burgholzer/template
e7ef1d69377add39d109787d9e4da9e0f8b0a702
[ "MIT" ]
8
2022-01-17T21:24:17.000Z
2022-03-04T10:23:34.000Z
test/python/test.py
burgholzer/template
e7ef1d69377add39d109787d9e4da9e0f8b0a702
[ "MIT" ]
null
null
null
from namespace import project if __name__ == "__main__": dummy = project.Dummy() dummy.setVal(42) print(dummy.getVal()) dummy = project.Dummy(42)
20.375
29
0.668712
20
163
5.05
0.6
0.237624
0.336634
0
0
0
0
0
0
0
0
0.030769
0.202454
163
7
30
23.285714
0.746154
0
0
0
0
0
0.04908
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.166667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f7d2327b8d643e9a3c9ba952316e6d98d94ed99e
17
py
Python
py3status/version.py
weberval/py3status
77751cfe777d3ceeff24e4a8554be439b94d515c
[ "BSD-3-Clause" ]
null
null
null
py3status/version.py
weberval/py3status
77751cfe777d3ceeff24e4a8554be439b94d515c
[ "BSD-3-Clause" ]
null
null
null
py3status/version.py
weberval/py3status
77751cfe777d3ceeff24e4a8554be439b94d515c
[ "BSD-3-Clause" ]
null
null
null
version = "3.38"
8.5
16
0.588235
3
17
3.333333
1
0
0
0
0
0
0
0
0
0
0
0.214286
0.176471
17
1
17
17
0.5
0
0
0
0
0
0.235294
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f7f854423745070268712b5cedae1f26820f2ae5
4,927
py
Python
Extra/maths.py
niefermar/APPIAN-PET-APPIAN
895fa3aaad7f444d6f4e6f7c698ddace9415664c
[ "MIT" ]
1
2021-04-15T01:46:36.000Z
2021-04-15T01:46:36.000Z
Extra/maths.py
niefermar/APPIAN-PET-APPIAN
895fa3aaad7f444d6f4e6f7c698ddace9415664c
[ "MIT" ]
null
null
null
Extra/maths.py
niefermar/APPIAN-PET-APPIAN
895fa3aaad7f444d6f4e6f7c698ddace9415664c
[ "MIT" ]
null
null
null
import os import numpy as np from nipype.interfaces.base import CommandLine, CommandLineInputSpec #, Info from nipype.interfaces.base import (TraitedSpec, File, traits, InputMultiPath,isdefined) class MathsOutput(TraitedSpec): out_file = File( desc="image to write after calculations") class MathsInput(CommandLineInputSpec): in_file = File(position=2, argstr="%s", exists=True, mandatory=True, desc="image to operate on") out_file = File(position=-1, argstr="%s", mandatory=True, desc="image to operate on") _opmaths = ["add", "sub", "mult", "div", "pd", "eq", "ne", "ge", "gt", "and", "or", "not", "isnan", 'nisnan'] operation = traits.Enum(*_opmaths, mandatory=True, argstr="-%s", position=3, desc="math operations to perform") operand_file = File(exists=True, argstr="%s", mandatory=True, position=4, desc="second image to perform operation with") clobber = traits.Bool(argstr="-clobber", usedefault=True, default_value=True, desc="Overwrite output file") verbose = traits.Bool(argstr="-verbose", usedefault=True, default_value=True, desc="Write messages indicating progress") class MathsCommand(CommandLine): _cmd = "mincmath -clob" _suffix = "_maths" input_spec = MathsInput output_spec = MathsOutput def _parse_inputs(self, skip=None): if skip is None: skip = [] if not isdefined(self.inputs.out_file): self.inputs.out_file = self._gen_fname(self.inputs.in_file, suffix=self._suffix) return super(MathsCommand, self)._parse_inputs(skip=skip) def _list_outputs(self): outputs = self.output_spec().get() outputs["out_file"] = self.inputs.out_file return outputs def _gen_filename(self, name): if name == "out_file": return self._list_outputs()["out_file"] return None class ConstantMathsInput(CommandLineInputSpec): in_file = File(position=2, argstr="%s", exists=True, mandatory=True, desc="image to operate on") out_file = File(position=-1, argstr="%s", mandatory=True, desc="image to operate on") _opmaths = ["add", "sub", "mult", "div"] operation = traits.Enum(*_opmaths, mandatory=True, argstr="-%s", position=3, desc="math operations to perform") opt_constant = traits.Str("-const", mandatory=True, argstr="%s", position=4, desc="-const") operand_value = traits.Float(exists=True, argstr="%.8f", mandatory=True, position=5, xor=["operand_value"], desc="value to perform operation with") class ConstantMathsCommand(CommandLine): _cmd = "mincmath" _suffix = "_maths" input_spec = ConstantMathsInput output_spec = MathsOutput def _parse_inputs(self, skip=None): if skip is None: skip = [] if not isdefined(self.inputs.out_file): self.inputs.out_file = self._gen_fname(self.inputs.in_file, suffix=self._suffix) return super(ConstantMathsCommand, self)._parse_inputs(skip=skip) def _list_outputs(self): outputs = self.output_spec().get() outputs["out_file"] = self.inputs.out_file return outputs def _gen_filename(self, name): if name == "out_file": return self._list_outputs()["out_file"] return None class Constant2MathsInput(CommandLineInputSpec): in_file = File(position=2, argstr="%s", exists=True, mandatory=True, desc="image to operate on") out_file = File(position=-1, argstr="%s", mandatory=True, desc="image to operate on") _opmaths = ["add", "sub", "mult", "div", "exp", "log"] operation = traits.Enum(*_opmaths, mandatory=True, argstr="-%s", position=3,desc="math operations to perform") opt_constant = traits.Str(argstr="%s", position=4, desc="-const2") operand_value = traits.Float(exists=True, argstr="%.8f", mandatory=True, position=5, xor=["operand_value"], desc="value to perform operation with") operand_value2 = traits.Float(exists=True, argstr="%.8f", mandatory=True, position=6, xor=["operand_value2"], desc="2nde value to perform operation with") class Constant2MathsCommand(CommandLine): _cmd = "mincmath" _suffix = "_maths" input_spec = Constant2MathsInput output_spec = MathsOutput def _parse_inputs(self, skip=None): if skip is None: skip = [] if not isdefined(self.inputs.out_file): self.inputs.out_file = self._gen_fname(self.inputs.in_file, suffix=self._suffix) return super(Constant2MathsCommand, self)._parse_inputs(skip=skip) def _list_outputs(self): outputs = self.output_spec().get() outputs["out_file"] = self.inputs.out_file return outputs def _gen_filename(self, name): if name == "out_file": return self._list_outputs()["out_file"] return None
38.492188
151
0.657195
606
4,927
5.174917
0.193069
0.049107
0.037309
0.048788
0.770727
0.734694
0.701212
0.674426
0.674426
0.658482
0
0.00668
0.210067
4,927
127
152
38.795276
0.799075
0.001218
0
0.604396
0
0
0.147154
0
0
0
0
0
0
1
0.098901
false
0
0.043956
0
0.714286
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
792f74c7c108758b6df9c6ba6f680b394c15beab
203
py
Python
pylox/lox_callable.py
jasond1016/pylox
89bb38e8615edf8ec431dca28edb9f8c1605ada3
[ "MIT" ]
null
null
null
pylox/lox_callable.py
jasond1016/pylox
89bb38e8615edf8ec431dca28edb9f8c1605ada3
[ "MIT" ]
null
null
null
pylox/lox_callable.py
jasond1016/pylox
89bb38e8615edf8ec431dca28edb9f8c1605ada3
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class LoxCallable(ABC): @abstractmethod def call(self, interpreter, arguments): pass @abstractmethod def arity(self): pass
18.454545
44
0.630542
20
203
6.4
0.65
0.265625
0
0
0
0
0
0
0
0
0
0
0.300493
203
11
45
18.454545
0.901408
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.125
0
0.5
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
1
0
0
0
0
0
4
7936308a0f48a68d8f97eddebfba40402ae65b42
11,903
py
Python
py/tests/integration/test_use_cases.py
radrow/aeternity
4aaf3389cd2e8b7a340e58b7d9e95ada55607f80
[ "ISC" ]
null
null
null
py/tests/integration/test_use_cases.py
radrow/aeternity
4aaf3389cd2e8b7a340e58b7d9e95ada55607f80
[ "ISC" ]
null
null
null
py/tests/integration/test_use_cases.py
radrow/aeternity
4aaf3389cd2e8b7a340e58b7d9e95ada55607f80
[ "ISC" ]
null
null
null
# coding: utf-8 import tempfile import os import shutil from nose.tools import assert_equals, assert_not_equals, assert_true, with_setup import common from waiting import wait from swagger_client.models.peers import Peers settings = common.test_settings(__name__.split(".")[-1]) def test_syncing(): """ Test node syncing: Alice should be able to connect to peers on startup and download the blockchain up to the current height. """ test_settings = settings["test_syncing"] root_dir = tempfile.mkdtemp() mining_user_config = make_fast_mining_user_config(root_dir, "mining_aeternity.yaml") no_mining_user_config = make_no_mining_user_config(root_dir, "no_mining_aeternity.yaml") # start Bob's node bob_node = test_settings["nodes"]["bob"] common.start_node(bob_node, mining_user_config) bob_api = common.external_api(bob_node) # Insert some blocks in Bob's chain blocks_to_mine = test_settings["blocks_to_mine"] print("Bob is mining") common.wait_until_height(bob_api, blocks_to_mine) bob_top = bob_api.get_current_key_block() assert_equals(bob_top.height >= blocks_to_mine, True) # Now Bob has at least blocks_to_mine blocks print("Bob has mined " + str(bob_top.height) + " blocks") # start Alice's node and let it connect with Bob's # note: Alice doesn't mine blocks alice_node = test_settings["nodes"]["alice"] common.start_node(alice_node, no_mining_user_config) print("Alice is not mining") alice_api = common.external_api(alice_node) common.wait_until_height(alice_api, blocks_to_mine) alice_top = alice_api.get_current_key_block() assert_equals(alice_top.height >= blocks_to_mine, True) if alice_top.height > bob_top.height: # bob had mined more blocks bob_block = bob_api.get_key_block_by_hash(alice_top.hash) # this block is presnet assert_equals(bob_block.height, alice_top.height) else: assert_equals(alice_top.height, bob_top.height) assert_equals(alice_top.hash, bob_top.hash) print("Alice's had synced with Bob and now Alice's top has height " + str(alice_top.height)) # stop both nodes common.stop_node(bob_node) common.stop_node(alice_node) shutil.rmtree(root_dir) def test_persistence(): """ Test persistence: Bob's downloaded blockchain should persist between restarts. He should only download updates to his blockchain when his node starts. """ test_settings = settings["test_persistence"] # prepare a dir to hold the config and DB files root_dir = tempfile.mkdtemp() p_m_conf = """\ --- chain: persist: true db_path: \"""" + root_dir + """\" mining: autostart: true expected_mine_rate: 100 beneficiary: "ak_2QLChDdERfod9QajLkCTsJnYP3RNqZJmAFWQWQZWr99fSrC55h" cuckoo: edge_bits: 15 miners: - executable: mean15-generic extra_args: "" """ p_conf = """\ --- chain: persist: true db_path: \"""" + root_dir + """\" mining: beneficiary: "ak_2QLChDdERfod9QajLkCTsJnYP3RNqZJmAFWQWQZWr99fSrC55h" """ persistence_mining_user_config = common.install_user_config(root_dir, "p_m_aeternity.yaml", p_m_conf) minimal_user_config_with_persistence = common.install_user_config(root_dir, "p_aeternity.yaml", p_conf) bob_node = test_settings["nodes"]["bob"] common.start_node(bob_node, persistence_mining_user_config) bob_api = common.external_api(bob_node) # Insert some blocks in Bob's chain blocks_to_mine = test_settings["blocks_to_mine"] common.wait_until_height(bob_api, blocks_to_mine) bob_top = bob_api.get_current_key_block() assert_equals(bob_top.height >= blocks_to_mine, True) # Now Bob has at least blocks_to_mine blocks common.stop_node(bob_node) common.start_node(bob_node, minimal_user_config_with_persistence) bob_new_top = bob_api.get_current_key_block() if(bob_new_top.height > bob_top.height): # Bob's node had mined another block(s) before being stopped bob_block = bob_api.get_key_block_by_hash(bob_top.hash) # this block is presnet assert_equals(bob_block.height, bob_top.height) else: assert_equals(bob_new_top.height, bob_top.height) assert_equals(bob_top.hash, bob_new_top.hash) common.stop_node(bob_node) shutil.rmtree(root_dir) def test_node_discovery_transitively(): """ Test node discovery (transitively) Assuming Carol's node only knows about Bob upon startup and that Bob's node knows Alice, Carol's node should be able to discover Alice and sync with her node. """ test_settings = settings["test_node_discovery_transitively"] alice_node = test_settings["nodes"]["alice"] bob_node = test_settings["nodes"]["bob"] carol_node = test_settings["nodes"]["carol"] # prepare a dir to hold the configs root_dir = tempfile.mkdtemp() # Alice's config: no peers alice_peers = "peers: []" alice_user_config = make_peers_user_config(root_dir, "alice_aeternity.yaml", "node1", "3015", alice_peers, "true") # Bob's config: only peer is Alice bob_peers = """\ peers: - "aenode://pp_HdcpgTX2C1aZ5sjGGysFEuup67K9XiFsWqSPJs4RahEcSyF7X@localhost:3015" """ bob_user_config = make_peers_user_config(root_dir, "bob_aeternity.yaml", "node2", "3025", bob_peers, "false") # Carol's config: only peer is Bob carol_peers = """\ peers: - "aenode://pp_28uQUgsPcsy7TQwnRxhF8GMKU4ykFLKsgf4TwDwPMNaSCXwWV8@localhost:3025" """ carol_user_config = make_peers_user_config(root_dir, "carol_aeternity.yaml", "node3", "3035", carol_peers, "false") # start Alice's node common.start_node(alice_node, alice_user_config) alice_api = common.external_api(alice_node) # Insert some blocks in Alice's chain blocks_to_mine = test_settings["blocks_to_mine"] common.wait_until_height(alice_api, blocks_to_mine) alice_top = alice_api.get_current_key_block() assert_true(alice_top.height >= blocks_to_mine) # Now Alice has at least blocks_to_mine blocks # start the other nodes common.start_node(bob_node, bob_user_config) common.start_node(carol_node, carol_user_config) # Check that Carol syncs with Alice's chain carol_api = common.external_api(carol_node) common.wait_until_height(carol_api, alice_top.height) assert_equals(carol_api.get_key_block_by_hash(alice_top.hash).height, alice_top.height) # Check that Carol discovers Alice as a peer carol_int_api = common.internal_api(carol_node) wait(lambda: 'aenode://pp_HdcpgTX2C1aZ5sjGGysFEuup67K9XiFsWqSPJs4RahEcSyF7X@localhost:3015' in get_peers(carol_int_api), timeout_seconds=20, sleep_seconds=1) # cleanup common.stop_node(alice_node) common.stop_node(bob_node) common.stop_node(carol_node) shutil.rmtree(root_dir) def test_node_discovery_from_common_friend(): """ Test node discovery (from common friend peer) Assuming Carol's node only knows about Bob upon startup and that Alice's node knows Bob, Carol's node should be able to discover Alice and sync with her node. """ test_settings = settings["test_node_discovery_from_common_friend"] alice_node = test_settings["nodes"]["alice"] bob_node = test_settings["nodes"]["bob"] carol_node = test_settings["nodes"]["carol"] # prepare a dir to hold the configs root_dir = tempfile.mkdtemp() # Alice's config: only peer is Bob alice_peers = """\ peers: - "aenode://pp_28uQUgsPcsy7TQwnRxhF8GMKU4ykFLKsgf4TwDwPMNaSCXwWV8@localhost:3025" """ alice_user_config = make_peers_user_config(root_dir, "alice_aeternity.yaml", "node1", "3015", alice_peers, "true") # Bob's config: no peers bob_peers = "peers: []" bob_user_config = make_peers_user_config(root_dir, "bob_aeternity.yaml", "node2", "3025", bob_peers, "false") # Carol's config: only peer is Bob carol_peers = """\ peers: - "aenode://pp_28uQUgsPcsy7TQwnRxhF8GMKU4ykFLKsgf4TwDwPMNaSCXwWV8@localhost:3025" """ carol_user_config = make_peers_user_config(root_dir, "carol_aeternity.yaml", "node3", "3035", carol_peers, "false") # start Alice's node common.start_node(alice_node, alice_user_config) alice_api = common.external_api(alice_node) # Insert some blocks in Alice's chain blocks_to_mine = test_settings["blocks_to_mine"] common.wait_until_height(alice_api, blocks_to_mine) alice_top = alice_api.get_current_key_block() assert_true(alice_top.height >= blocks_to_mine) # Now Alice has at least blocks_to_mine blocks # start the other nodes common.start_node(bob_node, bob_user_config) common.start_node(carol_node, carol_user_config) # Check that Carol syncs with Alice's chain carol_api = common.external_api(carol_node) common.wait_until_height(carol_api, alice_top.height) assert_equals(carol_api.get_key_block_by_hash(alice_top.hash).height, alice_top.height) # Check that Carol discovers Alice as a peer carol_int_api = common.internal_api(carol_node) wait(lambda: 'aenode://pp_HdcpgTX2C1aZ5sjGGysFEuup67K9XiFsWqSPJs4RahEcSyF7X@127.0.0.1:3015' in get_peers(carol_int_api), timeout_seconds=20, sleep_seconds=1) # cleanup common.stop_node(alice_node) common.stop_node(bob_node) common.stop_node(carol_node) shutil.rmtree(root_dir) def copy_peer_keys(root_dir, keys): # Copy the right keys curr_dir = os.getcwd() key_dir = os.path.join(root_dir, keys) os.makedirs(key_dir) shutil.copy(os.path.join(curr_dir, "peer_keys", keys, "peer_key"), key_dir) shutil.copy(os.path.join(curr_dir, "peer_keys", keys, "peer_key.pub"), key_dir) return key_dir def make_peers_user_config(root_dir, file_name, keys, sync_port, peers, mining): key_dir = copy_peer_keys(root_dir, keys) conf = """\ --- """ + peers + """ sync: port: {} single_outbound_per_group: false keys: dir: "{}" peer_password: "top secret" mining: autostart: {} expected_mine_rate: 100 beneficiary: "ak_2QLChDdERfod9QajLkCTsJnYP3RNqZJmAFWQWQZWr99fSrC55h" cuckoo: edge_bits: 15 miners: - executable: mean15-generic extra_args: "" """.format(sync_port, key_dir, mining) return common.install_user_config(root_dir, file_name, conf) def make_fast_mining_user_config(root_dir, file_name): key_dir = copy_peer_keys(root_dir, "node1") conf = """\ --- peers: - "aenode://pp_28uQUgsPcsy7TQwnRxhF8GMKU4ykFLKsgf4TwDwPMNaSCXwWV8@localhost:3025" sync: port: 3015 keys: dir: \"""" + key_dir + """\" peer_password: "top secret" mining: autostart: true expected_mine_rate: 100 beneficiary: "ak_2QLChDdERfod9QajLkCTsJnYP3RNqZJmAFWQWQZWr99fSrC55h" cuckoo: edge_bits: 15 miners: - executable: mean15-generic extra_args: "" """ return common.install_user_config(root_dir, file_name, conf) def make_no_mining_user_config(root_dir, file_name): key_dir = copy_peer_keys(root_dir, "node2") conf = """\ --- peers: - "aenode://pp_HdcpgTX2C1aZ5sjGGysFEuup67K9XiFsWqSPJs4RahEcSyF7X@localhost:3015" sync: port: 3025 keys: dir: \"""" + key_dir + """\" peer_password: "top secret" mining: autostart: false expected_mine_rate: 100 beneficiary: "ak_2QLChDdERfod9QajLkCTsJnYP3RNqZJmAFWQWQZWr99fSrC55h" cuckoo: edge_bits: 15 miners: - executable: mean15-generic extra_args: "" """ return common.install_user_config(root_dir, file_name, conf) def get_peers(int_api): peers = int_api.get_peers().peers print("Peers: " + str(peers)) return peers
34.302594
161
0.710325
1,623
11,903
4.881701
0.124461
0.045437
0.033321
0.03433
0.791746
0.767134
0.702764
0.643569
0.639152
0.614035
0
0.02171
0.191212
11,903
346
162
34.401734
0.801288
0.153743
0
0.689076
0
0
0.673108
0.379328
0
0
0
0
0.058824
1
0.037815
false
0.012605
0.029412
0
0.088235
0.021008
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f701b8e4102b4d078dab74fc6655620decfbed24
665
py
Python
themodelshop/utils/data/handlers.py
laraib-sidd/themodelshop
e811036eaf22f0d1b56b7b9c60912930a1fed3cb
[ "MIT" ]
1
2021-01-12T16:13:14.000Z
2021-01-12T16:13:14.000Z
themodelshop/utils/data/handlers.py
laraib-sidd/themodelshop
e811036eaf22f0d1b56b7b9c60912930a1fed3cb
[ "MIT" ]
4
2020-11-30T12:32:39.000Z
2021-01-08T12:20:39.000Z
themodelshop/utils/data/handlers.py
laraib-sidd/themodelshop
e811036eaf22f0d1b56b7b9c60912930a1fed3cb
[ "MIT" ]
1
2021-01-12T16:13:20.000Z
2021-01-12T16:13:20.000Z
"""Utilities for working with data. These are intended to be used predominantly by the filing cabinet in order to read and write datasets appropriately. """ from typing import Any def _get_handlers(location:str=""): """Returns available file handlers. This checks for a handlers folder at this location and will scrape the handlers available, returning them, along with all the handlers in this package, as a dictionary keyed by the file type. Parameters ---------- location: str = "" The location where *extra* handlers should be examined for. Note that any malformed handlers will simply be skipped. """
26.6
67
0.705263
91
665
5.131868
0.67033
0.021413
0
0
0
0
0
0
0
0
0
0
0.228571
665
24
68
27.708333
0.910331
0.816541
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0.5
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
f70fa93743ec576b39568159579d16544248a1ec
83
py
Python
conf/apps.py
invernoa/Conferences
9e821948311dc9c28323ede8a26764899fc05255
[ "MIT" ]
41
2019-01-02T09:36:54.000Z
2022-02-20T13:13:05.000Z
conf/apps.py
invernoa/Conferences
9e821948311dc9c28323ede8a26764899fc05255
[ "MIT" ]
15
2019-09-30T05:40:20.000Z
2022-02-17T19:28:41.000Z
conf/apps.py
invernoa/Conferences
9e821948311dc9c28323ede8a26764899fc05255
[ "MIT" ]
23
2019-02-18T10:50:10.000Z
2022-01-06T07:53:18.000Z
from django.apps import AppConfig class ConfConfig(AppConfig): name = 'conf'
13.833333
33
0.73494
10
83
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.180723
83
5
34
16.6
0.897059
0
0
0
0
0
0.048193
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
f7219557f313231bf047af09d8d81a13981c3f2b
368
py
Python
durgo_sdk/integrations/django/middleware.py
safwanrahman/durgo-python
79b740e0500e1ba2bce7edcb47996587a9449964
[ "BSD-3-Clause" ]
1
2020-08-12T21:56:45.000Z
2020-08-12T21:56:45.000Z
durgo_sdk/integrations/django/middleware.py
Alig1493/durgo-python
79b740e0500e1ba2bce7edcb47996587a9449964
[ "BSD-3-Clause" ]
null
null
null
durgo_sdk/integrations/django/middleware.py
Alig1493/durgo-python
79b740e0500e1ba2bce7edcb47996587a9449964
[ "BSD-3-Clause" ]
1
2020-03-21T18:30:28.000Z
2020-03-21T18:30:28.000Z
from django.utils import timezone class DurgoMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. def __call__(self, request): start_time = timezone.now() response = self.get_response(request) end_time = timezone.now() return response
21.647059
52
0.673913
41
368
5.707317
0.560976
0.188034
0.192308
0.196581
0
0
0
0
0
0
0
0
0.252717
368
16
53
23
0.850909
0.11413
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0
0.555556
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
f7275ca4a9614ae34d5dae69713b06a583c3d368
179
py
Python
posts/forms.py
Kelit/My_blog
891f082ac6b7a02ffbc8d106168cb0fd017ba3ef
[ "Apache-2.0" ]
null
null
null
posts/forms.py
Kelit/My_blog
891f082ac6b7a02ffbc8d106168cb0fd017ba3ef
[ "Apache-2.0" ]
null
null
null
posts/forms.py
Kelit/My_blog
891f082ac6b7a02ffbc8d106168cb0fd017ba3ef
[ "Apache-2.0" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField class PostForm(FlaskForm): title = StringField('Заголовок') body = TextAreaField('Текст')
22.375
46
0.77095
19
179
7.210526
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.150838
179
7
47
25.571429
0.901316
0
0
0
0
0
0.078652
0
0
0
0
0
0
1
0
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
f756b0c338af4df0f1a4d036900343a034dcf2a4
111
py
Python
grand_geckos/database/__init__.py
imsofi/codejam-grand-geckos
55aabf5fe127ee9618c1faa2fe8cc02af8054b80
[ "0BSD" ]
5
2021-07-10T02:57:10.000Z
2021-08-02T20:20:10.000Z
grand_geckos/database/__init__.py
imsofi/codejam-grand-geckos
55aabf5fe127ee9618c1faa2fe8cc02af8054b80
[ "0BSD" ]
12
2021-07-09T22:06:22.000Z
2021-07-16T20:27:42.000Z
grand_geckos/database/__init__.py
imsofi/codejam-grand-geckos
55aabf5fe127ee9618c1faa2fe8cc02af8054b80
[ "0BSD" ]
6
2021-07-09T20:55:04.000Z
2021-08-30T19:40:34.000Z
from .DBWorker import DatabaseWorker from .models import Base Base.metadata.create_all(DatabaseWorker.engine)
22.2
47
0.846847
14
111
6.642857
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.09009
111
4
48
27.75
0.920792
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f79b6cf0f20032ab54148b900139942b180df8db
483
py
Python
ConfManager/models/interfaces.py
cygerior/LabManager
a5abc3235e635ec0b63d8951aca02d4794790d63
[ "MIT" ]
null
null
null
ConfManager/models/interfaces.py
cygerior/LabManager
a5abc3235e635ec0b63d8951aca02d4794790d63
[ "MIT" ]
2
2021-03-27T19:58:10.000Z
2021-10-02T07:48:26.000Z
ConfManager/models/interfaces.py
cygerior/LaboConfigs
a5abc3235e635ec0b63d8951aca02d4794790d63
[ "MIT" ]
null
null
null
from django.db import models from polymorphic.models import PolymorphicModel class Interface(PolymorphicModel): name = models.CharField(max_length=30, unique=True) def __str__(self): return self.name class NetworkInterface(Interface): mac_address = models.CharField(max_length=23) address = models.CharField(max_length=30) class BackplaneNetworkInterface(Interface): pass class UartInterface(Interface): uri = models.CharField(max_length=30)
21
55
0.761905
56
483
6.410714
0.5
0.167131
0.200557
0.267409
0.32312
0
0
0
0
0
0
0.019608
0.15528
483
22
56
21.954545
0.860294
0
0
0
0
0
0
0
0
0
0
0
0
1
0.076923
false
0.076923
0.153846
0.076923
0.923077
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
4
e3bf9fc07802b00c0a94610d7a6d5b9c6eef5f1c
1,145
py
Python
services/abc.py
elegos/fast-api-class-based-skeleton
7fdff842f83185d007ab97ca2923514b40d0c38f
[ "MIT" ]
null
null
null
services/abc.py
elegos/fast-api-class-based-skeleton
7fdff842f83185d007ab97ca2923514b40d0c38f
[ "MIT" ]
null
null
null
services/abc.py
elegos/fast-api-class-based-skeleton
7fdff842f83185d007ab97ca2923514b40d0c38f
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class MathABC(ABC): @abstractmethod def sum(*args) -> float: pass @abstractmethod def subtract(*args) -> float: pass @abstractmethod def divide(a, b) -> float: pass @abstractmethod def multiply(a, b) -> float: pass def builder() -> 'MathEquationBuilder': pass class MathEquationBuilder: mathLib: MathABC result: float def __init__(self, mathLib: MathABC): self.mathLib = mathLib self.result = 0.0 def sum(self, *args) -> 'MathEquationBuilder': self.result = self.mathLib.sum(self.result, *args) return self def subtract(self, *args) -> 'MathEquationBuilder': self.result = self.mathLib.subtract(self.result, *args) return self def divide(self, a) -> 'MathEquationBuilder': self.result = self.mathLib.divide(self.result, a) return self def multiply(self, a) -> 'MathEquationBuilder': self.result = self.mathLib.multiply(self.result, a) return self def build(self) -> float: return self.result
21.603774
63
0.609607
123
1,145
5.642276
0.203252
0.144092
0.167147
0.190202
0.501441
0.414986
0.268012
0
0
0
0
0.002427
0.280349
1,145
52
64
22.019231
0.839806
0
0
0.361111
0
0
0.082969
0
0
0
0
0
0
1
0.305556
false
0.138889
0.027778
0.027778
0.583333
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
e3dccf77222528aeb307fcccc4b574ce4bfe6688
121
py
Python
main.py
wdsrocha/anime-recommender
689a690802889366e8895f0dd41b23d27b64588c
[ "MIT" ]
null
null
null
main.py
wdsrocha/anime-recommender
689a690802889366e8895f0dd41b23d27b64588c
[ "MIT" ]
null
null
null
main.py
wdsrocha/anime-recommender
689a690802889366e8895f0dd41b23d27b64588c
[ "MIT" ]
null
null
null
from src import preprocessing, telegram_bot if __name__ == "__main__": preprocessing.main() telegram_bot.main()
20.166667
43
0.735537
14
121
5.642857
0.642857
0.278481
0
0
0
0
0
0
0
0
0
0
0.165289
121
5
44
24.2
0.782178
0
0
0
0
0
0.066116
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
e3e7f765c9e66afc5e906b5431d5cb69b00d948a
4,142
py
Python
framework/common/TestConstants.py
2spmohanty/Performance
5a86a56f40bad1e12654fe1bb737affb4e0edd26
[ "Apache-2.0" ]
null
null
null
framework/common/TestConstants.py
2spmohanty/Performance
5a86a56f40bad1e12654fe1bb737affb4e0edd26
[ "Apache-2.0" ]
null
null
null
framework/common/TestConstants.py
2spmohanty/Performance
5a86a56f40bad1e12654fe1bb737affb4e0edd26
[ "Apache-2.0" ]
null
null
null
__author__ = 'Smruti P Mohanty' """ Company : VMWare Inc. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ """ from collections import namedtuple,defaultdict """ global testname global stressparam global test_data global instance global logger """ test_start = None testname = None stressparam = None test_data = None process = None logger = None pool = None task_pool = None task_results = [] METRICS_DATA = {} HOST_METRICS_COLLECT = True instance = 1 stat_enable = {"nic" : False , "datastore" : False , "disk" : False, "cpu" : False , "mem" : False} plottervmlist = [] vmdb = [] host_stat_spec = defaultdict(list) hs_data = {} PRIMARY_LDU_NAME = None SECONDARY_LDU_NAME = None PRIMARY_LDU_USER_NAME = None PRIMARY_LDU_PASSWD = None SECONDARY_LDU_USER_NAME = None SECONDARY_LDU_PASSWD = None PRIMARY_LDU_ROOT = None SECONDARY_LDU_ROOT = None SECONDARY_LDU_ROOT_PASS=None SRC_DATACENTER=None DEST_DATACENTER=None HOST_NAME=None DEST_HOST_NAME=None DATASTORE=None DEST_DATASTORE=None SRC_CLUSTER=None DEST_CLUSTER=None VM_NAME=None PNIC = None STAT_COLLLECTION_LIST=None SRC_PNIC = None POWER_STATE=None SRC_VM_NAME = None SRC_DISK = None DEST_DISK = None def getLDU(): return getData(test_data,"PRIMARY_LDU_NAME") def getXLDU(): return getData(test_data,"SECONDARY_LDU_NAME") def getLDULocalUser(): return getData(test_data,"PRIMARY_LDU_USER_NAME") def getLDULocalPass(): return getData(test_data,"PRIMARY_LDU_PASSWD") def getXLDULocalUser(): return getData(test_data,"SECONDARY_LDU_USER_NAME") def getXLDULocalPass(): return getData(test_data,"SECONDARY_LDU_PASSWD") def getLDURoot(): return getData(test_data,"PRIMARY_LDU_ROOT") def getLDURootPass(): return getData(test_data,"PRIMARY_LDU_ROOT_PASS") def getXLDURoot(): return getData(test_data,"SECONDARY_LDU_ROOT") def getXLDURootPass(): return getData(test_data,"SECONDARY_LDU_ROOT_PASS") def getDatacenter(): return getData(test_data,"DATACENTER") def getXDatacenter(): return getData(test_data,"DEST_DATACENTER") def getHost(): return getData(test_data,"HOST_NAME") def getXHost(): return getData(test_data,"DEST_HOST_NAME") def getDatastore(): return getData(test_data,"DATASTORE") def getXDatastore(): return getData(test_data,"DEST_DATASTORE") def getCluster(): return getData(test_data,"CLUSTER") def getXCluster(): return getData(test_data,"DEST_CLUSTER") def getVM(): return getData(test_data,"VM_NAME") def getPnic(): return getData(test_data,"PNIC") def getSrcPnic(): return getData(test_data,"SRC_PNIC") def getStatsList(): stats = getData(test_data,"STAT_COLLLECTION_LIST").split(",") return stats def getPowerState(): if getData(test_data,"POWER_STATE") in ["On", "True" , "on" , "oN"]: return True else: return False def getSrcVM(): return getData(test_data,"SRC_VM_NAME") def getSrcDisk(): return getData(test_data, "SRC_DISK") def getDestDisk(): return getData(test_data, "DEST_DISK") ######################## DATA GETER METHOD ############### def getData(test_data,variable_name): data = None instance_data_value=None common_instance = None common_instance = test_data[testname].get("common",None) if common_instance: data = common_instance.get(variable_name,None) instance_data = test_data[testname].get("instance", None) #print "Debug %s"%instance_data if instance_data: instance_data_value = instance_data[str(instance)].get(variable_name,None) if instance_data_value: return instance_data_value else: return data ########################################################## """ test_data = DataParser.DataGenerator("vmotion.txt","HLMMigration") for ins in range (1,3): instance = str(ins) print "Instance %s"%instance print "VC %s xVC %s Cluster %s xCluster %s Datacenter %s xDatacenter %s"%(getLDU(),getXLDU(),getCluster(),getXCluster(),getDatacenter(),getXDatacenter()) """
19.913462
157
0.699662
520
4,142
5.3
0.248077
0.092888
0.146952
0.182874
0.230044
0.13897
0.05225
0
0
0
0
0.002624
0.171898
4,142
208
158
19.913462
0.800875
0.011589
0
0.017544
0
0
0.125257
0.032049
0
0
0
0
0
1
0.236842
false
0.096491
0.008772
0.210526
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
4
e3fc6d70d60b93254fe7ae3bfc9ff0dcaff13f25
2,532
py
Python
test/test_data_consent_details_dto.py
My-Data-My-Consent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
null
null
null
test/test_data_consent_details_dto.py
My-Data-My-Consent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
5
2021-12-19T10:29:43.000Z
2022-03-31T22:15:37.000Z
test/test_data_consent_details_dto.py
mydatamyconsent/python-sdk
414640bcda6350e6f5e74e42442737eb8d5b7447
[ "Apache-2.0" ]
null
null
null
""" My Data My Consent - Developer API Unleashing the power of data consent by establishing trust. The Platform Core Developer API defines a set of capabilities that can be used to request, issue, manage and update data, documents and credentials by organizations. The API can be used to request, manage and update Decentralised Identifiers, Financial Data, Health Data issue Documents, Credentials directly or using OpenID Connect flows, and verify Messages signed with DIDs and much more. # noqa: E501 The version of the OpenAPI document: v1 Contact: support@mydatamyconsent.com Generated by: https://openapi-generator.tech """ import sys import unittest import com.mydatamyconsent from com.mydatamyconsent.model.data_consent_requested_account_dto import DataConsentRequestedAccountDto from com.mydatamyconsent.model.data_consent_requested_document import DataConsentRequestedDocument from com.mydatamyconsent.model.data_consent_requested_document_dto import DataConsentRequestedDocumentDto from com.mydatamyconsent.model.data_consent_requester_dto import DataConsentRequesterDto from com.mydatamyconsent.model.data_consent_status import DataConsentStatus from com.mydatamyconsent.model.data_fetch_frequency_unit import DataFetchFrequencyUnit from com.mydatamyconsent.model.data_fetch_type import DataFetchType from com.mydatamyconsent.model.data_life_unit import DataLifeUnit from com.mydatamyconsent.model.json_schema import JsonSchema globals()['DataConsentRequestedAccountDto'] = DataConsentRequestedAccountDto globals()['DataConsentRequestedDocument'] = DataConsentRequestedDocument globals()['DataConsentRequestedDocumentDto'] = DataConsentRequestedDocumentDto globals()['DataConsentRequesterDto'] = DataConsentRequesterDto globals()['DataConsentStatus'] = DataConsentStatus globals()['DataFetchFrequencyUnit'] = DataFetchFrequencyUnit globals()['DataFetchType'] = DataFetchType globals()['DataLifeUnit'] = DataLifeUnit globals()['JsonSchema'] = JsonSchema from com.mydatamyconsent.model.data_consent_details_dto import DataConsentDetailsDto class TestDataConsentDetailsDto(unittest.TestCase): """DataConsentDetailsDto unit test stubs""" def setUp(self): pass def tearDown(self): pass def testDataConsentDetailsDto(self): """Test DataConsentDetailsDto""" # FIXME: construct object with mandatory attributes with example values # model = DataConsentDetailsDto() # noqa: E501 pass if __name__ == '__main__': unittest.main()
46.036364
469
0.813586
265
2,532
7.641509
0.418868
0.097778
0.108642
0.133333
0.202469
0.169383
0.077531
0.054321
0
0
0
0.003146
0.121248
2,532
54
470
46.888889
0.906966
0.31793
0
0.096774
0
0
0.114997
0.079431
0
0
0
0.018519
0
1
0.096774
false
0.096774
0.419355
0
0.548387
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
1
1
0
1
0
0
4
5428fa08cba42998a6980fb3d5fffe48963d2299
230
py
Python
tests/conftest.py
natpacket/curl-impersonate
7717c220d1a4c311ed2a11c5dfb95c37940e1d9e
[ "MIT" ]
1,065
2022-02-17T23:33:43.000Z
2022-03-31T15:17:17.000Z
tests/conftest.py
natpacket/curl-impersonate
7717c220d1a4c311ed2a11c5dfb95c37940e1d9e
[ "MIT" ]
18
2022-02-18T11:21:27.000Z
2022-03-28T17:34:00.000Z
tests/conftest.py
natpacket/curl-impersonate
7717c220d1a4c311ed2a11c5dfb95c37940e1d9e
[ "MIT" ]
37
2022-02-18T03:10:30.000Z
2022-03-26T16:50:34.000Z
def pytest_addoption(parser): # Where to find curl-impersonate's binaries parser.addoption("--install-dir", action="store", default="/usr/local") parser.addoption("--capture-interface", action="store", default="eth0")
46
75
0.713043
28
230
5.821429
0.75
0.184049
0.220859
0
0
0
0
0
0
0
0
0.004902
0.113043
230
4
76
57.5
0.794118
0.178261
0
0
0
0
0.299465
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
58276ee9936a57254b0ab11c0ead4295004c0dc8
112
py
Python
core/app/camera/mqtt/__init__.py
EmixMaxime/mx-home-security
ec6d329a09bb2e0afbbd7e481937893311f02634
[ "MIT" ]
2
2021-04-29T19:28:59.000Z
2021-04-29T21:20:32.000Z
core/app/camera/mqtt/__init__.py
EmixMaxime/mx-home-security
ec6d329a09bb2e0afbbd7e481937893311f02634
[ "MIT" ]
101
2020-06-26T19:51:24.000Z
2021-03-28T09:35:55.000Z
core/app/camera/mqtt/__init__.py
mxmaxime/mx-tech-house
f6b66b8390b348e48d4c6ea0da51e409f3845fd6
[ "MIT" ]
null
null
null
from enum import Enum class MqttServices(Enum): CAMERA_MANAGER = 'camera_manager' CAMERA = 'camera'
12.444444
37
0.705357
13
112
5.923077
0.538462
0.337662
0.493506
0
0
0
0
0
0
0
0
0
0.214286
112
8
38
14
0.875
0
0
0
0
0
0.181818
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
582e9b1d55aed4465ebe8065eac499be34dc4ffc
192
py
Python
stripe/api_resources/source_transaction.py
timvisher/stripe-python
ae953fd0aa531f5b500e5e86eee5859df95a255d
[ "MIT" ]
2
2020-12-05T09:02:14.000Z
2021-03-28T17:23:20.000Z
stripe/api_resources/source_transaction.py
timvisher/stripe-python
ae953fd0aa531f5b500e5e86eee5859df95a255d
[ "MIT" ]
11
2019-12-26T17:21:03.000Z
2022-03-21T22:17:07.000Z
lib/stripe/api_resources/source_transaction.py
linuxpi/hypoconn_gcloud
ebf06c44dc754ac446a0915a0db028f18e3f35a7
[ "Apache-2.0" ]
2
2019-12-19T10:25:38.000Z
2020-01-03T08:54:20.000Z
from __future__ import absolute_import, division, print_function from stripe.stripe_object import StripeObject class SourceTransaction(StripeObject): OBJECT_NAME = 'source_transaction'
24
64
0.838542
21
192
7.238095
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.114583
192
7
65
27.428571
0.894118
0
0
0
0
0
0.09375
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
585adc83bdbb4ac06e0b5c2081d482f54da6596c
78
py
Python
nodeconductor/monitoring/zabbix/errors.py
p-p-m/nodeconductor
bc702302ef65c89793452f0fd6ca9a6bec79782f
[ "Apache-2.0" ]
null
null
null
nodeconductor/monitoring/zabbix/errors.py
p-p-m/nodeconductor
bc702302ef65c89793452f0fd6ca9a6bec79782f
[ "Apache-2.0" ]
null
null
null
nodeconductor/monitoring/zabbix/errors.py
p-p-m/nodeconductor
bc702302ef65c89793452f0fd6ca9a6bec79782f
[ "Apache-2.0" ]
null
null
null
class ZabbixError(Exception): """ Base zabbix error """ pass
11.142857
29
0.564103
7
78
6.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.320513
78
6
30
13
0.830189
0.217949
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
58833a06de8efc02cff0b8dcc21155460557821b
369
py
Python
main.py
spotandjake/Repldex
19bc5a1d5c3d43ffaf71492112f23b85ec9cacdb
[ "MIT" ]
null
null
null
main.py
spotandjake/Repldex
19bc5a1d5c3d43ffaf71492112f23b85ec9cacdb
[ "MIT" ]
null
null
null
main.py
spotandjake/Repldex
19bc5a1d5c3d43ffaf71492112f23b85ec9cacdb
[ "MIT" ]
null
null
null
from repldex.config import DOT_ENV print('starting') if DOT_ENV: from dotenv import load_dotenv load_dotenv() # Don't move this up, env must be loaded first from repldex.backend import api from repldex.discordbot import bot as discordbot from repldex.backend import website website.start_server(discordbot.client.loop, discordbot.start_bot(), discordbot.client)
23.0625
87
0.807588
56
369
5.214286
0.535714
0.150685
0.123288
0.164384
0
0
0
0
0
0
0
0
0.124661
369
15
88
24.6
0.904025
0.119241
0
0
0
0
0.024768
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
0.111111
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
588935af78f70e716d282cd13a4c2f0be3e3b0e5
797
py
Python
tools/relative_to_absolute_path.py
Leviathan321/ChessDiagramRecognition
c46effa3a9d49ae29fa55e82733e7fc7ba41c043
[ "MIT" ]
6
2020-07-27T19:10:30.000Z
2021-08-17T02:23:53.000Z
tools/relative_to_absolute_path.py
Leviathan321/ChessDiagramRecognition
c46effa3a9d49ae29fa55e82733e7fc7ba41c043
[ "MIT" ]
10
2020-06-17T15:19:26.000Z
2021-01-01T23:13:01.000Z
tools/relative_to_absolute_path.py
Leviathan321/ChessDiagramRecognition
c46effa3a9d49ae29fa55e82733e7fc7ba41c043
[ "MIT" ]
7
2020-08-10T05:13:57.000Z
2022-01-13T09:26:21.000Z
################################################################################ ################################################################################ from os.path import exists, abspath, dirname, join ################################################################################ ################################################################################ def get_absolute_path(relative_path: str, file_path: str) -> str: absolute_path: str = join(abspath(dirname(file_path)), relative_path) # assert exists(absolute_path), "'%s' must be a valid directory path" % absolute_path return absolute_path ################################################################################ ################################################################################
46.882353
89
0.288582
45
797
4.888889
0.488889
0.272727
0.145455
0
0
0
0
0
0
0
0
0
0.070263
797
16
90
49.8125
0.296896
0.104141
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
588e317d7c3f0eac34bd474fb903be127565780f
114
py
Python
dingding/__init__.py
gt945/dingding
3b4768af0ac24c9a729e2b1adb6245bfb79a42c8
[ "MIT" ]
17
2017-10-31T14:00:13.000Z
2021-07-25T13:02:44.000Z
dingding/__init__.py
gt945/dingding
3b4768af0ac24c9a729e2b1adb6245bfb79a42c8
[ "MIT" ]
2
2017-10-31T13:50:24.000Z
2019-11-21T14:24:41.000Z
dingding/__init__.py
gt945/dingding
3b4768af0ac24c9a729e2b1adb6245bfb79a42c8
[ "MIT" ]
12
2017-12-07T09:48:45.000Z
2022-03-18T06:58:58.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from .dingding import DingDing name = "dingding"
16.285714
38
0.72807
14
114
5.571429
0.642857
0
0
0
0
0
0
0
0
0
0
0.010417
0.157895
114
6
39
19
0.802083
0.184211
0
0
0
0
0.087912
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
589325fe8d2f97705e6ec8a4e79a3dbbf366b04e
91
py
Python
test/test_runner_subdir/inheriting_class.py
bukzor/Testify
e0054959b9be13851b937ec90533c183e9b2ba71
[ "Apache-2.0" ]
1
2020-12-18T01:07:23.000Z
2020-12-18T01:07:23.000Z
test/test_runner_subdir/inheriting_class.py
dnephin/Testify
9005a8866cbf099c26e6fbd74c3e2640a581a55b
[ "Apache-2.0" ]
null
null
null
test/test_runner_subdir/inheriting_class.py
dnephin/Testify
9005a8866cbf099c26e6fbd74c3e2640a581a55b
[ "Apache-2.0" ]
null
null
null
from .base_class import BaseClass class InheritingClass(BaseClass): __test__ = False
15.166667
33
0.78022
10
91
6.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.868421
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
58990b4066a0bff9dbaeca8e87edf1ddc7b0d5e6
889
py
Python
imglyb/config.py
hinerm/imglyb
fe6264f0ef5b37ab529186b73295d2d4011619bb
[ "BSD-2-Clause" ]
19
2018-10-17T10:18:36.000Z
2022-02-01T13:01:45.000Z
imglyb/config.py
hinerm/imglyb
fe6264f0ef5b37ab529186b73295d2d4011619bb
[ "BSD-2-Clause" ]
10
2018-07-18T13:15:50.000Z
2022-03-31T19:47:00.000Z
imglyb/config.py
hinerm/imglyb
fe6264f0ef5b37ab529186b73295d2d4011619bb
[ "BSD-2-Clause" ]
5
2018-10-30T21:53:26.000Z
2021-11-18T14:57:32.000Z
import os __major__ = 2 __minor__ = 0 __patch__ = 1 __tag__ = 'dev0' __version__ = f'{__major__}.{__minor__}.{__patch__}.{__tag__}'.strip('.') class _Version(object): def major(self): return __major__ def minor(self): return __minor__ def patch(self): return __patch__ def tag(self): return __tag__ def version(self): return __version__ def __str__(self): return self.version() _version = _Version() version = _version.version() _default_imglib2_imglyb_version = '1.0.1' _imglib2_imglyb_version = os.getenv('IMGLIB2_IMGLYB_VERSION', _default_imglib2_imglyb_version) def set_imglib2_imglyb_version(version): global _imglib2_imglyb_version _imglib2_imglyb_version = version def get_imglib2_imglyb_version(): global _imglib2_imglyb_version return _imglib2_imglyb_version
19.755556
102
0.700787
102
889
5.176471
0.254902
0.246212
0.378788
0.159091
0.320076
0
0
0
0
0
0
0.02432
0.213723
889
44
103
20.204545
0.731044
0
0
0.068966
0
0
0.086614
0.075366
0
0
0
0
0
1
0.275862
false
0
0.034483
0.206897
0.586207
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
5436bf77c3441d99e2024b6559f9551ac0ea6231
121
py
Python
Modules/Power/register.py
57r4n63r/dwm-status
75f14bc59838e6743fef95b8e0b73198b5b37c7e
[ "BSD-3-Clause" ]
2
2020-06-04T14:19:27.000Z
2022-02-01T19:29:41.000Z
Modules/Power/register.py
57r4n63r/dwm-status
75f14bc59838e6743fef95b8e0b73198b5b37c7e
[ "BSD-3-Clause" ]
null
null
null
Modules/Power/register.py
57r4n63r/dwm-status
75f14bc59838e6743fef95b8e0b73198b5b37c7e
[ "BSD-3-Clause" ]
null
null
null
from Modules.Importer import Importer importer = Importer.getInstance() importer.register('Modules.Power.Module.Power');
30.25
48
0.818182
14
121
7.071429
0.571429
0.323232
0
0
0
0
0
0
0
0
0
0
0.066116
121
3
49
40.333333
0.876106
0
0
0
0
0
0.214876
0.214876
0
0
0
0
0
1
0
false
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5438ef5af95b52c86444973cd981a6c583fda831
70
py
Python
tda/client/__init__.py
zhangted/tda-api
1169c87129b80c120217d420e4996a439c5903dc
[ "MIT" ]
986
2020-04-14T21:50:03.000Z
2022-03-29T19:09:31.000Z
tda/client/__init__.py
zhangted/tda-api
1169c87129b80c120217d420e4996a439c5903dc
[ "MIT" ]
243
2020-04-26T14:05:34.000Z
2022-03-12T13:02:51.000Z
tda/client/__init__.py
zhangted/tda-api
1169c87129b80c120217d420e4996a439c5903dc
[ "MIT" ]
286
2020-04-14T22:17:04.000Z
2022-03-27T07:30:15.000Z
from .synchronous import Client from .asynchronous import AsyncClient
23.333333
37
0.857143
8
70
7.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.114286
70
2
38
35
0.967742
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
543e7406a6fb19cd647d5d877f56b4119acb96dc
127
py
Python
brane-ide/kernels/bakery/bakery_kernel/__main__.py
romnn/brane
03752edd85a09a5ffb817b9f6a0fa03c8e9b277a
[ "Apache-2.0" ]
null
null
null
brane-ide/kernels/bakery/bakery_kernel/__main__.py
romnn/brane
03752edd85a09a5ffb817b9f6a0fa03c8e9b277a
[ "Apache-2.0" ]
null
null
null
brane-ide/kernels/bakery/bakery_kernel/__main__.py
romnn/brane
03752edd85a09a5ffb817b9f6a0fa03c8e9b277a
[ "Apache-2.0" ]
null
null
null
from ipykernel.kernelapp import IPKernelApp from . import BakeryKernel IPKernelApp.launch_instance(kernel_class=BakeryKernel)
25.4
54
0.874016
14
127
7.785714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.07874
127
4
55
31.75
0.931624
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5481bf7f0dc710b6cbc42d8721afa306248e10c8
1,665
py
Python
venv/Lib/site-packages/text_engine/utils/operators/OP1.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
venv/Lib/site-packages/text_engine/utils/operators/OP1.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
venv/Lib/site-packages/text_engine/utils/operators/OP1.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
from ...core import Match, As class OP1: s1: str s2: str @classmethod def _cls(cls, name, s1, s2): exec(f"class {name}({cls.__name__}):\n\ts1 = {repr(s1)}\n\ts2 = {repr(s2)}") return eval(name) def __init__(self, one): self.one = one def __repr__(self): return f"{self.__class__.__name__}({repr(self.one)})" def __str__(self): return f"{self.s1}{str(self.one)}{self.s2}" class OP1B(OP1): @classmethod def cls(cls, name, s1, s2): return cls._cls(name, s1, s2) @classmethod def builder(cls, name: str, S1: (str, str), I: str, S2: (str, str)): return [ cls.cls(name, S1[0], S2[0]), Match(S1[1]) & As("one", Match(I)) & Match(S2[1]) ] class OP1L(OP1): @classmethod def cls(cls, name, s2): return cls._cls(name, "", s2) @classmethod def builder(cls, name: str, S1: (str, str), I: str, S2: (str, str)): return [ cls.cls(name, S1[0]), Match(S1[1]) & As("one", Match(I)) ] class OP1R(OP1): @classmethod def cls(cls, name, s1): return cls._cls(name, s1, "") @classmethod def builder(cls, name: str, S1: (str, str), I: str, S2: (str, str)): return [ cls.cls(name, S2[0]), As("one", Match(I)) & Match(S2[1]) ] class OP1N(OP1): @classmethod def cls(cls, name): return cls._cls(name, "", "") @classmethod def builder(cls, name: str, I: str): return [ cls.cls(name), As("one", Match(I)) ]
21.623377
84
0.492492
223
1,665
3.547085
0.147982
0.159292
0.164349
0.16182
0.676359
0.581542
0.474083
0.362832
0.266751
0.266751
0
0.044144
0.333333
1,665
76
85
21.907895
0.668468
0
0
0.413793
0
0.017241
0.093093
0.063063
0
0
0
0
0
1
0.206897
false
0
0.017241
0.172414
0.534483
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
54a6c1be163fa62ed25807ecf522fe5d1548e011
92
py
Python
cryptonite/user_auth/apps.py
pshrmn/cryptonite
3f83f34ae6c1733568578c6296e6396872fa5513
[ "MIT" ]
1
2018-01-15T14:44:36.000Z
2018-01-15T14:44:36.000Z
cryptonite/user_auth/apps.py
pshrmn/cryptonite
3f83f34ae6c1733568578c6296e6396872fa5513
[ "MIT" ]
null
null
null
cryptonite/user_auth/apps.py
pshrmn/cryptonite
3f83f34ae6c1733568578c6296e6396872fa5513
[ "MIT" ]
null
null
null
from django.apps import AppConfig class JsonAuthConfig(AppConfig): name = 'json_auth'
15.333333
33
0.76087
11
92
6.272727
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.163043
92
5
34
18.4
0.896104
0
0
0
0
0
0.097826
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
54b3567c6d8a86d3b831bc972db926ff7ab6639d
228
py
Python
django_remote_forms/__init__.py
gadventures/django-remote-forms
4f577476baee93a96f23a373dfb4ec89dcd088c1
[ "MIT" ]
null
null
null
django_remote_forms/__init__.py
gadventures/django-remote-forms
4f577476baee93a96f23a373dfb4ec89dcd088c1
[ "MIT" ]
null
null
null
django_remote_forms/__init__.py
gadventures/django-remote-forms
4f577476baee93a96f23a373dfb4ec89dcd088c1
[ "MIT" ]
null
null
null
from __future__ import unicode_literals __author__ = 'Carlo Costino, Tareque Hossain' __version__ = (0, 0, 1) import logging logger = logging.getLogger(__name__) from .forms import RemoteForm from .widgets import RemoteWidget
22.8
45
0.802632
28
228
5.928571
0.75
0
0
0
0
0
0
0
0
0
0
0.015152
0.131579
228
9
46
25.333333
0.823232
0
0
0
0
0
0.131579
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
49cd7f3ac80958a51257ece7a4a558d11ed08e9b
87
py
Python
test/feature/steps/__init__.py
drakejund/contract
e1dbfcff94f348a0040062fd04c48b0e42b64762
[ "Apache-2.0" ]
172
2017-10-12T07:56:32.000Z
2022-03-10T11:08:02.000Z
test/feature/steps/__init__.py
Cielo2017/hyperledger-fabric-gm
40f2d1d03a96872b52cf6c5ba8a5c634e36089a6
[ "Apache-2.0" ]
18
2017-10-02T16:31:51.000Z
2020-02-24T21:39:20.000Z
test/feature/steps/__init__.py
Cielo2017/hyperledger-fabric-gm
40f2d1d03a96872b52cf6c5ba8a5c634e36089a6
[ "Apache-2.0" ]
89
2017-09-14T04:38:56.000Z
2021-05-21T17:24:48.000Z
# # Copyright IBM Corp. All Rights Reserved. # # SPDX-License-Identifier: Apache-2.0 #
14.5
42
0.712644
12
87
5.166667
1
0
0
0
0
0
0
0
0
0
0
0.027027
0.149425
87
5
43
17.4
0.810811
0.873563
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
49d063839927ddb657c71089e99a6dddd6f9d2b9
97
py
Python
canteenREST/apps.py
chinmaykhamkar/canteen-automation-web
48a0ceabe83424d9fd229bae3f5edd00caba0240
[ "MIT" ]
5
2018-12-27T07:32:04.000Z
2020-01-27T20:18:33.000Z
canteenREST/apps.py
chinmaykhamkar/canteen-automation-web
48a0ceabe83424d9fd229bae3f5edd00caba0240
[ "MIT" ]
57
2018-12-24T12:59:53.000Z
2021-10-06T03:41:27.000Z
canteenREST/apps.py
chinmaykhamkar/canteen-automation-web
48a0ceabe83424d9fd229bae3f5edd00caba0240
[ "MIT" ]
24
2018-12-24T11:30:05.000Z
2021-11-27T16:47:47.000Z
from django.apps import AppConfig class CanteenrestConfig(AppConfig): name = "canteenREST"
16.166667
35
0.773196
10
97
7.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.154639
97
5
36
19.4
0.914634
0
0
0
0
0
0.113402
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
49e7737d600ad96495d8ed2f96b7cdc93b7c317a
809
py
Python
setup.py
ParkJeongseop/PlaylistManager
e423a2da72a77b78d846846ce88a3c9beda9ef05
[ "MIT" ]
null
null
null
setup.py
ParkJeongseop/PlaylistManager
e423a2da72a77b78d846846ce88a3c9beda9ef05
[ "MIT" ]
null
null
null
setup.py
ParkJeongseop/PlaylistManager
e423a2da72a77b78d846846ce88a3c9beda9ef05
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name = 'pyPlaylistManager', version = '0.1', description = 'Music playlist manage library', author = 'ParkJeongseop', author_email = 'parkjeongseop@parkjeongseop.com', url = 'https://github.com/ParkJeongseop/PlaylistManager', install_requires = [ 'selenium' ], keywords = ['music playlist', 'playlist manage'], python_requires = '>=3', classifiers = [ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6' ] )
38.52381
74
0.571075
71
809
6.450704
0.521127
0.248908
0.327511
0.340611
0.117904
0
0
0
0
0
0
0.024648
0.297899
809
21
75
38.52381
0.78169
0
0
0
0
0
0.495062
0.038272
0
0
0
0
0
1
0
true
0
0.05
0
0.05
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
3fa6c9c1b9085228f03a484a03c9fe1a7d3c1098
242
py
Python
cl_sii/rtc/__init__.py
fyntex/lib-cl-sii-python
b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34
[ "MIT" ]
8
2020-03-07T19:58:40.000Z
2021-12-15T13:47:40.000Z
cl_sii/rtc/__init__.py
fyntex/lib-cl-sii-python
b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34
[ "MIT" ]
141
2020-01-17T22:47:35.000Z
2022-03-31T18:29:47.000Z
cl_sii/rtc/__init__.py
fyndata/lib-cl-sii-python
d618247fe7c73e11b391015ae8a00e7b282c2606
[ "MIT" ]
4
2019-05-18T15:43:35.000Z
2019-11-06T21:55:09.000Z
""" SII RTC/RPETC ============= Concepts and acronyms used interchangeably: * "Registro Transferencia de Crédito" (RTC) * "Registro Público Electrónico de Transferencia de Crédito" (RPETC) * "Registro Electrónico de Cesión de Créditos" """
22
68
0.719008
27
242
6.444444
0.592593
0.172414
0.252874
0
0
0
0
0
0
0
0
0
0.140496
242
10
69
24.2
0.836538
0.96281
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
3fc8f4536902961fa9de25457f2b0fc5156bc7c1
20,819
py
Python
src/fixate/drivers/dso/helper.py
smontanari1/Fixate
1469cf7b29c4a061a738b56767d6cfee52aade10
[ "MIT" ]
null
null
null
src/fixate/drivers/dso/helper.py
smontanari1/Fixate
1469cf7b29c4a061a738b56767d6cfee52aade10
[ "MIT" ]
null
null
null
src/fixate/drivers/dso/helper.py
smontanari1/Fixate
1469cf7b29c4a061a738b56767d6cfee52aade10
[ "MIT" ]
null
null
null
import inspect from abc import ABCMeta, abstractmethod from functools import update_wrapper from fixate.core.discover import discover_sub_classes, open_visa_instrument from fixate.core.exceptions import InstrumentFeatureUnavailable try: import typing number = typing.Union[float, int] except ImportError: number = float def open(restrictions=None): """Open is the public api for the dmm driver for discovering and opening a connection to a valid Digital Multimeter. At the moment opens the first dmm connected :param restrictions: A dictionary containing the technical specifications of the required equipment :return: A instantiated class connected to a valid dmm """ return open_visa_instrument("DSO", restrictions) def discover(): """Discovers the dmm classes implemented :return: """ return set(discover_sub_classes(DSO)) def validate_specifications(_class, specifications): """Validates the implemented dmm class against the specifications provided :return: True if all specifications are met False if one or more specifications are not met by the class """ raise NotImplementedError() class CallableNoArgs: def __call__(self): return self._call() def _call(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class CallableBool: def __call__(self, value: bool): return self._call(value) def _call(self, value: bool): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class SourcesCh: def ch1(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def ch2(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def ch3(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def ch4(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class SourcesSpecial: def function(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def math(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class SourcesWMem: def wmemory1(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def wmemory2(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class SourcesExt: def external(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class SourcesDig: def d0(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d1(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d2(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d3(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d4(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d5(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d6(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d7(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d8(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d9(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d10(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d11(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d12(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d13(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d14(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def d15(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class MeasureAllSources(SourcesCh, SourcesSpecial, SourcesWMem, SourcesDig, CallableNoArgs): pass class TrigSources(SourcesCh, SourcesExt, SourcesDig): pass class MultiMeasureSources(MeasureAllSources): def __init__(self): self.ch1 = MeasureAllSources() self.ch1 = MeasureAllSources() self.ch2 = MeasureAllSources() self.ch3 = MeasureAllSources() self.ch4 = MeasureAllSources() self.function = MeasureAllSources() self.math = MeasureAllSources() self.wmemory1 = MeasureAllSources() self.wmemory2 = MeasureAllSources() self.external = MeasureAllSources() self.d0 = MeasureAllSources() self.d1 = MeasureAllSources() self.d2 = MeasureAllSources() self.d3 = MeasureAllSources() self.d4 = MeasureAllSources() self.d5 = MeasureAllSources() self.d6 = MeasureAllSources() self.d7 = MeasureAllSources() self.d8 = MeasureAllSources() self.d9 = MeasureAllSources() self.d10 = MeasureAllSources() self.d11 = MeasureAllSources() self.d12 = MeasureAllSources() self.d13 = MeasureAllSources() self.d14 = MeasureAllSources() self.d15 = MeasureAllSources() class Coupling: def ac(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def dc(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def lf_reject(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def tv(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Probe: def attenuation(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class VerticalUnits: def volts(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def amps(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class ChannelBase(CallableBool): def __init__(self, channel_name: str): self._ch_name = channel_name # self.waveform = Waveform() # self.modulate = Modulate() # self.burst = Burst() # self.load = Load() self.coupling = Coupling() self.probe = Probe() self.units = VerticalUnits() def bandwidth(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def bandwidth_limit(self, value: bool): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def impedance(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def invert(self, value: bool): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def offset(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def scale(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Trigger: def __init__(self): self.mode = TrigMode() self.delay = None self.eburst = None self.coupling = Coupling() self.sweep = TrigSweep() def force(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def hf_reject(self, value: bool): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def hold_off(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def n_reject(self, value: bool): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class TrigSweep: def auto(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def normal(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class TrigLevel: def high(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def low(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class TrigMode: def __init__(self): self.edge = TrigEdge() class TrigEdge(CallableNoArgs): def __init__(self): self.source = TrigSources() self.slope = Slopes() def level(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class TrigReject: def off(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def lf(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def hf(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Slopes: def rising(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def falling(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def alternating(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def either(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Acquire: def __init__(self): self.mode = AcquireMode() def normal(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def peak_detect(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def averaging(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def high_resolution(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class AcquireMode: def rtim(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def segm(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Timebase: def __init__(self): self.mode = TimebaseMode() def position(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def scale(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class TimebaseMode: def main(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def window(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def xy(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def roll(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Events: def trigger(self): """ Indicates if a trigger event has occurred. Calls to this will clear the existing trigger events :return: """ raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class MeasureInterval: def __init__(self): self.cycle = MeasureAllSources() self.display = MeasureAllSources() class MeasureIntervalMultipleSources: def __init__(self): self.cycle = MultiMeasureSources() self.display = MultiMeasureSources() class MeasureRMS: def __init__(self): self.dc = MeasureInterval() self.ac = MeasureInterval() class Threshold: def percent(self, upper: number, middle: number, lower: number): """ :param upper: Upper Threshold :param middle: Middle Threshold :param lower: Lower Threshold :return: """ raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def absolute(self, upper: number, middle: number, lower: number): """ :param upper: Upper Threshold :param middle: Middle Threshold :param lower: Lower Threshold :return: """ raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) class Define: def __init__(self): super().__init__() self.threshold = Threshold() class Delay(CallableNoArgs): def __init__(self): super().__init__() self.edges = MultiSlopes() class Measure: def __init__(self): self.counter = MeasureAllSources() self.define = Define() self.delay = Delay() self.duty = MeasureAllSources() self.fall_time = MeasureAllSources() self.frequency = MeasureAllSources() self.cnt_edge_rising = MeasureAllSources() self.cnt_edge_falling = MeasureAllSources() self.cnt_pulse_positive = MeasureAllSources() self.cnt_pulse_negative = MeasureAllSources() self.period = MeasureAllSources() self.phase = MultiMeasureSources() self.pulse_width = MeasureAllSources() self.vamplitude = MeasureAllSources() self.vaverage = MeasureInterval() self.vbase = MeasureAllSources() self.vmax = MeasureAllSources() self.vmin = MeasureAllSources() self.vpp = MeasureAllSources() self.vratio = MeasureIntervalMultipleSources() self.vrms = MeasureRMS() self.xmax = MeasureAllSources() self.xmin = MeasureAllSources() class MultiSlopes(CallableNoArgs): def __init__(self): super().__init__() self.rising = Slopes() self.falling = Slopes() self.alternating = Slopes() self.either = Slopes() class DSO(metaclass=ABCMeta): REGEX_ID = "DSO" def __init__(self, instrument): self.instrument = instrument self.samples = 1 self.api = [] self.ch1 = ChannelBase("1") self.ch2 = ChannelBase("2") self.ch3 = ChannelBase("3") self.ch4 = ChannelBase("4") self.chmath = ChannelBase("math") self.chfunc = ChannelBase("func") self.coupling = Coupling() self.probe = Probe() self.source1 = MultiMeasureSources() self.source2 = MultiMeasureSources() self.trigger = Trigger() self.time_base = Timebase() self.acquire = Acquire() self.measure = Measure() self.events = Events() @abstractmethod def acquire(self, acquire_type, averaging_samples): pass @abstractmethod def waveform_values(self, source, filename): pass @abstractmethod def reset(self): pass @abstractmethod def auto_scale(self): pass @abstractmethod def save_setup(self, file_name): pass @abstractmethod def load_setup(self, file_name): pass def run(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def single(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def stop(self): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def scale(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def offset(self, value: number): raise InstrumentFeatureUnavailable( "{} not available on this device".format(inspect.currentframe().f_code.co_name)) def init_api(self): for func_str, handler, base_str in self.api: *parents, func = func_str.split(".") parent_obj = self for parent in parents: parent_obj = getattr(parent_obj, parent) func_obc = getattr(parent_obj, func) setattr(parent_obj, func, self.prepare_string(func_obc, handler, base_str)) def prepare_string(self, func, handler, base_str, *args, **kwargs): def temp_func(*nargs, **nkwargs): """ Only formats using **nkwargs New Temp :param nargs: :param nkwargs: :return: """ sig = inspect.signature(func) keys = [itm[0] for itm in sig.parameters.items()] for index, param in enumerate(nargs): nkwargs[keys[index]] = param # new_str = base_str.format(**nkwargs) # handler(self, new_str) return handler(base_str, **nkwargs) return update_wrapper(temp_func, func)
33.257188
92
0.658533
2,173
20,819
6.171192
0.139439
0.187025
0.204027
0.255034
0.632289
0.619911
0.618121
0.606786
0.606786
0.606786
0
0.004361
0.240021
20,819
625
93
33.3104
0.843193
0.051636
0
0.454756
0
0
0.12207
0
0
0
0
0
0
1
0.243619
false
0.018561
0.016241
0.00464
0.357309
0
0
0
0
null
0
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
1
0
0
0
0
0
0
0
4
3fcf91ed646864fdac46612ee70d52e9bb2ab19c
485
py
Python
binarysearch.io/the_accountant.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
2
2020-06-25T21:10:32.000Z
2020-12-10T06:53:45.000Z
binarysearch.io/the_accountant.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
null
null
null
binarysearch.io/the_accountant.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
3
2020-05-15T14:17:09.000Z
2021-07-25T13:18:20.000Z
class Solution: def solve(self, n): # Write your code here l = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K' , 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] s = "" while n > 26: j = n%26 n = n//26 s += l[j-1] if n <= 26: s += l[n-1] return s[::-1]
22.045455
73
0.22268
61
485
1.770492
0.655738
0.111111
0.074074
0.092593
0
0
0
0
0
0
0
0.04955
0.542268
485
21
74
23.095238
0.436937
0.041237
0
0
0
0
0.056156
0
0
0
0
0.047619
0
1
0.071429
false
0
0
0
0.214286
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
4
3fd38c5a04cc5e582f8c8dfaed338f3aec8ba941
321
py
Python
app/controllers/home.py
mustaphee/simple-blog
22fb170a4ed94e6be5c131802d13d18b12818464
[ "MIT" ]
null
null
null
app/controllers/home.py
mustaphee/simple-blog
22fb170a4ed94e6be5c131802d13d18b12818464
[ "MIT" ]
null
null
null
app/controllers/home.py
mustaphee/simple-blog
22fb170a4ed94e6be5c131802d13d18b12818464
[ "MIT" ]
null
null
null
from flask import render_template def index(): """Homepage of this app :return: None """ return render_template('home.html') def error_pages(error): """Return Error pages :param error: Error or Exception object :return: """ return render_template('error.html', error=str(error))
16.894737
58
0.654206
40
321
5.15
0.55
0.203884
0.194175
0
0
0
0
0
0
0
0
0
0.227414
321
18
59
17.833333
0.830645
0.320872
0
0
0
0
0.103825
0
0
0
0
0
0
1
0.4
false
0
0.2
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
b777642aa2f06a5a1fb563e5012ffc5283846536
38
py
Python
foiamachine/local/lib/python2.7/encodings/gb2312.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
3
2021-08-07T04:01:55.000Z
2021-08-07T05:12:11.000Z
foiamachine/local/lib/python2.7/encodings/gb2312.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
null
null
null
foiamachine/local/lib/python2.7/encodings/gb2312.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
1
2021-08-05T22:51:14.000Z
2021-08-05T22:51:14.000Z
/usr/lib/python2.7/encodings/gb2312.py
38
38
0.815789
7
38
4.428571
1
0
0
0
0
0
0
0
0
0
0
0.157895
0
38
1
38
38
0.657895
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
b7a5b4e7e027ddc784ef714a76cd98a9f6074bbd
3,330
py
Python
code/tools/external/python/pygccxml/declarations/type_visitor.py
jgresula/jagpdf
6c36958b109e6522e6b57d04144dd83c024778eb
[ "MIT" ]
54
2015-02-16T14:25:16.000Z
2022-03-16T07:54:25.000Z
code/tools/external/python/pygccxml/declarations/type_visitor.py
jgresula/jagpdf
6c36958b109e6522e6b57d04144dd83c024778eb
[ "MIT" ]
null
null
null
code/tools/external/python/pygccxml/declarations/type_visitor.py
jgresula/jagpdf
6c36958b109e6522e6b57d04144dd83c024778eb
[ "MIT" ]
30
2015-03-05T08:52:25.000Z
2022-02-17T13:49:15.000Z
# Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) """ defines types visitor class interface """ class type_visitor_t(object): """ types visitor interface All functions within this class should be redefined in derived classes. """ def __init__(self): object.__init__(self) def visit_void( self ): raise NotImplementedError() def visit_char( self ): raise NotImplementedError() def visit_unsigned_char( self ): raise NotImplementedError() def visit_signed_char( self ): raise NotImplementedError() def visit_wchar( self ): raise NotImplementedError() def visit_short_int( self ): raise NotImplementedError() def visit_short_unsigned_int( self ): raise NotImplementedError() def visit_bool( self ): raise NotImplementedError() def visit_int( self ): raise NotImplementedError() def visit_unsigned_int( self ): raise NotImplementedError() def visit_long_int( self ): raise NotImplementedError() def visit_long_unsigned_int( self ): raise NotImplementedError() def visit_long_long_int( self ): raise NotImplementedError() def visit_long_long_unsigned_int( self ): raise NotImplementedError() def visit_float( self ): raise NotImplementedError() def visit_double( self ): raise NotImplementedError() def visit_long_double( self ): raise NotImplementedError() def visit_complex_long_double(self): raise NotImplementedError() def visit_complex_double(self): raise NotImplementedError() def visit_complex_float(self): raise NotImplementedError() def visit_jbyte(self): raise NotImplementedError() def visit_jshort(self): raise NotImplementedError() def visit_jint(self): raise NotImplementedError() def visit_jlong(self): raise NotImplementedError() def visit_jfloat(self): raise NotImplementedError() def visit_jdouble(self): raise NotImplementedError() def visit_jchar(self): raise NotImplementedError() def visit_jboolean(self): raise NotImplementedError() def visit_volatile( self ): raise NotImplementedError() def visit_const( self ): raise NotImplementedError() def visit_pointer( self ): raise NotImplementedError() def visit_reference( self ): raise NotImplementedError() def visit_array( self ): raise NotImplementedError() def visit_free_function_type( self ): raise NotImplementedError() def visit_member_function_type( self ): raise NotImplementedError() def visit_member_variable_type( self ): raise NotImplementedError() def visit_declarated( self ): raise NotImplementedError() def visit_restrict( self ): raise NotImplementedError()
25.227273
75
0.627628
314
3,330
6.410828
0.248408
0.151018
0.528564
0.569796
0.767511
0.481371
0.274714
0.227024
0
0
0
0.00431
0.303303
3,330
132
76
25.227273
0.863362
0.094294
0
0.481013
0
0
0
0
0
0
0
0
0
1
0.493671
false
0
0
0
0.506329
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
b7e42eef2d08f4527de10b6676c6fddf6b090231
42,899
py
Python
tests/test_options.py
kongdd/aria2p
736a96b2cc52df6e9ee09a596441782a9ff2382a
[ "ISC" ]
1
2020-01-02T13:12:15.000Z
2020-01-02T13:12:15.000Z
tests/test_options.py
kongdd/aria2p
736a96b2cc52df6e9ee09a596441782a9ff2382a
[ "ISC" ]
null
null
null
tests/test_options.py
kongdd/aria2p
736a96b2cc52df6e9ee09a596441782a9ff2382a
[ "ISC" ]
null
null
null
from aria2p import API, Download, Options # Test general methods class TestGeneralMethods: def setup_method(self): self.api = API() def test_init_method(self): assert Options(self.api, {}) def test_are_global_method(self): options = Options(self.api, {}) assert options.are_global def test_are_not_global(self): options = Options(self.api, {}, Download(self.api, {})) assert not options.are_global def test_get_struct_method(self): options = Options(self.api, {0: 1}) assert options.get_struct() == {0: 1} def test_get_method(self): options = Options(self.api, {0: 1}) assert options.get(0) == 1 def test_set_method(self): self.api.set_global_options = lambda x: True options = Options(self.api, {}) assert options.set("0", 0) assert options.get("0") == "0" assert options.set(1, "1") assert options.get(1) == "1" def test_set_method_failure(self): self.api.set_global_options = lambda x: False options = Options(self.api, {"0": "0"}) assert not options.set("0", "1") assert not options.set("1", "1") assert options.get("0") == "0" assert options.get("1") is None def test_set_method_for_download(self): self.api.set_options = lambda x, y: [True] options = Options(self.api, {}, Download(self.api, {})) assert options.set("0", 0) assert options.get("0") == "0" # Test actual options class TestOptionsProperties: def setup_method(self): self.api = API() self.api.set_global_options = lambda x: True self.options = Options(self.api, {}) def test_all_proxy_properties(self): assert self.options.all_proxy is None value = "http://user:password@host:2000" self.options.all_proxy = value assert self.options.all_proxy == value def test_all_proxy_passwd_properties(self): assert self.options.all_proxy_passwd is None value = "" self.options.all_proxy_passwd = value assert self.options.all_proxy_passwd == value def test_all_proxy_user_properties(self): assert self.options.all_proxy_user is None value = "" self.options.all_proxy_user = value assert self.options.all_proxy_user == value def test_allow_overwrite_properties(self): assert self.options.allow_overwrite is None value = "" self.options.allow_overwrite = value assert self.options.allow_overwrite == value def test_allow_piece_length_change_properties(self): assert self.options.allow_piece_length_change is None value = "" self.options.allow_piece_length_change = value assert self.options.allow_piece_length_change == value def test_always_resume_properties(self): assert self.options.always_resume is None value = "" self.options.always_resume = value assert self.options.always_resume == value def test_async_dns_properties(self): assert self.options.async_dns is None value = "" self.options.async_dns = value assert self.options.async_dns == value def test_async_dns_server_properties(self): assert self.options.async_dns_server is None value = "" self.options.async_dns_server = value assert self.options.async_dns_server == value def test_auto_file_renaming_properties(self): assert self.options.auto_file_renaming is None value = "" self.options.auto_file_renaming = value assert self.options.auto_file_renaming == value def test_auto_save_interval_properties(self): assert self.options.auto_save_interval is None value = 60 self.options.auto_save_interval = value assert self.options.auto_save_interval == value def test_bt_detach_seed_only_properties(self): assert self.options.bt_detach_seed_only is None value = "" self.options.bt_detach_seed_only = value assert self.options.bt_detach_seed_only == value def test_bt_enable_hook_after_hash_check_properties(self): assert self.options.bt_enable_hook_after_hash_check is None value = "" self.options.bt_enable_hook_after_hash_check = value assert self.options.bt_enable_hook_after_hash_check == value def test_bt_enable_lpd_properties(self): assert self.options.bt_enable_lpd is None value = "" self.options.bt_enable_lpd = value assert self.options.bt_enable_lpd == value def test_bt_exclude_tracker_properties(self): assert self.options.bt_exclude_tracker is None value = "" self.options.bt_exclude_tracker = value assert self.options.bt_exclude_tracker == value def test_bt_external_ip_properties(self): assert self.options.bt_external_ip is None value = "" self.options.bt_external_ip = value assert self.options.bt_external_ip == value def test_bt_force_encryption_properties(self): assert self.options.bt_force_encryption is None value = "" self.options.bt_force_encryption = value assert self.options.bt_force_encryption == value def test_bt_hash_check_seed_properties(self): assert self.options.bt_hash_check_seed is None value = "" self.options.bt_hash_check_seed = value assert self.options.bt_hash_check_seed == value def test_bt_lpd_interface_properties(self): assert self.options.bt_lpd_interface is None value = "" self.options.bt_lpd_interface = value assert self.options.bt_lpd_interface == value def test_bt_max_open_files_properties(self): assert self.options.bt_max_open_files is None value = 100 self.options.bt_max_open_files = value assert self.options.bt_max_open_files == value def test_bt_max_peers_properties(self): assert self.options.bt_max_peers is None value = 50 self.options.bt_max_peers = value assert self.options.bt_max_peers == value def test_bt_metadata_only_properties(self): assert self.options.bt_metadata_only is None value = "" self.options.bt_metadata_only = value assert self.options.bt_metadata_only == value def test_bt_min_crypto_level_properties(self): assert self.options.bt_min_crypto_level is None value = "" self.options.bt_min_crypto_level = value assert self.options.bt_min_crypto_level == value def test_bt_prioritize_piece_properties(self): assert self.options.bt_prioritize_piece is None value = "" self.options.bt_prioritize_piece = value assert self.options.bt_prioritize_piece == value def test_bt_remove_unselected_file_properties(self): assert self.options.bt_remove_unselected_file is None value = "" self.options.bt_remove_unselected_file = value assert self.options.bt_remove_unselected_file == value def test_bt_request_peer_speed_limit_properties(self): assert self.options.bt_request_peer_speed_limit is None value = 256 self.options.bt_request_peer_speed_limit = value assert self.options.bt_request_peer_speed_limit == value def test_bt_require_crypto_properties(self): assert self.options.bt_require_crypto is None value = "" self.options.bt_require_crypto = value assert self.options.bt_require_crypto == value def test_bt_save_metadata_properties(self): assert self.options.bt_save_metadata is None value = "" self.options.bt_save_metadata = value assert self.options.bt_save_metadata == value def test_bt_seed_unverified_properties(self): assert self.options.bt_seed_unverified is None value = "" self.options.bt_seed_unverified = value assert self.options.bt_seed_unverified == value def test_bt_stop_timeout_properties(self): assert self.options.bt_stop_timeout is None value = 60 self.options.bt_stop_timeout = value assert self.options.bt_stop_timeout == value def test_bt_tracker_properties(self): assert self.options.bt_tracker is None value = "" self.options.bt_tracker = value assert self.options.bt_tracker == value def test_bt_tracker_connect_timeout_properties(self): assert self.options.bt_tracker_connect_timeout is None value = 180 self.options.bt_tracker_connect_timeout = value assert self.options.bt_tracker_connect_timeout == value def test_bt_tracker_interval_properties(self): assert self.options.bt_tracker_interval is None value = 60 self.options.bt_tracker_interval = value assert self.options.bt_tracker_interval == value def test_bt_tracker_timeout_properties(self): assert self.options.bt_tracker_timeout is None value = 60 self.options.bt_tracker_timeout = value assert self.options.bt_tracker_timeout == value def test_ca_certificate_properties(self): assert self.options.ca_certificate is None value = "" self.options.ca_certificate = value assert self.options.ca_certificate == value def test_certificate_properties(self): assert self.options.certificate is None value = "" self.options.certificate = value assert self.options.certificate == value def test_check_certificate_properties(self): assert self.options.check_certificate is None value = "" self.options.check_certificate = value assert self.options.check_certificate == value def test_check_integrity_properties(self): assert self.options.check_integrity is None value = "" self.options.check_integrity = value assert self.options.check_integrity == value def test_checksum_properties(self): assert self.options.checksum is None value = "" self.options.checksum = value assert self.options.checksum == value def test_conditional_get_properties(self): assert self.options.conditional_get is None value = "" self.options.conditional_get = value assert self.options.conditional_get == value def test_conf_path_properties(self): assert self.options.conf_path is None value = "" self.options.conf_path = value assert self.options.conf_path == value def test_connect_timeout_properties(self): assert self.options.connect_timeout is None value = 60 self.options.connect_timeout = value assert self.options.connect_timeout == value def test_console_log_level_properties(self): assert self.options.console_log_level is None value = "" self.options.console_log_level = value assert self.options.console_log_level == value def test_continue_downloads_properties(self): assert self.options.continue_downloads is None value = "" self.options.continue_downloads = value assert self.options.continue_downloads == value def test_daemon_properties(self): assert self.options.daemon is None value = "" self.options.daemon = value assert self.options.daemon == value def test_deferred_input_properties(self): assert self.options.deferred_input is None value = "" self.options.deferred_input = value assert self.options.deferred_input == value def test_dht_entry_point_properties(self): assert self.options.dht_entry_point is None value = "" self.options.dht_entry_point = value assert self.options.dht_entry_point == value def test_dht_entry_point6_properties(self): assert self.options.dht_entry_point6 is None value = "" self.options.dht_entry_point6 = value assert self.options.dht_entry_point6 == value def test_dht_file_path_properties(self): assert self.options.dht_file_path is None value = "" self.options.dht_file_path = value assert self.options.dht_file_path == value def test_dht_file_path6_properties(self): assert self.options.dht_file_path6 is None value = "" self.options.dht_file_path6 = value assert self.options.dht_file_path6 == value def test_dht_listen_addr6_properties(self): assert self.options.dht_listen_addr6 is None value = "" self.options.dht_listen_addr6 = value assert self.options.dht_listen_addr6 == value def test_dht_listen_port_properties(self): assert self.options.dht_listen_port is None value = "" self.options.dht_listen_port = value assert self.options.dht_listen_port == value def test_dht_message_timeout_properties(self): assert self.options.dht_message_timeout is None value = 30 self.options.dht_message_timeout = value assert self.options.dht_message_timeout == value def test_dir_properties(self): assert self.options.dir is None value = "/some/random/dir" self.options.dir = value assert self.options.dir == value def test_disable_ipv6_properties(self): assert self.options.disable_ipv6 is None value = "" self.options.disable_ipv6 = value assert self.options.disable_ipv6 == value def test_disk_cache_properties(self): assert self.options.disk_cache is None value = 2048 self.options.disk_cache = value assert self.options.disk_cache == value def test_download_result_properties(self): assert self.options.download_result is None value = "" self.options.download_result = value assert self.options.download_result == value def test_dry_run_properties(self): assert self.options.dry_run is None value = "" self.options.dry_run = value assert self.options.dry_run == value def test_dscp_properties(self): assert self.options.dscp is None value = "" self.options.dscp = value assert self.options.dscp == value def test_enable_color_properties(self): assert self.options.enable_color is None value = "" self.options.enable_color = value assert self.options.enable_color == value def test_enable_dht_properties(self): assert self.options.enable_dht is None value = "" self.options.enable_dht = value assert self.options.enable_dht == value def test_enable_dht6_properties(self): assert self.options.enable_dht6 is None value = "" self.options.enable_dht6 = value assert self.options.enable_dht6 == value def test_enable_http_keep_alive_properties(self): assert self.options.enable_http_keep_alive is None value = "" self.options.enable_http_keep_alive = value assert self.options.enable_http_keep_alive == value def test_enable_http_pipelining_properties(self): assert self.options.enable_http_pipelining is None value = "" self.options.enable_http_pipelining = value assert self.options.enable_http_pipelining == value def test_enable_mmap_properties(self): assert self.options.enable_mmap is None value = "" self.options.enable_mmap = value assert self.options.enable_mmap == value def test_enable_peer_exchange_properties(self): assert self.options.enable_peer_exchange is None value = "" self.options.enable_peer_exchange = value assert self.options.enable_peer_exchange == value def test_enable_rpc_properties(self): assert self.options.enable_rpc is None value = "" self.options.enable_rpc = value assert self.options.enable_rpc == value def test_event_poll_properties(self): assert self.options.event_poll is None value = "" self.options.event_poll = value assert self.options.event_poll == value def test_file_allocation_properties(self): assert self.options.file_allocation is None value = "" self.options.file_allocation = value assert self.options.file_allocation == value def test_follow_metalink_properties(self): assert self.options.follow_metalink is None value = "" self.options.follow_metalink = value assert self.options.follow_metalink == value def test_follow_torrent_properties(self): assert self.options.follow_torrent is None value = "" self.options.follow_torrent = value assert self.options.follow_torrent == value def test_force_save_properties(self): assert self.options.force_save is None value = "" self.options.force_save = value assert self.options.force_save == value def test_force_sequential_properties(self): assert self.options.force_sequential is None value = "" self.options.force_sequential = value assert self.options.force_sequential == value def test_ftp_passwd_properties(self): assert self.options.ftp_passwd is None value = "" self.options.ftp_passwd = value assert self.options.ftp_passwd == value def test_ftp_pasv_properties(self): assert self.options.ftp_pasv is None value = "" self.options.ftp_pasv = value assert self.options.ftp_pasv == value def test_ftp_proxy_properties(self): assert self.options.ftp_proxy is None value = "" self.options.ftp_proxy = value assert self.options.ftp_proxy == value def test_ftp_proxy_passwd_properties(self): assert self.options.ftp_proxy_passwd is None value = "" self.options.ftp_proxy_passwd = value assert self.options.ftp_proxy_passwd == value def test_ftp_proxy_user_properties(self): assert self.options.ftp_proxy_user is None value = "" self.options.ftp_proxy_user = value assert self.options.ftp_proxy_user == value def test_ftp_reuse_connection_properties(self): assert self.options.ftp_reuse_connection is None value = "" self.options.ftp_reuse_connection = value assert self.options.ftp_reuse_connection == value def test_ftp_type_properties(self): assert self.options.ftp_type is None value = "" self.options.ftp_type = value assert self.options.ftp_type == value def test_ftp_user_properties(self): assert self.options.ftp_user is None value = "" self.options.ftp_user = value assert self.options.ftp_user == value def test_gid_properties(self): assert self.options.gid is None value = "" self.options.gid = value assert self.options.gid == value def test_hash_check_only_properties(self): assert self.options.hash_check_only is None value = "" self.options.hash_check_only = value assert self.options.hash_check_only == value def test_header_properties(self): assert self.options.header is None value = "" self.options.header = value assert self.options.header == value def test_http_accept_gzip_properties(self): assert self.options.http_accept_gzip is None value = "" self.options.http_accept_gzip = value assert self.options.http_accept_gzip == value def test_http_auth_challenge_properties(self): assert self.options.http_auth_challenge is None value = "" self.options.http_auth_challenge = value assert self.options.http_auth_challenge == value def test_http_no_cache_properties(self): assert self.options.http_no_cache is None value = "" self.options.http_no_cache = value assert self.options.http_no_cache == value def test_http_passwd_properties(self): assert self.options.http_passwd is None value = "" self.options.http_passwd = value assert self.options.http_passwd == value def test_http_proxy_properties(self): assert self.options.http_proxy is None value = "" self.options.http_proxy = value assert self.options.http_proxy == value def test_http_proxy_passwd_properties(self): assert self.options.http_proxy_passwd is None value = "" self.options.http_proxy_passwd = value assert self.options.http_proxy_passwd == value def test_http_proxy_user_properties(self): assert self.options.http_proxy_user is None value = "" self.options.http_proxy_user = value assert self.options.http_proxy_user == value def test_http_user_properties(self): assert self.options.http_user is None value = "" self.options.http_user = value assert self.options.http_user == value def test_https_proxy_properties(self): assert self.options.https_proxy is None value = "" self.options.https_proxy = value assert self.options.https_proxy == value def test_https_proxy_passwd_properties(self): assert self.options.https_proxy_passwd is None value = "" self.options.https_proxy_passwd = value assert self.options.https_proxy_passwd == value def test_https_proxy_user_properties(self): assert self.options.https_proxy_user is None value = "" self.options.https_proxy_user = value assert self.options.https_proxy_user == value def test_human_readable_properties(self): assert self.options.human_readable is None value = "" self.options.human_readable = value assert self.options.human_readable == value def test_index_out_properties(self): assert self.options.index_out is None value = "" self.options.index_out = value assert self.options.index_out == value def test_input_file_properties(self): assert self.options.input_file is None value = "" self.options.input_file = value assert self.options.input_file == value def test_interface_properties(self): assert self.options.interface is None value = "" self.options.interface = value assert self.options.interface == value def test_keep_unfinished_download_result_properties(self): assert self.options.keep_unfinished_download_result is None value = "" self.options.keep_unfinished_download_result = value assert self.options.keep_unfinished_download_result == value def test_listen_port_properties(self): assert self.options.listen_port is None value = "" self.options.listen_port = value assert self.options.listen_port == value def test_load_cookies(self): assert self.options.load_cookies is None value = "" self.options.load_cookies = value assert self.options.load_cookies == value def test_log_properties(self): assert self.options.log is None value = "" self.options.log = value assert self.options.log == value def test_log_level_properties(self): assert self.options.log_level is None value = "" self.options.log_level = value assert self.options.log_level == value def test_lowest_speed_limit_properties(self): assert self.options.lowest_speed_limit is None value = 128 self.options.lowest_speed_limit = value assert self.options.lowest_speed_limit == value def test_max_concurrent_downloads_properties(self): assert self.options.max_concurrent_downloads is None value = 10 self.options.max_concurrent_downloads = value assert self.options.max_concurrent_downloads == value def test_max_connection_per_server_properties(self): assert self.options.max_connection_per_server is None value = 20 self.options.max_connection_per_server = value assert self.options.max_connection_per_server == value def test_max_download_limit_properties(self): assert self.options.max_download_limit is None value = 100 self.options.max_download_limit = value assert self.options.max_download_limit == value def test_max_download_result_properties(self): assert self.options.max_download_result is None value = 50 self.options.max_download_result = value assert self.options.max_download_result == value def test_max_file_not_found_properties(self): assert self.options.max_file_not_found is None value = 10 self.options.max_file_not_found = value assert self.options.max_file_not_found == value def test_max_mmap_limit_properties(self): assert self.options.max_mmap_limit is None value = 10 self.options.max_mmap_limit = value assert self.options.max_mmap_limit == value def test_max_overall_download_limit_properties(self): assert self.options.max_overall_download_limit is None value = 1000 self.options.max_overall_download_limit = value assert self.options.max_overall_download_limit == value def test_max_overall_upload_limit_properties(self): assert self.options.max_overall_upload_limit is None value = 1000 self.options.max_overall_upload_limit = value assert self.options.max_overall_upload_limit == value def test_max_resume_failure_tries_properties(self): assert self.options.max_resume_failure_tries is None value = 100 self.options.max_resume_failure_tries = value assert self.options.max_resume_failure_tries == value def test_max_tries_properties(self): assert self.options.max_tries is None value = 1 self.options.max_tries = value assert self.options.max_tries == value def test_max_upload_limit_properties(self): assert self.options.max_upload_limit is None value = 100 self.options.max_upload_limit = value assert self.options.max_upload_limit == value def test_metalink_base_uri_properties(self): assert self.options.metalink_base_uri is None value = "" self.options.metalink_base_uri = value assert self.options.metalink_base_uri == value def test_metalink_enable_unique_protocol_properties(self): assert self.options.metalink_enable_unique_protocol is None value = "" self.options.metalink_enable_unique_protocol = value assert self.options.metalink_enable_unique_protocol == value def test_metalink_file_properties(self): assert self.options.metalink_file is None value = "" self.options.metalink_file = value assert self.options.metalink_file == value def test_metalink_language_properties(self): assert self.options.metalink_language is None value = "" self.options.metalink_language = value assert self.options.metalink_language == value def test_metalink_location_properties(self): assert self.options.metalink_location is None value = "" self.options.metalink_location = value assert self.options.metalink_location == value def test_metalink_os_properties(self): assert self.options.metalink_os is None value = "" self.options.metalink_os = value assert self.options.metalink_os == value def test_metalink_preferred_protocol_properties(self): assert self.options.metalink_preferred_protocol is None value = "" self.options.metalink_preferred_protocol = value assert self.options.metalink_preferred_protocol == value def test_metalink_version_properties(self): assert self.options.metalink_version is None value = "" self.options.metalink_version = value assert self.options.metalink_version == value def test_min_split_size_properties(self): assert self.options.min_split_size is None value = 2048 self.options.min_split_size = value assert self.options.min_split_size == value def test_min_tls_version_properties(self): assert self.options.min_tls_version is None value = "" self.options.min_tls_version = value assert self.options.min_tls_version == value def test_multiple_interface_properties(self): assert self.options.multiple_interface is None value = "" self.options.multiple_interface = value assert self.options.multiple_interface == value def test_netrc_path_properties(self): assert self.options.netrc_path is None value = "" self.options.netrc_path = value assert self.options.netrc_path == value def test_no_conf_properties(self): assert self.options.no_conf is None value = "" self.options.no_conf = value assert self.options.no_conf == value def test_no_file_allocation_limit_properties(self): assert self.options.no_file_allocation_limit is None value = 200 self.options.no_file_allocation_limit = value assert self.options.no_file_allocation_limit == value def test_no_netrc_properties(self): assert self.options.no_netrc is None value = "" self.options.no_netrc = value assert self.options.no_netrc == value def test_no_proxy_properties(self): assert self.options.no_proxy is None value = "" self.options.no_proxy = value assert self.options.no_proxy == value def test_on_bt_download_complete_properties(self): assert self.options.on_bt_download_complete is None value = "" self.options.on_bt_download_complete = value assert self.options.on_bt_download_complete == value def test_on_download_complete_properties(self): assert self.options.on_download_complete is None value = "" self.options.on_download_complete = value assert self.options.on_download_complete == value def test_on_download_error_properties(self): assert self.options.on_download_error is None value = "" self.options.on_download_error = value assert self.options.on_download_error == value def test_on_download_pause_properties(self): assert self.options.on_download_pause is None value = "" self.options.on_download_pause = value assert self.options.on_download_pause == value def test_on_download_start_properties(self): assert self.options.on_download_start is None value = "" self.options.on_download_start = value assert self.options.on_download_start == value def test_on_download_stop_properties(self): assert self.options.on_download_stop is None value = "" self.options.on_download_stop = value assert self.options.on_download_stop == value def test_optimize_concurrent_downloads_properties(self): assert self.options.optimize_concurrent_downloads is None value = "" self.options.optimize_concurrent_downloads = value assert self.options.optimize_concurrent_downloads == value def test_out_properties(self): assert self.options.out is None value = "" self.options.out = value assert self.options.out == value def test_parameterized_uri_properties(self): assert self.options.parameterized_uri is None value = "" self.options.parameterized_uri = value assert self.options.parameterized_uri == value def test_pause_properties(self): assert self.options.pause is None value = "" self.options.pause = value assert self.options.pause == value def test_pause_metadata_properties(self): assert self.options.pause_metadata is None value = "" self.options.pause_metadata = value assert self.options.pause_metadata == value def test_peer_id_prefix_properties(self): assert self.options.peer_id_prefix is None value = "" self.options.peer_id_prefix = value assert self.options.peer_id_prefix == value def test_piece_length_properties(self): assert self.options.piece_length is None value = "" self.options.piece_length = value assert self.options.piece_length == value def test_private_key_properties(self): assert self.options.private_key is None value = "" self.options.private_key = value assert self.options.private_key == value def test_proxy_method_properties(self): assert self.options.proxy_method is None value = "" self.options.proxy_method = value assert self.options.proxy_method == value def test_quiet_properties(self): assert self.options.quiet is None value = "" self.options.quiet = value assert self.options.quiet == value def test_realtime_chunk_checksum_properties(self): assert self.options.realtime_chunk_checksum is None value = "" self.options.realtime_chunk_checksum = value assert self.options.realtime_chunk_checksum == value def test_referer_properties(self): assert self.options.referer is None value = "" self.options.referer = value assert self.options.referer == value def test_remote_time_properties(self): assert self.options.remote_time is None value = "" self.options.remote_time = value assert self.options.remote_time == value def test_remove_control_file_properties(self): assert self.options.remove_control_file is None value = "" self.options.remove_control_file = value assert self.options.remove_control_file == value def test_retry_wait_properties(self): assert self.options.retry_wait is None value = 2 self.options.retry_wait = value assert self.options.retry_wait == value def test_reuse_uri_properties(self): assert self.options.reuse_uri is None value = "" self.options.reuse_uri = value assert self.options.reuse_uri == value def test_rlimit_nofile(self): assert self.options.rlimit_nofile is None value = 10 self.options.rlimit_nofile = value assert self.options.rlimit_nofile == value def test_rpc_allow_origin_all_properties(self): assert self.options.rpc_allow_origin_all is None value = "" self.options.rpc_allow_origin_all = value assert self.options.rpc_allow_origin_all == value def test_rpc_certificate_properties(self): assert self.options.rpc_certificate is None value = "" self.options.rpc_certificate = value assert self.options.rpc_certificate == value def test_rpc_listen_all_properties(self): assert self.options.rpc_listen_all is None value = True self.options.rpc_listen_all = value assert self.options.rpc_listen_all == value def test_rpc_listen_port_properties(self): assert self.options.rpc_listen_port is None value = 6801 self.options.rpc_listen_port = value assert self.options.rpc_listen_port == value def test_rpc_max_request_size_properties(self): assert self.options.rpc_max_request_size is None value = "" self.options.rpc_max_request_size = value assert self.options.rpc_max_request_size == value def test_rpc_passwd_properties(self): assert self.options.rpc_passwd is None value = "" self.options.rpc_passwd = value assert self.options.rpc_passwd == value def test_rpc_private_key_properties(self): assert self.options.rpc_private_key is None value = "" self.options.rpc_private_key = value assert self.options.rpc_private_key == value def test_rpc_save_upload_metadata_properties(self): assert self.options.rpc_save_upload_metadata is None value = "" self.options.rpc_save_upload_metadata = value assert self.options.rpc_save_upload_metadata == value def test_rpc_secret(self): assert self.options.rpc_secret is None value = "secret" self.options.rpc_secret = value assert self.options.rpc_secret == value def test_rpc_secure_properties(self): assert self.options.rpc_secure is None value = "" self.options.rpc_secure = value assert self.options.rpc_secure == value def test_rpc_user_properties(self): assert self.options.rpc_user is None value = "" self.options.rpc_user = value assert self.options.rpc_user == value def test_save_cookies_properties(self): assert self.options.save_cookies is None value = "" self.options.save_cookies = value assert self.options.save_cookies == value def test_save_not_found_properties(self): assert self.options.save_not_found is None value = "" self.options.save_not_found = value assert self.options.save_not_found == value def test_save_session_properties(self): assert self.options.save_session is None value = "" self.options.save_session = value assert self.options.save_session == value def test_save_session_interval_properties(self): assert self.options.save_session_interval is None value = 120 self.options.save_session_interval = value assert self.options.save_session_interval == value def test_seed_ratio_properties(self): assert self.options.seed_ratio is None value = "" self.options.seed_ratio = value assert self.options.seed_ratio == value def test_seed_time_properties(self): assert self.options.seed_time is None value = "" self.options.seed_time = value assert self.options.seed_time == value def test_select_file_properties(self): assert self.options.select_file is None value = "" self.options.select_file = value assert self.options.select_file == value def test_server_stat_if_properties(self): assert self.options.server_stat_if is None value = "" self.options.server_stat_if = value assert self.options.server_stat_if == value def test_server_stat_of_properties(self): assert self.options.server_stat_of is None value = "" self.options.server_stat_of = value assert self.options.server_stat_of == value def test_server_stat_timeout_properties(self): assert self.options.server_stat_timeout is None value = 60 self.options.server_stat_timeout = value assert self.options.server_stat_timeout == value def test_show_console_readout_properties(self): assert self.options.show_console_readout is None value = "" self.options.show_console_readout = value assert self.options.show_console_readout == value def test_show_files_properties(self): assert self.options.show_files is None value = "" self.options.show_files = value assert self.options.show_files == value def test_socket_recv_buffer_size_properties(self): assert self.options.socket_recv_buffer_size is None value = 256 self.options.socket_recv_buffer_size = value assert self.options.socket_recv_buffer_size == value def test_split_properties(self): assert self.options.split is None value = 5 self.options.split = value assert self.options.split == value def test_ssh_host_key_md_properties(self): assert self.options.ssh_host_key_md is None value = "" self.options.ssh_host_key_md = value assert self.options.ssh_host_key_md == value def test_stderr_properties(self): assert self.options.stderr is None value = "" self.options.stderr = value assert self.options.stderr == value def test_stop(self): assert self.options.stop is None value = 1000 self.options.stop = value assert self.options.stop == value def test_stop_with_process_properties(self): assert self.options.stop_with_process is None value = 15050 self.options.stop_with_process = value assert self.options.stop_with_process == value def test_stream_piece_selector_properties(self): assert self.options.stream_piece_selector is None value = "" self.options.stream_piece_selector = value assert self.options.stream_piece_selector == value def test_summary_interval_properties(self): assert self.options.summary_interval is None value = 120 self.options.summary_interval = value assert self.options.summary_interval == value def test_timeout_properties(self): assert self.options.timeout is None value = 60 self.options.timeout = value assert self.options.timeout == value def test_torrent_file_properties(self): assert self.options.torrent_file is None value = "" self.options.torrent_file = value assert self.options.torrent_file == value def test_truncate_console_readout_properties(self): assert self.options.truncate_console_readout is None value = "" self.options.truncate_console_readout = value assert self.options.truncate_console_readout == value def test_uri_selector_properties(self): assert self.options.uri_selector is None value = "" self.options.uri_selector = value assert self.options.uri_selector == value def test_use_head_properties(self): assert self.options.use_head is None value = "" self.options.use_head = value assert self.options.use_head == value def test_user_agent_properties(self): assert self.options.user_agent is None value = "" self.options.user_agent = value assert self.options.user_agent == value
35.660017
68
0.682976
5,467
42,899
5.067313
0.046278
0.229506
0.234415
0.144786
0.892214
0.676353
0.306537
0.048442
0.014403
0.006642
0
0.004608
0.246276
42,899
1,202
69
35.689684
0.852168
0.000932
0
0.194584
0
0
0.00161
0
0
0
0
0
0.398195
1
0.201605
false
0.029087
0.001003
0
0.204614
0
0
0
0
null
1
1
0
1
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
b7ed6b2514651f0b16e9241f2453ea2df1d9e8c4
181
py
Python
src/edrndmcc.appserver/edrndmcc/appserver/tests/__init__.py
EDRN/DMCCBackend
bae6b00bb0733daec927f08b989d62126e3a4f16
[ "Apache-2.0" ]
null
null
null
src/edrndmcc.appserver/edrndmcc/appserver/tests/__init__.py
EDRN/DMCCBackend
bae6b00bb0733daec927f08b989d62126e3a4f16
[ "Apache-2.0" ]
13
2020-01-14T23:34:49.000Z
2021-06-09T21:50:22.000Z
src/edrndmcc.appserver/edrndmcc/appserver/tests/__init__.py
EDRN/CancerDataExpo
21b5e8c90186e05bda840ee1bf51acc34583c153
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 # Copyright 2008 California Institute of Technology. ALL RIGHTS # RESERVED. U.S. Government Sponsorship acknowledged. ''' Unit, functional, and other tests. '''
20.111111
63
0.745856
22
181
6.136364
1
0
0
0
0
0
0
0
0
0
0
0.032468
0.149171
181
8
64
22.625
0.844156
0.911602
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
4d2080a48f8ab3bfd4b33db733d14ec1dd6083a6
275
py
Python
ccupydo/__init__.py
tobadavid/CUPyDO
ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88
[ "Apache-2.0" ]
1
2018-07-16T00:30:37.000Z
2018-07-16T00:30:37.000Z
ccupydo/__init__.py
tobadavid/CUPyDO
ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88
[ "Apache-2.0" ]
null
null
null
ccupydo/__init__.py
tobadavid/CUPyDO
ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88
[ "Apache-2.0" ]
1
2019-03-09T17:24:58.000Z
2019-03-09T17:24:58.000Z
# Initialize the CCupydo module # # Authors : D. THOMAS # # COPYRIGHT (C) University of Liege, 2017. from CCupydo import CInterpolator from CCupydo import CManager from CCupydo import CInterfaceMatrix from CCupydo import CFlexInterfaceData from CCupydo import CLinearSolver
22.916667
42
0.814545
33
275
6.787879
0.606061
0.245536
0.379464
0
0
0
0
0
0
0
0
0.017021
0.145455
275
11
43
25
0.93617
0.327273
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4d2d95b12da22aeb34bbfea1f5430f129c5da64e
2,228
py
Python
magic/wireless/wireless.py
DomAmato/magic-cli
fd3dfdf464cf04e3c78fbfa2fe9b7c7766a4bafc
[ "MIT" ]
12
2019-01-16T20:50:01.000Z
2021-12-07T03:50:22.000Z
magic/wireless/wireless.py
DomAmato/magic-cli
fd3dfdf464cf04e3c78fbfa2fe9b7c7766a4bafc
[ "MIT" ]
14
2019-01-08T16:50:41.000Z
2019-05-07T18:04:32.000Z
magic/wireless/wireless.py
DomAmato/magic-cli
fd3dfdf464cf04e3c78fbfa2fe9b7c7766a4bafc
[ "MIT" ]
2
2019-06-09T03:47:13.000Z
2021-07-13T02:39:41.000Z
from magic.util.log import log from magic.util.cmd import cmd class Wireless: _driver_name = None _driver = None def __init__(self, interface=None): # Detect the platform's driver self._driver_name = self.detect_driver() if self._driver_name == 'networksetup': from magic.wireless.driver.macos_networksetup import MacOSNetworksetup self._driver = MacOSNetworksetup() elif self._driver_name == 'nmcli': from magic.wireless.driver.linux_nmcli import LinuxNmcli self._driver = LinuxNmcli() else: # TODO: Windows support log("Your OS is not supported yet.", "red") # Raise an error if interface cannot be determined if self.interface() is None: raise Exception('Unable to auto-detect the network interface.') @staticmethod def detect_driver(): # MacOS response = cmd('which networksetup') if len(response.stdout) > 0 and 'not found' not in response.stdout: return 'networksetup' # Linux response = cmd('which nmcli') if len(response.stdout) > 0 and 'not found' not in response.stdout: return 'nmcli' raise Exception('Unable to find compatible wireless driver.') # Check for existence of 8021x creds instalsled already def has_8021x_creds(self, ssid, address, signature): return self._driver.has_8021x_creds(ssid, address, signature) # Install proper creds for 802.1x connection def install_8021x_creds(self, ssid, address, signature, timestamp): return self._driver.install_8021x_creds(ssid, address, signature, timestamp) # Connect to a network by SSID def connect(self, ssid): return self._driver.connect(ssid) # Return SSID of the current network def current(self): return self._driver.current_ssid() # Return a list of networks def scan(self): return self._driver.scan_networks() # Return the current wireless adapter def interface(self, interface=None): return self._driver.interface(interface) # Return the driver name def driver(self): return self._driver_name
34.276923
84
0.660233
270
2,228
5.311111
0.322222
0.083682
0.078103
0.041841
0.167364
0.125523
0.078103
0.078103
0.078103
0.078103
0
0.015777
0.260323
2,228
64
85
34.8125
0.854369
0.160233
0
0.05
0
0
0.107104
0
0
0
0
0.015625
0
1
0.225
false
0
0.1
0.175
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
4d856916d76ce77676bdc6b5ae6ea718c111bb1e
589
py
Python
db/migrations/0013_auto_20210203_1355.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
1
2022-03-03T09:55:57.000Z
2022-03-03T09:55:57.000Z
db/migrations/0013_auto_20210203_1355.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
7
2022-02-09T10:44:53.000Z
2022-03-28T03:29:43.000Z
db/migrations/0013_auto_20210203_1355.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.5 on 2021-02-03 13:55 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('db', '0012_auto_20210203_1303'), ] operations = [ migrations.AlterModelOptions( name='language', options={'ordering': ['name']}, ), migrations.AlterModelOptions( name='languageniveau', options={'ordering': ['name']}, ), migrations.AlterModelOptions( name='skill', options={'ordering': ['name']}, ), ]
22.653846
47
0.541596
49
589
6.44898
0.632653
0.256329
0.294304
0.183544
0.316456
0.316456
0
0
0
0
0
0.077307
0.319185
589
25
48
23.56
0.710723
0.076401
0
0.473684
1
0
0.162362
0.042435
0
0
0
0
0
1
0
false
0
0.052632
0
0.210526
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4df82e24005c042f6f7cbb9eee30d6713bff98c1
251
py
Python
Chapter 3/greetings.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
null
null
null
Chapter 3/greetings.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
null
null
null
Chapter 3/greetings.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
5
2021-09-22T16:53:47.000Z
2022-03-24T00:56:49.000Z
names = ['Dani', 'Ale', 'E. Jose'] message = f'Hey {names[0]}, Thanks for your friendship' print(message) message = f'Hey {names[1]}, Thanks for your friendship' print(message) message = f'Hey {names[2]}, Thanks for your friendship' print(message)
22.818182
55
0.689243
38
251
4.552632
0.421053
0.138728
0.190751
0.277457
0.791908
0.791908
0.589595
0.589595
0.589595
0.589595
0
0.013953
0.143426
251
10
56
25.1
0.790698
0
0
0.428571
0
0
0.557769
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
0
0
0
null
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
4dfabf12c6a8fa1d720ab25fbbca864385986406
44
py
Python
document_processing/azure_api/cognitiveservices/__init__.py
vhiwase/document_processing
2274cfa47b2beece8cfd4701b646523bb9a2abd2
[ "MIT" ]
null
null
null
document_processing/azure_api/cognitiveservices/__init__.py
vhiwase/document_processing
2274cfa47b2beece8cfd4701b646523bb9a2abd2
[ "MIT" ]
null
null
null
document_processing/azure_api/cognitiveservices/__init__.py
vhiwase/document_processing
2274cfa47b2beece8cfd4701b646523bb9a2abd2
[ "MIT" ]
1
2021-05-28T18:21:52.000Z
2021-05-28T18:21:52.000Z
from .ocr import * __all__ = (ocr.__all__)
11
23
0.681818
6
44
3.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.181818
44
3
24
14.666667
0.611111
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
1507bff66ba1413b34c28624d392ae8818ebcf01
135
py
Python
domaintools/__init__.py
saurabh-prakash/python_api
553290955c68ddb9d5f55a150031a62741918f70
[ "MIT" ]
null
null
null
domaintools/__init__.py
saurabh-prakash/python_api
553290955c68ddb9d5f55a150031a62741918f70
[ "MIT" ]
1
2021-06-02T13:51:14.000Z
2021-06-02T13:51:14.000Z
domaintools/__init__.py
jmeridth/python_api
01a5c8886bc55b5bdbb094f439faf218e353bf3e
[ "MIT" ]
null
null
null
"""DomainTools' Official Python API""" from domaintools._version import current from domaintools.api import API __version__ = current
22.5
40
0.807407
16
135
6.5
0.5
0.288462
0
0
0
0
0
0
0
0
0
0
0.118519
135
5
41
27
0.87395
0.237037
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
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
1517296dfe700e7db2d515f200b9e9cffb06efd4
1,059
py
Python
emerald/boa/_base.py
yu3ufff/emeraldml
0c7247e59819383ba1d354aae5aa9c276015a046
[ "MIT" ]
2
2021-06-24T15:19:22.000Z
2021-09-27T00:09:15.000Z
emerald/boa/_base.py
yu3ufff/gokboru
0c7247e59819383ba1d354aae5aa9c276015a046
[ "MIT" ]
null
null
null
emerald/boa/_base.py
yu3ufff/gokboru
0c7247e59819383ba1d354aae5aa9c276015a046
[ "MIT" ]
null
null
null
class BaseBoa: NUM_REGRESSION_MODELS_SUPPORTED = 5 reg_model_index = {0: 'dtree', 1: 'knn', 2: 'linreg', 3: 'adaboost', 4: 'rforest', } def __repr__(self): return type(self).__name__ # finish implementation!!! def __len__(self): return len(self.ladder) def ladder(self): return self.ladder def optimal_model(self, rank=0): return self.ladder[rank][0] def model(self, rank=0): return self.ladder[rank][0].model def model_score(self, rank=0): return self.ladder[rank][1] def get_sets(self, rank=0, save=False): return self.ladder[rank][0].get_sets(save=save) def hunt(self, X_train=None, X_test=None, y_train=None, y_test=None, data=None, target=None): pass def find_optimal(self, model, X_train=None, y_train=None, data=None, target=None): pass
23.021739
97
0.523135
128
1,059
4.109375
0.367188
0.06654
0.152091
0.152091
0.326996
0.287072
0.188213
0.13308
0.13308
0
0
0.020802
0.364495
1,059
46
98
23.021739
0.760773
0.022663
0
0.076923
0
0
0.028046
0
0
0
0
0
0
1
0.346154
false
0.076923
0
0.269231
0.730769
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
1287568b46346b5581ed9e4fff75b32dcf131ef7
253
py
Python
aws_lambda_powertools/utilities/parameters/exceptions.py
Sordie/aws-lambda-powertools-python
12c512b78b8830bf2ed09e35d640df14afacfc1a
[ "Apache-2.0" ]
1,208
2020-05-20T19:06:29.000Z
2022-03-30T14:17:47.000Z
aws_lambda_powertools/utilities/parameters/exceptions.py
Sordie/aws-lambda-powertools-python
12c512b78b8830bf2ed09e35d640df14afacfc1a
[ "Apache-2.0" ]
859
2020-05-22T09:59:54.000Z
2022-03-31T08:31:30.000Z
aws_lambda_powertools/utilities/parameters/exceptions.py
Sordie/aws-lambda-powertools-python
12c512b78b8830bf2ed09e35d640df14afacfc1a
[ "Apache-2.0" ]
163
2020-05-18T21:08:25.000Z
2022-03-28T12:03:37.000Z
""" Parameter retrieval exceptions """ class GetParameterError(Exception): """When a provider raises an exception on parameter retrieval""" class TransformParameterError(Exception): """When a provider fails to transform a parameter value"""
21.083333
68
0.750988
27
253
7.037037
0.62963
0.189474
0.147368
0.231579
0
0
0
0
0
0
0
0
0.15415
253
11
69
23
0.88785
0.561265
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
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
1287fed578b74732ca4f6b79a8feb90938aa9d06
139
py
Python
bot/__init__.py
zeroone2numeral2/regex-bot
ebb3a86795732485d41f103bd27cf0e1ac80d53b
[ "MIT" ]
1
2019-09-19T19:29:20.000Z
2019-09-19T19:29:20.000Z
bot/__init__.py
zeroone2numeral2/regex-bot
ebb3a86795732485d41f103bd27cf0e1ac80d53b
[ "MIT" ]
null
null
null
bot/__init__.py
zeroone2numeral2/regex-bot
ebb3a86795732485d41f103bd27cf0e1ac80d53b
[ "MIT" ]
4
2020-02-19T15:50:43.000Z
2021-09-08T16:46:07.000Z
import os from telegram.ext import Updater updater = Updater(token=os.environ.get('TG_TOKEN') or "") dispatcher = updater.dispatcher
23.166667
58
0.748201
19
139
5.421053
0.631579
0.271845
0
0
0
0
0
0
0
0
0
0
0.143885
139
5
59
27.8
0.865546
0
0
0
0
0
0.059701
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
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
128805702d2b4eb2f6ae130d6585560043bc3486
51
py
Python
applications/Gardeners_temp/controllers/default.py
abhishek-vinjamoori/Restaurant-Portal
fd7e312b350b25260fb0e8d300ec44d1f8c6ae05
[ "BSD-3-Clause" ]
null
null
null
applications/Gardeners_temp/controllers/default.py
abhishek-vinjamoori/Restaurant-Portal
fd7e312b350b25260fb0e8d300ec44d1f8c6ae05
[ "BSD-3-Clause" ]
null
null
null
applications/Gardeners_temp/controllers/default.py
abhishek-vinjamoori/Restaurant-Portal
fd7e312b350b25260fb0e8d300ec44d1f8c6ae05
[ "BSD-3-Clause" ]
null
null
null
def index(): redirect(URL('order','homepage'))
17
37
0.627451
6
51
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.137255
51
2
38
25.5
0.727273
0
0
0
0
0
0.254902
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
129f7435a87497ee036c01d56ebf31a34035322b
31
py
Python
tests/__init__.py
BehindLoader/py2ch
a79f877ad6d4bb526d2476c12e9d340178da2170
[ "MIT" ]
5
2019-08-05T12:06:33.000Z
2019-09-10T07:25:00.000Z
tests/__init__.py
BehindLoader/pych
a79f877ad6d4bb526d2476c12e9d340178da2170
[ "MIT" ]
16
2019-08-05T12:18:59.000Z
2019-08-14T20:21:08.000Z
tests/__init__.py
BehindLoader/pych
a79f877ad6d4bb526d2476c12e9d340178da2170
[ "MIT" ]
null
null
null
"""Module for unit testing."""
15.5
30
0.645161
4
31
5
1
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
1
31
31
0.740741
0.774194
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
12a5f536091c7d9132427011b02b9015b58ce69d
48,862
py
Python
tests/test_configuration_parser.py
MarcoGorelli/rsmtool
8759f5bec09a8ba0dd2ca16f6af8ce100d5ea6a0
[ "Apache-2.0" ]
null
null
null
tests/test_configuration_parser.py
MarcoGorelli/rsmtool
8759f5bec09a8ba0dd2ca16f6af8ce100d5ea6a0
[ "Apache-2.0" ]
null
null
null
tests/test_configuration_parser.py
MarcoGorelli/rsmtool
8759f5bec09a8ba0dd2ca16f6af8ce100d5ea6a0
[ "Apache-2.0" ]
null
null
null
import json import logging import os import tempfile import pandas as pd import warnings from io import StringIO from os import getcwd from os.path import abspath, dirname, join from pathlib import Path from shutil import rmtree from numpy.testing import assert_array_equal from pandas.testing import assert_frame_equal from nose.tools import (assert_equal, assert_not_equal, eq_, ok_, raises) from rsmtool.convert_feature_json import convert_feature_json_file from rsmtool.configuration_parser import (Configuration, ConfigurationParser) _MY_DIR = dirname(__file__) class TestConfigurationParser: def setUp(self): pass @raises(FileNotFoundError) def test_init_nonexistent_file(self): non_existent_file = "/x/y.json" _ = ConfigurationParser(non_existent_file) @raises(OSError) def test_init_directory_instead_of_file(self): with tempfile.TemporaryDirectory() as tempd: _ = ConfigurationParser(tempd) @raises(ValueError) def test_init_non_json_file(self): with tempfile.NamedTemporaryFile(suffix=".txt") as tempf: _ = ConfigurationParser(tempf.name) def test_parse_config_from_dict_rsmtool(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression'} # Add data to `Configuration` object newdata = Configuration(data) assert_equal(newdata['id_column'], 'spkitemid') assert_equal(newdata['use_scaled_predictions'], False) assert_equal(newdata['select_transformations'], False) assert_array_equal(newdata['general_sections'], ['all']) assert_equal(newdata['description'], '') assert_equal(newdata.configdir, getcwd()) def test_parse_config_from_dict_rsmeval(self): data = {'experiment_id': 'experiment_1', 'predictions_file': 'data/rsmtool_smTrain.csv', 'system_score_column': 'system', 'trim_min': 1, 'trim_max': 5} # Add data to `Configuration` object newdata = Configuration(data, context='rsmeval') assert_equal(newdata['id_column'], 'spkitemid') assert_array_equal(newdata['general_sections'], ['all']) assert_equal(newdata['description'], '') assert_equal(newdata.configdir, getcwd()) @raises(ValueError) def test_validate_config_missing_fields(self): data = {'experiment_id': 'test'} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_validate_config_min_responses_but_no_candidate(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'min_responses_per_candidate': 5} _ = ConfigurationParser.validate_config(data) def test_validate_config_unspecified_fields(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression'} newdata = ConfigurationParser.validate_config(data) assert_equal(newdata['id_column'], 'spkitemid') assert_equal(newdata['use_scaled_predictions'], False) assert_equal(newdata['select_transformations'], False) assert_array_equal(newdata['general_sections'], ['all']) assert_equal(newdata['description'], '') @raises(ValueError) def test_validate_config_unknown_fields(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'LinearRegression', 'output': 'foobar'} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_validate_config_experiment_id_1(self): data = {'experiment_id': 'test experiment', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression'} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_validate_config_experiment_id_2(self): data = {'experiment_id': 'test experiment', 'predictions_file': 'data/foo', 'system_score_column': 'h1', 'trim_min': 1, 'trim_max': 5} _ = ConfigurationParser.validate_config(data, context='rsmeval') @raises(ValueError) def test_validate_config_experiment_id_3(self): data = {'comparison_id': 'old vs new', 'experiment_id_old': 'old_experiment', 'experiment_dir_old': 'data/old', 'experiment_id_new': 'new_experiment', 'experiment_dir_new': 'data/new'} _ = ConfigurationParser.validate_config(data, context='rsmcompare') @raises(ValueError) def test_validate_config_experiment_id_4(self): data = {'comparison_id': 'old vs new', 'experiment_id_old': 'old experiment', 'experiment_dir_old': 'data/old', 'experiment_id_new': 'new_experiment', 'experiment_dir_new': 'data/new'} _ = ConfigurationParser.validate_config(data, context='rsmcompare') @raises(ValueError) def test_validate_config_experiment_id_5(self): data = {'experiment_id': 'this_is_a_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_long_id', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression'} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_validate_config_experiment_id_6(self): data = {'experiment_id': 'this_is_a_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_long_id', 'predictions_file': 'data/foo', 'system_score_column': 'h1', 'trim_min': 1, 'trim_max': 5} _ = ConfigurationParser.validate_config(data, context='rsmeval') @raises(ValueError) def test_validate_config_experiment_id_7(self): data = {'comparison_id': 'this_is_a_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_long_id', 'experiment_id_old': 'old_experiment', 'experiment_dir_old': 'data/old', 'experiment_id_new': 'new_experiment', 'experiment_dir_new': 'data/new'} _ = ConfigurationParser.validate_config(data, context='rsmcompare') @raises(ValueError) def test_validate_config_experiment_id_8(self): data = {'summary_id': 'model summary', 'experiment_dirs': []} _ = ConfigurationParser.validate_config(data, context='rsmsummarize') @raises(ValueError) def test_validate_config_experiment_id_9(self): data = {'summary_id': 'this_is_a_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_really_really_really_really_' 'really_really_really_long_id', 'experiment_dirs': []} _ = ConfigurationParser.validate_config(data, context='rsmsummarize') @raises(ValueError) def test_validate_config_too_many_experiment_names(self): data = {'summary_id': 'summary', 'experiment_dirs': ["dir1", "dir2", "dir3"], 'experiment_names': ['exp1', 'exp2', 'exp3', 'exp4']} _ = ConfigurationParser.validate_config(data, context='rsmsummarize') @raises(ValueError) def test_validate_config_too_few_experiment_names(self): data = {'summary_id': 'summary', 'experiment_dirs': ["dir1", "dir2", "dir3"], 'experiment_names': ['exp1', 'exp2']} _ = ConfigurationParser.validate_config(data, context='rsmsummarize') def test_validate_config_numeric_subgroup_threshold(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'subgroups': ['L2', 'L1'], 'min_n_per_group': 100} newdata = ConfigurationParser.validate_config(data) eq_(type(newdata['min_n_per_group']), dict) assert_equal(newdata['min_n_per_group']['L1'], 100) assert_equal(newdata['min_n_per_group']['L2'], 100) def test_validate_config_dictionary_subgroup_threshold(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'subgroups': ['L2', 'L1'], 'min_n_per_group': {"L1": 100, "L2": 200}} newdata = ConfigurationParser.validate_config(data) eq_(type(newdata['min_n_per_group']), dict) assert_equal(newdata['min_n_per_group']['L1'], 100) assert_equal(newdata['min_n_per_group']['L2'], 200) @raises(ValueError) def test_validate_config_too_few_subgroup_keys(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'subgroups': ['L1', 'L2'], 'min_n_per_group': {"L1": 100}} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_valdiate_config_too_many_subgroup_keys(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'subgroups': ['L1', 'L2'], 'min_n_per_group': {"L1": 100, "L2": 100, "L4": 50}} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_validate_config_mismatched_subgroup_keys(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'subgroups': ['L1', 'L2'], 'min_n_per_group': {"L1": 100, "L4": 50}} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_validate_config_min_n_without_subgroups(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'min_n_per_group': {"L1": 100, "L2": 50}} _ = ConfigurationParser.validate_config(data) def test_validate_config_warning_feature_file_and_transformations(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'select_transformations': True, 'features': 'some_file.csv'} with warnings.catch_warnings(record=True) as warning_list: _ = ConfigurationParser.validate_config(data) eq_(len(warning_list), 1) ok_(issubclass(warning_list[0].category, UserWarning)) def test_validate_config_warning_feature_list_and_transformations(self): # this should no show warnings data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'model': 'LinearRegression', 'select_transformations': True, 'features': ['feature1', 'feature2']} with warnings.catch_warnings(record=True) as warning_list: _ = ConfigurationParser.validate_config(data) eq_(len(warning_list), 0) def test_process_fields(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'empWt', 'use_scaled_predictions': 'True', 'subgroups': 'native language, GPA_range', 'exclude_zero_scores': 'false'} newdata = ConfigurationParser.process_config(data) assert_array_equal(newdata['subgroups'], ['native language', 'GPA_range']) eq_(type(newdata['use_scaled_predictions']), bool) eq_(newdata['use_scaled_predictions'], True) eq_(newdata['exclude_zero_scores'], False) @raises(ValueError) def test_process_fields_with_non_boolean(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'empWt', 'use_scaled_predictions': 'True', 'feature_prefix': '1gram, 2gram', 'subgroups': 'native language, GPA_range', 'exclude_zero_scores': 'Yes'} _ = ConfigurationParser.process_config(data) @raises(ValueError) def test_process_fields_with_integer(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'empWt', 'use_scaled_predictions': 'True', 'feature_prefix': '1gram, 2gram', 'subgroups': 'native language, GPA_range', 'exclude_zero_scores': 1} _ = ConfigurationParser.process_config(data) def test_process_fields_rsmsummarize(self): data = {'summary_id': 'summary', 'experiment_dirs': 'home/dir1, home/dir2, home/dir3', 'experiment_names': 'exp1, exp2, exp3'} newdata = ConfigurationParser.process_config(data) assert_array_equal(newdata['experiment_dirs'], ['home/dir1', 'home/dir2', 'home/dir3']) assert_array_equal(newdata['experiment_names'], ['exp1', 'exp2', 'exp3']) @raises(ValueError) def test_invalid_skll_objective(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'LinearSVR', 'skll_objective': 'squared_error'} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_wrong_skll_model_for_expected_scores(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'LinearSVR', 'predict_expected_scores': 'true'} _ = ConfigurationParser.validate_config(data) @raises(ValueError) def test_builtin_model_for_expected_scores(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'NNLR', 'predict_expected_scores': 'true'} _ = ConfigurationParser.validate_config(data) def test_process_validate_correct_order_boolean(self): data = {'experiment_id': 'experiment_1', 'train_file': 'data/rsmtool_smTrain.csv', 'test_file': 'data/rsmtool_smEval.csv', 'description': 'Test', 'model': 'NNLR', 'predict_expected_scores': 'false'} configuration = Configuration(data) eq_(configuration['predict_expected_scores'], False) def test_process_validate_correct_order_list(self): data = {'summary_id': 'summary', 'experiment_dirs': 'home/dir1, home/dir2, home/dir3', 'experiment_names': 'exp1, exp2, exp3'} # Add data to `ConfigurationParser` object configuration = Configuration(data, context='rsmsummarize') assert_array_equal(configuration['experiment_dirs'], ['home/dir1', 'home/dir2', 'home/dir3']) assert_array_equal(configuration['experiment_names'], ['exp1', 'exp2', 'exp3']) class TestConfiguration: def test_init_default_values(self): config_dict = {"experiment_id": 'my_experiment', "train_file": 'path/to/train.tsv', "test_file": 'path/to/test.tsv', "model": 'LinearRegression'} config = Configuration(config_dict) for key in config_dict: if key == 'experiment_id': continue eq_(config._config[key], config_dict[key]) eq_(config._config['experiment_id'], config_dict['experiment_id']) eq_(config.configdir, abspath(getcwd())) def test_init_with_configdir_only_as_kword_argument(self): configdir = 'some/path' config_dict = {'experiment_id': 'my_experiment', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', "model": 'LinearRegression'} config = Configuration(config_dict, configdir=configdir) eq_(config._configdir, Path(configdir).resolve()) @raises(TypeError) def test_init_wrong_input_type(self): config_input = [('experiment_id', "XXX"), ('train_file', 'path/to/train.tsv')] config = Configuration(config_input) def check_logging_output(self, expected, function, *args, **kwargs): # check if the `expected` text is in the actual logging output root_logger = logging.getLogger() with StringIO() as string_io: # add a stream handler handler = logging.StreamHandler(string_io) root_logger.addHandler(handler) result = function(*args, **kwargs) logging_text = string_io.getvalue() try: assert expected in logging_text except AssertionError: # remove the stream handler and raise error root_logger.handlers = [] raise AssertionError('`{}` not in logging output: ' '`{}`.'.format(expected, logging_text)) # remove the stream handler, even if we have no errors root_logger.handlers = [] return result def test_pop_value(self): dictionary = {'experiment_id': '001', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', "model": 'LinearRegression'} config = Configuration(dictionary) value = config.pop("experiment_id") eq_(value, '001') def test_pop_value_default(self): dictionary = {'experiment_id': '001', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', "model": 'LinearRegression'} config = Configuration(dictionary) value = config.pop("foo", "bar") eq_(value, 'bar') def test_copy(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": [1, 2, 3], "model": 'LinearRegression'}) config_copy = config.copy() assert_not_equal(id(config), id(config_copy)) for key in config.keys(): # check to make sure this is a deep copy if key == "flag_column": assert_not_equal(id(config[key]), id(config_copy[key])) assert_equal(config[key], config_copy[key]) def test_copy_not_deep(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": [1, 2, 3], "model": 'LinearRegression'}) config_copy = config.copy(deep=False) assert_not_equal(id(config), id(config_copy)) for key in config.keys(): # check to make sure this is a shallow copy if key == "flag_column": assert_equal(id(config[key]), id(config_copy[key])) assert_equal(config[key], config_copy[key]) def test_check_flag_column(self): input_dict = {"advisory flag": ['0']} config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": input_dict, "model": 'LinearRegression'}) output_dict = config.check_flag_column() eq_(input_dict, output_dict) def test_check_flag_column_flag_column_test(self): input_dict = {"advisory flag": ['0']} config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column_test": input_dict, "flag_column": input_dict, "model": 'LinearRegression'}) output_dict = config.check_flag_column("flag_column_test") eq_(input_dict, output_dict) def test_check_flag_column_keep_numeric(self): input_dict = {"advisory flag": [1, 2, 3]} config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": input_dict, "model": 'LinearRegression'}) output_dict = config.check_flag_column() eq_(output_dict, {"advisory flag": [1, 2, 3]}) def test_check_flag_column_no_values(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": None, "model": 'LinearRegression'}) flag_dict = config.check_flag_column() eq_(flag_dict, {}) def test_check_flag_column_convert_to_list(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": "0"}, "model": 'LinearRegression'}) flag_dict = config.check_flag_column() eq_(flag_dict, {"advisories": ['0']}) def test_check_flag_column_convert_to_list_test(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": "0"}, "model": 'LinearRegression'}) flag_dict = self.check_logging_output('evaluating', config.check_flag_column, partition='test') eq_(flag_dict, {"advisories": ['0']}) def test_check_flag_column_convert_to_list_train(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": "0"}, "model": 'LinearRegression'}) flag_dict = self.check_logging_output('training', config.check_flag_column, partition='train') eq_(flag_dict, {"advisories": ['0']}) def test_check_flag_column_convert_to_list_both(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": "0"}, "model": 'LinearRegression'}) flag_dict = self.check_logging_output('training and evaluating', config.check_flag_column, partition='both') eq_(flag_dict, {"advisories": ['0']}) def test_check_flag_column_convert_to_list_unknown(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": "0"}, "model": 'LinearRegression'}) flag_dict = self.check_logging_output('training and/or evaluating', config.check_flag_column, partition='unknown') eq_(flag_dict, {"advisories": ['0']}) @raises(AssertionError) def test_check_flag_column_convert_to_list_test_error(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": "0"}, "model": 'LinearRegression'}) self.check_logging_output('training', config.check_flag_column, partition='test') def test_check_flag_column_convert_to_list_keep_numeric(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": 123}, "model": 'LinearRegression'}) flag_dict = config.check_flag_column() eq_(flag_dict, {"advisories": [123]}) def test_contains_key(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": 123}, "model": 'LinearRegression'}) ok_('flag_column' in config, msg="Test 'flag_column' in config.") def test_does_not_contain_nested_key(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": 123}, "model": 'LinearRegression'}) eq_('advisories' in config, False) def test_get_item(self): expected_item = {"advisories": 123} config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": expected_item, "model": 'LinearRegression'}) item = config['flag_column'] eq_(item, expected_item) def test_set_item(self): expected_item = ["45", 34] config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": {"advisories": 123}, "model": 'LinearRegression'}) config['other_column'] = expected_item eq_(config['other_column'], expected_item) @raises(ValueError) def test_check_flag_column_wrong_format(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": "[advisories]", "model": 'LinearRegression'}) config.check_flag_column() @raises(ValueError) def test_check_flag_column_wrong_partition(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column_test": {"advisories": 123}, "model": 'LinearRegression'}) config.check_flag_column(partition='eval') @raises(ValueError) def test_check_flag_column_mismatched_partition(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column_test": {"advisories": 123}, "model": 'LinearRegression'}) config.check_flag_column(flag_column='flag_column_test', partition='train') @raises(ValueError) def test_check_flag_column_mismatched_partition_both(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column_test": {"advisories": 123}, "model": 'LinearRegression'}) config.check_flag_column(flag_column='flag_column_test', partition='both') def test_str_correct(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "flag_column": "[advisories]", "model": 'LinearRegression'}) eq_(config['flag_column'], '[advisories]') def test_get_configdir(self): configdir = '/path/to/dir/' config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "[advisories]", "model": 'LinearRegression'}, configdir=configdir) eq_(config.configdir, abspath(configdir)) def test_set_configdir(self): configdir = '/path/to/dir/' new_configdir = 'path/that/is/new/' config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "[advisories]", "model": 'LinearRegression'}, configdir=configdir) config.configdir = new_configdir eq_(config.configdir, abspath(new_configdir)) @raises(ValueError) def test_set_configdir_to_none(self): configdir = '/path/to/dir/' config = Configuration({"flag_column": "[advisories]"}, configdir=configdir) config.configdir = None def test_get_context(self): context = 'rsmtool' config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "[advisories]", "model": 'LinearRegression'}, context=context) eq_(config.context, context) def test_set_context(self): context = 'rsmtool' new_context = 'rsmcompare' config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "[advisories]", "model": 'LinearRegression'}, context=context) config.context = new_context eq_(config.context, new_context) def test_get(self): config = Configuration({"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "[advisories]", "model": 'LinearRegression'}) eq_(config.get('flag_column'), "[advisories]") eq_(config.get('fasdfasfasdfa', 'hi'), 'hi') def test_to_dict(self): configdict = {"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "abc", "model": 'LinearRegression'} config = Configuration(configdict) for key in configdict: eq_(config[key], configdict[key]) def test_keys(self): configdict = {"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "abc", "model": 'LinearRegression'} config = Configuration(configdict) given_keys = configdict.keys() computed_keys = config.keys() assert all([given_key in computed_keys for given_key in given_keys]) def test_values(self): configdict = {"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "abc", "model": 'LinearRegression'} config = Configuration(configdict) given_values = configdict.values() computed_values = config.values() assert all([given_value in computed_values for given_value in given_values]) def test_items(self): configdict = {"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "trim_min": 1, "trim_max": 6, "flag_column": "abc", "model": 'LinearRegression'} config = Configuration(configdict) given_items = configdict.items() computed_items = config.items() assert all([given_item in computed_items for given_item in given_items]) def test_save(self): dictionary = {'experiment_id': '001', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', "flag_column": "abc", "model": 'LinearRegression'} config = Configuration(dictionary) config.save() with open('output/001_rsmtool.json', 'r') as buff: config_new = json.loads(buff.read()) rmtree('output') for key in dictionary: eq_(config_new[key], dictionary[key]) def test_save_rsmcompare(self): dictionary = {"comparison_id": '001', "experiment_id_old": 'foo', "experiment_dir_old": 'foo', "experiment_id_new": 'bar', "experiment_dir_new": 'bar', "description_old": "foo", "description_new": "bar"} config = Configuration(dictionary, context='rsmcompare') config.save() out_path = 'output/001_rsmcompare.json' with open(out_path) as buff: config_new = json.loads(buff.read()) rmtree('output') for key in dictionary: eq_(config_new[key], dictionary[key]) def test_save_rsmsummarize(self): dictionary = {"summary_id": '001', 'experiment_dirs': ['a', 'b', 'c']} config = Configuration(dictionary, context='rsmsummarize') config.save() out_path = 'output/001_rsmsummarize.json' with open(out_path) as buff: config_new = json.loads(buff.read()) rmtree('output') for key in dictionary: eq_(config_new[key], dictionary[key]) def test_check_exclude_listwise_true(self): dictionary = {"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "min_items_per_candidate": 4, "candidate_column": "candidate", "model": 'LinearRegression'} config = Configuration(dictionary) exclude_list_wise = config.check_exclude_listwise() eq_(exclude_list_wise, True) def test_check_exclude_listwise_false(self): dictionary = {"experiment_id": '001', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "model": 'LinearRegression'} config = Configuration(dictionary) exclude_list_wise = config.check_exclude_listwise() eq_(exclude_list_wise, False) def test_get_trim_min_max_tolerance_none(self): dictionary = {'experiment_id': '001', 'id_column': 'A', 'candidate_column': 'B', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', 'features': 'path/to/features.csv', "model": 'LinearRegression', 'subgroups': ['C']} config = Configuration(dictionary) trim_min_max_tolerance = config.get_trim_min_max_tolerance() eq_(trim_min_max_tolerance, (None, None, 0.4998)) def test_get_trim_min_max_no_tolerance(self): dictionary = {"experiment_id": '001', "trim_min": 1, "trim_max": 6, "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "model": 'LinearRegression'} config = Configuration(dictionary) trim_min_max_tolerance = config.get_trim_min_max_tolerance() eq_(trim_min_max_tolerance, (1.0, 6.0, 0.4998)) def test_get_trim_min_max_values_tolerance(self): dictionary = {"experiment_id": '001', "trim_min": 1, "trim_max": 6, "trim_tolerance": 0.51, "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "model": 'LinearRegression'} config = Configuration(dictionary) trim_min_max_tolerance = config.get_trim_min_max_tolerance() eq_(trim_min_max_tolerance, (1.0, 6.0, 0.51)) def test_get_trim_tolerance_no_min_max(self): dictionary = {"experiment_id": '001', "trim_tolerance": 0.49, "train_file": "/foo/train.csv", "test_file": "/foo/test.csv", "model": 'LinearRegression'} config = Configuration(dictionary) trim_min_max_tolerance = config.get_trim_min_max_tolerance() eq_(trim_min_max_tolerance, (None, None, 0.49)) def test_get_rater_error_variance(self): dictionary = {"experiment_id": 'abs', "rater_error_variance": "2.2525", "model": 'LinearRegression', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv"} config = Configuration(dictionary) rater_error_variance = config.get_rater_error_variance() eq_(rater_error_variance, 2.2525) def test_get_rater_error_variance_none(self): dictionary = {"experiment_id": 'abs', "model": 'LinearRegression', "train_file": "/foo/train.csv", "test_file": "/foo/test.csv"} config = Configuration(dictionary) rater_error_variance = config.get_rater_error_variance() eq_(rater_error_variance, None) def test_get_names_and_paths_with_feature_file(self): filepaths = ['path/to/train.tsv', 'path/to/test.tsv', 'path/to/features.csv'] filenames = ['train', 'test', 'feature_specs'] expected = (filenames, filepaths) dictionary = {'experiment_id': '001', 'id_column': 'A', 'candidate_column': 'B', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', 'features': 'path/to/features.csv', "model": 'LinearRegression', 'subgroups': ['C']} config = Configuration(dictionary) values_for_reader = config.get_names_and_paths(['train_file', 'test_file', 'features'], ['train', 'test', 'feature_specs']) eq_(values_for_reader, expected) def test_get_names_and_paths_with_feature_subset(self): filepaths = ['path/to/train.tsv', 'path/to/test.tsv', 'path/to/feature_subset.csv'] filenames = ['train', 'test', 'feature_subset_specs'] expected = (filenames, filepaths) dictionary = {'experiment_id': '001', 'id_column': 'A', 'candidate_column': 'B', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', 'feature_subset_file': 'path/to/feature_subset.csv', 'model': 'LinearRegression', 'subgroups': ['C']} config = Configuration(dictionary) values_for_reader = config.get_names_and_paths(['train_file', 'test_file', 'feature_subset_file'], ['train', 'test', 'feature_subset_specs']) eq_(values_for_reader, expected) def test_get_names_and_paths_with_feature_list(self): filepaths = ['path/to/train.tsv', 'path/to/test.tsv'] filenames = ['train', 'test'] expected = (filenames, filepaths) dictionary = {'experiment_id': '001', 'id_column': 'A', 'candidate_column': 'B', 'train_file': 'path/to/train.tsv', 'test_file': 'path/to/test.tsv', 'features': ['FEATURE1', 'FEATURE2'], 'model': 'LinearRegression', 'subgroups': ['C']} config = Configuration(dictionary) values_for_reader = config.get_names_and_paths(['train_file', 'test_file', 'features'], ['train', 'test', 'feature_specs']) eq_(values_for_reader, expected) class TestJSONFeatureConversion: def test_json_feature_conversion(self): json_feature_file = join(_MY_DIR, 'data', 'experiments', 'lr-feature-json', 'features.json') expected_feature_csv = join(_MY_DIR, 'data', 'experiments', 'lr', 'features.csv') # convert the feature json file and write to a temporary location tempf = tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) convert_feature_json_file(json_feature_file, tempf.name, delete=False) # read the expected and converted files into data frames df_expected = pd.read_csv(expected_feature_csv) df_converted = pd.read_csv(tempf.name) tempf.close() # get rid of the file now that have read it into memory os.unlink(tempf.name) assert_frame_equal(df_expected.sort_index(axis=1), df_converted.sort_index(axis=1)) @raises(RuntimeError) def test_json_feature_conversion_bad_json(self): json_feature_file = join(_MY_DIR, 'data', 'experiments', 'lr-feature-json', 'lr.json') # convert the feature json file and write to a temporary location tempf = tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) convert_feature_json_file(json_feature_file, tempf.name, delete=False) @raises(RuntimeError) def test_json_feature_conversion_bad_output_file(self): json_feature_file = join(_MY_DIR, 'data', 'experiments', 'lr-feature-json', 'features.json') # convert the feature json file and write to a temporary location tempf = tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False) convert_feature_json_file(json_feature_file, tempf.name, delete=False)
42.086133
94
0.532418
4,604
48,862
5.31364
0.076672
0.051014
0.073578
0.094179
0.797621
0.765206
0.72666
0.715541
0.678589
0.667144
0
0.013375
0.351234
48,862
1,160
95
42.122414
0.75836
0.014285
0
0.675936
0
0
0.258245
0.048766
0
0
0
0
0.04492
1
0.099465
false
0.00107
0.017112
0
0.120856
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
12ab561aa111c0466c23fb5ab67c5935ddf0650b
480
py
Python
thelper/data/geo/__init__.py
sfoucher/thelper
235406f3166f03ba6eb77f4a7289188aebc9b2c4
[ "Apache-2.0" ]
17
2018-12-10T19:43:20.000Z
2021-08-17T03:06:59.000Z
thelper/data/geo/__init__.py
sfoucher/thelper
235406f3166f03ba6eb77f4a7289188aebc9b2c4
[ "Apache-2.0" ]
16
2019-07-31T20:13:26.000Z
2020-12-14T15:48:30.000Z
thelper/data/geo/__init__.py
sfoucher/thelper
235406f3166f03ba6eb77f4a7289188aebc9b2c4
[ "Apache-2.0" ]
10
2019-06-17T18:38:05.000Z
2020-09-29T16:04:00.000Z
"""Geospatial dataset parsing/loading package. This package contains classes and functions whose role is to fetch the data required to train, validate, and test a model on geospatial data. Importing the modules inside this package requires GDAL. """ import logging import thelper.data.geo.gdl # noqa: F401 import thelper.data.geo.ogc # noqa: F401 import thelper.data.geo.parsers # noqa: F401 import thelper.data.geo.utils # noqa: F401 logger = logging.getLogger(__name__)
32
104
0.779167
71
480
5.211268
0.591549
0.140541
0.183784
0.216216
0.227027
0.227027
0
0
0
0
0
0.029268
0.145833
480
14
105
34.285714
0.873171
0.6
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
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
12c28d741c50d1ea1874c2abd35ab50de4fa79f1
86
py
Python
gui/sum_v1/apps.py
time-crunched/nlp-toolbox
b732abd0b2c6b265971efe04a4d70ebe20d2ee8f
[ "MIT" ]
null
null
null
gui/sum_v1/apps.py
time-crunched/nlp-toolbox
b732abd0b2c6b265971efe04a4d70ebe20d2ee8f
[ "MIT" ]
3
2020-06-05T18:58:57.000Z
2021-06-10T20:50:13.000Z
gui/sum_v1/apps.py
time-crunched/nlp-toolbox
b732abd0b2c6b265971efe04a4d70ebe20d2ee8f
[ "MIT" ]
1
2019-12-01T16:56:41.000Z
2019-12-01T16:56:41.000Z
from django.apps import AppConfig class SumV1Config(AppConfig): name = 'sum_v1'
14.333333
33
0.744186
11
86
5.727273
0.909091
0
0
0
0
0
0
0
0
0
0
0.028169
0.174419
86
5
34
17.2
0.859155
0
0
0
0
0
0.069767
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
12ffa8349e8f8acb26be1f1f73cd8f450b117ed0
1,167
py
Python
maad/__init__.py
scikit-maad/scikit-maad
2052c6f5ffc2a973fa1676364cc1663d7da1715a
[ "BSD-3-Clause" ]
31
2019-06-27T11:30:09.000Z
2022-03-14T22:07:34.000Z
maad/__init__.py
scikit-maad/scikit-maad
2052c6f5ffc2a973fa1676364cc1663d7da1715a
[ "BSD-3-Clause" ]
9
2019-03-29T20:45:09.000Z
2022-03-18T12:25:53.000Z
maad/__init__.py
scikit-maad/scikit-maad
2052c6f5ffc2a973fa1676364cc1663d7da1715a
[ "BSD-3-Clause" ]
7
2019-07-29T13:26:40.000Z
2022-03-24T00:44:47.000Z
# -*- coding: utf-8 -*- """ Multiresolution Analysis of Acoustic Diversity Scikit (Toolbox for SciPy) scikit-maad is a modular toolbox to analyze ecoacoustics datasets in Python 3. This package was designed to bring flexibility to find regions of interest, and to compute acoustic features in audio recordings. This workflow opens the possibility to use powerfull machine learning algorithms through scikit-learn, allowing to identify key patterns in all kind of soundscapes. Subpackages ----------- acoustics Collection of functions to describe the physics of acoustic waves such as sound pressure level, attenuation laws or propagation - :ref:`maad.acoustics` features Compute descriptors to characterize sounds - :ref:`maad.features` rois Find regions of interest in 1D and 2D signals - :ref:`maad.rois` sound Load, preprocess and transform (e.g. stft) audio signals - :ref:`maad.sound` util Miscelaneous and useful set of tools used in the audio analysis framework - :ref:`maad.util` """ from .version import __version__ from . import spl from . import features from . import rois from . import sound from . import util
32.416667
100
0.755784
163
1,167
5.386503
0.588957
0.039863
0.029613
0.047836
0
0
0
0
0
0
0
0.004171
0.178235
1,167
35
101
33.342857
0.911366
0.877464
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
4206f9ce40b713bf34bd45439c15caa54493aa40
22,319
py
Python
corepy/arch/cal/isa/cal_insts.py
matthiaskramm/corepy
b2aad4e86adca10420e825fb65dcbd031cf44bb1
[ "BSD-3-Clause" ]
8
2016-02-20T03:52:58.000Z
2022-01-24T15:04:14.000Z
corepy/arch/cal/isa/cal_insts.py
matthiaskramm/corepy
b2aad4e86adca10420e825fb65dcbd031cf44bb1
[ "BSD-3-Clause" ]
null
null
null
corepy/arch/cal/isa/cal_insts.py
matthiaskramm/corepy
b2aad4e86adca10420e825fb65dcbd031cf44bb1
[ "BSD-3-Clause" ]
6
2015-12-11T05:21:15.000Z
2020-12-11T10:59:15.000Z
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # - Neither the Indiana University nor the names of its contributors may be used # to endorse or promote products derived from this software without specific # prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from corepy.spre.spe import MachineInstruction from cal_fields import * class OPCD(MachineInstruction): signature = () def _render(params, operands): return OPCD0.render(params['OPCD']) render = staticmethod(_render) class OPCD_RESOURCE_TYPE_UNNORM_FMT_0_0(MachineInstruction): signature = (RESOURCEID, TYPE, FMT) opt_kw = (UNNORM,) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCEID.render(operands['RESOURCEID']) + '_type(' + TYPE.render(operands['TYPE']) + UNNORM.render(operands['UNNORM']) + ')' + FMT.render(operands['FMT']) render = staticmethod(_render) class OPCD_THREADS_LDS_MEMORY_SR_0_0(MachineInstruction): signature = () opt_kw = (THREADS, LDS, MEMORY, SR) def _render(params, operands): return OPCD0.render(params['OPCD']) + THREADS.render(operands['THREADS']) + LDS.render(operands['LDS']) + MEMORY.render(operands['MEMORY']) + SR.render(operands['SR']) render = staticmethod(_render) class OPCD_STAGE_TYPE_COORDMODE_0_0(MachineInstruction): signature = (STAGE, TYPE, COORDMODE) def _render(params, operands): return OPCD0.render(params['OPCD']) + STAGE.render(operands['STAGE']) + '_type(' + TYPE.render(operands['TYPE']) + ')' + COORDMODE.render(operands['COORDMODE']) render = staticmethod(_render) class OPCD_0_0_TOPOLOGY(MachineInstruction): signature = (TOPOLOGY) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + TOPOLOGY.render(operands['TOPOLOGY']) render = staticmethod(_render) class OPCD_0_0_OUTPUTTOPOLOGY(MachineInstruction): signature = (OUTPUTTOPOLOGY) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + OUTPUTTOPOLOGY.render(operands['OUTPUTTOPOLOGY']) render = staticmethod(_render) class OPCD_0_0_IL(MachineInstruction): signature = (IL0) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + IL0.render(operands['IL0']) render = staticmethod(_render) class OPCD_0_0_LBL(MachineInstruction): signature = (LBL,) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + LBL.render(operands['LBL']) render = staticmethod(_render) class OPCD_0_0(MachineInstruction): signature = () def _render(params, operands): return OPCD0.render(params['OPCD']) render = staticmethod(_render) class OPCD_XYZWImport_CENTER_BIAS_INVERT_CENTERED_0_1(MachineInstruction): signature = (XYZWImport,TRGT) opt_kw = (CENTER,BIAS,INVERT,CENTERED) def _render(params, operands): return OPCD0.render(params['OPCD']) + XYZWImport.render(operands['XYZWImport']) + CENTER.render(operands['CENTER']) + BIAS.render(operands['BIAS']) + INVERT.render(operands['INVERT']) + CENTERED.render(operands['CENTERED']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_USAGE_USAGEINDEX_XYZWImport_0_1(MachineInstruction): """ Instructions: (1) dclvout """ signature = (USAGE, USAGEINDEX, XYZWImport, TRGT) def _render(params, operands): return OPCD0.render(params['OPCD']) + USAGE.render(operands['USAGE']) + USAGEINDEX.render(operands['USAGEINDEX']) + XYZWImport.render(operands['XYZWImport']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_USAGE_XYZWImport_CENTROID_0_1(MachineInstruction): """ Instructions: (1) dclpin """ signature = (USAGE, XYZWImport, TRGT) opt_kw = (CENTROID, ORIGIN) def _render(params, operands): return OPCD0.render(params['OPCD']) + USAGE.render(operands['USAGE']) + XYZWImport.render(operands['XYZWImport']) + CENTROID.render(operands['CENTROID']) + ORIGIN.render(operands['ORIGIN']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_USAGE_INTERP_0_1(MachineInstruction): signature = (TRGT,) opt_kw = (USAGE, INTERP) def _render(params, operands): return OPCD0.render(params['OPCD']) + USAGE.render(operands['USAGE']) + INTERP.render(operands['INTERP']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_VELEM_XYZWImport_0_1(MachineInstruction): """ Instructions: (1) dclv """ signature = (VELEM, XYZWImport, TRGT) def _render(params, operands): return OPCD0.render(params['OPCD']) + VELEM.render(operands['VELEM']) + XYZWImport.render(operands['XYZWImport']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_PARAM_0_1(MachineInstruction): """ Instructions: (1) dclpp """ signature = (PARAM, TRGT) def _render(params, operands): return OPCD0.render(params['OPCD']) + PARAM.render(operands['PARAM']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_USAGE_0_1(MachineInstruction): """ Instructions: (1) dcl_output """ signature = (TRGT,) opt_kw = (USAGE,) def _render(params, operands): return OPCD0.render(params['OPCD']) + USAGE.render(operands['USAGE']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_XYZWDefault_0_1(MachineInstruction): """ Instructions: (1) dcldef """ signature = (XYZWDefault, TRGT) def _render(params, operands): return OPCD0.render(params['OPCD']) + XYZWDefault.render(operands['XYZWDefault']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_0_1_L4(MachineInstruction): """ Instructions: (1) def_ """ signature = (TRGT, L0, L1, L2, L3) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + L0.render(operands['L0']) + ', ' + L1.render(operands['L1']) + ', ' + L2.render(operands['L2']) + ', ' + L3.render(operands['L3']) render = staticmethod(_render) class OPCD_LOGICOP_1_0(MachineInstruction): signature = (LOGICOP, TRGT) def _render(params, operands): return OPCD0.render(params['OPCD']) + LOGICOP.render(operands['LOGICOP']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_1_0_REPEAT(MachineInstruction): signature = (TRGT,) opt_kw = (REPEAT,) def _render(params, operands): return OPCD0.render(params['OPCD']) + REPEAT.render(operands['REPEAT']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_STAGE_SAMPLE_1_0(MachineInstruction): signature = (TRGT,) opt_kw = (STAGE, SAMPLE) def _render(params, operands): return OPCD0.render(params['OPCD']) + STAGE.render(operands['STAGE']) + SAMPLE.render(operands['SAMPLE']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_1_0_L4(MachineInstruction): signature = (SRC0, L0, L1, L2, L3) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + SRC0.render(operands['SRC0']) + ', ' + L0.render(operands['L0']) + ', ' + L1.render(operands['L1']) + ', ' + L2.render(operands['L2']) + ', ' + L3.render(operands['L3']) render = staticmethod(_render) class OPCD_0_1_BOOL(MachineInstruction): signature = (TRGT, BOOL) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + BOOL.render(operands['BOOL']) render = staticmethod(_render) class OPCD_1_0(MachineInstruction): signature = (TRGT,) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + TRGT.render(operands['TRGT']) render = staticmethod(_render) class OPCD_1_0_LBL(MachineInstruction): signature = (SRC0, LBL) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + SRC0.render(operands['SRC0']) + ', ' + LBL.render(operands['LBL']) render = staticmethod(_render) class OPCD_ZEROOP_1_1(MachineInstruction): """ Instructions: (6) ln, log, logp, nrm, rcp, rsq """ signature = (TRGT, SRC0) opt_kw = (ZEROOP, SHIFT, SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + ZEROOP.render(operands['ZEROOP']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_RESOURCE_SAMPLER_AOFFIMMI_1_1(MachineInstruction): signature = (RESOURCE, SAMPLER, TRGT, SRC0) opt_kw = (AOFFIMMI,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + SAMPLER.render(operands['SAMPLER']) + AOFFIMMI.render(operands['AOFFIMMI']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_RESOURCE_AOFFIMMI_1_1(MachineInstruction): signature = (RESOURCE, TRGT, SRC0) opt_kw = (AOFFIMMI,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + AOFFIMMI.render(operands['AOFFIMMI']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_RESOURCE_UINT_1_1(MachineInstruction): signature = (RESOURCE, TRGT, SRC0) opt_kw = (UINT,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + UINT.render(operands['UINT']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_NEIGHBOREXCH_SHARINGMODE_1_1(MachineInstruction): """ Instructions: (1) lds_read_vec """ signature = (TRGT, SRC0) opt_kw = (NEIGHBOREXCH, SHARINGMODE, SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + NEIGHBOREXCH.render(operands['NEIGHBOREXCH']) + SHARINGMODE.render(operands['SHARINGMODE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_LOFFSET_SHARINGMODE_1_1(MachineInstruction): """ Instructions: (1) lds_write_vec """ signature = (TRGT, SRC0) opt_kw = (LOFFSET, SHARINGMODE, SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + LOFFSET.render(operands['LOFFSET']) + SHARINGMODE.render(operands['SHARINGMODE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_STAGE_1_1(MachineInstruction): """ Instructions: (2) lod, texweight """ signature = (STAGE, TRGT, SRC0) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + STAGE.render(operands['STAGE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_ELEM_1_1(MachineInstruction): """ Instructions: (1) memimport """ signature = (ELEM, TRGT, SRC0) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + ELEM.render(operands['ELEM']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_NOISETYPE_1_1(MachineInstruction): """ Instructions: (1) noise """ signature = (NOISETYPE, TRGT, SRC0) opt_kw = (SHIFT, SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + NOISETYPE.render(operands['NOISETYPE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_CENTROID_1_1(MachineInstruction): """ Instructions: (2) dsx, dsy """ signature = (TRGT, SRC0) opt_kw = (CENTROID, SHIFT, SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + CENTROID.render(operands['CENTROID']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_ROUND_1_1(MachineInstruction): """ Instructions: (1) mova """ signature = (TRGT, SRC0) opt_kw = (ROUND, SHIFT, SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + ROUND.render(operands['ROUND']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_1_1(MachineInstruction): signature = (TRGT, SRC0) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) render = staticmethod(_render) class OPCD_STREAM_OFFSET_2_0(MachineInstruction): signature = (STREAM, OFFSET, SRC0, SRC1) def _render(params, operands): return OPCD0.render(params['OPCD']) + STREAM.render(operands['STREAM']) + OFFSET.render(operands['OFFSET']) + ' ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_2_0(MachineInstruction): """ Instructions: (1) dclarray """ signature = (SRC0, SRC1) def _render(params, operands): return OPCD0.render(params['OPCD']) + ' ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_RELOP_2_0(MachineInstruction): signature = (RELOP, SRC0, SRC1) def _render(params, operands): return OPCD0.render(params['OPCD']) + RELOP.render(operands['RELOP']) + ' ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_IEEE_2_1(MachineInstruction): signature = (TRGT, SRC0, SRC1) opt_kw = (IEEE,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + IEEE.render(operands['IEEE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_NORMALIZE_2_1(MachineInstruction): signature = (TRGT, SRC0, SRC1) opt_kw = (NORMALIZE,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + NORMALIZE.render(operands['NORMALIZE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_RELOP_2_1(MachineInstruction): signature = (RELOP, TRGT, SRC0, SRC1) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RELOP.render(operands['RELOP']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_ZEROOP_2_1(MachineInstruction): signature = (TRGT, SRC0, SRC1) opt_kw = (ZEROOP, SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + ZEROOP.render(operands['ZEROOP']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_RESOURCE_SAMPLER_AOFFIMMI_2_1(MachineInstruction): signature = (RESOURCE, SAMPLER, TRGT, SRC0, SRC1) opt_kw = (AOFFIMMI,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + SAMPLER.render(operands['SAMPLER']) + AOFFIMMI.render(operands['AOFFIMMI']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_RESOURCE_SAMPLER_2_1(MachineInstruction): signature = (RESOURCE, SAMPLER, TRGT, SRC0, SRC1) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + SAMPLER.render(operands['SAMPLER']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_MATRIX_2_1(MachineInstruction): signature = (MATRIX, TRGT, SRC0, SRC1) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + MATRIX.render(operands['MATRIX']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_2_1(MachineInstruction): signature = (TRGT, SRC0, SRC1) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) render = staticmethod(_render) class OPCD_RELOP_CMPVAL_3_1(MachineInstruction): signature = (RELOP, CMPVAL, TRGT, SRC0, SRC1, SRC2) opt_kw = (SHIFT, SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RELOP.render(operands['RELOP']) + CMPVAL.render(operands['CMPVAL']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) + ', ' + SRC2.render(operands['SRC2']) render = staticmethod(_render) class OPCD_IEEE_3_1(MachineInstruction): signature = (TRGT, SRC0, SRC1, SRC2) opt_kw = (IEEE,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + IEEE.render(operands['IEEE']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) + ', ' + SRC2.render(operands['SRC2']) render = staticmethod(_render) class OPCD_RESOURCE_SAMPLER_AOFFIMMI_3_1(MachineInstruction): signature = (RESOURCE, SAMPLER, TRGT, SRC0, SRC1, SRC2) opt_kw = (AOFFIMMI,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + SAMPLER.render(operands['SAMPLER']) + AOFFIMMI.render(operands['AOFFIMMI']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) + ', ' + SRC2.render(operands['SRC2']) render = staticmethod(_render) class OPCD_3_1(MachineInstruction): signature = (TRGT, SRC0, SRC1, SRC2) opt_kw = (SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) + ', ' + SRC2.render(operands['SRC2']) render = staticmethod(_render) class OPCD_RESOURCE_SAMPLER_AOFFIMMI_4_1(MachineInstruction): signature = (RESOURCE, SAMPLER, TRGT, SRC0, SRC1, SRC2, SRC3) opt_kw = (AOFFIMMI,SHIFT,SAT) def _render(params, operands): return OPCD0.render(params['OPCD']) + RESOURCE.render(operands['RESOURCE']) + SAMPLER.render(operands['SAMPLER']) + AOFFIMMI.render(operands['AOFFIMMI']) + SHIFT.render(operands['SHIFT']) + SAT.render(operands['SAT']) + ' ' + TRGT.render(operands['TRGT']) + ', ' + SRC0.render(operands['SRC0']) + ', ' + SRC1.render(operands['SRC1']) + ', ' + SRC2.render(operands['SRC2']) + ', ' + SRC3.render(operands['SRC3']) render = staticmethod(_render)
46.113636
415
0.67624
2,533
22,319
5.827477
0.09317
0.216246
0.053858
0.082582
0.751101
0.704763
0.689723
0.66818
0.666622
0.596369
0
0.019425
0.155787
22,319
483
416
46.20911
0.763985
0.115149
0
0.503333
0
0
0.076577
0
0
0
0
0
0
1
0.176667
false
0
0.046667
0.176667
1.04
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
42132dd04003bb22de4bd9ecbf0918f1e3e1596d
147
py
Python
booleanlist.py
terrykim1211/WechatBOT
69d156e90f53c315693ffb114c84f493685261e9
[ "MIT" ]
null
null
null
booleanlist.py
terrykim1211/WechatBOT
69d156e90f53c315693ffb114c84f493685261e9
[ "MIT" ]
null
null
null
booleanlist.py
terrykim1211/WechatBOT
69d156e90f53c315693ffb114c84f493685261e9
[ "MIT" ]
null
null
null
check = 'Coderbunker whatever' bool(check.find('Coderbunker')) print(bool(check)) if check == 'Coderbunker whatever': print('what')
16.333333
36
0.659864
16
147
6.0625
0.5
0.329897
0.494845
0
0
0
0
0
0
0
0
0
0.183673
147
8
37
18.375
0.808333
0
0
0
0
0
0.40146
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4252f541775784f36a2dce821a603b5ba98032e7
128
py
Python
HackerEarth/Alternate_Elements.py
sawantaditi24/Competitive-Programming
36e024215d8041c92c5ec78a22561aaa0025f8d2
[ "MIT" ]
2
2019-08-27T21:48:55.000Z
2020-04-20T05:56:56.000Z
HackerEarth/Alternate_Elements.py
gauravsingh58/competitive-programming
fa5548f435cdf2aa059e1d6ab733885790c6a592
[ "MIT" ]
1
2020-10-10T16:14:54.000Z
2020-10-10T16:14:54.000Z
HackerEarth/Alternate_Elements.py
gauravsingh58/competitive-programming
fa5548f435cdf2aa059e1d6ab733885790c6a592
[ "MIT" ]
2
2020-10-21T17:12:05.000Z
2020-10-27T09:34:57.000Z
arr = list(map(int, input().split())) print(arr[0] + arr[2] + arr[4] + arr[6] + arr[8]) print(arr[1] + arr[3] + arr[5] + arr[7])
42.666667
49
0.539063
26
128
2.653846
0.615385
0.231884
0
0
0
0
0
0
0
0
0
0.082569
0.148438
128
3
50
42.666667
0.550459
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
42822f51de769f56bbcbf02da608d47ebdc0127f
842
py
Python
App/models.py
patricialiang/TPP
8d364c88c3c0b5d98c0a910c77cb306cfa2840aa
[ "Apache-2.0" ]
null
null
null
App/models.py
patricialiang/TPP
8d364c88c3c0b5d98c0a910c77cb306cfa2840aa
[ "Apache-2.0" ]
null
null
null
App/models.py
patricialiang/TPP
8d364c88c3c0b5d98c0a910c77cb306cfa2840aa
[ "Apache-2.0" ]
null
null
null
from App.ext import db from App.model_utils import BaseModel class Letter(db.Model): id = db.Column(db.Integer,primary_key=True,autoincrement=True) letter = db.Column(db.String(2)) class City(db.Model): id = db.Column(db.Integer,primary_key=True,autoincrement=True) regionName = db.Column(db.String(16)) pinyin = db.Column(db.String(16)) cityCode = db.Column(db.String(16)) letter = db.Column(db.String(2)) class UserModel(BaseModel,db.Model): id = db.Column(db.Integer,primary_key=True,autoincrement=True) u_name = db.Column(db.String,unique=True) u_password = db.Column(db.String(256)) u_email = db.Column(db.String(64),unique=True) is_active = db.Column(db.Boolean,default=False) u_token = db.Column(db.String(256)) u_permission = db.Column(db.Integer,default=1)
21.05
66
0.699525
131
842
4.419847
0.305344
0.193437
0.241796
0.248705
0.554404
0.46114
0.392055
0.295337
0.295337
0.295337
0
0.023944
0.15677
842
39
67
21.589744
0.791549
0
0
0.263158
0
0
0
0
0
0
0
0
0
1
0
false
0.052632
0.105263
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
1
0
0
1
0
0
4
42891c3ac7381b4b5599d64afb5087b8fb94b11b
190
py
Python
examples/example2_2.py
hcseob/py_spectre
b5757b60eb799003af1d6165ffc9aafab909a322
[ "MIT" ]
3
2016-05-23T17:48:39.000Z
2021-01-06T16:56:44.000Z
examples/example2_2.py
hcseob/py_spectre
b5757b60eb799003af1d6165ffc9aafab909a322
[ "MIT" ]
null
null
null
examples/example2_2.py
hcseob/py_spectre
b5757b60eb799003af1d6165ffc9aafab909a322
[ "MIT" ]
1
2016-05-27T21:10:01.000Z
2016-05-27T21:10:01.000Z
from py_spectre import * pss = PySpectreScript('example.scs') pss.remove('R1') print pss.search('R*') line_num = 5 ns = 'R1 VO 0 resistor r=3k' pss.add(ns, line_num) print pss.search('R*')
21.111111
36
0.694737
34
190
3.794118
0.647059
0.124031
0.217054
0.232558
0
0
0
0
0
0
0
0.030303
0.131579
190
8
37
23.75
0.751515
0
0
0.25
0
0
0.2
0
0
0
0
0
0
0
null
null
0
0.125
null
null
0.25
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
1
0
0
0
0
0
0
0
0
4
429395748b12443ea001e39b6a38a4e706a86aa6
130
py
Python
foodmap/apps.py
tonnpa/begin-here
a455f81f7ed9524ce7eb34867c6f7ce54ba6c4ec
[ "MIT" ]
null
null
null
foodmap/apps.py
tonnpa/begin-here
a455f81f7ed9524ce7eb34867c6f7ce54ba6c4ec
[ "MIT" ]
null
null
null
foodmap/apps.py
tonnpa/begin-here
a455f81f7ed9524ce7eb34867c6f7ce54ba6c4ec
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class FoodmapConfig(AppConfig): name = 'foodmap'
16.25
39
0.792308
15
130
6.533333
0.8
0
0
0
0
0
0
0
0
0
0
0
0.153846
130
7
40
18.571429
0.890909
0
0
0
0
0
0.053846
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
42b1326ec46d6486f55bf96aa1a4de9f823def8b
701
py
Python
base.py
LucasSonego/BOT_BadTimeSim
70b5c5c0ad2b4d281dfcbd27c16868ff9e1487ef
[ "MIT" ]
1
2020-03-03T17:49:52.000Z
2020-03-03T17:49:52.000Z
base.py
LucasSonego/BOT_BadTimeSim
70b5c5c0ad2b4d281dfcbd27c16868ff9e1487ef
[ "MIT" ]
null
null
null
base.py
LucasSonego/BOT_BadTimeSim
70b5c5c0ad2b4d281dfcbd27c16868ff9e1487ef
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import pyautogui from pyautogui import * def k_alt_tab(): pyautogui.keyDown('alt') pyautogui.keyDown('tab') pyautogui.keyUp('tab') pyautogui.keyUp('alt') #keys def k_space(delay): pyautogui.keyDown('space') time.sleep(delay) pyautogui.keyUp('space') def k_w(delay): pyautogui.keyDown('w') time.sleep(delay) pyautogui.keyUp('w') def k_a(delay): pyautogui.keyDown('a') time.sleep(delay) pyautogui.keyUp('a') def k_s(delay): pyautogui.keyDown('s') time.sleep(delay) pyautogui.keyUp('s') def k_d(delay): pyautogui.keyDown('d') time.sleep(delay) pyautogui.keyUp('d') # ----
16.690476
30
0.633381
94
701
4.648936
0.265957
0.320366
0.240275
0.263158
0.320366
0
0
0
0
0
0
0.001761
0.189729
701
41
31
17.097561
0.767606
0.072753
0
0.185185
0
0
0.046656
0
0
0
0
0
0
1
0.222222
false
0
0.074074
0
0.296296
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
c430de5c949e4a3d273207be7fadb27de78ff774
238
py
Python
gehomesdk/erd/values/microwave/erd_microwave_available_modes.py
ChevySSinSD/gehome
fddfb00749334441a6b57da14fa48ae11e752c2b
[ "MIT" ]
17
2021-05-18T01:58:06.000Z
2022-03-22T20:49:32.000Z
gehomesdk/erd/values/microwave/erd_microwave_available_modes.py
ChevySSinSD/gehome
fddfb00749334441a6b57da14fa48ae11e752c2b
[ "MIT" ]
29
2021-05-17T21:43:16.000Z
2022-02-28T22:50:48.000Z
gehomesdk/erd/values/microwave/erd_microwave_available_modes.py
ChevySSinSD/gehome
fddfb00749334441a6b57da14fa48ae11e752c2b
[ "MIT" ]
9
2021-05-17T04:40:58.000Z
2022-02-02T17:26:13.000Z
from typing import NamedTuple, Optional class ErdMicrowaveAvailableModes(NamedTuple): is_valid: bool has_warm: bool has_convection_bake: bool has_convection_roast: bool has_broil: bool raw_value: Optional[str]
23.8
45
0.752101
29
238
5.896552
0.655172
0.163743
0.19883
0
0
0
0
0
0
0
0
0
0.197479
238
10
46
23.8
0.895288
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.125
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
c453755de16c506beb50911c19407ca36b62dd21
49
py
Python
ktrain/version.py
rubensmau/ktrain
de32b87b9d3996f35882e7ca18273356c72d342c
[ "Apache-2.0" ]
null
null
null
ktrain/version.py
rubensmau/ktrain
de32b87b9d3996f35882e7ca18273356c72d342c
[ "Apache-2.0" ]
null
null
null
ktrain/version.py
rubensmau/ktrain
de32b87b9d3996f35882e7ca18273356c72d342c
[ "Apache-2.0" ]
null
null
null
__all__ = ['__version__'] __version__ = '0.30.0'
16.333333
25
0.673469
6
49
3.5
0.666667
0
0
0
0
0
0
0
0
0
0
0.093023
0.122449
49
2
26
24.5
0.395349
0
0
0
0
0
0.346939
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c45cd2c3fd06f37dd6e9337b006a8b3a55e2b180
170
py
Python
Django_Assignment/user/models.py
samir321-pixel/Django_Assignment
7049777c8c60a461fbe6b548d8cfae23833c883a
[ "Apache-2.0" ]
2
2021-03-13T18:27:50.000Z
2021-07-19T16:45:58.000Z
Django_Assignment/user/models.py
samir321-pixel/Django_Assignment
7049777c8c60a461fbe6b548d8cfae23833c883a
[ "Apache-2.0" ]
null
null
null
Django_Assignment/user/models.py
samir321-pixel/Django_Assignment
7049777c8c60a461fbe6b548d8cfae23833c883a
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractUser # Create your models here. class User(AbstractUser): Address = models.TextField()
18.888889
51
0.776471
22
170
6
0.681818
0.151515
0
0
0
0
0
0
0
0
0
0
0.147059
170
8
52
21.25
0.910345
0.141176
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
c4698d6a69dbe3df5f58abf7c0c06ec45ad41203
89
py
Python
stimuli/Python/one_file_per_item/jap/1_# math_seq 1.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
6
2020-04-24T08:16:51.000Z
2021-11-01T09:50:46.000Z
stimuli/Python/one_file_per_item/jap/1_# math_seq 1.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
null
null
null
stimuli/Python/one_file_per_item/jap/1_# math_seq 1.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
4
2021-02-17T20:21:31.000Z
2022-02-14T12:43:23.000Z
ei = 3 suu1 = int(ei) suu2 = int(ei*ei) suu3 = int(ei*ei*ei) print(suu1 + suu2 + suu3)
11.125
25
0.595506
18
89
2.944444
0.388889
0.283019
0.264151
0
0
0
0
0
0
0
0
0.1
0.213483
89
7
26
12.714286
0.657143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c479ab7052b6c4c3c332e3c76351196ac664ed06
149
py
Python
test.py
BlackPhoenixSlo/3vVrsto
ec00d389a09acc0ae2b4fed204c84a750cfb5e2e
[ "Apache-2.0" ]
null
null
null
test.py
BlackPhoenixSlo/3vVrsto
ec00d389a09acc0ae2b4fed204c84a750cfb5e2e
[ "Apache-2.0" ]
null
null
null
test.py
BlackPhoenixSlo/3vVrsto
ec00d389a09acc0ae2b4fed204c84a750cfb5e2e
[ "Apache-2.0" ]
1
2020-08-18T10:52:17.000Z
2020-08-18T10:52:17.000Z
a = {} a["ad ad asd"] = 4 b = 4 if (b is a["ad ad asd"]): print("jaka") else: print ("luka") print (str([[0, 0, 0], [0, 0, 0], [0, 0, 0]]))
14.9
46
0.42953
31
149
2.064516
0.419355
0.25
0.328125
0.375
0.140625
0.140625
0.140625
0.140625
0
0
0
0.100917
0.268456
149
10
46
14.9
0.486239
0
0
0
0
0
0.173333
0
0
0
0
0
0
1
0
false
0
0
0
0
0.375
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
673d1c1073a8bb635455e891ca35f790a20ca173
5,572
py
Python
pythran/tests/test_math.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,647
2015-01-13T01:45:38.000Z
2022-03-28T01:23:41.000Z
pythran/tests/test_math.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,116
2015-01-01T09:52:05.000Z
2022-03-18T21:06:40.000Z
pythran/tests/test_math.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
180
2015-02-12T02:47:28.000Z
2022-03-14T10:28:18.000Z
from pythran.tests import TestEnv @TestEnv.module class TestMath(TestEnv): def test_cos_(self): self.run_test("def cos_(a):\n from math import cos\n return cos(a)", 1, cos_=[int]) def test_exp_(self): self.run_test("def exp_(a):\n from math import exp\n return exp(a)", 1, exp_=[int]) def test_sqrt_(self): self.run_test("def sqrt_(a):\n from math import sqrt\n return sqrt(a)", 1, sqrt_=[int]) def test_log10_(self): self.run_test("def log10_(a):\n from math import log10\n return log10(a)", 1, log10_=[int]) def test_isnan_(self): self.run_test("def isnan_(a):\n from math import isnan\n return isnan(a)", 1, isnan_=[int]) def test_pi_(self): self.run_test("def pi_():\n from math import pi\n return pi", pi_=[]) def test_e_(self): self.run_test("def e_():\n from math import e\n return e", e_=[]) def test_asinh_(self): self.run_test("def asinh_(a):\n from math import asinh\n return asinh(a)",1., asinh_=[float]) def test_atanh_(self): self.run_test("def atanh_(a):\n from math import atanh\n return atanh(a)",.1, atanh_=[float]) def test_acosh_(self): self.run_test("def acosh_(a):\n from math import acosh\n return acosh(a)",1, acosh_=[int]) def test_radians_(self): self.run_test("def radians_(a):\n from math import radians\n return radians(a)",1, radians_=[int]) def test_degrees_(self): self.run_test("def degrees_(a):\n from math import degrees\n return degrees(a)",1, degrees_=[int]) def test_hypot_(self): self.run_test("def hypot_(a,b):\n from math import hypot\n return hypot(a,b)",3,4, hypot_=[int,int]) def test_tanh_(self): self.run_test("def tanh_(a):\n from math import tanh\n return tanh(a)",1, tanh_=[int]) def test_cosh_(self): self.run_test("def cosh_(a):\n from math import cosh\n return cosh(a)",1., cosh_=[float]) def test_sinh_(self): self.run_test("def sinh_(a):\n from math import sinh\n return sinh(a)",1, sinh_=[int]) def test_atan_(self): self.run_test("def atan_(a):\n from math import atan\n return atan(a)",1, atan_=[int]) def test_atan2_(self): self.run_test("def atan2_(a,b):\n from math import atan2\n return atan2(a,b)",2,4, atan2_=[int,int]) def test_asin_(self): self.run_test("def asin_(a):\n from math import asin\n return asin(a)",1, asin_=[int]) def test_tan_(self): self.run_test("def tan_(a):\n from math import tan\n return tan(a)",1, tan_=[int]) def test_log_(self): self.run_test("def log_(a):\n from math import log\n return log(a)",1, log_=[int]) def test_log1p_(self): self.run_test("def log1p_(a):\n from math import log1p\n return log1p(a)",1, log1p_=[int]) def test_expm1_(self): self.run_test("def expm1_(a):\n from math import expm1\n return expm1(a)",1, expm1_=[int]) def test_ldexp_(self): self.run_test("def ldexp_(a,b):\n from math import ldexp\n return ldexp(a,b)",3,4, ldexp_=[int,int]) def test_fmod_(self): self.run_test("def fmod_(a,b):\n from math import fmod\n return fmod(a,b)",5.3,2, fmod_=[float,int]) def test_fabs_(self): self.run_test("def fabs_(a):\n from math import fabs\n return fabs(a)",1, fabs_=[int]) def test_copysign_(self): self.run_test("def copysign_(a,b):\n from math import copysign\n return copysign(a,b)",2,-2, copysign_=[int,int]) def test_acos_(self): self.run_test("def acos_(a):\n from math import acos\n return acos(a)",1, acos_=[int]) def test_erf_(self): self.run_test("def erf_(a):\n from math import erf\n return erf(a)",1, erf_=[int]) def test_erfc_(self): self.run_test("def erfc_(a):\n from math import erfc\n return erfc(a)",1, erfc_=[int]) def test_gamma_(self): self.run_test("def gamma_(a):\n from math import gamma\n return gamma(a)",1, gamma_=[int]) def test_lgamma_(self): self.run_test("def lgamma_(a):\n from math import lgamma\n return lgamma(a)",1, lgamma_=[int]) def test_trunc_(self): self.run_test("def trunc_(a):\n from math import trunc\n return trunc(a)",1, trunc_=[int]) def test_factorial_(self): self.run_test("def factorial_(a):\n from math import factorial\n return factorial(a)",2, factorial_=[int]) def test_modf_(self): self.run_test("def modf_(a):\n from math import modf\n return modf(a)",2, modf_=[int]) def test_frexp_(self): self.run_test("def frexp_(a):\n from math import frexp\n return frexp(a)",2.2, frexp_=[float]) def test_isinf_(self): self.run_test("def isinf_(a):\n from math import isinf\n n=1\n while not isinf(a):\n a=a*a\n n+=1\n return isinf(a)", 2., isinf_=[float]) def test_pow_accuracy(self): code = ''' from math import factorial def pow_accuracy(N, i): N = N ** i p = 0.0000001 * 1.0 binomial_coef = 1. * factorial(N) / factorial(i) / factorial(N-i) pp = binomial_coef * p**i * (1-p)**(N-i) return pp''' self.run_test(code, 3, 2, pow_accuracy=[int, int]) def test_pow_array_accuracy(self): code = ''' import numpy as np def pow_array_accuracy(N, i): p = np.arange(N) * 0.0000001 pp = p**i * (1-p)**(N-i) return pp''' self.run_test(code, 3, 2, pow_array_accuracy=[int, int])
38.965035
147
0.619167
950
5,572
3.421053
0.082105
0.084
0.132
0.170769
0.399692
0.047077
0.020923
0.020923
0.020923
0.020923
0
0.021724
0.223439
5,572
142
148
39.239437
0.729374
0
0
0.080808
0
0.070707
0.45944
0.003769
0
0
0
0
0
1
0.393939
false
0
0.40404
0
0.828283
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
67426f546e6cbfac07bbebd10dfcaf9bc05b70e0
66
py
Python
{{cookiecutter.project_slug}}/app/__init__.py
Aquish-Lee/cookiecutter-pytorch-fastapi
9ae6f58cc9823a342e1fafe467dd7dfea5086e7a
[ "Apache-2.0" ]
15
2021-09-01T10:58:47.000Z
2022-03-04T06:41:29.000Z
{{cookiecutter.project_slug}}/app/__init__.py
Aquish-Lee/cookiecutter-pytorch-fastapi
9ae6f58cc9823a342e1fafe467dd7dfea5086e7a
[ "Apache-2.0" ]
null
null
null
{{cookiecutter.project_slug}}/app/__init__.py
Aquish-Lee/cookiecutter-pytorch-fastapi
9ae6f58cc9823a342e1fafe467dd7dfea5086e7a
[ "Apache-2.0" ]
6
2021-09-07T09:08:07.000Z
2022-02-19T18:31:56.000Z
# -*- coding: utf-8 -*- # @Author : Aquish # @Organization : NTT
16.5
23
0.560606
7
66
5.285714
1
0
0
0
0
0
0
0
0
0
0
0.019231
0.212121
66
3
24
22
0.692308
0.893939
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
675fa4a35caaab9eea2b2643dd84d0d6df3d072f
98
py
Python
django_polls/polls/apps.py
bionikspoon/django_polls
de677f6b76be2dbb62c6355f1494a8db89086e56
[ "MIT" ]
null
null
null
django_polls/polls/apps.py
bionikspoon/django_polls
de677f6b76be2dbb62c6355f1494a8db89086e56
[ "MIT" ]
null
null
null
django_polls/polls/apps.py
bionikspoon/django_polls
de677f6b76be2dbb62c6355f1494a8db89086e56
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PollsConfig(AppConfig): name = 'django_polls.polls'
16.333333
33
0.765306
12
98
6.166667
0.75
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
34
19.6
0.891566
0
0
0
0
0
0.183673
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
6773be209620c0051efaea5cf4230acb0d7c1542
215
py
Python
psonic/samples/misc.py
m-roberts/python-sonic
e7cdfefe10ee26e478c6f866fa0cdeb562fbb756
[ "MIT" ]
263
2016-01-31T17:15:45.000Z
2022-03-28T04:15:54.000Z
psonic/samples/misc.py
m-roberts/python-sonic
e7cdfefe10ee26e478c6f866fa0cdeb562fbb756
[ "MIT" ]
32
2016-01-31T13:51:59.000Z
2021-08-30T17:05:09.000Z
psonic/samples/misc.py
m-roberts/python-sonic
e7cdfefe10ee26e478c6f866fa0cdeb562fbb756
[ "MIT" ]
52
2016-02-01T01:54:35.000Z
2021-09-24T07:27:51.000Z
"""Miscellaneous Sounds""" from . import Sample MISC_BURP = Sample('misc_burp', 0.7932879818594104) MISC_CINEBOOM = Sample('misc_cineboom', 7.922675736961451) MISC_CROW = Sample('misc_crow', 0.48063492063492064)
23.888889
58
0.772093
26
215
6.153846
0.538462
0.25
0.175
0
0
0
0
0
0
0
0
0.262887
0.097674
215
8
59
26.875
0.561856
0.093023
0
0
0
0
0.164021
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
678d010eb270dc923ed398884a96bbf6ea7dfd2a
142
py
Python
data_models/onepassword_itemusage_data_model.py
panther-labs/panther-cli
4e5c0a21570e1a02dada990fd91e324416afac96
[ "MIT" ]
4
2019-10-17T19:33:29.000Z
2019-10-21T15:23:30.000Z
data_models/onepassword_itemusage_data_model.py
jacknagz/panther-analysis
fceab78ba5624136776596ee1b25fa0dc8a02a42
[ "Apache-2.0" ]
null
null
null
data_models/onepassword_itemusage_data_model.py
jacknagz/panther-analysis
fceab78ba5624136776596ee1b25fa0dc8a02a42
[ "Apache-2.0" ]
null
null
null
# 1Password item usage logs don't have event types, this file is a placeholder. All events are # the viewing or usage of an item in 1Password
47.333333
94
0.774648
26
142
4.230769
0.884615
0
0
0
0
0
0
0
0
0
0
0.017391
0.190141
142
2
95
71
0.93913
0.964789
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
67a2dd96e1f64b456f45625e4c8b45beec315610
102
py
Python
equipment_slots.py
kravlost/gogow
b41981354c711cc025d9072808ec00cd97dec91e
[ "Unlicense" ]
null
null
null
equipment_slots.py
kravlost/gogow
b41981354c711cc025d9072808ec00cd97dec91e
[ "Unlicense" ]
null
null
null
equipment_slots.py
kravlost/gogow
b41981354c711cc025d9072808ec00cd97dec91e
[ "Unlicense" ]
null
null
null
from enum import Enum, auto class EquipmentSlots(Enum): MAIN_HAND = auto() OFF_HAND = auto()
17
27
0.686275
14
102
4.857143
0.642857
0.235294
0
0
0
0
0
0
0
0
0
0
0.215686
102
6
28
17
0.85
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
67a3e85914c8ee7c2d1314dd30694ac03b2de163
126
py
Python
backend/api/models/__init__.py
ardilom/DeptoShower
f8cb916a1c89722cf117b78ee93b43f1d488e27a
[ "MIT" ]
1
2020-09-13T12:44:50.000Z
2020-09-13T12:44:50.000Z
backend/api/models/__init__.py
ardilom/project_template
e42fbf73da7037074f160a31201cae70d7a027dc
[ "MIT" ]
13
2021-04-06T18:34:04.000Z
2022-02-27T11:08:17.000Z
backend/api/models/__init__.py
ardilom/DeptoShower
f8cb916a1c89722cf117b78ee93b43f1d488e27a
[ "MIT" ]
null
null
null
# imports from .base import ( BaseModel, file_path, ) from .notifications import Notification from .users import User
15.75
39
0.738095
15
126
6.133333
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.198413
126
7
40
18
0.910891
0.055556
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
67b1bd17362a17858016e0244d5c16720ca303ec
105
py
Python
python/inc/WebApp.py
wadelau/GWA2
27259015ddbd7418d84230c1b4fab4248f6471c1
[ "Apache-2.0" ]
7
2016-09-05T12:41:26.000Z
2021-06-29T14:48:17.000Z
python/inc/WebApp.py
wadelau/GWA2
27259015ddbd7418d84230c1b4fab4248f6471c1
[ "Apache-2.0" ]
null
null
null
python/inc/WebApp.py
wadelau/GWA2
27259015ddbd7418d84230c1b4fab4248f6471c1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -v # WebApp class for GWA2 in Python # Xenxin@Ufqi, Fri 15 Dec 2017 21:04:39 CST
17.5
45
0.67619
20
105
3.55
1
0
0
0
0
0
0
0
0
0
0
0.166667
0.2
105
5
46
21
0.678571
0.914286
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
67bc79ac47945fdd7843970f28149d47c8166a71
44
py
Python
package/__init__.py
jfcrenshaw/python-package
3419dcd0faa0ed5b68fd8c8ec514ad95e52e4257
[ "MIT" ]
null
null
null
package/__init__.py
jfcrenshaw/python-package
3419dcd0faa0ed5b68fd8c8ec514ad95e52e4257
[ "MIT" ]
null
null
null
package/__init__.py
jfcrenshaw/python-package
3419dcd0faa0ed5b68fd8c8ec514ad95e52e4257
[ "MIT" ]
null
null
null
__version__ = "0.1.0" from .module import *
14.666667
21
0.681818
7
44
3.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0.081081
0.159091
44
2
22
22
0.621622
0
0
0
0
0
0.113636
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
67c10aef8a49127bcd9507fd690683648b863079
566
py
Python
models.py
renmarin/django_restaurants
a27f1d79856e4bd9da0c1987243e1dab3ec7be20
[ "MIT" ]
null
null
null
models.py
renmarin/django_restaurants
a27f1d79856e4bd9da0c1987243e1dab3ec7be20
[ "MIT" ]
null
null
null
models.py
renmarin/django_restaurants
a27f1d79856e4bd9da0c1987243e1dab3ec7be20
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Restaurant(models.Model): name = models.CharField(max_length=200) def __str__(self): return f'{self.name}' class MenuItem(models.Model): name = models.CharField(max_length=70) description = models.CharField(max_length=300) price = models.CharField(max_length=8) course = models.CharField(max_length=10) restaurant = models.ForeignKey(Restaurant, on_delete=models.CASCADE) def __str__(self): return f'''{self.name} {self.description} {self.price}'''
25.727273
72
0.706714
73
566
5.287671
0.452055
0.194301
0.233161
0.310881
0.331606
0.331606
0.331606
0
0
0
0
0.023454
0.171378
566
21
73
26.952381
0.799574
0.042403
0
0.153846
0
0
0.1
0
0
0
0
0
0
1
0.153846
false
0
0.076923
0.153846
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
0
1
1
0
0
4
67c79560de4cb7cb4a22b379f656e2be91872996
614
py
Python
plugin/plugin_message.py
jfcherng-sublime/LSP-intelephense-patcher
9be50080e6acc8ce25e14bbf5ca3c3615c938e0f
[ "MIT" ]
3
2020-11-07T07:11:18.000Z
2021-06-11T13:24:48.000Z
plugin/plugin_message.py
jfcherng-sublime/ST-patcher-LSP-intelephense
97520041a572c8e07bef59388935020257768307
[ "MIT" ]
null
null
null
plugin/plugin_message.py
jfcherng-sublime/ST-patcher-LSP-intelephense
97520041a572c8e07bef59388935020257768307
[ "MIT" ]
null
null
null
import sublime def pluginfy_msg(msg: str, *args, **kwargs) -> str: package_name = __package__.split(".")[0] return msg.format(*args, _=package_name, **kwargs) def console_msg(msg: str, *args, **kwargs) -> None: print(pluginfy_msg(msg, *args, **kwargs)) def status_msg(msg: str, *args, **kwargs) -> None: sublime.status_message(pluginfy_msg(msg, *args, **kwargs)) def info_box(msg: str, *args, **kwargs) -> None: sublime.message_dialog(pluginfy_msg(msg, *args, **kwargs)) def error_box(msg: str, *args, **kwargs) -> None: sublime.error_message(pluginfy_msg(msg, *args, **kwargs))
25.583333
62
0.669381
84
614
4.666667
0.27381
0.229592
0.178571
0.204082
0.640306
0.591837
0.153061
0
0
0
0
0.001912
0.148208
614
23
63
26.695652
0.74761
0
0
0
0
0
0.001629
0
0
0
0
0
0
1
0.416667
false
0
0.083333
0
0.583333
0.083333
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
67c97a746cf0a4325387f4ad93c749e10988afe3
214
py
Python
django_docutils/rst_post/models/__init__.py
tony/django-docutils
ed3e089728507a0f579a62bcb182f283bc59929c
[ "MIT" ]
10
2017-04-28T00:19:10.000Z
2020-07-22T15:27:09.000Z
django_docutils/rst_post/models/__init__.py
tony/django-docutils
ed3e089728507a0f579a62bcb182f283bc59929c
[ "MIT" ]
231
2017-01-17T04:47:51.000Z
2022-03-30T03:03:42.000Z
django_docutils/rst_post/models/__init__.py
tony/django-docutils
ed3e089728507a0f579a62bcb182f283bc59929c
[ "MIT" ]
1
2019-01-25T14:42:15.000Z
2019-01-25T14:42:15.000Z
# flake8: NOQA F4 from .checks import _check_postpage_post_back_relation, _check_root_page from .post import RSTPostBase, get_post_model, get_post_models from .post_page import RSTPostPageBase, get_postpage_models
42.8
72
0.864486
32
214
5.3125
0.5625
0.094118
0
0
0
0
0
0
0
0
0
0.010309
0.093458
214
4
73
53.5
0.865979
0.070093
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
db178da4922bd16e61db839e6eba195e360832b2
208
py
Python
msbase/argparse_.py
monad-systems/base.py
414a53aa19ced68583fce2a9b10bd50e71353d2a
[ "MIT" ]
null
null
null
msbase/argparse_.py
monad-systems/base.py
414a53aa19ced68583fce2a9b10bd50e71353d2a
[ "MIT" ]
2
2019-04-05T19:52:29.000Z
2020-02-12T17:01:44.000Z
msbase/argparse_.py
monad-systems/base.py
414a53aa19ced68583fce2a9b10bd50e71353d2a
[ "MIT" ]
1
2019-08-09T16:54:16.000Z
2019-08-09T16:54:16.000Z
import argparse def p(*args, **kwargs): if 'formatter_class' not in kwargs: kwargs['formatter_class'] = argparse.ArgumentDefaultsHelpFormatter return argparse.ArgumentParser(*args, **kwargs)
29.714286
74
0.730769
22
208
6.818182
0.636364
0.133333
0
0
0
0
0
0
0
0
0
0
0.158654
208
6
75
34.666667
0.857143
0
0
0
0
0
0.144231
0
0
0
0
0
0
1
0.2
true
0
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
db27d0c2790b3fe31c6a8cd355f32d6fb38dec15
263
py
Python
catalog/forms.py
Elbar/congenial-dollop
7a3330a32100598b0baacdf03df7093342c5b9d1
[ "MIT" ]
null
null
null
catalog/forms.py
Elbar/congenial-dollop
7a3330a32100598b0baacdf03df7093342c5b9d1
[ "MIT" ]
11
2020-02-11T21:48:53.000Z
2022-03-11T23:12:02.000Z
catalog/forms.py
Elbar/congenial-dollop
7a3330a32100598b0baacdf03df7093342c5b9d1
[ "MIT" ]
null
null
null
from django import forms from .models import * class DocumentForm(forms.ModelForm): class Meta: model = Document fields = '__all__' class CheckoutForm(forms.ModelForm): class Meta: model = Checkout fields = '__all__'
16.4375
36
0.642586
27
263
5.962963
0.555556
0.173913
0.236025
0.285714
0.347826
0
0
0
0
0
0
0
0.281369
263
15
37
17.533333
0.851852
0
0
0.4
0
0
0.053232
0
0
0
0
0
0
1
0
false
0
0.2
0
0.6
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
db34ba559acb001dffb959df14cd56e4057dded5
49
py
Python
pi/driver/d_serial.py
jared-jones280/SmartFishTank-Arduino
ba21f2d579e8c09a168fdc6749908bbb28782e75
[ "MIT" ]
1
2020-05-23T17:21:39.000Z
2020-05-23T17:21:39.000Z
pi/driver/d_serial.py
cmasterx/SmartFishTank-Arduino
ba21f2d579e8c09a168fdc6749908bbb28782e75
[ "MIT" ]
null
null
null
pi/driver/d_serial.py
cmasterx/SmartFishTank-Arduino
ba21f2d579e8c09a168fdc6749908bbb28782e75
[ "MIT" ]
2
2020-05-26T02:45:26.000Z
2020-05-26T18:18:07.000Z
import serial ser = serial.Serial('/dev/ttyACM0')
24.5
35
0.755102
7
49
5.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0.022222
0.081633
49
2
35
24.5
0.8
0
0
0
0
0
0.24
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
c003e86e7e16062b5683d3e9002a485b50811e85
581
py
Python
tests/test_tuple_creation.py
tmr232/python-benchmark
f3b6f4a9679a27121b893eda7e3212d50705a924
[ "MIT" ]
null
null
null
tests/test_tuple_creation.py
tmr232/python-benchmark
f3b6f4a9679a27121b893eda7e3212d50705a924
[ "MIT" ]
null
null
null
tests/test_tuple_creation.py
tmr232/python-benchmark
f3b6f4a9679a27121b893eda7e3212d50705a924
[ "MIT" ]
null
null
null
from tests.utils import verify @verify class TestTupleComprehension: """ Compare various ways to write "tuple comprehensions" """ DATA = list(range(1000000)) def test_generator_comprehension(self, benchmark): """tuple from generator comprehension""" def run(data): return tuple(x for x in data) benchmark(run, self.DATA) def test_list_comprehension(self, benchmark): """tuple from list comprehension""" def run(data): return tuple([x for x in data]) benchmark(run, self.DATA)
21.518519
56
0.63167
67
581
5.41791
0.432836
0.038567
0.143251
0.170799
0.550964
0.358127
0.358127
0.358127
0.358127
0.358127
0
0.016548
0.271945
581
26
57
22.346154
0.841608
0.201377
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.083333
0.166667
0.75
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
c018e24dc050df001318fd7e62992f2ff738d005
317
py
Python
sync_ends/collection.py
nirav1997/sync_ends
04e39ec26ac43ad4e6d4e1bdf685eb73c03b1dbb
[ "MIT" ]
null
null
null
sync_ends/collection.py
nirav1997/sync_ends
04e39ec26ac43ad4e6d4e1bdf685eb73c03b1dbb
[ "MIT" ]
null
null
null
sync_ends/collection.py
nirav1997/sync_ends
04e39ec26ac43ad4e6d4e1bdf685eb73c03b1dbb
[ "MIT" ]
null
null
null
from src.end_point import EndPoint class Collection: def __init__(self, collection_json): self.end_points = [EndPoint(x) for x in collection_json["item"]] def get_end_points(self): return self.end_points def remove_end_point(self, end_point): self.end_points.remove(end_point)
24.384615
72
0.709779
46
317
4.543478
0.434783
0.15311
0.186603
0.143541
0
0
0
0
0
0
0
0
0.201893
317
12
73
26.416667
0.826087
0
0
0
0
0
0.012618
0
0
0
0
0
0
1
0.375
false
0
0.125
0.125
0.75
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4