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
ca31508e5a8ab70eb8a5966590e0337072e4e624
213
py
Python
python-for-beginners/15 - Packages/import_module.py
kbsat/c9-python-getting-started
4033c9aaad27d517478c832c31145b97f2b35d6c
[ "MIT" ]
null
null
null
python-for-beginners/15 - Packages/import_module.py
kbsat/c9-python-getting-started
4033c9aaad27d517478c832c31145b97f2b35d6c
[ "MIT" ]
null
null
null
python-for-beginners/15 - Packages/import_module.py
kbsat/c9-python-getting-started
4033c9aaad27d517478c832c31145b97f2b35d6c
[ "MIT" ]
null
null
null
# 네임스페이스로 모듈 가져오기 import helpers helpers.display('Not a warning') # 네임스페이스 안의 모든 항목 가져오기 from helpers import * display('Not a warning') # 네임스페이스 안의 특정 항목 가져오기 from helpers import display display('Not a warning')
19.363636
32
0.751174
35
213
4.571429
0.428571
0.1875
0.20625
0.3375
0.65625
0.65625
0
0
0
0
0
0
0.169014
213
11
33
19.363636
0.903955
0.267606
0
0.333333
0
0
0.254902
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ca4b50d01f45cfda5af21935634f680f456183cc
179
py
Python
4/named_variables.py
gdaPythonProjects/training2019-thursday
cd4d406a83f3ec914e136cec21d96988eb2ee2e9
[ "MIT" ]
5
2019-11-07T17:04:17.000Z
2019-11-20T18:47:28.000Z
4/named_variables.py
gdaPythonProjects/training2019-thursday
cd4d406a83f3ec914e136cec21d96988eb2ee2e9
[ "MIT" ]
null
null
null
4/named_variables.py
gdaPythonProjects/training2019-thursday
cd4d406a83f3ec914e136cec21d96988eb2ee2e9
[ "MIT" ]
null
null
null
def add_values(a, b, c=0, d=0): print(a + b + c + d) add_values(2, 3) add_values(2, 3, 4) add_values(2, 3, d=7) print("Ala ma kota", end=". \n") print("A kotek jest bury")
16.272727
32
0.581006
40
179
2.5
0.525
0.36
0.3
0.33
0
0
0
0
0
0
0
0.06993
0.201117
179
10
33
17.9
0.629371
0
0
0
0
0
0.178771
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
0.428571
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
ca4cf90c0ea862783f36f538d55d046f32853854
1,039
py
Python
scripts/utils.py
JihoChoi/rumor-diffusion-network-analysis
72e9eaf317a135bde5e32e5da6178f32dde6d030
[ "MIT" ]
1
2020-09-04T06:59:50.000Z
2020-09-04T06:59:50.000Z
scripts/utils.py
JihoChoi/rumor-diffusion-network-analysis
72e9eaf317a135bde5e32e5da6178f32dde6d030
[ "MIT" ]
null
null
null
scripts/utils.py
JihoChoi/rumor-diffusion-network-analysis
72e9eaf317a135bde5e32e5da6178f32dde6d030
[ "MIT" ]
2
2020-10-30T08:30:15.000Z
2020-12-04T07:41:07.000Z
from project_settings import * def ensure_directory(path): # TODO: try-except if not os.path.exists(path): os.makedirs(path) # return path def mean_max_of_list(l): # if not len(list): # return 0, 0 # mean_v = sum(list) / len(list) # max_v = max(list) # return mean_v, max_v avg_v = sum(l) / len(l) if len(l) else 0 max_v = max(l) if l else 0 return avg_v, max_v def mean_of_list(l): return sum(l) / len(l) if len(l) else 0 def max_of_list(l): return max(l) if l else 0 def median_of_list(l): # if len(l): # print(l) # return statistics.median(l) # else: # return 0 return statistics.median(l) if len(l) else 0 def save_pickle_file(path, file_name, data): ensure_directory(path) with open(path + file_name + '.pkl', 'wb') as pickle_file: pickle.dump(data, pickle_file) def load_pickle_file(file_path): with open(file_path, 'rb') as pickle_file: data = pickle.load(pickle_file) return data
19.240741
62
0.615977
174
1,039
3.494253
0.252874
0.034539
0.049342
0.046053
0.131579
0.131579
0.092105
0.0625
0.0625
0
0
0.010499
0.266603
1,039
53
63
19.603774
0.787402
0.19923
0
0
0
0
0.009768
0
0
0
0
0.018868
0
1
0.318182
false
0
0.045455
0.136364
0.590909
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
ca63e2dd4f59985d04e53c055f53e9d1b3f03310
13,647
py
Python
kgexplore/fa2l/force.py
smoothnlp/KGExplore
5b0abf15f3fa37aa39f01aaa8fd3dcc522532670
[ "MIT" ]
10
2020-05-31T11:40:50.000Z
2022-03-17T03:57:58.000Z
kgexplore/fa2l/force.py
smoothnlp/KGExplore
5b0abf15f3fa37aa39f01aaa8fd3dcc522532670
[ "MIT" ]
2
2020-09-03T03:00:20.000Z
2021-11-30T12:17:34.000Z
kgexplore/fa2l/force.py
smoothnlp/KGExplore
5b0abf15f3fa37aa39f01aaa8fd3dcc522532670
[ "MIT" ]
3
2020-06-15T11:25:12.000Z
2020-09-06T17:37:42.000Z
import math def apply_repulsion(repulsion, nodes, barnes_hut_optimize=False, region=None, barnes_hut_theta=1.2): """ Iterate through the nodes or edges and apply the forces directly to the node objects. """ if not barnes_hut_optimize: for i in range(0, len(nodes)): for j in range(0, i): repulsion.apply_node_to_node(nodes[i], nodes[j]) else: for i in range(0, len(nodes)): region.apply_force(nodes[i], repulsion, barnes_hut_theta) def apply_gravity(repulsion, nodes, gravity, scaling_ratio): """ Iterate through the nodes or edges and apply the gravity directly to the node objects. """ for i in range(0, len(nodes)): repulsion.apply_gravitation(nodes[i], gravity / scaling_ratio) def apply_attraction(attraction, nodes, edges, edge_weight_influence): # Optimization, since usually edgeWeightInfluence is 0 or 1, and pow is slow if edge_weight_influence == 0: for edge in edges: attraction.apply(nodes[edge.node1], nodes[edge.node2], 1) elif edge_weight_influence == 1: for edge in edges: attraction.apply(nodes[edge.node1], nodes[edge.node2], edge.weight) else: for edge in edges: attraction.apply(nodes[edge.node1], nodes[edge.node2], pow(edge.weight, edge_weight_influence)) def get_repulsion(adjust_by_size, coefficient): if adjust_by_size: return LinRepulsionAntiCollision(coefficient) else: return LinearRepulsion(coefficient) def get_strong_gravity(coefficient): return StrongGravity(coefficient) def get_attraction(log_attraction, distributed_attraction, adjust_by_size, coefficient): if adjust_by_size: if log_attraction: if distributed_attraction: return LogAttractionDegreeDistributedAntiCollision(coefficient) else: return LogAttractionAntiCollision(coefficient) else: if distributed_attraction: return LinAttractionDegreeDistributedAntiCollision(coefficient) else: return LinAttractionAntiCollision(coefficient) else: if log_attraction: if distributed_attraction: return LogAttractionDegreeDistributed(coefficient) else: return LogAttraction(coefficient) else: if distributed_attraction: return LinAttractionMassDistributed(coefficient) else: return LinAttraction(coefficient) class AttractionForce: def __init__(self, coefficient): self.coefficient = coefficient def __str__(self): return str(self.__class__) def apply(self, node1, node2, edge_weight): """ Model for node-node attraction. This will adjust the dx and dy values of `node1` (and optionally `node2`). """ raise NotImplementedError class RepulsionForce: """ Here are all the formulas for attraction and repulsion. """ def __init__(self, coefficient): self.coefficient = coefficient def __str__(self): return str(self.__class__) def apply_node_to_node(self, node1, node2): """ Model for node-node repulsion """ raise NotImplementedError @staticmethod def apply_approximation(self, node, region): """ Model for Barnes Hut approximation """ raise NotImplementedError def apply_gravitation(self, node, gravity): """ Model for gravitation (anti-repulsion) """ raise NotImplementedError class LinearRepulsion(RepulsionForce): """ Repulsion force: Linear """ def __init__(self, *args, **kwargs): RepulsionForce.__init__(self, *args, **kwargs) def __str__(self): return RepulsionForce.__str__(self) def apply_node_to_node(self, node1, node2): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance2 = x_dist * x_dist + y_dist * y_dist # Distance squared if distance2 > 0: factor = self.coefficient * node1.mass * node2.mass / distance2 node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor def apply_approximation(self, node, region): x_dist = node.x - region.center_x y_dist = node.y - region.center_y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) if distance > 0: # NB: factor = force / distance factor = self.coefficient * node.mass * region.sum_mass / distance / distance node.dx += x_dist * factor node.dy += y_dist * factor def apply_gravitation(self, node, gravity): x_dist = node.x y_dist = node.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) if distance > 0: factor = self.coefficient * node.mass * gravity / distance node.dx -= x_dist * factor node.dy -= y_dist * factor class LinRepulsionAntiCollision(RepulsionForce): """ Repulsion force: Strong Gravity (as a Repulsion Force because it is easier) """ def __init__(self, *args, **kwargs): RepulsionForce.__init__(self, *args, **kwargs) def __str__(self): return RepulsionForce.__str__(self) def apply_node_to_node(self, node1, node2): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) - node1.size - node2.size if distance > 0: factor = self.coefficient * node1.mass * node2.mass / distance / distance node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor if distance < 0: factor = 100 * self.coefficient * node1.mass * node2.mass node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor def apply_approximation(self, node, region): x_dist = node.x - region.center_x y_dist = node.y - region.center_y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) if distance > 0: factor = self.coefficient * node.mass * region.sum_mass / distance / distance node.dx += x_dist * factor node.dy += y_dist * factor if distance < 0: factor = -self.coefficient * node.mass * region.sum_mass / distance node.dx += x_dist * factor node.dy += y_dist * factor def apply_gravitation(self, node, gravity): x_dist = node.x y_dist = node.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) if distance > 0: factor = self.coefficient * node.mass * gravity / distance node.dx -= x_dist * factor node.dy -= y_dist * factor class StrongGravity(RepulsionForce): """ Strong gravity force function """ def __init__(self, *args, **kwargs): RepulsionForce.__init__(self, *args, **kwargs) def __str__(self): return RepulsionForce.__str__(self) def apply_node_to_node(self, node1, node2): """ Not Relevant """ pass @staticmethod def apply_approximation(self, node, region): """ Not Relevant """ pass def apply_gravitation(self, node, gravity): x_dist = node.x y_dist = node.y distance = math.sqrt(x_dist * x_dist + y_dist * y_dist) if distance > 0: # NB: factor = force / distance factor = self.coefficient * node.mass * gravity node.dx -= x_dist * factor node.dy -= y_dist * factor class LinAttraction(AttractionForce): def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y factor = -self.coefficient * edge_weight node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LinAttractionMassDistributed(AttractionForce): """ Attraction force: Linear, distributed by mass (typically, degree) """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y factor = -self.coefficient * edge_weight / node1.weight node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LinAttractionAntiCollision(AttractionForce): """ Attraction force: Linear, with Anti-Collision """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) - node1.size - node2.size if distance > 0: factor = -self.coefficient * edge_weight node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LinAttractionDegreeDistributedAntiCollision(AttractionForce): """ Attraction force: Linear, distributed by Degree, with Anti-Collision """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) - node1.size - node2.size if distance > 0: factor = -self.coefficient * edge_weight / node1.mass node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LogAttraction(AttractionForce): """ Attraction force: Logarithmic """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) if distance > 0: factor = -self.coefficient * edge_weight * math.log(1 + distance) / distance node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LogAttractionDegreeDistributed(AttractionForce): """ Attraction force: Linear, distributed by Degree """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) if distance > 0: factor = -self.coefficient * edge_weight * math.log(1 + distance) / distance / node1.mass node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LogAttractionAntiCollision(AttractionForce): """ Attraction force: Linear, distributed by Degree """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) - node1.size - node2.size if distance > 0: factor = -self.coefficient * edge_weight * math.log(1 + distance) / distance node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor class LogAttractionDegreeDistributedAntiCollision(AttractionForce): """ Attraction force: Linear, distributed by Degree, with Anti-Collision """ def __init__(self, *args, **kwargs): AttractionForce.__init__(self, *args, **kwargs) def __str__(self): return AttractionForce.__str__(self) def apply(self, node1, node2, edge_weight): x_dist = node1.x - node2.x y_dist = node1.y - node2.y distance = math.sqrt(x_dist ** 2 + y_dist ** 2) - node1.size - node2.size if distance > 0: factor = -self.coefficient * edge_weight * math.log(1 + distance) / distance / node1.mass node1.dx += x_dist * factor node1.dy += y_dist * factor node2.dx -= x_dist * factor node2.dy -= y_dist * factor
29.348387
107
0.603429
1,589
13,647
4.926998
0.079924
0.037042
0.025035
0.046494
0.741219
0.735088
0.708647
0.674671
0.648103
0.637885
0
0.020404
0.296109
13,647
464
108
29.411638
0.794608
0.082362
0
0.815884
0
0
0
0
0
0
0
0
0
1
0.191336
false
0.00722
0.00361
0.050542
0.32852
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
04894795748d73ec7eca23dd65501cc5ca0de520
418
py
Python
DataStructuresAndAlgorithms/old_algo_code/DS/Python/link_list/node.py
DLonng/Go
a67ac6d6501f9fadadec6a6cf766d4b4a356d572
[ "MIT" ]
23
2020-04-10T01:53:46.000Z
2021-12-31T03:43:10.000Z
DataStructuresAndAlgorithms/old_algo_code/DS/Python/link_list/node.py
DLonng/Go
a67ac6d6501f9fadadec6a6cf766d4b4a356d572
[ "MIT" ]
1
2020-12-10T07:08:37.000Z
2021-04-14T07:47:01.000Z
DataStructuresAndAlgorithms/old_algo_code/DS/Python/link_list/node.py
DLonng/Go
a67ac6d6501f9fadadec6a6cf766d4b4a356d572
[ "MIT" ]
9
2020-04-05T11:49:22.000Z
2021-11-04T10:23:37.000Z
class Node(object): def __init__(self, data=None, next=None): self.data_ = data self.next_ = next def get_data(self): return self.data_ def set_data(self, data): self.data_ = data def get_next(self): return self.next_ def set_next(self, next): self.next_ = next def __str__(self): return str(self.data_)
16.72
46
0.545455
53
418
3.943396
0.245283
0.229665
0.114833
0.143541
0
0
0
0
0
0
0
0
0.358852
418
24
47
17.416667
0.779851
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0.214286
0.714286
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
04a9560722dd6f0324d512f7e9811db040e11561
89
py
Python
feature/apps.py
trejiiten/testrun_python_restapi
81496c72868be46174495989fb528231c532fe82
[ "MIT" ]
2
2018-05-28T06:48:13.000Z
2018-07-10T13:22:26.000Z
feature/apps.py
trejiiten/testrun_python_restapi
81496c72868be46174495989fb528231c532fe82
[ "MIT" ]
1
2020-05-26T00:54:24.000Z
2020-05-26T00:54:24.000Z
feature/apps.py
trejiiten/testrun_python_restapi
81496c72868be46174495989fb528231c532fe82
[ "MIT" ]
1
2019-10-15T04:52:59.000Z
2019-10-15T04:52:59.000Z
from django.apps import AppConfig class FeatureConfig(AppConfig): name = 'feature'
14.833333
33
0.752809
10
89
6.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.168539
89
5
34
17.8
0.905405
0
0
0
0
0
0.078652
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
04c4059d09c4b8feddddf928cdb4db1b34a1841f
139
py
Python
cohort_back/serializers.py
aphp/Cohort360-Back-end
03184db6c4cb639955e2f3726c7e1b5cc7809f01
[ "Apache-2.0" ]
9
2020-11-04T13:08:47.000Z
2022-02-03T17:04:05.000Z
cohort_back/serializers.py
aphp/Cohort360-Back-end
03184db6c4cb639955e2f3726c7e1b5cc7809f01
[ "Apache-2.0" ]
7
2021-03-17T17:48:26.000Z
2022-02-10T13:27:43.000Z
cohort_back/serializers.py
aphp/Cohort360-Back-end
03184db6c4cb639955e2f3726c7e1b5cc7809f01
[ "Apache-2.0" ]
2
2020-11-23T10:42:40.000Z
2022-02-03T17:04:09.000Z
from rest_framework import serializers class ErrorSerializer(serializers.Serializer): message = serializers.CharField(required=True)
23.166667
50
0.827338
14
139
8.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.107914
139
5
51
27.8
0.919355
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
04dc97e255155c4605888091a4398f99eccc5896
93
py
Python
mobileapp/apps.py
cu2/KT
8a0964b77dce150358637faa679d969a07e42f07
[ "CC-BY-3.0" ]
5
2015-04-13T09:44:31.000Z
2017-10-19T01:07:58.000Z
mobileapp/apps.py
cu2/KT
8a0964b77dce150358637faa679d969a07e42f07
[ "CC-BY-3.0" ]
49
2015-02-15T07:12:05.000Z
2022-03-11T23:11:43.000Z
mobileapp/apps.py
cu2/KT
8a0964b77dce150358637faa679d969a07e42f07
[ "CC-BY-3.0" ]
1
2019-03-01T11:15:07.000Z
2019-03-01T11:15:07.000Z
from django.apps import AppConfig class MobileappConfig(AppConfig): name = 'mobileapp'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
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
b6e48825751e0ebcc15a4c8f36c6112eac54287f
23
py
Python
webrecorder/webrecorder/__init__.py
MasterScott/webrecorder
2251e21d1ff8db6fccf0b035ada95723091be01d
[ "Apache-2.0" ]
null
null
null
webrecorder/webrecorder/__init__.py
MasterScott/webrecorder
2251e21d1ff8db6fccf0b035ada95723091be01d
[ "Apache-2.0" ]
6
2020-08-12T20:52:08.000Z
2022-03-15T19:55:54.000Z
webrecorder/webrecorder/__init__.py
MasterScott/webrecorder
2251e21d1ff8db6fccf0b035ada95723091be01d
[ "Apache-2.0" ]
null
null
null
__version__ = '4.8.3'
7.666667
21
0.608696
4
23
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.173913
23
2
22
11.5
0.368421
0
0
0
0
0
0.227273
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
b6e768cd210efb2e50e62ec2730ea11e84eb9077
659
py
Python
heroProject/heroApp/views.py
cs-fullstack-2019-spring/django-fields-widgets-cw-cgarciapieto
05545f2a9348f59fbe76084ceae0c5220bfd0cef
[ "Apache-2.0" ]
null
null
null
heroProject/heroApp/views.py
cs-fullstack-2019-spring/django-fields-widgets-cw-cgarciapieto
05545f2a9348f59fbe76084ceae0c5220bfd0cef
[ "Apache-2.0" ]
null
null
null
heroProject/heroApp/views.py
cs-fullstack-2019-spring/django-fields-widgets-cw-cgarciapieto
05545f2a9348f59fbe76084ceae0c5220bfd0cef
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from .models import HeroAppModel from .forms import heroForm # Create your views here. # renders the index page where there is a link to apply def index(request): return render(request, 'heroApp/index.html') # renders the application page def application(request): return render(request, 'heroApp/application.html') # renders the form and allows user apply def newform(request): newForm = heroForm() context = { "newForm": newForm } return render(request, "heroApp/thankyou.html", context) # renders html page def welcome(request): return render(request, "heroApp/thankyou.html")
23.535714
60
0.729894
84
659
5.72619
0.452381
0.099792
0.158004
0.216216
0.309771
0.158004
0
0
0
0
0
0
0.180577
659
27
61
24.407407
0.890741
0.247344
0
0
0
0
0.185714
0.134694
0
0
0
0
0
1
0.266667
false
0
0.2
0.2
0.733333
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
b6f5d84fe006aefea5ae457186903a642d5e715f
350
py
Python
application/model/entity/periodo.py
UniversidadeDeVassouras/labproghiper-engsoftwareonline
b3b80ffd40d4c88b1fd4e2698977084891a5c070
[ "Apache-2.0" ]
null
null
null
application/model/entity/periodo.py
UniversidadeDeVassouras/labproghiper-engsoftwareonline
b3b80ffd40d4c88b1fd4e2698977084891a5c070
[ "Apache-2.0" ]
null
null
null
application/model/entity/periodo.py
UniversidadeDeVassouras/labproghiper-engsoftwareonline
b3b80ffd40d4c88b1fd4e2698977084891a5c070
[ "Apache-2.0" ]
1
2020-04-18T00:08:39.000Z
2020-04-18T00:08:39.000Z
class Periodo: def __init__(self, codigo, nome, disciplina_lista): self._id = codigo self._nome = nome self._disciplina_lista = disciplina_lista def get_id(self): return self._id def get_nome(self): return self._nome def get_disciplina_lista(self): return self._disciplina_lista
23.333333
55
0.645714
43
350
4.837209
0.27907
0.360577
0.201923
0
0
0
0
0
0
0
0
0
0.282857
350
15
56
23.333333
0.828685
0
0
0
0
0
0
0
0
0
0
0
0
1
0.363636
false
0
0
0.272727
0.727273
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
b6fb674440741310ce2b97aff65cbddc00dd3839
3,677
py
Python
src/eduid_webapp/jsconfig/settings/front.py
SUNET/eduid-webapp
8e531f288d50d18a5c9182003fff2ab6670a44c3
[ "BSD-3-Clause" ]
null
null
null
src/eduid_webapp/jsconfig/settings/front.py
SUNET/eduid-webapp
8e531f288d50d18a5c9182003fff2ab6670a44c3
[ "BSD-3-Clause" ]
161
2017-04-13T07:56:38.000Z
2021-03-12T13:46:38.000Z
src/eduid_webapp/jsconfig/settings/front.py
SUNET/eduid-webapp
8e531f288d50d18a5c9182003fff2ab6670a44c3
[ "BSD-3-Clause" ]
3
2016-05-16T20:25:49.000Z
2018-07-27T12:10:58.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2019 SUNET # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. 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. # 3. Neither the name of the NORDUnet 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 HOLDER 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 dataclasses import dataclass, field from typing import Dict @dataclass class FrontConfig: """ Dashboard front-end configuration. This is sent to the client, so care must be taken to avoid setting sectrets here. """ debug: bool = False csrf_token: str = '' available_languages: Dict[str, str] = field( default_factory=lambda: {'en': 'English', 'sv': 'Svenska',} ) tous: Dict[str, str] = field(default_factory=lambda: {'en': '', 'sv': ''}) # URLs # TODO: Remove after new design static_staff_url: str = '' static_students_url: str = '' static_technicians_url: str = '' # TODO: Remove after new design end static_faq_url: str = '' reset_passwd_url: str = '' password_service_url: str = '' dashboard_url: str = '' personal_data_url: str = '/personal-data/user' emails_url: str = '/services/email/' mobile_url: str = '/services/phone/' oidc_proofing_url: str = '/services/oidc-proofing/proofing/' lookup_mobile_proofing_url: str = '/services/lookup-mobile-proofing/proofing/' letter_proofing_url: str = '/services/letter-proofing/' security_url: str = '/services/security/' token_service_url: str = '/services/authn/' oidc_proofing_freja_url: str = '/services/oidc-proofing/freja/proofing/' orcid_url: str = '/services/orcid/' eidas_url: str = 'http://eidas.eduid.docker:8080/' token_verify_idp: str = 'http://dev.test.swedenconnect.se/idp' # changing password password_length: int = 12 password_entropy: int = 25 chpass_timeout: int = 600 proofing_methods: list = field(default_factory=lambda: ['letter', 'lookup_mobile', 'oidc', 'eidas']) default_country_code: int = 46 signup_authn_url: str = '/services/authn/signup-authn' # This key is for signup.eduid.docker:8080 recaptcha_public_key: str = '6Lf5rCETAAAAAAW6UP4o59VSNEWG7RrzY_b5uH_M' # This key is for signup.eduid.local.emergya.info # recaptcha_public_key: str = '6Ld2IUwUAAAAAD5saiXoQKgmUC9JhQLqcHZoemTh' sentry_dsn: str = ''
43.258824
104
0.715257
483
3,677
5.331263
0.480331
0.044272
0.054369
0.029126
0.156893
0.099417
0.081553
0.081553
0.052816
0.052816
0
0.012471
0.193092
3,677
84
105
43.77381
0.85541
0.519173
0
0
0
0
0.249708
0.121637
0
0
0
0.011905
0
1
0
true
0.135135
0.054054
0
0.918919
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
1
1
0
0
1
0
0
4
b6fdf41fa834242c03db1f872624af84f8661674
9,369
py
Python
backend/schedule/tests/test_conference_schedule.py
marlenebDC/pycon
175f2ee9e8698bbcf15dd33d2eb4739fee04c6d7
[ "MIT" ]
null
null
null
backend/schedule/tests/test_conference_schedule.py
marlenebDC/pycon
175f2ee9e8698bbcf15dd33d2eb4739fee04c6d7
[ "MIT" ]
null
null
null
backend/schedule/tests/test_conference_schedule.py
marlenebDC/pycon
175f2ee9e8698bbcf15dd33d2eb4739fee04c6d7
[ "MIT" ]
null
null
null
from django.utils import timezone from freezegun import freeze_time from helpers.tests import get_image_url_from_request from pytest import mark from schedule.models import ScheduleItem def _query_conference_schedule(client, conference_code, date=None): formatted_date = None if date: formatted_date = date.isoformat() return client.query( """ query($code: String!, $date: Date) { conference(code: $code) { schedule(date: $date) { id type title submission { id } } } } """, variables={"code": conference_code, "date": formatted_date}, ) @mark.django_db def test_query_conference_schedule( graphql_client, conference_factory, schedule_item_factory, submission_factory ): now = timezone.now() conference = conference_factory(start=now, end=now + timezone.timedelta(days=3)) item1 = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.custom, title="Welcome!", submission=None, start=now, end=now + timezone.timedelta(hours=1), ) test_submission = submission_factory(conference=conference) item2 = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.submission, submission=test_submission, start=now + timezone.timedelta(hours=1), end=now + timezone.timedelta(hours=2), ) resp = _query_conference_schedule(graphql_client, conference.code) assert len(resp["data"]["conference"]["schedule"]) == 2 assert { "id": str(item1.id), "type": item1.type, "title": item1.title, "submission": None, } in resp["data"]["conference"]["schedule"] assert { "id": str(item2.id), "type": item2.type, "title": item2.title, "submission": {"id": item2.submission.hashid}, } in resp["data"]["conference"]["schedule"] @mark.django_db def test_schedule_is_ordered_by_start_date( graphql_client, conference_factory, schedule_item_factory, submission_factory ): now = timezone.now() conference = conference_factory(start=now, end=now + timezone.timedelta(days=3)) item1 = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.custom, title="Welcome!", submission=None, start=now, end=now + timezone.timedelta(hours=1), ) test_submission = submission_factory(conference=conference) item2 = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.submission, submission=test_submission, start=now + timezone.timedelta(hours=1), end=now + timezone.timedelta(hours=2), ) test_submission_2 = submission_factory(conference=conference) item3 = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.submission, submission=test_submission_2, start=now + timezone.timedelta(minutes=30), end=now + timezone.timedelta(hours=1), ) resp = _query_conference_schedule(graphql_client, conference.code) assert { "id": str(item1.id), "type": item1.type, "title": item1.title, "submission": None, } == resp["data"]["conference"]["schedule"][0] assert { "id": str(item3.id), "type": item3.type, "title": item3.title, "submission": {"id": item3.submission.hashid}, } == resp["data"]["conference"]["schedule"][1] assert { "id": str(item2.id), "type": item2.type, "title": item2.title, "submission": {"id": item2.submission.hashid}, } == resp["data"]["conference"]["schedule"][2] @freeze_time("2012-01-14 10:00:00") @mark.django_db def test_get_specific_day_schedule( graphql_client, conference_factory, schedule_item_factory, submission_factory ): now = timezone.now() conference = conference_factory(start=now, end=now + timezone.timedelta(days=3)) day_item = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.custom, title="Welcome!", submission=None, start=now, end=now + timezone.timedelta(hours=1), ) tomorrow = now + timezone.timedelta(days=1) another_day_item = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.submission, submission=submission_factory(conference=conference), start=tomorrow, end=tomorrow + timezone.timedelta(hours=1), ) resp = _query_conference_schedule(graphql_client, conference.code, date=now.date()) assert len(resp["data"]["conference"]["schedule"]) == 1 assert { "id": str(day_item.id), "type": day_item.type, "title": day_item.title, "submission": None, } in resp["data"]["conference"]["schedule"] assert { "id": str(another_day_item.id), "type": another_day_item.type, "title": another_day_item.title, "submission": {"id": another_day_item.submission.hashid}, } not in resp["data"]["conference"]["schedule"] @mark.django_db def test_get_scheduleitem_room( graphql_client, conference_factory, schedule_item_factory, submission_factory, room_factory, ): now = timezone.now() conference = conference_factory(start=now, end=now + timezone.timedelta(days=3)) room = room_factory(conference=conference) room2 = room_factory(conference=conference) schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.custom, title="Welcome!", submission=None, start=now, end=now + timezone.timedelta(hours=1), rooms=(room,), ) tomorrow = now + timezone.timedelta(days=1) schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.submission, submission=submission_factory(conference=conference), start=tomorrow, end=tomorrow + timezone.timedelta(hours=1), rooms=(room2,), ) resp = graphql_client.query( """ query($code: String!) { conference(code: $code) { schedule { rooms { name } } } } """, variables={"code": conference.code}, ) assert len(resp["data"]["conference"]["schedule"]) == 2 assert {"rooms": [{"name": room.name}]} in resp["data"]["conference"]["schedule"] assert {"rooms": [{"name": room2.name}]} in resp["data"]["conference"]["schedule"] @mark.django_db def test_get_additional_speakers( graphql_client, conference_factory, schedule_item_factory, submission_factory, room_factory, user_factory, ): another_speaker = user_factory() now = timezone.now() conference = conference_factory(start=now, end=now + timezone.timedelta(days=3)) room = room_factory(conference=conference) schedule = schedule_item_factory( conference=conference, type=ScheduleItem.TYPES.custom, title="Welcome!", submission=None, start=now, end=now + timezone.timedelta(hours=1), rooms=(room,), ) schedule.additional_speakers.add(another_speaker) resp = graphql_client.query( """ query($code: String!) { conference(code: $code) { schedule { additionalSpeakers { id username } } } } """, variables={"code": conference.code}, ) assert resp["data"]["conference"]["schedule"] == [ { "additionalSpeakers": [ {"id": str(another_speaker.id), "username": another_speaker.username} ] } ] @mark.django_db def test_get_image(graphql_client, conference_factory, schedule_item_factory, rf): request = rf.get("/") now = timezone.now() conference = conference_factory(start=now, end=now + timezone.timedelta(days=3)) conference_b = conference_factory(start=now, end=now + timezone.timedelta(days=3)) schedule_item = schedule_item_factory(conference=conference) schedule_item_factory(conference=conference_b, image=None) resp = graphql_client.query( """ query($code: String!) { conference(code: $code) { schedule { image } } } """, variables={"code": conference.code}, ) assert not resp.get("errors") assert resp["data"]["conference"]["schedule"] == [ {"image": get_image_url_from_request(request, schedule_item.image)} ] resp = graphql_client.query( """ query($code: String!) { conference(code: $code) { schedule { image } } } """, variables={"code": conference_b.code}, ) assert not resp.get("errors") assert resp["data"]["conference"]["schedule"] == [{"image": None}]
27.394737
87
0.596435
932
9,369
5.81867
0.099785
0.052738
0.07376
0.063618
0.799742
0.766734
0.722478
0.713443
0.684308
0.676932
0
0.010497
0.278045
9,369
341
88
27.475073
0.791248
0
0
0.635965
0
0
0.077997
0
0
0
0
0
0.074561
1
0.030702
false
0
0.02193
0
0.057018
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
8e050bc2b3f1aa15e45e066568340d4659b9202d
139
py
Python
wrangling/up.py
avalanchesiqi/youtube-crosstalk
06600e9c345c37540358afe9c8efce9ce9990ada
[ "MIT" ]
10
2021-03-16T10:38:29.000Z
2022-03-09T15:20:46.000Z
crawler/up.py
avalanchesiqi/youtube-crosstalk
06600e9c345c37540358afe9c8efce9ce9990ada
[ "MIT" ]
null
null
null
crawler/up.py
avalanchesiqi/youtube-crosstalk
06600e9c345c37540358afe9c8efce9ce9990ada
[ "MIT" ]
1
2021-05-15T08:05:54.000Z
2021-05-15T08:05:54.000Z
import os import sys from os.path import dirname, abspath path = dirname(dirname(abspath(__file__))) sys.path.append(path) os.chdir(path)
17.375
42
0.776978
22
139
4.727273
0.454545
0.269231
0
0
0
0
0
0
0
0
0
0
0.107914
139
7
43
19.857143
0.83871
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8e15e109e3a83dbeb6cdcff1d32f78212373d75f
161
py
Python
venv/bin/django-admin.py
phelisia/Gallery
da61db2fe7fe293c4788401c79ba42383f3658d9
[ "MIT" ]
null
null
null
venv/bin/django-admin.py
phelisia/Gallery
da61db2fe7fe293c4788401c79ba42383f3658d9
[ "MIT" ]
3
2020-06-06T00:39:27.000Z
2021-09-08T01:44:27.000Z
venv/bin/django-admin.py
phelisia/Gallery
da61db2fe7fe293c4788401c79ba42383f3658d9
[ "MIT" ]
null
null
null
#!/home/moringaschool/Desktop/gallery/venv/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26.833333
54
0.795031
20
161
5.85
0.9
0
0
0
0
0
0
0
0
0
0
0.006849
0.093168
161
5
55
32.2
0.794521
0.329193
0
0
0
0
0.074766
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
8e20a1d70224170a76e4856c5ad954e04f50a44a
117
py
Python
civicknowledge.com/sources/lib.py
CivicKnowledge/system-bundles
8f6166004cfd76d1dcf1821d407af8a864d566c2
[ "MIT" ]
null
null
null
civicknowledge.com/sources/lib.py
CivicKnowledge/system-bundles
8f6166004cfd76d1dcf1821d407af8a864d566c2
[ "MIT" ]
null
null
null
civicknowledge.com/sources/lib.py
CivicKnowledge/system-bundles
8f6166004cfd76d1dcf1821d407af8a864d566c2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Ambry Bundle Library File # Use this file for code that may be imported into other bundles
29.25
64
0.709402
19
117
4.368421
0.947368
0
0
0
0
0
0
0
0
0
0
0.010638
0.196581
117
3
65
39
0.87234
0.940171
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
8e2b5f1442cd223df3f19c293461a3d54db5af92
281
py
Python
api/staticdata/statuses/libraries/case_status_validate.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
3
2019-05-15T09:30:39.000Z
2020-04-22T16:14:23.000Z
api/staticdata/statuses/libraries/case_status_validate.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
85
2019-04-24T10:39:35.000Z
2022-03-21T14:52:12.000Z
api/staticdata/statuses/libraries/case_status_validate.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
1
2021-01-17T11:12:19.000Z
2021-01-17T11:12:19.000Z
from api.staticdata.statuses.enums import CaseStatusEnum from api.staticdata.statuses.models import CaseStatus def is_case_status_draft(status): if isinstance(status, CaseStatus): return status.status == CaseStatusEnum.DRAFT return status == CaseStatusEnum.DRAFT
31.222222
56
0.790036
33
281
6.636364
0.515152
0.063927
0.155251
0.228311
0
0
0
0
0
0
0
0
0.13879
281
8
57
35.125
0.904959
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.833333
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8e32155f26d1386b6b6b70ba1ffe369120bc8914
54
py
Python
operator_service/exceptions.py
DS-POC/operator-service
f99d10f36c694f3ebdc0c10a9b3021bc4bd5a238
[ "Apache-2.0" ]
3
2021-10-04T09:23:39.000Z
2022-02-26T21:20:21.000Z
operator_service/exceptions.py
DS-POC/operator-service
f99d10f36c694f3ebdc0c10a9b3021bc4bd5a238
[ "Apache-2.0" ]
null
null
null
operator_service/exceptions.py
DS-POC/operator-service
f99d10f36c694f3ebdc0c10a9b3021bc4bd5a238
[ "Apache-2.0" ]
null
null
null
class InvalidSignatureError(Exception): """ """
10.8
39
0.648148
3
54
11.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.185185
54
4
40
13.5
0.795455
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
f3d6f5eef0026649db817872cc921f746523d517
6,183
py
Python
ldaExp.py
poodarchu/SogouPersona
1f4cc36b519f4732aaf19b9b36c02b3f6ed88b03
[ "MIT" ]
1
2016-11-01T03:11:15.000Z
2016-11-01T03:11:15.000Z
ldaExp.py
poodarchu/SougouPersona
1f4cc36b519f4732aaf19b9b36c02b3f6ed88b03
[ "MIT" ]
null
null
null
ldaExp.py
poodarchu/SougouPersona
1f4cc36b519f4732aaf19b9b36c02b3f6ed88b03
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- import time import gensim from corpusLoader import cut2rtn, cutTest2Rtn import codecs import numpy as np topicNum = 200 word2id = {} id2word = {} maxQID = 0 # 加载语料的train或test子集,单词以句子为单位放入 orig_docs_words,类比放在 orig_docs_cat # setDocNum, orig_docs_words, orig_docs_name, orig_docs_cat, cats_docsWords, \ # cats_docNames, category_names = loader(i) UIDs, ages, genders, educations, trainQueryLists, testQueryLists = cut2rtn() # testUIDs, testQueryLists = cutTest2Rtn() corpora = trainQueryLists + testQueryLists # 当前循环所处理的语料子集,是一个list的list。每个外层list元素对应一个文档 # 每个内层list为一串 (word_id, frequency) 的pair # 这种格式是gensim的标准输入格式 corpus = [] # 保存原始文本,以供人查看 orig_filename = "corpora.orig.txt" ORIG = codecs.open(orig_filename, 'w', 'utf-8') # 每个 wordsInSentences 对应一个文档 # 每个 wordsInSentences 由许多句子组成,每个句子是一个list of words for queryList in corpora: # 统计当前文档的每个词的频率,也就是说,每一篇文档都有一个word-frequency对照表。 doc_tid2freq = {} # 循环取当前文档的一个句子 for queryToken in queryList: ORIG.write("%s " % queryToken) # 如果w已在word2id映射表中,映射成wid if queryToken in word2id: qid = word2id[queryToken] # 否则,把w加入映射表,并映射成新wid else: qid = maxQID word2id[queryToken] = maxQID id2word[maxQID] = queryToken maxQID += 1 # 统计 wid 的频率 if qid in doc_tid2freq: doc_tid2freq[qid] += 1 else: doc_tid2freq[qid] = 1 ORIG.write("\n") # 把文档中出现的wid按id大小排序 sorted_qids = sorted(doc_tid2freq.keys()) doc_pairs = [] # 把 (wid, frequency) 的对追加到当前文档的list中 for qid in sorted_qids: doc_pairs.append((qid, doc_tid2freq[qid])) # 当前文档的list已经完全生成,把它加入subcorpus,即语料子集的list中 corpus.append(doc_pairs) ORIG.close() print "Training LDA... total %d docs..." %len(corpus) startTime = time.time() # LDA训练的时候是把train和test放一起训练的(更严格的办法应该是只用train集合来训练) lda = gensim.models.ldamodel.LdaModel(corpus=corpus, num_topics=topicNum, passes=2, iterations=500, update_every=20, minimum_probability=0.001, alpha='auto', eta='auto') endTime = time.time() print "Finished in %.1f seconds" % (endTime - startTime) lda_filename = "train.svm-lda.txt" LDA = codecs.open(lda_filename, 'w', 'utf-8') print "Saving topic proportions into '%s'..." % lda_filename # 拿出一个语料子集 (train或者test) # labels = ages ageLabels = [] genderLabels = [] educationLabels = [] with codecs.open('./data/train.csv', 'r', 'utf-8') as fr: for line in fr.readlines(): line = line.split('\t') ageLabels.append(line[1]) genderLabels.append(line[2]) educationLabels.append(line[3]) fr.close() labels = zip(ageLabels, genderLabels, educationLabels) # 遍历子集中每个文档 for d, doc_pairs in enumerate(corpus[:20000]): # d is index, doc_pairs is the correspond value stored in corpus[d] # label = labels[d] LDA.write("%d %d %d" % (int(ageLabels[d]), int(genderLabels[d]), int(educationLabels[d])) ) # 把当前文档作为输入,用训练好的LDA模型求“doc-topic比例” topic_props = lda.get_document_topics(doc_pairs) # 把K个比例保存成K个特征,svmlight格式 for k, prop in topic_props: LDA.write(" %d:%.3f" % (k, prop)) LDA.write("\n") LDA.close() test_lda_filename = "test.svm-lda.txt" testLDA = codecs.open(test_lda_filename, 'w', 'utf-8') print "Saving test topic proportions into '%s'..." % test_lda_filename for d, doc_pairs in enumerate(corpus[20000:]): label = '0 0 0' testLDA.write(label) # 把当前文档作为输入,用训练好的LDA模型求“doc-topic比例” topic_props = lda.get_document_topics(doc_pairs, minimum_probability=0.001) # 把K个比例保存成K个特征,svmlight格式 for k, prop in topic_props: testLDA.write(" %d:%.3f" % (k, prop)) testLDA.write("\n") testLDA.close() print "%d docs saved" % len(corpus) # print "Now it's turn to process validation set." # # # # 当前循环所处理的语料子集,是一个list的list。每个外层list元素对应一个文档 # # 每个内层list为一串 (word_id, frequency) 的pair # # 这种格式是gensim的标准输入格式 # vCorpus = [] # # # 保存原始文本,以供人查看 # orig_filename = "validation.orig.txt" # ORIG = codecs.open(orig_filename, 'w', 'utf-8') # # 每个 wordsInSentences 对应一个文档 # # 每个 wordsInSentences 由许多句子组成,每个句子是一个list of words # for queryList in validationQueryLists: # # 统计当前文档的每个词的频率,也就是说,每一篇文档都有一个word-frequency对照表。 # doc_tid2freq = {} # # 循环取当前文档的一个句子 # for queryToken in queryList: # # ORIG.write("%s " % queryToken) # # # 如果w已在word2id映射表中,映射成wid # if queryToken in word2id: # qid = word2id[queryToken] # # 否则,把w加入映射表,并映射成新wid # else: # qid = maxQID # word2id[queryToken] = maxQID # id2word[maxQID] = queryToken # maxQID += 1 # # # 统计 wid 的频率 # if qid in doc_tid2freq: # doc_tid2freq[qid] += 1 # else: # doc_tid2freq[qid] = 1 # # ORIG.write("\n") # # 把文档中出现的wid按id大小排序 # sorted_qids = sorted(doc_tid2freq.keys()) # doc_pairs = [] # # 把 (wid, frequency) 的对追加到当前文档的list中 # for qid in sorted_qids: # doc_pairs.append((qid, doc_tid2freq[qid])) # # # 当前文档的list已经完全生成,把它加入subcorpus,即语料子集的list中 # corpus.append(doc_pairs) # # ORIG.close() # # print "Training LDA on validation set..." # startTime = time.time() # # LDA训练的时候是把train和test放一起训练的(更严格的办法应该是只用train集合来训练) # lda = gensim.models.ldamodel.LdaModel(corpus=corpus, num_topics=topicNum, passes=2, iterations=1000, alpha=50/topicNum, eta=0.1) # endTime = time.time() # print "Finished in %.1f seconds" % (endTime - startTime) # # lda_filename = "validation.svm-lda.txt" # LDA = codecs.open(lda_filename, 'w', 'utf-8') # print "Saving topic proportions into '%s'..." % lda_filename # # # 拿出一个语料子集 (train或者test) # labels = ages[16000:] # # # 遍历子集中每个文档 # for d, doc_pairs in enumerate(corpus): # d is index, doc_pairs is the correspond value stored in corpus[d] # label = int(labels[d]) # # 把当前文档作为输入,用训练好的LDA模型求“doc-topic比例” # topic_props = lda.get_document_topics(doc_pairs, minimum_probability=0.001) # LDA.write("%d" % label) # # 把K个比例保存成K个特征,svmlight格式 # for k, prop in topic_props: # LDA.write(" %d:%.3f" % (k, prop)) # LDA.write("\n") # LDA.close() # # print "%d docs saved" % len(corpus)
29.165094
169
0.664402
739
6,183
5.451962
0.26387
0.027798
0.020849
0.016133
0.718789
0.715562
0.715562
0.695706
0.656739
0.612559
0
0.019923
0.204432
6,183
211
170
29.303318
0.799146
0.518033
0
0.054054
0
0
0.099895
0
0
0
0
0
0
0
null
null
0.013514
0.067568
null
null
0.067568
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
f3dfdf005f4b817c132bc1d74ddd2731fec5a8c7
208
py
Python
kingdom_sdk/utils/loader.py
t10d/kingdom-python-core
87aa614084e5692db23e58e0c82150e858985509
[ "MIT" ]
1
2021-11-16T14:59:08.000Z
2021-11-16T14:59:08.000Z
kingdom_sdk/utils/loader.py
t10d/kingdom-python-core
87aa614084e5692db23e58e0c82150e858985509
[ "MIT" ]
2
2021-11-05T17:38:05.000Z
2021-11-18T23:06:14.000Z
kingdom_sdk/utils/loader.py
t10d/kingdom-python-core
87aa614084e5692db23e58e0c82150e858985509
[ "MIT" ]
null
null
null
from importlib import import_module from typing import Any def object_from_module(module_name: str, object_name: str) -> Any: module = import_module(module_name) return getattr(module, object_name)
26
66
0.783654
30
208
5.166667
0.4
0.154839
0.206452
0
0
0
0
0
0
0
0
0
0.149038
208
7
67
29.714286
0.875706
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.6
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6d1912e2b30b7024bf56ea671e623d6075f99fee
16
py
Python
calcipy/cli/core/__init__.py
KyleKing/dash_dev
a07c092b480777d8ee9c4854847a6e476da78470
[ "MIT" ]
1
2020-03-21T17:37:34.000Z
2020-03-21T17:37:34.000Z
calcipy/cli/core/__init__.py
KyleKing/dash_dev
a07c092b480777d8ee9c4854847a6e476da78470
[ "MIT" ]
24
2020-11-12T09:41:54.000Z
2020-12-11T01:59:58.000Z
calcipy/cli/core/__init__.py
KyleKing/dash_dev
a07c092b480777d8ee9c4854847a6e476da78470
[ "MIT" ]
null
null
null
"""Core CLI."""
8
15
0.4375
2
16
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0.125
16
1
16
16
0.5
0.5625
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
6d1d11c9bd7b9fc4c12541f388d608b80486c89d
123
py
Python
angstrom/molecule/__init__.py
kbsezginel/angstrom
793fd05b9bf27cab50d5c292fe63f685ea767d6d
[ "BSD-3-Clause" ]
15
2018-04-26T18:34:02.000Z
2022-01-25T09:37:35.000Z
angstrom/molecule/__init__.py
kbsezginel/angstrom
793fd05b9bf27cab50d5c292fe63f685ea767d6d
[ "BSD-3-Clause" ]
13
2018-07-31T17:26:10.000Z
2020-05-15T05:07:05.000Z
angstrom/molecule/__init__.py
kbsezginel/angstrom
793fd05b9bf27cab50d5c292fe63f685ea767d6d
[ "BSD-3-Clause" ]
4
2020-01-15T08:31:54.000Z
2022-03-03T16:43:15.000Z
""" --- Ångström --- Molecule class for Ångström Python package. """ from .molecule import Molecule from .cell import Cell
17.571429
43
0.723577
15
123
5.933333
0.6
0
0
0
0
0
0
0
0
0
0
0
0.154472
123
6
44
20.5
0.855769
0.487805
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
6d52f3fab2c93c3364a639f74d847fdf566c367c
341
py
Python
pitas/__init__.py
dwhan89/pitas
5da2d5fe84714e082e76a8b50c31f6faebeb8579
[ "Apache-2.0" ]
2
2020-02-26T16:08:41.000Z
2021-01-08T01:12:11.000Z
pitas/__init__.py
dwhan89/pitas
5da2d5fe84714e082e76a8b50c31f6faebeb8579
[ "Apache-2.0" ]
5
2018-07-24T18:10:14.000Z
2019-07-30T13:37:03.000Z
pitas/__init__.py
dwhan89/pitas
5da2d5fe84714e082e76a8b50c31f6faebeb8579
[ "Apache-2.0" ]
1
2020-07-30T04:58:14.000Z
2020-07-30T04:58:14.000Z
from . import pitas_io from . import config from . import power from . import wigner from . import modecoupling from . import mcm_core from . import util from . import visualize from . import mpi from . import stats from . import flipper_tools from . import act_analysis from . import constants from . import theory from . import pitas_math
21.3125
27
0.780059
50
341
5.22
0.42
0.574713
0.114943
0
0
0
0
0
0
0
0
0
0.175953
341
15
28
22.733333
0.928826
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
6d5a4b64b350b859beb3da57b1f0ca7a8a129d97
144
py
Python
Chapter 04/Chap04_Example4.17.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 04/Chap04_Example4.17.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 04/Chap04_Example4.17.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
def outer(mynum): def inner(a1): return mynum ** a1 return inner obj1 = outer(6) obj2 = outer(5) print(obj1(2)) print(obj2(3))
14.4
26
0.604167
23
144
3.782609
0.565217
0.183908
0
0
0
0
0
0
0
0
0
0.091743
0.243056
144
9
27
16
0.706422
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.125
0.5
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
ed948d44bff9f65e30e8412b56d90950380640e4
103
py
Python
gemtown/copyrights/apps.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/copyrights/apps.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/copyrights/apps.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CopyrightsConfig(AppConfig): name = 'gemtown.copyrights'
17.166667
34
0.776699
11
103
7.272727
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.145631
103
5
35
20.6
0.909091
0
0
0
0
0
0.174757
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
ed99653ec12c4351e892632092da715b63d25dd6
340
py
Python
solt/utils/__init__.py
soupault/solt
50b064b398306ff0b21f8c39968e9201b697ddc1
[ "MIT" ]
null
null
null
solt/utils/__init__.py
soupault/solt
50b064b398306ff0b21f8c39968e9201b697ddc1
[ "MIT" ]
null
null
null
solt/utils/__init__.py
soupault/solt
50b064b398306ff0b21f8c39968e9201b697ddc1
[ "MIT" ]
null
null
null
from ._checks import ensure_valid_image, validate_numeric_range_parameter, validate_parameter from ._serial import from_dict, from_json, from_yaml, Serializable __all__ = [ "from_dict", "from_json", "from_yaml", "Serializable", "ensure_valid_image", "validate_numeric_range_parameter", "validate_parameter", ]
24.285714
93
0.75
39
340
5.923077
0.410256
0.095238
0.138528
0.207792
0.848485
0.848485
0.848485
0.536797
0.536797
0
0
0
0.158824
340
13
94
26.153846
0.807692
0
0
0
0
0
0.314706
0.094118
0
0
0
0
0
1
0
false
0
0.181818
0
0.181818
0
0
0
0
null
0
0
1
1
1
1
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
ed9d9c3e419867562070e9d71f683f5c39b8e4c4
75
py
Python
PCTC/Sample R1/Q4.py
object-oriented-human/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
1
2022-02-21T15:43:01.000Z
2022-02-21T15:43:01.000Z
PCTC/Sample R1/Q4.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
PCTC/Sample R1/Q4.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
print("yes dream big") if int(input()) > 50 else print("on the small side")
75
75
0.68
14
75
3.642857
0.928571
0
0
0
0
0
0
0
0
0
0
0.03125
0.146667
75
1
75
75
0.765625
0
0
0
0
0
0.394737
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
edb3d549c901163d589a377d6ffe739b002705a7
443
py
Python
multiline.py
jtpereyda/pymultilinerewrite
88c4f854da4088f6e1e7fa14331d17c30eaf1cac
[ "MIT" ]
null
null
null
multiline.py
jtpereyda/pymultilinerewrite
88c4f854da4088f6e1e7fa14331d17c30eaf1cac
[ "MIT" ]
null
null
null
multiline.py
jtpereyda/pymultilinerewrite
88c4f854da4088f6e1e7fa14331d17c30eaf1cac
[ "MIT" ]
null
null
null
import time import sys import colorama colorama.init() print("Line 1") time.sleep(1) print("Line 2") time.sleep(1) print("Line 3 (no eol)", end="") sys.stdout.flush() time.sleep(1) print("\rLine 3 the sequel") time.sleep(1) print("\033[ALine 3 the second sequel") time.sleep(1) print("\033[A\033[A\033[ALine 1 the sequel") time.sleep(1) print() # skip two lines so that lines 2 and 3 don't get overwritten by the next console prompt print()
21.095238
96
0.711061
83
443
3.795181
0.445783
0.171429
0.190476
0.285714
0.35873
0.238095
0
0
0
0
0
0.067532
0.130926
443
21
97
21.095238
0.750649
0.191874
0
0.421053
0
0
0.310924
0.061625
0
0
0
0
0
1
0
true
0
0.157895
0
0.157895
0.421053
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
edc04690c1e2c58d71e7c936da2c175e30721751
178
py
Python
core/train.py
shink/c3d
a8c61f67c42238f8898668464594941831cddf02
[ "MIT" ]
null
null
null
core/train.py
shink/c3d
a8c61f67c42238f8898668464594941831cddf02
[ "MIT" ]
null
null
null
core/train.py
shink/c3d
a8c61f67c42238f8898668464594941831cddf02
[ "MIT" ]
null
null
null
# coding=utf-8 """ @author: shenke @project: c3d @file: train.py @date: 2021/4/20 @description: """ from conf import logger if __name__ == '__main__': pass
11.866667
27
0.601124
23
178
4.304348
1
0
0
0
0
0
0
0
0
0
0
0.067164
0.247191
178
14
28
12.714286
0.671642
0.511236
0
0
0
0
0.123077
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
4
edd385540127e07f481e9171c267e8e1356165da
699
py
Python
seungjun-moon/sample_code/chapter6/MetaClassSample1.py
dev-msj/Clean-Code
9c83d6c5d0f2d755ed3ab0dc26c2ff53f531665a
[ "MIT" ]
null
null
null
seungjun-moon/sample_code/chapter6/MetaClassSample1.py
dev-msj/Clean-Code
9c83d6c5d0f2d755ed3ab0dc26c2ff53f531665a
[ "MIT" ]
null
null
null
seungjun-moon/sample_code/chapter6/MetaClassSample1.py
dev-msj/Clean-Code
9c83d6c5d0f2d755ed3ab0dc26c2ff53f531665a
[ "MIT" ]
null
null
null
import abc class PointBadCase: """ 1. 객체가 어떤 용도인지 알 수 없다. 2. 구현을 노출한다. """ x: float y: float class Point(abc.ABCMeta): """ 1. Setter 함수명을 통해 객체가 어떤 용도인지 알 수 있다. 2. 클래스 접근 정책을 강게한다. """ __x: float __y: float __r: float __theta: float def get_x(cls) -> float: return cls.__x def get_y(cls) -> float: return cls.__y def set_cartesian(cls, x: float, y: float): cls.__x = x cls.__y = y def get_r(cls) -> float: return cls.__r def get_theta(cls) -> float: return cls.__theta def set_polar(cls, r: float, theta: float): cls.__r = r cls.__theta = theta
16.642857
47
0.533619
105
699
3.266667
0.342857
0.069971
0.163265
0.198251
0.06414
0
0
0
0
0
0
0.008889
0.356223
699
41
48
17.04878
0.753333
0.133047
0
0
0
0
0
0
0
0
0
0
0
1
0.26087
false
0
0.043478
0.173913
0.826087
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
edddc6fbf0f350787664dc9e02342c5cbf14e63d
66
py
Python
tests/__init__.py
lrivallain/vcdextproxy
6abe22f0fb156d76bafac2c9d6ba2a7b1f34842f
[ "MIT" ]
null
null
null
tests/__init__.py
lrivallain/vcdextproxy
6abe22f0fb156d76bafac2c9d6ba2a7b1f34842f
[ "MIT" ]
14
2019-11-01T18:14:15.000Z
2019-12-03T14:41:19.000Z
tests/__init__.py
lrivallain/vcdextproxy
6abe22f0fb156d76bafac2c9d6ba2a7b1f34842f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Unit test package for vcdextproxy."""
16.5
40
0.590909
8
66
4.875
1
0
0
0
0
0
0
0
0
0
0
0.018182
0.166667
66
3
41
22
0.690909
0.863636
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
edf6b97a48be8cc4192f495445402926cb30217a
127
py
Python
python/Mundo 1/ex008.py
eduardoranucci/Python-CursoEmVideo
a91f923f8d42e0eac7732de37136431a6db69a7a
[ "MIT" ]
null
null
null
python/Mundo 1/ex008.py
eduardoranucci/Python-CursoEmVideo
a91f923f8d42e0eac7732de37136431a6db69a7a
[ "MIT" ]
null
null
null
python/Mundo 1/ex008.py
eduardoranucci/Python-CursoEmVideo
a91f923f8d42e0eac7732de37136431a6db69a7a
[ "MIT" ]
null
null
null
metros = int(input('Digite o valor em metros: ')) print(f'Centímetros: {metros * 100}') print(f'Milímetros: {metros * 1000}')
25.4
49
0.677165
18
127
4.777778
0.722222
0.139535
0
0
0
0
0
0
0
0
0
0.063636
0.133858
127
4
50
31.75
0.718182
0
0
0
0
0
0.629921
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
610101552d444b7d4e7ceada3ea4ff9714e44cb7
54
py
Python
docs/data-processing/grpc/tests/__init__.py
hofmannedv/jupyter-tutorial
fcd2fa2c31bb12a5ac88aa15e5bf147573ac5847
[ "BSD-3-Clause" ]
11
2019-10-16T21:37:45.000Z
2022-01-06T21:37:58.000Z
docs/data-processing/grpc/tests/__init__.py
hofmannedv/jupyter-tutorial
fcd2fa2c31bb12a5ac88aa15e5bf147573ac5847
[ "BSD-3-Clause" ]
81
2019-08-30T06:28:10.000Z
2022-01-19T09:31:59.000Z
docs/data-processing/grpc/tests/__init__.py
hofmannedv/jupyter-tutorial
fcd2fa2c31bb12a5ac88aa15e5bf147573ac5847
[ "BSD-3-Clause" ]
7
2020-02-07T13:15:22.000Z
2022-02-06T13:58:19.000Z
"""Unit test package for the account grpc service."""
27
53
0.722222
8
54
4.875
1
0
0
0
0
0
0
0
0
0
0
0
0.148148
54
1
54
54
0.847826
0.87037
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
6115ff3a1c8bce171c452947f6b05ee38ac3ce6c
84
py
Python
src/app/users/__init__.py
cla7aye15I4nd/zhiyuan-salon-Q
3e7c91fc466f6aeef7950034d9ed84928e539cb9
[ "MIT" ]
2
2021-05-25T07:33:44.000Z
2021-05-25T07:35:11.000Z
src/app/users/__init__.py
cla7aye15I4nd/zhiyuan-salon-Q
3e7c91fc466f6aeef7950034d9ed84928e539cb9
[ "MIT" ]
null
null
null
src/app/users/__init__.py
cla7aye15I4nd/zhiyuan-salon-Q
3e7c91fc466f6aeef7950034d9ed84928e539cb9
[ "MIT" ]
null
null
null
""" user system """ from .users import users, login_manager from .models import db
16.8
39
0.72619
12
84
5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.166667
84
4
40
21
0.857143
0.130952
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
6125e3614215d8b3ef3f0accd56570d5d0683504
185
py
Python
lambdata_chrishuskey/df_utils.py
chrishuskey/lambdata_unit_3
74db2ee973437fad36a7e11f2d6bf8bb4eb19c28
[ "MIT" ]
null
null
null
lambdata_chrishuskey/df_utils.py
chrishuskey/lambdata_unit_3
74db2ee973437fad36a7e11f2d6bf8bb4eb19c28
[ "MIT" ]
4
2020-03-24T18:26:45.000Z
2021-06-02T01:00:29.000Z
lambdata_chrishuskey/df_utils.py
chrishuskey/lambdata_unit_3
74db2ee973437fad36a7e11f2d6bf8bb4eb19c28
[ "MIT" ]
null
null
null
"""df_utils: Utility functions for working specifically with dataframes.""" import pandas as pd import numpy as np # Datasets: TEST_DF = pd.DataFrame(np.full((4, 4), 8, dtype='int'))
23.125
75
0.724324
29
185
4.551724
0.793103
0
0
0
0
0
0
0
0
0
0
0.018868
0.140541
185
7
76
26.428571
0.811321
0.432432
0
0
0
0
0.030303
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
612b484fc3f814252373e2ce6a4a57a390e7a0b4
270
py
Python
albertpointscompanion/api/admin.py
monocuro-oss/albert-points-companion
49df51d8ef56f451627ea2a905d2ac97bb16008f
[ "MIT" ]
null
null
null
albertpointscompanion/api/admin.py
monocuro-oss/albert-points-companion
49df51d8ef56f451627ea2a905d2ac97bb16008f
[ "MIT" ]
null
null
null
albertpointscompanion/api/admin.py
monocuro-oss/albert-points-companion
49df51d8ef56f451627ea2a905d2ac97bb16008f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import ( MarkdownPages, CommandCategory, Command, ItemCategory, Item, ) for model in [ MarkdownPages, CommandCategory, Command, ItemCategory, Item, ]: admin.site.register(model)
14.210526
32
0.659259
25
270
7.12
0.64
0.314607
0.393258
0.52809
0.573034
0
0
0
0
0
0
0
0.262963
270
18
33
15
0.894472
0
0
0.625
0
0
0
0
0
0
0
0
0
1
0
false
0
0.125
0
0.125
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
b6561c4f5ed8acccda2d2dede1fcc0ca66dd4868
374
py
Python
mllearn/problem_transform/__init__.py
Lxinyuelxy/multi-label-learn
ab347e9c9ccac1503f22c7b76e0b3e9a4e8214da
[ "MIT" ]
4
2018-11-19T13:34:53.000Z
2020-01-11T11:58:13.000Z
mllearn/problem_transform/__init__.py
Lxinyuelxy/multi-label-learn
ab347e9c9ccac1503f22c7b76e0b3e9a4e8214da
[ "MIT" ]
null
null
null
mllearn/problem_transform/__init__.py
Lxinyuelxy/multi-label-learn
ab347e9c9ccac1503f22c7b76e0b3e9a4e8214da
[ "MIT" ]
3
2019-04-14T18:13:33.000Z
2021-04-05T14:45:56.000Z
from mllearn.problem_transform.br import BinaryRelevance from mllearn.problem_transform.cc import ClassifierChain from mllearn.problem_transform.clr import CalibratedLabelRanking from mllearn.problem_transform.klabelsets import RandomKLabelsets __all__ = ['BinaryRelevance', 'ClassifierChain', 'CalibratedLabelRanking', 'RandomKLabelsets']
41.555556
65
0.791444
33
374
8.727273
0.424242
0.152778
0.25
0.375
0
0
0
0
0
0
0
0
0.149733
374
9
66
41.555556
0.90566
0
0
0
0
0
0.181333
0.058667
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b66d60d69464402d9d07a645726dea5e405ba5f7
171
py
Python
lib/codegen/meta-python/cdsl/test_package.py
Bobo1239/cranelift
aa3c3b0135d9127f53a5e1015b061e212e4c8057
[ "Apache-2.0" ]
2
2018-09-27T03:39:03.000Z
2019-04-16T19:56:13.000Z
lib/codegen/meta-python/cdsl/test_package.py
Bobo1239/cranelift
aa3c3b0135d9127f53a5e1015b061e212e4c8057
[ "Apache-2.0" ]
1
2018-10-11T22:37:33.000Z
2018-10-12T00:09:02.000Z
lib/codegen/meta-python/cdsl/test_package.py
Bobo1239/cranelift
aa3c3b0135d9127f53a5e1015b061e212e4c8057
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import doctest import cdsl def load_tests(loader, tests, ignore): tests.addTests(doctest.DocTestSuite(cdsl)) return tests
19
46
0.789474
22
171
5.863636
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.146199
171
8
47
21.375
0.883562
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
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
fcba4e73948bc1342df3c1a8f6c630a46395ab96
557
py
Python
app/database/models/marks.py
roshnet/Electron-Server
f21ced024d69d7d96e89a2aa90c80f3d6757b3e1
[ "MIT" ]
null
null
null
app/database/models/marks.py
roshnet/Electron-Server
f21ced024d69d7d96e89a2aa90c80f3d6757b3e1
[ "MIT" ]
null
null
null
app/database/models/marks.py
roshnet/Electron-Server
f21ced024d69d7d96e89a2aa90c80f3d6757b3e1
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer, ForeignKey, String from app.database.models.base import Base from app.database.models.assignments import Assignments from app.database.models.students import Students from app.database.models.teachers import Teachers class Marks(Base): __tablename__ = "marks" id = Column(Integer, primary_key=True) student_id = Column(Integer, ForeignKey(Students.id)) teacher_id = Column(Integer, ForeignKey(Teachers.id)) assignment_id = Column(Integer, ForeignKey(Assignments.id)) marks = Column(Integer)
37.133333
63
0.779174
70
557
6.085714
0.342857
0.183099
0.215962
0.197183
0
0
0
0
0
0
0
0
0.131059
557
14
64
39.785714
0.880165
0
0
0
0
0
0.008977
0
0
0
0
0
0
1
0
false
0
0.416667
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
fcbbb200b79b29b665db3ad9a93e87440fd6308e
125
py
Python
coordinator.py
rnicoll/auto-merge
bcf90739c59067bdac382884a8278c9a75268cb4
[ "MIT" ]
1
2015-02-15T10:55:02.000Z
2015-02-15T10:55:02.000Z
coordinator.py
rnicoll/auto-merge
bcf90739c59067bdac382884a8278c9a75268cb4
[ "MIT" ]
null
null
null
coordinator.py
rnicoll/auto-merge
bcf90739c59067bdac382884a8278c9a75268cb4
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from robodoge.coordinator import app as application application.config['DEBUG'] = True application.run()
20.833333
51
0.784
16
125
6.125
0.875
0
0
0
0
0
0
0
0
0
0
0.00885
0.096
125
5
52
25
0.858407
0.136
0
0
0
0
0.046729
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
fccd419e9b2bdca225ce72d7ca4cd33b51dcda15
71
py
Python
dataset/__init__.py
ringochuchudull/dolphinvrd
71e4c04b51fedfd5c33eac228cafd01f8ae8d820
[ "MIT" ]
null
null
null
dataset/__init__.py
ringochuchudull/dolphinvrd
71e4c04b51fedfd5c33eac228cafd01f8ae8d820
[ "MIT" ]
null
null
null
dataset/__init__.py
ringochuchudull/dolphinvrd
71e4c04b51fedfd5c33eac228cafd01f8ae8d820
[ "MIT" ]
1
2021-09-24T07:26:58.000Z
2021-09-24T07:26:58.000Z
#from .imagenet_vidvrd import ImagenetVidVRD #from .vidor import VidOR
23.666667
44
0.830986
9
71
6.444444
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.112676
71
2
45
35.5
0.920635
0.943662
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
fcf913f1d909efe72a7c27854c005387d685cc5f
139
py
Python
noopy/project_template/src/views.py
acuros/noopy
aa128466068bfcdcd4be3aa16c1bdd48fd9e5a23
[ "MIT" ]
11
2016-01-16T06:00:39.000Z
2016-05-24T02:25:58.000Z
noopy/project_template/src/views.py
acuros/noopy
aa128466068bfcdcd4be3aa16c1bdd48fd9e5a23
[ "MIT" ]
4
2016-01-23T07:00:47.000Z
2016-05-09T02:49:26.000Z
noopy/project_template/src/views.py
acuros/noopy
aa128466068bfcdcd4be3aa16c1bdd48fd9e5a23
[ "MIT" ]
null
null
null
from noopy.decorators import endpoint from noopy.endpoint.methods import GET @endpoint('/', GET) def home(event, context): return ''
17.375
38
0.733813
18
139
5.666667
0.666667
0.176471
0
0
0
0
0
0
0
0
0
0
0.151079
139
7
39
19.857143
0.864407
0
0
0
0
0
0.007194
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
0
0
0
4
1e071ab4dd68fcc145479299649655961310b7e0
106
py
Python
psyneulink/core/components/functions/stateful/__init__.py
JeshuaT/PsyNeuLink
912f691028e848659055430f37b6c15273c762f1
[ "Apache-2.0" ]
67
2018-01-05T22:18:44.000Z
2022-03-27T11:27:31.000Z
psyneulink/core/components/functions/stateful/__init__.py
JeshuaT/PsyNeuLink
912f691028e848659055430f37b6c15273c762f1
[ "Apache-2.0" ]
1,064
2017-12-01T18:58:27.000Z
2022-03-31T22:22:24.000Z
psyneulink/core/components/functions/stateful/__init__.py
JeshuaT/PsyNeuLink
912f691028e848659055430f37b6c15273c762f1
[ "Apache-2.0" ]
25
2017-12-01T20:27:07.000Z
2022-03-08T21:49:39.000Z
from . import statefulfunction from .statefulfunction import * __all__ = list(statefulfunction.__all__)
17.666667
40
0.811321
10
106
7.8
0.5
0
0
0
0
0
0
0
0
0
0
0
0.122642
106
5
41
21.2
0.83871
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1e0ac913328bcf936039053ecabdef818ec74627
748
py
Python
_starter_.py
prjemian/pnx
75477ab63518d8c134ebc02bf839c60042a0461e
[ "CC-BY-4.0" ]
4
2019-03-29T17:57:48.000Z
2021-11-30T08:29:04.000Z
_starter_.py
prjemian/pnx
75477ab63518d8c134ebc02bf839c60042a0461e
[ "CC-BY-4.0" ]
189
2016-05-31T15:41:49.000Z
2022-02-18T20:18:14.000Z
_starter_.py
prjemian/pnx
75477ab63518d8c134ebc02bf839c60042a0461e
[ "CC-BY-4.0" ]
5
2017-03-12T01:31:24.000Z
2021-11-30T12:25:51.000Z
#!/usr/bin/env python import os import sys sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) # developer use # if len(sys.argv) == 1: # sys.argv.append("demo") # sys.argv.append("conf") # sys.argv.append("valid") # sys.argv.append("punx/data/33837rear_1D_1.75_16.5_NXcanSAS_v3.h5") # # sys.argv.append("C:/Users/Pete/Downloads/1998spheres.h5") # # sys.argv.append("punx/cache/v3.3/applications/NXcanSAS.nxdl.xml") # sys.argv.append("tree") # sys.argv.append("punx/data/gov_5.h5") # # sys.argv.append("punx/data/compression.h5") # # sys.argv.append("punx/data/writer_1_3.hdf5") # # sys.argv.append("punx/data/prj_test.nexus.hdf5") from punx import main print(main.__file__) main.main()
27.703704
73
0.673797
118
748
4.127119
0.457627
0.172485
0.293635
0.209446
0.262834
0.094456
0
0
0
0
0
0.046225
0.132353
748
26
74
28.769231
0.70416
0.762032
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.166667
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
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
1e0b7b6f313d87824df001a1c465fee572b7ff4f
219
py
Python
lesson12/oop_mysql_sample/model/db.py
drednout/letspython
9747442d63873b5f71e2c15ed5528bd98ad5ac31
[ "BSD-2-Clause" ]
1
2015-11-26T15:53:58.000Z
2015-11-26T15:53:58.000Z
lesson12/oop_mysql_sample/model/db.py
drednout/letspython
9747442d63873b5f71e2c15ed5528bd98ad5ac31
[ "BSD-2-Clause" ]
null
null
null
lesson12/oop_mysql_sample/model/db.py
drednout/letspython
9747442d63873b5f71e2c15ed5528bd98ad5ac31
[ "BSD-2-Clause" ]
null
null
null
import MySQLdb from _mysql import IntegrityError ModelIntegrityError = IntegrityError connection = MySQLdb.connect(host='localhost', user='root', passwd='root', db='mydb', autocommit=True)
31.285714
74
0.689498
21
219
7.142857
0.809524
0
0
0
0
0
0
0
0
0
0
0
0.210046
219
7
75
31.285714
0.867052
0
0
0
0
0
0.095455
0
0
0
0
0
0
1
0
false
0.2
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
4
1e15f8a618a204ce7ee2bc0e9993f4e19efdbc6b
185
py
Python
tests/app/wagtail_hooks.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
49
2019-03-01T15:50:32.000Z
2022-03-01T10:47:57.000Z
tests/app/wagtail_hooks.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
15
2019-08-08T11:47:27.000Z
2022-02-15T06:18:48.000Z
tests/app/wagtail_hooks.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
18
2019-03-11T19:30:49.000Z
2022-03-02T13:07:13.000Z
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Author @modeladmin_register class AuthorModelAdmin(ModelAdmin): model = Author
20.555556
78
0.827027
20
185
7.55
0.6
0.238411
0
0
0
0
0
0
0
0
0
0
0.118919
185
8
79
23.125
0.92638
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
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
1e27d8297d34beaf228f689d12f435090da0eef9
155
py
Python
setup.py
Subaru-PFS/ics_hxActor
3fae5388e535635c52e168b8a7aef0bd70b60012
[ "MIT" ]
null
null
null
setup.py
Subaru-PFS/ics_hxActor
3fae5388e535635c52e168b8a7aef0bd70b60012
[ "MIT" ]
null
null
null
setup.py
Subaru-PFS/ics_hxActor
3fae5388e535635c52e168b8a7aef0bd70b60012
[ "MIT" ]
null
null
null
import distutils from distutils.core import setup, Extension import sdss3tools import os sdss3tools.setup( description = "Toy SDSS-3 actor.", )
14.090909
43
0.741935
19
155
6.052632
0.684211
0
0
0
0
0
0
0
0
0
0
0.02381
0.187097
155
10
44
15.5
0.888889
0
0
0
0
0
0.11039
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
1e3276f4c724672a6ef39b8988bfe311c9920502
105
py
Python
embed_video/__init__.py
Nilansha/django-embed-video
2e36931f0758ad8f766015d9debc2f9c6277e717
[ "MIT" ]
null
null
null
embed_video/__init__.py
Nilansha/django-embed-video
2e36931f0758ad8f766015d9debc2f9c6277e717
[ "MIT" ]
null
null
null
embed_video/__init__.py
Nilansha/django-embed-video
2e36931f0758ad8f766015d9debc2f9c6277e717
[ "MIT" ]
null
null
null
from pkg_resources import get_distribution __version__ = get_distribution('django-embed-video').version
26.25
60
0.847619
13
105
6.307692
0.769231
0.365854
0
0
0
0
0
0
0
0
0
0
0.07619
105
3
61
35
0.845361
0
0
0
0
0
0.171429
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
1e69bfe3c7e3f4421a03ac786934dae24e471f32
50
py
Python
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/util/psi/data/incorrect/keyword/in_5.py
JetBrains-Research/ast-transformations
0ab408af3275b520cc87a473f418c4b4dfcb0284
[ "MIT" ]
8
2021-01-19T21:15:54.000Z
2022-02-23T19:16:25.000Z
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/util/psi/data/incorrect/keyword/in_5.py
JetBrains-Research/ast-transformations
0ab408af3275b520cc87a473f418c4b4dfcb0284
[ "MIT" ]
4
2020-11-17T14:28:25.000Z
2022-02-24T07:54:28.000Z
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/util/psi/data/incorrect/keyword/in_5.py
nbirillo/ast-transformations
717706765a2da29087a0de768fc851698886dd65
[ "MIT" ]
1
2022-02-23T19:16:30.000Z
2022-02-23T19:16:30.000Z
# Using the <pass> keyword in the name def pass():
25
38
0.7
9
50
3.888889
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.18
50
2
39
25
0.853659
0.72
0
0
0
0
0
0
0
0
0
0
0
0
null
null
1
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
4
1e7d30f656136eb0482e8bbc0e7d992c90053a7e
5,536
py
Python
google/ads/google_ads/v5/proto/services/ad_group_feed_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v5/proto/services/ad_group_feed_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v5/proto/services/ad_group_feed_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.ads.google_ads.v5.proto.resources import ad_group_feed_pb2 as google_dot_ads_dot_googleads__v5_dot_proto_dot_resources_dot_ad__group__feed__pb2 from google.ads.google_ads.v5.proto.services import ad_group_feed_service_pb2 as google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2 class AdGroupFeedServiceStub(object): """Proto file describing the AdGroupFeed service. Service to manage ad group feeds. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.GetAdGroupFeed = channel.unary_unary( '/google.ads.googleads.v5.services.AdGroupFeedService/GetAdGroupFeed', request_serializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.GetAdGroupFeedRequest.SerializeToString, response_deserializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_resources_dot_ad__group__feed__pb2.AdGroupFeed.FromString, ) self.MutateAdGroupFeeds = channel.unary_unary( '/google.ads.googleads.v5.services.AdGroupFeedService/MutateAdGroupFeeds', request_serializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.MutateAdGroupFeedsRequest.SerializeToString, response_deserializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.MutateAdGroupFeedsResponse.FromString, ) class AdGroupFeedServiceServicer(object): """Proto file describing the AdGroupFeed service. Service to manage ad group feeds. """ def GetAdGroupFeed(self, request, context): """Returns the requested ad group feed in full detail. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def MutateAdGroupFeeds(self, request, context): """Creates, updates, or removes ad group feeds. Operation statuses are returned. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_AdGroupFeedServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'GetAdGroupFeed': grpc.unary_unary_rpc_method_handler( servicer.GetAdGroupFeed, request_deserializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.GetAdGroupFeedRequest.FromString, response_serializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_resources_dot_ad__group__feed__pb2.AdGroupFeed.SerializeToString, ), 'MutateAdGroupFeeds': grpc.unary_unary_rpc_method_handler( servicer.MutateAdGroupFeeds, request_deserializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.MutateAdGroupFeedsRequest.FromString, response_serializer=google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.MutateAdGroupFeedsResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'google.ads.googleads.v5.services.AdGroupFeedService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class AdGroupFeedService(object): """Proto file describing the AdGroupFeed service. Service to manage ad group feeds. """ @staticmethod def GetAdGroupFeed(request, target, options=(), channel_credentials=None, call_credentials=None, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/google.ads.googleads.v5.services.AdGroupFeedService/GetAdGroupFeed', google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.GetAdGroupFeedRequest.SerializeToString, google_dot_ads_dot_googleads__v5_dot_proto_dot_resources_dot_ad__group__feed__pb2.AdGroupFeed.FromString, options, channel_credentials, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def MutateAdGroupFeeds(request, target, options=(), channel_credentials=None, call_credentials=None, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/google.ads.googleads.v5.services.AdGroupFeedService/MutateAdGroupFeeds', google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.MutateAdGroupFeedsRequest.SerializeToString, google_dot_ads_dot_googleads__v5_dot_proto_dot_services_dot_ad__group__feed__service__pb2.MutateAdGroupFeedsResponse.FromString, options, channel_credentials, call_credentials, compression, wait_for_ready, timeout, metadata)
49.873874
175
0.744581
607
5,536
6.230643
0.186161
0.038868
0.049445
0.055526
0.768905
0.764146
0.751983
0.69963
0.69963
0.666314
0
0.008305
0.195267
5,536
110
176
50.327273
0.840629
0.111091
0
0.422535
1
0
0.093666
0.067913
0
0
0
0
0
1
0.084507
false
0
0.042254
0.028169
0.197183
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1e874ff6963b3b4497fc3656424b1218fdd826d0
541
py
Python
hikcamerabot/exceptions.py
Roebou/hikvision-camera-bot
1598e6e65fa931e083cdbc0df8e7f9bc905d784d
[ "MIT" ]
null
null
null
hikcamerabot/exceptions.py
Roebou/hikvision-camera-bot
1598e6e65fa931e083cdbc0df8e7f9bc905d784d
[ "MIT" ]
null
null
null
hikcamerabot/exceptions.py
Roebou/hikvision-camera-bot
1598e6e65fa931e083cdbc0df8e7f9bc905d784d
[ "MIT" ]
null
null
null
"""Bot exceptions module.""" class CameraBotError(Exception): pass class ConfigError(Exception): pass class UserAuthError(Exception): pass class HikvisionCamError(Exception): pass class DirectoryWatcherError(Exception): pass class APIError(Exception): pass class APIRequestError(APIError): pass class APIBadResponseCodeError(APIRequestError): pass class ServiceError(Exception): pass class ServiceRuntimeError(ServiceError): pass class ServiceConfigError(ServiceError): pass
11.76087
47
0.737523
47
541
8.489362
0.361702
0.225564
0.315789
0
0
0
0
0
0
0
0
0
0.18854
541
45
48
12.022222
0.908884
0.040665
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
0
null
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
1
0
0
0
0
0
4
1eb8e5065fa0ea611b3707cbc45b819406a231b8
90
py
Python
app/auth/__init__.py
marirs/flask-api-with-jwt
0d7ffde0ea16566db65f9f521d7a9bf755d1d20b
[ "MIT" ]
null
null
null
app/auth/__init__.py
marirs/flask-api-with-jwt
0d7ffde0ea16566db65f9f521d7a9bf755d1d20b
[ "MIT" ]
null
null
null
app/auth/__init__.py
marirs/flask-api-with-jwt
0d7ffde0ea16566db65f9f521d7a9bf755d1d20b
[ "MIT" ]
null
null
null
""" Desc: Skeleton app to access API's with JWT tokens Author: [marirs,] version: 1.0 """
15
50
0.677778
15
90
4.066667
1
0
0
0
0
0
0
0
0
0
0
0.026667
0.166667
90
5
51
18
0.786667
0.9
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
1ed770737f3ed6c97e67e3ea42bdec81d41aa650
153
py
Python
apps/scheduler/apps.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
1
2019-12-12T15:38:42.000Z
2019-12-12T15:38:42.000Z
apps/scheduler/apps.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
null
null
null
apps/scheduler/apps.py
techlib/czechelib-stats
ca132e326af0924740a525710474870b1fb5fd37
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SchedulerConfig(AppConfig): name = 'scheduler' def ready(self): from . import signals # noqa
17
37
0.679739
17
153
6.117647
0.823529
0
0
0
0
0
0
0
0
0
0
0
0.24183
153
8
38
19.125
0.896552
0.026144
0
0
0
0
0.061224
0
0
0
0
0
0
1
0.2
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1ed7dd31007b5e2f1505816446ee3fe3c590a582
490
py
Python
tests/algorithms/string/knuth_morris_pratt_test.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
1
2021-06-14T01:20:09.000Z
2021-06-14T01:20:09.000Z
tests/algorithms/string/knuth_morris_pratt_test.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
null
null
null
tests/algorithms/string/knuth_morris_pratt_test.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
null
null
null
from cs.algorithms import kmp_string_match def test_knuth_morris_pratt() -> None: assert kmp_string_match("0101", "0011001011") == 5 assert kmp_string_match("abc1abc12", "alskfjaldsabc1abc1abc12k23adsfabcabc") == 14 assert kmp_string_match("abc1abc12", "alskfjaldsk23adsfabcabc") is None assert kmp_string_match("ABABX", "ABABZABABYABABX") == 10 assert kmp_string_match("AAAB", "ABAAAAAB") == 4 assert kmp_string_match("abcdabcy", "abcxabcdabxabcdabcdabcy") == 15
44.545455
86
0.75102
56
490
6.267857
0.553571
0.179487
0.279202
0.34188
0.301994
0
0
0
0
0
0
0.084507
0.130612
490
10
87
49
0.739437
0
0
0
0
0
0.314286
0.167347
0
0
0
0
0.75
1
0.125
true
0
0.125
0
0.25
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
4
1ed9c2ecf65244511c2fac951f0584404e64f008
195
py
Python
HELLOBOT-RASPBERRY/depreciated/eye_test.py
mithi/hellobot-raspberry
b422f86d5cbf97d87ee1eee7f09dedee222c947f
[ "MIT" ]
18
2017-12-30T16:40:49.000Z
2021-01-18T17:12:45.000Z
HELLOBOT-RASPBERRY/depreciated/eye_test.py
mithi/hellobot
b422f86d5cbf97d87ee1eee7f09dedee222c947f
[ "MIT" ]
null
null
null
HELLOBOT-RASPBERRY/depreciated/eye_test.py
mithi/hellobot
b422f86d5cbf97d87ee1eee7f09dedee222c947f
[ "MIT" ]
6
2018-01-20T17:17:44.000Z
2020-03-09T22:28:01.000Z
from responder import Responder from time import sleep responder = Responder() responder.default() while True: sleep(3) responder.express("hello1") sleep(3) responder.express("hello2")
16.25
31
0.748718
24
195
6.083333
0.5
0.246575
0.205479
0.30137
0
0
0
0
0
0
0
0.023952
0.14359
195
11
32
17.727273
0.850299
0
0
0.222222
0
0
0.061538
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
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
9498ce26ce4d6a7ba3e6f1fba4d3221222ec5ae8
369
py
Python
src/cfehome/aws/test_aws_conf.py
kaleelcsa/Dive-into-AWS-Course---Direct-to-S3-via-Django-JavaScript
b6a5e61288ce745851848eb4853fb70b3e67f1f7
[ "MIT" ]
31
2018-12-17T05:53:01.000Z
2022-01-11T21:54:10.000Z
src/cfehome/aws/test_aws_conf.py
kaleelcsa/Dive-into-AWS-Course---Direct-to-S3-via-Django-JavaScript
b6a5e61288ce745851848eb4853fb70b3e67f1f7
[ "MIT" ]
5
2020-06-05T19:46:46.000Z
2021-09-08T00:48:21.000Z
src/cfehome/aws/test_aws_conf.py
codingforentrepreneurs/Dive-into-AWS-Course---Direct-to-S3-via-Django-JavaScript
b6a5e61288ce745851848eb4853fb70b3e67f1f7
[ "MIT" ]
14
2019-01-09T18:33:40.000Z
2022-03-02T20:21:54.000Z
from django.test import TestCase class AWSConfigTest(TestCase): def test_import(self): from cfehome.aws.utils import AWS def test_valid_expire_hours(self): from django.conf import settings AWS_OBJECT_DOWNLOAD_HOURS = getattr(settings, 'AWS_OBJECT_DOWNLOAD_HOURS', None) self.assertTrue(type(AWS_OBJECT_DOWNLOAD_HOURS) == int)
30.75
88
0.739837
48
369
5.416667
0.5
0.103846
0.196154
0.253846
0.230769
0
0
0
0
0
0
0
0.186992
369
11
89
33.545455
0.866667
0
0
0
0
0
0.067751
0.067751
0
0
0
0
0.125
1
0.25
false
0
0.5
0
0.875
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
1
0
0
0
0
4
949c4ec0b4c2bc160be0e10e2f480514ac7c4f72
566
py
Python
mundo-03/aula22_ex109/moeda/__init__.py
fabiocoutoaraujo/CursoVideoPython
7e3b6ab89cbbba79f640d12e40f3d1e8c22295cf
[ "MIT" ]
1
2020-04-18T16:39:23.000Z
2020-04-18T16:39:23.000Z
mundo-03/aula22_ex109/moeda/__init__.py
fabiocoutoaraujo/CursoVideoPython
7e3b6ab89cbbba79f640d12e40f3d1e8c22295cf
[ "MIT" ]
null
null
null
mundo-03/aula22_ex109/moeda/__init__.py
fabiocoutoaraujo/CursoVideoPython
7e3b6ab89cbbba79f640d12e40f3d1e8c22295cf
[ "MIT" ]
null
null
null
from aula22_ex107 import moeda from aula22_ex108 import formata_moeda def metade(preco, formatar=False): return formata_moeda.metade(preco) if formatar else moeda.metade(preco) def dobro(preco, formatar=False): return formata_moeda.dobro(preco) if formatar else moeda.dobro(preco) def aumentar(preco, taxa, formatar=False): return formata_moeda.aumentar(preco, taxa) if formatar else moeda.aumentar(preco, taxa) def diminuir(preco, taxa, formatar=False): return formata_moeda.diminuir(preco, taxa) if formatar else moeda.diminuir(preco, taxa)
31.444444
91
0.782686
81
566
5.382716
0.234568
0.123853
0.174312
0.238532
0.587156
0.477064
0.183486
0
0
0
0
0.020284
0.128975
566
17
92
33.294118
0.864097
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
94cd84138f4509356cd77e89f158d9cd37d4de9a
130
py
Python
helloWorld.py
IamXolisaniNgcobo/pythonBeginner
03f90255b8f8081b940533a01c7814ead97305db
[ "MIT" ]
null
null
null
helloWorld.py
IamXolisaniNgcobo/pythonBeginner
03f90255b8f8081b940533a01c7814ead97305db
[ "MIT" ]
null
null
null
helloWorld.py
IamXolisaniNgcobo/pythonBeginner
03f90255b8f8081b940533a01c7814ead97305db
[ "MIT" ]
null
null
null
print("Hello world!") print(1 + 2) print(7 * 6) print() print("The end","Or is it?","Keep watching to learn more about Python",3)
21.666667
73
0.661538
24
130
3.583333
0.833333
0
0
0
0
0
0
0
0
0
0
0.045045
0.146154
130
6
73
21.666667
0.72973
0
0
0
0
0
0.519084
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
a20d09d82c4fd8585eb4936e44dc527852a4ad0f
215
py
Python
fastapi_migrations/__init__.py
zt50tz/fastapi-migrations
81e358a3a9ebd5a2593f5c81ddbc275122f2aca6
[ "MIT" ]
14
2020-08-30T00:23:35.000Z
2022-03-16T17:24:41.000Z
fastapi_migrations/__init__.py
zt50tz/fastapi-migrations
81e358a3a9ebd5a2593f5c81ddbc275122f2aca6
[ "MIT" ]
1
2021-03-17T01:52:20.000Z
2021-03-17T01:52:20.000Z
fastapi_migrations/__init__.py
zt50tz/fastapi-migrations
81e358a3a9ebd5a2593f5c81ddbc275122f2aca6
[ "MIT" ]
3
2020-10-01T13:32:30.000Z
2021-12-23T14:02:23.000Z
from typing import List from lib import Migrations, MigrationsConfig from cli import MigrationsCli __version__: str = '0.0.4' __all__: List[str] = [ 'Migrations', 'MigrationsConfig', 'MigrationsCli' ]
17.916667
44
0.72093
24
215
6.125
0.583333
0.353742
0
0
0
0
0
0
0
0
0
0.017045
0.181395
215
11
45
19.545455
0.818182
0
0
0
0
0
0.204651
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
bf6cf7c85038d78b261c41ba2273fd4774bcf33a
204
py
Python
ch/public_jwks.py
rohe/fed-oidc-op
7b820b034e768fda786e2c5c2e38398135cfe881
[ "Apache-2.0" ]
null
null
null
ch/public_jwks.py
rohe/fed-oidc-op
7b820b034e768fda786e2c5c2e38398135cfe881
[ "Apache-2.0" ]
null
null
null
ch/public_jwks.py
rohe/fed-oidc-op
7b820b034e768fda786e2c5c2e38398135cfe881
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys import json from oidcmsg.key_jar import KeyJar keyjar = KeyJar() keyjar.import_jwks_as_json(open(sys.argv[1]).read(), '') print(keyjar.export_jwks_as_json(issuer=''))
18.545455
56
0.754902
33
204
4.454545
0.636364
0.244898
0.244898
0
0
0
0
0
0
0
0
0.010811
0.093137
204
10
57
20.4
0.783784
0.102941
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.166667
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
bf6ec8d50b8c0daa5457c4df4e8eff401a612259
2,680
py
Python
tests/modifier/TestAddDnsLookup.py
dstore-dbap/LumberMill
b7cbadc209a83386871735b8ad88b61da917a6ab
[ "Apache-2.0" ]
15
2015-12-14T19:07:28.000Z
2022-02-28T13:32:11.000Z
tests/modifier/TestAddDnsLookup.py
dstore-dbap/LumberMill
b7cbadc209a83386871735b8ad88b61da917a6ab
[ "Apache-2.0" ]
null
null
null
tests/modifier/TestAddDnsLookup.py
dstore-dbap/LumberMill
b7cbadc209a83386871735b8ad88b61da917a6ab
[ "Apache-2.0" ]
4
2017-02-08T10:49:55.000Z
2019-03-19T18:47:46.000Z
import mock import lumbermill.utils.DictUtils as DictUtils from tests.ModuleBaseTestCase import ModuleBaseTestCase from lumbermill.modifier import AddDnsLookup class TestAddDnsLookup(ModuleBaseTestCase): def setUp(self): super(TestAddDnsLookup, self).setUp(AddDnsLookup.AddDnsLookup(mock.Mock())) def testDnsLookup(self): config = {'nameservers': '8.8.8.8', 'source_field': 'host'} self.test_object.configure(config) self.checkConfiguration() self.test_object.initAfterFork() data = DictUtils.getDefaultEventDict({'host': 'www.poitin.de'}) self.test_object.receiveEvent(data) self.test_object.shutDown() event = None for event in self.receiver.getEvent(): self.assertTrue(event['host'] == '195.128.101.111') self.assertIsNotNone(event) def testDnsLookupWithTargetField(self): config = {'nameservers': '8.8.8.8', 'source_field': 'host', 'target_field': 'host_ip_address'} self.test_object.configure(config) self.checkConfiguration() self.test_object.initAfterFork() data = DictUtils.getDefaultEventDict({'host': 'www.poitin.de'}) self.test_object.receiveEvent(data) self.test_object.shutDown() event = None for event in self.receiver.getEvent(): self.assertTrue(event['host_ip_address'] == '195.128.101.111') self.assertIsNotNone(event) def testReverseDnsLookup(self): config = {'action': 'reverse', 'source_field': 'remote_ip'} self.test_object.configure(config) self.checkConfiguration() self.test_object.initAfterFork() data = DictUtils.getDefaultEventDict({'remote_ip': '1.1.1.1'}) self.test_object.receiveEvent(data) self.test_object.shutDown() event = None for event in self.receiver.getEvent(): self.assertTrue(event['remote_ip'] == 'one.one.one.one.') self.assertIsNotNone(event) def testReverseDnsLookupwithTargetField(self): config = {'action': 'reverse', 'source_field': 'remote_ip', 'target_field': 'remote_host'} self.test_object.configure(config) self.checkConfiguration() self.test_object.initAfterFork() data = DictUtils.getDefaultEventDict({'remote_ip': '1.1.1.1'}) self.test_object.receiveEvent(data) self.test_object.shutDown() event = None for event in self.receiver.getEvent(): self.assertTrue(event['remote_host'] == 'one.one.one.one.') self.assertIsNotNone(event)
38.84058
83
0.641045
277
2,680
6.083032
0.212996
0.075964
0.132938
0.054599
0.754896
0.754896
0.754896
0.712166
0.616024
0.616024
0
0.019512
0.235075
2,680
68
84
39.411765
0.802439
0
0
0.633333
0
0
0.131716
0
0
0
0
0
0.133333
1
0.083333
false
0
0.066667
0
0.166667
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
bf70dc73fc06ea386f7627a547882ae2a774a748
32
py
Python
dajaxice/__init__.py
h3/django-dajaxice
1e31b967e6ea0d5acc84acd04cae4da004e8d861
[ "BSD-3-Clause" ]
11
2016-06-13T10:12:27.000Z
2021-07-03T18:38:33.000Z
dajaxice/__init__.py
h3/django-dajaxice
1e31b967e6ea0d5acc84acd04cae4da004e8d861
[ "BSD-3-Clause" ]
null
null
null
dajaxice/__init__.py
h3/django-dajaxice
1e31b967e6ea0d5acc84acd04cae4da004e8d861
[ "BSD-3-Clause" ]
9
2015-04-14T11:16:10.000Z
2021-09-26T18:03:23.000Z
__version__ = (0, 5, 5, 'beta')
16
31
0.5625
5
32
2.8
0.8
0
0
0
0
0
0
0
0
0
0
0.115385
0.1875
32
1
32
32
0.423077
0
0
0
0
0
0.125
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
bf8b9afe99e9fa4e9b8c2e5a7371c799765047ca
59
py
Python
support_resistance_line/__init__.py
vensentzhou/support_resistance_line
5727c5746de4f192eb063ba1ca4200a65912cdee
[ "MIT" ]
52
2019-04-29T05:28:10.000Z
2022-03-31T15:50:39.000Z
support_resistance_line/__init__.py
vensentzhou/support_resistance_line
5727c5746de4f192eb063ba1ca4200a65912cdee
[ "MIT" ]
null
null
null
support_resistance_line/__init__.py
vensentzhou/support_resistance_line
5727c5746de4f192eb063ba1ca4200a65912cdee
[ "MIT" ]
24
2019-03-07T15:39:32.000Z
2022-03-15T08:56:38.000Z
from .support_resistance_line import SupportResistanceLine
29.5
58
0.915254
6
59
8.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.067797
59
1
59
59
0.945455
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
bf9108731d6e250dbe9efffe76c62b0cf99f43ed
406
py
Python
src/sima/riflex/iterationtype.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/iterationtype.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/iterationtype.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# Generated with IterationType # from enum import Enum from enum import auto class IterationType(Enum): """""" TRUE_NEWTON_RAPHSON = auto() MODIFIED_NEWTON_RAPHSON = auto() def label(self): if self == IterationType.TRUE_NEWTON_RAPHSON: return "True Newton-Raphson" if self == IterationType.MODIFIED_NEWTON_RAPHSON: return "Modified Newton-Raphson"
27.066667
57
0.679803
45
406
5.955556
0.377778
0.291045
0.190299
0
0
0
0
0
0
0
0
0
0.236453
406
15
58
27.066667
0.864516
0.068966
0
0
1
0
0.113821
0
0
0
0
0
0
1
0.1
false
0
0.2
0
0.8
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
bf96849ee6665bfbfa28b2e41a073d59ff888c0c
21,190
py
Python
prototype/management/commands/ui_test.py
benthomasson/ansible-network-ui
6f55686f96afde731d9302538b800df879c5cc8c
[ "Apache-2.0" ]
null
null
null
prototype/management/commands/ui_test.py
benthomasson/ansible-network-ui
6f55686f96afde731d9302538b800df879c5cc8c
[ "Apache-2.0" ]
null
null
null
prototype/management/commands/ui_test.py
benthomasson/ansible-network-ui
6f55686f96afde731d9302538b800df879c5cc8c
[ "Apache-2.0" ]
null
null
null
from django.core.management.base import BaseCommand import unittest from websocket import create_connection import json import yaml import time as real_time import requests class _Time(object): def __init__(self, scale=1.0): self.scale = scale def sleep(self, n): real_time.sleep(n * self.scale) time = _Time() class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--time-scale', dest="time_scale", default=1.0, type=float) parser.add_argument('--verbose', dest="verbose", action="store_true", default=False) parser.add_argument('-q', '--quiet', dest="quiet", action="store_true", default=False) parser.add_argument('-f', '--failfast', dest="failfast", action="store_true", default=False) parser.add_argument('-b', '--buffer', dest="buffer", action="store_true", default=False) parser.add_argument('suites', nargs="*") def handle(self, *args, **options): time.scale = options.get('time_scale', 1.0) loader = unittest.TestLoader() test_suites = [TestUI, TestUIWebSocket, TestUndoPersistence, TestRedoPersistence, TestPersistence, TestViews, TestWorkerWebSocket, TestAnsibleWebSocket, TestInvalidValues] if options.get('suites'): test_suites = [x for x in test_suites if x.__name__ in options['suites']] tests = [loader.loadTestsFromTestCase(x) for x in test_suites] unittest.TextTestRunner(failfast=options.get('failfast'), verbosity=0 if options.get('quiet') else 2 if options.get('verbose') else 1, buffer=options.get('buffer')).run(unittest.TestSuite(tests)) ui = MessageHandler(create_connection("ws://localhost:8001/prototype/topology?topology_id=143")) ui.recv() ui.recv() ui.send('CoverageRequest') ui.close() class TestViews(unittest.TestCase): def test_index(self): requests.get("http://localhost:8001/prototype") class MessageHandler(object): def __init__(self, ws): self.ws = ws self.client_id = None self.topology_id = None self.receieved_messages = [] self.message_id = 0 def handle_message(self, message): message = json.loads(message) self.receieved_messages.append(message) if message[0] == "id": self.client_id = message[1] if message[0] == "topology_id": self.topology_id = message[1] def make_message(self, msg_type, **kwargs): kwargs['sender'] = self.client_id kwargs['msg_type'] = msg_type kwargs['message_id'] = self.message_id self.message_id += 1 return [msg_type, kwargs] def send(self, msg_type, **kwargs): self.ws.send(json.dumps(self.make_message(msg_type, **kwargs))) def send_message(self, message): self.ws.send(json.dumps(message)) def send_multiple(self, messages): self.ws.send(json.dumps(['MultipleMessage', dict(sender=self.client_id, messages=messages)])) def recv(self): msg = self.ws.recv() self.handle_message(msg) return msg def close(self): self.ws.close() class TestWorkerWebSocket(unittest.TestCase): def test(self): self.worker = MessageHandler(create_connection("ws://localhost:8001/prototype/worker?topology_id=143")) self.ui = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ui.recv() self.ui.recv() self.ui.send("Deploy") self.assertTrue(self.worker.recv()) self.ui.send("Destroy") self.assertTrue(self.worker.recv()) self.worker.send("Hi") def tearDown(self): self.worker.close() self.ui.close() class TestAnsibleWebSocket(unittest.TestCase): def test(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/ansible?topology_id=143")) self.ws.send('Facts', foo=5) def tearDown(self): self.ws.close() class TestPersistence(unittest.TestCase): def setUp(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ws.recv() self.ws.recv() def tearDown(self): self.ws.close() def test_DeviceCreate(self): self.ws.send('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) def test_DeviceLabelEdit(self): self.ws.send('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) time.sleep(1) self.ws.send('DeviceLabelEdit', name="Foo", previous_name="TestSwitch", id=100) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) def test_DeviceMove(self): #self.ws.send('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send_multiple([ dict(msg_type='DeviceCreate', name="TestSwitchA", x=100, y=100, type="switch", id=100), dict(msg_type='DeviceCreate', name="TestSwitchB", x=900, y=100, type="switch", id=101), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=100), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=101), dict(msg_type='LinkCreate', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1)]) time.sleep(1) for i in xrange(1, 1000): time.sleep(0.01) self.ws.send('DeviceMove', x=i, y=500, previous_x=i - 1, previous_y=500, id=100) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) def test_LinkEdit_InterfaceEdit_LinkDestroy(self): self.ws.send_multiple([ dict(msg_type='DeviceCreate', name="TestSwitchA", x=100, y=100, type="switch", id=100), dict(msg_type='DeviceCreate', name="TestSwitchB", x=900, y=100, type="switch", id=101), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=100), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=101), dict(msg_type='LinkCreate', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1)]) time.sleep(1) self.ws.send('InterfaceLabelEdit', id=1, device_id=100, name="swp2", previous_name="swp1") time.sleep(1) self.ws.send('LinkLabelEdit', id=100, name="B to A", previous_name="A to B") time.sleep(1) self.ws.send('LinkDestroy', id=100, from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=101) class TestUndoPersistence(unittest.TestCase): def setUp(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ws.recv() self.ws.recv() def test_unsupported(self): self.ws.send("Undo", original_message=['NotSupported', dict(sender=0, message_id=-1)]) def test_undo(self): self.ws.send("Undo", original_message=['Undo', dict(sender=0, message_id=-1)]) def test_redo(self): self.ws.send("Undo", original_message=['Redo', dict(sender=0, message_id=-1)]) def test_DeviceCreate(self): msg = self.ws.make_message('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send_message(msg) self.ws.send("Undo", original_message=msg) def test_DeviceDestroy(self): msg = self.ws.make_message('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send_message(msg) msg = self.ws.make_message('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) self.ws.send_message(msg) self.ws.send("Undo", original_message=msg) def test_DeviceMove(self): msg = self.ws.make_message('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send_message(msg) msg = self.ws.make_message('DeviceMove', x=100, y=100, previous_x=0, previous_y=500, id=100) self.ws.send_message(msg) self.ws.send("Undo", original_message=msg) def test_DeviceLabelEdit(self): msg = self.ws.make_message('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send_message(msg) msg = self.ws.make_message('DeviceLabelEdit', name="Foo", previous_name="TestSwitch", id=100) self.ws.send_message(msg) self.ws.send("Undo", original_message=msg) def test_DeviceSelected_DeviceUnSelected(self): self.ws.send("Undo", original_message=['DeviceSelected', dict(sender=0, message_id=-1)]) self.ws.send("Undo", original_message=['DeviceUnSelected', dict(sender=0, message_id=-1)]) def test_Snapshot(self): self.ws.send("Undo", original_message=['Snapshot', dict(sender=0, message_id=-1)]) def tearDown(self): self.ws.close() def test_LinkEdit_InterfaceEdit_LinkDestroy(self): self.ws.send_multiple([ dict(msg_type='DeviceCreate', name="TestSwitchA", x=100, y=100, type="switch", id=100), dict(msg_type='DeviceCreate', name="TestSwitchB", x=900, y=100, type="switch", id=101), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=100), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=101)]) time.sleep(1) msg = self.ws.make_message('LinkCreate', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1) self.ws.send_message(msg) self.ws.send('Undo', original_message=msg) time.sleep(1) self.ws.send('Redo', original_message=msg) time.sleep(1) msg = self.ws.make_message('LinkDestroy', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1) time.sleep(1) self.ws.send_message(msg) self.ws.send('Undo', original_message=msg) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=101) class TestRedoPersistence(unittest.TestCase): def setUp(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ws.recv() self.ws.recv() def test_unsupported(self): self.ws.send("Redo", original_message=['NotSupported', dict(sender=0, message_id=-1)]) def test_undo(self): self.ws.send("Redo", original_message=['Undo', dict(sender=0, message_id=-1)]) def test_redo(self): self.ws.send("Redo", original_message=['Redo', dict(sender=0, message_id=-1)]) def test_DeviceSelected_DeviceUnSelected(self): self.ws.send("Redo", original_message=['DeviceSelected', dict(sender=0, message_id=-1)]) self.ws.send("Redo", original_message=['DeviceUnSelected', dict(sender=0, message_id=-1)]) def test_Snapshot(self): self.ws.send("Redo", original_message=['Snapshot', dict(sender=0, message_id=-1)]) def tearDown(self): self.ws.close() class TestUIWebSocket(unittest.TestCase): def test(self): self.ui = MessageHandler(create_connection("ws://localhost:8001/prototype/topology?topology_id=143")) self.ui.recv() self.ui.recv() self.ui.send("Hello") def tearDown(self): self.ui.close() class TestUI(unittest.TestCase): def setUp(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ui = MessageHandler(create_connection("ws://localhost:8001/prototype/topology?topology_id=143")) self.ws.recv() self.ws.recv() self.ui.recv() self.ui.recv() def tearDown(self): self.ui.close() self.ws.close() def test_DeviceStatus(self): self.ws.send('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send('DeviceMove', x=100, y=100, previous_x=0, previous_y=500, id=100) self.ws.send('DeviceStatus', name="TestSwitch", working=True, status=None) time.sleep(1) self.ws.send('DeviceStatus', name="TestSwitch", working=False, status="pass") time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) def test_TaskStatus(self): self.ws.send('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send('DeviceMove', x=100, y=100, previous_x=0, previous_y=500, id=100) self.ws.send('TaskStatus', device_name="TestSwitch", task_id="1", working=True, status=None) time.sleep(1) self.ws.send('TaskStatus', device_name="TestSwitch", task_id="1", working=False, status="pass") time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) def test_DeviceSelect(self): self.ws.send('DeviceCreate', name="TestSwitch", x=0, y=500, type="switch", id=100) self.ws.send('DeviceMove', x=100, y=100, previous_x=0, previous_y=500, id=100) self.ws.send('DeviceSelected', id=100) time.sleep(1) self.ws.send('DeviceUnSelected', id=100) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) def test_LinkSelect(self): self.ws.send('DeviceCreate', name="TestSwitchA", x=100, y=100, type="switch", id=100) self.ws.send('DeviceCreate', name="TestSwitchB", x=900, y=100, type="switch", id=101) self.ws.send('InterfaceCreate', name="swp1", id=1, device_id=100) self.ws.send('InterfaceCreate', name="swp1", id=1, device_id=101) time.sleep(1) self.ws.send('LinkCreate', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1) self.ws.send('LinkSelected', id=100) time.sleep(1) self.ws.send('LinkUnSelected', id=100) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=101) def test_LinkSelect2(self): self.ws.send_multiple([ dict(msg_type='DeviceCreate', name="TestSwitchA", x=100, y=100, type="switch", id=100), dict(msg_type='DeviceCreate', name="TestSwitchB", x=900, y=100, type="switch", id=101), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=100), dict(msg_type='InterfaceCreate', name="swp1", id=1, device_id=101), dict(msg_type='LinkCreate', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1)]) self.ws.send('LinkSelected', id=100) time.sleep(1) self.ws.send('LinkUnSelected', id=100) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=101) def test_Facts(self): self.ws.send('DeviceCreate', name="TestSwitchA", x=100, y=100, type="switch", id=100) self.ws.send('DeviceCreate', name="TestSwitchB", x=900, y=100, type="switch", id=101) self.ws.send('InterfaceCreate', name="swp1", id=1, device_id=100) self.ws.send('InterfaceCreate', name="swp1", id=1, device_id=101) time.sleep(1) self.ws.send('LinkCreate', id=100, name="A to B", from_device_id=100, to_device_id=101, from_interface_id=1, to_interface_id=1) time.sleep(1) self.ws.send('Facts', key="TestSwitchA", value=dict(ansible_local=dict(ptm={'port': "swp1", 'cbl status': 'fail'}))) time.sleep(1) self.ws.send('Facts', key="TestSwitchA", value=dict(ansible_local=dict(ptm={'port': "swp1", 'cbl status': 'pass'}))) time.sleep(1) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=100) self.ws.send('DeviceDestroy', previous_name="TestSwitch", previous_x=0, previous_y=500, previous_type="switch", id=101) def test_Snapshot(self): self.ws.send('Snapshot', **yaml.load(''' devices: - id: 116 interfaces: - id: 1 name: swp1 network: 186105 remote_device_name: Switch2 remote_interface_name: swp1 name: Switch1 type: switch x: -1969 y: -320 - id: 117 interfaces: - id: 1 name: swp1 network: 186105 remote_device_name: Switch1 remote_interface_name: swp1 name: Switch2 type: switch x: -1711 y: -323 links: - from_device: Switch2 from_device_id: 117 from_interface: swp1 from_interface_id: 1 network: 186105 to_device: Switch1 to_device_id: 116 to_interface: swp1 to_interface_id: 1 name: topology topology_id: 143 ''')) time.sleep(1) class TestInvalidValues(unittest.TestCase): def test_bad_topology_id1(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=0")) self.ws.close() def test_bad_topology_id2(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=foo")) self.ws.close() def test_bad_sender(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ws.ws.send(json.dumps(['DeviceCreate', dict(sender=-1, name="TestSwitchA", x=100, y=100, type="switch", id=100)])) self.ws.ws.send(json.dumps(['DeviceDestroy', dict(sender=-1, previous_name="TestSwitchA", previous_x=100, previous_y=100, previous_type="switch", id=100)])) self.ws.close() def test_unsupported_command(self): self.ws = MessageHandler(create_connection("ws://localhost:8001/prototype/tester?topology_id=143")) self.ws.recv() self.ws.recv() self.ws.send("NotSupported") self.ws.send_multiple([dict(msg_type="NotSupported")]) self.ws.close()
39.386617
150
0.594101
2,614
21,190
4.665264
0.075746
0.065929
0.074621
0.0369
0.78196
0.757032
0.727019
0.703649
0.673391
0.673391
0
0.051603
0.265644
21,190
537
151
39.459963
0.732087
0.00387
0
0.622768
0
0
0.179419
0.036812
0
0
0
0
0.004464
1
0.127232
false
0.006696
0.015625
0
0.174107
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
bfd070f251e20ce37a6f0f9ed69849a0bf67dd57
97
py
Python
adminCustom/apps.py
Kiri23/DECE-Backend-Project
f488277bf294a4421c86efa512927e6d0f3255d6
[ "MIT" ]
null
null
null
adminCustom/apps.py
Kiri23/DECE-Backend-Project
f488277bf294a4421c86efa512927e6d0f3255d6
[ "MIT" ]
13
2019-05-24T21:13:59.000Z
2022-03-11T23:45:53.000Z
adminCustom/apps.py
Kiri23/DECE-Backend-Project
f488277bf294a4421c86efa512927e6d0f3255d6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AdmincustomConfig(AppConfig): name = 'adminCustom'
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
bfd1172be5b3c4ca9709858caf30c19600ff0e98
111
py
Python
aft/vesselregistration/apps.py
InDeepShip/InDeepShip
856f868a6c20223a6b0f221158813059a4479264
[ "MIT" ]
1
2021-01-03T18:59:29.000Z
2021-01-03T18:59:29.000Z
aft/vesselregistration/apps.py
InDeepShip/InDeepShip
856f868a6c20223a6b0f221158813059a4479264
[ "MIT" ]
null
null
null
aft/vesselregistration/apps.py
InDeepShip/InDeepShip
856f868a6c20223a6b0f221158813059a4479264
[ "MIT" ]
null
null
null
from django.apps import AppConfig class VesselregistrationConfig(AppConfig): name = 'vesselregistration'
18.5
42
0.801802
10
111
8.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.135135
111
5
43
22.2
0.927083
0
0
0
0
0
0.162162
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
bfd2620cb95c99dd285088cc678fc5f00729b2b5
140
py
Python
Python/006.py
joonion/Project-Euler
3be7ebb93dba571492dfa53cd7246614472ebc67
[ "CC0-1.0" ]
null
null
null
Python/006.py
joonion/Project-Euler
3be7ebb93dba571492dfa53cd7246614472ebc67
[ "CC0-1.0" ]
null
null
null
Python/006.py
joonion/Project-Euler
3be7ebb93dba571492dfa53cd7246614472ebc67
[ "CC0-1.0" ]
null
null
null
def solve(n): s1 = n * (n + 1) * (2 * n + 1) // 6 s2 = (n * (n + 1) // 2) ** 2 return s2 - s1 # n = 10 n = 100 print(solve(n))
15.555556
39
0.378571
27
140
1.962963
0.444444
0.113208
0.113208
0.150943
0
0
0
0
0
0
0
0.183908
0.378571
140
8
40
17.5
0.425287
0.042857
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
0.166667
1
0
1
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
bfd4477cf60eab212a6aeb3bb48f63e062cb6d44
4,590
py
Python
test/unitTests/nodeTests/testBinaryOperationNodeSum.py
pieter-hendriks/STL-monitoring
114b73b1f4b0687b11b8842b3c4a1c8af7b0d9df
[ "MIT" ]
null
null
null
test/unitTests/nodeTests/testBinaryOperationNodeSum.py
pieter-hendriks/STL-monitoring
114b73b1f4b0687b11b8842b3c4a1c8af7b0d9df
[ "MIT" ]
null
null
null
test/unitTests/nodeTests/testBinaryOperationNodeSum.py
pieter-hendriks/STL-monitoring
114b73b1f4b0687b11b8842b3c4a1c8af7b0d9df
[ "MIT" ]
null
null
null
import unittest import unittest.mock as mock from .testBinaryOperation import BinaryOperationTest from stl.tree import BinaryOperationNode from stl.signals import Signal, BooleanSignal class BinaryOperationNodeSumTest(BinaryOperationTest): def setUp(self): self.node: BinaryOperationNode = BinaryOperationNode() super().setUp() self.node.processToken("+") def testEmptySum(self): s1: Signal = Signal() self.leftChild.quantitativeValidate.return_value = s1 self.rightChild.quantitativeValidate.return_value = s1 # Empty signal sum should return empty signal self.assertEqual(Signal('sum'), self.node.quantitativeValidate(None, None)) s1 = BooleanSignal() self.leftChild.booleanValidate.return_value = s1 self.rightChild.booleanValidate.return_value = s1 # Empty signal sum should return empty signal self.assertEqual(BooleanSignal('sum'), self.node.booleanValidate(None, None)) def testPosPosSum(self): s1: Signal = Signal("s1", [0, 1, 2], [4, 5, 6], [1, 1, 0]) s2: Signal = Signal("s2", [0, 1, 2], [2, 1, 4], [-1, 3, 0]) self.leftChild.quantitativeValidate.return_value = s1 self.rightChild.quantitativeValidate.return_value = s2 rs = Signal('sum', [0, 1, 2], [6, 6, 10], [0, 4, 0]) self.assertEqual(rs, self.node.quantitativeValidate(None, None)) # Sum is unchanged over operand order self.leftChild.quantitativeValidate.return_value = s2 self.rightChild.quantitativeValidate.return_value = s1 self.assertEqual(rs, self.node.quantitativeValidate(None, None)) # BooleanSignal test: should just be Truthy values. s1 = BooleanSignal.fromSignal(s1) s2 = BooleanSignal.fromSignal(s2) self.leftChild.booleanValidate.return_value = s1 self.rightChild.booleanValidate.return_value = s2 rs = BooleanSignal("sum", [0, 1, 2], [1, 1, 1], [0, 0, 0]) self.assertEqual(rs, self.node.booleanValidate(None, None)) # Since all values in pos-pos are truthy (that is, 1), operand swap doesn't change anything. self.leftChild.booleanValidate.return_value = s2 self.rightChild.booleanValidate.return_value = s1 self.assertEqual(rs, self.node.booleanValidate(None, None)) def testPosNegSum(self): s1: Signal = Signal("s1", [0, 1, 2], [4, 6, 8], [2, 2, 0]) s2: Signal = Signal("s2", [0, 1, 2], [-2, -3, -4], [-1, -1, 0]) self.leftChild.quantitativeValidate.return_value = s1 self.rightChild.quantitativeValidate.return_value = s2 rs = Signal('sum', [0, 1, 2], [2, 3, 4], [1, 1, 0]) self.assertEqual(rs, self.node.quantitativeValidate(None, None)) # Operand order change doesn't changes the results self.leftChild.quantitativeValidate.return_value = s2 self.rightChild.quantitativeValidate.return_value = s1 self.assertEqual(rs, self.node.quantitativeValidate(None, None)) # test Boolean variant as well s1 = BooleanSignal.fromSignal(s1) s2 = BooleanSignal.fromSignal(s2) self.leftChild.booleanValidate.return_value = s1 self.rightChild.booleanValidate.return_value = s2 rs = BooleanSignal('sum', [0,1,2], [1,1,1], [0,0,0]) self.assertEqual(rs, self.node.booleanValidate(None, None)) # Swap the operands, result should be the same self.leftChild.booleanValidate.return_value = s2 self.rightChild.booleanValidate.return_value = s1 self.assertEqual(rs, self.node.booleanValidate(None, None)) def testNegNegSum(self): s1: Signal = Signal("s1", [0, 1, 2], [-1, -2, -3], [-1, -1, 0]) s2: Signal = Signal("s2", [0, 1, 2], [-2, -4, -6], [-2, -2, 0]) self.leftChild.quantitativeValidate.return_value = s1 self.rightChild.quantitativeValidate.return_value = s2 rs = Signal('sum', [0, 1, 2], [-3, -6, -9], [-3, -3, 0]) self.assertEqual(rs, self.node.quantitativeValidate(None, None)) # Sum operand order doesn't impact results self.leftChild.quantitativeValidate.return_value = s2 self.rightChild.quantitativeValidate.return_value = s1 self.assertEqual(rs, self.node.quantitativeValidate(None, None)) # Test Boolean Variant - both Signals are negative values, so get converted to False (0) s1 = BooleanSignal.fromSignal(s1) s2 = BooleanSignal.fromSignal(s2) # Then we expect all false sums rs = BooleanSignal('sum', [0,1,2], [0,0,0], [0,0,0]) self.leftChild.booleanValidate.return_value = s1 self.rightChild.booleanValidate.return_value = s2 self.assertEqual(rs, self.node.booleanValidate(None, None)) # And operand order doesn't impact that at all. self.leftChild.booleanValidate.return_value = s2 self.rightChild.booleanValidate.return_value = s1 self.assertEqual(rs, self.node.booleanValidate(None, None)) if __name__ == "__main__": unittest.main()
46.363636
94
0.731155
616
4,590
5.38961
0.157468
0.092771
0.062651
0.071687
0.771084
0.743976
0.72741
0.72741
0.689759
0.655422
0
0.041478
0.133333
4,590
99
95
46.363636
0.793112
0.128758
0
0.589744
0
0
0.011287
0
0
0
0
0
0.179487
1
0.064103
false
0
0.064103
0
0.141026
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
44bfe05632a41a975864af9bbb4b9a6da7e9394c
326
py
Python
setup.py
wafec/wafec-fi-hypothesis
e74fea0eb5da39e8f26973fa577dc4515317150c
[ "MIT" ]
null
null
null
setup.py
wafec/wafec-fi-hypothesis
e74fea0eb5da39e8f26973fa577dc4515317150c
[ "MIT" ]
null
null
null
setup.py
wafec/wafec-fi-hypothesis
e74fea0eb5da39e8f26973fa577dc4515317150c
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( packages=find_packages("src"), entry_points={ 'console_scripts': [ 'wafec-fi-hypothesis-models-create_all = wafec.fi.hypothesis.models.create_all:main', 'wafec-fi-hypothesis-server = wafec.fi.hypothesis.server:main' ] } )
27.166667
97
0.656442
37
326
5.621622
0.513514
0.134615
0.326923
0.221154
0.307692
0.307692
0
0
0
0
0
0
0.220859
326
11
98
29.636364
0.818898
0
0
0
0
0.1
0.490798
0.417178
0
0
0
0
0
1
0
true
0
0.1
0
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
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
44f6944d555355096dd24f605f3369adee2ef225
77
py
Python
py-experiments/use_imports.py
DinahLin/learning
c0dc6b52e8154bcb687b721e717c117ab3b94dbb
[ "MIT" ]
null
null
null
py-experiments/use_imports.py
DinahLin/learning
c0dc6b52e8154bcb687b721e717c117ab3b94dbb
[ "MIT" ]
null
null
null
py-experiments/use_imports.py
DinahLin/learning
c0dc6b52e8154bcb687b721e717c117ab3b94dbb
[ "MIT" ]
null
null
null
#!/usr/bin/python import imports new = imports.Import1() new.print_Hello()
11
23
0.727273
11
77
5
0.818182
0
0
0
0
0
0
0
0
0
0
0.014706
0.116883
77
6
24
12.833333
0.794118
0.207792
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7813b005d2774bbed1a29468e879652c23657f4f
794
py
Python
rentcar/config/rentcar.py
Anelka-Lazuardi/rentcar
4859ae046edc377ba5094102aab426e03c54f754
[ "MIT" ]
null
null
null
rentcar/config/rentcar.py
Anelka-Lazuardi/rentcar
4859ae046edc377ba5094102aab426e03c54f754
[ "MIT" ]
null
null
null
rentcar/config/rentcar.py
Anelka-Lazuardi/rentcar
4859ae046edc377ba5094102aab426e03c54f754
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Master"), "items": [ { "type": "doctype", "name": "Master Mobil" }, { "type": "doctype", "name": "Master Tipe Mobil" }, { "type": "doctype", "name": "Master Customer" }, { "type": "doctype", "name": "Master Driver" } ] }, { "label": _("Order List"), "items": [ { "type": "doctype", "name": "Dafatar Pesananan" }, { "type": "doctype", "name": "Kontrak Payung" }, { "type": "doctype", "name": "Pengembalian Mobil" }, { "type": "doctype", "name": "Sales Order Rent Car" } ] } ]
16.541667
39
0.43073
62
794
5.370968
0.483871
0.264264
0.36036
0.252252
0.156156
0
0
0
0
0
0
0
0.38539
794
48
40
16.541667
0.682377
0
0
0.212766
0
0
0.354717
0
0
0
0
0
0
1
0.021277
true
0
0.042553
0.021277
0.085106
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
78143acbc2cd4b0d79b80f705baf77c078b63473
45
py
Python
python/ccxt/static_dependencies/keccak/__init__.py
DavidFelsen/ccxt
6497b7da13d2ea3a9e56207b46b8691938b07839
[ "MIT" ]
24,910
2017-10-27T21:41:59.000Z
2022-03-31T23:08:57.000Z
python/ccxt/static_dependencies/keccak/__init__.py
DavidFelsen/ccxt
6497b7da13d2ea3a9e56207b46b8691938b07839
[ "MIT" ]
8,201
2017-10-28T10:19:28.000Z
2022-03-31T23:49:37.000Z
python/ccxt/static_dependencies/keccak/__init__.py
DavidFelsen/ccxt
6497b7da13d2ea3a9e56207b46b8691938b07839
[ "MIT" ]
6,632
2017-10-28T02:53:24.000Z
2022-03-31T23:20:14.000Z
from .keccak import SHA3 __all__ = ['SHA3']
11.25
24
0.688889
6
45
4.5
0.833333
0
0
0
0
0
0
0
0
0
0
0.054054
0.177778
45
3
25
15
0.675676
0
0
0
0
0
0.088889
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
78172fb03fca3e4d7631907beadb68bec41cfc2a
399
py
Python
flexlate/template_config/copier.py
nickderobertis/flexlate
81d6dbc2d87219a2a89266d6e8fb03310a24a3a1
[ "MIT" ]
null
null
null
flexlate/template_config/copier.py
nickderobertis/flexlate
81d6dbc2d87219a2a89266d6e8fb03310a24a3a1
[ "MIT" ]
25
2021-12-05T18:57:53.000Z
2022-03-29T13:45:47.000Z
flexlate/template_config/copier.py
nickderobertis/flexlate
81d6dbc2d87219a2a89266d6e8fb03310a24a3a1
[ "MIT" ]
null
null
null
from pathlib import Path from flexlate.template_config.base import TemplateConfig from flexlate.template_data import TemplateData class CopierConfig(TemplateConfig): def __init__( self, defaults: TemplateData, render_relative_root_in_template: Path = Path(".") ): super().__init__(defaults) self.render_relative_root_in_template = render_relative_root_in_template
30.692308
88
0.776942
46
399
6.26087
0.478261
0.145833
0.1875
0.208333
0.291667
0
0
0
0
0
0
0
0.157895
399
12
89
33.25
0.857143
0
0
0
0
0
0.002506
0
0
0
0
0
0
1
0.111111
false
0
0.333333
0
0.555556
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
78235ea48f6ab21697a35b19f9c98d05561363b1
35
py
Python
tests/__init__.py
luc-vdp/andex
30ef0ad9eb6eda7f7d71490902a340733a14dd4c
[ "MIT" ]
null
null
null
tests/__init__.py
luc-vdp/andex
30ef0ad9eb6eda7f7d71490902a340733a14dd4c
[ "MIT" ]
null
null
null
tests/__init__.py
luc-vdp/andex
30ef0ad9eb6eda7f7d71490902a340733a14dd4c
[ "MIT" ]
null
null
null
"""Unit test package for andex."""
17.5
34
0.657143
5
35
4.6
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
1
35
35
0.766667
0.8
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
7832fa6d80c3c5e92fe1385b5ab6ba59835367fe
60
py
Python
py509/bin/diff.py
sholsapp/py509
83bd6786a8ec1543b66c42ea5523e611c3e8dc5a
[ "Apache-2.0" ]
10
2015-04-09T17:44:19.000Z
2018-02-02T16:06:55.000Z
py509/bin/diff.py
sholsapp/py509
83bd6786a8ec1543b66c42ea5523e611c3e8dc5a
[ "Apache-2.0" ]
2
2015-06-28T22:57:19.000Z
2015-06-28T23:41:07.000Z
py509/bin/diff.py
sholsapp/py509
83bd6786a8ec1543b66c42ea5523e611c3e8dc5a
[ "Apache-2.0" ]
1
2019-11-09T01:53:15.000Z
2019-11-09T01:53:15.000Z
#!/usr/bin/env python """Diff two or more certificates."""
15
36
0.666667
9
60
4.444444
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
60
3
37
20
0.769231
0.85
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
783d50ef453af645daccdb39a45b415d7ae8d309
299
py
Python
setup.py
Datateer/upload-agent
4684bcf902d6c54baefb08446252a69612bf15a0
[ "MIT" ]
null
null
null
setup.py
Datateer/upload-agent
4684bcf902d6c54baefb08446252a69612bf15a0
[ "MIT" ]
2
2021-02-05T18:58:23.000Z
2021-02-14T15:23:46.000Z
setup.py
Datateer/upload-agent
4684bcf902d6c54baefb08446252a69612bf15a0
[ "MIT" ]
null
null
null
# from distutils.core import setup # setup( # name='datateer-upload-agent', # version='0.1dev', # packages=['datateer/upload_agent',], # license='MIT', # long_description=open('README.md').read(), # ) import setuptools setuptools.setup( packages=['datateer.upload_agent'] )
21.357143
48
0.658863
33
299
5.878788
0.666667
0.216495
0.293814
0.278351
0
0
0
0
0
0
0
0.008
0.16388
299
14
49
21.357143
0.768
0.682274
0
0
0
0
0.241379
0.241379
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
783e89ad75738678880460f09f36fa60e2375da7
22
py
Python
data/studio21_generated/introductory/4404/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4404/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4404/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def compare(s1, s2):
11
20
0.636364
4
22
3.5
1
0
0
0
0
0
0
0
0
0
0
0.111111
0.181818
22
2
21
11
0.666667
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
78438b9264e1b66872d126985d415c411a651ac4
152
py
Python
tests/testapp/admin.py
rhomboss/django-tree-queries
3c28cb826f193249843043ae08f79242cffb25ef
[ "BSD-3-Clause" ]
127
2018-07-25T22:33:12.000Z
2022-03-23T08:34:17.000Z
tests/testapp/admin.py
rhomboss/django-tree-queries
3c28cb826f193249843043ae08f79242cffb25ef
[ "BSD-3-Clause" ]
32
2019-06-28T19:29:29.000Z
2022-03-31T13:12:56.000Z
tests/testapp/admin.py
rhomboss/django-tree-queries
3c28cb826f193249843043ae08f79242cffb25ef
[ "BSD-3-Clause" ]
14
2019-09-29T05:54:22.000Z
2022-03-31T21:24:44.000Z
from django.contrib import admin from . import models @admin.register(models.Model) class ModelAdmin(admin.ModelAdmin): list_display = ("name",)
16.888889
35
0.75
19
152
5.947368
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.138158
152
8
36
19
0.862595
0
0
0
0
0
0.026316
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
78443de04acfe722f6e628b37c8e82ab6213aba0
79
py
Python
em/apps.py
thejeshpr/EM
a580905c831c6073748e75c176dfe1a2c112e7c2
[ "MIT" ]
1
2021-11-04T18:05:26.000Z
2021-11-04T18:05:26.000Z
em/apps.py
thejeshpr/em
a580905c831c6073748e75c176dfe1a2c112e7c2
[ "MIT" ]
null
null
null
em/apps.py
thejeshpr/em
a580905c831c6073748e75c176dfe1a2c112e7c2
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EmConfig(AppConfig): name = 'em'
13.166667
33
0.721519
10
79
5.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.189873
79
5
34
15.8
0.890625
0
0
0
0
0
0.025316
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
78496f40c95aa7c0314e9d461c77e61909a92e61
37
py
Python
1059.py
gabrielsilvadev/URI-python-3
c723d094a2d8cfcef471321dc469c39aee2df3c8
[ "MIT" ]
5
2020-10-12T16:21:31.000Z
2021-12-15T20:27:22.000Z
1059.py
gabrielsilvadev/URI-python-3
c723d094a2d8cfcef471321dc469c39aee2df3c8
[ "MIT" ]
null
null
null
1059.py
gabrielsilvadev/URI-python-3
c723d094a2d8cfcef471321dc469c39aee2df3c8
[ "MIT" ]
5
2019-06-21T04:26:14.000Z
2021-05-01T14:15:44.000Z
for x in range(1,51): print(x*2)
12.333333
21
0.567568
9
37
2.333333
0.888889
0
0
0
0
0
0
0
0
0
0
0.142857
0.243243
37
2
22
18.5
0.607143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
78674465a5e1cd86669afe5b9d9cb022873d4030
198
py
Python
backend/urls.py
Ravenons/torpeekerback
8cf41179a30130c7e1b97bab1398f55fae963502
[ "Unlicense" ]
null
null
null
backend/urls.py
Ravenons/torpeekerback
8cf41179a30130c7e1b97bab1398f55fae963502
[ "Unlicense" ]
3
2020-06-05T17:33:32.000Z
2021-06-10T19:15:14.000Z
backend/urls.py
Ravenons/torpeekerback
8cf41179a30130c7e1b97bab1398f55fae963502
[ "Unlicense" ]
null
null
null
from django.urls import path from backend import views urlpatterns = [ path("visit", views.visit, name="visit"), path("visit_result/<slug:ref>", views.visit_result, name="visit_result"), ]
24.75
77
0.712121
27
198
5.111111
0.481481
0.23913
0
0
0
0
0
0
0
0
0
0
0.136364
198
7
78
28.285714
0.807018
0
0
0
0
0
0.227273
0.116162
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
786feaebcabd9c6bf3a03c35924f1bfd7d77e026
684
py
Python
dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/initial-gem-content/resource-manager-plugin/resource-manager-code/update.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/initial-gem-content/resource-manager-plugin/resource-manager-code/update.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/initial-gem-content/resource-manager-plugin/resource-manager-code/update.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
def gather_writable_check_list(hook, check_list, **kwargs): pass def before_project_updated(hook, project_uploader, **kwargs): pass def after_project_updated(hook, project_uploader, **kwargs): pass def before_resource_group_updated(hook, resource_group_uploader, **kwargs): pass def after_resource_group_updated(hook, resource_group_uploader, **kwargs): pass def add_framework_version_update_writable_files(hook, from_version, to_version, writable_file_paths, **kwargs): pass def before_framework_version_updated(hook, from_version, to_version, **kwargs): pass def after_framework_version_updated(hook, from_version, to_version, **kwargs): pass
28.5
111
0.790936
91
684
5.516484
0.263736
0.159363
0.181275
0.167331
0.709163
0.641434
0.641434
0.641434
0.458167
0.458167
0
0
0.121345
684
23
112
29.73913
0.835275
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
78790b7ff81be1a63f55d66f2f62bc6e2d77e64d
62
py
Python
src/greenbudget/app/group/__init__.py
nickmflorin/django-proper-architecture-testing
da7c4019697e85f921695144375d2f548f1e98ad
[ "MIT" ]
null
null
null
src/greenbudget/app/group/__init__.py
nickmflorin/django-proper-architecture-testing
da7c4019697e85f921695144375d2f548f1e98ad
[ "MIT" ]
null
null
null
src/greenbudget/app/group/__init__.py
nickmflorin/django-proper-architecture-testing
da7c4019697e85f921695144375d2f548f1e98ad
[ "MIT" ]
null
null
null
default_app_config = 'greenbudget.app.group.apps.GroupConfig'
31
61
0.83871
8
62
6.25
0.875
0
0
0
0
0
0
0
0
0
0
0
0.048387
62
1
62
62
0.847458
0
0
0
0
0
0.612903
0.612903
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
789bdda9615a57712a3999a9a6a7f1aa5419f1f9
102
py
Python
default_signup/apps.py
mila411/django-4way-signup
d61eecf97a48720bf1963938a0c751adc6546b03
[ "MIT" ]
null
null
null
default_signup/apps.py
mila411/django-4way-signup
d61eecf97a48720bf1963938a0c751adc6546b03
[ "MIT" ]
7
2019-12-04T23:36:09.000Z
2022-02-10T09:20:45.000Z
default_signup/apps.py
mila411/django-4way-signup
d61eecf97a48720bf1963938a0c751adc6546b03
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DefaultSignupConfig(AppConfig): name = 'default_signup'
17
37
0.784314
11
102
7.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.147059
102
5
38
20.4
0.908046
0
0
0
0
0
0.137255
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
78af36bac0470452acf8bec7dabf2dd45efdef9c
132
py
Python
csc work/misc/max_of_min.py
mdnu/snake
0df9d46ab226e1b9e5da0fa697862dd81f635029
[ "MIT" ]
1
2016-10-05T21:57:20.000Z
2016-10-05T21:57:20.000Z
csc work/misc/max_of_min.py
mdnu/snake
0df9d46ab226e1b9e5da0fa697862dd81f635029
[ "MIT" ]
null
null
null
csc work/misc/max_of_min.py
mdnu/snake
0df9d46ab226e1b9e5da0fa697862dd81f635029
[ "MIT" ]
1
2020-03-19T01:43:02.000Z
2020-03-19T01:43:02.000Z
def max_of_min(num1, num2, value1, value2): min_num = min(num1, num2) min_val = min(value1, value2) return max(min_num, min_val)
26.4
43
0.727273
24
132
3.75
0.458333
0.155556
0.244444
0
0
0
0
0
0
0
0
0.070796
0.143939
132
4
44
33
0.725664
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
0
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
151f372d475f05b59140b5e00b90ea082a36d52e
1,277
py
Python
apriltag3_create_pdf/tag_aprilCircle21h7.py
ardiya/apriltag3_ros
8beea8e6c6c08ae3b121412bcfb2d7240138c7b0
[ "BSD-2-Clause" ]
null
null
null
apriltag3_create_pdf/tag_aprilCircle21h7.py
ardiya/apriltag3_ros
8beea8e6c6c08ae3b121412bcfb2d7240138c7b0
[ "BSD-2-Clause" ]
null
null
null
apriltag3_create_pdf/tag_aprilCircle21h7.py
ardiya/apriltag3_ros
8beea8e6c6c08ae3b121412bcfb2d7240138c7b0
[ "BSD-2-Clause" ]
null
null
null
from tag_type import AprilTagsType aprilCircle21h7 = AprilTagsType( name="aprilCircle21h7", tags=[ 0x0000000000157863, 0x0000000000047E28, 0x00000000001383ED, 0x000000000000953C, 0x00000000000DA68B, 0x00000000001CAC50, 0x00000000000BB215, 0x000000000016CEEE, 0x000000000005D4B3, 0x00000000001FF751, 0x00000000000EFD16, 0x0000000000072B3E, 0x0000000000163103, 0x0000000000106E56, 0x00000000001996B9, 0x00000000000C0234, 0x00000000000624D2, 0x00000000001FA985, 0x00000000000344A5, 0x00000000000762FB, 0x000000000019E92B, 0x0000000000043755, 0x000000000001A4F4, 0x000000000010FAD8, 0x0000000000001B52, 0x000000000017E59F, 0x00000000000E6F70, 0x00000000000ED47A, 0x00000000000C9931, 0x0000000000014DF2, 0x00000000000A06F1, 0x00000000000E5041, 0x000000000012EC03, 0x000000000016724E, 0x00000000000AF1A5, 0x000000000008A8AC, 0x0000000000015B39, 0x00000000001EC1E3, ], layout="xxxdddxxxxbbbbbbbxxbwwwwwbxdbwdddwbddbwdddwbddbwdddwbdxbwwwwwbxxbbbbbbbxxxxdddxxx", )
27.170213
95
0.667972
50
1,277
17.04
0.96
0
0
0
0
0
0
0
0
0
0
0.644592
0.290525
1,277
46
96
27.76087
0.295806
0
0
0
0
0
0.075176
0.06343
0
0
0.53563
0
0
1
0
false
0
0.022222
0
0.022222
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
4
151f57aaf7feff41dca8b34be41ad69fcd870008
406
py
Python
app/review/models.py
MhmdRyhn/flask_restful_with_blueprint
8122797008e4b6325ca3c4460542f0c72cb1a19c
[ "MIT" ]
null
null
null
app/review/models.py
MhmdRyhn/flask_restful_with_blueprint
8122797008e4b6325ca3c4460542f0c72cb1a19c
[ "MIT" ]
null
null
null
app/review/models.py
MhmdRyhn/flask_restful_with_blueprint
8122797008e4b6325ca3c4460542f0c72cb1a19c
[ "MIT" ]
null
null
null
from pynamodb import attributes from app.settings import DYNAMODB_CONFIG from app.core.models import BaseModel class ReviewModel(BaseModel): product_id = attributes.UnicodeAttribute(hash_key=True) user_id = attributes.UnicodeAttribute() review_text = attributes.UnicodeAttribute() class Meta(BaseModel.Meta): table_name = f"{DYNAMODB_CONFIG.get('env', 'local')}-product-review"
29
76
0.76601
48
406
6.333333
0.604167
0.256579
0.184211
0
0
0
0
0
0
0
0
0
0.140394
406
13
77
31.230769
0.87106
0
0
0
0
0
0.128079
0.125616
0
0
0
0
0
1
0
false
0
0.333333
0
0.888889
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1527489ef708de3a85d400165953080a79136989
26
py
Python
multi_mesh/io/gll_model.py
SeanNoe/MultiMesh
e83cd8521f47c723187a33015e6a4ebdd32c76e0
[ "MIT" ]
2
2019-12-07T17:48:04.000Z
2020-02-25T23:31:24.000Z
multi_mesh/io/gll_model.py
SeanNoe/MultiMesh
e83cd8521f47c723187a33015e6a4ebdd32c76e0
[ "MIT" ]
null
null
null
multi_mesh/io/gll_model.py
SeanNoe/MultiMesh
e83cd8521f47c723187a33015e6a4ebdd32c76e0
[ "MIT" ]
2
2020-03-06T15:48:17.000Z
2021-05-12T14:40:03.000Z
""" To be implemented """
6.5
17
0.576923
3
26
5
1
0
0
0
0
0
0
0
0
0
0
0
0.192308
26
3
18
8.666667
0.714286
0.653846
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
158090381647163f038beffc818ca22da47d9764
418
py
Python
PyQtArduinoSerialDemo/ArduinoSerial_PyQt_Demo_Main.py
gitter-badger/ArduinoPython
dbf6a882dd10e5746acf04ec73c0b6edb39ed90e
[ "MIT" ]
2
2018-05-05T04:03:11.000Z
2020-07-23T09:36:00.000Z
PyQtArduinoSerialDemo/ArduinoSerial_PyQt_Demo_Main.py
gitter-badger/ArduinoPython
dbf6a882dd10e5746acf04ec73c0b6edb39ed90e
[ "MIT" ]
null
null
null
PyQtArduinoSerialDemo/ArduinoSerial_PyQt_Demo_Main.py
gitter-badger/ArduinoPython
dbf6a882dd10e5746acf04ec73c0b6edb39ed90e
[ "MIT" ]
4
2016-11-23T08:46:56.000Z
2021-01-28T04:36:23.000Z
# -*- coding: utf-8 -*- """ """ import sys from PyQt4 import QtGui, QtCore as qt from ArduinoSerial_PyQt_Demo_Global import * from ArduinoSerial_PyQt_Demo_ThreadMonitorSerial import * from ArduinoSerial_PyQt_Demo_QTimerClient import * root = QtGui.QApplication(sys.argv) monitor = ThreadArduino(SERIALPORT, monitorinterval) uiclient = ThreadedUIClient(uiperiodicinterval) sys.exit(root.exec_())
24.588235
59
0.763158
46
418
6.717391
0.630435
0.165049
0.203884
0.242718
0.200647
0
0
0
0
0
0
0.005618
0.148325
418
16
60
26.125
0.86236
0.050239
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.555556
0
0.555556
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1585060c1af2be379575291d84c5b2a1c2fc05d8
281
py
Python
src/models/__init__.py
lcwong0928/hitlads
d4bfb12c3aee662f68071ca89fb35ad67cb097c0
[ "MIT" ]
null
null
null
src/models/__init__.py
lcwong0928/hitlads
d4bfb12c3aee662f68071ca89fb35ad67cb097c0
[ "MIT" ]
null
null
null
src/models/__init__.py
lcwong0928/hitlads
d4bfb12c3aee662f68071ca89fb35ad67cb097c0
[ "MIT" ]
null
null
null
from .transformer import Transformer, MultiHeadAttention, point_wise_feed_forward_network, positional_encoding, \ create_look_ahead_mask, create_padding_mask, EncoderLayer, Encoder, DecoderLayer, Decoder from .tadgan import TadGAN from .attention_tadgan import AttentionTadGAN
56.2
113
0.86121
32
281
7.21875
0.71875
0.103896
0
0
0
0
0
0
0
0
0
0
0.092527
281
4
114
70.25
0.905882
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
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
1585e844e45e785ec5d889ee9499b94de59f3820
3,575
py
Python
tests/test_templatetags.py
jonasundderwolf/django-cms-helpers
d28e3516fa7e17cb51f87c40ba1d66f692106975
[ "MIT" ]
null
null
null
tests/test_templatetags.py
jonasundderwolf/django-cms-helpers
d28e3516fa7e17cb51f87c40ba1d66f692106975
[ "MIT" ]
null
null
null
tests/test_templatetags.py
jonasundderwolf/django-cms-helpers
d28e3516fa7e17cb51f87c40ba1d66f692106975
[ "MIT" ]
null
null
null
from unittest import mock import pytest from cms.api import create_page, publish_page from django.contrib.auth.models import User from django.template import Context, Template from tests.resources.cmsapp.models import ExtensionModel @pytest.mark.django_db class TestPageTitleExtensionTemplateTag: @mock.patch('cms_helpers.templatetags.cms_helpers.Page.objects.get') def test_no_cms(self, page_mock, rf): page_mock.side_effect = NameError template = Template( '{% load cms_helpers %}{% page_titleextension 1 "extensionmodel" %}') context = Context({'request': rf.get('/')}) with pytest.raises(ImportError): assert template.render(context) == '' def test_page_not_found(self, rf): template = Template( '{% load cms_helpers %}{% page_titleextension 1 "extensionmodel" %}') context = Context({'request': rf.get('/')}) assert template.render(context) == 'None' def test_no_page(self, rf): request = rf.get('/') request.user = User() page = create_page('Test Page', 'INHERIT', 'en-us') template = Template(( '{%% load cms_helpers %%}' '{%% page_titleextension %s "extensionmodel" %%}' ) % page.pk) context = Context({'request': request}) assert template.render(context) == 'None' def test_extension_not_found(self, rf): request = rf.get('/') request.user = User.objects.create(username='admin', is_superuser=True) page = create_page('Test Page', 'INHERIT', 'en-us') publish_page(page, request.user, 'en-us') page.refresh_from_db() template = Template(( '{%% load cms_helpers %%}' '{%% page_titleextension %s "extensionmodel" %%}' ) % page.pk) context = Context({'request': request}) assert template.render(context) == 'None' def test_extension_found_public(self, rf): request = rf.get('/') request.user = User.objects.create(username='admin', is_superuser=True) page = create_page('Test Page', 'INHERIT', 'en-us') publish_page(page, request.user, 'en-us') page.refresh_from_db() ExtensionModel.objects.create( extended_object=page.get_public_object().get_title_obj(), name='public') ExtensionModel.objects.create( extended_object=page.get_draft_object().get_title_obj(), name='draft') template = Template(( '{%% load cms_helpers %%}' '{%% page_titleextension %s "extensionmodel" %%}' ) % page.pk) context = Context({'request': request}) assert template.render(context) == 'public' def test_extension_found_draft(self, rf): request = rf.get('/') request.user = User.objects.create(username='admin', is_staff=True, is_superuser=True) request.session = {'cms_edit': True} page = create_page('Test Page', 'INHERIT', 'en-us') publish_page(page, request.user, 'en-us') page.refresh_from_db() ExtensionModel.objects.create( extended_object=page.get_public_object().get_title_obj(), name='public') ExtensionModel.objects.create( extended_object=page.get_draft_object().get_title_obj(), name='draft') template = Template(( '{%% load cms_helpers %%}' '{%% page_titleextension %s "extensionmodel" %%}' ) % page.pk) context = Context({'request': request}) assert template.render(context) == 'draft'
37.631579
94
0.618741
392
3,575
5.454082
0.183673
0.037418
0.045837
0.064546
0.744153
0.744153
0.744153
0.72638
0.69551
0.69551
0
0.000736
0.239441
3,575
94
95
38.031915
0.785583
0
0
0.697368
0
0
0.191329
0.014825
0
0
0
0
0.078947
1
0.078947
false
0
0.092105
0
0.184211
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
1588c8df57582a38a23f8a96e5540c4f516691dc
93
py
Python
eb_sqs_worker/apps.py
enstrategic/django-eb-sqs-worker
1c3b5989630f6467812051a5eb83c3bd15d2ca3c
[ "MIT" ]
null
null
null
eb_sqs_worker/apps.py
enstrategic/django-eb-sqs-worker
1c3b5989630f6467812051a5eb83c3bd15d2ca3c
[ "MIT" ]
null
null
null
eb_sqs_worker/apps.py
enstrategic/django-eb-sqs-worker
1c3b5989630f6467812051a5eb83c3bd15d2ca3c
[ "MIT" ]
1
2021-11-03T21:19:28.000Z
2021-11-03T21:19:28.000Z
from django.apps import AppConfig class EbSqsConfig(AppConfig): name = 'eb_sqs_worker'
15.5
33
0.763441
12
93
5.75
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.884615
0
0
0
0
0
0.139785
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
ec66ec56ebb646ad117c383f6c78a331fb1bf911
1,043
py
Python
src/awkward/_v2/operations/structure/unzip.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
519
2019-10-17T12:36:22.000Z
2022-03-26T23:28:19.000Z
src/awkward/_v2/operations/structure/unzip.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
924
2019-11-03T21:05:01.000Z
2022-03-31T22:44:30.000Z
src/awkward/_v2/operations/structure/unzip.py
scikit-hep/awkward-1.0
a440328f8097d22c2ba053fd117fed543829afc0
[ "BSD-3-Clause" ]
56
2019-12-17T15:49:22.000Z
2022-03-09T20:34:06.000Z
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE from __future__ import absolute_import import awkward as ak np = ak.nplike.NumpyMetadata.instance() def unzip(array): pass # """ # If the `array` contains tuples or records, this operation splits them # into a Python tuple of arrays, one for each field. # If the `array` does not contain tuples or records, the single `array` # is placed in a length 1 Python tuple. # For example, # >>> array = ak.Array([{"x": 1.1, "y": [1]}, # ... {"x": 2.2, "y": [2, 2]}, # ... {"x": 3.3, "y": [3, 3, 3]}]) # >>> x, y = ak.unzip(array) # >>> x # <Array [1.1, 2.2, 3.3] type='3 * float64'> # >>> y # <Array [[1], [2, 2], [3, 3, 3]] type='3 * var * int64'> # """ # fields = ak.operations.describe.fields(array) # if len(fields) == 0: # return (array,) # else: # return tuple(array[n] for n in fields)
28.189189
87
0.517737
147
1,043
3.639456
0.489796
0.02243
0.037383
0.014953
0.018692
0
0
0
0
0
0
0.048343
0.305849
1,043
36
88
28.972222
0.690608
0.827421
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
ec6e03d3b384916b843972e51c77c84d5055cfe2
62,522
py
Python
pyCARL/carlsim/carlsim.py
saw368/CARLsim5
ba359f87e52f30341ea8332ed8f3e5af846c2687
[ "MIT" ]
18
2020-07-21T00:30:51.000Z
2022-01-14T20:21:56.000Z
pyCARL/carlsim/carlsim.py
saw368/CARLsim5
ba359f87e52f30341ea8332ed8f3e5af846c2687
[ "MIT" ]
17
2020-08-19T15:27:56.000Z
2022-02-26T12:18:11.000Z
pyCARL/carlsim/carlsim.py
saw368/CARLsim5
ba359f87e52f30341ea8332ed8f3e5af846c2687
[ "MIT" ]
11
2020-07-28T21:17:05.000Z
2022-03-07T20:30:13.000Z
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_carlsim', [dirname(__file__)]) except ImportError: import _carlsim return _carlsim if fp is not None: try: _mod = imp.load_module('_carlsim', fp, pathname, description) finally: fp.close() return _mod _carlsim = swig_import_helper() del swig_import_helper else: import _carlsim del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self, class_type, name, value, static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name, None) if method: return method(self, value) if (not static): if _newclass: object.__setattr__(self, name, value) else: self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self, class_type, name, value): return _swig_setattr_nondynamic(self, class_type, name, value, 0) def _swig_getattr_nondynamic(self, class_type, name, static=1): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name, None) if method: return method(self) if (not static): return object.__getattr__(self, name) else: raise AttributeError(name) def _swig_getattr(self, class_type, name): return _swig_getattr_nondynamic(self, class_type, name, 0) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object: pass _newclass = 0 class SwigPyIterator(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _carlsim.delete_SwigPyIterator __del__ = lambda self: None def value(self): return _carlsim.SwigPyIterator_value(self) def incr(self, n=1): return _carlsim.SwigPyIterator_incr(self, n) def decr(self, n=1): return _carlsim.SwigPyIterator_decr(self, n) def distance(self, x): return _carlsim.SwigPyIterator_distance(self, x) def equal(self, x): return _carlsim.SwigPyIterator_equal(self, x) def copy(self): return _carlsim.SwigPyIterator_copy(self) def next(self): return _carlsim.SwigPyIterator_next(self) def __next__(self): return _carlsim.SwigPyIterator___next__(self) def previous(self): return _carlsim.SwigPyIterator_previous(self) def advance(self, n): return _carlsim.SwigPyIterator_advance(self, n) def __eq__(self, x): return _carlsim.SwigPyIterator___eq__(self, x) def __ne__(self, x): return _carlsim.SwigPyIterator___ne__(self, x) def __iadd__(self, n): return _carlsim.SwigPyIterator___iadd__(self, n) def __isub__(self, n): return _carlsim.SwigPyIterator___isub__(self, n) def __add__(self, n): return _carlsim.SwigPyIterator___add__(self, n) def __sub__(self, *args): return _carlsim.SwigPyIterator___sub__(self, *args) def __iter__(self): return self SwigPyIterator_swigregister = _carlsim.SwigPyIterator_swigregister SwigPyIterator_swigregister(SwigPyIterator) _carlsim.SHARED_PTR_DISOWN_swigconstant(_carlsim) SHARED_PTR_DISOWN = _carlsim.SHARED_PTR_DISOWN class vectori(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, vectori, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, vectori, name) __repr__ = _swig_repr def iterator(self): return _carlsim.vectori_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return _carlsim.vectori___nonzero__(self) def __bool__(self): return _carlsim.vectori___bool__(self) def __len__(self): return _carlsim.vectori___len__(self) def __getslice__(self, i, j): return _carlsim.vectori___getslice__(self, i, j) def __setslice__(self, *args): return _carlsim.vectori___setslice__(self, *args) def __delslice__(self, i, j): return _carlsim.vectori___delslice__(self, i, j) def __delitem__(self, *args): return _carlsim.vectori___delitem__(self, *args) def __getitem__(self, *args): return _carlsim.vectori___getitem__(self, *args) def __setitem__(self, *args): return _carlsim.vectori___setitem__(self, *args) def pop(self): return _carlsim.vectori_pop(self) def append(self, x): return _carlsim.vectori_append(self, x) def empty(self): return _carlsim.vectori_empty(self) def size(self): return _carlsim.vectori_size(self) def swap(self, v): return _carlsim.vectori_swap(self, v) def begin(self): return _carlsim.vectori_begin(self) def end(self): return _carlsim.vectori_end(self) def rbegin(self): return _carlsim.vectori_rbegin(self) def rend(self): return _carlsim.vectori_rend(self) def clear(self): return _carlsim.vectori_clear(self) def get_allocator(self): return _carlsim.vectori_get_allocator(self) def pop_back(self): return _carlsim.vectori_pop_back(self) def erase(self, *args): return _carlsim.vectori_erase(self, *args) def __init__(self, *args): this = _carlsim.new_vectori(*args) try: self.this.append(this) except Exception: self.this = this def push_back(self, x): return _carlsim.vectori_push_back(self, x) def front(self): return _carlsim.vectori_front(self) def back(self): return _carlsim.vectori_back(self) def assign(self, n, x): return _carlsim.vectori_assign(self, n, x) def resize(self, *args): return _carlsim.vectori_resize(self, *args) def insert(self, *args): return _carlsim.vectori_insert(self, *args) def reserve(self, n): return _carlsim.vectori_reserve(self, n) def capacity(self): return _carlsim.vectori_capacity(self) __swig_destroy__ = _carlsim.delete_vectori __del__ = lambda self: None vectori_swigregister = _carlsim.vectori_swigregister vectori_swigregister(vectori) class vectord(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, vectord, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, vectord, name) __repr__ = _swig_repr def iterator(self): return _carlsim.vectord_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return _carlsim.vectord___nonzero__(self) def __bool__(self): return _carlsim.vectord___bool__(self) def __len__(self): return _carlsim.vectord___len__(self) def __getslice__(self, i, j): return _carlsim.vectord___getslice__(self, i, j) def __setslice__(self, *args): return _carlsim.vectord___setslice__(self, *args) def __delslice__(self, i, j): return _carlsim.vectord___delslice__(self, i, j) def __delitem__(self, *args): return _carlsim.vectord___delitem__(self, *args) def __getitem__(self, *args): return _carlsim.vectord___getitem__(self, *args) def __setitem__(self, *args): return _carlsim.vectord___setitem__(self, *args) def pop(self): return _carlsim.vectord_pop(self) def append(self, x): return _carlsim.vectord_append(self, x) def empty(self): return _carlsim.vectord_empty(self) def size(self): return _carlsim.vectord_size(self) def swap(self, v): return _carlsim.vectord_swap(self, v) def begin(self): return _carlsim.vectord_begin(self) def end(self): return _carlsim.vectord_end(self) def rbegin(self): return _carlsim.vectord_rbegin(self) def rend(self): return _carlsim.vectord_rend(self) def clear(self): return _carlsim.vectord_clear(self) def get_allocator(self): return _carlsim.vectord_get_allocator(self) def pop_back(self): return _carlsim.vectord_pop_back(self) def erase(self, *args): return _carlsim.vectord_erase(self, *args) def __init__(self, *args): this = _carlsim.new_vectord(*args) try: self.this.append(this) except Exception: self.this = this def push_back(self, x): return _carlsim.vectord_push_back(self, x) def front(self): return _carlsim.vectord_front(self) def back(self): return _carlsim.vectord_back(self) def assign(self, n, x): return _carlsim.vectord_assign(self, n, x) def resize(self, *args): return _carlsim.vectord_resize(self, *args) def insert(self, *args): return _carlsim.vectord_insert(self, *args) def reserve(self, n): return _carlsim.vectord_reserve(self, n) def capacity(self): return _carlsim.vectord_capacity(self) __swig_destroy__ = _carlsim.delete_vectord __del__ = lambda self: None vectord_swigregister = _carlsim.vectord_swigregister vectord_swigregister(vectord) class vectorf(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, vectorf, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, vectorf, name) __repr__ = _swig_repr def iterator(self): return _carlsim.vectorf_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return _carlsim.vectorf___nonzero__(self) def __bool__(self): return _carlsim.vectorf___bool__(self) def __len__(self): return _carlsim.vectorf___len__(self) def __getslice__(self, i, j): return _carlsim.vectorf___getslice__(self, i, j) def __setslice__(self, *args): return _carlsim.vectorf___setslice__(self, *args) def __delslice__(self, i, j): return _carlsim.vectorf___delslice__(self, i, j) def __delitem__(self, *args): return _carlsim.vectorf___delitem__(self, *args) def __getitem__(self, *args): return _carlsim.vectorf___getitem__(self, *args) def __setitem__(self, *args): return _carlsim.vectorf___setitem__(self, *args) def pop(self): return _carlsim.vectorf_pop(self) def append(self, x): return _carlsim.vectorf_append(self, x) def empty(self): return _carlsim.vectorf_empty(self) def size(self): return _carlsim.vectorf_size(self) def swap(self, v): return _carlsim.vectorf_swap(self, v) def begin(self): return _carlsim.vectorf_begin(self) def end(self): return _carlsim.vectorf_end(self) def rbegin(self): return _carlsim.vectorf_rbegin(self) def rend(self): return _carlsim.vectorf_rend(self) def clear(self): return _carlsim.vectorf_clear(self) def get_allocator(self): return _carlsim.vectorf_get_allocator(self) def pop_back(self): return _carlsim.vectorf_pop_back(self) def erase(self, *args): return _carlsim.vectorf_erase(self, *args) def __init__(self, *args): this = _carlsim.new_vectorf(*args) try: self.this.append(this) except Exception: self.this = this def push_back(self, x): return _carlsim.vectorf_push_back(self, x) def front(self): return _carlsim.vectorf_front(self) def back(self): return _carlsim.vectorf_back(self) def assign(self, n, x): return _carlsim.vectorf_assign(self, n, x) def resize(self, *args): return _carlsim.vectorf_resize(self, *args) def insert(self, *args): return _carlsim.vectorf_insert(self, *args) def reserve(self, n): return _carlsim.vectorf_reserve(self, n) def capacity(self): return _carlsim.vectorf_capacity(self) __swig_destroy__ = _carlsim.delete_vectorf __del__ = lambda self: None vectorf_swigregister = _carlsim.vectorf_swigregister vectorf_swigregister(vectorf) class vectorvf(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, vectorvf, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, vectorvf, name) __repr__ = _swig_repr def iterator(self): return _carlsim.vectorvf_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): return _carlsim.vectorvf___nonzero__(self) def __bool__(self): return _carlsim.vectorvf___bool__(self) def __len__(self): return _carlsim.vectorvf___len__(self) def __getslice__(self, i, j): return _carlsim.vectorvf___getslice__(self, i, j) def __setslice__(self, *args): return _carlsim.vectorvf___setslice__(self, *args) def __delslice__(self, i, j): return _carlsim.vectorvf___delslice__(self, i, j) def __delitem__(self, *args): return _carlsim.vectorvf___delitem__(self, *args) def __getitem__(self, *args): return _carlsim.vectorvf___getitem__(self, *args) def __setitem__(self, *args): return _carlsim.vectorvf___setitem__(self, *args) def pop(self): return _carlsim.vectorvf_pop(self) def append(self, x): return _carlsim.vectorvf_append(self, x) def empty(self): return _carlsim.vectorvf_empty(self) def size(self): return _carlsim.vectorvf_size(self) def swap(self, v): return _carlsim.vectorvf_swap(self, v) def begin(self): return _carlsim.vectorvf_begin(self) def end(self): return _carlsim.vectorvf_end(self) def rbegin(self): return _carlsim.vectorvf_rbegin(self) def rend(self): return _carlsim.vectorvf_rend(self) def clear(self): return _carlsim.vectorvf_clear(self) def get_allocator(self): return _carlsim.vectorvf_get_allocator(self) def pop_back(self): return _carlsim.vectorvf_pop_back(self) def erase(self, *args): return _carlsim.vectorvf_erase(self, *args) def __init__(self, *args): this = _carlsim.new_vectorvf(*args) try: self.this.append(this) except Exception: self.this = this def push_back(self, x): return _carlsim.vectorvf_push_back(self, x) def front(self): return _carlsim.vectorvf_front(self) def back(self): return _carlsim.vectorvf_back(self) def assign(self, n, x): return _carlsim.vectorvf_assign(self, n, x) def resize(self, *args): return _carlsim.vectorvf_resize(self, *args) def insert(self, *args): return _carlsim.vectorvf_insert(self, *args) def reserve(self, n): return _carlsim.vectorvf_reserve(self, n) def capacity(self): return _carlsim.vectorvf_capacity(self) __swig_destroy__ = _carlsim.delete_vectorvf __del__ = lambda self: None vectorvf_swigregister = _carlsim.vectorvf_swigregister vectorvf_swigregister(vectorvf) _carlsim.SYN_FIXED_swigconstant(_carlsim) SYN_FIXED = _carlsim.SYN_FIXED _carlsim.SYN_PLASTIC_swigconstant(_carlsim) SYN_PLASTIC = _carlsim.SYN_PLASTIC _carlsim.TARGET_AMPA_swigconstant(_carlsim) TARGET_AMPA = _carlsim.TARGET_AMPA _carlsim.TARGET_NMDA_swigconstant(_carlsim) TARGET_NMDA = _carlsim.TARGET_NMDA _carlsim.UNKNOWN_NEURON_swigconstant(_carlsim) UNKNOWN_NEURON = _carlsim.UNKNOWN_NEURON _carlsim.POISSON_NEURON_swigconstant(_carlsim) POISSON_NEURON = _carlsim.POISSON_NEURON _carlsim.TARGET_GABAa_swigconstant(_carlsim) TARGET_GABAa = _carlsim.TARGET_GABAa _carlsim.TARGET_GABAb_swigconstant(_carlsim) TARGET_GABAb = _carlsim.TARGET_GABAb _carlsim.TARGET_DA_swigconstant(_carlsim) TARGET_DA = _carlsim.TARGET_DA _carlsim.TARGET_5HT_swigconstant(_carlsim) TARGET_5HT = _carlsim.TARGET_5HT _carlsim.TARGET_ACh_swigconstant(_carlsim) TARGET_ACh = _carlsim.TARGET_ACh _carlsim.TARGET_NE_swigconstant(_carlsim) TARGET_NE = _carlsim.TARGET_NE _carlsim.INHIBITORY_NEURON_swigconstant(_carlsim) INHIBITORY_NEURON = _carlsim.INHIBITORY_NEURON _carlsim.EXCITATORY_NEURON_swigconstant(_carlsim) EXCITATORY_NEURON = _carlsim.EXCITATORY_NEURON _carlsim.DOPAMINERGIC_NEURON_swigconstant(_carlsim) DOPAMINERGIC_NEURON = _carlsim.DOPAMINERGIC_NEURON _carlsim.EXCITATORY_POISSON_swigconstant(_carlsim) EXCITATORY_POISSON = _carlsim.EXCITATORY_POISSON _carlsim.INHIBITORY_POISSON_swigconstant(_carlsim) INHIBITORY_POISSON = _carlsim.INHIBITORY_POISSON _carlsim.ALL_swigconstant(_carlsim) ALL = _carlsim.ALL _carlsim.ANY_swigconstant(_carlsim) ANY = _carlsim.ANY _carlsim.EXP_CURVE_swigconstant(_carlsim) EXP_CURVE = _carlsim.EXP_CURVE _carlsim.PULSE_CURVE_swigconstant(_carlsim) PULSE_CURVE = _carlsim.PULSE_CURVE _carlsim.TIMING_BASED_CURVE_swigconstant(_carlsim) TIMING_BASED_CURVE = _carlsim.TIMING_BASED_CURVE _carlsim.UNKNOWN_CURVE_swigconstant(_carlsim) UNKNOWN_CURVE = _carlsim.UNKNOWN_CURVE _carlsim.CPU_CORES_swigconstant(_carlsim) CPU_CORES = _carlsim.CPU_CORES _carlsim.GPU_CORES_swigconstant(_carlsim) GPU_CORES = _carlsim.GPU_CORES _carlsim.STANDARD_swigconstant(_carlsim) STANDARD = _carlsim.STANDARD _carlsim.DA_MOD_swigconstant(_carlsim) DA_MOD = _carlsim.DA_MOD _carlsim.UNKNOWN_STDP_swigconstant(_carlsim) UNKNOWN_STDP = _carlsim.UNKNOWN_STDP _carlsim.COUNT_swigconstant(_carlsim) COUNT = _carlsim.COUNT _carlsim.AER_swigconstant(_carlsim) AER = _carlsim.AER _carlsim.CPU_MODE_swigconstant(_carlsim) CPU_MODE = _carlsim.CPU_MODE _carlsim.GPU_MODE_swigconstant(_carlsim) GPU_MODE = _carlsim.GPU_MODE _carlsim.HYBRID_MODE_swigconstant(_carlsim) HYBRID_MODE = _carlsim.HYBRID_MODE _carlsim.USER_swigconstant(_carlsim) USER = _carlsim.USER _carlsim.DEVELOPER_swigconstant(_carlsim) DEVELOPER = _carlsim.DEVELOPER _carlsim.SHOWTIME_swigconstant(_carlsim) SHOWTIME = _carlsim.SHOWTIME _carlsim.SILENT_swigconstant(_carlsim) SILENT = _carlsim.SILENT _carlsim.CUSTOM_swigconstant(_carlsim) CUSTOM = _carlsim.CUSTOM _carlsim.UNKNOWN_LOGGER_swigconstant(_carlsim) UNKNOWN_LOGGER = _carlsim.UNKNOWN_LOGGER _carlsim.NM_DA_swigconstant(_carlsim) NM_DA = _carlsim.NM_DA _carlsim.NM_5HT_swigconstant(_carlsim) NM_5HT = _carlsim.NM_5HT _carlsim.NM_ACh_swigconstant(_carlsim) NM_ACh = _carlsim.NM_ACh _carlsim.NM_NE_swigconstant(_carlsim) NM_NE = _carlsim.NM_NE _carlsim.NM_UNKNOWN_swigconstant(_carlsim) NM_UNKNOWN = _carlsim.NM_UNKNOWN _carlsim.INTERVAL_10MS_swigconstant(_carlsim) INTERVAL_10MS = _carlsim.INTERVAL_10MS _carlsim.INTERVAL_100MS_swigconstant(_carlsim) INTERVAL_100MS = _carlsim.INTERVAL_100MS _carlsim.INTERVAL_1000MS_swigconstant(_carlsim) INTERVAL_1000MS = _carlsim.INTERVAL_1000MS _carlsim.CONFIG_STATE_swigconstant(_carlsim) CONFIG_STATE = _carlsim.CONFIG_STATE _carlsim.SETUP_STATE_swigconstant(_carlsim) SETUP_STATE = _carlsim.SETUP_STATE _carlsim.RUN_STATE_swigconstant(_carlsim) RUN_STATE = _carlsim.RUN_STATE class CARLsim(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, CARLsim, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, CARLsim, name) __repr__ = _swig_repr def __init__(self, *args): this = _carlsim.new_CARLsim(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_CARLsim __del__ = lambda self: None def createSpikeGeneratorGroup(self, *args): return _carlsim.CARLsim_createSpikeGeneratorGroup(self, *args) def createGroup(self, *args): return _carlsim.CARLsim_createGroup(self, *args) def getNumSynapticConnections(self, connectionId): return _carlsim.CARLsim_getNumSynapticConnections(self, connectionId) def connect(self, *args): return _carlsim.CARLsim_connect(self, *args) def setConductances(self, *args): return _carlsim.CARLsim_setConductances(self, *args) def setNeuronParameters(self, grpId, izh_a, izh_b, izh_c, izh_d): return _carlsim.CARLsim_setNeuronParameters(self, grpId, izh_a, izh_b, izh_c, izh_d) def setSpikeRate(self, grpId, spikeRate, refPeriod=1): return _carlsim.CARLsim_setSpikeRate(self, grpId, spikeRate, refPeriod) def setConnectionMonitor(self, grpIdPre, grpIdPost, fname): return _carlsim.CARLsim_setConnectionMonitor(self, grpIdPre, grpIdPost, fname) def setGroupMonitor(self, grpId, fname): return _carlsim.CARLsim_setGroupMonitor(self, grpId, fname) def setSpikeMonitor(self, grpId, fileName): return _carlsim.CARLsim_setSpikeMonitor(self, grpId, fileName) def setHomeostasis(self, *args): return _carlsim.CARLsim_setHomeostasis(self, *args) def setHomeoBaseFiringRate(self, grpId, baseFiring, baseFiringSD=0.0): return _carlsim.CARLsim_setHomeoBaseFiringRate(self, grpId, baseFiring, baseFiringSD) def setNeuromodulator(self, grpId, baseDP, tauDP, base5HT, tau5HT, baseACh, tauACh, baseNE, tauNE): return _carlsim.CARLsim_setNeuromodulator(self, grpId, baseDP, tauDP, base5HT, tau5HT, baseACh, tauACh, baseNE, tauNE) def setSTDP(self, *args): return _carlsim.CARLsim_setSTDP(self, *args) def setESTDP(self, *args): return _carlsim.CARLsim_setESTDP(self, *args) def setISTDP(self, *args): return _carlsim.CARLsim_setISTDP(self, *args) def setSTP(self, *args): return _carlsim.CARLsim_setSTP(self, *args) def setWeightAndWeightChangeUpdate(self, wtANDwtChangeUpdateInterval, enableWtChangeDecay, wtChangeDecay=0.9): return _carlsim.CARLsim_setWeightAndWeightChangeUpdate(self, wtANDwtChangeUpdateInterval, enableWtChangeDecay, wtChangeDecay) def saveSimulation(self, fileName, saveSynapseInfo=True): return _carlsim.CARLsim_saveSimulation(self, fileName, saveSynapseInfo) def biasWeights(self, connId, bias, updateWeightRange=False): return _carlsim.CARLsim_biasWeights(self, connId, bias, updateWeightRange) def loadSimulation(self, fid): return _carlsim.CARLsim_loadSimulation(self, fid) def scaleWeights(self, connId, scale, updateWeightRange=False): return _carlsim.CARLsim_scaleWeights(self, connId, scale, updateWeightRange) def setExternalCurrent(self, *args): return _carlsim.CARLsim_setExternalCurrent(self, *args) def setSpikeGenerator(self, grpId, spikeGenFunc): return _carlsim.CARLsim_setSpikeGenerator(self, grpId, spikeGenFunc) def getSpikeMonitor(self, grpId): return _carlsim.CARLsim_getSpikeMonitor(self, grpId) def getSimTime(self): return _carlsim.CARLsim_getSimTime(self) def getSimTimeSec(self): return _carlsim.CARLsim_getSimTimeSec(self) def getSimTimeMsec(self): return _carlsim.CARLsim_getSimTimeMsec(self) def startTesting(self, updateWeights=True): return _carlsim.CARLsim_startTesting(self, updateWeights) def stopTesting(self): return _carlsim.CARLsim_stopTesting(self) def setupNetwork(self): return _carlsim.CARLsim_setupNetwork(self) def runNetwork(self, nSec, nMsec=0, printRunSummary=True): return _carlsim.CARLsim_runNetwork(self, nSec, nMsec, printRunSummary) CARLsim_swigregister = _carlsim.CARLsim_swigregister CARLsim_swigregister(CARLsim) class PoissonRate(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, PoissonRate, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PoissonRate, name) __repr__ = _swig_repr def __init__(self, nNeur, onGPU=False): this = _carlsim.new_PoissonRate(nNeur, onGPU) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_PoissonRate __del__ = lambda self: None def getNumNeurons(self): return _carlsim.PoissonRate_getNumNeurons(self) def getRate(self, neurId): return _carlsim.PoissonRate_getRate(self, neurId) def getRates(self): return _carlsim.PoissonRate_getRates(self) def setRate(self, neurId, rate): return _carlsim.PoissonRate_setRate(self, neurId, rate) def setRates(self, *args): return _carlsim.PoissonRate_setRates(self, *args) PoissonRate_swigregister = _carlsim.PoissonRate_swigregister PoissonRate_swigregister(PoissonRate) class ConnectionMonitor(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConnectionMonitor, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConnectionMonitor, name) __repr__ = _swig_repr def __init__(self, connMonCorePtr): this = _carlsim.new_ConnectionMonitor(connMonCorePtr) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_ConnectionMonitor __del__ = lambda self: None def calcWeightChanges(self): return _carlsim.ConnectionMonitor_calcWeightChanges(self) def getConnectId(self): return _carlsim.ConnectionMonitor_getConnectId(self) def getMaxWeight(self, getCurrent=False): return _carlsim.ConnectionMonitor_getMaxWeight(self, getCurrent) def getMinWeight(self, getCurrent=False): return _carlsim.ConnectionMonitor_getMinWeight(self, getCurrent) def getNumNeuronsPre(self): return _carlsim.ConnectionMonitor_getNumNeuronsPre(self) def getNumNeuronsPost(self): return _carlsim.ConnectionMonitor_getNumNeuronsPost(self) def getNumSynapses(self): return _carlsim.ConnectionMonitor_getNumSynapses(self) def getNumWeightsChanged(self, minAbsChanged=1e-5): return _carlsim.ConnectionMonitor_getNumWeightsChanged(self, minAbsChanged) def getNumWeightsInRange(self, minValue, maxValue): return _carlsim.ConnectionMonitor_getNumWeightsInRange(self, minValue, maxValue) def getNumWeightsWithValue(self, value): return _carlsim.ConnectionMonitor_getNumWeightsWithValue(self, value) def getPercentWeightsInRange(self, minValue, maxValue): return _carlsim.ConnectionMonitor_getPercentWeightsInRange(self, minValue, maxValue) def getPercentWeightsWithValue(self, value): return _carlsim.ConnectionMonitor_getPercentWeightsWithValue(self, value) def getPercentWeightsChanged(self, minAbsChanged=1e-5): return _carlsim.ConnectionMonitor_getPercentWeightsChanged(self, minAbsChanged) def getTimeMsCurrentSnapshot(self): return _carlsim.ConnectionMonitor_getTimeMsCurrentSnapshot(self) def getTimeMsLastSnapshot(self): return _carlsim.ConnectionMonitor_getTimeMsLastSnapshot(self) def getTimeMsSinceLastSnapshot(self): return _carlsim.ConnectionMonitor_getTimeMsSinceLastSnapshot(self) def getTotalAbsWeightChange(self): return _carlsim.ConnectionMonitor_getTotalAbsWeightChange(self) def _print(self): return _carlsim.ConnectionMonitor__print(self) def printSparse(self, neurPostId=-1, maxConn=100, connPerLine=4): return _carlsim.ConnectionMonitor_printSparse(self, neurPostId, maxConn, connPerLine) def takeSnapshot(self): return _carlsim.ConnectionMonitor_takeSnapshot(self) def takeSnapshot1D(self): return _carlsim.ConnectionMonitor_takeSnapshot1D(self) def testPrint(self, data): return _carlsim.ConnectionMonitor_testPrint(self, data) ConnectionMonitor_swigregister = _carlsim.ConnectionMonitor_swigregister ConnectionMonitor_swigregister(ConnectionMonitor) class GroupMonitor(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, GroupMonitor, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, GroupMonitor, name) __repr__ = _swig_repr def __init__(self, groupMonitorCorePtr): this = _carlsim.new_GroupMonitor(groupMonitorCorePtr) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_GroupMonitor __del__ = lambda self: None def isRecording(self): return _carlsim.GroupMonitor_isRecording(self) def startRecording(self): return _carlsim.GroupMonitor_startRecording(self) def stopRecording(self): return _carlsim.GroupMonitor_stopRecording(self) def getRecordingTotalTime(self): return _carlsim.GroupMonitor_getRecordingTotalTime(self) def getRecordingLastStartTime(self): return _carlsim.GroupMonitor_getRecordingLastStartTime(self) def getRecordingStartTime(self): return _carlsim.GroupMonitor_getRecordingStartTime(self) def getRecordingStopTime(self): return _carlsim.GroupMonitor_getRecordingStopTime(self) def getPersistentData(self): return _carlsim.GroupMonitor_getPersistentData(self) def setPersistentData(self, persistentData): return _carlsim.GroupMonitor_setPersistentData(self, persistentData) def getDataVector(self): return _carlsim.GroupMonitor_getDataVector(self) def getPeakValueVector(self): return _carlsim.GroupMonitor_getPeakValueVector(self) def getPeakTimeVector(self): return _carlsim.GroupMonitor_getPeakTimeVector(self) def getSortedPeakValueVector(self): return _carlsim.GroupMonitor_getSortedPeakValueVector(self) def getSortedPeakTimeVector(self): return _carlsim.GroupMonitor_getSortedPeakTimeVector(self) GroupMonitor_swigregister = _carlsim.GroupMonitor_swigregister GroupMonitor_swigregister(GroupMonitor) class SpikeMonitor(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SpikeMonitor, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SpikeMonitor, name) __repr__ = _swig_repr def __init__(self, spikeMonitorCorePtr): this = _carlsim.new_SpikeMonitor(spikeMonitorCorePtr) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_SpikeMonitor __del__ = lambda self: None def clear(self): return _carlsim.SpikeMonitor_clear(self) def getAllFiringRates(self): return _carlsim.SpikeMonitor_getAllFiringRates(self) def getAllFiringRatesSorted(self): return _carlsim.SpikeMonitor_getAllFiringRatesSorted(self) def getMaxFiringRate(self): return _carlsim.SpikeMonitor_getMaxFiringRate(self) def getMinFiringRate(self): return _carlsim.SpikeMonitor_getMinFiringRate(self) def getNeuronMeanFiringRate(self, neurId): return _carlsim.SpikeMonitor_getNeuronMeanFiringRate(self, neurId) def getNeuronNumSpikes(self, neurId): return _carlsim.SpikeMonitor_getNeuronNumSpikes(self, neurId) def getNumNeuronsWithFiringRate(self, min, max): return _carlsim.SpikeMonitor_getNumNeuronsWithFiringRate(self, min, max) def getNumSilentNeurons(self): return _carlsim.SpikeMonitor_getNumSilentNeurons(self) def getPercentNeuronsWithFiringRate(self, min, max): return _carlsim.SpikeMonitor_getPercentNeuronsWithFiringRate(self, min, max) def getPercentSilentNeurons(self): return _carlsim.SpikeMonitor_getPercentSilentNeurons(self) def getPopMeanFiringRate(self): return _carlsim.SpikeMonitor_getPopMeanFiringRate(self) def getPopStdFiringRate(self): return _carlsim.SpikeMonitor_getPopStdFiringRate(self) def getPopNumSpikes(self): return _carlsim.SpikeMonitor_getPopNumSpikes(self) def getSpikeVector2D(self): return _carlsim.SpikeMonitor_getSpikeVector2D(self) def isRecording(self): return _carlsim.SpikeMonitor_isRecording(self) def _print(self, printSpikeTimes=True): return _carlsim.SpikeMonitor__print(self, printSpikeTimes) def startRecording(self): return _carlsim.SpikeMonitor_startRecording(self) def stopRecording(self): return _carlsim.SpikeMonitor_stopRecording(self) def getRecordingTotalTime(self): return _carlsim.SpikeMonitor_getRecordingTotalTime(self) def getRecordingLastStartTime(self): return _carlsim.SpikeMonitor_getRecordingLastStartTime(self) def getRecordingStartTime(self): return _carlsim.SpikeMonitor_getRecordingStartTime(self) def getRecordingStopTime(self): return _carlsim.SpikeMonitor_getRecordingStopTime(self) def getPersistentData(self): return _carlsim.SpikeMonitor_getPersistentData(self) def setPersistentData(self, persistentData): return _carlsim.SpikeMonitor_setPersistentData(self, persistentData) def getMode(self): return _carlsim.SpikeMonitor_getMode(self) def setMode(self, mode=AER): return _carlsim.SpikeMonitor_setMode(self, mode) def setLogFile(self, logFileName): return _carlsim.SpikeMonitor_setLogFile(self, logFileName) SpikeMonitor_swigregister = _carlsim.SpikeMonitor_swigregister SpikeMonitor_swigregister(SpikeMonitor) class SpikeGenerator(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SpikeGenerator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SpikeGenerator, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _carlsim.delete_SpikeGenerator __del__ = lambda self: None def nextSpikeTime(self, s, grpId, i, currentTime, lastScheduledSpikeTime, endOfTimeSlice): return _carlsim.SpikeGenerator_nextSpikeTime(self, s, grpId, i, currentTime, lastScheduledSpikeTime, endOfTimeSlice) SpikeGenerator_swigregister = _carlsim.SpikeGenerator_swigregister SpikeGenerator_swigregister(SpikeGenerator) class ConnectionGenerator(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConnectionGenerator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConnectionGenerator, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _carlsim.delete_ConnectionGenerator __del__ = lambda self: None def connect(self, s, srcGrpId, i, destGrpId, j, weight, maxWt, delay, connected): return _carlsim.ConnectionGenerator_connect(self, s, srcGrpId, i, destGrpId, j, weight, maxWt, delay, connected) ConnectionGenerator_swigregister = _carlsim.ConnectionGenerator_swigregister ConnectionGenerator_swigregister(ConnectionGenerator) class SpikeGeneratorFromVector(SpikeGenerator): __swig_setmethods__ = {} for _s in [SpikeGenerator]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, SpikeGeneratorFromVector, name, value) __swig_getmethods__ = {} for _s in [SpikeGenerator]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, SpikeGeneratorFromVector, name) __repr__ = _swig_repr def __init__(self, spkTimes): this = _carlsim.new_SpikeGeneratorFromVector(spkTimes) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_SpikeGeneratorFromVector __del__ = lambda self: None def nextSpikeTime(self, sim, grpId, nid, currentTime, lastScheduledSpikeTime, endOfTimeSlice): return _carlsim.SpikeGeneratorFromVector_nextSpikeTime(self, sim, grpId, nid, currentTime, lastScheduledSpikeTime, endOfTimeSlice) SpikeGeneratorFromVector_swigregister = _carlsim.SpikeGeneratorFromVector_swigregister SpikeGeneratorFromVector_swigregister(SpikeGeneratorFromVector) class VisualStimulus(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, VisualStimulus, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, VisualStimulus, name) __repr__ = _swig_repr def __init__(self, fileName, wrapAroundEOF=True): this = _carlsim.new_VisualStimulus(fileName, wrapAroundEOF) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_VisualStimulus __del__ = lambda self: None def readFrameChar(self): return _carlsim.VisualStimulus_readFrameChar(self) def readFramePoisson(self, maxPoisson, minPoisson=0.0): return _carlsim.VisualStimulus_readFramePoisson(self, maxPoisson, minPoisson) def rewind(self): return _carlsim.VisualStimulus_rewind(self) def _print(self): return _carlsim.VisualStimulus__print(self) def getWidth(self): return _carlsim.VisualStimulus_getWidth(self) def getHeight(self): return _carlsim.VisualStimulus_getHeight(self) def getLength(self): return _carlsim.VisualStimulus_getLength(self) def getChannels(self): return _carlsim.VisualStimulus_getChannels(self) def getType(self): return _carlsim.VisualStimulus_getType(self) def getCurrentFrameChar(self): return _carlsim.VisualStimulus_getCurrentFrameChar(self) def getCurrentFramePoisson(self): return _carlsim.VisualStimulus_getCurrentFramePoisson(self) def getCurrentFrameNumber(self): return _carlsim.VisualStimulus_getCurrentFrameNumber(self) VisualStimulus_swigregister = _carlsim.VisualStimulus_swigregister VisualStimulus_swigregister(VisualStimulus) class Grid3D(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Grid3D, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Grid3D, name) __repr__ = _swig_repr def __init__(self, *args): this = _carlsim.new_Grid3D(*args) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["numX"] = _carlsim.Grid3D_numX_set __swig_getmethods__["numX"] = _carlsim.Grid3D_numX_get if _newclass: numX = _swig_property(_carlsim.Grid3D_numX_get, _carlsim.Grid3D_numX_set) __swig_setmethods__["numY"] = _carlsim.Grid3D_numY_set __swig_getmethods__["numY"] = _carlsim.Grid3D_numY_get if _newclass: numY = _swig_property(_carlsim.Grid3D_numY_get, _carlsim.Grid3D_numY_set) __swig_setmethods__["numZ"] = _carlsim.Grid3D_numZ_set __swig_getmethods__["numZ"] = _carlsim.Grid3D_numZ_get if _newclass: numZ = _swig_property(_carlsim.Grid3D_numZ_get, _carlsim.Grid3D_numZ_set) __swig_setmethods__["distX"] = _carlsim.Grid3D_distX_set __swig_getmethods__["distX"] = _carlsim.Grid3D_distX_get if _newclass: distX = _swig_property(_carlsim.Grid3D_distX_get, _carlsim.Grid3D_distX_set) __swig_setmethods__["distY"] = _carlsim.Grid3D_distY_set __swig_getmethods__["distY"] = _carlsim.Grid3D_distY_get if _newclass: distY = _swig_property(_carlsim.Grid3D_distY_get, _carlsim.Grid3D_distY_set) __swig_setmethods__["distZ"] = _carlsim.Grid3D_distZ_set __swig_getmethods__["distZ"] = _carlsim.Grid3D_distZ_get if _newclass: distZ = _swig_property(_carlsim.Grid3D_distZ_get, _carlsim.Grid3D_distZ_set) __swig_setmethods__["offsetX"] = _carlsim.Grid3D_offsetX_set __swig_getmethods__["offsetX"] = _carlsim.Grid3D_offsetX_get if _newclass: offsetX = _swig_property(_carlsim.Grid3D_offsetX_get, _carlsim.Grid3D_offsetX_set) __swig_setmethods__["offsetY"] = _carlsim.Grid3D_offsetY_set __swig_getmethods__["offsetY"] = _carlsim.Grid3D_offsetY_get if _newclass: offsetY = _swig_property(_carlsim.Grid3D_offsetY_get, _carlsim.Grid3D_offsetY_set) __swig_setmethods__["offsetZ"] = _carlsim.Grid3D_offsetZ_set __swig_getmethods__["offsetZ"] = _carlsim.Grid3D_offsetZ_get if _newclass: offsetZ = _swig_property(_carlsim.Grid3D_offsetZ_get, _carlsim.Grid3D_offsetZ_set) __swig_setmethods__["N"] = _carlsim.Grid3D_N_set __swig_getmethods__["N"] = _carlsim.Grid3D_N_get if _newclass: N = _swig_property(_carlsim.Grid3D_N_get, _carlsim.Grid3D_N_set) __swig_destroy__ = _carlsim.delete_Grid3D __del__ = lambda self: None Grid3D_swigregister = _carlsim.Grid3D_swigregister Grid3D_swigregister(Grid3D) class GroupSTDPInfo(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, GroupSTDPInfo, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, GroupSTDPInfo, name) __repr__ = _swig_repr __swig_setmethods__["WithSTDP"] = _carlsim.GroupSTDPInfo_WithSTDP_set __swig_getmethods__["WithSTDP"] = _carlsim.GroupSTDPInfo_WithSTDP_get if _newclass: WithSTDP = _swig_property(_carlsim.GroupSTDPInfo_WithSTDP_get, _carlsim.GroupSTDPInfo_WithSTDP_set) __swig_setmethods__["WithESTDP"] = _carlsim.GroupSTDPInfo_WithESTDP_set __swig_getmethods__["WithESTDP"] = _carlsim.GroupSTDPInfo_WithESTDP_get if _newclass: WithESTDP = _swig_property(_carlsim.GroupSTDPInfo_WithESTDP_get, _carlsim.GroupSTDPInfo_WithESTDP_set) __swig_setmethods__["WithISTDP"] = _carlsim.GroupSTDPInfo_WithISTDP_set __swig_getmethods__["WithISTDP"] = _carlsim.GroupSTDPInfo_WithISTDP_get if _newclass: WithISTDP = _swig_property(_carlsim.GroupSTDPInfo_WithISTDP_get, _carlsim.GroupSTDPInfo_WithISTDP_set) __swig_setmethods__["WithESTDPtype"] = _carlsim.GroupSTDPInfo_WithESTDPtype_set __swig_getmethods__["WithESTDPtype"] = _carlsim.GroupSTDPInfo_WithESTDPtype_get if _newclass: WithESTDPtype = _swig_property(_carlsim.GroupSTDPInfo_WithESTDPtype_get, _carlsim.GroupSTDPInfo_WithESTDPtype_set) __swig_setmethods__["WithISTDPtype"] = _carlsim.GroupSTDPInfo_WithISTDPtype_set __swig_getmethods__["WithISTDPtype"] = _carlsim.GroupSTDPInfo_WithISTDPtype_get if _newclass: WithISTDPtype = _swig_property(_carlsim.GroupSTDPInfo_WithISTDPtype_get, _carlsim.GroupSTDPInfo_WithISTDPtype_set) __swig_setmethods__["WithESTDPcurve"] = _carlsim.GroupSTDPInfo_WithESTDPcurve_set __swig_getmethods__["WithESTDPcurve"] = _carlsim.GroupSTDPInfo_WithESTDPcurve_get if _newclass: WithESTDPcurve = _swig_property(_carlsim.GroupSTDPInfo_WithESTDPcurve_get, _carlsim.GroupSTDPInfo_WithESTDPcurve_set) __swig_setmethods__["WithISTDPcurve"] = _carlsim.GroupSTDPInfo_WithISTDPcurve_set __swig_getmethods__["WithISTDPcurve"] = _carlsim.GroupSTDPInfo_WithISTDPcurve_get if _newclass: WithISTDPcurve = _swig_property(_carlsim.GroupSTDPInfo_WithISTDPcurve_get, _carlsim.GroupSTDPInfo_WithISTDPcurve_set) __swig_setmethods__["TAU_PLUS_INV_EXC"] = _carlsim.GroupSTDPInfo_TAU_PLUS_INV_EXC_set __swig_getmethods__["TAU_PLUS_INV_EXC"] = _carlsim.GroupSTDPInfo_TAU_PLUS_INV_EXC_get if _newclass: TAU_PLUS_INV_EXC = _swig_property(_carlsim.GroupSTDPInfo_TAU_PLUS_INV_EXC_get, _carlsim.GroupSTDPInfo_TAU_PLUS_INV_EXC_set) __swig_setmethods__["TAU_MINUS_INV_EXC"] = _carlsim.GroupSTDPInfo_TAU_MINUS_INV_EXC_set __swig_getmethods__["TAU_MINUS_INV_EXC"] = _carlsim.GroupSTDPInfo_TAU_MINUS_INV_EXC_get if _newclass: TAU_MINUS_INV_EXC = _swig_property(_carlsim.GroupSTDPInfo_TAU_MINUS_INV_EXC_get, _carlsim.GroupSTDPInfo_TAU_MINUS_INV_EXC_set) __swig_setmethods__["ALPHA_PLUS_EXC"] = _carlsim.GroupSTDPInfo_ALPHA_PLUS_EXC_set __swig_getmethods__["ALPHA_PLUS_EXC"] = _carlsim.GroupSTDPInfo_ALPHA_PLUS_EXC_get if _newclass: ALPHA_PLUS_EXC = _swig_property(_carlsim.GroupSTDPInfo_ALPHA_PLUS_EXC_get, _carlsim.GroupSTDPInfo_ALPHA_PLUS_EXC_set) __swig_setmethods__["ALPHA_MINUS_EXC"] = _carlsim.GroupSTDPInfo_ALPHA_MINUS_EXC_set __swig_getmethods__["ALPHA_MINUS_EXC"] = _carlsim.GroupSTDPInfo_ALPHA_MINUS_EXC_get if _newclass: ALPHA_MINUS_EXC = _swig_property(_carlsim.GroupSTDPInfo_ALPHA_MINUS_EXC_get, _carlsim.GroupSTDPInfo_ALPHA_MINUS_EXC_set) __swig_setmethods__["TAU_PLUS_INV_INB"] = _carlsim.GroupSTDPInfo_TAU_PLUS_INV_INB_set __swig_getmethods__["TAU_PLUS_INV_INB"] = _carlsim.GroupSTDPInfo_TAU_PLUS_INV_INB_get if _newclass: TAU_PLUS_INV_INB = _swig_property(_carlsim.GroupSTDPInfo_TAU_PLUS_INV_INB_get, _carlsim.GroupSTDPInfo_TAU_PLUS_INV_INB_set) __swig_setmethods__["TAU_MINUS_INV_INB"] = _carlsim.GroupSTDPInfo_TAU_MINUS_INV_INB_set __swig_getmethods__["TAU_MINUS_INV_INB"] = _carlsim.GroupSTDPInfo_TAU_MINUS_INV_INB_get if _newclass: TAU_MINUS_INV_INB = _swig_property(_carlsim.GroupSTDPInfo_TAU_MINUS_INV_INB_get, _carlsim.GroupSTDPInfo_TAU_MINUS_INV_INB_set) __swig_setmethods__["ALPHA_PLUS_INB"] = _carlsim.GroupSTDPInfo_ALPHA_PLUS_INB_set __swig_getmethods__["ALPHA_PLUS_INB"] = _carlsim.GroupSTDPInfo_ALPHA_PLUS_INB_get if _newclass: ALPHA_PLUS_INB = _swig_property(_carlsim.GroupSTDPInfo_ALPHA_PLUS_INB_get, _carlsim.GroupSTDPInfo_ALPHA_PLUS_INB_set) __swig_setmethods__["ALPHA_MINUS_INB"] = _carlsim.GroupSTDPInfo_ALPHA_MINUS_INB_set __swig_getmethods__["ALPHA_MINUS_INB"] = _carlsim.GroupSTDPInfo_ALPHA_MINUS_INB_get if _newclass: ALPHA_MINUS_INB = _swig_property(_carlsim.GroupSTDPInfo_ALPHA_MINUS_INB_get, _carlsim.GroupSTDPInfo_ALPHA_MINUS_INB_set) __swig_setmethods__["GAMMA"] = _carlsim.GroupSTDPInfo_GAMMA_set __swig_getmethods__["GAMMA"] = _carlsim.GroupSTDPInfo_GAMMA_get if _newclass: GAMMA = _swig_property(_carlsim.GroupSTDPInfo_GAMMA_get, _carlsim.GroupSTDPInfo_GAMMA_set) __swig_setmethods__["BETA_LTP"] = _carlsim.GroupSTDPInfo_BETA_LTP_set __swig_getmethods__["BETA_LTP"] = _carlsim.GroupSTDPInfo_BETA_LTP_get if _newclass: BETA_LTP = _swig_property(_carlsim.GroupSTDPInfo_BETA_LTP_get, _carlsim.GroupSTDPInfo_BETA_LTP_set) __swig_setmethods__["BETA_LTD"] = _carlsim.GroupSTDPInfo_BETA_LTD_set __swig_getmethods__["BETA_LTD"] = _carlsim.GroupSTDPInfo_BETA_LTD_get if _newclass: BETA_LTD = _swig_property(_carlsim.GroupSTDPInfo_BETA_LTD_get, _carlsim.GroupSTDPInfo_BETA_LTD_set) __swig_setmethods__["LAMBDA"] = _carlsim.GroupSTDPInfo_LAMBDA_set __swig_getmethods__["LAMBDA"] = _carlsim.GroupSTDPInfo_LAMBDA_get if _newclass: LAMBDA = _swig_property(_carlsim.GroupSTDPInfo_LAMBDA_get, _carlsim.GroupSTDPInfo_LAMBDA_set) __swig_setmethods__["DELTA"] = _carlsim.GroupSTDPInfo_DELTA_set __swig_getmethods__["DELTA"] = _carlsim.GroupSTDPInfo_DELTA_get if _newclass: DELTA = _swig_property(_carlsim.GroupSTDPInfo_DELTA_get, _carlsim.GroupSTDPInfo_DELTA_set) def __init__(self): this = _carlsim.new_GroupSTDPInfo() try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_GroupSTDPInfo __del__ = lambda self: None GroupSTDPInfo_swigregister = _carlsim.GroupSTDPInfo_swigregister GroupSTDPInfo_swigregister(GroupSTDPInfo) class GroupNeuromodulatorInfo(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, GroupNeuromodulatorInfo, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, GroupNeuromodulatorInfo, name) __repr__ = _swig_repr __swig_setmethods__["baseDP"] = _carlsim.GroupNeuromodulatorInfo_baseDP_set __swig_getmethods__["baseDP"] = _carlsim.GroupNeuromodulatorInfo_baseDP_get if _newclass: baseDP = _swig_property(_carlsim.GroupNeuromodulatorInfo_baseDP_get, _carlsim.GroupNeuromodulatorInfo_baseDP_set) __swig_setmethods__["base5HT"] = _carlsim.GroupNeuromodulatorInfo_base5HT_set __swig_getmethods__["base5HT"] = _carlsim.GroupNeuromodulatorInfo_base5HT_get if _newclass: base5HT = _swig_property(_carlsim.GroupNeuromodulatorInfo_base5HT_get, _carlsim.GroupNeuromodulatorInfo_base5HT_set) __swig_setmethods__["baseACh"] = _carlsim.GroupNeuromodulatorInfo_baseACh_set __swig_getmethods__["baseACh"] = _carlsim.GroupNeuromodulatorInfo_baseACh_get if _newclass: baseACh = _swig_property(_carlsim.GroupNeuromodulatorInfo_baseACh_get, _carlsim.GroupNeuromodulatorInfo_baseACh_set) __swig_setmethods__["baseNE"] = _carlsim.GroupNeuromodulatorInfo_baseNE_set __swig_getmethods__["baseNE"] = _carlsim.GroupNeuromodulatorInfo_baseNE_get if _newclass: baseNE = _swig_property(_carlsim.GroupNeuromodulatorInfo_baseNE_get, _carlsim.GroupNeuromodulatorInfo_baseNE_set) __swig_setmethods__["decayDP"] = _carlsim.GroupNeuromodulatorInfo_decayDP_set __swig_getmethods__["decayDP"] = _carlsim.GroupNeuromodulatorInfo_decayDP_get if _newclass: decayDP = _swig_property(_carlsim.GroupNeuromodulatorInfo_decayDP_get, _carlsim.GroupNeuromodulatorInfo_decayDP_set) __swig_setmethods__["decay5HT"] = _carlsim.GroupNeuromodulatorInfo_decay5HT_set __swig_getmethods__["decay5HT"] = _carlsim.GroupNeuromodulatorInfo_decay5HT_get if _newclass: decay5HT = _swig_property(_carlsim.GroupNeuromodulatorInfo_decay5HT_get, _carlsim.GroupNeuromodulatorInfo_decay5HT_set) __swig_setmethods__["decayACh"] = _carlsim.GroupNeuromodulatorInfo_decayACh_set __swig_getmethods__["decayACh"] = _carlsim.GroupNeuromodulatorInfo_decayACh_get if _newclass: decayACh = _swig_property(_carlsim.GroupNeuromodulatorInfo_decayACh_get, _carlsim.GroupNeuromodulatorInfo_decayACh_set) __swig_setmethods__["decayNE"] = _carlsim.GroupNeuromodulatorInfo_decayNE_set __swig_getmethods__["decayNE"] = _carlsim.GroupNeuromodulatorInfo_decayNE_get if _newclass: decayNE = _swig_property(_carlsim.GroupNeuromodulatorInfo_decayNE_get, _carlsim.GroupNeuromodulatorInfo_decayNE_set) def __init__(self): this = _carlsim.new_GroupNeuromodulatorInfo() try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _carlsim.delete_GroupNeuromodulatorInfo __del__ = lambda self: None GroupNeuromodulatorInfo_swigregister = _carlsim.GroupNeuromodulatorInfo_swigregister GroupNeuromodulatorInfo_swigregister(GroupNeuromodulatorInfo) class ExpCurve(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ExpCurve, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ExpCurve, name) __repr__ = _swig_repr def __init__(self, _alphaPlus, _tauPlus, _alphaMinus, _tauMinus): this = _carlsim.new_ExpCurve(_alphaPlus, _tauPlus, _alphaMinus, _tauMinus) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["stdpCurve"] = _carlsim.ExpCurve_stdpCurve_set __swig_getmethods__["stdpCurve"] = _carlsim.ExpCurve_stdpCurve_get if _newclass: stdpCurve = _swig_property(_carlsim.ExpCurve_stdpCurve_get, _carlsim.ExpCurve_stdpCurve_set) __swig_setmethods__["alphaPlus"] = _carlsim.ExpCurve_alphaPlus_set __swig_getmethods__["alphaPlus"] = _carlsim.ExpCurve_alphaPlus_get if _newclass: alphaPlus = _swig_property(_carlsim.ExpCurve_alphaPlus_get, _carlsim.ExpCurve_alphaPlus_set) __swig_setmethods__["tauPlus"] = _carlsim.ExpCurve_tauPlus_set __swig_getmethods__["tauPlus"] = _carlsim.ExpCurve_tauPlus_get if _newclass: tauPlus = _swig_property(_carlsim.ExpCurve_tauPlus_get, _carlsim.ExpCurve_tauPlus_set) __swig_setmethods__["alphaMinus"] = _carlsim.ExpCurve_alphaMinus_set __swig_getmethods__["alphaMinus"] = _carlsim.ExpCurve_alphaMinus_get if _newclass: alphaMinus = _swig_property(_carlsim.ExpCurve_alphaMinus_get, _carlsim.ExpCurve_alphaMinus_set) __swig_setmethods__["tauMinus"] = _carlsim.ExpCurve_tauMinus_set __swig_getmethods__["tauMinus"] = _carlsim.ExpCurve_tauMinus_get if _newclass: tauMinus = _swig_property(_carlsim.ExpCurve_tauMinus_get, _carlsim.ExpCurve_tauMinus_set) __swig_destroy__ = _carlsim.delete_ExpCurve __del__ = lambda self: None ExpCurve_swigregister = _carlsim.ExpCurve_swigregister ExpCurve_swigregister(ExpCurve) class TimingBasedCurve(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, TimingBasedCurve, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, TimingBasedCurve, name) __repr__ = _swig_repr def __init__(self, _alphaPlus, _tauPlus, _alphaMinus, _tauMinus, _gamma): this = _carlsim.new_TimingBasedCurve(_alphaPlus, _tauPlus, _alphaMinus, _tauMinus, _gamma) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["stdpCurve"] = _carlsim.TimingBasedCurve_stdpCurve_set __swig_getmethods__["stdpCurve"] = _carlsim.TimingBasedCurve_stdpCurve_get if _newclass: stdpCurve = _swig_property(_carlsim.TimingBasedCurve_stdpCurve_get, _carlsim.TimingBasedCurve_stdpCurve_set) __swig_setmethods__["alphaPlus"] = _carlsim.TimingBasedCurve_alphaPlus_set __swig_getmethods__["alphaPlus"] = _carlsim.TimingBasedCurve_alphaPlus_get if _newclass: alphaPlus = _swig_property(_carlsim.TimingBasedCurve_alphaPlus_get, _carlsim.TimingBasedCurve_alphaPlus_set) __swig_setmethods__["tauPlus"] = _carlsim.TimingBasedCurve_tauPlus_set __swig_getmethods__["tauPlus"] = _carlsim.TimingBasedCurve_tauPlus_get if _newclass: tauPlus = _swig_property(_carlsim.TimingBasedCurve_tauPlus_get, _carlsim.TimingBasedCurve_tauPlus_set) __swig_setmethods__["alphaMinus"] = _carlsim.TimingBasedCurve_alphaMinus_set __swig_getmethods__["alphaMinus"] = _carlsim.TimingBasedCurve_alphaMinus_get if _newclass: alphaMinus = _swig_property(_carlsim.TimingBasedCurve_alphaMinus_get, _carlsim.TimingBasedCurve_alphaMinus_set) __swig_setmethods__["tauMinus"] = _carlsim.TimingBasedCurve_tauMinus_set __swig_getmethods__["tauMinus"] = _carlsim.TimingBasedCurve_tauMinus_get if _newclass: tauMinus = _swig_property(_carlsim.TimingBasedCurve_tauMinus_get, _carlsim.TimingBasedCurve_tauMinus_set) __swig_setmethods__["gamma"] = _carlsim.TimingBasedCurve_gamma_set __swig_getmethods__["gamma"] = _carlsim.TimingBasedCurve_gamma_get if _newclass: gamma = _swig_property(_carlsim.TimingBasedCurve_gamma_get, _carlsim.TimingBasedCurve_gamma_set) __swig_destroy__ = _carlsim.delete_TimingBasedCurve __del__ = lambda self: None TimingBasedCurve_swigregister = _carlsim.TimingBasedCurve_swigregister TimingBasedCurve_swigregister(TimingBasedCurve) class PulseCurve(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, PulseCurve, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PulseCurve, name) __repr__ = _swig_repr def __init__(self, _betaLTP, _betaLTD, _lambda, _delta): this = _carlsim.new_PulseCurve(_betaLTP, _betaLTD, _lambda, _delta) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["stdpCurve"] = _carlsim.PulseCurve_stdpCurve_set __swig_getmethods__["stdpCurve"] = _carlsim.PulseCurve_stdpCurve_get if _newclass: stdpCurve = _swig_property(_carlsim.PulseCurve_stdpCurve_get, _carlsim.PulseCurve_stdpCurve_set) __swig_setmethods__["betaLTP"] = _carlsim.PulseCurve_betaLTP_set __swig_getmethods__["betaLTP"] = _carlsim.PulseCurve_betaLTP_get if _newclass: betaLTP = _swig_property(_carlsim.PulseCurve_betaLTP_get, _carlsim.PulseCurve_betaLTP_set) __swig_setmethods__["betaLTD"] = _carlsim.PulseCurve_betaLTD_set __swig_getmethods__["betaLTD"] = _carlsim.PulseCurve_betaLTD_get if _newclass: betaLTD = _swig_property(_carlsim.PulseCurve_betaLTD_get, _carlsim.PulseCurve_betaLTD_set) __swig_setmethods__["_lambda"] = _carlsim.PulseCurve__lambda_set __swig_getmethods__["_lambda"] = _carlsim.PulseCurve__lambda_get if _newclass: _lambda = _swig_property(_carlsim.PulseCurve__lambda_get, _carlsim.PulseCurve__lambda_set) __swig_setmethods__["delta"] = _carlsim.PulseCurve_delta_set __swig_getmethods__["delta"] = _carlsim.PulseCurve_delta_get if _newclass: delta = _swig_property(_carlsim.PulseCurve_delta_get, _carlsim.PulseCurve_delta_set) __swig_destroy__ = _carlsim.delete_PulseCurve __del__ = lambda self: None PulseCurve_swigregister = _carlsim.PulseCurve_swigregister PulseCurve_swigregister(PulseCurve) class RangeWeight(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, RangeWeight, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, RangeWeight, name) __repr__ = _swig_repr def __init__(self, *args): this = _carlsim.new_RangeWeight(*args) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["min"] = _carlsim.RangeWeight_min_set __swig_getmethods__["min"] = _carlsim.RangeWeight_min_get if _newclass: min = _swig_property(_carlsim.RangeWeight_min_get, _carlsim.RangeWeight_min_set) __swig_setmethods__["init"] = _carlsim.RangeWeight_init_set __swig_getmethods__["init"] = _carlsim.RangeWeight_init_get if _newclass: init = _swig_property(_carlsim.RangeWeight_init_get, _carlsim.RangeWeight_init_set) __swig_setmethods__["max"] = _carlsim.RangeWeight_max_set __swig_getmethods__["max"] = _carlsim.RangeWeight_max_get if _newclass: max = _swig_property(_carlsim.RangeWeight_max_get, _carlsim.RangeWeight_max_set) __swig_destroy__ = _carlsim.delete_RangeWeight __del__ = lambda self: None RangeWeight_swigregister = _carlsim.RangeWeight_swigregister RangeWeight_swigregister(RangeWeight) class RangeDelay(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, RangeDelay, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, RangeDelay, name) __repr__ = _swig_repr def __init__(self, *args): this = _carlsim.new_RangeDelay(*args) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["min"] = _carlsim.RangeDelay_min_set __swig_getmethods__["min"] = _carlsim.RangeDelay_min_get if _newclass: min = _swig_property(_carlsim.RangeDelay_min_get, _carlsim.RangeDelay_min_set) __swig_setmethods__["max"] = _carlsim.RangeDelay_max_set __swig_getmethods__["max"] = _carlsim.RangeDelay_max_get if _newclass: max = _swig_property(_carlsim.RangeDelay_max_get, _carlsim.RangeDelay_max_set) __swig_destroy__ = _carlsim.delete_RangeDelay __del__ = lambda self: None RangeDelay_swigregister = _carlsim.RangeDelay_swigregister RangeDelay_swigregister(RangeDelay) class RadiusRF(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, RadiusRF, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, RadiusRF, name) __repr__ = _swig_repr def __init__(self, *args): this = _carlsim.new_RadiusRF(*args) try: self.this.append(this) except Exception: self.this = this __swig_setmethods__["radX"] = _carlsim.RadiusRF_radX_set __swig_getmethods__["radX"] = _carlsim.RadiusRF_radX_get if _newclass: radX = _swig_property(_carlsim.RadiusRF_radX_get, _carlsim.RadiusRF_radX_set) __swig_setmethods__["radY"] = _carlsim.RadiusRF_radY_set __swig_getmethods__["radY"] = _carlsim.RadiusRF_radY_get if _newclass: radY = _swig_property(_carlsim.RadiusRF_radY_get, _carlsim.RadiusRF_radY_set) __swig_setmethods__["radZ"] = _carlsim.RadiusRF_radZ_set __swig_getmethods__["radZ"] = _carlsim.RadiusRF_radZ_get if _newclass: radZ = _swig_property(_carlsim.RadiusRF_radZ_get, _carlsim.RadiusRF_radZ_set) __swig_destroy__ = _carlsim.delete_RadiusRF __del__ = lambda self: None RadiusRF_swigregister = _carlsim.RadiusRF_swigregister RadiusRF_swigregister(RadiusRF) # This file is compatible with both classic and new-style classes.
37.193337
138
0.748313
6,686
62,522
6.360903
0.069847
0.078558
0.054363
0.019751
0.53902
0.398128
0.339698
0.276611
0.203344
0.161302
0
0.002649
0.172739
62,522
1,680
139
37.215476
0.819613
0.004702
0
0.330261
1
0
0.020123
0
0
0
0
0
0
1
0.222734
false
0.001536
0.006912
0.201997
0.580645
0.00768
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
ec6f20c6b26c9dc9332b6014c75214387f09180f
312
py
Python
string_26.py
Technicoryx/python_strings_inbuilt_functions
78892d043c6c6d65affe3bd4906ba0162c5d6604
[ "MIT" ]
null
null
null
string_26.py
Technicoryx/python_strings_inbuilt_functions
78892d043c6c6d65affe3bd4906ba0162c5d6604
[ "MIT" ]
null
null
null
string_26.py
Technicoryx/python_strings_inbuilt_functions
78892d043c6c6d65affe3bd4906ba0162c5d6604
[ "MIT" ]
null
null
null
"""Below Python Programme demonstrate rstrip functions in a string""" #Example: random_string = ' this is good' # Leading whitepsace are removed print(random_string.rstrip()) # Argument doesn't contain 'd' # No characters are removed. print(random_string.rstrip('si oo')) print(random_string.rstrip('sid oo'))
24
44
0.759615
44
312
5.295455
0.659091
0.206009
0.218884
0.296137
0.283262
0.283262
0
0
0
0
0
0
0.121795
312
12
45
26
0.850365
0.509615
0
0
0
0
0.167832
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
ec73180f889a9b43d7ae6f0d4f2c9a02c790f8dc
779
py
Python
tests/test_pldist_l2.py
csningli/MultiAgent
cabfeab3ea8cf19559e06c354247f8f25739d6b1
[ "Apache-2.0" ]
1
2018-03-21T02:17:01.000Z
2018-03-21T02:17:01.000Z
tests/test_pldist_l2.py
csningli/MultiAgent
cabfeab3ea8cf19559e06c354247f8f25739d6b1
[ "Apache-2.0" ]
null
null
null
tests/test_pldist_l2.py
csningli/MultiAgent
cabfeab3ea8cf19559e06c354247f8f25739d6b1
[ "Apache-2.0" ]
null
null
null
# MultiAgent # (c) 2017-2019, NiL, csningli@gmail.com import sys, os, time import doctest sys.path.append("..") from mas.geometry import pldist_l2 def test_pldist_l2() : ''' >>> test_pldist_l2() l2 distance from (0.0, 0.0) to ((1.0, 0.0), (0.0, 1.0)) : 0.71 l2 distance from (0.0, 0.0) to ((-1.0, 0.0), (0.0, -1.0)) : 0.71 ''' print("l2 distance from (0.0, 0.0) to ((1.0, 0.0), (0.0, 1.0)) : %.2f" % pldist_l2((0.0, 0.0), (1.0, 0.0), (0.0, 1.0))) print("l2 distance from (0.0, 0.0) to ((-1.0, 0.0), (0.0, -1.0)) : %.2f" % pldist_l2((0.0, 0.0), (-1.0, 0.0), (0.0, -1.0))) if __name__ == '__main__' : result = doctest.testmod() print("-" * 50) print("[pldist_l2 Test] attempted/failed tests: %d/%d" % (result.attempted, result.failed))
32.458333
127
0.546855
151
779
2.715232
0.258278
0.214634
0.219512
0.17561
0.419512
0.419512
0.419512
0.419512
0.419512
0.419512
0
0.159236
0.193838
779
23
128
33.869565
0.493631
0.255456
0
0
0
0.181818
0.330325
0
0
0
0
0
0
1
0.090909
false
0
0.272727
0
0.363636
0.363636
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
ec787fda5bebb7a9fb10aabe493e041d6637bbfa
529
py
Python
data/typing/pandas.core.indexes.datetimelike.py
vfdev-5/python-record-api
006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b
[ "MIT" ]
67
2020-08-17T11:53:26.000Z
2021-11-08T20:16:06.000Z
data/typing/pandas.core.indexes.datetimelike.py
vfdev-5/python-record-api
006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b
[ "MIT" ]
36
2020-08-17T11:09:51.000Z
2021-12-15T18:09:47.000Z
data/typing/pandas.core.indexes.datetimelike.py
pydata-apis/python-api-record
684cffbbb6dc6e81f9de4e02619c8b0ebc557b2b
[ "MIT" ]
7
2020-08-19T05:06:47.000Z
2020-11-04T05:10:38.000Z
from typing import * class DatetimeIndexOpsMixin: def isin(self, /, values: pandas.core.indexes.datetimes.DatetimeIndex): """ usage.dask: 1 """ ... def max(self, /): """ usage.dask: 9 """ ... def min(self, /): """ usage.dask: 9 """ ... def shift(self, /, periods: int): """ usage.dask: 4 """ ... def tolist(self, /): """ usage.dask: 4 """ ...
15.558824
75
0.383743
43
529
4.72093
0.581395
0.221675
0.192118
0.137931
0.167488
0
0
0
0
0
0
0.017065
0.446125
529
33
76
16.030303
0.675768
0.130435
0
0.416667
0
0
0
0
0
0
0
0
0
1
0.416667
false
0
0.083333
0
0.583333
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
ec90d1fca273c7ded7e4c3ab533a64e437e8ae87
119
py
Python
tests/testapp/models.py
alter3go/django-multitransactiontestcase
bac4b2da266f79f6f732f1930a110c31cc362062
[ "MIT" ]
null
null
null
tests/testapp/models.py
alter3go/django-multitransactiontestcase
bac4b2da266f79f6f732f1930a110c31cc362062
[ "MIT" ]
null
null
null
tests/testapp/models.py
alter3go/django-multitransactiontestcase
bac4b2da266f79f6f732f1930a110c31cc362062
[ "MIT" ]
null
null
null
from django.db.models import Model, TextField class ExampleModel(Model): name = TextField(null=True, blank=True)
19.833333
45
0.756303
16
119
5.625
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.142857
119
5
46
23.8
0.882353
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
eca4aea4dcfe5158863e809c7401a859dcecd6a5
743
py
Python
parallel/thread_semaphore.py
pengchenyu111/SpiderLearning
d1fca1c7f46bfb22ad23f9396d0f2e2301ec4534
[ "Apache-2.0" ]
3
2020-11-21T13:13:46.000Z
2020-12-03T05:43:32.000Z
parallel/thread_semaphore.py
pengchenyu111/SpiderLearning
d1fca1c7f46bfb22ad23f9396d0f2e2301ec4534
[ "Apache-2.0" ]
null
null
null
parallel/thread_semaphore.py
pengchenyu111/SpiderLearning
d1fca1c7f46bfb22ad23f9396d0f2e2301ec4534
[ "Apache-2.0" ]
1
2020-12-03T05:43:53.000Z
2020-12-03T05:43:53.000Z
from threading import BoundedSemaphore MAX = 3 # 创建信号量对象,并设置了计数器的最大值(也是资源的最大值),计数器不能超过这个值 semaphore = BoundedSemaphore(MAX) # 输出当前计数器的值,输出结果:3 print(semaphore._value) # 获取资源,计数器减1 semaphore.acquire() # 输出结果:2 print(semaphore._value) # 获取资源,计数器减1 semaphore.acquire() # 输出结果:1 print(semaphore._value) # 获取资源,计数器减1 semaphore.acquire() # 输出结果:0 print(semaphore._value) # 当计数器为0时,不能再获取资源,所以acquire方法会返回False # 输出结果:False print(semaphore.acquire(False)) # 输出结果:0 print(semaphore._value) # 释放资源,计数器加1 semaphore.release() # 输出结果:1 print(semaphore._value) # 释放资源,计数器加1 semaphore.release() # 输出结果:2 print(semaphore._value) # 释放资源,计数器加1 semaphore.release() # 输出结果:3 print(semaphore._value) # 抛出异常,当计数器达到最大值时,不能再次释放资源,否则会抛出异常 semaphore.release()
15.808511
42
0.77389
93
743
6.096774
0.344086
0.222222
0.268078
0.121693
0.603175
0.507937
0.507937
0.507937
0
0
0
0.02381
0.095559
743
46
43
16.152174
0.81994
0.339166
0
0.789474
0
0
0
0
0
0
0
0
0
1
0
false
0
0.052632
0
0.052632
0.473684
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4