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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
852c1ffb4e9ad7de58764c9b866d29a7b5402515 | 9,038 | py | Python | app.py | maycongabriel28/Desenvolvimento_web_scikitLearn | 80e89cd6616a0cce7311c0fd3a23449d18cd5362 | [
"MIT"
] | null | null | null | app.py | maycongabriel28/Desenvolvimento_web_scikitLearn | 80e89cd6616a0cce7311c0fd3a23449d18cd5362 | [
"MIT"
] | null | null | null | app.py | maycongabriel28/Desenvolvimento_web_scikitLearn | 80e89cd6616a0cce7311c0fd3a23449d18cd5362 | [
"MIT"
] | null | null | null | # Importa algumas funções do pacote flask para fazer o desenvolvimento de páginas web com python
from flask import Flask, flash, redirect, render_template, request, session, abort, url_for
import pandas as pd # Maniulação de arquivos
import numpy as np # operações matematicas com arrays
import sklearn as sk # importa pacate scikit-learn, onde traz algoritmos e recurso de Machine Learnig
from modelo_turbidez import dtr, modelo_v1 # importa variveis da arquivo modelo_turbidez.py
from modelo_solidos_totais import dts, modelo_v2 # importa variveis da arquivo modelo_solidos_totais.py
import os # importa biblioteca para entrada e saída de arquivo
app = Flask(__name__)
#####################################################################################################################
@app.route("/") # rota principal
def index():
#var7= X
#var8=Y
#var9=df2
return render_template('/pagina_principal/principal.html') # renderiza na página o arquivo HTML e passa o nome da rota
#####################################################################################################################
@app.route("/results_tres_marias_turbidez", methods=["GET", "POST"]) # Paginas de resultados
# GET = Acessa infromações no servidor
# POST = Manda informações para o servidor
# Predição Turbidez
def resultado_turbidez():
if request.method == "GET": # Verifica se foi feita a busca de dados no servidor
return render_template('/resultado_turbidez/tres_marias.html') # renderiza na página o arquivo HTML e passa o nome da rota
else:
# Acessa nível de cinza passadas para predizer valor de turbidez
par = str(request.form.get("parametro"))
# Acessa nível de cinza passadas para predizer valor de turbidez
valor = str(request.form.get("entrada"))
def is_number(num): # Função para verificar se string e numero
try:
#Try to convert the input.
float(num)
#If successful, returns true.
return True # String é Numero
except:
#Silently ignores any exception.
pass # ignora excessões
#If this point was reached, the input is not a number and the function
#will return False.
return False # String não e numero
valor_number = is_number(valor) # Verifica se strig é numero
par_string = is_number(par) # Verifica se string é string
if par=="" or valor=="" or valor_number==False or par_string==True or (par!="B2" and par!="B3" and par!="B4" and par!="cor_verdadeira_S" and par!="sulfato_S" and par!="turbidez_ZF"): # Condições para fazer predição de turbidez
return render_template('/resultado_turbidez/tres_marias_dados.html') # renderiza na página o arquivo HTML e passa o nome da rota
#############################################################
# Predizendo valores com entradas informadas pelo usuario
# Média dos dados contidos nas colunas dos dados de treinamento (X_treino)
vec_dados=np.array([[dtr['B2'].mean(), dtr['B3'].mean(), dtr['B4'].mean(),
dtr['cor_verdadeira_S'].mean(), dtr['sulfato_S'].mean(), dtr['turbidez_ZF'].mean()]])
# Cria Dataframe com média dos dados de treinamento (X_treino)
dtp=pd.DataFrame(vec_dados, columns=['B2', 'B3', 'B4', 'cor_verdadeira_S', 'sulfato_S', 'turbidez_ZF'])
if par=="B2" or par=="B3" or par=="B4": # verifica se ira fazer predição com bandas ou parâmetros limnologicos
# Adiciona valores realciondos algum dos parâmetros preditores (B2, B3, B4)
dtp[par] = np.array([[float(valor)/10]]) # A divisão por 10 e para fazer a normalização do valor a ser predito (NORMALIZAÇÃO APENAS PARA AS BANDAS)
else:
# Adiciona valores realciondos algum dos parâmetros preditores (cor_verdadeira_S, sulfato_S, turbidez_ZF)
dtp[par] = np.array([[float(valor)]]) # Nova variavel preditora
# Predição de novos valores com dados de entrada do usuario
pred=modelo_v1.predict(dtp)
if pred < 0: # Se valor de resultado de predição for menor que zero
return render_template('/resultado_turbidez/tres_marias_resultado_negativo.html') # renderiza na página o arquivo HTML e passa o nome da rota
return render_template('/resultado_turbidez/tres_marias.html', variavel=par, variavel1=pred) # renderiza na página o arquivo HTML e passa o nome da rota
#####################################################################################################################
@app.route("/results_tres_marias_solidos_totais", methods=["GET", "POST"]) # Paginas de resultados
# GET = Acessa infromações no servidor
# POST = Manda informações para o servidor
# Predição Sólidos totais
def resultado_solidos_totais():
if request.method == "GET": # Verifica se foi feita a busca de dados no servidor
return render_template('/resultado_solidos_totais/tres_marias.html') # renderiza na página o arquivo HTML e passa o nome da rota
else:
# Acessa nível de cinza passadas para predizer valor de turbidez
par = str(request.form.get("parametro"))
# Acessa nível de cinza passadas para predizer valor de turbidez
valor = str(request.form.get("entrada"))
def is_number(num): # Função para verificar se string e numero
try:
#Try to convert the input.
float(num)
#If successful, returns true.
return True # String é Numero
except:
#Silently ignores any exception.
pass # ignora excessões
#If this point was reached, the input is not a number and the function
#will return False.
return False # String não e numero
valor_number = is_number(valor) # Verifica se strig é numero
par_string = is_number(par) # Verifica se string é string
if par=="" or valor=="" or valor_number==False or par_string==True or (par!="B1" and par!="B2" and par!="B4" and par!="B55" and par!="B6" and par!="B7" and par!="sdt_S" and par!="sulfato_S"): # Condições para fazer predição de turbidez
return render_template('/resultado_solidos_totais/tres_marias_dados.html') # renderiza na página o arquivo HTML e passa o nome da rota
#############################################################
# Predizendo valores com entradas informadas pelo usuario
# Média dos dados contidos nas colunas dos dados de treinamento (X_treino)
vec_dados=np.array([[dts['B1'].mean(), dts['B2'].mean(), dts['B4'].mean(), dts['B55'].mean(),
dts['B6'].mean(), dts['B7'].mean(), dts['sdt_S'].mean(), dts['sulfato_S'].mean()]])
# Cria Dataframe com média dos dados de treinamento (X_treino)
dtp=pd.DataFrame(vec_dados, columns=['B1', 'B2', 'B4', 'B55', 'B6', 'B7', 'sdt_S', 'sulfato_S'])
if par=="B1" or par=="B2" or par=="B4" or par=="B55" or par=="B6" or par=="B7": # verifica se ira fazer predição com bandas ou parâmetros limnologicos
# Adiciona valores realciondos algum dos parâmetros preditores (B2, B3, B4)
dtp[par] = np.array([[float(valor)/10]]) # A divisão por 10 e para fazer a normalização do valor a ser predito (NORMALIZAÇÃO APENAS PARA AS BANDAS)
else:
# Adiciona valores realciondos algum dos parâmetros preditores (cor_verdadeira_S, sulfato_S, turbidez_ZF)
dtp[par] = np.array([[float(valor)]]) # Nova variavel preditora
# Predição de novos valores com dados de entrada do usuario
pred=modelo_v2.predict(dtp)
if pred < 0: # Se valor de resultado de predição for menor que zero
return render_template('/resultado_solidos_totais/tres_marias_resultado_negativo.html') # renderiza na página o arquivo HTML e passa o nome da rota
return render_template('/resultado_solidos_totais/tres_marias.html', variavel=par, variavel1=pred) # renderiza na página o arquivo HTML e passa o nome da rota
#####################################################################################################################
if __name__=='main':
port = int(os.getenv('PORT'), '5050')
app.run(host='0.0.0.0', port = port)
if __name__=="__main__": # Verifica se __name__ esta contido neste script
app.run(debug=True) # Executa este script, definindo endereço do servidor que ira rodar a aplicação e a porta
# COMANDO PARA CRIAR ARQUIVO REQUIREMENTS.TXT
# pip list --format=freeze > requirements.txt
#ACESSAE SITE
# https://plattform.herokuapp.com/
#PALETA DE CORES USADA_Dividir complementar duas vezes
#0117DB (principal fica no meio)
#670BDB
#DB8816
#DBD816
#0B8DDB | 49.119565 | 243 | 0.616397 | 1,157 | 9,038 | 4.705272 | 0.229905 | 0.013226 | 0.033064 | 0.029758 | 0.747245 | 0.725569 | 0.725569 | 0.716752 | 0.709037 | 0.704262 | 0 | 0.012987 | 0.233237 | 9,038 | 184 | 244 | 49.119565 | 0.772583 | 0.442244 | 0 | 0.459459 | 0 | 0 | 0.175189 | 0.105022 | 0 | 0 | 0 | 0 | 0 | 1 | 0.067568 | false | 0.027027 | 0.094595 | 0.013514 | 0.337838 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5175d48afd04a7392c4403801d40f8c70b191d45 | 757 | py | Python | Ta-Irikulau/framework/pomdp/model/reward.py | mjtsai1974/DevBlog | f1429e28e7ea618a64f5e111be4d7f42ae616ce8 | [
"MIT"
] | null | null | null | Ta-Irikulau/framework/pomdp/model/reward.py | mjtsai1974/DevBlog | f1429e28e7ea618a64f5e111be4d7f42ae616ce8 | [
"MIT"
] | null | null | null | Ta-Irikulau/framework/pomdp/model/reward.py | mjtsai1974/DevBlog | f1429e28e7ea618a64f5e111be4d7f42ae616ce8 | [
"MIT"
] | null | null | null |
class RewardModel(object):
def __init__(self):
self._reward_matrix = dict()
def __str__(self):
str = ''
for k, v in self._reward_matrix.items():
str += '{}:{}\n'.format(k, v)
return str
@property
def reward_matrix(self):
return self._reward_matrix
"""
Configure the reward of o from state sj by action a
"""
def ConfigureRewardMatrix(self, o, sj, a, val):
self._reward_matrix['{},{},{}'.format(o.Name, sj.Name, a.Name)] = val
self._reward_matrix[o, sj, a] = val
def GetRwrardByActionStateObservation(self, o, sj, a):
return self._reward_matrix.get('{},{},{}'.format(o.Name, sj.Name, a.Name))
#return self._reward_matrix[o, sj, a] | 27.035714 | 82 | 0.586526 | 99 | 757 | 4.252525 | 0.343434 | 0.228029 | 0.266033 | 0.15677 | 0.199525 | 0.199525 | 0.104513 | 0 | 0 | 0 | 0 | 0 | 0.260238 | 757 | 28 | 83 | 27.035714 | 0.751786 | 0.047556 | 0 | 0 | 0 | 0 | 0.035276 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3125 | false | 0 | 0 | 0.125 | 0.5625 | 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 | 1 | 1 | 0 | 0 | 5 |
cfb26551b355215f26f150f9da26f4896eb93193 | 6,621 | py | Python | test_geo.py | oca21/PartIA-Flood-Warning-System | aac3c429b6629cf30f3b99d8aabb736cfc7316fa | [
"MIT"
] | 2 | 2022-02-06T18:26:48.000Z | 2022-02-06T18:26:48.000Z | test_geo.py | oca21/PartIA-Flood-Warning-System | aac3c429b6629cf30f3b99d8aabb736cfc7316fa | [
"MIT"
] | null | null | null | test_geo.py | oca21/PartIA-Flood-Warning-System | aac3c429b6629cf30f3b99d8aabb736cfc7316fa | [
"MIT"
] | null | null | null | #TESTING GEO.PY#
from floodsystem.geo import stations_by_distance
from floodsystem.geo import stations_within_radius
from floodsystem.geo import stations_by_distance, rivers_with_station, stations_by_river, rivers_by_station_number
from floodsystem.station import MonitoringStation
#Test Task 1B
#-----------------------------------------------------
#Test haversine function
def test_haversine():
from haversine import haversine
Coord1=(0.0,0.0)
Coord2=(0.1,7.0)
Coord3=(1.0,2.0)
assert haversine(Coord1, Coord1)==0
assert round(haversine(Coord2, Coord1), 1)==778.4
assert round(haversine(Coord3, Coord1),1)==248.6
#test stations_by_distance
def test_stations_by_distance():
s_id = "testSid1"
m_id = "testMid1"
label = "TS1"
coord = (1.0, 4.0)
trange = (-2, 5)
river = "River 1"
town = "My Town 1"
Test1 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid2"
m_id = "testMid2"
label = "TS2"
coord = (0.0, 1.0)
trange = (-2, 2)
river = "River 2"
town = "Town 2"
Test2 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid3"
m_id = "testMid3"
label = "TS3"
coord = (1.0, 1.0)
trange = (-2, 2)
river = "River 3"
town = "Town 3"
Test3 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
stations=[Test1, Test2, Test3]
TestResult=stations_by_distance(stations, (0, 0))
assert (TestResult[0][0], TestResult[1][0], TestResult[2][0]) == (Test2, Test3, Test1)
#Test Task 1C
#-----------------------------------------------------
def test_stations_within_radius():
# Create a station
s_id = "test-s-id"
m_id = "test-m-id"
label = "a"
coord = (-0.1, 0.03)
trange = (-2.3, 3.4445)
river = "River X"
town = "My Town"
a = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
# Create a station
s_id = "test-s-id"
m_id = "test-m-id"
label = "b"
coord = (0.1, 0.12)
trange = (5.2, 3.4445)
river = "River X"
town = "My Town"
b = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
# Create a station
s_id = "test-s-id"
m_id = "test-m-id"
label = "c"
coord = (-2.0, 4.0)
trange = None
river = "River X"
town = "My Town"
c = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
stations = [a, b, c]
stations_near_origin = sorted(stations_within_radius(stations, (0,0), 18))
print(stations_near_origin)
return stations_near_origin
#print(a.name,b.name)
assert stations_near_origin == [a.name, b.name]
#print(test_stations_within_radius())
#Test Task 1D
#-----------------------------------------------------
#test stations_by_river
def test_stations_by_river():
s_id = "testSid1"
m_id = "testMid1"
label = "TS1"
coord = (1.0, 4.0)
trange = (-2, 5)
river = "River Thames"
town = "My Town 1"
Test1 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid2"
m_id = "testMid2"
label = "TS2"
coord = (0.0, 1.0)
trange = (-2, 2)
river = "River Thames"
town = "Town 2"
Test2 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid3"
m_id = "testMid3"
label = "TS3"
coord = (1.0, 1.0)
trange = (-2, 2)
river = "River 3"
town = "Town 3"
Test3 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
stations=[Test1, Test2, Test3]
assert sorted(stations_by_river(stations)['River Thames']) == [Test1.name, Test2.name]
#test rivers_with_stations
def test_rivers_with_stations():
s_id = "testSid1"
m_id = "testMid1"
label = "TS1"
coord = (1.0, 4.0)
trange = (-2, 5)
river = "River Thames"
town = "My Town 1"
Test1 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid2"
m_id = "testMid2"
label = "TS2"
coord = (0.0, 1.0)
trange = (-2, 2)
river = "River Thames"
town = "Town 2"
Test2 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid3"
m_id = "testMid3"
label = "TS3"
coord = (1.0, 1.0)
trange = (-2, 2)
river = "River 3"
town = "Town 3"
Test3 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
stations=[Test1, Test2, Test3]
assert rivers_with_station(stations) == {'River 3', 'River Thames'}
#Test1C
#Test Task 1E
#-----------------------------------------------------
def test_rivers_by_station_number():
s_id = "testSid1"
m_id = "testMid1"
label = "TS1"
coord = (1.0, 4.0)
trange = (-2, 5)
river = "River Thames"
town = "My Town 1"
Test1 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid2"
m_id = "testMid2"
label = "TS2"
coord = (0.0, 1.0)
trange = (-2, 2)
river = "River Thames"
town = "Town 2"
Test2 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
s_id = "testSid3"
m_id = "testMid3"
label = "TS3"
coord = (1.0, 1.0)
trange = (-2, 2)
river = "River 3"
town = "Town 3"
Test3 = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
stations=[Test1, Test2, Test3]
#Test Task1C#------------------------------
def test_stations_within_radius():
# Create a station
return
s_id = "test-s-id"
m_id = "test-m-id"
label = "a"
coord = (-0.1, 0.03)
trange = (-2.3, 3.4445)
river = "River X"
town = "My Town"
a = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
# Create a station
s_id = "test-s-id"
m_id = "test-m-id"
label = "b"
coord = (0.1, 0.12)
trange = (5.2, 3.4445)
river = "River X"
town = "My Town"
b = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
# Create a station
s_id = "test-s-id"
m_id = "test-m-id"
label = "c"
coord = (-2.0, 4.0)
trange = None
river = "River X"
town = "My Town"
c = MonitoringStation(s_id, m_id, label, coord, trange, river, town)
stations = [a, b, c]
stations_near_origin = sorted(stations_within_radius(stations, (0,0), 18))
assert stations_near_origin == [a.name, b.name]
assert rivers_by_station_number(stations,2)[0][0] == "River Thames"
assert rivers_by_station_number(stations,2)[0][1] == 2
assert rivers_by_station_number(stations,2)[1][0] == "River 3"
assert rivers_by_station_number(stations,2)[1][1] == 1
| 27.702929 | 114 | 0.587978 | 953 | 6,621 | 3.929696 | 0.084995 | 0.033645 | 0.025634 | 0.038451 | 0.774366 | 0.763151 | 0.763151 | 0.740721 | 0.664887 | 0.664887 | 0 | 0.055578 | 0.236369 | 6,621 | 238 | 115 | 27.819328 | 0.685127 | 0.086694 | 0 | 0.84153 | 0 | 0 | 0.111923 | 0 | 0 | 0 | 0 | 0 | 0.065574 | 1 | 0.038251 | false | 0 | 0.027322 | 0 | 0.076503 | 0.005464 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
cfc6cd1bf10d8e93c2150078e6bc1f8ebe2b6a45 | 35 | py | Python | test1.py | kenyonej/PyPlusTraining | 1e0d41745e02a4dc1491be9eaf568dd456d53863 | [
"Apache-2.0"
] | null | null | null | test1.py | kenyonej/PyPlusTraining | 1e0d41745e02a4dc1491be9eaf568dd456d53863 | [
"Apache-2.0"
] | null | null | null | test1.py | kenyonej/PyPlusTraining | 1e0d41745e02a4dc1491be9eaf568dd456d53863 | [
"Apache-2.0"
] | null | null | null | for x in range(0,10)
print(x)
| 8.75 | 20 | 0.571429 | 8 | 35 | 2.5 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12 | 0.285714 | 35 | 3 | 21 | 11.666667 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
cfd25eaeddfc4b2f06130b8ffd8ab60342dd8428 | 4,150 | py | Python | tests/test_analysis.py | KloudTrader/libkloudtrader | 015e2779f80ba2de93be9fa6fd751412a9d5f492 | [
"Apache-2.0"
] | 11 | 2019-01-16T16:10:09.000Z | 2021-03-02T00:59:17.000Z | tests/test_analysis.py | KloudTrader/kloudtrader | 015e2779f80ba2de93be9fa6fd751412a9d5f492 | [
"Apache-2.0"
] | 425 | 2019-07-10T06:59:49.000Z | 2021-01-12T05:32:14.000Z | tests/test_analysis.py | KloudTrader/kloudtrader | 015e2779f80ba2de93be9fa6fd751412a9d5f492 | [
"Apache-2.0"
] | 6 | 2019-03-15T16:25:06.000Z | 2021-05-03T10:02:13.000Z | import libkloudtrader.analysis as analysis
class Test_accumulation_distribution_index:
pass
class Test_awesome_oscillator:
pass
class Test_money_flow_index:
pass
class Test_relative_strength_index:
pass
class Test_stochastic_oscillator_index:
pass
class Test_true_strength_index:
pass
class Test_ultimate_oscillator:
pass
class Test_absolute_price_oscillator:
pass
class Test_aroon:
pass
class Test_aroon_oscillator:
pass
class Test_average_directional_moving_index:
pass
class Test_average_price:
pass
class Test_average_true_range:
pass
class Test_normalized_average_true_range:
pass
class Test_true_range:
pass
class Test_balance_of_power:
pass
class Test_bollinger_bands:
pass
class Test_chaikin_money_flow:
pass
class Test_chande_momentum_oscillator:
pass
class Test_commodity_channel_index:
pass
class Test_correlation_coefficient:
pass
class Test_cumulative_returns:
pass
class Test_daily_returns:
pass
class Test_daily_log_returns:
pass
class Test_detrended_price_oscillator:
pass
class Test_directional_movement_index:
pass
class Test_donchian_channel:
pass
class Test_double_ema:
pass
class Test_ease_of_movement:
pass
class Test_force_index:
pass
class Test_ema:
pass
class Test_ichimoku_cloud:
pass
class Test_kaufman_adaptive_moving_average:
pass
class Test_keltner_channels:
pass
class Test_know_sure_thing:
pass
class Test_linear_regression:
pass
class Test_linear_regression_angle:
pass
class Test_linear_regression_intercept:
pass
class Test_linear_regression_slope:
pass
class Test_macd:
pass
class Test_mass_index:
pass
class Test_midpoint_over_period:
pass
class Test_midpoint_price_over_period:
pass
class Test_minus_directional_indicator:
pass
class Test_minus_directional_movement:
pass
class Test_median_price:
pass
class Test_momentum:
pass
class Test_ma:
pass
class Test_negative_volume_index:
pass
class Test_hilbert_transform_inst_trendline:
pass
class Test_hilbert_transform_dom_cyc_per:
pass
class Test_hilbert_transform_dom_cyc_phase:
pass
class Test_hilbert_transform_phasor_components:
pass
class Test_hilbert_transform_sine_wave:
pass
class Test_hilbert_transform_trend_vs_cycle_mode:
pass
class Test_on_balance_volume:
pass
class Test_parabolic_sar:
pass
class Test_percentage_price_oscillator:
pass
class Test_plus_directional_indicator:
pass
class Test_plus_directional_movement:
pass
class Test_rate_of_change:
pass
class Test_sma:
pass
class Test_standard_deviation:
pass
class Test_stochastic_rsi:
pass
class Test_time_series_forecast:
pass
class Test_trix:
pass
class Test_triangular_ma:
pass
class Test_triple_ema:
pass
class Test_typical_price:
pass
class Test_variance:
pass
class Test_vortex_indicator:
pass
class Test_vortex_indicator:
pass
class Test_weighted_close_price:
pass
class Test_williams_r:
pass
class Test_wma:
pass
class Test_two_crows:
pass
class Test_annual_return:
pass
class Test_returns:
pass
class Test_daily_volatility:
pass
class Test_annual_volatility:
pass
class Test_volatility:
pass
class Test_moving_volatility:
pass
class Test_chaikin_oscillator:
pass
class Test_coppock_curve:
pass
class Test_hull_moving_average:
pass
class Test_volume_price_trend:
pass
class Test_volume_adjusted_moving_average:
pass
class Test_sharpe_ratio:
pass
class Test_annual_sharpe_ratio:
pass
class Test_vwap:
pass
class Test_sortino_ratio:
pass
class Test_calmar_ratio:
pass
class Test_skewness:
pass
class Test_kurtosis:
pass
class Test_omega_ratio:
pass
class Test_tail_ratio:
pass
class Test_alpha:
pass
class Test_beta:
pass
class Test_adjusted_returns:
pass
class Test_information_ratio:
pass
class Test_cagr:
pass
class Test_downside_risk:
pass
class Test_value_at_risk:
pass
| 13.301282 | 49 | 0.775181 | 563 | 4,150 | 5.271758 | 0.25222 | 0.312332 | 0.446766 | 0.066712 | 0.330863 | 0.066375 | 0.046833 | 0.023248 | 0 | 0 | 0 | 0 | 0.199759 | 4,150 | 311 | 50 | 13.344051 | 0.893707 | 0 | 0 | 0.507246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.497585 | 0.004831 | 0 | 0.502415 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 5 |
5c5d32e74273864a56393f51e38205c0f795fc78 | 23 | py | Python | forge/ethyr/torch/__init__.py | wwxFromTju/neural-mmo | 30cf1117c84cbe36bc4b378ed509874d307cf2c3 | [
"MIT"
] | 1,450 | 2019-03-04T15:47:38.000Z | 2022-03-30T03:33:35.000Z | forge/ethyr/torch/__init__.py | wwxFromTju/neural-mmo | 30cf1117c84cbe36bc4b378ed509874d307cf2c3 | [
"MIT"
] | 34 | 2019-03-05T09:50:38.000Z | 2021-08-31T15:20:27.000Z | forge/ethyr/torch/__init__.py | LaudateCorpus1/neural-mmo | a9a7c34a1fb24fbf252e2958bdb869c213e580a3 | [
"MIT"
] | 164 | 2019-03-04T16:09:19.000Z | 2022-02-26T15:43:40.000Z | from .stim import Stim
| 11.5 | 22 | 0.782609 | 4 | 23 | 4.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173913 | 23 | 1 | 23 | 23 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
5c7b26b3c5a9e64be5b64346faf0662bc7d678c6 | 18,183 | py | Python | evaluate.py | lintangsutawika/berkicau | 3245c4255a92dfa04a81d55e6252163032dfab30 | [
"MIT"
] | 3 | 2017-06-07T15:33:02.000Z | 2018-11-19T14:07:55.000Z | evaluate.py | lintangsutawika/berkicau | 3245c4255a92dfa04a81d55e6252163032dfab30 | [
"MIT"
] | null | null | null | evaluate.py | lintangsutawika/berkicau | 3245c4255a92dfa04a81d55e6252163032dfab30 | [
"MIT"
] | null | null | null | import re
import csv
import sys
import nltk
import gensim
import string
import numpy as np
from preprocess import findEntity
class evaluate(object):
"""docstring for evaluate"""
def __init__(self, dir="./Datasets/", filename=None):
super(evaluate, self).__init__()
if filename==None:
self.text = findEntity()
else:
self.text = findEntity(filename=filename)
def getProperOutput(self, allPredictions, Index, mode="None"):
originalTokens = self.text.getTokenized()[Index[0]:(Index[-1]+1)]
outputText = []
for sentenceIndex,eachSentence in enumerate(allPredictions):
outputSentence = ""
for tagIndex, eachTag in enumerate(eachSentence):
predictedEntity = ""
if mode == "withIntermediate":
if eachTag == 0:
pass
elif eachTag == 1:
pass
elif eachTag == 3:
pass
elif eachTag == 5:
pass
else:
if eachTag == 0:
predictedEntity = originalTokens[sentenceIndex][tagIndex]
elif eachTag == 1:
if tagIndex == 0 or eachSentence[tagIndex - 1] != 1:
predictedEntity = "<ENAMEX TYPE=\"PERSON\">" + originalTokens[sentenceIndex][tagIndex]
if tagIndex == (len(eachSentence)-1) or eachSentence[tagIndex + 1] != 1:
predictedEntity = predictedEntity + "</ENAMEX>"
elif tagIndex == (len(eachSentence)-1) or eachSentence[tagIndex + 1] != 1:
predictedEntity = originalTokens[sentenceIndex][tagIndex] + "</ENAMEX>"
elif eachSentence[tagIndex - 1] == 1 and eachSentence[tagIndex + 1] == 1:
predictedEntity = originalTokens[sentenceIndex][tagIndex]
elif eachTag == 2:
if tagIndex == 0 or eachSentence[tagIndex - 1] != 2:
predictedEntity = "<ENAMEX TYPE=\"LOCATION\">" + originalTokens[sentenceIndex][tagIndex]
if tagIndex == (len(eachSentence)-1) or eachSentence[tagIndex + 1] != 2:
predictedEntity = predictedEntity + "</ENAMEX>"
elif tagIndex == (len(eachSentence)-1) or eachSentence[tagIndex + 1] != 2:
predictedEntity = originalTokens[sentenceIndex][tagIndex] + "</ENAMEX>"
elif eachSentence[tagIndex - 1] == 2 and eachSentence[tagIndex + 1] == 2:
predictedEntity = originalTokens[sentenceIndex][tagIndex]
elif eachTag == 3:
if tagIndex == 0 or eachSentence[tagIndex - 1] != 3:
predictedEntity = "<ENAMEX TYPE=\"ORGANIZATION\">" + originalTokens[sentenceIndex][tagIndex]
if tagIndex == (len(eachSentence)-1) or eachSentence[tagIndex + 1] != 3:
predictedEntity = predictedEntity + "</ENAMEX>"
elif tagIndex == (len(eachSentence)-1) or eachSentence[tagIndex + 1] != 3:
predictedEntity = originalTokens[sentenceIndex][tagIndex] + "</ENAMEX>"
elif eachSentence[tagIndex - 1] == 3 and eachSentence[tagIndex - 1] == 3:
predictedEntity = originalTokens[sentenceIndex][tagIndex]
outputSentence = outputSentence + " " + predictedEntity
outputText.append(outputSentence)
return outputText
def getTextOutput(self, allPredictions, Index, mode="None"):
punctuations = list(string.punctuation)
originalTokens = self.text.getTokenized()
originalText = self.text.corpus
outputText = originalText
for sentenceIndex,eachSentence in enumerate(allPredictions):
currentIndex = 0
endTagIndex = (len(eachSentence)-1)
currentSentence = outputText[sentenceIndex]
for tagIndex, eachTag in enumerate(eachSentence):
currentToken = originalTokens[sentenceIndex][tagIndex]
if mode == "withIntermediate":
if eachTag == 0:
pass
elif eachTag == 1:
pass
elif eachTag == 3:
pass
elif eachTag == 5:
pass
else:
if eachTag == 1:
if tagIndex == 0: #At beginning
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"PERSON\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+22+len(currentToken)
if eachSentence[tagIndex+1] != 1:
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
currentIndex = tempIndex + 9
else:
currentIndex = tempIndex
elif 0<tagIndex and tagIndex<endTagIndex: #At middle
if eachSentence[tagIndex-1] == 1: #Previous word tag is the same
if eachSentence[tagIndex+1] == 1: #Next word tag is the same
pass #No need to insert tag
elif eachSentence[tagIndex+1] != 1: #Next word tag is NOT the same, the current word is an end word
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentIndex = currentIndex+len(currentToken)
currentSentence = currentSentence[0:currentIndex] + "</ENAMEX>" + currentSentence[currentIndex::]
elif eachSentence[tagIndex-1] != 1: #Previous word tag is NOT the same, the current word is a start word
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"PERSON\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+22+len(currentToken)
if eachSentence[tagIndex+1] != 1:
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
currentIndex = tempIndex + 9
else:
currentIndex = tempIndex
elif tagIndex == endTagIndex: #At end
if eachSentence[tagIndex-1] != 1:
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"PERSON\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+22+len(currentToken)
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
elif eachSentence[tagIndex-1] == 1: #Previous word tag is the same
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentIndex = currentIndex+len(currentToken)
currentSentence = currentSentence[0:currentIndex] + "</ENAMEX>" + currentSentence[currentIndex::]
elif eachTag == 2:
if tagIndex == 0: #At beginning
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"LOCATION\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+24+len(currentToken)
if eachSentence[tagIndex+1] != 2:
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
currentIndex = tempIndex + 9
else:
currentIndex = tempIndex
elif 0<tagIndex and tagIndex<endTagIndex: #At middle
if eachSentence[tagIndex-1] == 2: #Previous word tag is the same
if eachSentence[tagIndex+1] == 2: #Next word tag is the same
pass #No need to insert tag
elif eachSentence[tagIndex+1] != 2: #Next word tag is NOT the same, the current word is an end word
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentIndex = currentIndex+len(currentToken)
currentSentence = currentSentence[0:currentIndex] + "</ENAMEX>" + currentSentence[currentIndex::]
elif eachSentence[tagIndex-1] != 2: #Previous word tag is NOT the same, the current word is a start word
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"LOCATION\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+24+len(currentToken)
if eachSentence[tagIndex+1] != 2:
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
currentIndex = tempIndex + 9
else:
currentIndex = tempIndex
elif tagIndex == endTagIndex: #At end
if eachSentence[tagIndex-1] != 2:
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"LOCATION\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+24+len(currentToken)
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
elif eachSentence[tagIndex-1] == 2: #Previous word tag is the same
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentIndex = currentIndex+len(currentToken)
currentSentence = currentSentence[0:currentIndex] + "</ENAMEX>" + currentSentence[currentIndex::]
elif eachTag == 3:
if tagIndex == 0: #At beginning
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"ORGANIZATION\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+28+len(currentToken)
if eachSentence[tagIndex+1] != 3:
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
currentIndex = tempIndex + 9
else:
currentIndex = tempIndex
elif 0<tagIndex and tagIndex<endTagIndex: #At middle
if eachSentence[tagIndex-1] == 3: #Previous word tag is the same
if eachSentence[tagIndex+1] == 3: #Next word tag is the same
pass #No need to insert tag
elif eachSentence[tagIndex+1] != 3: #Next word tag is NOT the same, the current word is an end word
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentIndex = currentIndex+len(currentToken)
currentSentence = currentSentence[0:currentIndex] + "</ENAMEX>" + currentSentence[currentIndex::]
elif eachSentence[tagIndex-1] != 3: #Previous word tag is NOT the same, the current word is a start word
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"ORGANIZATION\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+28+len(currentToken)
if eachSentence[tagIndex+1] != 3:
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
currentIndex = tempIndex + 9
else:
currentIndex = tempIndex
elif tagIndex == endTagIndex: #At end
if eachSentence[tagIndex-1] != 3:
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentSentence = currentSentence[0:currentIndex] + "<ENAMEX TYPE=\"ORGANIZATION\">" + currentSentence[currentIndex::]
tempIndex = currentIndex+28+len(currentToken)
currentSentence = currentSentence[0:tempIndex] + "</ENAMEX>" + currentSentence[tempIndex::]
elif eachSentence[tagIndex-1] == 3: #Previous word tag is the same
currentIndex = currentIndex + currentSentence[currentIndex::].index(currentToken) #Get left most index of an entry
currentIndex = currentIndex+len(currentToken)
currentSentence = currentSentence[0:currentIndex] + "</ENAMEX>" + currentSentence[currentIndex::]
outputText[sentenceIndex] = currentSentence
return outputText
def getPredictionElements(self, outputText):
predicted_corpus = outputText
yPred_Person, yPred_Location, yPred_Organization = self.text.find_enamex(corpus=predicted_corpus)
return yPred_Person, yPred_Location, yPred_Organization
def getTaggedElements(self, Index):
test_corpus = self.text.corpus[Index[0]:(Index[-1]+1)]
yPerson, yLocation, yOrganization = self.text.find_enamex(corpus=test_corpus)
return yPerson, yLocation, yOrganization
def F1_ExactMatch(self, yPerson, yLocation, yOrganization, yPred_Person, yPred_Location, yPred_Organization):
true_positive = np.zeros(3)
false_positive = np.zeros(3)
false_negative = np.zeros(3)
precision = np.zeros(3)
recall = np.zeros(3)
for predictions in yPred_Person:
if (predictions in yPerson) == True:
true_positive[0] += 1.0
else:
false_positive[0] +=1.0
for predictions in yPred_Location:
if (predictions in yLocation) == True:
true_positive[1] += 1.0
else:
false_positive[1] +=1.0
for predictions in yPred_Organization:
if (predictions in yOrganization) == True:
true_positive[2] += 1.0
else:
false_positive[2] +=1.0
false_negative[0] = len(yPerson) - true_positive[0]
false_negative[1] = len(yLocation) - true_positive[1]
false_negative[2] = len(yOrganization) - true_positive[2]
#Macro Average
for i in range(3):
if np.sum(true_positive[i]) == 0:
precision[i] = 0
recall[i] = 0
else:
precision[i] = true_positive[i] / (true_positive[i] + false_positive[i])
recall[i] = true_positive[i] / (true_positive[i] + false_negative[i])
MacroPrecision = np.average(precision)
MacroRecall = np.average(recall)
if MacroPrecision == 0 or MacroRecall == 0:
F1_ExactMatch_Macro = 0
else:
F1_ExactMatch_Macro = 2.0 * (MacroPrecision * MacroRecall)/(MacroPrecision + MacroRecall)
#Micro Average
if np.sum(true_positive) == 0:
F1_ExactMatch_Micro = 0
else:
MicroPrecision = np.sum(true_positive)/(np.sum(true_positive)+np.sum(false_positive))
MicroRecall = np.sum(true_positive)/(np.sum(true_positive)+np.sum(false_negative))
F1_ExactMatch_Micro = 2.0 * (MicroPrecision * MicroRecall)/(MicroPrecision + MicroRecall)
return F1_ExactMatch_Macro, F1_ExactMatch_Micro | 65.642599 | 150 | 0.535885 | 1,495 | 18,183 | 6.472241 | 0.087625 | 0.080612 | 0.084642 | 0.079062 | 0.805912 | 0.776871 | 0.726023 | 0.715482 | 0.685924 | 0.665151 | 0 | 0.018848 | 0.378485 | 18,183 | 277 | 151 | 65.642599 | 0.83736 | 0.071165 | 0 | 0.556 | 0 | 0 | 0.024999 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.024 | false | 0.044 | 0.032 | 0 | 0.08 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5cb5e185d76d2ce56f5dac0d337dba285b5f1e76 | 42 | py | Python | error.py | Irtiza90/b-baka | 885e1df287a8de352c5ca567f0a71ecaff6cd22e | [
"MIT"
] | 1 | 2022-02-07T08:51:04.000Z | 2022-02-07T08:51:04.000Z | error.py | Irtiza90/b-baka | 885e1df287a8de352c5ca567f0a71ecaff6cd22e | [
"MIT"
] | 4 | 2022-02-08T11:03:24.000Z | 2022-03-13T18:34:02.000Z | error.py | Irtiza90/b-baka | 885e1df287a8de352c5ca567f0a71ecaff6cd22e | [
"MIT"
] | 1 | 2022-02-08T09:34:07.000Z | 2022-02-08T09:34:07.000Z | class StartsWithError(Exception):
pass | 21 | 33 | 0.785714 | 4 | 42 | 8.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 42 | 2 | 34 | 21 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
5ccf907c7279041c252949a6fbee9c22dafb894c | 92 | py | Python | libs/__init__.py | OnofreTZK/VirtualMemory | 856e96b14a3fba656bc15084ab2fa3d7be510b0f | [
"MIT"
] | null | null | null | libs/__init__.py | OnofreTZK/VirtualMemory | 856e96b14a3fba656bc15084ab2fa3d7be510b0f | [
"MIT"
] | 1 | 2019-11-29T04:34:31.000Z | 2019-11-29T04:34:31.000Z | libs/__init__.py | OnofreTZK/VirtualMemory | 856e96b14a3fba656bc15084ab2fa3d7be510b0f | [
"MIT"
] | null | null | null | from .global_var import *
from .arguments import processing_args
from .memory import Memory
| 23 | 38 | 0.826087 | 13 | 92 | 5.692308 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 92 | 3 | 39 | 30.666667 | 0.925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
7aa7e5c68e658faf6f1c54d69a313cc9bd55e31a | 170 | py | Python | lib/__init__.py | ebeuerle/resolved_sva_issues | f1b0b9780c55759603a913caaaee7bbefa80ea40 | [
"Unlicense"
] | 1 | 2017-10-03T15:24:04.000Z | 2017-10-03T15:24:04.000Z | lib/__init__.py | ebeuerle/resolved_sva_issues | f1b0b9780c55759603a913caaaee7bbefa80ea40 | [
"Unlicense"
] | null | null | null | lib/__init__.py | ebeuerle/resolved_sva_issues | f1b0b9780c55759603a913caaaee7bbefa80ea40 | [
"Unlicense"
] | null | null | null | from server_controller import ServerController
from csv_writer import CsvWriter
from config_helper import ConfigHelper
__author__ = "CloudPassage"
__version__ = "1.0"
| 21.25 | 46 | 0.835294 | 20 | 170 | 6.55 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013423 | 0.123529 | 170 | 7 | 47 | 24.285714 | 0.865772 | 0 | 0 | 0 | 0 | 0 | 0.088235 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.2 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
8f94e2ba5c3eceac58e958a24f43574a39f2aa2a | 40 | py | Python | exception/ApiException.py | stockflourish/api-pull-nse-bhavcopy | 5329ce9ab1a3e7a2c3c505828b58b0d9c5f0681e | [
"MIT"
] | 8 | 2017-11-28T11:05:52.000Z | 2021-11-16T13:52:45.000Z | neverlose/exceptions/api_exception.py | neverlosecc/api-wrapper | 9593e2539f5dfda58ae10b3f58cf7dd35d7cc7fe | [
"MIT"
] | 4 | 2018-12-23T14:52:11.000Z | 2019-08-09T21:01:44.000Z | neverlose/exceptions/api_exception.py | neverlosecc/api-wrapper | 9593e2539f5dfda58ae10b3f58cf7dd35d7cc7fe | [
"MIT"
] | 2 | 2017-11-28T14:38:24.000Z | 2017-11-29T09:03:20.000Z | class ApiException(Exception):
pass
| 13.333333 | 30 | 0.75 | 4 | 40 | 7.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.175 | 40 | 2 | 31 | 20 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
8fb1b74d7414fac877745f6b2ac1cfdce3310343 | 112 | py | Python | peekpy/admin/views.py | Xeladem/PeekPy | cff6f73ff5d29a022e60f6927b3e188bb10186cd | [
"MIT"
] | null | null | null | peekpy/admin/views.py | Xeladem/PeekPy | cff6f73ff5d29a022e60f6927b3e188bb10186cd | [
"MIT"
] | null | null | null | peekpy/admin/views.py | Xeladem/PeekPy | cff6f73ff5d29a022e60f6927b3e188bb10186cd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint
admin = Blueprint('admin', __name__, url_prefix='/admin') | 18.666667 | 57 | 0.678571 | 14 | 112 | 5.071429 | 0.785714 | 0.394366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0.142857 | 112 | 6 | 57 | 18.666667 | 0.729167 | 0.1875 | 0 | 0 | 0 | 0 | 0.122222 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 1 | 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 | 1 | 0 | 5 |
8feca33be3031d31becc6a96f2b235d4af3a9a4c | 91 | py | Python | Assets/Python/Test/TestAll.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 93 | 2015-11-20T04:13:36.000Z | 2022-03-24T00:03:08.000Z | Assets/Python/Test/TestAll.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 206 | 2015-11-09T00:27:15.000Z | 2021-12-04T19:05:18.000Z | Assets/Python/Test/TestAll.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 117 | 2015-11-08T02:43:46.000Z | 2022-02-12T06:29:00.000Z | import TestCore
import TestVictory
import TestHistoricalVictory
import TestReligiousVictory | 22.75 | 28 | 0.923077 | 8 | 91 | 10.5 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 91 | 4 | 29 | 22.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
8ff2d71c02e68ca330c67c1c6ce1fbbba9536e75 | 137 | py | Python | mcatools/__init__.py | infinitewarp/mcatools | 1c4177afb3e46d6796cfbf22cae410832bf93ae7 | [
"MIT"
] | null | null | null | mcatools/__init__.py | infinitewarp/mcatools | 1c4177afb3e46d6796cfbf22cae410832bf93ae7 | [
"MIT"
] | null | null | null | mcatools/__init__.py | infinitewarp/mcatools | 1c4177afb3e46d6796cfbf22cae410832bf93ae7 | [
"MIT"
] | null | null | null | """Tools for interacting with Minecraft "mca" world region files."""
from . import biome, definitions, imageutils, region # noqa: F401
| 34.25 | 68 | 0.737226 | 17 | 137 | 5.941176 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025862 | 0.153285 | 137 | 3 | 69 | 45.666667 | 0.844828 | 0.540146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
64e63fbc816bd73f96d64a0de5e4adb3b6d496f1 | 162 | py | Python | applications/plugins/SofaPython/SofaPython_test/python/test_Tools.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | applications/plugins/SofaPython/SofaPython_test/python/test_Tools.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | applications/plugins/SofaPython/SofaPython_test/python/test_Tools.py | sofa-framework/issofa | 94855f488465bc3ed41223cbde987581dfca5389 | [
"OML"
] | null | null | null | import SofaPython.Tools
from SofaTest.Macro import *
def run():
ok=True
ok&=EXPECT_EQ("1 2 3 4", SofaPython.Tools.listToStr([1,2,3,4]) )
return ok
| 16.2 | 68 | 0.660494 | 27 | 162 | 3.925926 | 0.666667 | 0.283019 | 0.056604 | 0.075472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061538 | 0.197531 | 162 | 9 | 69 | 18 | 0.753846 | 0 | 0 | 0 | 0 | 0 | 0.043478 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
64e7857536e16f378967e57c00f72426dc95500e | 26 | py | Python | PySignature/__init__.py | cybermats/signature_maker | cab52ffeecc9ed96d514692233d68908ecf2dde5 | [
"MIT"
] | null | null | null | PySignature/__init__.py | cybermats/signature_maker | cab52ffeecc9ed96d514692233d68908ecf2dde5 | [
"MIT"
] | null | null | null | PySignature/__init__.py | cybermats/signature_maker | cab52ffeecc9ed96d514692233d68908ecf2dde5 | [
"MIT"
] | null | null | null | from .ranger import Ranger | 26 | 26 | 0.846154 | 4 | 26 | 5.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 26 | 1 | 26 | 26 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
64f03d319cb3ab477ff1353fafda7e1fd0169301 | 156 | py | Python | src/lesson_runtime_features/platform_platform.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | 3 | 2018-08-14T09:33:52.000Z | 2022-03-21T12:31:58.000Z | src/lesson_runtime_features/platform_platform.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | src/lesson_runtime_features/platform_platform.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | import platform
print('Normal :', platform.platform())
print('Aliased:', platform.platform(aliased=True))
print('Terse :', platform.platform(terse=True))
| 26 | 50 | 0.737179 | 18 | 156 | 6.388889 | 0.388889 | 0.417391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 156 | 5 | 51 | 31.2 | 0.798611 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0.75 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
64f2d96fc3222ba321cf935d2b7431a45287f447 | 191 | py | Python | app/skep/docker/network.py | kallisti5/skep | 6d6f79c80b958ed6c7dd09195316cd0c87d6a39d | [
"MIT"
] | 33 | 2019-07-16T10:03:20.000Z | 2021-11-06T23:56:07.000Z | app/skep/docker/network.py | kallisti5/skep | 6d6f79c80b958ed6c7dd09195316cd0c87d6a39d | [
"MIT"
] | 42 | 2019-05-26T16:15:37.000Z | 2022-02-26T10:45:38.000Z | app/skep/docker/network.py | kallisti5/skep | 6d6f79c80b958ed6c7dd09195316cd0c87d6a39d | [
"MIT"
] | 7 | 2019-09-02T02:30:35.000Z | 2021-01-09T14:13:58.000Z | class Network:
def __init__(self, network):
self.id = network.id
self.name = network.name
def serializable(self):
return { 'id': self.id, 'name': self.name }
| 23.875 | 51 | 0.591623 | 24 | 191 | 4.541667 | 0.375 | 0.110092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.277487 | 191 | 7 | 52 | 27.285714 | 0.789855 | 0 | 0 | 0 | 0 | 0 | 0.031414 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0.166667 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
8f0032060b08e52254cf4117354788425184adff | 90 | py | Python | client/simulate_stream_event/__init__.py | lvzheqi/StreamingEventCompliance | 3a9470f9b0b670c814864369f22e1f1eacef7bad | [
"BSD-2-Clause"
] | 3 | 2018-10-16T15:14:41.000Z | 2019-09-04T09:38:55.000Z | client/simulate_stream_event/__init__.py | lvzheqi/StreamingEventCompliance | 3a9470f9b0b670c814864369f22e1f1eacef7bad | [
"BSD-2-Clause"
] | 2 | 2021-03-31T19:00:14.000Z | 2021-12-13T19:51:46.000Z | client/simulate_stream_event/__init__.py | lvzheqi/StreamingEventCompliance | 3a9470f9b0b670c814864369f22e1f1eacef7bad | [
"BSD-2-Clause"
] | 2 | 2018-10-16T15:14:43.000Z | 2019-12-16T13:58:28.000Z | from simulate_stream_event import eventlog, eventthread, exception, config, client_logging | 90 | 90 | 0.877778 | 11 | 90 | 6.909091 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077778 | 90 | 1 | 90 | 90 | 0.915663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8f197d5ac0b54c8dc3cce6fb2d2edd8dbaf779d4 | 58 | py | Python | app/microblog.py | mikemazara/flask_microblog | 5451e0aeb697a86bbfe4e9060f77b1c612e0d1ff | [
"MIT"
] | null | null | null | app/microblog.py | mikemazara/flask_microblog | 5451e0aeb697a86bbfe4e9060f77b1c612e0d1ff | [
"MIT"
] | null | null | null | app/microblog.py | mikemazara/flask_microblog | 5451e0aeb697a86bbfe4e9060f77b1c612e0d1ff | [
"MIT"
] | null | null | null | # This is cool
# imma leave a comment
from app import app
| 14.5 | 22 | 0.741379 | 11 | 58 | 3.909091 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.224138 | 58 | 3 | 23 | 19.333333 | 0.955556 | 0.568966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8f657348e1cdc902802d6e505137cdb456c45dbf | 189 | py | Python | kool/utils/__init__.py | Jiaming1999/kool | efe847a05c1a07af5eddeeeb700fdefcb6c9ced9 | [
"MIT"
] | null | null | null | kool/utils/__init__.py | Jiaming1999/kool | efe847a05c1a07af5eddeeeb700fdefcb6c9ced9 | [
"MIT"
] | 6 | 2017-09-04T05:14:03.000Z | 2021-11-08T06:11:26.000Z | kool/utils/__init__.py | Jiaming1999/kool | efe847a05c1a07af5eddeeeb700fdefcb6c9ced9 | [
"MIT"
] | 1 | 2021-11-07T22:08:32.000Z | 2021-11-07T22:08:32.000Z | from .converter import camel_to_snake
from .crypto import get_random_string, constant_time_compare
from .encoding import is_protected_type, force_text, force_bytes
from .timezone import now | 47.25 | 64 | 0.867725 | 29 | 189 | 5.310345 | 0.758621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095238 | 189 | 4 | 65 | 47.25 | 0.900585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
56b588994e6c53002f41fc9753cf7a5738a10f08 | 2,370 | py | Python | tests/test_tocdirective.py | peaceiris/jupyter-book | 4ff5b38d9dca21b24a906ba25e0276a954ed454f | [
"BSD-3-Clause"
] | null | null | null | tests/test_tocdirective.py | peaceiris/jupyter-book | 4ff5b38d9dca21b24a906ba25e0276a954ed454f | [
"BSD-3-Clause"
] | null | null | null | tests/test_tocdirective.py | peaceiris/jupyter-book | 4ff5b38d9dca21b24a906ba25e0276a954ed454f | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from subprocess import run
from bs4 import BeautifulSoup
path_tests = Path(__file__).parent.resolve()
path_books = path_tests.joinpath("books")
path_root = path_tests.parent
def test_toc_startwithlist(tmpdir, file_regression):
"""Testing a basic _toc.yml for tableofcontents directive"""
path_output = Path(tmpdir).joinpath("mybook").absolute()
# Regular TOC should work
p_toc = path_books.joinpath("toc")
path_toc = p_toc.joinpath("_toc_startwithlist.yml")
run(
f"jb build {p_toc} --path-output {path_output} --toc {path_toc} -W".split(),
check=True,
)
path_toc_directive = path_output.joinpath("_build", "html", "index.html")
# get the tableofcontents markup
soup = BeautifulSoup(path_toc_directive.read_text(), "html.parser")
toc = soup.find_all("div", class_="tableofcontents-wrapper")[0]
file_regression.check(str(toc), extension=".html")
def test_toc_withheaders(tmpdir, file_regression):
"""Testing `header` in _toc.yml"""
path_output = Path(tmpdir).joinpath("mybook").absolute()
# Regular TOC should work
p_toc = path_books.joinpath("toc")
path_toc = p_toc.joinpath("_toc_withheaders.yml")
run(
f"jb build {p_toc} --path-output {path_output} --toc {path_toc} -W".split(),
check=True,
)
path_toc_directive = path_output.joinpath("_build", "html", "index.html")
# get the tableofcontents markup
soup = BeautifulSoup(path_toc_directive.read_text(), "html.parser")
toc = soup.find_all("div", class_="tableofcontents-wrapper")[0]
file_regression.check(str(toc), extension=".html")
def test_toc_urllink(tmpdir, file_regression):
"""Testing with additional `url` link key in _toc.yml"""
path_output = Path(tmpdir).joinpath("mybook").absolute()
# Regular TOC should work
p_toc = path_books.joinpath("toc")
path_toc = p_toc.joinpath("_toc_urllink.yml")
run(
f"jb build {p_toc} --path-output {path_output} --toc {path_toc} -W".split(),
check=True,
)
path_toc_directive = path_output.joinpath("_build", "html", "index.html")
# get the tableofcontents markup
soup = BeautifulSoup(path_toc_directive.read_text(), "html.parser")
toc = soup.find_all("div", class_="tableofcontents-wrapper")[0]
file_regression.check(str(toc), extension=".html")
| 35.373134 | 84 | 0.694093 | 315 | 2,370 | 4.965079 | 0.215873 | 0.076726 | 0.053708 | 0.05179 | 0.759591 | 0.759591 | 0.759591 | 0.759591 | 0.759591 | 0.759591 | 0 | 0.002021 | 0.164979 | 2,370 | 66 | 85 | 35.909091 | 0.788277 | 0.126582 | 0 | 0.642857 | 0 | 0 | 0.228404 | 0.044412 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.071429 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
56c040afb4e4d194d74e79b7c957cd9a461e53fa | 146 | py | Python | src/ejercicio_1.py | apuniello/equipo_8 | 1c59d2f7e5086642a793b1dcae2ffe06e369dd78 | [
"MIT"
] | null | null | null | src/ejercicio_1.py | apuniello/equipo_8 | 1c59d2f7e5086642a793b1dcae2ffe06e369dd78 | [
"MIT"
] | null | null | null | src/ejercicio_1.py | apuniello/equipo_8 | 1c59d2f7e5086642a793b1dcae2ffe06e369dd78 | [
"MIT"
] | null | null | null | # 1 - Dado un string, escribir una funcion que cambie todos los espacios por guiones.
def reemplazar(input):
print (input.replace(" ", "-")) | 48.666667 | 86 | 0.691781 | 20 | 146 | 5.05 | 0.95 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008403 | 0.184932 | 146 | 3 | 87 | 48.666667 | 0.840336 | 0.568493 | 0 | 0 | 0 | 0 | 0.033333 | 0 | 0 | 0 | 0 | 0.333333 | 0 | 1 | 0.5 | false | 0 | 0 | 0 | 0.5 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
56e2019db9caa55adc96a53a08969e4b40fce81c | 191 | py | Python | test/regexQuery/form.py | Khaled-Abousheikh/django-heroku | fce8c5abf73382be3b1e74dab635792bd9e28ff9 | [
"BSD-3-Clause"
] | null | null | null | test/regexQuery/form.py | Khaled-Abousheikh/django-heroku | fce8c5abf73382be3b1e74dab635792bd9e28ff9 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:33:59.000Z | 2021-06-10T23:33:59.000Z | test/regexQuery/form.py | Khaled-Abousheikh/django-heroku | fce8c5abf73382be3b1e74dab635792bd9e28ff9 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
class RegexForm(forms.Form):
string_input = forms.CharField(label='String', max_length=500)
regex_input = forms.CharField(label='Regex', max_length=200)
| 31.833333 | 66 | 0.743455 | 26 | 191 | 5.307692 | 0.615385 | 0.144928 | 0.275362 | 0.347826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036585 | 0.141361 | 191 | 6 | 67 | 31.833333 | 0.804878 | 0 | 0 | 0 | 0 | 0 | 0.057292 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
56f2efabe429d74c808e7e5796b620c208dc73b3 | 94 | py | Python | snapper/src/waitress_server.py | omaritgis/SiteSnapR | 69c343294bc2872771a59264b430df7707f5d84b | [
"MIT"
] | null | null | null | snapper/src/waitress_server.py | omaritgis/SiteSnapR | 69c343294bc2872771a59264b430df7707f5d84b | [
"MIT"
] | null | null | null | snapper/src/waitress_server.py | omaritgis/SiteSnapR | 69c343294bc2872771a59264b430df7707f5d84b | [
"MIT"
] | null | null | null | from waitress import serve
import middleware
serve(middleware.app, host='127.0.0.1', port=80) | 23.5 | 48 | 0.776596 | 16 | 94 | 4.5625 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094118 | 0.095745 | 94 | 4 | 48 | 23.5 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0.094737 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
71450b1926e96628d8e467f47605846cc2cd27cb | 28 | py | Python | pkgname/cfg/__init__.py | StoneT2000/rl-boilerplate | 7f2a64b9168ed65b49e718f7532d49ec70884e99 | [
"MIT"
] | 1 | 2022-03-11T03:41:32.000Z | 2022-03-11T03:41:32.000Z | pkgname/cfg/__init__.py | StoneT2000/rl-boilerplate | 7f2a64b9168ed65b49e718f7532d49ec70884e99 | [
"MIT"
] | null | null | null | pkgname/cfg/__init__.py | StoneT2000/rl-boilerplate | 7f2a64b9168ed65b49e718f7532d49ec70884e99 | [
"MIT"
] | null | null | null | from .parse import parse_cfg | 28 | 28 | 0.857143 | 5 | 28 | 4.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107143 | 28 | 1 | 28 | 28 | 0.92 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
8572a26298eced6b59a6a1145d734cb0fe5a86c3 | 248 | py | Python | system/utils.py | farhapartex/django-dookan | 2406aa26d374f895c34a30615a5f369b0a1542ee | [
"MIT"
] | 10 | 2020-03-31T20:51:10.000Z | 2020-08-06T00:38:41.000Z | system/utils.py | farhapartex/django-dookan | 2406aa26d374f895c34a30615a5f369b0a1542ee | [
"MIT"
] | null | null | null | system/utils.py | farhapartex/django-dookan | 2406aa26d374f895c34a30615a5f369b0a1542ee | [
"MIT"
] | 3 | 2020-04-01T04:33:04.000Z | 2020-05-07T19:09:14.000Z | import threading
_thread_locals = threading.local()
def set_current_user(user):
_thread_locals.user = user
def get_current_user():
return getattr(_thread_locals, 'user', None)
def remove_current_user():
_thread_locals.user = None | 16.533333 | 48 | 0.75 | 33 | 248 | 5.212121 | 0.424242 | 0.27907 | 0.27907 | 0.232558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157258 | 248 | 15 | 49 | 16.533333 | 0.822967 | 0 | 0 | 0 | 0 | 0 | 0.016064 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.375 | false | 0 | 0.125 | 0.125 | 0.625 | 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 | 1 | 0 | 0 | 0 | 5 |
8579b65815f7ee00938aad016960512332cd61b0 | 120 | py | Python | scripts/exp_scripts/src/ec2_scripts/generate_config_file.py | MobilityFirst/GNS | 1eb5524457e0075dc9f451bd66e39f9291052eb8 | [
"Apache-2.0"
] | 17 | 2015-11-16T18:02:47.000Z | 2020-08-02T08:53:11.000Z | scripts/exp_scripts/src/ec2_scripts/generate_config_file.py | MobilityFirst/GNS | 1eb5524457e0075dc9f451bd66e39f9291052eb8 | [
"Apache-2.0"
] | 63 | 2015-12-22T20:52:28.000Z | 2019-03-06T02:44:20.000Z | scripts/exp_scripts/src/ec2_scripts/generate_config_file.py | MobilityFirst/GNS | 1eb5524457e0075dc9f451bd66e39f9291052eb8 | [
"Apache-2.0"
] | 62 | 2015-11-13T20:04:47.000Z | 2020-01-10T12:20:44.000Z | import os
import sys
import exp_config
config_file = 'local_config'
def write_local_config_file(filename):
pass
| 10.909091 | 38 | 0.783333 | 18 | 120 | 4.888889 | 0.611111 | 0.227273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 120 | 10 | 39 | 12 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0.1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.166667 | 0.5 | 0 | 0.666667 | 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 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
85acf1da0c17bf37f5607a1b7f6095f9d744052e | 216 | py | Python | DLFrameWork/losses/__init__.py | Mostafa-ashraf19/TourchPIP | a5090a0ec9cc81a91fe1fd6af41d77841361cec1 | [
"MIT"
] | null | null | null | DLFrameWork/losses/__init__.py | Mostafa-ashraf19/TourchPIP | a5090a0ec9cc81a91fe1fd6af41d77841361cec1 | [
"MIT"
] | null | null | null | DLFrameWork/losses/__init__.py | Mostafa-ashraf19/TourchPIP | a5090a0ec9cc81a91fe1fd6af41d77841361cec1 | [
"MIT"
] | null | null | null | from .BiploarPerceptron import BiploarPerceptron
from .SD import SD
from .Biploar_SVM import Biploar_SVM
from .SoftmaxCrossEntropy import SoftmaxCrossEntropy
from .MultiClassPerceptron import MultiClassPerceptron | 43.2 | 55 | 0.87037 | 22 | 216 | 8.454545 | 0.363636 | 0.107527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106481 | 216 | 5 | 55 | 43.2 | 0.963731 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
85c07f53b454796e714e72ea846af09d8ab87ea5 | 193 | py | Python | covid/utils/aws.py | mleila/CovidDisrupt | 7e5e3bb4c93ab733c72a7a87fb2c8212a95a64bd | [
"MIT"
] | 2 | 2020-04-03T00:10:55.000Z | 2020-04-10T20:36:42.000Z | covid/utils/aws.py | mleila/CovidDisrupt | 7e5e3bb4c93ab733c72a7a87fb2c8212a95a64bd | [
"MIT"
] | 10 | 2021-03-19T11:58:43.000Z | 2022-03-12T00:22:12.000Z | covid/utils/aws.py | mleila/CovidDisrupt | 7e5e3bb4c93ab733c72a7a87fb2c8212a95a64bd | [
"MIT"
] | null | null | null | import boto3
def create_s3_client(bucket):
pass
def create_s3_resource(region_name):
"""
Create an S3 Resource.
"""
return boto3.resource('s3', region_name=region_name)
| 14.846154 | 56 | 0.689119 | 26 | 193 | 4.846154 | 0.5 | 0.238095 | 0.174603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.039216 | 0.207254 | 193 | 12 | 57 | 16.083333 | 0.784314 | 0.11399 | 0 | 0 | 0 | 0 | 0.012903 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0.2 | 0.2 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 5 |
85c5d01aa59a488cdad4ba573c5187a7ff2bcde8 | 140 | py | Python | server/featherlight/resolvers/subscription/__init__.py | FeatherLightApp/FeatherLight-API | 1543cc4532f9a8ec1bae51374d4e5d88546c8d15 | [
"MIT"
] | 3 | 2020-06-28T17:30:57.000Z | 2022-01-25T18:03:38.000Z | server/featherlight/resolvers/subscription/__init__.py | FeatherLightApp/FeatherLight-API | 1543cc4532f9a8ec1bae51374d4e5d88546c8d15 | [
"MIT"
] | null | null | null | server/featherlight/resolvers/subscription/__init__.py | FeatherLightApp/FeatherLight-API | 1543cc4532f9a8ec1bae51374d4e5d88546c8d15 | [
"MIT"
] | 1 | 2021-02-04T07:14:08.000Z | 2021-02-04T07:14:08.000Z | from typing import List
from ariadne import SubscriptionType
from .invoice import INVOICE
SUBSCRIPTION: List[SubscriptionType] = [INVOICE]
| 23.333333 | 48 | 0.828571 | 16 | 140 | 7.25 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121429 | 140 | 5 | 49 | 28 | 0.943089 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.75 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
a41e99c2fad5197a14bc6aeef880e78adb1c88c6 | 87 | py | Python | Problem_10_sol.py | infdahai/PE_sol | 7764c639474df19f3f02ca5804819a1a74d8a723 | [
"MIT"
] | null | null | null | Problem_10_sol.py | infdahai/PE_sol | 7764c639474df19f3f02ca5804819a1a74d8a723 | [
"MIT"
] | null | null | null | Problem_10_sol.py | infdahai/PE_sol | 7764c639474df19f3f02ca5804819a1a74d8a723 | [
"MIT"
] | null | null | null | import sympy
print(sum(sympy.sieve.primerange(1,2000000)))
'''
这玩意也太强硬了吧。我喜欢如此强壮的
'''
| 12.428571 | 45 | 0.735632 | 11 | 87 | 5.818182 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 0.08046 | 87 | 6 | 46 | 14.5 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 5 |
a44640f503709e4a576efd04a1e920e31df9e8bf | 213 | py | Python | control_ai/possible_moves.py | joshuajcarson/ControlAI | 40d7b8949e6bdebbba20ddfdb3255e3375bdff71 | [
"MIT"
] | null | null | null | control_ai/possible_moves.py | joshuajcarson/ControlAI | 40d7b8949e6bdebbba20ddfdb3255e3375bdff71 | [
"MIT"
] | 1 | 2018-06-07T00:34:52.000Z | 2018-06-07T00:34:52.000Z | control_ai/possible_moves.py | joshuajcarson/ControlAI | 40d7b8949e6bdebbba20ddfdb3255e3375bdff71 | [
"MIT"
] | null | null | null | import control_ai.game_state
class PossibleMoves(object):
def __init__(self, player, action = 'draw', card_name = 'none'):
self.game_state = control_ai.game_state.GameState(player, action, card_name)
| 35.5 | 84 | 0.741784 | 29 | 213 | 5.068966 | 0.62069 | 0.183673 | 0.176871 | 0.244898 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14554 | 213 | 5 | 85 | 42.6 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0.037559 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
a45670d15902eed9d463483400ed75dfc9c9ddb8 | 1,688 | py | Python | Python_Basics/04_Nested_Conditional_Statements/06_Fruit_Shop.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | Python_Basics/04_Nested_Conditional_Statements/06_Fruit_Shop.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | Python_Basics/04_Nested_Conditional_Statements/06_Fruit_Shop.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | fruit = input()
day_of_week = input()
quantity = float(input())
if day_of_week == "Saturday" or day_of_week == "Sunday":
if fruit == "banana":
total_price = quantity * 2.7
print(total_price)
elif fruit == "apple":
total_price = quantity * 1.25
print(total_price)
elif fruit == "orange":
total_price = quantity * 0.9
print(total_price)
elif fruit == "grapefruit":
total_price = quantity * 1.6
print(total_price)
elif fruit == "kiwi":
total_price = quantity * 3
print(total_price)
elif fruit == "pineapple":
total_price = quantity * 5.6
print(total_price)
elif fruit == "grapes":
total_price = quantity * 4.2
print(total_price)
else:
print("error")
elif day_of_week == "Monday" \
or day_of_week == "Tuesday" \
or day_of_week=="Wednesday" \
or day_of_week == "Thursday" \
or day_of_week == "Friday":
if fruit == "banana":
total_price = quantity * 2.5
print(total_price)
elif fruit == "apple":
total_price = quantity * 1.2
print(total_price)
elif fruit == "orange":
total_price = quantity * 0.85
print(total_price)
elif fruit == "grapefruit":
total_price = quantity * 1.45
print(total_price)
elif fruit == "kiwi":
total_price = quantity * 2.7
print(total_price)
elif fruit == "pineapple":
total_price = quantity * 5.5
print(total_price)
elif fruit == "grapes":
total_price = quantity * 3.85
print(total_price)
else:
print("error")
else:
print("error") | 29.103448 | 56 | 0.57109 | 206 | 1,688 | 4.466019 | 0.199029 | 0.304348 | 0.273913 | 0.247826 | 0.783696 | 0.783696 | 0.716304 | 0.667391 | 0.667391 | 0.482609 | 0 | 0.026655 | 0.311019 | 1,688 | 58 | 57 | 29.103448 | 0.764402 | 0 | 0 | 0.631579 | 0 | 0 | 0.092954 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.298246 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
a48b88794d962abb781c7eddcd07e33d35fbf912 | 101 | py | Python | design_bench/oracles/sklearn/kernels/__init__.py | brandontrabucco/design_bench | 824516ec59396aded3ca55ec7c1c313626ecaceb | [
"MIT"
] | 27 | 2020-06-30T00:57:12.000Z | 2022-03-25T16:24:11.000Z | design_bench/oracles/sklearn/kernels/__init__.py | brandontrabucco/design_bench | 824516ec59396aded3ca55ec7c1c313626ecaceb | [
"MIT"
] | 7 | 2021-02-16T06:25:02.000Z | 2022-03-31T17:21:17.000Z | design_bench/oracles/sklearn/kernels/__init__.py | brandontrabucco/design_bench | 824516ec59396aded3ca55ec7c1c313626ecaceb | [
"MIT"
] | 5 | 2021-07-19T12:16:32.000Z | 2022-03-01T16:56:16.000Z | from .protein_kernel import ProteinKernel
from .default_sequence_kernel import DefaultSequenceKernel
| 33.666667 | 58 | 0.90099 | 11 | 101 | 8 | 0.727273 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079208 | 101 | 2 | 59 | 50.5 | 0.946237 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
8ef911b067f636069e033df251dc98abe4128886 | 278 | py | Python | pyinstaller/hooks/hook-glycopeptide_feature_learning.py | mobiusklein/glycresoft | 60d6eddffc6d8c783f0fe470b5010d4f437c7e73 | [
"Apache-2.0"
] | 4 | 2019-04-26T15:47:57.000Z | 2021-04-20T22:53:58.000Z | pyinstaller/hooks/hook-glycopeptide_feature_learning.py | mobiusklein/glycresoft | 60d6eddffc6d8c783f0fe470b5010d4f437c7e73 | [
"Apache-2.0"
] | 8 | 2017-11-22T19:20:20.000Z | 2022-02-14T01:49:58.000Z | pyinstaller/hooks/hook-glycopeptide_feature_learning.py | mobiusklein/glycresoft | 60d6eddffc6d8c783f0fe470b5010d4f437c7e73 | [
"Apache-2.0"
] | 3 | 2017-11-21T18:05:28.000Z | 2021-09-23T18:38:33.000Z | from PyInstaller.utils.hooks import collect_submodules, collect_data_files
hiddenimports = collect_submodules(
"glycopeptide_feature_learning._c") + collect_submodules("glycopeptide_feature_learning.scoring._c")
datas = collect_data_files('glycopeptide_feature_learning')
| 39.714286 | 104 | 0.852518 | 31 | 278 | 7.16129 | 0.516129 | 0.22973 | 0.364865 | 0.324324 | 0.396396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071942 | 278 | 6 | 105 | 46.333333 | 0.860465 | 0 | 0 | 0 | 0 | 0 | 0.363309 | 0.363309 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
f1200b83ea5690222dcdef775c640f9f82adeb9d | 29 | py | Python | embegym/evaluation/supervised/__init__.py | word-forge/embeddings-gym | 8c95e68dd4b2c7fd3e99e1e85f4fc8407bd37455 | [
"Apache-2.0"
] | 1 | 2018-09-19T06:42:45.000Z | 2018-09-19T06:42:45.000Z | embegym/evaluation/supervised/__init__.py | word-forge/embeddings-gym | 8c95e68dd4b2c7fd3e99e1e85f4fc8407bd37455 | [
"Apache-2.0"
] | null | null | null | embegym/evaluation/supervised/__init__.py | word-forge/embeddings-gym | 8c95e68dd4b2c7fd3e99e1e85f4fc8407bd37455 | [
"Apache-2.0"
] | null | null | null | from . import base, text_cat
| 14.5 | 28 | 0.758621 | 5 | 29 | 4.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172414 | 29 | 1 | 29 | 29 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
f122d562a53351e963e93b76f8b867ee4b5b7557 | 59 | py | Python | deid/logger/__init__.py | glebsts/deid | a0c630ee613d358b3c8e936dd539d51dee94a5a7 | [
"MIT"
] | 88 | 2017-10-16T12:47:09.000Z | 2022-03-10T23:08:04.000Z | deid/logger/__init__.py | glebsts/deid | a0c630ee613d358b3c8e936dd539d51dee94a5a7 | [
"MIT"
] | 180 | 2017-06-15T01:37:00.000Z | 2022-03-23T23:05:57.000Z | deid/logger/__init__.py | glebsts/deid | a0c630ee613d358b3c8e936dd539d51dee94a5a7 | [
"MIT"
] | 41 | 2017-09-29T00:29:50.000Z | 2022-03-16T02:26:54.000Z | from .message import bot
from .progress import ProgressBar
| 19.666667 | 33 | 0.830508 | 8 | 59 | 6.125 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.135593 | 59 | 2 | 34 | 29.5 | 0.960784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
f12330572fde591127800ff941331445e0eec81f | 159 | py | Python | TrackingTools/KalmanUpdators/python/TrackingRecHitPropagatorESProducer_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | TrackingTools/KalmanUpdators/python/TrackingRecHitPropagatorESProducer_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | TrackingTools/KalmanUpdators/python/TrackingRecHitPropagatorESProducer_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
# magnetic field
# hit propagator
from TrackingTools.KalmanUpdators.TrackingRecHitPropagatorESProducer_cfi import *
| 22.714286 | 81 | 0.855346 | 16 | 159 | 8.4375 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.100629 | 159 | 6 | 82 | 26.5 | 0.944056 | 0.18239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
f12b0d3bf314e8ec26642f932bc34dbca07e2238 | 59 | py | Python | intrinsic/evaluation/classifiers/models/__init__.py | UKPLab/linspector | 46a7cca6ad34dc673feb47c4d452f1248d5e635b | [
"Apache-2.0"
] | 21 | 2019-03-21T12:10:09.000Z | 2022-03-01T04:42:34.000Z | intrinsic/evaluation/classifiers/models/__init__.py | UKPLab/linspector | 46a7cca6ad34dc673feb47c4d452f1248d5e635b | [
"Apache-2.0"
] | 1 | 2019-03-25T17:27:40.000Z | 2019-04-04T07:01:08.000Z | intrinsic/evaluation/classifiers/models/__init__.py | UKPLab/linspector | 46a7cca6ad34dc673feb47c4d452f1248d5e635b | [
"Apache-2.0"
] | 2 | 2019-04-17T07:36:12.000Z | 2019-10-10T09:15:29.000Z | from classifiers.models.mlp_classifier import MlpClassifier | 59 | 59 | 0.915254 | 7 | 59 | 7.571429 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050847 | 59 | 1 | 59 | 59 | 0.946429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
f14584e43444be916bfd6d5d345465a96c1012d3 | 136 | py | Python | aberdeen/cli/__init__.py | akubera/aberdeen | 09d5570089260dfdc2ed6a7ebf8707dd934f331e | [
"Apache-2.0"
] | 1 | 2015-12-06T00:37:56.000Z | 2015-12-06T00:37:56.000Z | aberdeen/cli/__init__.py | akubera/aberdeen | 09d5570089260dfdc2ed6a7ebf8707dd934f331e | [
"Apache-2.0"
] | null | null | null | aberdeen/cli/__init__.py | akubera/aberdeen | 09d5570089260dfdc2ed6a7ebf8707dd934f331e | [
"Apache-2.0"
] | null | null | null | #
# aberdeen/cli/__init__.py
#
"""
Module containing executable command line scripts.
"""
from . import init
from . import update_hook
| 13.6 | 50 | 0.735294 | 17 | 136 | 5.588235 | 0.823529 | 0.210526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.154412 | 136 | 9 | 51 | 15.111111 | 0.826087 | 0.558824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
74b13366061132151e48ec0f34f7ddf2fc3c8d69 | 162 | py | Python | wsgi.py | VSR-SIM/VSR-SIM.github.io | 561454e22f827dfef38194c4ec0b0a84ebda9133 | [
"CC-BY-3.0"
] | null | null | null | wsgi.py | VSR-SIM/VSR-SIM.github.io | 561454e22f827dfef38194c4ec0b0a84ebda9133 | [
"CC-BY-3.0"
] | null | null | null | wsgi.py | VSR-SIM/VSR-SIM.github.io | 561454e22f827dfef38194c4ec0b0a84ebda9133 | [
"CC-BY-3.0"
] | null | null | null | import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
from index import app
if __name__ == "__main__":
app.run()
| 20.25 | 46 | 0.716049 | 25 | 162 | 4.08 | 0.76 | 0.176471 | 0.254902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007143 | 0.135802 | 162 | 7 | 47 | 23.142857 | 0.721429 | 0 | 0 | 0 | 0 | 0 | 0.345679 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
74bde2015ae7971b14fe97688b454f960a1fed7e | 187 | py | Python | triage_bandit_sandbox/triage_models_sandbox/interfaces/__init__.py | jer-green/triage-bandit-sandbox | 18a824a4af736dff2246f4d86dd1d7104874b044 | [
"RSA-MD"
] | null | null | null | triage_bandit_sandbox/triage_models_sandbox/interfaces/__init__.py | jer-green/triage-bandit-sandbox | 18a824a4af736dff2246f4d86dd1d7104874b044 | [
"RSA-MD"
] | null | null | null | triage_bandit_sandbox/triage_models_sandbox/interfaces/__init__.py | jer-green/triage-bandit-sandbox | 18a824a4af736dff2246f4d86dd1d7104874b044 | [
"RSA-MD"
] | null | null | null | from .triage_data_transformers import TriageDataTransformer, PreparedDataTransformer
from .triage_data import TriageData, TriageDataset, PreparedData
from .triage_model import TriageModel | 62.333333 | 84 | 0.893048 | 19 | 187 | 8.578947 | 0.631579 | 0.184049 | 0.171779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074866 | 187 | 3 | 85 | 62.333333 | 0.942197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
74dc47a941745c286487ba536bb2603b44b7fbf8 | 54 | py | Python | xcomfort/__init__.py | jorgenhauge/xcomfort-python | 1cf8234414592b1438e7860edab52bb9be578ac8 | [
"MIT"
] | 9 | 2020-05-24T18:58:38.000Z | 2022-02-10T13:01:35.000Z | xcomfort/__init__.py | jorgenhauge/xcomfort-python | 1cf8234414592b1438e7860edab52bb9be578ac8 | [
"MIT"
] | 1 | 2020-09-30T18:27:27.000Z | 2020-09-30T18:40:58.000Z | xcomfort/__init__.py | jorgenhauge/xcomfort-python | 1cf8234414592b1438e7860edab52bb9be578ac8 | [
"MIT"
] | 3 | 2021-01-04T20:17:46.000Z | 2022-02-12T22:17:44.000Z | from .bridge import Bridge
from .devices import Light
| 18 | 26 | 0.814815 | 8 | 54 | 5.5 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 54 | 2 | 27 | 27 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2d0d6b2ce4b6d3b54cad30fea823299c7fa6778e | 186 | py | Python | skued/simulation/__init__.py | kjappelbaum/scikit-ued | 8a661e3fa101c7ae1191ce1f3de8e859559bf477 | [
"MIT"
] | null | null | null | skued/simulation/__init__.py | kjappelbaum/scikit-ued | 8a661e3fa101c7ae1191ce1f3de8e859559bf477 | [
"MIT"
] | null | null | null | skued/simulation/__init__.py | kjappelbaum/scikit-ued | 8a661e3fa101c7ae1191ce1f3de8e859559bf477 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .powdersim import powdersim
from .potential import electrostatic, pelectrostatic
from .structure_factors import structure_factor, bounded_reflections, affe
| 31 | 74 | 0.806452 | 21 | 186 | 7 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006061 | 0.112903 | 186 | 5 | 75 | 37.2 | 0.884848 | 0.112903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2d210f735e9dbe56d94c7912fef8fa07084118c9 | 2,938 | py | Python | dataactcore/migrations/versions/91df6b691864_rename_tas_id_to_account_num_in_staging_.py | RonSherfey/data-act-broker-backend | d287abda2cac06dd479ecf0127e789cb8e59387d | [
"CC0-1.0"
] | null | null | null | dataactcore/migrations/versions/91df6b691864_rename_tas_id_to_account_num_in_staging_.py | RonSherfey/data-act-broker-backend | d287abda2cac06dd479ecf0127e789cb8e59387d | [
"CC0-1.0"
] | 3 | 2021-08-22T11:47:45.000Z | 2022-03-29T22:06:49.000Z | dataactcore/migrations/versions/91df6b691864_rename_tas_id_to_account_num_in_staging_.py | RonSherfey/data-act-broker-backend | d287abda2cac06dd479ecf0127e789cb8e59387d | [
"CC0-1.0"
] | null | null | null | """Rename tas_id to account_num in staging tables
Revision ID: 91df6b691864
Revises: bbc020fa7961
Create Date: 2021-05-27 09:57:41.745637
"""
# revision identifiers, used by Alembic.
revision = '91df6b691864'
down_revision = 'bbc020fa7961'
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! ###
# appropriation changes
op.execute("ALTER TABLE appropriation RENAME COLUMN tas_id TO account_num")
op.execute("ALTER INDEX ix_appropriation_tas_id RENAME TO ix_appropriation_account_num")
op.execute("ALTER INDEX ix_appropriation_tas_id_submission_id RENAME TO ix_appropriation_account_num_submission_id")
# object_class_program_activity changes
op.execute("ALTER TABLE object_class_program_activity RENAME COLUMN tas_id TO account_num")
op.execute("ALTER INDEX ix_oc_pa_tas_id_submission_id RENAME TO ix_oc_pa_account_num_submission_id")
# award_financial changes
op.execute("ALTER TABLE award_financial RENAME COLUMN tas_id TO account_num")
op.execute("ALTER INDEX ix_award_financial_tas_id RENAME TO ix_award_financial_account_num")
# certified table changes
op.execute("ALTER TABLE certified_appropriation RENAME COLUMN tas_id TO account_num")
op.execute("ALTER TABLE certified_object_class_program_activity RENAME COLUMN tas_id TO account_num")
op.execute("ALTER TABLE certified_award_financial RENAME COLUMN tas_id TO account_num")
# ### end Alembic commands ###
def downgrade_data_broker():
# ### commands auto generated by Alembic - please adjust! ###
# appropriation changes
op.execute("ALTER TABLE appropriation RENAME COLUMN account_num TO tas_id")
op.execute("ALTER INDEX ix_appropriation_account_num RENAME TO ix_appropriation_tas_id")
op.execute("ALTER INDEX ix_appropriation_account_num_submission_id RENAME TO ix_appropriation_tas_id_submission_id")
# object_class_program_activity changes
op.execute("ALTER TABLE object_class_program_activity RENAME COLUMN account_num TO tas_id")
op.execute("ALTER INDEX ix_oc_pa_account_num_submission_id RENAME TO ix_oc_pa_tas_id_submission_id")
# award_financial changes
op.execute("ALTER TABLE award_financial RENAME COLUMN account_num TO tas_id")
op.execute("ALTER INDEX ix_award_financial_account_num RENAME TO ix_award_financial_tas_id")
# certified table changes
op.execute("ALTER TABLE certified_appropriation RENAME COLUMN account_num TO tas_id")
op.execute("ALTER TABLE certified_object_class_program_activity RENAME COLUMN account_num TO tas_id")
op.execute("ALTER TABLE certified_award_financial RENAME COLUMN account_num TO tas_id")
# ### end Alembic commands ###
| 40.246575 | 120 | 0.790334 | 421 | 2,938 | 5.180523 | 0.168646 | 0.048143 | 0.128381 | 0.104539 | 0.8221 | 0.778542 | 0.759743 | 0.664374 | 0.664374 | 0.624943 | 0 | 0.020643 | 0.142614 | 2,938 | 72 | 121 | 40.805556 | 0.845177 | 0.18516 | 0 | 0 | 0 | 0 | 0.677172 | 0.310051 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.0625 | 0 | 0.1875 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2d329b3ee64e57b351abbe70103e6431758c1bfd | 8,290 | py | Python | pagesext/migrations/0001_initial.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | 1 | 2016-07-08T07:23:20.000Z | 2016-07-08T07:23:20.000Z | pagesext/migrations/0001_initial.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | null | null | null | pagesext/migrations/0001_initial.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import pagesext.storage
import pagesext.models.pageimagecontent
import embed_video.fields
import pagesext.models.pagefilecontent
import django.utils.timezone
from django.conf import settings
import image_cropping.fields
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0002_auto_20150616_2121'),
('pages', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='PageFileContent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=100, verbose_name='Type', db_index=True)),
('language', models.CharField(default=b'en', max_length=5)),
('sid', models.CharField(unique=True, max_length=200)),
('name', models.CharField(unique=True, max_length=200, blank=True)),
('is_extended', models.BooleanField(default=False, verbose_name='Extended?')),
('comment', models.CharField(max_length=250, blank=True)),
('date_created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created')),
('date_updated', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Updated')),
('file', models.FileField(storage=pagesext.storage.PageExtFileSystemStorage(), null=True, upload_to=pagesext.models.pagefilecontent.make_file_upload_path, blank=True)),
('title', models.CharField(max_length=160, blank=True)),
('description', models.TextField(max_length=160, blank=True)),
('created_by', models.ForeignKey(related_name='pagesext_pagefilecontent_creator', to=settings.AUTH_USER_MODEL, null=True)),
('page', models.ForeignKey(verbose_name='Page', to='pages.Page')),
('tags', taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', help_text='A comma-separated list of tags.', verbose_name='Tags')),
('updated_by', models.ForeignKey(related_name='pagesext_pagefilecontent_editor', to=settings.AUTH_USER_MODEL, null=True)),
],
options={
'abstract': False,
'verbose_name': 'File',
'verbose_name_plural': 'File',
},
),
migrations.CreateModel(
name='PageImageContent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=100, verbose_name='Type', db_index=True)),
('language', models.CharField(default=b'en', max_length=5)),
('sid', models.CharField(unique=True, max_length=200)),
('name', models.CharField(unique=True, max_length=200, blank=True)),
('is_extended', models.BooleanField(default=False, verbose_name='Extended?')),
('comment', models.CharField(max_length=250, blank=True)),
('date_created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created')),
('date_updated', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Updated')),
('image', image_cropping.fields.ImageCropField(storage=pagesext.storage.PageExtFileSystemStorage(), null=True, upload_to=pagesext.models.pageimagecontent.make_image_upload_path, blank=True)),
('cropping', image_cropping.fields.ImageRatioField('image', '600x800', hide_image_field=False, size_warning=True, allow_fullsize=True, free_crop=False, adapt_rotation=False, help_text=None, verbose_name='cropping')),
('title', models.CharField(max_length=250, blank=True)),
('created_by', models.ForeignKey(related_name='pagesext_pageimagecontent_creator', to=settings.AUTH_USER_MODEL, null=True)),
('page', models.ForeignKey(verbose_name='Page', to='pages.Page')),
('tags', taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', help_text='A comma-separated list of tags.', verbose_name='Tags')),
('updated_by', models.ForeignKey(related_name='pagesext_pageimagecontent_editor', to=settings.AUTH_USER_MODEL, null=True)),
],
options={
'abstract': False,
'verbose_name': 'Image',
'verbose_name_plural': 'Images',
},
),
migrations.CreateModel(
name='PageTagsContent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=100, verbose_name='Type', db_index=True)),
('language', models.CharField(default=b'en', max_length=5)),
('sid', models.CharField(unique=True, max_length=200)),
('name', models.CharField(unique=True, max_length=200, blank=True)),
('is_extended', models.BooleanField(default=False, verbose_name='Extended?')),
('comment', models.CharField(max_length=250, blank=True)),
('date_created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created')),
('date_updated', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Updated')),
('created_by', models.ForeignKey(related_name='pagesext_pagetagscontent_creator', to=settings.AUTH_USER_MODEL, null=True)),
('page', models.ForeignKey(verbose_name='Page', to='pages.Page')),
('tags', taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', help_text='A comma-separated list of tags.', verbose_name='Tags')),
('updated_by', models.ForeignKey(related_name='pagesext_pagetagscontent_editor', to=settings.AUTH_USER_MODEL, null=True)),
],
options={
'abstract': False,
'verbose_name': 'Tags',
'verbose_name_plural': 'Tags',
},
),
migrations.CreateModel(
name='PageVideoContent',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=100, verbose_name='Type', db_index=True)),
('language', models.CharField(default=b'en', max_length=5)),
('sid', models.CharField(unique=True, max_length=200)),
('name', models.CharField(unique=True, max_length=200, blank=True)),
('is_extended', models.BooleanField(default=False, verbose_name='Extended?')),
('comment', models.CharField(max_length=250, blank=True)),
('date_created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Created')),
('date_updated', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Updated')),
('video', embed_video.fields.EmbedVideoField(blank=True)),
('title', models.CharField(max_length=160, blank=True)),
('description', models.TextField(max_length=160, blank=True)),
('created_by', models.ForeignKey(related_name='pagesext_pagevideocontent_creator', to=settings.AUTH_USER_MODEL, null=True)),
('page', models.ForeignKey(verbose_name='Page', to='pages.Page')),
('tags', taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', help_text='A comma-separated list of tags.', verbose_name='Tags')),
('updated_by', models.ForeignKey(related_name='pagesext_pagevideocontent_editor', to=settings.AUTH_USER_MODEL, null=True)),
],
options={
'abstract': False,
'verbose_name': 'Video',
'verbose_name_plural': 'Video',
},
),
]
| 65.793651 | 232 | 0.632449 | 868 | 8,290 | 5.839862 | 0.148618 | 0.080292 | 0.039061 | 0.052081 | 0.795226 | 0.794239 | 0.794239 | 0.75577 | 0.75577 | 0.745315 | 0 | 0.014612 | 0.224005 | 8,290 | 125 | 233 | 66.32 | 0.773356 | 0.002533 | 0 | 0.605042 | 0 | 0 | 0.172735 | 0.033749 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.084034 | 0 | 0.109244 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
744782cf5523d4eadd1bdbf7aee798094cec55cb | 74 | py | Python | numerical analysis/main.py | yubinCloud/UndergraduateEducationProgramming | c0555bb470ab0258436d835cdf20328d93c14999 | [
"MIT"
] | null | null | null | numerical analysis/main.py | yubinCloud/UndergraduateEducationProgramming | c0555bb470ab0258436d835cdf20328d93c14999 | [
"MIT"
] | null | null | null | numerical analysis/main.py | yubinCloud/UndergraduateEducationProgramming | c0555bb470ab0258436d835cdf20328d93c14999 | [
"MIT"
] | null | null | null | import numpy as np
import sympy as sp
if __name__ == '__main__':
pass | 14.8 | 26 | 0.702703 | 12 | 74 | 3.666667 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.22973 | 74 | 5 | 27 | 14.8 | 0.77193 | 0 | 0 | 0 | 0 | 0 | 0.106667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.25 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
77a9430987b1466e2d9ddc43ac194088eede843e | 115 | py | Python | bluemoon/music/admin.py | arpitvaghela/blue-moon | e583d2a0749893f355e32c7a537fc0d96087505b | [
"BSD-3-Clause"
] | null | null | null | bluemoon/music/admin.py | arpitvaghela/blue-moon | e583d2a0749893f355e32c7a537fc0d96087505b | [
"BSD-3-Clause"
] | null | null | null | bluemoon/music/admin.py | arpitvaghela/blue-moon | e583d2a0749893f355e32c7a537fc0d96087505b | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from .models import Music
# Register your models here.
admin.site.register(Music)
| 23 | 32 | 0.808696 | 17 | 115 | 5.470588 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121739 | 115 | 4 | 33 | 28.75 | 0.920792 | 0.226087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
77f0bc308914bca1879800dc6e5c2f0fe66c3f43 | 126 | py | Python | PEP0343/__init__.py | bzd111/pep_doc | 6b208c9260c54ce5972e09ca2b4b801447221524 | [
"MIT"
] | null | null | null | PEP0343/__init__.py | bzd111/pep_doc | 6b208c9260c54ce5972e09ca2b4b801447221524 | [
"MIT"
] | null | null | null | PEP0343/__init__.py | bzd111/pep_doc | 6b208c9260c54ce5972e09ca2b4b801447221524 | [
"MIT"
] | null | null | null | # coding=utf-8
# from __future__ import absolute_import
from .base import contextmanager
if __name__ == '__main__':
pass | 18 | 40 | 0.753968 | 16 | 126 | 5.125 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009524 | 0.166667 | 126 | 7 | 41 | 18 | 0.771429 | 0.404762 | 0 | 0 | 0 | 0 | 0.109589 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 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 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
7ad7039daaceb4763c20448df72e00608c10cd59 | 66 | py | Python | src/Lib/browser/webworker.py | JerryFox/karel | df6557d145abb3f799655b2ef12cd7fb18c03b18 | [
"BSD-3-Clause"
] | null | null | null | src/Lib/browser/webworker.py | JerryFox/karel | df6557d145abb3f799655b2ef12cd7fb18c03b18 | [
"BSD-3-Clause"
] | null | null | null | src/Lib/browser/webworker.py | JerryFox/karel | df6557d145abb3f799655b2ef12cd7fb18c03b18 | [
"BSD-3-Clause"
] | null | null | null | class Worker:
def __init__(self, target, *args):
pass
| 16.5 | 38 | 0.606061 | 8 | 66 | 4.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.287879 | 66 | 3 | 39 | 22 | 0.765957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.333333 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 5 |
7afe8db9629352c7d2088a70f816aaf207f49304 | 108 | py | Python | traildb/__init__.py | bgyss/traildb-python | 33fd743e09fda371509e550cfa62d8a10a322ab8 | [
"MIT"
] | 2 | 2021-07-09T02:28:06.000Z | 2022-01-26T02:50:48.000Z | traildb/__init__.py | bgyss/traildb-python | 33fd743e09fda371509e550cfa62d8a10a322ab8 | [
"MIT"
] | null | null | null | traildb/__init__.py | bgyss/traildb-python | 33fd743e09fda371509e550cfa62d8a10a322ab8 | [
"MIT"
] | null | null | null | from .traildb import TrailDBError, TrailDBConstructor, TrailDB, TrailDBCursor, tdb_item_field, tdb_item_val
| 54 | 107 | 0.861111 | 13 | 108 | 6.846154 | 0.769231 | 0.157303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 108 | 1 | 108 | 108 | 0.89899 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
bb16d0bf11e581bfa77e992018cb9c6482861f53 | 45 | py | Python | stanfordnlp/models/common/pretrain.py | IgorTavcar/classla | 5a1246b62eb352af631d4f4593f467e9ccbd3777 | [
"Apache-2.0"
] | 12 | 2019-11-25T14:51:21.000Z | 2021-02-21T16:59:38.000Z | stanfordnlp/models/common/pretrain.py | IgorTavcar/classla | 5a1246b62eb352af631d4f4593f467e9ccbd3777 | [
"Apache-2.0"
] | 23 | 2021-03-12T13:17:17.000Z | 2022-02-14T08:56:53.000Z | stanfordnlp/models/common/pretrain.py | IgorTavcar/classla | 5a1246b62eb352af631d4f4593f467e9ccbd3777 | [
"Apache-2.0"
] | 7 | 2021-04-04T15:04:27.000Z | 2022-02-20T17:33:39.000Z | from classla.models.common.pretrain import *
| 22.5 | 44 | 0.822222 | 6 | 45 | 6.166667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.088889 | 45 | 1 | 45 | 45 | 0.902439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
bb30ef8d8d7844eaa1bc882758ef977ee9b14f7b | 122 | py | Python | states/__init__.py | DevonSchwartz/COVIDStateTracker | 57e9a1dfd9eef25ebaf91ea5adc0898f26ca87fd | [
"Unlicense"
] | null | null | null | states/__init__.py | DevonSchwartz/COVIDStateTracker | 57e9a1dfd9eef25ebaf91ea5adc0898f26ca87fd | [
"Unlicense"
] | null | null | null | states/__init__.py | DevonSchwartz/COVIDStateTracker | 57e9a1dfd9eef25ebaf91ea5adc0898f26ca87fd | [
"Unlicense"
] | null | null | null | # from states import getDF, getDate,getState,getLength,getDeathsToDate,getDailyDeathCount,getCasesToDate,getDailyCaseCount | 122 | 122 | 0.893443 | 11 | 122 | 9.909091 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.040984 | 122 | 1 | 122 | 122 | 0.931624 | 0.983607 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
bb42145158bed35bcb1018389d781591daeaaf86 | 113 | py | Python | face_recognition/api_aws/admin.py | Fabriciooml/AWS-Rekognition-with-Django | 9a30015dbf8334fe7d2c3fd25e8c32dc4bc9358f | [
"MIT"
] | null | null | null | face_recognition/api_aws/admin.py | Fabriciooml/AWS-Rekognition-with-Django | 9a30015dbf8334fe7d2c3fd25e8c32dc4bc9358f | [
"MIT"
] | null | null | null | face_recognition/api_aws/admin.py | Fabriciooml/AWS-Rekognition-with-Django | 9a30015dbf8334fe7d2c3fd25e8c32dc4bc9358f | [
"MIT"
] | 1 | 2021-11-05T19:32:16.000Z | 2021-11-05T19:32:16.000Z | from django.contrib import admin
from .models import Face
admin.site.register(Face)
# Register your models here. | 22.6 | 32 | 0.80531 | 17 | 113 | 5.352941 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123894 | 113 | 5 | 33 | 22.6 | 0.919192 | 0.230089 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
bb44796243bceddbbb995e5f6195d2d7d46aa060 | 248 | py | Python | schemas/root_schema.py | aspa795/api-fastapi-graphql | 208cfd937ef39ea9958698228262a8c8bd45974f | [
"MIT"
] | null | null | null | schemas/root_schema.py | aspa795/api-fastapi-graphql | 208cfd937ef39ea9958698228262a8c8bd45974f | [
"MIT"
] | null | null | null | schemas/root_schema.py | aspa795/api-fastapi-graphql | 208cfd937ef39ea9958698228262a8c8bd45974f | [
"MIT"
] | null | null | null | import graphene
from schemas import (post_schema, comment_schema)
class Query(post_schema.Query, comment_schema.Query, graphene.ObjectType):
pass
class Mutation(post_schema.Mutation, comment_schema.Mutation, graphene.ObjectType):
pass
| 20.666667 | 83 | 0.802419 | 31 | 248 | 6.225806 | 0.387097 | 0.15544 | 0.227979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.120968 | 248 | 11 | 84 | 22.545455 | 0.885321 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 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 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
bb57c2574aeb643169c08ab0a10c79e595587427 | 189 | py | Python | 0x07-python-test_driven_development/101-lazy_matrix_mul.py | coding-max/holbertonschool-higher_level_programming | 392fed1ae686642b6cca6bb6752050882bbf79fc | [
"MIT"
] | 1 | 2021-04-26T03:45:12.000Z | 2021-04-26T03:45:12.000Z | 0x07-python-test_driven_development/101-lazy_matrix_mul.py | coding-max/holbertonschool-higher_level_programming | 392fed1ae686642b6cca6bb6752050882bbf79fc | [
"MIT"
] | null | null | null | 0x07-python-test_driven_development/101-lazy_matrix_mul.py | coding-max/holbertonschool-higher_level_programming | 392fed1ae686642b6cca6bb6752050882bbf79fc | [
"MIT"
] | 1 | 2022-02-02T02:44:35.000Z | 2022-02-02T02:44:35.000Z | #!/usr/bin/python3
"""multiplies 2 matrices by using the module NumPy."""
import numpy
def lazy_matrix_mul(m_a, m_b):
"""multiplies 2 matrices"""
return (numpy.matmul(m_a, m_b))
| 18.9 | 54 | 0.687831 | 31 | 189 | 4 | 0.677419 | 0.177419 | 0.306452 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018987 | 0.164021 | 189 | 9 | 55 | 21 | 0.765823 | 0.465608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
246d7f7b8f5566032689e79b0d33158615f585f2 | 129 | py | Python | terraform_projects/ecs_django_template/terraform/deploy/pa-rotation.py | romelBen/aws-projects | 3fa94c4d6367a17349c1162350d05733be32a4b6 | [
"MIT"
] | null | null | null | terraform_projects/ecs_django_template/terraform/deploy/pa-rotation.py | romelBen/aws-projects | 3fa94c4d6367a17349c1162350d05733be32a4b6 | [
"MIT"
] | null | null | null | terraform_projects/ecs_django_template/terraform/deploy/pa-rotation.py | romelBen/aws-projects | 3fa94c4d6367a17349c1162350d05733be32a4b6 | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:8cb64206c030ea2508c2cb41ceb61c7097cfaf2026e8c67d02ae7df17f417282
size 3358
| 32.25 | 75 | 0.883721 | 13 | 129 | 8.769231 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.390244 | 0.046512 | 129 | 3 | 76 | 43 | 0.536585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2470a741c18ed2d67de208b576dc29c04892430c | 145 | py | Python | netmiko/awplus/__init__.py | openmymai/netmiko | 388ab072c9c6d804dad54e13d8665182f4b74449 | [
"MIT"
] | 1 | 2022-01-23T00:00:40.000Z | 2022-01-23T00:00:40.000Z | netmiko/awplus/__init__.py | openmymai/netmiko | 388ab072c9c6d804dad54e13d8665182f4b74449 | [
"MIT"
] | 1 | 2020-12-29T13:14:54.000Z | 2020-12-29T13:14:54.000Z | netmiko/awplus/__init__.py | openmymai/netmiko | 388ab072c9c6d804dad54e13d8665182f4b74449 | [
"MIT"
] | null | null | null | from netmiko.awplus.awplus_ssh import AwplusSSH, AwplusTelnet, AwplusFileTransfer
__all__ = ["AwplusSSH", "AwplusTelnet", "AwplusFileTransfer"]
| 36.25 | 81 | 0.813793 | 13 | 145 | 8.692308 | 0.692308 | 0.371681 | 0.690265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082759 | 145 | 3 | 82 | 48.333333 | 0.849624 | 0 | 0 | 0 | 0 | 0 | 0.268966 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
24887658121eca792d63663b3a751c81cfcfa742 | 38 | py | Python | pyscreener/md/__init__.py | futianfan/pyscreener | 15cce4ca8002ba083254aefa716d0e9c3ef00dba | [
"MIT"
] | 34 | 2021-01-08T00:32:01.000Z | 2022-02-20T20:02:55.000Z | molpal/objectives/pyscreener/md/__init__.py | ashuein/molpal | 1e17a0c406516ceaeaf273a6983d06206bcfe76f | [
"MIT"
] | 24 | 2021-01-29T18:28:45.000Z | 2022-03-22T21:48:01.000Z | molpal/objectives/pyscreener/md/__init__.py | ashuein/molpal | 1e17a0c406516ceaeaf273a6983d06206bcfe76f | [
"MIT"
] | 13 | 2021-01-09T11:07:03.000Z | 2022-02-10T23:08:11.000Z | from pyscreener.md.md import simulate
| 19 | 37 | 0.842105 | 6 | 38 | 5.333333 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105263 | 38 | 1 | 38 | 38 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
24905c9cad487ec483132207db03c7681256e10f | 2,417 | py | Python | src/models/non_signature_models.py | BorgwardtLab/Imputing_Signatures | 9551e892f71703bde46907c9e2765c01fe4f1b27 | [
"BSD-3-Clause"
] | 1 | 2020-09-23T09:37:23.000Z | 2020-09-23T09:37:23.000Z | src/models/non_signature_models.py | BorgwardtLab/Imputing_Signatures | 9551e892f71703bde46907c9e2765c01fe4f1b27 | [
"BSD-3-Clause"
] | null | null | null | src/models/non_signature_models.py | BorgwardtLab/Imputing_Signatures | 9551e892f71703bde46907c9e2765c01fe4f1b27 | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
class LSTM(nn.Module):
"""As the usual nn.LSTM module.
- Must specify the hidden_size parameter.
- The batch_first parameter is fixed to False.
- The bidirectional parameter is fixed to False (we want to be causal).
- Must also specify an out_channels parameter. A linear map will be added from the hidden state to the output.
"""
def __init__(self, out_channels, **kwargs):
super().__init__()
hidden_size = kwargs['hidden_size']
kwargs['batch_first'] = True
kwargs['bidirectional'] = False
self.lstm = nn.LSTM(**kwargs)
self.linear = nn.Linear(2 * hidden_size, out_channels)
def forward(self, x, lengths):
# `x` should be a three dimensional tensor (batch, stream, channel)
# `lengths` should be a one dimensional tensor (batch,) giving the true length of each batch element along the
# stream dimension
x = nn.utils.rnn.pack_padded_sequence(x, lengths, batch_first=True, enforce_sorted=False)
_, (h, c) = self.lstm(x)
h = h[-1]
c = c[-1]
x = torch.cat([h, c], dim=1)
x = self.linear(x)
return x
class GRU(nn.Module):
"""As the usual nn.GRU module.
- Must specify the hidden_size parameter.
- The batch_first parameter is fixed to False.
- The bidirectional parameter is fixed to False (we want to be causal).
- Must also specify an out_channels parameter. A linear map will be added from the hidden state to the output.
"""
def __init__(self, out_channels, **kwargs):
super().__init__()
kwargs['batch_first'] = True
kwargs['bidirectional'] = False
self.hidden_size = kwargs['hidden_size']
self.num_layers = kwargs.get('num_layers', 1)
self.gru = nn.GRU(**kwargs)
self.linear = nn.Linear(self.hidden_size, out_channels)
def forward(self, x, lengths):
# `x` should be a three dimensional tensor (batch, stream, channel)
# `lengths` should be a one dimensional tensor (batch,) giving the true length of each batch element along the
# stream dimension
x = nn.utils.rnn.pack_padded_sequence(x, lengths, batch_first=True, enforce_sorted=False)
_, x = self.gru(x)
x = x[-1] # take the last GRU layer
x = self.linear(x)
return x
| 36.621212 | 118 | 0.632189 | 338 | 2,417 | 4.384615 | 0.239645 | 0.053981 | 0.043185 | 0.048583 | 0.882591 | 0.815115 | 0.762483 | 0.762483 | 0.697706 | 0.697706 | 0 | 0.003392 | 0.268101 | 2,417 | 65 | 119 | 37.184615 | 0.83437 | 0.41746 | 0 | 0.484848 | 0 | 0 | 0.060744 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.121212 | false | 0 | 0.060606 | 0 | 0.30303 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
249267769c2f5d8274bc6b8a446ba27b64d412e7 | 154 | py | Python | src/pyaC/mtools/__init__.py | mirofedurco/PyAstronomy | b0e5806a18bde647654e6c9de323327803722864 | [
"MIT"
] | 98 | 2015-01-01T12:46:05.000Z | 2022-02-13T14:17:36.000Z | src/pyaC/mtools/__init__.py | mirofedurco/PyAstronomy | b0e5806a18bde647654e6c9de323327803722864 | [
"MIT"
] | 46 | 2015-02-10T19:53:38.000Z | 2022-01-11T17:26:05.000Z | src/pyaC/mtools/__init__.py | mirofedurco/PyAstronomy | b0e5806a18bde647654e6c9de323327803722864 | [
"MIT"
] | 38 | 2015-01-08T17:00:34.000Z | 2022-03-04T05:15:22.000Z | from .numericalDerivatives import diffCFD
from .integrat import ibtrapz
from .zerocross import zerocross1d
from .toolbox import degtorad, radtodeg, farat
| 30.8 | 46 | 0.844156 | 18 | 154 | 7.222222 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007353 | 0.116883 | 154 | 4 | 47 | 38.5 | 0.948529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
24c7786f0139a0013e6e172aad27c6da07e8a3ba | 310 | py | Python | Tools/Html_edit.py | naveeng2402/Quiz_App | 5c7e760881d09a5d816b8cfbc497c9c37c25bf23 | [
"MIT"
] | 1 | 2021-01-07T06:23:24.000Z | 2021-01-07T06:23:24.000Z | Tools/Html_edit.py | naveeng2402/Quiz_App | 5c7e760881d09a5d816b8cfbc497c9c37c25bf23 | [
"MIT"
] | 1 | 2021-01-09T03:16:50.000Z | 2021-01-09T04:15:32.000Z | Tools/Html_edit.py | naveeng2402/Quiz_App | 5c7e760881d09a5d816b8cfbc497c9c37c25bf23 | [
"MIT"
] | null | null | null | try:
with open('text.txt') as f:
x = f.readlines()
x = [i.strip().replace('''"''', "'") for i in x]
x = '\\n'.join(x)
except:
with open('Tools/text.txt') as f:
x = f.readlines()
x = [i.strip().replace('''"''', "'") for i in x]
x = '\\n'.join(x)
print(x)
| 25.833333 | 56 | 0.432258 | 47 | 310 | 2.851064 | 0.404255 | 0.119403 | 0.134328 | 0.149254 | 0.731343 | 0.731343 | 0.731343 | 0.731343 | 0.731343 | 0.731343 | 0 | 0 | 0.306452 | 310 | 11 | 57 | 28.181818 | 0.623256 | 0 | 0 | 0.545455 | 0 | 0 | 0.103226 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.090909 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
24fd982b027f6cd43335be65102a77ecc15ce930 | 109 | py | Python | models/stl10/__init__.py | mathczh/GANL2L | fdffbcb1547cf8f3a7287a4a21d3f4871f3e4e42 | [
"MIT"
] | null | null | null | models/stl10/__init__.py | mathczh/GANL2L | fdffbcb1547cf8f3a7287a4a21d3f4871f3e4e42 | [
"MIT"
] | null | null | null | models/stl10/__init__.py | mathczh/GANL2L | fdffbcb1547cf8f3a7287a4a21d3f4871f3e4e42 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .cnn import *
from .resnet import *
# from .orthresnet import *
| 18.166667 | 38 | 0.770642 | 14 | 109 | 5.642857 | 0.5 | 0.379747 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.165138 | 109 | 5 | 39 | 21.8 | 0.868132 | 0.229358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
700fadef8b2a7b0e131be1354bf6be2f18913756 | 179 | py | Python | src/deoxys/data/__init__.py | huynhngoc/deoxys | b2e9936b723807e129fda36d8d6131ca00db558f | [
"MIT"
] | 1 | 2021-12-28T15:48:45.000Z | 2021-12-28T15:48:45.000Z | src/deoxys/data/__init__.py | huynhngoc/deoxys | b2e9936b723807e129fda36d8d6131ca00db558f | [
"MIT"
] | 2 | 2020-06-26T11:03:53.000Z | 2020-06-26T11:05:09.000Z | src/deoxys/data/__init__.py | huynhngoc/deoxys | b2e9936b723807e129fda36d8d6131ca00db558f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = "Ngoc Huynh Bao"
__email__ = "ngoc.huynh.bao@nmbu.no"
from .data_reader import *
from .data_generator import *
from .preprocessor import *
| 17.9 | 36 | 0.703911 | 24 | 179 | 4.833333 | 0.666667 | 0.155172 | 0.206897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006623 | 0.156425 | 179 | 9 | 37 | 19.888889 | 0.761589 | 0.117318 | 0 | 0 | 0 | 0 | 0.230769 | 0.141026 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
703c994d202348a2d76e192f2569babb999e404a | 2,718 | py | Python | dotbimpy/tests/test_add_files.py | paireks/dotbimpy | 7727bd5eb4b7dbe9db2d79bf9f52ca55eac5de8e | [
"MIT"
] | 20 | 2022-02-17T20:41:45.000Z | 2022-03-24T11:19:17.000Z | dotbimpy/tests/test_add_files.py | paireks/dotbimpy | 7727bd5eb4b7dbe9db2d79bf9f52ca55eac5de8e | [
"MIT"
] | 1 | 2022-03-18T15:09:54.000Z | 2022-03-18T18:12:27.000Z | dotbimpy/tests/test_add_files.py | paireks/dotbimpy | 7727bd5eb4b7dbe9db2d79bf9f52ca55eac5de8e | [
"MIT"
] | 2 | 2022-03-07T05:56:27.000Z | 2022-03-07T20:17:23.000Z | from dotbimpy import *
import copy
def test__add__pyramid_cubes():
file_a = File.read("Pyramid.bim")
file_b = File.read("Cubes.bim")
file_result = file_a + file_b
assert file_result.schema_version == file_a.schema_version
assert file_result.info == file_a.info
# Check meshes
assert file_result.meshes[0] == file_a.meshes[0]
assert file_result.meshes[1].equals_without_mesh_id(file_b.meshes[0])
assert file_result.meshes[1].mesh_id == 1
# Check elements
assert file_result.elements[0] == file_a.elements[0]
assert file_result.elements[1].equals_without_mesh_id(file_b.elements[0]) and file_result.elements[1].mesh_id == 1
assert file_result.elements[2].equals_without_mesh_id(file_b.elements[1]) and file_result.elements[2].mesh_id == 1
assert file_result.elements[3].equals_without_mesh_id(file_b.elements[2]) and file_result.elements[3].mesh_id == 1
def test__add__cubes_pyramid():
file_a = File.read("Cubes.bim")
file_b = File.read("Pyramid.bim")
file_result = file_a + file_b
assert file_result.schema_version == file_a.schema_version
assert file_result.info == file_a.info
assert file_result.meshes[1].mesh_id == 1
# Check meshes
assert file_result.meshes[0] == file_a.meshes[0]
assert file_result.meshes[1].equals_without_mesh_id(file_b.meshes[0])
# Check elements
assert file_result.elements[0] == file_a.elements[0]
assert file_result.elements[1] == file_a.elements[1]
assert file_result.elements[2] == file_a.elements[2]
assert file_result.elements[3].equals_without_mesh_id(file_b.elements[0]) and file_result.elements[3].mesh_id == 1
def test__add__walls_truss__check_if_originals_changed():
file_a = File.read("WallsWithBeams.bim")
file_b = File.read("Truss.bim")
file_a_copy = copy.deepcopy(file_a)
file_b_copy = copy.deepcopy(file_b)
file_result = file_a + file_b
assert file_a == file_a_copy
assert file_b == file_b_copy
def test__add__walls_truss():
file_a = File.read("WallsWithBeams.bim")
file_b = File.read("Truss.bim")
file_result = file_a + file_b
assert file_result.schema_version == file_a.schema_version
assert file_result.info == file_a.info
# Check meshes
assert file_result.meshes[0] == file_a.meshes[0]
assert file_result.meshes[1] == file_a.meshes[1]
for i in range(5):
assert file_result.meshes[i+2].equals_without_mesh_id(file_b.meshes[i])
# Check elements
for i in range(7):
assert file_result.elements[i] == file_a.elements[i]
for i in range(7, len(file_result.elements)):
assert file_result.elements[i].equals_without_mesh_id(file_b.elements[i-7])
| 33.555556 | 118 | 0.722958 | 441 | 2,718 | 4.124717 | 0.102041 | 0.186916 | 0.219901 | 0.131941 | 0.826828 | 0.725673 | 0.71138 | 0.637713 | 0.62122 | 0.588235 | 0 | 0.019746 | 0.161516 | 2,718 | 80 | 119 | 33.975 | 0.778412 | 0.030537 | 0 | 0.46 | 0 | 0 | 0.035782 | 0 | 0 | 0 | 0 | 0 | 0.54 | 1 | 0.08 | false | 0 | 0.04 | 0 | 0.12 | 0 | 0 | 0 | 0 | null | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
704a0897b2d2df347415d26b7770697691592a8d | 542 | py | Python | pytorch_grad_cam/__init__.py | hddlovefxx/-pytorch-grad-cam | 6eb5bd3a41bcd661c6acc53853258282286768fe | [
"MIT"
] | null | null | null | pytorch_grad_cam/__init__.py | hddlovefxx/-pytorch-grad-cam | 6eb5bd3a41bcd661c6acc53853258282286768fe | [
"MIT"
] | null | null | null | pytorch_grad_cam/__init__.py | hddlovefxx/-pytorch-grad-cam | 6eb5bd3a41bcd661c6acc53853258282286768fe | [
"MIT"
] | null | null | null | from pytorch_grad_cam.grad_cam import GradCAM
from pytorch_grad_cam.ablation_cam import AblationCAM
from pytorch_grad_cam.xgrad_cam import XGradCAM
from pytorch_grad_cam.grad_cam_plusplus import GradCAMPlusPlus
from pytorch_grad_cam.score_cam import ScoreCAM
from pytorch_grad_cam.layer_cam import LayerCAM
from pytorch_grad_cam.eigen_cam import EigenCAM
from pytorch_grad_cam.eigen_grad_cam import EigenGradCAM
from pytorch_grad_cam.fullgrad_cam import FullGrad
from pytorch_grad_cam.guided_backprop import GuidedBackpropReLUModel
| 49.272727 | 69 | 0.889299 | 82 | 542 | 5.487805 | 0.280488 | 0.202222 | 0.333333 | 0.4 | 0.213333 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0.092251 | 542 | 10 | 70 | 54.2 | 0.914634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
7067dab243bd530f5e1781bf31a36ae424c4e821 | 93 | py | Python | src/devtools/python/map_cfg.py | JJL772/source-2013-custom | 68c6d8c9f7af5ef3ab8d748188e5162236099052 | [
"Unlicense"
] | 2 | 2020-07-14T22:36:43.000Z | 2021-03-21T17:51:33.000Z | src/devtools/python/map_cfg.py | JJL772/source-2013-custom | 68c6d8c9f7af5ef3ab8d748188e5162236099052 | [
"Unlicense"
] | null | null | null | src/devtools/python/map_cfg.py | JJL772/source-2013-custom | 68c6d8c9f7af5ef3ab8d748188e5162236099052 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# Graphical map configuration tool
import PyQt5
import os, sys, json | 15.5 | 34 | 0.763441 | 14 | 93 | 5.071429 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025316 | 0.150538 | 93 | 6 | 35 | 15.5 | 0.873418 | 0.580645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
7072fd9ef14822d597f1534a584295368a2a693a | 1,607 | py | Python | photoplaces/photoplaces_web/migrations/0006_auto_20141105_1304.py | joonamo/photoplaces | 2223f62459e5141ce5bb5325ad83e5975f1545c7 | [
"MIT"
] | null | null | null | photoplaces/photoplaces_web/migrations/0006_auto_20141105_1304.py | joonamo/photoplaces | 2223f62459e5141ce5bb5325ad83e5975f1545c7 | [
"MIT"
] | null | null | null | photoplaces/photoplaces_web/migrations/0006_auto_20141105_1304.py | joonamo/photoplaces | 2223f62459e5141ce5bb5325ad83e5975f1545c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('photoplaces_web', '0005_auto_20141105_1240'),
]
operations = [
migrations.AddField(
model_name='normalizedphotoset',
name='hour_z_cycle_length',
field=models.FloatField(null=True, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='normalizedphotoset',
name='month_z_cycle_length',
field=models.FloatField(null=True, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='normalizedphotoentry',
name='hour',
field=models.FloatField(db_index=True, null=True, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='normalizedphotoentry',
name='location_x',
field=models.FloatField(db_index=True, null=True, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='normalizedphotoentry',
name='location_y',
field=models.FloatField(db_index=True, null=True, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='normalizedphotoentry',
name='month',
field=models.FloatField(db_index=True, null=True, blank=True),
preserve_default=True,
),
]
| 31.509804 | 74 | 0.59303 | 148 | 1,607 | 6.216216 | 0.297297 | 0.058696 | 0.136957 | 0.11087 | 0.8 | 0.8 | 0.704348 | 0.704348 | 0.704348 | 0.704348 | 0 | 0.015152 | 0.301805 | 1,607 | 50 | 75 | 32.14 | 0.804813 | 0.013068 | 0 | 0.681818 | 0 | 0 | 0.140152 | 0.01452 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.045455 | 0 | 0.113636 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
561da6b8dd8544f442aaaa1662f41eeaeca12288 | 162 | py | Python | myvectors/__init__.py | SHREYAS1188/vector_python_package | 8ec69bb8219ae1b09e1e935822a80d8cbd638da3 | [
"MIT"
] | 1 | 2020-12-05T13:10:38.000Z | 2020-12-05T13:10:38.000Z | myvectors/__init__.py | SHREYAS1188/vector_python_package | 8ec69bb8219ae1b09e1e935822a80d8cbd638da3 | [
"MIT"
] | 1 | 2020-07-02T18:56:58.000Z | 2020-07-02T18:56:58.000Z | myvectors/__init__.py | SHREYAS1188/vector_python_package | 8ec69bb8219ae1b09e1e935822a80d8cbd638da3 | [
"MIT"
] | 2 | 2020-07-02T04:48:38.000Z | 2022-02-03T04:55:22.000Z | from math import sqrt,acos,degrees
from myvectors.myvectors import mag,dot,cross,projection,angle,trianglearea,sectionsutram,collinear3,s_triplepro,v_triplepro
| 54 | 125 | 0.864198 | 22 | 162 | 6.272727 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006579 | 0.061728 | 162 | 2 | 126 | 81 | 0.901316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
5644cd4815ef92ba6e0b36617496d6138abd0613 | 139 | py | Python | tts_wrapper/__init__.py | mrx23dot/tts-wrapper | 18b812379d3b06019f114cffef73086522cf06f2 | [
"MIT"
] | 10 | 2020-06-30T14:53:16.000Z | 2022-03-21T12:04:21.000Z | tts_wrapper/__init__.py | luizcbprt/tts-wrapper | 483c4cccc3fa23bc1b4225c50ce33a6ca7afe6c5 | [
"MIT"
] | 3 | 2021-04-29T16:43:38.000Z | 2022-03-28T19:58:04.000Z | tts_wrapper/__init__.py | luizcbprt/tts-wrapper | 483c4cccc3fa23bc1b4225c50ce33a6ca7afe6c5 | [
"MIT"
] | 4 | 2020-05-11T07:38:51.000Z | 2022-03-17T23:30:27.000Z | from .google import GoogleTTS
from .microsoft import MicrosoftTTS
from .polly import PollyTTS, AwsCredentials
from .watson import WatsonTTS | 34.75 | 43 | 0.848921 | 17 | 139 | 6.941176 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115108 | 139 | 4 | 44 | 34.75 | 0.95935 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
56882f4ad7c78de9c14f0eba15fa32117baa3018 | 200 | py | Python | sources_of_project/main.py | Yuriy-Leonov/installer-with-cx_Freeze | 9b1193ae15819ebd10b40fa5bbe07983f5aae4a1 | [
"Apache-2.0"
] | null | null | null | sources_of_project/main.py | Yuriy-Leonov/installer-with-cx_Freeze | 9b1193ae15819ebd10b40fa5bbe07983f5aae4a1 | [
"Apache-2.0"
] | null | null | null | sources_of_project/main.py | Yuriy-Leonov/installer-with-cx_Freeze | 9b1193ae15819ebd10b40fa5bbe07983f5aae4a1 | [
"Apache-2.0"
] | null | null | null | from some_packet import module_name
import some_module
import some_other_module
print(module_name.module_1)
print(some_module.module_2)
print(some_other_module.module_3)
input("press Enter to exit")
| 22.222222 | 35 | 0.855 | 34 | 200 | 4.676471 | 0.470588 | 0.125786 | 0.188679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016304 | 0.08 | 200 | 8 | 36 | 25 | 0.847826 | 0 | 0 | 0 | 0 | 0 | 0.095 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.428571 | 0 | 0.428571 | 0.428571 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 5 |
5696705488650891f4a6af0412703daa89ba42d2 | 75 | py | Python | lppydsmc/collision/__init__.py | Quettle/lppydsmc | 37290792e845086f7ea182d81f284d68b6cdcbea | [
"MIT"
] | null | null | null | lppydsmc/collision/__init__.py | Quettle/lppydsmc | 37290792e845086f7ea182d81f284d68b6cdcbea | [
"MIT"
] | null | null | null | lppydsmc/collision/__init__.py | Quettle/lppydsmc | 37290792e845086f7ea182d81f284d68b6cdcbea | [
"MIT"
] | null | null | null | from . import collider
from .collider import handler_particles_collisions
| 18.75 | 50 | 0.853333 | 9 | 75 | 6.888889 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12 | 75 | 3 | 51 | 25 | 0.939394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
56a88db188ef5a7f76f25345d34a6f5c219def0a | 331 | py | Python | tests/unit/gui/widget/test_tab_page.py | matthewgdv/iohandler | 1df420dd3ae2e022d0aa4db864fd4af0dbd665cc | [
"MIT"
] | 1 | 2019-08-28T17:03:27.000Z | 2019-08-28T17:03:27.000Z | tests/unit/gui/widget/test_tab_page.py | matthewgdv/iohandler | 1df420dd3ae2e022d0aa4db864fd4af0dbd665cc | [
"MIT"
] | null | null | null | tests/unit/gui/widget/test_tab_page.py | matthewgdv/iohandler | 1df420dd3ae2e022d0aa4db864fd4af0dbd665cc | [
"MIT"
] | null | null | null | class TestTabPage:
def test___getitem__(self): # synced
assert True
def test___setitem__(self): # synced
assert True
def test___getattr__(self): # synced
assert True
def test__get_state(self): # synced
assert True
def test__set_state(self): # synced
assert True
| 20.6875 | 41 | 0.63142 | 39 | 331 | 4.820513 | 0.358974 | 0.18617 | 0.425532 | 0.531915 | 0.734043 | 0.574468 | 0 | 0 | 0 | 0 | 0 | 0 | 0.305136 | 331 | 15 | 42 | 22.066667 | 0.817391 | 0.102719 | 0 | 0.454545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.454545 | 1 | 0.454545 | false | 0 | 0 | 0 | 0.545455 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
3b368c76b158fd32eb70872522d14d854c4608ec | 3,767 | py | Python | sto/test_sto.py | hscspring/sto | 831e01efdb700a6c9d69b3ce434cac04d893c7c1 | [
"MIT"
] | null | null | null | sto/test_sto.py | hscspring/sto | 831e01efdb700a6c9d69b3ce434cac04d893c7c1 | [
"MIT"
] | null | null | null | sto/test_sto.py | hscspring/sto | 831e01efdb700a6c9d69b3ce434cac04d893c7c1 | [
"MIT"
] | null | null | null | import pytest
from . import Sto
from pathlib import Path
@pytest.fixture
def get_normal_data():
text_list = [
"我爱你,你爱我。",
"我爱她,她爱我。",
"我爱北京天安门。"
]
value_list = [(1, ), (1, ), (0, )]
return text_list, value_list
@pytest.fixture
def get_repeat_data():
text_list = [
"我爱她,她爱我。",
"我爱她,她爱我。",
"我爱北京天安门。"
]
value_list = [(1, ), (1, ), (0, )]
return text_list, value_list
@pytest.fixture
def get_similar_data():
text_list = [
"我爱她,她爱我。",
"她爱北京天安门。",
"我爱北京天安门。"
]
value_list = [(1, ), (1, ), (0, )]
return text_list, value_list
@pytest.fixture
def get_normal_multi_values_data():
text_list = [
"我爱你,你爱我。",
"我爱她,她爱我。",
"我爱北京天安门。"
]
value_list = [(1, 10), (1, 9), (0, 8)]
return text_list, value_list
def test_sto_add_normal(get_normal_data):
text_list, value_list = get_normal_data
st = Sto()
st.add(text_list, value_list)
assert len(st.record_dawg.keys()) == 3
assert not st.lsh.is_empty()
def test_sto_add_repeat(get_repeat_data):
text_list, value_list = get_repeat_data
st = Sto()
st.add(text_list, value_list)
assert not st.lsh.is_empty()
assert len(st.record_dawg.keys()) == 2
def test_sto_add_similar(get_similar_data):
"""
we do not check when batch adding.
"""
text_list, value_list = get_similar_data
st = Sto()
st.add(text_list, value_list)
assert not st.lsh.is_empty()
assert len(st.record_dawg.keys()) == 3
def test_sto_add_multi_values(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
assert not st.lsh.is_empty()
assert len(st.record_dawg.keys()) == 3
def test_query_normal(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
text = "我爱北京天安门。"
values = st.query(text)
assert values == (0, 8)
def test_query_similar(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
text = "她爱北京天安门。"
values = st.query(text)
assert values == (0, 8)
def test_query_similar_with_threshold(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh', threshold=0.3)
st.add(text_list, value_list)
text = "我在天安门。"
values = st.query(text)
assert values == (0, 8)
def test_sto_store(get_normal_multi_values_data):
data_path = "./data"
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
st.store(data_path)
lsh_path = Path(data_path) / "lsh.pickle"
dawg_path = Path(data_path) / "values.dawg"
assert lsh_path.exists()
assert dawg_path.exists()
def test_sto_load():
st = Sto(value_format='hh')
st.load("./data")
assert not st.lsh.is_empty()
assert len(st.record_dawg.keys()) == 3
def test_sto_get(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
assert st["我爱你,你爱我。"] == (1, 10)
def test_sto_contain_similar(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
assert "他爱北京天安门。" in st
def test_sto_len(get_normal_multi_values_data):
text_list, value_list = get_normal_multi_values_data
st = Sto(value_format='hh')
st.add(text_list, value_list)
assert len(st) == 3
| 24.94702 | 68 | 0.666047 | 571 | 3,767 | 4.035026 | 0.110333 | 0.104167 | 0.146701 | 0.19184 | 0.803385 | 0.737413 | 0.709201 | 0.671007 | 0.671007 | 0.666667 | 0 | 0.011074 | 0.20892 | 3,767 | 150 | 69 | 25.113333 | 0.762081 | 0.009026 | 0 | 0.622807 | 0 | 0 | 0.049771 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 1 | 0.140351 | false | 0 | 0.026316 | 0 | 0.201754 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 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 | 5 |
3b48d52a46e28b83a5e785840dee378f62c53508 | 25 | py | Python | ooni/deck/__init__.py | xhdix/probe-legacy | d1cc9ed1fc59071cc1c3afad4345d7e5b6cd8873 | [
"BSD-2-Clause"
] | 24 | 2018-12-23T12:53:57.000Z | 2022-01-19T19:50:53.000Z | ooni/deck/__init__.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | 64 | 2018-09-13T08:26:20.000Z | 2022-02-11T03:48:34.000Z | ooni/deck/__init__.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | 9 | 2019-06-10T01:41:48.000Z | 2022-01-08T08:46:25.000Z | from .deck import NGDeck
| 12.5 | 24 | 0.8 | 4 | 25 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 25 | 1 | 25 | 25 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
3b5bb42528fac1b1b9966c726480a2675cb2cc8c | 161 | py | Python | colony/base.py | ddovbii/colony-cli | aaf70ff0e7491be99a18e71d07a2160380dd14a5 | [
"Apache-2.0"
] | null | null | null | colony/base.py | ddovbii/colony-cli | aaf70ff0e7491be99a18e71d07a2160380dd14a5 | [
"Apache-2.0"
] | null | null | null | colony/base.py | ddovbii/colony-cli | aaf70ff0e7491be99a18e71d07a2160380dd14a5 | [
"Apache-2.0"
] | null | null | null | class Resource(object):
def __init__(self, space_name: str) -> None:
self._space_name = space_name
self._url = f"/spaces/{space_name}"
| 26.833333 | 49 | 0.627329 | 21 | 161 | 4.333333 | 0.619048 | 0.395604 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.248447 | 161 | 5 | 50 | 32.2 | 0.752066 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
3b757683d3152142ecc0e0d385a07ead07cff0a8 | 4,124 | py | Python | graphilp/imports/graph_formats.py | VF-DE-CDS/GraphILP-API | 841b80256f06b5dfc9f3bd4e514f1e24fb82b6ce | [
"MIT"
] | 14 | 2021-05-03T10:58:55.000Z | 2021-11-25T22:22:29.000Z | graphilp/imports/graph_formats.py | VF-DE-CDS/GraphILP-API | 841b80256f06b5dfc9f3bd4e514f1e24fb82b6ce | [
"MIT"
] | null | null | null | graphilp/imports/graph_formats.py | VF-DE-CDS/GraphILP-API | 841b80256f06b5dfc9f3bd4e514f1e24fb82b6ce | [
"MIT"
] | null | null | null | from networkx import Graph
import re
def edges_to_networkx(path):
"""
Creates a NetworkX Graph from an .edges file (`Network Repository format <http://networkrepository.com>`__).
Network Repository is a large collection of network graph data for research and benchmarking.
:param path: path to .edges file
:type path: str
:returns: a `NetworkX Graph <https://networkx.org/documentation/stable/reference/introduction.html#graphs>`__
"""
with open(path, "rt") as input_file:
lines = input_file.readlines()
edges = []
for line in lines:
# Remove + characters. This is not always necessary
line = re.sub(' +', ' ', line)
# Found a new Edge
# Extracting information(startingNode endingNode Distance)
parts = line.rstrip().split(" ")
# Parse the data into tuples and from Array of Integer and append to list of all edges
tuple_data = tuple(int(p) for p in parts[:2])
edges.append((tuple_data[0], tuple_data[1]))
# Create a new NetworkX Graph object
G = Graph()
# Fill the graph with our edges. This method automatically fills in the nodes as well.
G.add_edges_from(edges)
return G
def stp_to_networkx(path):
"""
Creates a NetworkX Graph from an .stp file (`SteinLib format <http://steinlib.zib.de/format.php>`__).
`SteinLib <http://steinlib.zib.de/steinlib.php>`__ is a collection of Steiner tree
problems in graphs and variants.
The format description can be found `here <http://steinlib.zib.de/format.php>`__ on the SteinLib pages.
:param path: path to .stp file
:type path: str
:returns: a `NetworkX Graph <https://networkx.org/documentation/stable/reference/introduction.html#graphs>`__
and a list of terminals
Example:
G, terminals = stp_to_networkx("steinlib_instance.stp")
"""
with open(path, "rt") as input_file:
lines = input_file.readlines()
edges = []
terminals = []
for line in lines:
# Remove + characters. This is not always necessary
line = re.sub(' +', ' ', line)
# Found a new Edge
if line.startswith('E '):
# Extracting information(startingNode endingNode Distance)
parts = line.rstrip().split(" ")[1:]
# Parse the data into tuples and from Array of Integer and append to list of all edges
tuple_data = tuple(int(p) for p in parts)
edges.append((tuple_data[0], tuple_data[1], {'weight': tuple_data[2]}))
# Found a Terminal Node
if line.startswith('T '):
terminals.append(int(line.rstrip().split(" ")[1]))
# Create a new NetworkX Graph object
G = Graph()
# Fill the graph with our edges. This method automatically fills in the nodes as well.
G.add_edges_from(edges)
return G, terminals
def mis_to_networkx(path):
"""
Creates a NetworkX Graph from a .mis file (ASCII DIMACS graph format).
This is used for maximum independet set benchmarking data
from `BHOSLIB <http://sites.nlsde.buaa.edu.cn/~kexu/benchmarks/graph-benchmarks.htm>`__.
:param path: path to .edges file
:type path: str
:returns: a `NetworkX Graph <https://networkx.org/documentation/stable/reference/introduction.html#graphs>`__
"""
with open(path, "rt") as input_file:
lines = input_file.readlines()
edges = []
for line in lines:
# Remove + characters. This is not always necessary
line = re.sub(' +', ' ', line)
# Found a new Edge
if line.startswith('e '):
# Extracting information(startingNode endingNode Distance)
parts = line.rstrip().split(" ")[1:]
# Parse the data into tuples and from Array of Integer and append to list of all edges
tuple_data = tuple(int(p) for p in parts)
edges.append((tuple_data[0], tuple_data[1]))
# Create a new NetworkX Graph object
G = Graph()
# Fill the graph with our edges. This method automatically fills in the nodes as well.
G.add_edges_from(edges)
return G
| 33.258065 | 113 | 0.646217 | 558 | 4,124 | 4.691756 | 0.241935 | 0.034377 | 0.032086 | 0.024064 | 0.739496 | 0.739496 | 0.719633 | 0.719633 | 0.704736 | 0.646295 | 0 | 0.003556 | 0.25 | 4,124 | 123 | 114 | 33.528455 | 0.842871 | 0.56547 | 0 | 0.674419 | 0 | 0 | 0.01872 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.069767 | false | 0 | 0.046512 | 0 | 0.186047 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
8e7e0a0ed4eb18d7cc59f1a2ab7a049b1f1ee248 | 176 | py | Python | Statistics/stdeviation.py | ssm29njit/calculator601SheethalJedidiah | 2812fbabcf5249eeee8a2f34edd6152cfa2d175e | [
"MIT"
] | 1 | 2020-11-08T05:11:27.000Z | 2020-11-08T05:11:27.000Z | Statistics/stdeviation.py | ssm29njit/calculator601SheethalJedidiah | 2812fbabcf5249eeee8a2f34edd6152cfa2d175e | [
"MIT"
] | null | null | null | Statistics/stdeviation.py | ssm29njit/calculator601SheethalJedidiah | 2812fbabcf5249eeee8a2f34edd6152cfa2d175e | [
"MIT"
] | 1 | 2020-12-09T15:37:51.000Z | 2020-12-09T15:37:51.000Z | import statistics
from Statistics.randomNum import getRandomNum
def stdev(data, sample_size):
sample = getRandomNum(data, sample_size)
return statistics.stdev(sample) | 25.142857 | 45 | 0.795455 | 21 | 176 | 6.571429 | 0.52381 | 0.144928 | 0.202899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 176 | 7 | 46 | 25.142857 | 0.907895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8e859a799bb1dd5c2ce5455df894718c098e9dc8 | 44 | py | Python | tests/__init__.py | osl-incubator/cookiecutter-pypackage | 8cdc29393ce78fc79ee587db5bb0584cff03c133 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | osl-incubator/cookiecutter-pypackage | 8cdc29393ce78fc79ee587db5bb0584cff03c133 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | osl-incubator/cookiecutter-pypackage | 8cdc29393ce78fc79ee587db5bb0584cff03c133 | [
"BSD-3-Clause"
] | 1 | 2022-03-01T01:46:54.000Z | 2022-03-01T01:46:54.000Z | """Dunder Init for Pytest Initialization"""
| 22 | 43 | 0.75 | 5 | 44 | 6.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113636 | 44 | 1 | 44 | 44 | 0.846154 | 0.840909 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
8ed4b6af9b106c65f00c50ff13f6a4b320a3044a | 101 | py | Python | _tkinter.py | panda3d/tkinter | a721e71ff059bedc9800d1fce6a5441799990cce | [
"PSF-2.0"
] | null | null | null | _tkinter.py | panda3d/tkinter | a721e71ff059bedc9800d1fce6a5441799990cce | [
"PSF-2.0"
] | null | null | null | _tkinter.py | panda3d/tkinter | a721e71ff059bedc9800d1fce6a5441799990cce | [
"PSF-2.0"
] | null | null | null | import sys
from _tkinter_ext import _tkinter
sys.modules['_tkinter'] = _tkinter
del _tkinter
del sys
| 16.833333 | 34 | 0.811881 | 15 | 101 | 5.066667 | 0.466667 | 0.263158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128713 | 101 | 5 | 35 | 20.2 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0.079208 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
8ede1250a51a480b469143bd659b2fd7ee3abf70 | 17 | py | Python | stepik/67/2231/step_2/script.py | tshemake/Software-Development | e6dff82dffa49e66dc5fa5650af775437ebb6a9b | [
"Unlicense"
] | null | null | null | stepik/67/2231/step_2/script.py | tshemake/Software-Development | e6dff82dffa49e66dc5fa5650af775437ebb6a9b | [
"Unlicense"
] | null | null | null | stepik/67/2231/step_2/script.py | tshemake/Software-Development | e6dff82dffa49e66dc5fa5650af775437ebb6a9b | [
"Unlicense"
] | null | null | null | print(int(2.99))
| 8.5 | 16 | 0.647059 | 4 | 17 | 2.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1875 | 0.058824 | 17 | 1 | 17 | 17 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
8edffd5601443b8be93c6daf8cf9a6f09e0423d6 | 17 | py | Python | Imaobong Tom/Phase 1/Python Basic 1/Day 3/1.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Imaobong Tom/Phase 1/Python Basic 1/Day 3/1.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Imaobong Tom/Phase 1/Python Basic 1/Day 3/1.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | print (help(abs)) | 17 | 17 | 0.705882 | 3 | 17 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058824 | 17 | 1 | 17 | 17 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
8ee994526696277a4f6dc8154f4d13f929c77824 | 159 | py | Python | crime_reporter/admin.py | ezro1245/civilas_web | 1195142ab5db94ffd1ad0526c389dcac043331c6 | [
"MIT"
] | null | null | null | crime_reporter/admin.py | ezro1245/civilas_web | 1195142ab5db94ffd1ad0526c389dcac043331c6 | [
"MIT"
] | null | null | null | crime_reporter/admin.py | ezro1245/civilas_web | 1195142ab5db94ffd1ad0526c389dcac043331c6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import CrimeType, Report
# Register your models here.
admin.site.register(CrimeType)
admin.site.register(Report) | 26.5 | 37 | 0.81761 | 22 | 159 | 5.909091 | 0.545455 | 0.138462 | 0.261538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.100629 | 159 | 6 | 38 | 26.5 | 0.909091 | 0.163522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
d91671656c8bf8991a3cbfa3cf4071af9928d0b4 | 41 | py | Python | tests/__init__.py | Wielqus/FaceVerify-python | 4f21b23a38f786a520d033d9fa0c159dccb25558 | [
"MIT"
] | null | null | null | tests/__init__.py | Wielqus/FaceVerify-python | 4f21b23a38f786a520d033d9fa0c159dccb25558 | [
"MIT"
] | null | null | null | tests/__init__.py | Wielqus/FaceVerify-python | 4f21b23a38f786a520d033d9fa0c159dccb25558 | [
"MIT"
] | null | null | null | """Unit test package for face_verify."""
| 20.5 | 40 | 0.707317 | 6 | 41 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121951 | 41 | 1 | 41 | 41 | 0.777778 | 0.829268 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
d921e4a306f2baa5961ed58187ebf4e6974a7ea6 | 1,027 | py | Python | python/anyascii/_data/_062.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_062.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_062.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | b='Lian Nan Mi Tang Jue Gang Gang Zhuang Ge Yue Wu Jian Xu Shu Rong Xi Cheng Wo Jie Ge Jian Qiang Huo Qiang Zhan Dong Qi Jia Die Zei Jia Ji Zhi Kan Ji Kui Gai Deng Zhan Qiang Ge Jian Jie Yu Jian Yan Lu Hu Zhan Xi Xi Chuo Dai Qu Hu Hu Hu E Shi Ti Mao Hu Li Fang Suo Bian Dian Jiong Shang Yi Yi Shan Hu Fei Yan Shou Shou Cai Zha Qiu Le Pu Ba Da Reng Fan Ru Zai Tuo Zhang Diao Kang Yu Ku Gan Shen Cha Tuo Gu Kou Wu Den Qian Zhi Ren Kuo Men Sao Yang Niu Ban Che Rao Xi Qian Ban Jia Yu Fu Ao Xi Pi Zhi Zhi E Den Zhao Cheng Ji Yan Kuang Bian Chao Ju Wen Hu Yue Jue Ba Qin Dan Zheng Yun Wan Ne Yi Shu Zhua Pou Tou Dou Kang Zhe Pou Fu Pao Ba Ao Ze Tuan Kou Lun Qiang Yun Hu Bao Bing Zhi Peng Nan Bu Pi Tai Yao Zhen Zha Yang Bao He Ni Ye Di Chi Pi Jia Mo Mei Chen Ya Chou Qu Min Chu Jia Fu Zha Zhu Dan Chai Mu Nian La Fu Pao Ban Pai Lin Na Guai Qian Ju Ta Ba Tuo Tuo Ao Ju Zhuo Pan Zhao Bai Bai Di Ni Ju Kuo Long Jian Qia Yong Lan Ning Bo Ze Qian Hen Kuo Shi Jie Zheng Nin Gong Gong Quan Shuan Cun Za Kao Yi Xie Ce Hui Pin Zhuai Shi Na' | 1,027 | 1,027 | 0.748783 | 257 | 1,027 | 2.992218 | 0.626459 | 0.015605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.248296 | 1,027 | 1 | 1,027 | 1,027 | 0.996114 | 0 | 0 | 0 | 0 | 1 | 0.995136 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
d92243f4b076b4b4bb07e2e106bd8d9ddaab61a2 | 203 | py | Python | HyperAPI/__init__.py | WassimAbida/HyperAPI | 654a72922148d23158e3e4ea4b105f07626c5c36 | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/__init__.py | WassimAbida/HyperAPI | 654a72922148d23158e3e4ea4b105f07626c5c36 | [
"BSD-3-Clause"
] | null | null | null | HyperAPI/__init__.py | WassimAbida/HyperAPI | 654a72922148d23158e3e4ea4b105f07626c5c36 | [
"BSD-3-Clause"
] | null | null | null | try:
from HyperAPI.package_metadata import __version__
except ImportError:
__version__ = 0
from HyperAPI.hyper_api.api import Api # noqa: F401
from HyperAPI.hdp_api import Router # noqa: F401
| 25.375 | 53 | 0.773399 | 28 | 203 | 5.214286 | 0.571429 | 0.246575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041667 | 0.172414 | 203 | 7 | 54 | 29 | 0.827381 | 0.103448 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d9392195751a091ad6273812cb3dddee420fff6a | 250 | py | Python | src/models.py | Ak-Shaw/razorpay-django | 9be32dbf9c4de31d7340572751e01e725ec251cc | [
"MIT"
] | null | null | null | src/models.py | Ak-Shaw/razorpay-django | 9be32dbf9c4de31d7340572751e01e725ec251cc | [
"MIT"
] | null | null | null | src/models.py | Ak-Shaw/razorpay-django | 9be32dbf9c4de31d7340572751e01e725ec251cc | [
"MIT"
] | null | null | null | from django.db import models
class Payer(models.Model):
name = models.CharField(max_length = 100)
amount = models.CharField(max_length = 100)
payment_id = models.CharField(max_length = 100)
paid = models.BooleanField(default = False) | 35.714286 | 51 | 0.732 | 33 | 250 | 5.424242 | 0.606061 | 0.251397 | 0.301676 | 0.402235 | 0.452514 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043269 | 0.168 | 250 | 7 | 52 | 35.714286 | 0.817308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
d96d085be47b2a85e2b6331837c440bac70d6672 | 201 | py | Python | lessinline/api/business/services/permissions.py | skpatro23/lessinline | 0f95a8ce40faaa4e814c45c2fc051f7166e27472 | [
"MIT"
] | null | null | null | lessinline/api/business/services/permissions.py | skpatro23/lessinline | 0f95a8ce40faaa4e814c45c2fc051f7166e27472 | [
"MIT"
] | null | null | null | lessinline/api/business/services/permissions.py | skpatro23/lessinline | 0f95a8ce40faaa4e814c45c2fc051f7166e27472 | [
"MIT"
] | null | null | null | from rest_framework.permissions import BasePermission
class IsServiceOwner(BasePermission):
def has_object_permission(self, request, view, obj):
return obj.business.owner == request.user
| 28.714286 | 56 | 0.781095 | 23 | 201 | 6.695652 | 0.869565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144279 | 201 | 6 | 57 | 33.5 | 0.895349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
d96fc9c08a8f276d9768cd33db77889f0fc9cf5f | 2,057 | py | Python | insights/parsers/mysql_log.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 1 | 2020-02-19T06:36:22.000Z | 2020-02-19T06:36:22.000Z | insights/parsers/mysql_log.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 10 | 2018-04-16T15:38:04.000Z | 2018-05-15T18:43:02.000Z | insights/parsers/mysql_log.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | null | null | null | """
MysqlLog - File ``/var/log/mysqld.log``
=======================================
Module for parsing the log file for Mysql, including ``/var/log/mysqld.log`` and
``/var/opt/rh/rh-mysql*/log/mysql/mysqld.log``.
.. note::
By default, logrotate of mysql.log is set to daily.
In some lines of log, there are no timestamp.
Typical content of ``mysql.log`` file is::
2018-03-13T06:37:39.651387Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-03-13T06:37:39.719166Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-03-13T06:37:39.784406Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 0
698a7d6-2689-11e8-8944-0800274ac5ef.
2018-03-13T06:37:39.789636Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-03-13T06:37:40.498084Z 0 [Warning] CA certificate ca.pem is self signed.
2018-03-13T06:37:41.080591Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
md5_dgst.c(80): OpenSSL internal error, assertion failed: Digest MD5 forbidden in FIPS mode!
06:37:41 UTC - mysqld got signal 6 ;
2018-03-13T07:43:31.450772Z 0 [Note] Event Scheduler: Loaded 0 events
2018-03-13T07:43:31.450988Z 0 [Note] /opt/rh/rh-mysql57/root/usr/libexec/mysqld: ready for connections.
Version: '5.7.16' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
Examples:
>>> my = MysqlLog((context_wrap(MYSQLLOG)))
>>> my.get('mysqld')[0]['raw_message']
'06:37:41 UTC - mysqld got signal 6 ;'
>>> 'ready for connections' in my
True
"""
from .. import LogFileOutput, parser
from insights.specs import Specs
@parser(Specs.mysql_log)
class MysqlLog(LogFileOutput):
"""Class for parsing ``/var/log/mysqld.log`` file.
.. note::
Please refer to its super-class :class:`insights.core.LogFileOutput`
"""
pass
| 42.854167 | 177 | 0.693243 | 320 | 2,057 | 4.440625 | 0.53125 | 0.033779 | 0.046446 | 0.054891 | 0.098522 | 0.035186 | 0.035186 | 0.035186 | 0 | 0 | 0 | 0.1331 | 0.167234 | 2,057 | 47 | 178 | 43.765957 | 0.696439 | 0.917355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.2 | 0.4 | 0 | 0.6 | 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 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
79468fe34b85be16d384aba1e89267bc3024e813 | 1,262 | py | Python | wavesim/tests/python/test_BuildInfo.py | TheComet/wavesim | 90125d5273b96633e5f74666ddb707cedfa2fbf1 | [
"Apache-2.0"
] | 7 | 2018-01-25T10:58:39.000Z | 2021-05-08T08:08:37.000Z | wavesim/tests/python/test_BuildInfo.py | TheComet/wavesim | 90125d5273b96633e5f74666ddb707cedfa2fbf1 | [
"Apache-2.0"
] | 4 | 2018-03-06T15:47:13.000Z | 2018-03-07T19:07:45.000Z | wavesim/tests/python/test_BuildInfo.py | TheComet/wavesim | 90125d5273b96633e5f74666ddb707cedfa2fbf1 | [
"Apache-2.0"
] | 2 | 2018-02-18T02:02:31.000Z | 2020-02-16T09:49:12.000Z | import wavesim
import unittest
class TestBuildInfo(unittest.TestCase):
def test_build_info(self):
self.assertTrue(isinstance(wavesim.build_info, str))
self.assertTrue(len(wavesim.build_info) > 10)
def test_build_number(self):
self.assertTrue(isinstance(wavesim.build_number, int))
self.assertTrue(wavesim.build_number > 0)
def test_build_host(self):
self.assertTrue(isinstance(wavesim.build_host, str))
self.assertTrue(len(wavesim.build_info) > 10)
def test_build_time(self):
from datetime import datetime
self.assertTrue(isinstance(wavesim.build_time, str))
try:
datetime.strptime(wavesim.build_time, "%Y-%m-%dT%H:%M:%SZ")
except:
self.fail()
def test_commit_info(self):
self.assertTrue(isinstance(wavesim.commit_info, str))
self.assertTrue(len(wavesim.commit_info) > 10)
def test_compiler_info(self):
self.assertTrue(isinstance(wavesim.compiler_info, str))
self.assertTrue(len(wavesim.commit_info) > 1)
def test_cmake_configuration(self):
self.assertTrue(isinstance(wavesim.cmake_configuration, str))
self.assertTrue(len(wavesim.cmake_configuration) > 10)
unittest.main()
| 33.210526 | 71 | 0.691759 | 154 | 1,262 | 5.487013 | 0.246753 | 0.215385 | 0.198817 | 0.256805 | 0.575148 | 0.459172 | 0.215385 | 0.215385 | 0.118343 | 0.118343 | 0 | 0.009881 | 0.198098 | 1,262 | 37 | 72 | 34.108108 | 0.825099 | 0 | 0 | 0.068966 | 0 | 0 | 0.014263 | 0 | 0 | 0 | 0 | 0 | 0.448276 | 1 | 0.241379 | false | 0 | 0.103448 | 0 | 0.37931 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
795c57e4813ed3173b8c2d7c2c8f42550fdc7e8f | 5,270 | py | Python | tests/test_mpcdata.py | matthewjohnpayne/MPCData | bf5cc4b846437928d3c7e4bfb8d809f8bf9f9dc4 | [
"MIT"
] | null | null | null | tests/test_mpcdata.py | matthewjohnpayne/MPCData | bf5cc4b846437928d3c7e4bfb8d809f8bf9f9dc4 | [
"MIT"
] | null | null | null | tests/test_mpcdata.py | matthewjohnpayne/MPCData | bf5cc4b846437928d3c7e4bfb8d809f8bf9f9dc4 | [
"MIT"
] | null | null | null | # mpcformat/tests/test_mpcdata.py
# import pytest
# Third-party imports
import json
import os
# Import other required local modules/functions
import mpcdata.params as params
# Import the specific package/module/function we are testing
import mpcdata.mpcdata as mpcdata
'''
def test_MPCMasterFile():
"""
Want to see the successful return of a masterDict from an MPCMasterFile object
... both when a local master-file already exists and when it doesn't
"""
for master_type in ['external']:#, 'internal']:
# Forcibly delete any local master-file ('external_master_list.txt')
filepath = params.fileDict[master_type]
try:
os.remove(filepath)
except OSError:
pass
assert not os.path.exists(filepath)
# Running open_master_list should
# (i) generate a filepath
# (ii) download a masterDict & save-it to disk
MPCMF = mpcdata.MPCMasterFile(master_type)
filepath = MPCMF.filepath
masterDict = MPCMF.masterDict
assert os.path.exists(filepath)
assert 'leap-seconds' in masterDict
# Running open_master_list again should just cause a fileread (no download)
modtimeBefore = os.path.getmtime(filepath)
MPCMF = mpcdata.MPCMasterFile(master_type)
filepath = MPCMF.filepath
masterDict = MPCMF.masterDict
modtimeAfter = os.path.getmtime(filepath)
assert modtimeAfter == modtimeBefore
assert 'leap-seconds' in masterDict
def test_MPCMasterFile_for_nonexistant_type():
"""
Want to check what happens when a nonexistant master-list-type is passed
This test prob won't work due to poor exception handling
"""
master_type = 'ThisStringShouldNotWork'
try:
MPCMF = mpcdata.MPCMasterFile(master_type)
passed = True
except:
passed = False
assert not passed
'''
def test_MPCFile_external():
"""
Want to see the successful return of a filepath & filecontents from MPCFile object
... both when the local file already exists and when it doesn't
This is for some EXTERNAL (i.e. non-MPC) file
"""
filename = 'leap-seconds.list'
master_type ='external'
expectedfilepath = os.path.join(params.dirDict[master_type],filename)
# Forcibly delete any local data file
try:
os.remove(expectedfilepath)
except OSError:
pass
assert not os.path.exists(expectedfilepath)
# Initiating an MPCFile object should allow access to filepath variable
MPCF = mpcdata.MPCFile(filename)
filepath = MPCF.filename
assert filepath == expectedfilepath
'''
# Because of the above deletes and that we did NOT download, we expect filepath to still NOT exist
assert not os.path.exists(filepath)
# Calling get_filedata() method should cause the file to come into existence
filedata = MPCF.get_filedata()
assert os.path.exists(filepath)
assert filedata == MPCF.filedata
# The 'leap-seconds.txt' file is expected to contain the string '2272060800' at some point
IN = False
for item in filedata:
if '2272060800' in item:
IN = True
assert IN
# Running MPCF.get_filedata() again should just cause a fileread (no download)
modtimeBefore = os.path.getmtime(expectedfilepath)
MPCF = mpcdata.MPCFile(filename)
filedata = MPCF.get_filedata()
modtimeAfter = os.path.getmtime(expectedfilepath)
assert modtimeAfter == modtimeBefore
assert 'leap-seconds' in masterDict
'''
'''
def test_MPCFile_internal():
"""
Want to see the successful return of a filepath & filecontents from MPCFile object
... both when the local file already exists and when it doesn't
This is for some INTERNAL file (i.e. from MPC website)
"""
filename = '?????.txt'
master_type ='internal'
expectedfilepath = os.path.join(params.dirDict[master_type],filename)
# Forcibly delete any local file
try:
os.remove(expectedfilepath)
except OSError:
pass
assert not os.path.exists(expectedfilepath)
# Initiating an MPCFile object should allow access to filepath variable
MPCF = mpcdata.MPCFile(filename)
filepath = MPCF.filename
assert filepath == expectedfilepath
# Because of the above deletes and that we did NOT download, we expect filepath to still NOT exist
assert not os.path.exists(filepath)
# Calling get_filedata() method should cause the file to come into existence
filedata = MPCF.get_filedata()
assert os.path.exists(filepath)
assert filedata == MPCF.filedata
# The 'leap-seconds.txt' file is expected to contain the string '2272060800' at some point
IN = False ; for item in filecontents: if '2272060800' in item: IN = True
assert IN
# Running MPCF.get_filedata() again should just cause a fileread (no download)
modtimeBefore = os.path.getmtime(expectedfilepath)
MPCF = mpcdata.MPCFile(filename)
filedata = MPCF.get_filedata()
modtimeAfter = os.path.getmtime(expectedfilepath)
assert modtimeAfter == modtimeBefore
assert 'leap-seconds' in masterDict
'''
| 32.530864 | 102 | 0.681214 | 646 | 5,270 | 5.504644 | 0.227554 | 0.026997 | 0.026997 | 0.033746 | 0.728628 | 0.712317 | 0.701069 | 0.701069 | 0.672666 | 0.672666 | 0 | 0.010055 | 0.245161 | 5,270 | 161 | 103 | 32.732919 | 0.883861 | 0.089184 | 0 | 0 | 0 | 0 | 0.04717 | 0 | 0 | 0 | 0 | 0 | 0.125 | 1 | 0.0625 | false | 0.0625 | 0.25 | 0 | 0.3125 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
7968789657a76b7b6485d03c7c1c35ba234528a0 | 219 | py | Python | project/urls.py | kajala/django-jauth | 9a3681d4d0f030a167649ec6cb7ab5f79a71d00c | [
"MIT"
] | null | null | null | project/urls.py | kajala/django-jauth | 9a3681d4d0f030a167649ec6cb7ab5f79a71d00c | [
"MIT"
] | null | null | null | project/urls.py | kajala/django-jauth | 9a3681d4d0f030a167649ec6cb7ab5f79a71d00c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
from jauth_example.urls import urlpatterns as jauth_example_urlpatterns
urlpatterns = [
path('admin/', admin.site.urls),
] + jauth_example_urlpatterns
| 24.333333 | 71 | 0.799087 | 29 | 219 | 5.862069 | 0.413793 | 0.211765 | 0.270588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.127854 | 219 | 8 | 72 | 27.375 | 0.890052 | 0 | 0 | 0 | 0 | 0 | 0.027397 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
7979f594dcc09de683dcf7ec985ac9188fcd7ea3 | 290 | py | Python | lmctl/client/models/__init__.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 3 | 2021-07-19T09:46:01.000Z | 2022-03-07T13:51:25.000Z | lmctl/client/models/__init__.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 43 | 2019-08-27T12:36:29.000Z | 2020-08-27T14:50:40.000Z | lmctl/client/models/__init__.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 7 | 2020-09-22T20:32:17.000Z | 2022-03-29T12:25:51.000Z | from .intents import (Intent, ExistingAssemblyIntent, CreateAssemblyIntent,
ChangeAssemblyStateIntent, DeleteAssemblyIntent, HealAssemblyIntent,
ScaleAssemblyIntent, UpgradeAssemblyIntent, CreateOrUpgradeAssemblyIntent, AdoptAssemblyIntent)
| 72.5 | 119 | 0.744828 | 13 | 290 | 16.615385 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.213793 | 290 | 3 | 120 | 96.666667 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
7987a0881618a02ecd5860de94180e2bb22851d1 | 182 | py | Python | src/cancer/message/__init__.py | OpenAlcoholics/telegram-vreddit-bot | ea736f2a8808331abeb5b85ace1cff3faf7466e7 | [
"MIT"
] | null | null | null | src/cancer/message/__init__.py | OpenAlcoholics/telegram-vreddit-bot | ea736f2a8808331abeb5b85ace1cff3faf7466e7 | [
"MIT"
] | 1 | 2021-11-17T15:44:36.000Z | 2021-11-17T15:44:36.000Z | src/cancer/message/__init__.py | OpenAlcoholics/telegram-vreddit-bot | ea736f2a8808331abeb5b85ace1cff3faf7466e7 | [
"MIT"
] | null | null | null | from .download import DownloadMessage # noqa
from .message import Message # noqa
from .topic import Topic # noqa
from .youtube_url_convert import YoutubeUrlConvertMessage # noqa
| 36.4 | 65 | 0.802198 | 22 | 182 | 6.545455 | 0.5 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 182 | 4 | 66 | 45.5 | 0.935065 | 0.104396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8db8bed6bc51b5862db010cb8966625587ba9906 | 125 | py | Python | rllib/algorithms/crr/torch/__init__.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | rllib/algorithms/crr/torch/__init__.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | 12 | 2022-03-05T05:37:28.000Z | 2022-03-19T07:14:43.000Z | rllib/algorithms/crr/torch/__init__.py | jianoaix/ray | 1701b923bc83905f8961c06a6a173e3eba46a936 | [
"Apache-2.0"
] | null | null | null | from .crr_torch_model import CRRModel
from .crr_torch_policy import CRRTorchPolicy
__all__ = ["CRRModel", "CRRTorchPolicy"]
| 25 | 44 | 0.816 | 15 | 125 | 6.266667 | 0.6 | 0.148936 | 0.255319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104 | 125 | 4 | 45 | 31.25 | 0.839286 | 0 | 0 | 0 | 0 | 0 | 0.176 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
8df4b86ebc5aa4af400dcb7509f42d37fc57749f | 23 | py | Python | bindings/pydrake/solvers/__init__.py | RobotLocomotion/drake-python3.7 | ae397a4c6985262d23e9675b9bf3927c08d027f5 | [
"BSD-3-Clause"
] | 2 | 2021-02-25T02:01:02.000Z | 2021-03-17T04:52:04.000Z | bindings/pydrake/solvers/__init__.py | RobotLocomotion/drake-python3.7 | ae397a4c6985262d23e9675b9bf3927c08d027f5 | [
"BSD-3-Clause"
] | null | null | null | bindings/pydrake/solvers/__init__.py | RobotLocomotion/drake-python3.7 | ae397a4c6985262d23e9675b9bf3927c08d027f5 | [
"BSD-3-Clause"
] | 1 | 2021-06-13T12:05:39.000Z | 2021-06-13T12:05:39.000Z | # Blank Python module.
| 11.5 | 22 | 0.73913 | 3 | 23 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173913 | 23 | 1 | 23 | 23 | 0.894737 | 0.869565 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
309052b60a03e078d6301891540036e195f123b5 | 358 | py | Python | client/client.py | munichmakerlab/ewindow | 6d97713e882b2bcf860d22133bf42350e9ca49d6 | [
"MIT"
] | null | null | null | client/client.py | munichmakerlab/ewindow | 6d97713e882b2bcf860d22133bf42350e9ca49d6 | [
"MIT"
] | null | null | null | client/client.py | munichmakerlab/ewindow | 6d97713e882b2bcf860d22133bf42350e9ca49d6 | [
"MIT"
] | null | null | null | from ewindow import client
from time import sleep
print client.state
client.initialize()
print client.state
client.connect()
print client.state
count = 0
try:
while True:
sleep(2)
count += 1
if(count < 2):
print client.nodes_dict
# if(count == 2):
# break
except KeyboardInterrupt:
pass
| 11.933333 | 33 | 0.608939 | 44 | 358 | 4.931818 | 0.545455 | 0.202765 | 0.221198 | 0.202765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020243 | 0.310056 | 358 | 29 | 34 | 12.344828 | 0.8583 | 0.064246 | 0 | 0.1875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.0625 | 0.125 | null | null | 0.25 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
30e36111d602e5d671bf6af7709dbe62b6c5f4b7 | 125 | py | Python | jsonclasses_cli/package/kotlin.py | forever9717/jsonclasses-cli | b20d10cdf2d6c970a879e2a64f31555d4d808829 | [
"MIT"
] | null | null | null | jsonclasses_cli/package/kotlin.py | forever9717/jsonclasses-cli | b20d10cdf2d6c970a879e2a64f31555d4d808829 | [
"MIT"
] | null | null | null | jsonclasses_cli/package/kotlin.py | forever9717/jsonclasses-cli | b20d10cdf2d6c970a879e2a64f31555d4d808829 | [
"MIT"
] | null | null | null | from pathlib import Path
from jsonclasses.cgraph import CGraph
def kotlin(dest: Path, cgraph: CGraph):
print("KOTLIN")
| 17.857143 | 39 | 0.752 | 17 | 125 | 5.529412 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 125 | 6 | 40 | 20.833333 | 0.895238 | 0 | 0 | 0 | 0 | 0 | 0.048 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.5 | 0 | 0.75 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
a500f35fda9cda855e06ce5c03d44a3494a321e1 | 18 | py | Python | models/example.py | NayeliFeitosa/lol-worlds-2020 | a6eeceae51e5907cbcd438922e2f9f9dd5f3cceb | [
"MIT"
] | null | null | null | models/example.py | NayeliFeitosa/lol-worlds-2020 | a6eeceae51e5907cbcd438922e2f9f9dd5f3cceb | [
"MIT"
] | null | null | null | models/example.py | NayeliFeitosa/lol-worlds-2020 | a6eeceae51e5907cbcd438922e2f9f9dd5f3cceb | [
"MIT"
] | null | null | null | print("testando")
| 9 | 17 | 0.722222 | 2 | 18 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.055556 | 18 | 1 | 18 | 18 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.