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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ae5be7582772899c7d01cc9a1d3f95fef8c99702
| 241
|
py
|
Python
|
Tres en raya/agent.py
|
alberto-maurel/Aprendizaje-por-refuerzo-Fundamentos-te-ricos-del-algoritmo-AlphaZero-e-implementaci-n
|
8c4b54ad897b32fb43058713ff658b97c44ec578
|
[
"MIT"
] | null | null | null |
Tres en raya/agent.py
|
alberto-maurel/Aprendizaje-por-refuerzo-Fundamentos-te-ricos-del-algoritmo-AlphaZero-e-implementaci-n
|
8c4b54ad897b32fb43058713ff658b97c44ec578
|
[
"MIT"
] | null | null | null |
Tres en raya/agent.py
|
alberto-maurel/Aprendizaje-por-refuerzo-Fundamentos-te-ricos-del-algoritmo-AlphaZero-e-implementaci-n
|
8c4b54ad897b32fb43058713ff658b97c44ec578
|
[
"MIT"
] | null | null | null |
from abc import abstractmethod
class Agent:
def __init__(self):
pass
@abstractmethod
def update_board(self, board):
pass
@abstractmethod
def pick_move(self):
pass
| 16.066667
| 35
| 0.547718
| 23
| 241
| 5.478261
| 0.608696
| 0.126984
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.39834
| 241
| 14
| 36
| 17.214286
| 0.868966
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.3
| 0.1
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
ae6a2e4355de93bd4447cc0b55aaa265cb687cd4
| 38
|
py
|
Python
|
python_scripts_youtube/teste bruno.py
|
diegocarloni/python
|
232e3f40f8096854bfc8da0820808fbda8797387
|
[
"MIT"
] | null | null | null |
python_scripts_youtube/teste bruno.py
|
diegocarloni/python
|
232e3f40f8096854bfc8da0820808fbda8797387
|
[
"MIT"
] | null | null | null |
python_scripts_youtube/teste bruno.py
|
diegocarloni/python
|
232e3f40f8096854bfc8da0820808fbda8797387
|
[
"MIT"
] | null | null | null |
nome=['Diego','Bruno']
print(nome[0])
| 12.666667
| 22
| 0.631579
| 6
| 38
| 4
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027778
| 0.052632
| 38
| 2
| 23
| 19
| 0.638889
| 0
| 0
| 0
| 0
| 0
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
ae6b3796d2c5f954c8df3bc2cf211d25d525fe61
| 288
|
py
|
Python
|
csf_tz/after_sales_services/doctype/service_job_card/service_job_card_dashboard.py
|
Craftint/CSF_TZ
|
b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5
|
[
"MIT"
] | null | null | null |
csf_tz/after_sales_services/doctype/service_job_card/service_job_card_dashboard.py
|
Craftint/CSF_TZ
|
b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5
|
[
"MIT"
] | null | null | null |
csf_tz/after_sales_services/doctype/service_job_card/service_job_card_dashboard.py
|
Craftint/CSF_TZ
|
b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5
|
[
"MIT"
] | 1
|
2022-03-17T22:49:40.000Z
|
2022-03-17T22:49:40.000Z
|
from frappe import _
def get_data():
return {
'fieldname': 'service_job_card',
'internal_links': {
'Maintenance Request': ['items', 'maintenance_request']
},
'transactions': [
{
'label': _('Related'),
'items': ['Maintenance Request', 'Sales Invoice']
},
]
}
| 18
| 58
| 0.607639
| 26
| 288
| 6.461538
| 0.807692
| 0.321429
| 0.27381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 288
| 15
| 59
| 19.2
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0.496528
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| true
| 0
| 0.071429
| 0.071429
| 0.214286
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ae8085ceb05b36b042f6b7c0a0ec0cc9d3571e6b
| 113
|
py
|
Python
|
pyball/models/pitch_hand.py
|
SebastianDang/PyBall
|
d1965aa01477b5ee0db9c0463ec584a7e3997395
|
[
"MIT"
] | 74
|
2018-03-04T22:58:46.000Z
|
2021-07-06T12:28:50.000Z
|
pyball/models/pitch_hand.py
|
SebastianDang/PyBall
|
d1965aa01477b5ee0db9c0463ec584a7e3997395
|
[
"MIT"
] | 18
|
2018-03-10T19:17:54.000Z
|
2020-01-04T15:42:47.000Z
|
pyball/models/pitch_hand.py
|
SebastianDang/PyBall
|
d1965aa01477b5ee0db9c0463ec584a7e3997395
|
[
"MIT"
] | 13
|
2018-03-06T02:39:38.000Z
|
2020-01-17T04:38:53.000Z
|
from dataclasses import dataclass
@dataclass
class PitchHand:
code: str = None
description: str = None
| 14.125
| 33
| 0.725664
| 13
| 113
| 6.307692
| 0.769231
| 0.170732
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221239
| 113
| 7
| 34
| 16.142857
| 0.931818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
88172838414e3dcd3ec70c21a10b6c5531d14233
| 99
|
py
|
Python
|
setup.py
|
JonathanWillnow/european_factor_stockpicking_screener
|
4bb9396490a2171954ecf7aff16656d4225ae251
|
[
"MIT"
] | null | null | null |
setup.py
|
JonathanWillnow/european_factor_stockpicking_screener
|
4bb9396490a2171954ecf7aff16656d4225ae251
|
[
"MIT"
] | null | null | null |
setup.py
|
JonathanWillnow/european_factor_stockpicking_screener
|
4bb9396490a2171954ecf7aff16656d4225ae251
|
[
"MIT"
] | null | null | null |
from setuptools import setup
setup(name="european_factor_stockpicking_screener", version="0.0.1")
| 24.75
| 68
| 0.818182
| 14
| 99
| 5.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032609
| 0.070707
| 99
| 3
| 69
| 33
| 0.815217
| 0
| 0
| 0
| 0
| 0
| 0.424242
| 0.373737
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
882d16514420e28649dad6fb8a3baf1b7eb32f4e
| 90
|
py
|
Python
|
src/_scheduler/config/exceptions.py
|
kvosbur/scheduler
|
2e6386dc9a62da8e441bd9beebf45ff6a3834793
|
[
"MIT"
] | 2
|
2020-05-11T16:21:48.000Z
|
2020-05-20T23:43:28.000Z
|
src/_scheduler/config/exceptions.py
|
kvosbur/scheduler
|
2e6386dc9a62da8e441bd9beebf45ff6a3834793
|
[
"MIT"
] | 5
|
2020-05-02T23:14:28.000Z
|
2020-05-03T00:56:05.000Z
|
src/_scheduler/config/exceptions.py
|
kvosbur/scheduler
|
2e6386dc9a62da8e441bd9beebf45ff6a3834793
|
[
"MIT"
] | 2
|
2020-05-06T07:06:15.000Z
|
2020-06-22T12:39:51.000Z
|
class TimeError(Exception):
""" Raised when creating a TimePeriod that doesn't work"""
| 45
| 62
| 0.733333
| 12
| 90
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 90
| 2
| 62
| 45
| 0.868421
| 0.566667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
883727c0e0bfa56d224b56f0e0509f8d3f801ac7
| 91
|
py
|
Python
|
work-area/wireless-sensor/web_based/run.py
|
Kayoku/iotari
|
e94044b91b3d23c7d87df15ab7d716007be178ea
|
[
"MIT"
] | 3
|
2017-05-02T10:32:32.000Z
|
2017-07-03T09:40:34.000Z
|
work-area/wireless-sensor/web_based/run.py
|
Kayoku/iotari
|
e94044b91b3d23c7d87df15ab7d716007be178ea
|
[
"MIT"
] | null | null | null |
work-area/wireless-sensor/web_based/run.py
|
Kayoku/iotari
|
e94044b91b3d23c7d87df15ab7d716007be178ea
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
"""Run the app."""
from app import app
app.run(debug=True)
| 11.375
| 22
| 0.604396
| 15
| 91
| 3.666667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21978
| 91
| 7
| 23
| 13
| 0.774648
| 0.362637
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
88681763f6ce89188bb81467d9f74f7128b9aa7e
| 169
|
py
|
Python
|
py_tdlib/constructors/storage_statistics_by_file_type.py
|
Mr-TelegramBot/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 24
|
2018-10-05T13:04:30.000Z
|
2020-05-12T08:45:34.000Z
|
py_tdlib/constructors/storage_statistics_by_file_type.py
|
MrMahdi313/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 3
|
2019-06-26T07:20:20.000Z
|
2021-05-24T13:06:56.000Z
|
py_tdlib/constructors/storage_statistics_by_file_type.py
|
MrMahdi313/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 5
|
2018-10-05T14:29:28.000Z
|
2020-08-11T15:04:10.000Z
|
from ..factory import Type
class storageStatisticsByFileType(Type):
file_type = None # type: "FileType"
size = None # type: "int53"
count = None # type: "int32"
| 21.125
| 40
| 0.692308
| 20
| 169
| 5.8
| 0.65
| 0.206897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029197
| 0.189349
| 169
| 7
| 41
| 24.142857
| 0.817518
| 0.260355
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
88952e42ebfc0827e9ed42577de845660cd5a173
| 352
|
py
|
Python
|
app/database/session.py
|
violentmagician/fastapi-boilerplate
|
d9e8b51d829b59027b91d71163f272a4a3a81f33
|
[
"MIT"
] | null | null | null |
app/database/session.py
|
violentmagician/fastapi-boilerplate
|
d9e8b51d829b59027b91d71163f272a4a3a81f33
|
[
"MIT"
] | null | null | null |
app/database/session.py
|
violentmagician/fastapi-boilerplate
|
d9e8b51d829b59027b91d71163f272a4a3a81f33
|
[
"MIT"
] | null | null | null |
from sqlmodel import create_engine, SQLModel
from app.core import settings
from loguru import logger
connect_args = {"check_same_thread": False}
engine = create_engine(settings.SQLALCHEMY_DATABASE_URI, echo=False, connect_args=connect_args)
def create_db_and_tables():
logger.info(f"Connecting to Database: {settings.SQLALCHEMY_DATABASE_URI}")
| 29.333333
| 95
| 0.818182
| 49
| 352
| 5.591837
| 0.571429
| 0.120438
| 0.189781
| 0.211679
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102273
| 352
| 11
| 96
| 32
| 0.867089
| 0
| 0
| 0
| 0
| 0
| 0.213068
| 0.096591
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
88afc6c1dea9750d42741dfc1d5f6276289e25d0
| 40,862
|
py
|
Python
|
applications/migrations/0001_initial.py
|
xzzy/statdev
|
b2c3eb3ad4d8aab44d0f67fc526da1a69b4d86a2
|
[
"Apache-2.0"
] | null | null | null |
applications/migrations/0001_initial.py
|
xzzy/statdev
|
b2c3eb3ad4d8aab44d0f67fc526da1a69b4d86a2
|
[
"Apache-2.0"
] | 7
|
2017-03-13T02:00:21.000Z
|
2018-01-02T04:03:02.000Z
|
applications/migrations/0001_initial.py
|
xzzy/statdev
|
b2c3eb3ad4d8aab44d0f67fc526da1a69b4d86a2
|
[
"Apache-2.0"
] | 2
|
2017-02-16T02:18:21.000Z
|
2017-02-16T02:22:02.000Z
|
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-08-06 02:47
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.gis.db.models.fields
import django.contrib.postgres.fields.jsonb
import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0008_alter_user_username_max_length'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('accounts', '0023_communicationslogentry_log_type'),
]
operations = [
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('app_type', models.IntegerField(blank=True, choices=[(1, 'Permit'), (2, 'Licence/permit'), (3, 'Part 5'), (4, 'Emergency works'), (5, 'Part 5 - Amendment Request'), (6, 'Part 5 - Amendment Application'), (7, 'Test - Application'), (8, 'Amend Permit'), (9, 'Amend Licence'), (10, 'Renew Permit'), (11, 'Renew Licence')], null=True)),
('apply_on_behalf_of', models.IntegerField(blank=True, choices=[(1, 'On Behalf of yourself'), (2, 'On Behalf of your company / government agency'), (3, 'On Behalf of indivdual as somebody else (as an authorised agent)'), (4, 'On Behalf of a company as somebody else (as an authorised agent)'), (5, 'Internal')], null=True)),
('state', models.IntegerField(choices=[(0, 'Unknown'), (1, 'Draft'), (2, 'With Admin Officer'), (3, 'With Referrals'), (4, 'With Assessor'), (5, 'With Manager'), (6, 'Issued'), (7, 'Issued (with admin)'), (8, 'Declined'), (9, 'New'), (10, 'Approved'), (11, 'Expired'), (12, 'With Director'), (13, 'With Executive'), (14, 'Completed'), (15, 'Form Creator'), (16, 'Current'), (17, 'Deleted')], default=1, editable=False)),
('title', models.CharField(max_length=256)),
('description', models.TextField(blank=True, null=True)),
('submit_date', models.DateField()),
('expire_date', models.DateField(blank=True, null=True)),
('proposed_commence', models.DateField(blank=True, null=True)),
('proposed_end', models.DateField(blank=True, null=True)),
('issue_date', models.DateField(blank=True, null=True)),
('cost', models.CharField(blank=True, max_length=256, null=True)),
('project_no', models.CharField(blank=True, max_length=256, null=True)),
('related_permits', models.TextField(blank=True, null=True)),
('over_water', models.BooleanField(default=False)),
('vessel_or_craft_details', models.IntegerField(blank=True, null=True)),
('max_participants', models.IntegerField(blank=True, null=True)),
('proposed_location', models.SmallIntegerField(blank=True, choices=[(0, 'On Land'), (1, 'On Water'), (2, 'Both')], null=True)),
('address', models.TextField(blank=True, null=True)),
('jetties', models.TextField(blank=True, null=True)),
('jetty_dot_approval', models.NullBooleanField(default=None)),
('jetty_dot_approval_expiry', models.DateField(blank=True, null=True)),
('drop_off_pick_up', models.TextField(blank=True, null=True)),
('food', models.NullBooleanField(default=None)),
('beverage', models.NullBooleanField(default=None)),
('liquor_licence', models.NullBooleanField(default=None)),
('byo_alcohol', models.NullBooleanField(default=None)),
('sullage_disposal', models.TextField(blank=True, null=True)),
('waste_disposal', models.TextField(blank=True, null=True)),
('refuel_location_method', models.TextField(blank=True, null=True)),
('berth_location', models.TextField(blank=True, null=True)),
('anchorage', models.TextField(blank=True, null=True)),
('operating_details', models.TextField(blank=True, null=True)),
('river_lease_require_river_lease', models.NullBooleanField(default=None)),
('river_lease_reserve_licence', models.NullBooleanField(default=None)),
('river_lease_application_number', models.CharField(blank=True, max_length=30, null=True)),
('proposed_development_current_use_of_land', models.TextField(blank=True, null=True)),
('proposed_development_description', models.TextField(blank=True, null=True)),
('publish_documents', models.DateField(blank=True, null=True)),
('publish_draft_report', models.DateField(blank=True, null=True)),
('publish_final_report', models.DateField(blank=True, null=True)),
('publish_determination_report', models.DateField(blank=True, null=True)),
('routeid', models.CharField(blank=True, default=1, max_length=4, null=True)),
('assessment_start_date', models.DateField(blank=True, null=True)),
('approval_id', models.IntegerField(blank=True, null=True)),
('number_of_crafts', models.IntegerField(blank=True, null=True)),
('route_status', models.CharField(blank=True, default='Draft', max_length=256, null=True)),
('submitter_comment', models.TextField(blank=True, default='', max_length=256, null=True)),
('applicant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='applicant', to=settings.AUTH_USER_MODEL)),
('assessed_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='assessed_by', to=settings.AUTH_USER_MODEL)),
('assignee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='assignee', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='ApplicationInvoice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('invoice_reference', models.CharField(max_length=64)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
],
),
migrations.CreateModel(
name='ApplicationPurpose',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('purpose', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='Communication',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comms_to', models.CharField(blank=True, max_length=256, null=True)),
('comms_from', models.CharField(blank=True, max_length=256, null=True)),
('subject', models.CharField(blank=True, max_length=256, null=True)),
('comms_type', models.IntegerField(choices=[(0, 'None'), (1, 'Phone'), (2, 'Email'), (3, 'Mail'), (4, 'System')], default=0)),
('details', models.TextField(blank=True, null=True)),
('state', models.IntegerField(blank=True, null=True)),
('created', models.DateTimeField(auto_now_add=True)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='applications.Application')),
],
),
migrations.CreateModel(
name='CommunicationAccount',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comms_to', models.CharField(blank=True, max_length=256, null=True)),
('comms_from', models.CharField(blank=True, max_length=256, null=True)),
('subject', models.CharField(blank=True, max_length=256, null=True)),
('comms_type', models.IntegerField(choices=[(0, 'None'), (1, 'Phone'), (2, 'Email'), (3, 'Mail')], default=0)),
('details', models.TextField(blank=True, null=True)),
('state', models.IntegerField(blank=True, null=True)),
('created', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='CommunicationCompliance',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comms_to', models.CharField(blank=True, max_length=256, null=True)),
('comms_from', models.CharField(blank=True, max_length=256, null=True)),
('subject', models.CharField(blank=True, max_length=256, null=True)),
('comms_type', models.IntegerField(choices=[(0, 'None'), (1, 'Phone'), (2, 'Email'), (3, 'Mail')], default=0)),
('details', models.TextField(blank=True, null=True)),
('state', models.IntegerField(blank=True, null=True)),
('created', models.DateTimeField(auto_now_add=True)),
],
),
migrations.CreateModel(
name='CommunicationOrganisation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('comms_to', models.CharField(blank=True, max_length=256, null=True)),
('comms_from', models.CharField(blank=True, max_length=256, null=True)),
('subject', models.CharField(blank=True, max_length=256, null=True)),
('comms_type', models.IntegerField(choices=[(0, 'None'), (1, 'Phone'), (2, 'Email'), (3, 'Mail')], default=0)),
('details', models.TextField(blank=True, null=True)),
('state', models.IntegerField(blank=True, null=True)),
('created', models.DateTimeField(auto_now_add=True)),
('org', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='accounts.Organisation')),
],
),
migrations.CreateModel(
name='Compliance',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('approval_id', models.IntegerField(blank=True, null=True)),
('title', models.CharField(blank=True, max_length=256, null=True)),
('app_type', models.IntegerField(blank=True, choices=[(1, 'Permit'), (2, 'Licence/permit'), (3, 'Part 5'), (4, 'Emergency works'), (5, 'Part 5 - Amendment Request'), (6, 'Part 5 - Amendment Application'), (7, 'Test - Application'), (8, 'Amend Permit'), (9, 'Amend Licence'), (10, 'Renew Permit'), (11, 'Renew Licence')], null=True)),
('assessed_date', models.DateField(blank=True, null=True)),
('status', models.IntegerField(choices=[(1, 'Current'), (2, 'Due'), (3, 'Future'), (4, 'Approved'), (5, 'With Assessor'), (6, 'With Manager'), (7, 'With Licence Holder'), (8, 'Overdue'), (9, 'Submitted')], default=3)),
('submit_date', models.DateTimeField(auto_now_add=True)),
('due_date', models.DateField(blank=True, null=True)),
('compliance', models.TextField(blank=True, help_text='Information to fulfil requirement of condition.', null=True)),
('comments', models.TextField(blank=True, null=True)),
('approve_date', models.DateField(blank=True, null=True)),
('applicant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='compliance_applicant', to=settings.AUTH_USER_MODEL)),
('assessed_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='compliance_assigned_by', to=settings.AUTH_USER_MODEL)),
('assignee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='compliance_assignee', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='ComplianceGroup',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('approval_id', models.IntegerField(blank=True, null=True)),
('title', models.CharField(blank=True, max_length=256, null=True)),
('app_type', models.IntegerField(blank=True, choices=[(1, 'Permit'), (2, 'Licence/permit'), (3, 'Part 5'), (4, 'Emergency works'), (5, 'Part 5 - Amendment Request'), (6, 'Part 5 - Amendment Application'), (7, 'Test - Application'), (8, 'Amend Permit'), (9, 'Amend Licence'), (10, 'Renew Permit'), (11, 'Renew Licence')], null=True)),
('status', models.IntegerField(choices=[(1, 'Current'), (2, 'Due'), (3, 'Future'), (4, 'Approved'), (5, 'With Assessor'), (6, 'With Manager'), (7, 'With Licence Holder'), (8, 'Overdue'), (9, 'Submitted')], default=3)),
('due_date', models.DateField(blank=True, null=True)),
('applicant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='compliance_group_applicant', to=settings.AUTH_USER_MODEL)),
('assignee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='compliance_group_assignee', to=settings.AUTH_USER_MODEL)),
('organisation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='accounts.Organisation')),
],
),
migrations.CreateModel(
name='Condition',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('condition', models.TextField(blank=True, null=True)),
('status', models.IntegerField(choices=[(1, 'Proposed'), (2, 'Applied'), (3, 'Rejected'), (4, 'Cancelled')], default=1)),
('due_date', models.DateField(blank=True, null=True)),
('recur_pattern', models.IntegerField(blank=True, choices=[(1, 'Weekly'), (2, 'Monthly'), (3, 'Annually')], null=True)),
('recur_freq', models.PositiveIntegerField(blank=True, help_text='How frequently is the recurrence pattern applied (e.g. every 2 months)', null=True, verbose_name='recurrence frequency')),
('suspend', models.BooleanField(default=False)),
('advise', models.TextField(blank=True, null=True)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='applications.Application')),
],
),
migrations.CreateModel(
name='ConditionPredefined',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(blank=True, max_length=256, null=True)),
('condition', models.TextField(blank=True, null=True)),
('status', models.IntegerField(choices=[(0, 'Inactive'), (1, 'Active')], default=1)),
],
),
migrations.CreateModel(
name='Craft',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name='Delegate',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
('organisation', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='accounts.Organisation')),
],
),
migrations.CreateModel(
name='Location',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('lot', models.CharField(blank=True, max_length=256, null=True)),
('reserve', models.CharField(blank=True, max_length=256, null=True)),
('suburb', models.CharField(blank=True, max_length=256, null=True)),
('intersection', models.CharField(blank=True, max_length=256, null=True)),
('lga', models.CharField(blank=True, max_length=256, null=True)),
('poly', django.contrib.gis.db.models.fields.PolygonField(blank=True, null=True, srid=4326)),
('title_volume', models.CharField(blank=True, max_length=256, null=True)),
('folio', models.CharField(blank=True, max_length=30, null=True)),
('dpd_number', models.CharField(blank=True, max_length=30, null=True)),
('location', models.CharField(blank=True, max_length=256, null=True)),
('street_number_name', models.CharField(blank=True, max_length=256, null=True)),
('local_government_authority', models.CharField(blank=True, max_length=256, null=True)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
],
),
migrations.CreateModel(
name='OrganisationContact',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email', models.EmailField(max_length=254)),
('first_name', models.CharField(blank=True, max_length=128, verbose_name='Given name(s)')),
('last_name', models.CharField(blank=True, max_length=128)),
('phone_number', models.CharField(blank=True, max_length=50, null=True)),
('mobile_number', models.CharField(blank=True, max_length=50, null=True)),
('fax_number', models.CharField(blank=True, max_length=50, null=True)),
('organisation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='accounts.Organisation')),
],
),
migrations.CreateModel(
name='OrganisationExtras',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('pin1', models.CharField(blank=True, max_length=50, null=True)),
('pin2', models.CharField(blank=True, max_length=50, null=True)),
],
),
migrations.CreateModel(
name='OrganisationPending',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=128, null=True)),
('abn', models.CharField(blank=True, max_length=50, null=True, verbose_name='ABN')),
('status', models.IntegerField(choices=[(1, 'Pending'), (2, 'Approved'), (3, 'Declined')], default=1)),
('company_exists', models.BooleanField(default=False)),
('submit_date', models.DateField(auto_now_add=True, null=True)),
('pin1', models.CharField(blank=True, max_length=50, null=True)),
('pin2', models.CharField(blank=True, max_length=50, null=True)),
('assignee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='org_pending_assignee', to=settings.AUTH_USER_MODEL)),
('billing_address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='org_pending_billing_address', to='accounts.Address')),
('email_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='PublicationFeedback',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('address', models.CharField(max_length=256)),
('suburb', models.CharField(max_length=100)),
('state', models.IntegerField(choices=[(1, 'Western Australia'), (2, 'New South Wales'), (3, 'Victoria'), (4, 'South Australia'), (5, 'Northern Territory'), (6, 'Queensland'), (7, 'Australian Capital Territory'), (8, 'Tasmania')])),
('postcode', models.CharField(max_length=4)),
('phone', models.CharField(max_length=20)),
('email', models.EmailField(max_length=254)),
('comments', models.TextField(blank=True, null=True)),
('status', models.CharField(max_length=20)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
],
),
migrations.CreateModel(
name='PublicationNewspaper',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField(blank=True, null=True)),
('newspaper', models.CharField(max_length=150)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
],
),
migrations.CreateModel(
name='PublicationWebsite',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
],
),
migrations.CreateModel(
name='Record',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('upload', models.FileField(max_length=512, storage=django.core.files.storage.FileSystemStorage(location=b'/home/jason/projects/statdev-ledger/statdev/private-media'), upload_to='uploads/%Y/%m/%d')),
('name', models.CharField(max_length=256)),
('category', models.IntegerField(blank=True, choices=[(1, 'Landowner consent'), (2, 'Deed'), (3, 'Assessment report'), (4, 'Referee response'), (5, 'Lodgement document'), (6, 'Draft document'), (7, 'Final document'), (8, 'Determination document'), (9, 'Completed document')], null=True)),
('metadata', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('text_content', models.TextField(blank=True, editable=False, null=True)),
],
),
migrations.CreateModel(
name='Referral',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('details', models.TextField(blank=True, null=True)),
('sent_date', models.DateField()),
('period', models.PositiveIntegerField(verbose_name='period (days)')),
('expire_date', models.DateField(blank=True, editable=False, null=True)),
('response_date', models.DateField(blank=True, null=True)),
('feedback', models.TextField(blank=True, null=True)),
('proposed_conditions', models.TextField(blank=True, null=True)),
('status', models.IntegerField(choices=[(1, 'Referred'), (2, 'Responded'), (3, 'Recalled'), (4, 'Expired'), (5, 'With Admin')], default=5)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
('records', models.ManyToManyField(blank=True, to='applications.Record')),
('referee', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='StakeholderComms',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email', models.EmailField(max_length=254)),
('name', models.CharField(max_length=255)),
('sent_date', models.DateTimeField(auto_now_add=True)),
('role', models.IntegerField(choices=[(0, 'None'), (1, 'Applicant'), (2, 'Submitter'), (3, 'Referral'), (4, 'Feedback')], default=0)),
('comm_type', models.IntegerField(choices=[(0, 'None'), (1, 'Email'), (2, 'Posted')], default=0)),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='applications.Application')),
],
),
migrations.CreateModel(
name='Vessel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('vessel_type', models.SmallIntegerField(blank=True, choices=[(0, 'Vessel'), (1, 'Craft')], null=True)),
('name', models.CharField(max_length=256)),
('vessel_id', models.CharField(blank=True, max_length=256, null=True, verbose_name='Vessel identification')),
('size', models.PositiveIntegerField(blank=True, null=True, verbose_name='size (m)')),
('engine', models.PositiveIntegerField(blank=True, null=True, verbose_name='engine (kW)')),
('passenger_capacity', models.PositiveIntegerField(blank=True, null=True)),
('registration', models.ManyToManyField(blank=True, to='applications.Record')),
],
),
migrations.AddField(
model_name='publicationwebsite',
name='original_document',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='original_document', to='applications.Record'),
),
migrations.AddField(
model_name='publicationwebsite',
name='published_document',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='published_document', to='applications.Record'),
),
migrations.AddField(
model_name='publicationnewspaper',
name='records',
field=models.ManyToManyField(blank=True, related_name='newspaper', to='applications.Record'),
),
migrations.AddField(
model_name='publicationfeedback',
name='records',
field=models.ManyToManyField(blank=True, related_name='feedback', to='applications.Record'),
),
migrations.AddField(
model_name='organisationpending',
name='identification',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='applications.Record'),
),
migrations.AddField(
model_name='organisationpending',
name='postal_address',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='org_pending_postal_address', to='accounts.Address'),
),
migrations.AddField(
model_name='organisationextras',
name='identification',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organisation_extras_org_identification', to='applications.Record'),
),
migrations.AddField(
model_name='organisationextras',
name='organisation',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='organisation_extras_org_id', to='accounts.Organisation'),
),
migrations.AddField(
model_name='location',
name='records',
field=models.ManyToManyField(blank=True, to='applications.Record'),
),
migrations.AddField(
model_name='condition',
name='records',
field=models.ManyToManyField(blank=True, to='applications.Record'),
),
migrations.AddField(
model_name='condition',
name='referral',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='applications.Referral'),
),
migrations.AddField(
model_name='compliance',
name='compliance_group',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='applications.ComplianceGroup'),
),
migrations.AddField(
model_name='compliance',
name='condition',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='applications.Condition'),
),
migrations.AddField(
model_name='compliance',
name='group',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='compliance_group_assignment', to='auth.Group'),
),
migrations.AddField(
model_name='compliance',
name='organisation',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='accounts.Organisation'),
),
migrations.AddField(
model_name='compliance',
name='records',
field=models.ManyToManyField(blank=True, to='applications.Record'),
),
migrations.AddField(
model_name='compliance',
name='submitted_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='compliance_submitted_by', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='communicationorganisation',
name='records',
field=models.ManyToManyField(blank=True, related_name='org_communication_docs', to='applications.Record'),
),
migrations.AddField(
model_name='communicationcompliance',
name='compliance',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='applications.Compliance'),
),
migrations.AddField(
model_name='communicationcompliance',
name='records',
field=models.ManyToManyField(blank=True, related_name='compliance_communication_docs', to='applications.Record'),
),
migrations.AddField(
model_name='communicationaccount',
name='records',
field=models.ManyToManyField(blank=True, related_name='account_communication_docs', to='applications.Record'),
),
migrations.AddField(
model_name='communicationaccount',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='communication',
name='records',
field=models.ManyToManyField(blank=True, related_name='communication_docs', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='brochures_itineries_adverts',
field=models.ManyToManyField(blank=True, related_name='brochures_itineries_adverts', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='cert_public_liability_insurance',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cert_public_liability_insurace', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='cert_survey',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cert_survey', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='deed',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deed', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_briefing_note',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_briefing_note', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_completion',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_completion', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_determination',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_determination', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_determination_approved',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_determination_approved', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_draft',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_draft', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_draft_signed',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_draft_signed', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_final',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_final', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_final_signed',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_final_signed', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_memo',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_memo', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_new_draft',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_newdraft', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='document_new_draft_v3',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_newdraftv3', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='group',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='application_group_assignment', to='auth.Group'),
),
migrations.AddField(
model_name='application',
name='land_owner_consent',
field=models.ManyToManyField(blank=True, related_name='land_owner_consent', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='location_route_access',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='location_route_access', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='organisation',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='accounts.Organisation'),
),
migrations.AddField(
model_name='application',
name='other_relevant_documents',
field=models.ManyToManyField(blank=True, related_name='other_relevant_documents', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='proposed_development_plans',
field=models.ManyToManyField(blank=True, related_name='proposed_development_plans', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='purpose',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='applications.ApplicationPurpose'),
),
migrations.AddField(
model_name='application',
name='records',
field=models.ManyToManyField(blank=True, related_name='records', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='risk_mgmt_plan',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='risk_mgmt_plan', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='river_lease_scan_of_application',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='river_lease_scan_of_application', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='safety_mgmt_procedures',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='safety_mgmt_plan', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='submitted_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='Submitted_by', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='application',
name='supporting_info_demonstrate_compliance_trust_policies',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='supporting_info_demonstrate_compliance_trust_policies', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='swan_river_trust_board_feedback',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_swan_river_board_feedback', to='applications.Record'),
),
migrations.AddField(
model_name='application',
name='type_of_crafts',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='craft', to='applications.Craft'),
),
migrations.AddField(
model_name='application',
name='vessels',
field=models.ManyToManyField(blank=True, to='applications.Vessel'),
),
migrations.AlterUniqueTogether(
name='referral',
unique_together=set([('application', 'referee')]),
),
migrations.AlterUniqueTogether(
name='delegate',
unique_together=set([('email_user', 'organisation')]),
),
]
| 63.846875
| 436
| 0.620307
| 4,256
| 40,862
| 5.805216
| 0.102444
| 0.064111
| 0.050512
| 0.070871
| 0.807868
| 0.786822
| 0.725139
| 0.668434
| 0.641235
| 0.550532
| 0
| 0.012057
| 0.230728
| 40,862
| 639
| 437
| 63.946792
| 0.773939
| 0.001664
| 0
| 0.591125
| 1
| 0
| 0.204359
| 0.052757
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.001585
| 0.011094
| 0
| 0.017433
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ee0a968156dbb01d564ec5fd2d1dfa8ca09c68a1
| 199
|
py
|
Python
|
project/locations/regions/serializers.py
|
CODE-Easyy/dash-back
|
202df5d46c09b3639a37de6d65189a55e966be25
|
[
"MIT"
] | null | null | null |
project/locations/regions/serializers.py
|
CODE-Easyy/dash-back
|
202df5d46c09b3639a37de6d65189a55e966be25
|
[
"MIT"
] | null | null | null |
project/locations/regions/serializers.py
|
CODE-Easyy/dash-back
|
202df5d46c09b3639a37de6d65189a55e966be25
|
[
"MIT"
] | null | null | null |
from rest_framework.serializers import ModelSerializer
from .models import Region
class RegionSerializer(ModelSerializer):
class Meta:
model = Region
fields = '__all__'
| 22.111111
| 54
| 0.708543
| 19
| 199
| 7.157895
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241206
| 199
| 9
| 55
| 22.111111
| 0.900662
| 0
| 0
| 0
| 0
| 0
| 0.035
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ee1a169e37e1151814ae977d9ccb7dadff239dc4
| 104
|
py
|
Python
|
sizakat/transaction/admin.py
|
artmxra7/sizkt-backend
|
49263b7d937ac62307b8ced47fa1497226f1d4cc
|
[
"MIT"
] | null | null | null |
sizakat/transaction/admin.py
|
artmxra7/sizkt-backend
|
49263b7d937ac62307b8ced47fa1497226f1d4cc
|
[
"MIT"
] | 5
|
2021-03-30T14:16:46.000Z
|
2021-09-22T19:38:45.000Z
|
sizakat/transaction/admin.py
|
artmxra7/sizkt-backend
|
49263b7d937ac62307b8ced47fa1497226f1d4cc
|
[
"MIT"
] | 1
|
2020-11-14T02:58:29.000Z
|
2020-11-14T02:58:29.000Z
|
from django.contrib import admin
from .models import ZakatType
admin.site.register([
ZakatType
])
| 13
| 32
| 0.759615
| 13
| 104
| 6.076923
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163462
| 104
| 7
| 33
| 14.857143
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ee2dbfb2fae62c7c0c13bbd37ef8dd2303dd5dea
| 969
|
py
|
Python
|
tests/test_gsc.py
|
jaceiverson/googlewrapper
|
863326d9338c97388c15ec9d2564f805932c93db
|
[
"MIT"
] | 1
|
2022-02-22T15:52:41.000Z
|
2022-02-22T15:52:41.000Z
|
tests/test_gsc.py
|
jaceiverson/googlewrapper
|
863326d9338c97388c15ec9d2564f805932c93db
|
[
"MIT"
] | 1
|
2021-11-11T03:50:21.000Z
|
2021-11-12T15:55:59.000Z
|
tests/test_gsc.py
|
jaceiverson/googlewrapper
|
863326d9338c97388c15ec9d2564f805932c93db
|
[
"MIT"
] | null | null | null |
from attr import dataclass
import pytest
import datetime as dt
from googlewrapper import GoogleSearchConsole
@dataclass
class GSCTestData:
connection = GoogleSearchConsole()
@pytest.fixture(scope="session")
def gsc():
return GSCTestData()
@pytest.mark.incremental
class TestUserHandling:
def test_connect(self, gsc):
assert gsc.connection
def test_site_pull(self, gsc):
pass
def test_filtered_site_pull(self, gsc):
pass
def test_default_params_pull(self, gsc):
pass
def test_default_dates(self, gsc):
assert gsc.connection.dates() == (
dt.date.today() - dt.timedelta(days=7),
dt.date.today(),
)
def test_no_sites_pull(self, gsc):
pass
def test_setting_dimensions(self, gsc):
pass
def test_setting_metrics(self, gsc):
pass
def test_setting_filter(self, gsc):
pass
def test_ctr(self, gsc):
pass
| 18.634615
| 51
| 0.651187
| 118
| 969
| 5.169492
| 0.381356
| 0.114754
| 0.144262
| 0.160656
| 0.388525
| 0.27377
| 0.144262
| 0
| 0
| 0
| 0
| 0.001397
| 0.261094
| 969
| 51
| 52
| 19
| 0.850559
| 0
| 0
| 0.228571
| 0
| 0
| 0.007224
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 1
| 0.314286
| false
| 0.228571
| 0.114286
| 0.028571
| 0.542857
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
ee6ba44750cd6427c6c8a0f1d887db05c9d63ff2
| 339
|
py
|
Python
|
examples/ex_trigger_backup.py
|
jeremyschulman/aio-ipfabric
|
26ae21987ead45d9b5663751c63d4b01e79a5dfe
|
[
"Apache-2.0"
] | 5
|
2020-08-19T07:35:13.000Z
|
2022-01-25T13:08:07.000Z
|
examples/ex_trigger_backup.py
|
justinjeffery-ipf/aio-ipfabric
|
121d770ea8a3395774a02189f354ea9ef7c9c361
|
[
"Apache-2.0"
] | 16
|
2020-10-18T17:43:35.000Z
|
2021-11-14T22:23:45.000Z
|
examples/ex_trigger_backup.py
|
justinjeffery-ipf/aio-ipfabric
|
121d770ea8a3395774a02189f354ea9ef7c9c361
|
[
"Apache-2.0"
] | 2
|
2020-10-19T19:05:17.000Z
|
2022-02-07T16:47:08.000Z
|
import asyncio
from aioipfabric import IPFabricClient
from aioipfabric.mixins.configs import IPFConfigsMixin
class Client(IPFabricClient, IPFConfigsMixin):
pass
asyncio.set_event_loop(asyncio.get_event_loop())
async def backup_device(**options):
async with Client() as ipf:
return await ipf.trigger_backup(**options)
| 21.1875
| 54
| 0.784661
| 41
| 339
| 6.341463
| 0.634146
| 0.115385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141593
| 339
| 15
| 55
| 22.6
| 0.893471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.111111
| 0.333333
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
c99427c4a8414308a3dfd88d2426cd42b1fcc986
| 212
|
py
|
Python
|
ssod/datasets/samplers/__init__.py
|
Ikiselev7/SoftTeacher
|
6f273f776beb156a40d5e60f361f71610f5e899f
|
[
"MIT"
] | null | null | null |
ssod/datasets/samplers/__init__.py
|
Ikiselev7/SoftTeacher
|
6f273f776beb156a40d5e60f361f71610f5e899f
|
[
"MIT"
] | null | null | null |
ssod/datasets/samplers/__init__.py
|
Ikiselev7/SoftTeacher
|
6f273f776beb156a40d5e60f361f71610f5e899f
|
[
"MIT"
] | null | null | null |
from .semi_sampler import DistributedGroupSemiBalanceSampler
from .fix_sampler import DistributedGroupFixRatioSampler
__all__ = [
"DistributedGroupSemiBalanceSampler",
"DistributedGroupFixRatioSampler"
]
| 30.285714
| 60
| 0.849057
| 13
| 212
| 13.384615
| 0.615385
| 0.149425
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103774
| 212
| 6
| 61
| 35.333333
| 0.915789
| 0
| 0
| 0
| 0
| 0
| 0.306604
| 0.306604
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c99a5b7db0b8a1a2e30bce22f64b2d659be050b6
| 86
|
py
|
Python
|
backend/test/queries/conftest.py
|
Healthcare-NOW/poppwatch
|
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
|
[
"MIT"
] | 1
|
2020-09-09T23:06:36.000Z
|
2020-09-09T23:06:36.000Z
|
backend/test/queries/conftest.py
|
Healthcare-NOW/fec-watch
|
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
|
[
"MIT"
] | 9
|
2020-07-18T15:09:59.000Z
|
2022-02-27T00:53:47.000Z
|
backend/test/queries/conftest.py
|
Healthcare-NOW/pop-donation-tracker
|
b8545f40699ef521f4df2a2f2f4edcf3c5b1cc04
|
[
"MIT"
] | null | null | null |
import pytest
@pytest.fixture(autouse=True)
def auto_refresh_db(fresh_db):
pass
| 12.285714
| 30
| 0.767442
| 13
| 86
| 4.846154
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 86
| 6
| 31
| 14.333333
| 0.851351
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
c99c069a92c00ece66088df0341a882bcdfc64f2
| 207
|
py
|
Python
|
tests/test_users.py
|
victorneo/actpub
|
1e557947ba215a45dbcf02c4a6f01fc5fe180398
|
[
"Unlicense"
] | null | null | null |
tests/test_users.py
|
victorneo/actpub
|
1e557947ba215a45dbcf02c4a6f01fc5fe180398
|
[
"Unlicense"
] | null | null | null |
tests/test_users.py
|
victorneo/actpub
|
1e557947ba215a45dbcf02c4a6f01fc5fe180398
|
[
"Unlicense"
] | null | null | null |
import pytest
from models.users import User, create_user
def test_create_user():
user = create_user('username', 'pw', 'a@b.com', 'FN', 'LN', None)
assert user.private_key
assert user.public_key
| 25.875
| 69
| 0.705314
| 32
| 207
| 4.375
| 0.65625
| 0.214286
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164251
| 207
| 8
| 70
| 25.875
| 0.809249
| 0
| 0
| 0
| 0
| 0
| 0.100962
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 0
| 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
| 4
|
a009fee57aedf8f8409dd8b4d2dd9974b439cf65
| 90
|
py
|
Python
|
theano_ops/__init__.py
|
dfm/theano_ops
|
d0e894685938a2287000a0c6681392ce3150dee0
|
[
"MIT"
] | null | null | null |
theano_ops/__init__.py
|
dfm/theano_ops
|
d0e894685938a2287000a0c6681392ce3150dee0
|
[
"MIT"
] | null | null | null |
theano_ops/__init__.py
|
dfm/theano_ops
|
d0e894685938a2287000a0c6681392ce3150dee0
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
__all__ = ["kepler", "celerite"]
from . import kepler, celerite
| 15
| 32
| 0.611111
| 10
| 90
| 5.1
| 0.8
| 0.54902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 0.177778
| 90
| 5
| 33
| 18
| 0.675676
| 0.233333
| 0
| 0
| 0
| 0
| 0.208955
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4e423db16e7718120ff914c58f010bb4e6e2fcf6
| 524
|
py
|
Python
|
pino/log.py
|
prim/pino
|
18de7383c0f39c944baedef7a1d8f4e7a2940740
|
[
"MIT"
] | null | null | null |
pino/log.py
|
prim/pino
|
18de7383c0f39c944baedef7a1d8f4e7a2940740
|
[
"MIT"
] | null | null | null |
pino/log.py
|
prim/pino
|
18de7383c0f39c944baedef7a1d8f4e7a2940740
|
[
"MIT"
] | null | null | null |
import time
def debug(fmt, *args):
if args:
fmt = fmt % args
# fmt = fmt[:128]
print fmt
return
if args:
print(time.asctime(), fmt % args)
else:
print(time.asctime(), fmt)
info = debug
error = debug
# def info(fmt, *args):
# if args:
# print(time.asctime(), fmt % args)
# else:
# print(time.asctime(), fmt)
#
# def error(fmt, *args):
# if args:
# print(time.asctime(), fmt % args)
# else:
# print(time.asctime(), fmt)
#
| 16.903226
| 43
| 0.51145
| 65
| 524
| 4.123077
| 0.215385
| 0.182836
| 0.358209
| 0.425373
| 0.634328
| 0.634328
| 0.634328
| 0.634328
| 0.634328
| 0.634328
| 0
| 0.008571
| 0.332061
| 524
| 30
| 44
| 17.466667
| 0.757143
| 0.498092
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.083333
| null | null | 0.25
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e5f7de3bd16483c3a4cd9d9186421ca070066f6
| 169
|
py
|
Python
|
tests/__init__.py
|
iiiusky/Sasila
|
c765f07952a4d542d214415b3e9d2a06db16cec5
|
[
"Apache-2.0"
] | 327
|
2017-02-03T01:51:56.000Z
|
2021-09-10T09:48:27.000Z
|
tests/__init__.py
|
iiiusky/Sasila
|
c765f07952a4d542d214415b3e9d2a06db16cec5
|
[
"Apache-2.0"
] | 7
|
2018-02-06T09:44:48.000Z
|
2021-03-31T23:42:54.000Z
|
tests/__init__.py
|
iiiusky/Sasila
|
c765f07952a4d542d214415b3e9d2a06db16cec5
|
[
"Apache-2.0"
] | 85
|
2017-07-06T02:42:46.000Z
|
2021-12-27T06:37:41.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest2 as unittest
all_suite = unittest.TestLoader().discover(os.path.dirname(__file__), "test_*.py")
| 24.142857
| 82
| 0.715976
| 24
| 169
| 4.791667
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013245
| 0.106509
| 169
| 6
| 83
| 28.166667
| 0.748344
| 0.248521
| 0
| 0
| 0
| 0
| 0.072
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4e60f45dd66ed76486eca04787187140e50cb6ba
| 870
|
py
|
Python
|
tests.py
|
toastdriven/rose
|
5bcebdb66be14fd78885c444b00ddf401ea02cfe
|
[
"BSD-3-Clause"
] | 1
|
2015-11-05T14:32:13.000Z
|
2015-11-05T14:32:13.000Z
|
tests.py
|
toastdriven/rose
|
5bcebdb66be14fd78885c444b00ddf401ea02cfe
|
[
"BSD-3-Clause"
] | null | null | null |
tests.py
|
toastdriven/rose
|
5bcebdb66be14fd78885c444b00ddf401ea02cfe
|
[
"BSD-3-Clause"
] | null | null | null |
import unittest
from rose import build_version, load_version, VersionError
class VersionTestCase(unittest.TestCase):
def test_build_version_fails(self):
self.assertRaises(VersionError, build_version, 'rose', '0')
self.assertRaises(VersionError, build_version, 'rose', '0.1')
self.assertRaises(ValueError, build_version, 'rose', 'a.b.c')
self.assertRaises(VersionError, build_version, 'rose', '0.9.3-beta-gamma')
def test_build_version_success(self):
self.assertEqual(build_version('rose', '1.0.0'), (1, 0, 0))
self.assertEqual(build_version('rose', '1.0.0-beta'), (1, 0, 0, 'beta'))
self.assertEqual(build_version('rose', '0.9.13-alpha/security'), (0, 9, 13, 'alpha/security'))
def test_load_version(self):
# Just make sure it's there.
self.assertTrue(len(load_version('VERSION')))
| 43.5
| 102
| 0.67931
| 117
| 870
| 4.897436
| 0.333333
| 0.209424
| 0.195462
| 0.118674
| 0.469459
| 0.354276
| 0.354276
| 0.118674
| 0
| 0
| 0
| 0.035813
| 0.165517
| 870
| 19
| 103
| 45.789474
| 0.753444
| 0.029885
| 0
| 0
| 0
| 0
| 0.135392
| 0.024941
| 0
| 0
| 0
| 0
| 0.571429
| 1
| 0.214286
| false
| 0
| 0.142857
| 0
| 0.428571
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e8ada290f793445be178e275c1c89410564fa1c
| 24
|
py
|
Python
|
tests/__init__.py
|
asmeurer/nikola
|
ea1c651bfed0fd6337f1d22cf8dd99899722912c
|
[
"MIT"
] | 1,901
|
2015-01-02T02:49:51.000Z
|
2022-03-30T23:31:35.000Z
|
tests/__init__.py
|
asmeurer/nikola
|
ea1c651bfed0fd6337f1d22cf8dd99899722912c
|
[
"MIT"
] | 1,755
|
2015-01-01T08:17:16.000Z
|
2022-03-24T18:02:22.000Z
|
tests/__init__.py
|
asmeurer/nikola
|
ea1c651bfed0fd6337f1d22cf8dd99899722912c
|
[
"MIT"
] | 421
|
2015-01-02T18:06:37.000Z
|
2022-03-28T23:18:54.000Z
|
"""Tests for Nikola."""
| 12
| 23
| 0.583333
| 3
| 24
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 24
| 1
| 24
| 24
| 0.666667
| 0.708333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e8b734d809186b8079e7c2c206ed29ca6486b91
| 636
|
py
|
Python
|
haystack_static_pages/search_indexes.py
|
nkhumphreys/haystack-static-pages
|
c11a66d59f061aa0e26d1a875e4797dcce845b11
|
[
"BSD-3-Clause"
] | null | null | null |
haystack_static_pages/search_indexes.py
|
nkhumphreys/haystack-static-pages
|
c11a66d59f061aa0e26d1a875e4797dcce845b11
|
[
"BSD-3-Clause"
] | null | null | null |
haystack_static_pages/search_indexes.py
|
nkhumphreys/haystack-static-pages
|
c11a66d59f061aa0e26d1a875e4797dcce845b11
|
[
"BSD-3-Clause"
] | null | null | null |
from haystack import indexes
from haystack_static_pages.models import StaticPage
class StaticPageIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(
document=True, use_template=True,
template_name='staticpage_text.txt'
)
title = indexes.CharField(model_attr='title')
url = indexes.CharField(model_attr='url')
content = indexes.CharField(model_attr='content')
description = indexes.CharField(model_attr='description')
language = indexes.CharField(model_attr='language')
def get_model(self):
return StaticPage
#site.register(StaticPage, StaticPageIndex)
| 28.909091
| 62
| 0.742138
| 70
| 636
| 6.585714
| 0.471429
| 0.208243
| 0.227766
| 0.27115
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160377
| 636
| 21
| 63
| 30.285714
| 0.863296
| 0.066038
| 0
| 0
| 0
| 0
| 0.089376
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| false
| 0
| 0.142857
| 0.071429
| 0.785714
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
4e8e156e3e88bdbb91fbc6f7e35ed97b27027910
| 189
|
py
|
Python
|
main.py
|
s4shyam95/ark_fund
|
bea1564a782485820475bcd9724b879ad27504a2
|
[
"Apache-2.0"
] | 1
|
2021-02-24T08:11:27.000Z
|
2021-02-24T08:11:27.000Z
|
main.py
|
ArkHackathon/ARK-Fund
|
bea1564a782485820475bcd9724b879ad27504a2
|
[
"Apache-2.0"
] | null | null | null |
main.py
|
ArkHackathon/ARK-Fund
|
bea1564a782485820475bcd9724b879ad27504a2
|
[
"Apache-2.0"
] | 1
|
2018-04-13T12:58:06.000Z
|
2018-04-13T12:58:06.000Z
|
import webview
# Create a resizable webview window with 800x600 dimensio
webview.create_window("ArkFund", "http://127.0.0.1:8000/", width=1400,height=800, resizable=False, fullscreen=False)
| 63
| 116
| 0.78836
| 28
| 189
| 5.285714
| 0.75
| 0.175676
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132184
| 0.079365
| 189
| 3
| 116
| 63
| 0.718391
| 0.291005
| 0
| 0
| 0
| 0
| 0.218045
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4e97b2cab6b69515374ce6aba63a0e447e7aed8e
| 72
|
py
|
Python
|
benchmark/json_parser.py
|
hyunsik/json
|
f0582a8b600ba10b97eab773b4c0c668bef923d8
|
[
"MIT"
] | 1
|
2015-04-29T09:48:22.000Z
|
2015-04-29T09:48:22.000Z
|
benchmark/json_parser.py
|
hyunsik/json
|
f0582a8b600ba10b97eab773b4c0c668bef923d8
|
[
"MIT"
] | null | null | null |
benchmark/json_parser.py
|
hyunsik/json
|
f0582a8b600ba10b97eab773b4c0c668bef923d8
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import sys
import json
j = json.load(sys.stdin)
| 10.285714
| 24
| 0.708333
| 13
| 72
| 3.923077
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152778
| 72
| 6
| 25
| 12
| 0.836066
| 0.277778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4eae4ea6d3e5e425db9b1400a6060ed70c6aa7bb
| 1,409
|
py
|
Python
|
app/modules/core/component_group.py
|
arxcdr/silverback
|
212139cbc1a648d1f877d60f2d7c4d750eefc3da
|
[
"BSD-3-Clause"
] | null | null | null |
app/modules/core/component_group.py
|
arxcdr/silverback
|
212139cbc1a648d1f877d60f2d7c4d750eefc3da
|
[
"BSD-3-Clause"
] | null | null | null |
app/modules/core/component_group.py
|
arxcdr/silverback
|
212139cbc1a648d1f877d60f2d7c4d750eefc3da
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Component Group Module
"""
# Local Library
from app.modules.entity.component_entity import ComponentEntity
from app.modules.entity.component_group_entity import ComponentGroupEntity
class ComponentGroup():
__component_group_entity = None
__component_entity = None
def __init__(self):
self.__component_group_entity = ComponentGroupEntity()
self.__component_entity = ComponentEntity()
def get_one_by_id(self, id):
group = self.__component_group_entity.get_one_by_id(id)
if not group:
return False
return {
"id": group.id,
"name": group.name,
"uptime": group.uptime,
"description": group.description,
}
def insert_one(self, group):
return self.__component_group_entity.insert_one(group)
def update_one_by_id(self, id, group_data):
return self.__component_group_entity.update_one_by_id(id, group_data)
def count_all(self):
return self.__component_group_entity.count_all()
def count_components(self, group_id):
return self.__component_entity.count(group_id)
def get_all(self, offset=None, limit=None):
return self.__component_group_entity.get_all(offset, limit)
def delete_one_by_id(self, id):
self.__component_entity.clear_group(id)
return self.__component_group_entity.delete_one_by_id(id)
| 28.18
| 77
| 0.699077
| 176
| 1,409
| 5.136364
| 0.221591
| 0.154867
| 0.199115
| 0.185841
| 0.353982
| 0.039823
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217175
| 1,409
| 49
| 78
| 28.755102
| 0.819583
| 0.02626
| 0
| 0
| 0
| 0
| 0.016862
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.258065
| false
| 0
| 0.064516
| 0.16129
| 0.677419
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
4ed673845f9af5faebc777595f9cc8476566896c
| 1,056
|
py
|
Python
|
Python_Aulas_3,6+/09_If_ELIF_Else_boolean.py
|
PASSINP/Python_3-Django
|
0257ce9aada1d63d7912ed9a60be5515c5100028
|
[
"MIT"
] | 1
|
2021-01-04T12:48:47.000Z
|
2021-01-04T12:48:47.000Z
|
Python_Aulas_3,6+/09_If_ELIF_Else_boolean.py
|
PASSINP/Python_3-Django
|
0257ce9aada1d63d7912ed9a60be5515c5100028
|
[
"MIT"
] | null | null | null |
Python_Aulas_3,6+/09_If_ELIF_Else_boolean.py
|
PASSINP/Python_3-Django
|
0257ce9aada1d63d7912ed9a60be5515c5100028
|
[
"MIT"
] | null | null | null |
"""
Condições IF, Elif e Else
"""
# If, Else e Elif são verificadores que se baseiam em boolean (TRUE ou FALSE) para determinar
# o que deve ser feito. Se uma ação deve ser feita caso seja verdadeiro ou outra caso seja
# falso. No caso o If é a primeira linha de verificação. Não se começa por else ou elif
# Nunca esquecer de colocar o que você deseja verificar com if em uma identação (Tab ou 4
# barras de espaço).
# O if pode verificar qualquer coisa
# O if só sera executado caso seja true o resultado. Caso seja False o if sera completamente
#ignorado e o código rodara normalmente. Mas existe uma maneira de continuar caso seja falso
if False:
print('Verdadeiro')
# O else é uma ação que pode ocorrer caso o if de resultado false. Porem ele só pode ser
# utilizado uma vez por condição.
else:
print('Código rodando')
if False:
print('Verdadeiro')
# Para resolver o problema de não poder utilizar mais de um else, existe o elif, que pode ser
# utilizado varias vezes.
elif True:
print('Elif')
else:
print('Código rodando')
| 36.413793
| 93
| 0.739583
| 180
| 1,056
| 4.338889
| 0.461111
| 0.051216
| 0.033291
| 0.056338
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.001189
| 0.203598
| 1,056
| 29
| 94
| 36.413793
| 0.927467
| 0.809659
| 0
| 0.8
| 0
| 0
| 0.284153
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
14d2b2338eadd71184f2603ad2c14397f5e7156d
| 481
|
py
|
Python
|
examples/everything/drivers/drivers.py
|
Breq16/vibrance_ctrl
|
93247f686b4e5e42d5f36b9d592fe9cd8322069e
|
[
"MIT"
] | null | null | null |
examples/everything/drivers/drivers.py
|
Breq16/vibrance_ctrl
|
93247f686b4e5e42d5f36b9d592fe9cd8322069e
|
[
"MIT"
] | null | null | null |
examples/everything/drivers/drivers.py
|
Breq16/vibrance_ctrl
|
93247f686b4e5e42d5f36b9d592fe9cd8322069e
|
[
"MIT"
] | null | null | null |
import vibrance.driver.midi
import vibrance.driver.uart
import vibrance.driver.pygame_if
import vibrance.driver.keypad
drivers = []
drivers.append(vibrance.driver.midi.MidiDriver("Ableton MIDI", "vibrance"))
drivers.append(vibrance.driver.uart.SerialDriver("Arduino Serial",
"/dev/ttyUSB0"))
drivers.append(vibrance.driver.pygame_if.PyGameDriver("PyGame Demo"))
drivers.append(vibrance.driver.keypad.KeypadDriver("Terminal Keys"))
| 40.083333
| 75
| 0.72973
| 54
| 481
| 6.462963
| 0.407407
| 0.320917
| 0.229226
| 0.309456
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002439
| 0.147609
| 481
| 11
| 76
| 43.727273
| 0.84878
| 0
| 0
| 0
| 0
| 0
| 0.14553
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
14d7fbd6f2f9604eccd5a47630b4f23791b0cfca
| 185
|
py
|
Python
|
utils/generate_array.py
|
Alexwell/algorithms
|
d9aac6ec1f2a886e2a72827c32a8f5f1681d4fba
|
[
"MIT"
] | null | null | null |
utils/generate_array.py
|
Alexwell/algorithms
|
d9aac6ec1f2a886e2a72827c32a8f5f1681d4fba
|
[
"MIT"
] | null | null | null |
utils/generate_array.py
|
Alexwell/algorithms
|
d9aac6ec1f2a886e2a72827c32a8f5f1681d4fba
|
[
"MIT"
] | null | null | null |
import random
def generate_array(my_len, max_rand_coeff=100):
arr = []
while len(arr) < my_len:
arr.append(random.randint(0, my_len * max_rand_coeff))
return arr
| 18.5
| 62
| 0.67027
| 29
| 185
| 4
| 0.586207
| 0.12931
| 0.137931
| 0.206897
| 0.293103
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027778
| 0.221622
| 185
| 9
| 63
| 20.555556
| 0.777778
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14f4e5c0508ac0e7c058b30ed29a924fe01d7122
| 52
|
py
|
Python
|
target.py
|
devreplay/devreplay-usage-samples
|
91fd9cdbc9efc14654c14f12c7b847088178ea53
|
[
"MIT"
] | null | null | null |
target.py
|
devreplay/devreplay-usage-samples
|
91fd9cdbc9efc14654c14f12c7b847088178ea53
|
[
"MIT"
] | 13
|
2019-01-07T08:21:51.000Z
|
2020-09-20T05:32:04.000Z
|
target.py
|
devreplay/devreplay-usage-samples
|
91fd9cdbc9efc14654c14f12c7b847088178ea53
|
[
"MIT"
] | null | null | null |
a = 1
b = 2
c = 3
tmp=a
a=b
b=tmp
tmp=c
c=b
b=tmp
| 4.333333
| 5
| 0.5
| 18
| 52
| 1.444444
| 0.388889
| 0.153846
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 0.326923
| 52
| 11
| 6
| 4.727273
| 0.657143
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14fe2d0977055d16e6989bece223b041a6743651
| 44
|
py
|
Python
|
docs/django_settings.py
|
atten/django-docker-helpers
|
baf570151ca6a91f406d70a37be14988cca55640
|
[
"MIT"
] | 8
|
2017-08-03T00:37:28.000Z
|
2020-09-12T08:54:10.000Z
|
docs/django_settings.py
|
atten/django-docker-helpers
|
baf570151ca6a91f406d70a37be14988cca55640
|
[
"MIT"
] | 9
|
2019-09-26T06:37:39.000Z
|
2021-06-25T15:32:25.000Z
|
docs/django_settings.py
|
atten/django-docker-helpers
|
baf570151ca6a91f406d70a37be14988cca55640
|
[
"MIT"
] | 6
|
2017-10-11T06:05:18.000Z
|
2020-09-22T03:22:31.000Z
|
import os
DEBUG = True
SECRET_KEY = 'lol'
| 7.333333
| 18
| 0.681818
| 7
| 44
| 4.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 44
| 5
| 19
| 8.8
| 0.852941
| 0
| 0
| 0
| 0
| 0
| 0.068182
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0933d65b49394b4d261f5f8734a2e66e4c1a3402
| 103
|
py
|
Python
|
0192 Swap Characters to Equalize Strings.py
|
ansabgillani/binarysearchcomproblems
|
12fe8632f8cbb5058c91a55bae53afa813a3247e
|
[
"MIT"
] | 1
|
2020-12-29T21:17:26.000Z
|
2020-12-29T21:17:26.000Z
|
0192 Swap Characters to Equalize Strings.py
|
ansabgillani/binarysearchcomproblems
|
12fe8632f8cbb5058c91a55bae53afa813a3247e
|
[
"MIT"
] | null | null | null |
0192 Swap Characters to Equalize Strings.py
|
ansabgillani/binarysearchcomproblems
|
12fe8632f8cbb5058c91a55bae53afa813a3247e
|
[
"MIT"
] | 4
|
2021-09-09T17:42:43.000Z
|
2022-03-18T04:54:03.000Z
|
class Solution:
def solve(self, s, t):
return all(x%2 == 0 for x in Counter(s+t).values())
| 25.75
| 59
| 0.582524
| 19
| 103
| 3.157895
| 0.842105
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025974
| 0.252427
| 103
| 3
| 60
| 34.333333
| 0.753247
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
095048a70bc50dd344723dfcf2b1311dd3ea3307
| 253
|
py
|
Python
|
code/assign_beads.py
|
ziyueyang37/CG-martini-nmr
|
bae9a1e1e8613d4761b52b57f4bfe446f961b1ce
|
[
"MIT"
] | null | null | null |
code/assign_beads.py
|
ziyueyang37/CG-martini-nmr
|
bae9a1e1e8613d4761b52b57f4bfe446f961b1ce
|
[
"MIT"
] | null | null | null |
code/assign_beads.py
|
ziyueyang37/CG-martini-nmr
|
bae9a1e1e8613d4761b52b57f4bfe446f961b1ce
|
[
"MIT"
] | null | null | null |
import MDAnalysis as mda
u_itp = mda.Universe('../itpfiles/1A2P.itp', topology_format='ITP')
u_pdb = mda.Universe('../mtn/1A2P_CG.pdb')
print(u_itp.atoms.types)
print(len(u_itp.atoms.types))
print(u_pdb.atoms.types)
print(len(u_pdb.atoms.types))
| 31.625
| 68
| 0.731225
| 44
| 253
| 4.022727
| 0.409091
| 0.225989
| 0.254237
| 0.158192
| 0.338983
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017316
| 0.086957
| 253
| 8
| 69
| 31.625
| 0.748918
| 0
| 0
| 0
| 0
| 0
| 0.165992
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
1188619cc5e779620a452d68b6624a8c5817244a
| 238
|
py
|
Python
|
jobtracker/views.py
|
tommyyong93/TrackMyJobs
|
d3092853607ae02b0c781b1764a3bd60292e4f19
|
[
"MIT"
] | null | null | null |
jobtracker/views.py
|
tommyyong93/TrackMyJobs
|
d3092853607ae02b0c781b1764a3bd60292e4f19
|
[
"MIT"
] | 6
|
2021-03-19T08:23:24.000Z
|
2022-03-12T00:36:28.000Z
|
jobtracker/views.py
|
tommyyong93/TrackMyJobs
|
d3092853607ae02b0c781b1764a3bd60292e4f19
|
[
"MIT"
] | null | null | null |
from django.views.generic import TemplateView
class HomePage(TemplateView):
template_name = 'index.html'
class LogOut(TemplateView):
template_name = 'logout.html'
class AboutPage(TemplateView):
template_name = 'about.html'
| 21.636364
| 45
| 0.760504
| 27
| 238
| 6.592593
| 0.555556
| 0.337079
| 0.404494
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 238
| 10
| 46
| 23.8
| 0.872549
| 0
| 0
| 0
| 0
| 0
| 0.130252
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
1193b16fdae413378d3c47542c2beea820aa3d0a
| 194
|
py
|
Python
|
example/project/admin.py
|
morlandi/django-tables-cleaner
|
247e8bf04af3232bddbf00ebc6129ec22b88c22b
|
[
"MIT"
] | 10
|
2019-01-19T06:52:20.000Z
|
2022-03-21T01:19:56.000Z
|
example/project/admin.py
|
morlandi/django-tables-cleaner
|
247e8bf04af3232bddbf00ebc6129ec22b88c22b
|
[
"MIT"
] | 12
|
2020-05-06T13:36:03.000Z
|
2021-09-22T19:35:21.000Z
|
example/project/admin.py
|
morlandi/django-tables-cleaner
|
247e8bf04af3232bddbf00ebc6129ec22b88c22b
|
[
"MIT"
] | 3
|
2020-05-06T12:14:18.000Z
|
2021-12-01T00:00:22.000Z
|
from django.contrib import admin
from .models import Sample
@admin.register(Sample)
class SampleAdmin(admin.ModelAdmin):
date_hierarchy = 'created'
list_display = ['id', 'created', ]
| 19.4
| 38
| 0.731959
| 23
| 194
| 6.086957
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 194
| 9
| 39
| 21.555556
| 0.853659
| 0
| 0
| 0
| 0
| 0
| 0.082902
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1197703e7c4be94ff6cf48d1430e9177ef52e511
| 63
|
py
|
Python
|
division/division.py
|
sel613/fiz-team
|
8f20b0240a97e3310ce7c5c94797952ef75c0ce3
|
[
"MIT"
] | null | null | null |
division/division.py
|
sel613/fiz-team
|
8f20b0240a97e3310ce7c5c94797952ef75c0ce3
|
[
"MIT"
] | null | null | null |
division/division.py
|
sel613/fiz-team
|
8f20b0240a97e3310ce7c5c94797952ef75c0ce3
|
[
"MIT"
] | null | null | null |
a=25
b=5
print("division is ",(a/b))
print("division success")
| 12.6
| 27
| 0.666667
| 12
| 63
| 3.5
| 0.666667
| 0.619048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053571
| 0.111111
| 63
| 4
| 28
| 15.75
| 0.696429
| 0
| 0
| 0
| 0
| 0
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
11ad9ca0339729e5b251fdf403317619f7f1342e
| 214
|
py
|
Python
|
sources/models.py
|
vorushin/FamilyFeed
|
0dd5a0926fda9965b8a0b3091f3117a67bb0f16d
|
[
"MIT"
] | null | null | null |
sources/models.py
|
vorushin/FamilyFeed
|
0dd5a0926fda9965b8a0b3091f3117a67bb0f16d
|
[
"MIT"
] | null | null | null |
sources/models.py
|
vorushin/FamilyFeed
|
0dd5a0926fda9965b8a0b3091f3117a67bb0f16d
|
[
"MIT"
] | null | null | null |
from django.db import models
from jsonfield import JSONField
class FacebookPost(models.Model):
access_token = models.CharField(max_length=100)
data = JSONField()
created_time = models.DateTimeField()
| 23.777778
| 51
| 0.766355
| 26
| 214
| 6.192308
| 0.730769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016575
| 0.154206
| 214
| 8
| 52
| 26.75
| 0.872928
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
11c2070fdbab83685f28faa4a20ae1f3eec74631
| 91
|
py
|
Python
|
user_group/apps.py
|
Xena89/bp-master
|
139af619dd9f2d230e6a7e25c66582e8fd2a131e
|
[
"MIT"
] | 3
|
2019-06-07T13:39:39.000Z
|
2021-01-21T20:42:43.000Z
|
user_group/apps.py
|
Xena89/bp-master
|
139af619dd9f2d230e6a7e25c66582e8fd2a131e
|
[
"MIT"
] | 32
|
2019-04-26T10:41:32.000Z
|
2021-06-08T04:09:27.000Z
|
user_group/apps.py
|
Xena89/bp-master
|
139af619dd9f2d230e6a7e25c66582e8fd2a131e
|
[
"MIT"
] | 2
|
2019-08-15T08:00:26.000Z
|
2021-06-11T08:11:10.000Z
|
from django.apps import AppConfig
class GroupsConfig(AppConfig):
name = 'user_group'
| 15.166667
| 33
| 0.758242
| 11
| 91
| 6.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0.10989
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
11f901c5bed60edd5291cc18578521278ca5cbd6
| 1,583
|
py
|
Python
|
pytmcapi/test/test_plans__executables_api.py
|
mverrilli/tmc-api-clients
|
0d2752a4c2f43b19da9714072d03c15dccf2619a
|
[
"Apache-2.0"
] | null | null | null |
pytmcapi/test/test_plans__executables_api.py
|
mverrilli/tmc-api-clients
|
0d2752a4c2f43b19da9714072d03c15dccf2619a
|
[
"Apache-2.0"
] | null | null | null |
pytmcapi/test/test_plans__executables_api.py
|
mverrilli/tmc-api-clients
|
0d2752a4c2f43b19da9714072d03c15dccf2619a
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""
Talend Management Console Public API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.api.plans__executables_api import PlansExecutablesApi # noqa: E501
from swagger_client.rest import ApiException
class TestPlansExecutablesApi(unittest.TestCase):
"""PlansExecutablesApi unit test stubs"""
def setUp(self):
self.api = swagger_client.api.plans__executables_api.PlansExecutablesApi() # noqa: E501
def tearDown(self):
pass
def test_configure_plan_execution(self):
"""Test case for configure_plan_execution
Configure Plan execution # noqa: E501
"""
pass
def test_create_plan(self):
"""Test case for create_plan
Create Plan # noqa: E501
"""
pass
def test_get_available_plans(self):
"""Test case for get_available_plans
Get available Plans # noqa: E501
"""
pass
def test_get_executable_details(self):
"""Test case for get_executable_details
Get Plan details # noqa: E501
"""
pass
def test_get_plan_configuration(self):
"""Test case for get_plan_configuration
Get Plan configuration # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 22.614286
| 119
| 0.666456
| 184
| 1,583
| 5.483696
| 0.336957
| 0.063429
| 0.054509
| 0.074331
| 0.282458
| 0.210109
| 0.075322
| 0
| 0
| 0
| 0
| 0.022862
| 0.253948
| 1,583
| 69
| 120
| 22.942029
| 0.831499
| 0.419457
| 0
| 0.272727
| 1
| 0
| 0.010336
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0.272727
| 0.227273
| 0
| 0.590909
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
eebda91392303cf4b30bd0fb26851ac5c76a0072
| 3,357
|
py
|
Python
|
packages/pyright-scip/snapshots/output/unique/property_access.py
|
sourcegraph/pyright
|
f6a94a47f7e61172fd108ee9a4c62f748e1d24af
|
[
"MIT"
] | null | null | null |
packages/pyright-scip/snapshots/output/unique/property_access.py
|
sourcegraph/pyright
|
f6a94a47f7e61172fd108ee9a4c62f748e1d24af
|
[
"MIT"
] | 19
|
2022-03-17T03:20:34.000Z
|
2022-03-31T02:53:12.000Z
|
packages/pyright-scip/snapshots/output/unique/property_access.py
|
sourcegraph/pyright
|
f6a94a47f7e61172fd108ee9a4c62f748e1d24af
|
[
"MIT"
] | null | null | null |
# < definition scip-python pypi snapshot-util 0.1 property_access/__init__:
#documentation (module) property_access
from typing import Sequence
# ^^^^^^ reference snapshot-util 0.1 typing/__init__:
# ^^^^^^^^ reference snapshot-util 0.1 typing/Sequence#
# documentation ```python
# > (class) Sequence
# > ```
class PropertyClass:
# ^^^^^^^^^^^^^ definition snapshot-util 0.1 property_access/PropertyClass#
# documentation ```python
# > class PropertyClass:
# > ```
def __init__(self):
# ^^^^^^^^ definition snapshot-util 0.1 property_access/PropertyClass#__init__().
# documentation ```python
# > def __init__(
# > self
# > ) -> None:
# > ```
# ^^^^ definition snapshot-util 0.1 property_access/PropertyClass#__init__().(self)
pass
@property
# ^^^^^^^^ reference python-stdlib 3.10 builtins/property#
# documentation ```python
# > (class) property
# > ```
def prop_ref(self):
# ^^^^^^^^ definition snapshot-util 0.1 property_access/PropertyClass#prop_ref().
# documentation ```python
# > @property
# > def prop_ref(
# > self
# > ): # -> Literal[5]:
# > ```
# ^^^^ definition snapshot-util 0.1 property_access/PropertyClass#prop_ref().(self)
return 5
xs = [PropertyClass()]
#^ definition snapshot-util 0.1 property_access/xs.
#documentation ```python
# > builtins.list
# > ```
# ^^^^^^^^^^^^^ reference snapshot-util 0.1 property_access/PropertyClass#
def usage(xs: Sequence[PropertyClass]):
# ^^^^^ definition snapshot-util 0.1 property_access/usage().
# documentation ```python
# > def usage(
# > xs: Sequence[PropertyClass]
# > ): # -> None:
# > ```
# ^^ definition snapshot-util 0.1 property_access/usage().(xs)
# ^^^^^^^^ reference snapshot-util 0.1 typing/Sequence#
# ^^^^^^^^^^^^^ reference snapshot-util 0.1 property_access/PropertyClass#
def nested():
# ^^^^^^ definition snapshot-util 0.1 property_access/usage().nested().
# documentation ```python
# > def nested(): # -> None:
# > ```
for x in xs:
# ^ definition local 0
# ^^ reference snapshot-util 0.1 property_access/usage().(xs)
print(x.prop_ref)
# ^^^^^ reference python-stdlib 3.10 builtins/__init__:print().
# documentation ```python
# > (function)
# > print(*values: object, sep: str | None = ..., end: str | None = ..., file: SupportsWrite[str] | None = ..., flush: Literal[False] = ...) -> None
# >
# > print(*values: object, sep: str | None = ..., end: str | None = ..., file: _SupportsWriteAndFlush[str] | None = ..., flush: bool) -> None
# > ```
# ^ reference local 0
# ^^^^^^^^ reference snapshot-util 0.1 property_access/PropertyClass#prop_ref().
| 42.493671
| 170
| 0.498957
| 288
| 3,357
| 5.642361
| 0.1875
| 0.125538
| 0.136
| 0.146462
| 0.671385
| 0.618462
| 0.539077
| 0.493538
| 0.324923
| 0.121846
| 0
| 0.020082
| 0.347334
| 3,357
| 78
| 171
| 43.038462
| 0.721588
| 0.876973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.083333
| 0.083333
| 0.083333
| 0.583333
| 0.083333
| 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
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
eec62893cf6811e8622989798777c2dff36e3f42
| 173
|
py
|
Python
|
src/setup.py
|
tokudaek/epidspread
|
5129ee9fe1f7ed69118b14290b1a3d19a79977c5
|
[
"MIT"
] | null | null | null |
src/setup.py
|
tokudaek/epidspread
|
5129ee9fe1f7ed69118b14290b1a3d19a79977c5
|
[
"MIT"
] | null | null | null |
src/setup.py
|
tokudaek/epidspread
|
5129ee9fe1f7ed69118b14290b1a3d19a79977c5
|
[
"MIT"
] | null | null | null |
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("src/optimized.pyx", compiler_directives={'language_level' : "3"})
)
| 24.714286
| 94
| 0.763006
| 22
| 173
| 5.863636
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006579
| 0.121387
| 173
| 6
| 95
| 28.833333
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0.184971
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
eec84d77185cad7bc12e829c6e74c9e835c7e656
| 188
|
py
|
Python
|
src/test_sample.py
|
Jiezhi/myleetcode
|
b346e94c46da2a3033ebc8ff50e621aa179c4f62
|
[
"MIT"
] | 1
|
2022-03-03T15:11:48.000Z
|
2022-03-03T15:11:48.000Z
|
src/test_sample.py
|
Jiezhi/myleetcode
|
b346e94c46da2a3033ebc8ff50e621aa179c4f62
|
[
"MIT"
] | null | null | null |
src/test_sample.py
|
Jiezhi/myleetcode
|
b346e94c46da2a3033ebc8ff50e621aa179c4f62
|
[
"MIT"
] | 2
|
2022-01-20T22:49:58.000Z
|
2022-01-20T22:53:13.000Z
|
#!/usr/bin/env python
"""
Github: https://github.com/Jiezhi/myleetcode
Created on 2019-03-25
Leetcode:
"""
def func(x):
return x + 1
def test_answer():
assert func(3) == 4
| 10.444444
| 44
| 0.62766
| 29
| 188
| 4.034483
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073333
| 0.202128
| 188
| 17
| 45
| 11.058824
| 0.706667
| 0.531915
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.5
| false
| 0
| 0
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
eee5eee07aeb8124fe03adb8ab2f2c8628503d7b
| 393
|
py
|
Python
|
vote.py
|
Reicher/RiksdagenPythonAPI
|
04133733bae2167295a7bc8f9989d4a94b4869d8
|
[
"Beerware"
] | 2
|
2020-06-29T06:12:24.000Z
|
2020-12-02T20:50:05.000Z
|
vote.py
|
Reicher/RiksdagenPythonAPI
|
04133733bae2167295a7bc8f9989d4a94b4869d8
|
[
"Beerware"
] | null | null | null |
vote.py
|
Reicher/RiksdagenPythonAPI
|
04133733bae2167295a7bc8f9989d4a94b4869d8
|
[
"Beerware"
] | null | null | null |
import riksdagen
class Vote:
def __init__(self, data):
self.data = data
self.namn = riksdagen.API.extract(data, 'namn')
#self.ja = API.extract(data, 'Ja')
#self.nej = API.extract(data, 'Nej')
#self.franfarande = API.extract(data, 'Frånvarande')
#self.avstar = API.extract(data, 'Avstår')
def print(self):
print(f'{self.namn}')
| 28.071429
| 60
| 0.590331
| 49
| 393
| 4.653061
| 0.387755
| 0.219298
| 0.307018
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.251908
| 393
| 14
| 61
| 28.071429
| 0.77551
| 0.407125
| 0
| 0
| 0
| 0
| 0.065217
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.571429
| 0.285714
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
eeed26b0a51332311913251c049a9e101ccc3bfa
| 294
|
py
|
Python
|
authentication/tests/set_up_methods.py
|
PeterStuck/teacher-app
|
e71c5b69019450a9ac8694fb461d343ce33e1b35
|
[
"CC0-1.0"
] | null | null | null |
authentication/tests/set_up_methods.py
|
PeterStuck/teacher-app
|
e71c5b69019450a9ac8694fb461d343ce33e1b35
|
[
"CC0-1.0"
] | null | null | null |
authentication/tests/set_up_methods.py
|
PeterStuck/teacher-app
|
e71c5b69019450a9ac8694fb461d343ce33e1b35
|
[
"CC0-1.0"
] | null | null | null |
from django.contrib.auth.models import User
def create_user() -> User:
user: User = User.objects.create_user(
username='test',
password='test',
email='test@test.com',
first_name='TEST',
last_name='TEST',
is_active=True
)
return user
| 22.615385
| 43
| 0.595238
| 36
| 294
| 4.722222
| 0.611111
| 0.188235
| 0.211765
| 0.188235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.278912
| 294
| 13
| 44
| 22.615385
| 0.801887
| 0
| 0
| 0
| 0
| 0
| 0.098305
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| true
| 0.090909
| 0.090909
| 0
| 0.272727
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
e12e2eae8f044f70be9552837b66c67b648de6fc
| 295
|
py
|
Python
|
config.py
|
SprayShadow/Reddit-commenter-bot
|
a1739fc4b83639350fb8c43043cdfd604779f451
|
[
"MIT"
] | null | null | null |
config.py
|
SprayShadow/Reddit-commenter-bot
|
a1739fc4b83639350fb8c43043cdfd604779f451
|
[
"MIT"
] | null | null | null |
config.py
|
SprayShadow/Reddit-commenter-bot
|
a1739fc4b83639350fb8c43043cdfd604779f451
|
[
"MIT"
] | null | null | null |
username ="username" #your reddit username
password = "password" #your reddit password
client_id = "personal use script" #your personal use script
client_secret = "secret" #your secret
| 59
| 78
| 0.488136
| 24
| 295
| 5.916667
| 0.416667
| 0.140845
| 0.239437
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.457627
| 295
| 4
| 79
| 73.75
| 0.8875
| 0.254237
| 0
| 0
| 0
| 0
| 0.193396
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.25
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
010bdc084ec763012dd99357111139bf71e938ed
| 96
|
py
|
Python
|
cms_plugins/apps.py
|
Fieryja/sodrugestvo
|
41b25cb2ce61ea2e32b620ae0e2edcd1a87f373d
|
[
"MIT"
] | null | null | null |
cms_plugins/apps.py
|
Fieryja/sodrugestvo
|
41b25cb2ce61ea2e32b620ae0e2edcd1a87f373d
|
[
"MIT"
] | null | null | null |
cms_plugins/apps.py
|
Fieryja/sodrugestvo
|
41b25cb2ce61ea2e32b620ae0e2edcd1a87f373d
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CmsPluginsConfig(AppConfig):
name = 'cms_plugins'
| 16
| 34
| 0.770833
| 11
| 96
| 6.636364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 35
| 19.2
| 0.901235
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
01623b6ac7c423b3e033ba536d9e56a325ace94d
| 92
|
py
|
Python
|
2014/12/state-outbreak-preparedness/graphic_config.py
|
nprapps/graphics-archive
|
97b0ef326b46a959df930f5522d325e537f7a655
|
[
"FSFAP"
] | 14
|
2015-05-08T13:41:51.000Z
|
2021-02-24T12:34:55.000Z
|
2014/12/state-outbreak-preparedness/graphic_config.py
|
nprapps/graphics-archive
|
97b0ef326b46a959df930f5522d325e537f7a655
|
[
"FSFAP"
] | null | null | null |
2014/12/state-outbreak-preparedness/graphic_config.py
|
nprapps/graphics-archive
|
97b0ef326b46a959df930f5522d325e537f7a655
|
[
"FSFAP"
] | 7
|
2015-04-04T04:45:54.000Z
|
2021-02-18T11:12:48.000Z
|
#!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1exAtJogmunF-R70TvaWDUeSI_l3hBNGAQqIlfiz7uP8'
| 23
| 68
| 0.836957
| 11
| 92
| 6.636364
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069767
| 0.065217
| 92
| 3
| 69
| 30.666667
| 0.77907
| 0.217391
| 0
| 0
| 0
| 0
| 0.619718
| 0.619718
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
017d6313507e002d150799923101154966badf52
| 1,690
|
py
|
Python
|
src/releases/signal_handlers.py
|
mizamae/DIY4dot0
|
2ca594ffcdb8b26da1e0ac7ed9984df64a97db58
|
[
"MIT"
] | null | null | null |
src/releases/signal_handlers.py
|
mizamae/DIY4dot0
|
2ca594ffcdb8b26da1e0ac7ed9984df64a97db58
|
[
"MIT"
] | null | null | null |
src/releases/signal_handlers.py
|
mizamae/DIY4dot0
|
2ca594ffcdb8b26da1e0ac7ed9984df64a97db58
|
[
"MIT"
] | null | null | null |
import logging
logger = logging.getLogger("project")
def Device_datagram_reception_handler(sender, **kwargs):
timestamp=kwargs['timestamp']
deviceName=kwargs['DeviceName']
datagramID=kwargs['DatagramId']
values=kwargs['values']
print("SIGNALS: The device "+ deviceName+" responded OK to the datagram " + str(datagramID)+" with values= "+str(values))
def Device_datagram_exception_handler(sender, **kwargs):
deviceName=kwargs['DeviceName']
datagramID=kwargs['DatagramId']
HTMLCode=kwargs['HTMLCode']
print("SIGNALS: The device "+ deviceName+" responded to the datagram " + str(datagramID)+" with the code "+str(HTMLCode))
logger.error("SIGNALS: The device "+ deviceName+" responded to the datagram " + str(datagramID)+" with the code "+str(HTMLCode))
def Device_datagram_timeout_handler(sender, **kwargs):
deviceIP=kwargs['DeviceIP']
deviceName=kwargs['DeviceName']
datagramID=kwargs['DatagramId']
print("SIGNALS: The device "+ deviceName+" at "+ deviceIP +" did not respond to the datagram " + str(datagramID))
logger.warning ("SIGNALS: The device "+ deviceName+" at "+ deviceIP +" did not respond to the datagram " + str(datagramID))
def Device_datagram_format_error_handler(sender, **kwargs):
deviceName=kwargs['DeviceName']
datagramID=kwargs['DatagramId']
values=kwargs['values']
print("SIGNALS: The device "+ deviceName+" responded with a wrong format to the datagram " + str(datagramID)+" with values= "+str(values))
logger.warning("SIGNALS: The device "+ deviceName+" responded with a wrong format to the datagram " + str(datagramID)+" with values= "+str(values))
| 56.333333
| 151
| 0.706509
| 193
| 1,690
| 6.119171
| 0.196891
| 0.059272
| 0.094835
| 0.154107
| 0.775614
| 0.77138
| 0.701101
| 0.701101
| 0.701101
| 0.586791
| 0
| 0
| 0.161538
| 1,690
| 30
| 151
| 56.333333
| 0.833451
| 0
| 0
| 0.384615
| 0
| 0
| 0.353791
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0
| 0.038462
| 0
| 0.192308
| 0.153846
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6d77e8286338982c7de2ea916b8dbd64b83184fa
| 467
|
py
|
Python
|
simple_cli_args/__init__.py
|
zellerede/simple-cli-args
|
3ea1138cc14c9e791f60ceb48ffff634fcd2b25c
|
[
"MIT"
] | 3
|
2019-04-30T23:29:57.000Z
|
2021-04-26T15:13:42.000Z
|
simple_cli_args/__init__.py
|
zellerede/simple-cli-args
|
3ea1138cc14c9e791f60ceb48ffff634fcd2b25c
|
[
"MIT"
] | null | null | null |
simple_cli_args/__init__.py
|
zellerede/simple-cli-args
|
3ea1138cc14c9e791f60ceb48ffff634fcd2b25c
|
[
"MIT"
] | null | null | null |
"""
Usage example:
my_script.py:
#!/usr/bin/env python
from simple_cli_args import cli_args
@cli_args
def main(arg1, arg2, defarg1="def1", defarg2="def2", *otherargs, **kwargs)
# use the arguments as strings
print(arg1, arg2, defarg1, defarg2, otherargs, kwargs)
if __name__ == '__main__':
# note the empty argument list -> this invokes reading the cli arguments
main()
"""
from .cli_args import cli_args
| 22.238095
| 80
| 0.646681
| 61
| 467
| 4.704918
| 0.639344
| 0.121951
| 0.090592
| 0.111498
| 0.139373
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028409
| 0.246253
| 467
| 20
| 81
| 23.35
| 0.786932
| 0.90364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6d8412ad0da63e23e94ad1b4a4d38be7ce7c0f79
| 102
|
py
|
Python
|
myapp/ules/__init__.py
|
CaoJohn/myproject
|
31474a2cecf4694d50acd9c594f26f241fd41048
|
[
"Apache-2.0"
] | null | null | null |
myapp/ules/__init__.py
|
CaoJohn/myproject
|
31474a2cecf4694d50acd9c594f26f241fd41048
|
[
"Apache-2.0"
] | null | null | null |
myapp/ules/__init__.py
|
CaoJohn/myproject
|
31474a2cecf4694d50acd9c594f26f241fd41048
|
[
"Apache-2.0"
] | null | null | null |
#!/anaconda3/bin/python3.6
# coding=utf-8
if __name__ == "__main__":
print("suppliermgr package")
| 20.4
| 32
| 0.696078
| 13
| 102
| 4.846154
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044944
| 0.127451
| 102
| 5
| 32
| 20.4
| 0.662921
| 0.372549
| 0
| 0
| 0
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6d86c6a3e0a729f9a875ce5f1e20d6ab2707add1
| 189
|
py
|
Python
|
src/edrn.rdf/edrn/rdf/tests/__init__.py
|
EDRN/DMCCBackend
|
bae6b00bb0733daec927f08b989d62126e3a4f16
|
[
"Apache-2.0"
] | null | null | null |
src/edrn.rdf/edrn/rdf/tests/__init__.py
|
EDRN/DMCCBackend
|
bae6b00bb0733daec927f08b989d62126e3a4f16
|
[
"Apache-2.0"
] | 13
|
2020-01-14T23:34:49.000Z
|
2021-06-09T21:50:22.000Z
|
src/edrn.rdf/edrn/rdf/tests/__init__.py
|
EDRN/CancerDataExpo
|
21b5e8c90186e05bda840ee1bf51acc34583c153
|
[
"Apache-2.0"
] | null | null | null |
# encoding: utf-8
# Copyright 2008 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
'''
EDRN RDF Service: unit and functional tests.
'''
| 27
| 63
| 0.761905
| 24
| 189
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030864
| 0.142857
| 189
| 7
| 64
| 27
| 0.858025
| 0.925926
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6d928cb5cd52bb854817785ae392fcb7dd1a50d7
| 923
|
py
|
Python
|
tests/test_event.py
|
jleopold28/eds
|
7a1f61ec1d595ea39c73c4c0096127cbe83be862
|
[
"Apache-2.0"
] | 3
|
2021-05-20T10:53:56.000Z
|
2021-12-06T13:21:15.000Z
|
tests/test_event.py
|
jleopold28/eds
|
7a1f61ec1d595ea39c73c4c0096127cbe83be862
|
[
"Apache-2.0"
] | 27
|
2021-06-05T03:21:28.000Z
|
2021-09-22T19:15:27.000Z
|
tests/test_event.py
|
jleopold28/eds
|
7a1f61ec1d595ea39c73c4c0096127cbe83be862
|
[
"Apache-2.0"
] | 3
|
2021-05-16T18:49:55.000Z
|
2021-07-09T15:07:21.000Z
|
from eds.event import Event
def test_eds_built_property():
e = Event(True, False, 'url', 'project_name', 'project_version')
assert e.eds_built
e = Event(False, True, 'url', 'project_name', 'project_version')
assert not e.eds_built
def test_eds_plugins_built_property():
e = Event(False, True, 'url', 'project_name', 'project_version')
assert e.eds_plugins_built
e = Event(True, False, 'url', 'project_name', 'project_version')
assert not e.eds_plugins_built
def test_url_property():
e = Event(False, True, 'url', 'project_name', 'project_version')
assert e.url == 'url'
def test_project_name_property():
e = Event(False, True, 'url', 'project_name', 'project_version')
assert e.project_name == 'project_name'
def test_project_version_property():
e = Event(False, True, 'url', 'project_name', 'project_version')
assert e.project_version == 'project_version'
| 29.774194
| 68
| 0.699892
| 129
| 923
| 4.705426
| 0.139535
| 0.181219
| 0.237232
| 0.242175
| 0.682043
| 0.682043
| 0.682043
| 0.682043
| 0.670511
| 0.647446
| 0
| 0
| 0.163597
| 923
| 30
| 69
| 30.766667
| 0.786269
| 0
| 0
| 0.35
| 0
| 0
| 0.260022
| 0
| 0
| 0
| 0
| 0
| 0.35
| 1
| 0.25
| false
| 0
| 0.05
| 0
| 0.3
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6d93b0d1e53a2817c40b7ffebb483f158c411469
| 134
|
py
|
Python
|
Basic/add1.py
|
jatiinyadav/Python
|
4ba8df06780c9543d00b6b9f96e32fbcb5fd5aa4
|
[
"MIT"
] | null | null | null |
Basic/add1.py
|
jatiinyadav/Python
|
4ba8df06780c9543d00b6b9f96e32fbcb5fd5aa4
|
[
"MIT"
] | null | null | null |
Basic/add1.py
|
jatiinyadav/Python
|
4ba8df06780c9543d00b6b9f96e32fbcb5fd5aa4
|
[
"MIT"
] | null | null | null |
one = int(input("Enter 1st no : "))
two = int(input("Enter 2nd no : "))
print("The sum of {} and {} is: ".format(one,two), one + two)
| 33.5
| 61
| 0.58209
| 23
| 134
| 3.391304
| 0.652174
| 0.205128
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018349
| 0.186567
| 134
| 4
| 61
| 33.5
| 0.697248
| 0
| 0
| 0
| 0
| 0
| 0.407407
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6d9eafd307e4bc8f26691e43043140c81a1c9778
| 133
|
py
|
Python
|
5_Test_Opencart/tests/test_first.py
|
turovod/Otus
|
57433c6944bca155177b07ff361139ff30f7f692
|
[
"MIT"
] | null | null | null |
5_Test_Opencart/tests/test_first.py
|
turovod/Otus
|
57433c6944bca155177b07ff361139ff30f7f692
|
[
"MIT"
] | null | null | null |
5_Test_Opencart/tests/test_first.py
|
turovod/Otus
|
57433c6944bca155177b07ff361139ff30f7f692
|
[
"MIT"
] | null | null | null |
def test_first(setup_teardown):
text_logo = setup_teardown.find_element_by_id('logo').text
assert text_logo == 'Your Store'
| 26.6
| 62
| 0.75188
| 20
| 133
| 4.6
| 0.7
| 0.282609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 133
| 4
| 63
| 33.25
| 0.807018
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0966452a9e216a2cf32a4a26dcd181a7aab48088
| 101
|
py
|
Python
|
vidispine/typing.py
|
newmediaresearch/vidispine-adapter
|
95d5b1956c3767ff9ff0626048f52628d5322cab
|
[
"MIT"
] | null | null | null |
vidispine/typing.py
|
newmediaresearch/vidispine-adapter
|
95d5b1956c3767ff9ff0626048f52628d5322cab
|
[
"MIT"
] | 1
|
2021-03-16T11:02:59.000Z
|
2021-03-16T11:02:59.000Z
|
vidispine/typing.py
|
newmediaresearch/vidispine-adapter
|
95d5b1956c3767ff9ff0626048f52628d5322cab
|
[
"MIT"
] | null | null | null |
from typing import Any, Dict, Union
BaseJson = Dict[str, Any]
ClientResponse = Union[BaseJson, str]
| 20.2
| 37
| 0.752475
| 14
| 101
| 5.428571
| 0.642857
| 0.342105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148515
| 101
| 4
| 38
| 25.25
| 0.883721
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0989dfec926b0ab3dabd3088b077a1c087b08beb
| 37
|
py
|
Python
|
data/studio21_generated/introductory/3416/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3416/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3416/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def total_kilometers(cons, petrol):
| 18.5
| 35
| 0.783784
| 5
| 37
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 37
| 2
| 36
| 18.5
| 0.848485
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
098ea9172c4cb3fe748516b3fedd6c23772cd684
| 334
|
py
|
Python
|
backend/env/lib/python3.8/site-packages/gevent/tests/test__getaddrinfo_import.py
|
lubitelpospat/CFM-source
|
4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03
|
[
"MIT"
] | 10
|
2021-03-23T03:46:19.000Z
|
2022-03-08T07:20:25.000Z
|
backend/env/lib/python3.8/site-packages/gevent/tests/test__getaddrinfo_import.py
|
lubitelpospat/CFM-source
|
4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03
|
[
"MIT"
] | 7
|
2021-05-21T16:51:48.000Z
|
2022-03-12T00:50:26.000Z
|
backend/env/lib/python3.8/site-packages/gevent/tests/test__getaddrinfo_import.py
|
lubitelpospat/CFM-source
|
4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03
|
[
"MIT"
] | 4
|
2021-04-21T00:49:34.000Z
|
2021-11-21T09:18:29.000Z
|
# a deadlock is possible if we import a module that runs Gevent's getaddrinfo
# with a unicode hostname, which starts Python's getaddrinfo on a thread, which
# attempts to import encodings.idna but blocks on the import lock. verify
# that Gevent avoids this deadlock.
import getaddrinfo_module
del getaddrinfo_module # fix pyflakes
| 41.75
| 79
| 0.802395
| 52
| 334
| 5.115385
| 0.673077
| 0.090226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161677
| 334
| 7
| 80
| 47.714286
| 0.95
| 0.814371
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
09edffbf7cf98bad0a44eb96462e6032c2de439f
| 226
|
py
|
Python
|
tclambda/__init__.py
|
trustcruit/tclambda
|
4413944243257d36088805d8e2f97b0d8b56b87d
|
[
"MIT"
] | null | null | null |
tclambda/__init__.py
|
trustcruit/tclambda
|
4413944243257d36088805d8e2f97b0d8b56b87d
|
[
"MIT"
] | 613
|
2019-06-05T10:49:01.000Z
|
2021-08-03T03:23:18.000Z
|
tclambda/__init__.py
|
trustcruit/tclambda
|
4413944243257d36088805d8e2f97b0d8b56b87d
|
[
"MIT"
] | null | null | null |
"""AWS Lambda Library"""
from .exceptions import RetryException
from .function import LambdaFunction
from .handlers import LambdaHandler
__version__ = "0.0.12"
__all__ = ("LambdaFunction", "LambdaHandler", "RetryException")
| 25.111111
| 63
| 0.778761
| 23
| 226
| 7.304348
| 0.652174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019901
| 0.110619
| 226
| 8
| 64
| 28.25
| 0.81592
| 0.079646
| 0
| 0
| 0
| 0
| 0.232673
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 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
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
61d1af25406009cac09c48cc36befb799325e8bb
| 75
|
py
|
Python
|
docs/components_page/components/progress/progress.py
|
imrehg/dash-bootstrap-components
|
7cf43168808bb88b243e414168dc3bf196fefd84
|
[
"Apache-2.0"
] | 776
|
2019-02-07T19:36:59.000Z
|
2022-03-31T05:53:04.000Z
|
docs/components_page/components/progress/progress.py
|
imrehg/dash-bootstrap-components
|
7cf43168808bb88b243e414168dc3bf196fefd84
|
[
"Apache-2.0"
] | 350
|
2019-02-05T10:42:19.000Z
|
2022-03-31T19:23:35.000Z
|
docs/components_page/components/progress/progress.py
|
imrehg/dash-bootstrap-components
|
7cf43168808bb88b243e414168dc3bf196fefd84
|
[
"Apache-2.0"
] | 219
|
2019-02-10T13:46:25.000Z
|
2022-03-23T17:03:39.000Z
|
import dash_bootstrap_components as dbc
progress = dbc.Progress(value=50)
| 18.75
| 39
| 0.826667
| 11
| 75
| 5.454545
| 0.818182
| 0.366667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029851
| 0.106667
| 75
| 3
| 40
| 25
| 0.865672
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
61d6f547416f010e7bd62d2a1084ed5f294a4bfa
| 402
|
py
|
Python
|
models/svm_ova.py
|
pralab/secml-zoo
|
ba9ca3c0fb25883dccdb718d1b4db9b6ecad4360
|
[
"Apache-2.0"
] | 2
|
2021-06-04T10:29:21.000Z
|
2021-06-05T22:35:43.000Z
|
models/svm_ova.py
|
pralab/secml-zoo
|
ba9ca3c0fb25883dccdb718d1b4db9b6ecad4360
|
[
"Apache-2.0"
] | null | null | null |
models/svm_ova.py
|
pralab/secml-zoo
|
ba9ca3c0fb25883dccdb718d1b4db9b6ecad4360
|
[
"Apache-2.0"
] | null | null | null |
"""
.. module:: SVM-OVA
:synopsis: Multiclass (One-vs-All) Linear Support Vector Machine
.. moduleauthor:: Marco Melis <marco.melis@unica.it>
"""
from secml.ml.classifiers import CClassifierSVM
from secml.ml.classifiers.multiclass import CClassifierMulticlassOVA
def svm_ova():
"""Multiclass (One-vs-All) Linear Support Vector Machine."""
return CClassifierMulticlassOVA(CClassifierSVM)
| 26.8
| 68
| 0.758706
| 46
| 402
| 6.608696
| 0.565217
| 0.039474
| 0.098684
| 0.118421
| 0.289474
| 0.289474
| 0.289474
| 0.289474
| 0
| 0
| 0
| 0
| 0.124378
| 402
| 14
| 69
| 28.714286
| 0.863636
| 0.487562
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
113e54acddb6af60eac00ac67e5831705b328485
| 147
|
py
|
Python
|
week_06/age.py
|
DaviNakamuraCardoso/cs50
|
2081abb6fa1131184b07a68ed3b07d538c3ba3dd
|
[
"MIT"
] | 2
|
2020-08-05T23:27:24.000Z
|
2020-08-12T01:52:29.000Z
|
week_06/age.py
|
DaviNakamuraCardoso/cs50
|
2081abb6fa1131184b07a68ed3b07d538c3ba3dd
|
[
"MIT"
] | null | null | null |
week_06/age.py
|
DaviNakamuraCardoso/cs50
|
2081abb6fa1131184b07a68ed3b07d538c3ba3dd
|
[
"MIT"
] | 1
|
2020-08-07T04:50:09.000Z
|
2020-08-07T04:50:09.000Z
|
age = int(input("What's your age?\n"))
print("You are at least " + str(age*365) + " days old.")
## Or
print(f"You are at least {age*365} days old")
| 36.75
| 56
| 0.62585
| 29
| 147
| 3.172414
| 0.62069
| 0.130435
| 0.173913
| 0.282609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.163265
| 147
| 4
| 57
| 36.75
| 0.699187
| 0.013605
| 0
| 0
| 0
| 0
| 0.559441
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
114518697bdb1382f4b81647fbc237a79212138b
| 49
|
py
|
Python
|
001146StepikPyBegin/Stepik001146PyBeginсh09p03st07TASK06_20210127.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001146StepikPyBegin/Stepik001146PyBeginсh09p03st07TASK06_20210127.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001146StepikPyBegin/Stepik001146PyBeginсh09p03st07TASK06_20210127.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
s = 'i LEARN Python LAnguaGE'
print(s.swapcase())
| 24.5
| 29
| 0.714286
| 8
| 49
| 4.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 49
| 2
| 30
| 24.5
| 0.813953
| 0
| 0
| 0
| 0
| 0
| 0.46
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
fed03e130447a64dbd6113d9440a5b96f4e2cd14
| 70
|
py
|
Python
|
test/integration/__init__.py
|
pcrama/rikiki
|
3948cc403112dd125390cfcc549ffb3a4400a9ce
|
[
"BSD-2-Clause"
] | null | null | null |
test/integration/__init__.py
|
pcrama/rikiki
|
3948cc403112dd125390cfcc549ffb3a4400a9ce
|
[
"BSD-2-Clause"
] | null | null | null |
test/integration/__init__.py
|
pcrama/rikiki
|
3948cc403112dd125390cfcc549ffb3a4400a9ce
|
[
"BSD-2-Clause"
] | null | null | null |
"""Module with integration tests, mainly using Selenium webdriver."""
| 35
| 69
| 0.771429
| 8
| 70
| 6.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 70
| 1
| 70
| 70
| 0.870968
| 0.9
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fee7298b0367b5d28aa1aeba5d7cdf34141e1e52
| 2,586
|
py
|
Python
|
portafolio/parametros/admin.py
|
breinerGiraldo/python
|
89603d7ce0be8e2bb20817ee3c845fdb26a1b54a
|
[
"bzip2-1.0.6"
] | null | null | null |
portafolio/parametros/admin.py
|
breinerGiraldo/python
|
89603d7ce0be8e2bb20817ee3c845fdb26a1b54a
|
[
"bzip2-1.0.6"
] | null | null | null |
portafolio/parametros/admin.py
|
breinerGiraldo/python
|
89603d7ce0be8e2bb20817ee3c845fdb26a1b54a
|
[
"bzip2-1.0.6"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from. models import Etnia
from. models import TipoDocu
from. models import EstaCivil
from. models import TipoEstu
from. models import TipoLogr
admin.site.register(Etnia)
admin.site.register(TipoDocu)
admin.site.register(EstaCivil)
admin.site.register(TipoEstu)
admin.site.register(TipoLogr)
# class EtniaModelAdmin(admin.ModelAdmin):
# #indicamos que columnas queremos ver(en este caso solo mostramos el nombre ya que no tenemos otras)
# list_display=["NombreEtni"]
# #indicamos que columna hacemos clic para editar
# #list_display_links=[NombreEtni]
# #agregamos una barra de busqueda
# search_fields=["NombreEtni"]
# #podemos agrgar un filtro
# list_filter=["NombreEtni"]
# #indicamos desde donde se optinen los datos
# class Meta:
# model=Etnia
# admin.site.register(Etnia)
#estado civil
# class EstaCivilModelAdmin(admin.ModelAdmin):
# #indicamos que columnas queremos ver(en este caso solo mostramos el nombre ya que no tenemos otras)
# list_display=["NombreEsta"]
# #indicamos que columna hacemos clic para editar
# #list_display_links=[NombreEtni]
# #agregamos una barra de busqueda
# search_fields=["NombreEsta"]
# #podemos agrgar un filtro
# list_filter=["NombreEsta"]
# #indicamos desde donde se optinen los datos
# class Meta:
# model=EstaCivil
# admin.site.register(EstaCivil)
# #tipo de documento
# class TipoDocuModelAdmin(admin.ModelAdmin):
# #indicamos que columnas queremos ver(en este caso solo mostramos el nombre ya que no tenemos otras)
# list_display=["NombreTiDo"]
# #indicamos que columna hacemos clic para editar
# #list_display_links=[NombreEtni]
# #agregamos una barra de busqueda
# search_fields=["NombreTiDo"]
# #podemos agrgar un filtro
# list_filter=["NombreTiDo"]
# #indicamos desde donde se optinen los datos
# class Meta:
# model=TipoDocu
# admin.site.register(TipoDocu)
# #tipo de logro
# class TipoLogrModelAdmin(admin.ModelAdmin):
# #indicamos que columnas queremos ver(en este caso solo mostramos el nombre ya que no tenemos otras)
# list_display=["NombreTiLo"]
# #indicamos que columna hacemos clic para editar
# #list_display_links=[NombreEtni]
# #agregamos una barra de busqueda
# search_fields=["NombreTiLo"]
# #podemos agrgar un filtro
# list_filter=["NombreTiLo"]
# #indicamos desde donde se optinen los datos
# class Meta:
# model=TipoLogr
# admin.site.register(TipoLogr)
| 32.734177
| 105
| 0.718484
| 317
| 2,586
| 5.798107
| 0.233438
| 0.04407
| 0.083243
| 0.05876
| 0.63765
| 0.63765
| 0.570185
| 0.570185
| 0.570185
| 0.570185
| 0
| 0
| 0.192962
| 2,586
| 79
| 106
| 32.734177
| 0.88069
| 0.815159
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.545455
| 0
| 0.545455
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fef936e9831128b2eb1cd2c8ddc71d22170fe0ad
| 615
|
py
|
Python
|
healthdes/ResourceBase.py
|
DiaAzul/healthdes
|
a87476e67260d91ea4fa7b224e2d9b31b1e9fff0
|
[
"BSD-3-Clause"
] | 1
|
2020-11-14T02:38:42.000Z
|
2020-11-14T02:38:42.000Z
|
healthdes/ResourceBase.py
|
DiaAzul/healthdes
|
a87476e67260d91ea4fa7b224e2d9b31b1e9fff0
|
[
"BSD-3-Clause"
] | null | null | null |
healthdes/ResourceBase.py
|
DiaAzul/healthdes
|
a87476e67260d91ea4fa7b224e2d9b31b1e9fff0
|
[
"BSD-3-Clause"
] | null | null | null |
""" HealthDES - A python library to support discrete event simulation in health and social care """
class ResourceBase:
# TODO: Build out the do and query functions for person, activity and resource objects.
# Need to create dictionary of actions and parameters.
# Subclassing allows dictionary of actions/ activities to be extended.
# Need to provide error checking if actions/ parameters not in dictionary.
def do(self, action, **kwargs):
""" Perform an action on the person """
pass
def query(self, param):
""" Get a parameter from the person."""
pass
| 36.176471
| 99
| 0.686179
| 81
| 615
| 5.209877
| 0.691358
| 0.028436
| 0.090047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.242276
| 615
| 16
| 100
| 38.4375
| 0.905579
| 0.715447
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0
| 1
| 0.4
| false
| 0.4
| 0
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
fefab18e3ff623067c54de60204c072f60331217
| 90
|
py
|
Python
|
test/test_script.py
|
philippschmalen/ESG-trending-topics-radar
|
e17b93382a9d8bd9362db69f4296b2918f7ad9ff
|
[
"MIT"
] | 1
|
2021-04-10T17:35:28.000Z
|
2021-04-10T17:35:28.000Z
|
test/test_script.py
|
philippschmalen/ESG-trending-topics-radar
|
e17b93382a9d8bd9362db69f4296b2918f7ad9ff
|
[
"MIT"
] | null | null | null |
test/test_script.py
|
philippschmalen/ESG-trending-topics-radar
|
e17b93382a9d8bd9362db69f4296b2918f7ad9ff
|
[
"MIT"
] | null | null | null |
from datetime import datetime
datetime.strptime("20210424-040000UTC", "%Y%m%d-%H%M%S%Z")
| 22.5
| 58
| 0.733333
| 15
| 90
| 4.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168675
| 0.077778
| 90
| 3
| 59
| 30
| 0.626506
| 0
| 0
| 0
| 0
| 0
| 0.366667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
feffed0f9ef2718e56c7a6384fef4b2c80e520d2
| 441
|
py
|
Python
|
abb/hours/admin.py
|
mogul/abb
|
c5e5a2ce7491bc2a41636530108d8868148806e5
|
[
"CC0-1.0"
] | 1
|
2015-11-27T05:46:13.000Z
|
2015-11-27T05:46:13.000Z
|
abb/hours/admin.py
|
mogul/abb
|
c5e5a2ce7491bc2a41636530108d8868148806e5
|
[
"CC0-1.0"
] | 2
|
2015-03-16T18:17:26.000Z
|
2015-03-18T11:20:12.000Z
|
abb/hours/admin.py
|
mogul/abb
|
c5e5a2ce7491bc2a41636530108d8868148806e5
|
[
"CC0-1.0"
] | 5
|
2015-03-16T18:20:02.000Z
|
2021-02-15T09:59:46.000Z
|
from django.contrib import admin
# Register your models here.
from hours.models import Project, Record, ReportingPeriod, Timesheet
@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
pass
@admin.register(Timesheet)
class TimesheetAdmin(admin.ModelAdmin):
pass
@admin.register(Record)
class RecordAdmin(admin.ModelAdmin):
pass
@admin.register(ReportingPeriod)
class ReportingPeriodAdmin(admin.ModelAdmin):
pass
| 22.05
| 68
| 0.793651
| 49
| 441
| 7.142857
| 0.428571
| 0.185714
| 0.217143
| 0.205714
| 0.274286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117914
| 441
| 20
| 69
| 22.05
| 0.899743
| 0.058957
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.285714
| 0.142857
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
3a0cb37f38e6183c375336b7cba3da3dbf2d5788
| 101
|
py
|
Python
|
old_django_malliva/mallivaEmails/apps.py
|
olubiyiontheweb/malliva
|
b212e6b359eed54c92533f0a02afe3c0042150e2
|
[
"MIT"
] | null | null | null |
old_django_malliva/mallivaEmails/apps.py
|
olubiyiontheweb/malliva
|
b212e6b359eed54c92533f0a02afe3c0042150e2
|
[
"MIT"
] | null | null | null |
old_django_malliva/mallivaEmails/apps.py
|
olubiyiontheweb/malliva
|
b212e6b359eed54c92533f0a02afe3c0042150e2
|
[
"MIT"
] | 1
|
2021-07-19T12:15:52.000Z
|
2021-07-19T12:15:52.000Z
|
from django.apps import AppConfig
class MallivaemailsConfig(AppConfig):
name = 'mallivaEmails'
| 16.833333
| 37
| 0.782178
| 10
| 101
| 7.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148515
| 101
| 5
| 38
| 20.2
| 0.918605
| 0
| 0
| 0
| 0
| 0
| 0.128713
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3a30145ffb163baaa09f4b026f0ccbbd5d95300b
| 75
|
py
|
Python
|
src/typhoonae/channel/__init__.py
|
sprymak/typhoonae
|
fe31bcc7b21fc14f8aa97b36d66cd7671974543b
|
[
"Apache-2.0"
] | 1
|
2018-12-02T10:36:07.000Z
|
2018-12-02T10:36:07.000Z
|
src/typhoonae/channel/__init__.py
|
sprymak/typhoonae
|
fe31bcc7b21fc14f8aa97b36d66cd7671974543b
|
[
"Apache-2.0"
] | null | null | null |
src/typhoonae/channel/__init__.py
|
sprymak/typhoonae
|
fe31bcc7b21fc14f8aa97b36d66cd7671974543b
|
[
"Apache-2.0"
] | 1
|
2018-12-02T10:36:08.000Z
|
2018-12-02T10:36:08.000Z
|
"""This package contains TyphoonAE's implementation of the Channel API."""
| 37.5
| 74
| 0.773333
| 10
| 75
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 75
| 1
| 75
| 75
| 0.878788
| 0.906667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
28cc4d6565dcc995070bd439313b859083005f70
| 73
|
py
|
Python
|
pydis_site/apps/home/views/__init__.py
|
Robin5605/site
|
81aa42aa748cb228d7a09e6cf6b211484b654496
|
[
"MIT"
] | 700
|
2018-11-17T15:56:51.000Z
|
2022-03-30T22:53:17.000Z
|
pydis_site/apps/home/views/__init__.py
|
foxy4096/site
|
63b464b57ea0824570879f24baaaca6fd80393ee
|
[
"MIT"
] | 542
|
2018-11-17T13:39:42.000Z
|
2022-03-31T11:24:00.000Z
|
pydis_site/apps/home/views/__init__.py
|
foxy4096/site
|
63b464b57ea0824570879f24baaaca6fd80393ee
|
[
"MIT"
] | 178
|
2018-11-21T09:06:56.000Z
|
2022-03-31T07:43:28.000Z
|
from .home import HomeView, timeline
__all__ = ["HomeView", "timeline"]
| 18.25
| 36
| 0.726027
| 8
| 73
| 6.125
| 0.75
| 0.653061
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136986
| 73
| 3
| 37
| 24.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.219178
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
28f0ba7693d24bf57530d0bee8241def661eec54
| 3,273
|
py
|
Python
|
calculator.spec.py
|
junkboy0315/electricity-bill-calculator
|
7b51eb0c599824b673db7827825555804df34ffa
|
[
"MIT"
] | 1
|
2018-07-06T16:57:58.000Z
|
2018-07-06T16:57:58.000Z
|
calculator.spec.py
|
junkboy0315/electricity-bill-calculator
|
7b51eb0c599824b673db7827825555804df34ffa
|
[
"MIT"
] | null | null | null |
calculator.spec.py
|
junkboy0315/electricity-bill-calculator
|
7b51eb0c599824b673db7827825555804df34ffa
|
[
"MIT"
] | null | null | null |
import unittest
import calculator
class TestPriceCalculator(unittest.TestCase):
def test_get_price(self):
price_calculator = calculator.PriceCalculator()
# validation (check if vendor name is wrong)
self.assertRaises(ValueError, lambda: price_calculator.get_price('wrong vendor name', 0))
# validation (kWh must be >0)
self.assertRaises(ValueError, lambda: price_calculator.get_price('chuden', -1))
#validation (kWh must be int or float)
self.assertRaises(ValueError, lambda: price_calculator.get_price('chuden', 'wrong kWh'))
# chuden
self.assertEqual(price_calculator.get_price('chuden', 0), 331)
self.assertEqual(price_calculator.get_price('chuden', 20), 433)
self.assertEqual(price_calculator.get_price('chuden', 200), 4630)
self.assertEqual(price_calculator.get_price('chuden', 400), 10230)
# htb
self.assertEqual(price_calculator.get_price('htb', 0), 313)
self.assertEqual(price_calculator.get_price('htb', 20), 410)
self.assertEqual(price_calculator.get_price('htb', 200), 4388)
self.assertEqual(price_calculator.get_price('htb', 400), 9698)
# koyo
self.assertEqual(price_calculator.get_price('koyo', 0), 222)
self.assertEqual(price_calculator.get_price('koyo', 20), 323)
self.assertEqual(price_calculator.get_price('koyo', 200), 4317)
self.assertEqual(price_calculator.get_price('koyo', 400), 9487)
# sanix
self.assertEqual(price_calculator.get_price('sanix', 0), 6125)
self.assertEqual(price_calculator.get_price('sanix', 20), 6125)
self.assertEqual(price_calculator.get_price('sanix', 200), 6125)
self.assertEqual(price_calculator.get_price('sanix', 400), 9800)
# looop
self.assertEqual(price_calculator.get_price('looop', 0), 0)
self.assertEqual(price_calculator.get_price('looop', 20), 480)
self.assertEqual(price_calculator.get_price('looop', 200), 4800)
self.assertEqual(price_calculator.get_price('looop', 400), 9600)
# mitsuuroko
self.assertEqual(price_calculator.get_price('mitsuuroko', 0), 331)
self.assertEqual(price_calculator.get_price('mitsuuroko', 20), 443)
self.assertEqual(price_calculator.get_price('mitsuuroko', 200), 4613)
self.assertEqual(price_calculator.get_price('mitsuuroko', 400), 9602)
def test_get_price_list(self):
price_calculator = calculator.PriceCalculator()
target_vendors = ['chuden', 'htb', 'sanix', 'looop']
price_list = price_calculator.get_price_list(target_vendors, 100, 151, 10)
# returns `dict` type value
self.assertEqual(isinstance(price_list, dict), True)
# list contains right keys
self.assertEqual(price_list.keys(), {'kwh_at', 'chuden', 'htb', 'sanix', 'looop'})
# list contains right array
self.assertEqual(price_list['kwh_at'], [100, 110, 120, 130, 140, 150])
self.assertEqual(len(price_list['chuden']), 6)
self.assertEqual(len(price_list['htb']), 6)
self.assertEqual(len(price_list['sanix']), 6)
self.assertEqual(len(price_list['looop']), 6)
if __name__ == "__main__":
unittest.main()
| 43.64
| 97
| 0.679193
| 394
| 3,273
| 5.428934
| 0.215736
| 0.217391
| 0.235624
| 0.301075
| 0.673212
| 0.619448
| 0.580178
| 0.187938
| 0.057036
| 0
| 0
| 0.064857
| 0.189734
| 3,273
| 74
| 98
| 44.22973
| 0.741704
| 0.068133
| 0
| 0.044444
| 0
| 0
| 0.08133
| 0
| 0
| 0
| 0
| 0
| 0.755556
| 1
| 0.044444
| false
| 0
| 0.044444
| 0
| 0.111111
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
28f685de2a54d3ef6de9bdbaa65bea3935d191b9
| 222
|
py
|
Python
|
day05/mydjango/app7/dateview/displayTeachings.py
|
Vanessa-kriby/Python
|
1fbef67852fb362712fc48fa5c3c29eac68fe202
|
[
"Apache-2.0"
] | null | null | null |
day05/mydjango/app7/dateview/displayTeachings.py
|
Vanessa-kriby/Python
|
1fbef67852fb362712fc48fa5c3c29eac68fe202
|
[
"Apache-2.0"
] | null | null | null |
day05/mydjango/app7/dateview/displayTeachings.py
|
Vanessa-kriby/Python
|
1fbef67852fb362712fc48fa5c3c29eac68fe202
|
[
"Apache-2.0"
] | null | null | null |
from app1.models import *
from app1.util.utils import *
def displayTeachings(request):
'''
http://127.0.0.1:8000/app7/displayTeachings
'''
result=Teaching.objects.values()
return showJsonresult(result)
| 24.666667
| 47
| 0.702703
| 27
| 222
| 5.777778
| 0.777778
| 0.102564
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069892
| 0.162162
| 222
| 9
| 48
| 24.666667
| 0.768817
| 0.193694
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
28f6a0362583935f9f60739746ec7459985898c3
| 8,222
|
py
|
Python
|
tests/app/account/test_account_views.py
|
fndmiranda/saas-api
|
50d9bc896345406ad3bd4f4ac70af3185e3188ac
|
[
"MIT"
] | 5
|
2021-11-11T23:00:09.000Z
|
2021-12-02T11:31:39.000Z
|
tests/app/account/test_account_views.py
|
fndmiranda/saas-api
|
50d9bc896345406ad3bd4f4ac70af3185e3188ac
|
[
"MIT"
] | null | null | null |
tests/app/account/test_account_views.py
|
fndmiranda/saas-api
|
50d9bc896345406ad3bd4f4ac70af3185e3188ac
|
[
"MIT"
] | null | null | null |
from datetime import datetime
import pytest
from fastapi import status
from httpx import AsyncClient
from app.account.schemas import AccountCreate
from app.account.services.account import create
from app.auth.services import create_access_token
from app.database import async_session
from app.main import api_router
from app.user.models import User
from tests.app.address.factories import AddressFactory
from tests.app.user.factories import UserFactory
@pytest.mark.asyncio
@pytest.mark.parametrize("accept_legal_term", [False, True])
async def test_account_view_should_create_account_without_addresses(
client: AsyncClient, accept_legal_term
):
"""Test account view should create account without addresses."""
build = await UserFactory.build()
data = {
"name": build.name,
"email": build.email,
"accept_legal_term": accept_legal_term,
"nickname": build.nickname,
"document_number": build.document_number,
"password": "testpass",
"birthdate": str(build.birthdate),
}
response = await client.post(
api_router.url_path_for("create_account"), json=data
)
if accept_legal_term:
assert response.status_code == status.HTTP_201_CREATED
assert response.json()["id"] is not None
else:
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
@pytest.mark.asyncio
async def test_account_view_should_create_account_with_addresses(
client: AsyncClient,
):
"""Test account view should create account with addresses."""
address = await AddressFactory.build()
build = await UserFactory.build()
data = {
"name": build.name,
"email": build.email,
"accept_legal_term": build.accept_legal_term,
"nickname": build.nickname,
"document_number": build.document_number,
"password": "testpass",
"birthdate": str(build.birthdate),
"addresses": [
{
"name": address.name,
"is_default": address.is_default,
"street": address.street,
"neighborhood": address.neighborhood,
"city": address.city,
"postcode": address.postcode,
"state": address.state,
"number": address.number,
"complement": address.complement,
"lat": address.lat,
"lng": address.lng,
}
],
}
response = await client.post(
api_router.url_path_for("create_account"), json=data
)
assert response.status_code == status.HTTP_201_CREATED
assert response.json()["id"] is not None
@pytest.mark.asyncio
@pytest.mark.parametrize("accept_legal_term", [False, True])
async def test_account_view_should_create_simple_account(
client: AsyncClient, accept_legal_term
):
"""Test account view should create simple account."""
build = await UserFactory.build()
data = {
"name": build.name,
"email": build.email,
"nickname": build.nickname,
"accept_legal_term": accept_legal_term,
"password": "testpass",
}
response = await client.post(
api_router.url_path_for("create_account"), json=data
)
if accept_legal_term:
assert response.status_code == status.HTTP_201_CREATED
assert response.json()["id"] is not None
else:
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
@pytest.mark.asyncio
async def test_account_view_not_should_create_account_duplicate(
client: AsyncClient,
):
"""Test account view not should create account duplicate."""
build = await UserFactory.build()
data = {
"name": build.name,
"email": build.email,
"accept_legal_term": build.accept_legal_term,
"nickname": build.nickname,
"document_number": build.document_number,
"password": "testpass",
"birthdate": str(build.birthdate),
}
async with async_session() as session:
await create(session=session, account_in=AccountCreate(**data))
response = await client.post(
api_router.url_path_for("create_account"), json=data
)
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
@pytest.mark.asyncio
@pytest.mark.parametrize("email_verified_at", [None, datetime.now()])
async def test_account_view_should_get_account(
client: AsyncClient, email_verified_at
):
"""Test account view should get account."""
user = await UserFactory.create(email_verified_at=email_verified_at)
token = await create_access_token(user=user)
response = await client.get(
api_router.url_path_for("get_account"),
headers={"Authorization": f"Bearer {token['access_token']}"},
)
if email_verified_at:
assert response.status_code == status.HTTP_200_OK
assert response.json()["id"] is not None
else:
assert response.status_code == status.HTTP_403_FORBIDDEN
@pytest.mark.asyncio
@pytest.mark.parametrize("email_verified_at", [None, datetime.now()])
async def test_account_view_should_update_account(
client: AsyncClient, email_verified_at
):
"""Test account view should update account."""
user = await UserFactory.create(email_verified_at=email_verified_at)
token = await create_access_token(user=user)
build = await UserFactory.build()
data = {
"name": build.name,
"email": build.email,
"accept_legal_term": build.accept_legal_term,
"nickname": build.nickname,
"document_number": build.document_number,
"password": "testpass_update",
"birthdate": str(build.birthdate),
}
response = await client.put(
api_router.url_path_for("update_account"),
json=data,
headers={"Authorization": f"Bearer {token['access_token']}"},
)
if email_verified_at:
password = data["password"]
data.pop("password")
for field in data:
assert data[field] == response.json()[field]
data = {
"username": data["email"],
"password": password,
"grant_type": "password",
}
response_token = await client.post(
api_router.url_path_for("create_token"), data=data
)
assert response.status_code == status.HTTP_200_OK
assert response_token.json()["access_token"] is not None
else:
assert response.status_code == status.HTTP_403_FORBIDDEN
@pytest.mark.asyncio
async def test_account_view_not_should_update_account_duplicate(
client: AsyncClient,
):
"""Test account view not should update account duplicate."""
user = await UserFactory.create()
owner = await UserFactory.create()
token = await create_access_token(user=owner)
data = {
"name": user.name,
"email": user.email,
"accept_legal_term": user.accept_legal_term,
"nickname": user.nickname,
"document_number": user.document_number,
"password": "testpass",
"birthdate": str(user.birthdate),
}
response = await client.put(
api_router.url_path_for("update_account"),
headers={"Authorization": f"Bearer {token['access_token']}"},
json=data,
)
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
@pytest.mark.asyncio
@pytest.mark.parametrize("email_verified_at", [None, datetime.now()])
async def test_account_view_should_delete_account(
client: AsyncClient, email_verified_at
):
"""Test account view should delete account."""
user = await UserFactory.create(email_verified_at=email_verified_at)
token = await create_access_token(user=user)
response = await client.delete(
api_router.url_path_for("update_account"),
headers={"Authorization": f"Bearer {token['access_token']}"},
)
if email_verified_at:
async with async_session() as session:
user = await session.get(User, user.id)
await session.commit()
assert response.status_code == status.HTTP_204_NO_CONTENT
assert user is None
else:
assert response.status_code == status.HTTP_403_FORBIDDEN
| 31.745174
| 75
| 0.668694
| 951
| 8,222
| 5.538381
| 0.121977
| 0.037593
| 0.051263
| 0.059237
| 0.778052
| 0.771217
| 0.728118
| 0.719195
| 0.68483
| 0.655591
| 0
| 0.006115
| 0.224276
| 8,222
| 258
| 76
| 31.868217
| 0.819693
| 0
| 0
| 0.613527
| 0
| 0
| 0.123251
| 0.011812
| 0
| 0
| 0
| 0
| 0.096618
| 1
| 0
| false
| 0.048309
| 0.057971
| 0
| 0.057971
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e925e9c9e97645a8c51897603bd24b4e24713140
| 141
|
py
|
Python
|
datakualitatif.py
|
rhbekti/Pemrograman-lanjut
|
f62cf6fe1ea851474204cf4acb307749ceb175ac
|
[
"MIT"
] | null | null | null |
datakualitatif.py
|
rhbekti/Pemrograman-lanjut
|
f62cf6fe1ea851474204cf4acb307749ceb175ac
|
[
"MIT"
] | null | null | null |
datakualitatif.py
|
rhbekti/Pemrograman-lanjut
|
f62cf6fe1ea851474204cf4acb307749ceb175ac
|
[
"MIT"
] | null | null | null |
#data kualitatif
a = "the dogis hungry. The cat is bored. the snack is awake."
s = a.split(".")
print(s)
print(s[0])
print(s[1])
print(s[2])
| 17.625
| 61
| 0.64539
| 28
| 141
| 3.25
| 0.607143
| 0.263736
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02521
| 0.156028
| 141
| 7
| 62
| 20.142857
| 0.739496
| 0.106383
| 0
| 0
| 0
| 0
| 0.448
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
3a6af20433e258a35b8105795f84d31f29beceb3
| 383
|
py
|
Python
|
v2.5.7/toontown/classicchars/DistributedWitchMinnieAI.py
|
TTOFFLINE-LEAK/ttoffline
|
bb0e91704a755d34983e94288d50288e46b68380
|
[
"MIT"
] | 4
|
2019-07-01T15:46:43.000Z
|
2021-07-23T16:26:48.000Z
|
v2.5.7/toontown/classicchars/DistributedWitchMinnieAI.py
|
TTOFFLINE-LEAK/ttoffline
|
bb0e91704a755d34983e94288d50288e46b68380
|
[
"MIT"
] | 1
|
2019-06-29T03:40:05.000Z
|
2021-06-13T01:15:16.000Z
|
v2.5.7/toontown/classicchars/DistributedWitchMinnieAI.py
|
TTOFFLINE-LEAK/ttoffline
|
bb0e91704a755d34983e94288d50288e46b68380
|
[
"MIT"
] | 4
|
2019-07-28T21:18:46.000Z
|
2021-02-25T06:37:25.000Z
|
from direct.directnotify import DirectNotifyGlobal
from toontown.classicchars.DistributedMickeyAI import DistributedMickeyAI
from toontown.toonbase import ToontownGlobals
class DistributedWitchMinnieAI(DistributedMickeyAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnieAI')
def walkSpeed(self):
return ToontownGlobals.WitchMinnieSpeed
| 42.555556
| 84
| 0.853786
| 30
| 383
| 10.9
| 0.633333
| 0.073395
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099217
| 383
| 9
| 85
| 42.555556
| 0.947826
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0.0625
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0.142857
| 1
| 0
| 0
| 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
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 4
|
3a7c43d87ac759570096ed51fcc51298867bb7e8
| 114
|
py
|
Python
|
VirtualPianoBot.py
|
Keenonthedaywalker/VirtualPianoPlayer
|
bb9c29fcd4d451e09246665b50f10fe59034cdc6
|
[
"MIT"
] | null | null | null |
VirtualPianoBot.py
|
Keenonthedaywalker/VirtualPianoPlayer
|
bb9c29fcd4d451e09246665b50f10fe59034cdc6
|
[
"MIT"
] | null | null | null |
VirtualPianoBot.py
|
Keenonthedaywalker/VirtualPianoPlayer
|
bb9c29fcd4d451e09246665b50f10fe59034cdc6
|
[
"MIT"
] | null | null | null |
from PianoKeys import *
from PianoSongs import *
import pyautogui
time.sleep(1)
Songs.londonBridge()
| 11.4
| 25
| 0.710526
| 13
| 114
| 6.230769
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011236
| 0.219298
| 114
| 9
| 26
| 12.666667
| 0.898876
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3ab18e386d3f60e767c9bc08b82ee7675c646b1f
| 436
|
py
|
Python
|
Simulation/utils.py
|
AlexWorldD/NetEmbs
|
ea3dc5769e2feb728dac8f21ec677a9807def3df
|
[
"Apache-2.0"
] | 1
|
2021-09-02T16:47:27.000Z
|
2021-09-02T16:47:27.000Z
|
Simulation/utils.py
|
AlexWorldD/NetEmbs
|
ea3dc5769e2feb728dac8f21ec677a9807def3df
|
[
"Apache-2.0"
] | null | null | null |
Simulation/utils.py
|
AlexWorldD/NetEmbs
|
ea3dc5769e2feb728dac8f21ec677a9807def3df
|
[
"Apache-2.0"
] | 1
|
2019-12-25T08:38:55.000Z
|
2019-12-25T08:38:55.000Z
|
# encoding: utf-8
__author__ = 'Aleksei Maliutin'
"""
utils.py
Created by lex at 2019-03-24.
"""
import random
import string
def randomString(stringLength=10):
"""Generate a random string of fixed length """
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(stringLength))
def getNoisyFAs(prefix="Noisy", N=1000):
return [prefix + "FA_" + randomString(4) for _ in range(int(N))]
| 21.8
| 71
| 0.701835
| 60
| 436
| 4.983333
| 0.75
| 0.046823
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043956
| 0.165138
| 436
| 19
| 72
| 22.947368
| 0.777473
| 0.133028
| 0
| 0
| 1
| 0
| 0.07362
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.125
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3ad5efc4ed535aedf7963d5403a204be24a6839b
| 97
|
py
|
Python
|
src/0_test_corpus/00_get_media_ids.py
|
benlevyx/opinion-vs-fact
|
5063adc16e37b0b47cb6b55494866c31133281d4
|
[
"MIT"
] | null | null | null |
src/0_test_corpus/00_get_media_ids.py
|
benlevyx/opinion-vs-fact
|
5063adc16e37b0b47cb6b55494866c31133281d4
|
[
"MIT"
] | 1
|
2021-06-02T00:59:17.000Z
|
2021-06-02T00:59:17.000Z
|
src/0_test_corpus/00_get_media_ids.py
|
benlevyx/opinion-vs-fact
|
5063adc16e37b0b47cb6b55494866c31133281d4
|
[
"MIT"
] | null | null | null |
from opinion import api
if __name__ == '__main__':
api.download_media_ids('all_media.csv')
| 16.166667
| 43
| 0.731959
| 14
| 97
| 4.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 97
| 5
| 44
| 19.4
| 0.731707
| 0
| 0
| 0
| 0
| 0
| 0.216495
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3aefaef0fe9b7493379caef0a0fbe9853cd2206a
| 64
|
py
|
Python
|
tests/test_eventloop.py
|
bryvogel/cgm-clock
|
62ace6ee312e6232282eeaaa69c01d261cfa3a52
|
[
"Apache-2.0"
] | 7
|
2015-02-11T12:36:25.000Z
|
2021-06-12T21:16:23.000Z
|
tests/test_eventloop.py
|
bryvogel/cgm-clock
|
62ace6ee312e6232282eeaaa69c01d261cfa3a52
|
[
"Apache-2.0"
] | 30
|
2015-03-03T03:15:33.000Z
|
2019-01-16T05:14:11.000Z
|
tests/test_eventloop.py
|
bryvogel/cgm-clock
|
62ace6ee312e6232282eeaaa69c01d261cfa3a52
|
[
"Apache-2.0"
] | 5
|
2016-01-06T16:54:26.000Z
|
2022-01-08T13:07:12.000Z
|
#!/bin/python
import time
while True:
time.sleep(1)
| 9.142857
| 18
| 0.59375
| 9
| 64
| 4.222222
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021739
| 0.28125
| 64
| 6
| 19
| 10.666667
| 0.804348
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
aae60be0a50d78f5246c81681598604426557005
| 484
|
py
|
Python
|
gvm/language/syntax.py
|
alurin/gvm
|
03feca42c2ab56f26a7167b4a07213ce5c0fbdb4
|
[
"MIT"
] | null | null | null |
gvm/language/syntax.py
|
alurin/gvm
|
03feca42c2ab56f26a7167b4a07213ce5c0fbdb4
|
[
"MIT"
] | null | null | null |
gvm/language/syntax.py
|
alurin/gvm
|
03feca42c2ab56f26a7167b4a07213ce5c0fbdb4
|
[
"MIT"
] | null | null | null |
# Copyright (C) 2019-2020 Vasiliy Sheredeko
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from __future__ import annotations
from typing import TYPE_CHECKING
import attr
from gvm.locations import Location
if TYPE_CHECKING:
from gvm.language.grammar import TokenID
@attr.dataclass
class SyntaxToken:
id: TokenID
value: str
location: Location
@attr.dataclass
class SyntaxNode:
pass
| 17.925926
| 63
| 0.768595
| 66
| 484
| 5.545455
| 0.69697
| 0.065574
| 0.098361
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020305
| 0.18595
| 484
| 26
| 64
| 18.615385
| 0.908629
| 0.32438
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.071429
| 0.357143
| 0
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
c92be117d59f31e5768c76e7dcd048430aa4bfbe
| 270
|
py
|
Python
|
src/hks_pylib/errors/cryptography/__init__.py
|
huykingsofm/hks_pylib
|
d73a896a395df301ef8082a358ec8e23f7bc708a
|
[
"MIT"
] | 2
|
2021-04-06T07:01:27.000Z
|
2021-07-30T11:08:59.000Z
|
src/hks_pylib/errors/cryptography/__init__.py
|
huykingsofm/hks_pylib
|
d73a896a395df301ef8082a358ec8e23f7bc708a
|
[
"MIT"
] | null | null | null |
src/hks_pylib/errors/cryptography/__init__.py
|
huykingsofm/hks_pylib
|
d73a896a395df301ef8082a358ec8e23f7bc708a
|
[
"MIT"
] | null | null | null |
from hks_pylib.errors import HKSPylibError
class CryptographyError(HKSPylibError):
"The exception is raised by failures in cryptography modules."
class ResetError(CryptographyError):
"The exception is raised when a cipher/protocol/hashes uses without reset."
| 30
| 79
| 0.803704
| 33
| 270
| 6.545455
| 0.787879
| 0.111111
| 0.12963
| 0.185185
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140741
| 270
| 9
| 79
| 30
| 0.931034
| 0.496296
| 0
| 0
| 0
| 0
| 0.490775
| 0.081181
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c967944b4c622a75fc63e9a4c92bdc97c3d3d9a0
| 65
|
py
|
Python
|
flask_now/templates/blueprints/project/blueprints/index/forms.py
|
Trapez/flask-now
|
5a072dc97e1c6631170cb0f691841e60152b12a4
|
[
"BSD-3-Clause"
] | 69
|
2018-02-20T06:30:06.000Z
|
2022-03-28T07:29:25.000Z
|
flask_now/templates/blueprints/project/blueprints/index/forms.py
|
Trapez/flask-now
|
5a072dc97e1c6631170cb0f691841e60152b12a4
|
[
"BSD-3-Clause"
] | 6
|
2019-07-15T11:01:00.000Z
|
2019-11-01T11:11:25.000Z
|
flask_now/templates/blueprints/project/blueprints/index/forms.py
|
Trapez/flask-now
|
5a072dc97e1c6631170cb0f691841e60152b12a4
|
[
"BSD-3-Clause"
] | 17
|
2018-02-20T12:34:49.000Z
|
2021-01-23T14:16:52.000Z
|
# Create your forms inside this file and import from controller
| 21.666667
| 63
| 0.8
| 10
| 65
| 5.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184615
| 65
| 2
| 64
| 32.5
| 0.981132
| 0.938462
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c972b152bfdc5e9beee125fa97dc5e3e5b54e812
| 208
|
py
|
Python
|
accounts/models.py
|
josedante/backbone
|
e6bfa2748f5b8013e69bce3fc2c0c4cd91252c34
|
[
"MIT"
] | null | null | null |
accounts/models.py
|
josedante/backbone
|
e6bfa2748f5b8013e69bce3fc2c0c4cd91252c34
|
[
"MIT"
] | 2
|
2020-06-05T17:29:50.000Z
|
2021-03-19T21:55:23.000Z
|
world/models.py
|
josedante/backbone
|
e6bfa2748f5b8013e69bce3fc2c0c4cd91252c34
|
[
"MIT"
] | null | null | null |
# backbone_django_package v0: The Foundation for a Truly Digital Business
# (c) 2018 José Sáenz
# MIT License
# https://github.com/josedante/backbone
from django.db import models
# Create your models here.
| 23.111111
| 73
| 0.774038
| 31
| 208
| 5.129032
| 0.903226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028249
| 0.149038
| 208
| 8
| 74
| 26
| 0.870057
| 0.798077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a31bcdde9aff87771fbba8c88366b382343496f0
| 58
|
py
|
Python
|
v2/keypresser.py
|
denfed/ACDriver
|
b70a0d3677df2a797a1dd377af4aca6b1837a114
|
[
"MIT"
] | 11
|
2018-12-15T00:18:17.000Z
|
2021-11-12T18:44:23.000Z
|
v2/keypresser.py
|
denfed/ACDriver
|
b70a0d3677df2a797a1dd377af4aca6b1837a114
|
[
"MIT"
] | null | null | null |
v2/keypresser.py
|
denfed/ACDriver
|
b70a0d3677df2a797a1dd377af4aca6b1837a114
|
[
"MIT"
] | 1
|
2019-12-31T05:09:16.000Z
|
2019-12-31T05:09:16.000Z
|
from .directkeys import PressKey, ReleaseKey, W, A, S, D
| 19.333333
| 56
| 0.724138
| 9
| 58
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 58
| 2
| 57
| 29
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a33a3fd2ea86eae4acfe0129037b1f3965607ce9
| 27,462
|
py
|
Python
|
optimization/first_sdEta_mjj_optimization/tight_analysis_sdeta_3.6_mjj_1250/Output/Histos/MadAnalysis5job_0/selection_2.py
|
sheride/axion_pheno
|
7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5
|
[
"MIT"
] | null | null | null |
optimization/first_sdEta_mjj_optimization/tight_analysis_sdeta_3.6_mjj_1250/Output/Histos/MadAnalysis5job_0/selection_2.py
|
sheride/axion_pheno
|
7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5
|
[
"MIT"
] | null | null | null |
optimization/first_sdEta_mjj_optimization/tight_analysis_sdeta_3.6_mjj_1250/Output/Histos/MadAnalysis5job_0/selection_2.py
|
sheride/axion_pheno
|
7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5
|
[
"MIT"
] | null | null | null |
def selection_2():
# Library import
import numpy
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
# Library version
matplotlib_version = matplotlib.__version__
numpy_version = numpy.__version__
# Histo binning
xBinning = numpy.linspace(-3.2,3.2,65,endpoint=True)
# Creating data sequence: middle of each bin
xData = numpy.array([-3.15,-3.05,-2.95,-2.85,-2.75,-2.65,-2.55,-2.45,-2.35,-2.25,-2.15,-2.05,-1.95,-1.85,-1.75,-1.65,-1.55,-1.45,-1.35,-1.25,-1.15,-1.05,-0.95,-0.85,-0.75,-0.65,-0.55,-0.45,-0.35,-0.25,-0.15,-0.05,0.05,0.15,0.25,0.35,0.45,0.55,0.65,0.75,0.85,0.95,1.05,1.15,1.25,1.35,1.45,1.55,1.65,1.75,1.85,1.95,2.05,2.15,2.25,2.35,2.45,2.55,2.65,2.75,2.85,2.95,3.05,3.15])
# Creating weights for histo: y3_PHI_0
y3_PHI_0_weights = numpy.array([5.35506342972,12.7080371543,12.9577769412,13.3508086058,13.1624807665,13.2402687001,13.0928808259,12.9291169657,13.0150928923,12.8881770006,12.454205371,13.0069048993,12.8840810041,12.7121291508,13.0887848294,12.7981050775,12.843141039,12.9782449237,13.1215408014,12.9373049587,12.7899170845,13.1624807665,13.1215408014,13.3262446267,12.9618689377,13.4163125499,13.2893966582,12.6711891858,12.4337333884,12.3805094339,12.8554250285,13.3630885953,13.0601288538,12.802201074,13.2893966582,13.3057726442,12.834953046,13.1174448049,13.2607366826,13.0805968364,12.9536809447,12.9004569901,13.0887848294,12.8963649936,13.2075167281,13.0396568713,12.7571651124,12.4255453954,12.7039411578,12.5483692906,13.1256327979,13.1215408014,13.1706687595,12.9414009552,13.1297287944,12.6015892452,12.8963649936,12.9332129622,12.7285051369,12.8595170251,13.2525486896,12.5729332696,13.1379167875,5.52701528297])
# Creating weights for histo: y3_PHI_1
y3_PHI_1_weights = numpy.array([1.15414565601,3.35357580488,2.89148601339,3.29232663113,3.17050077049,3.2924383785,3.36532289663,2.75821025293,3.08589719759,3.47501755898,3.2440269348,3.16009104242,2.96464969968,3.27958582891,3.51138111425,3.49917501718,3.2436548441,3.49914137281,3.14661967675,3.14712674546,3.23207557367,3.32847510276,3.14746038546,3.02544667708,3.03790350481,3.11011793925,3.24437819804,3.21917496069,3.12230160674,3.34193845787,3.74245905357,3.31741571794,2.86795458078,3.01273551395,3.54816522414,3.49912975749,3.02539981528,3.55978254474,3.34106690849,3.42701064877,3.25673249055,3.34144821134,3.46271453408,3.31704803305,3.51207242593,3.48772391578,3.3423834447,2.8070742935,3.25650018419,3.46255632544,3.17092132511,3.24476791198,3.36558724525,3.26837784813,3.28147231676,2.92910482406,3.6930639126,2.9280786708,3.11045999034,3.14726012135,3.34102204933,3.49802910598,3.0864042663,1.19062576499])
# Creating weights for histo: y3_PHI_2
y3_PHI_2_weights = numpy.array([6.23516406848,15.2112042187,15.2104067257,16.1042311196,15.8036464959,15.331249645,14.6376083958,15.1310417077,15.4523859425,15.5122640326,14.7982185319,14.4878863121,15.5110450666,15.0105624122,15.1399174332,14.7992432897,14.8194822577,14.7176593404,15.0105458838,14.6683428678,15.5817946807,14.6986930556,15.452687585,15.1807920496,15.1404050196,16.2349290693,14.8598899482,15.9433565299,15.9033827087,14.7278573341,14.8489564428,14.6887884402,15.6226321083,15.3621122117,14.8396675086,15.2805902437,15.5735015797,15.0297766223,15.2092580052,15.0708123902,14.7594140916,15.3410633545,14.7080728958,14.3168178608,14.909590705,15.090435677,15.5318336023,14.8896120586,14.9491926383,14.5593053245,14.979819676,15.3619675886,14.8283827757,15.3312661733,15.3713970139,14.3375196226,15.2206501723,15.1703337344,15.3510754041,15.2006260729,15.0692008758,15.0700603501,15.0103392794,6.6964290738])
# Creating weights for histo: y3_PHI_3
y3_PHI_3_weights = numpy.array([7.92073918815,18.277204508,18.239699173,18.5691830535,18.4971624102,18.4144572965,18.0140780952,18.5354599398,18.0081061668,18.1563968664,18.3379394255,17.7216607957,17.9196322515,18.3816441909,18.3282746517,18.1628766118,18.3658693625,17.9918153963,18.5358580684,18.2288481386,17.8664211512,18.3107448076,18.0304419913,17.9979579512,18.2946449763,18.3716584767,18.2112045435,17.6834323292,18.2564855729,18.3871489276,18.6287317105,18.1842577403,18.2894368048,18.0176043767,18.9206818182,18.2397113606,18.5968408006,18.0901937751,18.1235065726,18.2398372992,17.7547826541,18.1575506267,18.1895877879,19.1298008737,18.3044844392,18.4203520366,18.7514974945,18.3429647829,17.6015072224,18.3983452776,18.6355405213,18.0035805014,18.0633729105,18.1008335576,18.5632680007,18.1123670981,18.4552532859,18.5578404522,18.4268399071,18.3480998288,18.2830261225,18.0422924097,18.1399679697,7.73959069507])
# Creating weights for histo: y3_PHI_4
y3_PHI_4_weights = numpy.array([1.77930731379,4.28784501467,4.49701023915,4.31637210017,4.41314453591,4.42212714075,4.46863546912,4.36884478195,4.45170840968,4.44770010766,4.36881271554,4.37863305549,4.32632070579,4.40120380419,4.36188636964,4.37862503889,4.28986119058,4.3530881467,4.2899012736,4.2690901695,4.17342803341,4.33928355453,4.4230129755,4.30366578275,4.32839299793,4.31750244134,4.40526822244,4.29282332578,4.41120050943,4.39039742193,4.41418268614,4.41024252525,4.32038441049,4.44667398234,4.38642519463,4.36979875783,4.27510262253,4.41011425958,4.34704362725,4.38274958167,4.4053884715,4.35399001465,4.48226770431,4.39352790581,4.25332150934,4.25222323459,4.30357359181,4.303761982,4.38351917566,4.26419603273,4.34895157901,4.31947051763,4.2425351686,4.40535640508,4.44473396416,4.34194506707,4.35202995497,4.4477802737,4.41522484466,4.32817254132,4.35095172172,4.24548928719,4.3225769517,1.73578036046])
# Creating weights for histo: y3_PHI_5
y3_PHI_5_weights = numpy.array([0.308791739303,0.745116662955,0.733771081623,0.75824828213,0.761048168513,0.751430210701,0.760015115263,0.757242035451,0.745624387422,0.737330754265,0.774928771298,0.745894853726,0.773102723648,0.765532467824,0.767318505666,0.768071090159,0.769079737426,0.775156427107,0.785703412667,0.764791886273,0.749190061536,0.736839433819,0.760271978232,0.787981971248,0.748923596213,0.791526440163,0.782196953069,0.746148916009,0.753947627838,0.760035920363,0.756997575523,0.750693230033,0.754972279028,0.778650083566,0.764555428306,0.756487450467,0.751709879261,0.793059215918,0.751932333795,0.759301740382,0.769314194903,0.741380547059,0.775899809345,0.759015270154,0.751677071218,0.749913838968,0.764277360139,0.730797552672,0.766027789251,0.776388729202,0.774119372877,0.768834077203,0.754190887472,0.733309368435,0.769604266013,0.757504099696,0.779903190761,0.761268222458,0.755478403103,0.743604692301,0.786474401672,0.751954739288,0.749204465067,0.333994157594])
# Creating weights for histo: y3_PHI_6
y3_PHI_6_weights = numpy.array([0.0738900828975,0.196987551705,0.19608754753,0.209876915071,0.190693020669,0.177251538781,0.194665514941,0.188959990303,0.196129533729,0.199269901515,0.179827392118,0.184934213545,0.19153164502,0.19730774646,0.194945422937,0.189798714621,0.198968100714,0.184980698266,0.183266361755,0.194399702312,0.190938639936,0.190393519113,0.200128019458,0.191844342239,0.18718277446,0.19755046668,0.191275129335,0.194698803999,0.199307889028,0.193827090525,0.188668286184,0.195571917014,0.205807452672,0.183827577288,0.184656404859,0.20096974279,0.20073402027,0.188084078209,0.174906609541,0.186959547833,0.200146713313,0.189214906514,0.190372625981,0.202113866725,0.195834430727,0.200098529151,0.193805497622,0.186628856529,0.183850669698,0.198091788751,0.197006445495,0.194445887131,0.192986066963,0.198699688939,0.186973443266,0.188963189252,0.179788105031,0.183834375054,0.193281269932,0.19749028646,0.196680652581,0.180111098866,0.185257007445,0.0818637620105])
# Creating weights for histo: y3_PHI_7
y3_PHI_7_weights = numpy.array([0.00425328034778,0.0106696629942,0.0112083787868,0.0103470336424,0.0104525162791,0.0102590392474,0.0107097061644,0.0102096924835,0.0112500228456,0.0103228233447,0.0115080089844,0.0100624274913,0.00986499433688,0.0110161338526,0.00982478772519,0.0106261246902,0.0107092409847,0.00997914775527,0.0109213084406,0.0111003020399,0.010732629884,0.0105352554009,0.011036006664,0.010858467275,0.0108189772915,0.010622461924,0.0106879307262,0.0104933054131,0.011359985456,0.0113595286579,0.0106695540332,0.0110297162613,0.0110739921475,0.0105328163507,0.0113152108636,0.0106259612487,0.0104321363799,0.0108414274498,0.0114439818202,0.0110086867868,0.0112926014546,0.0113174152286,0.0109459587731,0.0111239675326,0.0106645250637,0.0104075656728,0.0111835566311,0.00997325547926,0.010732717891,0.0112025996626,0.0108408072102,0.0110576940953,0.0111886023639,0.0112739355959,0.010755436261,0.0105583760885,0.0110994806416,0.0113148253093,0.0112935150508,0.011399617927,0.0116396087364,0.0104108931743,0.0105136308318,0.00427604481669])
# Creating weights for histo: y3_PHI_8
y3_PHI_8_weights = numpy.array([0.000454224083137,0.000710413571136,0.000793053851237,0.000510503323174,0.000851558860017,0.000707476875457,0.00107863064642,0.000710239478706,0.000822599208208,0.000766585414564,0.00101989599012,0.000622479960204,0.00084798521183,0.000595491622931,0.000851679179871,0.000819446679508,0.000792162444521,0.000767686564036,0.0007666538929,0.000736261692121,0.000879403993481,0.00113304210642,0.000880264503247,0.000791845750783,0.000790827191235,0.00110648142452,0.000738349018762,0.000710381931471,0.000794192285009,0.000738162745804,0.000934762118197,0.000651009282859,0.000594651760646,0.000652579085587,0.000681553888786,0.000709704426717,0.00107655252945,0.00104862242938,0.00093757344356,0.000907809579793,0.000596497704865,0.00067873706733,0.000934806086933,0.000739519537829,0.000764317905229,0.000651897124542,0.000737951369074,0.000737482567275,0.000852132236108,0.000652821804897,0.000906843604477,0.000565736077573,0.00079434335327,0.000679168733372,0.00079072395383,0.000566746615798,0.000965114955073,0.000650399513726,0.000736803874176,0.000652253330725,0.000653158849029,0.000878086416816,0.000766332594329,0.000307914844403])
# Creating weights for histo: y3_PHI_9
y3_PHI_9_weights = numpy.array([0.0,2.61802246854,2.60133245831,2.59814004154,5.23020691354,0.0,15.6477911358,2.60604494535,0.0,5.20757697778,10.4064480635,7.80670489196,5.21066480079,2.60351585296,2.60470714507,2.60135629953,2.61218252233,2.60470714507,2.60604494535,0.0,0.0,0.0,0.0,0.0,2.60701166852,7.81100784831,0.0,0.0,0.0,7.80410927485,2.60667135428,0.0,7.83303790812,2.61802246854,0.0,2.60604494535,10.4287049995,5.21164536725,7.82236319246,2.60667135428,13.0464098414,5.21241828434,0.0,5.21075324404,0.0,2.60874977064,2.60197540228,2.60399267743,7.82587785028,2.60133245831,2.59814004154,5.21457553055,2.60604494535,5.23106058317,2.60470714507,7.81999060616,7.82485113952,2.61044172846,2.6044372009,0.0,2.60351585296,7.82636236547,0.0,2.60300480479])
# Creating weights for histo: y3_PHI_10
y3_PHI_10_weights = numpy.array([10.5335910004,17.9040012762,23.176394945,12.6306880456,10.5294472014,11.5842268127,14.7584076502,12.6425538545,9.46950804093,13.6926740966,16.8492524452,11.5795751386,13.6923816837,13.6917276021,20.0110557511,17.9075564018,9.4749830883,16.8557932607,17.903435688,20.0082701332,14.73768096,14.7470304787,15.8020794176,11.5881551496,24.2072159337,22.1212536651,17.9044129628,17.9085259815,16.8582133625,12.6364324207,27.378738122,17.8999459705,12.649729514,22.1170790857,10.5394508017,18.9539599216,8.42599402255,20.0158459366,15.8019139735,15.7911331704,7.36884047998,14.7435907792,8.42418183189,17.9076025723,20.0077507155,14.7542946315,13.6905579504,12.6351358002,13.6940091925,11.5847192976,20.0214518003,13.6950595705,20.0204129649,21.0675590597,13.6900385327,22.1152476574,13.6914390367,12.6411110276,11.5789787701,13.6935474879,17.9041590252,26.3328040019,13.6906272061,2.10601948709])
# Creating weights for histo: y3_PHI_11
y3_PHI_11_weights = numpy.array([9.44674383257,29.9397340228,27.8731066755,28.1017085847,25.1099610684,26.9472564559,30.172408846,19.8076148085,25.106960176,26.0386085347,26.0258134366,25.341648402,24.6461906367,19.5785479724,27.4109692519,28.3264873339,27.6419572739,26.2546266762,22.575889982,29.2525719382,27.1843000558,23.9561967241,24.6429323055,28.5656711349,29.9387081096,29.7149629584,26.2613085607,21.4256260385,23.9587595861,28.0987845397,22.5725240643,28.1006557748,24.1812982325,26.9446244312,29.4851622292,23.7272221049,27.8719923877,27.8691067665,24.1858207041,27.4122910278,27.1809418229,24.8809672373,29.2567332268,24.8762449624,27.8613528603,26.4826675991,25.7946601927,26.0238230881,27.412344821,23.489909539,23.5014942899,27.4046062842,26.4849538103,27.8715005641,20.2693180441,24.4161824195,28.3299416261,27.1823058648,24.6431705325,27.8706129762,26.9499883822,25.3354122326,25.5614090137,11.0536006573])
# Creating weights for histo: y3_PHI_12
y3_PHI_12_weights = numpy.array([3.93112417647,10.1076036615,9.41464733663,9.9131445457,10.3855079208,9.74770464231,9.30411810787,8.86087397166,9.27619149208,9.77500032202,8.88880443462,9.27715328488,9.55349174547,8.88964311794,9.44244314859,9.0818093197,9.30401423424,8.80623644619,8.66715351274,9.08268262757,9.71831994863,9.96966333789,9.08247103315,9.35908649006,9.41555142186,9.3592288354,9.91287139654,9.71934714334,9.16681256751,9.46987347929,8.91638865217,10.3294854137,10.02346218,9.71818529764,9.66554445402,10.1331604198,9.58040270805,10.4386219664,8.77783278117,9.24943056917,9.13720089073,9.2216347572,9.38701310585,9.77571589586,9.16580460865,9.94147896163,9.99745914985,9.66461728576,9.69231691845,9.02780273031,9.2214616345,8.69429915277,9.88614894534,9.27624919965,9.6911204482,8.77821365112,10.1633953383,8.83301660496,9.66423641581,8.83250493119,8.8891006668,9.22109615323,9.41635163347,3.93178973709])
# Creating weights for histo: y3_PHI_13
y3_PHI_13_weights = numpy.array([0.54411840931,1.25042020794,1.38085524259,1.43205531725,1.40147544688,1.34100626241,1.47196922671,1.66310585624,1.52206186271,1.29040572166,1.64368229251,1.26018508618,1.37132277476,1.55179279792,1.49224293923,1.33082874949,1.44202651282,1.58293822052,1.39126213184,1.31084084716,1.33050349628,1.48219649851,1.60316460142,1.6533992323,1.34105420085,1.38135707917,1.43164571665,1.4216332576,1.45169551418,1.4721233579,1.31033901058,1.41167723242,1.41132527931,1.38154397841,1.38115743681,1.39149211499,1.42178192745,1.2703316515,1.34074957936,1.49218832582,1.6029510023,1.34064460025,1.34103721001,1.44200163338,1.461807491,1.37081365639,1.25041353297,1.34106148263,1.12904432488,1.47182055686,1.24011647736,1.66379519887,1.33080083597,1.38149846723,1.23002937999,1.19958179544,1.59295250001,1.29058169821,1.39127184089,1.35085306076,1.4216872642,1.4316323667,1.55233589797,0.524175107932])
# Creating weights for histo: y3_PHI_14
y3_PHI_14_weights = numpy.array([0.161286961368,0.322602816549,0.336667794159,0.347974201266,0.350781056372,0.328204753782,0.415892015327,0.345093861228,0.347923069603,0.302707444362,0.319627484732,0.376297910475,0.34514753216,0.35364870006,0.319728786212,0.36220442379,0.348046916723,0.393212487568,0.353679248247,0.314084951026,0.359332278668,0.376344733074,0.319662611299,0.36212974617,0.367793356882,0.322553493155,0.382010844582,0.418655972161,0.305560314116,0.3338428179,0.316810626442,0.370601096885,0.370674774186,0.342357528573,0.362117434558,0.373404989509,0.316891729184,0.331054930371,0.333830121551,0.364957338646,0.359308963553,0.314030010459,0.3592749912,0.331019303645,0.331104061397,0.339462029863,0.373408875361,0.424397030606,0.294174920326,0.291453938712,0.367808092342,0.35362492326,0.330951243516,0.373419724969,0.345172655543,0.328158700659,0.336667794159,0.348027833724,0.367795703783,0.390448915472,0.345153072385,0.347910373254,0.387592236813,0.181041173232])
# Creating weights for histo: y3_PHI_15
y3_PHI_15_weights = numpy.array([0.00759333655059,0.0258567649197,0.0259654302759,0.0244087562086,0.018232675896,0.0198094994394,0.0304369594573,0.0274754946461,0.0137505815348,0.0335626099993,0.0152040855575,0.0228125868047,0.0152174279378,0.0259105953381,0.0197832755758,0.0198050441007,0.0167724475027,0.024303139864,0.0182855845202,0.0197685150505,0.0228628600429,0.0273949912848,0.0197958261585,0.0152408155115,0.0259485070796,0.0243386053055,0.0289328158423,0.0228468822765,0.0137384563955,0.021281569343,0.0197576898775,0.0319242507833,0.0182886571676,0.0213440740813,0.0152118026296,0.0273809516499,0.0198046304751,0.0243751816271,0.0182363276192,0.0304873390564,0.0198247563154,0.00915046087889,0.0273851706311,0.0228435023644,0.0213512357133,0.0213419114103,0.0213587636993,0.035019222123,0.0258429143707,0.0213478085296,0.022875658801,0.0228772896677,0.0167508916996,0.0197866200343,0.0259210187034,0.0227975190147,0.0137295929896,0.0152951186449,0.0167869480347,0.00912661122633,0.01975745352,0.0183571653862,0.0121714653238,0.00612554471756])
# Creating weights for histo: y3_PHI_16
y3_PHI_16_weights = numpy.array([0.000360771224404,0.00198427129157,0.00144410351896,0.00216649899093,0.000722448232322,0.00126367159703,0.000902743439473,0.00108313762042,0.00144421135033,0.0016254670269,0.000903030347942,0.00180644349725,0.00126312319749,0.00198639017801,0.00108211861397,0.00180570716303,0.00162516663951,0.00126431011279,0.00108381464738,0.00216779835895,0.00108398602224,0.00144562663707,0.00126356453589,0.000902658714825,0.00162482042379,0.000541881906296,0.00198504036031,0.00126534875996,0.000902169622536,0.00126347480478,0.00198692317307,0.00180700768639,0.000541526832997,0.0023471627503,0.00198660545564,0.00144413548326,0.00270888154288,0.00216761966696,0.00144403419879,0.00198568580809,0.00108325507959,0.00108327048407,0.00180610844978,0.000722760558185,0.00144379812511,0.000901783355162,0.00144453176354,0.00144375576279,0.0016258571454,0.00162411451342,0.00306909031115,0.00126446223205,0.0012641918834,0.000722088922791,0.0018046600434,0.00144457720676,0.00162549167407,0.00144626784861,0.00144425794888,0.0014433625634,0.000902219687101,0.00216759617513,0.00126450806038,0.000360777617264])
# Creating a new Canvas
fig = plt.figure(figsize=(12,6),dpi=80)
frame = gridspec.GridSpec(1,1,right=0.7)
pad = fig.add_subplot(frame[0])
# Creating a new Stack
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights+y3_PHI_13_weights+y3_PHI_14_weights+y3_PHI_15_weights+y3_PHI_16_weights,\
label="$bg\_dip\_1600\_inf$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#e5e5e5", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights+y3_PHI_13_weights+y3_PHI_14_weights+y3_PHI_15_weights,\
label="$bg\_dip\_1200\_1600$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#f2f2f2", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights+y3_PHI_13_weights+y3_PHI_14_weights,\
label="$bg\_dip\_800\_1200$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#ccc6aa", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights+y3_PHI_13_weights,\
label="$bg\_dip\_600\_800$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#ccc6aa", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights,\
label="$bg\_dip\_400\_600$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#c1bfa8", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights,\
label="$bg\_dip\_200\_400$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#bab5a3", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights,\
label="$bg\_dip\_100\_200$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#b2a596", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights,\
label="$bg\_dip\_0\_100$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#b7a39b", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights,\
label="$bg\_vbf\_1600\_inf$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#ad998c", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights,\
label="$bg\_vbf\_1200\_1600$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#9b8e82", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights,\
label="$bg\_vbf\_800\_1200$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#876656", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights,\
label="$bg\_vbf\_600\_800$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#afcec6", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights,\
label="$bg\_vbf\_400\_600$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#84c1a3", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights,\
label="$bg\_vbf\_200\_400$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#89a8a0", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights,\
label="$bg\_vbf\_100\_200$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#829e8c", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights+y3_PHI_1_weights,\
label="$bg\_vbf\_0\_100$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#adbcc6", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
pad.hist(x=xData, bins=xBinning, weights=y3_PHI_0_weights,\
label="$signal$", histtype="step", rwidth=1.0,\
color=None, edgecolor="#7a8e99", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, normed=False, align="mid", orientation="vertical")
# Axis
plt.rc('text',usetex=False)
plt.xlabel(r"\phi [ j_{1} ] ",\
fontsize=16,color="black")
plt.ylabel(r"$\mathrm{Events}$ $(\mathcal{L}_{\mathrm{int}} = 40.0\ \mathrm{fb}^{-1})$ ",\
fontsize=16,color="black")
# Boundary of y-axis
ymax=(y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights+y3_PHI_13_weights+y3_PHI_14_weights+y3_PHI_15_weights+y3_PHI_16_weights).max()*1.1
ymin=0 # linear scale
#ymin=min([x for x in (y3_PHI_0_weights+y3_PHI_1_weights+y3_PHI_2_weights+y3_PHI_3_weights+y3_PHI_4_weights+y3_PHI_5_weights+y3_PHI_6_weights+y3_PHI_7_weights+y3_PHI_8_weights+y3_PHI_9_weights+y3_PHI_10_weights+y3_PHI_11_weights+y3_PHI_12_weights+y3_PHI_13_weights+y3_PHI_14_weights+y3_PHI_15_weights+y3_PHI_16_weights) if x])/100. # log scale
plt.gca().set_ylim(ymin,ymax)
# Log/Linear scale for X-axis
plt.gca().set_xscale("linear")
#plt.gca().set_xscale("log",nonposx="clip")
# Log/Linear scale for Y-axis
plt.gca().set_yscale("linear")
#plt.gca().set_yscale("log",nonposy="clip")
# Legend
plt.legend(bbox_to_anchor=(1.05,1), loc=2, borderaxespad=0.)
# Saving the image
plt.savefig('../../HTML/MadAnalysis5job_0/selection_2.png')
plt.savefig('../../PDF/MadAnalysis5job_0/selection_2.png')
plt.savefig('../../DVI/MadAnalysis5job_0/selection_2.eps')
# Running!
if __name__ == '__main__':
selection_2()
| 141.556701
| 1,176
| 0.801471
| 4,091
| 27,462
| 5.201662
| 0.303349
| 0.051927
| 0.104323
| 0.012218
| 0.278008
| 0.273684
| 0.251034
| 0.247368
| 0.245583
| 0.245113
| 0
| 0.566674
| 0.060083
| 27,462
| 193
| 1,177
| 142.290155
| 0.257748
| 0.047957
| 0
| 0.185841
| 0
| 0.00885
| 0.039373
| 0.00766
| 0
| 0
| 0
| 0
| 0
| 1
| 0.00885
| false
| 0
| 0.035398
| 0
| 0.044248
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a33e2c7781cb3be0dcfe63c792c7fe420c7c5eaa
| 1,682
|
py
|
Python
|
strava/strava/items.py
|
DakotaNelson/strava-scraper
|
3ba5b822eb70bf4fe1e16d838ecc30b9fa390e54
|
[
"MIT"
] | 6
|
2018-12-07T20:10:51.000Z
|
2021-11-26T09:25:20.000Z
|
strava/strava/items.py
|
DakotaNelson/strava-scraper
|
3ba5b822eb70bf4fe1e16d838ecc30b9fa390e54
|
[
"MIT"
] | 3
|
2020-04-27T20:47:30.000Z
|
2022-03-02T14:59:52.000Z
|
strava/strava/items.py
|
DakotaNelson/strava-scraper
|
3ba5b822eb70bf4fe1e16d838ecc30b9fa390e54
|
[
"MIT"
] | 2
|
2020-04-06T18:44:24.000Z
|
2022-03-25T20:17:05.000Z
|
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class Activity(scrapy.Item):
full_name = scrapy.Field(serializer=str)
activity_id = scrapy.Field(serializer=int)
athlete_id = scrapy.Field(serializer=int)
path = scrapy.Field(serializer=dict)
# not yet used, untested
class Club(scrapy.Item):
club_id = scrapy.Field(serializer=int)
club_name = scrapy.Field(serializer=str)
club_location = scrapy.Field(serializer=str)
club_members = scrapy.Field(serializer=list)
club_num_members = scrapy.Field(serializer=int)
# not yet used, untested
class Route(scrapy.Item):
route_id = scrapy.Field(serializer=int)
name = scrapy.Field(serializer=str)
created_by = scrapy.Field(serializer=int)
metadata = scrapy.Field(serializer=str)
# not yet used, untested
class Segment(scrapy.Item):
segment_id = scrapy.Field(serializer=int)
full_name = scrapy.Field(serializer=str)
location = scrapy.Field(serializer=str)
people = scrapy.Field()
path = scrapy.Field(serializer=dict)
class User(scrapy.Item):
full_name = scrapy.Field(serializer=str)
avatar = scrapy.Field(serializer=str)
first_name = scrapy.Field(serializer=str)
last_name = scrapy.Field(serializer=str)
user_id = scrapy.Field(serializer=int)
location = scrapy.Field(serializer=str)
uploaded_images = scrapy.Field(serializer=list)
num_following = scrapy.Field(serializer=int)
num_followers = scrapy.Field(serializer=int)
following = scrapy.Field(serializer=list)
followers = scrapy.Field(serializer=list)
| 32.980392
| 52
| 0.731272
| 220
| 1,682
| 5.5
| 0.268182
| 0.263636
| 0.48595
| 0.238017
| 0.508264
| 0.095868
| 0.069421
| 0.069421
| 0
| 0
| 0
| 0.000702
| 0.153389
| 1,682
| 50
| 53
| 33.64
| 0.849017
| 0.124257
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028571
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a37f49f86559dec0d19f0ddbf1c1f07378b609fc
| 85
|
py
|
Python
|
openstock/common/helpers.py
|
fakegit/openstock
|
3b915dee4d6cf9201230eb69bc31689771041552
|
[
"MIT"
] | 13
|
2019-05-06T09:33:22.000Z
|
2021-02-05T09:28:10.000Z
|
openstock/common/helpers.py
|
fakegit/openstock
|
3b915dee4d6cf9201230eb69bc31689771041552
|
[
"MIT"
] | 5
|
2019-05-07T10:03:18.000Z
|
2021-02-05T11:09:41.000Z
|
openstock/common/helpers.py
|
fakegit/openstock
|
3b915dee4d6cf9201230eb69bc31689771041552
|
[
"MIT"
] | 10
|
2019-06-20T06:37:17.000Z
|
2021-01-15T02:08:39.000Z
|
def is_empty(text):
if text in [None,'']:
return True
return False
| 12.142857
| 25
| 0.564706
| 12
| 85
| 3.916667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.329412
| 85
| 6
| 26
| 14.166667
| 0.824561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a396e574cb69e20f13caea3b19ed3b3836f24c42
| 234
|
py
|
Python
|
pacote-download/d013 - calc aumento do funcionario.py
|
Carlos-DOliveira/cursoemvideo-python3
|
4546c8a7360155243e2f7ecbbb80c57868f770a2
|
[
"MIT"
] | null | null | null |
pacote-download/d013 - calc aumento do funcionario.py
|
Carlos-DOliveira/cursoemvideo-python3
|
4546c8a7360155243e2f7ecbbb80c57868f770a2
|
[
"MIT"
] | null | null | null |
pacote-download/d013 - calc aumento do funcionario.py
|
Carlos-DOliveira/cursoemvideo-python3
|
4546c8a7360155243e2f7ecbbb80c57868f770a2
|
[
"MIT"
] | null | null | null |
''' 013 Faça um algoritmo que leia o salário de um funcionário e mostre seu novo salária, com 15% de aumento'''
sal = float(input('Digite o seu salário: R$ '))
print(f'O seu salário com aumento de 15% é {sal + (sal * 15)/100:.2f}')
| 46.8
| 111
| 0.679487
| 43
| 234
| 3.697674
| 0.651163
| 0.050314
| 0.138365
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068421
| 0.188034
| 234
| 4
| 112
| 58.5
| 0.768421
| 0.444444
| 0
| 0
| 0
| 0.5
| 0.707317
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6e6408def12c6cb98443d8b9359b39f4a0ef6337
| 105
|
py
|
Python
|
formset_only_app/apps.py
|
thinkAmi-sandbox/Django_formset-sample
|
45e391b7a5c35223bab314fcf7b68e5700784ddc
|
[
"Unlicense"
] | null | null | null |
formset_only_app/apps.py
|
thinkAmi-sandbox/Django_formset-sample
|
45e391b7a5c35223bab314fcf7b68e5700784ddc
|
[
"Unlicense"
] | null | null | null |
formset_only_app/apps.py
|
thinkAmi-sandbox/Django_formset-sample
|
45e391b7a5c35223bab314fcf7b68e5700784ddc
|
[
"Unlicense"
] | null | null | null |
from django.apps import AppConfig
class FormsetOnlyAppConfig(AppConfig):
name = 'formset_only_app'
| 17.5
| 38
| 0.790476
| 12
| 105
| 6.75
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 105
| 5
| 39
| 21
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.152381
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6e95861e3d6cdd6528cbd4e2cbc1fc39f01d37f4
| 100
|
py
|
Python
|
Modules/Backend/__init__.py
|
bus6479/QCAD
|
b660d07639e44b099dccc1213e87bae737db716d
|
[
"MIT"
] | 1
|
2018-10-05T06:33:56.000Z
|
2018-10-05T06:33:56.000Z
|
Modules/Backend/__init__.py
|
GyunghunKim/QCAD
|
b660d07639e44b099dccc1213e87bae737db716d
|
[
"MIT"
] | null | null | null |
Modules/Backend/__init__.py
|
GyunghunKim/QCAD
|
b660d07639e44b099dccc1213e87bae737db716d
|
[
"MIT"
] | 1
|
2018-09-01T02:35:50.000Z
|
2018-09-01T02:35:50.000Z
|
from .backend import Backend
from .matrixmodel import MatrixModel
from .cimulator import Cimulator
| 20
| 36
| 0.84
| 12
| 100
| 7
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13
| 100
| 4
| 37
| 25
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6ec052bc3e11a77554f1c194d4802207a583462d
| 16,061
|
py
|
Python
|
experiments.py
|
lelugom/search
|
4131a0fe56a26299402fb508e0645ad07cdb48f9
|
[
"MIT"
] | null | null | null |
experiments.py
|
lelugom/search
|
4131a0fe56a26299402fb508e0645ad07cdb48f9
|
[
"MIT"
] | null | null | null |
experiments.py
|
lelugom/search
|
4131a0fe56a26299402fb508e0645ad07cdb48f9
|
[
"MIT"
] | null | null | null |
"""
Run experiments for methods.py implementations
"""
import sys, csv, math
import numpy as np
from sklearn import metrics
import methods, datasets, download_datasets, deep_clustering
import tensorflow as tf
from sklearn.metrics.pairwise import cosine_similarity
from scipy.spatial import distance
def task_seg_crossval_brnn():
"""
Run a experiment with the bidirectional RNN to detect session changes in
the AOL dataset from (Sen et al., 2018) and (Hagen et al., 2013)
"""
m = 0
hagen_aol=datasets.hagen_aol(representation=datasets.representation().glove)
hagen_aol.load_sequential_queries(m=m, n=m+1)
hagen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = 'models/rnn_model_transfer'
brnn.ITERATIONS = 60000
brnn.CELL = 'LSTM'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Hagen et al. dataset. m,n= ' + str(m) +',' + str(m+1)
print(description, file=sys.stderr)
print(description)
brnn.crossval(hagen_aol)
del hagen_aol
m = 0
sen_aol=datasets.lucchese_aol(representation=datasets.representation().glove)
sen_aol.load_sequential_queries(m=m, n=m+1)
sen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = 'models/rnn_model_transfer'
brnn.ITERATIONS = 20000
brnn.CELL = 'LSTM'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Sen et al. dataset. m,n= ' + str(m) +',' + str(m+1)
print(description, file=sys.stderr)
print(description)
brnn.crossval(sen_aol, train_eval_runs=1)
del sen_aol
m = 0
hagen_aol=datasets.hagen_aol(representation=datasets.representation().glove)
hagen_aol.load_sequential_queries(m=m, n=m+1)
hagen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = 'models/rnn_model_transfer'
brnn.ITERATIONS = 60000
brnn.CELL = 'GRU'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Hagen et al. dataset. m,n= ' + str(m) +',' + str(m+1)
print(description, file=sys.stderr)
print(description)
brnn.crossval(hagen_aol)
del hagen_aol
m = 0
sen_aol=datasets.lucchese_aol(representation=datasets.representation().glove)
sen_aol.load_sequential_queries(m=m, n=m+1)
sen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = 'models/rnn_model_transfer'
brnn.ITERATIONS = 20000
brnn.CELL = 'GRU'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Sen et al. dataset. m,n= ' + str(m) +',' + str(m+1)
print(description, file=sys.stderr)
print(description)
brnn.crossval(sen_aol, train_eval_runs=1)
del sen_aol
def task_seg_context():
"""
Use adjacent queries to add context to the query pair. Use Hagen et al., 2013
dataset and the BRNN architecture with GRU cells
"""
for m in range(0, 6):
hagen_aol = datasets.hagen_aol(
representation=datasets.representation().glove)
hagen_aol.load_sequential_queries(m=m, n=m+1)
hagen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = 'models/rnn_model_context'
brnn.ITERATIONS = 60000
brnn.CELL = 'GRU'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Hagen et al. dataset. m,n= ' + str(m) +',' + str(m+1)
print(description, file=sys.stderr)
print(description)
brnn.crossval(hagen_aol)
del hagen_aol
if m == 0:
continue
hagen_aol = datasets.hagen_aol(
representation=datasets.representation().glove)
hagen_aol.load_sequential_queries(m=m, n=1)
hagen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = 'models/rnn_model_context'
brnn.ITERATIONS = 60000
brnn.CELL = 'GRU'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Hagen et al. dataset. m,n= ' + str(m) +',' + str(1)
print(description, file=sys.stderr)
print(description)
brnn.crossval(hagen_aol)
del hagen_aol
def task_seg_transfer_learning():
"""
Pretrain BRNN on Hagen et al., 2013 dataset. Then, fine tune for Sen et al., 2018 session segmentation
"""
model_dir = 'models/rnn_model'
pretrain_model_dir = 'models/rnn_model_transfer_pretrain'
hagen_aol = datasets.hagen_aol(
representation=datasets.representation().glove)
hagen_aol.load_sequential_queries()
brnn = methods.brnn()
brnn.MODEL_DIR = pretrain_model_dir
brnn.ITERATIONS = 40000
brnn.CELL = 'GRU'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + \
'. Sen et al. dataset. Pretraining with Hagen et al., test set 10%'
print(description, file=sys.stderr)
print(description)
brnn.train_test(hagen_aol, test_size=0.1)
del hagen_aol
sen_aol = datasets.lucchese_aol(
representation=datasets.representation().glove)
sen_aol.load_sequential_queries()
sen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = model_dir
brnn.ITERATIONS = 40000 + 20000
brnn.CELL = 'GRU'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Sen et al. dataset, crossval, fine tuning'
print(description, file=sys.stderr)
print(description)
brnn.crossval(sen_aol, transfer=True, pretrain_dir=pretrain_model_dir)
del sen_aol
hagen_aol = datasets.hagen_aol(
representation=datasets.representation().glove)
hagen_aol.load_sequential_queries()
brnn = methods.brnn()
brnn.MODEL_DIR = pretrain_model_dir
brnn.ITERATIONS = 40000
brnn.CELL = 'LSTM'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + \
'. Sen et al. dataset. Pretraining with Hagen et al., test set 10%'
print(description, file=sys.stderr)
print(description)
brnn.train_test(hagen_aol, test_size=0.1)
del hagen_aol
sen_aol = datasets.lucchese_aol(
representation=datasets.representation().glove)
sen_aol.load_sequential_queries()
sen_aol.kfold()
brnn = methods.brnn()
brnn.MODEL_DIR = model_dir
brnn.ITERATIONS = 40000 + 20000
brnn.CELL = 'LSTM'
brnn.BATCH_SIZE = 256
description = '\n\n--- Experiment with ' + str(brnn.HIDDEN_UNITS) + \
brnn.CELL + '. Sen et al. dataset, crossval, fine tuning'
print(description, file=sys.stderr)
print(description)
brnn.crossval(sen_aol, transfer=True, pretrain_dir=pretrain_model_dir)
del sen_aol
def task_seg_ml_sklearn_crossval():
"""
Run ML Scikit learn methods for Sen et al. and Hagen et al. dataset task
segmentation
"""
classifiers = methods.multiplelearners()
print('\n\n--- Experiment with Sen et al. dataset ')
sen_aol = datasets.lucchese_aol(
representation=datasets.representation().glove)
sen_aol.load_sequential_queries()
classifiers.run(sen_aol)
dataset = datasets.lucchese_aol()
dataset.load_sequential_pair()
methods.task_rules(dataset=dataset).test()
print('\n\n--- Experiment with Hagen et al. dataset ')
hagen_aol = datasets.hagen_aol(
representation=datasets.representation().glove)
hagen_aol.load_sequential_queries()
classifiers.run(hagen_aol)
dataset = datasets.hagen_aol()
dataset.load_sequential_pair()
methods.task_rules(dataset=dataset).test()
def task_seg():
"""
Replicate results for task segmentation experiemnts
"""
task_seg_crossval_brnn()
task_seg_ml_sklearn_crossval()
task_seg_transfer_learning()
task_seg_context()
def mgbc_task_ide(clueweb_url):
"""
Graph based clustering for search task identification
"""
representation = datasets.representation(lang='').universal_sentence_encoder
dataset = datasets.sen_aol(representation=representation)
if clueweb_url == '':
dataset.load(textdata=False)
semantic = None
else:
dataset.load(textdata=True)
clueweb = datasets.clueweb()
clueweb.BASE_URL = clueweb_url + '?query='
semantic = clueweb.semantic_similarity_ids
alphas = [alpha for alpha in np.arange(0.1, 1.01, 0.1)]
thresholds = [-threshold for threshold in np.arange(0.1, 1.01, 0.1)]
for threshold in thresholds:
for alpha in alphas:
mgbc = methods.mgbc(
dataset.data, dataset.labels, threshold=threshold,
alpha=alpha, representation=representation, semantic=semantic)
mgbc.cluster()
def ngt_task_map():
"""
Run mapping experiments on query task mapping datasets
(Volske et al., 2019).
"""
print('\n\n--- Experiments with NGT')
representation = datasets.representation(lang='').universal_sentence_encoder
volske = datasets.volske_aol(representation=representation)
volske.load(textdata=False)
volske.data = np.asarray(volske.data)
task_map = methods.task_map(dataset=volske)
task_map.map_ngt()
volske = datasets.volske_trek(representation=representation)
volske.load(textdata=False)
volske.data = np.asarray(volske.data)
task_map = methods.task_map(dataset=volske)
task_map.map_ngt()
volske = datasets.volske_wikihow(representation=representation)
volske.load(textdata=False)
volske.data = np.asarray(volske.data)
task_map = methods.task_map(dataset=volske)
task_map.map_ngt()
def task_ide(clueweb_url=''):
"""
Replicate results for task identification experiments
"""
mgbc_task_ide(clueweb_url)
ngt_task_map()
def task_ext(representation=datasets.representation(width=8).glove,
save_dir='models/irdcs_model'):
lambda_loss = 0.1
cell = 'GRU'
ui, lr, batch, mi = 1, 1e-5, 128, 150
# Datasets
qdatasets = []
qdataset = datasets.sen_aol(representation=representation)
qdataset.load_augmented(textdata=False)
qdatasets.append(qdataset)
qdataset = datasets.volske_trek(representation=representation)
qdataset.load_augmented_filter_user(textdata=False)
qdatasets.append(qdataset)
qdatasets_names = ['Sen et al.', 'Volske et al. Trec ']
# Clustering
for i in range(len(qdatasets)):
sen_aol = qdatasets[i]
ds_name = qdatasets_names[i]
print('\n\n--- Experiment RDC ' + ds_name + ' dataset, sequence pretrain')
hagen_aol = datasets.hagen_aol(representation=representation)
hagen_aol.load_random_pair_dual()
pe = 10; plr = 1e-5
methods.dc_rnn(pretrain_dataset=hagen_aol, dataset=sen_aol,
save_dir=save_dir, rnn=deep_clustering.IRDCS,
pretrain_epochs=pe, batch_size=batch, maxiter=mi, update_interval=ui,
learning_rate=lr, pretrain=True, pretrain_lr=plr, cell=cell)
print('\n\n--- Experiment RDC ' + ds_name + ' dataset, segmentation pretrain')
hagen_aol = datasets.hagen_aol(representation=representation)
hagen_aol.load_sequential_pair_dual()
pe = 30; plr = 1e-4
methods.dc_rnn(pretrain_dataset=hagen_aol, dataset=sen_aol,
save_dir=save_dir, rnn=deep_clustering.IRDCS,
pretrain_epochs=pe, batch_size=batch, maxiter=mi, update_interval=ui,
learning_rate=lr, pretrain=True, pretrain_lr=plr, cell=cell)
print('\n\n--- Experiment RDC ' + ds_name + ' dataset, no pretrain')
methods.dc_rnn(pretrain_dataset=hagen_aol, dataset=sen_aol,
save_dir=save_dir, rnn=deep_clustering.IRDCS,
pretrain_epochs=pe, batch_size=batch, maxiter=mi, update_interval=ui,
learning_rate=lr, pretrain=False, pretrain_lr=plr, cell=cell, lambda_loss=lambda_loss)
def lastm(orcas_cache):
"""
Run unsupervised LASTM task modeling. if orcas_cache is True, build the ORCAS
index on RAM
"""
# Load cache for LABSE representations
vectors = datasets.representation()
dataset = datasets.sen_aol(representation=vectors.labse)
dataset.load(textdata=False)
dataset = datasets.wp4_task(representation=vectors.labse)
dataset.load(textdata=False)
del vectors
# Load cache for Orcas
if orcas_cache:
vectors = datasets.representation()
orcas = datasets.orcas(representation=vectors.labse)
print('Creating ORCAS cache')
dataset = datasets.sen_aol(representation=vectors.labse)
dataset.load(textdata=True)
for query in dataset.data:
orcas.retrieve_document_ids_cache(query)
dataset = datasets.wp4_task(representation=vectors.labse)
dataset.load(textdata=True)
for query in dataset.data:
orcas.retrieve_document_ids_cache(query)
del vectors, orcas
# Clustering
alphas = [alpha for alpha in np.arange(0.0, 1.01, 0.1)]
thresholds = [threshold for threshold in np.arange(0.0, 1.01, 0.1)]
representation = datasets.representation().labse
semantic = datasets.orcas().intent_similarity_ids
print('\n\n--- Experiment with Sen et al. dataset ')
dataset = datasets.sen_aol(representation=representation)
dataset.load(textdata=True)
for threshold in thresholds:
for alpha in alphas:
lastm = methods.lastm(
dataset.data, dataset.labels, threshold=threshold,
alpha=alpha, representation=representation, semantic=semantic)
lastm.cluster()
print('\n\n--- Experiment with WP4 dataset ')
dataset = datasets.sen_aol(representation=representation)
dataset.load(textdata=True)
dataset.load(textdata=True)
for threshold in thresholds:
for alpha in alphas:
lastm = methods.lastm(
dataset.data, dataset.labels, threshold=threshold,
alpha=alpha, representation=representation, semantic=semantic)
lastm.cluster()
def scann_task_map():
"""
Run mapping experiments on query task mapping datasets
(Volske et al., 2019).
"""
print('\n\n--- Experiments with LASTM')
k = 7
leaves = 200
vectors = datasets.representation(lang='')
representation = vectors.labse
volske = datasets.volske_aol(representation=representation)
volske.load(textdata=False)
volske.data = np.asarray(volske.data)
task_map = methods.task_map(dataset=volske)
task_map.annoy_n = k
task_map.scann_leaves = leaves
task_map.map_scann()
volske = datasets.volske_trek(representation=representation)
volske.load(textdata=False)
volske.data = np.asarray(volske.data)
task_map = methods.task_map(dataset=volske)
task_map.annoy_n = k
task_map.scann_leaves = leaves
task_map.map_scann()
volske = datasets.volske_wikihow(representation=representation)
volske.load(textdata=False)
volske.data = np.asarray(volske.data)
task_map = methods.task_map(dataset=volske)
task_map.annoy_n = k
task_map.scann_leaves = leaves
task_map.map_scann()
def task_mod(orcas_cache=False):
"""
Replicate resutls for task modeling experiments
"""
lastm(orcas_cache)
scann_task_map()
if __name__ == "__main__":
print('checking datasets ...')
download_datasets.download_files()
if len(sys.argv) == 3 and sys.argv[2] == 'segmentation':
assert tf.__version__.startswith('1.')
print('running search segmentation experiments ...')
task_seg()
elif len(sys.argv) == 3 and sys.argv[2] == 'identification':
assert tf.__version__.startswith('1.')
print('running task identification experiments ...')
task_ide()
elif len(sys.argv) == 5 and sys.argv[2] == 'identification':
assert tf.__version__.startswith('1.')
print('running task identification experiments ...')
url = sys.argv[4] + '?query='
task_ide(clueweb_url=url)
elif len(sys.argv) == 3 and sys.argv[2] == 'extracting':
assert tf.__version__.startswith('1.')
print('running task extracting experiments ...')
task_ext()
elif len(sys.argv) == 3 and sys.argv[2] == 'modeling':
assert tf.__version__.startswith('2.')
print('running task modeling experiments ...')
task_mod(orcas_cache=False)
elif len(sys.argv) == 5 and sys.argv[2] == 'modeling':
assert tf.__version__.startswith('2.')
print('running task modeling experiments ...')
task_mod(orcas_cache=True)
else:
print("""
Usage:
python experiments.py -t segmentation
python experiments.py -t identification
python experiments.py -t identification -u clueweb_url
python experiments.py -t extracting
python experiments.py -t modeling
python experiments.py -t modeling -u orcas_cache
""")
| 33.321577
| 104
| 0.714215
| 2,168
| 16,061
| 5.108856
| 0.111162
| 0.03467
| 0.018418
| 0.020224
| 0.782503
| 0.731853
| 0.720386
| 0.703774
| 0.687974
| 0.671271
| 0
| 0.016509
| 0.16649
| 16,061
| 482
| 105
| 33.321577
| 0.810861
| 0.065251
| 0
| 0.699468
| 0
| 0
| 0.133114
| 0.012242
| 0
| 0
| 0
| 0
| 0.015957
| 1
| 0.031915
| false
| 0
| 0.018617
| 0
| 0.050532
| 0.101064
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6edcd72d4b39c267adfa32f323b48c6da952e6e7
| 16,724
|
py
|
Python
|
test/test_plugins/test_stockphoto.py
|
fenwar/limbo
|
a6e42ad90daa3691c2dce846023662e0a650171b
|
[
"MIT"
] | 1
|
2021-09-14T01:14:24.000Z
|
2021-09-14T01:14:24.000Z
|
test/test_plugins/test_stockphoto.py
|
fenwar/limbo
|
a6e42ad90daa3691c2dce846023662e0a650171b
|
[
"MIT"
] | 1
|
2018-10-29T20:23:38.000Z
|
2018-10-29T20:23:38.000Z
|
test/test_plugins/test_stockphoto.py
|
fenwar/limbo
|
a6e42ad90daa3691c2dce846023662e0a650171b
|
[
"MIT"
] | 1
|
2021-09-14T01:14:26.000Z
|
2021-09-14T01:14:26.000Z
|
# -*- coding: UTF-8 -*-
import os
import sys
import vcr
DIR = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(DIR, '../../limbo/plugins'))
from stockphoto import on_message
def test_basic():
with vcr.use_cassette('test/fixtures/stockphoto_basic.yaml'):
ret = on_message({"text": u"!stock woman eating salad"}, None)
assert ret in WOMEN_EATING_SALAD
def test_unicode():
with vcr.use_cassette('test/fixtures/stockphoto_unicode.yaml'):
ret = on_message({"text": u"!stock übermensch"}, None)
# not blowing up == success
WOMEN_EATING_SALAD = [
'https://thumb9.shutterstock.com/display_pic_with_logo/2418950/600370532/stock-photo-beautiful-fit-woman-eating-healthy-salad-after-fitness-workout-600370532.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/4187011/624636659/stock-photo-woman-eating-salad-624636659.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/52013/137318150/stock-photo-woman-eating-salad-137318150.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/2237975/224737129/stock-photo-blonde-woman-eating-green-healthy-tasty-eco-salad-on-city-street-terrace-224737129.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/437830/306417665/stock-photo-young-woman-eating-salad-and-holding-a-mixed-salad-306417665.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/101595/131983145/stock-photo-close-up-of-beautiful-african-american-woman-eating-salad-at-home-131983145.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/90989/457072153/stock-photo-nice-joyful-woman-eating-salad-457072153.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/437830/557309647/stock-photo-young-woman-eating-salad-and-holding-a-mixed-557309647.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/2104622/288126602/stock-photo-portrait-of-attractive-caucasian-smiling-woman-eating-salad-focus-on-hand-and-fork-soft-backlight-288126602.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/345733/450579463/stock-photo-happy-woman-eating-lunch-in-restaurant-450579463.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/4187011/585252509/stock-photo-woman-eating-salad-585252509.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/97565/157504958/stock-photo-healthy-lifestyle-woman-eating-salad-smiling-happy-outdoors-on-beautiful-day-young-female-eating-157504958.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/91282/172349879/stock-photo-close-up-of-pretty-girl-eating-fresh-vegetable-salad-172349879.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/1619858/622381901/stock-photo-young-and-happy-woman-eating-healthy-salad-sitting-on-the-table-with-green-fresh-ingredients-indoors-622381901.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/90989/457072177/stock-photo-cheerful-woman-eating-vegetable-salad-457072177.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/345733/318311855/stock-photo-young-woman-eating-salad-at-restaurant-and-texting-on-smartphone-318311855.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/137002/513222982/stock-photo-woman-eating-tasty-salad-in-cafe-513222982.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2104622/357958574/stock-photo-portrait-of-attractive-caucasian-smiling-woman-eating-salad-357958574.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/76219/147994505/stock-photo-happy-woman-relaxing-on-the-sofa-eating-salad-in-her-living-room-147994505.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/437830/500868532/stock-photo-young-woman-eating-salad-and-holding-a-mixed-salad-500868532.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/1619858/622381859/stock-photo-young-and-happy-woman-eating-healthy-salad-sitting-on-the-table-with-green-fresh-ingredients-indoors-622381859.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/437830/306417644/stock-photo-young-woman-eating-salad-and-holding-a-mixed-salad-306417644.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/503397964/stock-photo-face-portrait-of-young-happy-woman-eating-salad-healthy-lifestyle-with-green-food-503397964.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/557818627/stock-photo-healthy-food-healthy-life-style-with-young-woman-eating-salad-isolated-portrait-on-white-557818627.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2418950/533084047/stock-photo-pregnant-woman-eating-organic-fresh-salad-533084047.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1860644/607298564/stock-photo-eating-607298564.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/437830/542791231/stock-photo-young-woman-eating-salad-and-holding-a-mixed-salad-542791231.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/169311892/737651344/stock-photo-healthy-eating-737651344.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/3867728/595918643/stock-photo-healthy-food-fresh-vegetable-salad-beautiful-woman-eating-healthy-ingredient-for-good-health-595918643.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/91282/116541337/stock-photo-close-up-of-pretty-girl-eating-fresh-vegetable-salad-116541337.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/91858/110181626/stock-photo-a-beautiful-girl-eating-healthy-food-110181626.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/2543926/531738652/stock-photo-beautiful-young-asian-girl-eating-salad-smiling-happy-girl-eating-healthy-food-531738652.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/1860644/540110359/stock-photo-eating-540110359.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/90989/704523193/stock-photo-happy-positive-women-drinking-wine-704523193.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1619858/291921743/stock-photo-woman-eating-healthy-salad-from-plastic-container-near-the-river-291921743.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/101595/321940568/stock-photo-closeup-shot-of-young-woman-eating-fresh-salad-at-restaurant-healthy-african-girl-eating-salad-and-321940568.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/735778/460675771/stock-photo-happy-woman-eating-salad-in-bikini-outdoor-460675771.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/256624/600509087/stock-photo-woman-having-breakfast-on-window-600509087.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2711341/618610898/stock-photo-mature-lady-cooking-healthy-food-618610898.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/427951/302211986/stock-photo-young-woman-mixing-fresh-salad-oil-recharge-302211986.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2418950/600370538/stock-photo-beautiful-fit-woman-eating-healthy-salad-after-fitness-workout-600370538.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/580987/564719857/stock-photo-cropped-image-of-young-woman-dressed-in-white-t-shirt-showing-broccoli-to-camera-564719857.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2117717/497250184/stock-photo-women-communication-dinner-together-concept-497250184.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2418950/533084080/stock-photo-woman-eating-healthy-salad-after-working-out-at-home-533084080.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/161139997/584553034/stock-photo-woman-s-hands-with-caesar-salad-on-table-in-restaurant-584553034.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/580987/613494896/stock-photo-happy-pregnant-young-woman-sitting-and-eating-fruit-salad-on-sofa-at-home-613494896.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/156673/692472031/stock-photo-woman-has-healthy-business-lunch-in-modern-office-interior-young-beautiful-businesswoman-at-692472031.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/91858/614415680/stock-photo-healthy-food-at-home-happy-woman-is-preparing-the-vegetables-and-fruit-in-the-kitchen-614415680.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/4020958/570035434/stock-photo-fitness-sports-teen-hide-face-with-salad-healthy-sports-food-concept-570035434.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/270058/197242181/stock-photo-healthy-young-woman-eating-green-salad-197242181.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2117717/526804483/stock-photo-women-communication-dinner-together-concept-526804483.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/586093/545789863/stock-photo-office-job-busy-working-businessman-eating-a-salad-while-working-in-office-545789863.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/322021/152884361/stock-photo-beautiful-healthy-woman-eating-salad-dieting-concept-healthy-lifestyle-152884361.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/1860644/545666941/stock-photo-eating-545666941.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/90989/457072180/stock-photo-positive-smiling-woman-eating-salad-457072180.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/254635/673823893/stock-photo-young-woman-cooking-vegetable-salad-673823893.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/330511/149315039/stock-photo-woman-diet-concept-portrait-female-model-hold-green-salad-isolated-portrait-149315039.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/218353/296148656/stock-photo-pretty-woman-taking-a-picture-of-her-healthy-food-296148656.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1860644/540185563/stock-photo-eating-540185563.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/111616/122347225/stock-photo-young-funny-woman-eating-salad-over-white-background-122347225.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/511733434/stock-photo-healthy-food-healthy-life-style-with-young-woman-eating-salad-isolated-portrait-on-white-511733434.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/210376/193640225/stock-photo-young-woman-eating-a-healthy-salad-193640225.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/124564/666032644/stock-photo-young-woman-is-eating-salad-because-she-being-on-vegetable-diet-at-home-666032644.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1207733/528795088/stock-photo-young-woman-cooking-in-the-kitchen-healthy-food-528795088.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/52959/246734332/stock-photo-beautiful-healthy-woman-eating-lettuce-246734332.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/64260/268998200/stock-photo-healthy-eating-dieting-and-people-concept-close-up-of-young-woman-hands-showing-salad-bowl-at-268998200.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/4187011/409883299/stock-photo-eat-409883299.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/427951/314697827/stock-photo-young-woman-eating-fresh-salad-in-modern-kitchen-314697827.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/437830/309513473/stock-photo-young-woman-eating-salad-and-holding-a-mixed-salad-309513473.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/875983/188281055/stock-photo-woman-smiling-and-eating-salad-in-front-of-a-window-188281055.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/696460/655400392/stock-photo-happy-woman-with-plate-of-vegetables-655400392.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/437830/339249407/stock-photo-young-woman-eating-salad-and-holding-a-mixed-salad-339249407.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/137002/398747407/stock-photo-pregnant-woman-holding-glass-bowl-with-fresh-salad-398747407.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/137278037/stock-photo-woman-diet-concept-portrait-female-model-hold-green-salad-isolated-portrait-137278037.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/158350/604342055/stock-photo-fit-woman-eating-healthy-salad-after-workout-604342055.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/854635/647714542/stock-vector-sad-girl-eating-diet-food-dreaming-of-cake-647714542.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/64260/494862055/stock-photo-pregnancy-healthy-food-and-people-concept-happy-pregnant-woman-eating-vegetable-salad-for-494862055.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/64260/280126973/stock-photo-healthy-eating-dieting-and-people-concept-close-up-of-young-woman-eating-vegetable-salad-at-home-280126973.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/137277953/stock-photo-woman-close-up-smiling-face-diet-food-concept-137277953.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/707224/639464032/stock-photo-charming-beautiful-tan-skin-sporty-asian-woman-with-exercise-suit-hand-hold-fork-and-salad-bowl-639464032.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/120550/556528951/stock-photo-young-woman-eating-mixed-salad-in-kitchen-556528951.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/287881/117848083/stock-photo-portrait-of-healthy-woman-eating-salad-indoor-117848083.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/584183860/stock-photo-casual-dressed-woman-eating-salad-isolated-studio-portrait-long-hair-smiling-girl-584183860.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/696460/626574635/stock-photo-displeased-young-woman-eating-green-leaf-lettuce-tired-of-diet-restrictions-626574635.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/4187011/592178801/stock-photo-woman-eating-salad-592178801.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1619858/622381898/stock-photo-young-and-happy-woman-eating-healthy-salad-sitting-on-the-table-with-green-fresh-ingredients-indoors-622381898.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/101595/342626339/stock-photo-closeup-shot-of-young-woman-eating-salad-with-her-friend-african-girl-smiling-at-lunch-lughing-342626339.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/427951/622785371/stock-photo-young-woman-holding-grocery-shopping-bag-with-vegetables-standing-in-the-kitchen-622785371.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/97565/220432426/stock-photo-business-woman-eating-salad-on-lunch-break-in-city-park-living-healthy-lifestyle-happy-smiling-220432426.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/2247890/569322193/stock-photo-healthy-woman-with-salad-on-white-background-isolated-healthy-lifestyle-569322193.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/137002/615383603/stock-photo-young-beautiful-woman-eating-salad-on-white-background-615383603.jpg',
'https://thumb7.shutterstock.com/display_pic_with_logo/4187011/592178831/stock-photo-woman-eating-salad-592178831.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/330511/522519847/stock-photo-face-close-up-portrait-of-happy-woman-eating-salad-vegan-life-style-isolated-portrait-522519847.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/788683/550631314/stock-photo-young-woman-eating-a-healthy-fruit-salad-after-workout-fitness-and-healthy-lifestyle-concept-550631314.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1721545/608083310/stock-photo-happy-young-woman-eating-salad-608083310.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/156673/585745388/stock-photo-woman-eating-healthy-business-lunch-in-modern-office-interior-young-beautiful-businesswoman-at-585745388.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/162908094/606319436/stock-photo-woman-eating-salad-looking-at-camera-606319436.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/1207733/608213054/stock-photo-young-woman-cooking-in-the-kitchen-healthy-food-608213054.jpg',
'https://thumb1.shutterstock.com/display_pic_with_logo/67766/608546498/stock-photo-young-arab-family-in-the-kitchen-608546498.jpg',
'https://thumb9.shutterstock.com/display_pic_with_logo/2247890/604664126/stock-photo-happy-healthy-woman-with-salad-isolated-healthy-lifestyle-604664126.jpg'
]
| 133.792
| 205
| 0.815236
| 2,383
| 16,724
| 5.588334
| 0.16324
| 0.112638
| 0.165202
| 0.18773
| 0.582338
| 0.555906
| 0.540737
| 0.506345
| 0.497184
| 0.299542
| 0
| 0.156638
| 0.036116
| 16,724
| 124
| 206
| 134.870968
| 0.669479
| 0.00281
| 0
| 0
| 0
| 0.869565
| 0.926592
| 0.004318
| 0
| 0
| 0
| 0
| 0.008696
| 1
| 0.017391
| false
| 0
| 0.034783
| 0
| 0.052174
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
42fa91b415dd1a800844713143cf9da77424fe6f
| 1,955
|
py
|
Python
|
10.18/10.18/10.18.py
|
dander521/Python_Learning
|
0800a361f0b32db486cdcf3c8b449828e8e89b00
|
[
"MIT"
] | null | null | null |
10.18/10.18/10.18.py
|
dander521/Python_Learning
|
0800a361f0b32db486cdcf3c8b449828e8e89b00
|
[
"MIT"
] | null | null | null |
10.18/10.18/10.18.py
|
dander521/Python_Learning
|
0800a361f0b32db486cdcf3c8b449828e8e89b00
|
[
"MIT"
] | null | null | null |
#coding:utf-8
# 基本数据类型
counter = 100
miles = 1000.0
name = 'runoob'
print counter
print miles
print name
# a = b = c = 1
# aa, bb, cc = 1, 2, 'runoob'
# 标准数据类型
# Number
print ('------------------------Number----------------------------')
a, b, c, d = 20, 5.5, True, 4+3j
print(type(a), type(b), type(c), type(d))
print(isinstance(a, int))
# type()不会认为子类是一种父类类型。
# isinstance()会认为子类是一种父类类型。
print(5 + 4)
print(5 - 4)
print(5 * 4)
print(2 / 4)
print(2 // 4)
print(5 % 4)
print(5 ** 4)
# 复数由实数部分和虚数部分构成,可以用a + bj,或者complex(a,b)表示, 复数的实部a和虚部b都是浮点型
print ('------------------------Number----------------------------\n\n')
# String
print ('--------------------------String--------------------------')
str = 'Runoob'
print str
print(str[0:-1])
print(str[0])
print(str[2:5])
print(str[2:])
print(str * 2)
print(str + 'Test')
print('Run\noob')
print ('--------------------------String-------------------------\n\n')
# List
print ('-------------------------List---------------------------')
list = ['abcd', 786, 2.33, 'runoob', 'ssdsdf']
tinylist = [123, 'runoob']
print(list)
print(list[0])
print(list[2:-1])
print(list[1:3])
print(tinylist * 2)
print(list + tinylist)
list[0] = 233.555
print(list)
print ('-------------------------List---------------------------\n\n')
# Tuple
print ('---------------------------Tuple-------------------------')
tuple = ('abcd', 898, 22.32, 'runoob', 'uhku')
tinyTuple = ('a', 23)
print(tuple)
print(tuple[0])
print(tuple[1:3])
print(tuple[2:])
print(tinyTuple * 2)
print(tuple + tinyTuple)
print ('-----------------------------Tuple-----------------------\n\n')
# Sets
print ('----------------------------Sets------------------------')
student = {'Tom', 'Jim', 'Mary', 'Tom'}
print student
print ('----------------------------Sets------------------------\n\n')
# Dictionary
print ('----------------------------------------------------')
print ('----------------------------------------------------\n\n')
| 20.154639
| 72
| 0.421483
| 221
| 1,955
| 3.728507
| 0.307692
| 0.087379
| 0.042476
| 0.058252
| 0.091019
| 0.049757
| 0.049757
| 0
| 0
| 0
| 0
| 0.043029
| 0.10844
| 1,955
| 96
| 73
| 20.364583
| 0.429719
| 0.109974
| 0
| 0.035088
| 0
| 0
| 0.446957
| 0.404058
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.807018
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6e1f15fc461a037af0fa467f8a1b77aaba4abe69
| 1,142
|
py
|
Python
|
test_QA/browser/test_Web_Server.py
|
pbx-gs/OSBot_browser
|
029d0d872a13b537ee0a99db3ed8b5ce9a50ce65
|
[
"Apache-2.0"
] | null | null | null |
test_QA/browser/test_Web_Server.py
|
pbx-gs/OSBot_browser
|
029d0d872a13b537ee0a99db3ed8b5ce9a50ce65
|
[
"Apache-2.0"
] | 4
|
2021-02-17T00:33:39.000Z
|
2021-02-26T01:51:08.000Z
|
test_QA/browser/test_Web_Server.py
|
pbx-gs/OSBot_browser
|
029d0d872a13b537ee0a99db3ed8b5ce9a50ce65
|
[
"Apache-2.0"
] | 3
|
2021-02-17T01:04:49.000Z
|
2021-04-30T06:27:11.000Z
|
import sys ; sys.path.append('../osbot_browser')
from unittest import TestCase
from osbot_browser.browser.Web_Server import Web_Server
class Test_Web_Server(TestCase):
def setUp(self):
self.web_server = Web_Server()
self.web_server.start()
def tearDown(self):
self.web_server.stop()
def test_path_to_file(self):
assert self.web_server.path_to_file('' ) == '/tmp/temp_web_server/html'
assert self.web_server.path_to_file('/123456' ) == '/tmp/temp_web_server/html/123456'
assert self.web_server.path_to_file('bbbb.html' ) == '/tmp/temp_web_server/html/bbbb.html'
assert self.web_server.path_to_file('aaa/bbb/ccc.html') == '/tmp/temp_web_server/html/aaa/bbb/ccc.html'
assert self.web_server.path_to_file('../../abc.html' ) == '/tmp/abc.html' # path traversal vulnerability
assert self.web_server.path_to_file('..\\..\\abc.html') == '/tmp/temp_web_server/html/..\\..\\abc.html'
def test_start_server(self):
html = self.web_server.html('')
assert '</html>' in html
| 43.923077
| 145
| 0.635727
| 157
| 1,142
| 4.343949
| 0.216561
| 0.250733
| 0.190616
| 0.167155
| 0.450147
| 0.397361
| 0.302053
| 0.217009
| 0.11437
| 0.11437
| 0
| 0.013423
| 0.217163
| 1,142
| 26
| 146
| 43.923077
| 0.749441
| 0.024518
| 0
| 0
| 0
| 0
| 0.246181
| 0.158131
| 0
| 0
| 0
| 0
| 0.368421
| 1
| 0.210526
| false
| 0
| 0.157895
| 0
| 0.421053
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6e2b2dd746d6c7f21ef6cc6f9296860bebd0c052
| 157
|
py
|
Python
|
autumn-rpc/cross-lang/python/autumn_rpc/exception.py
|
DeepAQ/Autumn
|
1b118c37ec1f0359eb5323beb2f1f3c132fa8e67
|
[
"Apache-2.0"
] | 61
|
2018-04-08T15:12:56.000Z
|
2021-08-16T02:42:09.000Z
|
autumn-rpc/cross-lang/python/autumn_rpc/exception.py
|
DeepAQ/Autumn
|
1b118c37ec1f0359eb5323beb2f1f3c132fa8e67
|
[
"Apache-2.0"
] | 3
|
2019-03-14T05:20:25.000Z
|
2019-08-28T21:43:49.000Z
|
autumn-rpc/cross-lang/python/autumn_rpc/exception.py
|
DeepAQ/Autumn
|
1b118c37ec1f0359eb5323beb2f1f3c132fa8e67
|
[
"Apache-2.0"
] | 18
|
2018-07-11T06:05:26.000Z
|
2021-08-16T02:41:42.000Z
|
# coding=utf-8
class AutumnInvokeException(Exception):
pass
class InvocationTargetException(Exception):
pass
if __name__ == '__main__':
pass
| 13.083333
| 43
| 0.726115
| 15
| 157
| 7.066667
| 0.733333
| 0.245283
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007813
| 0.184713
| 157
| 11
| 44
| 14.272727
| 0.820313
| 0.076433
| 0
| 0.5
| 0
| 0
| 0.055944
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
282581561a5d47392ee99bb9f70a9811b7d8a2c2
| 80
|
py
|
Python
|
June21/ClassesandObjects/somewhatreal.py
|
pythonbykhaja/intesivepython
|
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
|
[
"Apache-2.0"
] | 2
|
2021-05-29T18:21:50.000Z
|
2021-07-24T13:03:30.000Z
|
June21/ClassesandObjects/somewhatreal.py
|
pythonbykhaja/intesivepython
|
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
|
[
"Apache-2.0"
] | null | null | null |
June21/ClassesandObjects/somewhatreal.py
|
pythonbykhaja/intesivepython
|
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
|
[
"Apache-2.0"
] | 2
|
2021-05-25T10:19:54.000Z
|
2021-09-21T12:20:48.000Z
|
# I Want to design classes for the Movie Ticketing Platform
# Classes will be
#
| 26.666667
| 59
| 0.7625
| 13
| 80
| 4.692308
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 80
| 3
| 60
| 26.666667
| 0.953125
| 0.9125
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
28613b4a01bf777381da66e8b6f90f56ba685ee9
| 489
|
py
|
Python
|
APIWidgets/APIWidget.py
|
UntriexTv/favorable-fishers
|
e8aa4f83982fb43a36bb150cc749db03d361a58e
|
[
"MIT"
] | 2
|
2021-07-09T15:07:59.000Z
|
2021-07-10T08:51:03.000Z
|
APIWidgets/APIWidget.py
|
UntriexTv/favorable-fishers
|
e8aa4f83982fb43a36bb150cc749db03d361a58e
|
[
"MIT"
] | null | null | null |
APIWidgets/APIWidget.py
|
UntriexTv/favorable-fishers
|
e8aa4f83982fb43a36bb150cc749db03d361a58e
|
[
"MIT"
] | 2
|
2021-07-12T09:16:23.000Z
|
2021-07-31T20:19:37.000Z
|
from asciimatics.widgets import Frame
class APIWidget():
"""
Interface that widgets must implement
"""
def __init__(self, screen, height,width):
pass
# defines the tile layout
def createTile(self,screen, height, width) -> Frame:
pass
# TODO: not yet implemented in dashboard
def create_detail_view(self) -> Frame:
pass
def fetch_data(self):
pass
def set_API_parameters(self):
pass
| 21.26087
| 57
| 0.603272
| 55
| 489
| 5.2
| 0.672727
| 0.06993
| 0.111888
| 0.146853
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.319018
| 489
| 22
| 58
| 22.227273
| 0.858859
| 0.206544
| 0
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0
| 1
| 0.416667
| false
| 0.416667
| 0.083333
| 0
| 0.583333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
2886e82b2f48206dd5bd6794e6e68daebdd18462
| 259
|
py
|
Python
|
MinStack/test.py
|
rmccorm4/Data-Structures
|
d4ae969131aaa7d5a78445e731eaa45bc266e7f2
|
[
"MIT"
] | null | null | null |
MinStack/test.py
|
rmccorm4/Data-Structures
|
d4ae969131aaa7d5a78445e731eaa45bc266e7f2
|
[
"MIT"
] | null | null | null |
MinStack/test.py
|
rmccorm4/Data-Structures
|
d4ae969131aaa7d5a78445e731eaa45bc266e7f2
|
[
"MIT"
] | null | null | null |
from MinStack import MinStack
minStack = MinStack();
minStack.push(-2);
minStack.push(0);
minStack.push(-3);
print(minStack.getMin()); # --> Returns -3.
minStack.pop();
print(minStack.top()); # --> Returns 0.
print(minStack.getMin()); # --> Returns -2.
| 25.9
| 44
| 0.656371
| 32
| 259
| 5.3125
| 0.375
| 0.282353
| 0.282353
| 0.305882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026432
| 0.123552
| 259
| 9
| 45
| 28.777778
| 0.722467
| 0.177606
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.111111
| 0.333333
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2891d3eac2b3e206cf307101bc9620776fff1cc4
| 559
|
py
|
Python
|
tests/kyu_8_tests/test_sum_of_positive.py
|
simonporter007/codewars-python-solutions
|
f05799f902b0fa10c5e3a28055bf07758c289087
|
[
"MIT"
] | null | null | null |
tests/kyu_8_tests/test_sum_of_positive.py
|
simonporter007/codewars-python-solutions
|
f05799f902b0fa10c5e3a28055bf07758c289087
|
[
"MIT"
] | null | null | null |
tests/kyu_8_tests/test_sum_of_positive.py
|
simonporter007/codewars-python-solutions
|
f05799f902b0fa10c5e3a28055bf07758c289087
|
[
"MIT"
] | null | null | null |
import unittest
from katas.kyu_8.sum_of_positive import positive_sum
class PositiveSumTestCases(unittest.TestCase):
def test_equals(self):
self.assertEqual(positive_sum([1, 2, 3, 4, 5]), 15)
def test_equals_2(self):
self.assertEqual(positive_sum([1, -2, 3, 4, 5]), 13)
def test_equals_3(self):
self.assertEqual(positive_sum([-1, 2, 3, 4, -5]), 9)
def test_equals_4(self):
self.assertEqual(positive_sum([]), 0)
def test_equals_5(self):
self.assertEqual(positive_sum([-1, -2, -3, -4, -5]), 0)
| 25.409091
| 63
| 0.647585
| 85
| 559
| 4.047059
| 0.305882
| 0.19186
| 0.188953
| 0.392442
| 0.494186
| 0.406977
| 0.406977
| 0.406977
| 0.406977
| 0.406977
| 0
| 0.071588
| 0.200358
| 559
| 21
| 64
| 26.619048
| 0.697987
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.384615
| 1
| 0.384615
| false
| 0
| 0.153846
| 0
| 0.615385
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
955a76f938c33b37b7ca4ecf42fcc164ae52f790
| 2,807
|
py
|
Python
|
fringe.py
|
samuelmasuy/ai-search
|
79b42a9355399d8b10df7f24c1095c84f96e4e08
|
[
"MIT"
] | null | null | null |
fringe.py
|
samuelmasuy/ai-search
|
79b42a9355399d8b10df7f24c1095c84f96e4e08
|
[
"MIT"
] | null | null | null |
fringe.py
|
samuelmasuy/ai-search
|
79b42a9355399d8b10df7f24c1095c84f96e4e08
|
[
"MIT"
] | null | null | null |
"""
Fringe defintion and Fringe specific definition for each algorithm.
"""
from collections import deque
from Queue import PriorityQueue
class Fringe(object):
"""Define base operation of the fringe"""
def __init__(self, goal, fringe):
self.fringe = fringe
self.goal = goal
def is_not_empty(self):
"""Check if the fringe is not empty"""
pass
def get(self):
"""Get first element of the fringe."""
pass
def put(self, parent, child):
"""Add element to the fringe."""
pass
class AStarFringe(Fringe):
"""
Define fringe for a* algorithm.
We use a PriorityQueue as the fringe data structure.
"""
def __init__(self, start, goal):
super(AStarFringe, self).__init__(goal, PriorityQueue())
start.cost = start.h(self.goal)
start.total_cost = 0
self.fringe.put((start.cost, start))
def is_not_empty(self):
return self.fringe.qsize() != 0
def get(self):
return self.fringe.get()[1]
def put(self, parent, child):
# get heuristic value
child.cost = child.h(self.goal)
child.total_cost = child.cost + child.parent.total_cost
self.fringe.put((child.total_cost, child))
class BestFringe(Fringe):
"""
Define fringe for best first search algorithm.
We use a PriorityQueue as the fringe data structure.
"""
def __init__(self, start, goal):
super(BestFringe, self).__init__(goal, PriorityQueue())
start.cost = start.h(self.goal)
self.fringe.put((start.cost, start))
def is_not_empty(self):
return self.fringe.qsize() != 0
def get(self):
return self.fringe.get()[1]
def put(self, parent, child):
child.cost = child.h(self.goal)
self.fringe.put((child.cost, child))
class DFSFringe(Fringe):
"""
Define fringe for depth first search algorithm.
We use a deque as the fringe data structure.
"""
def __init__(self, start, goal):
super(DFSFringe, self).__init__(goal, deque())
self.fringe.append(start)
def is_not_empty(self):
return len(self.fringe) != 0
def get(self):
return self.fringe.popleft()
def put(self, parent, child):
self.fringe.appendleft(child) # prepend element to the deque.
class BFSFringe(Fringe):
"""
Define fringe for breath first search algorithm.
We use a deque as the fringe data structure.
"""
def __init__(self, start, goal):
super(BFSFringe, self).__init__(goal, deque())
self.fringe.append(start)
def is_not_empty(self):
return len(self.fringe) != 0
def get(self):
return self.fringe.popleft()
def put(self, parent, child):
self.fringe.append(child)
| 24.840708
| 70
| 0.624154
| 365
| 2,807
| 4.663014
| 0.189041
| 0.099882
| 0.035253
| 0.070505
| 0.60517
| 0.582844
| 0.541716
| 0.541716
| 0.541716
| 0.541716
| 0
| 0.003369
| 0.259708
| 2,807
| 112
| 71
| 25.0625
| 0.815688
| 0.22052
| 0
| 0.655172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.344828
| false
| 0.051724
| 0.034483
| 0.137931
| 0.603448
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.