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
f2d8acfc0ceec599c946fe22108a0dc668eb512e
46
py
Python
GeometricOpticsPy/ParaxialRayTrace.py
NicoDeshler/GeometricOpticsPy
b808a506596fa532026c0f22e734dd66ed8c2b12
[ "MIT" ]
null
null
null
GeometricOpticsPy/ParaxialRayTrace.py
NicoDeshler/GeometricOpticsPy
b808a506596fa532026c0f22e734dd66ed8c2b12
[ "MIT" ]
null
null
null
GeometricOpticsPy/ParaxialRayTrace.py
NicoDeshler/GeometricOpticsPy
b808a506596fa532026c0f22e734dd66ed8c2b12
[ "MIT" ]
null
null
null
class Ray(): # a ray object that interacts
23
33
0.673913
7
46
4.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.23913
46
2
33
23
0.885714
0.586957
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
f2d9f5a26a7672886d67250f7f4488e8f372536d
2,109
py
Python
course_flow/migrations/0070_auto_20210920_2129.py
SALTISES4/CourseFlow
a55b5966acd6babf688224ec2f57b2ff59545272
[ "Apache-2.0" ]
null
null
null
course_flow/migrations/0070_auto_20210920_2129.py
SALTISES4/CourseFlow
a55b5966acd6babf688224ec2f57b2ff59545272
[ "Apache-2.0" ]
2
2021-04-20T17:38:27.000Z
2021-12-12T21:38:27.000Z
course_flow/migrations/0070_auto_20210920_2129.py
SALTISES4/CourseFlow
a55b5966acd6babf688224ec2f57b2ff59545272
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.20 on 2021-09-20 21:29 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("course_flow", "0069_auto_20210909_2140"), ] operations = [ migrations.AddField( model_name="workflow", name="time_general_hours", field=models.PositiveIntegerField(default=0, null=True), ), migrations.AddField( model_name="workflow", name="time_specific_hours", field=models.PositiveIntegerField(default=0, null=True), ), migrations.AlterField( model_name="column", name="comments", field=models.ManyToManyField( blank=True, related_name="column", to="course_flow.Comment" ), ), migrations.AlterField( model_name="node", name="comments", field=models.ManyToManyField( blank=True, related_name="node", to="course_flow.Comment" ), ), migrations.AlterField( model_name="outcome", name="comments", field=models.ManyToManyField( blank=True, related_name="outcome", to="course_flow.Comment" ), ), migrations.AlterField( model_name="week", name="comments", field=models.ManyToManyField( blank=True, related_name="week", to="course_flow.Comment" ), ), migrations.AlterField( model_name="workflow", name="ponderation_individual", field=models.PositiveIntegerField(default=0, null=True), ), migrations.AlterField( model_name="workflow", name="ponderation_practical", field=models.PositiveIntegerField(default=0, null=True), ), migrations.AlterField( model_name="workflow", name="ponderation_theory", field=models.PositiveIntegerField(default=0, null=True), ), ]
31.477612
76
0.557136
183
2,109
6.26776
0.295082
0.070619
0.152572
0.176983
0.794246
0.794246
0.794246
0.666957
0.499564
0.238884
0
0.02626
0.331911
2,109
66
77
31.954545
0.787793
0.021811
0
0.666667
1
0
0.156235
0.032023
0
0
0
0
0
1
0
false
0
0.016667
0
0.066667
0
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f2edf54439a95947179244d7423ce5246d62a304
944
py
Python
finding_the_most_freq_kmer_and_its_RC_in_dna.py
Shalash96/PyBio
f626a033e5b9d6914fcd0f7594f7c9d5747df060
[ "MIT" ]
null
null
null
finding_the_most_freq_kmer_and_its_RC_in_dna.py
Shalash96/PyBio
f626a033e5b9d6914fcd0f7594f7c9d5747df060
[ "MIT" ]
null
null
null
finding_the_most_freq_kmer_and_its_RC_in_dna.py
Shalash96/PyBio
f626a033e5b9d6914fcd0f7594f7c9d5747df060
[ "MIT" ]
null
null
null
import finding_the_most_freq_motif_in_the_DNA import motif_and_its_RC_counter dna = "AACTCTATACCTCCTTTTTGTCGAATTTGTGTGATTTATAGAGAAAATCTTATTAACTGAAACTAAAATGGTAGGTTTGGTGGTAGGTTTTGTGTACATTTTGTAGTATCTGATTTTTAATTACATACCGTATATTGTATTAAATTGACGAACAATTGCATGGAATTGAATATATGCAAAACAAACCTACCACCAAACTCTGTATTGACCATTTTAGGACAACTTCAGGGTGGTAGGTTTCTGAAGCTCTCATCAATAGACTATTTTAGTCTTTACAAACAATATTACCGTTCAGATTCAAGATTCTACAACGCTGTTTTAATGGGCGTTGCAGAAAACTTACCACCTAAAATCCAGTATCCAAGCCGATTTCAGAGAAACCTACCACTTACCTACCACTTACCTACCACCCGGGTGGTAAGTTGCAGACATTATTAAAAACCTCATCAGAAGCTTGTTCAAAAATTTCAATACTCGAAACCTACCACCTGCGTCCCCTATTATTTACTACTACTAATAATAGCAGTATAATTGATCTGA" l = [] for i in range(4,10): ml = finding_the_most_freq_motif_in_the_DNA.frequency_map(dna, i) for u in ml: l.append(u) for x in l: print(f'For {len(x)}-mer the most frequent motif is {x}') print(motif_and_its_RC_counter.motif_and_its_rev_comp_counter(x, dna)) print('\n') # print(i)
62.933333
548
0.875
78
944
10.230769
0.435897
0.026316
0.041353
0.045113
0.12782
0.077694
0.077694
0.077694
0
0
0
0.003444
0.077331
944
15
549
62.933333
0.912744
0.008475
0
0
0
0
0.629947
0.57754
0
1
0
0
0
1
0
false
0
0.166667
0
0.166667
0.25
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
4
f2f9d59a3ee32ab632ae0e5870f566f07fbe3bd9
100
py
Python
dprev_backend/apps.py
HansAlbertLianto/dementia-prev-backend
0f5eaf97dab86f8a36eb94410bc3fdebe261e887
[ "Apache-2.0" ]
null
null
null
dprev_backend/apps.py
HansAlbertLianto/dementia-prev-backend
0f5eaf97dab86f8a36eb94410bc3fdebe261e887
[ "Apache-2.0" ]
7
2020-02-11T23:19:37.000Z
2022-03-11T23:32:27.000Z
dprev_backend/apps.py
HansAlbertLianto/dementia-prev-backend
0f5eaf97dab86f8a36eb94410bc3fdebe261e887
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class DprevBackendConfig(AppConfig): name = 'dprev_backend'
16.666667
36
0.78
11
100
7
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15
100
5
37
20
0.905882
0
0
0
0
0
0.13
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f2ffd0c7657135d62710fcc601424ecdd2fbb2ba
149
py
Python
src/config.py
manpen/nemo-eva
079680f04da049720eb6b5817c086bc9866f5154
[ "MIT" ]
1
2019-01-11T16:42:07.000Z
2019-01-11T16:42:07.000Z
src/config.py
manpen/nemo-eva
079680f04da049720eb6b5817c086bc9866f5154
[ "MIT" ]
5
2018-04-20T20:47:07.000Z
2018-05-30T15:26:16.000Z
src/config.py
manpen/nemo-eva
079680f04da049720eb6b5817c086bc9866f5154
[ "MIT" ]
1
2018-06-28T15:41:56.000Z
2018-06-28T15:41:56.000Z
import os def data_path(): return os.environ.get( "DATA_PATH", os.path.dirname(os.path.realpath(__file__)) + "/../data/" )
16.555556
65
0.577181
19
149
4.210526
0.578947
0.2
0
0
0
0
0
0
0
0
0
0
0.248322
149
8
66
18.625
0.714286
0
0
0
0
0
0.120805
0
0
0
0
0
0
1
0.166667
true
0
0.166667
0.166667
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
0
0
0
4
8413e30a2100e6f11b0e3c1183bc5832aeaa9106
81
py
Python
tetris/tiles/__init__.py
EricBastos/Tetris-RL
5aedb314ae18cd86918919ee62324599097e4af1
[ "MIT" ]
null
null
null
tetris/tiles/__init__.py
EricBastos/Tetris-RL
5aedb314ae18cd86918919ee62324599097e4af1
[ "MIT" ]
null
null
null
tetris/tiles/__init__.py
EricBastos/Tetris-RL
5aedb314ae18cd86918919ee62324599097e4af1
[ "MIT" ]
null
null
null
from .board import Board from .tetromino import Tetromino from .tile import Tile
20.25
32
0.814815
12
81
5.5
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.148148
81
3
33
27
0.956522
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
84467bc29dfed75cfd74517fcc1aa33bdb4d4dab
2,422
py
Python
src/python/sample.py
iamvee/psychrolib
0ab3ac287f0acd3f43f80a5cab5516c2318a4380
[ "MIT" ]
null
null
null
src/python/sample.py
iamvee/psychrolib
0ab3ac287f0acd3f43f80a5cab5516c2318a4380
[ "MIT" ]
null
null
null
src/python/sample.py
iamvee/psychrolib
0ab3ac287f0acd3f43f80a5cab5516c2318a4380
[ "MIT" ]
null
null
null
import psychrolib from psychrolib import main args = 40, 20, 101325 x = main.Psychrometrics(temperature_of_dry_bulb=40, temperature_of_wet_bulb=20, pressure_value=101325, system=main.SI_SYSTEM) main.SetUnitSystem(main.SI) z = main.Psychrometrics(temperature_of_dry_bulb=40, rel_humidity=x.rel_humidity, pressure_value=101325, system=main.SI_SYSTEM) y = main.Psychrometrics(temperature_of_dry_bulb=40, temperature_of_dew_point=x.temperature_of_dew_point.celsius, pressure_value=101325, system=main.SI_SYSTEM) print(f"{'humidity ratio':>40} |", x.humidity_ratio) print(f"{'humidity ratio':>40} |", z.humidity_ratio) print(f"{'humidity ratio':>40} |", y.humidity_ratio) print(f"{'t temperature_of_dry_bulb':>40} |", x.temperature_of_dry_bulb) print(f"{'t temperature_of_dry_bulb':>40} |", z.temperature_of_dry_bulb) print(f"{'t temperature_of_dry_bulb':>40} |", y.temperature_of_dry_bulb) print(f"{'t temperature_of_wet_bulb':>40} |", x.temperature_of_wet_bulb) print(f"{'t temperature_of_wet_bulb':>40} |", z.temperature_of_wet_bulb) print(f"{'t temperature_of_wet_bulb':>40} |", y.temperature_of_wet_bulb) print(f"{'t temperature_of_dew_point':>40} |", x.temperature_of_dew_point) print(f"{'t temperature_of_dew_point':>40} |", z.temperature_of_dew_point) print(f"{'t temperature_of_dew_point':>40} |", y.temperature_of_dew_point) print(f"{'rel hum':>40} |", x.rel_humidity) print(f"{'rel hum':>40} |", z.rel_humidity) print(f"{'rel hum':>40} |", y.rel_humidity) print(f"{'vap pressure':>40} |", x.vap_pressure) print(f"{'vap pressure':>40} |", z.vap_pressure) print(f"{'vap pressure':>40} |", y.vap_pressure) print(f"{'moist air enthalpy':>40} |", x.MoistAirEnthalpy) print(f"{'moist air enthalpy':>40} |", z.MoistAirEnthalpy) print(f"{'moist air enthalpy':>40} |", y.MoistAirEnthalpy) print(f"{'moist air volume':>40} |", x.MoistAirVolume) print(f"{'moist air volume':>40} |", z.MoistAirVolume) print(f"{'moist air volume':>40} |", y.MoistAirVolume) print(f"{'degree of saturation':>40} |", x.DegreeOfSaturation) print(f"{'degree of saturation':>40} |", z.DegreeOfSaturation) print(f"{'degree of saturation':>40} |", y.DegreeOfSaturation) # print(main.CalcPsychrometricsFromTWetBulb(*args))
41.050847
84
0.676713
344
2,422
4.505814
0.125
0.104516
0.092903
0.116129
0.834194
0.774194
0.710323
0.343226
0.318065
0.192258
0
0.044053
0.156482
2,422
58
85
41.758621
0.714635
0.020231
0
0.139535
0
0
0.320118
0.111345
0
0
0
0
0
1
0
false
0
0.046512
0
0.046512
0.627907
0
0
0
null
0
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
0
0
0
0
0
0
1
0
4
844c3de9f13c52200c5f1659eb94100f027ad3e7
128
py
Python
cbmail/apps.py
Panamus/django-cbmail
cb77a5c463ce6f0e59932226931edc4737fdc73f
[ "MIT" ]
3
2017-12-13T12:43:30.000Z
2020-11-25T06:04:56.000Z
cbmail/apps.py
dipcode-software/django-maillings
cb77a5c463ce6f0e59932226931edc4737fdc73f
[ "MIT" ]
9
2017-03-30T11:06:29.000Z
2017-09-11T15:34:17.000Z
cbmail/apps.py
dipcode-software/django-mailings
cb77a5c463ce6f0e59932226931edc4737fdc73f
[ "MIT" ]
1
2021-06-08T10:58:21.000Z
2021-06-08T10:58:21.000Z
from __future__ import unicode_literals from django.apps import AppConfig class CBMAilConfig(AppConfig): name = 'cbmail'
16
39
0.789063
15
128
6.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.15625
128
7
40
18.285714
0.888889
0
0
0
0
0
0.046875
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ffcfbdab8cee1c2ee8d81ed9bc293377d6c13930
6,741
py
Python
polaq_create/squad_pl/preprocessing/old/join_squad_files.py
tjur/polaq_master_thesis
685335730b1283257ce1e696330aed18a9ece4ef
[ "MIT" ]
1
2020-08-30T13:10:17.000Z
2020-08-30T13:10:17.000Z
polaq_create/squad_pl/preprocessing/old/join_squad_files.py
tjur/polaq_master_thesis
685335730b1283257ce1e696330aed18a9ece4ef
[ "MIT" ]
null
null
null
polaq_create/squad_pl/preprocessing/old/join_squad_files.py
tjur/polaq_master_thesis
685335730b1283257ce1e696330aed18a9ece4ef
[ "MIT" ]
null
null
null
import json from squad_pl import DATA_DIR VERSION1_1 = "1.1" VERSION2_0 = "2.0" def join_squad_files(version): dev_squad_json_filename = DATA_DIR / f"squad/raw/dev-v{version}.json" train_squad_json_filename = DATA_DIR / f"squad/raw/train-v{version}.json" joined_squad_json_filename = DATA_DIR / f"squad/raw/squad_full_dev_and_train-v{version}.json" with open(joined_squad_json_filename, "w+", encoding="utf8") as joined_squad_json_file, open( dev_squad_json_filename, "r", encoding="utf8" ) as dev_squad_json_file, open(train_squad_json_filename, "r", encoding="utf8") as train_squad_json_file: dev_squad_data = json.load(dev_squad_json_file)["data"] train_squad_data = json.load(train_squad_json_file)["data"] joined_squad_data = {"data": dev_squad_data + train_squad_data, "version": version} json.dump(joined_squad_data, joined_squad_json_file, indent=4) def join_both_squad_versions(): squad_1_1_json_filename = DATA_DIR / f"squad/raw/squad_full_dev_and_train-v{VERSION1_1}.json" squad_2_0_json_filename = DATA_DIR / f"squad/raw/squad_full_dev_and_train-v{VERSION2_0}.json" joined_squad_json_filename = DATA_DIR / f"squad/raw/squad_full_dev_and_train.json" with open(joined_squad_json_filename, "w+", encoding="utf8") as joined_squad_json_file, open( squad_1_1_json_filename, "r", encoding="utf8" ) as squad_1_1_json_file, open(squad_2_0_json_filename, "r", encoding="utf8") as squad_2_0_json_file: squad_1_1_data = {} for article in json.load(squad_1_1_json_file)["data"]: title = article["title"] squad_1_1_data[title] = {} for paragraph in article["paragraphs"]: context = paragraph["context"] if context not in squad_1_1_data[title]: # context sometimes repeats so don't always set to {} squad_1_1_data[title][context] = {} for question_answers in paragraph["qas"]: question_answers["is_impossible"] = False # SQuAD 1.1 doesn't have this property squad_1_1_data[title][context][question_answers["id"]] = question_answers squad_full_data = squad_1_1_data new_question_answers = [] common_qas_count = 0 for article in json.load(squad_2_0_json_file)["data"]: title = article["title"] assert title in squad_1_1_data # every title from SQuAD 2.0 is in SQuAD 1.1 somehow for paragraph in article["paragraphs"]: context = paragraph["context"] if context not in squad_1_1_data[title]: squad_full_data[title][context] = {} for question_answers in paragraph["qas"]: if question_answers["id"] not in squad_full_data[title][context]: new_question_answers.append(question_answers) else: common_qas_count += 1 # check that SQuAD 2.0 doesn't change the old ones assert squad_full_data[title][context][question_answers["id"]] == question_answers squad_full_data[title][context][question_answers["id"]] = question_answers data = {"data": []} for title, contexts in squad_full_data.items(): paragraphs = {"title": title, "paragraphs": []} for context, questions_answers in contexts.items(): qas = {"context": context, "qas": []} for id, question_answers in questions_answers.items(): qas["qas"].append(question_answers) paragraphs["paragraphs"].append(qas) data["data"].append(paragraphs) json.dump(data, joined_squad_json_file, indent=4) def analyze_full_squad_dataset(): """Analyze full SQuAD dataset (joined both versions).""" squad_1_1_json_filename = DATA_DIR / f"squad/raw/squad_full_dev_and_train-v{VERSION1_1}.json" squad_2_0_json_filename = DATA_DIR / f"squad/raw/squad_full_dev_and_train-v{VERSION2_0}.json" all_qas_count = 0 with open(squad_1_1_json_filename, "r", encoding="utf8") as squad_1_1_json_file, open( squad_2_0_json_filename, "r", encoding="utf8" ) as squad_2_0_json_file: squad_1_1_data = {} for article in json.load(squad_1_1_json_file)["data"]: title = article["title"] squad_1_1_data[title] = {} for paragraph in article["paragraphs"]: context = paragraph["context"] if context not in squad_1_1_data[title]: # context sometimes repeats so don't always set to {} squad_1_1_data[title][context] = {} for question_answers in paragraph["qas"]: question_answers["is_impossible"] = False # SQuAD 1.1 doesn't have this property squad_1_1_data[title][context][question_answers["id"]] = question_answers all_qas_count += 1 squad_full_data = squad_1_1_data new_question_answers = [] common_qas_count = 0 for article in json.load(squad_2_0_json_file)["data"]: title = article["title"] assert title in squad_1_1_data # every title from SQuAD 2.0 is in SQuAD 1.1 somehow for paragraph in article["paragraphs"]: context = paragraph["context"] if context not in squad_1_1_data[title]: squad_full_data[title][context] = {} for question_answers in paragraph["qas"]: if question_answers["id"] not in squad_full_data[title][context]: new_question_answers.append(question_answers) all_qas_count += 1 else: common_qas_count += 1 # check that SQuAD 2.0 doesn't change the old ones assert squad_full_data[title][context][question_answers["id"]] == question_answers squad_full_data[title][context][question_answers["id"]] = question_answers new_possible_qas_count = 0 new_impossible_qas_count = 0 for question_answers in new_question_answers: if question_answers["is_impossible"]: new_impossible_qas_count += 1 else: new_possible_qas_count += 1 print(f"All questions: {all_qas_count}") print(f"Common questions: {common_qas_count}") print(f"New possible questions: {new_possible_qas_count}") print(f"New impossible questions: {new_impossible_qas_count}") if __name__ == "__main__": analyze_full_squad_dataset()
50.30597
111
0.632992
897
6,741
4.389075
0.101449
0.11811
0.049784
0.044704
0.747524
0.738887
0.732791
0.716535
0.683007
0.683007
0
0.023761
0.269545
6,741
133
112
50.684211
0.775792
0.06364
0
0.590909
0
0
0.130021
0.065248
0
0
0
0
0.036364
1
0.027273
false
0
0.018182
0
0.045455
0.036364
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
083c497714f1831ee959c8ed50eb617d2a87acff
93
py
Python
src/openforms/apps.py
Ameesha2001/Ekyam-scl-maxo
d9a8ec0e2d297d20fcf9139cfe50a7c814cdb2f5
[ "MIT" ]
10
2021-01-02T14:54:33.000Z
2022-02-09T07:11:05.000Z
src/openforms/apps.py
Ameesha2001/Ekyam-scl-maxo
d9a8ec0e2d297d20fcf9139cfe50a7c814cdb2f5
[ "MIT" ]
2
2021-01-06T09:04:24.000Z
2021-01-08T06:20:34.000Z
src/openforms/apps.py
Ameesha2001/Ekyam-scl-maxo
d9a8ec0e2d297d20fcf9139cfe50a7c814cdb2f5
[ "MIT" ]
8
2020-12-24T07:58:24.000Z
2022-01-04T15:22:30.000Z
from django.apps import AppConfig class OpenformsConfig(AppConfig): name = 'openforms'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f29a99adf7fbc2a07c7abed16768c7d54650ae40
171
py
Python
Scripts/django-admin.py
UdAyPaLRedDy/advanced-blog
774a3fcc1572a37fd67c142a9bbed0c77071e031
[ "MIT" ]
null
null
null
Scripts/django-admin.py
UdAyPaLRedDy/advanced-blog
774a3fcc1572a37fd67c142a9bbed0c77071e031
[ "MIT" ]
null
null
null
Scripts/django-admin.py
UdAyPaLRedDy/advanced-blog
774a3fcc1572a37fd67c142a9bbed0c77071e031
[ "MIT" ]
null
null
null
#!c:\users\udayre~1\desktop\coding~1\trydja~1\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
28.5
64
0.777778
25
171
4.88
0.84
0
0
0
0
0
0
0
0
0
0
0.019231
0.087719
171
5
65
34.2
0.762821
0.368421
0
0
0
0
0.074766
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4b3623a9fe8a9d9b631d1427a4857abde5891fdb
72
py
Python
megaparse/parsers/__init__.py
AlanCoding/megaparse
f0cd727d09d2e5d46a6b11c179849de256214cc8
[ "Apache-2.0" ]
null
null
null
megaparse/parsers/__init__.py
AlanCoding/megaparse
f0cd727d09d2e5d46a6b11c179849de256214cc8
[ "Apache-2.0" ]
null
null
null
megaparse/parsers/__init__.py
AlanCoding/megaparse
f0cd727d09d2e5d46a6b11c179849de256214cc8
[ "Apache-2.0" ]
null
null
null
__all__ = ['parse_kv'] from megaparse.parsers.key_value import parse_kv
24
48
0.805556
11
72
4.636364
0.818182
0.27451
0
0
0
0
0
0
0
0
0
0
0.097222
72
3
48
24
0.784615
0
0
0
0
0
0.109589
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
4b374f53427d2ecf30c8feb43e71211a6addce08
185
py
Python
tests/core/test_setproctitle.py
KiwiNetworkOrg/chia-blockchain
90ec3a0fd7b50f5b98b5b0478e28ebbe6f8e8a71
[ "Apache-2.0" ]
8
2021-08-21T03:10:13.000Z
2022-02-09T04:30:05.000Z
tests/core/test_setproctitle.py
KiwiNetworkOrg/chia-blockchain
90ec3a0fd7b50f5b98b5b0478e28ebbe6f8e8a71
[ "Apache-2.0" ]
null
null
null
tests/core/test_setproctitle.py
KiwiNetworkOrg/chia-blockchain
90ec3a0fd7b50f5b98b5b0478e28ebbe6f8e8a71
[ "Apache-2.0" ]
1
2021-09-03T02:30:26.000Z
2021-09-03T02:30:26.000Z
import unittest from kiwi.util.setproctitle import setproctitle class TestSetProcTitle(unittest.TestCase): def test_does_not_crash(self): setproctitle("kiwi test title")
20.555556
47
0.778378
22
185
6.409091
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.151351
185
8
48
23.125
0.898089
0
0
0
0
0
0.081081
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4b3c6f8db553ccc7249b941848195f5385cb95a3
74
py
Python
general-practice/Exercises solved/w3resource/basic/Exercise75.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
general-practice/Exercises solved/w3resource/basic/Exercise75.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
general-practice/Exercises solved/w3resource/basic/Exercise75.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
#Write a Python program to get the copyright information print(copyright)
24.666667
56
0.824324
11
74
5.545455
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.135135
74
3
57
24.666667
0.953125
0.743243
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
4b4ee2cff8ae52bb69129e1be9323531757f3980
214
py
Python
echr/data_models/article.py
nlopuszynska/ECHR-OD_process
84da71d355926eba05797d174fdabdb99fbbd517
[ "MIT" ]
20
2019-08-12T22:15:08.000Z
2022-02-09T14:48:13.000Z
echr/data_models/article.py
nlopuszynska/ECHR-OD_process
84da71d355926eba05797d174fdabdb99fbbd517
[ "MIT" ]
71
2019-08-04T14:43:06.000Z
2022-03-21T16:20:17.000Z
echr/data_models/article.py
nlopuszynska/ECHR-OD_process
84da71d355926eba05797d174fdabdb99fbbd517
[ "MIT" ]
7
2019-05-07T13:54:35.000Z
2022-01-02T18:42:39.000Z
import peewee as pw from echr.data_models.base import BaseModel from echr.data_models.case import Case class Article(BaseModel): title = pw.CharField() case = pw.ForeignKeyField(Case, backref='articles')
23.777778
55
0.766355
30
214
5.4
0.6
0.098765
0.148148
0.222222
0
0
0
0
0
0
0
0
0.14486
214
8
56
26.75
0.885246
0
0
0
0
0
0.037383
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4b58a348e9378330bb8637735e6341687abf5c4b
129
py
Python
Week 2/Async/async2_2_1.py
trisxcj1/SyracuseUniversity_IST652
99f2f0d6258416cab145b5011ea429b629c3f3cb
[ "MIT" ]
null
null
null
Week 2/Async/async2_2_1.py
trisxcj1/SyracuseUniversity_IST652
99f2f0d6258416cab145b5011ea429b629c3f3cb
[ "MIT" ]
null
null
null
Week 2/Async/async2_2_1.py
trisxcj1/SyracuseUniversity_IST652
99f2f0d6258416cab145b5011ea429b629c3f3cb
[ "MIT" ]
null
null
null
mp = 'Today is a Great DAY' print(mp.lower()) print(mp.upper()) print(mp.strip()) print(mp.startswith('w')) print(mp.find('a'))
16.125
27
0.651163
23
129
3.652174
0.565217
0.416667
0
0
0
0
0
0
0
0
0
0
0.100775
129
7
28
18.428571
0.724138
0
0
0
0
0
0.170543
0
0
0
0
0
0
1
0
false
0
0
0
0
0.833333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
4b693dbcd4881132fac575af73f769e24f58160c
124
py
Python
URI onJudge/1019.py
murillotlopes/DSM-Python
2822b9b1b988936ab098c7052180ee3c3d7dd735
[ "MIT" ]
null
null
null
URI onJudge/1019.py
murillotlopes/DSM-Python
2822b9b1b988936ab098c7052180ee3c3d7dd735
[ "MIT" ]
null
null
null
URI onJudge/1019.py
murillotlopes/DSM-Python
2822b9b1b988936ab098c7052180ee3c3d7dd735
[ "MIT" ]
null
null
null
# Conversão de Tempo tempo=int(input()) h=tempo//3600 m=(tempo%3600)//60 s=(tempo%3600)%60 print('{}:{}:{}'.format(h,m,s))
15.5
31
0.620968
22
124
3.5
0.545455
0.350649
0.285714
0
0
0
0
0
0
0
0
0.140351
0.080645
124
7
32
17.714286
0.535088
0.145161
0
0
0
0
0.076923
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4b71b8e012d8cdbe8b451e1880c08e46961a2ad5
307
py
Python
January/Day31-Richest Customer Wealth.py
tayyrov/Daily_Coding_Challenge
9e54a725082530dca1229dfcd973d04975374220
[ "MIT" ]
1
2022-01-01T21:54:45.000Z
2022-01-01T21:54:45.000Z
January/Day31-Richest Customer Wealth.py
tayyrov/Daily_Coding_Challenge
9e54a725082530dca1229dfcd973d04975374220
[ "MIT" ]
null
null
null
January/Day31-Richest Customer Wealth.py
tayyrov/Daily_Coding_Challenge
9e54a725082530dca1229dfcd973d04975374220
[ "MIT" ]
null
null
null
""" Question Source: https://leetcode.com/problems/richest-customer-wealth/ Level: Easy Topic: Matrix Solver: Tayyrov Date: 01.31.2022 """ from typing import * def maximumWealth(accounts: List[List[int]]) -> int: return max(sum(row) for row in accounts) """ Time: O(N*M) Space: O(N) """
19.1875
72
0.661238
44
307
4.613636
0.863636
0.019704
0
0
0
0
0
0
0
0
0
0.031621
0.175896
307
16
73
19.1875
0.770751
0.423453
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
4b7c6b54468ab132c26615c2d80028e50397f930
132
py
Python
src/pudl/__main__.py
cschloer/pudl
32705ecc77443eb0d8c1d460df428f6f5f5b5037
[ "MIT" ]
285
2017-05-26T02:42:04.000Z
2022-03-25T09:06:11.000Z
src/pudl/__main__.py
kyleries/pudl
52db209ff83d1b2c8ef0f93d599a844f12a715ef
[ "MIT" ]
1,398
2017-05-27T15:46:08.000Z
2022-03-31T19:50:07.000Z
src/pudl/__main__.py
kyleries/pudl
52db209ff83d1b2c8ef0f93d599a844f12a715ef
[ "MIT" ]
76
2017-06-22T17:31:28.000Z
2022-01-23T22:17:57.000Z
"""Entrypoint module for the PUDL ETL script.""" import sys import pudl if __name__ == "__main__": sys.exit(pudl.cli.main())
14.666667
48
0.681818
19
132
4.315789
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.174242
132
8
49
16.5
0.752294
0.318182
0
0
0
0
0.095238
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4b7db7c11e5348a53316ea8e27fff07ff07ef623
154
py
Python
ggraphs/algorithms.py
GiliardGodoi/ggraph
550032c9334a8bc550ee7e3c561b500331c74f1f
[ "MIT" ]
null
null
null
ggraphs/algorithms.py
GiliardGodoi/ggraph
550032c9334a8bc550ee7e3c561b500331c74f1f
[ "MIT" ]
2
2021-11-08T13:01:38.000Z
2021-11-28T21:36:52.000Z
ggraphs/algorithms.py
GiliardGodoi/ggraphs
550032c9334a8bc550ee7e3c561b500331c74f1f
[ "MIT" ]
null
null
null
from .components import connected_components from .distance import shortest_path_one_to_all from .mst import kruskal, prim from .search import bfs, dfs
22
46
0.831169
23
154
5.347826
0.695652
0
0
0
0
0
0
0
0
0
0
0
0.12987
154
6
47
25.666667
0.91791
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4b8109c4bfdb4db95d2b22832dfee63a0930955c
609
py
Python
auth/models.py
irvanjit/quaterloo
38cc4431220c4aae2f3f0903e684d85d05fea80a
[ "MIT" ]
null
null
null
auth/models.py
irvanjit/quaterloo
38cc4431220c4aae2f3f0903e684d85d05fea80a
[ "MIT" ]
null
null
null
auth/models.py
irvanjit/quaterloo
38cc4431220c4aae2f3f0903e684d85d05fea80a
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save # class UserProfile(models.Model): # user = models.ForeignKey(User, unique=True) # school = models.CharField(max_length=200, null=True) # faculty = models.CharField(max_length=200, null=True) # program = models.CharField(max_length=400, null=True) # year = models.CharField(max_length=200, null=True) # def create_user_profile(sender, instance, created, **kwargs): # if created: # UserProfile.objects.create(user=instance) # post_save.connect(create_user_profile, sender=User)
33.833333
63
0.770115
85
609
5.4
0.435294
0.130719
0.156863
0.20915
0.228758
0.228758
0.228758
0
0
0
0
0.022099
0.108374
609
18
64
33.833333
0.823204
0.761905
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
4b9154f19d219fdf4865941c8ab2021d5d3b5fbf
209
py
Python
msgraph/graph/abstractions/IGraphFilter.py
SWB-Dev/microsoft-graph-api
07fef0071852a697bdf0b0a28a4758214621d5b2
[ "MIT" ]
null
null
null
msgraph/graph/abstractions/IGraphFilter.py
SWB-Dev/microsoft-graph-api
07fef0071852a697bdf0b0a28a4758214621d5b2
[ "MIT" ]
null
null
null
msgraph/graph/abstractions/IGraphFilter.py
SWB-Dev/microsoft-graph-api
07fef0071852a697bdf0b0a28a4758214621d5b2
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Protocol class IGraphFilter(Protocol): def add_subfilter(self, filter:IGraphFilter): """""" def compose(self) -> str: """"""
20.9
49
0.645933
21
209
6.190476
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.23445
209
10
50
20.9
0.8125
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
4ba6d972411cdb9ea39eedc4054d396cd1a785b2
213
py
Python
thermoapp/reports/admin.py
p1gm1/MaintenaceAid
272bb385c08ec0553f3e6e81bc29c7ab8d315dd3
[ "MIT" ]
null
null
null
thermoapp/reports/admin.py
p1gm1/MaintenaceAid
272bb385c08ec0553f3e6e81bc29c7ab8d315dd3
[ "MIT" ]
null
null
null
thermoapp/reports/admin.py
p1gm1/MaintenaceAid
272bb385c08ec0553f3e6e81bc29c7ab8d315dd3
[ "MIT" ]
null
null
null
from django.contrib import admin from thermoapp.reports.models import Component, BasePhoto #This register allows to see the models in Django DB admin admin.site.register(Component) admin.site.register(BasePhoto)
30.428571
58
0.830986
31
213
5.709677
0.612903
0.101695
0.19209
0
0
0
0
0
0
0
0
0
0.107981
213
7
59
30.428571
0.931579
0.267606
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
4ba821625a1c8532cb1ae804d1a18cb651b02bfb
140
py
Python
ecojunk/users/constants.py
PIN-UPV/EcoJunkWebServer
53a42687c303ffe345f59dc1f11fa41c3526f6d7
[ "MIT" ]
1
2018-10-02T11:54:26.000Z
2018-10-02T11:54:26.000Z
ecojunk/users/constants.py
PIN-UPV/EcoJunkWebServer
53a42687c303ffe345f59dc1f11fa41c3526f6d7
[ "MIT" ]
8
2018-10-03T08:02:39.000Z
2018-11-21T07:42:26.000Z
ecojunk/users/constants.py
PIN-UPV/EcoJunkWebServer
53a42687c303ffe345f59dc1f11fa41c3526f6d7
[ "MIT" ]
1
2018-10-02T11:54:32.000Z
2018-10-02T11:54:32.000Z
from django.utils.translation import ugettext_lazy as _ USER = "user" RIDER = "rider" ROL_TYPES = [(USER, _("User")), (RIDER, _("Rider"))]
23.333333
55
0.678571
18
140
5
0.666667
0.177778
0.288889
0.4
0
0
0
0
0
0
0
0
0.135714
140
5
56
28
0.743802
0
0
0
0
0
0.128571
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4bad4ad83157796cfbe387e5e1eaa56795042ecf
158
py
Python
basestation/camera.py
propertycam/basestation
e203c25d6cb76bcea0d49072c9bc37121739ef3b
[ "MIT" ]
null
null
null
basestation/camera.py
propertycam/basestation
e203c25d6cb76bcea0d49072c9bc37121739ef3b
[ "MIT" ]
null
null
null
basestation/camera.py
propertycam/basestation
e203c25d6cb76bcea0d49072c9bc37121739ef3b
[ "MIT" ]
null
null
null
class Camera(object): def __init__(self, macaddress, lastsnap='snaps/default.jpg'): self.macaddress = macaddress self.lastsnap = lastsnap
31.6
65
0.689873
17
158
6.176471
0.647059
0.266667
0
0
0
0
0
0
0
0
0
0
0.202532
158
5
66
31.6
0.833333
0
0
0
0
0
0.106918
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
2996a6100a53df0d06cf643f35a4b9945b0b9900
274
py
Python
cw5_wd_zadania/z9.py
KamilMarkusz96/wizualizacja-danych
7702954c95dbbbb97c3bdd07b799723709df0dcb
[ "MIT" ]
null
null
null
cw5_wd_zadania/z9.py
KamilMarkusz96/wizualizacja-danych
7702954c95dbbbb97c3bdd07b799723709df0dcb
[ "MIT" ]
null
null
null
cw5_wd_zadania/z9.py
KamilMarkusz96/wizualizacja-danych
7702954c95dbbbb97c3bdd07b799723709df0dcb
[ "MIT" ]
null
null
null
def Wspak(dane): for i in range(len(dane)-1, -1, -1): yield dane[i] tablica = Wspak([1, 2, 3]) print('tablica [1, 2, 3]', end=' ') print('[', end='') print(next(tablica), end=', ') print(next(tablica), end=', ') print(next(tablica), end=']') print()
24.909091
42
0.532847
41
274
3.560976
0.390244
0.273973
0.246575
0.390411
0.445205
0.445205
0.445205
0.445205
0.445205
0.445205
0
0.041284
0.20438
274
11
43
24.909091
0.62844
0
0
0.2
0
0
0.090566
0
0
0
0
0
0
1
0.1
false
0
0
0
0.1
0.6
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
4b1cf5b0eeff52b7ba3eccb411248a057fc7d2df
189
py
Python
tests/utils/stateful.py
kw-0/MyGrad
307f1bb5f2391e7f4df49fe43a7acf9d1e8ea141
[ "MIT" ]
147
2018-07-14T01:37:35.000Z
2022-03-29T06:37:58.000Z
tests/utils/stateful.py
kw-0/MyGrad
307f1bb5f2391e7f4df49fe43a7acf9d1e8ea141
[ "MIT" ]
223
2018-05-31T14:13:18.000Z
2022-02-27T18:53:49.000Z
tests/utils/stateful.py
kw-0/MyGrad
307f1bb5f2391e7f4df49fe43a7acf9d1e8ea141
[ "MIT" ]
27
2018-06-17T14:42:05.000Z
2021-10-31T00:21:09.000Z
from mygrad._utils import lock_management as mem def clear_all_mem_locking_state(): mem._views_waiting_for_unlock.clear() mem._array_tracker.clear() mem._array_counter.clear()
27
48
0.78836
28
189
4.821429
0.714286
0.118519
0.192593
0
0
0
0
0
0
0
0
0
0.126984
189
7
49
27
0.818182
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.2
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
0
0
0
0
0
4
d9b6b6624bba143651cb2b250d61f204ff1f50a7
217
py
Python
sandbox/yet-yet-another-py-sandbox/solver/gen2.py
SECCON/SECCON2020_online_CTF
dd639d140ad61ea0fbfadb7827157ca53f7b88b2
[ "Apache-2.0" ]
3
2020-11-02T06:53:39.000Z
2021-12-10T00:59:01.000Z
sandbox/yet-yet-another-py-sandbox/solver/gen2.py
SECCON/SECCON2020_online_CTF
dd639d140ad61ea0fbfadb7827157ca53f7b88b2
[ "Apache-2.0" ]
null
null
null
sandbox/yet-yet-another-py-sandbox/solver/gen2.py
SECCON/SECCON2020_online_CTF
dd639d140ad61ea0fbfadb7827157ca53f7b88b2
[ "Apache-2.0" ]
null
null
null
s = '().__class__.__bases__[0].__subclasses__()[59].__init__.func_globals["sys"].modules["os.path"].os.system("sh")' s2 = '+'.join(['\'{}\''.format(x) for x in s]) print('(lambda:sandboxed_eval({}))()'.format(s2))
31
116
0.62212
30
217
3.9
0.833333
0
0
0
0
0
0
0
0
0
0
0.024631
0.064516
217
6
117
36.166667
0.551724
0
0
0
0
0.333333
0.652778
0.643519
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d9c529f8f4cfcf7cc559a70dabd1063af14451ab
7,315
py
Python
src/nisqai/data/data_sets/iris.py
obliviateandsurrender/nisqai-dev
cf6c38d34acb8fe776913c69212845c547cb47a6
[ "Apache-2.0" ]
14
2019-05-21T01:23:56.000Z
2021-06-02T15:57:13.000Z
src/nisqai/data/data_sets/iris.py
obliviateandsurrender/nisqai-dev
cf6c38d34acb8fe776913c69212845c547cb47a6
[ "Apache-2.0" ]
8
2019-02-08T00:16:56.000Z
2019-08-09T13:32:11.000Z
src/nisqai/data/data_sets/iris.py
obliviateandsurrender/nisqai-dev
cf6c38d34acb8fe776913c69212845c547cb47a6
[ "Apache-2.0" ]
4
2019-02-11T07:29:01.000Z
2019-07-19T17:45:17.000Z
from numpy import array iris_data = { 'data': array([ [5.1, 3.5, 1.4, 0.2], [4.9, 3., 1.4, 0.2], [4.7, 3.2, 1.3, 0.2], [4.6, 3.1, 1.5, 0.2], [5., 3.6, 1.4, 0.2], [5.4, 3.9, 1.7, 0.4], [4.6, 3.4, 1.4, 0.3], [5., 3.4, 1.5, 0.2], [4.4, 2.9, 1.4, 0.2], [4.9, 3.1, 1.5, 0.1], [5.4, 3.7, 1.5, 0.2], [4.8, 3.4, 1.6, 0.2], [4.8, 3., 1.4, 0.1], [4.3, 3., 1.1, 0.1], [5.8, 4., 1.2, 0.2], [5.7, 4.4, 1.5, 0.4], [5.4, 3.9, 1.3, 0.4], [5.1, 3.5, 1.4, 0.3], [5.7, 3.8, 1.7, 0.3], [5.1, 3.8, 1.5, 0.3], [5.4, 3.4, 1.7, 0.2], [5.1, 3.7, 1.5, 0.4], [4.6, 3.6, 1., 0.2], [5.1, 3.3, 1.7, 0.5], [4.8, 3.4, 1.9, 0.2], [5., 3., 1.6, 0.2], [5., 3.4, 1.6, 0.4], [5.2, 3.5, 1.5, 0.2], [5.2, 3.4, 1.4, 0.2], [4.7, 3.2, 1.6, 0.2], [4.8, 3.1, 1.6, 0.2], [5.4, 3.4, 1.5, 0.4], [5.2, 4.1, 1.5, 0.1], [5.5, 4.2, 1.4, 0.2], [4.9, 3.1, 1.5, 0.1], [5., 3.2, 1.2, 0.2], [5.5, 3.5, 1.3, 0.2], [4.9, 3.1, 1.5, 0.1], [4.4, 3., 1.3, 0.2], [5.1, 3.4, 1.5, 0.2], [5., 3.5, 1.3, 0.3], [4.5, 2.3, 1.3, 0.3], [4.4, 3.2, 1.3, 0.2], [5., 3.5, 1.6, 0.6], [5.1, 3.8, 1.9, 0.4], [4.8, 3., 1.4, 0.3], [5.1, 3.8, 1.6, 0.2], [4.6, 3.2, 1.4, 0.2], [5.3, 3.7, 1.5, 0.2], [5., 3.3, 1.4, 0.2], [7., 3.2, 4.7, 1.4], [6.4, 3.2, 4.5, 1.5], [6.9, 3.1, 4.9, 1.5], [5.5, 2.3, 4., 1.3], [6.5, 2.8, 4.6, 1.5], [5.7, 2.8, 4.5, 1.3], [6.3, 3.3, 4.7, 1.6], [4.9, 2.4, 3.3, 1.], [6.6, 2.9, 4.6, 1.3], [5.2, 2.7, 3.9, 1.4], [5., 2., 3.5, 1.], [5.9, 3., 4.2, 1.5], [6., 2.2, 4., 1.], [6.1, 2.9, 4.7, 1.4], [5.6, 2.9, 3.6, 1.3], [6.7, 3.1, 4.4, 1.4], [5.6, 3., 4.5, 1.5], [5.8, 2.7, 4.1, 1.], [6.2, 2.2, 4.5, 1.5], [5.6, 2.5, 3.9, 1.1], [5.9, 3.2, 4.8, 1.8], [6.1, 2.8, 4., 1.3], [6.3, 2.5, 4.9, 1.5], [6.1, 2.8, 4.7, 1.2], [6.4, 2.9, 4.3, 1.3], [6.6, 3., 4.4, 1.4], [6.8, 2.8, 4.8, 1.4], [6.7, 3., 5., 1.7], [6., 2.9, 4.5, 1.5], [5.7, 2.6, 3.5, 1.], [5.5, 2.4, 3.8, 1.1], [5.5, 2.4, 3.7, 1.], [5.8, 2.7, 3.9, 1.2], [6., 2.7, 5.1, 1.6], [5.4, 3., 4.5, 1.5], [6., 3.4, 4.5, 1.6], [6.7, 3.1, 4.7, 1.5], [6.3, 2.3, 4.4, 1.3], [5.6, 3., 4.1, 1.3], [5.5, 2.5, 4., 1.3], [5.5, 2.6, 4.4, 1.2], [6.1, 3., 4.6, 1.4], [5.8, 2.6, 4., 1.2], [5., 2.3, 3.3, 1.], [5.6, 2.7, 4.2, 1.3], [5.7, 3., 4.2, 1.2], [5.7, 2.9, 4.2, 1.3], [6.2, 2.9, 4.3, 1.3], [5.1, 2.5, 3., 1.1], [5.7, 2.8, 4.1, 1.3], [6.3, 3.3, 6., 2.5], [5.8, 2.7, 5.1, 1.9], [7.1, 3., 5.9, 2.1], [6.3, 2.9, 5.6, 1.8], [6.5, 3., 5.8, 2.2], [7.6, 3., 6.6, 2.1], [4.9, 2.5, 4.5, 1.7], [7.3, 2.9, 6.3, 1.8], [6.7, 2.5, 5.8, 1.8], [7.2, 3.6, 6.1, 2.5], [6.5, 3.2, 5.1, 2.], [6.4, 2.7, 5.3, 1.9], [6.8, 3., 5.5, 2.1], [5.7, 2.5, 5., 2.], [5.8, 2.8, 5.1, 2.4], [6.4, 3.2, 5.3, 2.3], [6.5, 3., 5.5, 1.8], [7.7, 3.8, 6.7, 2.2], [7.7, 2.6, 6.9, 2.3], [6., 2.2, 5., 1.5], [6.9, 3.2, 5.7, 2.3], [5.6, 2.8, 4.9, 2.], [7.7, 2.8, 6.7, 2.], [6.3, 2.7, 4.9, 1.8], [6.7, 3.3, 5.7, 2.1], [7.2, 3.2, 6., 1.8], [6.2, 2.8, 4.8, 1.8], [6.1, 3., 4.9, 1.8], [6.4, 2.8, 5.6, 2.1], [7.2, 3., 5.8, 1.6], [7.4, 2.8, 6.1, 1.9], [7.9, 3.8, 6.4, 2.], [6.4, 2.8, 5.6, 2.2], [6.3, 2.8, 5.1, 1.5], [6.1, 2.6, 5.6, 1.4], [7.7, 3., 6.1, 2.3], [6.3, 3.4, 5.6, 2.4], [6.4, 3.1, 5.5, 1.8], [6., 3., 4.8, 1.8], [6.9, 3.1, 5.4, 2.1], [6.7, 3.1, 5.6, 2.4], [6.9, 3.1, 5.1, 2.3], [5.8, 2.7, 5.1, 1.9], [6.8, 3.2, 5.9, 2.3], [6.7, 3.3, 5.7, 2.5], [6.7, 3., 5.2, 2.3], [6.3, 2.5, 5., 1.9], [6.5, 3., 5.2, 2.], [6.2, 3.4, 5.4, 2.3], [5.9, 3., 5.1, 1.8] ]), 'target': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]), 'target_names': array(['setosa', 'versicolor', 'virginica'], dtype = '<U10'), 'DESCR': 'Iris Plants Database\n====================\n\nNotes\n-----\nData Set Characteristics:\n :Number of Instances: 150 (50 in each of three classes)\n :Number of Attributes: 4 numeric, predictive attributes and the class\n :Attribute Information:\n - sepal length in cm\n - sepal width in cm\n - petal length in cm\n - petal width in cm\n - class:\n - Iris-Setosa\n - Iris-Versicolour\n - Iris-Virginica\n :Summary Statistics:\n\n ============== ==== ==== ======= ===== ====================\n Min Max Mean SD Class Correlation\n ============== ==== ==== ======= ===== ====================\nsepal length: 4.3 7.9 5.84 0.83 0.7826\n sepal width: 2.0 4.4 3.05 0.43 -0.4194\n petal length: 1.0 6.9 3.76 1.76 0.9490 (high!)\npetal width: 0.1 2.5 1.20 0.76 0.9565 (high!)\n ============== ==== ==== ======= ===== ====================\n\n :Missing Attribute Values: None\n :Class Distribution: 33.3% for each of 3 classes.\n :Creator: R.A. Fisher\n :Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)\n :Date: July, 1988\n\nThis is a copy of UCI ML iris datasets.\nhttp://archive.ics.uci.edu/ml/datasets/Iris\n\nThe famous Iris database, first used by Sir R.A Fisher\n\nThis is perhaps the best known database to be found in the\npattern recognition literature. Fisher\'s paper is a classic in the field and\nis referenced frequently to this day. (See Duda & Hart, for example.) The\ndata set contains 3 classes of 50 instances each, where each class refers to a\ntype of iris plant. One class is linearly separable from the other 2; the\nlatter are NOT linearly separable from each other.\n\nReferences\n----------\n - Fisher,R.A. "The use of multiple measurements in taxonomic problems"\n Annual Eugenics, 7, Part II, 179-188 (1936); also in "Contributions to\n Mathematical Statistics" (John Wiley, NY, 1950).\n - Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis.\n (Q327.D83) John Wiley & Sons. ISBN 0-471-22361-1. See page 218.\n - Dasarathy, B.V. (1980) "Nosing Around the Neighborhood: A New System\n Structure and Classification Rule for Recognition in Partially Exposed\n Environments". IEEE Transactions on Pattern Analysis and Machine\n Intelligence, Vol. PAMI-2, No.1, 67-71.\n - Gates, G.W. (1972) "The Reduced Nearest Neighbor Rule". IEEE Transactions\n on Information Theory, May 1972, 431-433.\n - See also: 1988 MLC Proceedings, 54-64. Cheeseman et al"s AUTOCLASS II\n conceptual clustering system finds 3 classes in the data.\n - Many, many more ...\n', 'feature_names': ['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)'] }
44.066265
2,743
0.429938
1,735
7,315
1.810951
0.132565
0.043285
0.046785
0.059835
0.247295
0.143221
0.098345
0.077021
0.064927
0.059198
0
0.269115
0.274094
7,315
166
2,744
44.066265
0.322599
0
0
0.042169
0
0.012048
0.254511
0.02146
0
0
0
0
0
1
0
false
0
0.006024
0
0.006024
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d9ecbdbd440733aee70542c451271c62ac7277e3
1,115
py
Python
src/grok/tests/baseclass/basedirective.py
zopefoundation/grok
9c29591071aff824e6ef72acf8137bb21c0ea861
[ "ZPL-2.1" ]
21
2015-11-06T08:54:43.000Z
2021-08-15T13:41:13.000Z
src/grok/tests/baseclass/basedirective.py
zopefoundation/grok
9c29591071aff824e6ef72acf8137bb21c0ea861
[ "ZPL-2.1" ]
8
2016-03-18T14:25:17.000Z
2020-06-10T23:17:26.000Z
src/grok/tests/baseclass/basedirective.py
zopefoundation/grok
9c29591071aff824e6ef72acf8137bb21c0ea861
[ "ZPL-2.1" ]
13
2015-09-19T22:42:44.000Z
2022-01-24T18:55:20.000Z
""" The baseclass directive can be used to mark something a base class. Of course subclasses shouldn't inherit this otherwise there is no way to turn them into non-base classes. >>> grok.testing.grok(__name__) >>> from zope.publisher.browser import TestRequest >>> request = TestRequest() >>> from zope import component >>> model = Model() We can't look up SomeView as a view, as it's a base class: >>> view = component.getMultiAdapter((model, request), name='someview') Traceback (most recent call last): ... zope.interface.interfaces.ComponentLookupError: ((<grok.tests.baseclass.basedirective.Model object at 0x...>, <zope.publisher.browser.TestRequest instance ...>), <InterfaceClass zope.interface.Interface>, 'someview') We can however get a subclass of SomeView: >>> view = component.getMultiAdapter((model, request), name='anotherview') >>> view.render() 'hello world' """ # noqa: E501 import grok class Model(grok.Model): pass class SomeView(grok.View): grok.baseclass() def render(self): return "hello world" class AnotherView(SomeView): pass
26.547619
218
0.70852
142
1,115
5.535211
0.549296
0.012723
0.025445
0.083969
0.111959
0.111959
0
0
0
0
0
0.004306
0.166816
1,115
41
219
27.195122
0.841765
0.819731
0
0.222222
0
0
0.056995
0
0
0
0
0
0
1
0.111111
false
0.222222
0.111111
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
8a2bbfe71c3e5c44d536bd8fdbd1ffcbfc527bf0
98
py
Python
sparrow_cloud/apps/message_service/apps.py
LaEmma/sparrow_cloud
fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c
[ "MIT" ]
15
2019-09-24T09:32:32.000Z
2021-12-30T08:07:41.000Z
sparrow_cloud/apps/message_service/apps.py
LaEmma/sparrow_cloud
fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c
[ "MIT" ]
13
2019-09-06T03:20:02.000Z
2021-09-27T03:37:25.000Z
sparrow_cloud/apps/message_service/apps.py
LaEmma/sparrow_cloud
fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c
[ "MIT" ]
17
2019-09-02T06:31:05.000Z
2021-10-08T04:23:23.000Z
from django.apps import AppConfig class MessageService(AppConfig): name = 'message_service'
16.333333
33
0.77551
11
98
6.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
34
19.6
0.903614
0
0
0
0
0
0.153061
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8a2cfc14b2ab8070e4608c33689f7389aca77b1f
21,592
py
Python
python/F-Scrack.py
mabangde/pentesttools
0db14c490e62d5db4b184c46e0af2d2f8c1861f2
[ "Linux-OpenIB" ]
142
2019-09-09T01:34:31.000Z
2022-01-21T14:24:22.000Z
python/F-Scrack.py
gcxtx/pentesttools
28cf92c4e2742dd260d40c149614daa022bad8ec
[ "Linux-OpenIB" ]
null
null
null
python/F-Scrack.py
gcxtx/pentesttools
28cf92c4e2742dd260d40c149614daa022bad8ec
[ "Linux-OpenIB" ]
39
2019-09-09T02:03:07.000Z
2022-03-22T03:22:19.000Z
#coding:utf-8 #author:wolf@YSRC import getopt import sys import Queue import threading import socket import urllib2 import time import os import re import ftplib import hashlib import struct import binascii import telnetlib import array queue = Queue.Queue() mutex = threading.Lock() TIMEOUT = 10 I = 0 USER_DIC = { "ftp":['www','admin','root','db','wwwroot','data','web','ftp'], "mysql":['root'], "mssql":['sa'], "telnet":['administrator','admin','root','cisco'], "postgresql":['postgres','admin'], "redis":['null'], "mongodb":['null'], "memcached":['null'], "elasticsearch":['null'] } PASSWORD_DIC = ['!@#$%^&*','000000','1','111111','111111111','112233','123','123123','123123123','123321','1234','12345','123456','12345678','123456789','1234567890','123456789a','123456a','123qwe','123qwe!@#','1314520','159357','1q2w3e4r','1qaz2wsx','5201314','654321','666666','888888','8888888','88888888','P@ssw0rd!!','Test@123','a123456','a123456789','aa123456','abc123','abc123456','admin','apache','baseball','charlie','dragon','football','fuckyou','iloveyou','monkey','p@55w0rd','p@ssw0rd','p@ssw0rd!','password','password!','password1','princess','qwa123','qwe123','qwerty','r00t','root','sunshine','system','test','tomcat','welcome','woaini','{user}','{user}!','{user}1','{user}123','{user}2015','{user}2016','{user}{user}'] REGEX = [['ftp', '21', '^220.*?ftp|^220-|^220 Service|^220 FileZilla'], ['telnet', '23', '^\\xff[\\xfa-\\xfe]|^\\x54\\x65\\x6c|Telnet'],['mssql', '1433', ''], ['mysql', '3306', '^.\\0\\0\\0.*?mysql|^.\\0\\0\\0\\n|.*?MariaDB server'], ['postgresql', '5432', ''], ['redis', '6379', '-ERR|^\\$\\d+\\r\\nredis_version'], ['elasticsearch', '9200', ''], ['memcached', '11211', '^ERROR'], ['mongodb', '27017', '']] class Crack(): def __init__(self,ip,port,server,timeout): self.ip = ip self.port = port self.server = server self.timeout = timeout def run(self): user_list = USER_DIC[self.server] for user in user_list: for pass_ in PASSWORD_DIC: #print user, pass_ pass_ = str(pass_.replace('{user}', user)) #print self.server, user, pass_ k = getattr(self,self.server) result = k(user,pass_) if result:return result def ftp(self,user,pass_): try: ftp=ftplib.FTP() ftp.connect(self.ip,int(self.port)) ftp.login(user,pass_) if user == 'ftp':return "anonymous" return "username:%s,password:%s"%(user,pass_) except Exception,e: pass def mysql(self,user,pass_): sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) sock.connect((self.ip,int(self.port))) packet = sock.recv(254) plugin,scramble = self.get_scramble(packet) if not scramble:return 3 auth_data = self.get_auth_data(user,pass_,scramble,plugin) sock.send(auth_data) result = sock.recv(1024) if result == "\x07\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00": return "username:%s,password:%s" % (user,pass_) def postgresql(self,user,pass_):#author:hos@YSRC try: sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM) sock.connect((self.ip,int(self.port))) packet_length = len(user) + 7 +len("\x03user database postgres application_name psql client_encoding UTF8 ") p="%c%c%c%c%c\x03%c%cuser%c%s%cdatabase%cpostgres%capplication_name%cpsql%cclient_encoding%cUTF8%c%c"%( 0,0,0,packet_length,0,0,0,0,user,0,0,0,0,0,0,0,0) sock.send(p) packet = sock.recv(1024) psql_salt=[] if packet[0]=='R': a=str([packet[4]]) b=int(a[4:6],16) authentication_type=str([packet[8]]) c=int(authentication_type[4:6],16) if c==5:psql_salt=packet[9:] else:return 3 buf=[] salt = psql_salt lmd5= self.make_response(buf,user,pass_,salt) packet_length1=len(lmd5)+5+len('p') pp='p%c%c%c%c%s%c'%(0,0,0,packet_length1 - 1,lmd5,0) sock.send(pp) packet1 = sock.recv(1024) if packet1[0] == "R": return "username:%s,password:%s" % (user,pass_) except Exception,e: return 3 def redis(self,user,pass_): try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((self.ip,int(self.port))) s.send("INFO\r\n") result = s.recv(1024) if "redis_version" in result: return "unauthorized" elif "Authentication" in result: for pass_ in PASSWORD_DIC: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((self.ip,int(self.port))) s.send("AUTH %s\r\n"%(pass_)) result = s.recv(1024) if '+OK' in result: return "username:%s,password:%s" % (user,pass_) except Exception,e: return 3 def mssql(self,user,pass_):#author:hos@YSRC try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.ip,int(self.port))) ##print type(self.ip),type(self.port) hh=binascii.b2a_hex(self.ip) husername=binascii.b2a_hex(user) lusername=len(user) lpassword=len(pass_) ladd=len(self.ip)+len(str(self.port))+1 hladd=hex(ladd).replace('0x','') hpwd=binascii.b2a_hex(pass_) pp=binascii.b2a_hex(str(self.port)) address=hh+'3a'+pp hhost= binascii.b2a_hex(self.ip) data="0200020000000000123456789000000000000000000000000000000000000000000000000000ZZ5440000000000000000000000000000000000000000000000000000000000X3360000000000000000000000000000000000000000000000000000000000Y373933340000000000000000000000000000000000000000000000000000040301060a09010000000002000000000070796d7373716c000000000000000000000000000000000000000000000007123456789000000000000000000000000000000000000000000000000000ZZ3360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Y0402000044422d4c6962726172790a00000000000d1175735f656e676c69736800000000000000000000000000000201004c000000000000000000000a000000000000000000000000000069736f5f31000000000000000000000000000000000000000000000000000501353132000000030000000000000000" data1=data.replace(data[16:16+len(address)],address) data2=data1.replace(data1[78:78+len(husername)],husername) data3=data2.replace(data2[140:140+len(hpwd)],hpwd) if lusername>=16: data4=data3.replace('0X',str(hex(lusername)).replace('0x','')) else: data4=data3.replace('X',str(hex(lusername)).replace('0x','')) if lpassword>=16: data5=data4.replace('0Y',str(hex(lpassword)).replace('0x','')) else: data5=data4.replace('Y',str(hex(lpassword)).replace('0x','')) hladd = hex(ladd).replace('0x', '') data6=data5.replace('ZZ',str(hladd)) data7=binascii.a2b_hex(data6) sock.send(data7) packet=sock.recv(1024) ##print packet if 'database' in packet: return "username:%s,password:%s" % (user,pass_) ##print user, pass_ except: return False def mongodb(self,user,pass_): try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((self.ip,int(self.port))) data = binascii.a2b_hex("3a000000a741000000000000d40700000000000061646d696e2e24636d640000000000ffffffff130000001069736d6173746572000100000000") s.send(data) result = s.recv(1024) if "ismaster" in result: getlog_data = binascii.a2b_hex("480000000200000000000000d40700000000000061646d696e2e24636d6400000000000100000021000000026765744c6f670010000000737461727475705761726e696e67730000") s.send(getlog_data) result = s.recv(1024) if "totalLinesWritten" in result: return "unauthorized" else:return 3 except Exception,e: return 3 def memcached(self,user,pass_): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((self.ip,int(self.port))) s.send("stats\r\n") result = s.recv(1024) if "version" in result: return "unauthorized" def elasticsearch(self,user,pass_): url = "http://"+self.ip+":"+str(self.port)+"/_cat" data = urllib2.urlopen(url).read() if '/_cat/master' in data: return "unauthorized" else: return 3 def telnet(self,user,pass_): try: tn = telnetlib.Telnet(self.ip,int(self.port),self.timeout) #tn.set_debuglevel(3) time.sleep(0.5) os = tn.read_some() except Exception ,e: return 3 user_match="(?i)(login|user|username)" pass_match='(?i)(password|pass)' login_match='#|\$|>' if re.search(user_match,os): try: tn.write(str(user)+'\r\n') tn.read_until(pass_match,timeout=2) tn.write(str(pass_)+'\r\n') login_info=tn.read_until(login_match,timeout=3) tn.close() if re.search(login_match,login_info): return "username:%s,password:%s" % (user,pass_) except Exception,e: pass else: try: info=tn.read_until(user_match,timeout=2) except Exception,e: return 3 if re.search(user_match,info): try: tn.write(str(user)+'\r\n') tn.read_until(pass_match,timeout=2) tn.write(str(pass_)+'\r\n') login_info=tn.read_until(login_match,timeout=3) tn.close() if re.search(login_match,login_info): return "username:%s,password:%s" % (user,pass_) except Exception,e: return 3 elif re.search(pass_match,info): tn.read_until(pass_match,timeout=2) tn.write(str(pass_)+'\r\n') login_info=tn.read_until(login_match,timeout=3) tn.close() if re.search(login_match,login_info): return "password:%s" % (pass_) def get_hash(self,password, scramble): hash_stage1 = hashlib.sha1(password).digest() hash_stage2 = hashlib.sha1(hash_stage1).digest() to = hashlib.sha1(scramble+hash_stage2).digest() reply = [ord(h1) ^ ord(h3) for (h1, h3) in zip(hash_stage1, to)] hash = struct.pack('20B', *reply) return hash def get_scramble(self,packet): scramble,plugin = '','' try: tmp = packet[15:] m = re.findall("\x00?([\x01-\x7F]{7,})\x00", tmp) if len(m)>3:del m[0] scramble = m[0] + m[1] except: return '','' try: plugin = m[2] except: pass return plugin,scramble def get_auth_data(self,user,password,scramble,plugin): user_hex = binascii.b2a_hex(user) pass_hex = binascii.b2a_hex(self.get_hash(password,scramble)) data = "85a23f0000000040080000000000000000000000000000000000000000000000" + user_hex + "0014" + pass_hex if plugin:data+=binascii.b2a_hex(plugin)+ "0055035f6f73076f737831302e380c5f636c69656e745f6e616d65086c69626d7973716c045f7069640539323330360f5f636c69656e745f76657273696f6e06352e362e3231095f706c6174666f726d067838365f3634" len_hex = hex(len(data)/2).replace("0x","") auth_data = len_hex + "000001" +data return binascii.a2b_hex(auth_data) def make_response(self,buf,username,password,salt): pu=hashlib.md5(password+username).hexdigest() buf=hashlib.md5(pu+salt).hexdigest() return 'md5'+buf class SendPingThr(threading.Thread): def __init__(self, ipPool, icmpPacket, icmpSocket, timeout=3): threading.Thread.__init__(self) self.Sock = icmpSocket self.ipPool = ipPool self.packet = icmpPacket self.timeout = timeout self.Sock.settimeout(timeout + 1) def run(self): time.sleep(0.01) for ip in self.ipPool: try: self.Sock.sendto(self.packet, (ip, 0)) except socket.timeout: break time.sleep(self.timeout) class Nscan: def __init__(self, timeout=3): self.timeout = timeout self.__data = struct.pack('d', time.time()) self.__id = os.getpid() if self.__id >= 65535:self.__id = 65534 @property def __icmpSocket(self): Sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.getprotobyname("icmp")) return Sock def __inCksum(self, packet): if len(packet) & 1: packet = packet + '\0' words = array.array('h', packet) sum = 0 for word in words: sum += (word & 0xffff) sum = (sum >> 16) + (sum & 0xffff) sum = sum + (sum >> 16) return (~sum) & 0xffff @property def __icmpPacket(self): header = struct.pack('bbHHh', 8, 0, 0, self.__id, 0) packet = header + self.__data chkSum = self.__inCksum(packet) header = struct.pack('bbHHh', 8, 0, chkSum, self.__id, 0) return header + self.__data def mPing(self, ipPool): Sock = self.__icmpSocket Sock.settimeout(self.timeout) packet = self.__icmpPacket recvFroms = set() sendThr = SendPingThr(ipPool, packet, Sock, self.timeout) sendThr.start() while True: try: ac_ip = Sock.recvfrom(1024)[1][0] if ac_ip not in recvFroms: log("active",ac_ip,0,None) recvFroms.add(ac_ip) except Exception: pass finally: if not sendThr.isAlive(): break return recvFroms & ipPool def get_ac_ip(ip_list): try: s = Nscan() ipPool = set(ip_list) return s.mPing(ipPool) except Exception,e: print 'The current user permissions unable to send icmp packets' return ip_list class ThreadNum(threading.Thread): def __init__(self,queue): threading.Thread.__init__(self) self.queue = queue def run(self): while True: try: if queue.empty():break queue_task = self.queue.get() except: break try: task_type,task_host,task_port = queue_task.split(":") if task_type == 'portscan': data = scan_port(task_host,task_port) if data: server_name = server_discern(task_host,task_port,data) if server_name: log('discern',task_host,task_port,server_name) queue.put(":".join([server_name,task_host,task_port])) else: result = pass_crack(task_type,task_host,task_port) if result and result !=3:log(task_type,task_host,task_port,result) except Exception,e: print e continue def scan_port(host,port): try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((str(host),int(port))) log('portscan',host,port) except Exception,e: return False try: data = sock.recv(512) if len(data) > 2: return data else: sock.send('a\n\n') data = sock.recv(512) sock.close() if len(data) > 2: return data else: return 'NULL' except Exception,e: sock.close() return 'NULL' def log(scan_type,host,port,info=''): mutex.acquire() time_str = time.strftime('%X', time.localtime( time.time())) if scan_type == 'portscan': print "[%s] %s:%d open"%(time_str,host,int(port)) elif scan_type == 'discern': print "[%s] %s:%d is %s"%(time_str,host,int(port),info) elif scan_type == 'active': print "[%s] %s active" % (time_str, host) elif info: log = "[*%s] %s:%d %s %s"%(time_str,host,int(port),scan_type,info) print log log_file = open('result.log','a') log_file.write(log+"\r\n") log_file.close() mutex.release() def server_discern(host,port,data): for mark_info in REGEX: try: name,default_port,reg = mark_info if reg and data <> 'NULL': matchObj = re.search(reg,data,re.I|re.M) if matchObj: return name elif int(default_port) == int(port): return name except Exception,e: #print e continue def pass_crack(server_type,host,port): m = Crack(host,port,server_type,TIMEOUT) return m.run() def get_password_dic(path): pass_list = [] try: file_ = open(path,'r') for password in file_: pass_list.append(password.strip()) file_.close() return pass_list except: return 'read dic error' def get_ip_list(ip): ip_list = [] iptonum = lambda x:sum([256**j*int(i) for j,i in enumerate(x.split('.')[::-1])]) numtoip = lambda x: '.'.join([str(x/(256**i)%256) for i in range(3,-1,-1)]) if '-' in ip: ip_range = ip.split('-') ip_start = long(iptonum(ip_range[0])) ip_end = long(iptonum(ip_range[1])) ip_count = ip_end - ip_start if ip_count >= 0 and ip_count <= 65536: for ip_num in range(ip_start,ip_end+1): ip_list.append(numtoip(ip_num)) else: print '-h wrong format' elif '.ini' in ip: ip_config = open(ip,'r') for ip in ip_config: ip_list.extend(get_ip_list(ip.strip())) ip_config.close() else: ip_split=ip.split('.') net = len(ip_split) if net == 2: for b in range(1,255): for c in range(1,255): ip = "%s.%s.%d.%d"%(ip_split[0],ip_split[1],b,c) ip_list.append(ip) elif net == 3: for c in range(1,255): ip = "%s.%s.%s.%d"%(ip_split[0],ip_split[1],ip_split[2],c) ip_list.append(ip) elif net ==4: ip_list.append(ip) else: print "-h wrong format" return ip_list def t_join(m_count): tmp_count = 0 i = 0 if I < m_count: count = len(ip_list) + 1 else: count = m_count while True: time.sleep(4) ac_count = threading.activeCount() #print ac_count,count if ac_count < count and ac_count == tmp_count: i+=1 else: i=0 tmp_count = ac_count #print ac_count,queue.qsize() if (queue.empty() and threading.activeCount() <= 1) or i > 5: break def put_queue(ip_list,port_list): for ip in ip_list: for port in port_list: queue.put(":".join(['portscan',ip,port])) if __name__=="__main__": msg = ''' Usage: python F-Scrack.py -h 192.168.1 [-p 21,80,3306] [-m 50] [-t 10] [-d pass.txt] [-n] ''' if len(sys.argv) < 2: print msg try: options,args = getopt.getopt(sys.argv[1:],"h:p:m:t:d:n") ip = '' port = '21,23,1433,3306,5432,6379,9200,11211,27017' m_count = 100 ping = True for opt,arg in options: if opt == '-h': ip = arg elif opt == '-p': port = arg elif opt == '-m': m_count = int(arg) elif opt == '-t': TIMEOUT = int(arg) elif opt == '-n': ping = False elif opt == '-d': PASSWORD_DIC = get_password_dic(arg) socket.setdefaulttimeout(TIMEOUT) if ip: ip_list = get_ip_list(ip) if ping:ip_list = get_ac_ip(ip_list) port_list = port.split(',') for ip_str in ip_list: for port_int in port_list: I+=1 queue.put(':'.join(['portscan',ip_str,port_int])) for i in range(m_count): t = ThreadNum(queue) t.setDaemon(True) t.start() t_join(m_count) except Exception,e: print msg print e
40.6629
1,195
0.56558
2,494
21,592
4.757017
0.170409
0.016183
0.018881
0.009862
0.236177
0.166891
0.143459
0.118004
0.114801
0.111598
0
0.151377
0.300296
21,592
530
1,196
40.739623
0.633903
0.0113
0
0.322896
0
0.005871
0.179121
0.1036
0
1
0.000844
0
0
0
null
null
0.11546
0.029354
null
null
0.021526
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
1
0
0
0
0
0
4
8a4da328e1d87cb266a94336486dad6b10c03226
44
py
Python
bot/plugins/eval/__init__.py
best-coloc-ever/globibot
a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176
[ "MIT" ]
14
2016-02-03T16:47:01.000Z
2019-12-09T14:24:25.000Z
bot/plugins/eval/__init__.py
best-coloc-ever/globibot
a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176
[ "MIT" ]
11
2016-08-19T22:00:25.000Z
2022-01-13T00:39:48.000Z
bot/plugins/eval/__init__.py
best-coloc-ever/globibot
a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176
[ "MIT" ]
6
2016-08-19T21:30:58.000Z
2019-09-27T05:24:08.000Z
from .plugin import Eval plugin_cls = Eval
11
24
0.772727
7
44
4.714286
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.181818
44
3
25
14.666667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8a4f3b0dbfb9883bdf679622839e86b7c2abdc10
133
py
Python
ban/urls.py
Camnooten/django-ban
95fcd5c738d1d4d7a5233c5cc9f2b1a104460f9a
[ "MIT" ]
4
2017-05-14T14:30:20.000Z
2019-06-07T17:23:58.000Z
ban/urls.py
Camnooten/django-ban
95fcd5c738d1d4d7a5233c5cc9f2b1a104460f9a
[ "MIT" ]
null
null
null
ban/urls.py
Camnooten/django-ban
95fcd5c738d1d4d7a5233c5cc9f2b1a104460f9a
[ "MIT" ]
2
2018-08-10T23:57:27.000Z
2021-12-11T02:58:42.000Z
from django.conf.urls import patterns, url urlpatterns = patterns('', # url(r'^$', someview, name='someview'), )
22.166667
44
0.586466
14
133
5.571429
0.785714
0.282051
0
0
0
0
0
0
0
0
0
0
0.24812
133
5
45
26.6
0.78
0.285714
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8a595c2951d149eebfc396b124ba401e6a561717
81
py
Python
eat/apps.py
ask5/eatuxchallenge
c2db62d062c843964ba41e854de103569eaaaf4a
[ "MIT" ]
null
null
null
eat/apps.py
ask5/eatuxchallenge
c2db62d062c843964ba41e854de103569eaaaf4a
[ "MIT" ]
null
null
null
eat/apps.py
ask5/eatuxchallenge
c2db62d062c843964ba41e854de103569eaaaf4a
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EatConfig(AppConfig): name = 'eat'
13.5
33
0.728395
10
81
5.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.185185
81
5
34
16.2
0.893939
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8aa1657e621a67d756a58f8b7f66d31bf074811e
14,473
py
Python
Lib/test/test_parser.py
jasonadu/Python-2.5
93e24b88564de120b1296165b5c55975fdcb8a3c
[ "PSF-2.0" ]
739
2015-01-01T02:05:11.000Z
2022-03-30T15:26:16.000Z
Lib/test/test_parser.py
jasonadu/Python-2.5
93e24b88564de120b1296165b5c55975fdcb8a3c
[ "PSF-2.0" ]
33
2015-03-25T23:17:04.000Z
2021-08-19T08:25:22.000Z
Lib/test/test_parser.py
jasonadu/Python-2.5
93e24b88564de120b1296165b5c55975fdcb8a3c
[ "PSF-2.0" ]
167
2015-01-01T22:27:47.000Z
2022-03-17T13:29:19.000Z
import parser import unittest from test import test_support # # First, we test that we can generate trees from valid source fragments, # and that these valid trees are indeed allowed by the tree-loading side # of the parser module. # class RoundtripLegalSyntaxTestCase(unittest.TestCase): def roundtrip(self, f, s): st1 = f(s) t = st1.totuple() try: st2 = parser.sequence2st(t) except parser.ParserError, why: self.fail("could not roundtrip %r: %s" % (s, why)) self.assertEquals(t, st2.totuple(), "could not re-generate syntax tree") def check_expr(self, s): self.roundtrip(parser.expr, s) def check_suite(self, s): self.roundtrip(parser.suite, s) def test_yield_statement(self): self.check_suite("def f(): yield 1") self.check_suite("def f(): yield") self.check_suite("def f(): x += yield") self.check_suite("def f(): x = yield 1") self.check_suite("def f(): x = y = yield 1") self.check_suite("def f(): x = yield") self.check_suite("def f(): x = y = yield") self.check_suite("def f(): 1 + (yield)*2") self.check_suite("def f(): (yield 1)*2") self.check_suite("def f(): return; yield 1") self.check_suite("def f(): yield 1; return") self.check_suite("def f():\n" " for x in range(30):\n" " yield x\n") self.check_suite("def f():\n" " if (yield):\n" " yield x\n") def test_expressions(self): self.check_expr("foo(1)") self.check_expr("[1, 2, 3]") self.check_expr("[x**3 for x in range(20)]") self.check_expr("[x**3 for x in range(20) if x % 3]") self.check_expr("[x**3 for x in range(20) if x % 2 if x % 3]") self.check_expr("list(x**3 for x in range(20))") self.check_expr("list(x**3 for x in range(20) if x % 3)") self.check_expr("list(x**3 for x in range(20) if x % 2 if x % 3)") self.check_expr("foo(*args)") self.check_expr("foo(*args, **kw)") self.check_expr("foo(**kw)") self.check_expr("foo(key=value)") self.check_expr("foo(key=value, *args)") self.check_expr("foo(key=value, *args, **kw)") self.check_expr("foo(key=value, **kw)") self.check_expr("foo(a, b, c, *args)") self.check_expr("foo(a, b, c, *args, **kw)") self.check_expr("foo(a, b, c, **kw)") self.check_expr("foo + bar") self.check_expr("foo - bar") self.check_expr("foo * bar") self.check_expr("foo / bar") self.check_expr("foo // bar") self.check_expr("lambda: 0") self.check_expr("lambda x: 0") self.check_expr("lambda *y: 0") self.check_expr("lambda *y, **z: 0") self.check_expr("lambda **z: 0") self.check_expr("lambda x, y: 0") self.check_expr("lambda foo=bar: 0") self.check_expr("lambda foo=bar, spaz=nifty+spit: 0") self.check_expr("lambda foo=bar, **z: 0") self.check_expr("lambda foo=bar, blaz=blat+2, **z: 0") self.check_expr("lambda foo=bar, blaz=blat+2, *y, **z: 0") self.check_expr("lambda x, *y, **z: 0") self.check_expr("(x for x in range(10))") self.check_expr("foo(x for x in range(10))") def test_print(self): self.check_suite("print") self.check_suite("print 1") self.check_suite("print 1,") self.check_suite("print >>fp") self.check_suite("print >>fp, 1") self.check_suite("print >>fp, 1,") def test_simple_expression(self): # expr_stmt self.check_suite("a") def test_simple_assignments(self): self.check_suite("a = b") self.check_suite("a = b = c = d = e") def test_simple_augmented_assignments(self): self.check_suite("a += b") self.check_suite("a -= b") self.check_suite("a *= b") self.check_suite("a /= b") self.check_suite("a //= b") self.check_suite("a %= b") self.check_suite("a &= b") self.check_suite("a |= b") self.check_suite("a ^= b") self.check_suite("a <<= b") self.check_suite("a >>= b") self.check_suite("a **= b") def test_function_defs(self): self.check_suite("def f(): pass") self.check_suite("def f(*args): pass") self.check_suite("def f(*args, **kw): pass") self.check_suite("def f(**kw): pass") self.check_suite("def f(foo=bar): pass") self.check_suite("def f(foo=bar, *args): pass") self.check_suite("def f(foo=bar, *args, **kw): pass") self.check_suite("def f(foo=bar, **kw): pass") self.check_suite("def f(a, b): pass") self.check_suite("def f(a, b, *args): pass") self.check_suite("def f(a, b, *args, **kw): pass") self.check_suite("def f(a, b, **kw): pass") self.check_suite("def f(a, b, foo=bar): pass") self.check_suite("def f(a, b, foo=bar, *args): pass") self.check_suite("def f(a, b, foo=bar, *args, **kw): pass") self.check_suite("def f(a, b, foo=bar, **kw): pass") self.check_suite("@staticmethod\n" "def f(): pass") self.check_suite("@staticmethod\n" "@funcattrs(x, y)\n" "def f(): pass") self.check_suite("@funcattrs()\n" "def f(): pass") def test_class_defs(self): self.check_suite("class foo():pass") def test_import_from_statement(self): self.check_suite("from sys.path import *") self.check_suite("from sys.path import dirname") self.check_suite("from sys.path import (dirname)") self.check_suite("from sys.path import (dirname,)") self.check_suite("from sys.path import dirname as my_dirname") self.check_suite("from sys.path import (dirname as my_dirname)") self.check_suite("from sys.path import (dirname as my_dirname,)") self.check_suite("from sys.path import dirname, basename") self.check_suite("from sys.path import (dirname, basename)") self.check_suite("from sys.path import (dirname, basename,)") self.check_suite( "from sys.path import dirname as my_dirname, basename") self.check_suite( "from sys.path import (dirname as my_dirname, basename)") self.check_suite( "from sys.path import (dirname as my_dirname, basename,)") self.check_suite( "from sys.path import dirname, basename as my_basename") self.check_suite( "from sys.path import (dirname, basename as my_basename)") self.check_suite( "from sys.path import (dirname, basename as my_basename,)") def test_basic_import_statement(self): self.check_suite("import sys") self.check_suite("import sys as system") self.check_suite("import sys, math") self.check_suite("import sys as system, math") self.check_suite("import sys, math as my_math") def test_pep263(self): self.check_suite("# -*- coding: iso-8859-1 -*-\n" "pass\n") def test_assert(self): self.check_suite("assert alo < ahi and blo < bhi\n") # # Second, we take *invalid* trees and make sure we get ParserError # rejections for them. # class IllegalSyntaxTestCase(unittest.TestCase): def check_bad_tree(self, tree, label): try: parser.sequence2st(tree) except parser.ParserError: pass else: self.fail("did not detect invalid tree for %r" % label) def test_junk(self): # not even remotely valid: self.check_bad_tree((1, 2, 3), "<junk>") def test_illegal_yield_1(self): # Illegal yield statement: def f(): return 1; yield 1 tree = \ (257, (264, (285, (259, (1, 'def'), (1, 'f'), (260, (7, '('), (8, ')')), (11, ':'), (291, (4, ''), (5, ''), (264, (265, (266, (272, (275, (1, 'return'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (264, (265, (266, (272, (276, (1, 'yield'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (4, ''))), (6, ''))))), (4, ''), (0, '')))) self.check_bad_tree(tree, "def f():\n return 1\n yield 1") def test_illegal_yield_2(self): # Illegal return in generator: def f(): return 1; yield 1 tree = \ (257, (264, (265, (266, (278, (1, 'from'), (281, (1, '__future__')), (1, 'import'), (279, (1, 'generators')))), (4, ''))), (264, (285, (259, (1, 'def'), (1, 'f'), (260, (7, '('), (8, ')')), (11, ':'), (291, (4, ''), (5, ''), (264, (265, (266, (272, (275, (1, 'return'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (264, (265, (266, (272, (276, (1, 'yield'), (313, (292, (293, (294, (295, (297, (298, (299, (300, (301, (302, (303, (304, (305, (2, '1')))))))))))))))))), (4, ''))), (6, ''))))), (4, ''), (0, '')))) self.check_bad_tree(tree, "def f():\n return 1\n yield 1") def test_print_chevron_comma(self): # Illegal input: print >>fp, tree = \ (257, (264, (265, (266, (268, (1, 'print'), (35, '>>'), (290, (291, (292, (293, (295, (296, (297, (298, (299, (300, (301, (302, (303, (1, 'fp')))))))))))))), (12, ','))), (4, ''))), (0, '')) self.check_bad_tree(tree, "print >>fp,") def test_a_comma_comma_c(self): # Illegal input: a,,c tree = \ (258, (311, (290, (291, (292, (293, (295, (296, (297, (298, (299, (300, (301, (302, (303, (1, 'a')))))))))))))), (12, ','), (12, ','), (290, (291, (292, (293, (295, (296, (297, (298, (299, (300, (301, (302, (303, (1, 'c'))))))))))))))), (4, ''), (0, '')) self.check_bad_tree(tree, "a,,c") def test_illegal_operator(self): # Illegal input: a $= b tree = \ (257, (264, (265, (266, (267, (312, (291, (292, (293, (294, (296, (297, (298, (299, (300, (301, (302, (303, (304, (1, 'a'))))))))))))))), (268, (37, '$=')), (312, (291, (292, (293, (294, (296, (297, (298, (299, (300, (301, (302, (303, (304, (1, 'b'))))))))))))))))), (4, ''))), (0, '')) self.check_bad_tree(tree, "a $= b") def test_malformed_global(self): #doesn't have global keyword in ast tree = (257, (264, (265, (266, (282, (1, 'foo'))), (4, ''))), (4, ''), (0, '')) self.check_bad_tree(tree, "malformed global ast") class CompileTestCase(unittest.TestCase): # These tests are very minimal. :-( def test_compile_expr(self): st = parser.expr('2 + 3') code = parser.compilest(st) self.assertEquals(eval(code), 5) def test_compile_suite(self): st = parser.suite('x = 2; y = x + 3') code = parser.compilest(st) globs = {} exec code in globs self.assertEquals(globs['y'], 5) def test_compile_error(self): st = parser.suite('1 = 3 + 4') self.assertRaises(SyntaxError, parser.compilest, st) def test_main(): test_support.run_unittest( RoundtripLegalSyntaxTestCase, IllegalSyntaxTestCase, CompileTestCase, ) if __name__ == "__main__": test_main()
32.233853
79
0.42714
1,615
14,473
3.69969
0.132508
0.182259
0.180418
0.08251
0.665941
0.623264
0.563347
0.479163
0.431464
0.384937
0
0.082597
0.413598
14,473
448
80
32.305804
0.621421
0.036827
0
0.485934
1
0.002558
0.210129
0
0
0
0
0
0.015345
0
null
null
0.056266
0.069054
null
null
0.025575
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
4
8ab3dee0d364d00b7be2022fb06d46b72a824325
349
py
Python
src/aleph/model/db_bulk_operation.py
aleph-im/py-aleph
a18beb8b4eba36887ca85054ed2471c3680bdfde
[ "MIT" ]
null
null
null
src/aleph/model/db_bulk_operation.py
aleph-im/py-aleph
a18beb8b4eba36887ca85054ed2471c3680bdfde
[ "MIT" ]
null
null
null
src/aleph/model/db_bulk_operation.py
aleph-im/py-aleph
a18beb8b4eba36887ca85054ed2471c3680bdfde
[ "MIT" ]
null
null
null
from .base import BaseClass from typing import Type, Union from dataclasses import dataclass from pymongo import DeleteMany, DeleteOne, InsertOne, UpdateMany, UpdateOne MongoOperation = Union[DeleteMany, DeleteOne, InsertOne, UpdateMany, UpdateOne] @dataclass class DbBulkOperation: collection: Type[BaseClass] operation: MongoOperation
24.928571
79
0.810888
36
349
7.861111
0.555556
0.134276
0.19788
0.268551
0.332155
0
0
0
0
0
0
0
0.13467
349
13
80
26.846154
0.937086
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.444444
0
0.777778
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8ac005e00e3d660bdee64b78053a0c9bbcbab0e4
67
py
Python
model.py
OuedraogoAbdoul/skin_diseases
ca23f4bb95b78e976885f296efd0368a28463af3
[ "MIT" ]
null
null
null
model.py
OuedraogoAbdoul/skin_diseases
ca23f4bb95b78e976885f296efd0368a28463af3
[ "MIT" ]
null
null
null
model.py
OuedraogoAbdoul/skin_diseases
ca23f4bb95b78e976885f296efd0368a28463af3
[ "MIT" ]
null
null
null
# this file contains pytorhc model to traning and predict the model
67
67
0.820896
11
67
5
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.164179
67
1
67
67
0.982143
0.970149
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
76f47841b1b95fe9659823047c84ead4c0e939d1
218
py
Python
spyderlib/utils/introspection/__init__.py
SylvainCorlay/spyder
b87bfa08abd53e1c97b59feeb51f665f6a632415
[ "MIT" ]
1
2016-05-04T23:12:27.000Z
2016-05-04T23:12:27.000Z
spyderlib/utils/introspection/__init__.py
SylvainCorlay/spyder
b87bfa08abd53e1c97b59feeb51f665f6a632415
[ "MIT" ]
null
null
null
spyderlib/utils/introspection/__init__.py
SylvainCorlay/spyder
b87bfa08abd53e1c97b59feeb51f665f6a632415
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © 2013 The Spyder Development Team # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Introspection utilities used by Spyder """
21.8
47
0.683486
29
218
5.034483
0.896552
0
0
0
0
0
0
0
0
0
0
0.028902
0.206422
218
9
48
24.222222
0.809249
0.87156
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
0a0bbaa3cebb24c5a74462a6107bd63ad5cc2dbd
1,618
py
Python
staticgennan/structure/toc.py
nandha1nks/Team4_EnergyEfficientStaticWebGen
894093f369bb94c7f980aa7fb205593552bef8a6
[ "BSD-2-Clause" ]
null
null
null
staticgennan/structure/toc.py
nandha1nks/Team4_EnergyEfficientStaticWebGen
894093f369bb94c7f980aa7fb205593552bef8a6
[ "BSD-2-Clause" ]
null
null
null
staticgennan/structure/toc.py
nandha1nks/Team4_EnergyEfficientStaticWebGen
894093f369bb94c7f980aa7fb205593552bef8a6
[ "BSD-2-Clause" ]
null
null
null
""" Deals with generating the per-page table of contents. For the sake of simplicity we use the Python-Markdown `toc` extension to generate a list of dicts for each toc item, and then store it as AnchorLinks to maintain compatibility with older versions of staticgennan. """ def get_toc(toc_tokens): toc = [_parse_toc_token(i) for i in toc_tokens] # For the table of contents, always mark the first element as active if len(toc): toc[0].active = True return TableOfContents(toc) class TableOfContents: """ Represents the table of contents for a given page. """ def __init__(self, items): self.items = items def __iter__(self): return iter(self.items) def __len__(self): return len(self.items) def __str__(self): return ''.join([str(item) for item in self]) class AnchorLink: """ A single entry in the table of contents. """ def __init__(self, title, id, level): self.title, self.id, self.level = title, id, level self.children = [] @property def url(self): return '#' + self.id def __str__(self): return self.indent_print() def indent_print(self, depth=0): indent = ' ' * depth ret = '{}{} - {}\n'.format(indent, self.title, self.url) for item in self.children: ret += item.indent_print(depth + 1) return ret def _parse_toc_token(token): anchor = AnchorLink(token['name'], token['id'], token['level']) for i in token['children']: anchor.children.append(_parse_toc_token(i)) return anchor
25.68254
79
0.632262
222
1,618
4.432432
0.369369
0.050813
0.060976
0.054878
0
0
0
0
0
0
0
0.0025
0.258344
1,618
62
80
26.096774
0.8175
0.263906
0
0.058824
1
0
0.030356
0
0
0
0
0
0
1
0.294118
false
0
0
0.147059
0.588235
0.088235
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
0a19f0db47030d09daa06287251a7bf782317522
47
py
Python
tools/protogen/protogen.py
labiraus/gomud
1ab53bc2e37cdc12bc2033b37516399a901035df
[ "MIT" ]
null
null
null
tools/protogen/protogen.py
labiraus/gomud
1ab53bc2e37cdc12bc2033b37516399a901035df
[ "MIT" ]
null
null
null
tools/protogen/protogen.py
labiraus/gomud
1ab53bc2e37cdc12bc2033b37516399a901035df
[ "MIT" ]
null
null
null
f = open("/test/test.txt", "r") print(f.read())
23.5
31
0.574468
9
47
3
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.085106
47
2
32
23.5
0.627907
0
0
0
0
0
0.3125
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
0a1be0c053c43a39a68f8bc964798734697cc919
9,579
py
Python
backend/api/v1/utils/token_handlers.py
B3zaleel/Cartedepoezii
217050d5ea1203a11a5ba9a74b3d497b5120cb9a
[ "MIT" ]
4
2022-03-19T09:25:14.000Z
2022-03-31T21:51:30.000Z
backend/api/v1/utils/token_handlers.py
B3zaleel/Cartedepoezii
217050d5ea1203a11a5ba9a74b3d497b5120cb9a
[ "MIT" ]
2
2022-03-24T01:02:13.000Z
2022-03-26T09:50:09.000Z
backend/api/v1/utils/token_handlers.py
B3zaleel/Cartedepoezii
217050d5ea1203a11a5ba9a74b3d497b5120cb9a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 '''A module for decoding and encoding tokens. ''' import os from cryptography.fernet import Fernet from datetime import datetime, timedelta from json import JSONDecoder, JSONEncoder from ..database import get_session, User class AuthToken: '''Represents an object for managing user authentication tokens.''' def __init__(self, user_id='', email='', secure_text='', expires=None): self.user_id = user_id self.email = email self.secure_text = secure_text if expires: self.expires = expires @property def user_id(self): return self.__userId @user_id.setter def user_id(self, value): if type(value) is str: self.__userId = value else: raise TypeError('Invalid type.') @property def email(self): return self.__email @email.setter def email(self, value): if type(value) is str: self.__email = value else: raise TypeError('Invalid type.') @property def secure_text(self): return self.__secureText @secure_text.setter def secure_text(self, value): if type(value) is str: self.__secureText = value else: raise TypeError('Invalid type.') @property def expires(self): return self.__expiryDate @expires.setter def expires(self, value): if type(value) is str: self.__expiryDate = datetime.fromisoformat(value) else: raise TypeError('Invalid type.') def is_expired(self): '''Checks if this token is expired. ''' if not self.expires: return False cur_time = datetime.utcnow() not_expired_conditions = [ cur_time.year <= self.expires.year, cur_time.month <= self.expires.month, cur_time.day <= self.expires.day, cur_time.hour <= self.expires.hour, cur_time.minute <= self.expires.minute, cur_time.second <= self.expires.second ] return all(not_expired_conditions) @staticmethod def decode(token: str): '''Decodes an authentication string into an AuthToken object.''' key = bytes(os.getenv('APP_SECRET_KEY'), 'utf-8') f = Fernet(key) db_session = get_session() try: auth_token_dict = JSONDecoder().decode( f.decrypt(bytes(token, 'utf-8')).decode('utf-8') ) valid_keys = { 'userId': str, 'email': str, 'secureText': str, 'expires': str } if type(auth_token_dict) is not dict: raise TypeError('Invalid token.') for key, val in auth_token_dict.items(): if key in valid_keys: if type(val) is not valid_keys[key]: raise TypeError('Invalid token.') else: raise KeyError('Invalid token.') cur_datetime = datetime.utcnow() exp_datetime = datetime.fromisoformat(auth_token_dict['expires']) if cur_datetime >= exp_datetime: raise ValueError('Token expired.') user = db_session.query(User).filter( User.id == auth_token_dict['userId'] ).first() valid_conds = ( user is not None, user and user.is_active, user and user.email == auth_token_dict['email'], user and user.password_hash == auth_token_dict['secureText'], ) if not all(valid_conds): raise ValueError('Invalid token.') db_session.close() auth_token = AuthToken( user_id=auth_token_dict['userId'], email=auth_token_dict['email'], secure_text=auth_token_dict['secureText'], expires = auth_token_dict['expires'] ) return auth_token except Exception as ex: print(ex) db_session.close() return None @staticmethod def encode(auth_token) -> str: '''Encodes an AuthToken object to an authentication string.''' key = bytes(os.getenv('APP_SECRET_KEY'), 'utf-8') f = Fernet(key) try: cur_datetime = datetime.utcnow() time_span = timedelta(days=30) exp_datetime = cur_datetime + time_span auth_token_txt = JSONEncoder().encode( { 'userId': auth_token.user_id, 'email': auth_token.email, 'secureText': auth_token.secure_text, 'expires': exp_datetime.isoformat(), } ) return f.encrypt(bytes(auth_token_txt, 'utf-8')).decode('utf-8') except Exception: return '' class ResetToken: '''Represents an object for managing user account reset tokens.''' def __init__(self, user_id='', email='', message='', expires=None): self.user_id = user_id self.email = email self.message = message if expires: self.expires = expires @property def user_id(self): return self.__userId @user_id.setter def user_id(self, value): if type(value) is str: self.__userId = value else: raise TypeError('Invalid type.') @property def email(self): return self.__email @email.setter def email(self, value): if type(value) is str: self.__email = value else: raise TypeError('Invalid type.') @property def message(self): return self.__message @message.setter def message(self, value): if type(value) is str: self.__message = value else: raise TypeError('Invalid type.') @property def expires(self): return self.__expiryDate @expires.setter def expires(self, value): if type(value) is str: self.__expiryDate = datetime.fromisoformat(value) else: raise TypeError('Invalid type.') def is_expired(self): '''Checks if this token is expired. ''' if not self.expires: return False cur_time = datetime.utcnow() not_expired_conditions = [ cur_time.year <= self.expires.year, cur_time.month <= self.expires.month, cur_time.day <= self.expires.day, cur_time.hour <= self.expires.hour, cur_time.minute <= self.expires.minute, cur_time.second <= self.expires.second ] return all(not_expired_conditions) @staticmethod def decode(token: str): '''Decodes a reset token string into a ResetToken object.''' key = bytes(os.getenv('APP_SECRET_KEY'), 'utf-8') f = Fernet(key) db_session = get_session() try: reset_token_dict = JSONDecoder().decode( f.decrypt(bytes(token, 'utf-8') ).decode('utf-8')) valid_keys = { 'userId': str, 'email': str, 'message': str, 'expires': str } if type(reset_token_dict) is not dict: raise TypeError('Invalid token.') for key, val in reset_token_dict.items(): if key in valid_keys: if type(val) is not valid_keys[key]: raise TypeError('Invalid token.') else: raise KeyError('Invalid token.') cur_datetime = datetime.utcnow() exp_datetime = datetime.fromisoformat(reset_token_dict['expires']) if cur_datetime >= exp_datetime: raise ValueError('Token expired.') user = db_session.query(User).filter( User.id == reset_token_dict['id'] ).first() valid_conds = ( user is not None, user and user.is_active, user and user.email == reset_token_dict['email'] ) if not all(valid_conds): raise ValueError('Invalid token.') db_session.close() reset_token = ResetToken( user_id=reset_token_dict['userId'], email=reset_token_dict['email'], message=reset_token_dict['message'], ) reset_token.expires = reset_token_dict['expires'], return reset_token except Exception: db_session.close() return None @staticmethod def encode(reset_token) -> str: '''Encodes a ResetToken object to a reset token string.''' key = bytes(os.getenv('APP_SECRET_KEY'), 'utf-8') f = Fernet(key) try: cur_datetime = datetime.utcnow() time_span = timedelta(days=30) exp_datetime = cur_datetime + time_span reset_token_txt = JSONEncoder().encode( { 'id': reset_token.user_id, 'email': reset_token.email, 'message': reset_token.message, 'expires': exp_datetime.isoformat(), } ) return f.encrypt(bytes(reset_token_txt, 'utf-8')).decode('utf-8') except Exception: return ''
32.581633
78
0.540975
1,023
9,579
4.867058
0.12219
0.037959
0.050613
0.024101
0.770034
0.738703
0.71661
0.705363
0.65716
0.65716
0
0.002773
0.359954
9,579
293
79
32.692833
0.80933
0.051258
0
0.683794
0
0
0.061608
0
0
0
0
0
0
1
0.094862
false
0.003953
0.019763
0.031621
0.201581
0.003953
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0a1d8ad62a4872135270a7e44cd56ab2e4af61e4
125
py
Python
entries/scikit-learn.py
Quansight/pyinstaller-test
04fe8ee28843fa995da5e80809fe2622765e2046
[ "BSD-3-Clause" ]
null
null
null
entries/scikit-learn.py
Quansight/pyinstaller-test
04fe8ee28843fa995da5e80809fe2622765e2046
[ "BSD-3-Clause" ]
null
null
null
entries/scikit-learn.py
Quansight/pyinstaller-test
04fe8ee28843fa995da5e80809fe2622765e2046
[ "BSD-3-Clause" ]
1
2021-04-08T11:26:01.000Z
2021-04-08T11:26:01.000Z
import multiprocessing multiprocessing.freeze_support() import sklearn print("scikit-learn version:", sklearn.__version__)
17.857143
51
0.832
13
125
7.615385
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.08
125
6
52
20.833333
0.86087
0
0
0
0
0
0.168
0
0
0
0
0
0
1
0
true
0
0.5
0
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
0
1
0
1
0
0
0
0
4
0a5b018f29a8828192bd970f63a916c548c7d6ff
182
py
Python
Regular_Expressions/RegEx_SingleCharacter_Match.py
Jadams29/Coding_Problems
780af79cfa3933922a06b571e13322ff517b87ef
[ "MIT" ]
null
null
null
Regular_Expressions/RegEx_SingleCharacter_Match.py
Jadams29/Coding_Problems
780af79cfa3933922a06b571e13322ff517b87ef
[ "MIT" ]
null
null
null
Regular_Expressions/RegEx_SingleCharacter_Match.py
Jadams29/Coding_Problems
780af79cfa3933922a06b571e13322ff517b87ef
[ "MIT" ]
null
null
null
import re randStr = "F.B.I. I.R.S. CIA" # Find the number of times #.#.#. occur so anycharacter.anycharacter.anycharacter. print("Matches :", len(re.findall(".\..\..\.", randStr)))
30.333333
82
0.648352
26
182
4.538462
0.807692
0.40678
0
0
0
0
0
0
0
0
0
0
0.120879
182
6
83
30.333333
0.7375
0.423077
0
0
0
0
0.346535
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
0a5f383a1e444e9defc99834eee7a080d26e921d
452
py
Python
compose/local/dask/daskworkerinit.py
garanews/orochi
ec037ad5836855cd1a734fa1bf40ecc5647cb824
[ "MIT" ]
121
2020-09-25T16:14:44.000Z
2022-03-09T21:21:36.000Z
compose/local/dask/daskworkerinit.py
garanews/orochi
ec037ad5836855cd1a734fa1bf40ecc5647cb824
[ "MIT" ]
382
2020-09-28T06:46:21.000Z
2022-03-31T11:02:19.000Z
compose/local/dask/daskworkerinit.py
garanews/orochi
ec037ad5836855cd1a734fa1bf40ecc5647cb824
[ "MIT" ]
10
2020-09-29T16:36:30.000Z
2022-01-18T14:02:09.000Z
import sys import os import django from volatility3 import framework framework.clear_cache() os.environ["DATABASE_URL"] = "postgres://{}:{}@{}:{}/{}".format( os.environ["POSTGRES_USER"], os.environ["POSTGRES_PASSWORD"], os.environ["POSTGRES_HOST"], os.environ["POSTGRES_PORT"], os.environ["POSTGRES_DB"], ) sys.path.insert(0, "/app/orochi") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") django.setup()
23.789474
72
0.707965
56
452
5.553571
0.535714
0.202572
0.273312
0
0
0
0
0
0
0
0
0.004951
0.106195
452
18
73
25.111111
0.764851
0
0
0
0
0
0.349558
0.150442
0
0
0
0
0
1
0
true
0.066667
0.266667
0
0.266667
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
0a6a2920215b5147df938fa4b832ef802b9b394e
389
py
Python
newcode/pcfg/match_date.py
rchatterjee/nocrack
16523cb3f316a2a4ed147fe23f942b485d27d605
[ "MIT" ]
21
2015-05-12T17:38:07.000Z
2021-01-10T19:54:55.000Z
newcode/pcfg/match_date.py
rchatterjee/nocrack
16523cb3f316a2a4ed147fe23f942b485d27d605
[ "MIT" ]
7
2015-08-27T10:57:40.000Z
2020-04-18T08:36:42.000Z
newcode/pcfg/match_date.py
rchatterjee/nocrack
16523cb3f316a2a4ed147fe23f942b485d27d605
[ "MIT" ]
14
2015-08-27T10:53:37.000Z
2022-03-24T15:48:47.000Z
import re reg = re.compile( r"^((\d{2}((0[13578]|1[02])(0[1-9]|[12]\d|3[01])|(0[13456789]|1[012])(0[1-9]|[12]\d|30)|02(0[1-9]|1\d|2[0-8])))|([02468][048]|[13579][26])0229)$") # mmddyyyy reg = re.compile(r"(?P<mmddyyyy>^(0\d|1[0-2])([0-3][0-9])((19|2[01])([0-9]{2}))$|\ ?P<ddmmyyyy>^([0-3][0-9])(0\d|1[0-2])((19|2[01])([0-9]{2}))$)") print(re.match(reg, '03042013').group('mmddyyyy'))
43.222222
150
0.514139
89
389
2.247191
0.359551
0.04
0.045
0.13
0.19
0.08
0
0
0
0
0
0.286486
0.048843
389
8
151
48.625
0.254054
0.020566
0
0
0
0.5
0.416887
0.37467
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.166667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0a6bb4c4ca7caad03012f6c25f6b86e9accc5c03
76
py
Python
mathematics/__init__.py
TheBiggerFish/fishpy
632a7c603a33ad694650aa2bed058931775a4259
[ "MIT" ]
null
null
null
mathematics/__init__.py
TheBiggerFish/fishpy
632a7c603a33ad694650aa2bed058931775a4259
[ "MIT" ]
null
null
null
mathematics/__init__.py
TheBiggerFish/fishpy
632a7c603a33ad694650aa2bed058931775a4259
[ "MIT" ]
null
null
null
"""This module provides a selection of classes pertaining to mathematics"""
38
75
0.789474
10
76
6
1
0
0
0
0
0
0
0
0
0
0
0
0.131579
76
1
76
76
0.909091
0.907895
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
6a6a72568deacc1c080b6592d27976a0c8523f3b
167
py
Python
equilib/grid_sample/__init__.py
jbyu/HorizonNet
360261c9f5f8acd5d6d8becc9e790b1995f39358
[ "MIT" ]
null
null
null
equilib/grid_sample/__init__.py
jbyu/HorizonNet
360261c9f5f8acd5d6d8becc9e790b1995f39358
[ "MIT" ]
null
null
null
equilib/grid_sample/__init__.py
jbyu/HorizonNet
360261c9f5f8acd5d6d8becc9e790b1995f39358
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from . import numpy_grid_sample as numpy_func from . import torch_grid_sample as torch_func __all__ = [ "numpy_func", "torch_func", ]
16.7
45
0.724551
25
167
4.36
0.52
0.183486
0.220183
0
0
0
0
0
0
0
0
0.007299
0.179641
167
9
46
18.555556
0.788321
0.125749
0
0
0
0
0.137931
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
6a6baea4d8b83694c88b798a48d9f89d8518cc73
8,198
py
Python
tests/xml/test_utility.py
ccarocean/python-rads
fec1cfccbdafb7e372b66a76132c59f3d2a6beb3
[ "MIT" ]
null
null
null
tests/xml/test_utility.py
ccarocean/python-rads
fec1cfccbdafb7e372b66a76132c59f3d2a6beb3
[ "MIT" ]
3
2019-06-27T19:00:35.000Z
2020-03-07T09:43:24.000Z
tests/xml/test_utility.py
ccarocean/python-rads
fec1cfccbdafb7e372b66a76132c59f3d2a6beb3
[ "MIT" ]
1
2019-05-31T01:04:26.000Z
2019-05-31T01:04:26.000Z
import io from textwrap import dedent import pytest # type: ignore from rads.xml import ParseError from rads.xml.utility import ( fromstring, fromstringlist, parse, rads_fixer, rootless_fixer, strip_blanklines, strip_comments, strip_processing_instructions, ) def test_strip_comments_single_line_comments(): xml = """\ <!--single line comment!--> <a>Hello World</a> <!--single line comment!--> <a>Goodbye</a> """ assert strip_comments(dedent(xml)).splitlines() == [ "", "<a>Hello World</a>", "", "<a>Goodbye</a>", ] def test_strip_comments_inline_comments(): xml = """\ <!--inline comment!--> <a>Hello World</a> <!--inline comment!--> <a>Goodbye</a> """ assert strip_comments(dedent(xml)).splitlines() == [ " <a>Hello World</a> ", "<a>Goodbye</a>", ] def test_strip_comments_multiline_comments(): xml = """\ <a>Hello World</a> <!--multi line comment--> <a>Goodbye</a> <!--another multi line comment--> """ assert strip_comments(dedent(xml)).splitlines() == [ "<a>Hello World</a>", " <a>Goodbye</a> ", ] def test_strip_processing_instructions(): xml = """\ <?xml version="1.0"?> <a>Hello World</a> """ assert strip_processing_instructions(dedent(xml)).splitlines() == [ "", "<a>Hello World</a>", ] def test_strip_blanklines(): xml = """\ \t \t \t <a>Hello World</a> <a>Goodbye</a> """ # noqa: W293 assert strip_blanklines(dedent(xml)).splitlines() == [ "<a>Hello World</a>", "<a>Goodbye</a>", ] def test_rads_fixer(): xml = """\ <?xml version="1.0"?> <!--This is a RADS XML file.--> <var name="range_s"> <compress>int3 1e-4</compress> </var> <satellite>ENVISAT1</satellite> """ assert rads_fixer(dedent(xml)).splitlines() == [ '<?xml version="1.0"?>', "<__ROOTLESS__>", "<!--This is a RADS XML file.-->", '<var name="range_s">', " <compress>int4 1e-4</compress>", "</var>", "<satellite>ENVISAT1</satellite>", "</__ROOTLESS__>", ] def test_rootless_fixer(): xml = """\ <a>Hello World</a> <a>Goodbye</a> """ assert rootless_fixer(dedent(xml)).splitlines() == [ "<__ROOTLESS__>", "<a>Hello World</a>", "<a>Goodbye</a>", "</__ROOTLESS__>", ] def test_rootless_fixer_with_empty_file(): xml = """\ <?xml version="1.0"?> <!-- This is an empty rootless XML file--> """ assert rootless_fixer(dedent(xml)).splitlines() == [ '<?xml version="1.0"?>', "<__ROOTLESS__>", "<!-- This is an empty rootless XML file-->", "</__ROOTLESS__>", ] assert rootless_fixer(dedent(xml), preserve_empty=False).splitlines() == [ '<?xml version="1.0"?>', "<__ROOTLESS__>", "<!-- This is an empty rootless XML file-->", "</__ROOTLESS__>", ] assert ( rootless_fixer(dedent(xml), preserve_empty=True).splitlines() == dedent(xml).splitlines() ) # NOTE: A full path file is used below since the API is allowed to expand to a # full path which breaks comparisons. def test_fromstring(): xml = """\ <message> <sender>John Smith</sender> <content>Hello World</content> </message> """ root = fromstring(dedent(xml)) assert root.tag == "message" assert root.down().tag == "sender" assert root.down().text == "John Smith" assert root.down().next().tag == "content" assert root.down().next().text == "Hello World" def test_fromstring_with_file(): xml = """\ <a>Hello World</a> """ root = fromstring(dedent(xml), file="/a_file.xml") assert root.file == "/a_file.xml" def test_fromstring_with_empty_xml(): # processing instructions and comments do not count as content xml = """\ <?xml version="1.0"?> <!--single line comment!--> """ with pytest.raises(ParseError): fromstring(dedent(xml)) def test_fromstring_with_empty_xml_and_file(): # processing instructions and comments do not count as content xml = """\ <?xml version="1.0"?> <!--single line comment!--> """ with pytest.raises(ParseError) as exc_info: fromstring(dedent(xml), file="/a_file.xml") assert exc_info.value.filename == "/a_file.xml" def test_fromstring_with_fixer(): xml = """\ <message> <sender>John Smith</sender> <content>Hello World</content> </message> """ def fixer(text): return text.replace("John Smith", "Nobody").replace("Hello World", "Goodbye") root = fromstring(dedent(xml), fixer=fixer) assert root.tag == "message" assert root.down().tag == "sender" assert root.down().text == "Nobody" assert root.down().next().tag == "content" assert root.down().next().text == "Goodbye" def test_fromstringlist(): xml = [ "<message>", "<sender>John Smith</sender>", "<content>Hello World</content>", "</message>", ] root = fromstringlist(xml) assert root.tag == "message" assert root.down().tag == "sender" assert root.down().text == "John Smith" assert root.down().next().tag == "content" assert root.down().next().text == "Hello World" def test_fromstringlist_with_file(): xml = ["<a>Hello World</a>"] root = fromstringlist(xml, file="/a_file.xml") assert root.file == "/a_file.xml" def test_fromstringlist_with_empty_xml(): # processing instructions and comments do not count as content xml = ['<?xml version="1.0"?>', "<!--single line comment!-->"] with pytest.raises(ParseError): fromstringlist(xml) def test_fromstringlist_with_empty_xml_and_file(): # processing instructions and comments do not count as content xml = ['<?xml version="1.0"?>', "<!--single line comment!-->"] with pytest.raises(ParseError) as exc_info: fromstringlist(xml, file="/a_file.xml") assert exc_info.value.filename == "/a_file.xml" def test_fromstringlist_with_fixer(): xml = [ "<message>", "<sender>John Smith</sender>", "<content>Hello World</content>", "</message>", ] def fixer(text): return text.replace("John Smith", "Nobody").replace("Hello World", "Goodbye") root = fromstringlist(xml, fixer=fixer) assert root.tag == "message" assert root.down().tag == "sender" assert root.down().text == "Nobody" assert root.down().next().tag == "content" assert root.down().next().text == "Goodbye" # TODO: Add parse unit tests. def test_parse(): xml = """\ <message> <sender>John Smith</sender> <content>Hello World</content> </message> """ file = io.StringIO(dedent(xml)) file.name = "/a_file.xml" root = parse(file) assert root.file == "/a_file.xml" assert root.tag == "message" assert root.down().tag == "sender" assert root.down().text == "John Smith" assert root.down().next().tag == "content" assert root.down().next().text == "Hello World" def test_parse_with_empty_file(): # processing instructions and comments do not count as content xml = """\ <?xml version="1.0"?> <!--single line comment!--> """ file = io.StringIO(dedent(xml)) file.name = "/a_file.xml" with pytest.raises(ParseError) as exc_info: parse(file) assert exc_info.value.filename == "/a_file.xml" def test_parse_with_fixer(): xml = """\ <message> <sender>John Smith</sender> <content>Hello World</content> </message> """ file = io.StringIO(dedent(xml)) file.name = "a_file.xml" def fixer(text): return text.replace("John Smith", "Nobody").replace("Hello World", "Goodbye") root = parse(file, fixer=fixer) assert root.tag == "message" assert root.down().tag == "sender" assert root.down().text == "Nobody" assert root.down().next().tag == "content" assert root.down().next().text == "Goodbye"
25.861199
85
0.583923
965
8,198
4.814508
0.108808
0.071029
0.07232
0.03616
0.811451
0.77895
0.763668
0.68037
0.66186
0.66186
0
0.005285
0.238351
8,198
316
86
25.943038
0.738789
0.057453
0
0.657371
0
0
0.353162
0.008035
0
0
0
0.003165
0.183267
1
0.095618
false
0
0.01992
0.011952
0.12749
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6a9373d21fc397f713b19144b7c287db5ea5659c
83
py
Python
backend/subq/apps.py
triippz-tech/TheraQ
e157b6dc482b7411845dfe28b4e50b1859002c9f
[ "MIT" ]
null
null
null
backend/subq/apps.py
triippz-tech/TheraQ
e157b6dc482b7411845dfe28b4e50b1859002c9f
[ "MIT" ]
null
null
null
backend/subq/apps.py
triippz-tech/TheraQ
e157b6dc482b7411845dfe28b4e50b1859002c9f
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SubqConfig(AppConfig): name = 'subq'
13.833333
33
0.73494
10
83
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.180723
83
5
34
16.6
0.897059
0
0
0
0
0
0.048193
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6a9a4d54903d0e973b40d62a5baf1eeac45ef674
128
py
Python
app/base/config.py
RDwook/tornadoStructrue
b0c35235ebebf51f2c7b95aee63a2904a0c76184
[ "Apache-2.0" ]
null
null
null
app/base/config.py
RDwook/tornadoStructrue
b0c35235ebebf51f2c7b95aee63a2904a0c76184
[ "Apache-2.0" ]
null
null
null
app/base/config.py
RDwook/tornadoStructrue
b0c35235ebebf51f2c7b95aee63a2904a0c76184
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/1/31 上午8:30 # @Author : wook # @File : cord.py.py """ """
12.8
29
0.492188
19
128
3.315789
0.947368
0
0
0
0
0
0
0
0
0
0
0.113402
0.242188
128
9
30
14.222222
0.536082
0.84375
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
6aa49d51773af0c2ec0b05b28c915a285b0b4832
24,922
py
Python
src/onevision/cv/imgproc/transformation/affine.py
phlong3105/onevision
90552b64df7213e7fbe23c80ffd8a89583289433
[ "MIT" ]
2
2022-03-28T09:46:38.000Z
2022-03-28T14:12:32.000Z
src/onevision/cv/imgproc/transformation/affine.py
phlong3105/onevision
90552b64df7213e7fbe23c80ffd8a89583289433
[ "MIT" ]
null
null
null
src/onevision/cv/imgproc/transformation/affine.py
phlong3105/onevision
90552b64df7213e7fbe23c80ffd8a89583289433
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """An affine transformation is any transformation that preserves collinearity (i.e., all points lying on a line initially still lie on a line after transformation) and ratios of distances (e.g., the midpoint of a line segment remains the midpoint after transformation). In this sense, affine indicates a special class of projective transformations that do not move any objects from the affine space R^3 to the plane at infinity or conversely. An affine transformation is also called an affinity. Geometric contraction, expansion, dilation, reflection, rotation, shear, similarity transformations, spiral similarities, and translation are all affine transformations, as are their combinations. In general, an affine transformation is a composition of rotations, translations, dilations, and shears. While an affine transformation preserves proportions on lines, it does not necessarily preserve angles or lengths. Any triangle can be transformed into any other by an affine transformation, so all triangles are affine and, in this sense, affine is a generalization of congruent and similar. """ from __future__ import annotations import math from typing import Optional from typing import Union import cv2 import numpy as np from torch import nn from torch import Tensor from torchvision.transforms import functional_pil as F_pil from torchvision.transforms import functional_tensor as F_t from torchvision.transforms import InterpolationMode from torchvision.transforms.functional import _get_inverse_affine_matrix from onevision.cv.core import get_image_size from onevision.cv.core import pad_image from onevision.cv.core import PaddingMode from onevision.cv.imgproc.shape import affine_box from onevision.cv.imgproc.transformation.interpolation_mode import interpolation_mode_from_int from onevision.cv.imgproc.transformation.interpolation_mode import pil_modes_mapping from onevision.cv.utils import batch_image_processing from onevision.cv.utils import channel_last_processing from onevision.factory import TRANSFORMS from onevision.type import FloatAnyT from onevision.type import IntAnyT from onevision.type import ListOrTuple2T from onevision.type import TensorOrArray __all__ = [ "affine", "affine_image_box", "Affine", ] # MARK: - Functional def _affine_tensor_image( image : Tensor, angle : float, translate : IntAnyT, scale : float, shear : FloatAnyT, center : Optional[ListOrTuple2T[int]] = None, interpolation: InterpolationMode = InterpolationMode.BILINEAR, keep_shape : bool = True, pad_mode : Union[PaddingMode, str] = "constant", fill : Optional[FloatAnyT] = None, ) -> Tensor: """Apply affine transformation on the image keeping image center invariant. If the image is torch Tensor, it is expected to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. Args: image (Tensor[B, C, H, W]): Image to be transformed. angle (float): Rotation angle in degrees between -180 and 180, clockwise direction. translate (IntAnyT): Horizontal and vertical translations (post-rotation translation). scale (float): Overall scale. shear (FloatAnyT): Shear angle value in degrees between -180 to 180, clockwise direction. If a sequence is specified, the first value corresponds to a shear parallel to the x-axis, while the second value corresponds to a shear parallel to the y-axis. center (ListOrTuple2T[int], optional): Center of affine transformation. If `None`, use the center of the image. Default: `None`. interpolation (InterpolationMode): Desired interpolation enum defined by :class:`torchvision.transforms.InterpolationMode`. Default is `InterpolationMode.NEAREST`. If input is Tensor, only `InterpolationMode.NEAREST`, `InterpolationMode.BILINEAR` are supported. For backward compatibility integer values (e.g. `PIL.Image.NEAREST`) are still acceptable. keep_shape (bool): If `True`, expands the output image to make it large enough to hold the entire rotated image. If `False` or omitted, make the output image the same size as the input image. Note that the `keep_shape` flag assumes rotation around the center and no translation. Default: `True`. pad_mode (PaddingMode, str): One of the padding modes defined in `PaddingMode`. Default: `constant`. fill (FloatAnyT, optional): Pixel fill value for the area outside the transformed image. If given a number, the value is used for all bands respectively. Returns: image (Tensor[B, C, H, W]): Transformed image. """ if not isinstance(angle, (int, float)): raise TypeError(f"`angle` must be `int` or `float`. But got: {type(angle)}.") if isinstance(angle, int): angle = float(angle) if isinstance(translate, (int, float)): translate = [translate, translate] if isinstance(translate, tuple): translate = list(translate) if not isinstance(translate, (list, tuple)): raise TypeError(f"`translate` must be `list` or `tuple`. But got: {type(translate)}.") if len(translate) != 2: raise ValueError(f"`translate` must be a sequence of length 2. But got: {len(translate)}.") if isinstance(scale, int): scale = float(scale) if scale < 0.0: raise ValueError(f"`scale` must be positive. But got: {scale}.") if not isinstance(shear, (int, float, list, tuple)): raise TypeError(f"`shear` must be a single value or a sequence of length 2. But got: {shear}.") if isinstance(shear, (int, float)): shear = [shear, 0.0] if isinstance(shear, tuple): shear = list(shear) if len(shear) == 1: shear = [shear[0], shear[0]] if len(shear) != 2: raise ValueError(f"`translate` must be a sequence of length 2. But got: {len(shear)}.") if isinstance(interpolation, int): interpolation = interpolation_mode_from_int(interpolation) if not isinstance(interpolation, InterpolationMode): raise TypeError(f"`interpolation` must be a `InterpolationMode`. But got: {type(interpolation)}.") img = image.clone() h, w = get_image_size(img) center = (h * 0.5, w * 0.5) if center is None else center # H, W center = tuple(center[::-1]) # W, H if not isinstance(image, Tensor): # center = (img_size[0] * 0.5 + 0.5, img_size[1] * 0.5 + 0.5) # it is visually better to estimate the center without 0.5 offset # otherwise image rotated by 90 degrees is shifted vs output image of torch.rot90 or F_t.affine matrix = _get_inverse_affine_matrix(center, angle, translate, scale, shear) pil_interpolation = pil_modes_mapping[interpolation] return F_pil.affine(image, matrix=matrix, interpolation=pil_interpolation, fill=fill) # If keep shape, find the new width and height bounds if not keep_shape: matrix = _get_inverse_affine_matrix([0, 0], angle, [0, 0], 1.0, [0.0, 0.0]) abs_cos = abs(matrix[0]) abs_sin = abs(matrix[1]) new_w = int(h * abs_sin + w * abs_cos) new_h = int(h * abs_cos + w * abs_sin) image = pad_image(image, pad_size=(new_h, new_w)) translate_f = [1.0 * t for t in translate] matrix = _get_inverse_affine_matrix([0, 0], angle, translate_f, scale, shear) return F_t.affine(image, matrix=matrix, interpolation=interpolation.value, fill=fill) @channel_last_processing def _affine_numpy_image( image : np.ndarray, angle : float, translate : IntAnyT, scale : float, shear : FloatAnyT, center : Optional[ListOrTuple2T[int]] = None, interpolation: InterpolationMode = InterpolationMode.BILINEAR, keep_shape : bool = True, pad_mode : Union[PaddingMode, str] = "constant", fill : Optional[FloatAnyT] = None, ) -> np.ndarray: """Apply affine transformation on the image keeping image center invariant. References: https://www.thepythoncode.com/article/image-transformations-using-opencv-in-python https://stackoverflow.com/questions/43892506/opencv-python-rotate-image-without-cropping-sides Args: image (np.ndarray[C, H, W]): Image to be transformed. The image is converted to channel last format during processing. angle (float): Rotation angle in degrees between -180 and 180, clockwise direction. translate (IntAnyT): Horizontal and vertical translations (post-rotation translation). scale (float): Overall scale. shear (FloatAnyT): Shear angle value in degrees between -180 to 180, clockwise direction. If a sequence is specified, the first value corresponds to a shear parallel to the x-axis, while the second value corresponds to a shear parallel to the y-axis. center (ListOrTuple2T[int], optional): Center of affine transformation. If `None`, use the center of the image. Default: `None`. interpolation (InterpolationMode): Desired interpolation enum defined by :class:`torchvision.transforms.InterpolationMode`. Default is `InterpolationMode.NEAREST`. If input is Tensor, only `InterpolationMode.NEAREST`, `InterpolationMode.BILINEAR` are supported. For backward compatibility integer values (e.g. `PIL.Image.NEAREST`) are still acceptable. keep_shape (bool): If `True`, expands the output image to make it large enough to hold the entire rotated image. If `False` or omitted, make the output image the same size as the input image. Note that the `keep_shape` flag assumes rotation around the center and no translation. Default: `True`. pad_mode (PaddingMode, str): One of the padding modes defined in `PaddingMode`. Default: `constant`. fill (FloatAnyT, optional): Pixel fill value for the area outside the transformed image. If given a number, the value is used for all bands respectively. Returns: image (np.ndarray[C, H, W]): Transformed image. """ if image.ndim != 3: raise ValueError(f"`image.ndim` must be 3. But got: {image.ndim}.") if not isinstance(angle, (int, float)): raise TypeError(f"`angle` must be `int` or `float`. But got: {type(angle)}.") if isinstance(angle, int): angle = float(angle) if isinstance(translate, (int, float)): translate = [translate, translate] if not isinstance(translate, (list, tuple)): raise TypeError(f"`translate` must be `list` or `tuple`. But got: {type(translate)}.") if isinstance(translate, tuple): translate = list(translate) if len(translate) != 2: raise ValueError(f"`translate` must be a sequence of length 2. But got: {len(translate)}.") if isinstance(scale, int): scale = float(scale) if scale < 0.0: raise ValueError(f"`scale` must be positive. But got: {scale}.") if not isinstance(shear, (int, float, list, tuple)): raise TypeError(f"`shear` must be a single value or a sequence of length 2. But got: {shear}.") if isinstance(shear, (int, float)): shear = [shear, 0.0] if isinstance(shear, tuple): shear = list(shear) if len(shear) == 1: shear = [shear[0], shear[0]] if len(shear) != 2: raise ValueError(f"`translate` must be a sequence of length 2. But got: {len(shear)}.") if isinstance(interpolation, int): interpolation = interpolation_mode_from_int(interpolation) if not isinstance(interpolation, InterpolationMode): raise TypeError(f"`interpolation` must be a `InterpolationMode`. But got: {type(interpolation)}.") img = image.copy() h, w = get_image_size(img) center = (h * 0.5, w * 0.5) if center is None else center # H, W center = tuple(center[::-1]) # W, H angle = -angle R = cv2.getRotationMatrix2D(center=center, angle=angle, scale=scale) # If keep shape, find the new width and height bounds if keep_shape: new_w = w new_h = h else: abs_cos = abs(R[0, 0]) abs_sin = abs(R[0, 1]) new_w = int(h * abs_sin + w * abs_cos) new_h = int(h * abs_cos + w * abs_sin) R[0, 2] += (new_w * 0.5 - center[0]) R[1, 2] += (new_h * 0.5 - center[1]) center = (new_w * 0.5, new_h * 0.5) # W, H T = translate S = [math.radians(-shear[0]), math.radians(-shear[1])] M = np.float32([[R[0, 0] , S[0] + R[0, 1], R[0, 2] + T[0] + (-S[0] * center[1])], [S[1] + R[1, 0], R[1, 1] , R[1, 2] + T[1] + (-S[1] * center[0])], [0 , 0 , 1]]) img = cv2.warpPerspective(img, M, (new_w, new_h)) return img @batch_image_processing def affine( image : TensorOrArray, angle : float, translate : IntAnyT, scale : float, shear : FloatAnyT, center : Optional[ListOrTuple2T[int]] = None, interpolation: InterpolationMode = InterpolationMode.BILINEAR, keep_shape : bool = True, pad_mode : Union[PaddingMode, str] = "constant", fill : Optional[FloatAnyT] = None, ) -> TensorOrArray: """Apply affine transformation on the image keeping image center invariant. Args: image (TensorOrArray[C, H, W]): Image to be transformed. angle (float): Rotation angle in degrees between -180 and 180, clockwise direction. translate (IntAnyT): Horizontal and vertical translations (post-rotation translation). scale (float): Overall scale shear (FloatAnyT): Shear angle value in degrees between -180 to 180, clockwise direction. If a sequence is specified, the first value corresponds to a shear parallel to the x axis, while the second value corresponds to a shear parallel to the y axis. center (ListOrTuple2T[int], optional): Center of affine transformation. If `None`, use the center of the image. Default: `None`. interpolation (InterpolationMode): Desired interpolation enum defined by :class:`torchvision.transforms.InterpolationMode`. Default is `InterpolationMode.NEAREST`. If input is Tensor, only `InterpolationMode.NEAREST`, `InterpolationMode.BILINEAR` are supported. For backward compatibility integer values (e.g. `PIL.Image.NEAREST`) are still acceptable. keep_shape (bool): If `True`, expands the output image to make it large enough to hold the entire rotated image. If `False` or omitted, make the output image the same size as the input image. Note that the `keep_shape` flag assumes rotation around the center and no translation. Default: `True`. pad_mode (PaddingMode, str): One of the padding modes defined in `PaddingMode`. Default: `constant`. fill (FloatAnyT, optional): Pixel fill value for the area outside the transformed image. If given a number, the value is used for all bands respectively. Returns: image (TensorOrArray[C, H, W]): Transformed image. """ if isinstance(image, Tensor): return _affine_tensor_image( image = image, angle = angle, translate = translate, scale = scale, shear = shear, center = center, interpolation = interpolation, keep_shape = keep_shape, pad_mode = pad_mode, fill = fill, ) elif isinstance(image, np.ndarray): return _affine_numpy_image( image = image, angle = angle, translate = translate, scale = scale, shear = shear, center = center, interpolation = interpolation, keep_shape = keep_shape, pad_mode = pad_mode, fill = fill, ) else: raise ValueError(f"Do not support {type(image)}.") def affine_image_box( image : TensorOrArray, box : TensorOrArray, angle : float, translate : IntAnyT, scale : float, shear : FloatAnyT, center : Optional[ListOrTuple2T[int]] = None, interpolation: InterpolationMode = InterpolationMode.BILINEAR, keep_shape : bool = True, pad_mode : Union[PaddingMode, str] = "constant", fill : Optional[FloatAnyT] = None, drop_ratio : float = 0.0, ) -> tuple[TensorOrArray, TensorOrArray]: """Apply affine transformation on the image keeping image center invariant. Args: image (TensorOrArray[C, H, W]): Image to be transformed. box (TensorOrArray[B, 4]): Bounding boxes. They are expected to be in (x1, y1, x2, y2) format with `0 <= x1 < x2` and `0 <= y1 < y2`. angle (float): Rotation angle in degrees between -180 and 180, clockwise direction. translate (IntAnyT): Horizontal and vertical translations (post-rotation translation). scale (float): Overall scale shear (FloatAnyT): Shear angle value in degrees between -180 to 180, clockwise direction. If a sequence is specified, the first value corresponds to a shear parallel to the x axis, while the second value corresponds to a shear parallel to the y axis. center (ListOrTuple2T[int], optional): Center of affine transformation. If `None`, use the center of the image. Default: `None`. interpolation (InterpolationMode): Desired interpolation enum defined by :class:`torchvision.transforms.InterpolationMode`. Default is `InterpolationMode.NEAREST`. If input is Tensor, only `InterpolationMode.NEAREST`, `InterpolationMode.BILINEAR` are supported. For backward compatibility integer values (e.g. `PIL.Image.NEAREST`) are still acceptable. keep_shape (bool): If `True`, expands the output image to make it large enough to hold the entire rotated image. If `False` or omitted, make the output image the same size as the input image. Note that the `keep_shape` flag assumes rotation around the center and no translation. Default: `True`. pad_mode (PaddingMode, str): One of the padding modes defined in `PaddingMode`. Default: `constant`. fill (FloatAnyT, optional): Pixel fill value for the area outside the transformed image. If given a number, the value is used for all bands respectively. drop_ratio (float): If the fraction of a bounding box left in the image after being clipped is less than `drop_ratio` the bounding box is dropped. If `drop_ratio==0`, don't drop any bounding boxes. Default: `0.0`. Returns: image (TensorOrArray[C, H, W]): Transformed image. box (TensorOrArray[B, 4]): Transformed box. """ image_size = get_image_size(image) return \ affine( image = image, angle = angle, translate = translate, scale = scale, shear = shear, center = center, interpolation = interpolation, keep_shape = keep_shape, pad_mode = pad_mode, fill = fill, ), \ affine_box( box = box, image_size = image_size, angle = angle, translate = translate, scale = scale, shear = shear, center = center, drop_ratio = drop_ratio, ) # MARK: - Modules @TRANSFORMS.register(name="affine") class Affine(nn.Module): """Apply affine transformation on the image keeping image center invariant. If the image is Tensor, it is expected to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. Args: angle (float): Rotation angle in degrees between -180 and 180, clockwise direction. translate (IntAnyT): Horizontal and vertical translations (post-rotation translation). scale (float): Overall scale shear (FloatAnyT): Shear angle value in degrees between -180 to 180, clockwise direction. If a sequence is specified, the first value corresponds to a shear parallel to the x axis, while the second value corresponds to a shear parallel to the y axis. center (ListOrTuple2T[int], optional): Center of affine transformation. If `None`, use the center of the image. Default: `None`. interpolation (InterpolationMode): Desired interpolation enum defined by :class:`torchvision.transforms.InterpolationMode`. Default is `InterpolationMode.NEAREST`. If input is Tensor, only `InterpolationMode.NEAREST`, `InterpolationMode.BILINEAR` are supported. For backward compatibility integer values (e.g. `PIL.Image.NEAREST`) are still acceptable. keep_shape (bool): If `True`, expands the output image to make it large enough to hold the entire rotated image. If `False` or omitted, make the output image the same size as the input image. Note that the `keep_shape` flag assumes rotation around the center and no translation. Default: `True`. pad_mode (PaddingMode, str): One of the padding modes defined in `PaddingMode`. Default: `constant`. fill (FloatAnyT, optional): Pixel fill value for the area outside the transformed image. If given a number, the value is used for all bands respectively. """ # MARK: Magic Functions def __init__( self, angle : float, translate : IntAnyT, scale : float, shear : FloatAnyT, center : Optional[ListOrTuple2T[int]] = None, interpolation: InterpolationMode = InterpolationMode.BILINEAR, keep_shape : bool = True, pad_mode : Union[PaddingMode, str] = "constant", fill : Optional[FloatAnyT] = None, ): super().__init__() self.angle = angle self.translate = translate self.scale = scale self.shear = shear self.center = center self.interpolation = interpolation self.fill = fill # MARK: Forward Pass def forward(self, image: TensorOrArray) -> TensorOrArray: """ Args: image (TensorOrArray[B, C, H, W]): Image to transform. Returns: image (TensorOrArray[B, C, H, W]): Transformed image. """ return affine( image = image, angle = self.angle, translate = self.translate, scale = self.scale, shear = self.shear, center = self.center, interpolation = self.interpolation, fill = self.fill, )
42.384354
106
0.603483
2,897
24,922
5.132551
0.118053
0.015132
0.022866
0.012778
0.750757
0.729975
0.716861
0.715314
0.697559
0.692582
0
0.012569
0.313659
24,922
587
107
42.456559
0.856709
0.493901
0
0.571956
0
0.00738
0.091561
0.003804
0
0
0
0
0
1
0.02214
false
0
0.092251
0
0.143911
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6aa8c56251a4c6421c9a1cf1d9ad4f1cd6ee35e4
500
py
Python
02 Algorithms/winter_hw/654_d_explosion2.py
ksetdekov/HSE_DS
619d5b84f9d9e97b58ca1f12c5914ec65456c2c8
[ "MIT" ]
1
2020-09-26T18:48:11.000Z
2020-09-26T18:48:11.000Z
02 Algorithms/winter_hw/654_d_explosion2.py
ksetdekov/HSE_DS
619d5b84f9d9e97b58ca1f12c5914ec65456c2c8
[ "MIT" ]
null
null
null
02 Algorithms/winter_hw/654_d_explosion2.py
ksetdekov/HSE_DS
619d5b84f9d9e97b58ca1f12c5914ec65456c2c8
[ "MIT" ]
null
null
null
N = int(input()) def explosion_3(n): n_pos_B = [0 for i in range(n)] n_pos_A = [0 for i in range(n)] n_pos_C = [0 for i in range(n)] n_pos_B[0] = 1 n_pos_A[0] = 1 n_pos_C[0] = 1 for i in range(1, n): n_pos_C[i] = n_pos_C[i - 1] + n_pos_B[i - 1] + n_pos_A[i - 1] n_pos_B[i] = n_pos_C[i - 1] + n_pos_B[i - 1] + n_pos_A[i - 1] n_pos_A[i] = n_pos_C[i - 1] + n_pos_B[i - 1] return n_pos_B[-1] + n_pos_A[-1] + n_pos_C[-1] print(explosion_3(N))
23.809524
69
0.534
124
500
1.814516
0.145161
0.355556
0.244444
0.186667
0.568889
0.533333
0.524444
0.524444
0.297778
0.297778
0
0.064607
0.288
500
20
70
25
0.567416
0
0
0
0
0
0
0
0
0
0
0
0
1
0.071429
false
0
0
0
0.142857
0.071429
0
0
1
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6ad1876c7e89ad3e57ccb0b5756df47947cc6fa7
239
py
Python
Module 1/Chapter4/4_05_catch_specific_exception.py
real-slim-chadi/Python_Master-the-Art-of-Design-Patterns
95ec92272374e330b04d931208abbb184c7c7908
[ "MIT" ]
73
2016-09-15T23:07:04.000Z
2022-03-05T15:09:48.000Z
Module 1/Chapter4/4_05_catch_specific_exception.py
real-slim-chadi/Python_Master-the-Art-of-Design-Patterns
95ec92272374e330b04d931208abbb184c7c7908
[ "MIT" ]
null
null
null
Module 1/Chapter4/4_05_catch_specific_exception.py
real-slim-chadi/Python_Master-the-Art-of-Design-Patterns
95ec92272374e330b04d931208abbb184c7c7908
[ "MIT" ]
51
2016-10-07T20:47:51.000Z
2021-12-22T21:00:24.000Z
def funny_division(anumber): try: return 100 / anumber except ZeroDivisionError: return "Silly wabbit, you can't divide by zero!" print(funny_division(0)) print(funny_division(50.0)) print(funny_division("hello"))
23.9
56
0.702929
32
239
5.125
0.65625
0.317073
0.329268
0.231707
0
0
0
0
0
0
0
0.036082
0.188285
239
9
57
26.555556
0.809278
0
0
0
0
0
0.1841
0
0
0
0
0
0
1
0.125
false
0
0
0
0.375
0.375
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6ae5d71824baf59b17e3531080ac85b5e7c53069
220
py
Python
yewdoc/remote/__init__.py
paul-wolf/yewdoc-client
590c78cd13001b105526f801ea52ee348ea14906
[ "BSD-3-Clause" ]
8
2017-01-31T12:50:06.000Z
2019-08-04T10:44:44.000Z
yewdoc/remote/__init__.py
paul-wolf/yewdoc-client
590c78cd13001b105526f801ea52ee348ea14906
[ "BSD-3-Clause" ]
5
2017-01-31T17:26:11.000Z
2017-02-06T09:22:23.000Z
yewdoc/remote/__init__.py
paul-wolf/yewdoc-client
590c78cd13001b105526f801ea52ee348ea14906
[ "BSD-3-Clause" ]
3
2017-01-31T17:13:25.000Z
2017-02-14T03:05:33.000Z
from .constants import RemoteStatus, STATUS_MSG from .remote import Remote from .s3remote import RemoteS3 from .exceptions import OfflineException, RemoteException REMOTES = {"RemoteREST": Remote, "RemoteS3": RemoteS3}
31.428571
57
0.813636
24
220
7.416667
0.583333
0
0
0
0
0
0
0
0
0
0
0.020513
0.113636
220
6
58
36.666667
0.892308
0
0
0
0
0
0.081818
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6ae6cfd4db035792c6a10cb77c316b9cc0432f60
689
py
Python
src/qrl/core/PoWValidator.py
scottdonaldau/QRL
fb78c1cdf227330ace46f590a36cc6a52c7af3fe
[ "MIT" ]
1
2020-07-12T23:40:48.000Z
2020-07-12T23:40:48.000Z
src/qrl/core/PoWValidator.py
scottdonaldau/QRL
fb78c1cdf227330ace46f590a36cc6a52c7af3fe
[ "MIT" ]
null
null
null
src/qrl/core/PoWValidator.py
scottdonaldau/QRL
fb78c1cdf227330ace46f590a36cc6a52c7af3fe
[ "MIT" ]
null
null
null
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import functools import threading from pyqryptonight.pyqryptonight import PoWHelper from qrl.core.Singleton import Singleton class PoWValidator(object, metaclass=Singleton): def __init__(self): self.lock = threading.Lock() self._powv = PoWHelper() def verify_input(self, mining_blob, target): return self._verify_input_cached(mining_blob, target) @functools.lru_cache(maxsize=5) def _verify_input_cached(self, mining_blob, target): return self._powv.verifyInput(mining_blob, target)
29.956522
69
0.754717
88
689
5.704545
0.556818
0.079681
0.12749
0.079681
0.119522
0.119522
0
0
0
0
0
0.003448
0.1582
689
22
70
31.318182
0.862069
0.21045
0
0
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0.307692
0.153846
0.769231
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
0a88976f5259b6b1b734d095d4b95585e8927688
112
py
Python
demo/testpermission_path/apps.py
LaEmma/sparrow_cloud
fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c
[ "MIT" ]
15
2019-09-24T09:32:32.000Z
2021-12-30T08:07:41.000Z
demo/testpermission_path/apps.py
LaEmma/sparrow_cloud
fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c
[ "MIT" ]
13
2019-09-06T03:20:02.000Z
2021-09-27T03:37:25.000Z
demo/testpermission_path/apps.py
LaEmma/sparrow_cloud
fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c
[ "MIT" ]
17
2019-09-02T06:31:05.000Z
2021-10-08T04:23:23.000Z
from django.apps import AppConfig class TestpermissionPathConfig(AppConfig): name = 'testpermission_path'
18.666667
42
0.803571
11
112
8.090909
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.133929
112
5
43
22.4
0.917526
0
0
0
0
0
0.169643
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
0a8e1fbf785076c65894b3480e77d2a840fa1562
198
py
Python
profiles_project/profiles_api/serializers.py
naidubobbili/profiles-rest-api
7290f26376f03c5fcbd3e2ea51e8877c881fb1c6
[ "MIT" ]
null
null
null
profiles_project/profiles_api/serializers.py
naidubobbili/profiles-rest-api
7290f26376f03c5fcbd3e2ea51e8877c881fb1c6
[ "MIT" ]
6
2021-03-19T11:32:38.000Z
2022-02-10T14:07:51.000Z
profiles_project/profiles_api/serializers.py
naidubobbili/profiles-rest-api
7290f26376f03c5fcbd3e2ea51e8877c881fb1c6
[ "MIT" ]
null
null
null
from rest_framework import serializers class HelloSerializer(serializers.Serializer): '''serializers a name field for testing our api view''' name=serializers.CharField(max_length=10)
28.285714
59
0.772727
24
198
6.291667
0.833333
0
0
0
0
0
0
0
0
0
0
0.011905
0.151515
198
6
60
33
0.886905
0.247475
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
0a9ee8d926069fb27fd0e4b52ba464b26284cd22
115
py
Python
Chapter05_code/Ch05_R02/some_model_ch15r02/__openerp__.py
PacktPublishing/Odoo-Development-Cookbook
5553110c0bc352c4541f11904e236cad3c443b8b
[ "MIT" ]
55
2016-05-23T16:05:50.000Z
2021-07-19T00:16:46.000Z
Chapter05_code/Ch05_R02/some_model_ch15r02/__openerp__.py
kogkog098/Odoo-Development-Cookbook
166c9b98efbc9108b30d719213689afb1f1c294d
[ "MIT" ]
1
2016-12-09T02:14:21.000Z
2018-07-02T09:02:20.000Z
Chapter05_code/Ch05_R02/some_model_ch15r02/__openerp__.py
kogkog098/Odoo-Development-Cookbook
166c9b98efbc9108b30d719213689afb1f1c294d
[ "MIT" ]
52
2016-06-01T20:03:59.000Z
2020-10-31T23:58:25.000Z
{ 'name': 'Chapter 05, Recipe 1 code', 'summary': 'Report errors to the user', 'depends': ['base'], }
19.166667
43
0.547826
14
115
4.5
1
0
0
0
0
0
0
0
0
0
0
0.034884
0.252174
115
5
44
23
0.697674
0
0
0
0
0
0.626087
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
0ab45b88ab31b4fd6090c4404af0ea543dd93430
1,585
py
Python
ProxyPool/proxypool/setting.py
binyoucai/ProxyPool
ed30ba57a7863a4e1e6df650a336dd84a45dbf78
[ "RSA-MD" ]
null
null
null
ProxyPool/proxypool/setting.py
binyoucai/ProxyPool
ed30ba57a7863a4e1e6df650a336dd84a45dbf78
[ "RSA-MD" ]
1
2018-07-30T04:50:29.000Z
2018-07-30T04:50:29.000Z
ProxyPool/proxypool/setting.py
binyoucai/ProxyPool
ed30ba57a7863a4e1e6df650a336dd84a45dbf78
[ "RSA-MD" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ @content : 全局变量配置模块 db.py, getter.py, tester.py, scheduler.py @Author : 北冥神君 @File : setting.py @Software: PyCharm """ # ———————————————————————————————————————————华丽分割线—————————————————————————————————————————————————————————————————— # db.py模块全局变量 REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_KEY, MAX_SCORE, MIN_SCORE, INITIAL_SCORE # Redis配置 REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_PASSWORD = None REDIS_KEY = 'proxies' # 代理分数配置 MAX_SCORE = 100 MIN_SCORE = 0 INITIAL_SCORE = 10 # ———————————————————————————————————————————华丽分割线—————————————————————————————————————————————————————————————————— # getter.py 全局变量 POOL_UPPER_THRESHOLD # 代理池数量界限 POOL_UPPER_THRESHOLD = 50000 # ———————————————————————————————————————————华丽分割线—————————————————————————————————————————————————————————————————— # tester.py全局变量 TEST_URL, VALID_STATUS_CODES, BATCH_TEST_SIZE # 代理ip测试站点,建议抓哪个网站填那个 TEST_URL = 'http://www.baidu.com' # 测试响应状态码 VALID_STATUS_CODES = [200, 302] # 最大批测试量 BATCH_TEST_SIZE = 10 # ———————————————————————————————————————————华丽分割线—————————————————————————————————————————————————————————————————— # scheduler.py 全局变量 TESTER_CYCLE, GETTER_CYCLE, API_HOST, API_PORT, TESTER_ENABLED, GETTER_ENABLED, API_ENABLED # 检查周期 TESTER_CYCLE = 20 # 获取周期 GETTER_CYCLE = 300 # web API配置 API_HOST = '0.0.0.0' API_PORT = 5555 # 测试器、获取器、api接口 开关 TESTER_ENABLED = True GETTER_ENABLED = True API_ENABLED = True # ———————————————————————————————————————————华丽分割线——————————————————————————————————————————————————————————————————
27.327586
116
0.485174
169
1,585
7.526627
0.47929
0.188679
0.448113
0.18239
0
0
0
0
0
0
0
0.030769
0.097792
1,585
57
117
27.807018
0.477622
0.715457
0
0
0
0
0.101655
0
0
0
0
0
0
1
0
false
0.055556
0
0
0
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
0af368dd3f17045f45b4d4a34dfe0cb6269e7902
955
py
Python
maps/serealizers.py
agilman/django-maps
4bcf087ea75f5a53d7c57e0050ad341cc2613bf1
[ "MIT" ]
null
null
null
maps/serealizers.py
agilman/django-maps
4bcf087ea75f5a53d7c57e0050ad341cc2613bf1
[ "MIT" ]
null
null
null
maps/serealizers.py
agilman/django-maps
4bcf087ea75f5a53d7c57e0050ad341cc2613bf1
[ "MIT" ]
null
null
null
from maps.models import UserProfilePicture, UserBio, Adventure, Map, MapSegment, WayPoint from rest_framework import serializers class UserBioSerializer(serializers.ModelSerializer): class Meta: model = UserBio fields = ['bio'] class UserProfilePictureSerializer(serializers.ModelSerializer): class Meta: model=UserProfilePicture fields = ['id','active'] class AdventureSerializer(serializers.ModelSerializer): class Meta: model = Adventure fields= ['id','name','advType','advStatus'] class WayPointSerializer(serializers.ModelSerializer): class Meta: model = WayPoint fields = ('Lat','Lng') class MapSegmentSerializer(serializers.ModelSerializer): class Meta: model = MapSegment fields = ['id'] class MapSerializer(serializers.ModelSerializer): class Meta: model = Map fields= ['id','name']
25.810811
89
0.662827
81
955
7.802469
0.395062
0.246835
0.294304
0.332278
0.379747
0
0
0
0
0
0
0
0.242932
955
36
90
26.527778
0.874136
0
0
0.230769
0
0
0.049215
0
0
0
0
0
0
1
0
false
0
0.076923
0
0.538462
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
e405d29f5f58bc9abc2d82eadd6422928f7118d1
136
py
Python
AtCoder/ABC 212/A - Alloy.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
AtCoder/ABC 212/A - Alloy.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
AtCoder/ABC 212/A - Alloy.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
a,b=map(int,input().split()) if b==0 and a>0: print("Gold") elif a==0 and b>0: print("Silver") elif a>0 and b>0: print("Alloy")
17
28
0.580882
30
136
2.633333
0.466667
0.075949
0.151899
0.227848
0.405063
0.405063
0.405063
0
0
0
0
0.053571
0.176471
136
8
29
17
0.651786
0
0
0
0
0
0.109489
0
0
0
0
0
0
1
0
true
0
0
0
0
0.428571
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
0
0
0
1
0
4
7c0e71f5b0eacd639e0bb13b6d55867b3214ac37
750
py
Python
code/python/Vermilion/v1/fds/sdk/Vermilion/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/Vermilion/v1/fds/sdk/Vermilion/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/Vermilion/v1/fds/sdk/Vermilion/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
# flake8: noqa """ VRS API documentation Documentation on all available end points in the VRSAPI # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ __version__ = "0.9.0" # import ApiClient from fds.sdk.Vermilion.api_client import ApiClient # import Configuration from fds.sdk.Vermilion.configuration import Configuration # import exceptions from fds.sdk.Vermilion.exceptions import OpenApiException from fds.sdk.Vermilion.exceptions import ApiAttributeError from fds.sdk.Vermilion.exceptions import ApiTypeError from fds.sdk.Vermilion.exceptions import ApiValueError from fds.sdk.Vermilion.exceptions import ApiKeyError from fds.sdk.Vermilion.exceptions import ApiException
26.785714
73
0.802667
96
750
6.21875
0.427083
0.093802
0.134003
0.254606
0.351759
0.351759
0
0
0
0
0
0.012289
0.132
750
27
74
27.777778
0.904762
0.330667
0
0
1
0
0.010526
0
0
0
0
0
0
1
0
false
0
0.888889
0
0.888889
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7c432e0fae3e368632223822fc312edb4761fb0f
351
py
Python
apps/api/forms/temporary_user.py
Praetorian-Defence/praetorian-api
181fa22b043e58b2ac9c5f4eae4c3471a44c9bf4
[ "MIT" ]
2
2020-06-29T15:12:04.000Z
2020-10-13T14:18:21.000Z
apps/api/forms/temporary_user.py
Praetorian-Defence/praetorian-api
181fa22b043e58b2ac9c5f4eae4c3471a44c9bf4
[ "MIT" ]
10
2021-01-04T11:33:38.000Z
2021-05-07T10:23:48.000Z
apps/api/forms/temporary_user.py
zurek11/praetorian-api
181fa22b043e58b2ac9c5f4eae4c3471a44c9bf4
[ "MIT" ]
null
null
null
from django.forms import ModelChoiceField from django_api_forms import Form from apps.core.models import Project, Remote, Service class TemporaryUserForms: class Create(Form): project_id = ModelChoiceField(queryset=Project.objects.all(), required=True) remote_id = ModelChoiceField(queryset=Remote.objects.all(), required=True)
31.909091
84
0.777778
42
351
6.404762
0.52381
0.074349
0.193309
0.163569
0
0
0
0
0
0
0
0
0.139601
351
10
85
35.1
0.890728
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.428571
0
0.714286
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7c85afb13b16b13bc3bc328be8b62da2f636adf2
881
py
Python
src/cagefight/cageprojectile.py
tgates42/cagefight
42ac05cdd87f474080da116bd9227c3011ed3347
[ "MIT" ]
null
null
null
src/cagefight/cageprojectile.py
tgates42/cagefight
42ac05cdd87f474080da116bd9227c3011ed3347
[ "MIT" ]
null
null
null
src/cagefight/cageprojectile.py
tgates42/cagefight
42ac05cdd87f474080da116bd9227c3011ed3347
[ "MIT" ]
null
null
null
""" Base class for a projectile """ class CageProjectile(object): """ Simple projectile base class """ def __init__(self, world, projectileid): self.world = world self.projectileid = projectileid def next(self): """ Progress the game state to the next tick. """ pass def save(self): """ Override to save details of current projectile with total knowledge """ raise NotImplementedError('Override to save projectile') def load(self, jsonobj): """ Override to load details of current projectile """ raise NotImplementedError('Override to load projectile') def render(self, im): """ Render the display to an image for the provided game mp4 output """ raise NotImplementedError('Override to draw projectile')
27.53125
75
0.604994
93
881
5.688172
0.451613
0.094518
0.181474
0.192817
0
0
0
0
0
0
0
0.001645
0.309875
881
31
76
28.419355
0.868421
0.314415
0
0
0
0
0.165644
0
0
0
0
0
0
1
0.416667
false
0.083333
0
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
7cb91a8497dffb013f2cbf2d62b99f3d16c0a8f3
33
py
Python
Assignment_01_Big-O/test.py
hjeonc/2018_Algorithm
1ecd663eac36e9aed2f8ccf3e0c0e140f8fad015
[ "MIT" ]
null
null
null
Assignment_01_Big-O/test.py
hjeonc/2018_Algorithm
1ecd663eac36e9aed2f8ccf3e0c0e140f8fad015
[ "MIT" ]
null
null
null
Assignment_01_Big-O/test.py
hjeonc/2018_Algorithm
1ecd663eac36e9aed2f8ccf3e0c0e140f8fad015
[ "MIT" ]
null
null
null
data = [3, 4, 5] print(len(data))
16.5
16
0.575758
7
33
2.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0.107143
0.151515
33
2
17
16.5
0.571429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
7cc31ddf990883164c3ef32ef2ffe150d125990a
224
py
Python
VRC/SDKBase/VRC_EventHandler/VrcBroadcastType/__init__.py
Grim-es/udon-pie-auto-completion
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
[ "MIT" ]
null
null
null
VRC/SDKBase/VRC_EventHandler/VrcBroadcastType/__init__.py
Grim-es/udon-pie-auto-completion
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
[ "MIT" ]
null
null
null
VRC/SDKBase/VRC_EventHandler/VrcBroadcastType/__init__.py
Grim-es/udon-pie-auto-completion
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
[ "MIT" ]
null
null
null
from UdonPie import VRC from UdonPie.Undefined import * class VrcBroadcastType: def __new__(cls, arg1=None): ''' :returns: VrcBroadcastType :rtype: VRC.VrcBroadcastType ''' pass
18.666667
36
0.620536
21
224
6.428571
0.714286
0.162963
0
0
0
0
0
0
0
0
0
0.006329
0.294643
224
11
37
20.363636
0.848101
0.245536
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
7cd73a926bdbce59f302a2c71eb93b51b50b6a63
329
py
Python
tests/__init__.py
ph1l/aprs
2f06fef42a6935b704c747a1a0d1b6c041a937cb
[ "Apache-2.0" ]
1
2020-08-03T14:07:04.000Z
2020-08-03T14:07:04.000Z
tests/__init__.py
joecupano/aprs
2f06fef42a6935b704c747a1a0d1b6c041a937cb
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
joecupano/aprs
2f06fef42a6935b704c747a1a0d1b6c041a937cb
[ "Apache-2.0" ]
1
2020-04-16T10:35:12.000Z
2020-04-16T10:35:12.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python APRS Module Tests.""" __author__ = 'Greg Albrecht W2GMD <oss@undef.net>' # NOQA pylint: disable=R0801 __copyright__ = 'Copyright 2017 Greg Albrecht and Contributors' # NOQA pylint: disable=R0801 __license__ = 'Apache License, Version 2.0' # NOQA pylint: disable=R0801
36.555556
93
0.717325
43
329
5.209302
0.697674
0.133929
0.227679
0.294643
0
0
0
0
0
0
0
0.071174
0.145897
329
8
94
41.125
0.725979
0.452888
0
0
0
0
0.629412
0
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
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7ce32ace7232ba5a1cb854a36cf0f63800850fc4
146
py
Python
static/__init__.py
live4dao/RLtrading
c1655a7bfe1220c1d7ae5c0d46814bf3884e6cdb
[ "MIT" ]
1,046
2018-03-30T07:09:57.000Z
2022-03-09T16:36:50.000Z
static/__init__.py
live4dao/RLtrading
c1655a7bfe1220c1d7ae5c0d46814bf3884e6cdb
[ "MIT" ]
23
2018-04-02T09:07:36.000Z
2021-08-12T03:42:33.000Z
static/__init__.py
live4dao/RLtrading
c1655a7bfe1220c1d7ae5c0d46814bf3884e6cdb
[ "MIT" ]
346
2018-03-30T07:08:25.000Z
2022-03-12T02:58:21.000Z
# coding=utf-8 import os LOGS_DIR = os.path.join(os.path.dirname(__file__), 'logs') if not os.path.exists(LOGS_DIR): os.makedirs(LOGS_DIR)
16.222222
58
0.712329
26
146
3.730769
0.576923
0.216495
0.185567
0
0
0
0
0
0
0
0
0.007874
0.130137
146
8
59
18.25
0.755906
0.082192
0
0
0
0
0.030303
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7cf60a70d7f1219f03754ac59fe5b0771741f9ba
153
py
Python
Validation/SiTrackerPhase2V/python/Phase2TrackerMCHarvesting_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
Validation/SiTrackerPhase2V/python/Phase2TrackerMCHarvesting_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
Validation/SiTrackerPhase2V/python/Phase2TrackerMCHarvesting_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester trackerphase2ValidationHarvesting = cms.Sequence()
25.5
58
0.862745
15
153
8.8
0.8
0
0
0
0
0
0
0
0
0
0
0.007143
0.084967
153
5
59
30.6
0.935714
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7cfe616f9cb978a7be35938098874a368b235272
76
py
Python
aquavalet/settings/local-dist.py
Johnetordoff/aquavalet
31af9321180191cb46d44da5df0d8580c0044df2
[ "Apache-2.0" ]
1
2018-03-26T19:20:28.000Z
2018-03-26T19:20:28.000Z
aquavalet/settings/local-dist.py
Johnetordoff/aquavalet
31af9321180191cb46d44da5df0d8580c0044df2
[ "Apache-2.0" ]
null
null
null
aquavalet/settings/local-dist.py
Johnetordoff/aquavalet
31af9321180191cb46d44da5df0d8580c0044df2
[ "Apache-2.0" ]
null
null
null
from . import defaults OSF_TOKEN = "changeme" ARTIFACTS_TOKEN = "changeme"
15.2
28
0.763158
9
76
6.222222
0.777778
0.464286
0
0
0
0
0
0
0
0
0
0
0.144737
76
4
29
19
0.861538
0
0
0
0
0
0.210526
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
7cff56183b9e4f1f97d08f5e207f5518d8d8ee34
1,474
py
Python
oscar/lib/python2.7/site-packages/phonenumbers/data/region_JM.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/phonenumbers/data/region_JM.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/phonenumbers/data/region_JM.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
"""Auto-generated file, do not edit by hand. JM metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_JM = PhoneMetadata(id='JM', country_code=1, international_prefix='011', general_desc=PhoneNumberDesc(national_number_pattern='[589]\\d{9}', possible_length=(10,), possible_length_local_only=(7,)), fixed_line=PhoneNumberDesc(national_number_pattern='876(?:5(?:0[12]|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[027-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468]))\\d{4}', example_number='8765123456', possible_length=(10,), possible_length_local_only=(7,)), mobile=PhoneNumberDesc(national_number_pattern='876(?:2[14-9]\\d|[348]\\d{2}|5(?:0[3-9]|[2-57-9]\\d|6[0-24-9])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579]))\\d{4}', example_number='8762101234', possible_length=(10,), possible_length_local_only=(7,)), toll_free=PhoneNumberDesc(national_number_pattern='8(?:00|33|44|55|66|77|88)[2-9]\\d{6}', example_number='8002123456', possible_length=(10,)), premium_rate=PhoneNumberDesc(national_number_pattern='900[2-9]\\d{6}', example_number='9002123456', possible_length=(10,)), personal_number=PhoneNumberDesc(national_number_pattern='5(?:00|22|33|44|66|77|88)[2-9]\\d{6}', example_number='5002345678', possible_length=(10,)), national_prefix='1', national_prefix_for_parsing='1', leading_digits='876')
105.285714
330
0.693351
251
1,474
3.888446
0.38247
0.129098
0.178279
0.221311
0.267418
0.1875
0.170082
0.170082
0.047131
0
0
0.182476
0.063094
1,474
13
331
113.384615
0.524258
0.035957
0
0
1
0.363636
0.332382
0.271755
0
0
0
0
0
1
0
false
0
0.090909
0
0.090909
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7cffd0064c331964a66ea8dc9410250fc1f3a46e
189
py
Python
sets.py
oramirezperera/closures
17aa68642448eaa607872e871d8785ecdfe23d8b
[ "MIT" ]
null
null
null
sets.py
oramirezperera/closures
17aa68642448eaa607872e871d8785ecdfe23d8b
[ "MIT" ]
null
null
null
sets.py
oramirezperera/closures
17aa68642448eaa607872e871d8785ecdfe23d8b
[ "MIT" ]
null
null
null
def remove_duplicates(some_list): return list(set(some_list)) def run(): random_list = [1,1,2,2,4] print(remove_duplicates(random_list)) if __name__ == '__main__': run()
17.181818
41
0.671958
28
189
4.035714
0.571429
0.283186
0
0
0
0
0
0
0
0
0
0.032258
0.179894
189
11
42
17.181818
0.696774
0
0
0
0
0
0.042105
0
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.428571
0.142857
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
6b2976314be6110a99e11ffa2729d19394584528
457
py
Python
pyfacebook/__init__.py
sns-sdks/python-facebook
9536d30393dee8b2a887b81f103d76262a677eee
[ "Apache-2.0" ]
181
2019-08-28T10:03:49.000Z
2022-03-26T19:36:05.000Z
pyfacebook/__init__.py
sns-sdks/python-facebook
9536d30393dee8b2a887b81f103d76262a677eee
[ "Apache-2.0" ]
159
2019-08-28T10:07:43.000Z
2022-03-30T16:42:23.000Z
pyfacebook/__init__.py
sns-sdks/python-facebook
9536d30393dee8b2a887b81f103d76262a677eee
[ "Apache-2.0" ]
40
2019-09-10T20:12:47.000Z
2022-03-12T16:16:46.000Z
from pyfacebook.models import * from pyfacebook.ratelimit import RateLimitHeader, RateLimit, PercentSecond from pyfacebook.exceptions import PyFacebookException, FacebookError, LibraryError from pyfacebook.api import GraphAPI, BasicDisplayAPI from pyfacebook.api.facebook.client import FacebookApi from pyfacebook.api.instagram_business.client import IGBusinessApi from pyfacebook.api.instagram_basic.client import IGBasicDisplayApi __version__ = "0.11.2"
45.7
82
0.866521
51
457
7.647059
0.509804
0.251282
0.174359
0.133333
0
0
0
0
0
0
0
0.009524
0.080963
457
9
83
50.777778
0.919048
0
0
0
0
0
0.013129
0
0
0
0
0
0
1
0
false
0
0.875
0
0.875
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6b2feff6221954719029a6ec96f5e71960a73e0b
70
py
Python
utils/deploy.py
bladeXue/blog
0abce685e50c3f3028dd177ae569163acfabbd4f
[ "CC0-1.0" ]
6
2021-10-30T14:50:56.000Z
2022-01-17T14:39:29.000Z
utils/deploy.py
bladeXue/blog
0abce685e50c3f3028dd177ae569163acfabbd4f
[ "CC0-1.0" ]
null
null
null
utils/deploy.py
bladeXue/blog
0abce685e50c3f3028dd177ae569163acfabbd4f
[ "CC0-1.0" ]
null
null
null
# coding=utf-8 if __name__ == "__main__": print("developing...")
14
26
0.614286
8
70
4.375
1
0
0
0
0
0
0
0
0
0
0
0.017241
0.171429
70
5
27
14
0.586207
0.171429
0
0
0
0
0.368421
0
0
0
0
0
0
1
0
true
0
0
0
0
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
0
1
0
0
0
0
1
0
4
860f15804ff18d6c404735cd4358625d2c80bdc1
2,216
py
Python
tests/migrations/0001_initial.py
zurek11/camel-spitter-django
ded04788a6f5b35e415755e2cc0f8657a7057cc6
[ "MIT" ]
1
2020-06-26T08:28:28.000Z
2020-06-26T08:28:28.000Z
tests/migrations/0001_initial.py
zurek11/camel-spitter-django
ded04788a6f5b35e415755e2cc0f8657a7057cc6
[ "MIT" ]
null
null
null
tests/migrations/0001_initial.py
zurek11/camel-spitter-django
ded04788a6f5b35e415755e2cc0f8657a7057cc6
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2021-05-10 08:12 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BasicLogEntry', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('level', models.CharField(default='', max_length=50)), ('module', models.CharField(default='', max_length=50)), ('function', models.CharField(default='', max_length=50)), ('filename', models.CharField(default='', max_length=50)), ('message', models.TextField(default='', null=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('deleted_at', models.DateTimeField(blank=True, null=True)), ], options={ 'db_table': 'log_entries', 'default_permissions': (), }, ), migrations.CreateModel( name='ExtendedLogEntry', fields=[ ('id', models.AutoField(primary_key=True, serialize=False)), ('level', models.CharField(default='', max_length=50)), ('module', models.CharField(default='', max_length=50)), ('function', models.CharField(default='', max_length=50)), ('filename', models.CharField(default='', max_length=50)), ('message', models.TextField(default='', null=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('deleted_at', models.DateTimeField(blank=True, null=True)), ('special', models.CharField(default='', max_length=50)), ('user', models.CharField(default='', max_length=50)), ('amount', models.IntegerField(default=1)), ], options={ 'db_table': 'extended_log_entries', 'default_permissions': (), }, ), ]
41.037037
76
0.537455
200
2,216
5.8
0.32
0.12931
0.189655
0.215517
0.7
0.7
0.643103
0.643103
0.643103
0.643103
0
0.023499
0.308664
2,216
53
77
41.811321
0.733681
0.020307
0
0.652174
1
0
0.121254
0
0
0
0
0
0
1
0
false
0
0.021739
0
0.108696
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8611c24c2e69035561671ade65ad01688c17594e
156
py
Python
Python/Templates/IronPython/ItemTemplates/Python/WpfWindow/WpfWindow.py
mikiec84/PTVS
6cbeadd70a4438d6e6ea4d22a465d678eacf5eb2
[ "Apache-2.0" ]
3
2015-04-09T03:57:26.000Z
2016-07-25T10:00:34.000Z
Python/Templates/IronPython/ItemTemplates/Python/WpfWindow/WpfWindow.py
anstkosh/PTVS
1854ab3d6397e66765697bb63d898aec16d0406e
[ "Apache-2.0" ]
2
2019-06-05T18:13:41.000Z
2019-06-05T20:13:16.000Z
Python/Templates/IronPython/ItemTemplates/Python/WpfWindow/WpfWindow.py
RaymonGulati1/PTVS
ee1d09f2a94be4e21016f7579205bb65ec82c616
[ "Apache-2.0" ]
2
2018-03-02T19:55:14.000Z
2019-02-14T22:37:28.000Z
import wpf from System.Windows import Window class $safeitemname$(Window): def __init__(self): wpf.LoadComponent(self, '$safeitemname$.xaml')
19.5
54
0.717949
18
156
6
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.166667
156
7
55
22.285714
0.830769
0
0
0
0
0
0.121795
0
0
0
0
0
0
0
null
null
0
0.4
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
862243692cf7776f5c6e50abb17adab2496466e4
3,836
py
Python
pytorch/ocnn/octree2col.py
tomorrowdata/O-CNN
017c6671ca7093d3fac069d5bd9c5683d131c409
[ "MIT" ]
1
2021-05-18T12:47:38.000Z
2021-05-18T12:47:38.000Z
pytorch/ocnn/octree2col.py
tomorrowdata/O-CNN
017c6671ca7093d3fac069d5bd9c5683d131c409
[ "MIT" ]
null
null
null
pytorch/ocnn/octree2col.py
tomorrowdata/O-CNN
017c6671ca7093d3fac069d5bd9c5683d131c409
[ "MIT" ]
null
null
null
from torch import nn from torch.autograd import Function import ocnn class Octree2ColFunction(Function): @staticmethod def forward(ctx, data_in, octree, depth, kernel_size, stride): ctx.save_for_backward(octree) ctx.depth = depth ctx.kernel_size = kernel_size ctx.stride = stride data_in = data_in.contiguous() data_out = ocnn.nn.octree2col(data_in, octree, depth, kernel_size, stride) return data_out @staticmethod def backward(ctx, grad_in): octree, = ctx.saved_tensors grad_in = grad_in.contiguous() grad_out = ocnn.nn.col2octree(grad_in, octree, ctx.depth, ctx.kernel_size, ctx.stride) return grad_out, None, None, None, None class Col2OctreeFunction(Function): @staticmethod def forward(ctx, data_in, octree, depth, kernel_size, stride): ctx.save_for_backward(octree) ctx.depth = depth ctx.kernel_size = kernel_size ctx.stride = stride data_in = data_in.contiguous() data_out = ocnn.nn.col2octree(data_in, octree, depth, kernel_size, stride) return data_out @staticmethod def backward(ctx, grad_in): octree, = ctx.saved_tensors grad_in = grad_in.contiguous() grad_out = ocnn.nn.octree2col(grad_in, octree, ctx.depth, ctx.kernel_size, ctx.stride) return grad_out, None, None, None, None class Octree2ColPFunction(Function): @staticmethod def forward(ctx, data_in, octree, depth, kernel_size, stride): ctx.save_for_backward(octree) ctx.depth = depth ctx.kernel_size = kernel_size ctx.stride = stride data_in = data_in.contiguous() data_out = ocnn.nn.octree2colP(data_in, octree, depth, kernel_size, stride) return data_out @staticmethod def backward(ctx, grad_in): octree, = ctx.saved_tensors grad_in = grad_in.contiguous() grad_out = ocnn.nn.col2octreeP(grad_in, octree, ctx.depth, ctx.kernel_size, ctx.stride) return grad_out, None, None, None, None class Col2OctreePFunction(Function): @staticmethod def forward(ctx, data_in, octree, depth, kernel_size, stride): ctx.save_for_backward(octree) ctx.depth = depth ctx.kernel_size = kernel_size ctx.stride = stride data_in = data_in.contiguous() data_out = ocnn.nn.col2octreeP(data_in, octree, depth, kernel_size, stride) return data_out @staticmethod def backward(ctx, grad_in): octree, = ctx.saved_tensors grad_in = grad_in.contiguous() grad_out = ocnn.nn.octree2colP(grad_in, octree, ctx.depth, ctx.kernel_size, ctx.stride) return grad_out, None, None, None, None # alias octree2col = Octree2ColFunction.apply col2octree = Col2OctreeFunction.apply octree2colP = Octree2ColPFunction.apply col2octreeP = Col2OctreePFunction.apply # module class Octree2ColBase(nn.Module): def __init__(self, depth, kernel_size, stride): super(Octree2ColBase, self).__init__() self.depth = depth self.kernel_size = kernel_size self.stride = stride def extra_repr(self) -> str: return 'depth={}, kernel_size={}, stride={}'.format( self.depth, self.kernel_size, self.stride) class Octree2Col(Octree2ColBase): def forward(self, data_in, octree): return octree2col(data_in, octree, self.depth, self.kernel_size, self.stride) class Col2Octree(Octree2ColBase): def forward(self, data_in, octree): return col2octree(data_in, octree, self.depth, self.kernel_size, self.stride) class Octree2ColP(Octree2ColBase): def forward(self, data_in, octree): return octree2colP(data_in, octree, self.depth, self.kernel_size, self.stride) class Col2OctreeP(Octree2ColBase): def forward(self, data_in, octree): return col2octreeP(data_in, octree, self.depth, self.kernel_size, self.stride)
29.736434
82
0.705422
501
3,836
5.189621
0.095808
0.111538
0.073846
0.080769
0.752308
0.752308
0.752308
0.752308
0.666923
0.666923
0
0.011035
0.19682
3,836
128
83
29.96875
0.832846
0.003128
0
0.625
0
0
0.00916
0
0
0
0
0
0
1
0.145833
false
0
0.03125
0.052083
0.40625
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
86298f26235efbcf2b6d3cbeb4fa02c991f91441
584
py
Python
zx/_time.py
kosarev/zx
6f72f45438e03f97be975bab1a36889aca16cee4
[ "MIT" ]
6
2018-09-09T16:38:41.000Z
2020-11-10T11:25:55.000Z
zx/_time.py
kosarev/zx
6f72f45438e03f97be975bab1a36889aca16cee4
[ "MIT" ]
24
2019-10-16T14:08:31.000Z
2021-11-07T13:36:10.000Z
zx/_time.py
kosarev/zx
6f72f45438e03f97be975bab1a36889aca16cee4
[ "MIT" ]
1
2020-05-02T11:41:47.000Z
2020-05-02T11:41:47.000Z
# -*- coding: utf-8 -*- # ZX Spectrum Emulator. # https://github.com/kosarev/zx # # Copyright (C) 2017-2020 Ivan Kosarev. # ivan@kosarev.info # # Published under the MIT license. import time class Time(object): def __init__(self): self._seconds = 0 def get(self): return self._seconds def advance(self, s): self._seconds += s def get_timestamp(): # TODO: We can use this since Python 3.7. # return time.time_ns() / (10 ** 9) return time.time() def get_elapsed_time(timestamp): return get_timestamp() - timestamp
17.69697
45
0.626712
79
584
4.481013
0.607595
0.09322
0.079096
0
0
0
0
0
0
0
0
0.034091
0.246575
584
32
46
18.25
0.770455
0.421233
0
0
0
0
0
0
0
0
0
0.03125
0
1
0.416667
false
0
0.083333
0.25
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
8631b0b4ecf282fda393e40c3a0c8dce9ae176e9
5,157
py
Python
tests/test_objecttype.py
Informasjonsforvaltning/modelldcatnotordf
995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1
[ "Apache-2.0" ]
1
2020-11-29T18:36:21.000Z
2020-11-29T18:36:21.000Z
tests/test_objecttype.py
Informasjonsforvaltning/modelldcatnotordf
995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1
[ "Apache-2.0" ]
142
2020-10-07T08:52:55.000Z
2021-11-18T15:09:31.000Z
tests/test_objecttype.py
Informasjonsforvaltning/modelldcatnotordf
995129ff9f6fb95f9a9d875b27f3aa14bac9b7f1
[ "Apache-2.0" ]
null
null
null
"""Test cases for the object type module.""" from concepttordf import Concept import pytest from pytest_mock import MockFixture from rdflib import Graph from skolemizer.testutils import skolemization from modelldcatnotordf.modelldcatno import ObjectType from tests.testutils import assert_isomorphic """ A test class for testing the class ObjectType. """ def test_instantiate_objectype() -> None: """It does not raise an exception.""" try: _ = ObjectType() except Exception: pytest.fail("Unexpected Exception ..") def test_to_graph_should_return_title_and_identifier() -> None: """It returns a title graph isomorphic to spec.""" """It returns an identifier graph isomorphic to spec.""" objectype = ObjectType() objectype.identifier = "http://example.com/objectypes/1" objectype.title = {"nb": "Tittel 1", "en": "Title 1"} src = """ @prefix dct: <http://purl.org/dc/terms/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix dcat: <http://www.w3.org/ns/dcat#> . @prefix modelldcatno: <https://data.norge.no/vocabulary/modelldcatno#> . <http://example.com/objectypes/1> a modelldcatno:ObjectType; dct:title "Title 1"@en, "Tittel 1"@nb ; . """ g1 = Graph().parse(data=objectype.to_rdf(), format="turtle") g2 = Graph().parse(data=src, format="turtle") assert_isomorphic(g1, g2) def test_to_graph_should_return_identifier_set_at_constructor() -> None: """It returns an identifier graph isomorphic to spec.""" objectype = ObjectType("http://example.com/objectypes/1") src = """ @prefix dct: <http://purl.org/dc/terms/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix dcat: <http://www.w3.org/ns/dcat#> . @prefix modelldcatno: <https://data.norge.no/vocabulary/modelldcatno#> . <http://example.com/objectypes/1> a modelldcatno:ObjectType . """ g1 = Graph().parse(data=objectype.to_rdf(), format="turtle") g2 = Graph().parse(data=src, format="turtle") assert_isomorphic(g1, g2) def test_to_graph_should_return_title_and_skolemization(mocker: MockFixture) -> None: """It returns a title graph isomorphic to spec.""" objectype = ObjectType() objectype.title = {"nb": "Tittel 1", "en": "Title 1"} mocker.patch( "skolemizer.Skolemizer.add_skolemization", return_value=skolemization, ) src = """ @prefix dct: <http://purl.org/dc/terms/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix dcat: <http://www.w3.org/ns/dcat#> . @prefix modelldcatno: <https://data.norge.no/vocabulary/modelldcatno#> . <http://example.com/.well-known/skolem/284db4d2-80c2-11eb-82c3-83e80baa2f94> a modelldcatno:ObjectType ; dct:title "Title 1"@en, "Tittel 1"@nb ; . """ g1 = Graph().parse(data=objectype.to_rdf(), format="turtle") g2 = Graph().parse(data=src, format="turtle") assert_isomorphic(g1, g2) def test_to_graph_should_return_dct_identifier_as_graph() -> None: """It returns a dct_identifier graph isomorphic to spec.""" objectype = ObjectType() objectype.identifier = "http://example.com/objectypes/1" objectype.dct_identifier = "123456789" src = """ @prefix dct: <http://purl.org/dc/terms/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix dcat: <http://www.w3.org/ns/dcat#> . @prefix modelldcatno: <https://data.norge.no/vocabulary/modelldcatno#> . <http://example.com/objectypes/1> a modelldcatno:ObjectType ; dct:identifier "123456789"; . """ g1 = Graph().parse(data=objectype.to_rdf(), format="turtle") g2 = Graph().parse(data=src, format="turtle") assert_isomorphic(g1, g2) def test_to_graph_should_return_subject() -> None: """It returns a subject graph isomorphic to spec.""" objectype = ObjectType() objectype.identifier = "http://example.com/objectypes/1" subject = Concept() subject.identifier = "https://example.com/subjects/1" objectype.subject = subject src = """ @prefix dct: <http://purl.org/dc/terms/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix dcat: <http://www.w3.org/ns/dcat#> . @prefix modelldcatno: <https://data.norge.no/vocabulary/modelldcatno#> . @prefix skos: <http://www.w3.org/2004/02/skos/core#> . <http://example.com/objectypes/1> a modelldcatno:ObjectType ; dct:subject <https://example.com/subjects/1> ; . <https://example.com/subjects/1> a skos:Concept . """ g1 = Graph().parse(data=objectype.to_rdf(), format="turtle") g2 = Graph().parse(data=src, format="turtle") assert_isomorphic(g1, g2)
34.844595
85
0.644755
663
5,157
4.933635
0.165913
0.03424
0.044023
0.058698
0.752675
0.723326
0.723326
0.717518
0.68878
0.648731
0
0.040344
0.187706
5,157
147
86
35.081633
0.740511
0.0605
0
0.633663
0
0.118812
0.568114
0.032993
0
0
0
0
0.059406
1
0.059406
false
0
0.069307
0
0.128713
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
86323cf6707b72590448d5fe88b8185b9de74316
181
py
Python
app/config.py
moadtahri/ai-detector
73842178b1ded9597e155146dab8e02b5b3b84c9
[ "MIT" ]
1
2020-01-16T19:22:37.000Z
2020-01-16T19:22:37.000Z
app/config.py
moadtahri/ai-detector
73842178b1ded9597e155146dab8e02b5b3b84c9
[ "MIT" ]
1
2021-06-02T00:53:38.000Z
2021-06-02T00:53:38.000Z
app/config.py
moadtahri/ai-detector
73842178b1ded9597e155146dab8e02b5b3b84c9
[ "MIT" ]
null
null
null
DEBUG = True SQLALCHEMY_DATABASE_URI = 'sqlite:///C:\\User\\virus\\Desktop\\ai-chestxray\\app\\static\\db\\database.db' SQLALCHEMY_TRACK_MODIFICATIONS = True SECRET_KEY = 'Flask_+1'
45.25
106
0.762431
25
181
5.28
0.84
0
0
0
0
0
0
0
0
0
0
0.005882
0.060773
181
4
107
45.25
0.770588
0
0
0
0
0.25
0.472527
0.428571
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8637501cbb9f0cdac5fc9c88ca2d154b539fe359
75
py
Python
regionvit/attention/__init__.py
kaijieshi7/RegionViT
77000c2fcfbe9a5735d7a27a8a7821f69c0440ec
[ "Apache-2.0" ]
13
2021-07-28T12:22:12.000Z
2022-02-27T08:49:28.000Z
test/fruit_distribution/fruit/__init__.py
mgorjis/dse-do-dashboard
8982433ef02d335603469f798c9f110e14bb3af1
[ "Apache-2.0" ]
18
2022-01-13T15:14:52.000Z
2022-03-09T22:58:36.000Z
test/fruit_distribution/fruit/__init__.py
mgorjis/dse-do-dashboard
8982433ef02d335603469f798c9f110e14bb3af1
[ "Apache-2.0" ]
4
2021-12-21T07:08:45.000Z
2022-02-14T04:51:34.000Z
# Copyright IBM All Rights Reserved. # SPDX-License-Identifier: Apache-2.0
25
37
0.773333
11
75
5.272727
1
0
0
0
0
0
0
0
0
0
0
0.030303
0.12
75
2
38
37.5
0.848485
0.933333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
863a9d5ac72d3b7e0a135e5b4577aa850ef442dc
128
py
Python
p3/__init__.py
vanandrew/p3
b6c9355802bc809545e0c6fdf3b8a11500451742
[ "MIT" ]
null
null
null
p3/__init__.py
vanandrew/p3
b6c9355802bc809545e0c6fdf3b8a11500451742
[ "MIT" ]
9
2018-08-10T18:39:02.000Z
2018-08-15T18:56:18.000Z
p3/__init__.py
p3proc/p3
b6c9355802bc809545e0c6fdf3b8a11500451742
[ "MIT" ]
null
null
null
# get version import os __version__ = open(os.path.join(os.path.dirname(os.path.realpath(__file__)),'version')).read().rstrip()
32
103
0.742188
19
128
4.578947
0.631579
0.206897
0
0
0
0
0
0
0
0
0
0
0.0625
128
3
104
42.666667
0.725
0.085938
0
0
0
0
0.06087
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
86440eab5dc16407ae5d9dc0dd540f1a8ec713bc
71
py
Python
hausse/utils/__init__.py
andrenasturas/hausse
58e7cb71d5105cf1d6ec7d294e85668855bf8336
[ "MIT" ]
null
null
null
hausse/utils/__init__.py
andrenasturas/hausse
58e7cb71d5105cf1d6ec7d294e85668855bf8336
[ "MIT" ]
1
2021-08-30T21:41:46.000Z
2021-08-30T21:41:46.000Z
hausse/utils/__init__.py
andrenasturas/hausse
58e7cb71d5105cf1d6ec7d294e85668855bf8336
[ "MIT" ]
1
2021-08-31T19:27:32.000Z
2021-08-31T19:27:32.000Z
from .constants import Defaults, Keys from .functions import clean_dir
23.666667
37
0.830986
10
71
5.8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.126761
71
2
38
35.5
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
8677434001d5da2eedfe1050a970862287b76793
681
py
Python
pyjiffy/jiffy/storage/partition.py
charles-typ/jiffy
21803d74af8fff3c4d001e7533ba264dc531e792
[ "Apache-2.0" ]
10
2021-03-04T07:23:24.000Z
2022-03-26T07:36:00.000Z
pyjiffy/jiffy/storage/partition.py
charles-typ/jiffy
21803d74af8fff3c4d001e7533ba264dc531e792
[ "Apache-2.0" ]
1
2021-03-12T15:20:03.000Z
2021-03-12T15:20:03.000Z
pyjiffy/jiffy/storage/partition.py
charles-typ/jiffy
21803d74af8fff3c4d001e7533ba264dc531e792
[ "Apache-2.0" ]
7
2021-03-12T05:46:15.000Z
2022-02-14T07:08:01.000Z
from jiffy.storage.crc import SLOT_MAX class NameFormatter(object): def __init__(self): pass def get(self, i): pass class DefaultNameFormatter(NameFormatter): def __init__(self): super(DefaultNameFormatter, self).__init__() def get(self, i): return str(i) class HashTableNameFormatter(NameFormatter): def __init__(self, num_blocks): super(HashTableNameFormatter, self).__init__() self.num_blocks = num_blocks self.slot_range = int(SLOT_MAX / num_blocks) def get(self, i): return '{}_{}'.format(i * self.slot_range, SLOT_MAX if i == self.num_blocks - 1 else (i + 1) * self.slot_range)
24.321429
119
0.660793
85
681
4.917647
0.341176
0.107656
0.078947
0.078947
0.08134
0
0
0
0
0
0
0.00381
0.229075
681
27
120
25.222222
0.792381
0
0
0.388889
0
0
0.007342
0
0
0
0
0
0
1
0.333333
false
0.111111
0.055556
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
8688752dc1130c3d462fd00bd2c18a99bf09df6f
192
py
Python
python-basic/string/isxxxxx/isnumeric.py
nkhn37/python-tech-sample-source
e8aea7ed3d810494682b3c2dde952ddd0f7acf84
[ "MIT" ]
null
null
null
python-basic/string/isxxxxx/isnumeric.py
nkhn37/python-tech-sample-source
e8aea7ed3d810494682b3c2dde952ddd0f7acf84
[ "MIT" ]
null
null
null
python-basic/string/isxxxxx/isnumeric.py
nkhn37/python-tech-sample-source
e8aea7ed3d810494682b3c2dde952ddd0f7acf84
[ "MIT" ]
null
null
null
"""文字列基礎 数値文字関連の判定メソッド 数値文字であるかを判定する isnumeric [説明ページ] https://tech.nkhn37.net/python-isxxxxx/#_isnumeric """ print('=== isnumeric ===') print('一万五千'.isnumeric()) print('0b0101'.isnumeric())
17.454545
50
0.71875
20
192
6.85
0.7
0.306569
0
0
0
0
0
0
0
0
0
0.039106
0.067708
192
10
51
19.2
0.726257
0.536458
0
0
0
0
0.329268
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
869b91cf170319f37e6271e60d8924902595e44d
383
py
Python
thenewboston_node/business_logic/node.py
AbhayAysola/thenewboston-node
8a24cfd814eed590a7a1066e45b8b4877501aa35
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/node.py
AbhayAysola/thenewboston-node
8a24cfd814eed590a7a1066e45b8b4877501aa35
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/node.py
AbhayAysola/thenewboston-node
8a24cfd814eed590a7a1066e45b8b4877501aa35
[ "MIT" ]
null
null
null
from django.conf import settings from thenewboston_node.core.utils.cryptography import derive_verify_key def get_signing_key() -> str: signing_key = settings.SIGNING_KEY assert signing_key is not NotImplemented return signing_key # TODO(dmu) LOW: Cache get_node_identifier() function def get_node_identifier() -> str: return derive_verify_key(get_signing_key())
25.533333
71
0.788512
54
383
5.277778
0.518519
0.210526
0.105263
0
0
0
0
0
0
0
0
0
0.143603
383
14
72
27.357143
0.868902
0.133159
0
0
0
0
0
0
0
0
0
0.071429
0.125
1
0.25
false
0
0.25
0.125
0.75
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
0
0
0
4
86caf272300f2543e4bffbfba7bca651652fdafb
85
py
Python
src/itspa/apps.py
BonifacioJZ/ITSPA-BACKEND
ab66b5599e79e366ff73e53ff4ffe79740805550
[ "MIT" ]
null
null
null
src/itspa/apps.py
BonifacioJZ/ITSPA-BACKEND
ab66b5599e79e366ff73e53ff4ffe79740805550
[ "MIT" ]
null
null
null
src/itspa/apps.py
BonifacioJZ/ITSPA-BACKEND
ab66b5599e79e366ff73e53ff4ffe79740805550
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ItspaConfig(AppConfig): name = 'itspa'
14.166667
33
0.741176
10
85
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
5
34
17
0.9
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
86f2886fef5d331870b9fee28a7b4241a6f3f235
58
py
Python
emol/emol/exception/__init__.py
lrt512/emol
e1dd3462632a525c3b9701d4fd9a332d19c93b85
[ "MIT" ]
null
null
null
emol/emol/exception/__init__.py
lrt512/emol
e1dd3462632a525c3b9701d4fd9a332d19c93b85
[ "MIT" ]
null
null
null
emol/emol/exception/__init__.py
lrt512/emol
e1dd3462632a525c3b9701d4fd9a332d19c93b85
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Custom exceptions for eMoL."""
19.333333
33
0.568966
7
58
4.714286
1
0
0
0
0
0
0
0
0
0
0
0.020408
0.155172
58
2
34
29
0.653061
0.862069
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
86fd16143079da347dcf92546375bc64fb1e52f7
33
py
Python
troupon/cart/api.py
andela/troupon
3704cbe6e69ba3e4c53401d3bbc339208e9ebccd
[ "MIT" ]
14
2016-01-12T07:31:09.000Z
2021-11-20T19:29:35.000Z
troupon/accounts/api.py
andela/troupon
3704cbe6e69ba3e4c53401d3bbc339208e9ebccd
[ "MIT" ]
52
2015-09-02T14:54:43.000Z
2016-08-01T08:22:21.000Z
troupon/cart/api.py
andela/troupon
3704cbe6e69ba3e4c53401d3bbc339208e9ebccd
[ "MIT" ]
17
2015-09-30T13:18:48.000Z
2021-11-18T16:25:12.000Z
"""Generic API configuration."""
16.5
32
0.69697
3
33
7.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
33
1
33
33
0.766667
0.787879
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
812528478fffa47a6683e3c9ae5c55afbb4f620f
1,062
py
Python
src/grokcore/xmlrpc/tests/functional/xmlrpc/xmlrpc.py
zopefoundation/grokcore.xmlrpc
5f7e3e4802d564f846c32f962f8f5a28aee77c44
[ "ZPL-2.1" ]
null
null
null
src/grokcore/xmlrpc/tests/functional/xmlrpc/xmlrpc.py
zopefoundation/grokcore.xmlrpc
5f7e3e4802d564f846c32f962f8f5a28aee77c44
[ "ZPL-2.1" ]
1
2021-01-18T12:51:51.000Z
2021-01-18T12:51:51.000Z
src/grokcore/xmlrpc/tests/functional/xmlrpc/xmlrpc.py
zopefoundation/grokcore.xmlrpc
5f7e3e4802d564f846c32f962f8f5a28aee77c44
[ "ZPL-2.1" ]
1
2018-01-12T06:53:46.000Z
2018-01-12T06:53:46.000Z
""" >>> getRootFolder()["Manfred"] = Mammoth() >>> from zope.app.wsgi.testlayer import XMLRPCServerProxy >>> server = XMLRPCServerProxy("http://localhost/", transport=transport) >>> server.Manfred.stomp() 'Manfred stomped.' >>> server.Manfred.dance() "Manfred doesn't like to dance." Let's also check whether we can use XML-RPC with subobjects we traverse to:: >>> server.Manfred.baby.pounce() 'baby pounced.' """ import grokcore.component as grok import grokcore.xmlrpc from grokcore.content import Model class Mammoth(Model): def traverse(self, name): if name == 'baby': return MammothBaby() class MammothBaby(Model): pass class MammothRPC(grokcore.xmlrpc.XMLRPC): grok.context(Mammoth) def stomp(self): return '%s stomped.' % self.context.__name__ def dance(self): return '%s doesn\'t like to dance.' % self.context.__name__ class BabyRPC(grokcore.xmlrpc.XMLRPC): grok.context(MammothBaby) def pounce(self): return '%s pounced.' % self.context.__name__
21.673469
74
0.6742
127
1,062
5.543307
0.433071
0.055398
0.046875
0.034091
0.136364
0
0
0
0
0
0
0
0.19209
1,062
48
75
22.125
0.820513
0.400188
0
0
0
0
0.055911
0
0
0
0
0
0
1
0.210526
false
0.052632
0.157895
0.157895
0.789474
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
81279311ebf9077283efad036c670ba76a8a454c
248
py
Python
modpy.py
semyont/modpy
6e88f4b2d0e653aa244077fe24c4fc9753e5460b
[ "MIT" ]
null
null
null
modpy.py
semyont/modpy
6e88f4b2d0e653aa244077fe24c4fc9753e5460b
[ "MIT" ]
null
null
null
modpy.py
semyont/modpy
6e88f4b2d0e653aa244077fe24c4fc9753e5460b
[ "MIT" ]
null
null
null
# modpy - Modbus CLI with Service # # Written and (C) 2016 by Semyon Teplitsky # Provided under the terms of the MIT license # from pymodbus.client.sync import ModbusClientMixin,ModbusSerialClient,ModbusTcpClient,ModbusUdpClient,BaseModbusClient
27.555556
118
0.814516
30
248
6.733333
0.966667
0
0
0
0
0
0
0
0
0
0
0.018519
0.129032
248
8
119
31
0.916667
0.467742
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
813fb8f63aa048b70a3bc6933a3324165d16ba41
128
py
Python
source/utils/__init__.py
freakleesin/cheapBuy
51d5e7feb02724394ba0eb752b24ee00ce00a462
[ "MIT" ]
1
2021-11-26T18:20:21.000Z
2021-11-26T18:20:21.000Z
source/utils/__init__.py
freakleesin/cheapBuy
51d5e7feb02724394ba0eb752b24ee00ce00a462
[ "MIT" ]
16
2021-11-24T16:07:42.000Z
2021-11-30T02:32:23.000Z
source/utils/__init__.py
freakleesin/cheapBuy
51d5e7feb02724394ba0eb752b24ee00ce00a462
[ "MIT" ]
2
2021-11-27T05:52:44.000Z
2021-12-16T21:26:51.000Z
""" Copyright (c) 2021 Anshul Patel This code is licensed under MIT license (see LICENSE.MD for details) @author: cheapBuy """
18.285714
68
0.734375
19
128
4.947368
0.947368
0
0
0
0
0
0
0
0
0
0
0.037383
0.164063
128
6
69
21.333333
0.841122
0.929688
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d49273b3d043b9c083546d52806dde94a4990b1e
86
py
Python
egs/librispeech/s5/fairseq_ltlm/ltlm/models/__init__.py
somniumism/kaldi
4609ea102ab633af53414f0b13d60c0424fcd9ce
[ "Apache-2.0" ]
1
2022-01-31T20:47:12.000Z
2022-01-31T20:47:12.000Z
egs/librispeech/s5/fairseq_ltlm/ltlm/models/__init__.py
somniumism/kaldi
4609ea102ab633af53414f0b13d60c0424fcd9ce
[ "Apache-2.0" ]
5
2020-08-14T01:53:54.000Z
2020-11-16T15:46:11.000Z
egs/librispeech/s5/fairseq_ltlm/ltlm/models/__init__.py
somniumism/kaldi
4609ea102ab633af53414f0b13d60c0424fcd9ce
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 STC-Innovation LTD (Author: Anton Mitrofanov) from .LTLM import LTLM
28.666667
62
0.790698
12
86
5.666667
0.916667
0
0
0
0
0
0
0
0
0
0
0.054054
0.139535
86
2
63
43
0.864865
0.697674
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d4a3b8f06aa8fb0df5b6a12bec42ed022a31c720
25
py
Python
hucrl/model/__init__.py
lioritan/hucrl
fb5b3aea0edf69a4169ab79d2908918111fc6072
[ "MIT" ]
24
2020-12-05T20:10:27.000Z
2022-03-25T10:00:51.000Z
hucrl/model/__init__.py
lioritan/hucrl
fb5b3aea0edf69a4169ab79d2908918111fc6072
[ "MIT" ]
3
2021-02-04T10:07:30.000Z
2021-06-02T15:25:18.000Z
hucrl/model/__init__.py
lioritan/hucrl
fb5b3aea0edf69a4169ab79d2908918111fc6072
[ "MIT" ]
4
2021-04-04T12:36:40.000Z
2022-03-26T10:37:55.000Z
"""Optimistic Models."""
12.5
24
0.64
2
25
8
1
0
0
0
0
0
0
0
0
0
0
0
0.08
25
1
25
25
0.695652
0.72
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d4a46766941d3ab0a31bf2f654932c5b6957aeb6
129
py
Python
Backend/Testing/rpyc/ABexample/testing.py
dcordb/DSpotify
dfb7ce4bac3a97254b943e0bcf8027f3e49a3d6f
[ "MIT" ]
1
2020-01-11T05:28:22.000Z
2020-01-11T05:28:22.000Z
Backend/Testing/rpyc/ABexample/testing.py
dcordb/DSpotify
dfb7ce4bac3a97254b943e0bcf8027f3e49a3d6f
[ "MIT" ]
null
null
null
Backend/Testing/rpyc/ABexample/testing.py
dcordb/DSpotify
dfb7ce4bac3a97254b943e0bcf8027f3e49a3d6f
[ "MIT" ]
null
null
null
import rpyc c1 = rpyc.connect("localhost", 5555) c1.root.call_hello() c2 = rpyc.connect("localhost", 5556) c2.root.call_hello()
18.428571
36
0.728682
20
129
4.6
0.55
0.23913
0.434783
0
0
0
0
0
0
0
0
0.103448
0.100775
129
7
37
18.428571
0.689655
0
0
0
0
0
0.138462
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d4cc5eb68c674de8bccb774d5be04664109d5538
405
py
Python
python-para-zumbis/Lista 1/exercicio01_josebarbosa_03.py
kidchenko/playground
750f1d12a793f6851df68bbd1b9d3ec32b5f70a3
[ "MIT" ]
4
2016-11-10T02:29:32.000Z
2017-08-24T15:19:12.000Z
python-para-zumbis/Lista 1/exercicio01_josebarbosa_03.py
kidchenko/playground
750f1d12a793f6851df68bbd1b9d3ec32b5f70a3
[ "MIT" ]
13
2019-09-16T20:01:18.000Z
2022-02-13T11:00:49.000Z
python-para-zumbis/Lista 1/exercicio01_josebarbosa_03.py
kidchenko/playground
750f1d12a793f6851df68bbd1b9d3ec32b5f70a3
[ "MIT" ]
1
2022-02-24T06:35:25.000Z
2022-02-24T06:35:25.000Z
dias = int(input('Digite os dias: ')) * 60 * 60 * 24 horas = int(input('Digite as horas: ')) * 60 * 60 minutos = int(input('Digite os minutos: ')) * 60 segundos = int(input('Digite os segundos: ')) print ('O total dias em segundos: %d' % dias) print ('O total de horas em segundos: %d' % horas) print ('O total de minutos em segundos: %d' % minutos) print ('O total de segundos: %d' % segundos)
40.5
55
0.632099
63
405
4.063492
0.269841
0.125
0.21875
0.1875
0
0
0
0
0
0
0
0.037267
0.204938
405
9
56
45
0.757764
0
0
0
0
0
0.477273
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
d4ccd629954d62087f4459c923619b1eb74b15d2
1,453
py
Python
sms_voting/migrations/0005_auto_20211107_1539.py
Fedor-Lyanguzov/Voting
98f8fd958624fa9ba3835836c525fbb4abb6b5e5
[ "MIT" ]
null
null
null
sms_voting/migrations/0005_auto_20211107_1539.py
Fedor-Lyanguzov/Voting
98f8fd958624fa9ba3835836c525fbb4abb6b5e5
[ "MIT" ]
1
2021-12-04T11:43:25.000Z
2021-12-04T11:43:25.000Z
sms_voting/migrations/0005_auto_20211107_1539.py
Fedor-Lyanguzov/Voting
98f8fd958624fa9ba3835836c525fbb4abb6b5e5
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-07 15:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sms_voting', '0004_auto_20211107_1506'), ] operations = [ migrations.AlterField( model_name='poll', name='end', field=models.DateTimeField(blank=True, default=None, null=True), ), migrations.AlterField( model_name='poll', name='face_participants', field=models.IntegerField(blank=True), ), migrations.AlterField( model_name='poll', name='no_votes', field=models.IntegerField(blank=True, default=None, null=True), ), migrations.AlterField( model_name='poll', name='real_participants', field=models.IntegerField(blank=True, default=None, null=True), ), migrations.AlterField( model_name='poll', name='remote_participants', field=models.TextField(blank=True), ), migrations.AlterField( model_name='poll', name='start', field=models.DateTimeField(blank=True, default=None, null=True), ), migrations.AlterField( model_name='poll', name='yes_votes', field=models.IntegerField(blank=True, default=None, null=True), ), ]
29.653061
76
0.562973
139
1,453
5.769784
0.352518
0.174564
0.218204
0.253117
0.736908
0.736908
0.63217
0.63217
0.517456
0.517456
0
0.031313
0.318651
1,453
48
77
30.270833
0.778788
0.03097
0
0.619048
1
0
0.098862
0.016358
0
0
0
0
0
1
0
false
0
0.02381
0
0.095238
0
0
0
0
null
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
be03d0d3d8130f537a11b507f1fcfb6c1bdc63eb
184
py
Python
app/whatsapp-app/__init__.py
simonsanvil/openai-whatsapp-chatbot
97a7d5d1773523e1c6b62392ffe032b289b0164f
[ "MIT" ]
3
2021-11-15T20:34:38.000Z
2021-12-17T03:52:25.000Z
app/whatsapp-app/__init__.py
simonsanvil/GTP3-whatsapp-chatbot
97a7d5d1773523e1c6b62392ffe032b289b0164f
[ "MIT" ]
null
null
null
app/whatsapp-app/__init__.py
simonsanvil/GTP3-whatsapp-chatbot
97a7d5d1773523e1c6b62392ffe032b289b0164f
[ "MIT" ]
1
2021-12-03T01:26:50.000Z
2021-12-03T01:26:50.000Z
from .whatsapp_app import app import os,sys sys.path.append('whatsapp-app') def main(): app.run(debug=False, host='0.0.0.0', port=int(os.environ.get('PORT', 8000))) # app.run()
30.666667
80
0.673913
33
184
3.727273
0.606061
0.04878
0.04878
0
0
0
0
0
0
0
0
0.049383
0.119565
184
6
81
30.666667
0.709877
0.048913
0
0
0
0
0.132184
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
be2179102b3e27dc3703bf34ecedcaa3d937c646
403
py
Python
geocamTalk/tests/__init__.py
geocam/geocamMemoWeb
393d3cc1bc14713e47698005c0dd20363593f8a5
[ "NASA-1.3" ]
1
2017-08-28T13:05:43.000Z
2017-08-28T13:05:43.000Z
geocamTalk/tests/__init__.py
geocam/geocamMemoWeb
393d3cc1bc14713e47698005c0dd20363593f8a5
[ "NASA-1.3" ]
null
null
null
geocamTalk/tests/__init__.py
geocam/geocamMemoWeb
393d3cc1bc14713e47698005c0dd20363593f8a5
[ "NASA-1.3" ]
null
null
null
# __BEGIN_LICENSE__ # Copyright (C) 2008-2010 United States Government as represented by # the Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # __END_LICENSE__ # wildcard imports ok # pylint: disable=W0401 from geocamTalk.tests.unit import * from geocamTalk.tests.views import * from geocamTalk.tests.functional import * from geocamTalk.tests.urls import *
28.785714
73
0.80397
52
403
6.038462
0.730769
0.178344
0.242038
0.238854
0
0
0
0
0
0
0
0.034286
0.131514
403
13
74
31
0.862857
0.583127
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4