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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ca13483e057b5c3832eaa8c8bbd1c731f059f862
| 6,375
|
py
|
Python
|
compmech/stiffpanelbay/tests/test_stiffpanelbay.py
|
mrosemeier/compmech
|
f18f6d0471c72b26a3b014d2df41df3463505eae
|
[
"BSD-3-Clause"
] | 4
|
2019-02-05T06:12:12.000Z
|
2022-03-25T14:41:18.000Z
|
compmech/stiffpanelbay/tests/test_stiffpanelbay.py
|
mrosemeier/compmech
|
f18f6d0471c72b26a3b014d2df41df3463505eae
|
[
"BSD-3-Clause"
] | null | null | null |
compmech/stiffpanelbay/tests/test_stiffpanelbay.py
|
mrosemeier/compmech
|
f18f6d0471c72b26a3b014d2df41df3463505eae
|
[
"BSD-3-Clause"
] | 2
|
2019-06-05T07:19:35.000Z
|
2020-12-29T00:22:18.000Z
|
import numpy as np
from compmech.stiffpanelbay import StiffPanelBay
from compmech.analysis import freq, lb
def test_freq_models():
print('Testing frequency analysis for StiffPanelBay with 2 plates')
# From Table 4 of
# Lee and Lee. "Vibration analysis of anisotropic plates with eccentric
# stiffeners". Computers & Structures, Vol. 57, No. 1, pp. 99-105,
# 1995.
for model in ['plate_clt_donnell_bardell',
'cpanel_clt_donnell_bardell',
'kpanel_clt_donnell_bardell']:
spb = StiffPanelBay()
spb.a = 0.5
spb.b = 0.250
spb.plyt = 0.00013
spb.laminaprop = (128.e9, 11.e9, 0.25, 4.48e9, 1.53e9, 1.53e9)
spb.stack = [0, -45, +45, 90, 90, +45, -45, 0]
spb.model = model
spb.r = 1.e6
spb.alphadeg = 0.
spb.mu = 1.5e3
spb.m = 9
spb.n = 10
# clamping
spb.w1rx = 0.
spb.w2rx = 0.
spb.w1ry = 0.
spb.w2ry = 0.
spb.add_panel(0, spb.b/2., plyt=spb.plyt)
spb.add_panel(spb.b/2., spb.b, plyt=spb.plyt)
k0 = spb.calc_k0(silent=True)
M = spb.calc_kM(silent=True)
eigvals, eigvecs = freq(k0, M, silent=True)
ref = [85.12907802-0.j, 134.16422850-0.j, 206.77295186-0.j,
216.45992453-0.j, 252.24546171-0.j]
assert np.allclose(eigvals[:5]/2/np.pi, ref, atol=0.1, rtol=0)
def test_lb_Stiffener1D():
print('Testing linear buckling for StiffPanelBay with a 1D Stiffener')
spb = StiffPanelBay()
spb.a = 1.
spb.b = 0.5
spb.stack = [0, 90, 90, 0]
spb.plyt = 1e-3*0.125
spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
spb.model = 'plate_clt_donnell_bardell'
spb.mu = 1.3e3
spb.m = 15
spb.n = 16
spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt, Nxx=-1.)
spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt, Nxx_cte=1000.)
spb.add_bladestiff1d(ys=spb.b/2., Fx=0., bf=0.05, fstack=[0, 90, 90, 0],
fplyt=spb.plyt, flaminaprop=spb.laminaprop)
k0 = spb.calc_k0(silent=True)
kG = spb.calc_kG0(silent=True)
eigvals, eigvecs = lb(k0, kG, silent=True)
assert np.isclose(eigvals[0].real, 297.54633, atol=0.1, rtol=0)
def test_lb_Stiffener2D():
print('Testing linear buckling for StiffPanelBay with a 2D Stiffener')
spb = StiffPanelBay()
spb.a = 1.
spb.b = 0.5
spb.stack = [0, 90, 90, 0]
spb.plyt = 1e-3*0.125
spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
spb.model = 'plate_clt_donnell_bardell'
spb.mu = 1.3e3
spb.m = 15
spb.n = 16
spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt, Nxx=-1.)
spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt, Nxx_cte=1000.)
spb.add_bladestiff2d(ys=spb.b/2., m1=14, n1=11, bf=0.05,
fstack=[0, 90, 90, 0],
fplyt=spb.plyt, flaminaprop=spb.laminaprop)
k0 = spb.calc_k0(silent=True)
kG = spb.calc_kG0(silent=True)
eigvals, eigvecs = lb(k0, kG, silent=True)
assert np.isclose(eigvals[0].real, 301.0825234, atol=0.1, rtol=0)
def test_freq_Stiffener1D():
print('Testing frequency analysis for StiffPanelBay with a 1D Stiffener')
spb = StiffPanelBay()
spb.a = 2.
spb.b = 0.5
spb.stack = [0, 90, 90, 0]
spb.plyt = 1e-3*0.125
spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
spb.model = 'plate_clt_donnell_bardell'
spb.mu = 1.3e3
spb.m = 15
spb.n = 16
spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt)
spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt)
spb.add_bladestiff1d(ys=spb.b/2., Fx=0., bf=0.08, fstack=[0, 90, 90, 0]*5,
fplyt=spb.plyt, flaminaprop=spb.laminaprop)
k0 = spb.calc_k0(silent=True)
M = spb.calc_kM(silent=True)
eigvals, eigvecs = freq(k0, M, silent=True, num_eigvalues=10)
assert np.isclose(eigvals[0].real, 79.5906673583, atol=0.1, rtol=0)
def test_freq_Stiffener2D():
print('Testing frequency analysis for StiffPanelBay with a 2D Stiffener')
spb = StiffPanelBay()
spb.a = 1.
spb.b = 0.5
spb.stack = [0, 90, 90, 0]
spb.plyt = 1e-3*0.125
spb.laminaprop = (142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 5.1e9)
spb.model = 'plate_clt_donnell_bardell'
spb.mu = 1.3e3
spb.m = 11
spb.n = 12
spb.add_panel(y1=0, y2=spb.b/2., plyt=spb.plyt)
spb.add_panel(y1=spb.b/2., y2=spb.b, plyt=spb.plyt)
spb.add_bladestiff2d(ys=spb.b/2., m1=14, n1=11, bf=0.08,
fstack=[0, 90, 90, 0]*5, fplyt=spb.plyt,
flaminaprop=spb.laminaprop)
k0 = spb.calc_k0(silent=True)
M = spb.calc_kM(silent=True)
eigvals, eigvecs = freq(k0, M, silent=True)
assert np.isclose(eigvals[0].real, 137.97927190657148, atol=0.01, rtol=0)
def test_Lee_and_Lee_table4():
print('Testing Lee and Lee Table 4')
# Lee and Lee. "Vibration analysis of anisotropic plates with eccentric
# stiffeners". Computers & Structures, Vol. 57, No. 1, pp. 99-105,
# 1995.
models = (
('model4', 0.00208, 0.0060, 138.99917796302756),
('model5', 0.00260, 0.0075, 175.00597239286196),
('model7', 0.00364, 0.0105, 205.433509024))
for model, hf, bf, value in models:
spb = StiffPanelBay()
spb.model = 'plate_clt_donnell_bardell'
spb.mu = 1.500e3 # plate material density in kg / m^3
spb.laminaprop = (128.e9, 11.e9, 0.25, 4.48e9, 1.53e9, 1.53e9)
spb.stack = [0, -45, +45, 90, 90, +45, -45, 0]
plyt = 0.00013
spb.plyt = plyt
spb.a = 0.5
spb.b = 0.250
spb.m = 14
spb.n = 15
hf = hf
bf = bf
n = int(hf/plyt)
fstack = [0]*(n//4) + [90]*(n//4) + [90]*(n//4) + [0]*(n//4)
# clamping
spb.w1rx = 0.
spb.w2rx = 0.
spb.w1ry = 0.
spb.w2ry = 0.
spb.add_panel(y1=0, y2=spb.b/2.)
spb.add_panel(y1=spb.b/2., y2=spb.b)
spb.add_bladestiff1d(mu=spb.mu, ys=spb.b/2., bb=0., bf=bf,
fstack=fstack, fplyt=plyt, flaminaprop=spb.laminaprop)
k0 = spb.calc_k0(silent=True)
M = spb.calc_kM(silent=True)
eigvals, eigvecs = freq(k0, M, silent=True)
herz = eigvals[0].real/2/np.pi
assert np.isclose(herz, value, atol=0.001, rtol=0.001)
| 32.860825
| 78
| 0.583059
| 1,050
| 6,375
| 3.473333
| 0.174286
| 0.031807
| 0.023307
| 0.035646
| 0.749657
| 0.742802
| 0.735399
| 0.721963
| 0.661366
| 0.632026
| 0
| 0.14829
| 0.261647
| 6,375
| 193
| 79
| 33.031088
| 0.626514
| 0.056784
| 0
| 0.563758
| 0
| 0
| 0.092469
| 0.033655
| 0
| 0
| 0
| 0
| 0.040268
| 1
| 0.040268
| false
| 0
| 0.020134
| 0
| 0.060403
| 0.040268
| 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
|
ca31492fc3fb6ac5e525636c924d66466aa54803
| 431
|
py
|
Python
|
gpvolve/__init__.py
|
clararehmann/gpvolve
|
4e45b53b72184425c24d57b2e8779d3d51de39d7
|
[
"MIT"
] | 1
|
2021-12-05T23:00:59.000Z
|
2021-12-05T23:00:59.000Z
|
gpvolve/__init__.py
|
clararehmann/gpvolve
|
4e45b53b72184425c24d57b2e8779d3d51de39d7
|
[
"MIT"
] | null | null | null |
gpvolve/__init__.py
|
clararehmann/gpvolve
|
4e45b53b72184425c24d57b2e8779d3d51de39d7
|
[
"MIT"
] | null | null | null |
from .__version__ import __version__
from . import simulate
from . import markov
from . import utils
from . import check
from . import pyplot
from .markovmodel import GenotypePhenotypeMSM
from .slimsim import GenotypePhenotypeSLiM
# from .visualization import *
#from .utils import *
# from .fitness import *
# from .fixation import *
from .flux import *
# from .paths import *
# from .analysis import *
# from .cluster import *
| 22.684211
| 45
| 0.761021
| 51
| 431
| 6.27451
| 0.372549
| 0.21875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167053
| 431
| 18
| 46
| 23.944444
| 0.891365
| 0.37819
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ca5c5b96fc7fc8ff824f6505017e38821fae8a90
| 1,779
|
py
|
Python
|
Pandas/DataFrame1.py
|
mehmet-karagoz/Python-Pandas
|
7e2ac2962f94e4ffd28b0f6b74935ace6e6b51a0
|
[
"MIT"
] | 1
|
2020-10-06T05:51:41.000Z
|
2020-10-06T05:51:41.000Z
|
Pandas/DataFrame1.py
|
mehmet-karagoz/Python-Pandas
|
7e2ac2962f94e4ffd28b0f6b74935ace6e6b51a0
|
[
"MIT"
] | null | null | null |
Pandas/DataFrame1.py
|
mehmet-karagoz/Python-Pandas
|
7e2ac2962f94e4ffd28b0f6b74935ace6e6b51a0
|
[
"MIT"
] | null | null | null |
import pandas as pd
import numpy as np
#sozluk yapisi ve seriler ile Dataframe olusturma
# data = {
# 'first':pd.Series([1,2,3,4,5],index=['a','b','c','d','e']),
# 'second':pd.Series([5,4,3,2],index=['a','b','c','d'])
# }
# df = pd.DataFrame(data)
# print(df)
# print('-'*50)
# print(df.index)
# print('-'*50)
# print(df.columns)
#sozluk yapisi ve ndarray ile Dataframe olusturma
# data = {
# 'ilk':[1.,2.,3.,4.],
# 'ikinci':[5.,3.,2.,6.]
# }
# df = pd.DataFrame(data)
# print(df)
#structure ile Dataframe olusturma
# data = [(1, 2., 'Hello'), (2, 3., "World")]
# df = pd.DataFrame(data,columns=['A','B','C'])
# print(df)
#sozluk listesi ile Dataframe olusturma
# data = [{'a':1,'b':2},{'a':4,'b':6,'c':3}]
# df = pd.DataFrame(data)
# print(df)
#sozluk tuple ile Dataframe olusturma
# data = {
# ('a', 'b'): {('A', 'B'): 1, ('A', 'C'): 2},
# ('a', 'a'): {('A', 'C'): 2, ('A', 'B'): 3},
# ('a', 'c'): {('A', 'B'): 3, ('A', 'C'): 4},
# ('b', 'a'): {('A', 'B'): 5, ('A', 'C'): 6},
# }
# df = pd.DataFrame(data)
# print(df)
#column secme, ekleme, silme islemleri
# data = {
# 'bir':[1.,2.,3.,4],
# 'iki':[5.,6.,4.,8.]
# }
# df = pd.DataFrame(data)
# print(df)
# print('-'*50)
# print(df['bir']) #secme islemi
# print('-'*50)
# df['uc'] = df['bir'] * df['iki'] #ekleme islemi
# print(df)
# print('-'*50)
# df['dort'] = df['iki'] > 6 #ekleme islemi
# print(df)
# print('-'*50)
# del df['iki'] #silme islemi
# print(df)
# print('-'*50)
# df.pop('uc') #silme islemi
# print(df)
# print('-'*50)
# df.insert(1,'lake',[8.,7.,6.,5.]) #ekleme islemi 1--> kacinci indexteki column a eklenecegi , lake column adi , 3.siradaki de column un degerleri
# print(df)
| 22.807692
| 148
| 0.500843
| 268
| 1,779
| 3.324627
| 0.242537
| 0.109989
| 0.087542
| 0.114478
| 0.379349
| 0.289562
| 0.20202
| 0.085297
| 0.085297
| 0.085297
| 0
| 0.046975
| 0.21023
| 1,779
| 78
| 149
| 22.807692
| 0.587189
| 0.856099
| 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
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ca64a055f8ebbc8ce214d1d3083fe497c07ed742
| 71
|
py
|
Python
|
instance/config.py
|
tw8130/News-Article
|
fa1457d53d3b68b401cfc064051c7ea2043f7592
|
[
"Unlicense"
] | null | null | null |
instance/config.py
|
tw8130/News-Article
|
fa1457d53d3b68b401cfc064051c7ea2043f7592
|
[
"Unlicense"
] | null | null | null |
instance/config.py
|
tw8130/News-Article
|
fa1457d53d3b68b401cfc064051c7ea2043f7592
|
[
"Unlicense"
] | null | null | null |
NEWS_API_KEY ='82c66d6d002e4468a5b3199925f4e5de'
SECRET_KEY='Flashpill'
| 35.5
| 48
| 0.887324
| 7
| 71
| 8.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.318841
| 0.028169
| 71
| 2
| 49
| 35.5
| 0.550725
| 0
| 0
| 0
| 0
| 0
| 0.569444
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ca731fd66ec6d9fd8b8e5404558c90f37d97acd9
| 3,385
|
py
|
Python
|
metalearner/ppo2ttifrutti_agent.py
|
aborghi/retro_contest_agent
|
fc41634962d1210ce306048d7c46c377d404c34a
|
[
"MIT"
] | 33
|
2018-06-22T17:09:34.000Z
|
2021-06-24T03:40:31.000Z
|
metalearner/ppo2ttifrutti_agent.py
|
aborghi/retro_contest_agent
|
fc41634962d1210ce306048d7c46c377d404c34a
|
[
"MIT"
] | null | null | null |
metalearner/ppo2ttifrutti_agent.py
|
aborghi/retro_contest_agent
|
fc41634962d1210ce306048d7c46c377d404c34a
|
[
"MIT"
] | 5
|
2018-06-27T09:52:50.000Z
|
2019-04-05T02:09:17.000Z
|
#!/usr/bin/env python
"""
Train an agent on Sonic using PPO2ttifrutti, a variant of OpenAI PPO2 baseline.
"""
import tensorflow as tf
import numpy as np
import gym
import gym_remote.exceptions as gre
import os
import math
from baselines.common.vec_env.dummy_vec_env import DummyVecEnv
from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv
import ppo2ttifrutti
import ppo2ttifrutti_policies as policies
import ppo2ttifrutti_sonic_env as env
def main():
"""Run PPO until the environment throws an exception."""
config = tf.ConfigProto()
#os.environ["CUDA_VISIBLE_DEVICES"]="-1"
config.gpu_options.allow_growth = True # pylint: disable=E1101
with tf.Session(config=config):
# Take more timesteps than we need to be sure that
# we stop due to an exception.
ppo2ttifrutti.learn(policy=policies.CnnPolicy,
env=SubprocVecEnv([env.make_train_0, env.make_train_1, env.make_train_2, env.make_train_3, env.make_train_4, env.make_train_5, env.make_train_6, env.make_train_7, env.make_train_8, env.make_train_9, env.make_train_10, env.make_train_11, env.make_train_12, env.make_train_13, env.make_train_14, env.make_train_15, env.make_train_16, env.make_train_17, env.make_train_18, env.make_train_19, env.make_train_20, env.make_train_21, env.make_train_22, env.make_train_23, env.make_train_24, env.make_train_25, env.make_train_26, env.make_train_27, env.make_train_28, env.make_train_29, env.make_train_30, env.make_train_31, env.make_train_32, env.make_train_33, env.make_train_34, env.make_train_35, env.make_train_36, env.make_train_37, env.make_train_38, env.make_train_39, env.make_train_40, env.make_train_41, env.make_train_42, env.make_train_43, env.make_train_44, env.make_train_45, env.make_train_46, env.make_val_0, env.make_val_1, env.make_val_2, env.make_val_3, env.make_val_4, env.make_val_5, env.make_val_6, env.make_val_7, env.make_val_8, env.make_val_9, env.make_val_10, env.make_extra_0, env.make_extra_1, env.make_extra_2, env.make_extra_3, env.make_extra_4, env.make_extra_5, env.make_extra_6, env.make_extra_7, env.make_extra_8, env.make_extra_9, env.make_extra_10, env.make_extra_11, env.make_extra_12, env.make_extra_13, env.make_extra_14, env.make_extra_15, env.make_extra_16, env.make_extra_17, env.make_extra_18, env.make_extra_19, env.make_extra_20, env.make_extra_21, env.make_extra_22, env.make_extra_23, env.make_extra_24, env.make_extra_25, env.make_extra_26, env.make_extra_27, env.make_extra_28, env.make_extra_29, env.make_extra_30, env.make_extra_31, env.make_extra_32, env.make_extra_33, env.make_extra_34, env.make_extra_35, env.make_extra_36, env.make_extra_37, env.make_extra_38, env.make_extra_39]),
nsteps=2048,
nminibatches=16,
lam=0.95,
gamma=0.99,
noptepochs=4,
log_interval=1,
ent_coef=0.01,
lr=lambda _: 2e-4,
cliprange=lambda _: 0.1,
total_timesteps=int(1e9),
save_interval=25)
if __name__ == '__main__':
try:
main()
except gre.GymRemoteError as exc:
print('exception', exc)
| 69.081633
| 1,859
| 0.708124
| 565
| 3,385
| 3.846018
| 0.276106
| 0.315693
| 0.259549
| 0.020249
| 0.02301
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074621
| 0.200295
| 3,385
| 48
| 1,860
| 70.520833
| 0.728112
| 0.085672
| 0
| 0
| 0
| 0
| 0.005611
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.030303
| false
| 0
| 0.333333
| 0
| 0.363636
| 0.030303
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ca957a90316e4a45cdada882715c5f588d03c3da
| 259
|
py
|
Python
|
libs/data.py
|
masloff-open-projects/OpenCV-Webcam-Recorder-and-Streamer
|
c915c3f5c4789280a5628d0e4ec43235aa62d54a
|
[
"MIT"
] | 7
|
2021-09-14T19:54:05.000Z
|
2022-03-28T06:32:52.000Z
|
libs/data.py
|
iRTEX-MIT/OpenCV-Webcam-Recorder-and-Streamer
|
c915c3f5c4789280a5628d0e4ec43235aa62d54a
|
[
"MIT"
] | null | null | null |
libs/data.py
|
iRTEX-MIT/OpenCV-Webcam-Recorder-and-Streamer
|
c915c3f5c4789280a5628d0e4ec43235aa62d54a
|
[
"MIT"
] | 5
|
2021-11-09T11:41:07.000Z
|
2022-03-01T00:38:39.000Z
|
class data:
def __init__(self):
self._ = {}
def set(self, key, data_):
self._[key] = data_
return data_
def get(self, key):
if key in self._:
return self._[key]
else:
return False
| 17.266667
| 30
| 0.482625
| 30
| 259
| 3.8
| 0.433333
| 0.245614
| 0.192982
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.413127
| 259
| 14
| 31
| 18.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0
| 0
| 0.636364
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0487b20370084158b2727b02d7d10c74a8717694
| 200
|
py
|
Python
|
fedml-server/executor/conf/__init__.py
|
MichaelLee-ceo/FedSAUC
|
8c00008772213562ff6a07bf9fa92c3831713118
|
[
"Apache-2.0"
] | 1
|
2022-03-24T09:14:58.000Z
|
2022-03-24T09:14:58.000Z
|
fedml-server/executor/conf/__init__.py
|
MichaelLee-ceo/FedSAUC
|
8c00008772213562ff6a07bf9fa92c3831713118
|
[
"Apache-2.0"
] | null | null | null |
fedml-server/executor/conf/__init__.py
|
MichaelLee-ceo/FedSAUC
|
8c00008772213562ff6a07bf9fa92c3831713118
|
[
"Apache-2.0"
] | 1
|
2022-03-24T09:15:01.000Z
|
2022-03-24T09:15:01.000Z
|
# -*- coding: utf-8 -*-n
import os
from fedml_mobile.server.executor.conf.env import EnvWrapper
ENV = EnvWrapper(os.path.abspath(os.path.dirname(os.path.dirname(__file__))), True, 'TrainingExecutor')
| 40
| 103
| 0.76
| 29
| 200
| 5.068966
| 0.689655
| 0.122449
| 0.176871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005435
| 0.08
| 200
| 4
| 104
| 50
| 0.793478
| 0.11
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
04aae94324251ab7446281affd01bef3e2675193
| 1,926
|
py
|
Python
|
CCICApp/models.py
|
kiddhmh/DjangoSpiders
|
e14b88305acf769f344ef910c238bf55afbec273
|
[
"MIT"
] | 2
|
2018-04-19T02:51:05.000Z
|
2019-08-12T03:23:31.000Z
|
CCICApp/models.py
|
kiddhmh/DjangoSpiders
|
e14b88305acf769f344ef910c238bf55afbec273
|
[
"MIT"
] | 1
|
2018-04-23T06:45:45.000Z
|
2018-04-23T06:45:45.000Z
|
CCICApp/models.py
|
kiddhmh/DjangoSpiders
|
e14b88305acf769f344ef910c238bf55afbec273
|
[
"MIT"
] | 1
|
2018-04-23T02:12:33.000Z
|
2018-04-23T02:12:33.000Z
|
from django.db import models
# 微博Model
class vvebo(models.Model):
id = models.IntegerField(primary_key=True)
keyword = models.TextField(max_length=1000, default="")
user_id = models.TextField(max_length=1000, default="")
user_name = models.TextField(max_length=1000, default="")
time = models.CharField(max_length=1000, default="")
comment = models.TextField(max_length=1000, default="")
shoucang = models.IntegerField(default=0)
zhuanfa = models.IntegerField(default=0)
pinglun = models.IntegerField(default=0)
dianzan = models.IntegerField(default=0)
device = models.TextField(max_length=1000, default="")
url = models.TextField(max_length=1000, default="")
# 知乎Model
class zhihu(models.Model):
keyword = models.TextField(max_length=100, default="")
question_id = models.CharField(max_length=20, default="")
question_name = models.TextField(max_length=100, default="")
answer_id = models.CharField(max_length=20, default="")
comment = models.TextField(max_length=30000, default="")
time = models.CharField(max_length=20, default="")
voteup_count = models.IntegerField(default=0)
user_name = models.CharField(max_length=20, default="")
#微信Model
class wechat(models.Model):
id = models.IntegerField(primary_key=True)
keyword = models.TextField(max_length=1000, default="")
article_title = models.TextField(max_length=1000, default="")
article_url = models.TextField(max_length=1000, default="")
article_imgs = models.TextField(max_length=1000, default="")
comment = models.TextField(max_length=1000, default="")
time = models.TextField(max_length=1000, default="")
gzh_profile_url = models.TextField(max_length=1000, default="")
gzh_headimage = models.TextField(max_length=1000, default="")
user_name = models.TextField(max_length=1000, default="")
gzh_isv = models.IntegerField(default=0)
| 38.52
| 68
| 0.724818
| 238
| 1,926
| 5.697479
| 0.210084
| 0.152655
| 0.238938
| 0.318584
| 0.738938
| 0.730826
| 0.557522
| 0.349558
| 0.334808
| 0.334808
| 0
| 0.053647
| 0.138629
| 1,926
| 49
| 69
| 39.306122
| 0.763713
| 0.011423
| 0
| 0.228571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028571
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
04ae5dd12facb29dcebed0d6a8a168e5d91756ab
| 1,580
|
py
|
Python
|
src/python/backends/py/sprite/__init__.py
|
andyjost/Sprite
|
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
|
[
"MIT"
] | 1
|
2022-03-16T16:37:11.000Z
|
2022-03-16T16:37:11.000Z
|
src/python/backends/py/sprite/__init__.py
|
andyjost/Sprite
|
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
|
[
"MIT"
] | null | null | null |
src/python/backends/py/sprite/__init__.py
|
andyjost/Sprite
|
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
|
[
"MIT"
] | null | null | null |
'''Python wrappers for libsprite.so.'''
from ._sprite import *
import itertools, six
from six.moves import range
def Fingerprint__iter__(self):
for i in range(self.capacity):
v = self.get(i)
if v != UNDETERMINED:
yield i, v
def Fingerprint__repr__(self, limit=32):
def parts():
for i,v in self:
yield "%s%s" % (i, 'L' if v == LEFT else 'R')
body = list(itertools.islice(parts(), limit))
if len(body) == limit:
body += '...'
return '<%s>' % ''.join(body)
def Fingerprint__reduce__(self):
return Fingerprint, (), None, None, self.__iter__()
def Fingerprint__eq__(self, rhs):
return all(a==b for a,b in six.moves.zip_longest(self, rhs))
def Fingerprint__ne__(self, rhs):
return not (self == rhs)
def Fingerprint__le__(self, rhs):
return all(i not in self or self.get(i) == lr for i,lr in rhs)
def Fingerprint__ge__(self, rhs):
return rhs <= self
def Fingerprint__lt__(self, rhs):
return self <= rhs and (self != rhs)
def Fingerprint__gt__(self, rhs):
return rhs < self
def Fingerprint_consistentWith_(self, rhs):
if self.depth < rhs.depth:
return self < rhs
else:
return rhs < self
Fingerprint.__iter__ = Fingerprint__iter__
Fingerprint.__repr__ = Fingerprint__repr__
Fingerprint.__reduce__ = Fingerprint__reduce__
Fingerprint.__eq__ = Fingerprint__eq__
Fingerprint.__ne__ = Fingerprint__ne__
Fingerprint.__le__ = Fingerprint__le__
Fingerprint.__ge__ = Fingerprint__ge__
Fingerprint.__lt__ = Fingerprint__lt__
Fingerprint.__gt__ = Fingerprint__gt__
Fingerprint.consistentWith = Fingerprint_consistentWith_
| 26.333333
| 64
| 0.723418
| 217
| 1,580
| 4.723502
| 0.271889
| 0.081951
| 0.076098
| 0.061463
| 0.066341
| 0.066341
| 0.066341
| 0
| 0
| 0
| 0
| 0.001511
| 0.162025
| 1,580
| 59
| 65
| 26.779661
| 0.772659
| 0.020886
| 0
| 0.044444
| 0
| 0
| 0.008442
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.244444
| false
| 0
| 0.066667
| 0.155556
| 0.533333
| 0.466667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
|
0
| 4
|
04ef06e5dcbd3424cf55c28bd283b02d45bfdad0
| 195
|
py
|
Python
|
chapter-04/exercise005.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-04/exercise005.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-04/exercise005.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
x = 3
y = 12.5
print('The rabbit is ', x, '.', sep='')
print('The rabbit is', x, 'years old.')
print(y, 'is average.')
print(y, ' * ', x, '.', sep='')
print(y, ' * ', x, ' is ', x*y, '.', sep='')
| 27.857143
| 44
| 0.461538
| 33
| 195
| 2.727273
| 0.393939
| 0.1
| 0.311111
| 0.355556
| 0.377778
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025641
| 0.2
| 195
| 7
| 44
| 27.857143
| 0.551282
| 0
| 0
| 0
| 0
| 0
| 0.311224
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.714286
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
04f6a64d3c381809f0c0f17895926f4d6a5c7017
| 1,080
|
py
|
Python
|
pyramid_rest_route/view.py
|
rickmak/pyramid_resources
|
b497704e23916989ef690cfb1c729fa94bd2266d
|
[
"MIT"
] | null | null | null |
pyramid_rest_route/view.py
|
rickmak/pyramid_resources
|
b497704e23916989ef690cfb1c729fa94bd2266d
|
[
"MIT"
] | null | null | null |
pyramid_rest_route/view.py
|
rickmak/pyramid_resources
|
b497704e23916989ef690cfb1c729fa94bd2266d
|
[
"MIT"
] | 2
|
2015-07-14T06:59:53.000Z
|
2019-05-28T08:50:35.000Z
|
import logging
from pyramid.httpexceptions import HTTPNotImplemented
from pyramid.renderers import render, render_to_response
log = logging.getLogger(__name__)
class RestView(object):
renderers = {}
def __init__(self, request):
self.request = request
self.params = request.params
self.url = request.route_url
self.c = request.tmpl_context
self.routes = self.request.matchdict
def render_(self, *args, **kwargs):
kwargs['request'] = self.request
return render(*args, **kwargs)
def render(self, *args, **kwargs):
kwargs['request'] = self.request
return render_to_response(*args, **kwargs)
def index(self):
raise HTTPNotImplemented()
def new(self):
raise HTTPNotImplemented()
def create(self):
raise HTTPNotImplemented()
def view(self):
raise HTTPNotImplemented()
def edit(self):
raise HTTPNotImplemented()
def update(self):
raise HTTPNotImplemented()
def delete(self):
raise HTTPNotImplemented()
| 22.978723
| 56
| 0.65
| 112
| 1,080
| 6.133929
| 0.348214
| 0.091703
| 0.275109
| 0.262009
| 0.171761
| 0.171761
| 0.171761
| 0.171761
| 0.171761
| 0.171761
| 0
| 0
| 0.250926
| 1,080
| 47
| 57
| 22.978723
| 0.849197
| 0
| 0
| 0.28125
| 0
| 0
| 0.012951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3125
| false
| 0
| 0.09375
| 0
| 0.53125
| 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
|
04fbf91a6332b5a1b474ed67ff0d7a69f456439d
| 154
|
py
|
Python
|
test/drafts/2016-10-17_1931 Context Integration/a01 first rough draft.py
|
friedrichromstedt/upy
|
4b6b890259fb34bc69265fc400881587157b03a3
|
[
"MIT"
] | 3
|
2015-06-01T23:09:38.000Z
|
2015-10-06T13:14:23.000Z
|
test/drafts/2016-10-17_1931 Context Integration/a01 first rough draft.py
|
friedrichromstedt/upy
|
4b6b890259fb34bc69265fc400881587157b03a3
|
[
"MIT"
] | null | null | null |
test/drafts/2016-10-17_1931 Context Integration/a01 first rough draft.py
|
friedrichromstedt/upy
|
4b6b890259fb34bc69265fc400881587157b03a3
|
[
"MIT"
] | null | null | null |
import upy2
from upy2.typesetting.scientific import ScientificTypesetter
a = upy2.undarray(10, 2)
with ScientificTypesetter(2, 3):
print a
print a
| 15.4
| 60
| 0.772727
| 21
| 154
| 5.666667
| 0.619048
| 0.10084
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061538
| 0.155844
| 154
| 9
| 61
| 17.111111
| 0.853846
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
04fe159d755c988a213e903e5a3f55facc8d1c18
| 141
|
py
|
Python
|
Olympiad Solutions/DMOJ/boolean.py
|
p1yush/code-DS-ALGO
|
f015f766e75cb61ca908e30bb600bdd6d2fb2e82
|
[
"MIT"
] | 36
|
2019-12-27T08:23:08.000Z
|
2022-01-24T20:35:47.000Z
|
Olympiad Solutions/DMOJ/boolean.py
|
p1yush/code-DS-ALGO
|
f015f766e75cb61ca908e30bb600bdd6d2fb2e82
|
[
"MIT"
] | 10
|
2019-11-13T02:55:18.000Z
|
2021-10-13T23:28:09.000Z
|
Olympiad Solutions/DMOJ/boolean.py
|
p1yush/code-DS-ALGO
|
f015f766e75cb61ca908e30bb600bdd6d2fb2e82
|
[
"MIT"
] | 53
|
2020-08-15T11:08:40.000Z
|
2021-10-09T15:51:38.000Z
|
# Ivan Carvalho
# Solution to https://dmoj.ca/problem/boolean
#!/usr/bin/env python2.7
# -*- coding : utf-8 -*-
a = raw_input()
print eval(a)
| 23.5
| 45
| 0.666667
| 23
| 141
| 4.043478
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02459
| 0.134752
| 141
| 6
| 46
| 23.5
| 0.737705
| 0.730496
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
b6d9e74e11c76c18da277b15e5aba538d9f0cbc1
| 474
|
py
|
Python
|
cm4/abstractclass/DatabaseManagerABC.py
|
swsachith/cm
|
d99837917f0dafe60c25829cf78ae77bbe02bd85
|
[
"Apache-2.0"
] | null | null | null |
cm4/abstractclass/DatabaseManagerABC.py
|
swsachith/cm
|
d99837917f0dafe60c25829cf78ae77bbe02bd85
|
[
"Apache-2.0"
] | null | null | null |
cm4/abstractclass/DatabaseManagerABC.py
|
swsachith/cm
|
d99837917f0dafe60c25829cf78ae77bbe02bd85
|
[
"Apache-2.0"
] | null | null | null |
import abc
class DatabaseManagerABC (metaclass=abc.ABCMeta):
@abc.abstractmethod
def update_document(self):
"""
update document in database/storage
"""
pass
@abc.abstractmethod
def find_document(self):
"""
find document in database/stroage
"""
pass
@abc.abstractmethod
def delete_document(self):
"""
delete any document in database/storage
"""
pass
| 18.230769
| 49
| 0.57384
| 44
| 474
| 6.113636
| 0.431818
| 0.189591
| 0.223048
| 0.185874
| 0.215613
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.339662
| 474
| 25
| 50
| 18.96
| 0.859425
| 0.229958
| 0
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0.272727
| 0.090909
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
b6dc9f22280151da48c2987c070d2e6947fd962e
| 100
|
py
|
Python
|
notes/demos/nn.py
|
Clickity-Clack/iceberg
|
e0c7e4f29c238502cbea3b951d30616ba3eeacd0
|
[
"MIT"
] | null | null | null |
notes/demos/nn.py
|
Clickity-Clack/iceberg
|
e0c7e4f29c238502cbea3b951d30616ba3eeacd0
|
[
"MIT"
] | null | null | null |
notes/demos/nn.py
|
Clickity-Clack/iceberg
|
e0c7e4f29c238502cbea3b951d30616ba3eeacd0
|
[
"MIT"
] | 1
|
2018-01-05T23:11:12.000Z
|
2018-01-05T23:11:12.000Z
|
import gym
import numpy as np
import random
import tensorflow as tf
import matplotlib.pyplot as plt
| 16.666667
| 31
| 0.83
| 17
| 100
| 4.882353
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 100
| 5
| 32
| 20
| 0.988095
| 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
|
8e0cc0f9c4e1b4b0cd8fb9940b2837fd1a7b79ce
| 156
|
py
|
Python
|
db/hello.py
|
alicezehner/sql
|
cb5219209ff65ae157c0624fdd6d887e3725c47c
|
[
"MIT"
] | null | null | null |
db/hello.py
|
alicezehner/sql
|
cb5219209ff65ae157c0624fdd6d887e3725c47c
|
[
"MIT"
] | null | null | null |
db/hello.py
|
alicezehner/sql
|
cb5219209ff65ae157c0624fdd6d887e3725c47c
|
[
"MIT"
] | null | null | null |
from faker import Faker
fake = Faker()
# generate random names
print(fake.first_name(), fake.last_name())
print(fake.job())
# push fake data into database
| 19.5
| 42
| 0.74359
| 24
| 156
| 4.75
| 0.666667
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 156
| 7
| 43
| 22.285714
| 0.844444
| 0.320513
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
8e142c763fdb8d924ffaccc126ec69589aa927d1
| 640
|
py
|
Python
|
openre/agent/server/action/utils.py
|
openre/openre
|
c5969df92cac83bdafd049e1c0a3bcf56b51223a
|
[
"MIT"
] | null | null | null |
openre/agent/server/action/utils.py
|
openre/openre
|
c5969df92cac83bdafd049e1c0a3bcf56b51223a
|
[
"MIT"
] | null | null | null |
openre/agent/server/action/utils.py
|
openre/openre
|
c5969df92cac83bdafd049e1c0a3bcf56b51223a
|
[
"MIT"
] | 1
|
2016-02-14T11:20:57.000Z
|
2016-02-14T11:20:57.000Z
|
# -*- coding: utf-8 -*-
from openre.agent.decorators import action
import logging
@action(namespace='server')
def ping(event):
return 'pong'
@action(namespace='server')
def exception(event):
raise Exception('Test exception')
@action(namespace='server')
def check_args(event, *args, **kwargs):
return {'args': args, 'kwargs': kwargs}
@action(namespace='server')
def debug(event):
logging.debug('Debug message: %s', event.data)
@action(namespace='server')
def error(event):
logging.error('Error message: %s', event.data)
@action(namespace='server')
def warn(event):
logging.warn('Warn message: %s', event.data)
| 22.068966
| 50
| 0.69375
| 82
| 640
| 5.402439
| 0.353659
| 0.20316
| 0.284424
| 0.325056
| 0.185102
| 0.185102
| 0.185102
| 0.185102
| 0
| 0
| 0
| 0.001799
| 0.13125
| 640
| 28
| 51
| 22.857143
| 0.794964
| 0.032813
| 0
| 0.3
| 0
| 0
| 0.184765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.1
| 0.1
| 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
|
8e2c8ea26343525dca9a833b62e3ed6507179602
| 72
|
py
|
Python
|
test/remote/__init__.py
|
ScorpionResponse/kbwc_api_client
|
3f327a8ddd1ef2bcee6a499ae2af867f10e5d61b
|
[
"Apache-2.0"
] | 1
|
2020-07-22T16:51:17.000Z
|
2020-07-22T16:51:17.000Z
|
test/remote/__init__.py
|
ScorpionResponse/kbwc_api_client
|
3f327a8ddd1ef2bcee6a499ae2af867f10e5d61b
|
[
"Apache-2.0"
] | null | null | null |
test/remote/__init__.py
|
ScorpionResponse/kbwc_api_client
|
3f327a8ddd1ef2bcee6a499ae2af867f10e5d61b
|
[
"Apache-2.0"
] | null | null | null |
import OpenURL
import Rest
__all__ = [OpenURL.__name__, Rest.__name__]
| 14.4
| 43
| 0.791667
| 9
| 72
| 5
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 72
| 4
| 44
| 18
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f3d1a295c7e7f0c6332bbe9bcc9bf044f8eae33b
| 98
|
py
|
Python
|
goals_search/apps.py
|
machakux/dgs
|
46de3cdaced5e4afef46fa46c7a3303d53df0da0
|
[
"Unlicense"
] | 6
|
2017-11-06T02:50:31.000Z
|
2021-09-18T08:12:05.000Z
|
goals_search/apps.py
|
machakux/dgs
|
46de3cdaced5e4afef46fa46c7a3303d53df0da0
|
[
"Unlicense"
] | 5
|
2017-07-08T07:58:07.000Z
|
2017-09-11T06:13:03.000Z
|
goals_search/apps.py
|
machakux/dgs
|
46de3cdaced5e4afef46fa46c7a3303d53df0da0
|
[
"Unlicense"
] | 2
|
2017-09-15T20:49:41.000Z
|
2019-09-10T11:03:59.000Z
|
from django.apps import AppConfig
class GoalsSearchConfig(AppConfig):
name = 'goals_search'
| 16.333333
| 35
| 0.77551
| 11
| 98
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 36
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 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
|
6d07153e68c1d9372772f8f69478bb21aaaff009
| 163
|
py
|
Python
|
iati/__init__.py
|
mcarans/hdx-scraper-iati-viz
|
b252b3ab99ae45c788eebf260368790681607721
|
[
"MIT"
] | null | null | null |
iati/__init__.py
|
mcarans/hdx-scraper-iati-viz
|
b252b3ab99ae45c788eebf260368790681607721
|
[
"MIT"
] | null | null | null |
iati/__init__.py
|
mcarans/hdx-scraper-iati-viz
|
b252b3ab99ae45c788eebf260368790681607721
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from iati.covid_checks import CovidChecks
from iati.ebola_checks import EbolaChecks
checks = {'covid': CovidChecks, 'ebola': EbolaChecks}
| 27.166667
| 53
| 0.748466
| 20
| 163
| 6
| 0.55
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006993
| 0.122699
| 163
| 5
| 54
| 32.6
| 0.832168
| 0.128834
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6d5b9db2ef3c280e75f116340f39ee60fd487560
| 1,035
|
py
|
Python
|
api server/server/routes/front_routes.py
|
rabo452/flipbook
|
f892d568fd4acff84414098dfbad17867fc0fc7b
|
[
"MIT"
] | null | null | null |
api server/server/routes/front_routes.py
|
rabo452/flipbook
|
f892d568fd4acff84414098dfbad17867fc0fc7b
|
[
"MIT"
] | null | null | null |
api server/server/routes/front_routes.py
|
rabo452/flipbook
|
f892d568fd4acff84414098dfbad17867fc0fc7b
|
[
"MIT"
] | null | null | null |
# routes for front-end part of project
from flask import url_for, render_template, request
from server import app
@app.route('/', methods = ['GET'])
def index_page():
return render_template('/front-end/index.html')
@app.route('/login', methods = ['GET'])
def login_page():
return render_template('/front-end/login.html')
@app.route('/forgot', methods = ['GET'])
def forgot_page():
return render_template('/front-end/forgot.html')
@app.route('/flipbook', methods = ['GET'])
def flipbook_page():
try:
id = request.args.get('id')
facebook_logo_image_url = request.url_root + url_for('files', filename=f'{id}/logo_image/logo.jpg')
return render_template('/front-end/flipbook.html', facebook_logo_image_url = facebook_logo_image_url)
except:
return render_template('/front-end/flipbook.html', facebook_logo_image_url = '')
@app.route('/confirm-page', methods = ['GET'])
def confirm_page():
return render_template('/front-end/confirm-page.html')
| 32.34375
| 110
| 0.675362
| 138
| 1,035
| 4.862319
| 0.289855
| 0.083458
| 0.178838
| 0.223547
| 0.369598
| 0.369598
| 0.178838
| 0.178838
| 0.178838
| 0.178838
| 0
| 0
| 0.165217
| 1,035
| 31
| 111
| 33.387097
| 0.77662
| 0.034783
| 0
| 0
| 0
| 0
| 0.229814
| 0.169772
| 0
| 0
| 0
| 0
| 0
| 1
| 0.227273
| false
| 0
| 0.090909
| 0.181818
| 0.590909
| 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
|
edcc99ba35cb469b4352ad6be312b3c17204649e
| 26
|
py
|
Python
|
src/pip/__init__.py
|
ehashman/pip
|
d67d98dd914e2ce80ece43594554f0a226558db0
|
[
"MIT"
] | 1
|
2021-01-23T16:43:24.000Z
|
2021-01-23T16:43:24.000Z
|
src/pip/__init__.py
|
ehashman/pip
|
d67d98dd914e2ce80ece43594554f0a226558db0
|
[
"MIT"
] | null | null | null |
src/pip/__init__.py
|
ehashman/pip
|
d67d98dd914e2ce80ece43594554f0a226558db0
|
[
"MIT"
] | 1
|
2019-06-28T05:23:31.000Z
|
2019-06-28T05:23:31.000Z
|
__version__ = "18.0.dev0"
| 13
| 25
| 0.692308
| 4
| 26
| 3.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 0.115385
| 26
| 1
| 26
| 26
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0.346154
| 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
|
edd3884ebad4f816fc880ec2083447f9befb84ec
| 480
|
py
|
Python
|
src/sleuthdeck/plugins/sound/actions.py
|
sleuth-io/sleuth-deck
|
289b9967e7d395de8aa05268eb5e686b67285c1e
|
[
"Apache-2.0"
] | null | null | null |
src/sleuthdeck/plugins/sound/actions.py
|
sleuth-io/sleuth-deck
|
289b9967e7d395de8aa05268eb5e686b67285c1e
|
[
"Apache-2.0"
] | null | null | null |
src/sleuthdeck/plugins/sound/actions.py
|
sleuth-io/sleuth-deck
|
289b9967e7d395de8aa05268eb5e686b67285c1e
|
[
"Apache-2.0"
] | null | null | null |
from pydub import AudioSegment
from pydub.playback import play
from sleuthdeck.deck import Action
from sleuthdeck.deck import ClickType
from sleuthdeck.deck import Key
from sleuthdeck.deck import KeyScene
class Play(Action):
def __init__(self, sound_file: str, gain: int = 0):
sound = AudioSegment.from_file(sound_file)
sound += gain
self._sound = sound
def __call__(self, scene: KeyScene, key: Key, click: ClickType):
play(self._sound)
| 28.235294
| 68
| 0.727083
| 64
| 480
| 5.25
| 0.390625
| 0.166667
| 0.214286
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002597
| 0.197917
| 480
| 16
| 69
| 30
| 0.87013
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0
| 0.461538
| 0
| 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
|
6107990a85204fd28b051978ee8270908e30a034
| 501
|
py
|
Python
|
pykivdroid/screen.py
|
Sahil-pixel/Pykivdroid
|
91da72ffe36c6aadb86c197e4391bab073a3c6bf
|
[
"MIT"
] | 8
|
2021-06-12T17:22:00.000Z
|
2022-03-14T14:49:40.000Z
|
pykivdroid/screen.py
|
Sahil-pixel/Pykivdroid
|
91da72ffe36c6aadb86c197e4391bab073a3c6bf
|
[
"MIT"
] | null | null | null |
pykivdroid/screen.py
|
Sahil-pixel/Pykivdroid
|
91da72ffe36c6aadb86c197e4391bab073a3c6bf
|
[
"MIT"
] | 2
|
2021-05-31T19:16:30.000Z
|
2022-01-08T23:33:57.000Z
|
from pykivdroid import mActivity,WindowManagerNLayoutParams,Window,run_on_ui_thread,View
@run_on_ui_thread
def set_full_screen():
return mActivity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_FULLSCREEN
|View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
| 38.538462
| 88
| 0.692615
| 54
| 501
| 5.907407
| 0.5
| 0.15674
| 0.188088
| 0.250784
| 0.250784
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.255489
| 501
| 12
| 89
| 41.75
| 0.855228
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| true
| 0
| 0.111111
| 0.111111
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
6122ae363a20d824466864bbbe967cbb5808cb1d
| 134
|
py
|
Python
|
deepxde/maps/__init__.py
|
Orcuslc/deepxde
|
79074f225351ce439c80389318a6e3e6b5b3d90f
|
[
"Apache-2.0"
] | 8
|
2021-03-21T18:43:52.000Z
|
2021-05-26T04:01:53.000Z
|
deepxde/maps/__init__.py
|
mafeiyao/lululxvi-deepxde
|
295e0faed10d1a5aae3ab14ae92a40fec9ab93c7
|
[
"Apache-2.0"
] | null | null | null |
deepxde/maps/__init__.py
|
mafeiyao/lululxvi-deepxde
|
295e0faed10d1a5aae3ab14ae92a40fec9ab93c7
|
[
"Apache-2.0"
] | 1
|
2021-11-27T10:15:48.000Z
|
2021-11-27T10:15:48.000Z
|
from __future__ import absolute_import
from .fnn import FNN
from .mfnn import MfNN
from .opnn import OpNN
from .resnet import ResNet
| 19.142857
| 38
| 0.813433
| 21
| 134
| 4.952381
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156716
| 134
| 6
| 39
| 22.333333
| 0.920354
| 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
|
b6299767ae3e54f798f0664dd60df47dd083daa4
| 203
|
py
|
Python
|
web/streams/views/streamdetailview.py
|
CleyFaye/gtlive-info
|
9e54e81b47f4292586211e83b776eec24214ab46
|
[
"MIT"
] | null | null | null |
web/streams/views/streamdetailview.py
|
CleyFaye/gtlive-info
|
9e54e81b47f4292586211e83b776eec24214ab46
|
[
"MIT"
] | 22
|
2019-03-23T21:08:08.000Z
|
2019-03-25T07:34:58.000Z
|
web/streams/views/streamdetailview.py
|
CleyFaye/gtlive-info
|
9e54e81b47f4292586211e83b776eec24214ab46
|
[
"MIT"
] | null | null | null |
"""Display stream details"""
from django.views.generic.detail import DetailView
from streams.models import Stream
class StreamDetailView(DetailView):
"""Display a stream info"""
model = Stream
| 22.555556
| 50
| 0.753695
| 24
| 203
| 6.375
| 0.708333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147783
| 203
| 8
| 51
| 25.375
| 0.884393
| 0.216749
| 0
| 0
| 0
| 0
| 0
| 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
|
b6565da636f05be651f332cbf4d82a3cc6269146
| 20
|
py
|
Python
|
pybmrb/__init__.py
|
jonwedell/PyBMRB
|
f9dd15bcffd30d29a02b885529100ab028e72dcf
|
[
"MIT"
] | null | null | null |
pybmrb/__init__.py
|
jonwedell/PyBMRB
|
f9dd15bcffd30d29a02b885529100ab028e72dcf
|
[
"MIT"
] | null | null | null |
pybmrb/__init__.py
|
jonwedell/PyBMRB
|
f9dd15bcffd30d29a02b885529100ab028e72dcf
|
[
"MIT"
] | null | null | null |
__all__ = ['csviz']
| 10
| 19
| 0.6
| 2
| 20
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 20
| 1
| 20
| 20
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0.25
| 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
|
b66e2b8c6e4dd50bcf74903dd471b7173a9b1f32
| 159
|
py
|
Python
|
datahub_core/printable.py
|
grovesy/datahub
|
57bd1a837b9996c2dae5e052a94131b8fc56e3fb
|
[
"Apache-2.0"
] | 67
|
2020-05-15T09:37:20.000Z
|
2022-03-18T04:12:08.000Z
|
datahub_core/printable.py
|
grovesy/datahub
|
57bd1a837b9996c2dae5e052a94131b8fc56e3fb
|
[
"Apache-2.0"
] | 37
|
2020-05-15T08:03:17.000Z
|
2020-10-28T12:24:30.000Z
|
datahub_core/printable.py
|
grovesy/datahub
|
57bd1a837b9996c2dae5e052a94131b8fc56e3fb
|
[
"Apache-2.0"
] | 10
|
2020-05-16T14:11:12.000Z
|
2021-10-06T19:20:47.000Z
|
from pprint import pformat
class Printable:
def __repr__(self):
return "<" + type(self).__name__ + "> " + pformat(vars(self), indent=4, width=1)
| 22.714286
| 88
| 0.641509
| 20
| 159
| 4.7
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015873
| 0.207547
| 159
| 6
| 89
| 26.5
| 0.730159
| 0
| 0
| 0
| 0
| 0
| 0.018868
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
b6700d566b4e375b2ac9c79300663ebb05604d0a
| 184
|
py
|
Python
|
Kivy/gui/crud.py
|
joao0710/primeiro-repo
|
4fe1240c417d42fb4ec17861003a13b0d0e9310d
|
[
"MIT"
] | null | null | null |
Kivy/gui/crud.py
|
joao0710/primeiro-repo
|
4fe1240c417d42fb4ec17861003a13b0d0e9310d
|
[
"MIT"
] | null | null | null |
Kivy/gui/crud.py
|
joao0710/primeiro-repo
|
4fe1240c417d42fb4ec17861003a13b0d0e9310d
|
[
"MIT"
] | null | null | null |
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
class Principal(BoxLayout):
pass
class Crud(App):
def build(self):
return Principal()
Crud().run()
| 15.333333
| 40
| 0.695652
| 25
| 184
| 5.12
| 0.6
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.201087
| 184
| 11
| 41
| 16.727273
| 0.870748
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0.125
| 0.25
| 0.125
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
b67a7082d8780fb7d33a02062987db61e0bd4271
| 152
|
py
|
Python
|
vb2py/converter.py
|
ceprio/xl_vb2py
|
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
|
[
"BSD-3-Clause"
] | null | null | null |
vb2py/converter.py
|
ceprio/xl_vb2py
|
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
|
[
"BSD-3-Clause"
] | null | null | null |
vb2py/converter.py
|
ceprio/xl_vb2py
|
899fec0301140fd8bd313e8c80b3fa839b3f5ee4
|
[
"BSD-3-Clause"
] | null | null | null |
"""Wrapper around project converter to convert a project"""
from vb2py import projectconverter
if __name__ == '__main__':
projectconverter.main()
| 21.714286
| 59
| 0.756579
| 17
| 152
| 6.294118
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007752
| 0.151316
| 152
| 7
| 60
| 21.714286
| 0.821705
| 0.348684
| 0
| 0
| 0
| 0
| 0.085106
| 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
|
b69602368fed215695fc035838212d570896136d
| 24,285
|
py
|
Python
|
ppgan/datasets/lapstyle_dataset.py
|
JackMcCoy/PaddleGAN
|
a89fa7a1d7edd6a0e227c2941f0641700b20fe70
|
[
"Apache-2.0"
] | null | null | null |
ppgan/datasets/lapstyle_dataset.py
|
JackMcCoy/PaddleGAN
|
a89fa7a1d7edd6a0e227c2941f0641700b20fe70
|
[
"Apache-2.0"
] | null | null | null |
ppgan/datasets/lapstyle_dataset.py
|
JackMcCoy/PaddleGAN
|
a89fa7a1d7edd6a0e227c2941f0641700b20fe70
|
[
"Apache-2.0"
] | null | null | null |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
import os, math, glob
import numpy as np
import random
from PIL import Image
import paddle
import paddle.vision.transforms as T
from paddle.io import Dataset
import cv2
import warnings
warnings.filterwarnings("ignore")
from .builder import DATASETS
logger = logging.getLogger(__name__)
def data_transform(crop_size):
transform_list = [T.RandomCrop(crop_size)]
return T.Compose(transform_list)
@DATASETS.register()
class LapStyleDataset(Dataset):
"""
coco2017 dataset for LapStyle model
"""
def __init__(self, content_root, style_root, load_size, crop_size, style_upsize=1):
super(LapStyleDataset, self).__init__()
self.content_root = content_root
self.paths = os.listdir(self.content_root)
random.shuffle(self.paths)
self.style_root = style_root
self.style_upsize = style_upsize
self.style_paths = [os.path.join(self.style_root,i) for i in os.listdir(self.style_root)] if self.style_root[-1]=='/' else [self.style_root]
self.load_size = load_size
self.crop_size = crop_size
self.transform = data_transform(self.crop_size)
def __getitem__(self, index):
"""Get training sample
return:
ci: content image with shape [C,W,H],
si: style image with shape [C,W,H],
ci_path: str
"""
path = self.paths[index]
content_img = cv2.imread(os.path.join(self.content_root, path))
try:
if content_img.ndim == 2:
content_img = cv2.cvtColor(content_img, cv2.COLOR_GRAY2RGB)
else:
content_img = cv2.cvtColor(content_img, cv2.COLOR_BGR2RGB)
except:
print(path)
content_img = Image.fromarray(content_img)
small_edge = min(content_img.width,content_img.height)
if small_edge==content_img.width:
intermediate_width = self.load_size
ratio = content_img.height/content_img.width
intermediate_height = math.floor(self.load_size*ratio)
else:
intermediate_height = self.load_size
ratio = content_img.width/content_img.height
intermediate_width = math.floor(self.load_size*ratio)
content_img = content_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
content_img = np.array(content_img)
style_path = random.choice(self.style_paths) if len(self.style_paths)>1 else self.style_paths[0]
style_img = cv2.imread(style_path)
style_img = cv2.cvtColor(style_img, cv2.COLOR_BGR2RGB)
style_img = Image.fromarray(style_img)
small_edge = min(style_img.width,style_img.height)
if small_edge==style_img.width:
intermediate_width = math.floor(self.load_size* self.style_upsize)
ratio = style_img.height/style_img.width
intermediate_height = math.floor(self.load_size*ratio* self.style_upsize)
else:
intermediate_height = math.floor(self.load_size* self.style_upsize)
ratio = style_img.width/style_img.height
intermediate_width = math.floor(self.load_size* ratio* self.style_upsize)
style_img = style_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
style_img = style_img.resize((intermediate_width,intermediate_height),Image.BILINEAR)
style_img = np.array(style_img)
content_img = self.transform(content_img)
style_img = self.transform(style_img)
content_img = self.img(content_img)
style_img = self.img(style_img)
return {'ci': content_img, 'si': style_img, 'ci_path': path}
def img(self, img):
"""make image with [0,255] and HWC to [0,1] and CHW
return:
img: image with shape [3,W,H] and value [0, 1].
"""
# [0,255] to [0,1]
img = img.astype(np.float32) / 255.
# some images have 4 channels
if img.shape[2] > 3:
img = img[:, :, :3]
# HWC to CHW
img = np.transpose(img, (2, 0, 1)).astype('float32')
return img
def __len__(self):
return len(self.paths)
def name(self):
return 'LapStyleDataset'
@DATASETS.register()
class LapStyleThumbset(Dataset):
"""
coco2017 dataset for LapStyle model
"""
def __init__(self, content_root, style_root, load_size, crop_size, thumb_size, style_upsize=1):
super(LapStyleThumbset, self).__init__()
self.content_root = content_root
self.paths = os.listdir(self.content_root)
random.shuffle(self.paths)
self.style_root = style_root
self.style_paths = [os.path.join(self.style_root,i) for i in os.listdir(self.style_root)] if self.style_root[-1]=='/' else [self.style_root]
self.load_size = load_size
self.crop_size = crop_size
self.thumb_size = thumb_size
self.style_upsize = style_upsize
self.transform = data_transform(self.crop_size)
self.transform_patch = data_transform(self.load_size)
def __getitem__(self, index):
"""Get training sample
return:
ci: content image with shape [C,W,H],
si: style image with shape [C,W,H],
ci_path: str
"""
path = self.paths[index]
content_img = cv2.imread(os.path.join(self.content_root, path))
try:
if content_img.ndim == 2:
content_img = cv2.cvtColor(content_img, cv2.COLOR_GRAY2RGB)
else:
content_img = cv2.cvtColor(content_img, cv2.COLOR_BGR2RGB)
except:
print(path)
content_img = Image.fromarray(content_img)
small_edge = min(content_img.width,content_img.height)
if small_edge==content_img.width:
small_edge='width'
intermediate_width = self.load_size
final_width = self.thumb_size
ratio = content_img.height/content_img.width
intermediate_height = math.ceil(self.load_size*ratio)
final_height = math.ceil(self.thumb_size*ratio)
else:
small_edge='height'
final_height = self.thumb_size
intermediate_height = self.load_size
ratio = content_img.width/content_img.height
intermediate_width = math.ceil(self.load_size*ratio)
final_width = math.ceil(self.thumb_size*ratio)
content_img = content_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
content_patches = np.array(content_img)
content_img = content_img.resize((final_width, final_height),
Image.BILINEAR)
content_img = np.array(content_img)
if small_edge=='height':
topmost=self.crop_size #will be divided by content_img
bottommost=0
if content_img.shape[0]<self.thumb_size-1:
leftmost= random.choice(list(range(0, content_img.shape[0] - self.thumb_size,2)))
rightmost=leftmost+self.crop_size
else:
leftmost=0
rightmost=self.crop_size
else:
rightmost=self.crop_size
leftmost=0
if content_img.shape[1]<self.thumb_size-1:
bottommost = random.choice(list(range(0, content_img.shape[1] - self.thumb_size,2)))
topmost=bottommost+self.crop_size
else:
bottommost = 0
topmost = self.crop_size
content_img =content_img[bottommost:topmost,leftmost:rightmost]
content_patches = content_patches[bottommost*2:topmost*2,leftmost*2:rightmost*2]
randx = random.choice(list(range(0, self.crop_size,2)))
randy = random.choice(list(range(0, self.crop_size,2)))
position = [randx, randx + self.crop_size, randy, randy+self.crop_size]
half_position = [math.floor(randx*.5), math.floor((randx + self.crop_size)*.5), math.floor(randy*.5), math.floor((randy+self.crop_size)*.5)]
content_patches = content_patches[randx:randx + self.crop_size,
randy:randy+self.crop_size]
style_path = random.choice(self.style_paths) if len(self.style_paths)>1 else self.style_paths[0]
style_img = cv2.imread(style_path)
style_img = cv2.cvtColor(style_img, cv2.COLOR_BGR2RGB)
style_img = Image.fromarray(style_img)
small_edge = min(style_img.width,style_img.height)
if small_edge==style_img.width:
intermediate_width = math.floor(self.load_size* self.style_upsize)
final_width = math.ceil(self.thumb_size*self.style_upsize)
ratio = style_img.height/style_img.width
intermediate_height = math.floor(self.load_size*ratio* self.style_upsize)
final_height = math.ceil(self.thumb_size*ratio* self.style_upsize)
else:
intermediate_height = math.floor(self.load_size* self.style_upsize)
final_height = math.ceil(self.thumb_size * self.style_upsize)
ratio = style_img.width/style_img.height
intermediate_width = math.floor(self.load_size* ratio* self.style_upsize)
final_width = math.ceil(self.thumb_size*ratio* self.style_upsize)
style_patch = style_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
style_img = style_patch.resize((final_width,final_height),Image.BILINEAR)
style_img = np.array(style_img)
style_patch = np.array(style_patch)
style_img = self.transform(style_img)
style_patch = self.transform_patch(style_patch)
style_patch = self.img(style_patch)
content_img = self.img(content_img)
style_img = self.img(style_img)
content_patches = self.img(content_patches)
return {'ci': content_img, 'si': style_img, 'sp':style_patch, 'ci_path': path,'cp':content_patches,'position':position,'half_position':half_position}
def img(self, img):
"""make image with [0,255] and HWC to [0,1] and CHW
return:
img: image with shape [3,W,H] and value [0, 1].
"""
# [0,255] to [0,1]
img = img.astype(np.float32) / 255.
# some images have 4 channels
if img.shape[2] > 3:
img = img[:, :, :3]
# HWC to CHW
img = np.transpose(img, (2, 0, 1)).astype('float32')
return img
def __len__(self):
return len(self.paths)
def name(self):
return 'LapStyleThumbset'
def get_crop_bounds(thumb_size,img_width,img_height):
if thumb_size==img_width:
leftmost=0
else:
leftmost= random.choice(list(range(0, int(img_width - thumb_size),4)))
rightmost=leftmost+thumb_size
if thumb_size==img_height:
bottommost=0
else:
bottommost = random.choice(list(range(0, int(img_height - thumb_size),4)))
topmost=bottommost+thumb_size
return [leftmost,bottommost,rightmost,topmost]
@DATASETS.register()
class MultiPatchSet(Dataset):
"""
coco2017 dataset for LapStyle model
"""
def __init__(self, content_root, style_root, load_size, crop_size, thumb_size, patch_depth,style_upsize=1):
super(MultiPatchSet, self).__init__()
self.content_root = content_root
self.paths = os.listdir(self.content_root)
random.shuffle(self.paths)
self.style_root = style_root
self.style_paths = [os.path.join(self.style_root,i) for i in os.listdir(self.style_root)] if self.style_root[-1]=='/' else [self.style_root]
self.load_size = load_size
self.crop_size = crop_size
self.thumb_size = thumb_size
self.style_upsize = style_upsize
self.patch_depth = patch_depth
self.style_img = False
self.transform = data_transform(self.crop_size)
self.transform_patch = data_transform(self.crop_size*2)
def __getitem__(self, index):
"""Get training sample
return:
ci: content image with shape [C,W,H],
si: style image with shape [C,W,H],
ci_path: str
"""
content_stack=[]
style_stack= []
position_stack = []
size_stack = []
path = self.paths[index]
content_img = cv2.imread(os.path.join(self.content_root, path))
try:
if content_img.ndim == 2:
content_img = cv2.cvtColor(content_img, cv2.COLOR_GRAY2RGB)
else:
content_img = cv2.cvtColor(content_img, cv2.COLOR_BGR2RGB)
except:
print(path)
content_img = Image.fromarray(content_img)
small_edge = min(content_img.width,content_img.height)
if small_edge==content_img.width:
small_edge='width'
intermediate_width = self.load_size
ratio = content_img.height/content_img.width
intermediate_height = math.ceil(self.load_size*ratio)
else:
small_edge='height'
final_height = self.thumb_size
intermediate_height = self.load_size
ratio = content_img.width/content_img.height
intermediate_width = math.ceil(self.load_size*ratio)
final_width = math.ceil(self.thumb_size*ratio)
content_img = content_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
style_img = cv2.imread(random.choice(self.style_paths))
style_img = cv2.cvtColor(style_img, cv2.COLOR_BGR2RGB)
style_img = Image.fromarray(style_img)
small_edge = min(style_img.width,style_img.height)
if small_edge==style_img.width:
intermediate_width = math.floor(self.load_size* self.style_upsize)
ratio = style_img.height/style_img.width
intermediate_height = math.floor(self.load_size*ratio* self.style_upsize)
else:
intermediate_height = math.floor(self.load_size* self.style_upsize)
ratio = style_img.width/style_img.height
intermediate_width = math.floor(self.load_size* ratio* self.style_upsize)
style_img = style_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
style_img = style_img.crop(box=get_crop_bounds(self.load_size,style_img.width,style_img.height))
style_patch = style_img.resize((self.crop_size,self.crop_size))
style_patch = np.array(style_patch)
style_patch = self.img(style_patch)
style_stack.append(style_patch)
content_img = content_img.crop(box=get_crop_bounds(self.load_size,content_img.width,content_img.height))
content_patch = content_img.resize((self.crop_size,self.crop_size))
content_patch = np.array(content_patch)
content_patch = self.img(content_patch)
content_stack.append(content_patch)
for i in range(self.patch_depth):
content_patch = content_img
for c in position_stack:
content_patch=content_patch.crop(box=(c[0],c[1],c[2],c[3]))
size_stack.append(content_patch.width)
position_stack.append(get_crop_bounds(content_patch.width/2,content_patch.width,content_patch.height))
content_patch=content_patch.crop(box=(position_stack[-1][0],position_stack[-1][1],position_stack[-1][2],position_stack[-1][3]))
content_patch = content_patch.resize((self.crop_size,self.crop_size),
Image.BILINEAR)
content_patch = np.array(content_patch)
content_patch = self.img(content_patch)
content_stack.append(content_patch)
style_stack.append(self.img(np.array(style_img)))
output = {}
for idx,i in enumerate(content_stack):
output['content_stack_'+str(idx+1)]=i
for idx,i in enumerate(style_stack):
output['style_stack_'+str(idx+1)]=i
output['position_stack']=position_stack
output['content']=self.img(np.array(content_img))
output['size_stack']=size_stack
return output
def img(self, img):
"""make image with [0,255] and HWC to [0,1] and CHW
return:
img: image with shape [3,W,H] and value [0, 1].
"""
# [0,255] to [0,1]
img = img.astype(np.float32) / 255.
# some images have 4 channels
if img.shape[2] > 3:
img = img[:, :, :3]
# HWC to CHW
img = np.transpose(img, (2, 0, 1)).astype('float32')
return img
def __len__(self):
return len(self.paths)
def name(self):
return 'MultiPatchSet'
@DATASETS.register()
class LapStyleThumbsetInference(Dataset):
"""
coco2017 dataset for LapStyle model
"""
def __init__(self, content_root, style_root, load_size, crop_size, thumb_size, patch_depth,style_upsize=1):
super(LapStyleThumbsetInference, self).__init__()
self.content_root = content_root
self.paths = os.listdir(self.content_root)
random.shuffle(self.paths)
self.style_root = style_root
self.style_paths = [os.path.join(self.style_root,i) for i in os.listdir(self.style_root)] if self.style_root[-1]=='/' else [self.style_root]
self.load_size = load_size
self.crop_size = crop_size
self.thumb_size = thumb_size
self.style_upsize = style_upsize
self.patch_depth = patch_depth
self.transform = data_transform(self.crop_size)
self.transform_patch = data_transform(self.crop_size*2)
style_img = cv2.imread(self.style_paths[0])
style_img = cv2.cvtColor(style_img, cv2.COLOR_BGR2RGB)
self.style_img = Image.fromarray(style_img)
def __getitem__(self, index):
"""Get training sample
return:
ci: content image with shape [C,W,H],
si: style image with shape [C,W,H],
ci_path: str
"""
content_stack=[]
style_stack= []
position_stack = []
size_stack = []
path = self.paths[index]
content_img = cv2.imread(os.path.join(self.content_root, path))
try:
if content_img.ndim == 2:
content_img = cv2.cvtColor(content_img, cv2.COLOR_GRAY2RGB)
else:
content_img = cv2.cvtColor(content_img, cv2.COLOR_BGR2RGB)
except:
print(path)
content_img = Image.fromarray(content_img)
small_edge = min(content_img.width,content_img.height)
if small_edge==content_img.width:
small_edge='width'
intermediate_width = self.load_size
ratio = content_img.height/content_img.width
#reduce_ratio = content_img.width/content_img.height
intermediate_height = math.ceil(self.load_size*ratio)
final_width = self.thumb_size
final_height = math.ceil(self.thumb_size*ratio)
else:
small_edge='height'
intermediate_height = self.load_size
ratio = content_img.width/content_img.height
#reduce_ratio = content_img.width/content_img.height
intermediate_width = math.ceil(self.load_size*ratio)
final_height = self.thumb_size
final_width = math.ceil(self.thumb_size*ratio)
content_img = content_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
content_thumb = content_img.resize((final_width, final_height),
Image.BILINEAR)
style_path = random.choice(self.style_paths) if len(self.style_paths)>1 else self.style_paths[0]
small_edge = min(self.style_img.width,self.style_img.height)
max_size=max(final_height,final_width)
if small_edge==self.style_img.width:
intermediate_width = math.floor(self.load_size* self.style_upsize)
final_width = math.ceil(max_size* self.style_upsize)
ratio = style_img.height/self.style_img.width
intermediate_height = math.floor(self.load_size*ratio* self.style_upsize)
final_height = math.ceil((max_size*self.style_upsize)*ratio)
else:
intermediate_height = math.floor(self.load_size* self.style_upsize)
final_height = math.ceil(max_size* self.style_upsize)
ratio = self.style_img.width/self.style_img.height
intermediate_width = math.floor(self.load_size* ratio* self.style_upsize)
final_width = math.ceil(max_size* self.style_upsize*ratio)
style_thumb = self.style_img.resize((final_width,final_height))
transform = data_transform((content_thumb.height,content_thumb.width))
style_thumb = transform(style_thumb)
style_img = self.style_img.resize((intermediate_width, intermediate_height),
Image.BILINEAR)
style_img = style_img.crop(box=get_crop_bounds(self.load_size,style_img.width,style_img.height))
style_img = np.array(style_img)
content_img = np.array(content_img)
content_thumb = np.array(content_thumb)
content_thumb = self.img(content_thumb)
style_thumb = np.array(style_thumb)
style_thumb = self.img(style_thumb)
style_img = self.img(style_img)
sizes=style_thumb.shape
ratio = math.floor(self.load_size/self.crop_size)
content_img = self.img(content_img)
#content_img = np.expand_dims(content_img, axis=0)
if sizes[-1]%16!=0:
closest=math.floor(sizes[-1]/16)
style_thumb=style_thumb[:,:,:closest*16]
content_thumb=content_thumb[:,:,:closest*16]
content_img = content_img[:,:,:closest*16*ratio]
if sizes[-2]%16!=0:
closest=math.floor(sizes[-2]/16)
style_thumb=style_thumb[:,:closest*16,:]
content_thumb=content_thumb[:,:closest*16,:]
content_img = content_img[:,:closest*16*ratio,:]
assert content_thumb.shape == style_thumb.shape
for i in range(self.patch_depth):
bottommost = random.choice(list(range(0, content_img.shape[1] - content_thumb.shape[1],2)))
topmost=bottommost+content_thumb.shape[1]
leftmost = random.choice(list(range(0, content_img.shape[2] - content_thumb.shape[2],2)))
rightmost = leftmost+content_thumb.shape[2]
position_stack.append((math.floor(bottommost/2),math.floor(topmost/2),math.floor(leftmost/2),math.floor(rightmost/2)))
#output = {'content':content_img,'style':style_img,'content_thumb':zero_thumb,'style_thumb':style_thumb,'content_shape':thumb_shape}
output={'content':content_img,'ci':content_thumb,'position':position_stack,'cp':content_thumb,'si':style_thumb,'sp':style_thumb,'style':style_img,'ci_path':path}
return output
def img(self, img):
"""make image with [0,255] and HWC to [0,1] and CHW
return:
img: image with shape [3,W,H] and value [0, 1].
"""
# [0,255] to [0,1]
img = img.astype(np.float32) / 255.
# some images have 4 channels
if img.shape[2] > 3:
img = img[:, :, :3]
# HWC to CHW
img = np.transpose(img, (2, 0, 1)).astype('float32')
return img
def __len__(self):
return len(self.paths)
def name(self):
return 'LapStyleThumbsetInference'
| 44.806273
| 169
| 0.637389
| 3,145
| 24,285
| 4.671542
| 0.06868
| 0.078955
| 0.033488
| 0.026613
| 0.780561
| 0.754901
| 0.728015
| 0.702763
| 0.684046
| 0.65226
| 0
| 0.016329
| 0.258596
| 24,285
| 542
| 170
| 44.806273
| 0.799667
| 0.091044
| 0
| 0.691038
| 0
| 0
| 0.013145
| 0.001153
| 0
| 0
| 0
| 0
| 0.002358
| 1
| 0.051887
| false
| 0
| 0.025943
| 0.018868
| 0.129717
| 0.009434
| 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
|
fcaed27722a9660f38f131ecde2a5f85a803f929
| 91
|
py
|
Python
|
django_web_app/telegram/apps.py
|
alexzanderr/django_web_app
|
2e4d0774510072bbaf4fef3c2858e9e94e3f39f3
|
[
"MIT"
] | null | null | null |
django_web_app/telegram/apps.py
|
alexzanderr/django_web_app
|
2e4d0774510072bbaf4fef3c2858e9e94e3f39f3
|
[
"MIT"
] | 44
|
2020-05-13T20:15:26.000Z
|
2022-03-04T02:58:58.000Z
|
django_web_app/telegram/apps.py
|
alexzanderr/django_web_app
|
2e4d0774510072bbaf4fef3c2858e9e94e3f39f3
|
[
"MIT"
] | 4
|
2020-06-05T17:59:52.000Z
|
2021-02-06T19:09:43.000Z
|
from django.apps import AppConfig
class TelegramConfig(AppConfig):
name = 'telegram'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 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
|
fcb6ba9fbf1fe84bcdb66d58d9f8a16155d29a5d
| 428
|
bzl
|
Python
|
bazel/docker/initialize.bzl
|
mlab-lattice/lattice
|
8ad7070f7c0c5d2a24373b59567797afd669201f
|
[
"Apache-2.0"
] | 1
|
2018-10-01T17:33:36.000Z
|
2018-10-01T17:33:36.000Z
|
bazel/docker/initialize.bzl
|
mlab-lattice/lattice
|
8ad7070f7c0c5d2a24373b59567797afd669201f
|
[
"Apache-2.0"
] | 59
|
2018-08-23T17:07:35.000Z
|
2018-10-09T15:55:05.000Z
|
bazel/docker/initialize.bzl
|
mlab-lattice/lattice
|
8ad7070f7c0c5d2a24373b59567797afd669201f
|
[
"Apache-2.0"
] | 3
|
2018-10-09T05:38:16.000Z
|
2018-10-10T16:58:57.000Z
|
load("@io_bazel_rules_docker//go:image.bzl", go_image_repositories="repositories")
load("@io_bazel_rules_docker//container:container.bzl", container_repositories = "repositories")
def initialize_rules_docker():
container_repositories()
go_image_repositories()
load("@distroless//package_manager:package_manager.bzl", "package_manager_repositories",)
def initialize_rules_package_manager():
package_manager_repositories()
| 42.8
| 96
| 0.829439
| 50
| 428
| 6.64
| 0.3
| 0.210843
| 0.066265
| 0.096386
| 0.13253
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.051402
| 428
| 9
| 97
| 47.555556
| 0.817734
| 0
| 0
| 0
| 0
| 0
| 0.42757
| 0.371495
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fcbea55c8526f80a0db46f3a6eb3fa8a6222c7d9
| 1,372
|
py
|
Python
|
test/test_g2p.py
|
gantzgraf/vape
|
f939cb527d72d852cb0919a57332110c15c5fd4a
|
[
"MIT"
] | 4
|
2020-03-25T06:09:39.000Z
|
2021-03-23T11:22:00.000Z
|
test/test_g2p.py
|
gantzgraf/vape
|
f939cb527d72d852cb0919a57332110c15c5fd4a
|
[
"MIT"
] | 1
|
2020-10-02T14:50:30.000Z
|
2020-10-12T15:24:24.000Z
|
test/test_g2p.py
|
gantzgraf/vape
|
f939cb527d72d852cb0919a57332110c15c5fd4a
|
[
"MIT"
] | 1
|
2021-02-20T11:32:34.000Z
|
2021-02-20T11:32:34.000Z
|
from .utils import *
def test_g2p():
output = get_tmp_out()
input = os.path.join(dir_path, 'test_data', 'ex2.bcf')
test_args = dict(
no_warnings=True,
input=input,
output=output,
ped=os.path.join(dir_path, "test_data", "test.ped"),
de_novo=True,
biallelic=True,
csq=['default'],
check_g2p_consequence=True,
check_g2p_inheritance=True,
g2p=os.path.join(dir_path, "test_data", "test_g2p.csv")
)
results, expected = run_args(test_args, output,
sys._getframe().f_code.co_name)
assert_equal(results, expected)
os.remove(output)
def test_g2p_snpeff():
output = get_tmp_out()
input = os.path.join(dir_path, 'test_data', 'ex2.snpeff.bcf')
test_args = dict(
no_warnings=True,
snpeff=True,
input=input,
output=output,
ped=os.path.join(dir_path, "test_data", "test.ped"),
de_novo=True,
biallelic=True,
csq=['default'],
check_g2p_consequence=True,
check_g2p_inheritance=True,
g2p=os.path.join(dir_path, "test_data", "test_g2p.csv")
)
results, expected = run_args(test_args, output, 'test_g2p')
assert_equal(results, expected)
os.remove(output)
if __name__ == '__main__':
import nose
nose.run(defaultTest=__name__)
| 28.583333
| 65
| 0.611516
| 178
| 1,372
| 4.393258
| 0.280899
| 0.046036
| 0.076726
| 0.099744
| 0.841432
| 0.841432
| 0.841432
| 0.670077
| 0.670077
| 0.670077
| 0
| 0.012795
| 0.259475
| 1,372
| 47
| 66
| 29.191489
| 0.75689
| 0
| 0
| 0.666667
| 0
| 0
| 0.105685
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 1
| 0.047619
| false
| 0
| 0.047619
| 0
| 0.095238
| 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
|
fcccddf6b0bdd238df5af63dd2a19fc5d8160f16
| 3,615
|
py
|
Python
|
histolab/data/_registry.py
|
nipeone/histolab
|
78854423df04c95c7168d03a95ae8665e3e957d8
|
[
"Apache-2.0"
] | null | null | null |
histolab/data/_registry.py
|
nipeone/histolab
|
78854423df04c95c7168d03a95ae8665e3e957d8
|
[
"Apache-2.0"
] | null | null | null |
histolab/data/_registry.py
|
nipeone/histolab
|
78854423df04c95c7168d03a95ae8665e3e957d8
|
[
"Apache-2.0"
] | null | null | null |
# flake8: noqa
# in legacy datasets we need to put our sample data within the data dir
legacy_datasets = ["cmu_small_region.svs"]
# Registry of datafiles that can be downloaded along with their SHA256 hashes
# To generate the SHA256 hash, use the command
# openssl sha256 filename
registry = {
"histolab/broken.svs": "b1325916876afa17ad5e02d2e7298ee883e758ed25369470d85bc0990e928e11",
"histolab/kidney.png": "5c6dc1b9ae10a2865302d9c8eda360362ec47732cb3e9766c38ed90cb9f4c371",
"data/cmu_small_region.svs": "ed92d5a9f2e86df67640d6f92ce3e231419ce127131697fbbce42ad5e002c8a7",
"aperio/JP2K-33003-1.svs": "6205ccf75a8fa6c32df7c5c04b7377398971a490fb6b320d50d91f7ba6a0e6fd",
"aperio/JP2K-33003-2.svs": "1a13cef86b55b51127cebd94a1f6069f7de494c98e3e708640d1ce7181d9e3fd",
"tcga/breast/TCGA-A8-A082-01A-01-TS1.3cad4a77-47a6-4658-becf-d8cffa161d3a.svs": "e955f47b83c8a5ae382ff8559493548f90f85c17c86315dd03134c041f44df70",
"tcga/breast/TCGA-A1-A0SH-01Z-00-DX1.90E71B08-E1D9-4FC2-85AC-062E56DDF17C.svs": "6de90fe92400e592839ab7f87c15d9924bc539c61ee3b3bc8ef044f98d16031b",
"tcga/breast/TCGA-E9-A24A-01Z-00-DX1.F0342837-5750-4172-B60D-5F902E2A02FD.svs": "55c694262c4d44b342e08eb3ef2082eeb9e9deeb3cb445e4776419bb9fa7dc21",
"tcga/breast/TCGA-BH-A201-01Z-00-DX1.6D6E3224-50A0-45A2-B231-EEF27CA7EFD2.svs": "e1ccf3360078844abbec4b96c5da59a029a441c1ab6d7f694ec80d9d79bd3837",
"tcga/prostate/TCGA-CH-5753-01A-01-BS1.4311c533-f9c1-4c6f-8b10-922daa3c2e3e.svs": "93ed7aa906c9e127c8241bc5da197902ebb71ccda4db280aefbe0ecd952b9089",
"tcga/ovarian/TCGA-13-1404-01A-01-TS1.cecf7044-1d29-4d14-b137-821f8d48881e.svs": "6796e23af7cd219b9ff2274c087759912529fec9f49e2772a868ba9d85d389d6",
"9798433/?format=tif": "7db49ff9fc3f6022ae334cf019e94ef4450f7d4cf0d71783e0f6ea82965d3a52",
"9798554/?format=tif": "8a4318ac713b4cf50c3314760da41ab7653e10e90531ecd0c787f1386857a4ef",
}
APERIO_REPO_URL = "http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio"
TCGA_REPO_URL = "https://api.gdc.cancer.gov/data"
IDR_REPO_URL = "https://idr.openmicroscopy.org/webclient/render_image_download"
registry_urls = {
"histolab/broken.svs": "https://raw.githubusercontent.com/histolab/histolab/master/tests/fixtures/svs-images/broken.svs",
"histolab/kidney.png": "https://user-images.githubusercontent.com/4196091/100275351-132cc880-2f60-11eb-8cc8-7a3bf3723260.png",
"aperio/JP2K-33003-1.svs": f"{APERIO_REPO_URL}/JP2K-33003-1.svs",
"aperio/JP2K-33003-2.svs": f"{APERIO_REPO_URL}/JP2K-33003-2.svs",
"tcga/breast/TCGA-A8-A082-01A-01-TS1.3cad4a77-47a6-4658-becf-d8cffa161d3a.svs": f"{TCGA_REPO_URL}/ad9ed74a-2725-49e6-bf7a-ef100e299989",
"tcga/breast/TCGA-A1-A0SH-01Z-00-DX1.90E71B08-E1D9-4FC2-85AC-062E56DDF17C.svs": f"{TCGA_REPO_URL}/3845b8bd-cbe0-49cf-a418-a8120f6c23db",
"tcga/breast/TCGA-E9-A24A-01Z-00-DX1.F0342837-5750-4172-B60D-5F902E2A02FD.svs": f"{TCGA_REPO_URL}/682e4d74-2200-4f34-9e96-8dee968b1568",
"tcga/breast/TCGA-BH-A201-01Z-00-DX1.6D6E3224-50A0-45A2-B231-EEF27CA7EFD2.svs": f"{TCGA_REPO_URL}/e70c89a5-1c2f-43f8-b6be-589beea55338",
"tcga/prostate/TCGA-CH-5753-01A-01-BS1.4311c533-f9c1-4c6f-8b10-922daa3c2e3e.svs": f"{TCGA_REPO_URL}/5a8ce04a-0178-49e2-904c-30e21fb4e41e",
"tcga/ovarian/TCGA-13-1404-01A-01-TS1.cecf7044-1d29-4d14-b137-821f8d48881e.svs": f"{TCGA_REPO_URL}/e968375e-ef58-4607-b457-e6818b2e8431",
"9798433/?format=tif": f"{IDR_REPO_URL}/9798433/?format=tif",
"9798554/?format=tif": f"{IDR_REPO_URL}/9798554/?format=tif",
}
legacy_registry = {
("data/" + filename): registry["data/" + filename] for filename in legacy_datasets
}
| 76.914894
| 153
| 0.794467
| 432
| 3,615
| 6.564815
| 0.423611
| 0.032087
| 0.039492
| 0.025388
| 0.351199
| 0.301128
| 0.287024
| 0.268688
| 0.268688
| 0.268688
| 0
| 0.333629
| 0.06556
| 3,615
| 46
| 154
| 78.586957
| 0.505921
| 0.062794
| 0
| 0
| 0
| 0.388889
| 0.84181
| 0.684506
| 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
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1e0dae1b3513d3a8edaa965d13268367fc74f036
| 212
|
py
|
Python
|
models/1-Tom/train/kaggle-hubmap-main/src/02_train/umap.py
|
navekshasood/HuBMAP---Hacking-the-Kidney
|
018100fe4bfa5e8764b9df5a9d188e2c670ac061
|
[
"MIT"
] | null | null | null |
models/1-Tom/train/kaggle-hubmap-main/src/02_train/umap.py
|
navekshasood/HuBMAP---Hacking-the-Kidney
|
018100fe4bfa5e8764b9df5a9d188e2c670ac061
|
[
"MIT"
] | null | null | null |
models/1-Tom/train/kaggle-hubmap-main/src/02_train/umap.py
|
navekshasood/HuBMAP---Hacking-the-Kidney
|
018100fe4bfa5e8764b9df5a9d188e2c670ac061
|
[
"MIT"
] | null | null | null |
import umap
# import umap.umap_ as umap
import pickle
train_data = pickle.load(open("feature_train", "rb"))
test_data = pickle.load(open("feature_test", "rb"))
embedding = umap.UMAP().fit_transform(train_data)
| 23.555556
| 53
| 0.75
| 32
| 212
| 4.75
| 0.4375
| 0.131579
| 0.184211
| 0.236842
| 0.328947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103774
| 212
| 9
| 54
| 23.555556
| 0.8
| 0.117925
| 0
| 0
| 0
| 0
| 0.155914
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1e1194850bf1c9cb226ea7cee2ea3e68d51eaf5f
| 64
|
py
|
Python
|
micro-ecommerce/payment_gateway/__init__.py
|
nelsonwenner/bookstore-api
|
566357e841f97d083400047b604ae5fdf64c7efa
|
[
"MIT"
] | 49
|
2020-08-26T18:32:33.000Z
|
2022-03-28T03:45:00.000Z
|
micro-ecommerce/payment_gateway/__init__.py
|
nelsonwenner/bookstore-api
|
566357e841f97d083400047b604ae5fdf64c7efa
|
[
"MIT"
] | 14
|
2021-01-05T02:32:30.000Z
|
2022-03-12T00:53:38.000Z
|
micro-ecommerce/payment_gateway/__init__.py
|
nelsonwenner/bookstore-api
|
566357e841f97d083400047b604ae5fdf64c7efa
|
[
"MIT"
] | 24
|
2020-08-28T01:56:48.000Z
|
2022-03-28T18:32:23.000Z
|
default_app_config = 'payment_gateway.apps.PaymentGatewayConfig'
| 64
| 64
| 0.890625
| 7
| 64
| 7.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 64
| 1
| 64
| 64
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0.630769
| 0.630769
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1e2fe111cbac19550fa36403d83402b0f4ff2800
| 347
|
py
|
Python
|
panther_ioc_rules/sunburst_sha256_iocs.py
|
panther-labs/panther-cli
|
4e5c0a21570e1a02dada990fd91e324416afac96
|
[
"MIT"
] | 4
|
2019-10-17T19:33:29.000Z
|
2019-10-21T15:23:30.000Z
|
panther_ioc_rules/sunburst_sha256_iocs.py
|
jacknagz/panther-analysis
|
fceab78ba5624136776596ee1b25fa0dc8a02a42
|
[
"Apache-2.0"
] | null | null | null |
panther_ioc_rules/sunburst_sha256_iocs.py
|
jacknagz/panther-analysis
|
fceab78ba5624136776596ee1b25fa0dc8a02a42
|
[
"Apache-2.0"
] | null | null | null |
from panther_iocs import SUNBURST_SHA256_IOCS, ioc_match
def rule(event):
return any(ioc_match(event.get("p_any_sha256_hashes"), SUNBURST_SHA256_IOCS))
def title(event):
hashes = ",".join(ioc_match(event.get("p_any_sha256_hashes"), SUNBURST_SHA256_IOCS))
return f"Sunburst Indicator of Compromise Detected [SHA256 hash]: {hashes}"
| 31.545455
| 88
| 0.769452
| 51
| 347
| 4.921569
| 0.470588
| 0.167331
| 0.215139
| 0.12749
| 0.398406
| 0.398406
| 0.398406
| 0.398406
| 0.398406
| 0.398406
| 0
| 0.058824
| 0.118156
| 347
| 10
| 89
| 34.7
| 0.761438
| 0
| 0
| 0
| 0
| 0
| 0.299712
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 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
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
1e82a2e65e1b2723a928d80fb55eaebd1e00c3cf
| 157
|
py
|
Python
|
recette/__init__.py
|
pennacchio/recette
|
1749b0d7763498420102588e377d1c68fd0df19f
|
[
"MIT"
] | null | null | null |
recette/__init__.py
|
pennacchio/recette
|
1749b0d7763498420102588e377d1c68fd0df19f
|
[
"MIT"
] | null | null | null |
recette/__init__.py
|
pennacchio/recette
|
1749b0d7763498420102588e377d1c68fd0df19f
|
[
"MIT"
] | null | null | null |
from recette.steps import prep_step_dummy, prep_step_other
from recette.utils import combine
# Package version single source of truth
__version__ = "0.2.1"
| 26.166667
| 58
| 0.815287
| 25
| 157
| 4.8
| 0.76
| 0.183333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021898
| 0.127389
| 157
| 5
| 59
| 31.4
| 0.854015
| 0.242038
| 0
| 0
| 0
| 0
| 0.042735
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1e8567be9870d63385b355af8801e4fe48be9f55
| 2,491
|
py
|
Python
|
app_code/models.py
|
sivarki/hjarnuc
|
4acc9437af0f0fdc44d68dd0d6923e1039a4911b
|
[
"Apache-2.0"
] | null | null | null |
app_code/models.py
|
sivarki/hjarnuc
|
4acc9437af0f0fdc44d68dd0d6923e1039a4911b
|
[
"Apache-2.0"
] | null | null | null |
app_code/models.py
|
sivarki/hjarnuc
|
4acc9437af0f0fdc44d68dd0d6923e1039a4911b
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
from app_asset.models import Host
# Create your models here.
class Project(models.Model):
project_name = models.CharField(max_length=32,unique=True)
project_msg = models.CharField(max_length=64,null=True)
def __unicode__(self):
return self.project_name
class GitCode(models.Model):
git_name = models.CharField(max_length=64,unique=True)
git_msg = models.CharField(max_length=64, null=True)
git_language = models.CharField(max_length=64, null=True)
project = models.ForeignKey(to='Project',on_delete=models.SET_NULL,null=True)
git_url = models.CharField(max_length=128,unique=True)
git_user = models.CharField(max_length=64, null=True)
git_passwd = models.CharField(max_length=64, null=True)
git_sshkey = models.TextField( null=True)
def __unicode__(self):
return self.git_name
class Publist(models.Model):
gitcode = models.ForeignKey(to='GitCode',on_delete=models.CASCADE)
host_ip = models.ForeignKey(to=Host,on_delete=models.CASCADE)
publist_dir = models.CharField(max_length=128)
publist_msg = models.CharField(max_length=128,null=True)
current_version = models.CharField(max_length=64,null=True)
version_info = models.CharField(max_length=512,null=True)
author = models.CharField(max_length=64,null=True)
publist_date = models.CharField(max_length=64,null=True)
update_time = models.DateTimeField(auto_now=True,null=True)
def __unicode__(self):
return self.gitcode
class PublistRecord(models.Model):
publist = models.ForeignKey(to='Publist',on_delete=models.CASCADE)
current_version = models.CharField(max_length=64,null=True)
version_info = models.CharField(max_length=1024, null=True)
author = models.CharField(max_length=64, null=True)
publist_date = models.CharField(max_length=64, null=True)
update_time = models.DateTimeField(auto_now_add=True,null=True)
up_content = models.TextField(null=True)
def __unicode__(self):
return self.publist
class Wchartlog(models.Model):
site_name = models.CharField(max_length=64, null=True)
from_user = models.CharField(max_length=64, null=True)
content= models.CharField(max_length=2048, null=True)
up_id = models.CharField(max_length=64, null=True)
status = models.CharField(max_length=64, default="waiting")
add_time = models.DateTimeField(auto_now_add=True,null=True)
def __unicode__(self):
return self.Site_name
| 38.323077
| 81
| 0.747491
| 350
| 2,491
| 5.085714
| 0.197143
| 0.107865
| 0.232584
| 0.310112
| 0.63427
| 0.556742
| 0.53764
| 0.466854
| 0.324719
| 0.238202
| 0
| 0.025257
| 0.14171
| 2,491
| 64
| 82
| 38.921875
| 0.807297
| 0.009635
| 0
| 0.22449
| 0
| 0
| 0.011387
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.102041
| false
| 0.020408
| 0.040816
| 0.102041
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
1ea1ff4cca16c27755d779c438a0f766e3f0597f
| 91
|
py
|
Python
|
pyproc/views/__init__.py
|
cmin764/pyproc
|
be69b5a35fbe3818accea472735effec0825f17c
|
[
"MIT"
] | null | null | null |
pyproc/views/__init__.py
|
cmin764/pyproc
|
be69b5a35fbe3818accea472735effec0825f17c
|
[
"MIT"
] | null | null | null |
pyproc/views/__init__.py
|
cmin764/pyproc
|
be69b5a35fbe3818accea472735effec0825f17c
|
[
"MIT"
] | null | null | null |
"""All views and routes exposed by the pyproc web app."""
from . import (
message,
)
| 13
| 57
| 0.637363
| 13
| 91
| 4.461538
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241758
| 91
| 6
| 58
| 15.166667
| 0.84058
| 0.56044
| 0
| 0
| 0
| 0
| 0
| 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
|
1ed6c472a3e3ebca7687498a3cd8af7d6986cd28
| 3,653
|
py
|
Python
|
kaze_project/preprocessing.py
|
Albert-Aiqi-Zhang/Typhoon-Web-Application
|
b464e4cf21a33d0ee10ea625bda6be446f4fe352
|
[
"MIT"
] | null | null | null |
kaze_project/preprocessing.py
|
Albert-Aiqi-Zhang/Typhoon-Web-Application
|
b464e4cf21a33d0ee10ea625bda6be446f4fe352
|
[
"MIT"
] | null | null | null |
kaze_project/preprocessing.py
|
Albert-Aiqi-Zhang/Typhoon-Web-Application
|
b464e4cf21a33d0ee10ea625bda6be446f4fe352
|
[
"MIT"
] | null | null | null |
import numpy as np
import pandas as pd
from datetime import datetime
from pandas.io import sql
import pymysql
import csv
import os
import sys
import pymysql
df1 = pd.read_csv("../database_engineering/data_of_typhoon/table2001.csv", encoding="SHIFT-JIS")
f = lambda x: datetime(x["年"], x["月"], x["日"], x["時(UTC)"], 0, 0)
df1["datetime"] = df1.apply(f, axis=1)
df1.drop(columns=["年", "月", "日", "時(UTC)"], inplace=True)
df1_new = df1.iloc[:,[14,0,1,2,3,4,5,6,7,8,9,10,11,12,13]]
df1_new.columns = ["datetime", "typhoon_number", "typhoon_name", "class", "latitude", "longitude", "center_pressure",
"max_velocity", "50KT_major_direction", "50KT_major", "50KT_minor",
"30KT_major_direction", "30KT_major", "30KT_minor", "landing"]
df1_new.to_csv("../database_engineering/data_after/table2001.csv")
f = lambda x: datetime(x["年"], x["月"], x["日"], x["時(UTC)"], 0, 0)
for i in range(2, 19):
if i < 10:
r = "0" + str(i)
else:
r = str(i)
df = pd.read_csv("../database_engineering/data_of_typhoon/table20" + r + ".csv", encoding="SHIFT-JIS")
df["datetime"] = df.apply(f, axis=1)
df.drop(columns=["年", "月", "日", "時(UTC)"], inplace=True)
df_new = df.iloc[:,[14,0,1,2,3,4,5,6,7,8,9,10,11,12,13]]
df_new.columns = ["datetime", "typhoon_number", "typhoon_name", "class", "latitude", "longitude", "center_pressure",
"max_velocity", "50KT_major_direction", "50KT_major", "50KT_minor",
"30KT_major_direction", "30KT_major", "30KT_minor", "landing"]
df_new.to_csv("../database_engineering/data_after/table20" + r + ".csv")
pymysql.install_as_MySQLdb()
data = pd.read_csv("../database_engineering/data_after/table2001.csv")
db = MySQLdb.connect(host = "localhost", user = "root",
passwd = "12345678", db = "kaze", charset = "utf8")
conn = MySQLdb.Connection(host = 'localhost',user = 'root',password = '12345678',port = 3306,
database = 'kaze')
#sql.to_sql(data, 'train', db)
#db.close()
cur = pymysql.cursors.Cursor(connection = conn)
cur.execute("""
create table tbl01(
id int auto_increment primary key,
dtime datetime,
typhoon_number int,
typhoon_name varchar(256),
class int,
latitude float,
longitude float,
center_pressure int,
max_velocity int,
50KT_major_direction int,
50KT_major int,
50KT_minor int,
30KT_major_direction int,
30KT_major int,
30KT_minor int,
landing int)""")
conn.commit()
data = pd.read_csv('../database_engineering/data_after/table2001.csv')
data = data.astype(str).iloc[:, 1:].values.tolist()
cur.executemany("insert into tbl01 values(null, %s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)", data)
conn.commit()
local_dir=r'../database_engineering/data_after/table2001.csv'
csv_reader(local_dir)
for i in range(2, 19):
if i < 10:
r = "0" + str(i)
else:
r = str(i)
cur = pymysql.cursors.Cursor(connection = conn)
cur.execute("""
create table tbl""" + r + """(
id int auto_increment primary key,
dtime datetime,
typhoon_number int,
typhoon_name varchar(256),
class int,
latitude float,
longitude float,
center_pressure int,
max_velocity int,
50KT_major_direction int,
50KT_major int,
50KT_minor int,
30KT_major_direction int,
30KT_major int,
30KT_minor int,
landing int)""")
conn.commit()
data = pd.read_csv("../database_engineering/data_after/table20" + r + ".csv")
data = data.astype(str).iloc[:, 1:].values.tolist()
cur.executemany("insert into tbl" + r + " values(null, %s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)", data)
conn.commit()
| 34.140187
| 120
| 0.644949
| 547
| 3,653
| 4.14808
| 0.244973
| 0.02468
| 0.034376
| 0.042309
| 0.776113
| 0.776113
| 0.758484
| 0.735126
| 0.67695
| 0.651388
| 0
| 0.05738
| 0.174651
| 3,653
| 107
| 121
| 34.140187
| 0.695191
| 0.010676
| 0
| 0.645161
| 0
| 0.021505
| 0.478826
| 0.128979
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.021505
| 0.096774
| 0
| 0.096774
| 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
|
1ee389ea08e9dc83d962636990f89404cc255720
| 99
|
py
|
Python
|
package/niflow/ants/brainextraction/__init__.py
|
rciric/poldracklab-antsbrainextraction
|
78544a1b72b4b9b505c3a72654990789fad554a4
|
[
"BSD-3-Clause"
] | null | null | null |
package/niflow/ants/brainextraction/__init__.py
|
rciric/poldracklab-antsbrainextraction
|
78544a1b72b4b9b505c3a72654990789fad554a4
|
[
"BSD-3-Clause"
] | 1
|
2018-11-06T17:31:13.000Z
|
2018-11-06T17:31:13.000Z
|
package/niflow/ants/brainextraction/__init__.py
|
rciric/poldracklab-antsbrainextraction
|
78544a1b72b4b9b505c3a72654990789fad554a4
|
[
"BSD-3-Clause"
] | 2
|
2018-10-20T03:11:24.000Z
|
2018-11-23T11:46:28.000Z
|
from .__about__ import __version__
from .workflows.brainextraction import init_brain_extraction_wf
| 33
| 63
| 0.888889
| 12
| 99
| 6.416667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080808
| 99
| 2
| 64
| 49.5
| 0.846154
| 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
|
9495752f36e07120a23f8cb91134e78a77ef6722
| 10,896
|
py
|
Python
|
hungarian_tf_tests.py
|
shaolinkhoa/rec-attend-public
|
678407e98fcd4c3b72f101dda3e4bc8c120bca0f
|
[
"MIT"
] | 118
|
2017-04-10T00:41:31.000Z
|
2022-03-28T09:34:28.000Z
|
hungarian_tf_tests.py
|
shaolinkhoa/rec-attend-public
|
678407e98fcd4c3b72f101dda3e4bc8c120bca0f
|
[
"MIT"
] | 10
|
2017-10-02T04:23:27.000Z
|
2022-03-09T08:09:12.000Z
|
hungarian_tf_tests.py
|
shaolinkhoa/rec-attend-public
|
678407e98fcd4c3b72f101dda3e4bc8c120bca0f
|
[
"MIT"
] | 51
|
2017-05-23T02:46:16.000Z
|
2021-10-09T05:21:34.000Z
|
import numpy as np
import tensorflow as tf
import unittest
hungarian_module = tf.load_op_library("hungarian.so")
class HungarianTests(unittest.TestCase):
def test_min_weighted_bp_cover_1(self):
W = np.array([[3, 2, 2], [1, 2, 0], [2, 2, 1]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
c_0 = c_0.eval()
c_1 = c_1.eval()
c_0_t = np.array([2, 1, 1])
c_1_t = np.array([1, 1, 0])
M_t = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
self.assertTrue((c_0.flatten() == c_0_t.flatten()).all())
self.assertTrue((c_1.flatten() == c_1_t.flatten()).all())
self.assertTrue((M == M_t).all())
pass
def test_min_weighted_bp_cover_2(self):
W = np.array([[5, 0, 4, 0], [0, 4, 6, 8], [4, 0, 5, 7]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
c_0 = c_0.eval()
c_1 = c_1.eval()
c_0_t = np.array([5, 6, 5])
c_1_t = np.array([0, 0, 0, 2])
M_t = np.array([[1, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]])
self.assertTrue((c_0.flatten() == c_0_t.flatten()).all())
self.assertTrue((c_1.flatten() == c_1_t.flatten()).all())
self.assertTrue((M == M_t).all())
def test_min_weighted_bp_cover_3(self):
W = np.array([[5, 0, 2], [3, 1, 0], [0, 5, 0]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
c_0 = c_0.eval()
c_1 = c_1.eval()
c_0_t = np.array([2, 0, 4])
c_1_t = np.array([3, 1, 0])
M_t = np.array([[0, 0, 1], [1, 0, 0], [0, 1, 0]])
self.assertTrue((c_0.flatten() == c_0_t.flatten()).all())
self.assertTrue((c_1.flatten() == c_1_t.flatten()).all())
self.assertTrue((M == M_t).all())
def test_min_weighted_bp_cover_4(self):
W = np.array([[[5, 0, 2], [3, 1, 0], [0, 5, 0]], [[3, 2, 2], [1, 2, 0],
[2, 2, 1]]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
c_0 = c_0.eval()
c_1 = c_1.eval()
c_0_t = np.array([[2, 0, 4], [2, 1, 1]])
c_1_t = np.array([[3, 1, 0], [1, 1, 0]])
M_t = np.array([[[0, 0, 1], [1, 0, 0], [0, 1, 0]], [[1, 0, 0], [0, 1, 0],
[0, 0, 1]]])
self.assertTrue((c_0.flatten() == c_0_t.flatten()).all())
self.assertTrue((c_1.flatten() == c_1_t.flatten()).all())
self.assertTrue((M == M_t).all())
def test_real_values_1(self):
# Test the while loop terminates with real values.
W = np.array(
[[0.90, 0.70, 0.30, 0.20, 0.40, 0.001, 0.001, 0.001, 0.001, 0.001],
[0.80, 0.75, 0.92, 0.10, 0.15, 0.001, 0.001, 0.001, 0.001, 0.001],
[0.78, 0.85, 0.66, 0.29, 0.21, 0.001, 0.001, 0.001, 0.001, 0.001],
[0.42, 0.55, 0.23, 0.43, 0.33, 0.002, 0.001, 0.001, 0.001, 0.001],
[0.64, 0.44, 0.33, 0.33, 0.34, 0.001, 0.002, 0.001, 0.001, 0.001],
[0.22, 0.55, 0.43, 0.43, 0.14, 0.001, 0.001, 0.002, 0.001, 0.001],
[0.43, 0.33, 0.34, 0.22, 0.14, 0.001, 0.001, 0.001, 0.002, 0.001],
[0.33, 0.42, 0.23, 0.13, 0.43, 0.001, 0.001, 0.001, 0.001, 0.002],
[0.39, 0.24, 0.53, 0.56, 0.89, 0.001, 0.001, 0.001, 0.001, 0.001],
[0.12, 0.34, 0.82, 0.82, 0.77, 0.001, 0.001, 0.001, 0.001, 0.001]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
M_t = np.array(
[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0]])
self.assertTrue((M == M_t).all())
def test_real_values_2(self):
W = np.array([[
0.00604139, 0.0126045, 0.0117373, 0.01245, 0.00808836, 0.0162662,
0.0137996, 0.00403898, 0.0123786, 1e-05
], [
0.00604229, 0.0126071, 0.0117400, 0.0124528, 0.00808971, 0.0162703,
0.0138028, 0.00403935, 0.0123812, 1e-05
], [
0.00604234, 0.0126073, 0.0117402, 0.012453, 0.00808980, 0.0162706,
0.0138030, 0.00403937, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
], [
0.00604235, 0.0126073, 0.0117402, 0.012453, 0.00808981, 0.0162706,
0.0138030, 0.00403938, 0.0123814, 1e-05
]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
def test_real_values_3(self):
W = np.array([[
0.00302646, 0.00321431, 0.0217552, 0.00836773, 0.0256353, 0.0177026,
0.0289461, 0.0214768, 0.0101898, 1e-05
], [
0.00302875, 0.003217, 0.0217628, 0.00836405, 0.0256229, 0.0177137,
0.0289468, 0.0214719, 0.0101904, 1e-05
], [
0.00302897, 0.00321726, 0.0217636, 0.00836369, 0.0256217, 0.0177148,
0.0289468, 0.0214714, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.0177149,
0.0289468, 0.0214713, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.0177149,
0.0289468, 0.0214713, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.017715,
0.0289468, 0.0214713, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.017715,
0.0289468, 0.0214713, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.017715,
0.0289468, 0.0214713, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.017715,
0.0289468, 0.0214713, 0.0101905, 1e-05
], [
0.003029, 0.0032173, 0.0217637, 0.00836364, 0.0256216, 0.017715,
0.0289468, 0.0214713, 0.0101905, 1e-05
]])
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
def test_real_values_4(self):
W = np.array([[
1e-05, 0.0634311, 1e-05, 4.76687e-05, 1.00079e-05, 1.00378e-05, 1e-05,
1e-05, 1e-05, 3.9034e-05
], [
1e-05, 3.42696e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1.0122e-05,
3.43236e-05, 1e-05
], [
1e-05, 0.0426792, 0.031155, 1.0008e-05, 0.00483961, 0.0228187, 1e-05,
1e-05, 1e-05, 0.102463
], [
1e-05, 1e-05, 1e-05, 1.07065e-05, 1e-05, 1.00185e-05, 1e-05, 1e-05,
1e-05, 1.00007e-05
], [
1e-05, 4.22947e-05, 0.00062168, 0.623917, 1.03468e-05, 0.00588984,
1.00004e-05, 1.44433e-05, 1.00014e-05, 0.000213425
], [
1e-05, 1.01764e-05, 1e-05, 0.000667249, 1e-05, 0.000485082, 1e-05,
1e-05, 1.00002e-05, 1e-05
], [
1e-05, 1e-05, 1.50331e-05, 1e-05, 0.11269, 1e-05, 1e-05, 1e-05, 1e-05,
1.13251e-05
], [
1.0001e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 0.0246974, 1e-05, 1e-05,
1e-05
], [
1e-05, 2.89144e-05, 1e-05, 1.05147e-05, 1e-05, 0.000894762, 1.03587e-05,
0.150301, 1e-05, 1.00045e-05
], [
1e-05, 3.97901e-05, 1e-05, 1.11641e-05, 1e-05, 2.34249e-05, 1.0007e-05,
2.42828e-05, 1e-05, 1.10529e-05
]])
p = 1e6
W = np.round(W * p) / p
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
def test_real_values_5(self):
W = np.array([[
1.4e-05, 1e-05, 1e-05, 0.053306, 0.044139, 1e-05, 1.2e-05, 1e-05, 1e-05,
1e-05
], [
0.001234, 1e-05, 1e-05, 2.1e-05, 1e-05, 0.001535, 0.019553, 1e-05,
1e-05, 1e-05
], [
0.002148, 1e-05, 1e-05, 1.6e-05, 0.651536, 2e-05, 7.4e-05, 0.002359,
1e-05, 1e-05
], [
3.8e-05, 1e-05, 0.000592, 4.7e-05, 0.09173, 1e-05, 1e-05, 1e-05, 1e-05,
1e-05
], [
1e-05, 1e-05, 1e-05, 0.213736, 1e-05, 4.5e-05, 0.000768, 1e-05, 1e-05,
1e-05
], [
1e-05, 1e-05, 1e-05, 0.317609, 1e-05, 1e-05, 0.002151, 1e-05, 1e-05,
1e-05
], [
0.002802, 1e-05, 1.2e-05, 1e-05, 1e-05, 0.002999, 4.8e-05, 1.1e-05,
0.000919, 1e-05
], [
1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 0.028816, 1e-05
], [
1e-05, 1e-05, 0.047335, 1e-05, 1.2e-05, 1e-05, 1e-05, 1e-05, 1e-05,
1e-05
], [1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05]])
p = 1e6
W = np.round(W * p) / p
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
def test_real_values_6(self):
W = np.array([[
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
], [
0.003408, 0.010531, 0.002795, 1e-05, 0.019786, 0.010435, 0.002743,
0.023617, 0.010436, 0.003116
]])
p = 1e6
W = np.round(W * p) / p
M, c_0, c_1 = hungarian_module.hungarian(W)
with tf.Session() as sess:
M = M.eval()
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(HungarianTests)
unittest.TextTestRunner(verbosity=2).run(suite)
| 38.638298
| 80
| 0.532489
| 2,017
| 10,896
| 2.80466
| 0.121963
| 0.108185
| 0.102881
| 0.106063
| 0.741382
| 0.712745
| 0.697366
| 0.677391
| 0.660597
| 0.635849
| 0
| 0.467646
| 0.262482
| 10,896
| 281
| 81
| 38.775801
| 0.236312
| 0.004405
| 0
| 0.633588
| 0
| 0
| 0.001844
| 0
| 0
| 0
| 0
| 0
| 0.049618
| 1
| 0.038168
| false
| 0.003817
| 0.01145
| 0
| 0.053435
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bf4f56cdd7d1ed2026205e05256522ca0fa0a56b
| 157
|
py
|
Python
|
testreport/views.py
|
mikiec84/badger-api
|
d0764fa0fd35ebfd7581e2a0218b59be9d13e814
|
[
"MIT"
] | null | null | null |
testreport/views.py
|
mikiec84/badger-api
|
d0764fa0fd35ebfd7581e2a0218b59be9d13e814
|
[
"MIT"
] | 2
|
2021-03-19T23:41:57.000Z
|
2021-06-10T23:08:34.000Z
|
testreport/views.py
|
gaybro8777/badger-api
|
d0764fa0fd35ebfd7581e2a0218b59be9d13e814
|
[
"MIT"
] | null | null | null |
from django.views.generic import TemplateView
import logging
log = logging.getLogger(__name__)
class Base(TemplateView):
template_name = 'base.html'
| 15.7
| 45
| 0.77707
| 19
| 157
| 6.157895
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140127
| 157
| 9
| 46
| 17.444444
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0.057325
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
bf6fa3bac8a01bbe20117acf8a4c0088fe713ca1
| 94
|
py
|
Python
|
_playground/in_progress/sand.py
|
the-deep/DEEPL
|
93f7bf7d61d7424250d01c1fc510347375d767c4
|
[
"MIT"
] | 6
|
2018-05-17T07:40:16.000Z
|
2020-09-27T00:04:39.000Z
|
_playground/in_progress/sand.py
|
eoglethorpe/DEEPL
|
fb6403ceb63197ecd314905f060a2e5f1e790f66
|
[
"MIT"
] | 11
|
2017-10-28T10:50:09.000Z
|
2021-06-10T20:07:44.000Z
|
_playground/in_progress/sand.py
|
eoglethorpe/DEEPL
|
fb6403ceb63197ecd314905f060a2e5f1e790f66
|
[
"MIT"
] | 1
|
2018-10-04T21:27:58.000Z
|
2018-10-04T21:27:58.000Z
|
import nltk
txt = nltk.data.load('/Users/ewanog/Dropbox/Work/ACAPS/nlp/text.txt')
print(txt)
| 18.8
| 69
| 0.744681
| 16
| 94
| 4.375
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074468
| 94
| 5
| 70
| 18.8
| 0.804598
| 0
| 0
| 0
| 0
| 0
| 0.473684
| 0.473684
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bf81bc3381e26a30b7c9fc6ffec6fbb0d14885b5
| 223
|
py
|
Python
|
tests/unit/conftest.py
|
stefanhoelzl/synopse
|
07e5966b675d85d60e2e2484a62780a5735b2ed9
|
[
"MIT"
] | 1
|
2021-03-09T23:04:28.000Z
|
2021-03-09T23:04:28.000Z
|
tests/unit/conftest.py
|
stefanhoelzl/synopse
|
07e5966b675d85d60e2e2484a62780a5735b2ed9
|
[
"MIT"
] | null | null | null |
tests/unit/conftest.py
|
stefanhoelzl/synopse
|
07e5966b675d85d60e2e2484a62780a5735b2ed9
|
[
"MIT"
] | null | null | null |
import pytest
from synopse.core.component import Component
@pytest.fixture
def create_component_class():
def wrapper(**attributes):
return type("ComponentToTest", (Component,), attributes)
return wrapper
| 20.272727
| 64
| 0.744395
| 24
| 223
| 6.833333
| 0.625
| 0.195122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161435
| 223
| 10
| 65
| 22.3
| 0.877005
| 0
| 0
| 0
| 0
| 0
| 0.067265
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| true
| 0
| 0.285714
| 0.142857
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
bf85f9843114f2752dcbb7c6b3b62f76bd08b491
| 65
|
py
|
Python
|
maskrcnn_benchmark/layers/nv_decode.py
|
DeLightCMU/MAL
|
a03d4d3ed2ea4200ac6b4c6d980f3138b29d94ee
|
[
"MIT"
] | 13
|
2020-09-05T11:15:10.000Z
|
2021-07-26T08:12:28.000Z
|
maskrcnn_benchmark/layers/nv_decode.py
|
DeLightCMU/MAL
|
a03d4d3ed2ea4200ac6b4c6d980f3138b29d94ee
|
[
"MIT"
] | null | null | null |
maskrcnn_benchmark/layers/nv_decode.py
|
DeLightCMU/MAL
|
a03d4d3ed2ea4200ac6b4c6d980f3138b29d94ee
|
[
"MIT"
] | 3
|
2020-11-26T03:54:58.000Z
|
2021-07-26T08:12:33.000Z
|
from maskrcnn_benchmark import _C
nv_decode = _C.nv_decode
| 13
| 34
| 0.769231
| 10
| 65
| 4.5
| 0.7
| 0.133333
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 65
| 4
| 35
| 16.25
| 0.865385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 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
|
bfb85d17f6e0ab716ca4bbd2add6c9b6f94d89d2
| 193
|
py
|
Python
|
gesund_projekt/goals/apps.py
|
asis2016/gesund-projekt
|
cb3828b69cd6a86deeab16943e38b6ebffd86abb
|
[
"MIT"
] | null | null | null |
gesund_projekt/goals/apps.py
|
asis2016/gesund-projekt
|
cb3828b69cd6a86deeab16943e38b6ebffd86abb
|
[
"MIT"
] | null | null | null |
gesund_projekt/goals/apps.py
|
asis2016/gesund-projekt
|
cb3828b69cd6a86deeab16943e38b6ebffd86abb
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class GoalsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'goals'
def ready(self):
import goals.signals
| 19.3
| 56
| 0.709845
| 23
| 193
| 5.869565
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202073
| 193
| 9
| 57
| 21.444444
| 0.876623
| 0
| 0
| 0
| 0
| 0
| 0.176166
| 0.150259
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| 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
|
bfbd189f10fcefca4808cf48f9603e4302832b63
| 141
|
py
|
Python
|
wireciendpoint/__init__.py
|
frawhst/gooncogs
|
2301ba28b58c4d039c5064a9a014503e224578a4
|
[
"MIT"
] | 2
|
2021-10-06T08:05:01.000Z
|
2021-10-06T15:25:40.000Z
|
wireciendpoint/__init__.py
|
frawhst/gooncogs
|
2301ba28b58c4d039c5064a9a014503e224578a4
|
[
"MIT"
] | null | null | null |
wireciendpoint/__init__.py
|
frawhst/gooncogs
|
2301ba28b58c4d039c5064a9a014503e224578a4
|
[
"MIT"
] | 5
|
2021-09-11T23:44:44.000Z
|
2022-03-26T09:54:13.000Z
|
from redbot.core.bot import Red
from .wireciendpoint import WireCiEndpoint
async def setup(bot: Red):
bot.add_cog(WireCiEndpoint(bot))
| 20.142857
| 42
| 0.780142
| 20
| 141
| 5.45
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134752
| 141
| 6
| 43
| 23.5
| 0.893443
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
bfcc4f518da87f16b5f8343fa7b78b630d66d22a
| 226
|
py
|
Python
|
scvi/external/__init__.py
|
njbernstein/scvi-tools
|
8c3ca358418d7dd1da5244dd9c3652a4a8cbe3c2
|
[
"BSD-3-Clause"
] | 398
|
2017-10-11T06:19:23.000Z
|
2020-09-14T02:46:25.000Z
|
scvi/external/__init__.py
|
njbernstein/scvi-tools
|
8c3ca358418d7dd1da5244dd9c3652a4a8cbe3c2
|
[
"BSD-3-Clause"
] | 708
|
2017-11-13T14:51:21.000Z
|
2020-09-16T21:09:19.000Z
|
scvi/external/__init__.py
|
njbernstein/scvi-tools
|
8c3ca358418d7dd1da5244dd9c3652a4a8cbe3c2
|
[
"BSD-3-Clause"
] | 154
|
2017-10-16T06:53:59.000Z
|
2020-09-11T23:06:30.000Z
|
from .cellassign import CellAssign
from .gimvi import GIMVI
from .solo import SOLO
from .stereoscope import RNAStereoscope, SpatialStereoscope
__all__ = ["SOLO", "GIMVI", "RNAStereoscope", "SpatialStereoscope", "CellAssign"]
| 32.285714
| 81
| 0.792035
| 23
| 226
| 7.608696
| 0.391304
| 0.365714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110619
| 226
| 6
| 82
| 37.666667
| 0.870647
| 0
| 0
| 0
| 0
| 0
| 0.225664
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bfd3022becdddafa973c831885d554772e936813
| 1,131
|
py
|
Python
|
database/wowaccounts/models.py
|
DiegoLing33/prestij.xyz-api
|
69a11a2c93dd98975f9becbc4b8f596e4941a05f
|
[
"MIT"
] | null | null | null |
database/wowaccounts/models.py
|
DiegoLing33/prestij.xyz-api
|
69a11a2c93dd98975f9becbc4b8f596e4941a05f
|
[
"MIT"
] | null | null | null |
database/wowaccounts/models.py
|
DiegoLing33/prestij.xyz-api
|
69a11a2c93dd98975f9becbc4b8f596e4941a05f
|
[
"MIT"
] | null | null | null |
# ██╗░░░░░██╗███╗░░██╗░██████╗░░░░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
# ██║░░░░░██║████╗░██║██╔════╝░░░░██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
# ██║░░░░░██║██╔██╗██║██║░░██╗░░░░██████╦╝██║░░░░░███████║██║░░╚═╝█████═╝░
# ██║░░░░░██║██║╚████║██║░░╚██╗░░░██╔══██╗██║░░░░░██╔══██║██║░░██╗██╔═██╗░
# ███████╗██║██║░╚███║╚██████╔╝░░░██████╦╝███████╗██║░░██║╚█████╔╝██║░╚██╗
# ╚══════╝╚═╝╚═╝░░╚══╝░╚═════╝░░░░╚═════╝░╚══════╝╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝
#
# Developed by Yakov V. Panov (C) Ling • Black 2020
# @site http://ling.black
from sqlalchemy import Column, Integer, ForeignKey, String, Boolean
from sqlalchemy.orm import relationship
from database import Base
from database.core.models import CoreModel
from database.wow.models import BlizzardUserModel
class WAccountModel(Base, CoreModel):
__tablename__ = 'waccounts'
user_id = Column(Integer, ForeignKey("blizzard_users.blizzard_id"))
wow_id = Column(Integer)
name = Column(String)
realm_id = Column(Integer)
realm_title = Column(String)
level = Column(Integer)
faction = Column(String)
user = relationship(BlizzardUserModel)
| 37.7
| 75
| 0.445623
| 88
| 1,131
| 10.534091
| 0.545455
| 0.070119
| 0.048544
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004
| 0.115827
| 1,131
| 29
| 76
| 39
| 0.49
| 0.458002
| 0
| 0
| 0
| 0
| 0.05814
| 0.043189
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
449f491f827ed537119e735ca9342e37bea7d015
| 1,559
|
py
|
Python
|
2021-08/demo001.py
|
zhouyuanmin/MyDemo
|
664977a6243992c77931e58b98f5262745759d1a
|
[
"MIT"
] | null | null | null |
2021-08/demo001.py
|
zhouyuanmin/MyDemo
|
664977a6243992c77931e58b98f5262745759d1a
|
[
"MIT"
] | null | null | null |
2021-08/demo001.py
|
zhouyuanmin/MyDemo
|
664977a6243992c77931e58b98f5262745759d1a
|
[
"MIT"
] | null | null | null |
sql_1 = """INSERT INTO `pt_exam`.`user_order` (`id`, `exam_id`, `user_id`, `order_number`, `pre_pay_number`, `entry_fee`, `actual_pay_fee`, `status`, `pay_url`, `pay_time`, `create_time`) VALUES (NULL, {exam_id}, {user_id}, 'zsyl20210811103413909170a3{user_id}{exam_id}', NULL, 1, 1, 1, 'weixin://wxpay/bizpayurl?pr=hDqke8nzz', '2021-08-11 12:00:00.000000', '2021-08-11 12:00:00');"""
sql_2 = """INSERT INTO `pt_exam`.`user_exam` (`id`, `exam_id`, `user_id`, `room_id`, `step`, `id_photo_url`, `ticket_no`, `ticket_url`, `level`, `flag`, `certificate_url`, `certificate_no`, `create_time`, `resit_flag`) VALUES (null, {exam_id}, {user_id}, NULL, 1, NULL, NULL, NULL, NULL, 0, NULL, NULL, '2021-08-11 12:00:00', 0);"""
# 配置
exam_id = 34
# 初级认证的人
# user_ids = [873, 1152, 1153, 1154, 1155, 1156, 1157, 1159, 264, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 535, 1180, 925, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 543, 297, 1194, 171, 1196, 1197, 1198, 1201, 1202, 1203, 1205, 1206, 1181, 1207, 1208, 574, 459, 1160, 849, 478, 873, 1005, 622, 249, 762, 252, 1149, 1150, 1151]
# 中级认证
# user_ids = [480, 292, 581, 305, 819, 189, 537, 475, 348, 349, 1196, 1183, 1005]
user_ids = [1211]
# 陈默 1196
# 周源苠 1183
# 廖敏 1208
# 刁青青 1005
# 冯丹 1207
user_ids = list(set(user_ids))
# user_order表
for user_id in user_ids:
print(sql_1.format(exam_id=exam_id, user_id=user_id))
# user_exam表
for user_id in user_ids:
print(sql_2.format(exam_id=exam_id, user_id=user_id))
# print(user_ids)
| 64.958333
| 411
| 0.673509
| 272
| 1,559
| 3.650735
| 0.518382
| 0.066465
| 0.064451
| 0.072508
| 0.271903
| 0.217523
| 0.11279
| 0.11279
| 0.060423
| 0
| 0
| 0.302446
| 0.134702
| 1,559
| 23
| 412
| 67.782609
| 0.433655
| 0.375241
| 0
| 0.222222
| 0
| 0.222222
| 0.716667
| 0.135417
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.222222
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
44a539f8897e3cf939be64e4260e6de784c27227
| 4,559
|
py
|
Python
|
tests/test_resource_library_parser.py
|
tervay/the-blue-alliance
|
e14c15cb04b455f90a2fcfdf4c1cdbf8454e17f8
|
[
"MIT"
] | 266
|
2015-01-04T00:10:48.000Z
|
2022-03-28T18:42:05.000Z
|
tests/test_resource_library_parser.py
|
gregmarra/the-blue-alliance
|
5bedaf5c80b4623984760d3da3289640639112f9
|
[
"MIT"
] | 2,673
|
2015-01-01T20:14:33.000Z
|
2022-03-31T18:17:16.000Z
|
tests/test_resource_library_parser.py
|
gregmarra/the-blue-alliance
|
5bedaf5c80b4623984760d3da3289640639112f9
|
[
"MIT"
] | 230
|
2015-01-04T00:10:48.000Z
|
2022-03-26T18:12:04.000Z
|
import unittest2
import json
from datafeeds.resource_library_parser import ResourceLibraryParser
class TestResourceLibraryParser(unittest2.TestCase):
def test_parse_hall_of_fame(self):
with open('test_data/hall_of_fame.html', 'r') as f:
teams, _ = ResourceLibraryParser.parse(f.read())
# Test number of teams
self.assertEqual(len(teams), 14)
# Test team 987
team = teams[0]
self.assertEqual(team["team_id"], "frc987")
self.assertEqual(team["team_number"], 987)
self.assertEqual(team["year"], 2016)
self.assertEqual(team["video"], "wpv-9yd_CJk")
self.assertEqual(team["presentation"], "ILxVggTpXhs")
self.assertEqual(team["essay"], "https://www.firstinspires.org/sites/default/files/uploads/resource_library/frc/game-and-season-info/awards/2016/chairmans/week-five/team-987.pdf")
# Test team 597
team = teams[1]
self.assertEqual(team["team_id"], "frc597")
self.assertEqual(team["team_number"], 597)
self.assertEqual(team["year"], 2015)
self.assertEqual(team["video"], "2FKks-d6LOo")
self.assertEqual(team["presentation"], "RBXj490clow")
self.assertEqual(team["essay"], None)
# Test team 27
team = teams[2]
self.assertEqual(team["team_id"], "frc27")
self.assertEqual(team["team_number"], 27)
self.assertEqual(team["year"], 2014)
self.assertEqual(team["video"], "BCz2yTVPxbM")
self.assertEqual(team["presentation"], "1rE67fTRl98")
self.assertEqual(team["essay"], "https://www.firstinspires.org/sites/default/files/uploads/resource_library/frc/game-and-season-info/awards/2015/2014-67-chairmans-handout.pdf")
# Test team 1538
team = teams[3]
self.assertEqual(team["team_id"], "frc1538")
self.assertEqual(team["team_number"], 1538)
self.assertEqual(team["year"], 2013)
self.assertEqual(team["video"], "p62jRCMkoiw")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 1114
team = teams[4]
self.assertEqual(team["team_id"], "frc1114")
self.assertEqual(team["team_number"], 1114)
self.assertEqual(team["year"], 2012)
self.assertEqual(team["video"], "VqciMgjw-SY")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 359
team = teams[5]
self.assertEqual(team["team_id"], "frc359")
self.assertEqual(team["team_number"], 359)
self.assertEqual(team["year"], 2011)
self.assertEqual(team["video"], "e9IV1chHJtg")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 341
team = teams[6]
self.assertEqual(team["team_id"], "frc341")
self.assertEqual(team["team_number"], 341)
self.assertEqual(team["year"], 2010)
self.assertEqual(team["video"], "-AzvT02ZCNk")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 236
team = teams[7]
self.assertEqual(team["team_id"], "frc236")
self.assertEqual(team["team_number"], 236)
self.assertEqual(team["year"], 2009)
self.assertEqual(team["video"], "NmzCLohIZLg")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 842
team = teams[8]
self.assertEqual(team["team_id"], "frc842")
self.assertEqual(team["team_number"], 842)
self.assertEqual(team["year"], 2008)
self.assertEqual(team["video"], "N0LMLz6LK7U")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 365
team = teams[9]
self.assertEqual(team["team_id"], "frc365")
self.assertEqual(team["team_number"], 365)
self.assertEqual(team["year"], 2007)
self.assertEqual(team["video"], "f8MT7pSRXtg")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
# Test team 111
team = teams[10]
self.assertEqual(team["team_id"], "frc111")
self.assertEqual(team["team_number"], 111)
self.assertEqual(team["year"], 2006)
self.assertEqual(team["video"], "SfCjZMMIt0k")
self.assertEqual(team["presentation"], None)
self.assertEqual(team["essay"], None)
| 40.345133
| 187
| 0.626234
| 512
| 4,559
| 5.507813
| 0.236328
| 0.356383
| 0.444681
| 0.179433
| 0.502128
| 0.291489
| 0.291489
| 0.278723
| 0.278723
| 0.278723
| 0
| 0.056974
| 0.218469
| 4,559
| 112
| 188
| 40.705357
| 0.734493
| 0.038386
| 0
| 0.2
| 0
| 0.023529
| 0.232899
| 0.006177
| 0
| 0
| 0
| 0
| 0.788235
| 1
| 0.011765
| false
| 0
| 0.035294
| 0
| 0.058824
| 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
|
44bc7feed227f738bf70037d970caf854f291e75
| 165
|
py
|
Python
|
src/mlalgms/calcutils.py
|
sandeepbhojwani/foremast-brain
|
b083ea08c0506517ede8501b9ad44408e89afdc6
|
[
"Apache-2.0"
] | null | null | null |
src/mlalgms/calcutils.py
|
sandeepbhojwani/foremast-brain
|
b083ea08c0506517ede8501b9ad44408e89afdc6
|
[
"Apache-2.0"
] | null | null | null |
src/mlalgms/calcutils.py
|
sandeepbhojwani/foremast-brain
|
b083ea08c0506517ede8501b9ad44408e89afdc6
|
[
"Apache-2.0"
] | null | null | null |
#import numpy as np
"""
#moving avg
#Parameters
array of ts value
#Returns moving avg
"""
#def moving_average(series, n):
# return np.average(series[-n:])
| 13.75
| 35
| 0.666667
| 24
| 165
| 4.541667
| 0.708333
| 0.165138
| 0.256881
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193939
| 165
| 11
| 36
| 15
| 0.819549
| 0.90303
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
44d6fc186fe5f7b94930cbbd4516e7f34b023d02
| 513
|
py
|
Python
|
test/test_db.py
|
ndrini/10Opportunities
|
995b5bab974c856b05ea965935dbb1e5e2fb6145
|
[
"MIT"
] | null | null | null |
test/test_db.py
|
ndrini/10Opportunities
|
995b5bab974c856b05ea965935dbb1e5e2fb6145
|
[
"MIT"
] | null | null | null |
test/test_db.py
|
ndrini/10Opportunities
|
995b5bab974c856b05ea965935dbb1e5e2fb6145
|
[
"MIT"
] | null | null | null |
from usefull import read_db
def test_read_csv_db_simple():
'''
page msg parent choice end
1 1. Mi sembra che 0 False False
2 ...se ti trovassi 1 True False
'''
assert read_db('db_simple.csv')[0]['page'] == 1
assert read_db('db_simple.csv')[0]['msg'][-3:] == 'che'
assert read_db('db_simple.csv')[1]['msg'][:9] == '...se ti '
assert read_db('db_simple.csv')[0]['end'] == False
def test_read_real_db():
assert len(read_db('db.csv')) == 167
| 30.176471
| 64
| 0.575049
| 82
| 513
| 3.390244
| 0.378049
| 0.129496
| 0.143885
| 0.201439
| 0.341727
| 0.341727
| 0.258993
| 0
| 0
| 0
| 0
| 0.03886
| 0.247563
| 513
| 16
| 65
| 32.0625
| 0.681347
| 0.333333
| 0
| 0
| 0
| 0
| 0.227397
| 0
| 0
| 0
| 0
| 0
| 0.625
| 1
| 0.25
| true
| 0
| 0.125
| 0
| 0.375
| 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
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
44ff8250e602c081731b500fd7f016a2d72f7ce9
| 68
|
py
|
Python
|
main.py
|
AnEnigmaticBug/Connect-3
|
479c5a9cfda182f1959395594ce9c6d2e1f17d24
|
[
"MIT"
] | null | null | null |
main.py
|
AnEnigmaticBug/Connect-3
|
479c5a9cfda182f1959395594ce9c6d2e1f17d24
|
[
"MIT"
] | null | null | null |
main.py
|
AnEnigmaticBug/Connect-3
|
479c5a9cfda182f1959395594ce9c6d2e1f17d24
|
[
"MIT"
] | null | null | null |
# NISHANT MAHAJAN
# 2017A7PS0112P
from gui import Gui
Gui().loop()
| 11.333333
| 19
| 0.735294
| 9
| 68
| 5.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0.161765
| 68
| 6
| 20
| 11.333333
| 0.719298
| 0.426471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
7812a64c76a1b0cf4d9af364e1e9dae7223dc8a7
| 338
|
py
|
Python
|
tests/test_topics.py
|
Inria-Chile/risotto-backend
|
c2e597ac10724f4e8f30a6cd7fa2cc0c6fa806ea
|
[
"CECILL-B"
] | null | null | null |
tests/test_topics.py
|
Inria-Chile/risotto-backend
|
c2e597ac10724f4e8f30a6cd7fa2cc0c6fa806ea
|
[
"CECILL-B"
] | null | null | null |
tests/test_topics.py
|
Inria-Chile/risotto-backend
|
c2e597ac10724f4e8f30a6cd7fa2cc0c6fa806ea
|
[
"CECILL-B"
] | null | null | null |
def test_get_topics(client):
response = client.get("/topics/")
contents = response.get_json()
assert contents["status"] == "OK"
assert type(contents["payload"]) is dict
assert type(contents["payload"]["topics"]) is list
assert type(contents["payload"]["subtopics"]) is dict
assert response.status_code == 200
| 33.8
| 57
| 0.677515
| 42
| 338
| 5.357143
| 0.452381
| 0.133333
| 0.24
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010676
| 0.168639
| 338
| 9
| 58
| 37.555556
| 0.790036
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0.625
| 1
| 0.125
| false
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
781362495bb438b5389eabd92fef0d024f207f5a
| 29
|
py
|
Python
|
spin/tests/__init__.py
|
otaviocv/spin
|
04ec49b62a81b973c0553a0f808aa021c5c83294
|
[
"MIT"
] | null | null | null |
spin/tests/__init__.py
|
otaviocv/spin
|
04ec49b62a81b973c0553a0f808aa021c5c83294
|
[
"MIT"
] | 1
|
2019-10-26T12:42:59.000Z
|
2019-10-26T12:42:59.000Z
|
spin/tests/__init__.py
|
otaviocv/spin
|
04ec49b62a81b973c0553a0f808aa021c5c83294
|
[
"MIT"
] | null | null | null |
"""SPIN module test unit."""
| 14.5
| 28
| 0.62069
| 4
| 29
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 29
| 1
| 29
| 29
| 0.72
| 0.758621
| 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
|
781fb6916fe464abca0f4c951e6c639b121a70e3
| 182
|
py
|
Python
|
django_dicom/models/utils/__init__.py
|
ZviBaratz/django-dicom
|
fc5d5443ebcab9af9705a2e81c58662789a34c62
|
[
"Apache-2.0"
] | 8
|
2018-12-25T11:00:31.000Z
|
2022-02-03T12:05:56.000Z
|
django_dicom/models/utils/__init__.py
|
ZviBaratz/django-dicom
|
fc5d5443ebcab9af9705a2e81c58662789a34c62
|
[
"Apache-2.0"
] | 49
|
2019-09-04T11:36:00.000Z
|
2022-03-20T12:33:04.000Z
|
django_dicom/models/utils/__init__.py
|
ZviBaratz/django-dicom
|
fc5d5443ebcab9af9705a2e81c58662789a34c62
|
[
"Apache-2.0"
] | 4
|
2019-06-23T18:09:07.000Z
|
2019-08-30T15:43:18.000Z
|
"""
Utilities for the :mod:`~django_dicom.models` module.
"""
from django_dicom.models.utils.utils import (
get_dicom_root,
snake_case_to_camel_case,
)
# flake8: noqa: F401
| 18.2
| 53
| 0.725275
| 26
| 182
| 4.769231
| 0.769231
| 0.177419
| 0.274194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025806
| 0.148352
| 182
| 9
| 54
| 20.222222
| 0.774194
| 0.401099
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 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
|
782a71ba07dfa1012bcbb82312804ad3ca021f37
| 382
|
py
|
Python
|
third_party/p7zip/Utils/file_P7ZIP.py
|
VirtualLib/juice
|
3d5912059f3a80ec1fef5c5031a395578904fe9c
|
[
"MIT"
] | null | null | null |
third_party/p7zip/Utils/file_P7ZIP.py
|
VirtualLib/juice
|
3d5912059f3a80ec1fef5c5031a395578904fe9c
|
[
"MIT"
] | null | null | null |
third_party/p7zip/Utils/file_P7ZIP.py
|
VirtualLib/juice
|
3d5912059f3a80ec1fef5c5031a395578904fe9c
|
[
"MIT"
] | null | null | null |
files_c=[
'C/Threads.c',
]
files_cpp=[
'CPP/7zip/UI/P7ZIP/wxP7ZIP.cpp',
'CPP/Common/IntToString.cpp',
'CPP/Common/MyString.cpp',
'CPP/Common/MyVector.cpp',
'CPP/Common/StringConvert.cpp',
'CPP/Windows/FileDir.cpp',
'CPP/Windows/FileFind.cpp',
'CPP/Windows/FileIO.cpp',
'CPP/Windows/FileName.cpp',
'CPP/Common/MyWindows.cpp',
'CPP/myWindows/wine_date_and_time.cpp',
]
| 19.1
| 40
| 0.712042
| 56
| 382
| 4.767857
| 0.410714
| 0.247191
| 0.224719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008547
| 0.081152
| 382
| 19
| 41
| 20.105263
| 0.752137
| 0
| 0
| 0
| 0
| 0
| 0.771053
| 0.742105
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7867336d033fecd4522cc24b40fe95d3630ecec8
| 275
|
py
|
Python
|
python/tvm/relay/op/_transform.py
|
Rasterer/tvm
|
1b863732ddd91423b1083626c64fba0523204a70
|
[
"Apache-2.0"
] | 2
|
2018-09-10T09:48:03.000Z
|
2018-09-11T05:40:57.000Z
|
python/tvm/relay/op/_transform.py
|
Rasterer/tvm
|
1b863732ddd91423b1083626c64fba0523204a70
|
[
"Apache-2.0"
] | null | null | null |
python/tvm/relay/op/_transform.py
|
Rasterer/tvm
|
1b863732ddd91423b1083626c64fba0523204a70
|
[
"Apache-2.0"
] | null | null | null |
#pylint: disable=invalid-name, unused-argument
"""Backend compiler related feature registration"""
from __future__ import absolute_import
from . import op as _reg
from .op import schedule_injective
# strided_slice
_reg.register_schedule("strided_slice", schedule_injective)
| 30.555556
| 59
| 0.825455
| 35
| 275
| 6.142857
| 0.657143
| 0.15814
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098182
| 275
| 8
| 60
| 34.375
| 0.866935
| 0.381818
| 0
| 0
| 0
| 0
| 0.079755
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
78b1a07d25bb2f618f40e24ffc85d90df88326f4
| 89
|
py
|
Python
|
djnic/cambios/apps.py
|
avdata99/nic
|
70399bd78fd2b4b496d338e7959867ad12cdf477
|
[
"MIT"
] | 8
|
2021-05-01T13:03:22.000Z
|
2021-12-17T21:50:04.000Z
|
djnic/cambios/apps.py
|
avdata99/nic
|
70399bd78fd2b4b496d338e7959867ad12cdf477
|
[
"MIT"
] | 16
|
2020-11-20T23:18:22.000Z
|
2021-04-08T20:09:35.000Z
|
djnic/cambios/apps.py
|
OpenDataCordoba/nic
|
f9528856e13d106bdfb476cab1236bc5b8a92183
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CambiosConfig(AppConfig):
name = 'cambios'
| 14.833333
| 33
| 0.752809
| 10
| 89
| 6.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168539
| 89
| 5
| 34
| 17.8
| 0.905405
| 0
| 0
| 0
| 0
| 0
| 0.078652
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
78c83ac5442915f637cfef0b30d9e2b358200620
| 389
|
py
|
Python
|
2021learning/logica.py
|
rulgamer03/Python-Projects
|
89a2418fadce0fd4674d3f7d3fa682a9aaa4b14d
|
[
"Apache-2.0"
] | 1
|
2021-06-18T16:29:46.000Z
|
2021-06-18T16:29:46.000Z
|
2021learning/logica.py
|
rulgamer03/Python-Projects
|
89a2418fadce0fd4674d3f7d3fa682a9aaa4b14d
|
[
"Apache-2.0"
] | null | null | null |
2021learning/logica.py
|
rulgamer03/Python-Projects
|
89a2418fadce0fd4674d3f7d3fa682a9aaa4b14d
|
[
"Apache-2.0"
] | null | null | null |
# operador logico
print("Ingrese el valor de a")
a = float(input())
print("Ingrese el valor de b")
b = float(input())
print("b es mayor que a")
print(b > a)
print(type(b > a))
print("b es menor que a")
print(b < a)
print("b es mayor o igual que a")
print(b >= a)
print("b es menor o igual que a")
print(b <= a)
print("b es diferente de a")
print(b != a)
var = b == a
print("b = a? ", var)
| 20.473684
| 33
| 0.619537
| 80
| 389
| 3.0125
| 0.25
| 0.273859
| 0.290456
| 0.19917
| 0.701245
| 0.435685
| 0.286307
| 0.286307
| 0.207469
| 0.207469
| 0
| 0
| 0.195373
| 389
| 18
| 34
| 21.611111
| 0.769968
| 0.03856
| 0
| 0
| 0
| 0
| 0.397849
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.823529
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
153bc4e6bb32d6b5175c608bdd91ccb925665630
| 211
|
py
|
Python
|
feedback/forms.py
|
davidavi1/ecosystem1
|
51033968e1548a08625fb42aa6e98017dc91ed65
|
[
"Unlicense"
] | null | null | null |
feedback/forms.py
|
davidavi1/ecosystem1
|
51033968e1548a08625fb42aa6e98017dc91ed65
|
[
"Unlicense"
] | null | null | null |
feedback/forms.py
|
davidavi1/ecosystem1
|
51033968e1548a08625fb42aa6e98017dc91ed65
|
[
"Unlicense"
] | null | null | null |
from django import forms
from .models import FeedBackModel
class FeedBackForms(forms.ModelForm):
class Meta:
model = FeedBackModel
fields = ('name', 'last_name', 'subject', 'text')
| 23.444444
| 58
| 0.658768
| 22
| 211
| 6.272727
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241706
| 211
| 8
| 59
| 26.375
| 0.8625
| 0
| 0
| 0
| 0
| 0
| 0.118227
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
156b9f30f0dfeefca81a2eedc9cb5062d26dcda5
| 268
|
py
|
Python
|
ib/ext/cfg/EWrapperMsgGenerator.py
|
gkatsQT/ibpy
|
d92fc7b03fc92bde0260adbcb217bac3aae27e2d
|
[
"BSD-3-Clause"
] | 1
|
2016-11-23T23:55:35.000Z
|
2016-11-23T23:55:35.000Z
|
ib/ext/cfg/EWrapperMsgGenerator.py
|
keven/ibpy
|
3a96091e1f798d60001c47dc731ffd65c12c0797
|
[
"BSD-3-Clause"
] | null | null | null |
ib/ext/cfg/EWrapperMsgGenerator.py
|
keven/ibpy
|
3a96091e1f798d60001c47dc731ffd65c12c0797
|
[
"BSD-3-Clause"
] | 1
|
2016-07-25T09:22:21.000Z
|
2016-07-25T09:22:21.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" ib.ext.cfg.EWrapperMsgGenerator -> config module for EWrapperMsgGenerator.java.
"""
modulePreamble = [
'from ib.ext.AnyWrapperMsgGenerator import AnyWrapperMsgGenerator',
'from ib.ext.Util import Util',
]
| 26.8
| 83
| 0.701493
| 29
| 268
| 6.482759
| 0.689655
| 0.079787
| 0.095745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004386
| 0.149254
| 268
| 9
| 84
| 29.777778
| 0.820175
| 0.455224
| 0
| 0
| 0
| 0
| 0.676471
| 0.375
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1586fdc938864aa8657885eb20f4ab9d341d045e
| 101
|
py
|
Python
|
1095.py
|
FahimFBA/URI-Problem-Solve
|
d718a95e5a873dffbce19d850998e8917ec87ebb
|
[
"Apache-2.0"
] | 3
|
2020-11-25T19:05:31.000Z
|
2021-03-29T07:29:36.000Z
|
1095.py
|
FahimFBA/URI-Problem-Solve
|
d718a95e5a873dffbce19d850998e8917ec87ebb
|
[
"Apache-2.0"
] | null | null | null |
1095.py
|
FahimFBA/URI-Problem-Solve
|
d718a95e5a873dffbce19d850998e8917ec87ebb
|
[
"Apache-2.0"
] | null | null | null |
j,i=65,-2
for I in range (1,14):
J= j-5
I=i+3
print('I=%d J=%d' %(I,J))
j=J
i=I
| 12.625
| 29
| 0.39604
| 27
| 101
| 1.481481
| 0.481481
| 0.15
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0.346535
| 101
| 8
| 30
| 12.625
| 0.484848
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
15957c8e2d7c1506061057ba07ae93f4d1345623
| 613
|
py
|
Python
|
venv/Lib/site-packages/sqlalchemy/event/__init__.py
|
svercillo/flaskwebapi
|
48e3417c25fc25166203cb88f959345f548a38bc
|
[
"Apache-2.0"
] | 2
|
2020-05-27T19:53:05.000Z
|
2020-05-27T19:53:07.000Z
|
venv/Lib/site-packages/sqlalchemy/event/__init__.py
|
svercillo/flaskwebapi
|
48e3417c25fc25166203cb88f959345f548a38bc
|
[
"Apache-2.0"
] | null | null | null |
venv/Lib/site-packages/sqlalchemy/event/__init__.py
|
svercillo/flaskwebapi
|
48e3417c25fc25166203cb88f959345f548a38bc
|
[
"Apache-2.0"
] | null | null | null |
# event/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from .api import CANCEL # noqa
from .api import contains # noqa
from .api import listen # noqa
from .api import listens_for # noqa
from .api import NO_RETVAL # noqa
from .api import remove # noqa
from .attr import RefCollection # noqa
from .base import dispatcher # noqa
from .base import Events # noqa
from .legacy import _legacy_signature # noqa
| 34.055556
| 70
| 0.734095
| 89
| 613
| 4.966292
| 0.539326
| 0.162896
| 0.176471
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016227
| 0.195759
| 613
| 17
| 71
| 36.058824
| 0.880325
| 0.446982
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ec65a2014d2302002135041aa6a23005e8b3ebc8
| 948
|
py
|
Python
|
app/update_logs_test.py
|
limshengli/tinypilot
|
aeba23e2e108008bea2b7577f16cfef949238648
|
[
"MIT"
] | 1,334
|
2020-07-14T01:53:02.000Z
|
2021-06-08T09:48:28.000Z
|
app/update_logs_test.py
|
limshengli/tinypilot
|
aeba23e2e108008bea2b7577f16cfef949238648
|
[
"MIT"
] | 320
|
2020-07-07T20:18:05.000Z
|
2021-06-07T21:18:42.000Z
|
app/update_logs_test.py
|
limshengli/tinypilot
|
aeba23e2e108008bea2b7577f16cfef949238648
|
[
"MIT"
] | 124
|
2020-07-23T16:39:06.000Z
|
2021-06-04T10:22:53.000Z
|
import unittest
import update_logs
class UpdateLogsTest(unittest.TestCase):
def test_get_new_logs_with_more_next_logs(self):
self.assertEqual(
"56789",
update_logs.get_new_logs(prev_logs="01234", next_logs="0123456789"))
def test_get_new_logs_with_more_prev_logs(self):
self.assertEqual(
"",
update_logs.get_new_logs(prev_logs="0123456789", next_logs="01234"))
def test_get_new_logs_with_no_common_logs(self):
self.assertEqual(
"56789",
update_logs.get_new_logs(prev_logs="01234", next_logs="56789"))
def test_get_new_logs_with_no_prev_logs(self):
self.assertEqual(
"0123456789",
update_logs.get_new_logs(prev_logs="", next_logs="0123456789"))
def test_get_new_logs_with_no_next_logs(self):
self.assertEqual(
"", update_logs.get_new_logs(prev_logs="01234", next_logs=""))
| 30.580645
| 80
| 0.671941
| 125
| 948
| 4.608
| 0.176
| 0.104167
| 0.173611
| 0.112847
| 0.810764
| 0.743056
| 0.743056
| 0.560764
| 0.560764
| 0.439236
| 0
| 0.101902
| 0.223629
| 948
| 30
| 81
| 31.6
| 0.680707
| 0
| 0
| 0.318182
| 0
| 0
| 0.079114
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 1
| 0.227273
| false
| 0
| 0.090909
| 0
| 0.363636
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ec75cdcde97f555a405ef3a9aab448d7e1208cd7
| 248
|
py
|
Python
|
backend/backend/helps/apps.py
|
Redaloukil/PackageWay
|
977cf865c067bf6004cc9d82a995cd31be1c4889
|
[
"MIT"
] | null | null | null |
backend/backend/helps/apps.py
|
Redaloukil/PackageWay
|
977cf865c067bf6004cc9d82a995cd31be1c4889
|
[
"MIT"
] | 15
|
2019-12-28T10:54:22.000Z
|
2022-03-15T19:17:54.000Z
|
backend/backend/helps/apps.py
|
Redaloukil/PackageWay
|
977cf865c067bf6004cc9d82a995cd31be1c4889
|
[
"MIT"
] | 1
|
2020-03-25T00:24:55.000Z
|
2020-03-25T00:24:55.000Z
|
from django.apps import AppConfig
class HelpsAppConfig(AppConfig):
name = "backend.helps"
verbose_name = "Helps"
def ready(self):
try:
import users.signals # noqa F401
except ImportError:
pass
| 20.666667
| 45
| 0.612903
| 26
| 248
| 5.807692
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017647
| 0.314516
| 248
| 12
| 46
| 20.666667
| 0.870588
| 0.03629
| 0
| 0
| 0
| 0
| 0.07563
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0.111111
| 0.333333
| 0
| 0.777778
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
ec8abd98b8afeba4e09a0db96f72cb66cd1ee3d5
| 208
|
wsgi
|
Python
|
alzhetect.wsgi
|
raidel123/AlzheTect
|
882e808d8ca30cd30d9e814f5dcc02c4395094a5
|
[
"Apache-2.0"
] | 7
|
2018-05-23T02:00:04.000Z
|
2021-12-22T07:35:27.000Z
|
alzhetect.wsgi
|
raidel123/AlzheTect
|
882e808d8ca30cd30d9e814f5dcc02c4395094a5
|
[
"Apache-2.0"
] | 7
|
2020-01-28T22:21:49.000Z
|
2022-02-09T23:35:51.000Z
|
alzhetect.wsgi
|
raidel123/AlzheTect
|
882e808d8ca30cd30d9e814f5dcc02c4395094a5
|
[
"Apache-2.0"
] | 1
|
2019-10-17T19:25:18.000Z
|
2019-10-17T19:25:18.000Z
|
#! /usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/AlzheTect/")
from trunk import app as application
application.secret_key = 'freekeyforthesite'
| 23.111111
| 44
| 0.793269
| 29
| 208
| 5.655172
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005263
| 0.086538
| 208
| 8
| 45
| 26
| 0.857895
| 0.081731
| 0
| 0
| 0
| 0
| 0.189474
| 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
|
ec95f038099c2f4d40e17ff06a718c7caf996d99
| 78
|
py
|
Python
|
Week 1 - Not so-simple Hello World/AhmadHelloWorld.py
|
Jasleenk47/BeginnerRoom-2020
|
32903f6917a236fe685106c148b8531c62210f1f
|
[
"Unlicense"
] | 5
|
2021-01-19T00:31:22.000Z
|
2021-03-05T02:31:10.000Z
|
Week 1 - Not so-simple Hello World/AhmadHelloWorld.py
|
Jasleenk47/BeginnerRoom-2020
|
32903f6917a236fe685106c148b8531c62210f1f
|
[
"Unlicense"
] | 34
|
2021-01-14T21:00:18.000Z
|
2021-03-11T17:57:26.000Z
|
Week 1 - Not so-simple Hello World/AhmadHelloWorld.py
|
Jasleenk47/BeginnerRoom-2020
|
32903f6917a236fe685106c148b8531c62210f1f
|
[
"Unlicense"
] | 43
|
2021-01-14T20:40:47.000Z
|
2021-03-11T02:29:30.000Z
|
print("Starter")
print("Ahmad")
print("Hello World")
print("Not so Simple")
| 19.5
| 22
| 0.679487
| 11
| 78
| 4.818182
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 78
| 4
| 22
| 19.5
| 0.768116
| 0
| 0
| 0
| 0
| 0
| 0.473684
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
eca3badb2edcb11210236b0e654dfdf450f51092
| 62
|
py
|
Python
|
django_mako_plus/models.py
|
wynnw/django-mako-plus
|
8a33eb3911fc84ddddd590152f475fd78c6a501f
|
[
"Apache-2.0"
] | 79
|
2015-01-21T23:29:16.000Z
|
2021-08-22T03:38:20.000Z
|
django_mako_plus/models.py
|
wynnw/django-mako-plus
|
8a33eb3911fc84ddddd590152f475fd78c6a501f
|
[
"Apache-2.0"
] | 34
|
2015-01-08T03:11:07.000Z
|
2021-09-07T15:04:43.000Z
|
django_mako_plus/models.py
|
wynnw/django-mako-plus
|
8a33eb3911fc84ddddd590152f475fd78c6a501f
|
[
"Apache-2.0"
] | 23
|
2015-01-08T03:11:26.000Z
|
2021-05-22T11:12:24.000Z
|
# this app has no models; file here just to conform to Django
| 31
| 61
| 0.758065
| 12
| 62
| 3.916667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.209677
| 62
| 1
| 62
| 62
| 0.959184
| 0.951613
| 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
|
ecae0aa4c5127e932d611672cbee45f11d930aca
| 48
|
py
|
Python
|
__init__.py
|
fonsecag/Cluster_tools
|
a0bb250e49f185aea7632dbf0152319074fce038
|
[
"MIT"
] | null | null | null |
__init__.py
|
fonsecag/Cluster_tools
|
a0bb250e49f185aea7632dbf0152319074fce038
|
[
"MIT"
] | null | null | null |
__init__.py
|
fonsecag/Cluster_tools
|
a0bb250e49f185aea7632dbf0152319074fce038
|
[
"MIT"
] | null | null | null |
from run import MainHandler
__version__ = '0.1'
| 16
| 27
| 0.770833
| 7
| 48
| 4.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.145833
| 48
| 3
| 28
| 16
| 0.756098
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ecc35a532a3f26436634c487e5568644f8258c16
| 6,219
|
py
|
Python
|
apps/breakfast/tools/Life/tools/cx/messages/CxDownload.py
|
mtaghiza/tinyos-main-1
|
cac075f7eae46c6a37409e66137a78b9bc3a64b1
|
[
"BSD-3-Clause"
] | null | null | null |
apps/breakfast/tools/Life/tools/cx/messages/CxDownload.py
|
mtaghiza/tinyos-main-1
|
cac075f7eae46c6a37409e66137a78b9bc3a64b1
|
[
"BSD-3-Clause"
] | null | null | null |
apps/breakfast/tools/Life/tools/cx/messages/CxDownload.py
|
mtaghiza/tinyos-main-1
|
cac075f7eae46c6a37409e66137a78b9bc3a64b1
|
[
"BSD-3-Clause"
] | 1
|
2022-02-21T14:31:18.000Z
|
2022-02-21T14:31:18.000Z
|
#
# This class is automatically generated by mig. DO NOT EDIT THIS FILE.
# This class implements a Python interface to the 'CxDownload'
# message type.
#
import tinyos.message.Message
# The default size of this message type in bytes.
DEFAULT_MESSAGE_SIZE = 9
# The Active Message type associated with this message.
AM_TYPE = 208
class CxDownload(tinyos.message.Message.Message):
# Create a new CxDownload of size 9.
def __init__(self, data="", addr=None, gid=None, base_offset=0, data_length=9):
tinyos.message.Message.Message.__init__(self, data, addr, gid, base_offset, data_length)
self.amTypeSet(AM_TYPE)
# Get AM_TYPE
def get_amType(cls):
return AM_TYPE
get_amType = classmethod(get_amType)
#
# Return a String representation of this message. Includes the
# message type name and the non-indexed field values.
#
def __str__(self):
s = "Message <CxDownload> \n"
try:
s += " [networkSegment=0x%x]\n" % (self.get_networkSegment())
except:
pass
try:
s += " [padding=";
for i in range(0, 8):
s += "0x%x " % (self.getElement_padding(i) & 0xff)
s += "]\n";
except:
pass
return s
# Message-type-specific access methods appear below.
#
# Accessor methods for field: networkSegment
# Field type: short
# Offset (bits): 0
# Size (bits): 8
#
#
# Return whether the field 'networkSegment' is signed (False).
#
def isSigned_networkSegment(self):
return False
#
# Return whether the field 'networkSegment' is an array (False).
#
def isArray_networkSegment(self):
return False
#
# Return the offset (in bytes) of the field 'networkSegment'
#
def offset_networkSegment(self):
return (0 / 8)
#
# Return the offset (in bits) of the field 'networkSegment'
#
def offsetBits_networkSegment(self):
return 0
#
# Return the value (as a short) of the field 'networkSegment'
#
def get_networkSegment(self):
return self.getUIntElement(self.offsetBits_networkSegment(), 8, 1)
#
# Set the value of the field 'networkSegment'
#
def set_networkSegment(self, value):
self.setUIntElement(self.offsetBits_networkSegment(), 8, value, 1)
#
# Return the size, in bytes, of the field 'networkSegment'
#
def size_networkSegment(self):
return (8 / 8)
#
# Return the size, in bits, of the field 'networkSegment'
#
def sizeBits_networkSegment(self):
return 8
#
# Accessor methods for field: padding
# Field type: short[]
# Offset (bits): 8
# Size of each element (bits): 8
#
#
# Return whether the field 'padding' is signed (False).
#
def isSigned_padding(self):
return False
#
# Return whether the field 'padding' is an array (True).
#
def isArray_padding(self):
return True
#
# Return the offset (in bytes) of the field 'padding'
#
def offset_padding(self, index1):
offset = 8
if index1 < 0 or index1 >= 8:
raise IndexError
offset += 0 + index1 * 8
return (offset / 8)
#
# Return the offset (in bits) of the field 'padding'
#
def offsetBits_padding(self, index1):
offset = 8
if index1 < 0 or index1 >= 8:
raise IndexError
offset += 0 + index1 * 8
return offset
#
# Return the entire array 'padding' as a short[]
#
def get_padding(self):
tmp = [None]*8
for index0 in range (0, self.numElements_padding(0)):
tmp[index0] = self.getElement_padding(index0)
return tmp
#
# Set the contents of the array 'padding' from the given short[]
#
def set_padding(self, value):
for index0 in range(0, len(value)):
self.setElement_padding(index0, value[index0])
#
# Return an element (as a short) of the array 'padding'
#
def getElement_padding(self, index1):
return self.getUIntElement(self.offsetBits_padding(index1), 8, 1)
#
# Set an element of the array 'padding'
#
def setElement_padding(self, index1, value):
self.setUIntElement(self.offsetBits_padding(index1), 8, value, 1)
#
# Return the total size, in bytes, of the array 'padding'
#
def totalSize_padding(self):
return (64 / 8)
#
# Return the total size, in bits, of the array 'padding'
#
def totalSizeBits_padding(self):
return 64
#
# Return the size, in bytes, of each element of the array 'padding'
#
def elementSize_padding(self):
return (8 / 8)
#
# Return the size, in bits, of each element of the array 'padding'
#
def elementSizeBits_padding(self):
return 8
#
# Return the number of dimensions in the array 'padding'
#
def numDimensions_padding(self):
return 1
#
# Return the number of elements in the array 'padding'
#
def numElements_padding():
return 8
#
# Return the number of elements in the array 'padding'
# for the given dimension.
#
def numElements_padding(self, dimension):
array_dims = [ 8, ]
if dimension < 0 or dimension >= 1:
raise IndexException
if array_dims[dimension] == 0:
raise IndexError
return array_dims[dimension]
#
# Fill in the array 'padding' with a String
#
def setString_padding(self, s):
l = len(s)
for i in range(0, l):
self.setElement_padding(i, ord(s[i]));
self.setElement_padding(l, 0) #null terminate
#
# Read the array 'padding' as a String
#
def getString_padding(self):
carr = "";
for i in range(0, 4000):
if self.getElement_padding(i) == chr(0):
break
carr += self.getElement_padding(i)
return carr
| 26.130252
| 96
| 0.586429
| 745
| 6,219
| 4.806711
| 0.190604
| 0.049148
| 0.050265
| 0.040212
| 0.414409
| 0.241832
| 0.187936
| 0.14186
| 0.106116
| 0.064786
| 0
| 0.02018
| 0.322721
| 6,219
| 237
| 97
| 26.240506
| 0.83001
| 0.330921
| 0
| 0.232323
| 1
| 0
| 0.016515
| 0.005669
| 0
| 0
| 0.000986
| 0
| 0
| 1
| 0.282828
| false
| 0.020202
| 0.010101
| 0.171717
| 0.545455
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
ece8955cfab2b69803e74e963f5ac76b16e9c256
| 117
|
py
|
Python
|
admin_tools/theming/apps.py
|
asherf/django-admin-tools
|
26a993545de7d68286be56ac640fe12acf1a1abe
|
[
"MIT"
] | 711
|
2015-06-21T10:08:06.000Z
|
2022-03-25T08:46:37.000Z
|
admin_tools/theming/apps.py
|
asherf/django-admin-tools
|
26a993545de7d68286be56ac640fe12acf1a1abe
|
[
"MIT"
] | 102
|
2015-06-22T12:38:21.000Z
|
2022-03-29T14:00:54.000Z
|
admin_tools/theming/apps.py
|
asherf/django-admin-tools
|
26a993545de7d68286be56ac640fe12acf1a1abe
|
[
"MIT"
] | 149
|
2015-06-21T10:16:49.000Z
|
2022-03-28T13:11:47.000Z
|
# coding: utf-8
from django.apps import AppConfig
class ThemingConfig(AppConfig):
name = 'admin_tools.theming'
| 16.714286
| 33
| 0.752137
| 15
| 117
| 5.8
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010101
| 0.153846
| 117
| 6
| 34
| 19.5
| 0.868687
| 0.111111
| 0
| 0
| 0
| 0
| 0.186275
| 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
|
ecee3bdc2df3c4340135e376313418070504c4bf
| 81
|
py
|
Python
|
aulaspythonintermediario/exercicios01/exercicio01/exercicio01.py
|
lel352/Curso-Python
|
d65484c807db52d57042eee20ccbd3131825fa98
|
[
"MIT"
] | 1
|
2021-09-04T14:34:34.000Z
|
2021-09-04T14:34:34.000Z
|
aulaspythonintermediario/exercicios01/exercicio01/exercicio01.py
|
lel352/Curso-Python
|
d65484c807db52d57042eee20ccbd3131825fa98
|
[
"MIT"
] | null | null | null |
aulaspythonintermediario/exercicios01/exercicio01/exercicio01.py
|
lel352/Curso-Python
|
d65484c807db52d57042eee20ccbd3131825fa98
|
[
"MIT"
] | null | null | null |
def saudacao(saudar, nome):
print(saudar, nome)
saudacao('Olá', 'Leandro')
| 13.5
| 27
| 0.666667
| 10
| 81
| 5.4
| 0.7
| 0.37037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160494
| 81
| 5
| 28
| 16.2
| 0.794118
| 0
| 0
| 0
| 0
| 0
| 0.123457
| 0
| 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
|
ecf30a51d8793fd4c825e5bb2417de48539638e0
| 235
|
py
|
Python
|
time_series_transform/__init__.py
|
mrdragonbear/Time-Series-Transformer
|
a12bbd0c4563b4b150b4a47006e3e11457daef1b
|
[
"MIT"
] | 1
|
2021-11-16T01:51:43.000Z
|
2021-11-16T01:51:43.000Z
|
time_series_transform/__init__.py
|
sbhakat/Time-Series-Transformer
|
a12bbd0c4563b4b150b4a47006e3e11457daef1b
|
[
"MIT"
] | null | null | null |
time_series_transform/__init__.py
|
sbhakat/Time-Series-Transformer
|
a12bbd0c4563b4b150b4a47006e3e11457daef1b
|
[
"MIT"
] | 1
|
2020-11-06T06:57:23.000Z
|
2020-11-06T06:57:23.000Z
|
from time_series_transform.transform_core_api import (
Pandas_Time_Series_Panel_Dataset,
Pandas_Time_Series_Tensor_Dataset,
)
from time_series_transform.stock_transform import (
Portfolio_Extractor,
Stock_Extractor
)
| 21.363636
| 54
| 0.825532
| 29
| 235
| 6.103448
| 0.482759
| 0.225989
| 0.158192
| 0.259887
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13617
| 235
| 10
| 55
| 23.5
| 0.871921
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01b5f7952de578fc3d83a0bfbbf650bd840627a1
| 4,925
|
py
|
Python
|
dataactcore/migrations/versions/9960bbbe4d92_indexing_domain_models.py
|
brianherman/data-act-broker-backend
|
80eb055b9d245046192f7ad4fd0be7d0e11d2dec
|
[
"CC0-1.0"
] | 1
|
2019-06-22T21:53:16.000Z
|
2019-06-22T21:53:16.000Z
|
dataactcore/migrations/versions/9960bbbe4d92_indexing_domain_models.py
|
brianherman/data-act-broker-backend
|
80eb055b9d245046192f7ad4fd0be7d0e11d2dec
|
[
"CC0-1.0"
] | 3
|
2021-08-22T11:47:45.000Z
|
2022-03-29T22:06:49.000Z
|
dataactcore/migrations/versions/9960bbbe4d92_indexing_domain_models.py
|
brianherman/data-act-broker-backend
|
80eb055b9d245046192f7ad4fd0be7d0e11d2dec
|
[
"CC0-1.0"
] | 1
|
2020-07-17T23:50:56.000Z
|
2020-07-17T23:50:56.000Z
|
"""Indexing domain models
Revision ID: 9960bbbe4d92
Revises: d35ecdfc1da7
Create Date: 2017-09-06 13:09:21.210982
"""
# revision identifiers, used by Alembic.
revision = '9960bbbe4d92'
down_revision = 'd35ecdfc1da7'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_data_broker():
### commands auto generated by Alembic - please adjust! ###
op.create_index(op.f('ix_cfda_program_archived_date'), 'cfda_program', ['archived_date'], unique=False)
op.create_index(op.f('ix_cfda_program_program_number'), 'cfda_program', ['program_number'], unique=False)
op.create_index(op.f('ix_cfda_program_published_date'), 'cfda_program', ['published_date'], unique=False)
op.create_index(op.f('ix_city_code_city_code'), 'city_code', ['city_code'], unique=False)
op.create_index(op.f('ix_city_code_state_code'), 'city_code', ['state_code'], unique=False)
op.create_index(op.f('ix_county_code_county_number'), 'county_code', ['county_number'], unique=False)
op.create_index(op.f('ix_county_code_state_code'), 'county_code', ['state_code'], unique=False)
op.create_index(op.f('ix_program_activity_account_number'), 'program_activity', ['account_number'], unique=False)
op.create_index(op.f('ix_program_activity_agency_id'), 'program_activity', ['agency_id'], unique=False)
op.create_index(op.f('ix_program_activity_budget_year'), 'program_activity', ['budget_year'], unique=False)
op.create_index(op.f('ix_program_activity_program_activity_code'), 'program_activity', ['program_activity_code'], unique=False)
op.create_index(op.f('ix_program_activity_program_activity_name'), 'program_activity', ['program_activity_name'], unique=False)
op.create_index(op.f('ix_sf_133_agency_identifier'), 'sf_133', ['agency_identifier'], unique=False)
op.create_index(op.f('ix_sf_133_allocation_transfer_agency'), 'sf_133', ['allocation_transfer_agency'], unique=False)
op.create_index(op.f('ix_sf_133_fiscal_year'), 'sf_133', ['fiscal_year'], unique=False)
op.create_index(op.f('ix_sf_133_period'), 'sf_133', ['period'], unique=False)
op.create_index('ix_sf_133_tas_group', 'sf_133', ['tas', 'fiscal_year', 'period', 'line'], unique=True)
op.drop_index('ix_sf_133_tas', table_name='sf_133')
op.create_index(op.f('ix_sf_133_tas'), 'sf_133', ['tas'], unique=False)
op.create_index(op.f('ix_states_state_code'), 'states', ['state_code'], unique=False)
op.create_index(op.f('ix_zips_congressional_district_no'), 'zips', ['congressional_district_no'], unique=False)
op.create_index(op.f('ix_zips_county_number'), 'zips', ['county_number'], unique=False)
op.create_index(op.f('ix_zips_state_abbreviation'), 'zips', ['state_abbreviation'], unique=False)
### end Alembic commands ###
def downgrade_data_broker():
### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_zips_state_abbreviation'), table_name='zips')
op.drop_index(op.f('ix_zips_county_number'), table_name='zips')
op.drop_index(op.f('ix_zips_congressional_district_no'), table_name='zips')
op.drop_index(op.f('ix_states_state_code'), table_name='states')
op.drop_index(op.f('ix_sf_133_tas'), table_name='sf_133')
op.create_index('ix_sf_133_tas', 'sf_133', ['tas', 'fiscal_year', 'period', 'line'], unique=True)
op.drop_index('ix_sf_133_tas_group', table_name='sf_133')
op.drop_index(op.f('ix_sf_133_period'), table_name='sf_133')
op.drop_index(op.f('ix_sf_133_fiscal_year'), table_name='sf_133')
op.drop_index(op.f('ix_sf_133_allocation_transfer_agency'), table_name='sf_133')
op.drop_index(op.f('ix_sf_133_agency_identifier'), table_name='sf_133')
op.drop_index(op.f('ix_program_activity_program_activity_name'), table_name='program_activity')
op.drop_index(op.f('ix_program_activity_program_activity_code'), table_name='program_activity')
op.drop_index(op.f('ix_program_activity_budget_year'), table_name='program_activity')
op.drop_index(op.f('ix_program_activity_agency_id'), table_name='program_activity')
op.drop_index(op.f('ix_program_activity_account_number'), table_name='program_activity')
op.drop_index(op.f('ix_county_code_state_code'), table_name='county_code')
op.drop_index(op.f('ix_county_code_county_number'), table_name='county_code')
op.drop_index(op.f('ix_city_code_state_code'), table_name='city_code')
op.drop_index(op.f('ix_city_code_city_code'), table_name='city_code')
op.drop_index(op.f('ix_cfda_program_published_date'), table_name='cfda_program')
op.drop_index(op.f('ix_cfda_program_program_number'), table_name='cfda_program')
op.drop_index(op.f('ix_cfda_program_archived_date'), table_name='cfda_program')
### end Alembic commands ###
| 57.941176
| 131
| 0.749848
| 763
| 4,925
| 4.416776
| 0.111402
| 0.08724
| 0.099703
| 0.124629
| 0.805045
| 0.768249
| 0.761721
| 0.71365
| 0.590504
| 0.536499
| 0
| 0.028163
| 0.091574
| 4,925
| 84
| 132
| 58.630952
| 0.725078
| 0.060914
| 0
| 0
| 0
| 0
| 0.442169
| 0.249837
| 0
| 0
| 0
| 0
| 0
| 1
| 0.068966
| false
| 0
| 0.034483
| 0
| 0.103448
| 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
|
01c505d3cae8d51474445b8e18b08db6a7cc9659
| 112
|
py
|
Python
|
api/src/application/wsgi.py
|
iliaskaras/VCFHandler
|
5372659e4472207be964e0d233994a0ffff536fe
|
[
"MIT"
] | null | null | null |
api/src/application/wsgi.py
|
iliaskaras/VCFHandler
|
5372659e4472207be964e0d233994a0ffff536fe
|
[
"MIT"
] | null | null | null |
api/src/application/wsgi.py
|
iliaskaras/VCFHandler
|
5372659e4472207be964e0d233994a0ffff536fe
|
[
"MIT"
] | null | null | null |
from application.factories import vcf_handler_api
application = vcf_handler_api(
name="VCF Handler API",
)
| 18.666667
| 49
| 0.785714
| 15
| 112
| 5.6
| 0.533333
| 0.357143
| 0.464286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 112
| 5
| 50
| 22.4
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.133929
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01e4d8cad531270d0858cb5534a73935f7804e5e
| 103
|
py
|
Python
|
kjn_biedronka_demo/kjn_pricetag/apps.py
|
kornellewy/kjn_biedronka_demo
|
a1b0d3baaaee5bca4977b76fa0b3934a533a2f59
|
[
"MIT"
] | 1
|
2020-10-20T10:33:58.000Z
|
2020-10-20T10:33:58.000Z
|
kjn_biedronka_demo/kjn_pricetag/apps.py
|
kornellewy/kjn_biedronka_demo
|
a1b0d3baaaee5bca4977b76fa0b3934a533a2f59
|
[
"MIT"
] | null | null | null |
kjn_biedronka_demo/kjn_pricetag/apps.py
|
kornellewy/kjn_biedronka_demo
|
a1b0d3baaaee5bca4977b76fa0b3934a533a2f59
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class KjnPricetagConfig(AppConfig):
name = 'kjn_pricetag'
| 17.166667
| 36
| 0.737864
| 11
| 103
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.194175
| 103
| 5
| 37
| 20.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 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
|
bf0ff252d5a80eb424fe2ca9f264baafddb04d3e
| 47
|
py
|
Python
|
venv/lib/python3.7/hmac.py
|
OseiasBeu/PyECom
|
2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f
|
[
"CC0-1.0"
] | 1
|
2020-08-16T04:04:23.000Z
|
2020-08-16T04:04:23.000Z
|
venv/lib/python3.7/hmac.py
|
OseiasBeu/PyECom
|
2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f
|
[
"CC0-1.0"
] | null | null | null |
venv/lib/python3.7/hmac.py
|
OseiasBeu/PyECom
|
2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f
|
[
"CC0-1.0"
] | null | null | null |
/home/oseiasbeu/anaconda3/lib/python3.7/hmac.py
| 47
| 47
| 0.829787
| 8
| 47
| 4.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06383
| 0
| 47
| 1
| 47
| 47
| 0.765957
| 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
|
bf1bc3b976e8f06a9301d90ff36fcbbeff7628e4
| 230
|
py
|
Python
|
src/sage/version.py
|
yzpopulation/sage
|
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
|
[
"BSL-1.0"
] | null | null | null |
src/sage/version.py
|
yzpopulation/sage
|
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
|
[
"BSL-1.0"
] | null | null | null |
src/sage/version.py
|
yzpopulation/sage
|
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
|
[
"BSL-1.0"
] | null | null | null |
# Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
version = '9.5.beta2'
date = '2021-09-26'
banner = 'SageMath version 9.5.beta2, Release Date: 2021-09-26'
| 38.333333
| 77
| 0.743478
| 39
| 230
| 4.384615
| 0.717949
| 0.093567
| 0.105263
| 0.163743
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111675
| 0.143478
| 230
| 5
| 78
| 46
| 0.756345
| 0.517391
| 0
| 0
| 1
| 0
| 0.657407
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bf1c9599a424608600110263d2e23b1761467296
| 747
|
py
|
Python
|
python.py
|
weijie88/test
|
d2f0c4ff4ca88fa1ef6518ba2b1f040216142125
|
[
"Apache-2.0"
] | null | null | null |
python.py
|
weijie88/test
|
d2f0c4ff4ca88fa1ef6518ba2b1f040216142125
|
[
"Apache-2.0"
] | null | null | null |
python.py
|
weijie88/test
|
d2f0c4ff4ca88fa1ef6518ba2b1f040216142125
|
[
"Apache-2.0"
] | null | null | null |
# class Cat(Resource):
# def get(self):
# return {'data':'get'}
#
# def post(self):
# return {'data': 'post'}
#
# def put(self):
# return {'data': 'put'}
#
# def delete(self):
# return {'data': 'delete'}
from pip._vendor.distlib.resources import Resource
class Home(Resource):
def get(self):
# return render_template('test.html')
pass
class Market(Resource):
def get(self):
# return render_template('market/market.html')
pass
class Cart(Resource):
def get(self):
# return render_template('art/cart.html')
pass
class Mine(Resource):
def get(self):
# return render_template('mine/mine.html')
pass
print("sss")
| 17.785714
| 54
| 0.568942
| 87
| 747
| 4.827586
| 0.333333
| 0.190476
| 0.166667
| 0.214286
| 0.419048
| 0.361905
| 0.361905
| 0
| 0
| 0
| 0
| 0
| 0.279786
| 747
| 42
| 55
| 17.785714
| 0.780669
| 0.52075
| 0
| 0.571429
| 0
| 0
| 0.008824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.285714
| 0.071429
| 0
| 0.642857
| 0.071429
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
170d1e755079223aa85454344429845bca8ebd51
| 464
|
py
|
Python
|
bfgame/components/shield.py
|
ChrisLR/BasicDungeonRL
|
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
|
[
"MIT"
] | 3
|
2017-10-28T11:28:38.000Z
|
2018-09-12T09:47:00.000Z
|
bfgame/components/shield.py
|
ChrisLR/BasicDungeonRL
|
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
|
[
"MIT"
] | null | null | null |
bfgame/components/shield.py
|
ChrisLR/BasicDungeonRL
|
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
|
[
"MIT"
] | null | null | null |
from core.components import Component, listing
@listing.register
class Shield(Component):
NAME = "shield"
__slots__ = ["armor_class_melee", "armor_class_missile"]
def __init__(self, armor_class_melee, armor_class_missile):
super().__init__()
self.armor_class_melee = armor_class_melee
self.armor_class_missile = armor_class_missile
def copy(self):
return Shield(self.armor_class_melee, self.armor_class_missile)
| 29
| 71
| 0.734914
| 58
| 464
| 5.327586
| 0.344828
| 0.323625
| 0.242718
| 0.194175
| 0.540453
| 0.540453
| 0.414239
| 0
| 0
| 0
| 0
| 0
| 0.178879
| 464
| 15
| 72
| 30.933333
| 0.811024
| 0
| 0
| 0
| 0
| 0
| 0.090517
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.181818
| false
| 0
| 0.090909
| 0.090909
| 0.636364
| 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
|
17871ee3057c619c366c976b876ad96d5d051de6
| 156
|
py
|
Python
|
QAStrategy/__init__.py
|
vx-qa/QAStrategy
|
6f8bcf94d31d2e0a6d7cf339067322366e44e6fc
|
[
"MIT"
] | null | null | null |
QAStrategy/__init__.py
|
vx-qa/QAStrategy
|
6f8bcf94d31d2e0a6d7cf339067322366e44e6fc
|
[
"MIT"
] | null | null | null |
QAStrategy/__init__.py
|
vx-qa/QAStrategy
|
6f8bcf94d31d2e0a6d7cf339067322366e44e6fc
|
[
"MIT"
] | null | null | null |
__version__ = '0.0.22'
__author__ = 'yutiansut'
from QAStrategy.util import QA_data_futuremin_resample
from QAStrategy.qactabase import QAStrategyCTABase
| 22.285714
| 54
| 0.833333
| 19
| 156
| 6.263158
| 0.789474
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.102564
| 156
| 6
| 55
| 26
| 0.821429
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 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
|
bd7296575889784868618f14db8687ff341b387d
| 26
|
py
|
Python
|
grow/settings/__init__.py
|
jpk0727/growApp
|
016d56de740c14e89440a6bf61fccc937e792473
|
[
"MIT"
] | null | null | null |
grow/settings/__init__.py
|
jpk0727/growApp
|
016d56de740c14e89440a6bf61fccc937e792473
|
[
"MIT"
] | null | null | null |
grow/settings/__init__.py
|
jpk0727/growApp
|
016d56de740c14e89440a6bf61fccc937e792473
|
[
"MIT"
] | null | null | null |
""" Settings for grow """
| 13
| 25
| 0.576923
| 3
| 26
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 26
| 1
| 26
| 26
| 0.714286
| 0.653846
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bd87d35dc8ef1a62928df58d50d1b4875fac32f4
| 297
|
py
|
Python
|
tests/test_rocket_powered_landing.py
|
yuokamoto/PythonRobotics
|
754256d15e074f6091bc6c9b7e8e6499df865fb6
|
[
"MIT"
] | 11
|
2019-03-21T17:55:19.000Z
|
2021-11-18T01:25:48.000Z
|
tests/test_rocket_powered_landing.py
|
yuokamoto/PythonRobotics
|
754256d15e074f6091bc6c9b7e8e6499df865fb6
|
[
"MIT"
] | null | null | null |
tests/test_rocket_powered_landing.py
|
yuokamoto/PythonRobotics
|
754256d15e074f6091bc6c9b7e8e6499df865fb6
|
[
"MIT"
] | 5
|
2019-03-26T10:36:14.000Z
|
2020-04-16T07:24:25.000Z
|
from unittest import TestCase
import sys
sys.path.append("./AerialNavigation/rocket_powered_landing/")
from AerialNavigation.rocket_powered_landing import rocket_powered_landing as m
print(__file__)
class Test(TestCase):
def test1(self):
m.show_animation = False
m.main()
| 19.8
| 79
| 0.760943
| 38
| 297
| 5.657895
| 0.631579
| 0.181395
| 0.27907
| 0.334884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004
| 0.158249
| 297
| 14
| 80
| 21.214286
| 0.856
| 0
| 0
| 0
| 0
| 0
| 0.141414
| 0.141414
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.333333
| 0
| 0.555556
| 0.111111
| 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
|
bdbdffb8d5a6c27b50f218d5b692d0f7f8c5a5d7
| 185
|
py
|
Python
|
utils/language_modeling/__init__.py
|
Lednik7/data_fusion
|
2cac8ee2ca6c144218731795bc118f6c355bd477
|
[
"MIT"
] | 1
|
2022-01-23T10:18:16.000Z
|
2022-01-23T10:18:16.000Z
|
utils/language_modeling/__init__.py
|
Lednik7/data_fusion
|
2cac8ee2ca6c144218731795bc118f6c355bd477
|
[
"MIT"
] | null | null | null |
utils/language_modeling/__init__.py
|
Lednik7/data_fusion
|
2cac8ee2ca6c144218731795bc118f6c355bd477
|
[
"MIT"
] | null | null | null |
from .data import (
get_dataloaders,
Collator
)
from .train import Trainer
from .model import get_model
__all__ = ['get_dataloaders', 'Collator', 'Trainer', 'get_model']
| 23.125
| 65
| 0.697297
| 22
| 185
| 5.5
| 0.454545
| 0.14876
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.194595
| 185
| 8
| 65
| 23.125
| 0.812081
| 0
| 0
| 0
| 0
| 0
| 0.217877
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.428571
| 0
| 0.428571
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bdd279599e1187ff595e03201dfe2b321502e136
| 212
|
py
|
Python
|
py/solutions/goorm/financial_crisis.py
|
aid95/algorithm-diary
|
ee7df895761b095d02a08f762c682af5b93add4b
|
[
"MIT"
] | null | null | null |
py/solutions/goorm/financial_crisis.py
|
aid95/algorithm-diary
|
ee7df895761b095d02a08f762c682af5b93add4b
|
[
"MIT"
] | null | null | null |
py/solutions/goorm/financial_crisis.py
|
aid95/algorithm-diary
|
ee7df895761b095d02a08f762c682af5b93add4b
|
[
"MIT"
] | null | null | null |
def solution(salaries: list[int]) -> int:
return sorted(salaries)[1]
if __name__ == '__main__':
user_input = input()
param = [int(x) for x in user_input.split()]
print(solution(salaries=param))
| 23.555556
| 48
| 0.65566
| 29
| 212
| 4.448276
| 0.655172
| 0.248062
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005814
| 0.188679
| 212
| 8
| 49
| 26.5
| 0.744186
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0.166667
| 0.333333
| 0.166667
| 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
| 1
| 0
| 0
|
0
| 4
|
bdebaf164c0ff546fcd1eead404c3f46b7076366
| 2,997
|
py
|
Python
|
tb_rest_client/api/api_pe/__init__.py
|
maksonlee/python_tb_rest_client
|
a6cd17ef4de31f68c3226b7a9835292fbac4b1fa
|
[
"Apache-2.0"
] | 1
|
2021-07-19T10:09:04.000Z
|
2021-07-19T10:09:04.000Z
|
tb_rest_client/api/api_pe/__init__.py
|
moravcik94/python_tb_rest_client
|
985361890cdf4ccce93d2b24905ad9003c8dfcaa
|
[
"Apache-2.0"
] | null | null | null |
tb_rest_client/api/api_pe/__init__.py
|
moravcik94/python_tb_rest_client
|
985361890cdf4ccce93d2b24905ad9003c8dfcaa
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2020. ThingsBoard
# #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import absolute_import
# flake8: noqa
# import apis into api_pe package
from .admin_controller_api import AdminControllerApi
from .alarm_controller_api import AlarmControllerApi
from .asset_controller_api import AssetControllerApi
from .audit_log_controller_api import AuditLogControllerApi
from .blob_entity_controller_api import BlobEntityControllerApi
from .converter_controller_api import ConverterControllerApi
from .custom_menu_controller_api import CustomMenuControllerApi
from .custom_translation_controller_api import CustomTranslationControllerApi
from .customer_controller_api import CustomerControllerApi
from .dashboard_controller_api import DashboardControllerApi
from .device_controller_api import DeviceControllerApi
from .entity_group_controller_api import EntityGroupControllerApi
from .entity_view_controller_api import EntityViewControllerApi
from .event_controller_api import EventControllerApi
from .group_permission_controller_api import GroupPermissionControllerApi
from .http_integration_controller_api import HttpIntegrationControllerApi
from .integration_controller_api import IntegrationControllerApi
from .ocean_connect_integration_controller_api import OceanConnectIntegrationControllerApi
from .owner_controller_api import OwnerControllerApi
from .report_controller_api import ReportControllerApi
from .role_controller_api import RoleControllerApi
from .rule_chain_controller_api import RuleChainControllerApi
from .rule_engine_controller_api import RuleEngineControllerApi
from .scheduler_event_controller_api import SchedulerEventControllerApi
from .self_registration_controller_api import SelfRegistrationControllerApi
from .sig_fox_integration_controller_api import SigFoxIntegrationControllerApi
from .sign_up_controller_api import SignUpControllerApi
from .t_mobile_iot_cdp_integration_controller_api import TMobileIotCdpIntegrationControllerApi
from .tenant_controller_api import TenantControllerApi
from .thing_park_integration_controller_api import ThingParkIntegrationControllerApi
from .trail_controller_api import TrailControllerApi
from .user_controller_api import UserControllerApi
from .user_permissions_controller_api import UserPermissionsControllerApi
from .white_labeling_controller_api import WhiteLabelingControllerApi
from .widgets_bundle_controller_api import WidgetsBundleControllerApi
| 53.517857
| 94
| 0.869536
| 338
| 2,997
| 7.408284
| 0.461538
| 0.181709
| 0.265575
| 0.071885
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003351
| 0.10377
| 2,997
| 55
| 95
| 54.490909
| 0.928891
| 0.215215
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
da513afea0870e586c6e6f6c68b2dc83e2f2c9d2
| 170
|
py
|
Python
|
python/syndicate/rg/drivers/s3/config.py
|
jcnelson/syndicate
|
4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b
|
[
"Apache-2.0"
] | 16
|
2015-01-02T15:39:04.000Z
|
2016-03-17T06:38:46.000Z
|
python/syndicate/rg/drivers/s3/config.py
|
jcnelson/syndicate
|
4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b
|
[
"Apache-2.0"
] | 37
|
2015-01-28T20:58:05.000Z
|
2016-03-22T04:01:32.000Z
|
python/syndicate/rg/drivers/s3/config.py
|
jcnelson/syndicate
|
4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b
|
[
"Apache-2.0"
] | 8
|
2015-04-08T02:26:03.000Z
|
2016-03-04T05:56:24.000Z
|
#!/usr/bin/python
CONFIG = {
"BUCKET": "sd_s3_testbucket",
"EXEC_FMT": "/usr/bin/python -m syndicate.rg.gateway",
"DRIVER": "syndicate.rg.drivers.s3"
}
| 18.888889
| 57
| 0.617647
| 22
| 170
| 4.636364
| 0.727273
| 0.117647
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014388
| 0.182353
| 170
| 8
| 58
| 21.25
| 0.719424
| 0.094118
| 0
| 0
| 0
| 0
| 0.640523
| 0.150327
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
da5aaf00a6ad5e06519d62f96aea28416baf2d0d
| 207
|
py
|
Python
|
appaddrule/__init__.py
|
wanghaisheng/azure_func_pywebio_wsgi_starter
|
b5f210b7c867ab8bef456bc476c19bda6deb9795
|
[
"MIT"
] | 1
|
2022-03-28T18:08:30.000Z
|
2022-03-28T18:08:30.000Z
|
appnoshare/__init__.py
|
wanghaisheng/azure_func_pywebio_wsgi_starter
|
b5f210b7c867ab8bef456bc476c19bda6deb9795
|
[
"MIT"
] | null | null | null |
appnoshare/__init__.py
|
wanghaisheng/azure_func_pywebio_wsgi_starter
|
b5f210b7c867ab8bef456bc476c19bda6deb9795
|
[
"MIT"
] | null | null | null |
import azure.functions as func
from .add_url_rule import app
def main(req: func.HttpRequest, context: func.Context) -> func.HttpResponse:
return func.WsgiMiddleware(app.wsgi_app).handle(req, context)
| 25.875
| 76
| 0.777778
| 30
| 207
| 5.266667
| 0.666667
| 0.139241
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120773
| 207
| 7
| 77
| 29.571429
| 0.868132
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 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
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 4
|
da750d0740739eec48b98e5fcd911525f9a9b4a3
| 525
|
py
|
Python
|
codewars/8kyu/counting sheep/main_test.py
|
ictcubeMENA/Training_one
|
dff6bee96ba42babe4888e5cf9a9448a6fd93fc3
|
[
"MIT"
] | null | null | null |
codewars/8kyu/counting sheep/main_test.py
|
ictcubeMENA/Training_one
|
dff6bee96ba42babe4888e5cf9a9448a6fd93fc3
|
[
"MIT"
] | 2
|
2019-01-22T10:53:42.000Z
|
2019-01-31T08:02:48.000Z
|
codewars/8kyu/counting sheep/main_test.py
|
ictcubeMENA/Training_one
|
dff6bee96ba42babe4888e5cf9a9448a6fd93fc3
|
[
"MIT"
] | 13
|
2019-01-22T10:37:42.000Z
|
2019-01-25T13:30:43.000Z
|
import main
import unittest
class testsheep(unittest.TestCase):
def testing(self):
array1 = [True, True, True, False,
True, True, True, True ,
True, False, True, False,
True, False, False, True ,
True, True, True, True ,
False, False, True, True ];
self.assertEqual(main.count_sheeps(array1), 17, "There are 17 sheeps in total, not %s" % count_sheeps(array1))
if __name__ == '__main__':
unittest.main()
| 32.8125
| 117
| 0.554286
| 59
| 525
| 4.762712
| 0.40678
| 0.313167
| 0.298932
| 0.227758
| 0.348754
| 0.213523
| 0.213523
| 0
| 0
| 0
| 0
| 0.020115
| 0.337143
| 525
| 16
| 118
| 32.8125
| 0.787356
| 0
| 0
| 0.153846
| 0
| 0
| 0.08365
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0
| null | null | 0
| 0.153846
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
da8fceb32a06d24f6058a6fcba8fc9efb8cbbeea
| 504
|
py
|
Python
|
OpenCV Python/4. Image Processing/10. histograms/3. 2D histogram.py
|
Ashleshk/Machine-Learning-Data-Science-Deep-Learning
|
03357ab98155bf73b8f1d2fd53255cc16bea2333
|
[
"MIT"
] | 1
|
2020-05-24T06:55:31.000Z
|
2020-05-24T06:55:31.000Z
|
OpenCV Python/4. Image Processing/10. histograms/3. 2D histogram.py
|
Ashleshk/Machine-Learning-Data-Science-Deep-Learning
|
03357ab98155bf73b8f1d2fd53255cc16bea2333
|
[
"MIT"
] | null | null | null |
OpenCV Python/4. Image Processing/10. histograms/3. 2D histogram.py
|
Ashleshk/Machine-Learning-Data-Science-Deep-Learning
|
03357ab98155bf73b8f1d2fd53255cc16bea2333
|
[
"MIT"
] | null | null | null |
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('home.jpg')
hsv = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
hist = cv2.calcHist( [hsv], [0, 1], None, [180, 256], [0, 180, 0, 256] )
plt.imshow(hist,interpolation = 'nearest')
plt.show()
# in numpy
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('home.jpg')
hsv = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
hist, xbins, ybins = np.histogram2d(h.ravel(),s.ravel(),[180,256],[[0,180],[0,256]])
| 24
| 84
| 0.698413
| 85
| 504
| 4.117647
| 0.411765
| 0.068571
| 0.085714
| 0.114286
| 0.708571
| 0.708571
| 0.628571
| 0.628571
| 0.628571
| 0.628571
| 0
| 0.09611
| 0.132937
| 504
| 20
| 85
| 25.2
| 0.704805
| 0.015873
| 0
| 0.714286
| 0
| 0
| 0.046559
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.428571
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
16ffa203132158dc3fd91b6c3eb252393aac5ec3
| 69
|
py
|
Python
|
multitag-code/src/test.py
|
terencelee-uni/multitag-heroku
|
38945052912ddb55f5d98773e081ccc7b98c6373
|
[
"MIT"
] | null | null | null |
multitag-code/src/test.py
|
terencelee-uni/multitag-heroku
|
38945052912ddb55f5d98773e081ccc7b98c6373
|
[
"MIT"
] | null | null | null |
multitag-code/src/test.py
|
terencelee-uni/multitag-heroku
|
38945052912ddb55f5d98773e081ccc7b98c6373
|
[
"MIT"
] | null | null | null |
import gc
import torch
gc.collect()
torch.cuda.empty_cache()
| 9.857143
| 25
| 0.695652
| 10
| 69
| 4.7
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202899
| 69
| 6
| 26
| 11.5
| 0.854545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
e517a95cdcc18e8221e9ea92c1671b9454843640
| 610
|
py
|
Python
|
lunchmoney/__init__.py
|
Christofon/lunchmoney-python
|
8f55af2717bc979577debfe940941dc3627c6018
|
[
"MIT"
] | null | null | null |
lunchmoney/__init__.py
|
Christofon/lunchmoney-python
|
8f55af2717bc979577debfe940941dc3627c6018
|
[
"MIT"
] | null | null | null |
lunchmoney/__init__.py
|
Christofon/lunchmoney-python
|
8f55af2717bc979577debfe940941dc3627c6018
|
[
"MIT"
] | null | null | null |
from .tags import Tags
from .categories import Categories
import os
import requests
# TODO maybe only for testing needed
# LUNCHMONEY_API_KEY = os.environ.get('LUNCHMONEY_API_KEY', None)
from dotenv import load_dotenv
load_dotenv()
LUNCHMONEY_API_KEY = os.getenv('LUNCHMONEY_API_KEY')
class APIKeyMissingError(Exception):
pass
if LUNCHMONEY_API_KEY is None:
raise APIKeyMissingError(
'All functionality require an API key. Visit "https://my.lunchmoney.app/developers" to get one.'
)
session = requests.Session()
session.params = {}
session.params['access_token'] = LUNCHMONEY_API_KEY
| 24.4
| 104
| 0.770492
| 82
| 610
| 5.54878
| 0.52439
| 0.092308
| 0.210989
| 0.079121
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144262
| 610
| 24
| 105
| 25.416667
| 0.871648
| 0.160656
| 0
| 0
| 0
| 0.0625
| 0.243615
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 1
| 0
| false
| 0.0625
| 0.3125
| 0
| 0.375
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
e5305625c9e9dae45c52f19c66a53acf6a2aebc6
| 264
|
py
|
Python
|
scripts/common/base.py
|
gokhankesler/python-etl-design
|
155e1d693310a71c808e3b56c369d8ebac30fb6d
|
[
"MIT"
] | null | null | null |
scripts/common/base.py
|
gokhankesler/python-etl-design
|
155e1d693310a71c808e3b56c369d8ebac30fb6d
|
[
"MIT"
] | 1
|
2022-03-25T21:19:29.000Z
|
2022-03-25T22:26:03.000Z
|
scripts/common/base.py
|
gokhankesler/python-etl-design
|
155e1d693310a71c808e3b56c369d8ebac30fb6d
|
[
"MIT"
] | null | null | null |
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from sqlalchemy.orm import declarative_base
engine = create_engine(
'postgresql+psycopg2://postgres:password@localhost:1234/postgres'
)
session = Session(engine)
Base = declarative_base()
| 29.333333
| 69
| 0.818182
| 32
| 264
| 6.625
| 0.46875
| 0.198113
| 0.160377
| 0.216981
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021097
| 0.102273
| 264
| 9
| 70
| 29.333333
| 0.873418
| 0
| 0
| 0
| 0
| 0
| 0.237736
| 0.237736
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.125
| 0.375
| 0
| 0.375
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
e5411285dd40466069ba2a8ee625afaa460ac90a
| 125
|
py
|
Python
|
main.py
|
hsnakkaya/XpyFollowers
|
17e6acdeffb9f6a6df956fe725283b93c8e2fc89
|
[
"MIT"
] | null | null | null |
main.py
|
hsnakkaya/XpyFollowers
|
17e6acdeffb9f6a6df956fe725283b93c8e2fc89
|
[
"MIT"
] | null | null | null |
main.py
|
hsnakkaya/XpyFollowers
|
17e6acdeffb9f6a6df956fe725283b93c8e2fc89
|
[
"MIT"
] | null | null | null |
from XpyFollowers import*
# scraper(27, 28, 'twitter_list')
nodes_process(27, 'twitter_list')
edges_process(27)
| 6.944444
| 33
| 0.696
| 16
| 125
| 5.1875
| 0.6875
| 0.26506
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 0.184
| 125
| 17
| 34
| 7.352941
| 0.735294
| 0.248
| 0
| 0
| 0
| 0
| 0.144578
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e56ab6f523c0e56fee048e434b02d05c5574230f
| 398
|
py
|
Python
|
splikes/connections/__init__.py
|
bblais/Plasticnet
|
e450e56a9b993e361873b6a235fdcc55a5690abb
|
[
"MIT"
] | null | null | null |
splikes/connections/__init__.py
|
bblais/Plasticnet
|
e450e56a9b993e361873b6a235fdcc55a5690abb
|
[
"MIT"
] | null | null | null |
splikes/connections/__init__.py
|
bblais/Plasticnet
|
e450e56a9b993e361873b6a235fdcc55a5690abb
|
[
"MIT"
] | 1
|
2020-01-16T18:20:53.000Z
|
2020-01-16T18:20:53.000Z
|
from .BCM import BCM_LawCooper
from .BCM import BCM
from .BCM import BCM_LawCooper_Offset
from .BCM import BCM_TwoThreshold
from .calcium import calcium
from .STDP import STDP
from .Triplet import Gerstner2006
from .Triplet import Triplet_BCM
from .Triplet import Triplet_BCM_LawCooper
from .Triplet import Triplet_BCM_LawCooper2
from .triplet_julijana import triplet_julijana
from . import process
| 33.166667
| 46
| 0.851759
| 58
| 398
| 5.655172
| 0.224138
| 0.167683
| 0.158537
| 0.195122
| 0.39939
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014245
| 0.11809
| 398
| 12
| 47
| 33.166667
| 0.920228
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.