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
1432b420020c844b338e343935780ed59c1e2426
99
py
Python
eventhandler/apps.py
rualb/eventmanager
3615b6d0e6993be8ddcd6c57b13954a25c92e521
[ "MIT" ]
null
null
null
eventhandler/apps.py
rualb/eventmanager
3615b6d0e6993be8ddcd6c57b13954a25c92e521
[ "MIT" ]
null
null
null
eventhandler/apps.py
rualb/eventmanager
3615b6d0e6993be8ddcd6c57b13954a25c92e521
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EventhandlerConfig(AppConfig): name = 'eventhandler'
16.5
36
0.777778
10
99
7.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.151515
99
5
37
19.8
0.916667
0
0
0
0
0
0.121212
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
14399559cb9b1ff495b6f77fecd4828e558727b9
24
py
Python
waves/sound/__init__.py
mondeja/waves
87b830fdb963c28dd055cc55ee09826c9df2302b
[ "BSD-3-Clause" ]
null
null
null
waves/sound/__init__.py
mondeja/waves
87b830fdb963c28dd055cc55ee09826c9df2302b
[ "BSD-3-Clause" ]
37
2021-02-01T13:58:20.000Z
2022-01-01T19:38:59.000Z
waves/sound/__init__.py
mondeja/waves
87b830fdb963c28dd055cc55ee09826c9df2302b
[ "BSD-3-Clause" ]
null
null
null
"""Sound interfaces."""
12
23
0.625
2
24
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
24
1
24
24
0.681818
0.708333
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
14488b09efb10a3fcb8659b006bc4e6b54b7c7e4
108
py
Python
application.py
mdrahman1472/bookexample-webApp
117f1843f02aa0c9794242df0050561d9f532808
[ "MIT" ]
null
null
null
application.py
mdrahman1472/bookexample-webApp
117f1843f02aa0c9794242df0050561d9f532808
[ "MIT" ]
null
null
null
application.py
mdrahman1472/bookexample-webApp
117f1843f02aa0c9794242df0050561d9f532808
[ "MIT" ]
null
null
null
from flask import Flask from bookapp import app app.debug = True if __name__ == "__main__": app.run()
13.5
26
0.703704
16
108
4.25
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.203704
108
7
27
15.428571
0.790698
0
0
0
0
0
0.074074
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
145faf2a1be7be19f31ef81082a0ff61a15dd5d2
1,788
py
Python
temp.py
jo-gunhee/PlayGround
e0f2df0264bcb8d7c7acb26500959239de5682c5
[ "MIT" ]
null
null
null
temp.py
jo-gunhee/PlayGround
e0f2df0264bcb8d7c7acb26500959239de5682c5
[ "MIT" ]
null
null
null
temp.py
jo-gunhee/PlayGround
e0f2df0264bcb8d7c7acb26500959239de5682c5
[ "MIT" ]
null
null
null
# ex score s = "2020020355 58 2020029225 45 2018044302 95 2020073145 50 2017011658 78 2020000373 66 2020071594 86 2020097210 81 2018044375 84 2018046671 48 2020046335 19 2020019270 78 2020088922 31 2013049852 31 2017011885 88 2020087010 61 2020097083 73 2020085232 83 2020044557 96 2020088568 96 2020021830 29 2020088813 76 2018044739 83 2019005196 30 2020049752 44 2018044866 26 2020003927 50 2020062324 96 2019052688 78 2018044984 26 2017005887 92 2016015350 68 2020048968 57 2020058268 49 2020047110 96 2019043445 44 2020031321 결시 2017012542 47 2018045150 78 2020085387 67 2020023627 47 2020050137 12 2020062442 87 2020053954 96 2018044266 결시 2020019252 84 2020098731 55 2016001694 53 2017014420 88 2020028295 33 2020072124 17 2017011776 91 2020040455 32 2018044475 75 2020062842 76 2018044502 61 2018044539 22 2020008368 84 2018044548 72 2020067156 결 시 2020076735 100 2019079116 72 2020089225 89 2016005387 96 2019086771 48 2020064911 44 2020061967 81 2020088895 100 2020079570 59 2020010955 64 2020015223 8 2018049825 16 2020012906 80 2020033954 89 2020030773 84 2020086171 77 2020092188 65 2020050419 89 2019071303 55 2018045114 84 2018045178 65 2020052615 46 2018045241 83 2016062388 74" l = s.split() sc = [] sc_sum = 0 err = [] eva = 0 for i in range(len(l)): if(len(l[i]) == 10): pass else: try: sc.append(int(l[i])) sc_sum += int(l[i]) except: err.append(l[i]) print("score :", sc, "\nsc_num :", len(sc), "\n") print("Err :", err, "\nErr_num :", len(err), "\n") n = int(input("총 학생은 몇명인가요?(err 값 보정) : ")) my_sc = int(input("당신의 성적은 몇 점 인가요? : ")) print("총 평균 : ", sc_sum/n) for i in range(len(sc)): if(sc[i] >= my_sc): eva += 1 print("내 등수 : ", eva) print("상위 : ", round((eva/n)*100, 3), "%")
59.6
1,183
0.722036
275
1,788
4.669091
0.669091
0.006231
0.009346
0.017134
0.021807
0
0
0
0
0
0
0.701803
0.193512
1,788
29
1,184
61.655172
0.188627
0.004474
0
0
0
0.04
0.718785
0
0
0
0
0
0
1
0
false
0.04
0
0
0
0.2
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
149760e56b0a870bcbfa3c094d1e5e0229460841
131
py
Python
python/20190321/Code/c1.py
Realize0917/career
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
[ "MIT" ]
3
2019-01-17T05:50:51.000Z
2019-03-15T10:10:07.000Z
python/20190321/Code/c1.py
Realize0917/career
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
[ "MIT" ]
10
2019-01-17T06:07:03.000Z
2019-02-19T05:55:25.000Z
python/20190321/Code/c1.py
Realize0917/career
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
[ "MIT" ]
4
2018-12-22T07:32:55.000Z
2019-03-06T09:13:48.000Z
def fo1(): print('1') print('2') print('3') def main(): fo1() print('a') print('b') print('c') main()
10.916667
14
0.427481
18
131
3.111111
0.555556
0.285714
0
0
0
0
0
0
0
0
0
0.055556
0.312977
131
12
15
10.916667
0.566667
0
0
0
0
0
0.045455
0
0
0
0
0
0
1
0.2
true
0
0
0
0.2
0.6
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
14a2a6ca12e6cad03420825830283ca8c5397fa8
338
py
Python
tests/conftest.py
Mcamargo85/SiMo-Discoverer
e308c01dd24f4543deafcf104e02f0b593ea6acb
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
Mcamargo85/SiMo-Discoverer
e308c01dd24f4543deafcf104e02f0b593ea6acb
[ "Apache-2.0" ]
1
2019-05-03T05:18:57.000Z
2019-05-03T05:18:57.000Z
tests/conftest.py
Mcamargo85/SiMo-Discoverer
e308c01dd24f4543deafcf104e02f0b593ea6acb
[ "Apache-2.0" ]
null
null
null
import os from pathlib import Path import pytest from click.testing import CliRunner @pytest.fixture(scope='function') def runner(request): return CliRunner() @pytest.fixture(scope='module') def entry_point() -> Path: if Path.cwd().name == 'tests': return Path('assets') else: return Path('tests/assets')
17.789474
35
0.680473
43
338
5.325581
0.581395
0.131004
0.19214
0.235808
0
0
0
0
0
0
0
0
0.189349
338
18
36
18.777778
0.835766
0
0
0
0
0
0.109467
0
0
0
0
0
0
1
0.153846
false
0
0.307692
0.076923
0.692308
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
14af7de9d12010c6007518416475a8286132257b
55
py
Python
problem/10000~19999/17249/17249.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/10000~19999/17249/17249.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/10000~19999/17249/17249.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
x,y=input().split("0") print(x.count("@"),y.count("@"))
27.5
32
0.545455
10
55
3
0.7
0
0
0
0
0
0
0
0
0
0
0.018519
0.018182
55
2
32
27.5
0.537037
0
0
0
0
0
0.053571
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
14b2afe5b92c87a7089ce15cf1d884d873e070b9
1,138
py
Python
src/data/models.py
phNam2/DjangoProject
27086a00795df583338521c140ac4b853ef5a821
[ "bzip2-1.0.6" ]
null
null
null
src/data/models.py
phNam2/DjangoProject
27086a00795df583338521c140ac4b853ef5a821
[ "bzip2-1.0.6" ]
null
null
null
src/data/models.py
phNam2/DjangoProject
27086a00795df583338521c140ac4b853ef5a821
[ "bzip2-1.0.6" ]
null
null
null
from django.db import models # Create your models here. class Manhattan(models.Model): BOROUGH = models.IntegerField() NEIGHBORHOOD = models.CharField(max_length=50) BUILDING_CLASS_CATEGORY = models.CharField(max_length=50) TAX_CLASS = models.CharField(max_length=5) BLOCK = models.IntegerField() LOT = models.IntegerField() EASE_MENT = models.CharField(null=True, blank=True, max_length=5) BUILDING_CLASS_PRESENT = models.CharField(max_length=2) ADDRESS = models.CharField(max_length=50) APARTMENT_NUMBER = models.CharField(max_length=10, blank=True, null=True) ZIP_CODE = models.IntegerField() RESIDENTIAL_UNITS = models.IntegerField() COMMERCIAL_UNITS = models.IntegerField() TOTAL_UNITS = models.IntegerField() LAND_SQUARE_FEET = models.IntegerField(blank=True, null=True) GROSS_SQUARE_FEET = models.IntegerField() YEAR_BUILT = models.IntegerField() TAX_CLASS_AT_SALE = models.CharField(max_length=5) BUILDING_CLASS_AT_SALE = models.CharField(max_length=2) SALE_PRICE = models.CharField(max_length=20) SALE_DATE = models.DateField(auto_now=False, auto_now_add=False)
45.52
75
0.769772
149
1,138
5.630872
0.38255
0.214541
0.193087
0.257449
0.275328
0.083433
0.083433
0
0
0
0
0.015136
0.129174
1,138
25
76
45.52
0.831483
0.02109
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.043478
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
1ae60ae422b81679c1932335213404d52f98f968
211
py
Python
atividades/ex96.py
Fleen66/Python_exercises
fd05fdf1181da833a1a1bc9f4a476afc8f467977
[ "MIT" ]
null
null
null
atividades/ex96.py
Fleen66/Python_exercises
fd05fdf1181da833a1a1bc9f4a476afc8f467977
[ "MIT" ]
null
null
null
atividades/ex96.py
Fleen66/Python_exercises
fd05fdf1181da833a1a1bc9f4a476afc8f467977
[ "MIT" ]
null
null
null
def area(largura, cumprimento): print(f'Sua área foi: {cumprimento * largura}') largura = int(input('Digite sua largura: ')) cumprimento = int(input('Digite seu cumprimento: ')) area(largura, cumprimento)
26.375
52
0.71564
26
211
5.807692
0.5
0.357616
0.291391
0
0
0
0
0
0
0
0
0
0.137441
211
7
53
30.142857
0.82967
0
0
0
0
0
0.383886
0
0
0
0
0
0
1
0.2
false
0
0
0
0.2
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
1af7e5f8dcf455e069aaba0e50be5e96eb87fe86
17
py
Python
test/hook_test.py
ariwaranosai/seki
e0ef5a212055329226aa6cb16be6df6fa9397b37
[ "MIT" ]
null
null
null
test/hook_test.py
ariwaranosai/seki
e0ef5a212055329226aa6cb16be6df6fa9397b37
[ "MIT" ]
null
null
null
test/hook_test.py
ariwaranosai/seki
e0ef5a212055329226aa6cb16be6df6fa9397b37
[ "MIT" ]
null
null
null
AAA = 12 BBB = 13
8.5
8
0.588235
4
17
2.5
1
0
0
0
0
0
0
0
0
0
0
0.333333
0.294118
17
2
9
8.5
0.5
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
212991af473b84b01feaf67f58087a5795cd3c62
16,905
py
Python
sequence-divergence-experiment/bin/plot_results.py
phyletica/abc-glm-marginal-test
a5162213cd028ad7c7144d44d25bb84ca613a761
[ "CC-BY-4.0" ]
2
2019-02-13T15:55:28.000Z
2019-12-15T13:55:08.000Z
sequence-divergence-experiment/bin/plot_results.py
phyletica/abc-glm-marginal-test
a5162213cd028ad7c7144d44d25bb84ca613a761
[ "CC-BY-4.0" ]
null
null
null
sequence-divergence-experiment/bin/plot_results.py
phyletica/abc-glm-marginal-test
a5162213cd028ad7c7144d44d25bb84ca613a761
[ "CC-BY-4.0" ]
null
null
null
#! /usr/bin/env python import sys import os import math import matplotlib as mpl # Use TrueType (42) fonts rather than Type 3 fonts mpl.rcParams["pdf.fonttype"] = 42 mpl.rcParams["ps.fonttype"] = 42 tex_font_settings = { "text.usetex": True, "font.family": "sans-serif", "text.latex.preamble" : [ "\\usepackage[T1]{fontenc}", "\\usepackage[cm]{sfmath}", ] } mpl.rcParams.update(tex_font_settings) import matplotlib.pyplot as plt from matplotlib import gridspec import project_util def spreadsheet_iter(spreadsheet_path, sep = '\t'): with open(spreadsheet_path, "r") as file_stream: header = next(file_stream).strip().split(sep) for row_idx, row in enumerate(file_stream): if row.strip() == '': continue r = [el.strip() for el in row.strip().split(sep)] if len(r) != len(header): raise Exception('row {0} of spreadsheet {1} has {2} columns, ' 'header has {3}'.format(row_idx + 1, spreadsheet_path, len(r), len(header))) yield dict(zip(header, r)) def get_dict_from_spreadsheet(spreadsheet_path, sep = '\t'): ss_iter = spreadsheet_iter(spreadsheet_path, sep = sep) row_dict = next(ss_iter) d = dict(zip(row_dict.keys(), [[row_dict[k]] for k in row_dict.keys()])) for row_dict in ss_iter: for k in row_dict.keys(): d[k].append(row_dict[k]) return d def get_results(): path = os.path.join(project_util.RESULTS_DIR, "results.txt") return get_dict_from_spreadsheet(path) def plot_marginal_likelihood_results( correct_model_ml, correct_model_glm_ml, vague_model_ml, vague_model_glm_ml): plt.close('all') fig = plt.figure(figsize = (6.0, 4.75)) gs = gridspec.GridSpec(1, 1, wspace = 0.0, hspace = 0.0) ax = plt.subplot(gs[0, 0]) line, = ax.plot(correct_model_ml, correct_model_glm_ml) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 5.5, linestyle = '', zorder = 100, rasterized = False) xlabel_text = ax.set_xlabel("Quadrature log marginal likelihood of correct model", size = 12) ylabel_text = ax.set_ylabel("ABC-GLM log marginal likelihood of correct model", size = 12) gs.update(left = 0.1, right = 0.98, bottom = 0.1, top = 0.98) plot_path = os.path.join(project_util.RESULTS_DIR, "correct-model-marginal-likelihoods.pdf") plt.savefig(plot_path) plt.close('all') fig = plt.figure(figsize = (6.0, 4.5)) gs = gridspec.GridSpec(1, 1, wspace = 0.0, hspace = 0.0) ax = plt.subplot(gs[0, 0]) line, = ax.plot(vague_model_ml, vague_model_glm_ml) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 5.5, linestyle = '', zorder = 100, rasterized = False) xlabel_text = ax.set_xlabel("Quadrature log marginal likelihood of vague model", size = 12) ylabel_text = ax.set_ylabel("ABC-GLM log marginal likelihood of vague model", size = 12) gs.update(left = 0.1, right = 0.98, bottom = 0.1, top = 0.98) plot_path = os.path.join(project_util.RESULTS_DIR, "vague-model-marginal-likelihoods.pdf") plt.savefig(plot_path) def plot_bayes_factor_results(quadrature_ln_bf, glm_ln_bf): mn = min(quadrature_ln_bf + glm_ln_bf) mx = max(quadrature_ln_bf + glm_ln_bf) axis_buffer = math.fabs(mx - mn) * 0.05 axis_min = mn - axis_buffer axis_max = mx + axis_buffer plt.close('all') fig = plt.figure(figsize = (5.25, 4.0)) gs = gridspec.GridSpec(1, 1, wspace = 0.0, hspace = 0.0) ax = plt.subplot(gs[0, 0]) line, = ax.plot(quadrature_ln_bf, glm_ln_bf) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 5.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [-1.0, 1.0], [-1.0, 1.0]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.0, marker = '', zorder = 0) # Draw line associated with failing to penalize for essentially zero # likelihood across the second (almost) half of vague prior which is # roughly log(1/2); i.e., the upper half of the vague prior (0.1-0.2) # should drag down marginal likelihood by about 1/2 # More precisely it should reduce ML by (0.2 - 0.0001) / (0.1 - 0.0001) prior_lower = 1.0 / 10000.0 vague_penalty = math.log((0.2 - prior_lower) / (0.1 - prior_lower)) penalty_line, = ax.plot( [-1.0, 1.0], [-1.0 - vague_penalty, 1.0 - vague_penalty]) plt.setp(penalty_line, color = '0.7', linestyle = '--', linewidth = 1.0, marker = '', zorder = 0) xlabel_text = ax.set_xlabel("Quadrature log Bayes factor", size = 14) ylabel_text = ax.set_ylabel("ABC-GLM log Bayes factor", size = 14) gs.update(left = 0.13, right = 0.99, bottom = 0.12, top = 0.99) plot_path = os.path.join(project_util.RESULTS_DIR, "ln-bayes-factors.pdf") plt.savefig(plot_path) quadrature_bf = [math.exp(lnbf) for lnbf in quadrature_ln_bf] glm_bf = [math.exp(lnbf) for lnbf in glm_ln_bf] mn = min(quadrature_bf + glm_bf) mx = max(quadrature_bf + glm_bf) axis_buffer = math.fabs(mx - mn) * 0.05 axis_min = mn - axis_buffer axis_max = mx + axis_buffer plt.close('all') fig = plt.figure(figsize = (5.25, 4.0)) gs = gridspec.GridSpec(1, 1, wspace = 0.0, hspace = 0.0) ax = plt.subplot(gs[0, 0]) line, = ax.plot(quadrature_bf, glm_bf) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.8, markersize = 5.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [0.0, 3.0], [0.0, 3.0]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.4, marker = '', zorder = 0) # Draw line associated with failing to penalize for essentially zero # likelihood across the second (almost) half of vague prior which is # roughly log(1/2); i.e., the upper half of the vague prior (0.1-0.2) # should drag down marginal likelihood by about 1/2 # More precisely it should reduce ML by (0.2 - 0.0001) / (0.1 - 0.0001) prior_lower = 1.0 / 10000.0 vague_penalty = (0.2 - prior_lower) / (0.1 - prior_lower) penalty_line, = ax.plot( [0.0, 3.0], [0.0, 3.0 / vague_penalty]) plt.setp(penalty_line, color = '0.7', linestyle = '--', linewidth = 1.4, marker = '', zorder = 0) legend_elements = [ mpl.lines.Line2D([0], [0], color = '0.7', linestyle = '-', linewidth = 1.4, marker = '', label = "1-to-1 line"), mpl.lines.Line2D([0], [0], color = '0.7', linestyle = '--', linewidth = 1.4, marker = '', label = "Predicted bias"), ] ax.legend(handles = legend_elements) xlabel_text = ax.set_xlabel("Quadrature Bayes factor", size = 14) ylabel_text = ax.set_ylabel("ABC-GLM Bayes factor", size = 14) gs.update(left = 0.13, right = 0.99, bottom = 0.12, top = 0.99) plot_path = os.path.join(project_util.RESULTS_DIR, "bayes-factors.pdf") plt.savefig(plot_path) def plot_edge_estimates( true_edge_length, correct_model_glm_estimate, correct_model_mcmc_estimate, vague_model_glm_estimate, vague_model_mcmc_estimate): mn = min(true_edge_length + correct_model_glm_estimate + \ correct_model_mcmc_estimate + vague_model_glm_estimate + \ vague_model_mcmc_estimate) mx = max(true_edge_length + correct_model_glm_estimate + \ correct_model_mcmc_estimate + vague_model_glm_estimate + \ vague_model_mcmc_estimate) axis_buffer = math.fabs(mx - mn) * 0.05 axis_min = mn - axis_buffer axis_max = mx + axis_buffer plt.close('all') fig = plt.figure(figsize = (7.0, 5.5)) gs = gridspec.GridSpec(2, 2, wspace = 0.0, hspace = 0.0) ax = plt.subplot(gs[0, 0]) line, = ax.plot(true_edge_length, correct_model_glm_estimate) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 4.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [axis_min, axis_max], [axis_min, axis_max]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.0, marker = '', zorder = 0) ax.text(0.5, 1.0, "ABC-GLM", size = 14.0, horizontalalignment = "center", verticalalignment = "bottom", transform = ax.transAxes) ax = plt.subplot(gs[0, 1]) line, = ax.plot(true_edge_length, correct_model_mcmc_estimate) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 4.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [axis_min, axis_max], [axis_min, axis_max]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.0, marker = '', zorder = 0) ax.text(0.5, 1.0, "MCMC", size = 14.0, horizontalalignment = "center", verticalalignment = "bottom", transform = ax.transAxes) ax.text(1.0, 0.5, "Correct model", size = 14.0, horizontalalignment = "left", verticalalignment = "center", rotation = 270.0, transform = ax.transAxes) ax = plt.subplot(gs[1, 0]) line, = ax.plot(true_edge_length, vague_model_glm_estimate) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 4.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [axis_min, axis_max], [axis_min, axis_max]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.0, marker = '', zorder = 0) ax.text(-0.15, 1.0, "Estimated branch length", size = 16.0, horizontalalignment = "right", verticalalignment = "center", rotation = 90.0, transform = ax.transAxes) ax.text(1.0, -0.13, "True branch length", size = 16.0, horizontalalignment = "center", verticalalignment = "top", transform = ax.transAxes) ax = plt.subplot(gs[1, 1]) line, = ax.plot(true_edge_length, vague_model_mcmc_estimate) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 4.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [axis_min, axis_max], [axis_min, axis_max]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.0, marker = '', zorder = 0) ax.text(1.0, 0.5, "Vague model", size = 14.0, horizontalalignment = "left", verticalalignment = "center", rotation = 270.0, transform = ax.transAxes) # show only the outside ticks all_axes = fig.get_axes() for ax in all_axes: if not ax.is_last_row(): ax.set_xticks([]) if not ax.is_first_col(): ax.set_yticks([]) # show tick labels only for lower-left plot all_axes = fig.get_axes() for ax in all_axes: if ax.is_last_row() and ax.is_first_col(): continue xtick_labels = ["" for item in ax.get_xticklabels()] ytick_labels = ["" for item in ax.get_yticklabels()] ax.set_xticklabels(xtick_labels) ax.set_yticklabels(ytick_labels) # avoid doubled spines all_axes = fig.get_axes() for ax in all_axes: for sp in ax.spines.values(): sp.set_visible(False) if ax.is_first_row(): ax.spines['top'].set_visible(True) ax.spines['bottom'].set_visible(True) else: ax.spines['bottom'].set_visible(True) if ax.is_first_col(): ax.spines['left'].set_visible(True) ax.spines['right'].set_visible(True) else: ax.spines['right'].set_visible(True) gs.update(left = 0.10, right = 0.97, bottom = 0.10, top = 0.96) plot_path = os.path.join(project_util.RESULTS_DIR, "branch-length-estimates.pdf") plt.savefig(plot_path) def plot_scatter(x, y, x_label, y_label, plot_path): mn = min(x + y) mx = max(x + y) axis_buffer = math.fabs(mx - mn) * 0.05 axis_min = mn - axis_buffer axis_max = mx + axis_buffer plt.close('all') fig = plt.figure(figsize = (5.0, 4.0)) gs = gridspec.GridSpec(1, 1, wspace = 0.0, hspace = 0.0) ax = plt.subplot(gs[0, 0]) line, = ax.plot(x, y) plt.setp(line, marker = 'o', markerfacecolor = 'none', markeredgecolor = '0.35', markeredgewidth = 0.7, markersize = 4.5, linestyle = '', zorder = 100, rasterized = False) ax.set_xlim(axis_min, axis_max) ax.set_ylim(axis_min, axis_max) identity_line, = ax.plot( [axis_min, axis_max], [axis_min, axis_max]) plt.setp(identity_line, color = '0.7', linestyle = '-', linewidth = 1.0, marker = '', zorder = 0) xlabel_text = ax.set_xlabel(x_label, size = 14) ylabel_text = ax.set_ylabel(y_label, size = 14) gs.update(left = 0.13, right = 0.95, bottom = 0.17, top = 0.95) plt.savefig(plot_path) def main_cli(argv = sys.argv): d = get_results() for k in d: d[k] = [float(x) for x in d[k]] plot_marginal_likelihood_results( correct_model_ml = d["correct_model_trapezoidal_10000_ln_ml"], correct_model_glm_ml = d["correct_model_glm_ln_ml"], vague_model_ml = d["vague_model_trapezoidal_10000_ln_ml"], vague_model_glm_ml = d["vague_model_glm_ln_ml"]) plot_bayes_factor_results( quadrature_ln_bf = d["trapezoidal_10000_ln_bf"], glm_ln_bf = d["glm_ln_bf"]) plot_edge_estimates( true_edge_length = d["true_edge_length"], correct_model_glm_estimate = d["correct_model_glm_mode_edge_length"], correct_model_mcmc_estimate = d["correct_model_mcmc_mean_edge_length"], vague_model_glm_estimate = d["vague_model_glm_mode_edge_length"], vague_model_mcmc_estimate = d["vague_model_mcmc_mean_edge_length"]) if __name__ == "__main__": main_cli()
33.541667
97
0.550311
2,167
16,905
4.08814
0.124596
0.006547
0.0298
0.037928
0.800429
0.766791
0.707078
0.657862
0.613613
0.604809
0
0.045362
0.328424
16,905
503
98
33.60835
0.73496
0.047678
0
0.644944
0
0
0.078898
0.026299
0
0
0
0
0
1
0.017978
false
0
0.01573
0
0.038202
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
21320981526173964c8d1b8f541c0f97ac985c12
174
py
Python
Second-handtradingplatform/Scripts/django-admin.py
shangyajun6943/Second-hand
b8c423eeb559aed67856fb8a9f7130793d028118
[ "Apache-2.0" ]
null
null
null
Second-handtradingplatform/Scripts/django-admin.py
shangyajun6943/Second-hand
b8c423eeb559aed67856fb8a9f7130793d028118
[ "Apache-2.0" ]
null
null
null
Second-handtradingplatform/Scripts/django-admin.py
shangyajun6943/Second-hand
b8c423eeb559aed67856fb8a9f7130793d028118
[ "Apache-2.0" ]
null
null
null
#!f:\djiangoworkspace\second-handtradingplatform\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
29
67
0.810345
20
174
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.086207
174
5
68
34.8
0.81761
0.37931
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
dcbe372166a13ff1bc0f2c9821b4bbd1f05880ec
107
py
Python
src/txkube/testing/test/__init__.py
LeastAuthority/txkube
a7e555d00535ff787d4b1204c264780da40cf736
[ "MIT" ]
14
2017-01-16T20:00:36.000Z
2020-02-15T05:58:23.000Z
src/txkube/testing/test/__init__.py
LeastAuthority/txkube
a7e555d00535ff787d4b1204c264780da40cf736
[ "MIT" ]
192
2017-01-16T18:39:14.000Z
2019-01-03T14:01:50.000Z
src/txkube/testing/test/__init__.py
LeastAuthority/txkube
a7e555d00535ff787d4b1204c264780da40cf736
[ "MIT" ]
6
2017-01-20T23:37:59.000Z
2020-10-16T21:38:59.000Z
# Copyright Least Authority Enterprises. # See LICENSE for details. """ Tests for ``txkube.testing``. """
15.285714
40
0.700935
12
107
6.25
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.149533
107
6
41
17.833333
0.824176
0.878505
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
dcc28abef0ad90cae363190ea7f82e124a1f2c00
2,719
py
Python
sdk/python/pulumi_azure_native/desktopvirtualization/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/desktopvirtualization/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/desktopvirtualization/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from .. import _utilities import typing # Export this package's modules as members: from ._enums import * from .application import * from .application_group import * from .get_application import * from .get_application_group import * from .get_host_pool import * from .get_msix_package import * from .get_scaling_plan import * from .get_workspace import * from .host_pool import * from .msix_package import * from .scaling_plan import * from .workspace import * from ._inputs import * from . import outputs # Make subpackages available: if typing.TYPE_CHECKING: import pulumi_azure_native.desktopvirtualization.v20190123preview as v20190123preview import pulumi_azure_native.desktopvirtualization.v20190924preview as v20190924preview import pulumi_azure_native.desktopvirtualization.v20191210preview as v20191210preview import pulumi_azure_native.desktopvirtualization.v20200921preview as v20200921preview import pulumi_azure_native.desktopvirtualization.v20201019preview as v20201019preview import pulumi_azure_native.desktopvirtualization.v20201102preview as v20201102preview import pulumi_azure_native.desktopvirtualization.v20201110preview as v20201110preview import pulumi_azure_native.desktopvirtualization.v20210114preview as v20210114preview import pulumi_azure_native.desktopvirtualization.v20210201preview as v20210201preview import pulumi_azure_native.desktopvirtualization.v20210309preview as v20210309preview else: v20190123preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20190123preview') v20190924preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20190924preview') v20191210preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20191210preview') v20200921preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20200921preview') v20201019preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20201019preview') v20201102preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20201102preview') v20201110preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20201110preview') v20210114preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20210114preview') v20210201preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20210201preview') v20210309preview = _utilities.lazy_import('pulumi_azure_native.desktopvirtualization.v20210309preview')
56.645833
107
0.843693
277
2,719
8
0.245487
0.108303
0.15343
0.207581
0.626354
0.600181
0.25722
0
0
0
0
0.130807
0.097462
2,719
47
108
57.851064
0.772209
0.084958
0
0
1
0
0.233777
0.233777
0
0
0
0
0
1
0
false
0
0.948718
0
0.948718
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
0d242afdd33296ba26ed861d2d961ba67d2aaadb
198
py
Python
selectelhackaton/auth/apps.py
mar4elkin/SelectelHackaton
948ebd344315b0a527b2a6bd5123c4688114d002
[ "MIT" ]
null
null
null
selectelhackaton/auth/apps.py
mar4elkin/SelectelHackaton
948ebd344315b0a527b2a6bd5123c4688114d002
[ "MIT" ]
null
null
null
selectelhackaton/auth/apps.py
mar4elkin/SelectelHackaton
948ebd344315b0a527b2a6bd5123c4688114d002
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SelectelHackatonAuthAppConfig(AppConfig): label = "selectelhackaton_auth" name = "selectelhackaton.auth" verbose_name = "SelectelHackaton Auth"
24.75
47
0.777778
18
198
8.444444
0.666667
0.394737
0.315789
0
0
0
0
0
0
0
0
0
0.151515
198
7
48
28.285714
0.904762
0
0
0
0
0
0.318182
0.212121
0
0
0
0
0
1
0
false
0
0.2
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b490b31e67e365c537bf7cf73ff129aebc4c623c
52
py
Python
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported_after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class MyClass: pass var: [MyClass] = MyClass()
10.4
26
0.634615
6
52
5.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.230769
52
5
26
10.4
0.825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0
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
1
0
0
0
0
0
4
b4cbba4576c315245c73a72803e777058b0d8348
1,716
py
Python
response_data/projects.py
ddeno/pyapi-gitlab
f74b6fb5c13cecae9524997847e928905cc60acf
[ "Apache-2.0" ]
100
2015-12-03T18:59:50.000Z
2022-03-04T20:25:56.000Z
response_data/projects.py
ddeno/pyapi-gitlab
f74b6fb5c13cecae9524997847e928905cc60acf
[ "Apache-2.0" ]
88
2015-12-02T08:59:35.000Z
2020-11-04T10:04:10.000Z
response_data/projects.py
ddeno/pyapi-gitlab
f74b6fb5c13cecae9524997847e928905cc60acf
[ "Apache-2.0" ]
51
2015-01-04T21:07:22.000Z
2015-11-30T13:43:18.000Z
delete_project = {} get_project = {"id": 3, "description": None, "default_branch": "master", "visibility": "private", "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git", "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git", "web_url": "http://example.com/diaspora/diaspora-project-site", "tag_list": ["example", "disapora project"], "owner": {"id": 3, "name": "Diaspora", "created_at": "2013-09-30T13:46:02Z"}, "name": "Diaspora Project Site", "name_with_namespace": "Diaspora / Diaspora Project Site", "path": "diaspora-project-site", "path_with_namespace": "diaspora/diaspora-project-site", "issues_enabled": True, "open_issues_count": 1, "merge_requests_enabled": True, "jobs_enabled": True, "wiki_enabled": True, "snippets_enabled": False, "container_registry_enabled": False, "created_at": "2013-09-30T13:46:02Z", "last_activity_at": "2013-09-30T13:46:02Z", "creator_id": 3, "namespace": {"id": 3, "name": "Diaspora", "path": "diaspora", "kind": "group", "full_path": "diaspora"}, "permissions": {"project_access": {"access_level": 10, "notification_level": 3}, "group_access": {"access_level": 50, "notification_level": 3}}, "archived": False, "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", "shared_runners_enabled": True, "forks_count": 0, "star_count": 0, "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b", "public_jobs": True, "shared_with_groups": [{"group_id": 4, "group_name": "Twitter", "group_access_level": 30}, {"group_id": 3, "group_name": "Gitlab Org", "group_access_level": 10}], "only_allow_merge_if_pipeline_succeeds": False, "only_allow_merge_if_all_discussions_are_resolved": False, "request_access_enabled": False}
572
1,695
0.731352
230
1,716
5.16087
0.4
0.088458
0.112047
0.113732
0.229992
0.229992
0.147431
0
0
0
0
0.048872
0.06993
1,716
2
1,696
858
0.694862
0
0
0
0
0
0.707459
0.179487
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b4f18a9bc84fa8ec64c53faf524df82e03ef2097
3,167
py
Python
sharetrace/queue.py
share-trace/contact-tracing
caee17f336f177292ecc4c788ba529daaa72d0f3
[ "MIT" ]
null
null
null
sharetrace/queue.py
share-trace/contact-tracing
caee17f336f177292ecc4c788ba529daaa72d0f3
[ "MIT" ]
null
null
null
sharetrace/queue.py
share-trace/contact-tracing
caee17f336f177292ecc4c788ba529daaa72d0f3
[ "MIT" ]
null
null
null
import queue from abc import ABC, abstractmethod # noinspection PyUnresolvedReferences # Empty and Full are used to allow for easy import swapping. from queue import Empty, Full from typing import Any, Optional import ray class BaseQueue(ABC): """A data structure with optimized FIFO access. Attributes: maxsize: An integer that indicates the maximum number of elements allowed in the queue. If 0 (default), then the queue is only bounded by the amount of system memory. """ __slots__ = ("maxsize",) def __init__(self, maxsize: int = 0): self.maxsize = maxsize @abstractmethod def empty(self) -> bool: pass @abstractmethod def full(self) -> bool: pass @abstractmethod def get(self, block: bool = True, timeout: Optional[float] = None) -> Any: pass @abstractmethod def get_nowait(self) -> Any: pass @abstractmethod def put( self, item, block: bool = True, timeout: Optional[float] = None ) -> None: pass @abstractmethod def put_nowait(self, item) -> None: pass @abstractmethod def qsize(self) -> int: pass def __repr__(self): return f"{self.__class__.__name__}(maxsize={self.maxsize})" class Queue(BaseQueue): """A queue actor that is compatible with Ray local mode.""" def __init__(self, maxsize: int = 0): super().__init__(maxsize) self._actor = _QueueActor.remote(maxsize) def empty(self) -> bool: return ray.get(self._actor.empty.remote()) def full(self) -> bool: return ray.get(self._actor.full.remote()) def get(self, block: bool = True, timeout: Optional[float] = None): return ray.get(self._actor.get.remote(block, timeout)) def get_nowait(self) -> Any: return ray.get(self._actor.get_nowait.remote()) def put( self, item, block: bool = True, timeout: Optional[float] = None ) -> None: return ray.get(self._actor.put.remote(item, block, timeout)) def put_nowait(self, item) -> None: return ray.get(self._actor.put_nowait.remote(item)) def qsize(self) -> int: return ray.get(self._actor.qsize.remote()) @ray.remote(max_restarts=3) class _QueueActor(BaseQueue): def __init__(self, maxsize: int = 0): super().__init__(maxsize) self._actor = queue.Queue(maxsize) def empty(self) -> bool: return self._actor.empty() def full(self) -> bool: return self._actor.full() def get(self, block: bool = True, timeout: Optional[float] = None) -> Any: return self._actor.get(block, timeout) def get_nowait(self) -> Any: return self._actor.get_nowait() def put( self, item, block: bool = True, timeout: Optional[float] = None ) -> None: self._actor.put(item, block, timeout) def put_nowait(self, item) -> None: self._actor.put_nowait(item) def qsize(self) -> int: return self._actor.qsize()
24.742188
78
0.603726
385
3,167
4.797403
0.220779
0.077964
0.045479
0.060639
0.548457
0.459123
0.360585
0.303194
0.263129
0.219816
0
0.002205
0.283865
3,167
127
79
24.937008
0.812169
0.124408
0
0.642857
0
0
0.020438
0.017883
0
0
0
0
0
1
0.297619
false
0.083333
0.059524
0.154762
0.559524
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
370ca68550243a225d5fc4d06f9b3bc9e075f0a6
100
py
Python
lisg_calendar/apps.py
tronze/LikeLion
cd4fe82ad515327edaeb62e0e209ac1b4ed98914
[ "BSD-3-Clause" ]
8
2019-03-05T12:23:07.000Z
2021-01-10T09:49:27.000Z
lisg_calendar/apps.py
tronze/LikeLion
cd4fe82ad515327edaeb62e0e209ac1b4ed98914
[ "BSD-3-Clause" ]
null
null
null
lisg_calendar/apps.py
tronze/LikeLion
cd4fe82ad515327edaeb62e0e209ac1b4ed98914
[ "BSD-3-Clause" ]
2
2019-02-18T06:34:34.000Z
2019-03-05T12:17:22.000Z
from django.apps import AppConfig class LisgCalendarConfig(AppConfig): name = 'lisg_calendar'
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
37291679afc3cb1ff8fcc3709616784eab3b1e7c
69
py
Python
BOJ_Solved/BOJ-5893.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
1e92986999b45aa9951e12e67b23062e410e9b36
[ "MIT" ]
7
2021-11-19T14:50:59.000Z
2022-02-25T20:00:20.000Z
BOJ_Solved/BOJ-5893.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
1e92986999b45aa9951e12e67b23062e410e9b36
[ "MIT" ]
null
null
null
BOJ_Solved/BOJ-5893.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
1e92986999b45aa9951e12e67b23062e410e9b36
[ "MIT" ]
null
null
null
""" 백준 5893번 : 17배 """ num = int(input(), 2) * 17 print(bin(num)[2:])
13.8
26
0.521739
12
69
3
0.833333
0
0
0
0
0
0
0
0
0
0
0.175439
0.173913
69
5
27
13.8
0.45614
0.202899
0
0
0
0
0
0
0
0
0
0
0
1
0
false
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
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
3730822f7476a16bbc6b3d3d8120891817d28b59
1,454
py
Python
2.bioinformatics_stronghold/rosa7.py
killbill-del/rosalind
1b947a62c9ab06118a3e3f085a09d7bc96f0adf6
[ "MIT" ]
null
null
null
2.bioinformatics_stronghold/rosa7.py
killbill-del/rosalind
1b947a62c9ab06118a3e3f085a09d7bc96f0adf6
[ "MIT" ]
null
null
null
2.bioinformatics_stronghold/rosa7.py
killbill-del/rosalind
1b947a62c9ab06118a3e3f085a09d7bc96f0adf6
[ "MIT" ]
null
null
null
'''Given: A DNA string s s of length at most 1000 nt. Return: Four integers (separated by spaces) counting the respective number of times that the symbols 'A', 'C', 'G', and 'T' occur in s ''' s = 'AGACTCGCGCACTCACGATGAATCCCAAGACAGCCTGGCGGAGTATGGTACTACGGCCGTCCTCACCAAGGCATTTCGGTCCGAGTAGCGGATTGTGTGCCAGCCCTGAGGGCGAGTTATGGGCTCATTCGGGAGACGTATGTACGAGCCTGATCGTTCGTCTGCATCGCTCTAATGTTTATCGACAGCCTTACCACTGTTTGAGTCGATGCAAGACCTGTTTCTTCAGCGCATTCACAGAGTGGCGCGAGACATACCACCAATACATAAGCGTAATTCTTACCGGCGTAGATCCCTAGGAGAGATCCAGCAAACTCGTTGTCATGGGTGACCGATACGCTCCTCAGTGGTCTCGACGGTTGTCTAGACGCGTCGTGCCGACAGTTGGCAATGCCAGTGGATCCGCATCCGAATTTCATGTGCTTTTAGAGCTTCGCTCATGCGTTCCACCGCCACGAGGCCAGCGAGGTGAGCCTTTTCCGGGAAGCCAACTGCACGGATCGCCCACTAGTGGATGAGCCACACTAAACATAGAATGAAACCCCGACCCCAACACGCCACCGTGTGTCGGGGATATTAGCCAACATTTGGTTTTGAGCGTTCCTCGGACCAGCTTCTCGATATACACGGAGCCTTCGGGATTCTGTCCCCTACCCTACCGCAGTCATATTCGGAGTCGGCTGGATCTCGATTCGTCTGGCAACCTGGGGTTTGTCATGCGGCAGGCCAGCTGCCTTGTCAAAGCCTATCGTCCCCAGGGGAACCAGGTAGAGGGTCGTGGTGTCGTAAGGAGACGCGTCGTGGCGACCACCTCAATCCGAGACGGCGACAAACATTTGCCGTTCCGTATAGGTACCTCCTAAGGTCGTCGAACTTCTAAGTCTCTGAATCTCCAGAACTCAATTCAGCGGATGGTAATGTCTCACAAGACTCGCTTGAGGCGGGCCCAT' a = 'A' c = 'C' g = 'G' t = 'T' acount = 0 ccount = 0 gcount = 0 tcount = 0 for i in range(0, len(s)): if a == s[i]: acount += 1 elif c == s[i]: ccount += 1 elif g == s[i]: gcount += 1 elif t == s[i]: tcount += 1 print(acount, ccount, gcount, tcount)
50.137931
956
0.839752
89
1,454
13.719101
0.494382
0.006552
0
0
0
0
0
0
0
0
0
0.009992
0.105227
1,454
28
957
51.928571
0.928517
0.128611
0
0
0
0
0.757143
0.753968
0
1
0
0
0
1
0
false
0
0
0
0
0.052632
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
2e9fe30db5a8c5b74e82095094054794c63f3290
47
py
Python
tests/test2.py
haroldl/clip
d7a39649faa499ab179d598f487d6b8328f80ff4
[ "Apache-2.0" ]
7
2015-04-06T19:46:50.000Z
2018-10-23T15:14:38.000Z
tests/test2.py
haroldl/clip
d7a39649faa499ab179d598f487d6b8328f80ff4
[ "Apache-2.0" ]
null
null
null
tests/test2.py
haroldl/clip
d7a39649faa499ab179d598f487d6b8328f80ff4
[ "Apache-2.0" ]
1
2016-03-29T13:14:47.000Z
2016-03-29T13:14:47.000Z
def f(x): return x + 2 y = f(40) print y
6.714286
16
0.489362
11
47
2.090909
0.727273
0
0
0
0
0
0
0
0
0
0
0.1
0.361702
47
6
17
7.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
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
2ea1cccfcf9f4b7f6cb1d073782bc05b5d2ef6fa
35
py
Python
python/events/lib/python3.4/sre_compile.py
classmember/proof_of_concept
da284ca57806f7c05c1b39bebfe0d681db2260fc
[ "MIT" ]
null
null
null
python/events/lib/python3.4/sre_compile.py
classmember/proof_of_concept
da284ca57806f7c05c1b39bebfe0d681db2260fc
[ "MIT" ]
3
2020-06-05T23:21:54.000Z
2021-06-10T22:02:26.000Z
python/events/lib/python3.4/sre_compile.py
classmember/proof_of_concept
da284ca57806f7c05c1b39bebfe0d681db2260fc
[ "MIT" ]
null
null
null
/usr/lib64/python3.4/sre_compile.py
35
35
0.828571
7
35
4
1
0
0
0
0
0
0
0
0
0
0
0.114286
0
35
1
35
35
0.685714
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
2ec2b7743ea738e34959ce1a2d7f2e26fde772f4
1,212
py
Python
graphing/plots.py
denialanderror/nhs-cancer-targets
fe0de0d447f17a797946aad7a150ec3768975e56
[ "MIT" ]
null
null
null
graphing/plots.py
denialanderror/nhs-cancer-targets
fe0de0d447f17a797946aad7a150ec3768975e56
[ "MIT" ]
1
2021-06-01T22:59:44.000Z
2021-06-01T22:59:44.000Z
graphing/plots.py
denialanderror/nhs-cancer-targets
fe0de0d447f17a797946aad7a150ec3768975e56
[ "MIT" ]
null
null
null
from typing import List import pandas as pd import plotly.plotly as py import plotly.graph_objs as go def _activity_for_provider(df: pd.DataFrame, provider_code: str) -> go.Scatter: grouped = df[df['ODS'] == provider_code].groupby('month_index') return go.Scatter( x=grouped['month'].sum(), y=grouped['total'].sum(), mode='lines+markers', name=str(grouped['provider'].unique().iloc[0][0] + ' - total referals') ) def activity_by_provider(df: pd.DataFrame) -> List[go.Scatter]: providers = df['ODS'].unique() return [_activity_for_provider(df, provider) for provider in providers] def _performance_for_provider(df: pd.DataFrame, provider_code: str) -> go.Scatter: grouped = df[df['ODS'] == provider_code].groupby('month_index') return go.Scatter( x=grouped['month'].sum(), y=grouped['percentage'].sum(), mode='lines+markers', name=str(grouped['provider'].unique().iloc[0][0] + ' - percentage target reached') ) def performance_by_provider(df: pd.DataFrame) -> List[go.Scatter]: providers = df['ODS'].unique() return [_performance_for_provider(df, provider) for provider in providers]
33.666667
82
0.661716
158
1,212
4.93038
0.291139
0.084724
0.066752
0.107831
0.73941
0.73941
0.73941
0.73941
0.629012
0.629012
0
0.004049
0.184818
1,212
35
83
34.628571
0.784413
0
0
0.37037
0
0
0.120462
0
0
0
0
0
0
1
0.148148
false
0
0.148148
0
0.444444
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
2ecae62033484c2493e73176cc8c8fa10b629b63
1,795
py
Python
simpbot/api/client.py
IsmaelRLG/simpbot
7d4288334f637e0a7774ef1acda933a668c60181
[ "MIT" ]
3
2017-05-08T14:53:40.000Z
2021-12-18T22:15:14.000Z
simpbot/api/client.py
IsmaelRLG/simpbot
7d4288334f637e0a7774ef1acda933a668c60181
[ "MIT" ]
null
null
null
simpbot/api/client.py
IsmaelRLG/simpbot
7d4288334f637e0a7774ef1acda933a668c60181
[ "MIT" ]
1
2017-05-15T23:28:56.000Z
2017-05-15T23:28:56.000Z
# -*- coding: utf-8 -*- # Simple Bot (SimpBot) # Copyright 2016-2017, Ismael Lugo (kwargs) import httplib2 import json from six.moves import urllib from . import config class request: def __init__(self, host, port, network, username, password): self.host = host self.port = port self.network = network self.http = httplib2.Http() self.username = username self.password = password def basejoin(self, url): return urllib.parse.urljoin(self.get_url(), url) def get_url(self): return "http://%s:%s" % (self.host, self.port) def request(self, url, method, data): return self.http.request( self.basejoin(url), method.upper(), json.dumps(data), headers={'Content-Type': "application/json"}) def post(self, url, extra={}): return self.request(url, 'POST', self.basedata(extra)) def get(self, url, extra={}): return self.request(url, 'POST', self.basedata(extra)) def basedata(self, extra={}): data = { 'username': self.username, 'password': self.password, 'network': self.network} data.update(extra) def connections(self): return self.get(config.URL_CONNECTIONS) def reconfigure(self): return self.post(config.URL_RECONFIGURE) def connect(self, servername): return self.post(config.URL_CONNECT, {'network': servername}) def reconnect(self, servername): return self.port(config.URL_RECONNECT, {'network': servername}) def disconnect(self, servername): return self.post(config.URL_DISCONNECT, {'network': servername}) def command(self, query): return self.post(config.URL_COMMANDS, {'action': query})
28.046875
72
0.618384
209
1,795
5.253589
0.287081
0.081967
0.051002
0.07286
0.211293
0.169399
0.169399
0.102004
0.102004
0.102004
0
0.008166
0.249582
1,795
64
73
28.046875
0.806978
0.046797
0
0.045455
0
0
0.057377
0
0
0
0
0
0
1
0.295455
false
0.068182
0.090909
0.25
0.659091
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
2ee7e58f45dadf656af7760648f5c66b8d555a15
247
py
Python
examples/ForPatching/SupplierActivationCostRunner.py
supermihi/scgen
844144b8fb59de6a81c305ebcf0e39cf5af7c01d
[ "MIT" ]
1
2020-07-29T13:48:32.000Z
2020-07-29T13:48:32.000Z
examples/ForPatching/SupplierActivationCostRunner.py
supermihi/scgen
844144b8fb59de6a81c305ebcf0e39cf5af7c01d
[ "MIT" ]
2
2020-11-17T20:27:57.000Z
2021-01-11T15:41:10.000Z
examples/ForPatching/SupplierActivationCostRunner.py
supermihi/scgen
844144b8fb59de6a81c305ebcf0e39cf5af7c01d
[ "MIT" ]
1
2020-11-16T12:59:40.000Z
2020-11-16T12:59:40.000Z
# Run in the anaconda prompt from the top scgen folder with command # python -m examples.ForPatching.SupplierActivationCostRunner from examples.exampleRunner import runExample runExample("ForPatching/SupplierActivationCost.json", withExcel=False)
49.4
70
0.850202
28
247
7.5
0.821429
0
0
0
0
0
0
0
0
0
0
0
0.093117
247
5
70
49.4
0.9375
0.506073
0
0
0
0
0.325
0.325
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
2eebd6e32f1cef5c50becf16c6d09ea9ccd15837
50
py
Python
py_thorlabs_ctrl/kinesis/laser.py
mprobst6/py_thorlabs_ctrl
21430b5b57e559bce4c12b765ed139347b162e50
[ "MIT" ]
null
null
null
py_thorlabs_ctrl/kinesis/laser.py
mprobst6/py_thorlabs_ctrl
21430b5b57e559bce4c12b765ed139347b162e50
[ "MIT" ]
null
null
null
py_thorlabs_ctrl/kinesis/laser.py
mprobst6/py_thorlabs_ctrl
21430b5b57e559bce4c12b765ed139347b162e50
[ "MIT" ]
1
2021-08-02T09:07:06.000Z
2021-08-02T09:07:06.000Z
class LaserDiode: # not implemented pass
16.666667
22
0.66
5
50
6.6
1
0
0
0
0
0
0
0
0
0
0
0
0.3
50
3
23
16.666667
0.942857
0.3
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
2ef134defb179ebefa15a3806d79ad5fc69d2e09
168
py
Python
src/notion_df/constants.py
lolipopshock/notion-df
f6ef35e0ce71f8eb6e82b9c06b5d42706836e3bb
[ "MIT" ]
14
2022-01-06T01:50:46.000Z
2022-03-30T02:58:57.000Z
src/notion_df/constants.py
lolipopshock/notion-df
f6ef35e0ce71f8eb6e82b9c06b5d42706836e3bb
[ "MIT" ]
20
2022-01-06T06:43:12.000Z
2022-03-30T18:34:15.000Z
src/notion_df/constants.py
lolipopshock/notion-df
f6ef35e0ce71f8eb6e82b9c06b5d42706836e3bb
[ "MIT" ]
3
2022-01-07T05:25:22.000Z
2022-01-30T17:54:29.000Z
# See https://developers.notion.com/reference/request-limits RICH_TEXT_CONTENT_MAX_LENGTH = 2000 RICH_TEXT_LINK_MAX_LENGTH = 1000 EQUATION_EXPRESSION_MAX_LENGTH = 1000
33.6
60
0.857143
25
168
5.32
0.72
0.203008
0.195489
0
0
0
0
0
0
0
0
0.076923
0.071429
168
5
61
33.6
0.775641
0.345238
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
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
25a6b634f72188c36efe6377ce879c7591f31d6e
635
py
Python
nqs_tf/activations/activations.py
ameya1101/neural-quantum-states
2ab4f970e4cd7ed2a4ed3ebfdfe66bab396c11af
[ "MIT" ]
null
null
null
nqs_tf/activations/activations.py
ameya1101/neural-quantum-states
2ab4f970e4cd7ed2a4ed3ebfdfe66bab396c11af
[ "MIT" ]
null
null
null
nqs_tf/activations/activations.py
ameya1101/neural-quantum-states
2ab4f970e4cd7ed2a4ed3ebfdfe66bab396c11af
[ "MIT" ]
null
null
null
""" This module implements some commonly used activation functions. """ from tensorflow.keras import backend as K def tan_sigmoid(z): """ Implements the tangent-sigmoid activation function. """ return (2 / (1 + K.exp(-2.0 * z))) - 1 def exponential(z): """ Implements the exponential activation function. """ return K.exp(z) def ReLU(z, alpha=0, max_value=None, threshold=0): """ Implements the Rectified Linear Unit (ReLU) activation function. """ return K.relu(z, alpha, max_value, threshold) def sigmoid(z): """ Implements the sigmoid activation function. """ return K.sigmoid(z)
27.608696
72
0.667717
84
635
5.011905
0.440476
0.123515
0.228029
0.178147
0
0
0
0
0
0
0
0.013834
0.20315
635
23
73
27.608696
0.818182
0.459843
0
0
0
0
0
0
0
0
0
0
0
1
0.444444
false
0
0.111111
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
1
0
0
0
0
1
0
0
4
25aacac26e06800572fb15108555ee0075a511dd
99
py
Python
backend_rest/makerchecker/apps.py
ezrankayamba/twiga_sales
78ea9a35db7e75f3492f03559662808cb3ad59f3
[ "MIT" ]
null
null
null
backend_rest/makerchecker/apps.py
ezrankayamba/twiga_sales
78ea9a35db7e75f3492f03559662808cb3ad59f3
[ "MIT" ]
33
2020-03-14T17:29:33.000Z
2022-03-12T00:19:30.000Z
backend_rest/makerchecker/apps.py
ezrankayamba/twiga_sales
78ea9a35db7e75f3492f03559662808cb3ad59f3
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MakercheckerConfig(AppConfig): name = 'makerchecker'
16.5
36
0.777778
10
99
7.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.151515
99
5
37
19.8
0.916667
0
0
0
0
0
0.121212
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
25aef8f62058926fe60f4f40147a91dc1c70fc00
63
py
Python
src/cogs/__init__.py
re-nft/animetas-discord-bot
29f223729aa6fd01663c6a808a1b4e247c8e9df5
[ "MIT" ]
null
null
null
src/cogs/__init__.py
re-nft/animetas-discord-bot
29f223729aa6fd01663c6a808a1b4e247c8e9df5
[ "MIT" ]
2
2021-09-15T15:35:11.000Z
2021-09-22T15:11:36.000Z
src/cogs/__init__.py
re-nft/animetas-discord-bot
29f223729aa6fd01663c6a808a1b4e247c8e9df5
[ "MIT" ]
null
null
null
from .general import General, Wallet cogs = [General, Wallet]
15.75
36
0.746032
8
63
5.875
0.625
0.553191
0
0
0
0
0
0
0
0
0
0
0.15873
63
3
37
21
0.886792
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
25c58adbe5f9d18ae630885191b45f661524cba2
170
py
Python
cvgutils/geo.py
mshafiei/cvutils
5805229d8822a9ee4a3c63e060358aca96fe5338
[ "MIT" ]
2
2021-07-19T12:38:14.000Z
2021-11-01T21:30:36.000Z
cvgutils/geo.py
mshafiei/cvgutils
ea93b3cb70a969c3b814f5a9f7672c6e00de5c61
[ "MIT" ]
null
null
null
cvgutils/geo.py
mshafiei/cvgutils
ea93b3cb70a969c3b814f5a9f7672c6e00de5c61
[ "MIT" ]
null
null
null
#reflection function #https://www.fabrizioduroni.it/2017/08/25/how-to-calculate-reflection-vector.html def reflect(n,I): return 2*(n * I).sum(-1,keepdim=True) * n - I
42.5
81
0.717647
29
170
4.206897
0.827586
0.04918
0
0
0
0
0
0
0
0
0
0.064935
0.094118
170
4
82
42.5
0.727273
0.582353
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
25e086249008b6e92f4bf70b60ace6242ab60cfc
1,587
py
Python
gear/thor/account.py
dimitar-petrov/web3-gear
ea56fe8b3291165f0503f0b1d64870e3f6db3bd2
[ "MIT" ]
25
2018-07-03T20:22:35.000Z
2022-02-28T15:03:39.000Z
gear/thor/account.py
dimitar-petrov/web3-gear
ea56fe8b3291165f0503f0b1d64870e3f6db3bd2
[ "MIT" ]
22
2018-07-13T06:07:05.000Z
2022-02-28T18:13:25.000Z
gear/thor/account.py
dimitar-petrov/web3-gear
ea56fe8b3291165f0503f0b1d64870e3f6db3bd2
[ "MIT" ]
19
2018-07-03T16:02:08.000Z
2022-02-01T17:08:35.000Z
import json from gear.utils.keystore import ( decode_keystore_json, priv_to_addr, ) class account(object): def __init__(self): self.accounts = {} def get_accounts(self): return list(self.accounts.keys()) def get_priv_by_addr(self, adrr): return self.accounts[adrr] class solo(account): def __init__(self): priv_keys = [ "99f0500549792796c14fed62011a51081dc5b5e68fe8bd8a13b86be829c4fd36", "7b067f53d350f1cf20ec13df416b7b73e88a1dc7331bc904b92108b1e76a08b1", "f4a1a17039216f535d42ec23732c79943ffb45a089fbb78a14daad0dae93e991", "35b5cc144faca7d7f220fca7ad3420090861d5231d80eb23e1013426847371c4", "10c851d8d6c6ed9e6f625742063f292f4cf57c2dbeea8099fa3aca53ef90aef1", "2dd2c5b5d65913214783a6bd5679d8c6ef29ca9f2e2eae98b4add061d0b85ea0", "e1b72a1761ae189c10ec3783dd124b902ffd8c6b93cd9ff443d5490ce70047ff", "35cbc5ac0c3a2de0eb4f230ced958fd6a6c19ed36b5d2b1803a9f11978f96072", "b639c258292096306d2f60bc1a8da9bc434ad37f15cd44ee9a2526685f592220", "9d68178cdc934178cca0a0051f40ed46be153cf23cb1805b59cc612c0ad2bbe0", ] self.accounts = { priv_to_addr(priv_key): priv_key for priv_key in priv_keys } class keystore(account): def __init__(self, keystore_path, passcode): jsondata = json.loads(open(keystore_path).read()) priv_key = decode_keystore_json(jsondata, passcode) self.accounts = { priv_to_addr(priv_key): priv_key, }
34.5
79
0.710775
106
1,587
10.301887
0.40566
0.038462
0.027473
0.032967
0.065934
0.065934
0.065934
0.065934
0.065934
0
0
0.323077
0.221802
1,587
45
80
35.266667
0.561134
0
0
0.108108
0
0
0.403277
0.403277
0
0
0
0
0
1
0.135135
false
0.054054
0.054054
0.054054
0.324324
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
d3010f47ad9caa6b35e2c89dcae17359abce1fe9
104
py
Python
quart_app/config.py
xamorena/quart_app
92a00a661351963c78e4ba5428a750b981670ce5
[ "MIT" ]
null
null
null
quart_app/config.py
xamorena/quart_app
92a00a661351963c78e4ba5428a750b981670ce5
[ "MIT" ]
null
null
null
quart_app/config.py
xamorena/quart_app
92a00a661351963c78e4ba5428a750b981670ce5
[ "MIT" ]
null
null
null
import os class Config: DEBUG = True SECRET_KEY = os.environ.get('SECRET_KEY', 'DEVELOPMENT')
14.857143
60
0.682692
14
104
4.928571
0.785714
0.26087
0
0
0
0
0
0
0
0
0
0
0.201923
104
6
61
17.333333
0.831325
0
0
0
0
0
0.201923
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
d3365f3cc3eb8a5652b13ddddf40def09519cc00
109
py
Python
faceRecorgnizeapi/apps.py
onwebbe/pyFaceRecognize
10f38d57542991f23957affea78763febf6f2980
[ "MIT" ]
null
null
null
faceRecorgnizeapi/apps.py
onwebbe/pyFaceRecognize
10f38d57542991f23957affea78763febf6f2980
[ "MIT" ]
null
null
null
faceRecorgnizeapi/apps.py
onwebbe/pyFaceRecognize
10f38d57542991f23957affea78763febf6f2980
[ "MIT" ]
null
null
null
from django.apps import AppConfig class FacerecorgnizeapiConfig(AppConfig): name = 'faceRecorgnizeapi'
18.166667
41
0.798165
10
109
8.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.137615
109
5
42
21.8
0.925532
0
0
0
0
0
0.155963
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
d354b682d985b6203ff18ad4a5729f2905abee4f
96
py
Python
pages/models.py
sha-02/battery-inventory
a6afa34dd0628bfb1f8922f2554bb44dd549bab9
[ "MIT" ]
null
null
null
pages/models.py
sha-02/battery-inventory
a6afa34dd0628bfb1f8922f2554bb44dd549bab9
[ "MIT" ]
null
null
null
pages/models.py
sha-02/battery-inventory
a6afa34dd0628bfb1f8922f2554bb44dd549bab9
[ "MIT" ]
null
null
null
from django.db import models from accounts.models import CustomUser # Create your models here.
19.2
38
0.8125
14
96
5.571429
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.145833
96
4
39
24
0.95122
0.25
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d35cc14a95fa9f07c50d059fef0db748807ece56
117
py
Python
tests/test_cli.py
pypdfium2-team/pypdfium2
9a1796ba9f058102997652086a48e28af9cd3579
[ "Apache-2.0", "BSD-3-Clause" ]
17
2021-12-13T05:36:20.000Z
2022-03-13T22:56:16.000Z
tests/__init__.py
pypdfium2-team/pypdfium2
9a1796ba9f058102997652086a48e28af9cd3579
[ "Apache-2.0", "BSD-3-Clause" ]
51
2021-12-04T13:21:35.000Z
2022-03-28T13:33:29.000Z
src/pypdfium2/_cli/__init__.py
pypdfium2-team/pypdfium2
9a1796ba9f058102997652086a48e28af9cd3579
[ "Apache-2.0", "BSD-3-Clause" ]
2
2022-02-01T22:56:47.000Z
2022-03-16T13:26:35.000Z
# SPDX-FileCopyrightText: 2022 geisserml <geisserml@gmail.com> # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
39
62
0.786325
17
117
5.411765
0.882353
0
0
0
0
0
0
0
0
0
0
0.065421
0.08547
117
2
63
58.5
0.794393
0.957265
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
d364e37574a8320cb66976883836e4eb5a60c369
303
py
Python
src/ggrc_risk_assessments/converters/__init__.py
Killswitchz/ggrc-core
2460df94daf66727af248ad821462692917c97a9
[ "ECL-2.0", "Apache-2.0" ]
1
2018-03-30T11:28:48.000Z
2018-03-30T11:28:48.000Z
src/ggrc_risk_assessments/converters/__init__.py
trevordonnelly/ggrc-core
499cf0d3cce70737b080991b12c203ec22015cea
[ "ECL-2.0", "Apache-2.0" ]
10
2018-07-06T00:04:23.000Z
2021-02-26T21:13:20.000Z
src/ggrc_risk_assessments/converters/__init__.py
zidarsk8/ggrc-core
2509c989eddf434249d3bef50c21e08dbf56c1a4
[ "ECL-2.0", "Apache-2.0" ]
1
2017-11-11T22:16:56.000Z
2017-11-11T22:16:56.000Z
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc_risk_assessments import models IMPORTABLE = { "riskassessment": models.RiskAssessment, "risk_assessment": models.RiskAssessment, "risk assessment": models.RiskAssessment, }
27.545455
78
0.768977
36
303
6.388889
0.722222
0.26087
0.208696
0.295652
0.382609
0.382609
0
0
0
0
0
0.022472
0.118812
303
10
79
30.3
0.838951
0.353135
0
0.333333
0
0
0.227979
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
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
d364f1bfc1f39154f5402b92b5368f45253d766e
153
py
Python
boa3/exception/CompilerWarning.py
jplippi/neo3-boa
052be4adebb665113715bb80067d954f7ad85ad5
[ "Apache-2.0" ]
null
null
null
boa3/exception/CompilerWarning.py
jplippi/neo3-boa
052be4adebb665113715bb80067d954f7ad85ad5
[ "Apache-2.0" ]
null
null
null
boa3/exception/CompilerWarning.py
jplippi/neo3-boa
052be4adebb665113715bb80067d954f7ad85ad5
[ "Apache-2.0" ]
null
null
null
from abc import ABC class CompilerWarning(ABC): def __init__(self, line: int, col: int): self.line: int = line self.col: int = col
19.125
44
0.620915
22
153
4.136364
0.5
0.175824
0.241758
0
0
0
0
0
0
0
0
0
0.27451
153
7
45
21.857143
0.81982
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
d3766180794d47b3d6ddf09c9be89f9956bc4e95
89
py
Python
lesson06/prefecture/mie_behavior.py
muzudho/py-state-machine-practice
e31c066f4cf142b6b6c5ff273b56a0f89428c59e
[ "MIT" ]
null
null
null
lesson06/prefecture/mie_behavior.py
muzudho/py-state-machine-practice
e31c066f4cf142b6b6c5ff273b56a0f89428c59e
[ "MIT" ]
null
null
null
lesson06/prefecture/mie_behavior.py
muzudho/py-state-machine-practice
e31c066f4cf142b6b6c5ff273b56a0f89428c59e
[ "MIT" ]
null
null
null
class MieBehavior: def create_message_v06(self, message): return "ISE JINGU"
22.25
42
0.696629
11
89
5.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0.028986
0.224719
89
3
43
29.666667
0.84058
0
0
0
0
0
0.101124
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
6ca275f6a33fff5a7b104cd5158d738cd5ed404d
98
py
Python
signalwire/relay/event.py
ramarketing/signalwire-python
c0663bdd0454faaa39f42af7c936cea1d43e1842
[ "MIT" ]
23
2018-12-19T14:48:18.000Z
2022-01-11T03:58:36.000Z
signalwire/relay/event.py
ramarketing/signalwire-python
c0663bdd0454faaa39f42af7c936cea1d43e1842
[ "MIT" ]
13
2018-10-17T12:57:54.000Z
2021-09-01T21:46:01.000Z
signalwire/relay/event.py
ramarketing/signalwire-python
c0663bdd0454faaa39f42af7c936cea1d43e1842
[ "MIT" ]
12
2020-01-21T14:29:43.000Z
2022-01-11T07:48:06.000Z
class Event: def __init__(self, name, payload): self.name = name self.payload = payload
19.6
36
0.673469
13
98
4.769231
0.538462
0.258065
0
0
0
0
0
0
0
0
0
0
0.22449
98
4
37
24.5
0.815789
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
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
6cbe6ca94e034a115a5c84eb1ea789087a593623
19
py
Python
onium/__init__.py
alonl/onium
bf38d133a796fb8d76897f1c28e76b57f0a37225
[ "MIT" ]
16
2018-05-16T07:04:31.000Z
2021-12-26T02:19:45.000Z
onium/__init__.py
yonatan-mitmit/positronium
401aa3a36adb5803c69a755dd8f881eec58423c1
[ "MIT" ]
8
2018-05-24T13:11:23.000Z
2022-02-16T10:46:53.000Z
onium/__init__.py
yonatan-mitmit/positronium
401aa3a36adb5803c69a755dd8f881eec58423c1
[ "MIT" ]
3
2018-08-28T07:59:23.000Z
2020-08-25T10:10:18.000Z
__all__ = ["code"]
9.5
18
0.578947
2
19
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
19
1
19
19
0.4375
0
0
0
0
0
0.210526
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6ce316e32311921e2a57277ea7a13b0766749f87
7,782
py
Python
tests/test_tokenizer.py
leandroltavares/math-parser
4150efbe4f3672a4af0df13f78758b3559480edc
[ "MIT" ]
1
2020-11-09T02:02:27.000Z
2020-11-09T02:02:27.000Z
tests/test_tokenizer.py
leandroltavares/math-parser
4150efbe4f3672a4af0df13f78758b3559480edc
[ "MIT" ]
null
null
null
tests/test_tokenizer.py
leandroltavares/math-parser
4150efbe4f3672a4af0df13f78758b3559480edc
[ "MIT" ]
null
null
null
import unittest from src.errors import UnmatchingOpenParentheses, UnmatchingCloseParentheses, UnexpectedCharacter from src.tokenizer import Tokenizer, Value, Operator, Constant, Variable, Function, OpenParentheses, CloseParentheses class TokenizerTest(unittest.TestCase): def test_parse_unmatching_open_parentheses_raise_exception(self): t = Tokenizer() with self.assertRaises(UnmatchingOpenParentheses): t.tokenize('((1)') def test_parse_unmatching_close_parentheses_raise_exception(self): t = Tokenizer() with self.assertRaises(UnmatchingCloseParentheses): t.tokenize('(1))') def test_parser_multiple_dots_raise_exception(self): t = Tokenizer() with self.assertRaises(UnexpectedCharacter): t.tokenize('1..1') def test_parser_empty_parenthesis_raise_exception(self): t = Tokenizer() with self.assertRaises(UnexpectedCharacter): t.tokenize('()') def test_parse_multiple_digits_number(self): t = Tokenizer() tokens, variables = t.tokenize('42') expected_tokens = [Value('42')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_longer_number(self): t = Tokenizer() tokens, variables = t.tokenize('42.0') expected_tokens = [Value('42.0')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_decimal_number_without_zero_prefix(self): t = Tokenizer() tokens, variables = t.tokenize('.1') expected_tokens = [Value('.1')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_negative_number(self): t = Tokenizer() tokens, variables = t.tokenize('-42') expected_tokens = [Operator('-u'), Value('42')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_simple_addition_expression(self): t = Tokenizer() tokens, variables = t.tokenize('1+2') expected_tokens = [Value('1'), Operator('+'), Value('2')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_simple_addition_expression_with_negative_numbers(self): t = Tokenizer() tokens, variables = t.tokenize('-1+(-2)') expected_tokens = [Operator('-u'), Value('1'), Operator('+'), OpenParentheses(), Operator('-'), Value('2'), CloseParentheses()] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_negative_variable(self): t = Tokenizer() tokens, variables = t.tokenize('-x') expected_tokens = [Operator('-u'), Variable('x')] self.assertEqual(expected_tokens, tokens) self.assertEqual({'x'}, variables) def test_parse_subtraction_expression(self): t = Tokenizer() tokens, variables = t.tokenize('2-1') expected_tokens = [Value('2'), Operator('-'), Value('1')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_multiplication_expression(self): t = Tokenizer() tokens, variables = t.tokenize('2*3') expected_tokens = [Value('2'), Operator('*'), Value('3')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_division_expression(self): t = Tokenizer() tokens, variables = t.tokenize('4/2') expected_tokens = [Value('4'), Operator('/'), Value('2')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_composed_addition_expression(self): t = Tokenizer() tokens, variables = t.tokenize('(1+2)*3') expected_tokens = [OpenParentheses(), Value('1'), Operator('+'), Value('2'), CloseParentheses(), Operator('*'), Value('3')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_composed_complex_expression(self): t = Tokenizer() tokens, variables = t.tokenize('((1+2)*3+pi)*x/2+sin(1)') expected_tokens = [OpenParentheses(), OpenParentheses(), Value('1'), Operator('+'), Value('2'), CloseParentheses(), Operator('*'), Value('3'), Operator('+'), Constant('pi'), CloseParentheses(), Operator('*'), Variable('x'), Operator('/'), Value('2'), Operator('+'), Function('sin'), OpenParentheses(), Value('1'), CloseParentheses()] self.assertEqual(expected_tokens, tokens) self.assertEqual({'x'}, variables) def test_parse_implicit_parentheses_multiplication(self): t = Tokenizer() tokens, variables = t.tokenize('(1+2)(3+4)') expected_tokens = [OpenParentheses(), Value('1'), Operator('+'), Value('2'), CloseParentheses(), Operator('*'), OpenParentheses(), Value('3'), Operator('+'), Value('4'), CloseParentheses()] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_implicit_parentheses_multiplication2(self): t = Tokenizer() tokens, variables = t.tokenize('2(1+2)') expected_tokens = [Value('2'), Operator('*'), OpenParentheses(), Value('1'), Operator('+'), Value('2'), CloseParentheses()] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_implicit_parentheses_multiplication3(self): t = Tokenizer() tokens, variables = t.tokenize('(1+2)2') expected_tokens = [OpenParentheses(), Value('1'), Operator('+'), Value('2'), CloseParentheses(), Operator('*'), Value('2')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_implicit_constant_multiplication(self): t = Tokenizer() tokens, variables = t.tokenize('10pi') expected_tokens = [Value('10'), Operator('*'), Constant('pi')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_implicit_constant_multiplication2(self): t = Tokenizer() tokens, variables = t.tokenize('pi10') expected_tokens = [Constant('pi'), Operator('*'), Value('10')] self.assertEqual(expected_tokens, tokens) self.assertEqual(0, len(variables)) def test_parse_implicit_constant_multiplication_expression(self): t = Tokenizer() tokens, variables = t.tokenize('2pi * r') expected_tokens = [Value('2'), Operator('*'), Constant('pi'), Operator('*'), Variable('r')] self.assertEqual(expected_tokens, tokens) self.assertEqual({'r'}, variables) def test_parse_implicit_function_multiplication(self): t = Tokenizer() tokens, variables = t.tokenize('10sin(x)') expected_tokens = [Value('10'), Operator('*'), Function('sin'), OpenParentheses(), Variable('x'), CloseParentheses()] self.assertEqual(expected_tokens, tokens) self.assertEqual({'x'}, variables) def test_parse_implicit_function_multiplication2(self): t = Tokenizer() tokens, variables = t.tokenize('sin(x)10') expected_tokens = [Function('sin'), OpenParentheses(), Variable('x'), CloseParentheses(), Operator('*'), Value('10')] self.assertEqual(expected_tokens, tokens) self.assertEqual({'x'}, variables)
43.966102
119
0.628116
790
7,782
6.007595
0.1
0.117994
0.070796
0.084282
0.808681
0.771176
0.731142
0.708175
0.642436
0.554994
0
0.018765
0.226163
7,782
176
120
44.215909
0.769346
0
0
0.473333
0
0
0.030326
0.002956
0
0
0
0
0.293333
1
0.16
false
0
0.02
0
0.186667
0
0
0
0
null
0
0
0
1
1
1
1
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
9f061ef85c3c4ba8f48497e69e2ac727b87d2d3b
22,156
py
Python
test/test_scrapbook_convert_sb2wsb.py
vsc55/PyWebScrapBook
0d0cb7653a44b7a79b940ffe20b9a2feea0c6227
[ "MIT" ]
null
null
null
test/test_scrapbook_convert_sb2wsb.py
vsc55/PyWebScrapBook
0d0cb7653a44b7a79b940ffe20b9a2feea0c6227
[ "MIT" ]
null
null
null
test/test_scrapbook_convert_sb2wsb.py
vsc55/PyWebScrapBook
0d0cb7653a44b7a79b940ffe20b9a2feea0c6227
[ "MIT" ]
null
null
null
from unittest import mock import unittest import os import shutil import time from webscrapbook import WSB_DIR from webscrapbook import util from webscrapbook.scrapbook.host import Host from webscrapbook.scrapbook.convert import sb2wsb root_dir = os.path.abspath(os.path.dirname(__file__)) test_root = os.path.join(root_dir, 'test_scrapbook_convert') def setUpModule(): # mock out user config global mockings mockings = [ mock.patch('webscrapbook.scrapbook.host.WSB_USER_DIR', os.path.join(test_root, 'wsb')), mock.patch('webscrapbook.WSB_USER_DIR', os.path.join(test_root, 'wsb')), mock.patch('webscrapbook.WSB_USER_CONFIG', test_root), ] for mocking in mockings: mocking.start() def tearDownModule(): # stop mock for mocking in mockings: mocking.stop() class TestRun(unittest.TestCase): def setUp(self): """Set up a general temp test folder """ self.maxDiff = 8192 self.test_input = os.path.join(test_root, 'input') self.test_input_rdf = os.path.join(self.test_input, 'scrapbook.rdf') self.test_output = os.path.join(test_root, 'output') self.test_output_meta = os.path.join(self.test_output, 'tree', 'meta.js') self.test_output_toc = os.path.join(self.test_output, 'tree', 'toc.js') os.makedirs(self.test_input, exist_ok=True) os.makedirs(self.test_output, exist_ok=True) def tearDown(self): """Remove general temp test folder """ try: shutil.rmtree(self.test_input) except NotADirectoryError: os.remove(self.test_input) except FileNotFoundError: pass try: shutil.rmtree(self.test_output) except NotADirectoryError: os.remove(self.test_output) except FileNotFoundError: pass def test_meta_basic01(self): """A typical item sample of legacy ScrapBook X.""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:id="20200102030405" NS1:create="20200102030406" NS1:modify="20200102030407" NS1:type="" NS1:title="dummy title" NS1:chars="UTF-8" NS1:icon="favicon.ico" NS1:source="http://example.com/foo" NS1:comment="dummy comment __BR__ 2nd line" NS1:lock="true" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertDictEqual(book.meta['20200102030405'], { 'index': '20200102030405/index.html', 'title': 'dummy title', 'type': '', 'create': util.datetime_to_id(util.id_to_datetime_legacy('20200102030406')), 'modify': util.datetime_to_id(util.id_to_datetime_legacy('20200102030407')), 'source': 'http://example.com/foo', 'icon': 'favicon.ico', 'comment': 'dummy comment\n2nd line', 'charset': 'UTF-8', 'locked': True, }) def test_meta_basic02(self): """A typical item sample of legacy ScrapBook.""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:id="20200102030405" NS1:type="" NS1:title="dummy title" NS1:chars="" NS1:comment="dummy comment __BR__ 2nd line" NS1:icon="favicon.ico" NS1:source="http://example.com/foo" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertDictEqual(book.meta['20200102030405'], { 'index': '20200102030405/index.html', 'title': 'dummy title', 'type': '', 'create': util.datetime_to_id(util.id_to_datetime_legacy('20200102030405')), 'modify': util.datetime_to_id(util.id_to_datetime_legacy('20200102030405')), 'source': 'http://example.com/foo', 'icon': 'favicon.ico', 'comment': 'dummy comment\n2nd line', }) def test_meta_basic03(self): """Default value for missing keys. - type: "" - create: infer from id - modify: infer from create (and then id) """ with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertDictEqual(book.meta['20200102030405'], { 'index': '20200102030405/index.html', 'type': '', 'create': util.datetime_to_id(util.id_to_datetime_legacy('20200102030405')), 'modify': util.datetime_to_id(util.id_to_datetime_legacy('20200102030405')), }) def test_meta_basic04(self): """Should work correctly for another NS name (seen in some scrapbook.rdf files) """ with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS2="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS2:id="20200102030405" NS2:type="" NS2:title="title" NS2:comment="comment" NS2:icon="favicon.ico" NS2:source="http://example.com" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertDictEqual(book.meta['20200102030405'], { 'index': '20200102030405/index.html', 'type': '', 'create': util.datetime_to_id(util.id_to_datetime_legacy('20200102030405')), 'modify': util.datetime_to_id(util.id_to_datetime_legacy('20200102030405')), 'title': 'title', 'comment': 'comment', 'icon': 'favicon.ico', 'source': 'http://example.com', }) def test_meta_type01(self): """Translate types.""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200101010101" NS1:type="" /> <RDF:Description RDF:about="urn:scrapbook:item20200101010102" NS1:type="combine" /> <RDF:Description RDF:about="urn:scrapbook:item20200101010103" NS1:type="marked" /> <RDF:Description RDF:about="urn:scrapbook:item20200101010104" NS1:type="note" /> <RDF:Description RDF:about="urn:scrapbook:item20200101010105" NS1:type="notex" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200101010101']['type'], '') self.assertIsNone(book.meta['20200101010101'].get('marked')) self.assertEqual(book.meta['20200101010102']['type'], 'site') self.assertIsNone(book.meta['20200101010102'].get('marked')) self.assertEqual(book.meta['20200101010103']['type'], '') self.assertTrue(book.meta['20200101010103']['marked']) self.assertEqual(book.meta['20200101010104']['type'], 'postit') self.assertIsNone(book.meta['20200101010104'].get('marked')) self.assertEqual(book.meta['20200101010105']['type'], 'note') self.assertIsNone(book.meta['20200101010105'].get('marked')) def test_meta_type02(self): """Use "site" if it's "marked" and has sitemap.xml""" index_file = os.path.join(self.test_input, 'data', '20200101010101', 'index.html') sitemap_file = os.path.join(self.test_input, 'data', '20200101010101', 'sitemap.xml') os.makedirs(os.path.dirname(sitemap_file)) with open(index_file, 'w', encoding='UTF-8') as fh: pass with open(sitemap_file, 'w', encoding='UTF-8') as fh: pass with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200101010101" NS1:type="marked" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200101010101']['type'], 'site') self.assertTrue(book.meta['20200101010101']['marked']) def test_meta_modify01(self): """Take mtime of index.html if newer.""" index_file = os.path.join(self.test_input, 'data', '20200102030405', 'index.html') os.makedirs(os.path.dirname(index_file)) with open(index_file, 'w', encoding='UTF-8') as fh: pass t = time.mktime((2020, 1, 3, 0, 0, 0, 0, 0, -1)) os.utime(index_file, (t, t)) with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:id="20200102030405" NS1:type="" NS1:create="20200102030406" NS1:modify="20200102030407" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['modify'], util.datetime_to_id(util.id_to_datetime_legacy('20200103000000'))) def test_meta_modify02(self): """Don't take mtime of index.html if not newer.""" index_file = os.path.join(self.test_input, 'data', '20200102030405', 'index.html') os.makedirs(os.path.dirname(index_file)) with open(index_file, 'w', encoding='UTF-8') as fh: pass t = time.mktime((2020, 1, 1, 0, 0, 0, 0, 0, -1)) os.utime(index_file, (t, t)) with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:id="20200102030405" NS1:type="" NS1:create="20200102030406" NS1:modify="20200102030407" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['modify'], util.datetime_to_id(util.id_to_datetime_legacy('20200102030407'))) def test_meta_icon01(self): """Resolve resource://scrapbook/data/<self-id>/...""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:icon="resource://scrapbook/data/20200102030405/favicon.ico" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['icon'], 'favicon.ico') def test_meta_icon02(self): """Resolve resource://scrapbook/icon/...""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:icon="resource://scrapbook/icon/favicon.ico" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['icon'], '../../icon/favicon.ico') def test_meta_icon03(self): """Resolve resource://scrapbook/...""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:icon="resource://scrapbook/favicon.ico" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['icon'], '../../favicon.ico') def test_meta_icon04(self): """Resolve moz-icon://...""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:icon="moz-icon://foo.pdf?size=16" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['icon'], '') self.assertEqual(book.meta['20200102030405']['icon-moz'], 'moz-icon://foo.pdf?size=16') def test_meta_icon05(self): """Handle special chars.""" with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20200102030405" NS1:icon="resource://scrapbook/%E4%B8%AD%E6%96%87%25%23abc.png" /> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_meta_files() self.assertEqual(book.meta['20200102030405']['icon'], '../../%E4%B8%AD%E6%96%87%25%23abc.png') def test_toc(self): with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Seq RDF:about="urn:scrapbook:root"> <RDF:li RDF:resource="urn:scrapbook:item20200101000000"/> <RDF:li RDF:resource="urn:scrapbook:item20200101000001"/> <RDF:li RDF:resource="urn:scrapbook:item20200101000002"/> <RDF:li RDF:resource="urn:scrapbook:item20200101000003"/> <RDF:li RDF:resource="urn:scrapbook:item20200101000004"/> </RDF:Seq> <RDF:Seq RDF:about="urn:scrapbook:item20200101000001"> <RDF:li RDF:resource="urn:scrapbook:item20200101000005"/> <RDF:li RDF:resource="urn:scrapbook:item20200101000006"/> </RDF:Seq> <RDF:Seq RDF:about="urn:scrapbook:item20200101000002"> <RDF:li RDF:resource="urn:scrapbook:item20200101000007"/> <RDF:li RDF:resource="urn:scrapbook:item20200101000008"/> </RDF:Seq> <RDF:Seq RDF:about="urn:scrapbook:item20200101000003"> <RDF:li RDF:resource="urn:scrapbook:item20200101000009"/> </RDF:Seq> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass book = Host(self.test_output).books[''] book.load_toc_files() self.assertEqual(book.toc, { 'root': [ '20200101000000', '20200101000001', '20200101000002', '20200101000003', '20200101000004', ], '20200101000001': [ '20200101000005', '20200101000006', ], '20200101000002': [ '20200101000007', '20200101000008', ], '20200101000003': [ '20200101000009', ], }) def test_backup01(self): """Check legacy scrapbook files are backuped""" check_entries = [ 'backup/', 'tree/', 'scrapbook.rdf', 'cache.rdf', 'folders.txt', 'collection.html', 'combine.html', 'combine.css', 'note.html', 'search.html', 'sitemap.xsl', 'note_template.html', 'notex_template.html', ] for entry in check_entries: path = os.path.join(self.test_input, entry) if entry.endswith('/'): os.makedirs(path) with open(os.path.join(path, 'dummy'), 'w', encoding='UTF-8') as fh: fh.write(entry) else: with open(path, 'w', encoding='UTF-8') as fh: fh.write(entry) with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output): pass with os.scandir(os.path.join(self.test_output, WSB_DIR, 'backup')) as dirs: backup_dir = next(iter(dirs)) for entry in check_entries: with self.subTest(entry=entry): path = os.path.join(backup_dir, entry) if entry.endswith('/'): self.assertTrue(os.path.isdir(path)) self.assertTrue(os.path.isfile(os.path.join(path, 'dummy'))) else: self.assertTrue(os.path.isfile(path)) def test_backup02(self): """Check no_backup""" check_entries = [ 'backup/', 'tree/', 'scrapbook.rdf', 'cache.rdf', 'folders.txt', 'collection.html', 'combine.html', 'combine.css', 'note.html', 'search.html', 'sitemap.xsl', 'note_template.html', 'notex_template.html', ] for entry in check_entries: path = os.path.join(self.test_input, entry) if entry.endswith('/'): os.makedirs(path) with open(os.path.join(path, 'dummy'), 'w', encoding='UTF-8') as fh: fh.write(entry) else: with open(path, 'w', encoding='UTF-8') as fh: fh.write(entry) with open(self.test_input_rdf, 'w', encoding='UTF-8') as fh: fh.write("""\ <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> </RDF:RDF> """) for info in sb2wsb.run(self.test_input, self.test_output, no_backup=True): pass self.assertFalse(os.path.exists(os.path.join(self.test_output, WSB_DIR, 'backup'))) if __name__ == '__main__': unittest.main()
37.362563
102
0.579437
2,726
22,156
4.60785
0.103448
0.053499
0.045538
0.024839
0.782024
0.759653
0.707985
0.703527
0.683624
0.641032
0
0.104405
0.255145
22,156
592
103
37.425676
0.656729
0.034212
0
0.681725
0
0.067762
0.448192
0.109214
0
0
0
0
0.059548
1
0.041068
false
0.045175
0.01848
0
0.061602
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
9f327ffef84c16fb7ede003a77d54bf77e8829a8
1,346
py
Python
bioinformatics-stronghold/REVC-Complementing-a-Strand-of-DNA.py
Rgtemze/rosalind-solutions
a8ed5b917b58f5c1558167d292ab8a52e417a9aa
[ "MIT" ]
null
null
null
bioinformatics-stronghold/REVC-Complementing-a-Strand-of-DNA.py
Rgtemze/rosalind-solutions
a8ed5b917b58f5c1558167d292ab8a52e417a9aa
[ "MIT" ]
null
null
null
bioinformatics-stronghold/REVC-Complementing-a-Strand-of-DNA.py
Rgtemze/rosalind-solutions
a8ed5b917b58f5c1558167d292ab8a52e417a9aa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Sep 3 23:45:39 2017 @author: ASUS This code snippet takes the complement and reverse of a DNA string """ string = 'GTGGTTACGCTCCCGGGGGGGTTCTACGTGCAGATACTGTTCGGGAAGAAGGAGGCACGTCAGGGAGCGCACCCCCCGGTCTACTTGACGGTGGTGAACGTTATCGGCTGGGCCATGTCGTGGAGATAGGAAGCAGGGGAAGTGTGTAAGACAAGTGTACGTGTGTGCATATCTTTTCGTTTGTATAATGTATCGCCAGTGTTATGTCAACCCTAATCCCGGGTATTAAGGAGACAGTCGTGGATTCAGAGGGGTGTCGTCGTGAGCTAGGGGACATTCTTGTAGCGGAGATATGACAACGAGACCGTTGAACATCTTAGTTTTAAGTCTCGCCTCACCTTCCTGGCAAGCTAAACCGGTGGTTCAGCGGTGTTTTGCCCACTTAACCGCCCACCGATTAAGCCATCGACCTACCGAGGTCGGATATAGTGGACCATAGTTACCAAGAATCACCTCAGGTCTGGGCTCATGAAAGGATTAAGGGGTATACAAAAGGCACACAGCCCATCTTACGTTGATCGAGGCGGATGGTTTAAAGGTCCCAGCTTACCTTTTTCCCTTAGACGTAGACTACCGTCGAGGGAGCTGAGAGATTTCAGCCGTATTAAACAACTGAAACCGTCCAACGATACTCATATTCTACGGTGCTCAAGGTGACCGCTGACGGTGATTCTTGACCCCCCTCACTATAGAACACCTCCTATCGCACGACACATTGTCGACTTTTGACCACCCCCGGTTCCCGGGTTTACCTAGAGATCTAGGAATCACTCAAATCGTCTCTCGTGGCGGTGTGCAATGCCAAGAAGAGAAACACTACGGTCGACGAGGGGGCCTGTTATTCTAGGGACGGTCGTGCAACTGCTCCGC' #Take the reverse reversed_string = string[::-1] #Create a dictionary complement_dict = {'A':'T','T':'A','G':'C','C':'G'} #Take the compelement of the reverse complement_reversed_string = "" for base in reversed_string: complement_reversed_string += complement_dict[base] print(complement_reversed_string)
61.181818
881
0.898217
72
1,346
16.652778
0.569444
0.058382
0.06005
0
0
0
0
0
0
0
0
0.010188
0.052006
1,346
21
882
64.095238
0.929467
0.156018
0
0
0
0
0.780444
0.773333
0
1
0
0
0
1
0
false
0
0
0
0
0.142857
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
9f8409550410d78113f74df805161bb5401d7a18
45
py
Python
autokey/eclipse/step_out.py
JaimieW/Autohotkey
e801fa15e9064de23feab4e85db272617b79b21d
[ "MIT" ]
null
null
null
autokey/eclipse/step_out.py
JaimieW/Autohotkey
e801fa15e9064de23feab4e85db272617b79b21d
[ "MIT" ]
null
null
null
autokey/eclipse/step_out.py
JaimieW/Autohotkey
e801fa15e9064de23feab4e85db272617b79b21d
[ "MIT" ]
null
null
null
# Enter script code keyboard.send_key("<f7>")
22.5
25
0.733333
7
45
4.571429
1
0
0
0
0
0
0
0
0
0
0
0.02439
0.088889
45
2
25
22.5
0.756098
0.377778
0
0
0
0
0.148148
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
9fb564849232ad2c7dfe8c2efa610d287441cffb
56
py
Python
inspace/__init__.py
UWInSpace/InSpace
afc3b413821abace40e1547544baed962c3c0518
[ "MIT" ]
null
null
null
inspace/__init__.py
UWInSpace/InSpace
afc3b413821abace40e1547544baed962c3c0518
[ "MIT" ]
1
2021-03-11T23:28:27.000Z
2021-03-12T19:25:55.000Z
inspace/__init__.py
UWInSpace/InSpace
afc3b413821abace40e1547544baed962c3c0518
[ "MIT" ]
null
null
null
''' This is an init python file for inspace package '''
28
55
0.696429
9
56
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.196429
56
1
56
56
0.866667
0.839286
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
9fbbee61da3b9523698b0de5af459d9b3cea49b5
52
py
Python
voiceplay/datasources/__init__.py
tb0hdan/voiceplay
3e35a25cfcf982a3871cf0d819bae4374ee31ecf
[ "Unlicense" ]
2
2017-03-22T10:02:07.000Z
2020-08-02T11:56:47.000Z
voiceplay/datasources/__init__.py
tb0hdan/voiceplay
3e35a25cfcf982a3871cf0d819bae4374ee31ecf
[ "Unlicense" ]
69
2016-12-10T22:27:47.000Z
2017-12-14T05:15:43.000Z
voiceplay/datasources/__init__.py
tb0hdan/voiceplay
3e35a25cfcf982a3871cf0d819bae4374ee31ecf
[ "Unlicense" ]
null
null
null
#-*- coding: utf-8 -*- """ Data sources package """
17.333333
28
0.538462
6
52
4.666667
1
0
0
0
0
0
0
0
0
0
0
0.023256
0.173077
52
2
29
26
0.627907
0.826923
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
4c97ee85fdaffa646576cfb194fcd0d539065fc3
169
py
Python
algorithms/flipping-bits.py
gajubadge11/HackerRank-1
7b136ccaa1ed47ae737467ace6b494c720ccb942
[ "MIT" ]
340
2018-06-17T19:45:56.000Z
2022-03-22T02:26:15.000Z
algorithms/flipping-bits.py
gajubadge11/HackerRank-1
7b136ccaa1ed47ae737467ace6b494c720ccb942
[ "MIT" ]
3
2021-02-02T17:17:29.000Z
2021-05-18T10:06:04.000Z
algorithms/flipping-bits.py
gajubadge11/HackerRank-1
7b136ccaa1ed47ae737467ace6b494c720ccb942
[ "MIT" ]
229
2019-04-20T08:28:49.000Z
2022-03-31T04:23:52.000Z
if __name__ == "__main__": T = int(input().strip()) correct = 1 << 32 for _ in range(T): num = int(input().strip()) print(~num + correct)
16.9
34
0.502959
21
169
3.619048
0.714286
0.210526
0.342105
0
0
0
0
0
0
0
0
0.025862
0.313609
169
9
35
18.777778
0.62931
0
0
0
0
0
0.047619
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4c9d7626f9549b99cde4a4957e6b4289da50ab16
106
py
Python
tests/__init__.py
gradientinstitute/ai-impact-control-panel
4a00a8d8f731344b9f5599ec40748ba5b79d7904
[ "Apache-2.0" ]
2
2022-03-16T03:13:37.000Z
2022-03-16T23:31:56.000Z
tests/__init__.py
gradientinstitute/ai-impact-control-panel
4a00a8d8f731344b9f5599ec40748ba5b79d7904
[ "Apache-2.0" ]
1
2022-03-15T10:33:25.000Z
2022-03-15T23:33:52.000Z
tests/__init__.py
gradientinstitute/ai-impact-control-panel
4a00a8d8f731344b9f5599ec40748ba5b79d7904
[ "Apache-2.0" ]
1
2022-03-16T03:13:50.000Z
2022-03-16T03:13:50.000Z
""" DEVA AI Oversight Tool. Copyright 2021-2022 Gradient Institute Ltd. <info@gradientinstitute.org> """
17.666667
72
0.754717
13
106
6.153846
1
0
0
0
0
0
0
0
0
0
0
0.086022
0.122642
106
5
73
21.2
0.774194
0.915094
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
4cc624a0e919119f923fbc01ad5086dccdcf593d
784
py
Python
src/GUI/textures.py
GBH007/MGQ
cfafd57ac5284f6d54923cd26ed5d1294916f098
[ "MIT" ]
null
null
null
src/GUI/textures.py
GBH007/MGQ
cfafd57ac5284f6d54923cd26ed5d1294916f098
[ "MIT" ]
null
null
null
src/GUI/textures.py
GBH007/MGQ
cfafd57ac5284f6d54923cd26ed5d1294916f098
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # author: Григорий Никониров # Gregoriy Nikonirov # email: mrgbh007@gmail.com # import glob import os import tkinter _DEFAULT_TEXTURES_FOLGER='../textures/' class Textures: def __init__(self,textures_folger=None): self.__texture_folger=textures_folger if textures_folger else _DEFAULT_TEXTURES_FOLGER self.__textures={} def reload(self,textures_folger): self.__texture_folger=textures_folger if textures_folger else _DEFAULT_TEXTURES_FOLGER self.load() def load(self): self.__textures={os.path.split(i)[1].split('.')[0]:tkinter.PhotoImage(file=i) for i in glob.glob(os.path.join(self.__texture_folger,'*.gif'))} def __getitem__(self,key): return self.__textures[key] def getTextureList(self): return self.__textures.keys()
30.153846
144
0.756378
106
784
5.216981
0.424528
0.227848
0.113924
0.090416
0.274864
0.274864
0.274864
0.274864
0.274864
0.274864
0
0.008683
0.118622
784
25
145
31.36
0.791606
0.137755
0
0.117647
0
0
0.026866
0
0
0
0
0
0
1
0.294118
false
0
0.176471
0.117647
0.647059
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
4cfc0c5eef32d238800df5a93cf68598dc6081a8
185
py
Python
prglunch/model.py
melkamar/prglunch
7c14237230a70323127a578e140799e05ce1962e
[ "MIT" ]
null
null
null
prglunch/model.py
melkamar/prglunch
7c14237230a70323127a578e140799e05ce1962e
[ "MIT" ]
null
null
null
prglunch/model.py
melkamar/prglunch
7c14237230a70323127a578e140799e05ce1962e
[ "MIT" ]
null
null
null
from typing import * from dataclasses import dataclass @dataclass class Restaurant: name: str menu: List['MenuItem'] @dataclass class MenuItem: name: str price: int
12.333333
33
0.702703
22
185
5.909091
0.636364
0.215385
0
0
0
0
0
0
0
0
0
0
0.227027
185
14
34
13.214286
0.909091
0
0
0.4
0
0
0.043243
0
0
0
0
0
0
1
0
true
0
0.2
0
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
98187fad5116b7ae0f33fcb924e0eaf68d89828d
3,469
py
Python
MainPackage/messages.py
Khrona98/blackjack-python
ec38812fa8229e772c6fdcda0d4a5ac1462bc580
[ "MIT" ]
null
null
null
MainPackage/messages.py
Khrona98/blackjack-python
ec38812fa8229e772c6fdcda0d4a5ac1462bc580
[ "MIT" ]
null
null
null
MainPackage/messages.py
Khrona98/blackjack-python
ec38812fa8229e772c6fdcda0d4a5ac1462bc580
[ "MIT" ]
null
null
null
"""Messages used in the code that can or can't be used repeatedly.""" def welcome(): """Welcoming message of the game.""" print("BLACKJACK IN PYTHON!") print() print("┌─────────┐ ┌─────────┐") print("│ A │ │ J │") print("│ │ │ │") print("│ │ │ │") print("│ ♠ │ │ ♠ │") print("│ │ │ │") print("│ │ │ │") print("│ A │ │ J │") print("└─────────┘ └─────────┘") def rules(): """Rules of the game.""" # title print("RULES OF THE GAME") print() # brief description print( "In this simplified version of a game of blackjack you will play against " "a computer Dealer." ) print() # overview print( "When you start the game, you will begin with $200 and you'll need to place a " "bet so the computer can start dealing the cards. After that you can choose " "at each round to either 'Hit' to receive another card or 'Stay' to stop " "receiving more cards." ) print() # quick note print( "NOTE: If you choose to 'Stay', the computer will only deal cards to itself " "as long as it's total value in hand is lower than 18." ) print() # win/lose/tie conditions print( "You win a round by having the closest value in cards to the number 21, " "receiving double the betted amount." ) print( "You lose if the dealer ends up with a higher value in cards than you, " "losing the betted amount." ) print( "A tie can also happen if both player and dealer have the same value in " "cards, returning your original betted amount to you." ) print() # value of cards print("The value of the cards are as follows, from lower to higher:") print() print("Two = 2") print("Three = 3") print("Four = 4") print("Five = 5") print("Six = 6") print("Seven = 7") print("Eight = 8") print("Nine = 9") print("Ten = 10") print("Jack = 10") print("Queen = 10") print("King = 10") print("Ace = 1 or 11 (depending on what is best for the player to hit 21)") print() # ask the player for input to continue the game input("Please, press Enter to continue! ") def win(): """Win message.""" print("┌─┐ ┌─┐ ┌───────┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌───────┐ ┌─┐ ┌─┐ ┌─┐") print("│ └───┘ │ │ ┌───┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ┌───┐ │ │ │ │ │ │ │") print("└──┐ ┌──┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │") print(" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └─┘ └─┘ └─┘") print(" │ │ │ └───┘ │ │ └───┘ │ │ └─┘ └─┘ │ │ │ │ │ │ │ ┌─┐ ┌─┐ ┌─┐") print(" └─┘ └───────┘ └───────┘ └─────────┘ └─┘ └─┘ └─┘ └─┘ └─┘ └─┘") def lose(): """Lose message.""" print("┌─┐ ┌─┐ ┌───────┐ ┌─┐ ┌─┐ ┌─┐ ┌───────┐ ┌───────┐ ┌───────┐") print("│ └───┘ │ │ ┌───┐ │ │ │ │ │ │ │ │ ┌───┐ │ │ ┌─────┘ │ ┌─────┘") print("└──┐ ┌──┘ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └─────┐ │ └─────┐") print(" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └─────┐ │ │ ┌─────┘") print(" │ │ │ └───┘ │ │ └───┘ │ │ └─────┐ │ └───┘ │ ┌─────┘ │ │ └─────┐") print(" └─┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘ └───────┘")
33.355769
87
0.388873
578
3,469
3.347751
0.273356
0.139535
0.168992
0.196382
0.258398
0.219638
0.207235
0.203618
0.156072
0.156072
0
0.012489
0.353704
3,469
103
88
33.679612
0.589206
0.077832
0
0.263158
0
0.052632
0.682349
0
0
0
0
0
0
1
0.052632
true
0
0
0
0.052632
0.671053
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
e22a89929d772daf4e7533b3c5a3fd31acfb235a
1,119
py
Python
unit/test_uvm_mailbox.py
rodrigomelo9/uvm-python
e3127eba2cc1519a61dc6f736d862a8dcd6fce20
[ "Apache-2.0" ]
140
2020-01-18T00:14:17.000Z
2022-03-29T10:57:24.000Z
unit/test_uvm_mailbox.py
Mohsannaeem/uvm-python
1b8768a1358d133465ede9cadddae651664b1d53
[ "Apache-2.0" ]
24
2020-01-18T18:40:58.000Z
2021-03-25T17:39:07.000Z
unit/test_uvm_mailbox.py
Mohsannaeem/uvm-python
1b8768a1358d133465ede9cadddae651664b1d53
[ "Apache-2.0" ]
34
2020-01-18T12:22:59.000Z
2022-02-11T07:03:11.000Z
import unittest from uvm.base.uvm_mailbox import UVMMailbox class TestUVMMailbox(unittest.TestCase): def test_try_put(self): fifo = UVMMailbox(2) self.assertEqual(fifo.can_put(), True) self.assertEqual(fifo.can_get(), False) def test_try_get(self): fifo = UVMMailbox(2) self.assertEqual(fifo.can_get(), False) itemq = [] self.assertEqual(fifo.try_get(itemq), False) self.assertEqual(fifo.try_put(234), True) self.assertEqual(fifo.try_get(itemq), True) self.assertEqual(len(itemq), 1) self.assertEqual(itemq[0], 234) def test_unbounded(self): fifo = UVMMailbox() self.assertEqual(fifo.can_put(), True) for i in range(0, 10): self.assertEqual(fifo.try_put(i), True) arr = [] self.assertEqual(fifo.try_peek(arr), True) self.assertEqual(arr[0], 0) for i in range(0, 10): arr = [] self.assertEqual(fifo.try_get(arr), True) self.assertEqual(arr[0], i) if __name__ == '__main__': unittest.main()
27.292683
54
0.599643
141
1,119
4.588652
0.269504
0.324575
0.293663
0.204019
0.616692
0.457496
0.126739
0.126739
0
0
0
0.023342
0.272565
1,119
40
55
27.975
0.771499
0
0
0.333333
0
0
0.007156
0
0
0
0
0
0.466667
1
0.1
false
0
0.066667
0
0.2
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
1
0
0
0
0
0
0
0
0
0
4
e23b8a689b50f079632235dc0d2643f7acd9aee1
176
py
Python
control/urls.py
j2melvin/ibrox
193484078ba5b8a66ca147bdbef28025628a70ce
[ "Apache-2.0" ]
null
null
null
control/urls.py
j2melvin/ibrox
193484078ba5b8a66ca147bdbef28025628a70ce
[ "Apache-2.0" ]
null
null
null
control/urls.py
j2melvin/ibrox
193484078ba5b8a66ca147bdbef28025628a70ce
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^live_feed$', views.live_feed, name='live_feed'), ]
19.555556
59
0.659091
26
176
4.346154
0.5
0.212389
0
0
0
0
0
0
0
0
0
0
0.159091
176
8
60
22
0.763514
0
0
0
0
0
0.153409
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
e252fc9da801fa90f37b2e141aa5dbc2120696ea
190
py
Python
examples/trackable.py
kurazu/pycon2015
fd3878bfb961ccddb0bfd67e704c50355280d271
[ "CC0-1.0" ]
null
null
null
examples/trackable.py
kurazu/pycon2015
fd3878bfb961ccddb0bfd67e704c50355280d271
[ "CC0-1.0" ]
null
null
null
examples/trackable.py
kurazu/pycon2015
fd3878bfb961ccddb0bfd67e704c50355280d271
[ "CC0-1.0" ]
null
null
null
class Trackable(object): def __init__(self, name): self.name = name print('CREATE {}'.format(name)) def __del__(self): print('DELETE {}'.format(self.name))
21.111111
44
0.584211
22
190
4.681818
0.545455
0.23301
0
0
0
0
0
0
0
0
0
0
0.252632
190
8
45
23.75
0.725352
0
0
0
0
0
0.094737
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.5
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
1
0
0
0
0
0
0
0
4
e270e5df17ab106b847681ae51708340717b7632
165
py
Python
Unit 7/7.1/7.1.4 Initials.py
shashwat73/cse
60e49307e57105cf9916c7329f53f891c5e81fdb
[ "MIT" ]
1
2021-04-08T14:02:49.000Z
2021-04-08T14:02:49.000Z
Unit 7/7.1/7.1.4 Initials.py
shashwat73/cse
60e49307e57105cf9916c7329f53f891c5e81fdb
[ "MIT" ]
null
null
null
Unit 7/7.1/7.1.4 Initials.py
shashwat73/cse
60e49307e57105cf9916c7329f53f891c5e81fdb
[ "MIT" ]
null
null
null
firstname = str(input("Enter your first name: ")) lastname = str(input("Enter your last name: ")) print("Initials: " + firstname[0] + "." + lastname[0] + ".")
33
61
0.606061
20
165
5
0.6
0.16
0.26
0.34
0
0
0
0
0
0
0
0.014815
0.181818
165
4
62
41.25
0.725926
0
0
0
0
0
0.354037
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
e2aa6c507ec3a3bddaf0451981667532388faeb7
303
py
Python
metatab/test/core.py
CivicKnowledge/metatab-py
510cdee5072577da2b59988f279456fd439e1c33
[ "BSD-3-Clause" ]
8
2016-10-26T04:58:44.000Z
2017-08-29T08:23:14.000Z
metatab/test/core.py
CivicKnowledge/metatab-py
510cdee5072577da2b59988f279456fd439e1c33
[ "BSD-3-Clause" ]
7
2016-11-04T16:18:01.000Z
2017-08-29T16:22:34.000Z
metatab/test/core.py
Metatab/metatab
510cdee5072577da2b59988f279456fd439e1c33
[ "BSD-3-Clause" ]
4
2017-02-23T03:39:18.000Z
2017-08-29T08:18:18.000Z
# Copyright (c) 2017 Civic Knowledge. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE """ """ def test_data(*paths): from os.path import dirname, join, abspath return abspath(join(dirname(abspath(__file__)), 'test-data', *paths))
25.25
82
0.722772
43
303
4.976744
0.744186
0.074766
0.121495
0
0
0
0
0
0
0
0
0.015873
0.168317
303
12
83
25.25
0.833333
0.468647
0
0
0
0
0.059603
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
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
1
0
1
0
1
0
0
4
2c4817e03791365b06d7acdd5003a58a0d88f51f
86
py
Python
ledmatrix/app/app.py
carlodones/multisensehat2
7af07cef1a3c66c9af1d8c029edd3cff1a4c4b0d
[ "Apache-2.0" ]
1
2018-03-30T23:56:03.000Z
2018-03-30T23:56:03.000Z
ledmatrix/app/app.py
resin-io-playground/sense-hat-multicontainer
2ae1442380e1bae4a197816bdfb7c47945af7830
[ "Apache-2.0" ]
null
null
null
ledmatrix/app/app.py
resin-io-playground/sense-hat-multicontainer
2ae1442380e1bae4a197816bdfb7c47945af7830
[ "Apache-2.0" ]
null
null
null
from sense_hat import SenseHat sense = SenseHat() sense.show_message("Hello resin!")
17.2
34
0.77907
12
86
5.416667
0.75
0.4
0
0
0
0
0
0
0
0
0
0
0.116279
86
4
35
21.5
0.855263
0
0
0
0
0
0.139535
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
2c4b28685f7e3c3ed686125fc1343469fe337c26
292
py
Python
pyrobolearn/tools/interfaces/sensors/myo/common.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
2
2021-01-21T21:08:30.000Z
2022-03-29T16:45:49.000Z
pyrobolearn/tools/interfaces/sensors/myo/common.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
null
null
null
pyrobolearn/tools/interfaces/sensors/myo/common.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
1
2020-09-29T21:25:39.000Z
2020-09-29T21:25:39.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import struct def pack(fmt, *args): return struct.pack('<' + fmt, *args) def unpack(fmt, *args): return struct.unpack('<' + fmt, *args) def text(scr, font, txt, pos, clr=(255,255,255)): scr.blit(font.render(txt, True, clr), pos)
19.466667
49
0.606164
45
292
3.933333
0.555556
0.158192
0.124294
0.214689
0
0
0
0
0
0
0
0.041667
0.178082
292
14
50
20.857143
0.695833
0.143836
0
0
0
0
0.008065
0
0
0
0
0
0
1
0.428571
false
0
0.142857
0.285714
0.857143
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
2c769c13e47d0536c93f157a33984ce4ea09b5e9
118
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/main.py
zhengyu-inboc/cookiecutter-pypackage
2206c320bfd32231987dde8e08b1d30df35b7c8d
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/main.py
zhengyu-inboc/cookiecutter-pypackage
2206c320bfd32231987dde8e08b1d30df35b7c8d
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/main.py
zhengyu-inboc/cookiecutter-pypackage
2206c320bfd32231987dde8e08b1d30df35b7c8d
[ "BSD-3-Clause" ]
null
null
null
import sys from {{cookiecutter.project_slug}}.cli.commands import main_cli def run_tool(): sys.exit(main_cli())
16.857143
63
0.745763
18
118
4.666667
0.722222
0.166667
0
0
0
0
0
0
0
0
0
0
0.127119
118
6
64
19.666667
0.815534
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.5
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
2ca91bc18f409c0341e8325322b6f9da571a1d4b
175
py
Python
tests/test_build.py
MathOnco/valis
1ec9a88f21930d82fa5e823276ff78ff8b4f3a5a
[ "MIT" ]
4
2022-03-14T12:55:42.000Z
2022-03-17T10:06:29.000Z
tests/test_build.py
MathOnco/valis
1ec9a88f21930d82fa5e823276ff78ff8b4f3a5a
[ "MIT" ]
null
null
null
tests/test_build.py
MathOnco/valis
1ec9a88f21930d82fa5e823276ff78ff8b4f3a5a
[ "MIT" ]
null
null
null
"""Empty test. Empty so that tox can be used for CI in Github actions """ # def test_sum(): # assert sum([1, 2, 3]) == 6, "Should be 6" def test(): assert True is True
25
54
0.617143
32
175
3.34375
0.71875
0.130841
0
0
0
0
0
0
0
0
0
0.037313
0.234286
175
7
55
25
0.761194
0.737143
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
true
0
0
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
4
e2c0cf205d17e85a2173363ef1bcbeeb009b3897
270
py
Python
src/tratamento/convert_salvar.py
DablioPaiva/DesafioDMS
e83bf4bb08fdd17c1a040adc41353c3a3416dce4
[ "Apache-2.0" ]
null
null
null
src/tratamento/convert_salvar.py
DablioPaiva/DesafioDMS
e83bf4bb08fdd17c1a040adc41353c3a3416dce4
[ "Apache-2.0" ]
null
null
null
src/tratamento/convert_salvar.py
DablioPaiva/DesafioDMS
e83bf4bb08fdd17c1a040adc41353c3a3416dce4
[ "Apache-2.0" ]
null
null
null
def ConverterTempo(tempo, unidade): if unidade == "m": return tempo*60 if unidade == "s": return tempo def ConverteMetros(quantidade, unidade): if unidade == "M": return quantidade*100 if unidade == "m": return quantidade
24.545455
40
0.6
30
270
5.4
0.4
0.222222
0.185185
0.296296
0.506173
0
0
0
0
0
0
0.026042
0.288889
270
11
41
24.545455
0.817708
0
0
0.2
0
0
0.01476
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
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
e2f5cca88f06cfb7dc7fd61e52053b9c48828c36
840
py
Python
manage.py
pontikos/exac_browser
650d863cb3373c5005d5d4fc04c7306ef854bd69
[ "MIT" ]
2
2016-07-15T17:41:30.000Z
2017-01-20T00:18:27.000Z
manage.py
pontikos/exac_browser
650d863cb3373c5005d5d4fc04c7306ef854bd69
[ "MIT" ]
4
2015-12-01T23:17:15.000Z
2016-01-20T01:30:56.000Z
manage.py
pontikos/uclex_browser
650d863cb3373c5005d5d4fc04c7306ef854bd69
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 from flask.ext.script import Manager from uclex import app import uclex #import mongodb manager = Manager(app) @manager.command def load_db(): uclex.load_db() @manager.command def load_base_coverage(): uclex.load_base_coverage() @manager.command def load_variants_file(): uclex.load_variants_file() @manager.command def load_gene_models(): uclex.load_gene_models() @manager.command def load_dbsnp_file(): uclex.load_dbsnp_file() @manager.command def load_constraint_information(): uclex.load_constraint_information() @manager.command def load_mnps(): uclex.load_mnps() @manager.command def create_cache(): uclex.create_cache() @manager.command def precalculate_metrics(): uclex.precalculate_metrics() @manager.command def mrc_hpo(): uclex.mrc_hpo() if __name__ == "__main__": manager.run()
16.153846
70
0.77619
116
840
5.293103
0.318966
0.228013
0.276873
0.239414
0.081433
0
0
0
0
0
0
0.001332
0.105952
840
51
71
16.470588
0.816245
0.041667
0
0.384615
0
0
0.009975
0
0
0
0
0
0
1
0.384615
false
0
0.115385
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
3915b0996cd0bca4128def59b2a6c6a8850ce5a9
833
py
Python
twiliosms/tests/tests_smoke.py
lauro-cesar/twiliosms4django
ed175f223a3da901ec564f931c947027bf67a6d0
[ "BSD-3-Clause" ]
1
2021-07-31T21:10:08.000Z
2021-07-31T21:10:08.000Z
twiliosms/tests/tests_smoke.py
lauro-cesar/twiliosms4django
ed175f223a3da901ec564f931c947027bf67a6d0
[ "BSD-3-Clause" ]
null
null
null
twiliosms/tests/tests_smoke.py
lauro-cesar/twiliosms4django
ed175f223a3da901ec564f931c947027bf67a6d0
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase class TwillioSMSSmokeTests(TestCase): """ Lets make sure we can import the model """ def test_user_model_importable(self): try: from twiliosms.models import TwilioSMS except Exception as e: self.fail(e) class TwillioSettingsSmokeTest(TestCase): """ Lets make sure we can import the model """ def test_user_model_importable(self): try: from twiliosms.models import TwilioSettings except Exception as e: self.fail(e) class TwillioNumberSmokeTest(TestCase): """ Lets make sure we can import the model """ def test_user_model_importable(self): try: from twiliosms.models import TwilioNumber except Exception as e: self.fail(e)
21.921053
55
0.630252
95
833
5.431579
0.315789
0.069767
0.093023
0.116279
0.74031
0.74031
0.74031
0.687985
0.563953
0.563953
0
0
0.303721
833
37
56
22.513514
0.889655
0.139256
0
0.631579
0
0
0
0
0
0
0
0
0
1
0.157895
false
0
0.368421
0
0.684211
0
0
0
0
null
0
0
0
0
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
1
0
1
0
0
4
1a7e92edc306832c469e05ac79118f1b83298d24
27
py
Python
venv/lib/python2.6/abc.py
mrghen/groupfit
e966bbc51c8126b00dfc0c611fcec6f15b9749ee
[ "Apache-2.0" ]
1
2020-10-14T00:06:54.000Z
2020-10-14T00:06:54.000Z
build/env/lib/python2.6/abc.py
lockhart39/HueQualityAndIngestionApp
c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c
[ "Apache-2.0" ]
7
2015-02-24T18:20:36.000Z
2015-03-04T14:26:48.000Z
venv/lib/python2.6/abc.py
mrghen/groupfit
e966bbc51c8126b00dfc0c611fcec6f15b9749ee
[ "Apache-2.0" ]
2
2015-08-06T07:45:48.000Z
2017-01-04T17:47:16.000Z
/usr/lib64/python2.6/abc.py
27
27
0.777778
6
27
3.5
1
0
0
0
0
0
0
0
0
0
0
0.148148
0
27
1
27
27
0.62963
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
1ac9a392410c58f66d468d0e1b91bc399edc4b17
1,374
py
Python
operators/bias_operators.py
arbab97/deepcrime
d85b0b30d11cd858655d8ef2519cd54a6af24c3c
[ "MIT" ]
8
2021-11-04T03:22:44.000Z
2022-03-08T16:25:19.000Z
operators/bias_operators.py
arbab97/deepcrime
d85b0b30d11cd858655d8ef2519cd54a6af24c3c
[ "MIT" ]
null
null
null
operators/bias_operators.py
arbab97/deepcrime
d85b0b30d11cd858655d8ef2519cd54a6af24c3c
[ "MIT" ]
4
2021-09-14T08:03:14.000Z
2022-03-06T17:45:25.000Z
import random import copy import utils.constants as const import utils.properties as props import utils.exceptions as e import utils.mutation_utils as mu def operator_add_bias(model): if not model: print("raise,log we have probllems") current_index = props.add_bias["current_index"] tmp = model.get_config() print("Adding bias to layer"+str(current_index)) if 'use_bias' in tmp['layers'][current_index]['config'] and not tmp['layers'][current_index]['config']['use_bias']: tmp['layers'][current_index]['config']['use_bias'] = True else: raise e.AddAFMutationError(str(current_index), "Not possible to apply the add bias mutation to layer ") model = mu.model_from_config(model, tmp) return model def operator_remove_bias(model): if not model: print("raise,log we have probllems") current_index = props.remove_bias["current_index"] tmp = model.get_config() print("Removing bias from layer " + str(current_index)) if 'use_bias' in tmp['layers'][current_index]['config'] and tmp['layers'][current_index]['config']['use_bias']: tmp['layers'][current_index]['config']['use_bias'] = False else: raise e.AddAFMutationError(str(current_index), "Not possible to apply the add bias mutation to layer ") model = mu.model_from_config(model, tmp) return model
29.234043
119
0.697234
194
1,374
4.768041
0.257732
0.181622
0.103784
0.136216
0.774054
0.774054
0.774054
0.774054
0.691892
0.691892
0
0
0.180495
1,374
47
120
29.234043
0.821492
0
0
0.466667
0
0
0.255273
0
0
0
0
0
0
1
0.066667
false
0
0.2
0
0.333333
0.133333
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
46e02b174e531734239c7eae4d8a118c597d95a8
236
py
Python
solutions/Addition.py
aalekhpatel07/CPContestTemplate
9262c732c9f74c33718fe782984f27f741574a2b
[ "MIT" ]
2
2021-02-02T03:46:30.000Z
2021-02-02T03:51:42.000Z
solutions/Addition.py
aalekhpatel07/Codewars
05269fec8a007f6fd0f29250ca1d41cd04742e1a
[ "MIT" ]
null
null
null
solutions/Addition.py
aalekhpatel07/Codewars
05269fec8a007f6fd0f29250ca1d41cd04742e1a
[ "MIT" ]
null
null
null
def solve(a, b): return a + b def driver(): a, b = list(map(int, input().split(' '))) result = solve(a, b) print(solve(a, b)) return result def main(): return driver() if __name__ == '__main__': main()
13.111111
45
0.538136
34
236
3.5
0.470588
0.084034
0.176471
0.218487
0
0
0
0
0
0
0
0
0.279661
236
17
46
13.882353
0.7
0
0
0
0
0
0.038136
0
0
0
0
0
0
1
0.272727
false
0
0
0.181818
0.545455
0.090909
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
20151622750101e81f633ebbd2b58975d1a7e650
49
py
Python
Software/pi/cross/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/rpi-rootfs/usr/lib/pymodules/python2.7/ndg/httpsclient/ssl_socket.py
martijnvandijk/th06
873c63fbd232c3465f700f5ecee945b2f2ecd8f2
[ "MIT" ]
null
null
null
Software/pi/cross/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/rpi-rootfs/usr/lib/pymodules/python2.7/ndg/httpsclient/ssl_socket.py
martijnvandijk/th06
873c63fbd232c3465f700f5ecee945b2f2ecd8f2
[ "MIT" ]
null
null
null
Software/pi/cross/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/rpi-rootfs/usr/lib/pymodules/python2.7/ndg/httpsclient/ssl_socket.py
martijnvandijk/th06
873c63fbd232c3465f700f5ecee945b2f2ecd8f2
[ "MIT" ]
null
null
null
/usr/share/pyshared/ndg/httpsclient/ssl_socket.py
49
49
0.857143
8
49
5.125
1
0
0
0
0
0
0
0
0
0
0
0
0
49
1
49
49
0.836735
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
203a632a00d6eccf0799ff200172a63d4883e749
34
py
Python
cbpa/__init__.py
anthonycorletti/coinbasepro-scheduler
cc210bc165e3c1872facb84b43abcbe92be4149e
[ "MIT" ]
1
2022-01-04T07:43:05.000Z
2022-01-04T07:43:05.000Z
cbpa/__init__.py
anthonycorletti/coinbasepro-scheduler
cc210bc165e3c1872facb84b43abcbe92be4149e
[ "MIT" ]
null
null
null
cbpa/__init__.py
anthonycorletti/coinbasepro-scheduler
cc210bc165e3c1872facb84b43abcbe92be4149e
[ "MIT" ]
null
null
null
"""cbpa""" __version__ = "0.1.1"
8.5
21
0.529412
5
34
2.8
0.8
0
0
0
0
0
0
0
0
0
0
0.103448
0.147059
34
3
22
11.333333
0.37931
0.117647
0
0
0
0
0.208333
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
645de835dab959bcf914fb79de1870aa71fe6e9b
237
py
Python
python_toolbox/tracing_tools/__init__.py
hboshnak/python_toolbox
cb9ef64b48f1d03275484d707dc5079b6701ad0c
[ "MIT" ]
119
2015-02-05T17:59:47.000Z
2022-02-21T22:43:40.000Z
python_toolbox/tracing_tools/__init__.py
hboshnak/python_toolbox
cb9ef64b48f1d03275484d707dc5079b6701ad0c
[ "MIT" ]
4
2019-04-24T14:01:14.000Z
2020-05-21T12:03:29.000Z
python_toolbox/tracing_tools/__init__.py
hboshnak/python_toolbox
cb9ef64b48f1d03275484d707dc5079b6701ad0c
[ "MIT" ]
14
2015-03-30T06:30:42.000Z
2021-12-24T23:45:11.000Z
# Copyright 2009-2017 Ram Rachum. # This program is distributed under the MIT license. '''Defines tools for tracing function calls.''' from .count_calls import count_calls from .temp_function_call_counter import TempFunctionCallCounter
33.857143
63
0.818565
32
237
5.90625
0.8125
0.095238
0
0
0
0
0
0
0
0
0
0.038462
0.122363
237
7
63
33.857143
0.870192
0.527426
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
647ff557bf17e6aa27db5fe89db10bf5e0d9d033
207
py
Python
reactorcore/cron/example.py
pill/reactor-core
ab2a7f1463295f03645c3938faf91eb1517369cc
[ "MIT" ]
null
null
null
reactorcore/cron/example.py
pill/reactor-core
ab2a7f1463295f03645c3938faf91eb1517369cc
[ "MIT" ]
null
null
null
reactorcore/cron/example.py
pill/reactor-core
ab2a7f1463295f03645c3938faf91eb1517369cc
[ "MIT" ]
null
null
null
import time from reactorcore.cron.base import CronTask class ExampleTask(CronTask): def execute(self, *args, **kwargs): print("") print("Executing Cron ExampleTask!") print("")
20.7
44
0.647343
22
207
6.090909
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.227053
207
9
45
23
0.8375
0
0
0.285714
0
0
0.130435
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.571429
0.428571
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
0
0
1
1
0
4
648da79030774266c9aa2ee8cc1348df81d12ffb
265
py
Python
pypdxapi/exceptions.py
hallenmaia/pypdxapi
9c00e3e618708d793edfb73840f541c93980ad72
[ "MIT" ]
null
null
null
pypdxapi/exceptions.py
hallenmaia/pypdxapi
9c00e3e618708d793edfb73840f541c93980ad72
[ "MIT" ]
null
null
null
pypdxapi/exceptions.py
hallenmaia/pypdxapi
9c00e3e618708d793edfb73840f541c93980ad72
[ "MIT" ]
null
null
null
""" Python implementation of Paradox HD7X cameras (and future other modules).""" class ParadoxModuleError(Exception): """Generic exception for Paradox modules.""" class ParadoxCameraError(ParadoxModuleError): """Generic exception for Camera modules."""
26.5
80
0.750943
26
265
7.653846
0.653846
0.120603
0.190955
0
0
0
0
0
0
0
0
0.004386
0.139623
265
9
81
29.444444
0.868421
0.566038
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
649b63482abc5b1d75bc7f334a7a709cdc635e72
634
py
Python
backpack/extensions/secondorder/diag_ggn/activations.py
maryamhgf/backpack
63d2717656df2e0f18b3b6ee50320e82ce7358b6
[ "MIT" ]
null
null
null
backpack/extensions/secondorder/diag_ggn/activations.py
maryamhgf/backpack
63d2717656df2e0f18b3b6ee50320e82ce7358b6
[ "MIT" ]
null
null
null
backpack/extensions/secondorder/diag_ggn/activations.py
maryamhgf/backpack
63d2717656df2e0f18b3b6ee50320e82ce7358b6
[ "MIT" ]
2
2021-06-11T14:15:28.000Z
2021-06-16T11:19:11.000Z
from backpack.core.derivatives.relu import ReLUDerivatives from backpack.core.derivatives.sigmoid import SigmoidDerivatives from backpack.core.derivatives.tanh import TanhDerivatives from backpack.extensions.secondorder.diag_ggn.diag_ggn_base import DiagGGNBaseModule class DiagGGNReLU(DiagGGNBaseModule): def __init__(self): super().__init__(derivatives=ReLUDerivatives()) class DiagGGNSigmoid(DiagGGNBaseModule): def __init__(self): super().__init__(derivatives=SigmoidDerivatives()) class DiagGGNTanh(DiagGGNBaseModule): def __init__(self): super().__init__(derivatives=TanhDerivatives())
31.7
84
0.798107
62
634
7.725806
0.403226
0.100209
0.100209
0.169102
0.300626
0.300626
0.300626
0
0
0
0
0
0.115142
634
19
85
33.368421
0.853832
0
0
0.230769
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0.307692
0
0.769231
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
649cb603042bfbde3097b07e8c56a81d8c632ad6
151
py
Python
answers/AkshajV1309/Day10/D10Q1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
22
2021-03-16T14:07:47.000Z
2021-08-13T08:52:50.000Z
answers/AkshajV1309/Day10/D10Q1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
174
2021-03-16T21:16:40.000Z
2021-06-12T05:19:51.000Z
answers/AkshajV1309/Day10/D10Q1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
135
2021-03-16T16:47:12.000Z
2021-06-27T14:22:38.000Z
import string st=input("Input String: ") print(f'{st} is Pangram') if set(st.lower())>=set(string.ascii_lowercase) else print(f'{st} is not Pangram')
37.75
109
0.708609
26
151
4.076923
0.576923
0.113208
0.150943
0.188679
0
0
0
0
0
0
0
0
0.10596
151
3
110
50.333333
0.785185
0
0
0
0
0
0.317881
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
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
0
0
0
4
64b8ce8e745732e8f8f2a8eaa7ee3fa6fa71d5fa
84
py
Python
conda/run_test.py
rscohn2/IDP-bench
1b7540276369da6146b3cacae780dae3ffba73da
[ "MIT" ]
1
2017-03-04T00:30:54.000Z
2017-03-04T00:30:54.000Z
conda/run_test.py
rscohn2/IDP-bench
1b7540276369da6146b3cacae780dae3ffba73da
[ "MIT" ]
null
null
null
conda/run_test.py
rscohn2/IDP-bench
1b7540276369da6146b3cacae780dae3ffba73da
[ "MIT" ]
null
null
null
import subprocess subprocess.run('python -m pytest tests', shell=True, check=True)
21
64
0.77381
12
84
5.416667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.107143
84
3
65
28
0.866667
0
0
0
0
0
0.261905
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
b39a1977e51f5a1f4884fb99428ac1f54989cc5e
2,871
py
Python
tests/test_network.py
kimpaller/nebula
ee794b34f2ff4e31f1a75b9dbac06c41bec520c8
[ "BSD-2-Clause" ]
null
null
null
tests/test_network.py
kimpaller/nebula
ee794b34f2ff4e31f1a75b9dbac06c41bec520c8
[ "BSD-2-Clause" ]
54
2020-03-20T21:10:58.000Z
2021-06-28T02:08:28.000Z
tests/test_network.py
kimpaller/nebula
ee794b34f2ff4e31f1a75b9dbac06c41bec520c8
[ "BSD-2-Clause" ]
3
2020-08-11T06:09:17.000Z
2021-02-22T01:40:29.000Z
import os import shutil import pytest from nebula import uart from nebula import pdu from nebula import network import time def remove_file(files): for file in files: if os.path.isfile(file): os.remove(file) if os.path.isfile(file): os.remove(file) @pytest.fixture(autouse=True) def run_around_tests(): # Before test files = ["dmesg.log", "dmesg_error.log", "dmesg_warn.log"] remove_file(files) yield # After test remove_file(files) # @pytest.mark.skip(reason="Not fully implemented") # @pytest.mark.dependency(depends=["test_adrv9361_fmc_get_to_uboot_menu"]) def test_adrv9361_fmc_network_update(): # Get necessary boot files root = os.path.dirname(os.path.realpath(__file__)) bootbinpath = root + "/bootfiles/BOOT.BIN" devtree_filename = root + "/bootfiles/devicetree.dtb" kernel_filename = root + "/bootfiles/uImage" assert os.path.isfile(bootbinpath) assert os.path.isfile(devtree_filename) assert os.path.isfile(kernel_filename) # Go go go config = "/etc/default/nebula" config = "/etc/nebula/nebula-zynq-adrv9361-z7035-fmc.yaml" n = network(yamlfilename=config) n.dutip = "192.168.86.35" n.update_boot_partition(bootbinpath, devtree_filename, kernel_filename) # n.update_boot_partition_existing_files(subfolder="zynq-adrv9361-z7035-fmc") time.sleep(60) n.check_board_booted() # WILL RAISE ON ERROR # Check board booted :) # @pytest.mark.dependency(depends=["test_adrv9361_fmc_get_to_uboot_menu"]) def test_adrv9361_fmc_network_update_existing_files(): # Get necessary boot files root = os.path.dirname(os.path.realpath(__file__)) bootbinpath = root + "/bootfiles/BOOT.BIN" devtree_filename = root + "/bootfiles/devicetree.dtb" kernel_filename = root + "/bootfiles/uImage" assert os.path.isfile(bootbinpath) assert os.path.isfile(devtree_filename) assert os.path.isfile(kernel_filename) # Go go go config = "/etc/default/nebula" config = "/etc/nebula/nebula-zynq-adrv9361-z7035-fmc.yaml" n = network(yamlfilename=config) n.dutip = "192.168.86.35" n.update_boot_partition_existing_files(subfolder="zynq-adrv9361-z7035-fmc") time.sleep(60) n.check_board_booted() # WILL RAISE ON ERROR # Check board booted :) # @pytest.mark.dependency(depends=["test_adrv9361_fmc_get_to_uboot_menu"]) def test_dmesg_read(): # Get necessary boot files # Go go go config = "/etc/default/nebula" # config = "/etc/nebula/nebula-zynq-adrv9361-z7035-fmc.yaml" n = network(yamlfilename=config) n.dutip = "192.168.86.35" (e, log) = n.check_dmesg() assert os.path.isfile("dmesg.log") assert os.path.isfile("dmesg_warn.log") assert os.path.isfile("dmesg_err.log") if __name__ == "__main__": test_adrv9361_fmc_uboot_boot()
30.221053
81
0.705329
394
2,871
4.926396
0.236041
0.046368
0.068006
0.083462
0.768161
0.756311
0.729521
0.729521
0.698609
0.698609
0
0.041246
0.172414
2,871
94
82
30.542553
0.775673
0.213166
0
0.59322
0
0
0.186161
0.074554
0
0
0
0
0.152542
1
0.084746
false
0
0.118644
0
0.20339
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
b60211de702896c3669839ccec700d6fc8f8d178
40
py
Python
modules/2.79/bpy/types/FluidSettings.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/FluidSettings.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/FluidSettings.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class FluidSettings: type = None
6.666667
20
0.65
4
40
6.5
1
0
0
0
0
0
0
0
0
0
0
0
0.3
40
5
21
8
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
374a5e39cf0c5dc546b4628036ae69457e8fa43d
100
py
Python
write_name.py
athira-vs/name_to_file
9c912cbc994f0d85ea42f36018605dffb4fc608c
[ "MIT" ]
null
null
null
write_name.py
athira-vs/name_to_file
9c912cbc994f0d85ea42f36018605dffb4fc608c
[ "MIT" ]
null
null
null
write_name.py
athira-vs/name_to_file
9c912cbc994f0d85ea42f36018605dffb4fc608c
[ "MIT" ]
null
null
null
with open("data.txt", "w") as fd: fd.write("Writing name to file\n") fd.write("Athira V S")
25
38
0.6
19
100
3.157895
0.842105
0.233333
0
0
0
0
0
0
0
0
0
0
0.2
100
3
39
33.333333
0.75
0
0
0
0
0
0.41
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
374f59f4d584ea462729cc1d98b3737fb8dec6d8
775
py
Python
configs/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_lmPbr_SO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_Pbr_02_benchvise.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
33
2021-12-15T07:11:47.000Z
2022-03-29T08:58:32.000Z
configs/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_lmPbr_SO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_Pbr_02_benchvise.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
3
2021-12-15T11:39:54.000Z
2022-03-29T07:24:23.000Z
configs/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_lmPbr_SO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_Pbr_02_benchvise.py
THU-DA-6D-Pose-Group/self6dpp
c267cfa55e440e212136a5e9940598720fa21d16
[ "Apache-2.0" ]
null
null
null
_base_ = "./FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_Pbr_01_ape.py" OUTPUT_DIR = "output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_Aggressive_Flat_lmPbr_SO/benchvise" DATASETS = dict(TRAIN=("lm_pbr_benchvise_train",), TEST=("lm_real_benchvise_test",)) # bbnc7 # objects benchvise Avg(1) # ad_2 10.77 10.77 # ad_5 48.01 48.01 # ad_10 92.92 92.92 # rete_2 43.55 43.55 # rete_5 99.32 99.32 # rete_10 100.00 100.00 # re_2 57.32 57.32 # re_5 99.32 99.32 # re_10 100.00 100.00 # te_2 82.25 82.25 # te_5 100.00 100.00 # te_10 100.00 100.00 # proj_2 74.88 74.88 # proj_5 99.22 99.22 # proj_10 100.00 100.00 # re 1.97 1.97 # te 0.01 0.01
32.291667
100
0.6
140
775
3.071429
0.364286
0.116279
0.093023
0.116279
0.381395
0.065116
0
0
0
0
0
0.319419
0.289032
775
23
101
33.695652
0.46098
0.615484
0
0
0
0
0.679856
0.679856
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
375937a928e0243ffc7ce24ef94d8011314e23b0
1,984
py
Python
z2/part3/updated_part2_batch/jm/parser_errors_2/841802672.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
1
2020-04-16T12:13:47.000Z
2020-04-16T12:13:47.000Z
z2/part3/updated_part2_batch/jm/parser_errors_2/841802672.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:50:15.000Z
2020-05-19T14:58:30.000Z
z2/part3/updated_part2_batch/jm/parser_errors_2/841802672.py
kozakusek/ipp-2020-testy
09aa008fa53d159672cc7cbf969a6b237e15a7b8
[ "MIT" ]
18
2020-03-06T17:45:13.000Z
2020-06-09T19:18:31.000Z
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) """ scenario: test_random_actions uuid: 841802672 """ """ random actions, total chaos """ board = gamma_new(2, 5, 3, 1) assert board is not None assert gamma_move(board, 1, 3, 1) == 0 assert gamma_move(board, 1, 0, 4) == 1 assert gamma_move(board, 2, 0, 1) == 1 assert gamma_move(board, 2, 0, 1) == 0 assert gamma_move(board, 3, 2, 0) == 0 assert gamma_move(board, 3, 0, 2) == 1 assert gamma_golden_move(board, 3, 1, 0) == 0 assert gamma_move(board, 1, 1, 1) == 0 assert gamma_move(board, 1, 1, 1) == 0 assert gamma_move(board, 2, 1, 2) == 0 assert gamma_move(board, 3, 1, 1) == 0 assert gamma_move(board, 1, 0, 1) == 0 assert gamma_move(board, 1, 1, 4) == 1 board203723783 = gamma_board(board) assert board203723783 is not None assert board203723783 == ("11\n" "..\n" "3.\n" "2.\n" "..\n") del board203723783 board203723783 = None assert gamma_move(board, 2, 3, 1) == 0 assert gamma_move(board, 3, 3, 0) == 0 assert gamma_move(board, 3, 0, 2) == 0 assert gamma_move(board, 1, 1, 4) == 0 assert gamma_free_fields(board, 1) == 2 assert gamma_move(board, 2, 1, 4) == 0 assert gamma_move(board, 3, 1, 1) == 0 assert gamma_move(board, 1, 3, 1) == 0 assert gamma_move(board, 1, 1, 1) == 0 assert gamma_free_fields(board, 1) == 2 assert gamma_move(board, 2, 0, 0) == 1 assert gamma_busy_fields(board, 2) == 2 assert gamma_golden_possible(board, 2) == 1 assert gamma_move(board, 3, 1, 3) == 0 assert gamma_move(board, 1, 2, 1) == 0 assert gamma_move(board, 1, 1, 4) == 0 assert gamma_move(board, 2, 1, 1) == 1 assert gamma_move(board, 3, 2, 1) == 0 assert gamma_move(board, 3, 0, 3) == 1 assert gamma_move(board, 1, 0, 1) == 0 assert gamma_move(board, 1, 0, 4) == 0 assert gamma_move(board, 2, 0, 1) == 0 assert gamma_move(board, 2, 1, 0) == 1 gamma_delete(board)
27.178082
46
0.655746
356
1,984
3.491573
0.098315
0.318584
0.374095
0.498793
0.645213
0.621078
0.563154
0.510861
0.48753
0.441673
0
0.123833
0.19002
1,984
72
47
27.555556
0.649658
0
0
0.258621
0
0
0.010549
0
0
0
0
0
0.672414
1
0
false
0
0.017241
0
0.017241
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
1
0
0
0
0
0
0
0
0
0
4
37600430f28e893ee202b9a4b14ce60ad39cb505
35
py
Python
tests/__init__.py
Techtonique/ahead_python
7405c97259c6b7289d40a6bc45c71a967431fae7
[ "BSD-3-Clause-Clear" ]
10
2021-12-14T16:28:22.000Z
2022-03-28T22:56:27.000Z
tests/__init__.py
Techtonique/ahead_python
7405c97259c6b7289d40a6bc45c71a967431fae7
[ "BSD-3-Clause-Clear" ]
2
2021-12-09T16:26:12.000Z
2022-01-26T11:37:00.000Z
tests/__init__.py
Techtonique/ahead_python
7405c97259c6b7289d40a6bc45c71a967431fae7
[ "BSD-3-Clause-Clear" ]
2
2021-12-21T17:46:57.000Z
2021-12-23T22:30:09.000Z
"""Unit test package for ahead."""
17.5
34
0.657143
5
35
4.6
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
1
35
35
0.766667
0.8
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
376b2d5ff6548972c51ed3099aca6278ad2b2e3f
144
py
Python
src/model/struct/args/writer_args.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
src/model/struct/args/writer_args.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
src/model/struct/args/writer_args.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from dataclasses import dataclass @dataclass class WriterArgs: sort: bool dynamic_struct: bool include_desc: bool
14.4
33
0.736111
18
144
5.777778
0.833333
0
0
0
0
0
0
0
0
0
0
0.008772
0.208333
144
9
34
16
0.903509
0.090278
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
378e5b480a953f8073abc6a4412ba0445abd3b13
216
py
Python
core/python/kungfu/command/algo/__init__.py
lf-shaw/kungfu
22a9ec192f4129e61697fdbdbfe1326b5f2886d4
[ "Apache-2.0" ]
2,209
2017-11-15T07:51:14.000Z
2021-01-19T03:16:48.000Z
core/python/kungfu/command/algo/__init__.py
jumpjungle/kungfu
4a2152b7f2ccabd4650dd97b7f4c1685272b0525
[ "Apache-2.0" ]
45
2017-11-16T04:38:51.000Z
2021-01-18T22:20:33.000Z
core/python/kungfu/command/algo/__init__.py
jumpjungle/kungfu
4a2152b7f2ccabd4650dd97b7f4c1685272b0525
[ "Apache-2.0" ]
889
2017-11-15T08:04:38.000Z
2021-01-16T12:41:25.000Z
import pyyjj import click from kungfu.command import kfc, pass_ctx_from_parent from kungfu.wingchun import replay_setup @kfc.group(help_priority=6) @click.pass_context def algo(ctx): pass_ctx_from_parent(ctx)
18
52
0.814815
35
216
4.771429
0.571429
0.11976
0.131737
0.203593
0
0
0
0
0
0
0
0.005236
0.115741
216
11
53
19.636364
0.86911
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0.375
0.5
0
0.625
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
0
1
1
0
1
0
0
4
80637eb790a55d024852699e448ddf52c54d763c
20,319
py
Python
vb2py/PythonCard/samples/textRouter/textRouter.rsrc.py
ceprio/xl_vb2py
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
[ "BSD-3-Clause" ]
null
null
null
vb2py/PythonCard/samples/textRouter/textRouter.rsrc.py
ceprio/xl_vb2py
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
[ "BSD-3-Clause" ]
null
null
null
vb2py/PythonCard/samples/textRouter/textRouter.rsrc.py
ceprio/xl_vb2py
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
[ "BSD-3-Clause" ]
null
null
null
{'application':{'type':'Application', 'name':'GuiPyBlog', 'backgrounds': [ {'type':'Background', 'name':'bgTextRouter', 'title':'TextRouter 0.60', 'size':(650, 426), 'statusBar':1, 'icon':'tr.ico', 'style':['resizeable'], 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileLoad', 'label':'&Open', }, {'type':'MenuItem', 'name':'menuFileLoadFrom', 'label':'Op&en...', }, {'type':'MenuItem', 'name':'menuFileSave', 'label':'&Save', }, {'type':'MenuItem', 'name':'menuFileSaveAs', 'label':'Save &As...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuFileLoadConfig', 'label':'&Load Config...', }, {'type':'MenuItem', 'name':'menuFileSaveConfig', 'label':'S&ave Config', }, {'type':'MenuItem', 'name':'menuFileSaveConfigAs', 'label':'Sa&ve Config As...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuFilePreferences', 'label':'&Preferences...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit\tCtrl+Q', 'command':'exit', }, ] }, {'type':'Menu', 'name':'Edit', 'label':'&Edit', 'items': [ {'type':'MenuItem', 'name':'menuEditUndo', 'label':'&Undo\tCtrl+Z', }, {'type':'MenuItem', 'name':'menuEditRedo', 'label':'&Redo\tCtrl+Y', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuEditCut', 'label':'Cu&t\tCtrl+X', }, {'type':'MenuItem', 'name':'menuEditCopy', 'label':'&Copy\tCtrl+C', }, {'type':'MenuItem', 'name':'menuEditPaste', 'label':'&Paste\tCtrl+V', }, { 'type':'MenuItem', 'name':'editSep2', 'label':'-' }, { 'type':'MenuItem', 'name':'menuEditFind', 'label':'&Find...\tCtrl+F', 'command':'doEditFind'}, { 'type':'MenuItem', 'name':'menuEditFindNext', 'label':'&Find Next\tF3', 'command':'doEditFindNext'}, {'type':'MenuItem', 'name':'editSep3', 'label':'-', }, {'type':'MenuItem', 'name':'menuEditRemoveNewlines', 'label':'Remove &Newlines', }, {'type':'MenuItem', 'name':'menuEditWrapText', 'label':'&Wrap Text', }, {'type':'MenuItem', 'name':'editSep4', 'label':'-', }, {'type':'MenuItem', 'name':'menuEditClear', 'label':'Cle&ar\tDel', }, {'type':'MenuItem', 'name':'menuEditSelectAll', 'label':'Select A&ll\tCtrl+A', }, ] }, {'type':'Menu', 'name':'HTML', 'label':'F&ormat', 'items': [ {'type':'MenuItem', 'name':'menuHtmlBold', 'label':'&Bold\tCtrl+B', 'command':'menuHtmlMake', }, {'type':'MenuItem', 'name':'menuHtmlItalic', 'label':'&Italic\tCtrl+I', 'command':'menuHtmlMake', }, {'type':'MenuItem', 'name':'menuHtmlCenter', 'label':'&Center', }, {'type':'MenuItem', 'name':'menuHtmlCode', 'label':'C&ode', 'command':'menuHtmlMake', }, {'type':'MenuItem', 'name':'menuHtmlBlockquote', 'label':'Block&quote', 'command':'menuHtmlMake', }, {'type':'MenuItem', 'name':'htmlSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuHtmlAddLink', 'label':'&Add Link...\tCtrl+L', 'command':'menuHtmlAddLink', }, {'type':'MenuItem', 'name':'htmlSep2', 'label':'-', }, {'type':'MenuItem', 'name':'menuHtmlStripHTML', 'label':'&Strip HTML\tCtrl+G', }, {'type':'MenuItem', 'name':'htmlSep2', 'label':'-', }, {'type':'MenuItem', 'name':'menuHtmlPreferences', 'label':'Preferences...', }, ] }, {'type':'Menu', 'name':'menuRouteTo', 'label':'&Route Text To...', 'items': [ {'type':'MenuItem', 'name':'menuRouteToBlogger', 'label':'&Blogger\tCtrl+W', }, {'type':'MenuItem', 'name':'menuRouteToManila', 'label':'&Manila\tCtrl+E', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuRouteToEmailPredefined', 'label':'&Predefined Email...\tCtrl+R', }, {'type':'MenuItem', 'name':'menuRouteToEmail', 'label':'&New Email...\tCtrl+T', }, # {'type':'MenuItem', # 'name':'editSep1', # 'label':'-', # }, # {'type':'MenuItem', # 'name':'menuRouteToRSS', # 'label':'RSS File...\tAlt-R', # }, ] }, {'type':'Menu', 'name':'menuManila', 'label':'&Manila', 'items': [ {'type':'MenuItem', 'name':'menuManilaLogin', 'label':'&Login', }, {'type':'MenuItem', 'name':'menuManilaFlipHomepage', 'label':'&Flip Homepage...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaAddToHP', 'label':'&Add To Homepage', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaGetHP', 'label':'&Get Current Homepage', }, {'type':'MenuItem', 'name':'menuManilaSetAsHP', 'label':'&Set As Homepage', }, {'type':'MenuItem', 'name':'menuManilaSetHPFromOPML', 'label':'Set &Homepage From OPML', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaGetStoryList', 'label':'Get Story Lis&t', }, {'type':'MenuItem', 'name':'menuManilaDownloadStory', 'label':'&Download Story...', }, {'type':'MenuItem', 'name':'menuManilaUploadStory', 'label':'&Upload Story...', }, {'type':'MenuItem', 'name':'menuManilaPostNewStory', 'label':'Post As &New Story', }, {'type':'MenuItem', 'name':'menuManilaSetStoryAsHP', 'label':'S&et Story As Homepage', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaUploadPicture', 'label':'Upload &Image...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaJumpTo', 'label':'&Jump To URL...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaChooseActiveAccount', 'label':'Choose Active Account...', }, {'type':'MenuItem', 'name':'menuManilaNewAccount', 'label':'New Account...', }, {'type':'MenuItem', 'name':'menuManilaEditAccount', 'label':'Edit Account...', }, {'type':'MenuItem', 'name':'menuManilaRemoveAccount', 'label':'Remove Account...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuManilaPreferences', 'label':'&Preferences...', }, ] }, {'type':'Menu', 'name':'menuBlogger', 'label':'&Blogger', 'items': [ {'type':'MenuItem', 'name':'menuBloggerLogin', 'label':'&Login', }, {'type':'MenuItem', 'name':'menuBloggerChooseBlog', 'label':'&Choose Blog...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuBloggerFetchPosts', 'label':'&Fetch Previous Posts', }, {'type':'MenuItem', 'name':'menuBloggerInsertPrevPost', 'label':'&Insert Previous Post...', }, {'type':'MenuItem', 'name':'menuBloggerGetPost', 'label':'Ge&t Post By ID...', }, {'type':'MenuItem', 'name':'menuBloggerUpdatePost', 'label':'&Update Post', }, {'type':'MenuItem', 'name':'menuBloggerDeletePost', 'label':'&Delete Post...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuBloggerGetTemplate', 'label':'&Get Template...', }, {'type':'MenuItem', 'name':'menuBloggerSetTemplate', 'label':'&Set Template...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuBloggerJumpTo', 'label':'&Jump To Blog...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuBloggerChooseActiveAccount', 'label':'Choose Active Account...', }, {'type':'MenuItem', 'name':'menuBloggerNewAccount', 'label':'New Account...', }, {'type':'MenuItem', 'name':'menuBloggerEditAccount', 'label':'Edit Account...', }, {'type':'MenuItem', 'name':'menuBloggerRemoveAccount', 'label':'Remove Account...', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuBloggerPreferences', 'label':'&Preferences...', }, ] }, {'type':'Menu', 'name':'menuEmail', 'label':'Emai&l', 'items': [ {'type':'MenuItem', 'name':'menuEmailNewEmailRcpt', 'label':'New Email Recipient', }, {'type':'MenuItem', 'name':'menuEmailRemoveEmailRcpt', 'label':'Remove Recipient', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuEmailPreferences', 'label':'&Preferences...', }, # {'type':'MenuItem', # 'name':'editSep1', # 'label':'-', # }, # {'type':'MenuItem', # 'name':'menuSettingsRSS', # 'label':'RSS Files...', # }, ] }, {'type':'Menu', 'name':'menuUtilities', 'label':'&Utilities', 'items': [ {'type':'MenuItem', 'name':'menuUtilitiesExternalEditor', 'label':'&External Editor', }, {'type':'MenuItem', 'name':'menuUtilitiesTextScroller', 'label':'&Text Auto-Scroller', }, {'type':'MenuItem', 'name':'menuUtilitiesApplyFilter', 'label':'&Apply Filter', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuUtilitiesNewFilter', 'label':'&New Filter', }, {'type':'MenuItem', 'name':'menuUtilitiesRemoveFilter', 'label':'&Remove Filter', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuUtilitiesNewShortcut', 'label':'New &Shortcut', }, {'type':'MenuItem', 'name':'menuUtilitiesRemoveShortcut', 'label':'Remove S&hortcut', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, # {'type':'MenuItem', # 'name':'menuUtilitiesLoadShortcuts', # 'label':'&Load Shortcuts...', # }, # {'type':'MenuItem', # 'name':'menuUtilitiesSaveShortcuts', # 'label':'Sa&ve Shortcuts...', # }, # {'type':'MenuItem', # 'name':'editSep1', # 'label':'-', # }, {'type':'MenuItem', 'name':'menuUtilitiesPreferences', 'label':'&Preferences...', }, ] }, {'type':'Menu', 'name':'menuHelp', 'label':'&Help', 'items': [ {'type':'MenuItem', 'name':'menuHelpHelp', 'label':'&Help (loads browser)', }, {'type':'MenuItem', 'name':'menuHelpReadme', 'label':'&README (loads browser)', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuHelpAbout', 'label':'&About TextRouter...', }, ] }, ] }, 'components': [ {'type':'StaticText', 'name':'lblSubject', 'position':(0, 0), 'size':(80, -1), 'text':'Title/Subject:', }, {'type':'TextField', 'name':'area2', 'position':(100, 0), 'size':(530, 22), }, {'type':'TextArea', 'name':'area1', 'position':(0, 40), 'size':(640, 300), }, {'type':'Button', 'name':'buttonClearIt', 'position':(1, 303), 'size':(120, -1), 'label':'Clear It', }, {'type':'Button', 'name':'buttonClipIt', 'position':(1, 327), 'size':(120, -1), 'label':'Get Clipboard Text', }, {'type':'RadioGroup', 'name':'nextInputActionMode', 'position':(131, 303), #'size':(240, -1), 'label':'Input Action:', 'layout':'horizontal', 'items':['inserts', 'appends', 'replaces'], 'stringSelection':'inserts', 'toolTip':'Controls how the next text input action (from file, clipboard, remote server) works.' }, {'type':'RadioGroup', 'name':'nextOutputActionMode', 'position':(380, 303), #'size':(160, -1), 'label':'Output Action Works On:', 'layout':'horizontal', 'items':['all', 'selection'], 'stringSelection':'all', 'toolTip':'Controls how the next text output action (to file, blogger, manila, email) works.' }, ] # end components } # end background ] # end backgrounds } }
31.600311
100
0.323589
1,032
20,319
6.371124
0.28876
0.208061
0.277414
0.099011
0.299164
0.242586
0.214601
0.202433
0.106616
0.037719
0
0.010344
0.509966
20,319
642
101
31.649533
0.649995
0.051676
0
0.367273
0
0
0.340358
0.043449
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
806ae9f397828dd42fd0c9272ff262168ebac7bc
166
py
Python
utils/logger.py
r4rdsn/Durak
efe9c81eca2a297f8fcedc090857b0be7f526d42
[ "MIT" ]
1
2018-10-05T17:34:03.000Z
2018-10-05T17:34:03.000Z
utils/logger.py
r4rdsn/Durak
efe9c81eca2a297f8fcedc090857b0be7f526d42
[ "MIT" ]
null
null
null
utils/logger.py
r4rdsn/Durak
efe9c81eca2a297f8fcedc090857b0be7f526d42
[ "MIT" ]
null
null
null
WARNING_HEADER = '[\033[1m\033[93mWARNING\033[0m]' def warning_message(message_text): print('{header} {text}'.format(header=WARNING_HEADER, text=message_text))
27.666667
77
0.746988
23
166
5.173913
0.478261
0.218487
0
0
0
0
0
0
0
0
0
0.085526
0.084337
166
5
78
33.2
0.697368
0
0
0
0
0
0.277108
0.186747
0
0
0
0
0
1
0.333333
false
0
0
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
1
0
0
0
0
0
0
0
4
80779f27d2a2583c05faedd241b98e658a376dee
89
py
Python
libs/exception/websocket.py
cybersturmer/pmdragon-core-api
20715cc7f1aee75ea5e567c458899da325e861be
[ "MIT" ]
2
2021-01-03T21:09:29.000Z
2022-01-30T20:56:59.000Z
libs/exception/websocket.py
cybersturmer/pmdragon-core-api
20715cc7f1aee75ea5e567c458899da325e861be
[ "MIT" ]
null
null
null
libs/exception/websocket.py
cybersturmer/pmdragon-core-api
20715cc7f1aee75ea5e567c458899da325e861be
[ "MIT" ]
1
2021-01-09T01:14:35.000Z
2021-01-09T01:14:35.000Z
class WebsocketError(Exception): pass class NoTokenError(WebsocketError): pass
12.714286
35
0.752809
8
89
8.375
0.625
0
0
0
0
0
0
0
0
0
0
0
0.179775
89
6
36
14.833333
0.917808
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
807f3caa2e6e09e32e05d299dc3998d01cf9adbc
119
py
Python
pt/049/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
pt/049/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
pt/049/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
# Refaça o DESAFIO 009, mostrando a tabuada de um número que o usuário escolher, só que agora utilizando um laço for.
39.666667
117
0.773109
21
119
4.380952
0.857143
0
0
0
0
0
0
0
0
0
0
0.03125
0.193277
119
2
118
59.5
0.927083
0.966387
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
808bb1a5e2dc6c958a3b3bef18ab61cfd16c0cf8
312
py
Python
zooApp/models.py
marjohnson/w11D1-Django
630786c9f84f2c32a3d889cd965d3f5455d3f363
[ "MIT" ]
null
null
null
zooApp/models.py
marjohnson/w11D1-Django
630786c9f84f2c32a3d889cd965d3f5455d3f363
[ "MIT" ]
null
null
null
zooApp/models.py
marjohnson/w11D1-Django
630786c9f84f2c32a3d889cd965d3f5455d3f363
[ "MIT" ]
8
2021-04-12T23:45:38.000Z
2021-06-12T20:33:48.000Z
from django.db import models class Animals(models.Model): animalName = models.CharField(max_length=45) animalType = models.CharField(max_length=45) animalBirth = models.DateTimeField() animalAdded = models.DateTimeField(auto_now_add=True) animalUpdated = models.DateTimeField(auto_now=True)
34.666667
57
0.772436
37
312
6.378378
0.594595
0.241525
0.152542
0.20339
0.220339
0
0
0
0
0
0
0.014815
0.134615
312
8
58
39
0.859259
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.142857
0
1
0
0
0
0
null
1
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
0
0
1
0
0
4
80ce78268a83d1dd9a1a818acc377aa717132f40
253
py
Python
Parser/main.py
eura17/crypto-bot
f68bd25b16b959df5fb4dc9e1529575f9d4dd90b
[ "MIT" ]
null
null
null
Parser/main.py
eura17/crypto-bot
f68bd25b16b959df5fb4dc9e1529575f9d4dd90b
[ "MIT" ]
null
null
null
Parser/main.py
eura17/crypto-bot
f68bd25b16b959df5fb4dc9e1529575f9d4dd90b
[ "MIT" ]
null
null
null
import time import config import crypto_parser if __name__ == '__main__': while True: coins_prices = crypto_parser.parse_coins_prices() crypto_parser.update_coins_prices_in_database(coins_prices) time.sleep(config.TIMEOUT)
23
67
0.747036
32
253
5.3125
0.5625
0.258824
0.2
0.270588
0
0
0
0
0
0
0
0
0.185771
253
10
68
25.3
0.825243
0
0
0
0
0
0.031621
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
80da02fb06a52c8762ed7c26a16b69b644400f15
205
py
Python
198-House-Robber/solution.py
alfmunny/leetcode
e35d2164c7e6e66410309fe1667ceab5a7689bef
[ "MIT" ]
null
null
null
198-House-Robber/solution.py
alfmunny/leetcode
e35d2164c7e6e66410309fe1667ceab5a7689bef
[ "MIT" ]
null
null
null
198-House-Robber/solution.py
alfmunny/leetcode
e35d2164c7e6e66410309fe1667ceab5a7689bef
[ "MIT" ]
null
null
null
class Solution: def rob(self, nums): robbed, notRobbed = 0, 0 for i in nums: robbed, notRobbed = notRobbed + i, max(robbed, notRobbed) return max(robbed, notRobbed)
29.285714
69
0.590244
25
205
4.84
0.56
0.495868
0.31405
0
0
0
0
0
0
0
0
0.014286
0.317073
205
6
70
34.166667
0.85
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
037f95ebc0cad9302e05fe371b5545914caad17e
1,084
py
Python
build/lib/controlpyweb/io/analog_io.py
washad/ControlPyWeb
9f83cada68cf0df05bc8b63238bee311eab6e37d
[ "MIT" ]
null
null
null
build/lib/controlpyweb/io/analog_io.py
washad/ControlPyWeb
9f83cada68cf0df05bc8b63238bee311eab6e37d
[ "MIT" ]
3
2020-03-31T04:56:27.000Z
2021-06-01T23:56:16.000Z
build/lib/controlpyweb/io/analog_io.py
washad/ControlPyWeb
9f83cada68cf0df05bc8b63238bee311eab6e37d
[ "MIT" ]
1
2021-02-23T02:05:15.000Z
2021-02-23T02:05:15.000Z
from controlpyweb.io_definitions.single_io import SingleIO from controlpyweb.io_definitions.io_out import IOOut from controlpyweb.abstract_reader_writer import AbstractReaderWriter class AnalogIn(SingleIO): def __init__(self, name: str, addr: str, default: float = 0.0, reader: AbstractReaderWriter = None, *args, **kwargs): super().__init__(name, addr, default, reader, *args, **kwargs) @staticmethod def _convert_type(value): return float(value) def __mod__(self, other): if hasattr(other, 'value'): other = other.value return self.value % other class AnalogOut(IOOut, AnalogIn): def __init__(self, name: str, addr: str, default: float = 0.0, reader: AbstractReaderWriter = None, *args, **kwargs): super().__init__(name, addr, default, reader, *args, **kwargs) @staticmethod def _convert_type(value): return float(value) def __mod__(self, other): if hasattr(other, 'value'): other = other.value return self.value % other
32.848485
71
0.654982
124
1,084
5.451613
0.306452
0.059172
0.053254
0.085799
0.695266
0.695266
0.695266
0.695266
0.695266
0.695266
0
0.004843
0.238007
1,084
33
72
32.848485
0.813559
0
0
0.8
0
0
0.009217
0
0
0
0
0
0
1
0.24
false
0
0.12
0.08
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
0390af7ba7f4fe0271f04c2378a620daae09f23f
93
py
Python
utils/cmpcodesize/cmpcodesize.py
truecat/swift
eefc5df1bb7c3a5e0c7e63603c979cd5cf670e7a
[ "Apache-2.0" ]
null
null
null
utils/cmpcodesize/cmpcodesize.py
truecat/swift
eefc5df1bb7c3a5e0c7e63603c979cd5cf670e7a
[ "Apache-2.0" ]
null
null
null
utils/cmpcodesize/cmpcodesize.py
truecat/swift
eefc5df1bb7c3a5e0c7e63603c979cd5cf670e7a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import cmpcodesize if __name__ == '__main__': cmpcodesize.main()
13.285714
26
0.698925
11
93
5.181818
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
6
27
15.5
0.730769
0.215054
0
0
0
0
0.111111
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
03c93d1cb7a61bd3c257090fbc45dc8fc40177d1
87
py
Python
CodeWars/7 Kyu/Ciphers #1 - The 01 Cipher.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Ciphers #1 - The 01 Cipher.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Ciphers #1 - The 01 Cipher.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def encode(s): return ''.join( str(1 - ord(c)%2) if c.isalpha() else c for c in s )
43.5
72
0.586207
19
87
2.684211
0.789474
0
0
0
0
0
0
0
0
0
0
0.029412
0.218391
87
2
72
43.5
0.720588
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
03cdc5a44dc26cb58b97e213751a8b9d1e856631
279
py
Python
src/API/serializers.py
steve-njuguna-k/Django-CRUD-RESTful-API
b2a5dea6ebb3cd546f8b5ed741e025ae6ff6a9b9
[ "MIT" ]
null
null
null
src/API/serializers.py
steve-njuguna-k/Django-CRUD-RESTful-API
b2a5dea6ebb3cd546f8b5ed741e025ae6ff6a9b9
[ "MIT" ]
null
null
null
src/API/serializers.py
steve-njuguna-k/Django-CRUD-RESTful-API
b2a5dea6ebb3cd546f8b5ed741e025ae6ff6a9b9
[ "MIT" ]
null
null
null
from django.db.models import fields from django.db.models.base import Model from .models import Transactions from rest_framework import serializers class TransactionsSerializer(serializers.ModelSerializer): class Meta: model = Transactions fields = '__all__'
31
58
0.781362
32
279
6.65625
0.53125
0.093897
0.112676
0.169014
0
0
0
0
0
0
0
0
0.164875
279
9
59
31
0.914163
0
0
0
0
0
0.025
0
0
0
0
0
0
1
0
false
0
0.5
0
0.75
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
ff0534bb02d9f1ec72adc3a714178a06a23e0668
142
py
Python
src/main.py
varunsl/Euchre
e29d5e5ce6cacc2de787d3c0e5fa429364c84410
[ "MIT" ]
null
null
null
src/main.py
varunsl/Euchre
e29d5e5ce6cacc2de787d3c0e5fa429364c84410
[ "MIT" ]
null
null
null
src/main.py
varunsl/Euchre
e29d5e5ce6cacc2de787d3c0e5fa429364c84410
[ "MIT" ]
null
null
null
from app import app, db from models import * from views import * if __name__=='__main__': db.create_all() socketio.run(app)
15.777778
25
0.65493
20
142
4.2
0.65
0
0
0
0
0
0
0
0
0
0
0
0.246479
142
8
26
17.75
0.785047
0
0
0
0
0
0.059701
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
206439503ae49503d8861b574cbf88e9c5aa6194
3,927
py
Python
storm_control/sc_hardware/test/test_corr_2d_gauss_c.py
poomchan/storm-control
fcf9444cfa72fbb18a392de0b222af94ea728aeb
[ "MIT" ]
47
2015-02-11T16:05:54.000Z
2022-03-26T14:13:12.000Z
storm_control/sc_hardware/test/test_corr_2d_gauss_c.py
poomchan/storm-control
fcf9444cfa72fbb18a392de0b222af94ea728aeb
[ "MIT" ]
110
2015-01-30T03:53:41.000Z
2021-11-03T15:58:44.000Z
storm_control/sc_hardware/test/test_corr_2d_gauss_c.py
poomchan/storm-control
fcf9444cfa72fbb18a392de0b222af94ea728aeb
[ "MIT" ]
61
2015-01-09T18:31:27.000Z
2021-12-21T13:07:51.000Z
#!/usr/bin/env python """ Unit tests for corr_2d_gauss_c Hazen 09/19 """ import numpy import storm_control.sc_hardware.utility.corr_2d_gauss_c as corr2DGauss def test_xy_derivatives(): im_size = (9,9) c2dg_py = corr2DGauss.Corr2DGaussPy(size = im_size, sigma = 1.0) x = numpy.zeros(2) image = c2dg_py.translate(x) c2dg_py.setImage(image) x = numpy.zeros(2) dx = 1.0e-6 # Check X derivative. for i in range(-3,4): offset = 0.1 * i x[0] = offset + dx f1 = c2dg_py.func(x) x[0] = offset f2 = c2dg_py.func(x) assert(abs((f1-f2)/dx - c2dg_py.dx(x)) < 1.0e-4) # Check Y derivative. for i in range(-3,4): offset = 0.1 * i x[1] = offset + dx f1 = c2dg_py.func(x) x[1] = offset f2 = c2dg_py.func(x) assert(abs((f1-f2)/dx - c2dg_py.dy(x)) < 1.0e-4) def test_xy_2nd_derivatives(): # Test X/Y second derivatives. im_size = (9,9) c2dg_py = corr2DGauss.Corr2DGaussPy(size = im_size, sigma = 1.0) x = numpy.zeros(2) image = c2dg_py.translate(x) c2dg_py.setImage(image) dx = 1.0e-6 # Check X second derivative. x = numpy.zeros(2) for i in range(-3,4): offset = 0.1 * i + 0.05 x[0] = offset + dx f1 = c2dg_py.func(x) x[0] = offset f2 = c2dg_py.func(x) x[0] = offset - dx f3 = c2dg_py.func(x) x[0] = offset nddx = (f1 - 2.0 * f2 + f3)/(dx*dx) assert(abs(nddx - c2dg_py.ddx(x)) < 0.02) # Check Y second derivative. x = numpy.zeros(2) for i in range(-3,4): offset = 0.1 * i + 0.05 x[1] = offset + dx f1 = c2dg_py.func(x) x[1] = offset f2 = c2dg_py.func(x) x[1] = offset - dx f3 = c2dg_py.func(x) x[1] = offset nddy = (f1 - 2.0 * f2 + f3)/(dx*dx) assert(abs(nddy - c2dg_py.ddy(x)) < 0.02) def test_offset_python(): # Test finding the correct offset (Python version). im_size = (9,9) c2dg_py = corr2DGauss.Corr2DGaussPyNCG(size = im_size, sigma = 1.0) for i in range(-2,3): disp = numpy.array([0.1*i, -0.2*i]) image = c2dg_py.translate(disp) c2dg_py.setImage(image) [dd, success, fn, status] = c2dg_py.maximize() assert(success) assert(numpy.allclose(dd, disp, atol = 1.0e-3, rtol = 1.0e-3)) def test_c_vs_python(): # Test C version against Python version. im_size = (9,10) c2dg_py = corr2DGauss.Corr2DGaussPy(size = im_size, sigma = 1.0) c2dg_c = corr2DGauss.Corr2DGaussC(size = im_size, sigma = 1.0) x = numpy.zeros(2) image = c2dg_py.translate(x) c2dg_py.setImage(image) c2dg_c.setImage(image) assert(abs(c2dg_py.func(x) - c2dg_c.func(x)) < 1.0e-6) x = numpy.zeros(2) for i in range(-3,4): x[0] = 0.1*i assert(abs(c2dg_py.dx(x) - c2dg_c.dx(x)) < 1.0e-6) x = numpy.zeros(2) for i in range(-3,4): x[1] = 0.1*i assert(abs(c2dg_py.dy(x) - c2dg_c.dy(x)) < 1.0e-6) x = numpy.zeros(2) for i in range(-3,4): x[1] = 0.1*i assert(abs(c2dg_py.ddx(x) - c2dg_c.ddx(x)) < 1.0e-6) x = numpy.zeros(2) for i in range(-3,4): x[1] = 0.1*i assert(abs(c2dg_py.ddy(x) - c2dg_c.ddy(x)) < 1.0e-6) def test_offset_c(): # Test finding the correct offset (C version). im_size = (9,9) c2dg_c = corr2DGauss.Corr2DGaussCNCG(size = im_size, sigma = 1.0) c2dg_py = corr2DGauss.Corr2DGaussPyNCG(size = im_size, sigma = 1.0) for i in range(-2,3): disp = numpy.array([0.1*i, -0.2*i]) image = c2dg_py.translate(disp) c2dg_c.setImage(image) [dd, success, fn, status] = c2dg_c.maximize() assert(success) assert(numpy.allclose(dd, disp, atol = 1.0e-3, rtol = 1.0e-3))
26.533784
71
0.550038
653
3,927
3.191424
0.136294
0.097889
0.052783
0.058061
0.775432
0.737044
0.713052
0.649232
0.628119
0.607965
0
0.085662
0.298447
3,927
147
72
26.714286
0.67078
0.081742
0
0.742574
0
0
0
0
0
0
0
0
0.128713
1
0.049505
false
0
0.019802
0
0.069307
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2065f4e3bf5373d602c68d057019ef10c7c04774
142
py
Python
dref/apps.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
null
null
null
dref/apps.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
null
null
null
dref/apps.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
null
null
null
from django.utils.translation import ugettext_lazy as _ from django.apps import AppConfig class DrefConfig(AppConfig): name = _('dref')
20.285714
55
0.774648
18
142
5.944444
0.777778
0.186916
0
0
0
0
0
0
0
0
0
0
0.147887
142
6
56
23.666667
0.884298
0
0
0
0
0
0.028169
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
20736fb7ca4365a1a52aa65ea68a94e221531632
741
py
Python
tests/test_easings.py
waveform80/lightwave
e55e503eac22951d2935d35f9c78d61bff3904bb
[ "BSD-3-Clause" ]
24
2018-05-22T23:04:30.000Z
2021-12-01T19:35:23.000Z
tests/test_easings.py
waveform80/colorzero
e55e503eac22951d2935d35f9c78d61bff3904bb
[ "BSD-3-Clause" ]
4
2018-03-06T12:54:14.000Z
2021-11-14T20:41:54.000Z
tests/test_easings.py
waveform80/colorzero
e55e503eac22951d2935d35f9c78d61bff3904bb
[ "BSD-3-Clause" ]
3
2018-12-12T03:08:41.000Z
2020-07-22T23:22:51.000Z
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # The colorzero color library # # Copyright (c) 2018 Dave Jones <dave@waveform.org.uk> # # SPDX-License-Identifier: BSD-3-Clause "Tests for the colorzero.easings module" import pytest from colorzero.easings import * def test_linear(): assert list(linear(2)) == [0, 1] assert list(linear(5)) == [0, 1/4, 1/2, 3/4, 1] def test_ease_in(): assert list(ease_in(2)) == [0, 1] assert list(ease_in(5)) == [0, 1/16, 4/16, 9/16, 1] def test_ease_out(): assert list(ease_out(2)) == [0, 1] assert list(ease_out(5)) == [0, 7/16, 12/16, 15/16, 1] def test_ease_in_out(): assert list(ease_in_out(2)) == [0, 1] assert list(ease_in_out(5)) == [0, 2/16, 8/16, 14/16, 1]
22.454545
60
0.62753
137
741
3.277372
0.379562
0.178174
0.187082
0.080178
0.305122
0.135857
0.135857
0
0
0
0
0.112769
0.186235
741
32
61
23.15625
0.631841
0.271255
0
0
0
0
0.066434
0
0
0
0
0
0.533333
1
0.266667
true
0
0.133333
0
0.4
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
4
209f3a3d3912cc17484e94a25e04b20e186ba758
113
py
Python
pybeans/__init__.py
chariothy/pybeans
69ac0362415d155899fccb61b615d9cea79c5762
[ "Apache-2.0" ]
null
null
null
pybeans/__init__.py
chariothy/pybeans
69ac0362415d155899fccb61b615d9cea79c5762
[ "Apache-2.0" ]
null
null
null
pybeans/__init__.py
chariothy/pybeans
69ac0362415d155899fccb61b615d9cea79c5762
[ "Apache-2.0" ]
null
null
null
from .app_tool import AppTool from .exception import AppToolError from .get_ch import GetCh from .utils import *
22.6
35
0.814159
17
113
5.294118
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.141593
113
5
36
22.6
0.927835
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