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
a35a828455d482461bb4c57f6960bee94f7748ea
139
py
Python
task_01.py
emelianovss/ypb-good-develop-01
5350e3e2ce258a641e1dc3afa8cde9b7de4d3139
[ "MIT" ]
null
null
null
task_01.py
emelianovss/ypb-good-develop-01
5350e3e2ce258a641e1dc3afa8cde9b7de4d3139
[ "MIT" ]
null
null
null
task_01.py
emelianovss/ypb-good-develop-01
5350e3e2ce258a641e1dc3afa8cde9b7de4d3139
[ "MIT" ]
null
null
null
from typing import Optional def function(value_1: int, value_2: Optional[int]) -> int: return value_1 + value_2 function(10.0, 10)
15.444444
58
0.71223
23
139
4.130435
0.565217
0.126316
0
0
0
0
0
0
0
0
0
0.078947
0.179856
139
8
59
17.375
0.754386
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
a365b32c946ee26d6eee678a2d9a3841f0cbb52f
6,873
py
Python
ee_ppipe/taskreport.py
samapriya/Planet-GEE-Pipeline-GUI-Ex
aee6fc76c17cf6c6ce225572465f876fd14b0079
[ "Apache-2.0" ]
21
2017-05-06T13:36:27.000Z
2020-03-02T12:47:00.000Z
ee_ppipe/taskreport.py
samapriya/Planet-GEE-Pipeline-GUI-Ex
aee6fc76c17cf6c6ce225572465f876fd14b0079
[ "Apache-2.0" ]
null
null
null
ee_ppipe/taskreport.py
samapriya/Planet-GEE-Pipeline-GUI-Ex
aee6fc76c17cf6c6ce225572465f876fd14b0079
[ "Apache-2.0" ]
8
2017-10-08T01:01:58.000Z
2020-02-22T14:19:47.000Z
import ee import ee.mapclient import subprocess import csv from datetime import datetime import time import datetime import re ee.Initialize() def genreport(report): with open(report+'/Tasks_failed.csv','wb') as failed: writer=csv.DictWriter(failed,fieldnames=["Task ID","Task Type", "Start Date","Start Time","End Date","End Time","Task Description", "Error Message","Source Script", "Output State"],delimiter=',') writer.writeheader() with open(report+'/Tasks_completed.csv','wb') as completed: writer=csv.DictWriter(completed,fieldnames=["Task ID","Task Type", "Start Date","Start Time","End Date","End Time","Task Description", "Output Url", "Output State"],delimiter=',') writer.writeheader() with open(report+'/Tasks_canceled.csv','wb') as canceled: writer=csv.DictWriter(canceled,fieldnames=["Task ID","Task Type", "Start Date","Start Time","End Date","End Time","Task Description", "Source Script", "Output State"],delimiter=',') writer.writeheader() try: for line in subprocess.check_output("earthengine task list",shell=True).split('\n'): tsk=line.split(' ')[0] ur=ee.data.getTaskStatus(tsk) error=str(ur).split('state')[1].split(',')[0].strip("': u'.") mode = error if mode == 'FAILED': tsktype=str(ur).split('task_type')[1].split(',')[0].strip("': u'.") tskdesc=str(ur).split("'description'")[1].split(',')[0].strip("': u'.") outurl=str(ur).split('source_url')[1].split(',')[0].strip("': u'.") strttime=str(ur).split('start_timestamp_ms')[1].split(',')[0].strip("': u'.L") endtime=str(ur).split('update_timestamp_ms')[1].split(',')[0].strip("': u'.L") errmsg=str(ur).split('error_message')[1].split(',')[0].strip("': u'.") state=str(ur).split('state')[1].split(',')[0].strip("': u'.") tskid=str(ur).split("'id'")[1].split(',')[0].strip("': u'.'}]") v=int(strttime)/1000 w=int(endtime)/1000 start=datetime.datetime.fromtimestamp(v).strftime('%Y-%m-%d %H:%M:%S.%f') startdate=start.split(' ')[0] starttime=start.split(' ')[1].split('.')[0] end=datetime.datetime.fromtimestamp(w).strftime('%Y-%m-%d %H:%M:%S.%f') enddate=end.split(' ')[0] endtime=end.split(' ')[1].split('.')[0] print(tsktype.title()) print(tskdesc) print(outurl) print(start) print(end) print(errmsg) print(tskid) print(state) with open(report+'/Tasks_failed.csv','a') as failed: writer=csv.writer(failed,delimiter=',',lineterminator='\n') writer.writerow([tskid,tsktype,startdate,starttime,enddate,endtime,tskdesc,errmsg,outurl,state]) elif mode == 'CANCELED': tsktype=str(ur).split('task_type')[1].split(',')[0].strip("': u'.") tskdesc=str(ur).split("'description'")[1].split(':')[1].split(',')[0].strip("': u'.") outurl=str(ur).split('source_url')[1].split(',')[0].strip("[': u'.]") strttime=str(ur).split('start_timestamp_ms')[1].split(',')[0].strip("': u'.L") endtime=str(ur).split('update_timestamp_ms')[1].split(',')[0].strip("': u'.L") state=str(ur).split('state')[1].split(',')[0].strip("': u'.") tskid=str(ur).split("'id'")[1].split(',')[0].strip("': u'.'}]") v=int(strttime)/1000 w=int(endtime)/1000 start=datetime.datetime.fromtimestamp(v).strftime('%Y-%m-%d %H:%M:%S.%f') startdate=start.split(' ')[0] starttime=start.split(' ')[1].split('.')[0] end=datetime.datetime.fromtimestamp(w).strftime('%Y-%m-%d %H:%M:%S.%f') enddate=end.split(' ')[0] endtime=end.split(' ')[1].split('.')[0] print(tsktype.title()) print(tskdesc) print(outurl) print(start) print(end) print(tskid) print(state) with open(report+'/Tasks_canceled.csv','a') as canceled: writer=csv.writer(canceled,delimiter=',',lineterminator='\n') writer.writerow([tskid,tsktype,startdate,starttime,enddate,endtime,tskdesc,outurl,state]) elif mode == 'COMPLETED': tsktype=str(ur).split('task_type')[1].split(',')[0].strip("': u'.") tskdesc=str(ur).split("'description'")[1].split(':')[1].split(',')[0].strip("': u'.") outurl=str(ur).split('output_url')[1].split(',')[0].strip("[': u'.]") strttime=str(ur).split('start_timestamp_ms')[1].split(',')[0].strip("': u'.L") endtime=str(ur).split('update_timestamp_ms')[1].split(',')[0].strip("': u'.L") state=str(ur).split('state')[1].split(',')[0].strip("': u'.") tskid=str(ur).split("'id'")[1].split(',')[0].strip("': u'.'}]") v=int(strttime)/1000 w=int(endtime)/1000 start=datetime.datetime.fromtimestamp(v).strftime('%Y-%m-%d %H:%M:%S.%f') startdate=start.split(' ')[0] starttime=start.split(' ')[1].split('.')[0] end=datetime.datetime.fromtimestamp(w).strftime('%Y-%m-%d %H:%M:%S.%f') enddate=end.split(' ')[0] endtime=end.split(' ')[1].split('.')[0] print(tsktype.title()) print(tskdesc) print(outurl) print(start) print(end) print(tskid) print(state) with open(report+'/Tasks_completed.csv','a') as completed: writer=csv.writer(completed,delimiter=',',lineterminator='\n') writer.writerow([tskid,tsktype,startdate,starttime,enddate,endtime,tskdesc,outurl,state]) completed.close() failed.close() canceled.close() except Exception: with open(report+'/Errorlog.csv','wb') as csvfile: writer=csv.writer(csvfile,delimiter=',') writer.writerow([tskid]) csvfile.close()
60.289474
203
0.485814
741
6,873
4.470985
0.133603
0.065198
0.061274
0.083308
0.775128
0.771204
0.746152
0.727739
0.715967
0.67371
0
0.01928
0.313255
6,873
113
204
60.823009
0.682627
0
0
0.59292
0
0
0.15379
0
0
0
0
0
0
1
0.00885
false
0
0.070796
0
0.079646
0.19469
0
0
0
null
0
0
0
0
1
1
1
1
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
5
a36d38b08171f2effdafaf1709a5e7c70a01961f
77
py
Python
rasa_chinese_service/core/__init__.py
lhr0909/rasa_chinese_service
3ea96c3f2b5af94aeb06a47621ca3a4c3c3368a9
[ "Apache-2.0" ]
null
null
null
rasa_chinese_service/core/__init__.py
lhr0909/rasa_chinese_service
3ea96c3f2b5af94aeb06a47621ca3a4c3c3368a9
[ "Apache-2.0" ]
null
null
null
rasa_chinese_service/core/__init__.py
lhr0909/rasa_chinese_service
3ea96c3f2b5af94aeb06a47621ca3a4c3c3368a9
[ "Apache-2.0" ]
1
2021-10-04T05:52:43.000Z
2021-10-04T05:52:43.000Z
from rasa_chinese_service.core.policies import StackedBilstmTensorFlowPolicy
38.5
76
0.922078
8
77
8.625
1
0
0
0
0
0
0
0
0
0
0
0
0.051948
77
1
77
77
0.945205
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
1
0
0
5
a378c8fb7c2dd6b3b42c1ae496cde091e9b4ff29
2,656
py
Python
tests/test_3_boxplot_visualisation.py
weifanjiang/CSSPy
361d18d7b9c08bcff11a18524a718b3522c48786
[ "MIT" ]
3
2018-10-04T14:00:50.000Z
2021-12-11T08:57:26.000Z
tests/test_3_boxplot_visualisation.py
weifanjiang/CSSPy
361d18d7b9c08bcff11a18524a718b3522c48786
[ "MIT" ]
null
null
null
tests/test_3_boxplot_visualisation.py
weifanjiang/CSSPy
361d18d7b9c08bcff11a18524a718b3522c48786
[ "MIT" ]
null
null
null
# This is a visualization script for the CSSP results on real datasets. # The visualization is available for the following subsampling functions: ## * Projection DPPs ## * Volume sampling ## * Pivoted QR ## * Double Phase ## * Largest leverage scores import sys sys.path.insert(0, '..') from CSSPy.dataset_tools import * from CSSPy.visualization_tools import * import numpy as np import pandas as pd from matplotlib import pyplot as plt # Importing the dataset dataset_name = "leukemia" exp_number = 50 k = 10 # Load the results from a txt file savefile_name = "results/test_2/boxplots/"+dataset_name+"_boosting_allalgos_"+str(exp_number)+"samples_k_"+str(k)+".txt" boosting_error_fro_aggregated_list_load = np.loadtxt(savefile_name) boosting_error_fro_aggregated_list_load_to_list = [] for i in list(range(5)): boosting_error_fro_aggregated_list_load_to_list.append(boosting_error_fro_aggregated_list_load[i]) # Plot the comparison of boosting of the algorithms plt.figure(figsize=(10, 8)) plt.xticks(fontsize=22) plt.yticks(fontsize=16) ax = plt.subplot(111) box_2 = plt.boxplot(boosting_error_fro_aggregated_list_load_to_list, showfliers=False) plt.setp(box_2['medians'], color='red', linewidth=3) plt.ylabel(r'$\mathrm{\|\| X- \pi_{S}^{Fr} X \|\| _{Fr}}$', fontsize=18) plt.xticks(rotation=45) plt.gca().xaxis.set_ticklabels(["Volume S.","Projection DPP","Largest lvs","Pivoted QR","Double Phase"]) # Save the figure on a pdf file figfile_name= "results/test_2/"+dataset_name+"_boosting_allalgos_"+str(exp_number)+"samples_k_"+str(k)+".pdf" plt.savefig(figfile_name) plt.show() ### The boosting of the algorithms # Load the results from a txt file savefile_name = "results/test_2/boxplots/"+dataset_name+"_allalgos_"+str(exp_number)+"samples_k_"+str(k)+".txt" error_fro_aggregated_list_load = np.loadtxt(savefile_name) error_fro_aggregated_list_load_to_list = [] for i in list(range(5)): error_fro_aggregated_list_load_to_list.append(error_fro_aggregated_list_load[i]) # Plot the comparison of boosting of the algorithms plt.figure(figsize=(10, 8)) plt.xticks(fontsize=22) plt.yticks(fontsize=16) ax = plt.subplot(111) box_2 = plt.boxplot(error_fro_aggregated_list_load_to_list, showfliers=False) plt.setp(box_2['medians'], color='red', linewidth=3) plt.ylabel(r'$\mathrm{\|\| X- \pi_{S}^{Fr} X \|\| _{Fr}}$', fontsize=18) plt.xticks(rotation=45) plt.gca().xaxis.set_ticklabels(["Volume S.","Projection DPP","Largest lvs","Pivoted QR","Double Phase"]) # Save the figure on a pdf file figfile_name= "results/test_2/"+dataset_name+"_allalgos_"+str(exp_number)+"samples_k_"+str(k)+".pdf" plt.savefig(figfile_name) plt.show()
34.947368
120
0.761295
419
2,656
4.565632
0.286396
0.041819
0.094093
0.115003
0.785154
0.785154
0.77679
0.77679
0.724516
0.672243
0
0.018789
0.098268
2,656
76
121
34.947368
0.779958
0.192771
0
0.5
0
0
0.198869
0.02262
0
0
0
0
0
1
0
false
0
0.136364
0
0.136364
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
a38065fcce176280d73584d73ddd5255f08bfa92
263
py
Python
odm360/__init__.py
schuyler/odm360
cd33688db91443b5db3451d2800a465d9fef7931
[ "MIT" ]
15
2020-06-29T12:14:15.000Z
2021-12-23T12:41:01.000Z
odm360/__init__.py
schuyler/odm360
cd33688db91443b5db3451d2800a465d9fef7931
[ "MIT" ]
126
2020-06-16T08:21:49.000Z
2020-12-27T15:09:13.000Z
odm360/__init__.py
schuyler/odm360
cd33688db91443b5db3451d2800a465d9fef7931
[ "MIT" ]
2
2020-09-15T07:32:06.000Z
2021-04-28T07:40:01.000Z
# -*- coding: utf-8 -*- # TODO add version from odm360 import ublox from odm360 import log from odm360 import camera360gphoto from odm360 import workflows from odm360 import timer from odm360 import camera360rig from odm360 import dbase from odm360 import states
23.909091
34
0.806084
38
263
5.578947
0.447368
0.377358
0.603774
0
0
0
0
0
0
0
0
0.13964
0.155894
263
10
35
26.3
0.815315
0.144487
0
0
0
0
0
0
0
0
0
0.1
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
0
0
0
5
6e8046fb5baf4dbebb0f8c68cb85c4896c14307b
886
py
Python
Python/flatten/flatten.py
CNHume/Samples
2fdaa7a3193f19a882d0adebffaaf56af0984654
[ "MIT" ]
null
null
null
Python/flatten/flatten.py
CNHume/Samples
2fdaa7a3193f19a882d0adebffaaf56af0984654
[ "MIT" ]
null
null
null
Python/flatten/flatten.py
CNHume/Samples
2fdaa7a3193f19a882d0adebffaaf56af0984654
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # 2018-10-24 CNHume Created File def main(): print flatten([]) print flatten([[0, 1, [4, 5]], [2, 3]]) print flatten([0]) print flatten([0, 1]) print flatten([[0, 1]]) print flatten([0, [0, 1]]) print flatten([[0, 1], [], 2]) print flatten([[0, 1], [2, 3]]) print flatten([[0, 1, [4, 5], 6], [2, 3]]) print flatten([[0, 1, [4, 5], 6], [[0, 1], 2, 3]]) pass def flatten(elements): return flatten2(elements) def flatten1(elements): return [item for element in elements for item in flat_list(element)] def flat_list(element): return flatten1(element) if isinstance(element, list) else [element] def flatten2(elements): result = [] for element in elements: if isinstance(element, list): result.extend(flatten2(element)) else: result.append(element) return result if __name__ == '__main__': main() pass
23.315789
70
0.617381
130
886
4.130769
0.292308
0.223464
0.217877
0.182495
0.26257
0.206704
0.147114
0.070764
0.070764
0
0
0.071629
0.196388
886
37
71
23.945946
0.682584
0.058691
0
0.068966
0
0
0.009627
0
0
0
0
0
0
0
null
null
0.068966
0
null
null
0.344828
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
5
6eca93c58b63a1c7b945c38f5f3701a7629ed44e
226
py
Python
app/schemas/ws_events.py
NewShadesDAO/api
1e66336f0ea526f245918ecdc328c9a66280be91
[ "CC0-1.0" ]
1
2022-03-21T07:37:02.000Z
2022-03-21T07:37:02.000Z
app/schemas/ws_events.py
NewShadesDAO/api
1e66336f0ea526f245918ecdc328c9a66280be91
[ "CC0-1.0" ]
25
2022-01-16T13:18:21.000Z
2022-03-29T13:08:19.000Z
app/schemas/ws_events.py
NewShadesDAO/api
1e66336f0ea526f245918ecdc328c9a66280be91
[ "CC0-1.0" ]
1
2022-01-15T21:42:00.000Z
2022-01-15T21:42:00.000Z
from datetime import datetime from typing import List from pydantic import BaseModel class EventBase(BaseModel): pass class CreateMarkChannelReadEvent(EventBase): channel_ids: List[str] last_read_at: datetime
16.142857
44
0.787611
27
226
6.481481
0.62963
0
0
0
0
0
0
0
0
0
0
0
0.168142
226
13
45
17.384615
0.930851
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.125
0.375
0
0.875
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
1
0
0
5
6e046ea8bdd4ab6c81061765bb7594fa293ccee3
96
py
Python
fuzzing_cli/fuzz/ide/__init__.py
ConsenSys/diligence-fuzzing
74491aa8424752baf338d26d667f5259ef296d89
[ "Apache-2.0" ]
8
2021-08-20T10:51:32.000Z
2022-03-31T16:26:22.000Z
fuzzing_cli/fuzz/ide/__init__.py
ConsenSys/diligence-fuzzing
74491aa8424752baf338d26d667f5259ef296d89
[ "Apache-2.0" ]
6
2021-09-29T05:33:15.000Z
2022-02-10T09:01:54.000Z
fuzzing_cli/fuzz/ide/__init__.py
ConsenSys/diligence-fuzzing
74491aa8424752baf338d26d667f5259ef296d89
[ "Apache-2.0" ]
1
2021-08-20T11:35:58.000Z
2021-08-20T11:35:58.000Z
from .brownie import BrownieJob from .hardhat import HardhatJob from .truffle import TruffleJob
24
31
0.84375
12
96
6.75
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.125
96
3
32
32
0.964286
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
1
0
0
5
6e24c982f6e55fb6df1cccc79726797bc7902172
4,779
py
Python
tests/stonith/CallsBase.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
9
2019-06-02T16:37:03.000Z
2021-11-25T13:54:59.000Z
tests/stonith/CallsBase.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
9
2019-01-03T14:57:39.000Z
2021-02-08T12:28:58.000Z
tests/stonith/CallsBase.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
5
2019-08-13T16:35:41.000Z
2021-11-18T13:43:53.000Z
#!/usr/bin/python3 import os import sys sys.path.append( os.path.dirname( os.path.realpath(__file__) ) + '/../../stonith' ) import Base import abc import hetznercloud import stonith import stonith_agent import time import unittest from unittest import mock from mock import Mock, MagicMock import stonith_agent class TestBase(Base.TestBase): @abc.abstractmethod def serverAction(self, server): pass @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_called(self, client, hostFinder): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.takeAction(agent) self.serverAction(server).assert_called_once() @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_is_repeatet_after_wait_on_action_server_error(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.serverAction(server).side_effect = \ [hetznercloud.HetznerInternalServerErrorException('502'), MagicMock() ] self.takeAction(agent) assert sleep.call_count == 1 assert self.serverAction(server).call_count == 2 @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_is_repeatet_after_wait_on_action_rate_limit_error(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.serverAction(server).side_effect = [hetznercloud.HetznerRateLimitExceeded('502'), \ MagicMock()] self.takeAction(agent) assert sleep.call_count == 1 assert self.serverAction(server).call_count == 2 @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_is_repeatet_after_wait_on_action_action_error(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.serverAction(server).side_effect = \ [hetznercloud.HetznerActionException('502'), \ MagicMock()] self.takeAction(agent) assert sleep.call_count == 1 assert self.serverAction(server).call_count == 2 @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_is_repeatet_after_wait_on_action_action_error(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.serverAction(server).side_effect = \ [ValueError('json decode error'), MagicMock()] self.takeAction(agent) assert sleep.call_count == 1 assert self.serverAction(server).call_count == 2 @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_is_repeatet_after_wait_on_action_action_exception(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client serverAction = MagicMock() serverAction.wait_until_status_is = \ Mock(side_effect=hetznercloud.HetznerWaitAttemptsExceededException()) self.serverAction(server).side_effect = [serverAction, MagicMock()] self.takeAction(agent) assert sleep.call_count == 1 assert self.serverAction(server).call_count == 2 @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_is_canceled_after_action_authentication_exception(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.serverAction(server).side_effect = [hetznercloud.HetznerAuthenticationException(), server] self.takeAction(agent) assert self.serverAction(server).call_count == 1 @mock.patch('time.sleep') @mock.patch('shared.HostFinder') @mock.patch('hetznercloud.HetznerCloudClient') def test_action_returns_missconfigured_after_action_authentication_exception(self, client, hostFinder, sleep): server, hostFinder, agent = self.makeBase(client, hostFinder) agent.client = client self.serverAction(server).side_effect = [hetznercloud.HetznerAuthenticationException(), server] returnCode = self.takeAction(agent) assert returnCode == stonith.ReturnCodes.isMissconfigured
42.669643
114
0.709981
512
4,779
6.447266
0.146484
0.062708
0.093305
0.060588
0.768858
0.759164
0.747955
0.747955
0.747955
0.747955
0
0.005378
0.182883
4,779
111
115
43.054054
0.839949
0.003557
0
0.67
0
0
0.10376
0.05209
0
0
0
0
0.13
1
0.09
false
0.01
0.12
0
0.22
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
6e2e5f2304386d3cf5f0f8adcd53fd975ec41d9f
10,338
py
Python
SalmonellaEM.py
newby-jay/ptEM
1dc40f64ffcd709863652f25cc2ee9c9450a9480
[ "Apache-2.0" ]
null
null
null
SalmonellaEM.py
newby-jay/ptEM
1dc40f64ffcd709863652f25cc2ee9c9450a9480
[ "Apache-2.0" ]
null
null
null
SalmonellaEM.py
newby-jay/ptEM
1dc40f64ffcd709863652f25cc2ee9c9450a9480
[ "Apache-2.0" ]
null
null
null
from __future__ import division from __future__ import print_function from pylab import * import pandas as pd from numba import jit, jitclass from numba import int64, int32, int16, float64, float32, int16 from EMestimation import * Salmonella_dtype = [('dim', int64), ('Nh', int64), ('vmag', float64[:]), ('v', float64[:, :])] @jitclass(Salmonella_dtype) class ThreeStateModel(EMestimation): def __init__(self, dim, Nphi): """Initialize using the number of velocity states.""" self.dim = dim Ntheta = Nphi*4 self.Nh = Ntheta*Nphi + 2 Nrun = Ntheta*Nphi theta = linspace(0, 2*pi, Ntheta+1)[:-1] phi = linspace(0, 0.5*pi, Nphi+1)[:-1] THETA = zeros((Nphi, Ntheta)) PHI = zeros((Nphi, Ntheta)) for i in arange(Nphi): for j in arange(Ntheta): THETA[i, j] = theta[j] PHI[i, j] = phi[i] self.vmag = zeros(self.Nh) if dim == 2: v = zeros((self.Nh, 2)) v[2:, 0] = (cos(PHI)*cos(THETA)).flatten() v[2:, 1] = (cos(PHI)*sin(THETA)).flatten() self.vmag[2:] = (cos(PHI)**2).flatten() elif dim == 3: v = zeros((self.Nh, 3)) v[2:, 0] = (cos(PHI)*cos(THETA)).flatten() v[2:, 1] = (cos(PHI)*sin(THETA)).flatten() v[2:, 2] = sin(PHI).flatten() self.vmag[2:] = ones_like(PHI).flatten() else: assert dim == 2 or dim == 3 self.v = v def pss(self, pars): k1, k2, k3, k4 = pars[:4] O = k2*k4 + k1*k4 + k1*k3 p1 = k2*k4/O p2 = k1*k4/O p3 = k1*k3/O return array((p1, p2, p3)) def Pinit(self, Np, pars): """Initialize hidden state distribution for each path.""" pinit = self.pss(pars) p0 = ones((Np, self.Nh)) p0[:, 0] = pinit[0] p0[:, 1] = pinit[1] p0[:, 2:] = pinit[2]/(self.Nh - 2) return p0 def getQ(self, pars): """Generate the propagator matrix for the hidden state Markov process.""" k1, k2, k3, k4 = pars[:4] A = array(((-k1, k2, 0.), (k1, -k2-k3, k4), (0., k3, -k4))) Q = eye(3) + A Ap = dot(A, eye(3)) for n in arange(2, 10): Ap = dot(Ap, A/n) Q += Ap return Q def UandT(self, dx, pars, Q): """Evaluate the observation and hidden state probability matrices for a given path.""" k1, k2, k3, k4 = pars[:4] mV, Dtrap, Dtum, Dswim = pars[4:] Nt, _ = dx.shape U = zeros((Nt, self.Nh)) Darr = array((Dtrap, Dtum, Dswim)) for n in arange(self.Nh): r = (dx - mV*self.v[n])**2 D = Darr[min(2, n)] factor = (4.*pi*D)**(self.dim/2.) U[:, n] = exp(-psum(r)/(4.*D))/factor T0 = zeros((self.Nh, self.Nh)) T0[:2, :2] = Q[:2, :2] T0[1, 2:] = Q[1, 2] T0[2:, 1] = Q[2, 1]/(self.Nh - 2) T0[2:, 2:] = eye(self.Nh - 2)*Q[2, 2] # T = eye(self.Nh) + T0 # Ap = dot(T0, eye(self.Nh)) # for n in arange(2, 10): # Ap = dot(Ap, T0/n) # T += Ap return U, T0 def Mstep(self, DXarray, pInds, S, S2): """Extract maximimum likelihood parameters given hidden state distribution for the E step.""" Np = pInds.size - 1 Npoints, Nh = S.shape ## transition rates P = psum(S2.reshape(Np, -1).T).reshape(Nh, Nh) P /= sum(P) P33 = zeros((3, 3)) P33[:2, :2] = P[:2, :2] for i in (0, 1): P33[i, 2] = sum(P[i, 2:]) P33[2, i] = sum(P[2:, i]) P33[2, 2] = sum(P[2:, 2:]) pssFull = psum(S.T) pssFull /= sum(pssFull) pss = array((pssFull[0], pssFull[1], sum(pssFull[2:]))) Popt = (P33<=P33.T)*P33 + (P33>P33.T)*P33.T # Popt = P33 T = Popt/pss k1, k2, k3, k4 = T[1, 0], T[0, 1], T[2, 1], T[1, 2] ## swim speed and diffusivities mV, Dtrap, Dtum, Dswim = 0., 0., 0., 0. NmV, NDtrap, NDtum, NDswim = 0., 0., 0., 0. for p in arange(Np): a, b = pInds[p:p+2] Sp = S[a:b] dxp = DXarray[a:b] NmV += sum(Sp*self.vmag) for n in arange(2, Nh): mV += sum(Sp[:, n]*psum(self.v[n]*dxp)) mV /= NmV for p in arange(Np): a, b = pInds[p:p+2] Sp = S[a:b] dxp = DXarray[a:b] NDtrap += 2.*self.dim*sum(Sp[:, 0]) NDtum += 2.*self.dim*sum(Sp[:, 1]) NDswim += 2.*self.dim*sum(Sp[:, 2:]) Dtrap += sum(Sp[:, 0]*psum(dxp**2)) Dtum += sum(Sp[:, 1]*psum(dxp**2)) for n in arange(2, Nh): Dswim += sum(Sp[:, n]*psum((dxp - mV*self.v[n])**2)) Dtrap /= NDtrap Dtum /= NDtum Dswim /= NDswim pars = array((k1, k2, k3, k4, mV, Dtrap, Dtum, Dswim)) return pars ################################################################################ ################################################################################ fourState_dtype = [('dim', int64), ('Nh', int64), ('vmag', float64[:]), ('v', float64[:, :])] @jitclass(fourState_dtype) class FourStateModel(EMestimation): def __init__(self, dim, Nphi): """Initialize using the number of velocity states.""" self.dim = dim Ntheta = Nphi*4 self.Nh = Ntheta*Nphi + 3 Nrun = Ntheta*Nphi theta = linspace(0, 2*pi, Ntheta+1)[:-1] phi = linspace(0, 0.5*pi, Nphi+1)[:-1] THETA = zeros((Nphi, Ntheta)) PHI = zeros((Nphi, Ntheta)) for i in arange(Nphi): for j in arange(Ntheta): THETA[i, j] = theta[j] PHI[i, j] = phi[i] self.vmag = zeros(self.Nh) if dim == 2: v = zeros((self.Nh, 2)) v[3:, 0] = (cos(PHI)*cos(THETA)).flatten() v[3:, 1] = (cos(PHI)*sin(THETA)).flatten() self.vmag[3:] = (cos(PHI)**2).flatten() elif dim == 3: v = zeros((self.Nh, 3)) v[3:, 0] = (cos(PHI)*cos(THETA)).flatten() v[3:, 1] = (cos(PHI)*sin(THETA)).flatten() v[3:, 2] = sin(PHI).flatten() self.vmag[3:] = ones_like(PHI).flatten() else: assert dim == 2 or dim == 3 self.v = v def pss(self, pars): k1, k2, k3, k4, k5, k6 = pars[:6] A = array(((-k1, k2, 0., 0.), (k1, -k2-k3, k4, 0.), (0., k3, -k4-k5, k6), (0., 0., k5, -k6))) u, s, v = svd(A) pss = v[-1, :] pss /= sum(pss) return pss def Pinit(self, Np, pars): """Initialize hidden state distribution for each path.""" # pinit = self.pss(pars) p0 = ones((Np, self.Nh))/self.Nh # p0[:, 0] = pinit[0] # p0[:, 1] = pinit[1] # p0[:, 2:] = pinit[2]/(self.Nh - 2) return p0 def getQ(self, pars): """Generate the propagator matrix for the hidden state Markov process.""" k1, k2, k3, k4, k5, k6 = pars[:6] A = array(((-k1, k2, 0., 0.), (k1, -k2-k3, k4, 0.), (0., k3, -k4-k5, k6), (0., 0., k5, -k6))) Q = eye(4) + A Ap = dot(A, eye(4)) for n in arange(2, 10): Ap = dot(Ap, A/n) Q += Ap return Q def UandT(self, dx, pars, Q): """Evaluate the observation and hidden state probability matrices for a given path.""" k1, k2, k3, k4, k5, k6 = pars[:6] mV, Dtrap, Dtum1, Dtum2, Dswim = pars[6:] Nt, _ = dx.shape U = zeros((Nt, self.Nh)) Darr = array((Dtrap, Dtum1, Dtum2, Dswim)) for n in arange(self.Nh): r = (dx - mV*self.v[n])**2 D = Darr[min(3, n)] factor = (4.*pi*D)**(self.dim/2.) U[:, n] = exp(-psum(r)/(4.*D))/factor T0 = zeros((self.Nh, self.Nh)) T0[:3, :3] = Q[:3, :3] T0[2, 3:] = Q[2, 3] T0[3:, 2] = Q[3, 2]/(self.Nh - 3) T0[3:, 3:] = eye(self.Nh - 3)*Q[3, 3] return U, T0 def Mstep(self, DXarray, pInds, S, S2): """Extract maximimum likelihood parameters given hidden state distribution for the E step.""" Np = pInds.size - 1 Npoints, Nh = S.shape ## transition rates P = psum(S2.reshape(Np, -1).T).reshape(Nh, Nh) P /= sum(P) P44 = zeros((4, 4)) P44[:3, :3] = P[:3, :3] for i in (0, 1, 2): P44[i, 3] = sum(P[i, 3:]) P44[3, i] = sum(P[3:, i]) P44[3, 3] = sum(P[3:, 3:]) pssFull = psum(S.T) pssFull /= sum(pssFull) pss = array((pssFull[0], pssFull[1], pssFull[2], sum(pssFull[3:]))) Popt = (P44<=P44.T)*P44 + (P44>P44.T)*P44.T # Popt = P33 T = Popt/pss k1, k2, k3, k4 = T[1, 0], T[0, 1], T[2, 1], T[1, 2] k5, k6 = T[3, 2], T[2, 3] ## swim speed and diffusivities mV, Dtrap, Dtum1, Dtum2, Dswim = 0., 0., 0., 0., 0. NmV, NDtrap, NDtum1, NDtum2, NDswim = 0., 0., 0., 0., 0. for p in arange(Np): a, b = pInds[p:p+2] Sp = S[a:b] dxp = DXarray[a:b] NmV += sum(Sp*self.vmag) for n in arange(3, Nh): mV += sum(Sp[:, n]*psum(self.v[n]*dxp)) mV /= NmV for p in arange(Np): a, b = pInds[p:p+2] Sp = S[a:b] dxp = DXarray[a:b] NDtrap += 2.*self.dim*sum(Sp[:, 0]) NDtum1 += 2.*self.dim*sum(Sp[:, 1]) NDtum2 += 2.*self.dim*sum(Sp[:, 2]) NDswim += 2.*self.dim*sum(Sp[:, 3:]) Dtrap += sum(Sp[:, 0]*psum(dxp**2)) Dtum1 += sum(Sp[:, 1]*psum(dxp**2)) Dtum2 += sum(Sp[:, 2]*psum(dxp**2)) for n in arange(3, Nh): Dswim += sum(Sp[:, n]*psum((dxp - mV*self.v[n])**2)) Dtrap /= NDtrap Dtum1 /= NDtum1 Dtum2 /= NDtum2 Dswim /= NDswim pars = array((k1, k2, k3, k4, k5, k6, mV, Dtrap, Dtum1, Dtum2, Dswim)) return pars
37.053763
80
0.440704
1,496
10,338
3.028743
0.110294
0.035754
0.017215
0.022953
0.811962
0.784595
0.725447
0.707791
0.689914
0.685058
0
0.074796
0.359837
10,338
278
81
37.18705
0.609852
0.09615
0
0.633745
0
0
0.002206
0
0
0
0
0
0.00823
1
0.049383
false
0
0.028807
0
0.127572
0.004115
0
0
0
null
0
0
0
1
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
5
28145ebc17ab492f77f166e7bc110d6758849f24
200
py
Python
tests/extensions/redash-dummy/redash_dummy/extension.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
20,680
2015-11-16T15:38:37.000Z
2022-03-31T21:43:43.000Z
tests/extensions/redash-dummy/redash_dummy/extension.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
3,934
2015-11-16T14:46:49.000Z
2022-03-31T13:22:31.000Z
tests/extensions/redash-dummy/redash_dummy/extension.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
4,147
2015-11-17T15:57:23.000Z
2022-03-31T11:57:43.000Z
module_attribute = "hello!" def extension(app): """This extension will work""" return "extension loaded" def assertive_extension(app): """This extension won't work""" assert False
16.666667
35
0.675
24
200
5.541667
0.666667
0.180451
0.240602
0.37594
0
0
0
0
0
0
0
0
0.2
200
11
36
18.181818
0.83125
0.25
0
0
0
0
0.158273
0
0
0
0
0
0.4
1
0.4
false
0
0
0
0.6
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
28184bc14f46ca980960a50a4f357dfb72722ebf
45
py
Python
src/logging/__init__.py
stdevRulo/babysitter_agent
ced902190862a31015014628e5566f6fd2610ed7
[ "MIT" ]
1
2020-11-17T02:28:49.000Z
2020-11-17T02:28:49.000Z
src/logging/__init__.py
stdevRulo/babysitter_agent
ced902190862a31015014628e5566f6fd2610ed7
[ "MIT" ]
2
2020-11-11T04:15:11.000Z
2020-11-11T20:31:40.000Z
src/logging/__init__.py
stdevRulo/babysitter_agent
ced902190862a31015014628e5566f6fd2610ed7
[ "MIT" ]
null
null
null
from .logging import LoggerFactory as Logger
22.5
44
0.844444
6
45
6.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
45
1
45
45
0.974359
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
28362be008db73c4cdf8ab18eb60d2484cd2a936
72
py
Python
dowpy/__init__.py
JhnBrunelle/dowpy
d7f47546c98e2440880664961b0f2d718533a817
[ "MIT" ]
null
null
null
dowpy/__init__.py
JhnBrunelle/dowpy
d7f47546c98e2440880664961b0f2d718533a817
[ "MIT" ]
null
null
null
dowpy/__init__.py
JhnBrunelle/dowpy
d7f47546c98e2440880664961b0f2d718533a817
[ "MIT" ]
null
null
null
# Not operational, so protecting against dow.py from .dow import Dow
12
47
0.75
11
72
4.909091
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.194444
72
5
48
14.4
0.931034
0.625
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
1
0
0
5
2840493204708afa3f19b4379727b7a673f04313
77
py
Python
Python Basics/loops.py
NaskoVasilev/Python-Fundamentals
7721f7e717061092fa23b7e85ee8e0308c7390cb
[ "MIT" ]
1
2020-10-04T13:42:16.000Z
2020-10-04T13:42:16.000Z
Python Basics/loops.py
NaskoVasilev/Python-Fundamentals
7721f7e717061092fa23b7e85ee8e0308c7390cb
[ "MIT" ]
null
null
null
Python Basics/loops.py
NaskoVasilev/Python-Fundamentals
7721f7e717061092fa23b7e85ee8e0308c7390cb
[ "MIT" ]
null
null
null
for i in range(10): print(i) i = 1 while i < 6: print(i) i += 1
9.625
19
0.467532
16
77
2.25
0.5625
0.333333
0.388889
0.444444
0
0
0
0
0
0
0
0.104167
0.376623
77
7
20
11
0.645833
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
95c48ca76e0baf16b8d3ab9078e8a4de869acb78
128
py
Python
pymps/blockmarker/__init__.py
GiggleLiu/pymps
c8314581010d68d3fa34af6e87b6af2969fc261d
[ "MIT" ]
4
2018-02-17T05:35:54.000Z
2021-09-12T10:14:57.000Z
pymps/blockmarker/__init__.py
GiggleLiu/pymps
c8314581010d68d3fa34af6e87b6af2969fc261d
[ "MIT" ]
null
null
null
pymps/blockmarker/__init__.py
GiggleLiu/pymps
c8314581010d68d3fa34af6e87b6af2969fc261d
[ "MIT" ]
null
null
null
from .blockmatrix import * from .blockmarker import * from .blocklib import * __all__ = ['plotlib', 'spaceconfig', 'autoblock']
25.6
49
0.734375
13
128
6.923077
0.692308
0.222222
0
0
0
0
0
0
0
0
0
0
0.132813
128
4
50
32
0.810811
0
0
0
0
0
0.210938
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
1
0
0
5
95d9e42d5b0dd1006e77bfa59de3aaac210be7c9
426
py
Python
inzyme/libc.py
nicryptolaus/inzyme
8960e8f98cf1b9c0106345e89fd66218aad4d1cd
[ "Apache-2.0" ]
1
2018-01-09T02:52:11.000Z
2018-01-09T02:52:11.000Z
inzyme/libc.py
nicryptolaus/inzyme
8960e8f98cf1b9c0106345e89fd66218aad4d1cd
[ "Apache-2.0" ]
null
null
null
inzyme/libc.py
nicryptolaus/inzyme
8960e8f98cf1b9c0106345e89fd66218aad4d1cd
[ "Apache-2.0" ]
null
null
null
import ctypes class libc: """ ctypes wrapper for system-calls """ lib = ctypes.cdll.LoadLibrary("libc.so.6") @classmethod def inotify_init1(cls, flags): return libc.lib.inotify_init1(flags) @classmethod def inotify_add_watch(cls, fd, pathname, mask): return libc.lib.inotify_add_watch(fd, pathname, mask) @classmethod def inotify_rm_watch(cls, fd, wd): return libc.lib.inotify_rm_watch(fd, wd)
23.666667
57
0.720657
62
426
4.790323
0.435484
0.141414
0.212121
0.20202
0
0
0
0
0
0
0
0.008403
0.161972
426
17
58
25.058824
0.823529
0.07277
0
0.25
0
0
0.023256
0
0
0
0
0
0
1
0.25
false
0
0.083333
0.25
0.75
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
c2606e79eea16b252fbd7a351e3dfc0bc76d85ee
159
py
Python
transformers4rec/data/testing/tabular_data/dataset.py
Jwmc999/Transformers4Rec
e6cdf13a7c0102303c0258120274f88b2d42c9c2
[ "Apache-2.0" ]
415
2021-09-20T20:47:34.000Z
2022-03-31T16:51:03.000Z
transformers4rec/data/testing/tabular_data/dataset.py
Jwmc999/Transformers4Rec
e6cdf13a7c0102303c0258120274f88b2d42c9c2
[ "Apache-2.0" ]
128
2021-09-21T07:19:38.000Z
2022-03-31T15:08:27.000Z
transformers4rec/data/testing/tabular_data/dataset.py
Jwmc999/Transformers4Rec
e6cdf13a7c0102303c0258120274f88b2d42c9c2
[ "Apache-2.0" ]
44
2021-09-23T07:25:36.000Z
2022-03-29T04:17:53.000Z
import pathlib from transformers4rec.data.dataset import ParquetDataset tabular_testing_data: ParquetDataset = ParquetDataset(pathlib.Path(__file__).parent)
26.5
84
0.861635
17
159
7.705882
0.705882
0
0
0
0
0
0
0
0
0
0
0.006803
0.075472
159
5
85
31.8
0.884354
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c266c33da930200075cf94645f2a7e1bb1a6f178
194
py
Python
deep_learn/models/sequence/__init__.py
ImbesatRizvi/Accio
b0ad2d245f4f7c42d85b722db9fad435c0d06a99
[ "Apache-2.0" ]
2
2019-07-30T09:39:53.000Z
2019-07-30T09:40:06.000Z
deep_learn/models/sequence/__init__.py
ImbesatRizvi/Accio
b0ad2d245f4f7c42d85b722db9fad435c0d06a99
[ "Apache-2.0" ]
null
null
null
deep_learn/models/sequence/__init__.py
ImbesatRizvi/Accio
b0ad2d245f4f7c42d85b722db9fad435c0d06a99
[ "Apache-2.0" ]
2
2018-11-07T22:45:29.000Z
2019-10-24T09:53:41.000Z
from .MeanFeaturizer import MeanFeaturizer from .EncoderRNN import EncoderRNN from .DecoderRNN import DecoderRNN from .Attention import Attention from .MultiDimAttention import MultiDimAttention
38.8
48
0.876289
20
194
8.5
0.35
0
0
0
0
0
0
0
0
0
0
0
0.097938
194
5
48
38.8
0.971429
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
1
0
0
5
6c5c4bd293f6c5b556318a657c7b012b296031ca
69
py
Python
vivus.py
tuguldurs/vivus
8d5f4373d1746643b1eee2816e2e5ba9efc926c8
[ "MIT" ]
4
2021-05-05T17:01:10.000Z
2021-07-09T18:15:32.000Z
vivus.py
tuguldurs/vivus
8d5f4373d1746643b1eee2816e2e5ba9efc926c8
[ "MIT" ]
1
2021-11-24T02:11:04.000Z
2021-11-24T02:11:04.000Z
vivus.py
UltraSound-AI/vivus-sdk
8d5f4373d1746643b1eee2816e2e5ba9efc926c8
[ "MIT" ]
1
2021-05-26T10:52:13.000Z
2021-05-26T10:52:13.000Z
from sys import argv from src.main import main as vivus vivus(argv)
13.8
34
0.782609
13
69
4.153846
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.173913
69
4
35
17.25
0.947368
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6c6da186b9cdaf63760e88d5b76de3f92168bb99
55
py
Python
domain/src/presenter/__init__.py
python-jacksonsr45/web_services
6e37d4f00e9e59a35f06f05ce955ba53242ed9ee
[ "MIT" ]
null
null
null
domain/src/presenter/__init__.py
python-jacksonsr45/web_services
6e37d4f00e9e59a35f06f05ce955ba53242ed9ee
[ "MIT" ]
null
null
null
domain/src/presenter/__init__.py
python-jacksonsr45/web_services
6e37d4f00e9e59a35f06f05ce955ba53242ed9ee
[ "MIT" ]
null
null
null
from .client_presenter import ClientPresenterInterface
27.5
54
0.909091
5
55
9.8
1
0
0
0
0
0
0
0
0
0
0
0
0.072727
55
1
55
55
0.960784
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
1
0
0
5
66799cee14f0cb61e610ebffaf8786bc2562adc8
156
py
Python
common/tests.py
rkisdp/rkisdp.django.backend
771481cdeea6a101305c4819b06b839266ce6921
[ "MIT" ]
null
null
null
common/tests.py
rkisdp/rkisdp.django.backend
771481cdeea6a101305c4819b06b839266ce6921
[ "MIT" ]
null
null
null
common/tests.py
rkisdp/rkisdp.django.backend
771481cdeea6a101305c4819b06b839266ce6921
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # python imports from __future__ import unicode_literals # lib imports from django.test import TestCase # Create your tests here.
17.333333
39
0.74359
21
156
5.285714
0.857143
0.198198
0
0
0
0
0
0
0
0
0
0.007692
0.166667
156
8
40
19.5
0.846154
0.461538
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
1
0
0
5
66e4f0692d8af2976a5fbc01f391b75164a9c5ff
171
py
Python
AS-P/Orders/admin.py
dhruv289/Team-Shakeshack
b354f70c5fef4e6da1af57ec064f46804d550e1b
[ "Apache-2.0" ]
1
2018-10-19T04:14:38.000Z
2018-10-19T04:14:38.000Z
AS-P/Orders/admin.py
dhruv289/Team-Shakeshack
b354f70c5fef4e6da1af57ec064f46804d550e1b
[ "Apache-2.0" ]
null
null
null
AS-P/Orders/admin.py
dhruv289/Team-Shakeshack
b354f70c5fef4e6da1af57ec064f46804d550e1b
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Order from .models import content # Register your models here. admin.site.register(Order) admin.site.register(content)
28.5
32
0.818713
25
171
5.6
0.48
0.142857
0.228571
0
0
0
0
0
0
0
0
0
0.105263
171
6
33
28.5
0.915033
0.152047
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
dd0aac2bed94e6d5f38c8926fd1406379345a2db
38,144
py
Python
diet-plan-performance.py
windard/leeeeee
0107a5f95746592ca4fe78d2b5875cf65b1910e7
[ "MIT" ]
null
null
null
diet-plan-performance.py
windard/leeeeee
0107a5f95746592ca4fe78d2b5875cf65b1910e7
[ "MIT" ]
null
null
null
diet-plan-performance.py
windard/leeeeee
0107a5f95746592ca4fe78d2b5875cf65b1910e7
[ "MIT" ]
null
null
null
# coding=utf-8 class Solution(object): def dietPlanPerformance(self, calories, k, lower, upper): """ :type calories: List[int] :type k: int :type lower: int :type upper: int :rtype: int """ index = 0 count = 0 goal = 0 p = k while p: count += calories[p-1] p -= 1 while index < len(calories) - k + 1: if count > upper: goal += 1 elif count < lower: goal -= 1 if index + k < len(calories): count += calories[index+k] count -= calories[index] index += 1 return goal def _dietPlanPerformance(self, calories, k, lower, upper): """ :type calories: List[int] :type k: int :type lower: int :type upper: int :rtype: int """ # Time Limit index = 0 count = 0 while index < len(calories) - k + 1: s = k c = 0 i = index while i < len(calories) and s: c += calories[i] i += 1 s -= 1 if c > upper: count += 1 elif c < lower: count -= 1 index += 1 return count if __name__ == '__main__': s = Solution() print s.dietPlanPerformance([6,13,8,7,10,1,12,11], 6, 5, 37) print s.dietPlanPerformance([1,2,3,4,5], 1, 3, 3) print s.dietPlanPerformance([3,2], 2, 0, 1) print s.dietPlanPerformance([6,5,0,0], 2, 1, 5) print s.dietPlanPerformance([13889,8348,203,4542,11813,6512,6559,6178,6793,5988,5155,5750,13629,952,3495,11178,13537,7996,123,9806,1685,1616,2575,13346,5113,9716,675,390,3901,13208,7575,8474,7857,4428,11675,2718,11349,7200,12863,1938,12473,12948,5155,6950,5885,472,6199,5658,1713,7772,9339,5998,10021,4288,3279,178,3977,5716,1507,13174,13245,2152,9799,7658,12513,13468,2123,10174,12101,560,3935,9346,6633,2996,9619,13958,12493,1032,1367,7322,10449,8572,12187,13806,2853,1232,3151,8546,8265,13684,2675,918,4557,4840,11575,4154,9873,5356,5307,1998,1493,2464,11519,4210,5593,2372,595,6230,9949,8088,12599,1642,10129,9884,4027,9950,2069,8160,9903,7010,5321,6228,10643,4102,6157,6200,7223,4570,13697,3484,875,5966,10453,8320,4159,1794,2697,1780,12563,8598,5133,4056,11047,5066,3585,2124,7275,1054,11925,12640,3407,2306,8793,4596,12883,7318,7309,5560,10471,10778,4385,7244,2843,10558,8261,896,12127,7426,1049,1268,11427,614,7549,7368,7079,5418,3249,2412,10155,7502,517,2400,9791,6562,4505,7700,8931,8502,9965,8232,2487,6554,49,2140,5083,2462,13253,7952,9999,9314,13145,8180,6851,3702,5981,8968,8167,8346,10561,10588,5435,12942,10933,5216,8607,10818,13129,2404,7427,358,13629,13208,6727,4138,5105,300,9659,4702,3845,12192,1439,12530,5081,6772,6931,10166,11517,10440,6199,4490,9121,188,12603,2606,9685,784,4095,7634,10281,5668,11347,10278,5949,1192,4615,2746,5249,1548,907,9086,3589,8720,12703,9474,2937,6644,12451,5926,4717,8376,2455,12410,49,7596,10043,4894,11701,5936,13743,2018,6089,8132,10931,358,7709,13016,4151,9370,49,10140,7579,510,1061,12752,863,1714,10441,12484,12931,10614,2301,11096,7863,1178,8113,9884,6507,13630,1157,5696,4655,11378,13801,7092,7219,1302,6749,7352,87,12666,13729,11884,5579,6302,7237,1024,12943,9586,11945,12004,6931,8134,11709,12824,1111,11514,13137,540,11851,9998,4149,9536,3855,5634,13609,1252,6563,8502,3853,3016,11511,13018,10465,5660,9499,10366,8373,11472,10991,4642,10217,2980,13619,7606,61,8760,6391,4026,6673,12748,1419,2846,5893,4224,9855,8082,1081,10148,6019,7286,3389,6168,5495,5674,12977,9564,7611,2350,5093,9520,2207,10146,7929,10596,5939,11014,317,10696,13639,10842,11153,1292,1275,12718,4693,8896,8431,10706,12873,308,5091,11446,3229,9640,999,8074,12865,9340,13627,1262,11349,880,5375,82,10553,6660,1843,38,13293,10984,103,10666,7569,11852,11243,6254,8341,8992,4495,2834,2873,4644,9395,3430,9805,12568,11735,2410,11873,4796,2875,12526,12437,3600,2079,802,10121,5572,1507,3158,10509,2312,7655,3914,113,10300,1387,10078,1077,8448,79,11282,11385,3396,12947,70,12717,1992,13015,7818,8609,13548,2731,2366,1173,11248,3055,8674,3273,3780,12435,11590,5453,1192,8375,9546,1009,10428,3275,4734,5717,11456,12607,1458,13993,10676,13539,5926,8189,8840,9095,3130,4209,12988,3995,1022,13397,13392,6399,7570,1817,3684,1219,13030,1533,12776,6823,810,7441,8236,2891,9902,6229,10000,207,4514,9753,9556,12595,1670,7485,408,8887,58,1505,1548,8459,558,2549,7456,4511,8722,2057,10484,12019,5478,2429,6888,9095,11834,12497,11980,1739,12862,2357,8944,8415,6322,1209,5092,7059,10150,10189,7960,2871,1354,13825,3468,6667,10942,10805,10496,623,1250,2521,11508,3507,10758,10589,10312,1415,2346,625,11500,7963,2062,13525,112,6703,818,6089,804,7475,2806,11149,6520,11655,12250,1377,11436,6939,10686,8437,4272,7055,6770,12377,2164,7603,54,10685,7240,8215,8026,11169,10860,1419,11886,12341,2432,7103,4898,9625,6644,6131,3878,4925,3096,215,8922,6097,1052,1931,3006,7077,9824,8735,12034,1705,8660,13619,1366,4973,392,11975,4506,2417,10316,7131,6990,11317,2528,1311,5826,12985,2804,2227,9670,189,4408,807,13898,417,11052,379,11134,12981,12640,8751,2498,9497,1476,8131,6006,1885,12920,7975,10138,12417,12348,5819,11630,1413,13472,13407,5106,13929,8596,579,7942,10525,4408,2663,8314,13553,9020,8123,5294,1429,6256,12511,6354,5609,852,1171,7494,5757,13656,11943,13370,11889,12860,4875,6046,1685,2464,3359,1522,2777,7732,3219,3990,893,2776,12823,4762,2145,2284,10139,4190,7125,8976,2687,5138,3001,6836,3795,8822,1853,4904,71,58,9601,7340,6491,462,7733,1280,2255,11970,12937,2772,8083,13094,12637,3224,391,5738,6929,8924,5483,814,13637,7664,6159,4482,4185,7156,6019,1798,6285,9960,6135,7882,4625,4188,9083,13502,6309,752,8639,7938,13785,4756,6419,998,2925,8168,12759,10842,12225,1084,4267,4830,5989,6416,879,12738,11977,4148,4787,2150,12029,13624,9463,13434,10993,3884,3451,10990,10309,4528,3215,9506,1625,1012,8291,7206,2269,1512,1063,9882,12177,12444,12363,2430,11077,9216,4319,7426,1721,12580,6563,3814,7197,3608,11591,3130,145,10812,3547,1166,11541,3136,2911,2546,1513,9012,51,10822,8989,3960,12775,7786,8001,4956,9851,766,13477,4368,12671,3746,5273,10548,323,3222,9933,9832,2743,7402,2865,13852,5531,3118,12597,12272,13551,9026,9177,2756,2675,11014,12845,12856,4135,2346,3153,4828,13179,1054,10981,6784,1711,13970,6441,2372,10403,2518,9149,7352,6727,6970,4049,3292,4907,11966,7525,2608,4783,1058,13305,8788,9587,13174,8333,5880,12167,1882,7265,4428,3611,5102,8533,2640,9871,5058,1993,7956,4435,1558,12829,7128,10423,3418,12833,572,5467,6158,12229,1664,8831,4882,4137,8900,1491,6870,3325,5960,13751,11290,10385,11404,3867,11294,12069,10400,1007,8834,3897,4276,2579,1622,12061,1112,13799,4634,1937,2412,3179,12878,5029,5120,7183,8194,2937,11444,6627,11350,4525,1448,4327,4090,8081,460,8731,4782,8005,6944,3839,1650,4457,10644,3011,2758,7453,10184,12087,842,561,9052,6907,13374,1093,4240,9855,1426,5081,10004,8723,7830,12157,3624,13271,8666,5073,13196,1115,10958,12149,5776,10239,10994,6473,4100,13891,7430,6013,8968,9735,3578,9777,4956,939,1246,12565,12288,127,6482,10841,13892,4563,10678,9901,10424,9991,11082,3073,10188,3851,9230,9589,8448,1951,7970,7833,5492,771,13878,8413,13880,8279,8506,6129,12732,4731,1758,12613,6848,8735,1010,5609,11188,6403,7270,7805,10104,2087,1610,2913,9100,1915,2878,7957,2800,10207,8482,3785,4260,4643,22,12669,1400,13687,5786,6673,9468,4715,5678,4581,10080,12495,6450,7929,9668,1459,3094,4237,11016,5303,4314,3329,1916,1115,6158,2533,11456,11999,11954,777,7956,9395,4694,4941,13336,183,4634,7201,13516,5435,11534,11637,9504,5231,3378,6521,516,10771,1862,12957,520,7559,3322,1393,13452,13147,13566,181,8288,4863,12898,8569,13540,1507,2614,12381,1832,7,13738,2273,204,3163,4462,12869,9984,10191,3010,10073,5300,8019,2934,11997,6424,8423,7386,8385,6172,12299,10910,2149,9472,1007,9490,4025,12756,371,11846,9485,2264,5463,5930,12113,8748,7163,10078,901,5984,2527,8546,5769,11636,1315,8598,13581,10888,6391,11738,3585,8028,7627,6670,4661,7248,13311,5378,7257,9380,4883,3462,7661,1352,3591,12010,4577,3004,13771,8718,6789,2848,6415,13970,3161,13892,6787,12662,6061,3128,9383,12122,9857,3868,6651,12126,11781,12672,3119,12306,921,13892,12355,7526,11245,7576,9207,4394,3745,13388,2411,13390,9365,11616,10671,4866,5241,6980,963,1270,7517,9480,8471,7594,6337,8188,5579,318,10453,4448,6143,5826,11497,9748,10563,102,909,11304,87,9194,2049,13868,7083,6958,9333,13152,4863,10434,1593,5828,6739,1590,3789,3624,13959,13818,2753,13180,971,1518,12389,9168,10159,10450,9945,3188,4195,5798,13101,4552,7847,7258,13489,7004,107,1406,9877,6512,351,11410,4169,4932,12131,5142,4653,728,11671,12074,11633,8860,13947,12046,10165,12720,1551,13426,9689,11476,12051,11414,3965,1896,2263,5226,6897,13308,2011,8622,9669,3168,6767,450,11337,6612,9667,9958,11277,1496,13847,9754,12785,8380,11435,12270,7973,9280,6415,930,11721,2852,11363,7574,9613,5864,1415,4330,5985,9580,7963,302,12901,9904,11055,12178,11481,2468,1075,7398,4173,7736,7159,6826,10289,10652,1227,9822,8053,13376,3439,1122,13689,12164,755,9654,7181,7720,1463,12474,465,6076,4939,13454,11461,7056,9167,9938,3209,9956,9091,774,6781,2120,6871,986,10961,6892,6667,13662,7269,6080,6271,3090,4457,9220,2451,12294,7821,4712,12119,12874,11969,2940,9851,6974,1173,9072,1615,1074,6393,11876,6531,7926,829,2344,13351,4506,785,5132,2891,6750,4421,832,6783,4818,3785,8180,13907,13894,1853,6744,3079,5162,13953,3836,6699,8398,2789,7136,5759,2290,4921,9556,2307,10214,9821,10536,6695,7098,5361,12380,1595,13470,10357,11232,1439,11330,2569,7972,3523,9366,2701,7944,6119,3274,4113,9436,987,7118,12453,10816,10079,1650,9593,4932,6515,6358,1821,1144,5943,9674,2529,6300,1659,3390,8293,3296,2879,6866,7673,10900,8243,4598,12973,11864,2567,10986,4753,3564,5387,10686,1013,9744,11279,2946,7449,9076,5635,7318,2749,2744,2199,730,1041,6028,12939,1470,5589,3664,8143,6178,1465,1188,11075,5382,4973,6152,1655,2410,13073,7452,1931,3966,8581,10304,5183,2066,8281,3412,9683,10582,4205,9064,1047,5306,12689,5868,6571,5918,101,3056,9855,3250,3353,5828,7939,5734,5261,2696,9271,13770,12113,1372,4603,13918,4517,2336,10191,9922,5609,13220,7523,9750,7245,8312,11719,5450,12609,2620,3291,414,4421,13056,13279,9122,2377,11796,5523,7046,12397,8728,4071,11738,7889,4460,1083,11230,10117,6272,239,1074,7913,7284,1011,12534,8461,10328,5815,6106,13009,5020,10555,7966,9861,5024,6191,3074,3161,10324,12579,3878,12941,11960,10695,13978,1921,572,1195,10990,11557,9664,6143,5314,7049,3444,4915,13398,349,13816,3351,10442,1073,9548,12139,10062,9301,9104,8399,12402,6473,12820,7555,566,11965,6376,7703,7418,3473,2316,11179,4190,10357,10544,6607,3202,11417,11956,8083,982,2317,6216,11479,9994,5089,12924,4923,11550,6997,4880,12511,1026,13369,10308,2835,4598,12861,9720,11303,9578,3281,1948,5899,8254,4117,7808,1535,8642,3193,3220,5731,9302,9901,9656,4167,5850,7937,13164,2987,11454,7845,10352,1663,11522,11945,6020,5667,11094,12253,9864,11351,2362,7121,8796,3355,5054,11957,8256,6911,6450,12377,5956,163,8998,509,7176,1751,4906,8433,9484,843,6958,12325,3280,4895,9010,3753,5620,12675,3302,10781,4632,11591,10586,6865,3548,379,1806,2341,2000,1007,4258,3929,11220,1523,11510,5501,3112,5895,506,3713,13948,6875,510,4645,9280,4719,1026,425,13908,12819,7318,1533,1096,663,7978,2129,2012,9003,1102,4005,5792,10815,1090,11609,628,8387,12246,3229,4968,1943,12410,12241,7324,11115,13822,1173,3744,4239,6962,8521,5076,5203,4342,7229,6888,1719,2122,5217,4924,4331,13470,10405,6224,3999,6706,13305,6756,12883,9142,2141,8072,5335,5626,2561,12172,3579,3630,11829,5632,6463,8482,12233,6612,483,1974,11245,8248,4951,2826,7809,684,9195,4862,5653,9712,2559,7698,13673,6628,9587,7830,7821,1896,11559,7226,1441,1996,13243,12206,789,13264,6799,9378,7513,5924,6755,12438,717,10440,10087,9882,13025,108,6187,7726,8437,7632,383,2,10137,260,11475,5846,4797,3640,6711,1546,6257,812,10059,12430,8213,3872,2063,3810,4073,2388,8515,3046,253,10776,12423,4762,6321,2476,6619,6478,3877,7472,10047,3426,8073,7460,13971,10022,13357,3928,9367,6506,7521,8444,11259,4590,2981,12512,1023,5858,12553,4628,13859,2870,6669,12760,11031,8218,1041,13964,5355,6878,3157,8192,287,10370,8377,1412,4691,11126,8413,7944,9351,1114,3249,8652,779,7246,10901,4704,12239,11922,7337,8980,7171,8150,12045,5160,1159,5450,12273,6412,1995,5870,2677,10576,10239,7074,11049,3348,7139,2406,11549,8328,12519,4234,609,10524,11483,2302,10037,3120,3071,12450,9369,2420,11171,310,5053,9832,2455,4906,11393,8172,2347,446,10341,1104,4063,10594,4793,8052,7075,13286,13213,11304,8007,12778,12801,2364,4891,13422,12741,7664,5679,1554,2217,9428,6803,8742,8429,8456,2775,2314,12465,9004,5499,10494,9621,8064,463,13458,11593,8788,3075,7510,11277,568,10215,3626,561,6028,5547,2638,6421,4864,5023,13058,13305,11732,3043,5318,957,376,8215,13530,3169,7148,827,958,213,6592,943,9330,13465,1588,6547,1750,2509,11976,5559,7098,3793,3100,6411,366,9621,11376,11087,10898,12809,5652,4451,5398,12301,7176,9687,5770,1,6684,8043,190,13557,4560,13519,12834,5481,5572,5555,3798,1917,3800,12919,6714,769,3676,1611,6254,2661,10960,7359,12594,5673,3380,6339,9030,11197,8184,6887,2762,2273,7948,5531,8622,13205,9424,4847,8194,7145,3316,12227,5622,9517,744,2215,10378,7377,11788,7643,13966,12117,4432,2623,6194,8153,10980,979,1830,9229,5224,7943,11850,2417,13292,10747,4046,1733,3360,1055,226,4137,8068,10195,9126,2253,840,2183,2490,2641,13020,13675,10798,9573,5504,5903,13090,12841,6180,643,12710,9341,9448,10695,2186,8177,892,2651,3566,11157,10480,1295,7778,3113,13476,10707,10038,11533,1608,12919,10490,13313,2252,9483,3534,6597,8080,3583,13618,6505,3604,3923,5542,9709,6216,9895,9786,4385,11548,13643,9022,1573,12128,11839,9666,10553,2724,5459,6358,11965,296,1367,12746,5281,2604,3563,9486,9269,10128,5471,1490,12489,9220,6291,11590,12717,5240,6503,7450,11601,10764,6139,3614,3125,5856,5775,12594,13753,3492,5443,1766,3725,5272,11191,7242,1857,6156,4203,12846,2485,2320,10271,10738,8201,5172,10595,12678,2861,6712,11559,10714,2385,8460,4523,3774,1013,3104,2591,1954,4425,4164,8275,6038,5277,3752,11575,3498,8657,3292,3211,2014,981,11040,13071,13842,3401,11508,13251,694,9133,12440,679,8746,5393,10668,6955,8254,12293,3392,2879,4994,8681,8884,1235,9718,3309,10408,6455,11322,9889,9852,12843,1550,11909,10944,8399,10146,7609,9460,11267,6310,6157,5352,13431,90,3313,8716,12939,10382,8133,4816,6031,11266,11145,10964,7155,10166,9581,4376,3751,13546,10753,8604,13195,5774,7733,704,239,4722,5561,4788,11251,8502,12397,13160,1623,13274,81,3276,7739,10958,10197,528,12271,13026,10537,10180,819,3782,1629,2200,11895,746,5281,2172,9787,12702,7157,13392,2175,7730,2185,10756,13619,3142,10605,2072,11575,3258,13009,1420,13835,2686,7493,1008,3855,11426,12937,9268,3891,11174,3565,1736,9527,4330,13409,10092,12539,9038,8309,3360,1471,13570,1049,3524,2211,2038,12381,1224,6887,3818,2929,2828,6827,2622,2021,12736,1919,2610,13305,9044,5571,3686,5805,9352,4695,9962,1697,9356,2747,7678,6213,4992,13375,5698,12313,9476,6787,11142,5101,2200,9479,106,4321,2812,7707,2206,13797,11040,9487,9282,13113,13620,8611,9558,1245,10856,1719,5290,5009,8396,2171,1118,6581,9616,9535,5506,761,7108,8803,6342,12461,13256,631,13354,12705,12188,8891,12558,9989,4848,13935,8962,9241,10836,1923,13574,1037,2856,6663,570,12465,1276,6011,1086,11141,12272,7967,2306,3369,13684,4611,10438,12013,9496,11991,5514,1409,2284,7355,5390,1173,9520,11967,802,13161,5892,1219,4006,10397,4184,3655,4074,11601,9212,4107,2894,11317,4032,3807,2802,2809,6788,6547,6342,8269,4520,4695,4314,1809,12588,3323,1998,13797,640,6255,4082,4841,324,2611,11958,2045,8904,2295,6698,5761,7564,3067,11822,6853,13552,8943,8994,13737,7764,12467,8550,5837,12968,5799,11194,273,4300,9915,6510,13733,4608,12783,2306,5225,6724,9747,5814,8893,9144,4407,6234,945,11308,4139,10222,2325,9584,3535,12002,3577,5188,4451,662,9309,9624,11383,2778,11761,5868,8523,5198,8229,11728,9151,3026,5513,12020,2547,8998,11837,1896,87,6730,1553,7548,1643,8014,4309,1712,1583,10450,8937,11956,13539,6726,1021,3576,3959,3114,8689,9180,2443,3758,4821,7024,4751,6322,9721,12932,3283,7862,4173,7608,5927,6330,13057,11244,11243,4414,13173,1040,13295,11442,2249,2644,12723,9030,3965,4744,1799,6794,13521,4716,12555,1054,3093,6560,3391,2514,2041,5604,9315,13126,10253,7192,11175,7066,577,9164,7163,9950,3477,9072,8447,5266,13561,6740,5347,13878,3069,9992,11735,922,2817,12012,8075,5134,11333,6240,13775,370,1609,3268,899,8902,12781,12616,1975,13418,2993,8124,1435,8350,7381,13344,8415,4050,10297,3492,6371,12406,1405,2520,2887,8522,4129,9772,13371,7294,965,9824,3007,4258,12457,2100,9587,9766,10525,3368,12167,1354,13377,8412,13467,12158,7541,7456,6447,13442,3289,6420,4659,2230,4061,11960,6839,1754,9393,7004,12699,1326,7797,848,9247,6050,11497,1940,275,4918,7085,11864,87,9050,9025,844,7323,7678,1749,12288,11295,6674,2153,9268,13795,9686,1869,13080,10199,586,12257,1820,10267,10110,11765,8560,2511,354,12457,1988,13267,2902,7469,13048,6279,9370,4177,5260,11835,7934,1253,6512,5791,2290,6489,10100,7859,9750,9117,4376,5607,106,113,7644,9803,4910,11477,10544,12895,12082,2665,11860,11331,13750,6061,792,8759,1482,13153,10124,13595,5390,213,9152,7359,10242,4985,2996,12147,11670,13661,11848,8119,11226,12433,3276,8027,1486,3765,3024,7023,4018,5241,5268,12771,8054,8845,1736,10055,11562,2193,892,9275,11054,9413,12624,9183,7250,2793,6436,5875,13206,10525,10680,6919,4042,4705,10028,10635,6878,11381,11840,11087,6482,7609,7140,7059,6774,381,3448,4359,5258,12977,10140,13259,8430,2933,2416,2143,13122,4921,7556,835,12198,3133,13784,2919,11898,9713,6396,1851,10206,11093,11712,5743,7042,9257,6244,9059,12214,13677,8120,295,9930,737,8492,8155,1086,1653,7360,7663,450,2105,2388,13923,11046,6637,3560,10215,8074,7169,604,9771,12702,5477,3440,4911,13634,12009,5460,2755,11094,2189,5608,2823,7674,12305,7612,9611,270,8277,4928,11519,3554,11433,2660,9139,7718,3949,1368,7479,9258,10689,11372,5947,2526,4757,11472,1551,10370,12009,6916,5027,6582,10029,6872,13655,13306,12593,12028,12331,7694,9845,12768,12495,3330,2329,2020,9443,13734,365,8904,9991,6714,2657,12732,475,1982,11493,13120,543,6946,905,2404,7267,13926,11917,10760,151,4794,11249,11900,939,13150,10517,10224,5455,6258,12201,3156,10195,2838,4333,6008,4103,7146,9249,12156,5451,4766,8981,9920,1151,10514,8281,12948,1443,10918,701,12520,12279,10890,4609,7420,2123,6846,4741,9040,911,114,11689,4916,8675,7094,5805,10968,10471,1914,13041,7116,6619,9006,3957,4560,3631,10354,9097,13652,8339,4214,3485,4616,11799,13098,1297,1004,123,13646,13173,6736,1647,674,1817,11844,11283,10246,10861,5000,4439,458,1409,1148,13755,8606,12613,2976,1343,11090,10057,4372,3763,8998,12509,13608,5959,7914,11009,11676,3403,10814,5733,10960,9327,13042,6041,13060,5827,10646,2173,5880,11879,6138,3217,4700,43,12686,8277,9376,12495,5618,9913,3332,6019,2646,7277,1032,4247,3306,8545,3516,10347,5310,469,992,6079,11730,8457,2404,5635,11974,9933,13368,13287,1722,4977,5628,9947,10238,7349,10464,5871,11170,13609,8484,9603,12502,4285,840,919,1418,4417,10332,9723,7006,5541,11552,11935,706,409,5412,1091,902,10301,7880,2199,9306,7393,7580,10155,8398,3237,13232,2047,2418,3545,9668,8243,13542,12813,1192,9191,442,1297,5308,4491,9918,501,8896,9663,3106,6537,5588,963,3654,5197,520,5655,538,7409,9948,12475,11342,12277,13936,3631,12594,13833,11220,2995,6086,8445,10152,9527,1642,13137,7756,7483,2622,213,8224,10255,12146,10937,13140,5347,10646,8541,3752,13575,8170,13825,9340,13387,4606,1525,1088,1279,7074,5897,12820,4067,11430,1629,4056,4903,9242,11953,6652,1851,5038,10069,3008,13343,12386,10361,10308,1891,6246,5037,1400,2183,3338,881,10172,3547,1310,357,2480,5727,10994,8121,3732,5251,6230,11149,600,8759,9610,3169,8988,12715,2446,12821,8864,3983,12850,12457,1156,2611,10358,7357,5976,4359,3322,8289,4012,8731,4606,405,8112,13951,13010,9657,11316,6547,902,9933,13112,2327,2010,13745,10220,2635,12958,6133,8400,12799,13874,281,3508,5987,11542,13901,5640,9415,10602,9825,684,4043,10414,2309,13472,11807,13858,5337,8260,5443,7734,5245,4664,1911,13146,12401,3788,6907,10350,10741,7680,3823,10050,8217,9812,419,7542,3725,2312,2535,2122,3409,10876,2699,702,8021,8896,4287,5138,12041,10244,2691,3606,973,2552,8567,7690,6881,3612,4075,2638,13637,3360,159,8738,5801,4644,1315,7574,8909,7128,1159,7482,8305,9100,6011,2926,11029,2992,1743,12578,9161,6132,899,9878,2365,13816,11271,7994,801,10076,9643,8846,6549,8976,7295,9570,1689,6052,7939,2070,10045,4392,12487,12714,10321,11724,6123,5870,4261,10688,1199,12930,5321,8100,10531,9222,2493,2264,1527,2746,13169,3980,11499,11310,11173,944,13199,5826,4025,10996,6771,6966,10413,11768,8215,2538,3121,8508,11195,3534,7877,5680,9519,930,6553,5572,11539,1238,493,13064,11975,10026,545,5084,8667,6238,3317,11696,7327,10194,8201,5604,3027,2502,3181,2760,7335,12602,2289,6764,8411,8958,6549,5792,12191,7090,7033,11652,3619,9414,2413,2552,1559,2586,9409,8508,8683,270,1189,8144,8335,10946,6921,8388,7475,12774,5533,11880,1367,13130,8225,4108,4075,11710,1621,8400,6959,13042,1945,13876,5555,9350,4925,1368,2951,2330,3409,4204,11643,11742,13669,8800,3583,8930,9577,12324,1219,3302,9453,4200,8855,4458,7489,604,7867,5902,309,7104,11887,11938,4777,10532,10643,6934,365,10568,10823,13546,6657,6668,1419,7150,7701,10560,3535,13906,5769,11940,12835,6134,13517,904,8807,5274,10977,6684,5915,6894,8037,7296,5663,11490,11881,7284,10611,3654,3085,3976,13831,2570,2705,5596,3579,1470,5589,11280,831,8786,2345,12612,3923,246,4541,10920,12855,9754,12385,13436,571,8270,12037,13904,13983,8610,13913,6404,3987,8534,6573,2632,6279,13050,4929,5740,7579,6542,11045,13920,13951,8610,10217,1940,6579,3446,3309,13048,8695,7162,10257,6876,3259,318,4901,12880,10895,386,361,9076,7955,5558,8909,10312,12775,2922,12049,8652,13755,382,69,6608,13423,4018,13033,9364,4131,1766,7933,840,12519,4842,7249,3612,7931,6814,7685,4608,8927,10914,1977,4852,8867,10054,12061,5000,6951,234,3633,2780,13563,6702,8869,8912,12367,466,11353,12116,12419,5606,12125,8120,5591,5274,1537,5804,4939,4158,4645,9232,7839,2370,1657,1108,2419,2166,8445,1656,2423,90,1057,7404,1851,11214,1157,8224,8303,8418,153,1732,13427,2550,10141,8216,5335,12890,2609,4908,13371,10990,5189,6240,3999,5298,7753,12948,3843,5910,8477,1064,13975,8922,11489,4492,10155,2702,2117,6944,9839,7058,12649,12580,9683,6214,11693,4920,12279,6010,4193,1420,11627,3950,1077,3072,4223,9714,8649,1652,4435,10630,11293,11976,13127,586,8129,9420,4011,12062,4773,9360,3119,5346,2521,10948,7187,4646,2061,3960,13063,1946,13441,10556,12363,9086,12261,304,13903,962,3177,2452,995,13478,4557,10888,10647,426,2657,4380,91,6862,6693,3408,5503,13298,1369,3156,10691,11222,9773,1768,8455,4650,13361,7420,13179,4990,613,7664,463,6178,1193,8260,2003,5782,12157,4040,1783,7674,8001,1756,8715,4366,501,5008,3967,3634,9305,12612,13395,9206,9037,12312,2103,8426,11921,1468,9019,7966,8773,12768,4975,8754,6745,644,3747,11318,9709,9032,9783,5642,4785,8828,4779,2654,133,6176,8815,3122,2793,2468,4707,11766,13101,10744,7511,2538,9105,11052,603,7854,2549,3584,2527,11794,10297,5716,10163,11894,7341,9592,7991,13418,8577,2860,7787,12238,6997,11120,6303,9890,5337,5892,2707,9222,5421,5032,9447,6186,12369,7212,10635,6558,6437,12192,3535,6082,9097,12388,2515,1702,3325,13832,6887,4186,1201,3052,9147,2094,6485,12880,13391,10994,10441,244,11827,12214,10413,3256,5175,3338,7873,1228,571,1950,2853,11120,3007,7634,345,13204,8483,5414,813,8904,3607,6586,11745,3196,10059,2302,485,3056,2751,4514,13049,5684,8227,5894,6173,11032,10071,8730,13393,10828,8587,2142,11685,4208,8911,1906,10793,9860,7203,11046,4173,1512,6695,11994,13537,780,13003,6622,53,112,1215,8386,2905,10244,11827,6454,6589,10696,1271,4362,12801,5388,8331,4270,5125,6912,2255,13474,4185,11428,6611,790,13917,8616,3975,4586,9201,1660,10747,10030,8181,6016,9679,7602,3609,1988,5043,4790,4925,3896,3223,10538,12513,4860,10027,13598,4021,3808,1631,8306,11609,11188,6531,10198,5373,4872,2951,1018,817,8172,3547,10830,1109,8368,335,6930,7049,12452,6515,22,9981,8536,1239,8026,3265,2108,4827,4142,13701,3024,7727,8834,8969,10372,2531,12502,1725,12744,7335,12138,4945,3996,7947,702,8997,8576,10319,13186,9177,10052,1875,10406,3485,696,3271,9866,10081,7868,3259,942,12421,6224,7487,6114,12105,1476,19,6694,13725,12200,10167,6410,7185,10716,13147,4622,11637,9456,7551,9826,9,10612,1891,11750,8397,2744,11031,3226,3985,4780,8155,13502,5125,2704,9199,5026,12617,7636,12979,3846,7597,5496,12967,3210,6961,1084,10267,12862,9941,4048,3871,1922,2761,7812,10851,7158,2477,8984,2375,11498,3905,11612,7147,11198,8149,11824,8639,6610,10665,1652,11203,6662,2397,2344,567,4090,13489,11276,11051,8046,11637,10992,8031,10018,5385,8852,1843,2886,10925,12440,8983,10666,5489,8316,2123,670,165,4304,9423,13746,4425,4388,9395,998,1213,904,5063,1114,1345,10188,8123,4510,3685,8192,12335,8418,10393,132,4483,8614,3357,1944,6375,12618,1569,11212,7307,13886,11765,224,2575,4114,10889,724,10547,1830,5853,7240,9015,13354,7713,13676,4971,3262,4725,2288,5071,12290,1497,3124,5651,4550,12781,7944,13239,11418,10289,11708,1467,3726,4085,4032,2687,10866,2969,11892,4915,8486,1837,13096,8455,10170,6177,13932,5051,4398,517,6496,6319,12514,6601,13492,6211,10422,2157,4840,8199,394,8513,8668,9163,12686,2741,8304,6735,3970,7033,10932,5283,11126,13533,4728,8391,9082,2433,9420,12539,6782,1109,1520,10991,13298,1049,5796,12675,6518,1501,3640,135,5562,5841,2972,2523,12750,709,13584,10511,3618,4329,10244,6419,1334,11965,9096,1559,7034,7297,9964,4843,12798,4197,6144,367,1266,11945,7284,7779,8390,12541,12808,7303,10474,12305,8844,1291,12510,5173,4848,11823,9106,2873,10180,10611,3286,7357,7208,7015,12698,3089,6124,8699,7550,1189,128,3183,7810,8345,9844,13923,166,2845,10456,6471,10298,2833,8652,5115,4974,1477,11216,6591,13106,2969,612,8563,806,8765,1944,6375,3978,6401,7740,10123,5982,8581,7072,719,3298,617,8020,9619,2838,13341,296,2247,13498,3185,6348,1227,12814,1445,2976,7647,13858,10729,10196,9683,310,10669,7784,5943,12170,6993,13916,8603,7278,12213,1856,7647,3890,4985,13332,3539,214,6077,7048,1415,7642,385,11836,859,3534,6149,3344,12495,8594,1417,10500,3251,742,7117,376,10711,7178,4337,7500,5211,8286,725,1264,4079,7170,13625,5716,7619,6086,10333,1480,1959,10474,13825,8988,12283,8270,11973,12208,4703,1506,9145,2308,9907,13062,2909,2568,5767,6090,4273,10108,7195,10094,13957,9248,13231,5042,12745,660,13235,5526,6413,7816,5239,154,3489,4748,3627,7838,9477,12800,4335,4546,7193,12756,11491,13622,6397,13112,2375,4106,5905,6364,10923,2350,1141,12432,8879,11602,7961,4500,2803,6870,5709,5464,1143,7386,4273,10572,827,9358,245,4144,11615,1330,3305,9556,5123,1046,5181,9352,1623,5386,6497,7052,6635,3502,13749,13744,3247,10306,5625,11156,67,13414,5805,13512,11527,9130,12257,11900,10091,6110,12453,10112,191,8610,7481,2804,3683,4294,1149,4728,11975,666,5009,3820,9515,6510,2421,800,1199,11554,12633,356,12643,1878,1725,10616,263,2314,1665,5324,827,6574,6853,12864,10527,6978,5561,6676,8531,13078,5133,11912,3703,6602,10817,6748,2155,446,13077,3472,5343,8754,6489,2612,11923,12662,9501,5064,3463,4922,5953,6988,6587,1182,6037,2896,6319,12930,10793,8628,2163,10086,12301,2744,12055,13738,6881,13484,10523,7678,6245,13408,9711,12818,8617,2084,2019,7942,12477,8984,2903,1082,8881,2556,235,1390,13461,13216,9679,9458,8889,5252,9027,7926,11053,9112,775,12170,13729,5164,5083,9118,7909,9520,7951,1106,7481,13988,11619,9686,3901,11016,5959,5306,4865,3324,1419,6270,10629,3984,11183,1250,13321,7796,851,3974,12173,2008,7239,13274,5649,1916,1051,6942,1637,8464,10991,11842,12249,7444,8611,1190,4877,10856,10903,218,529,9372,5979,6782,12069,13536,3839,9346,7225,5620,963,2982,10925,1336,3351,12346,6097,1948,8747,2046,8533,13136,6767,9570,8825,11460,12163,230,13261,2344,6583,8138,8049,7100,4267,13470,3061,128,9471,11858,5721,3556,9043,5014,6669,1976,12983,3802,11857,6012,13851,13422,4917,4272,11087,4018,2089,12276,3603,11494,12573,2376,12951,10586,465,476,7627,13038,2933,1456,9935,2642,10841,13156,13699,6694,13485,2376,10055,122,11729,8748,8107,4286,6789,13296,11471,11890,12697,7540,6435,1286,957,1688,4615,7034,5873,8396,11467,13358,6581,9696,5311,5858,5289,11396,11507,8454,1021,856,2055,8442,7473,4268,7307,7118,5477,13616,1631,818,13193,8148,7443,12342,1085,6632,5143,122,12209,6188,2843,4926,3157,4304,1599,2450,8601,1188,4083,8934,9661,504,9943,4970,4577,2652,2555,6910,3685,2816,335,2978,10665,9636,6419,12374,11053,8184,471,1114,6897,5724,9707,13934,11557,13776,3663,5330,12633,10916,5683,70,1661,3320,4359,12490,5809,7548,5099,1390,9333,9472,8655,8274,12249,3140,675,566,6557,8008,4471,7242,10417,9100,13515,2206,11813,2496,12399,5090,11289,11284,7507,4534,2093,11432,11047,11242,8881,6444,10075,9118,7077,2560,7119,1234,1417,11124,1187,2438,3773,11832,6695,8202,13601,7980,5659,7102,1029,2160,13455,8514,13289,10836,12787,1030,3245,4648,1191,234,10993,12988,11851,11854,11845,8576,9759,4530,10473,8340,7683,262,12813,12248,2551,1914,9809,8748,1851,12302,3957,5984,8415,12178,6361,116,5699,662,12781,10760,13799,11258,8993,5772,4331,46,7525,7200,7167,8114,3241,5492,10435,11382,429,4760,11959,10794,10673,11180,10795,2878,2261,9104,10927,5154,11577,2852,3811,8950,8525,888,11207,1114,8465,188,2651,7518,3365,7920,2959,7538,12457,9476,9555,134,9469,6536,12279,8010,1137,10060,3371,8382,10053,11440,3215,12930,1337,2916,9251,10006,7501,2520,4551,13114,13617,6812,8363,174,5573,4336,12767,18,4009,5748,7731,4934,893,10216,391,10682,11345,7116,1963,11422,2917,12304,11487,12178,505,12676,11267,6630,11741,11624,7447,5770,12097,3420,13867,13838,8789,4896,7695,6210,1513,4916,4195,13558,10669,12072,5079,3658,1553,5708,6827,7694,12661,3280,11855,3266,10233,5844,7779,1318,10013,6824,9815,8122,9089,7324,3115,11294,7925,480,6639,1554,2249,6068,3619,4038,2685,4296,11847,5354,2833,8732,1083,4334,10293,2800,6895,11970,12649,3092,4611,3638,8813,12520,8199,10890,9441,12284,12795,2318,2885,13808,10735,1362,6361,4644,5219,646,2781,408,7703,8250,7617,11532,11003,6846,9717,160,4367,626,13289,3476,4051,12246,7197,9112,2487,13098,7697,9884,11899,1982,2405,4208,10351,4370,2249,9380,2547,8822,11405,1976,5735,13258,11169,13548,7339,8670,12021,7968,4031,2978,12185,6468,9411,12118,5341,11880,13319,4522,5905,7500,3451,9134,11477,11360,5727,9570,3209,11492,5187,7862,10653,1912,8967,2938,7265,5596,8555,9518,229,9248,5791,3410,11417,13156,7795,2822,3485,56,1159,3610,5713,5452,3755,13950,7141,10560,7567,3026,3273,11828,10259,4294,541,1880,5191,12458,10449,508,13819,10766,12037,9968,7567,4498,9257,5140,4291,1638,6125,7352,12599,12346,5089,8764,2779,1774,1493,5264,719,3234,10025,6340,12915,5750,109,5352,8583,5162,8481,13308,3259,11102,13125,480,6255,1314,5993,11380,13635,8486,3533,1256,9991,6138,7857,7100,5995,5422,9285,11344,11647,3218,6953,9908,515,6166,8893,680,8167,5594,1825,9084,10923,12366,10565,5392,7839,13954,9897,2916,1603,10342,11709,8216,2215,9290,4193,11708,12459,1502,2597,6000,9119,5474,11097,10772,6515,54,6717,6552,11127,9850,1329,11436,13947,9502,9509,5136,111,6354,1129,7684,8211,12982,5693,5752,4439,1130,1681,10332,11547,5406,13285,6608,13407,6562,8745,4436,10499,9846,7133,11784,12599,12394,10913,2588,11387,12798,11109,9664,8047,466,10569,612,4291,2182,12701,11880,5127,490,5697,8540,5867,4366,5989,10288,11999,9426,5641,9076,11651,9974,11005,7832,10103,9946,8833,12412,13307,8302,7333,1840,12607,4882,6329,1476,1667,582,13661,1448,567,7258,11857,5852,8587,350,4213,7056,9807,1970,7161,6628,12051,9254,8941,296,1463,5306,5521,13708,3435,11726,3013,4208,7727,13394,1977,12292,5315,10150,5949,6440,7415,7482,10721,12988,11867,462,11989,2048,9407,8818,10121,11892,10691,3510,13037,8536,10263,9178,4465,3100,13547,2046,8005,736,5823,3506,697,5252,9523,1238,12573,8136,9063,3130,12977,9564,4715,11022,5349,6944,2271,8482,12249,7636,1123,11782,6349,3800,12631,2618,13345,4268,2555,3886,9221,9360,3359,5970,13241,10244,9139,11014,10669,1752,12311,1578,13457,10844,11179,2046,2629,7584,4319,12674,12937,2900,2819,3270,7261,10936,5799,5834,1697,316,13691,12110,10821,1440,5231,9106,11721,1124,12147,4470,8365,8696,13639,13338,8497,10236,13755,830,3893,10880,12991,13634,7065,13956,4403,7478,4461,5224,3367,13898,8401,3116,9147,2670,1317,13616,175,8914,5817,6628,10611,2902,9421,2200,7879,3674,11041,7628,2891,542,10917,8048,10319,10530,6489,4340,9299,6518,6733,7784,5831,13274,8033,12988,10539,7166,1717,4720,1743,13586,2457,9988,12659,10550,5245,3752,5895,13594,13937,2572,7227,1838,8789,8720,11551,7410,4729,7380,7315,10422,5613,10440,5415,8698,1585,11164,1883,12238,10501,8080,10287,3570,2537,1636,7315,12742,8669,12120,663,4314,5073,12012,123,254,8341,2192,3679,11346,1225,1652,8899,12566,12125,4824,3847,4666,10161,12684,10555,10846,12949,9696,10623,9666,9625,4692,11907,9446,9885,4552,5223,8410,4241,4700,10395,11822,7813,5792,6591,4818,13465,9108,10371,182,6477,13448,13255,8170,6321,6684,2139,3374,11397,736,4863,10258,4633,10452,13155,7622,2717,2408,11239,3146,10337,10012,219,10622,13237,9568,13039,3458,5577,6292,8099,4006,11821,12664,871,410,3297,5884,8299,10638,7077,6928,11791,6242,12569,12868,11219,502,6237,12536,1623,10586,1361,8092,4427,7806,10949,1296,8415,12258,169,4580,4131,438,13757,11672,4583,6874,13409,6316,7771,4494,3765,8832,4047,3266,5561,9188,4819,7286,6413,3384,8551,2330,3505,5644,907,638,165,3536,8559,8114,12121,9588,8595,246,10461,1048,2503,13626,3409,620,12699,8510,69,4384,5935,6658,2169,2292,11779,7206,13229,3480,903,8138,8097,3884,843,5998,12933,6688,12143,2914,13721,13364,1011,12006,8941,5032,13255,13546,705,9068,9243,11358,13285,896,10463,1522,8281,13748,5379,11702,2973,10328,2391,13450,10961,2156,5291,9534,11653,10976,5999,13506,361,13044,2291,11494,205,11576,583,586,3345,9580,1515,7790,1621,11152,10303,6530,10841,13396,2051,11302,13741,8184,10711,10826,1745,9804,10139,2766,13029,3696,2975,6146,2777,6324,8003,13462,6173,2504,13863,3690,3457,4428,2411,13486,12533,3232,13503,6802,12089,4292,11651,3110,13453,2408,9495,842,9409,9420,7467,1710,3253,13712,1727,7874,6281,3908,9875,12998,13501,728,6343,11738,513,1420,12635,9454,6773,3232,5935,6738,217,7220,10067,13462,3005,9240,13671,8410,11553,7948,251,13374,1717,11136,5503,7762,8521,6132,4355,2950,6685,2264,7223,9242,9441,2060,11179,1710,10565,10848,9423,5154,2921,2900,12675,7846,6477,9544,4247,4234,5057,11868,12283,2734,1237,4576,7071,1106,1801,4228,8899,7110,13197,8120,7143,8554,2721,5500,1979,9854,2357,13552,6015,12722,1993,4084,3267,3750,10637,10344,5735,9754,7809,7260,5339,8158,12101,12896,1071,5730,11081,4692,8547,7254,11725,12392,2743,154,8449,7852,13051,9662,8981,6016,5807,1906,4265,13236,595,7910,13021,13720,8215,874,2769,6044,6683,13502,12837,2944,9039,5522,10857,4788,12419,11798,9677,1960,13559,5034,3937,11276,8299,6990,10613,13104,12303,8818,873,7844,2595,2982,1485,2360,4439,13178,129,5308,2891,3518,1365,12992,5231,3554,7737,12500,5795,13606,2461,1272,11463,2714,11921,3372,11675,7678,9605,13744,12527,4738,2713,7684,7187,5622,9597,1800,4839,6474,5553,10444,2123,11358,3701,5776,4655,12146,7657,180,2771,13350,5357,3912,5239,6058,465,12156,7163,638,11701,1472,13583,3346,9913,9428,1731,9542,9149,7000,5751,11450,9969,11324,971,8142,5653,10560,7327,4450,3513,3940,1315,6422,13997,8472,7383,9866,12785,3228,5611,30,5461,6576,8799,2306,11337,2804,1427,13142,5821,8008,6007,12874,3825,6668,2379,6750,11125,5184,6799,10274,2953,7988,13731,3638,637,520,5655,13930,6785,6924,12283,3086,1413,3072,1983,2914,4921,5796,6275,3430,93,8072,8631,11770,8273,4604,5659,10014,7909,8112,7071,13970,857,4644,13843,4246,6013,6888,5751,6778,10401,13420,6059,7998,1685,480,13199,8162,4873,6612,10307,11078,7677,2552,8567,13786,11841,9660,11963,12190,3461,5296,13535,3906,11081,1300,5443,1110,4925,3816,11751,7722,11841,7660,6907,13438,2005,7712,5599,13074,7097,1668,6579,11366,11245,3048,5943,7722,11009,11116,1003,5982,2389,1584,5647,3474,9193,10884,7059,6294,5821,9064,4663,1578,2257,11772,8283,3134,13397,1824,3887,658,10857,340,3107,13382,13725,6360,775,12106,6017,12428,5595,5598,3765,8320,95,10130,13401,11252,323,8902,5245,2632,3943,11178,12433,11532,1547,2062,949,12528,10927,6450,1849,10052,9763,13526,6957,8312,3575,13818,2241,11372,1947,3326,1957,7600,7999,610,8553,2548,771,8134,3613,12424,12999,4762,1265,6940,6587,6174,1669,6016,7871,6306,5593,8612,11667,1414,2845,4216,10391,4042,337,1276,123,9214,2661,10544,13295,5282,12937,11012,10979,12678,11165,5720,7831,9834,12769,11964,6411,4782,9253,12256,7663,12898,6377,3332,10579,5398,11117,11896,6903,2794,1985,6764,6299,1662,5925,5456,10351,2770,6793,1396,4995,5942,4509,440,4455,5786,1745,1820,3611,222,7045,5600,1359,1618,12281,10180,11603,11494,10093,7000,8295,13802,2593,6748,8235,11966,8981,10128,831,12786,11817,1956,5699,3542,12285,936,5959,13770,8113,2204,12251,5198,3045,3696,13791,5234,1017,452,83,10678,3549,10472,1575,714,3073,12076,13691,3982,501,13056,11423,9794,11577,3492,6451,10214,6989,2216,55,762,4353,8972,4459,1406,549,8432,11535,11490,3993,7812,4819,5462,7469,4264,13767,13290,4641,12668,11083,12062,2661,4624,5263,8610,4409,6772,9587,12438,1901,2328,23,13834,7761,3532,6859,3166,8405,9520,12319,2674,9961,11236,5043,4262,11917,2920,711,1914,6161,11324,3563,7742,11029,7408,11423,5090,4585,13396,10099,6566,2573,5768,13703,3498,7697,1148,1083,9502,9909,5616,10079,2034,4633,13988,5987,6310,9437,3064,9575,9450,6209,11580,13275,6878,2645,9424,9407,2130,12889,148,11475,118,8365,13496,743,5946,2177,10940,7819,10702,7797,4016,863,13714,233,4628,1011,4998,9917,120,2071,2666,4529,4444,2315,11982,10901,11424,13631,6482,857,7748,131,6310,11773,9064,3047,2922,2865,1964,3163,1070,8821,3008,12495,8802,457,11636,10931,822,6653,4456,8503,2874,8401,8492,2475,1262,12853,12032,143,3298,12857,9268,11267,10358,3405,1944,12151,6522,785,1948,5787,2222,13509,10416,5791,9474,6665,7252,12403,7286,7021,5624,12551,4314,689,1724,9691,4206,12661,11280,5071,3138,2473,3700,3539,8166,3053,11144,6791,10554,11569,10764,13179,5726,2085,7008,2831,12882,553,6372,11763,11638,11693,8696,12663,6986,3409,7244,4331,13822,7157,12480,303,8322,6617,13044,13811,9158,11037,5608,7319,13818,13137,11804,13019,1502,7493,10368,2607,1506,1305,13348,8867,4150,11981,840,2151,11722,257,7836,3131,734,10453,13504,2751,10546,585,5412,7091,4070,11021,7336,10071,2794,3777,4684,3179,9278,9029,4336,12671,13090,441,7220,1459,12710,6749,2824,4343,3530,12369,9916,635,5358,8997,7120,4543,13346,9561,8116,5443,3718,10685,11240,2615,4570,8913,7932,9067,9006,4821,9072,7647,10514,6601,3972,5091,10214,12685,13480,4567,5450,10689,7628,3867,7598,11381,2624,3151,5474,9961,5652,7811,326,7933,8248,6231,9338,2961,9996,10987,8462,12469,7168,559,1074], 2225, 3148684, 6549511)
586.830769
36,515
0.791999
7,197
38,144
4.196332
0.771294
0.001391
0.004139
0.002252
0.00841
0.00841
0.006887
0.006887
0.006887
0.006887
0
0.789488
0.0194
38,144
64
36,516
596
0.017939
0.000603
0
0.186047
0
0
0.000211
0
0
0
0
0
0
0
null
null
0
0
null
null
0.116279
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
dd0fdd6d3773ab09c3cdba5e847d00c584455bf4
99
py
Python
clarify/__init__.py
carbonphyber/clarify
0529bcbe0671f9394f4ae060fd67e7b4ad9c925c
[ "MIT" ]
26
2015-03-11T15:55:38.000Z
2022-01-20T23:49:54.000Z
clarify/__init__.py
carbonphyber/clarify
0529bcbe0671f9394f4ae060fd67e7b4ad9c925c
[ "MIT" ]
22
2015-11-06T12:34:29.000Z
2021-11-03T03:09:09.000Z
clarify/__init__.py
carbonphyber/clarify
0529bcbe0671f9394f4ae060fd67e7b4ad9c925c
[ "MIT" ]
18
2016-03-02T00:50:36.000Z
2021-02-25T04:33:16.000Z
from .version import __version__ from .jurisdiction import Jurisdiction from .parser import Parser
24.75
38
0.848485
12
99
6.666667
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.121212
99
3
39
33
0.91954
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
1
0
0
5
dd24cfcac58bee0d38da25cd9f55f6fd37dad3bb
81
py
Python
kamilcode.py
kamilb123/mktyp
10a91d5bae714688c2a054fb97bd794c50d9adea
[ "MIT" ]
null
null
null
kamilcode.py
kamilb123/mktyp
10a91d5bae714688c2a054fb97bd794c50d9adea
[ "MIT" ]
null
null
null
kamilcode.py
kamilb123/mktyp
10a91d5bae714688c2a054fb97bd794c50d9adea
[ "MIT" ]
null
null
null
def mph2fps(mph): return mph*5280/3600 def myhello(): print("Konchi_wa")
16.2
24
0.666667
12
81
4.416667
0.833333
0
0
0
0
0
0
0
0
0
0
0.136364
0.185185
81
4
25
20.25
0.666667
0
0
0
0
0
0.111111
0
0
0
0
0
0
1
0.5
false
0
0
0.25
0.75
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
1
0
0
5
dd5cbe991cee72431e5eafec6cca3cbdf87bdfdf
51
py
Python
tests/assets/macros/testwithoutstart.py
PinkRoccade-Local-Government-OSS/PinkWave
ebbcf71989317f5560f7f7770cb701e6c06a4ac9
[ "Apache-2.0" ]
1
2017-11-18T13:34:38.000Z
2017-11-18T13:34:38.000Z
tests/assets/macros/testwithoutstart.py
PinkRoccade-Local-Government-OSS/PinkWave
ebbcf71989317f5560f7f7770cb701e6c06a4ac9
[ "Apache-2.0" ]
1
2021-06-01T22:02:12.000Z
2021-06-01T22:02:12.000Z
tests/assets/macros/testwithoutstart.py
PinkRoccade-Local-Government-OSS/PinkWave
ebbcf71989317f5560f7f7770cb701e6c06a4ac9
[ "Apache-2.0" ]
1
2022-01-25T23:01:24.000Z
2022-01-25T23:01:24.000Z
print "you should not be able to see this message"
25.5
50
0.764706
10
51
3.9
1
0
0
0
0
0
0
0
0
0
0
0
0.196078
51
1
51
51
0.95122
0
0
0
0
0
0.823529
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
dda2f979f390fdb8004bc7d9ab3ea5178800ee53
644
py
Python
wizard/__init__.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
wizard/__init__.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
wizard/__init__.py
IDRISSOUM/hospital_management
56a768f29269a77bc890d40479a8aacb90867189
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Part of BrowseInfo. See LICENSE file for full copyright and licensing details. from . import appointment_start_end_wizard from . import create_prescription_invoice_wizard from . import create_prescription_shipment_wizard from . import medical_appointments_invoice_wizard from . import medical_bed_transfer_wizard from . import medical_health_services_invoice_wizard from . import medical_lab_test_create_wizard from . import medical_lab_test_invoice_wizard from . import medical_imaging_test_request_wizard from . import multiple_test_request_wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
40.25
80
0.854037
88
644
5.863636
0.488636
0.193798
0.27907
0.267442
0.377907
0.116279
0
0
0
0
0
0.006873
0.096273
644
15
81
42.933333
0.879725
0.254658
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
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
1
0
1
0
1
0
0
5
06d74c2468016349afca0c502eea13626d9a796d
24
py
Python
lab99.py
upendar245/python
ed4d5488b44d385f2d0f75e8558a5b7fc4563d38
[ "Apache-2.0" ]
null
null
null
lab99.py
upendar245/python
ed4d5488b44d385f2d0f75e8558a5b7fc4563d38
[ "Apache-2.0" ]
null
null
null
lab99.py
upendar245/python
ed4d5488b44d385f2d0f75e8558a5b7fc4563d38
[ "Apache-2.0" ]
null
null
null
#!/python3/bin/python3
8
22
0.708333
3
24
5.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0.090909
0.083333
24
2
23
12
0.681818
0.875
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
06ddeff91a0f719f3ceb292039064d7bfe64189b
30
py
Python
test/foo.py
Guillemdb/flake8-per-file-ignores
ab0d3d44764ea834211ca2806bef8694c80cab87
[ "MIT" ]
52
2017-10-08T18:20:54.000Z
2022-01-08T20:02:10.000Z
test/foo.py
Guillemdb/flake8-per-file-ignores
ab0d3d44764ea834211ca2806bef8694c80cab87
[ "MIT" ]
11
2017-10-08T19:09:06.000Z
2021-09-13T18:02:50.000Z
test/foo.py
Guillemdb/flake8-per-file-ignores
ab0d3d44764ea834211ca2806bef8694c80cab87
[ "MIT" ]
4
2017-11-08T14:12:04.000Z
2021-06-20T18:28:45.000Z
import sys # noqa x == None
7.5
18
0.6
5
30
3.6
1
0
0
0
0
0
0
0
0
0
0
0
0.3
30
3
19
10
0.857143
0.133333
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
6640ecae81431e6a8c0efdbb6d7c713e83e9d888
19
py
Python
posthog/version.py
alx-a/posthog
a76959bb2a7640ca8cf367a4d3a0e4ca67f65a5e
[ "MIT" ]
1
2021-04-09T09:13:23.000Z
2021-04-09T09:13:23.000Z
posthog/version.py
suryatmodulus/posthog
d354305bd05c5e231dced3f1bc33dafcd5875f22
[ "MIT" ]
null
null
null
posthog/version.py
suryatmodulus/posthog
d354305bd05c5e231dced3f1bc33dafcd5875f22
[ "MIT" ]
null
null
null
VERSION = "1.26.0"
9.5
18
0.578947
4
19
2.75
1
0
0
0
0
0
0
0
0
0
0
0.25
0.157895
19
1
19
19
0.4375
0
0
0
0
0
0.315789
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9fe3ca92fe73f717654b8b2fdba35307f7af697b
253
py
Python
src/lgr_advanced/exceptions.py
GuillaumeBlanchet/lgr-django
429ca5ddb9311cfb1a7ddc906b32d57780585f40
[ "BSD-3-Clause" ]
1
2018-09-19T11:03:11.000Z
2018-09-19T11:03:11.000Z
src/lgr_advanced/exceptions.py
GuillaumeBlanchet/lgr-django
429ca5ddb9311cfb1a7ddc906b32d57780585f40
[ "BSD-3-Clause" ]
15
2017-06-29T14:05:01.000Z
2021-09-22T19:56:23.000Z
src/lgr_advanced/exceptions.py
GuillaumeBlanchet/lgr-django
429ca5ddb9311cfb1a7ddc906b32d57780585f40
[ "BSD-3-Clause" ]
7
2017-06-14T17:59:19.000Z
2019-08-09T03:16:03.000Z
# -*- coding: utf-8 -*- """ exceptions.py - Define custom frontend exceptions. """ from lgr.exceptions import LGRException class LGRValidationException(LGRException): """ Raised when the XML validation against schema fails. """ pass
16.866667
56
0.687747
26
253
6.692308
0.884615
0
0
0
0
0
0
0
0
0
0
0.004926
0.197628
253
14
57
18.071429
0.852217
0.498024
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
b036bbdcdeff8676d3e15a63048c6d1362e7c902
171
py
Python
presentation/code/pedagogical_deltaF_animation.py
gchure/phd
cf5941e467ee57c6c93c78dda151335cb320f831
[ "MIT" ]
4
2020-01-14T01:12:53.000Z
2021-11-29T10:33:20.000Z
presentation/code/pedagogical_deltaF_animation.py
gchure/phd
cf5941e467ee57c6c93c78dda151335cb320f831
[ "MIT" ]
1
2021-10-13T03:30:26.000Z
2021-11-11T18:21:43.000Z
presentation/code/pedagogical_deltaF_animation.py
gchure/phd
cf5941e467ee57c6c93c78dda151335cb320f831
[ "MIT" ]
null
null
null
#%% import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation, PillowWriter import phd.viz import phd.thermo import seaborn as sns
21.375
60
0.824561
25
171
5.64
0.64
0.12766
0
0
0
0
0
0
0
0
0
0
0.128655
171
7
61
24.428571
0.946309
0.011696
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
1
0
0
5
b051f128e32e1aa46fe8d6fde179d862428893d5
70
py
Python
sonorus/speech/__init__.py
imbesat-rizvi/sonorus
38698d55b00c67fb3bcff4e4349b6c214a29e6f5
[ "MIT" ]
null
null
null
sonorus/speech/__init__.py
imbesat-rizvi/sonorus
38698d55b00c67fb3bcff4e4349b6c214a29e6f5
[ "MIT" ]
null
null
null
sonorus/speech/__init__.py
imbesat-rizvi/sonorus
38698d55b00c67fb3bcff4e4349b6c214a29e6f5
[ "MIT" ]
2
2021-01-17T22:53:02.000Z
2021-03-03T01:11:43.000Z
from .GoogleSTT import GoogleSTT from .Wav2Vec2STT import Wav2Vec2STT
23.333333
36
0.857143
8
70
7.5
0.5
0
0
0
0
0
0
0
0
0
0
0.064516
0.114286
70
2
37
35
0.903226
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
1
0
0
5
c67a4fad9017a00ddb4ea1ba5525b8d3521bb2b2
155
py
Python
NueralNetwotk.py
GnarlyMshtep/MyFirstGraphicalPreceptron
471d330c7d0fc11ba65086129e2ddee13f6a740e
[ "MIT" ]
null
null
null
NueralNetwotk.py
GnarlyMshtep/MyFirstGraphicalPreceptron
471d330c7d0fc11ba65086129e2ddee13f6a740e
[ "MIT" ]
null
null
null
NueralNetwotk.py
GnarlyMshtep/MyFirstGraphicalPreceptron
471d330c7d0fc11ba65086129e2ddee13f6a740e
[ "MIT" ]
null
null
null
class NueralNetwork: def __init__(self, numinputSize: int, numHiddenLayers: int, nuronsPerHiddenLayer: list, nuOutputNodes: int) -> None: pass
38.75
120
0.735484
15
155
7.333333
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.174194
155
3
121
51.666667
0.859375
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
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
1
0
1
0
0
1
0
0
5
c6ab41ce6d30ff4cc7712b43957ab0706bb226cb
46
py
Python
airflow_dbt_python/operators/__init__.py
marcusintrohive/airflow-dbt-python
d6b8e9e091965ee2319ecc0009f2e2dc00d27819
[ "MIT" ]
37
2021-06-15T23:23:28.000Z
2022-03-22T08:16:49.000Z
airflow_dbt_python/operators/__init__.py
marcusintrohive/airflow-dbt-python
d6b8e9e091965ee2319ecc0009f2e2dc00d27819
[ "MIT" ]
29
2021-06-01T21:03:39.000Z
2022-03-12T15:09:33.000Z
airflow_dbt_python/operators/__init__.py
marcusintrohive/airflow-dbt-python
d6b8e9e091965ee2319ecc0009f2e2dc00d27819
[ "MIT" ]
5
2021-08-04T08:48:31.000Z
2022-02-07T19:14:56.000Z
"""Airflow operators for all dbt commands."""
23
45
0.717391
6
46
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.130435
46
1
46
46
0.825
0.847826
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
05a124814da88851a4e985081b8f1e4cd7d663a9
57
py
Python
modules/__init__.py
audioku/cross-accent-maml-asr
859a157eb0dd2a3f557b8b9952ece7f16f3509f9
[ "MIT" ]
33
2020-04-25T17:25:09.000Z
2022-02-11T03:16:11.000Z
nn/transformer/__init__.py
kefirski/attentive-translation
244f42e8e9c6369b6615480fb9b291bf6a0e3eef
[ "MIT" ]
1
2020-08-10T07:00:56.000Z
2020-09-11T05:28:00.000Z
modules/__init__.py
audioku/cross-accent-maml-asr
859a157eb0dd2a3f557b8b9952ece7f16f3509f9
[ "MIT" ]
4
2021-07-19T06:32:29.000Z
2022-02-11T03:05:50.000Z
from .encoder import Encoder from .decoder import Decoder
28.5
28
0.842105
8
57
6
0.5
0
0
0
0
0
0
0
0
0
0
0
0.122807
57
2
29
28.5
0.96
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
1
0
0
5
05c699569713f5e685e46c727632edcecc39c315
97
py
Python
src/pos/model/__init__.py
cadia-lvl/POS
81a146707df82ecc972c28e055cc50b372f5d35b
[ "Apache-2.0" ]
2
2020-07-28T14:10:02.000Z
2021-08-25T13:28:14.000Z
src/pos/model/__init__.py
cadia-lvl/POS
81a146707df82ecc972c28e055cc50b372f5d35b
[ "Apache-2.0" ]
3
2020-07-15T15:17:37.000Z
2021-11-08T15:49:02.000Z
src/pos/model/__init__.py
cadia-lvl/POS
81a146707df82ecc972c28e055cc50b372f5d35b
[ "Apache-2.0" ]
1
2020-07-15T16:15:05.000Z
2020-07-15T16:15:05.000Z
"""The ABLTagger.""" from .decoders import * from .embeddings import * from .interface import *
16.166667
25
0.71134
11
97
6.272727
0.636364
0.289855
0
0
0
0
0
0
0
0
0
0
0.154639
97
5
26
19.4
0.841463
0.14433
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
05d75af0b6cc8b7bd983bf4a1c0d29eea6ca7f89
224
py
Python
data_generation/test_data_generation.py
alexwitt2399/uav-austin
ba96063f9c95ae02869fd96b8a611bc8a99513b6
[ "MIT" ]
null
null
null
data_generation/test_data_generation.py
alexwitt2399/uav-austin
ba96063f9c95ae02869fd96b8a611bc8a99513b6
[ "MIT" ]
3
2021-06-08T21:38:01.000Z
2022-03-12T00:31:16.000Z
data_generation/test_data_generation.py
alexwitt23/uav-austin
ba96063f9c95ae02869fd96b8a611bc8a99513b6
[ "MIT" ]
null
null
null
""" Collection of unittests to test data generation scripts. """ import unittest # TODO This replaces the build.py. This would test as many # of the shape generation utilities as possible, then also # do end-to-end tests.
28
64
0.754464
35
224
4.828571
0.771429
0
0
0
0
0
0
0
0
0
0
0
0.174107
224
7
65
32
0.913514
0.861607
0
0
0
0
0
0
0
0
0
0.142857
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
0
0
0
5
05e916ba9c529fcd41d4cff7a3e902bf313bbd73
356
py
Python
dbaas/account/serializers.py
didindinn/database-as-a-service
747de31ff8546f7874ddd654af860e130afd17a0
[ "BSD-3-Clause" ]
303
2015-01-08T10:35:54.000Z
2022-02-28T08:54:06.000Z
dbaas/account/serializers.py
nouraellm/database-as-a-service
5e655c9347bea991b7218a01549f5e44f161d7be
[ "BSD-3-Clause" ]
124
2015-01-14T12:56:15.000Z
2022-03-22T20:45:11.000Z
dbaas/account/serializers.py
nouraellm/database-as-a-service
5e655c9347bea991b7218a01549f5e44f161d7be
[ "BSD-3-Clause" ]
110
2015-01-02T11:59:48.000Z
2022-02-28T08:54:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django_services.api import DjangoServiceSerializer from .models import Team, AccountUser class TeamSerializer(DjangoServiceSerializer): class Meta: model = Team class UserSerializer(DjangoServiceSerializer): class Meta: model = AccountUser
20.941176
56
0.758427
35
356
7.514286
0.6
0.212928
0.243346
0.281369
0
0
0
0
0
0
0
0.003413
0.176966
356
16
57
22.25
0.894198
0.058989
0
0.222222
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.777778
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
af0dc0464b7e38be7fba200a83cdc29eb37536aa
69
py
Python
old_code/src_python/nmpccodegen/controller/constraints/__init__.py
kul-forbes/nmpc-codegen
0b96da0840504817472b2bdc62c29c98bdf29c8f
[ "MIT" ]
24
2017-11-13T02:17:10.000Z
2021-03-15T13:47:20.000Z
old_code/src_python/nmpccodegen/controller/constraints/__init__.py
kul-optec/nmpc-codegen
0b96da0840504817472b2bdc62c29c98bdf29c8f
[ "MIT" ]
14
2018-01-13T20:20:47.000Z
2020-05-12T11:21:12.000Z
old_code/src_python/nmpccodegen/controller/constraints/__init__.py
kul-optec/nmpc-codegen
0b96da0840504817472b2bdc62c29c98bdf29c8f
[ "MIT" ]
5
2018-08-14T14:27:41.000Z
2020-12-17T08:13:41.000Z
from .Constraint import Constraint from .Input_norm import Input_norm
34.5
34
0.869565
10
69
5.8
0.5
0.310345
0
0
0
0
0
0
0
0
0
0
0.101449
69
2
35
34.5
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
af1a32c974284234464dcef39c7b6e78032bf2f2
203
py
Python
cogs/__init__.py
Potzerus/Dorothy
9971c342339e9eb61e5fbf4aa11ae1530555004f
[ "MIT" ]
null
null
null
cogs/__init__.py
Potzerus/Dorothy
9971c342339e9eb61e5fbf4aa11ae1530555004f
[ "MIT" ]
null
null
null
cogs/__init__.py
Potzerus/Dorothy
9971c342339e9eb61e5fbf4aa11ae1530555004f
[ "MIT" ]
null
null
null
from .Chuni import Chunii #from .Drones import Drone from .Oda import OdaCord from .Pray import PrayCog from .Test import TestCog from .Panopticon import Panopticon from .Potzscript import PotzScriptCog
25.375
37
0.82266
28
203
5.964286
0.535714
0
0
0
0
0
0
0
0
0
0
0
0.137931
203
7
38
29
0.954286
0.123153
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
1
0
0
5
af85614f4ec5c8d93798a8484271dbf1b1dbb7bc
230
py
Python
python/multi.py
robotlightsyou/test
015f13943fc402d8ce86c5f6d2f5a7d032b3340a
[ "MIT" ]
2
2019-05-26T15:09:34.000Z
2021-09-12T08:01:23.000Z
python/multi.py
robotlightsyou/test
015f13943fc402d8ce86c5f6d2f5a7d032b3340a
[ "MIT" ]
null
null
null
python/multi.py
robotlightsyou/test
015f13943fc402d8ce86c5f6d2f5a7d032b3340a
[ "MIT" ]
1
2021-04-11T20:28:21.000Z
2021-04-11T20:28:21.000Z
class Multi(object): ITEMS = (1, 3), (5, 8) def __getitem__(self, i): return self.ITEMS[i[0]][i[1]] def __setitem__(self, i, x): self.ITEMS[i[0]][i[1]] = x def __len__(self): return 2, 2
19.166667
37
0.517391
37
230
2.891892
0.486486
0.093458
0.186916
0.205607
0.242991
0.242991
0
0
0
0
0
0.061728
0.295652
230
11
38
20.909091
0.598765
0
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0
0.25
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
0
1
1
0
0
5
afc17716db71c93ed908b2c75be0f95dd37fadae
119
py
Python
sfaira/versions/genomes/__init__.py
theislab/sfaira
77a7b49936047a0cdddc5ace4482186a868c3a7a
[ "BSD-3-Clause" ]
110
2020-09-08T07:47:15.000Z
2022-03-29T03:33:56.000Z
sfaira/versions/genomes/__init__.py
theislab/sfaira
77a7b49936047a0cdddc5ace4482186a868c3a7a
[ "BSD-3-Clause" ]
405
2020-09-15T15:05:46.000Z
2022-03-16T14:44:23.000Z
sfaira/versions/genomes/__init__.py
theislab/sfaira
77a7b49936047a0cdddc5ace4482186a868c3a7a
[ "BSD-3-Clause" ]
20
2021-03-30T15:30:14.000Z
2022-03-07T12:52:58.000Z
from .genomes import GenomeContainer, GtfInterface from .utils import translate_id_to_symbols, translate_symbols_to_id
39.666667
67
0.882353
16
119
6.1875
0.625
0
0
0
0
0
0
0
0
0
0
0
0.084034
119
2
68
59.5
0.908257
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
1
0
0
5
bb7824fa414c9ee61edc49b7dde4d213cd0a19ae
179
py
Python
infobip_channels/mms/models/query_parameters/get_inbound_mms_messages.py
infobip-community/infobip-api-python-sdk
5ffc5ab877ee1748aa29391f991c8c5324387487
[ "MIT" ]
null
null
null
infobip_channels/mms/models/query_parameters/get_inbound_mms_messages.py
infobip-community/infobip-api-python-sdk
5ffc5ab877ee1748aa29391f991c8c5324387487
[ "MIT" ]
null
null
null
infobip_channels/mms/models/query_parameters/get_inbound_mms_messages.py
infobip-community/infobip-api-python-sdk
5ffc5ab877ee1748aa29391f991c8c5324387487
[ "MIT" ]
null
null
null
from typing import Optional from infobip_channels.core.models import QueryParameter class GetInboundMMSMessagesQueryParameters(QueryParameter): limit: Optional[int] = None
22.375
59
0.832402
18
179
8.222222
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.117318
179
7
60
25.571429
0.936709
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
bb9c04e4ba6ea179ef1510eb57aa0ec6d0729cf4
88
py
Python
PythonDNS/helpers.py
endail/PythonDNS
21abd703a46e501e491fdb5f8af734c13d787ed8
[ "MIT" ]
null
null
null
PythonDNS/helpers.py
endail/PythonDNS
21abd703a46e501e491fdb5f8af734c13d787ed8
[ "MIT" ]
null
null
null
PythonDNS/helpers.py
endail/PythonDNS
21abd703a46e501e491fdb5f8af734c13d787ed8
[ "MIT" ]
null
null
null
def GetDomainNameFromRequest(request): return str(request.questions[0].qname)[:-1]
22
47
0.75
10
88
6.6
0.9
0
0
0
0
0
0
0
0
0
0
0.025316
0.102273
88
3
48
29.333333
0.810127
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
bbcbf7679f0f4a8307ad958f04942901c410cc18
102
py
Python
sinfer/dataset/__init__.py
geoyee/SlideInfer
1f790f895f66b6322c5d337ef16a30393cfa41ed
[ "Apache-2.0" ]
4
2022-03-28T15:58:34.000Z
2022-03-31T16:00:36.000Z
sinfer/dataset/__init__.py
geoyee/SlideInfer
1f790f895f66b6322c5d337ef16a30393cfa41ed
[ "Apache-2.0" ]
null
null
null
sinfer/dataset/__init__.py
geoyee/SlideInfer
1f790f895f66b6322c5d337ef16a30393cfa41ed
[ "Apache-2.0" ]
null
null
null
from .rasterloader import RasterLoader from .writer import SegWriter, DetWriter, ClsWriter, GanWriter
51
62
0.843137
11
102
7.818182
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.107843
102
2
62
51
0.945055
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
1
0
0
5
bbe9f296b0df9ca75d070b3935e72a25d127fdbe
124
py
Python
resultados/admin.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
null
null
null
resultados/admin.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
null
null
null
resultados/admin.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
1
2021-09-05T23:29:56.000Z
2021-09-05T23:29:56.000Z
from django.contrib import admin from .models import Resultado # Register your models here. admin.site.register(Resultado)
20.666667
32
0.814516
17
124
5.941176
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.120968
124
6
33
20.666667
0.926606
0.209677
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
bbeb89c7494603453a577e93908f696240d429b7
104
py
Python
src/modeling/trainers/__init__.py
akshatha-k/Calibrated_MOPO
3b2e675003e9f6d31a0763be2ec784ceeae5099e
[ "MIT" ]
null
null
null
src/modeling/trainers/__init__.py
akshatha-k/Calibrated_MOPO
3b2e675003e9f6d31a0763be2ec784ceeae5099e
[ "MIT" ]
null
null
null
src/modeling/trainers/__init__.py
akshatha-k/Calibrated_MOPO
3b2e675003e9f6d31a0763be2ec784ceeae5099e
[ "MIT" ]
null
null
null
__all__ = ["cartpole_trainer", "BNN_trainer"] from .cartpole_trainer import * from .BNN_trainer import *
34.666667
45
0.778846
13
104
5.615385
0.461538
0.410959
0
0
0
0
0
0
0
0
0
0
0.105769
104
3
46
34.666667
0.784946
0
0
0
0
0
0.257143
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
a5270fa8c410a76396180c91042f0e0b6261d052
76
py
Python
src/agent/kubernetes-agent/src/network/__init__.py
hyperledger-gerrit-archive/cello
52ce6439a391ee65cec76934c1d7b0475543a1e4
[ "Apache-2.0" ]
865
2017-01-12T21:51:37.000Z
2022-03-26T16:39:16.000Z
src/agent/kubernetes-agent/src/network/__init__.py
hyperledger-gerrit-archive/cello
52ce6439a391ee65cec76934c1d7b0475543a1e4
[ "Apache-2.0" ]
226
2017-02-06T08:36:24.000Z
2022-03-30T06:13:46.000Z
src/agent/kubernetes-agent/src/network/__init__.py
hyperledger-gerrit-archive/cello
52ce6439a391ee65cec76934c1d7b0475543a1e4
[ "Apache-2.0" ]
506
2017-02-08T06:11:18.000Z
2022-03-10T04:25:25.000Z
# # SPDX-License-Identifier: Apache-2.0 # from .fabric import FabricNetwork
15.2
37
0.763158
10
76
5.8
1
0
0
0
0
0
0
0
0
0
0
0.029851
0.118421
76
4
38
19
0.835821
0.460526
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
1
0
0
5
a540a88777ce62bcf3f9334382918c0b4ee14cfe
284
py
Python
mplsoccer/__init__.py
ElJdP/mplsoccer
8a4558c4950bd9e88785ec59e5148af40ab90acf
[ "MIT" ]
null
null
null
mplsoccer/__init__.py
ElJdP/mplsoccer
8a4558c4950bd9e88785ec59e5148af40ab90acf
[ "MIT" ]
null
null
null
mplsoccer/__init__.py
ElJdP/mplsoccer
8a4558c4950bd9e88785ec59e5148af40ab90acf
[ "MIT" ]
null
null
null
__version__ = "1.0.0" from mplsoccer import statsbomb from mplsoccer.cm import * from mplsoccer.linecollection import * from mplsoccer.pitch import * from mplsoccer.quiver import * from mplsoccer.radar_chart import * from mplsoccer.scatterutils import * from mplsoccer.utils import *
28.4
38
0.809859
37
284
6.081081
0.405405
0.462222
0.506667
0
0
0
0
0
0
0
0
0.012048
0.123239
284
9
39
31.555556
0.891566
0
0
0
0
0
0.017606
0
0
0
0
0
0
1
0
false
0
0.888889
0
0.888889
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
a545f1cd218946af72d441ee9660f1f3513232ce
984
py
Python
Cnn/Test/test1/Lesson1.py
thilina27/ProojectRes
8342ea354fb52a5f93b178b34e4a712515027590
[ "Unlicense" ]
null
null
null
Cnn/Test/test1/Lesson1.py
thilina27/ProojectRes
8342ea354fb52a5f93b178b34e4a712515027590
[ "Unlicense" ]
null
null
null
Cnn/Test/test1/Lesson1.py
thilina27/ProojectRes
8342ea354fb52a5f93b178b34e4a712515027590
[ "Unlicense" ]
null
null
null
Z = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]] def compute_neighbours(Z): rows, cols = len(Z), len(Z[0]) N = [[0, ] * (cols) for i in range(rows)] for x in range(1, cols - 1): for y in range(1, rows - 1): N[y][x] = Z[y - 1][x - 1] + Z[y][x - 1] + Z[y + 1][x - 1] \ + Z[y - 1][x] + Z[y + 1][x] \ + Z[y - 1][x + 1] + Z[y][x + 1] + Z[y + 1][x + 1] return N def show(Z): for l in Z[1:-1]: print l[1:-1] print def iterate(Z): rows, cols = len(Z), len(Z[0]) N = compute_neighbours(Z) for x in range(1, cols - 1): for y in range(1, rows - 1): if Z[y][x] == 1 and (N[y][x] < 2 or N[y][x] > 3): Z[y][x] = 0 elif Z[y][x] == 0 and N[y][x] == 3: Z[y][x] = 1 return Z show(Z) for i in range(4): iterate(Z) show(Z)
24
71
0.373984
199
984
1.839196
0.140704
0.142077
0.180328
0.196721
0.527322
0.491803
0.491803
0.453552
0.434426
0.306011
0
0.118928
0.393293
984
40
72
24.6
0.494137
0
0
0.25
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.0625
0
0
1
null
0
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
1
0
0
0
0
0
0
0
0
5
a5701d4dc74336c6faa5726e0ea7cab4550348ed
115
py
Python
exchanges/admin.py
AcaciaTrading/acacia_main
b778aed98894775eeea6b999c10be6c6d7cc5ac9
[ "MIT" ]
25
2016-07-14T05:52:07.000Z
2021-01-18T19:53:50.000Z
exchanges/admin.py
AcaciaTrading/acacia_main
b778aed98894775eeea6b999c10be6c6d7cc5ac9
[ "MIT" ]
null
null
null
exchanges/admin.py
AcaciaTrading/acacia_main
b778aed98894775eeea6b999c10be6c6d7cc5ac9
[ "MIT" ]
12
2016-07-14T09:29:38.000Z
2021-01-18T19:53:58.000Z
from django.contrib import admin from .models import Nonce # Register your models here. admin.site.register(Nonce)
23
32
0.808696
17
115
5.470588
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.121739
115
5
33
23
0.920792
0.226087
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a591e5c05c454753625dae33a189711503970cd9
14,929
py
Python
source_code_tokenizer/tokenizer.py
matteogabburo/source-code-tokenizer
cef43679bb7ff62aed9865261ad1d3f731523946
[ "MIT" ]
1
2022-03-14T12:16:17.000Z
2022-03-14T12:16:17.000Z
source_code_tokenizer/tokenizer.py
matteogabburo/source-code-tokenizer
cef43679bb7ff62aed9865261ad1d3f731523946
[ "MIT" ]
1
2021-01-12T14:50:00.000Z
2021-01-12T21:20:14.000Z
source_code_tokenizer/tokenizer.py
matteogabburo/source-code-tokenizer
cef43679bb7ff62aed9865261ad1d3f731523946
[ "MIT" ]
null
null
null
import sys import abc import re import random from source_code_tokenizer.languages.python.regex import PyRegex from source_code_tokenizer.languages.c.regex import CRegex from source_code_tokenizer.languages.cpp.regex import CPPRegex from source_code_tokenizer.languages.java.regex import JavaRegex from source_code_tokenizer.languages.js.regex import JSRegex class CodeTokenizer: def __init__(self): self.TOKENIZED_STR = None self.TOKENIZED = None self.setup_regex() def get_groups(self): r"""Return the list of groups tokenized by the tokenizer.""" return sorted([k for k, v in self.TOKENIZED.groupindex.items()]) def get_regex(self): return self.TOKENIZED_STR @abc.abstractmethod def setup_regex(self): r"""This is the right place to initialize the self.TOKENIZED regular expression. example: self.TOKENIZED = re.compile(PYREGEX, re.MULTILINE) """ @abc.abstractmethod def tokenize(self, text): """This method must take a string and return a list of tuples (value, type)""" @abc.abstractmethod def get_line_terminators(self, text): """This method return the list of line terminators of the language""" class PythonTokenizer(CodeTokenizer): def __init__(self): super().__init__() self.str_headers = PyRegex().get_str_headers() def setup_regex(self): # each regex should be a group self.TOKENIZED_STR = PyRegex().get_full_regex() self.TOKENIZED = re.compile(self.TOKENIZED_STR, re.MULTILINE) def tokenize(self, text): last_indent_size = 0 tokenized = [] for tok in self.TOKENIZED.finditer(text): v, k = (tok.group(), tok.lastgroup) # identation and deidentation """ # dynamic tabulation size if k == "INDENT" and identation_size is None: if v[0] == '\t': identation_size = 1 indent_tab = True elif v[0] == ' ': identation_size = len(v) indent_spaces = True else: raise ValueError("Identation error. Value not recognized (must be a space or \\t).") """ if k == "INDENT": """ if v[0] == ' ' and indent_spaces: pass elif v[0] == '\t' and indent_tab: pass else: raise Exception("Identation error: only a type of tabulation is allowed (not spaces and tabs in the same program)") if len(v) % identation_size > 0: raise Exception("Identation error: the tabulation is inconsistent") # decide if it is an indentation or a deindentation if len(v) >= last_indent_size: k = "INDENT" else: k = "DEINDENT" last_indent_size = len(v) # add all but one tabs (it will be add at the end of the cycle) for _ in range(int(len(v) / identation_size)-1): tokenized.append((v[0] * identation_size, k)) """ # decide if it is an indentation or a deindentation if len(v) >= last_indent_size: k = "INDENT" else: k = "DEINDENT" last_indent_size = len(v) tokenized.append((v, k)) # replace NEWLINE with \n if k == "NEWLINE" or k == "NL": v = "\n" # check strings errors def check_strings(s): if k == "STRING": # string must be longher than 1 and bos and eos must be in [",'] and equal # WARNING: a string can also start with (b|r|u|f|br|fr) to_remove = max( [len(h) if s.startswith(h) else 0 for h in self.str_headers] ) v = s[to_remove:] if not (len(v) > 1 and v[0] == v[-1] and v[0] in ['"', "'"]): raise Exception( "Error on string delimiters occurred while tokenizing STRING" ) if k == "STRING_M": # string must be longher than 5 and bos and eos must be in [""",'''] and equal # WARNING: a string can also start with (b|r|u|f|br|fr) to_remove = max( [len(h) if s.startswith(h) else 0 for h in self.str_headers] ) v = s[to_remove:] if not (len(v) > 5 and v[:3] == v[-3:] and v[:3] in ['"""', "'''"]): raise Exception( "Error on string delimiters occurred while tokenizing STRING_M" ) check_strings(v) tokenized.append((v, k)) return tokenized def get_line_terminators(self): return ["\n"] class CTokenizer(CodeTokenizer): def __init__(self): super().__init__() self.RM_INDENTATION = re.compile( CRegex().get_clean_indent_regex(), re.MULTILINE ) self.RM_SPACES = re.compile(CRegex().get_remove_doublespaces_regex()) self.str_headers = CRegex().get_str_headers() self.chr_headers = CRegex().get_chr_headers() def setup_regex(self): # each regex should be a group self.TOKENIZED_STR = CRegex().get_full_regex() self.TOKENIZED = re.compile(self.TOKENIZED_STR, re.MULTILINE) def tokenize(self, text): # minify the input removing all the not necessary spaces def remove_spaces(matchobj): return " " if matchobj.group(2) is not None else matchobj.group(1) text = self.RM_INDENTATION.sub(remove_spaces, text) text = self.RM_SPACES.sub(" ", text).strip() tokenized = [] for tok in self.TOKENIZED.finditer(text): v, k = (tok.group(), tok.lastgroup) # check string and comment errors def check(s): if k == "STRING": # string must be longer than 1 and bos and eos must be equal to " # WARNING: a string can also start with some prefix to_remove = max( [len(h) if s.startswith(h) else 0 for h in self.str_headers] ) v = s[to_remove:] if not (len(v) > 1 and v[0] == v[-1] and v[0] == '"'): raise Exception( "Error on string delimiters occurred while tokenizing STRING" ) if k == "CHAR": # char must be longer than 1 and bos and eos must be equal to ' if not (len(s) > 1 and s[0] == s[-1] and s[0] == "'"): raise Exception( "Error on string delimiters occurred while tokenizing CHAR" ) if k == "COMMENT": # if comment starts with "/*" len should be higher than 3 and it must finish with "*/" if len(s) > 1 and s.startswith("/*"): if not (len(s) > 3 and s[-2:] == "*/"): raise Exception( "Error on string delimiters occurred while tokenizing COMMENT" ) check(v) tokenized.append((v, k)) return tokenized def get_line_terminators(self): return [";"] class CPPTokenizer(CodeTokenizer): def __init__(self): super().__init__() self.RM_INDENTATION = re.compile( CPPRegex().get_clean_indent_regex(), re.MULTILINE ) self.RM_SPACES = re.compile(CPPRegex().get_remove_doublespaces_regex()) self.str_headers = CPPRegex().get_str_headers() self.chr_headers = CPPRegex().get_chr_headers() def setup_regex(self): # each regex should be a group self.TOKENIZED_STR = CPPRegex().get_full_regex() self.TOKENIZED = re.compile(self.TOKENIZED_STR, re.MULTILINE) def tokenize(self, text): # minify the input removing all the not necessary spaces def remove_spaces(matchobj): return " " if matchobj.group(2) is not None else matchobj.group(1) text = self.RM_INDENTATION.sub(remove_spaces, text) text = self.RM_SPACES.sub(" ", text).strip() tokenized = [] for tok in self.TOKENIZED.finditer(text): v, k = (tok.group(), tok.lastgroup) # check string and comment errors def check(s): if k == "STRING": # string must be longer than 1 and bos and eos must be equal to " # WARNING: a string can also start with some prefix to_remove = max( [len(h) if s.startswith(h) else 0 for h in self.str_headers] ) v = s[to_remove:] if not (len(v) > 1 and v[0] == v[-1] and v[0] == '"'): raise Exception( "Error on string delimiters occurred while tokenizing STRING" ) if k == "CHAR": # char must be longer than 1 and bos and eos must be equal to ' # WARNING: a char can also start with some prefix to_remove = max( [len(h) if s.startswith(h) else 0 for h in self.chr_headers] ) v = s[to_remove:] if not (len(v) > 1 and v[0] == v[-1] and v[0] == "'"): raise Exception( "Error on string delimiters occurred while tokenizing CHAR" ) if k == "COMMENT": # if comment starts with "/*" len should be higher than 3 and it must finish with "*/" if len(s) > 1 and s.startswith("/*"): if not (len(s) > 3 and s[-2:] == "*/"): raise Exception( "Error on string delimiters occurred while tokenizing COMMENT" ) check(v) tokenized.append((v, k)) return tokenized def get_line_terminators(self): return [";"] class JavaTokenizer(CodeTokenizer): def __init__(self): super().__init__() self.RM_INDENTATION = re.compile( JavaRegex().get_clean_indent_regex(), re.MULTILINE ) self.RM_SPACES = re.compile(JavaRegex().get_remove_doublespaces_regex()) def setup_regex(self): # each regex should be a group self.TOKENIZED_STR = JavaRegex().get_full_regex() self.TOKENIZED = re.compile(self.TOKENIZED_STR, re.MULTILINE) def tokenize(self, text): # minify the input removing all the not necessary spaces def remove_spaces(matchobj): return " " if matchobj.group(2) is not None else matchobj.group(1) text = self.RM_INDENTATION.sub(remove_spaces, text) text = self.RM_SPACES.sub(" ", text).strip() tokenized = [] for tok in self.TOKENIZED.finditer(text): v, k = (tok.group(), tok.lastgroup) # check string and comment errors def check(s): if k == "STRING": # string must be longer than 1 and bos and eos must be equal to " if not (len(s) > 1 and s[0] == s[-1] and s[0] == '"'): raise Exception( "Error on string delimiters occurred while tokenizing STRING" ) if k == "CHAR": # char must be longer than 1 and bos and eos must be equal to ' if not (len(s) > 1 and s[0] == s[-1] and s[0] == "'"): raise Exception( "Error on string delimiters occurred while tokenizing CHAR" ) if k == "COMMENT": # if comment starts with "/*" len should be higher than 3 and it must finish with "*/" if len(s) > 1 and s.startswith("/*"): if not (len(s) > 3 and s[-2:] == "*/"): raise Exception( "Error on string delimiters occurred while tokenizing COMMENT" ) check(v) tokenized.append((v, k)) return tokenized def get_line_terminators(self): return [";"] class JSTokenizer(CodeTokenizer): def __init__(self): super().__init__() self.RM_INDENTATION = re.compile( JSRegex().get_clean_indent_regex(), re.MULTILINE ) self.RM_SPACES = re.compile(JSRegex().get_remove_doublespaces_regex()) def setup_regex(self): # each regex should be a group self.TOKENIZED_STR = JSRegex().get_full_regex() self.TOKENIZED = re.compile(self.TOKENIZED_STR, re.MULTILINE) def tokenize(self, text): # minify the input removing all the not necessary spaces def remove_spaces(matchobj): return " " if matchobj.group(2) is not None else matchobj.group(1) text = self.RM_INDENTATION.sub(remove_spaces, text) text = self.RM_SPACES.sub(" ", text).strip() tokenized = [] for tok in self.TOKENIZED.finditer(text): v, k = (tok.group(), tok.lastgroup) # check string and comment errors def check(s): if k == "STRING": # string must be longer than 1 and bos and eos must be in [", ', `] if not (len(s) > 1 and s[0] == s[-1] and s[0] in ['"', "'", "`"]): raise Exception( "Error on string delimiters occurred while tokenizing STRING" ) if k == "COMMENT": # if comment starts with "/*" len should be higher than 3 and it must finish with "*/" if len(s) > 1 and s.startswith("/*"): if not (len(s) > 3 and s[-2:] == "*/"): raise Exception( "Error on string delimiters occurred while tokenizing COMMENT" ) check(v) tokenized.append((v, k)) return tokenized def get_line_terminators(self): return [";"]
35.630072
135
0.508942
1,718
14,929
4.30617
0.110594
0.015139
0.014058
0.036902
0.786023
0.754663
0.747364
0.728575
0.728575
0.727629
0
0.009168
0.393596
14,929
418
136
35.715311
0.808019
0.143278
0
0.64876
0
0
0.081631
0
0
0
0
0
0
1
0.144628
false
0
0.03719
0.041322
0.272727
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
3c13e9798916dcdde738e3d105f4460ca0af917f
31,380
py
Python
Code/Cut-and-Average-Data-Exp2.py
nancy-aggarwal/Characterization-of-ARIADNE-source-mass-rotor_Github
b415af6dd63fc01aacbbb4293807ae2cab56de65
[ "CC-BY-4.0" ]
null
null
null
Code/Cut-and-Average-Data-Exp2.py
nancy-aggarwal/Characterization-of-ARIADNE-source-mass-rotor_Github
b415af6dd63fc01aacbbb4293807ae2cab56de65
[ "CC-BY-4.0" ]
null
null
null
Code/Cut-and-Average-Data-Exp2.py
nancy-aggarwal/Characterization-of-ARIADNE-source-mass-rotor_Github
b415af6dd63fc01aacbbb4293807ae2cab56de65
[ "CC-BY-4.0" ]
null
null
null
# %% from scipy.io import loadmat import numpy as np from datetime import datetime now = datetime.now import matplotlib.pyplot as plt import matplotlib as mpl import time import os import pickle # import json # %% SaveData = True SaveDataFigs = False dpiN = 700 dark_plots = True if dark_plots: dark='darkbg/' q = mpl.rc_params_from_file('matplotlibrc_dark') else: dark = 'whitebg/' mpl.rcParams.update(mpl.rcParamsDefault) SavePlotDir_Exp2 = '../Results/2021-12-18/Exp2/'+dark+'ProcessedData/' SaveDataDir_Exp2 = '../Results/2021-12-18/Exp2/'+'Pickles/' if SaveDataFigs: if not os.path.exists(SavePlotDir_Exp2): os.makedirs(SavePlotDir_Exp2) if SaveData: if not os.path.exists(SaveDataDir_Exp2): os.makedirs(SaveDataDir_Exp2) # %% # %% if dark_plots: mpl.rcParams.update(q) # %matplotlib inline mpl.rcParams.update({ #'legend.borderpad': 0.3, #'legend.borderaxespad': 0.25, # 'legend.columnspacing': 0.6, # 'legend.handlelength': 0.7, #'legend.handleheight': 0.4, #'legend.handletextpad': 0.2, # 'legend.labelspacing': 0.45, # 'text.usetex': True, 'font.size':14, }) else: # mpl.rcParams.update(mpl.rcParamsDefault) # %matplotlib inline font = { 'weight' : 'normal', 'size' : 14, 'family': 'Times New Roman'} plt.rc('font', **font) # mpl.rcParams.update({ # 'font.size':30, # 'font.family':'Times New Roman' # }) # mpl.rcParams.update({'font.family':'serif'}) # %% def lighten_color(color, amount=0.5): """ Lightens the given color by multiplying (1-luminosity) by the given amount. Input can be matplotlib color string, hex string, or RGB tuple. Examples: >> lighten_color('g', 0.3) >> lighten_color('#F034A3', 0.6) >> lighten_color((.3,.55,.1), 0.5) """ import matplotlib.colors as mc import colorsys try: c = mc.cnames[color] except: c = color c = colorsys.rgb_to_hls(*mc.to_rgb(c)) return colorsys.hls_to_rgb(c[0], 1 - amount * (1 - c[1]), c[2]) # %% [markdown] # # Load data # %% sampling_factor = 6000 f_sample = 500 freq_for_noise_analysis = 5 # %% [markdown] # ## Experiment 2 # %% [markdown] # ### Load data ### # %% t0 = time.time() Exp2_data_file = '../Data/Exp2_AxionWeel000.0500.flt.csv' Exp2_data = np.loadtxt(Exp2_data_file,delimiter= '\t') print(time.time() - t0) t0 = time.time() Exp2_time = Exp2_data[:,0] Exp2_AW_Z = - Exp2_data[:,1] #(-AW-Z) Exp2_AW_Y = - Exp2_data[:,2] #(-AW-Y) Exp2_AV_X = + Exp2_data[:,3] #(+AV-Z) Exp2_AV_Y = - Exp2_data[:,4] #(-AV-Y) print(time.time() - t0) # %% [markdown] # ### Plot original data ### # %% plt.plot(Exp2_time,Exp2_AW_Y,label='AW Y') plt.plot(Exp2_time,Exp2_AW_Z,label='AW Z') plt.plot(Exp2_time,Exp2_AV_X,label='AV X') plt.plot(Exp2_time,Exp2_AV_Y,label='AV Y') plt.grid() plt.xlabel('time (s)') plt.ylabel('Field (pT)') plt.legend(loc='lower center') plt.title('Raw data') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_original_data_raw.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ### Times used for deciding various frequencies ### # %% # Short times (~4-5 cycles) Exp2_theta_loc = [ 0,15,325,135,90] Exp2_Freq = [ 0.1, 0.5, 1, 3, 5] Exp2_Start_Time = [ 40, 190, 310,390, 475] Exp2_Stop_Time = [ 81, 199, 315,391.4, 475.9] ind_freq_analysis = Exp2_Freq.index(freq_for_noise_analysis) Exp2_theta_loc.append(0) Exp2_Freq.append(0) Exp2_Start_Time.append(580) Exp2_Stop_Time.append(580 + Exp2_Stop_Time[ind_freq_analysis] - Exp2_Start_Time[ind_freq_analysis]) # Intermediate times (~8-10 cycles) # Exp2_loc = [0,15,325,135,90] # Exp2_Freq = [0.1, 0.5, 1, 3, 5] # Exp2_Start_Time = [ 40, 190, 310,390, 475] # Exp2_Stop_Time = [ 120,206, 318,392.7, 476.7] # SavePlotDir_Exp2 = '../PythonFigs/FitFigs/Intermediate/Exp2/' # long times # Exp2_loc = [0,5,305,110,330] # Exp2_Freq = [0.1,0.5, 1, 3, 5] # Exp2_Start_Time = [ 30,170,285,380,450] # Exp2_Stop_Time = [ 130,240,325,420,500] # SavePlotDir_Exp2 = '../PythonFigs/FitFigs/Long/Exp2/' # %% fig, splist = plt.subplots(nrows=4,ncols=1,sharex=True) splist[0].plot(Exp2_time,Exp2_AW_Y,color = "C0") splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_time,Exp2_AW_Z,color = "C1") splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_time,Exp2_AV_Y,color="C2") splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_time,Exp2_AV_X,color="C3") splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() plt.xlabel('time (s)') # plt.ylabel('Field (pT)') # plt.legend() plt.suptitle('raw data (pT)') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_original_data_raw_separate_subplots.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ### Plot original data with time cut imposed ### # %% fig, splist = plt.subplots(nrows=5,ncols=1,sharex=True) splist[0].plot(Exp2_time,Exp2_AW_Y,color = "C0") splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_time,Exp2_AW_Z,color = "C1") splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_time,Exp2_AV_Y,color="C2") splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_time,Exp2_AV_X,color="C3") splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() plt.xlabel('time (s)') ylow = 0 yhigh = 1 ymid=0.5*(ylow+yhigh) # col=['red','green','magenta'] icol = 4 for i_freq in range(len(Exp2_Freq)): start = Exp2_Start_Time[i_freq] stop = Exp2_Stop_Time[i_freq] h = splist[4].plot([start,start],[ylow,yhigh],color = "C{}".format(icol)) splist[4].plot([start,stop],[ymid,ymid],color=h[0].get_color()) splist[4].plot([stop,stop],[ylow,yhigh],color=h[0].get_color(),label='{} Hz'.format(Exp2_Freq[i_freq])) icol+=1 splist[4].set_ylim(-1,2) splist[4].set_yticklabels([]) splist[4].grid() splist[4].set_ylabel('Cut') plt.legend(loc=[.8,1.2]) # plt.xlim(168,350) # plt.ylim(-40,120) plt.suptitle('Field (pT) and positions of cut') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_original_data_cut_place_old.png',bbox_inches='tight',dpi = dpiN) # %% fig, splist = plt.subplots(nrows=5,ncols=1,sharex=True) splist[0].plot(Exp2_time,Exp2_AW_Y,color = "C0") splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_time,Exp2_AW_Z,color = "C1") splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_time,Exp2_AV_Y,color="C2") splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_time,Exp2_AV_X,color="C3") splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() plt.xlabel('time (s)') ylow = 0 yhigh = 1 ymid=0.5*(ylow+yhigh) # col=['red','green','magenta'] icol = 4 for i_freq in range(len(Exp2_Freq)): start = Exp2_Start_Time[i_freq] stop = Exp2_Stop_Time[i_freq] freqtext = '{} Hz'.format(Exp2_Freq[i_freq]) h = splist[4].plot([start,start],[ylow,yhigh] # ,color = "C{}".format(icol) ,color = [0.3,0.3,0.3] ) splist[4].plot([start,stop],[ymid,ymid],color=h[0].get_color()) splist[4].plot([stop,stop],[ylow,yhigh],color=h[0].get_color(),label=freqtext) plt.text((start+stop)/2,ylow-0.3,freqtext,ha='center',va='top') icol+=1 splist[4].set_ylim(-1.3,1.5) splist[4].set_yticklabels([]) splist[4].set_yticks([]) splist[4].grid() splist[4].set_ylabel('Cut') # plt.legend(ncol=len(Exp2_Freq),mode = "expand", # loc="lower center",fontsize=10) # plt.xlim(168,350) # plt.ylim(-40,120) plt.suptitle('Field (pT) and positions of cut') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_original_data_cut_place.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ### Error measured by taking data without rotation (0 Hz) ### # %% [markdown] # ### Cut data ### # %% Exp2_data_cut = {} Exp2_data_cut['theta']={} Exp2_data_cut['theta wrap']={} Exp2_data_cut['time']={} Exp2_data_cut['AW']={} Exp2_data_cut['AW']['Z']={} Exp2_data_cut['AW']['Z wrap'] = {} Exp2_data_cut['AW']['Y']={} Exp2_data_cut['AW']['Y wrap'] = {} Exp2_data_cut['AV']={} Exp2_data_cut['AV']['X']={} Exp2_data_cut['AV']['Y']={} Exp2_data_cut['AV']['Y wrap']={} Exp2_data_cut['AV']['X wrap']={} # %% last_time = 0 for i_freq in range(len(Exp2_Freq)): freq = Exp2_Freq[i_freq] Exp2_data_cut['AW']['Z'][freq] = {} Exp2_data_cut['AW']['Y'][freq] = {} Exp2_data_cut['AV']['X'][freq] = {} Exp2_data_cut['AV']['Y'][freq] = {} Exp2_data_cut['AW']['Z wrap'][freq] = {} Exp2_data_cut['AW']['Y wrap'][freq] = {} Exp2_data_cut['AV']['X wrap'][freq] = {} Exp2_data_cut['AV']['Y wrap'][freq] = {} if freq==0: f_new_sample = sampling_factor * freq_for_noise_analysis else: f_new_sample = sampling_factor * freq n_skips = int(np.ceil(f_sample/f_new_sample)) cutbool = (Exp2_time>Exp2_Start_Time[i_freq]) & (Exp2_time<Exp2_Stop_Time[i_freq]) Time_i = Exp2_time[cutbool] - Exp2_Start_Time[i_freq] # reset all clocks to zero if freq ==0: Theta_i = 360 * freq_for_noise_analysis * Time_i else: Theta_i = 360 * freq * Time_i # degrees AWZ_i = Exp2_AW_Z[cutbool] AWY_i = Exp2_AW_Y[cutbool] AVX_i = Exp2_AV_X[cutbool] AVY_i = Exp2_AV_Y[cutbool] new_indices = np.arange(0,len(Time_i),n_skips) Theta_unwrap = Theta_i[new_indices] - Exp2_theta_loc[i_freq] Theta_wrap = (Theta_unwrap) % (360) Exp2_data_cut['theta'][freq] = Theta_unwrap Exp2_data_cut['time'][freq] = Time_i[new_indices] + last_time last_time = max(Exp2_data_cut['time'][freq]) Exp2_data_cut['AW']['Z'][freq]['B'] = AWZ_i[new_indices] Exp2_data_cut['AW']['Y'][freq]['B'] = AWY_i[new_indices] Exp2_data_cut['AV']['X'][freq]['B'] = AVX_i[new_indices] Exp2_data_cut['AV']['Y'][freq]['B'] = AVY_i[new_indices] sort_idx = Theta_wrap.argsort() Exp2_data_cut['theta wrap'][freq] = Theta_wrap[sort_idx] Exp2_data_cut['AW']['Z wrap'][freq]['B'] = Exp2_data_cut['AW']['Z'][freq]['B'][sort_idx] Exp2_data_cut['AW']['Y wrap'][freq]['B'] = Exp2_data_cut['AW']['Y'][freq]['B'][sort_idx] Exp2_data_cut['AV']['X wrap'][freq]['B'] = Exp2_data_cut['AV']['X'][freq]['B'][sort_idx] Exp2_data_cut['AV']['Y wrap'][freq]['B'] = Exp2_data_cut['AV']['Y'][freq]['B'][sort_idx] # %% fig,[sp1,sp2,sp3,sp4]=plt.subplots(nrows=4,ncols=1,sharex=True,figsize = (7,6)) fig.suptitle('Field as a function of rotation') plot_freq = [0,0.1,0.5,1,3,5] i_freq = 0 if 0 in plot_freq: ncol = len(plot_freq)-1 else: ncol = len(plot_freq) alph=1# - i_freq/10 for freq in plot_freq: if freq ==0: c = [0,.6,0.3] else: if dark_plots: # cval = 0.8-(ncol-1-i_freq)/ncol # c = [cval+0.2,cval,cval,alph] cval = 0.8-i_freq/ncol c = [cval+0.2,cval,cval,alph] else: cval = 0.8-i_freq/ncol c = [cval+0.2,cval,cval,alph] i_freq +=1 # print(c) sp1.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AW']['Y'][freq]['B'],label='{} Hz'.format(freq),color = c) sp2.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AW']['Z'][freq]['B'],color = c) sp3.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AV']['Y'][freq]['B'],color = c) sp4.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AV']['X'][freq]['B'],color = c) sp1.set_ylabel('AW Y (pT)') sp2.set_ylabel('AW Z (pT)') sp3.set_ylabel('AV Y (pT)') sp4.set_ylabel('AV X (pT)') sp4.set_xlabel('$\\theta/\pi$') sp1.grid() sp2.grid() sp3.grid() sp4.grid() fig.legend(loc='center right') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_with_0Hz.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(0,2) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_zoom_with_0Hz.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(0,4) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_zoom_2_with_0Hz.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(0,6) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_zoom_3_with_0Hz.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(-2,11) # %% fig,[sp1,sp2,sp3,sp4]=plt.subplots(nrows=4,ncols=1,sharex=True,figsize = (7,6)) fig.suptitle('Field as a function of rotation') plot_freq = [0.1,0.5,1,3,5] i_freq = 0 if 0 in plot_freq: ncol = len(plot_freq)-1 else: ncol = len(plot_freq) alph = 1# - i_freq/10 for freq in plot_freq: if freq ==0: c = [0,.6,0.3] else: cval = 0.8-i_freq/ncol c = [cval+0.2,cval,cval,alph] i_freq +=1 # print(c) sp1.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AW']['Y'][freq]['B'],label='{} Hz'.format(freq),color = c) sp2.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AW']['Z'][freq]['B'],color = c) sp3.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AV']['Y'][freq]['B'],color = c) sp4.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AV']['X'][freq]['B'],color = c) sp1.set_ylabel('AW Y (pT)') sp2.set_ylabel('AW Z (pT)') sp3.set_ylabel('AV Y (pT)') sp4.set_ylabel('AV X (pT)') sp4.set_xlabel('$\\theta/\pi$') sp1.grid() sp2.grid() sp3.grid() sp4.grid() fig.legend(loc='center right') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(0,2) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_zoom.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(0,4) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_zoom_2.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(0,6) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_zoom_3.png',bbox_inches='tight',dpi = dpiN) sp1.set_xlim(-2,11) # %% fig,[sp1,sp2,sp3,sp4]=plt.subplots(nrows=4,ncols=1,sharex=True,figsize = (7,6)) fig.suptitle('Field as a function of rotation') for freq in Exp2_Freq: sp1.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AW']['Y wrap'][freq]['B'],label='{} Hz'.format(freq), alpha = 0.7) sp2.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AW']['Z wrap'][freq]['B'], alpha = 0.7) sp3.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AV']['Y wrap'][freq]['B'], alpha = 0.7) sp4.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AV']['X wrap'][freq]['B'], alpha = 0.7) sp1.set_ylabel('AW Y') sp2.set_ylabel('AW Z') sp3.set_ylabel('AV Y') sp4.set_ylabel('AV X') sp4.set_xlabel('$\\theta/\pi$') sp1.grid() sp2.grid() sp3.grid() sp4.grid() fig.legend(loc='center right') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_theta_wrap.png',bbox_inches='tight',dpi = dpiN) # %% fig,[sp1,sp2,sp3,sp4]=plt.subplots(nrows=4,ncols=1,sharex=True,figsize=(7,6)) for freq in Exp2_Freq: sp1.plot(Exp2_data_cut['time'][freq],Exp2_data_cut['AW']['Y'][freq]['B'],label='{} Hz'.format(freq)) sp2.plot(Exp2_data_cut['time'][freq],Exp2_data_cut['AW']['Z'][freq]['B']) sp3.plot(Exp2_data_cut['time'][freq],Exp2_data_cut['AV']['Y'][freq]['B']) sp4.plot(Exp2_data_cut['time'][freq],Exp2_data_cut['AV']['X'][freq]['B']) sp1.set_ylabel('AW Y') sp2.set_ylabel('AW Z') sp3.set_ylabel('AV Y') sp4.set_ylabel('AV X') sp4.set_xlabel('time (s)') sp1.grid() sp2.grid() sp3.grid() sp4.grid() fig.legend(loc='center right') plt.suptitle('Cut data as a function of time') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_time.png',bbox_inches='tight',dpi = dpiN) # sp1.set_xlim(59,85) # plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_time_zoom.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # # Error Analysis # # %% [markdown] # ### Error measured by taking data without rotation (0 Hz) ### # %% [markdown] # ## Standard deviation of cut data ## # %% Exp2_data_cut['AW']['Y'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AW']['Y'][0]['B']) Exp2_data_cut['AW']['Z'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AW']['Z'][0]['B']) Exp2_data_cut['AV']['Y'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AV']['Y'][0]['B']) Exp2_data_cut['AV']['X'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AV']['X'][0]['B']) # %% [markdown] # ## Plot cut data and its standard deviation as a function of time # %% fig, splist = plt.subplots(nrows=4,ncols=1,sharex=True) splist[0].plot(Exp2_data_cut['time'][0],Exp2_data_cut['AW']['Y'][0]['B'],color = "C0" ,label = '$\sigma$ = {:.2f} pT'.format(Exp2_data_cut['AW']['Y'][freq_for_noise_analysis]['sigma'])) splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_data_cut['time'][0],Exp2_data_cut['AW']['Z'][0]['B'],color = "C1" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AW']['Z'][freq_for_noise_analysis]['sigma']))) splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_data_cut['time'][0],Exp2_data_cut['AV']['Y'][0]['B'],color = "C2" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AV']['Y'][freq_for_noise_analysis]['sigma']))) splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_data_cut['time'][0],Exp2_data_cut['AV']['X'][0]['B'],color = "C3" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AV']['X'][freq_for_noise_analysis]['sigma']))) splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() splist[0].legend(loc = [1,0]) splist[1].legend(loc = [1,0]) splist[2].legend(loc = [1,0]) splist[3].legend(loc = [1,0]) plt.xlabel('time (s)') # plt.ylabel('Field (pT)') plt.suptitle('0 Hz data raw (pT)') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_noise_raw_data.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ## Plot cut data and its standard deviation as a function of theta # %% fig, splist = plt.subplots(nrows=4,ncols=1,sharex=True) splist[0].plot(Exp2_data_cut['theta'][0]/180,Exp2_data_cut['AW']['Y'][0]['B'],color = "C0" ,label = '$\sigma$ = {:.2f} pT'.format(Exp2_data_cut['AW']['Y'][freq_for_noise_analysis]['sigma'])) splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_data_cut['theta'][0]/180,Exp2_data_cut['AW']['Z'][0]['B'],color = "C1" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AW']['Z'][freq_for_noise_analysis]['sigma']))) splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_data_cut['theta'][0]/180,Exp2_data_cut['AV']['Y'][0]['B'],color = "C2" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AV']['Y'][freq_for_noise_analysis]['sigma']))) splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_data_cut['theta'][0]/180,Exp2_data_cut['AV']['X'][0]['B'],color = "C3" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AV']['X'][freq_for_noise_analysis]['sigma']))) splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() splist[0].legend(loc = [1,0]) splist[1].legend(loc = [1,0]) splist[2].legend(loc = [1,0]) splist[3].legend(loc = [1,0]) plt.xlabel('$\\theta/\pi$') # plt.ylabel('Field (pT)') plt.suptitle('0 Hz data raw (pT)') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_noise_raw_data_theta.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ## Cut data and its standard deviation as a function of theta (wrapped) ## # %% Exp2_data_cut['AW']['Y wrap'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AW']['Y wrap'][0]['B']) Exp2_data_cut['AW']['Z wrap'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AW']['Z wrap'][0]['B']) Exp2_data_cut['AV']['Y wrap'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AV']['Y wrap'][0]['B']) Exp2_data_cut['AV']['X wrap'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut['AV']['X wrap'][0]['B']) # %% fig, splist = plt.subplots(nrows=4,ncols=1,sharex=True) splist[0].plot(Exp2_data_cut['theta wrap'][0]/180,Exp2_data_cut['AW']['Y wrap'][0]['B'],color = "C0" ,label = '$\sigma$ = {:.2f} pT'.format(Exp2_data_cut['AW']['Y wrap'][freq_for_noise_analysis]['sigma'])) splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_data_cut['theta wrap'][0]/180,Exp2_data_cut['AW']['Z wrap'][0]['B'],color = "C1" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AW']['Z wrap'][freq_for_noise_analysis]['sigma']))) splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_data_cut['theta wrap'][0]/180,Exp2_data_cut['AV']['Y wrap'][0]['B'],color = "C2" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AV']['Y wrap'][freq_for_noise_analysis]['sigma']))) splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_data_cut['theta wrap'][0]/180,Exp2_data_cut['AV']['X wrap'][0]['B'],color = "C3" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut['AV']['X wrap'][freq_for_noise_analysis]['sigma']))) splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() splist[0].legend(loc = [1,0]) splist[1].legend(loc = [1,0]) splist[2].legend(loc = [1,0]) splist[3].legend(loc = [1,0]) plt.xlabel('$\\theta/\pi$') # plt.ylabel('Field (pT)') plt.suptitle('0 Hz data raw (pT)') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_noise_raw_data_theta_wrap.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ## Standard deviation over one cycle without averaging ## # %% idx_2pi = np.argmin(np.abs(Exp2_data_cut['theta'][0] - 360)) idx_0pi = np.argmin(np.abs(Exp2_data_cut['theta'][0] - 0)) # %% fig, splist = plt.subplots(nrows=4,ncols=1,sharex=True) splist[0].plot(Exp2_data_cut['theta'][0][idx_0pi:idx_2pi]/180,Exp2_data_cut['AW']['Y'][0]['B'][idx_0pi:idx_2pi] ,color = "C0",label = '$\sigma$ = {:.2f} pT'.format(np.std(Exp2_data_cut['AW']['Y'][0]['B'][idx_0pi:idx_2pi]))) splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_data_cut['theta'][0][idx_0pi:idx_2pi]/180,Exp2_data_cut['AW']['Z'][0]['B'][idx_0pi:idx_2pi] ,color = "C1",label = '$\sigma$ = {:.2f} pT'.format(np.std(Exp2_data_cut['AW']['Z'][0]['B'][idx_0pi:idx_2pi]))) splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_data_cut['theta'][0][idx_0pi:idx_2pi]/180,Exp2_data_cut['AV']['Y'][0]['B'][idx_0pi:idx_2pi] ,color = "C2",label = '$\sigma$ = {:.2f} pT'.format(np.std(Exp2_data_cut['AV']['Y'][0]['B'][idx_0pi:idx_2pi]))) splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_data_cut['theta'][0][idx_0pi:idx_2pi]/180,Exp2_data_cut['AV']['X'][0]['B'][idx_0pi:idx_2pi] ,color = "C3",label = '$\sigma$ = {:.2f} pT'.format(np.std(Exp2_data_cut['AV']['X'][0]['B'][idx_0pi:idx_2pi]))) splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() splist[0].legend(loc = [1,0]) splist[1].legend(loc = [1,0]) splist[2].legend(loc = [1,0]) splist[3].legend(loc = [1,0]) plt.xlabel('$\\theta/\pi$') # plt.ylabel('Field (pT)') plt.suptitle('0 Hz data raw one cycle (pT)') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_noise_raw_data_theta_cut_noavg.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ## Save to file # %% if SaveData: with open(SaveDataDir_Exp2+'Exp2_cut_data_with_error.pk','wb') as file_obj: pickle.dump(Exp2_data_cut,file_obj,protocol=pickle.HIGHEST_PROTOCOL) # %% [markdown] # # Average # %% Exp2_data_cut_avg = {} Exp2_data_cut_avg['AW'] = {} Exp2_data_cut_avg['AV'] = {} # %% # Now let's try to average # Since we have timestamps and we know the frequency, we can call a new segment every time we hit 1/freq # nu = 5 # last_start_time = Exp1_data_cut['time'][nu][0] Exp2_data_cut_avg['AW']['Z avg']={} Exp2_data_cut_avg['AW']['Y avg']={} Exp2_data_cut_avg['AV']['X avg']={} Exp2_data_cut_avg['AV']['Y avg']={} Exp2_data_cut_avg['theta avg']={} for nu in Exp2_Freq: if nu==0: n_one_period = int(f_sample/freq_for_noise_analysis) else: n_one_period = int(f_sample/nu) print("averaging at {} Hz".format(nu)) print("Points expected in single cycle = {}".format(n_one_period)) print("Total number of points = {}".format(len(Exp2_data_cut['time'][nu]))) print("Points required for 4 cycles = {}".format(4*n_one_period)) AW_Z_avg = 0 AW_Y_avg = 0 AV_X_avg = 0 AV_Y_avg = 0 i_total = 1 i_segment = 0 i_start = 0 i_end = 0 while i_total<len(Exp2_data_cut['time'][nu]): if i_total%n_one_period==0: # print(Exp1_Time_cut[nu][i_total]) i_end = i_total-1 if i_segment ==0: # time = Exp1_data_cut['time'][nu][i_start:i_end] theta = Exp2_data_cut['theta'][nu][i_start:i_end] theta = theta# - theta[0] AW_Z_avg += Exp2_data_cut['AW']['Z'][nu]['B'][i_start:i_end] AW_Y_avg += Exp2_data_cut['AW']['Y'][nu]['B'][i_start:i_end] AV_X_avg += Exp2_data_cut['AV']['X'][nu]['B'][i_start:i_end] AV_Y_avg += Exp2_data_cut['AV']['Y'][nu]['B'][i_start:i_end] i_start = i_total i_segment+=1 i_total+=1 theta_wrap = theta%360 sort_idx = theta_wrap.argsort() Exp2_data_cut_avg['theta avg'][nu] = theta_wrap[sort_idx] Exp2_data_cut_avg['AW']['Z avg'][nu] = {} Exp2_data_cut_avg['AW']['Y avg'][nu] = {} Exp2_data_cut_avg['AV']['X avg'][nu] = {} Exp2_data_cut_avg['AV']['Y avg'][nu] = {} Exp2_data_cut_avg['AW']['Z avg'][nu]['B'] = AW_Z_avg[sort_idx]/i_segment Exp2_data_cut_avg['AW']['Y avg'][nu]['B'] = AW_Y_avg[sort_idx]/i_segment Exp2_data_cut_avg['AV']['X avg'][nu]['B'] = AV_X_avg[sort_idx]/i_segment Exp2_data_cut_avg['AV']['Y avg'][nu]['B'] = AV_Y_avg[sort_idx]/i_segment print("Number of averages at {} Hz is {}".format(nu,i_segment)) # %% fig, [sp1,sp2,sp3,sp4] = plt.subplots(nrows=4,ncols=1,sharex=True,figsize=(7,6)) col = [] for freq in Exp2_Freq: h = sp1.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AW']['Z avg'][freq]['B'],visible=False) dark_col = h[0].get_color() col.append(dark_col) light_col = lighten_color(dark_col) sp1.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AW']['Y wrap'][freq]['B'],color = light_col,alpha=1) sp2.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AW']['Z wrap'][freq]['B'],color = light_col,alpha =1) sp3.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AV']['Y wrap'][freq]['B'],color = light_col,alpha=1) sp4.plot(Exp2_data_cut['theta wrap'][freq]/180,Exp2_data_cut['AV']['X wrap'][freq]['B'],color = light_col,markersize=1,alpha =1) i_freq = 0 for freq in Exp2_Freq: dark_col = col[i_freq] sp1.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AW']['Y avg'][freq]['B'],label = '{} Hz'.format(freq) ,color = dark_col) sp2.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AW']['Z avg'][freq]['B'], color = dark_col) sp3.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AV']['Y avg'][freq]['B'] ,color = dark_col) sp4.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AV']['X avg'][freq]['B'], color = dark_col) i_freq += 1 sp1.grid() sp2.grid() sp3.grid() sp4.grid() # sp2.legend() fig.legend(loc='center right') sp1.set_ylabel('AW Y') sp2.set_ylabel('AW Z') sp3.set_ylabel('AV Y') sp4.set_ylabel('AV X') sp4.set_xlabel('$\\theta/\pi$') plt.suptitle('Data average and wrapped') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_avg.png',bbox_inches='tight',dpi = dpiN) # %% fig, [sp1,sp2,sp3,sp4] = plt.subplots(nrows=4,ncols=1,sharex=True,figsize=(7,6)) col = [] plot_freq = [.1,.5,1,3,5,0] for freq in plot_freq: h = sp1.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AW']['Z avg'][freq]['B'],visible=False) dark_col = h[0].get_color() col.append(dark_col) light_col = lighten_color(dark_col) sp1.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AW']['Y'][freq]['B'],color = light_col) sp2.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AW']['Z'][freq]['B'],color = light_col) sp3.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AV']['Y'][freq]['B'],color = light_col) sp4.plot(Exp2_data_cut['theta'][freq]/180,Exp2_data_cut['AV']['X'][freq]['B'],color = light_col) i_freq = 0 for freq in plot_freq: dark_col = col[i_freq] sp1.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AW']['Y avg'][freq]['B'],label = '{} Hz'.format(freq) ,color = dark_col) sp2.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AW']['Z avg'][freq]['B'], color = dark_col) sp3.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AV']['Y avg'][freq]['B'] ,color = dark_col) sp4.plot(Exp2_data_cut_avg['theta avg'][freq]/180,Exp2_data_cut_avg['AV']['X avg'][freq]['B'], color = dark_col) i_freq += 1 sp1.grid() sp2.grid() sp3.grid() sp4.grid() # sp2.legend() fig.legend(loc='center right') sp1.set_ylabel('AW Y') sp2.set_ylabel('AW Z') sp3.set_ylabel('AV Y') sp4.set_ylabel('AV X') sp4.set_xlabel('$\\theta/\pi$') plt.suptitle('Data average and original') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_avg_compare_to_full_set.png',bbox_inches='tight',dpi = dpiN) plt.xlim(0,4) plt.savefig(SavePlotDir_Exp2+'Exp2_cut_data_avg_compare_to_1_set.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ## Standard deviation for data after averaging ## # %% Exp2_data_cut_avg['AW']['Y avg'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut_avg['AW']['Y avg'][0]['B']) Exp2_data_cut_avg['AW']['Z avg'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut_avg['AW']['Z avg'][0]['B']) Exp2_data_cut_avg['AV']['Y avg'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut_avg['AV']['Y avg'][0]['B']) Exp2_data_cut_avg['AV']['X avg'][freq_for_noise_analysis]['sigma'] = np.std(Exp2_data_cut_avg['AV']['X avg'][0]['B']) # %% fig, splist = plt.subplots(nrows=4,ncols=1,sharex=True) splist[0].plot(Exp2_data_cut_avg['theta avg'][0]/180,Exp2_data_cut_avg['AW']['Y avg'][0]['B'],color = "C0" ,label = '$\sigma$ = {:.2f} pT'.format(Exp2_data_cut_avg['AW']['Y avg'][freq_for_noise_analysis]['sigma'])) splist[0].set_ylabel('AW Y') splist[1].plot(Exp2_data_cut_avg['theta avg'][0]/180,Exp2_data_cut_avg['AW']['Z avg'][0]['B'],color = "C1" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut_avg['AW']['Z avg'][freq_for_noise_analysis]['sigma']))) splist[1].set_ylabel('AW Z') splist[2].plot(Exp2_data_cut_avg['theta avg'][0]/180,Exp2_data_cut_avg['AV']['Y avg'][0]['B'],color = "C2" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut_avg['AV']['Y avg'][freq_for_noise_analysis]['sigma']))) splist[2].set_ylabel('AV Y') splist[3].plot(Exp2_data_cut_avg['theta avg'][0]/180,Exp2_data_cut_avg['AV']['X avg'][0]['B'],color = "C3" ,label = '$\sigma$ = {:.2f} pT'.format((Exp2_data_cut_avg['AV']['X avg'][freq_for_noise_analysis]['sigma']))) splist[3].set_ylabel('AV X') splist[0].grid() splist[1].grid() splist[2].grid() splist[3].grid() splist[0].legend(loc = [1,0]) splist[1].legend(loc = [1,0]) splist[2].legend(loc = [1,0]) splist[3].legend(loc = [1,0]) plt.xlabel('$\\theta/\pi$') # plt.ylabel('Field (pT)') plt.suptitle('0 Hz data after averaging (pT)') if SaveDataFigs: plt.savefig(SavePlotDir_Exp2+'Exp2_noise_raw_data_theta_avg.png',bbox_inches='tight',dpi = dpiN) # %% [markdown] # ## Save to file # %% if SaveData: with open(SaveDataDir_Exp2+'Exp2_cut_averaged_data.pk','wb') as file_obj: pickle.dump(Exp2_data_cut_avg,file_obj,protocol=pickle.HIGHEST_PROTOCOL) # %%
34.370208
132
0.647355
5,357
31,380
3.558895
0.068695
0.094833
0.12578
0.042591
0.817204
0.793339
0.744611
0.710674
0.678836
0.659218
0
0.053185
0.132983
31,380
912
133
34.407895
0.647554
0.105641
0
0.548544
0
0
0.147408
0.030488
0.001618
0
0
0
0
1
0.001618
false
0
0.016181
0
0.019417
0.011327
0
0
0
null
0
0
0
1
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
5
3c39d2aca3680da13fb313cdb5e64d18b872230a
67
py
Python
ShadowIntegrators.py
Christian-Offen/symplectic-shadow-integration
b8d9c2712b9e7d3a10dc8e06d5e26a70842ebc53
[ "MIT" ]
1
2022-03-16T14:43:21.000Z
2022-03-16T14:43:21.000Z
ShadowIntegrators.py
Christian-Offen/symplectic-shadow-integration
b8d9c2712b9e7d3a10dc8e06d5e26a70842ebc53
[ "MIT" ]
null
null
null
ShadowIntegrators.py
Christian-Offen/symplectic-shadow-integration
b8d9c2712b9e7d3a10dc8e06d5e26a70842ebc53
[ "MIT" ]
null
null
null
from ShadowSymplecticEuler import * from ShadowMidpoint import *
13.4
35
0.820896
6
67
9.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.149254
67
4
36
16.75
0.964912
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
1
0
0
5
3c92bac97dd6cd98e0934ccf649d0f0403ff73e4
697
py
Python
parsy-backend-v2/flaskApp/conf.py
dstambler17/Parsy.io
14c4905809f79f191efbbbdfbd0e8d9e838478e7
[ "MIT" ]
null
null
null
parsy-backend-v2/flaskApp/conf.py
dstambler17/Parsy.io
14c4905809f79f191efbbbdfbd0e8d9e838478e7
[ "MIT" ]
null
null
null
parsy-backend-v2/flaskApp/conf.py
dstambler17/Parsy.io
14c4905809f79f191efbbbdfbd0e8d9e838478e7
[ "MIT" ]
null
null
null
import os class OfflineConfiguration: SQLALCHEMY_DATABASE_URI = f"mysql://{os.environ.get('parsyLocalUser')}:{os.environ.get('parsyLocalPassword')}@localhost/myAssist" SQLALCHEMY_TRACK_MODIFICATIONS = False '''class OnlineConfiguration: SQLALCHEMY_DATABASE_URI = f"mysql://{os.environ.get('parsyProdUser')}:{os.environ.get('parsyProdPassword')}@{os.environ.get('parsyProdServer')}/parsy" SQLALCHEMY_TRACK_MODIFICATIONS = False''' class OnlineConfiguration: SQLALCHEMY_DATABASE_URI = f"mysql://{os.environ.get('parsyDevUser')}:{os.environ.get('parsyDevPassword')}@{os.environ.get('parsyDevServer')}/{os.environ.get('parsyDevDb')}" SQLALCHEMY_TRACK_MODIFICATIONS = False
46.466667
176
0.763271
74
697
7.027027
0.364865
0.155769
0.207692
0.126923
0.444231
0.444231
0.444231
0.444231
0.369231
0.369231
0
0
0.077475
697
14
177
49.785714
0.808709
0
0
0.285714
0
0.285714
0.520343
0.520343
0
0
0
0
0
1
0
false
0.285714
0.142857
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
3c970a519bc6fa636d014654a2a742248e077e9f
244
py
Python
backend/garpix_notify/urls.py
Beerhead/garpix_notify
a56d17ef278a2e96342e144bc918a647f4cc5d22
[ "MIT" ]
9
2021-06-27T16:08:33.000Z
2021-12-26T17:33:25.000Z
backend/garpix_notify/urls.py
Beerhead/garpix_notify
a56d17ef278a2e96342e144bc918a647f4cc5d22
[ "MIT" ]
3
2022-01-24T11:36:46.000Z
2022-02-14T09:46:34.000Z
backend/garpix_notify/urls.py
Beerhead/garpix_notify
a56d17ef278a2e96342e144bc918a647f4cc5d22
[ "MIT" ]
7
2021-06-29T15:28:38.000Z
2022-01-25T07:40:28.000Z
from django.urls import path from .views import send_webhook, viber_check_webhook urlpatterns = [ path('send_webhook', send_webhook, name='send_webhook'), path('viber_check_webhook', viber_check_webhook, name='viber_check_webhook'), ]
30.5
81
0.778689
33
244
5.393939
0.363636
0.247191
0.382022
0.269663
0
0
0
0
0
0
0
0
0.114754
244
7
82
34.857143
0.824074
0
0
0
0
0
0.254098
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
3c9a8dfa730b8c180b131d6531511b2637e34337
116
py
Python
rdm/wrappers/__init__.py
Alshak/rdm
0c969665a4a3c8e6258c3d603de8987bd9639fd1
[ "MIT" ]
null
null
null
rdm/wrappers/__init__.py
Alshak/rdm
0c969665a4a3c8e6258c3d603de8987bd9639fd1
[ "MIT" ]
null
null
null
rdm/wrappers/__init__.py
Alshak/rdm
0c969665a4a3c8e6258c3d603de8987bd9639fd1
[ "MIT" ]
1
2020-02-29T17:40:32.000Z
2020-02-29T17:40:32.000Z
from wordification import Wordification from rsd import RSD from aleph import Aleph from treeliker import TreeLiker
23.2
39
0.862069
16
116
6.25
0.375
0
0
0
0
0
0
0
0
0
0
0
0.137931
116
4
40
29
1
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
1
0
0
5
b1b3f03aabb207f5df86c48b369edd5a8c2e0a82
70
py
Python
tests/test_deprecate_sandbox/test_dep_rel/old.py
mikeboers/metatools
5aa12e08f03d87c78913b354319abdefac1fe16e
[ "BSD-3-Clause" ]
4
2015-03-20T23:37:40.000Z
2021-02-05T14:52:57.000Z
tests/test_deprecate_sandbox/test_dep_rel/old.py
mikeboers/metatools
5aa12e08f03d87c78913b354319abdefac1fe16e
[ "BSD-3-Clause" ]
null
null
null
tests/test_deprecate_sandbox/test_dep_rel/old.py
mikeboers/metatools
5aa12e08f03d87c78913b354319abdefac1fe16e
[ "BSD-3-Clause" ]
null
null
null
from metatools.deprecate import module_renamed module_renamed('.new')
23.333333
46
0.842857
9
70
6.333333
0.777778
0.45614
0
0
0
0
0
0
0
0
0
0
0.071429
70
2
47
35
0.876923
0
0
0
0
0
0.057143
0
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
5
b1bff0a7c07370ce96dfd52fbcdd481a9f23dcc6
210
py
Python
074.py
souza-joao/cursoemvideo-python3
b9f747d1083c1c779630b25b321b291d76611901
[ "MIT" ]
null
null
null
074.py
souza-joao/cursoemvideo-python3
b9f747d1083c1c779630b25b321b291d76611901
[ "MIT" ]
null
null
null
074.py
souza-joao/cursoemvideo-python3
b9f747d1083c1c779630b25b321b291d76611901
[ "MIT" ]
null
null
null
from random import randint tup = (randint(0, 9), randint(0, 9), randint(0, 9), randint(0, 9)) for n in tup: print(n, end=' ') print(f'\nO maior valor foi {max(tup)}') print(f'O menor valor foi {min(tup)}')
30
66
0.633333
40
210
3.325
0.525
0.240602
0.270677
0.360902
0.270677
0.270677
0.270677
0.270677
0.270677
0
0
0.045714
0.166667
210
6
67
35
0.714286
0
0
0
0
0
0.280952
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.5
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
b1d67f003e2e911f1eab46dc553939272ad03880
19
py
Python
syft/nn/word2vec.py
aradhyamathur/PySyft
03f73d31b869596978fb779596075ce806afef34
[ "Apache-2.0" ]
1
2017-09-22T13:11:01.000Z
2017-09-22T13:11:01.000Z
syft/nn/word2vec.py
aradhyamathur/PySyft
03f73d31b869596978fb779596075ce806afef34
[ "Apache-2.0" ]
null
null
null
syft/nn/word2vec.py
aradhyamathur/PySyft
03f73d31b869596978fb779596075ce806afef34
[ "Apache-2.0" ]
1
2020-05-27T10:20:40.000Z
2020-05-27T10:20:40.000Z
# TOOD: build this
9.5
18
0.684211
3
19
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.210526
19
1
19
19
0.866667
0.842105
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
b1e606c0d2609e747b70ac36d396bf9c9267b85b
52
py
Python
core/src/autogluon/core/scheduler/resource/__init__.py
RuohanW/autogluon
fa349db5e75a18cd3af7d9d3f1064eb34e92aca1
[ "Apache-2.0" ]
6
2020-06-16T19:17:36.000Z
2021-07-07T14:50:31.000Z
core/src/autogluon/core/scheduler/resource/__init__.py
RuohanW/autogluon
fa349db5e75a18cd3af7d9d3f1064eb34e92aca1
[ "Apache-2.0" ]
null
null
null
core/src/autogluon/core/scheduler/resource/__init__.py
RuohanW/autogluon
fa349db5e75a18cd3af7d9d3f1064eb34e92aca1
[ "Apache-2.0" ]
2
2021-02-13T04:41:33.000Z
2021-07-10T07:14:59.000Z
from .resource import * from .dist_manager import *
17.333333
27
0.769231
7
52
5.571429
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.153846
52
2
28
26
0.886364
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
1
0
0
5
b1efc7917d4fc2f36f014d7b8050f070e9c430c3
187
py
Python
src/api/domain/models/prediction_model.py
DenisioMytnysiano/lodetta
b321e14df78e6af129753fa1c1ea9ba2cb72e8db
[ "MIT" ]
null
null
null
src/api/domain/models/prediction_model.py
DenisioMytnysiano/lodetta
b321e14df78e6af129753fa1c1ea9ba2cb72e8db
[ "MIT" ]
null
null
null
src/api/domain/models/prediction_model.py
DenisioMytnysiano/lodetta
b321e14df78e6af129753fa1c1ea9ba2cb72e8db
[ "MIT" ]
null
null
null
from pydantic import BaseModel from api.domain.models.bbox_model import BboxModel class PredictionModel(BaseModel): class_name: str confidence: float prediction: BboxModel
18.7
50
0.786096
22
187
6.590909
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.165775
187
9
51
20.777778
0.929487
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
1
0
0
5
b1f8e7d417610b08411d943b2f57a1ba17842a2b
1,601
py
Python
rsopt/package_data/examples/obj_f_bunch_matching.py
radiasoft/rsopt
6d4d123dd61e30c7f562b2f5a28c3ccbbcddbde3
[ "Apache-2.0" ]
6
2020-11-03T16:51:50.000Z
2022-02-13T20:40:05.000Z
rsopt/package_data/examples/obj_f_bunch_matching.py
radiasoft/rsopt
6d4d123dd61e30c7f562b2f5a28c3ccbbcddbde3
[ "Apache-2.0" ]
97
2020-05-18T18:24:49.000Z
2022-03-23T15:42:42.000Z
rsopt/package_data/examples/obj_f_bunch_matching.py
radiasoft/rsopt
6d4d123dd61e30c7f562b2f5a28c3ccbbcddbde3
[ "Apache-2.0" ]
4
2020-08-18T23:19:55.000Z
2021-12-08T20:55:09.000Z
import subprocess import numpy as np from rsbeams.rsdata.SDDS import readSDDS def obj_f(_): analysis_command = ["sddsanalyzebeam", "run_setup.output.sdds", "output.anb"] subprocess.call(analysis_command) anb = readSDDS("output.anb") anb.read() betax, betax_target = anb.columns['betax'].squeeze(), 10. betay, betay_target = anb.columns['betay'].squeeze(), 10. alphax, alphax_target = anb.columns['alphax'].squeeze(), 1. alphay, alphay_target = anb.columns['alphay'].squeeze(), 1. obj_val = np.sqrt((betax - betax_target)**2 + (betay - betay_target)**2 + (alphax - alphax_target)**2 + (alphay - alphay_target)**2) return obj_val def obj_f_dfols(_): analysis_command = ["sddsanalyzebeam", "run_setup.output.sdds", "output.anb"] subprocess.call(analysis_command) anb = readSDDS("output.anb") anb.read() betax, betax_target = anb.columns['betax'].squeeze(), 10. betay, betay_target = anb.columns['betay'].squeeze(), 10. alphax, alphax_target = anb.columns['alphax'].squeeze(), 1. alphay, alphay_target = anb.columns['alphay'].squeeze(), 1. obj_val = (betax - betax_target)**2 + \ (betay - betay_target)**2 + \ (alphax - alphax_target)**2 + \ (alphay - alphay_target)**2 obj_vec = np.array([betax - betax_target, betay - betay_target, alphax - alphax_target, alphay - alphay_target]) return obj_val, obj_vec
32.02
81
0.592755
183
1,601
4.983607
0.20765
0.078947
0.140351
0.072368
0.778509
0.778509
0.778509
0.778509
0.778509
0.778509
0
0.01705
0.267333
1,601
49
82
32.673469
0.760443
0
0
0.457143
0
0
0.097439
0.026234
0
0
0
0
0
1
0.057143
false
0
0.085714
0
0.2
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
5937eaefc28e09a52e36699e6527ac6c7883b943
88
py
Python
wsgi.py
henryvalbuena/mothership-v2
24e7afa73bdfd7f58e1845478338628b1b2a09c8
[ "MIT" ]
null
null
null
wsgi.py
henryvalbuena/mothership-v2
24e7afa73bdfd7f58e1845478338628b1b2a09c8
[ "MIT" ]
null
null
null
wsgi.py
henryvalbuena/mothership-v2
24e7afa73bdfd7f58e1845478338628b1b2a09c8
[ "MIT" ]
null
null
null
import os from src.api import create_app app = create_app(os.environ["FLASK_CONFIG"])
14.666667
44
0.772727
15
88
4.333333
0.666667
0.276923
0
0
0
0
0
0
0
0
0
0
0.125
88
5
45
17.6
0.844156
0
0
0
0
0
0.136364
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
593d0a017e6e4015a1186ebb96881a8b77102c41
44
py
Python
utils/training_set_extraction/__init__.py
bentocg/sea-ice-deeplearning
bd3b302c4d09e34f90128a60428542c9cdb6105d
[ "MIT" ]
null
null
null
utils/training_set_extraction/__init__.py
bentocg/sea-ice-deeplearning
bd3b302c4d09e34f90128a60428542c9cdb6105d
[ "MIT" ]
null
null
null
utils/training_set_extraction/__init__.py
bentocg/sea-ice-deeplearning
bd3b302c4d09e34f90128a60428542c9cdb6105d
[ "MIT" ]
null
null
null
from .patch_navigator import PatchNavigator
22
43
0.886364
5
44
7.6
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
44
1
44
44
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5940df0a48eb93f97375398449ac4f0a1f869b69
5,569
py
Python
beancount_mercury/checking_test.py
mtlynch/beancount-mercury
e767ed9e0925e016526b894b6689a7c13d80541c
[ "MIT" ]
3
2022-02-06T10:15:48.000Z
2022-03-28T17:39:47.000Z
beancount_mercury/checking_test.py
mtlynch/beancount-mercury
e767ed9e0925e016526b894b6689a7c13d80541c
[ "MIT" ]
1
2022-02-06T01:13:16.000Z
2022-02-06T01:13:16.000Z
beancount_mercury/checking_test.py
mtlynch/beancount-mercury
e767ed9e0925e016526b894b6689a7c13d80541c
[ "MIT" ]
null
null
null
import io import textwrap import pytest # NOQA, pylint: disable=unused-import from beancount.ingest import extract from . import CheckingImporter def _unindent(indented): return textwrap.dedent(indented).lstrip() def _stringify_directives(directives): f = io.StringIO() extract.print_extracted_entries(directives, f) return f.getvalue() def test_identifies_mercury_file(tmp_path): mercury_file = tmp_path / 'transactions-dummy-to-feb052022.csv' mercury_file.write_text( _unindent(""" Date,Description,Amount,Status,Bank Description,Reference,Note 02-04-2022,Joe Vendor,-550.00,Sent,Send Money transaction initiated on Mercury,"From Dummy, LLC for bowling balls", """)) with mercury_file.open() as f: assert CheckingImporter(account='Assets:Checking:Mercury').identify(f) def test_extracts_single_transaction_without_matching_account(tmp_path): mercury_file = tmp_path / 'transactions-dummy-to-feb052022.csv' mercury_file.write_text( _unindent(""" Date,Description,Amount,Status,Bank Description,Reference,Note 02-04-2022,Joe Vendor,-550.00,Sent,Send Money transaction initiated on Mercury,"From Dummy, LLC for bowling balls", """)) with mercury_file.open() as f: directives = CheckingImporter( account='Assets:Checking:Mercury').extract(f) assert _unindent(""" 2022-02-04 * "Joe Vendor" "Send Money transaction initiated on Mercury - From Dummy, LLC for bowling balls" Assets:Checking:Mercury -550.00 USD """.rstrip()) == _stringify_directives(directives).strip() def test_extracts_single_transaction_with_matching_account(tmp_path): mercury_file = tmp_path / 'transactions-dummy-to-feb052022.csv' mercury_file.write_text( _unindent(""" Date,Description,Amount,Status,Bank Description,Reference,Note 02-04-2022,Bowlers Paradise,-550.00,Sent,Send Money transaction initiated on Mercury,"From Dummy, LLC for bowling balls", """)) with mercury_file.open() as f: directives = CheckingImporter( account='Assets:Checking:Mercury', account_patterns=[ ('^Bowlers Paradise$', 'Expenses:Equipment:Bowling-Balls:Bowlers-Paradise') ]).extract(f) assert _unindent(""" 2022-02-04 * "Bowlers Paradise" "Send Money transaction initiated on Mercury - From Dummy, LLC for bowling balls" Assets:Checking:Mercury -550.00 USD Expenses:Equipment:Bowling-Balls:Bowlers-Paradise 550.00 USD """.rstrip()) == _stringify_directives(directives).strip() def test_matches_transactions_by_priority(tmp_path): mercury_file = tmp_path / 'transactions-dummy-to-feb052022.csv' mercury_file.write_text( _unindent(""" Date,Description,Amount,Status,Bank Description,Reference,Note 02-04-2022,Bowlers Paradise,-550.00,Sent,Send Money transaction initiated on Mercury,"From Dummy, LLC for bowling balls", 02-05-2022,Paradise Golf,-150.75,Sent,PARADISE GOLF,, """)) with mercury_file.open() as f: directives = CheckingImporter( account='Assets:Checking:Mercury', account_patterns=[ ('^Bowlers Paradise$', 'Expenses:Equipment:Bowling-Balls:Bowlers-Paradise'), ('Paradise', 'Expenses:Training:Paradise-Golf') ]).extract(f) assert _unindent(""" 2022-02-04 * "Bowlers Paradise" "Send Money transaction initiated on Mercury - From Dummy, LLC for bowling balls" Assets:Checking:Mercury -550.00 USD Expenses:Equipment:Bowling-Balls:Bowlers-Paradise 550.00 USD 2022-02-05 * "Paradise Golf" "PARADISE GOLF" Assets:Checking:Mercury -150.75 USD Expenses:Training:Paradise-Golf 150.75 USD """.rstrip()) == _stringify_directives(directives).strip() def test_extracts_incoming_transaction(tmp_path): mercury_file = tmp_path / 'transactions-dummy-to-feb052022.csv' mercury_file.write_text( _unindent(""" Date,Description,Amount,Status,Bank Description,Reference,Note 01-30-2022,Charlie Customer,694.04,Sent,CHARLIE CUSTOMER,, """)) with mercury_file.open() as f: directives = CheckingImporter(account='Assets:Checking:Mercury', account_patterns=[ ('^Charlie Customer$', 'Income:Sales') ]).extract(f) assert _unindent(""" 2022-01-30 * "Charlie Customer" "CHARLIE CUSTOMER" Assets:Checking:Mercury 694.04 USD Income:Sales -694.04 USD """.rstrip()) == _stringify_directives(directives).strip() def test_ignores_failed_transaction(tmp_path): mercury_file = tmp_path / 'transactions-dummy-to-feb052022.csv' mercury_file.write_text( _unindent(""" Date,Description,Amount,Status,Bank Description,Reference,Note 01-29-2021,Expensivo's Diamond Emporium,-5876.95,Failed,Expensivo's Diamond Emporium; TRANSACTION_BLOCKED -- C10 -- User is not allowed to send over 5000.0 per 1 day(s).,, """)) with mercury_file.open() as f: directives = CheckingImporter( account='Assets:Checking:Mercury').extract(f) assert len(directives) == 0
40.948529
184
0.649129
626
5,569
5.634185
0.196486
0.059257
0.065495
0.035724
0.759853
0.726113
0.726113
0.721576
0.7074
0.688687
0
0.052732
0.244029
5,569
135
185
41.251852
0.785036
0.006285
0
0.67619
0
0.07619
0.538142
0.234816
0
0
0
0
0.057143
1
0.07619
false
0
0.104762
0.009524
0.2
0.009524
0
0
0
null
0
0
0
0
1
1
1
1
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
5
3cbd73749401718b4d4f7e0934c786a2f52e41e9
61
py
Python
src/zvit/pb/__init__.py
obilaniu/Zvit
6a311b7b8e5fd10d09f8f678c86b38d4aa686c17
[ "MIT" ]
8
2018-01-23T15:34:02.000Z
2020-11-07T02:54:04.000Z
src/zvit/pb/__init__.py
obilaniu/Zvit
6a311b7b8e5fd10d09f8f678c86b38d4aa686c17
[ "MIT" ]
null
null
null
src/zvit/pb/__init__.py
obilaniu/Zvit
6a311b7b8e5fd10d09f8f678c86b38d4aa686c17
[ "MIT" ]
2
2018-01-24T16:28:54.000Z
2018-01-31T13:26:41.000Z
# -*- coding: utf-8 -*- # # Imports # from .pebble import *
8.714286
23
0.540984
7
61
4.714286
1
0
0
0
0
0
0
0
0
0
0
0.021277
0.229508
61
6
24
10.166667
0.680851
0.47541
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
1
0
0
5
3cbed78b6545921f5598754408f98c0a396c7771
125
py
Python
crud-flask-demo/crud/utils/__init__.py
wencan/crud-flask-demo
1aa585761be2c7dfde334fe9cfb1658ebdfdc7d5
[ "BSD-3-Clause" ]
null
null
null
crud-flask-demo/crud/utils/__init__.py
wencan/crud-flask-demo
1aa585761be2c7dfde334fe9cfb1658ebdfdc7d5
[ "BSD-3-Clause" ]
null
null
null
crud-flask-demo/crud/utils/__init__.py
wencan/crud-flask-demo
1aa585761be2c7dfde334fe9cfb1658ebdfdc7d5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .session import scoped_session_maker __all__ = ("scoped_session_maker")
20.833333
41
0.72
17
125
4.823529
0.764706
0.317073
0.439024
0
0
0
0
0
0
0
0
0.018182
0.12
125
6
42
20.833333
0.727273
0.344
0
0
0
0
0.246914
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
3ce03acf3985de47041470a6d3248a7d0ebd6442
60
py
Python
sites/tests/test_rating.py
tc-mwangi/tuzwa-app
88875bfc11fb9637ff22f881257d4971cb523b06
[ "MIT" ]
null
null
null
sites/tests/test_rating.py
tc-mwangi/tuzwa-app
88875bfc11fb9637ff22f881257d4971cb523b06
[ "MIT" ]
null
null
null
sites/tests/test_rating.py
tc-mwangi/tuzwa-app
88875bfc11fb9637ff22f881257d4971cb523b06
[ "MIT" ]
null
null
null
from django.test import TestCase from ..models import Rating
30
32
0.833333
9
60
5.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.116667
60
2
33
30
0.943396
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
1
0
0
5
3ce941f098c152acdbf5c9288df8a0c5fb743cce
61
py
Python
py_tdlib/constructors/file_type_none.py
Mr-TelegramBot/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
24
2018-10-05T13:04:30.000Z
2020-05-12T08:45:34.000Z
py_tdlib/constructors/file_type_none.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
3
2019-06-26T07:20:20.000Z
2021-05-24T13:06:56.000Z
py_tdlib/constructors/file_type_none.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
5
2018-10-05T14:29:28.000Z
2020-08-11T15:04:10.000Z
from ..factory import Type class fileTypeNone(Type): pass
10.166667
26
0.754098
8
61
5.75
0.875
0
0
0
0
0
0
0
0
0
0
0
0.163934
61
5
27
12.2
0.901961
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
5
a70889b6b88082a7e1b56ff6e36cac6eab3510e8
17,443
py
Python
models/models_statements.py
PlusRoss/Hy-Transformer
c535f7e7018842ceace04a2079ec9213b0aafbc7
[ "MIT" ]
null
null
null
models/models_statements.py
PlusRoss/Hy-Transformer
c535f7e7018842ceace04a2079ec9213b0aafbc7
[ "MIT" ]
null
null
null
models/models_statements.py
PlusRoss/Hy-Transformer
c535f7e7018842ceace04a2079ec9213b0aafbc7
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import TransformerEncoder, TransformerEncoderLayer from typing import Dict from .gnn_encoder import StarEEncoder, StarEBase from utils.utils_gcn import get_param, ccorr, rotate, softmax class StarE_Transformer(StarEEncoder): model_name = 'StarE_Transformer_Statement' def __init__(self, kg_graph_repr: Dict[str, np.ndarray], config: dict, id2e: tuple = None): if id2e is not None: super(self.__class__, self).__init__(kg_graph_repr, config, id2e[1]) else: super(self.__class__, self).__init__(kg_graph_repr, config) self.model_name = 'StarE_Transformer_Statement' self.hid_drop2 = config['STAREARGS']['HID_DROP2'] self.feat_drop = config['STAREARGS']['FEAT_DROP'] self.num_transformer_layers = config['STAREARGS']['T_LAYERS'] self.num_heads = config['STAREARGS']['T_N_HEADS'] self.num_hidden = config['STAREARGS']['T_HIDDEN'] self.d_model = config['EMBEDDING_DIM'] self.positional = config['STAREARGS']['POSITIONAL'] self.p_option = config['STAREARGS']['POS_OPTION'] self.pooling = config['STAREARGS']['POOLING'] # min / avg / concat self.hidden_drop = torch.nn.Dropout(self.hid_drop) self.hidden_drop2 = torch.nn.Dropout(self.hid_drop2) self.feature_drop = torch.nn.Dropout(self.feat_drop) encoder_layers = TransformerEncoderLayer(self.d_model, self.num_heads, self.num_hidden, config['STAREARGS']['HID_DROP2']) self.encoder = TransformerEncoder(encoder_layers, config['STAREARGS']['T_LAYERS']) self.position_embeddings = nn.Embedding(config['MAX_QPAIRS'] - 1, self.d_model) self.layer_norm = torch.nn.LayerNorm(self.emb_dim) if self.pooling == "concat": self.flat_sz = self.emb_dim * (config['MAX_QPAIRS'] - 1) self.fc = torch.nn.Linear(self.flat_sz, self.emb_dim) else: self.fc = torch.nn.Linear(self.emb_dim, self.emb_dim) self.LayerNorm = nn.LayerNorm(config['EMBEDDING_DIM']) def concat(self, e1_embed, rel_embed, qual_rel_embed, qual_obj_embed): e1_embed = e1_embed.view(-1, 1, self.emb_dim) rel_embed = rel_embed.view(-1, 1, self.emb_dim) """ arrange quals in the conve format with shape [bs, num_qual_pairs, emb_dim] num_qual_pairs is 2 * (any qual tensor shape[1]) for each datum in bs the order will be rel1, emb en1, emb rel2, emb en2, emb """ quals = torch.cat((qual_rel_embed, qual_obj_embed), 2).view(-1, 2 * qual_rel_embed.shape[1], qual_rel_embed.shape[2]) stack_inp = torch.cat([e1_embed, rel_embed, quals], 1).transpose(1, 0) # [2 + num_qual_pairs, bs, emb_dim] return stack_inp def forward(self, sub, rel, quals, obj=None): ''' :param sub: bs :param rel: bs :param quals: bs*(sl-2) # bs*14 :return: ''' sub_emb, rel_emb, qual_obj_emb, qual_rel_emb, all_ent, mask = \ self.forward_base(sub, rel, self.hidden_drop, self.feature_drop, quals, True, True, obj) # bs*emb_dim , ......, bs*6*emb_dim stk_inp = self.concat(sub_emb, rel_emb, qual_rel_emb, qual_obj_emb) if self.positional: positions = torch.arange(stk_inp.shape[0], dtype=torch.long, device=self.device).repeat(stk_inp.shape[1], 1) pos_embeddings = self.position_embeddings(positions).transpose(1, 0) stk_inp = stk_inp + pos_embeddings x = self.encoder(stk_inp, src_key_padding_mask=mask) if self.pooling == 'concat': x = x.transpose(1, 0).reshape(-1, self.flat_sz) elif self.pooling == "avg": x = torch.mean(x, dim=0) elif self.pooling == "min": x, _ = torch.min(x, dim=0) x = self.fc(x) if self.config['STAREARGS']['SEP_ENT_EMBEDDING']: x = torch.mm(x, all_ent[:, :all_ent.shape[1]//2].transpose(1, 0)) else: x = torch.mm(x, all_ent.transpose(1, 0)) # # jump embed # x = torch.mm(x, self.init_embed.transpose(1, 0)) score = torch.sigmoid(x) return score class StarE_ObjectMask_Transformer(StarEEncoder): model_name = 'StarE_ObjectMask_Transformer_Statement' def __init__(self, kg_graph_repr: Dict[str, np.ndarray], config: dict, id2e: tuple = None): super(self.__class__, self).__init__(kg_graph_repr, config) self.model_name = 'StarE_Transformer_Statement' self.hid_drop2 = config['STAREARGS']['HID_DROP2'] self.feat_drop = config['STAREARGS']['FEAT_DROP'] self.num_transformer_layers = config['STAREARGS']['T_LAYERS'] self.num_heads = config['STAREARGS']['T_N_HEADS'] self.num_hidden = config['STAREARGS']['T_HIDDEN'] self.d_model = config['EMBEDDING_DIM'] self.positional = config['STAREARGS']['POSITIONAL'] self.object_mask_emb = torch.nn.Parameter(torch.randn(1, self.emb_dim,dtype=torch.float32),True) self.hidden_drop = torch.nn.Dropout(self.hid_drop) self.hidden_drop2 = torch.nn.Dropout(self.hid_drop2) self.feature_drop = torch.nn.Dropout(self.feat_drop) encoder_layers = TransformerEncoderLayer(self.d_model, self.num_heads, self.num_hidden, config['STAREARGS']['HID_DROP2']) self.encoder = TransformerEncoder(encoder_layers, config['STAREARGS']['T_LAYERS']) self.position_embeddings = nn.Embedding(config['MAX_QPAIRS'], self.d_model) self.layer_norm = torch.nn.LayerNorm(self.emb_dim) self.flat_sz = self.emb_dim * (config['MAX_QPAIRS'] - 1) self.fc = torch.nn.Linear(self.emb_dim, self.emb_dim) def concat(self, e1_embed, rel_embed, obj_embed, qual_rel_embed, qual_obj_embed): e1_embed = e1_embed.view(-1, 1, self.emb_dim) rel_embed = rel_embed.view(-1, 1, self.emb_dim) obj_embed = obj_embed.view(-1,1, self.emb_dim) """ arrange quals in the conve format with shape [bs, num_qual_pairs, emb_dim] num_qual_pairs is 2 * (any qual tensor shape[1]) for each datum in bs the order will be rel1, emb en1, emb rel2, emb en2, emb """ quals = torch.cat((qual_rel_embed, qual_obj_embed), 2).view(-1, 2 * qual_rel_embed.shape[1], qual_rel_embed.shape[2]) stack_inp = torch.cat([e1_embed, rel_embed, obj_embed, quals], 1).transpose(1, 0) # [2 + num_qual_pairs, bs, emb_dim] return stack_inp # 14, 128, 200 def forward(self, sub, rel, quals): ''' :param sub: bs :param rel: bs :param quals: bs*(sl-2) # bs*14 :return: ''' sub_emb, rel_emb, qual_obj_emb, qual_rel_emb, all_ent, mask = \ self.forward_base(sub, rel, self.hidden_drop, self.feature_drop, quals, True, True) # bs*emb_dim , ......, bs*6*emb_dim object_mask = self.object_mask_emb.repeat(sub.shape[0], 1) ins = torch.zeros((sub.shape), dtype=torch.bool, device=self.device) mask = torch.cat((mask[:, :2], ins.unsqueeze(1), mask[:, 2:]), axis=1) stk_inp = self.concat(sub_emb, rel_emb, object_mask, qual_rel_emb, qual_obj_emb) if self.positional: positions = torch.arange(stk_inp.shape[0], dtype=torch.long, device=self.device).repeat(stk_inp.shape[1], 1) pos_embeddings = self.position_embeddings(positions).transpose(1, 0) stk_inp = stk_inp + pos_embeddings x = self.encoder(stk_inp, src_key_padding_mask=mask)[2] # to get the object position x = self.fc(x) x = torch.mm(x, all_ent.transpose(1, 0)) score = torch.sigmoid(x) return score class StarE_Transformer_TripleBaseline(StarEEncoder): model_name = 'StarE_Transformer_Triple_Baseline' def __init__(self, kg_graph_repr: Dict[str, np.ndarray], config: dict, id2e: tuple = None): if id2e is not None: super(self.__class__, self).__init__(kg_graph_repr, config, id2e[1]) else: super(self.__class__, self).__init__(kg_graph_repr, config) self.model_name = 'StarE_Transformer_Statement' self.hid_drop2 = config['STAREARGS']['HID_DROP2'] self.feat_drop = config['STAREARGS']['FEAT_DROP'] self.num_transformer_layers = config['STAREARGS']['T_LAYERS'] self.num_heads = config['STAREARGS']['T_N_HEADS'] self.num_hidden = config['STAREARGS']['T_HIDDEN'] self.d_model = config['EMBEDDING_DIM'] self.positional = config['STAREARGS']['POSITIONAL'] self.pooling = config['STAREARGS']['POOLING'] # min / avg / concat self.hidden_drop = torch.nn.Dropout(self.hid_drop) self.hidden_drop2 = torch.nn.Dropout(self.hid_drop2) self.feature_drop = torch.nn.Dropout(self.feat_drop) encoder_layers = TransformerEncoderLayer(self.d_model, self.num_heads, self.num_hidden, config['STAREARGS']['HID_DROP2']) self.encoder = TransformerEncoder(encoder_layers, config['STAREARGS']['T_LAYERS']) self.position_embeddings = nn.Embedding(config['MAX_QPAIRS'] - 1, self.d_model) self.layer_norm = torch.nn.LayerNorm(self.emb_dim) if self.pooling == "concat": self.flat_sz = self.emb_dim * (config['MAX_QPAIRS'] - 1) self.fc = torch.nn.Linear(self.flat_sz, self.emb_dim) else: self.fc = torch.nn.Linear(self.emb_dim, self.emb_dim) def concat(self, e1_embed, rel_embed): e1_embed = e1_embed.view(-1, 1, self.emb_dim) rel_embed = rel_embed.view(-1, 1, self.emb_dim) stack_inp = torch.cat([e1_embed, rel_embed], 1).transpose(1, 0) # [2, bs, emb_dim] return stack_inp def forward(self, sub, rel, quals): ''' :param sub: bs :param rel: bs :param quals: bs*(sl-2) # bs*14 :return: ''' sub_emb, rel_emb, qual_obj_emb, qual_rel_emb, all_ent, mask = \ self.forward_base(sub, rel, self.hidden_drop, self.feature_drop, quals, True, True) # bs*emb_dim , ......, bs*6*emb_dim stk_inp = self.concat(sub_emb, rel_emb) mask = mask[:, :2] if self.positional: positions = torch.arange(stk_inp.shape[0], dtype=torch.long, device=self.device).repeat(stk_inp.shape[1], 1) pos_embeddings = self.position_embeddings(positions).transpose(1, 0) stk_inp = stk_inp + pos_embeddings x = self.encoder(stk_inp, src_key_padding_mask=mask) if self.pooling == 'concat': x = x.transpose(1, 0).reshape(-1, self.flat_sz) elif self.pooling == "avg": x = torch.mean(x, dim=0) elif self.pooling == "min": x, _ = torch.min(x, dim=0) x = self.fc(x) x = torch.mm(x, all_ent.transpose(1, 0)) score = torch.sigmoid(x) return score class Transformer_Statements_mask(StarEBase): """Baseline for Transformer decoder only model w/o starE encoder with well chosen setting """ def __init__(self, config: dict): super().__init__(config) #self.emb_dim = config['EMBEDDING_DIM'] self.entities = get_param((self.num_ent+1, self.emb_dim), norm=False) # final ind for [MASK] self.relations = get_param((2 * self.num_rel, self.emb_dim), norm=False) self.model_name = 'Transformer_Statements_mask' self.hid_drop2 = config['STAREARGS']['HID_DROP2'] self.feat_drop = config['STAREARGS']['FEAT_DROP'] self.num_transformer_layers = config['STAREARGS']['T_LAYERS'] self.num_heads = config['STAREARGS']['T_N_HEADS'] self.num_hidden = config['STAREARGS']['T_HIDDEN'] self.d_model = config['EMBEDDING_DIM'] self.positional = config['STAREARGS']['POSITIONAL'] self.pooling = config['STAREARGS']['POOLING'] # min / avg / concat self.device = config['DEVICE'] self.hidden_drop = torch.nn.Dropout(self.hid_drop) self.hidden_drop2 = torch.nn.Dropout(self.hid_drop2) self.feature_drop = torch.nn.Dropout(self.feat_drop) encoder_layers = TransformerEncoderLayer(self.d_model, self.num_heads, self.num_hidden, config['STAREARGS']['HID_DROP2']) self.encoder = TransformerEncoder(encoder_layers, config['STAREARGS']['T_LAYERS']) self.position_embeddings = nn.Embedding(config['MAX_QPAIRS'], self.d_model) self.layer_norm = torch.nn.LayerNorm(self.emb_dim) if self.pooling == "concat": self.flat_sz = self.emb_dim * (config['MAX_QPAIRS'] - 1) self.fc = torch.nn.Linear(self.flat_sz, self.emb_dim) else: self.fc = torch.nn.Linear(self.emb_dim, self.emb_dim) # added self.act = torch.tanh if 'ACT' not in config['STAREARGS'].keys() \ else config['STAREARGS']['ACT'] self.bn = torch.nn.BatchNorm1d(config['EMBEDDING_DIM']) self.LayerNorm = nn.LayerNorm(config['EMBEDDING_DIM']) self.LayerNorm1 = nn.LayerNorm(config['EMBEDDING_DIM']) self.LayerNorm_combine = nn.LayerNorm(config['EMBEDDING_DIM']) def concat(self, e1_embed, rel_embed, obj_embed, qual_rel_embed, qual_obj_embed): e1_embed = e1_embed.view(-1, 1, self.emb_dim) rel_embed = rel_embed.view(-1, 1, self.emb_dim) obj_embed = obj_embed.view(-1,1, self.emb_dim) quals = torch.cat((qual_rel_embed, qual_obj_embed), 2).view(-1, 2 * qual_rel_embed.shape[1], qual_rel_embed.shape[2]) stack_inp = torch.cat([e1_embed, rel_embed, obj_embed, quals], 1).transpose(1, 0) # [2 + num_qual_pairs, bs, emb_dim] return stack_inp def forward(self, sub, rel, quals, obj=None): self.score_list = [0., 0.] entitiy_embeddings = self.entities entitiy_embeddings = self.LayerNorm(entitiy_embeddings) entitiy_embeddings = self.feature_drop(entitiy_embeddings) relation_embeddings = self.relations relation_embeddings = self.LayerNorm1(relation_embeddings) sub_emb = torch.index_select(entitiy_embeddings, 0, sub) rel_emb = torch.index_select(relation_embeddings, 0, rel) if obj is None: obj = torch.tensor([self.num_ent]).long().to(sub.device).repeat(sub.shape) mask_ind = torch.tensor([2]).long().to(sub.device).repeat(sub.shape) else: statements = torch.cat([sub.reshape(-1,1),rel.reshape(-1,1),obj.reshape(-1,1),quals], dim=1) mask_ind = (statements==self.num_ent).nonzero()[:,1] # if multiple entities are masked: # ind_aux = torch.arange(statements.shape[1], 0, -1).to(statements.device) # ind_aux = (statements==self.num_ent) * ind_aux # mask_ind = torch.argmax(ind_aux, dim=1) obj_emd = torch.index_select(entitiy_embeddings, 0, obj) # print(statements==self.num_ent) quals_ents = quals[:, 1::2].reshape(1, -1).squeeze(0) quals_rels = quals[:, 0::2].reshape(1, -1).squeeze(0) qual_obj_emb = torch.index_select(entitiy_embeddings, 0, quals_ents) qual_rel_emb = torch.index_select(relation_embeddings, 0, quals_rels) qual_obj_emb = qual_obj_emb.view(sub_emb.shape[0], -1, sub_emb.shape[1]) qual_rel_emb = qual_rel_emb.view(rel_emb.shape[0], -1, rel_emb.shape[1]) # so we first initialize with False mask = torch.zeros((sub.shape[0], quals.shape[1] + 3)).bool().to(self.device) # and put True where qual entities and relations are actually padding index 0 mask[:, 3:] = quals == 0 stk_inp = self.concat(sub_emb, rel_emb, obj_emd, qual_rel_emb, qual_obj_emb) if self.positional: # positions = torch.arange(stk_inp.shape[0], dtype=torch.long, device=self.device).repeat(stk_inp.shape[1], 1) qual_ind = 5 positions_main = torch.arange(qual_ind, dtype=torch.long, device=self.device) positions_qual = torch.arange(qual_ind-2, qual_ind, dtype=torch.long, device=self.device).repeat((stk_inp.shape[0]-qual_ind)//2) positions = torch.cat([positions_main, positions_qual]).repeat(stk_inp.shape[1], 1) pos_embeddings = self.position_embeddings(positions).transpose(1, 0) stk_inp = stk_inp + pos_embeddings # stk_inp = self.LayerNorm_combine(stk_inp) # stk_inp = self.hidden_drop2(stk_inp) x = self.encoder(stk_inp, src_key_padding_mask=mask) x = x[mask_ind, torch.arange(x.shape[1]).to(x.device)] x = self.fc(x) x = torch.mm(x, entitiy_embeddings[:-1].transpose(1, 0)) # final ind for mask embedding # x = torch.mm(x, self.entities[:-1].transpose(1, 0)) # final ind for mask embedding # x = torch.mm(x, self.feature_drop(self.LayerNorm(entitiy_embeddings))[:-1].transpose(1, 0)) # final ind for mask embedding score = torch.sigmoid(x) return score
43.716792
140
0.629364
2,400
17,443
4.3275
0.088333
0.025997
0.031774
0.020797
0.789236
0.767668
0.753129
0.74042
0.71269
0.710187
0
0.018955
0.240842
17,443
398
141
43.826633
0.765368
0.085994
0
0.699187
0
0
0.075182
0.013633
0
0
0
0
0
1
0.04878
false
0
0.03252
0
0.142276
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
5954a0a07281076e79418e86bc8a5f24f275d42d
93
py
Python
kheppy/evocom/commons/__init__.py
Ewande/kheppy
5c5f6bacbf9020053879947798983547de4c1c79
[ "MIT" ]
null
null
null
kheppy/evocom/commons/__init__.py
Ewande/kheppy
5c5f6bacbf9020053879947798983547de4c1c79
[ "MIT" ]
null
null
null
kheppy/evocom/commons/__init__.py
Ewande/kheppy
5c5f6bacbf9020053879947798983547de4c1c79
[ "MIT" ]
null
null
null
from .base import BaseAlgorithm from .individual import Controller from .nn import NeuralNet
23.25
34
0.83871
12
93
6.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.129032
93
3
35
31
0.962963
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
1
0
0
5
596514e8f769452d111da556a04984a9ea84d312
184
py
Python
guestbook/views/test_view.py
dagothar/django-guestbook
ed3e9608f3b973187bd7987557b3b04375cb1549
[ "MIT" ]
null
null
null
guestbook/views/test_view.py
dagothar/django-guestbook
ed3e9608f3b973187bd7987557b3b04375cb1549
[ "MIT" ]
null
null
null
guestbook/views/test_view.py
dagothar/django-guestbook
ed3e9608f3b973187bd7987557b3b04375cb1549
[ "MIT" ]
null
null
null
from django.views.generic import View from django.shortcuts import render class TestView(View): def get(self, request): return render(request, 'guestbook/test.html', {})
23
57
0.722826
24
184
5.541667
0.75
0.150376
0
0
0
0
0
0
0
0
0
0
0.168478
184
7
58
26.285714
0.869281
0
0
0
0
0
0.103261
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
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
1
1
0
0
5
597374276eb119c83c92ef89b60ed2cd72c7914d
142
py
Python
application/dashboards/callbacks/review.py
cnpls/flask-embed-template
6f540e1b11874a02d76ae0776a6b204cba94c593
[ "Apache-2.0" ]
null
null
null
application/dashboards/callbacks/review.py
cnpls/flask-embed-template
6f540e1b11874a02d76ae0776a6b204cba94c593
[ "Apache-2.0" ]
null
null
null
application/dashboards/callbacks/review.py
cnpls/flask-embed-template
6f540e1b11874a02d76ae0776a6b204cba94c593
[ "Apache-2.0" ]
null
null
null
from dash.dependencies import Input, Output, State import pandas as pd import numpy as np def Initialize_Review_Callbacks(dash_app): pass
23.666667
50
0.809859
22
142
5.090909
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.147887
142
6
51
23.666667
0.92562
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.6
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
1
1
0
1
0
0
5
59b8ff3a04e47ed4e9219cafd55529e2732083b5
187
py
Python
accounts/admin.py
acounsel/zwazo
beeb3591674a8290a89704e3da56aa4d425418e8
[ "MIT" ]
null
null
null
accounts/admin.py
acounsel/zwazo
beeb3591674a8290a89704e3da56aa4d425418e8
[ "MIT" ]
10
2019-11-25T16:54:39.000Z
2022-02-10T08:29:51.000Z
accounts/admin.py
acounsel/zwazo
beeb3591674a8290a89704e3da56aa4d425418e8
[ "MIT" ]
null
null
null
from django.contrib import admin from accounts.models import Plan, Organization, Userprofile admin.site.register(Plan) admin.site.register(Organization) admin.site.register(Userprofile)
26.714286
59
0.839572
24
187
6.541667
0.5
0.171975
0.324841
0
0
0
0
0
0
0
0
0
0.074866
187
7
60
26.714286
0.907514
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
59dcdf5c14c0ddecee10b4150888c38c01fea829
14,387
py
Python
bempp/api/operators/boundary/helmholtz.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
null
null
null
bempp/api/operators/boundary/helmholtz.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
null
null
null
bempp/api/operators/boundary/helmholtz.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
null
null
null
"""Interfaces to Helmholtz operators.""" import numpy as _np from bempp.api.operators.boundary import common as _common from bempp.api.assembly.boundary_operator import BoundaryOperator as _BoundaryOperator def single_layer( domain, range_, dual_to_range, wavenumber, parameters=None, assembler="default_nonlocal", device_interface=None, precision=None, ): """Assemble the Helmholtz single-layer boundary operator.""" from .modified_helmholtz import single_layer as _modified_single_layer if _np.real(wavenumber) == 0: return _modified_single_layer( domain, range_, dual_to_range, _np.imag(wavenumber), parameters, assembler, device_interface, precision, ) return _common.create_operator( "helmholtz_single_layer_boundary", domain, range_, dual_to_range, parameters, assembler, [_np.real(wavenumber), _np.imag(wavenumber)], "helmholtz_single_layer", "default_scalar", device_interface, precision, True, ) def double_layer( domain, range_, dual_to_range, wavenumber, parameters=None, assembler="default_nonlocal", device_interface=None, precision=None, ): """Assemble the Helmholtz double-layer boundary operator.""" from .modified_helmholtz import double_layer as _modified_double_layer if _np.real(wavenumber) == 0: return _modified_double_layer( domain, range_, dual_to_range, _np.imag(wavenumber), parameters, assembler, device_interface, precision, ) return _common.create_operator( "helmholtz_double_layer_boundary", domain, range_, dual_to_range, parameters, assembler, [_np.real(wavenumber), _np.imag(wavenumber)], "helmholtz_double_layer", "default_scalar", device_interface, precision, True, ) def adjoint_double_layer( domain, range_, dual_to_range, wavenumber, parameters=None, assembler="default_nonlocal", device_interface=None, precision=None, ): """Assemble the Helmholtz adj. double-layer boundary operator.""" from .modified_helmholtz import ( adjoint_double_layer as _modified_adjoint_double_layer, ) if _np.real(wavenumber) == 0: return _modified_adjoint_double_layer( domain, range_, dual_to_range, _np.imag(wavenumber), parameters, assembler, device_interface, precision, ) return _common.create_operator( "helmholtz_adjoint_double_layer_boundary", domain, range_, dual_to_range, parameters, assembler, [_np.real(wavenumber), _np.imag(wavenumber)], "helmholtz_adjoint_double_layer", "default_scalar", device_interface, precision, True, ) def hypersingular( domain, range_, dual_to_range, wavenumber, parameters=None, assembler="default_nonlocal", device_interface=None, precision=None, ): """Assemble the Helmholtz hypersingular boundary operator.""" from .modified_helmholtz import hypersingular as _hypersingular if domain.shapeset.identifier != "p1_discontinuous": raise ValueError("Domain shapeset must be of type 'p1_discontinuous'.") if dual_to_range.shapeset.identifier != "p1_discontinuous": raise ValueError("Dual to range shapeset must be of type 'p1_discontinuous'.") if _np.real(wavenumber) == 0: return _hypersingular( domain, range_, dual_to_range, _np.imag(wavenumber), parameters, assembler, device_interface, precision, ) return _common.create_operator( "helmholtz_hypersingular_boundary", domain, range_, dual_to_range, parameters, assembler, [_np.real(wavenumber), _np.imag(wavenumber)], "helmholtz_single_layer", "helmholtz_hypersingular", device_interface, precision, True, ) def multitrace_operator( grid, wavenumber, target=None, space_type="p1", parameters=None, assembler="default_nonlocal", device_interface=None, precision=None, ): """ Simplified version of multitrace operator assembly. Parameters ---------- grid : Grid Bempp grid object. wavenumber : complex A real or complex wavenumber target : Grid The grid for the range spaces. If target is None then target is set to the input grid (that is the domain grid). space_type : string Currently only "p1" is supported, which means that the operator is discretised with all P1 basis functions. parameters : Parameters An optional parameters object. assembler : string The assembler type. device_interface : DeviceInterface The device interface object to be used. precision : string Either "single" or "double" for single or double precision mode. Output ------ The Helmholtz multitrace operator of the form [[-dlp, slp], [hyp, adj_dlp]], where dlp : double layer boundary operator slp : single layer boundary operator hyp : hypersingular boundary operator adj_dlp : adjoint double layer boundary operator. """ import bempp.api from bempp.api.assembly.blocked_operator import BlockedOperator space = bempp.api.function_space(grid, "P", 1) if target is not None: target_space = bempp.api.function_space(target, "P", 1) else: target_space = space slp = single_layer( space, target_space, target_space, wavenumber, parameters=parameters, assembler=assembler, device_interface=device_interface, precision=precision, ) dlp = double_layer( space, target_space, target_space, wavenumber, parameters=parameters, assembler=assembler, device_interface=device_interface, precision=precision, ) hyp = hypersingular( space, target_space, target_space, wavenumber, parameters=parameters, assembler=assembler, device_interface=device_interface, precision=precision, ) adj_dlp = adjoint_double_layer( space, target_space, target_space, wavenumber, parameters=parameters, assembler=assembler, device_interface=device_interface, precision=precision, ) blocked = BlockedOperator(2, 2) blocked[0, 0] = -dlp blocked[0, 1] = slp blocked[1, 0] = hyp blocked[1, 1] = adj_dlp return blocked def osrc_dtn( space, wavenumber, npade=2, theta=_np.pi / 3.0, damped_wavenumber=None, parameters=None, device_interface=None, precision=None, ): """Assemble the OSRC approximation to the DtN operator.""" if space.shapeset.identifier != "p1_discontinuous": raise ValueError("Space shapeset must be of type 'p1_discontinuous'.") return _OsrcDtN( space, parameters, [wavenumber, npade, theta, damped_wavenumber], device_interface, precision, ) class _OsrcDtN(_BoundaryOperator): """Implementation of the OSRC DtN operator.""" def __init__( self, space, parameters, operator_options, device_interface=None, precision=None ): from bempp.api.operators import OperatorDescriptor super().__init__(space, space, space, parameters) self._device_interface = device_interface self._operator_descriptor = OperatorDescriptor( "osrc_dtn", operator_options, "laplace_beltrami", "default_sparse", precision, True, None, 1, ) @property def descriptor(self): """Operator descriptor.""" return self._operator_descriptor def _assemble(self): """Assemble the operator.""" from bempp.api.operators.boundary.sparse import identity from bempp.api.operators.boundary.sparse import laplace_beltrami from bempp.api.assembly.discrete_boundary_operator import ( InverseSparseDiscreteBoundaryOperator, ) space = self._domain wavenumber, npade, theta, damped_wavenumber = self.descriptor.options mass = identity( space, space, space, self._parameters, self._device_interface, self.descriptor.precision, ).weak_form() stiff = laplace_beltrami( space, space, space, self._parameters, self._device_interface, self.descriptor.precision, ).weak_form() if damped_wavenumber is None: bbox = space.grid.bounding_box rad = _np.linalg.norm(bbox[:, 1] - bbox[:, 0]) / 2.0 dk = wavenumber + 0.4j * wavenumber ** (1.0 / 3.0) * rad ** (-2.0 / 3.0) else: dk = damped_wavenumber c0, alpha, beta = _pade_coeffs(npade, theta) series = c0 * mass for i in range(npade): element = ( alpha[i] / (dk ** 2) * stiff * InverseSparseDiscreteBoundaryOperator( mass - beta[i] / (dk ** 2) * stiff ) ) series -= element * mass operator = 1.0j * wavenumber * series return operator def osrc_ntd( space, wavenumber, npade=2, theta=_np.pi / 3.0, damped_wavenumber=None, parameters=None, device_interface=None, precision=None, ): """Assemble the OSRC approximation to the NtD operator.""" if space.shapeset.identifier != "p1_discontinuous": raise ValueError("Space shapeset must be of type 'p1_discontinuous'.") return _OsrcNtD( space, parameters, [wavenumber, npade, theta, damped_wavenumber], device_interface, precision, ) class _OsrcNtD(_BoundaryOperator): """Implementation of the OSRC NtD operator.""" def __init__( self, space, parameters, operator_options, device_interface=None, precision=None ): from bempp.api.operators import OperatorDescriptor super().__init__(space, space, space, parameters) self._device_interface = device_interface self._operator_descriptor = OperatorDescriptor( "osrc_ntd", operator_options, "laplace_beltrami", "default_sparse", precision, True, None, 1, ) @property def descriptor(self): """Operator descriptor.""" return self._operator_descriptor def _assemble(self): from bempp.api.operators.boundary.sparse import identity from bempp.api.operators.boundary.sparse import laplace_beltrami from bempp.api.assembly.discrete_boundary_operator import ( InverseSparseDiscreteBoundaryOperator, ) space = self._domain wavenumber, npade, theta, damped_wavenumber = self.descriptor.options mass = identity( space, space, space, self._parameters, self._device_interface, self.descriptor.precision, ).weak_form() stiff = laplace_beltrami( space, space, space, self._parameters, self._device_interface, self.descriptor.precision, ).weak_form() if damped_wavenumber is None: bbox = space.grid.bounding_box rad = _np.linalg.norm(bbox[:, 1] - bbox[:, 0]) / 2.0 dk = wavenumber + 0.4j * wavenumber ** (1.0 / 3.0) * rad ** (-2.0 / 3.0) else: dk = damped_wavenumber c0, alpha, beta = _pade_coeffs(npade, theta) series = c0 * mass for i in range(npade): element = ( alpha[i] / (dk ** 2) * stiff * InverseSparseDiscreteBoundaryOperator( mass - beta[i] / (dk ** 2) * stiff ) ) series -= element * mass operator = ( 1.0 / (1.0j * wavenumber) * ( mass * InverseSparseDiscreteBoundaryOperator(mass - 1.0 / (dk ** 2) * stiff) * series ) ) return operator def _pade_coeffs(n, theta): """Compute the coefficients of the Pade series expansion.""" aj = _np.zeros(n) bj = _np.zeros(n) for jj in range(1, n + 1): aj[jj - 1] = 2.0 / (2.0 * n + 1.0) * _np.sin(jj * _np.pi / (2.0 * n + 1.0)) ** 2 bj[jj - 1] = _np.cos(jj * _np.pi / (2.0 * n + 1.0)) ** 2 c0t = _np.exp(1.0j * theta / 2.0) * ( 1.0 + _np.sum( (aj * (_np.exp(-1j * theta) - 1.0)) / (1.0 + bj * (_np.exp(-1.0j * theta) - 1.0)) ) ) ajt = ( _np.exp(-1.0j * theta / 2.0) * aj / ((1.0 + bj * (_np.exp(-1.0j * theta) - 1.0)) ** 2) ) bjt = _np.exp(-1.0j * theta) * bj / (1.0 + bj * (_np.exp(-1.0j * theta) - 1.0)) return c0t, ajt, bjt
27.248106
89
0.558004
1,387
14,387
5.570296
0.120404
0.071835
0.019933
0.026404
0.775045
0.743334
0.719001
0.707352
0.671369
0.642635
0
0.014669
0.355599
14,387
527
90
27.29981
0.818682
0.107319
0
0.741463
0
0
0.060033
0.020809
0
0
0
0
0
1
0.034146
false
0
0.041463
0
0.119512
0
0
0
0
null
0
0
0
0
1
1
1
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
5
abba8252e2e03f0e7b2717493d6b63c946d04104
89
py
Python
06/00/copy.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
null
null
null
06/00/copy.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
39
2017-07-31T22:54:01.000Z
2017-08-31T00:19:03.000Z
06/00/copy.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
null
null
null
d = {'k1':'v1', 'k2':'v2'}; print(d) e = d.copy(); print(e) d['k1'] = 'v111' print(d, e)
17.8
36
0.460674
18
89
2.277778
0.5
0.146341
0.341463
0
0
0
0
0
0
0
0
0.106667
0.157303
89
4
37
22.25
0.44
0
0
0
0
0
0.157303
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
1
0
0
null
0
1
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
1
0
5
2803c393d2ff42532fe3d0e98f5509dcae7fcf79
172
py
Python
Models/__init__.py
pythonhubpy/ProDCube-Backend
7a8313027149be7e443f9be999ca4f6bd8c737ee
[ "BSD-3-Clause" ]
null
null
null
Models/__init__.py
pythonhubpy/ProDCube-Backend
7a8313027149be7e443f9be999ca4f6bd8c737ee
[ "BSD-3-Clause" ]
6
2022-02-21T15:36:18.000Z
2022-03-05T18:17:00.000Z
Models/__init__.py
pythonhubpy/ProDCube-Backend
7a8313027149be7e443f9be999ca4f6bd8c737ee
[ "BSD-3-Clause" ]
null
null
null
from .BlogModel import BlogModel from .ContactUsModel import ContactUsModel from .InternalUserModel import InternalUserModel from .SubscribersModel import SubscribersModel
34.4
48
0.883721
16
172
9.5
0.375
0
0
0
0
0
0
0
0
0
0
0
0.093023
172
4
49
43
0.974359
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
1
0
0
5
e6060255c4758284cfc01858b45c5dc21fc80bbe
1,829
py
Python
elib_config/__init__.py
etcher-be/elib_config
ec7e06cbf53de608b4071a91de108d15a09c8cc4
[ "MIT" ]
null
null
null
elib_config/__init__.py
etcher-be/elib_config
ec7e06cbf53de608b4071a91de108d15a09c8cc4
[ "MIT" ]
47
2018-10-15T12:18:50.000Z
2019-11-12T12:17:06.000Z
elib_config/__init__.py
etcher-be/elib_config
ec7e06cbf53de608b4071a91de108d15a09c8cc4
[ "MIT" ]
null
null
null
# coding=utf-8 """ This package manages configuration for other packages. It is intended for my personal use only """ from pkg_resources import DistributionNotFound, get_distribution # noinspection PyProtectedMember from elib_config._file._exc import ( ConfigFileNotFoundError, EmptyValueError, IncompleteSetupError, ) # noinspection PyProtectedMember from elib_config._types import Types # noinspection PyProtectedMember from elib_config._value._exc import ( ConfigMissingValueError, ConfigValueError, ConfigValueTypeError, DuplicateConfigValueError, MissingTableKeyError, MissingValueError, NotAFileError, NotAFolderError, OutOfBoundError, PathMustExistError, TableKeyTypeError, ) # noinspection PyProtectedMember from ._file._config_example import write_example_config # noinspection PyProtectedMember from ._logging import LOGGER from ._setup import ELIBConfig from ._validate import validate_config # noinspection PyProtectedMember from ._value._config_value import SENTINEL # noinspection PyProtectedMember from ._value._config_value_bool import ConfigValueBool # noinspection PyProtectedMember from ._value._config_value_float import ConfigValueFloat # noinspection PyProtectedMember from ._value._config_value_integer import ConfigValueInteger # noinspection PyProtectedMember from ._value._config_value_list import ConfigValueList # noinspection PyProtectedMember from ._value._config_value_path import ConfigValuePath # noinspection PyProtectedMember from ._value._config_value_string import ConfigValueString # noinspection PyProtectedMember from ._value._config_value_table import ConfigValueTableArray, ConfigValueTableKey try: __version__ = get_distribution('elib_config').version except DistributionNotFound: # pragma: no cover # package is not installed __version__ = 'not installed'
37.326531
117
0.851832
179
1,829
8.368715
0.430168
0.251669
0.286382
0.202937
0.347797
0.261682
0
0
0
0
0
0.000609
0.102788
1,829
48
118
38.104167
0.912249
0.302898
0
0
0
0
0.019169
0
0
0
0
0
0
1
0
false
0
0.64
0
0.64
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
e65911bc6c6f3da287a2a712585294ac0a63760a
96
py
Python
app/web/__init__.py
JordanDekker/ContainR
e88587dd1ff69a7fc3c1477298e1f37607a4afcb
[ "MIT" ]
null
null
null
app/web/__init__.py
JordanDekker/ContainR
e88587dd1ff69a7fc3c1477298e1f37607a4afcb
[ "MIT" ]
null
null
null
app/web/__init__.py
JordanDekker/ContainR
e88587dd1ff69a7fc3c1477298e1f37607a4afcb
[ "MIT" ]
null
null
null
from flask import Blueprint bp = Blueprint('web', __name__) from app.web import routes, forms
16
33
0.760417
14
96
4.928571
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.15625
96
5
34
19.2
0.851852
0
0
0
0
0
0.03125
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
5
e66358352e9e259bafc626bbb3b6b531fcfe3ce1
2,686
py
Python
src/use_facenet_compare_pics.py
zhangbo2008/facenet
4dfabcb5cf14f99622dbe5f9f12f0539821c169c
[ "MIT" ]
null
null
null
src/use_facenet_compare_pics.py
zhangbo2008/facenet
4dfabcb5cf14f99622dbe5f9f12f0539821c169c
[ "MIT" ]
7
2019-12-16T22:10:01.000Z
2022-02-10T00:27:35.000Z
src/use_facenet_compare_pics.py
zhangbo2008/facenet
4dfabcb5cf14f99622dbe5f9f12f0539821c169c
[ "MIT" ]
null
null
null
''' 这个文件调用compare.py 来实现,输入图片,调用别人配置号的参数来计算几个图片之间的距离.如果距离越小说明越接近. ''' import compare ''' #下面3行是该路径的写法 base_img_path=os.path.abspath(os.path.join(os.getcwd(), "..")) base_img_path=os.path.abspath(os.path.join(base_img_path, "..")) base_img_path=os.path.abspath(os.path.join(base_img_path, "data")) def parse_arguments(argv): parser = argparse.ArgumentParser() parser.add_argument('model', type=str, help='Could be either a directory containing the meta_file and ckpt_file or a model protobuf (.pb) file') parser.add_argument('image_files', type=str, nargs='+', help='Images to compare') parser.add_argument('--image_size', type=int, help='Image size (height, width) in pixels.', default=160) parser.add_argument('--margin', type=int, help='Margin for the crop around the bounding box (height, width) in pixels.', default=44) parser.add_argument('--gpu_memory_fraction', type=float, help='Upper bound on the amount of GPU memory that will be used by the process.', default=1.0) return parser.parse_args(argv) ''' import argparse import os import sys a=os.path.abspath(os.path.join(os.getcwd(), '..','data','images','Anthony_Hopkins_0001.jpg')) b=os.path.abspath(os.path.join(os.getcwd(), '..','data','images','Anthony_Hopkins_0002.jpg')) c=os.path.abspath(os.path.join(os.getcwd(), '..','data','images','Anthony_Hopkins_0002.jpg')) print(a) def parse_arguments(argv): parser = argparse.ArgumentParser() #the given name for arguments must be fronted by --or- parser.add_argument('-model', type=str, help='Could be either a directory containing the meta_file and ckpt_file or a model protobuf (.pb) file') parser.add_argument('-image_files', type=str, nargs='+', help='Images to compare') parser.add_argument('-image_size', type=int, help='Image size (height, width) in pixels.', default=160) parser.add_argument('-margin', type=int, help='Margin for the crop around the bounding box (height, width) in pixels.', default=44) parser.add_argument('-gpu_memory_fraction', type=float, help='Upper bound on the amount of GPU memory that will be used by the process.', default=1.0) return parser.parse_args(argv) print(a) print(b) #把use_facenet_compare_pics.py作为一个函数封装起来.要运行就main()即可. def main(): return compare.main( ( parse_arguments(#arguments below ['-model','models','-image_files',a,b,'-image_size','160'] ) ) ) #a=main() #print() #print(a) #print(type(a)) #print(type(main())) print(main()) #返回得到的是所有的距离矩阵.
36.794521
113
0.667163
377
2,686
4.625995
0.278515
0.041284
0.097477
0.051606
0.784977
0.784977
0.784977
0.728784
0.724197
0.704702
0
0.013643
0.181311
2,686
72
114
37.305556
0.779445
0.095309
0
0.064516
0
0
0.350494
0.050776
0
0
0
0
0
1
0.064516
false
0
0.129032
0.032258
0.258065
0.129032
0
0
0
null
0
0
0
0
1
1
1
1
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
5
e6655e4ddbd0dbdd7c1a7beabea2027c23f43db0
4,411
py
Python
undine/server/driver/base_driver.py
Sungup/Undine
8b130b86bab8ae2a1662191d3352ea11987429da
[ "MIT" ]
1
2018-01-01T07:50:04.000Z
2018-01-01T07:50:04.000Z
undine/server/driver/base_driver.py
Sungup/Undine
8b130b86bab8ae2a1662191d3352ea11987429da
[ "MIT" ]
null
null
null
undine/server/driver/base_driver.py
Sungup/Undine
8b130b86bab8ae2a1662191d3352ea11987429da
[ "MIT" ]
null
null
null
from undine.database.rabbitmq import RabbitMQConnector from undine.utils.exception import UndineException, VirtualMethodException from undine.utils.system import print_console_header from undine.utils.system import System from undine.utils import logging import json class BaseDriver: _DRIVER_LOGGER_NAME = 'undine-driver' _DRIVER_LOGGER_PATH = '/tmp/{}.log'.format(_DRIVER_LOGGER_NAME) _DRIVER_LOGGER_LEVEL = 'ERROR' _DEFAULT_CONFIG_EXT = '.json' _ERROR_LOG_START = print_console_header('Error Message Start', '=') _ERROR_LOG_END = print_console_header('Error Message End', '=') def __init__(self, config, config_dir): self._config_dir = config_dir self._config_ext = config.setdefault('config_ext', self._DEFAULT_CONFIG_EXT) # Create logger instance log_path = config.setdefault('log_file', self._DRIVER_LOGGER_PATH) log_level = config.setdefault('log_level', self._DRIVER_LOGGER_LEVEL) self._logger = logging.get_logger(self._DRIVER_LOGGER_NAME, log_path, log_level) def _error_logging(self, title, body): self._logger.error('{0}\n{2}\n{1}\n{3}\n'.format(title, body, self._ERROR_LOG_START, self._ERROR_LOG_END)) def fetch(self): raise VirtualMethodException(self.__class__, 'fetch') def config(self, _cid): raise VirtualMethodException(self.__class__, 'config') def worker(self, _wid): raise VirtualMethodException(self.__class__, 'worker') def inputs(self, _iid): raise VirtualMethodException(self.__class__, 'input') def preempt(self, _tid): raise VirtualMethodException(self.__class__, 'preempt') def done(self, _tid, _contents, _report): raise VirtualMethodException(self.__class__, 'done') def cancel(self, _tid): raise VirtualMethodException(self.__class__, 'cancel') def fail(self, _tid, _message): raise VirtualMethodException(self.__class__, 'fail') def is_ready(self): raise VirtualMethodException(self.__class__, '_wait_others') class BaseNetworkDriver(BaseDriver): # # Constructor & Destructor # def __init__(self, task_queue, config, config_dir): BaseDriver.__init__(self, config, config_dir) if task_queue is None: raise UndineException('Missing RabbitMQ option field (task_queue)') self._queue = RabbitMQConnector(task_queue) self._host = System.host_info() self._logged_in() def __del__(self): self._logged_out() # # Private method # def __params(self, tid, **kwargs): return dict(tid=tid, host=self._host.name, ip=self._host.ipv4, **kwargs) @property def host(self): return self._host @property def _ip(self): return self._host.ipv4 @property def _hostname(self): return self._host.name # # Protected inherited interface # def _task(self, _tid): raise VirtualMethodException(self.__class__, '_task') def _preempt(self, _tid, _host, _ip): raise VirtualMethodException(self.__class__, '_preempt') def _done(self, _tid, _host, _ip, _content, _report): raise VirtualMethodException(self.__class__, '_done') def _cancel(self, _tid, _host, _ip): raise VirtualMethodException(self.__class__, '_cancel') def _fail(self, _tid, _host, _ip, _message): raise VirtualMethodException(self.__class__, '_fail') def _logged_in(self): raise VirtualMethodException(self.__class__, '_logged_in') def _logged_out(self): raise VirtualMethodException(self.__class__, '_logged_out') # # Public interface # def fetch(self): return self._task(json.loads(self._queue.consume())['tid']) def preempt(self, tid): return self._preempt(**self.__params(tid)) def done(self, tid, content, report): return self._done(**self.__params(tid, content=content, report=report)) def cancel(self, tid): return self._cancel(**self.__params(tid)) def fail(self, tid, message): return self._fail(**self.__params(tid, message=message)) def is_ready(self): return True
30.42069
80
0.652913
488
4,411
5.436475
0.209016
0.162835
0.186958
0.217113
0.328685
0.230305
0.176781
0.139088
0.131926
0.04674
0
0.001796
0.242802
4,411
144
81
30.631944
0.792515
0.024711
0
0.077778
0
0
0.062966
0
0
0
0
0
0
1
0.333333
false
0
0.066667
0.111111
0.6
0.033333
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
05589757ba5b2520e3edc7b7213af70f2409c0c3
952
py
Python
test/test_edit_contact.py
l0myy/python_testing
9c51afb007b67fbaa3ed7fc3b326c01d3747f8eb
[ "Apache-2.0" ]
null
null
null
test/test_edit_contact.py
l0myy/python_testing
9c51afb007b67fbaa3ed7fc3b326c01d3747f8eb
[ "Apache-2.0" ]
null
null
null
test/test_edit_contact.py
l0myy/python_testing
9c51afb007b67fbaa3ed7fc3b326c01d3747f8eb
[ "Apache-2.0" ]
null
null
null
from model.contacts import Contact import random def test_edit_contact_firstname(app, db): if app.contact.count() == 0: app.contact.create(Contact(firstname="test")) old_contacts = db.get_contact_list() contact = random.choice(old_contacts) new_contact = Contact(firstname="my firstname") app.contact.edit_contact_by_id(contact.id, new_contact) new_contacts = db.get_contact_list() assert len(old_contacts) == len(new_contacts) def test_edit_contact_full(app, db): if app.contact.count() == 0: app.contact.create(Contact(firstname="test")) old_contacts = db.get_contact_list() contact = random.choice(old_contacts) new_contact = Contact(firstname="new firstname", middlename="new middlename", lastname="new lastname", nickname="l0my") app.contact.edit_contact_by_id(contact.id, new_contact) new_contacts = db.get_contact_list() assert len(old_contacts) == len(new_contacts)
35.259259
123
0.731092
131
952
5.053435
0.236641
0.090634
0.07855
0.120846
0.746224
0.746224
0.746224
0.746224
0.746224
0.746224
0
0.003708
0.15021
952
26
124
36.615385
0.814586
0
0
0.7
0
0
0.066316
0
0
0
0
0
0.1
1
0.1
false
0
0.1
0
0.2
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
05877919ca7ea9b7ea52a116b7d7ef9716ce7aa6
209
py
Python
TableStorageInput/__init__.py
dongheeHwang/functions-docs-python
9a645bceaefb9a96f722ac7778d6c4ca750ef28a
[ "MIT" ]
3
2021-08-12T07:58:38.000Z
2022-02-12T21:28:06.000Z
TableStorageInput/__init__.py
dongheeHwang/functions-docs-python
9a645bceaefb9a96f722ac7778d6c4ca750ef28a
[ "MIT" ]
null
null
null
TableStorageInput/__init__.py
dongheeHwang/functions-docs-python
9a645bceaefb9a96f722ac7778d6c4ca750ef28a
[ "MIT" ]
9
2020-02-18T18:07:50.000Z
2022-02-10T10:51:01.000Z
import json import azure.functions as func def main(req: func.HttpRequest, messageJSON) -> func.HttpResponse: message = json.loads(messageJSON) return func.HttpResponse(f"Table row: {messageJSON}")
23.222222
66
0.751196
26
209
6.038462
0.692308
0.203822
0
0
0
0
0
0
0
0
0
0
0.143541
209
8
67
26.125
0.877095
0
0
0
0
0
0.114833
0
0
0
0
0
0
1
0.2
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
1
0
0
5
5536655aeb148df186032610d0f6f408f62f9e01
30
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/__init__.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/__init__.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/__init__.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
null
null
null
__version__ = '1.0.0-20210309'
30
30
0.733333
5
30
3.6
0.8
0
0
0
0
0
0
0
0
0
0
0.392857
0.066667
30
1
30
30
0.25
0
0
0
0
0
0.451613
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
5573fbea42edb5f64f294533867dc645211277b0
61
py
Python
server/storage.py
WGreenlee04/cautious-sniffle
cc999b3bfcf762cfdeae984211648c2644383284
[ "MIT" ]
null
null
null
server/storage.py
WGreenlee04/cautious-sniffle
cc999b3bfcf762cfdeae984211648c2644383284
[ "MIT" ]
null
null
null
server/storage.py
WGreenlee04/cautious-sniffle
cc999b3bfcf762cfdeae984211648c2644383284
[ "MIT" ]
null
null
null
class Player(object): pass class Game(object): pass
10.166667
21
0.655738
8
61
5
0.625
0.5
0
0
0
0
0
0
0
0
0
0
0.245902
61
6
22
10.166667
0.869565
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
558fc0324e46c4d82f332a09588267aec22ec980
64
py
Python
src/data/__init__.py
jggomez/Python-Reference-Microservice
13723c5f5a205bf1f874c44dddbd4cab64839da7
[ "MIT" ]
14
2020-07-09T22:31:09.000Z
2022-01-21T23:03:29.000Z
src/data/__init__.py
jggomez/Python-Reference-Microservice
13723c5f5a205bf1f874c44dddbd4cab64839da7
[ "MIT" ]
1
2021-02-03T23:51:35.000Z
2021-02-03T23:51:35.000Z
src/data/__init__.py
jggomez/Python-Reference-Microservice
13723c5f5a205bf1f874c44dddbd4cab64839da7
[ "MIT" ]
6
2020-07-10T04:07:11.000Z
2020-10-04T00:04:30.000Z
from .get_type_games_repository import GetAllTypeGamesRepository
64
64
0.9375
7
64
8.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.046875
64
1
64
64
0.934426
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
1
0
0
5
55b09fc15752f7f3eee70610ba15bc60e1d86dde
104
py
Python
tplink_smarthome/__init__.py
rrauenza/python-tplink-smarthome
ddc33dcd25ebb57bf944ead015a5c7c6c0818b21
[ "MIT" ]
7
2019-05-24T01:04:56.000Z
2021-09-11T15:07:49.000Z
tplink_smarthome/__init__.py
rrauenza/python-tplink-smarthome
ddc33dcd25ebb57bf944ead015a5c7c6c0818b21
[ "MIT" ]
3
2019-07-10T00:55:02.000Z
2020-04-29T19:14:43.000Z
tplink_smarthome/__init__.py
rrauenza/python-tplink-smarthome
ddc33dcd25ebb57bf944ead015a5c7c6c0818b21
[ "MIT" ]
2
2019-04-26T15:52:41.000Z
2020-04-29T16:59:39.000Z
# pylint: disable=unused-import from .plug import TPLinkSmartPlug from .device import TPLinkSmartDevice
26
37
0.836538
12
104
7.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.105769
104
3
38
34.666667
0.935484
0.278846
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
1
0
0
5
e9a1ecf4fac9f1b2cf39e584c353e5c7cb9a9f73
88
py
Python
fountains/__init__.py
reity/fountains
c9decefb7c19d2bedd0f2d577400d9840ddcc85a
[ "MIT" ]
null
null
null
fountains/__init__.py
reity/fountains
c9decefb7c19d2bedd0f2d577400d9840ddcc85a
[ "MIT" ]
null
null
null
fountains/__init__.py
reity/fountains
c9decefb7c19d2bedd0f2d577400d9840ddcc85a
[ "MIT" ]
null
null
null
"""Gives users direct access to the class.""" from fountains.fountains import fountains
29.333333
45
0.784091
12
88
5.75
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.125
88
2
46
44
0.896104
0.443182
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
1
0
0
5
75671bf9a027c394a47c8751f70b2b1d12c197cd
3,043
py
Python
format.py
henrieger/wikipedia-bot
20d7e87a148e893c4688956708dedaffa1725583
[ "MIT" ]
null
null
null
format.py
henrieger/wikipedia-bot
20d7e87a148e893c4688956708dedaffa1725583
[ "MIT" ]
null
null
null
format.py
henrieger/wikipedia-bot
20d7e87a148e893c4688956708dedaffa1725583
[ "MIT" ]
null
null
null
import re # Format first paragraph to suitable HTML def to_html(title: str, content: str): # Remove unusable tags new_content = re.sub(r'\<\/?p\>', '', content) new_content = re.sub(r'\<\/?dfn.*?\>', '', new_content) new_content = re.sub(r'\<\/?img.*?\>', '', new_content) new_content = re.sub(r'\<\/?span.*?\>', '', new_content) new_content = re.sub(r'\<\/?small.*?\>', '', new_content) new_content = re.sub(r'\<\/?abbr.*?\>', '', new_content) new_content = new_content.replace('<br/>', '') # Remove <sub></sub> and <sup></sup>tags new_content = re.sub(r'\<sup.*?\>.*?\<\/sup\>', '', new_content) new_content = re.sub(r'\<sub.*?\>.*?\<\/sub\>', '', new_content) return f"<b>{title}</b>\n\n{new_content}" # Format first paragraph to plain text def to_text(title: str, content: str): new_content = re.sub(r'\<sup .*?\>.*?\<\/sup\>', '', content) new_content = re.sub(r'\<sub .*?\>.*?\<\/sub\>', '', content) new_content = re.sub(r'\<\/?.*?\>', '', new_content) return f"{title}\n\n{new_content}" # Format first pargraph to Markdown (no links) def to_simple_md(title: str, content: str): title = '**' + title + '**' # Remove <p></p>, <dfn></dfn>, <a></a> and <span></span> tags new_content = re.sub(r'\<\/?p\>', '', content) new_content = re.sub(r'\<\/?dfn.*?\>', '', new_content) new_content = re.sub(r'\<\/?small.*?\>', '', new_content) new_content = re.sub(r'\<\/?span.*?\>', '', new_content) new_content = re.sub(r'\<a .*?\>', '', new_content) new_content = new_content.replace('</a>', '') # Remove <sub></sub> and <sup></sup>tags new_content = re.sub(r'\<sup.*?\>.*?\<\/sup\>', '', new_content) new_content = re.sub(r'\<sub.*?\>.*?\<\/sub\>', '', new_content) # Escape '.' chars new_content = new_content.replace('.', '\\.') # Change bold and italic to Markdown format new_content = re.sub(r'\<\/?i.*?\>', '*', new_content) new_content = re.sub(r'\<\/?b.*?\>', '**', new_content) return f"{title}\n\n{new_content}" # Format first paragraph to Markdown def to_markdown(title: str, content: str): title = '**' + title + '**' # Remove <p></p>, <dfn></dfn> and <span></span> tags new_content = re.sub(r'\<\/?p\>', '', content) new_content = re.sub(r'\<\/?dfn.*?\>', '', new_content) new_content = re.sub(r'\<\/?span.*?\>', '', new_content) # Escape '.' chars new_content = new_content.replace('.', '\\.') # Change bold and italic to Markdown format new_content = re.sub(r'\<\/?i.*?\>', '*', new_content) new_content = re.sub(r'\<\/?b.*?\>', '**', new_content) # Change links to Markdown format for a in re.findall(r'\<a .*?\>.*?\<\/a\>', new_content): link = re.findall(r'href\=\".+?\"', a)[0].split('"')[1] new_link = re.sub(r'\<a .*?\>', '[', a) new_link = new_link.replace('</a>', ']') new_link = f"{new_link}({link})" new_content = new_content.replace(a, new_link) return f"{title}\n\n{new_content}"
40.573333
68
0.546829
417
3,043
3.820144
0.131894
0.376648
0.097928
0.235405
0.781544
0.781544
0.748901
0.673572
0.627119
0.627119
0
0.0008
0.178114
3,043
75
69
40.573333
0.636146
0.16957
0
0.565217
0
0
0.222443
0.076005
0
0
0
0
0
1
0.086957
false
0
0.021739
0
0.195652
0
0
0
0
null
1
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
756f3fa5bc5785cc44e96058dff406b747cf00dd
223
py
Python
libraries/python/template/{{cookiecutter.package_name}}/tests/test_sample.py
tvlfyi/ghuntley
8bf49dd414b93185a5eeb9981c52051b2d7b33db
[ "BlueOak-1.0.0", "Apache-2.0" ]
48
2018-10-07T05:01:50.000Z
2022-03-08T07:58:51.000Z
libraries/python/template/{{cookiecutter.package_name}}/tests/test_sample.py
BenjaminAbt/ghuntley
d614f88a2c900101aa2d6097328f3f8bc8e5fc44
[ "BlueOak-1.0.0", "Apache-2.0" ]
61
2018-07-15T03:15:25.000Z
2022-02-27T11:36:20.000Z
libraries/python/template/{{cookiecutter.package_name}}/tests/test_sample.py
BenjaminAbt/ghuntley
d614f88a2c900101aa2d6097328f3f8bc8e5fc44
[ "BlueOak-1.0.0", "Apache-2.0" ]
15
2017-07-07T05:14:19.000Z
2022-03-25T08:35:21.000Z
# Copyright (c) 2020 Geoffrey Huntley <ghuntley@ghuntley.com>. All rights reserved. # SPDX-License-Identifier: Proprietary # Sample Test passing with nose and pytest def test_pass(): assert True, "dummy sample test"
24.777778
83
0.753363
30
223
5.566667
0.866667
0.11976
0
0
0
0
0
0
0
0
0
0.021277
0.156951
223
8
84
27.875
0.867021
0.713004
0
0
0
0
0.283333
0
0
0
0
0
0.5
1
0.5
true
0.5
0
0
0.5
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
1
0
1
1
1
0
0
0
0
0
5
7592c39f1988649c09b526b9c03e60437ec34398
182
py
Python
canary/tasks/base/__init__.py
rackerlabs/canary
22ea0380d2c69ab587f21099320ae62fa3281349
[ "Apache-2.0" ]
5
2016-07-14T02:11:46.000Z
2017-09-15T21:50:57.000Z
canary/tasks/base/__init__.py
rackerlabs/canary
22ea0380d2c69ab587f21099320ae62fa3281349
[ "Apache-2.0" ]
5
2015-05-29T18:15:24.000Z
2016-02-16T15:31:04.000Z
canary/tasks/base/__init__.py
rackerlabs/canary
22ea0380d2c69ab587f21099320ae62fa3281349
[ "Apache-2.0" ]
10
2015-05-28T13:56:01.000Z
2020-10-25T02:17:14.000Z
from canary.tasks.base import driver from canary.tasks.base import services Driver = driver.DistributedTaskDriverBase DistributedTaskServices = services.DistributedTaskServicesBase
30.333333
62
0.873626
18
182
8.833333
0.555556
0.125786
0.188679
0.238994
0.314465
0
0
0
0
0
0
0
0.082418
182
6
62
30.333333
0.952096
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
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
5
75b902832033cfc99196cc80f6eb138872c6addf
724
py
Python
datapipelines/__init__.py
meraki-analytics/datapipelines-python
dc38d7976a012039a15d67cd8b07ae77eb1e4a4c
[ "MIT" ]
6
2018-07-27T16:16:55.000Z
2022-03-07T17:12:15.000Z
datapipelines/__init__.py
meraki-analytics/datapipelines
dc38d7976a012039a15d67cd8b07ae77eb1e4a4c
[ "MIT" ]
null
null
null
datapipelines/__init__.py
meraki-analytics/datapipelines
dc38d7976a012039a15d67cd8b07ae77eb1e4a4c
[ "MIT" ]
1
2016-10-20T11:54:20.000Z
2016-10-20T11:54:20.000Z
from .common import PipelineContext, UnsupportedError, NotFoundError, TYPE_WILDCARD from .pipelines import DataPipeline, NoConversionError from .queries import Query, QueryValidationError, QueryValidatorStructureError, validate_query from .sinks import DataSink, CompositeDataSink from .sources import DataSource, CompositeDataSource from .transformers import DataTransformer, CompositeDataTransformer __all__ = ["DataTransformer", "CompositeDataTransformer", "DataPipeline", "NoConversionError", "Query", "QueryValidationError", "QueryValidatorStructureError", "validate_query", "DataSource", "CompositeDataSource", "DataSink", "CompositeDataSink", "PipelineContext", "UnsupportedError", "NotFoundError", "TYPE_WILDCARD"]
80.444444
320
0.835635
55
724
10.854545
0.472727
0.103853
0.147404
0.160804
0.40871
0
0
0
0
0
0
0
0.073204
724
8
321
90.5
0.889717
0
0
0
0
0
0.339779
0.071823
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
0
0
0
1
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
5
f93499f51ece5849f56c8b9f5bd479fa76c7df10
6,328
py
Python
create_input.py
dyth/Carassius
1fad8c89ee7cf64815b84b7fc102309224c5c302
[ "MIT" ]
1
2020-04-03T12:40:30.000Z
2020-04-03T12:40:30.000Z
create_input.py
dyth/Carassius
1fad8c89ee7cf64815b84b7fc102309224c5c302
[ "MIT" ]
null
null
null
create_input.py
dyth/Carassius
1fad8c89ee7cf64815b84b7fc102309224c5c302
[ "MIT" ]
1
2018-11-21T21:18:48.000Z
2018-11-21T21:18:48.000Z
#!/usr/bin/env python """ determine whether bitboard, piece-list coordinate or mailbox is best bitboard (12, 8, 8): third order tensor bitboard_vector (768): flattened third order tensor small_bitboard_vector (384): with -1.0 values for black piece_list (384): normalised rank, file, 8-rank and file for pieces in list small_piece_list (192): normalised rank and file for pieces in list mailbox (8, 8): normalised type of piece in its position in an 8 * 8 board """ import chess import numpy as np def fen_to_3D_bitboard(fen): 'convert fen to a 12 by 8 * 8 bitboard' pos = chess.Board(fen) bitboard = np.zeros((12, 8, 8)) # over all squares, get piece type and number for r in range(8): for f in range(8): square = 8*r + f index = pos.piece_type_at(square) # if piece exists in square, if white, increment plane by 6 if index is not None: piece = pos.piece_at(square).symbol() offset = 0 if piece.istitle() else 6 bitboard[index + offset - 1, r, f] = 1.0 return bitboard def fen_to_bitboard_vector(fen): 'convert fen to a 12 * 8 * 8 = 768 bitboard' pos = chess.Board(fen) bitboard = np.zeros((12, 8, 8)) # over all squares, get piece type and number for r in range(8): for f in range(8): square = 8*r + f index = pos.piece_type_at(square) # if piece exists in square, if white, increment plane by 6 if index is not None: piece = pos.piece_at(square).symbol() offset = 0 if piece.istitle() else 6 bitboard[index + offset - 1, r, f] = 1.0 return bitboard.flatten() def fen_to_small_bitboard_vector(fen): 'convert fen to a 6 * 8 * 8 = 384 bitboard' pos = chess.Board(fen) bitboard = np.zeros((6, 8, 8)) # over all squares, get piece type and number for r in range(8): for f in range(8): square = 8*r + f index = pos.piece_type_at(square) # if piece exists in square, if white, increment else decrement if index is not None: piece = pos.piece_at(square).symbol() player += 1.0 if piece.istitle() else -1.0 bitboard[index-1, r, f] = player return bitboard.flatten() def fen_to_piece_list(fen): 'convert fen to 384 piece list of coordinates' pos = chess.Board(fen) pieceList = np.zeros(384) # {white, black} 8*Pawn, 10*Knight, 10*Bishop, 10*Rook, 9*Queen, 1*King pieces = ['p', 'n', 'b', 'r', 'q', 'k', 'P', 'N', 'B', 'R', 'Q', 'K'] count = [8, 10, 10, 10, 9, 1, 8, 10, 10, 10, 9, 1] # create {piece -> vectorposition} dictionary vectorPosition = [4 * sum(count[:i]) for i in range(len(count))] pieceIndex = dict(zip(pieces, vectorPosition)) # create pieceList and type for f in range(8): for r in range(8): square = pos.piece_at(8*f + r) # if piece exists in square, find first available index by adding 4 if square is not None: index = pieceIndex[square.symbol()] while pieceList[index] != 0.0: index += 4 # set pieceList index to coordinate pieceList[index] = (r+1.0) / 8.0 pieceList[index+1] = (8.0-r) / 8.0 pieceList[index+2] = (f+1.0) / 8.0 pieceList[index+3] = (8.0-f) / 8.0 return pieceList def fen_to_small_piece_list(fen): 'convert fen to 192 piece list of coordinates' pos = chess.Board(fen) pieceList = np.zeros(192) # {white, black} 8*Pawn, 10*Knight, 10*Bishop, 10*Rook, 9*Queen, 1*King pieces = ['p', 'n', 'b', 'r', 'q', 'k', 'P', 'N', 'B', 'R', 'Q', 'K'] count = [8, 10, 10, 10, 9, 1, 8, 10, 10, 10, 9, 1] # create {piece -> vectorposition} dictionary vectorPosition = [2 * sum(count[:i]) for i in range(len(count))] pieceIndex = dict(zip(pieces, vectorPosition)) # create pieceList and type for f in range(8): for r in range(8): square = pos.piece_at(8*f + r) # if piece exists in square, find first available index by adding 4 if square is not None: index = pieceIndex[square.symbol()] while pieceList[index] != 0.0: index += 2 # set pieceList index to coordinate pieceList[index] = (r+1.0) / 8.0 pieceList[index+1] = (f+1.0) / 8.0 return pieceList def fen_to_mailbox(fen): 'convert fen to 8 * 8 matrix' pos = chess.Board(fen) bitboard = np.zeros((2, 8, 8)) # over all squares, get piece type and number for r in range(8): for f in range(8): square = 8*r + f index = pos.piece_type_at(square) # if piece exists in square, if white, increment plane by 6 if index is not None: piece = pos.piece_at(square).symbol() offset = 0.0 if piece.istitle() else 6.0 encoding = (offset + index) / 12.0 bitboard[0, r, f] = encoding bitboard[1, r, f] = 1.0 - encoding return bitboard def fen_to_mailbox_flat(fen): 'convert fen to 8 * 8 matrix' pos = chess.Board(fen) bitboard = np.zeros(2 * 8 * 8) # over all squares, get piece type and number for r in range(8): for f in range(8): square = 8*r + f index = pos.piece_type_at(square) # if piece exists in square, if white, increment plane by 6 if index is not None: piece = pos.piece_at(square).symbol() offset = 0.0 if piece.istitle() else 6.0 encoding = (offset + index) / 12.0 bitboard[2*square] = encoding bitboard[2*square+1] = 1.0 - encoding return bitboard if __name__ == "__main__": print(fen_to_bitboard_vector(chess.Board().fen())) # print(fen_to_small_bitboard_vector(chess.Board().fen())) # print(fen_to_piece_list(chess.Board().fen())) # print(fen_to_small_piece_list(chess.Board().fen())) # print(fen_to_mailbox(chess.Board().fen())) # print(fen_to_mailbox_flat(chess.Board().fen()))
33.839572
79
0.567794
936
6,328
3.761752
0.132479
0.028401
0.031809
0.029821
0.84493
0.816529
0.779608
0.72025
0.66998
0.66998
0
0.052716
0.313527
6,328
186
80
34.021505
0.757827
0.311157
0
0.684685
0
0
0.063983
0
0
0
0
0
0
1
0.063063
false
0
0.018018
0
0.144144
0.009009
0
0
0
null
0
0
0
1
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
5
f969d6964aeb06ca1722be38e5e5aa130773911a
1,551
py
Python
action/lead_actions/case_one.py
obezludko/Subscription
beecd902459d47392d8113a67fa2108c85f66581
[ "MIT" ]
null
null
null
action/lead_actions/case_one.py
obezludko/Subscription
beecd902459d47392d8113a67fa2108c85f66581
[ "MIT" ]
null
null
null
action/lead_actions/case_one.py
obezludko/Subscription
beecd902459d47392d8113a67fa2108c85f66581
[ "MIT" ]
null
null
null
import requests from connection.connection_variables import link_for_lead from parameters.lead.case_1.lead_params import * def case_one_first_lead(): return requests.get(link_for_lead,case_1_first_lead_params) def case_one_second_lead(): return requests.get(link_for_lead,case_1_second_lead_params) def case_one_third_lead(): return requests.get(link_for_lead,case_1_third_lead_params) def case_one_fourth_lead(): return requests.get(link_for_lead,case_1_fourth_lead_params) def case_one_fifth_lead(): return requests.get(link_for_lead,case_1_fifth_lead_params) def case_one_sixth_lead(): return requests.get(link_for_lead,case_1_sixth_lead_params) def case_one_seventh_lead(): return requests.get(link_for_lead,case_1_seventh_lead_params) def case_one_eighth_lead(): return requests.get(link_for_lead,case_1_eighth_lead_params) def case_one_ninth_lead(): return requests.get(link_for_lead,case_1_ninth_lead_params) def case_one_tenth_lead(): return requests.get(link_for_lead,case_1_tenth_lead_params) def case_one_eleventh_lead(): return requests.get(link_for_lead,case_1_eleventh_lead_params) def case_one_twelfth_lead(): return requests.get(link_for_lead,case_1_twelfth_lead_params) def case_one_thirteenth_lead(): return requests.get(link_for_lead,case_1_thirteenth_lead_params) def case_one_fourteenth_lead(): return requests.get(link_for_lead,case_1_fourteenth_lead_params) def case_one_fifteenth_lead(): return requests.get(link_for_lead,case_1_fifteenth_lead_params)
31.653061
68
0.83559
258
1,551
4.48062
0.120155
0.096886
0.152249
0.272491
0.722318
0.480104
0.480104
0.480104
0.480104
0
0
0.01138
0.093488
1,551
49
69
31.653061
0.810811
0
0
0
0
0
0
0
0
0
0
0
0
1
0.454545
true
0
0.090909
0.454545
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
1
0
0
1
1
0
0
5
f988ddcedcea9e24f75f6b6d5d3dc3e81eb9a472
265
py
Python
calliope_app/api/exceptions.py
jmorrisnrel/engage
250ecc24c0225d48363afe4e40335a89dd9b6a44
[ "BSD-3-Clause" ]
3
2021-01-25T18:13:00.000Z
2021-04-30T12:17:42.000Z
calliope_app/api/exceptions.py
jmorrisnrel/engage
250ecc24c0225d48363afe4e40335a89dd9b6a44
[ "BSD-3-Clause" ]
8
2020-12-11T22:28:17.000Z
2022-03-05T02:08:27.000Z
calliope_app/api/exceptions.py
jmorrisnrel/engage
250ecc24c0225d48363afe4e40335a89dd9b6a44
[ "BSD-3-Clause" ]
1
2021-09-15T22:15:12.000Z
2021-09-15T22:15:12.000Z
class ModelAccessException(Exception): """Raise when user has no access to the model""" class ModelNotExistException(Exception): """Raise when model is None""" class AuthenticationFailedException(Exception): """Raise when authentication failed."""
22.083333
52
0.739623
27
265
7.259259
0.666667
0.214286
0.27551
0
0
0
0
0
0
0
0
0
0.154717
265
11
53
24.090909
0.875
0.381132
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
5
f9bc66ad49afc4d83c7b50567fece373c1732819
334
py
Python
django_sqlbuilder/signals.py
emacsway/sqlbuilder
72f32bbbfc1116550343c471dc43ef6284492a5a
[ "BSD-3-Clause" ]
33
2017-07-26T02:33:48.000Z
2022-03-18T06:38:12.000Z
django_sqlbuilder/signals.py
emacsway/sqlbuilder
72f32bbbfc1116550343c471dc43ef6284492a5a
[ "BSD-3-Clause" ]
1
2019-03-03T15:09:46.000Z
2019-03-03T15:09:46.000Z
django_sqlbuilder/signals.py
emacsway/sqlbuilder
72f32bbbfc1116550343c471dc43ef6284492a5a
[ "BSD-3-Clause" ]
3
2017-09-25T03:00:11.000Z
2020-10-21T09:59:09.000Z
from __future__ import absolute_import, unicode_literals import django.dispatch field_conversion = django.dispatch.Signal(providing_args=["result", "field", "model"]) # Deprecated field_mangling = django.dispatch.Signal(providing_args=["field", "model"]) column_mangling = django.dispatch.Signal(providing_args=["column", "model"])
47.714286
100
0.793413
39
334
6.487179
0.461538
0.221344
0.237154
0.343874
0.454545
0.324111
0
0
0
0
0
0
0.071856
334
6
101
55.666667
0.816129
0.02994
0
0
0
0
0.114907
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
f9c9c3609d8fb76685621814eca5ad400f311d78
211
py
Python
fusion/models.py
chr0nu5/core
aa80ccb3ae30dd12a5c848079d1184a830fcb83b
[ "MIT" ]
null
null
null
fusion/models.py
chr0nu5/core
aa80ccb3ae30dd12a5c848079d1184a830fcb83b
[ "MIT" ]
null
null
null
fusion/models.py
chr0nu5/core
aa80ccb3ae30dd12a5c848079d1184a830fcb83b
[ "MIT" ]
null
null
null
from django.db import models class Template(models.Model): name = models.CharField(max_length=255) json = models.TextField(blank=True, null=True) javascript = models.TextField(blank=True, null=True)
35.166667
56
0.748815
29
211
5.413793
0.655172
0.191083
0.254777
0.305732
0.407643
0.407643
0
0
0
0
0
0.016484
0.137441
211
6
56
35.166667
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
f9de0a8f721fd89ee8adf336e273b7994e938dce
374
py
Python
Server/utils/Hash/SHA.py
TiagoJoseMagalhaes/AndroidERPSinf
f26cc193723159a5501c8a2068c80dfe0b7a713c
[ "MIT" ]
null
null
null
Server/utils/Hash/SHA.py
TiagoJoseMagalhaes/AndroidERPSinf
f26cc193723159a5501c8a2068c80dfe0b7a713c
[ "MIT" ]
null
null
null
Server/utils/Hash/SHA.py
TiagoJoseMagalhaes/AndroidERPSinf
f26cc193723159a5501c8a2068c80dfe0b7a713c
[ "MIT" ]
null
null
null
import hashlib class SHAHash: __hash = None def __init__(self, msg:str): self.__hash = hashlib.sha512() self.__hash.update(msg.encode("UTF-8")) def getHash(self): return self.__hash.hexdigest() def getDigestSize(self): return self.__hash.digest_size def getBlockSize(self): return self.__hash.block_size
19.684211
47
0.639037
45
374
4.911111
0.533333
0.180995
0.190045
0.244344
0
0
0
0
0
0
0
0.014388
0.256684
374
18
48
20.777778
0.780576
0
0
0
0
0
0.013369
0
0
0
0
0
0
1
0.333333
false
0
0.083333
0.25
0.833333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5