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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d8a2261fc5bc901a922af4a7c07416495077fb4d
| 92
|
py
|
Python
|
coingate/apps.py
|
glitzybunny/coingate_sandbox_payment
|
f5686964cdd6b7d65f9f37957da4b2cda6a02f63
|
[
"MIT"
] | 2
|
2020-08-31T17:53:06.000Z
|
2020-08-31T18:33:05.000Z
|
coingate/apps.py
|
glitzybunny/coingate_sandbox_payment
|
f5686964cdd6b7d65f9f37957da4b2cda6a02f63
|
[
"MIT"
] | 5
|
2021-03-30T12:48:17.000Z
|
2021-09-22T18:32:14.000Z
|
coingate/apps.py
|
glitzybunny/coingate_sandbox_payment
|
f5686964cdd6b7d65f9f37957da4b2cda6a02f63
|
[
"MIT"
] | 1
|
2020-11-04T04:42:58.000Z
|
2020-11-04T04:42:58.000Z
|
from django.apps import AppConfig
class CoingateConfig(AppConfig):
name = 'coingate'
| 13.142857
| 33
| 0.75
| 10
| 92
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 92
| 6
| 34
| 15.333333
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d8f8c4f56c00c22ea645596a47304f281d7b7652
| 834
|
py
|
Python
|
aulaClasses/ex001.py
|
lalapapauhuh/Python
|
1454263b46d66a0b19b7a2fd1b465800fe95a2c8
|
[
"MIT"
] | null | null | null |
aulaClasses/ex001.py
|
lalapapauhuh/Python
|
1454263b46d66a0b19b7a2fd1b465800fe95a2c8
|
[
"MIT"
] | null | null | null |
aulaClasses/ex001.py
|
lalapapauhuh/Python
|
1454263b46d66a0b19b7a2fd1b465800fe95a2c8
|
[
"MIT"
] | null | null | null |
'''Classe Bola: Crie uma classe que modele uma bola:
Atributos: Cor, marca, material
Métodos: trocaCor e mostraCor'''
class Bola:
def __init__(self, cor, marca, material):
self.cor = cor
self.marca = marca
self.material = material
def getCor(self):
return self.cor
def getMarca(self):
return self.marca
def getMaterial(self):
return self.material
def __str__(self):
return 'Cor: '+ str(self.cor) + ', Marca: '+ str(self.marca) + ', Material: ' + str(self.material)
def trocaCor(self, nova_cor):
self.cor = nova_cor
return self.cor
bola1 = Bola('Vermelha', 'Adidas', 'Couro')
bola2 = Bola('Verde', 'Brinquedo', 'Plastico')
bola3 = Bola('Branca', 'Penalty', 'Couro')
print(bola1)
bola1.trocaCor('Azul')
print(bola1)
| 24.529412
| 106
| 0.613909
| 102
| 834
| 4.921569
| 0.362745
| 0.083665
| 0.083665
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009585
| 0.2494
| 834
| 34
| 107
| 24.529412
| 0.792332
| 0.134293
| 0
| 0.181818
| 0
| 0
| 0.124128
| 0
| 0
| 0
| 0
| 0.029412
| 0
| 1
| 0.272727
| false
| 0
| 0
| 0.181818
| 0.545455
| 0.090909
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
2b1ec4fe936e79d22b87038b7792343c6480748e
| 75
|
py
|
Python
|
source/application/helper/extensions.py
|
wangkexiong/flask4gae
|
dcefb49dce51be6b716352c1d3021fe8e501e5ff
|
[
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1
|
2016-08-17T04:35:45.000Z
|
2016-08-17T04:35:45.000Z
|
source/application/helper/extensions.py
|
wangkexiong/flask4gae
|
dcefb49dce51be6b716352c1d3021fe8e501e5ff
|
[
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
source/application/helper/extensions.py
|
wangkexiong/flask4gae
|
dcefb49dce51be6b716352c1d3021fe8e501e5ff
|
[
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
# -*- coding=utf-8 -*-
from flask.ext.cache import Cache
cache = Cache()
| 12.5
| 33
| 0.64
| 11
| 75
| 4.363636
| 0.727273
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.173333
| 75
| 5
| 34
| 15
| 0.758065
| 0.266667
| 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
|
2b678a59f347a8b6b2d4838ae81099a153e9ad38
| 65
|
py
|
Python
|
orbitdbviewer/__init__.py
|
phillmac/py-orbit-db-viewer
|
2532bd56771fad68e0e8752b5ce9163562fe71a1
|
[
"MIT"
] | null | null | null |
orbitdbviewer/__init__.py
|
phillmac/py-orbit-db-viewer
|
2532bd56771fad68e0e8752b5ce9163562fe71a1
|
[
"MIT"
] | null | null | null |
orbitdbviewer/__init__.py
|
phillmac/py-orbit-db-viewer
|
2532bd56771fad68e0e8752b5ce9163562fe71a1
|
[
"MIT"
] | null | null | null |
from .version import version, version_info
__version__ = version
| 21.666667
| 42
| 0.830769
| 8
| 65
| 6.125
| 0.5
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123077
| 65
| 3
| 43
| 21.666667
| 0.859649
| 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
|
2b69d80c3f09732b89cb04fb5f73469f08029fe8
| 312
|
py
|
Python
|
ibug/face_pose_augmentation/face_pose_augmentor.py
|
ibug-group/face_pose_augmentation
|
96df817c194854bba261893703d26502feec1c22
|
[
"MIT"
] | 3
|
2021-03-22T11:58:18.000Z
|
2022-03-11T20:29:22.000Z
|
ibug/face_pose_augmentation/face_pose_augmentor.py
|
ibug-group/face_pose_augmentation
|
96df817c194854bba261893703d26502feec1c22
|
[
"MIT"
] | null | null | null |
ibug/face_pose_augmentation/face_pose_augmentor.py
|
ibug-group/face_pose_augmentation
|
96df817c194854bba261893703d26502feec1c22
|
[
"MIT"
] | 1
|
2022-03-11T20:28:45.000Z
|
2022-03-11T20:28:45.000Z
|
from scipy.interpolate import interp1d
from .fpa import generate_profile_faces, retrieve_contour_landmark_aug
__all__ = ['FacePoseAugmentor']
class FacePoseAugmentor(object):
def __init__(self) -> None:
pass
def __call__(self, image, tddfa_result, delta_poses, landmarks=None):
pass
| 22.285714
| 73
| 0.746795
| 36
| 312
| 5.944444
| 0.805556
| 0.074766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003891
| 0.176282
| 312
| 13
| 74
| 24
| 0.828794
| 0
| 0
| 0.25
| 1
| 0
| 0.054487
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.625
| 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
|
2b6f41d5d69e3451e5875528e97c802cad67ef04
| 401
|
py
|
Python
|
penkins/controller/projects.py
|
penkins/penkins_ci
|
668606b505d02eed7fbe65604655e140ab60d6dd
|
[
"Apache-2.0"
] | 2
|
2015-04-03T19:12:46.000Z
|
2016-04-06T09:49:17.000Z
|
penkins/controller/projects.py
|
penkins/penkins_ci
|
668606b505d02eed7fbe65604655e140ab60d6dd
|
[
"Apache-2.0"
] | 5
|
2015-02-25T19:22:47.000Z
|
2019-02-09T08:48:00.000Z
|
penkins/controller/projects.py
|
penkins/penkins_ci
|
668606b505d02eed7fbe65604655e140ab60d6dd
|
[
"Apache-2.0"
] | 1
|
2016-04-06T09:49:19.000Z
|
2016-04-06T09:49:19.000Z
|
import re
from penkins.db import db, Query
class Projects(object):
def get_all(self):
return db.all()
def is_exists(self, name):
return False if len(db.search(Query().name == name)) == 0 else True
def get(self):
pass
def validate_name(self, name):
pattern = re.compile(r'^[a-zA-Z0-9]{1,32}$')
return True if pattern.match(name) else False
| 21.105263
| 75
| 0.610973
| 62
| 401
| 3.903226
| 0.580645
| 0.049587
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020134
| 0.256858
| 401
| 18
| 76
| 22.277778
| 0.791946
| 0
| 0
| 0
| 0
| 0
| 0.0475
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.083333
| 0.166667
| 0.166667
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
9947098e5b5b9a6705f3ff0b4c444a9931f4bb6d
| 351
|
py
|
Python
|
mria_py/__init__.py
|
ElcoK/MRIA
|
ce4fc1665004506c43320f968b1f1c435af5bc59
|
[
"MIT"
] | null | null | null |
mria_py/__init__.py
|
ElcoK/MRIA
|
ce4fc1665004506c43320f968b1f1c435af5bc59
|
[
"MIT"
] | null | null | null |
mria_py/__init__.py
|
ElcoK/MRIA
|
ce4fc1665004506c43320f968b1f1c435af5bc59
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 5 14:43:30 2017
@author: elcok
"""
__all__ = ['model','table','gams','visualize','uncertainty','basics']
from mria_py.core import model
from mria_py.core import table
from mria_py.core import gams
from mria_py.core import visualize
from mria_py.core import basics
from mria_py.core import uncertainty
| 23.4
| 69
| 0.740741
| 57
| 351
| 4.385965
| 0.45614
| 0.192
| 0.24
| 0.336
| 0.528
| 0.208
| 0
| 0
| 0
| 0
| 0
| 0.039344
| 0.131054
| 351
| 15
| 70
| 23.4
| 0.780328
| 0.210826
| 0
| 0
| 0
| 0
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.857143
| 0
| 0.857143
| 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
|
9956967ddd7e2bf343479e00871e234e9e816671
| 35
|
py
|
Python
|
tests/__init__.py
|
swingerman/ha-dual-thermostat
|
fccd85d56b62d652b3ebbd9fb3c54d58a72fdb00
|
[
"Apache-2.0",
"MIT"
] | 1
|
2020-09-15T15:32:12.000Z
|
2020-09-15T15:32:12.000Z
|
tests/__init__.py
|
swingerman/ha-dual-climate
|
3e863eb1ad57021ba4d93decc3720d9cae91f607
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
tests/__init__.py
|
swingerman/ha-dual-climate
|
3e863eb1ad57021ba4d93decc3720d9cae91f607
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
"""dual_smart_thermostat tests."""
| 17.5
| 34
| 0.742857
| 4
| 35
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 35
| 1
| 35
| 35
| 0.727273
| 0.8
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9978affaf72b1fe78897d2f4fa6d6c3b01da42e0
| 149
|
py
|
Python
|
FeatureFileProcessor/exceptions/no_data_file_exception.py
|
JoaoGFarias/CucumberWithDataSauce
|
36b55c485fae8a4e2b9e0b84351eab87785cebd8
|
[
"MIT"
] | null | null | null |
FeatureFileProcessor/exceptions/no_data_file_exception.py
|
JoaoGFarias/CucumberWithDataSauce
|
36b55c485fae8a4e2b9e0b84351eab87785cebd8
|
[
"MIT"
] | 33
|
2018-02-04T02:03:03.000Z
|
2018-03-27T01:58:30.000Z
|
FeatureFileProcessor/exceptions/no_data_file_exception.py
|
JoaoGFarias/CucumberWithDataSauce
|
36b55c485fae8a4e2b9e0b84351eab87785cebd8
|
[
"MIT"
] | 1
|
2019-04-22T14:25:54.000Z
|
2019-04-22T14:25:54.000Z
|
class NoDataFileException(Exception):
def __init__(self, message="No data file", errors=[]):
super().__init__(message, errors)
pass
| 24.833333
| 58
| 0.677852
| 16
| 149
| 5.8125
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.187919
| 149
| 5
| 59
| 29.8
| 0.768595
| 0
| 0
| 0
| 0
| 0
| 0.080537
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
9997f5cf3fb16aebb5967610c22aff8ef7faf303
| 1,364
|
py
|
Python
|
week11/lab/counter.py
|
taoyichen/CS110-Assignments-Python
|
f2e4e485c820b835981e2e4b8bd0a26cc31cfe73
|
[
"MIT"
] | null | null | null |
week11/lab/counter.py
|
taoyichen/CS110-Assignments-Python
|
f2e4e485c820b835981e2e4b8bd0a26cc31cfe73
|
[
"MIT"
] | null | null | null |
week11/lab/counter.py
|
taoyichen/CS110-Assignments-Python
|
f2e4e485c820b835981e2e4b8bd0a26cc31cfe73
|
[
"MIT"
] | 1
|
2020-06-06T08:21:18.000Z
|
2020-06-06T08:21:18.000Z
|
'''
Models simple up/down counter that maintains a single count
Methods:
get_count()
incrememt()
decrement()
set()
reset()
'to_string'
'''
## Start your class with the keyword 'class' and the name of the class:
class Counter:
#----------------------------------------------------------------------------
# Constructor
## This method creates the object in a valid state
def __init__(self):
## Initialize the instance variable that represents the count
self.__count = 0
#----------------------------------------------------------------------------
# Accessors
## return the information about the state of the object
# return current value of count
def get_count(self):
## Your code here
return self.__count
#----------------------------------------------------------------------------
# Mutators
def increment(self):
## Your code here
self.__count +=1
# Does NOT stop at 0
def decrement(self):
## Your code here
self.__count -=1
def set_count(self, value):
## Your code here
self.__count = value
def reset(self):
## Your code here
self.__count = 0
#----------------------------------------------------------------------------
# 'toString'
# String representation of object's current state
def __str__(self):
return "Count = %d" % (self.__count)
| 26.745098
| 81
| 0.505865
| 143
| 1,364
| 4.643357
| 0.440559
| 0.09488
| 0.090361
| 0.096386
| 0.14759
| 0.115964
| 0.078313
| 0
| 0
| 0
| 0
| 0.004575
| 0.19868
| 1,364
| 50
| 82
| 27.28
| 0.602928
| 0.653959
| 0
| 0.133333
| 0
| 0
| 0.022989
| 0
| 0
| 0
| 0
| 0.02
| 0
| 1
| 0.466667
| false
| 0
| 0
| 0.133333
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
99a177ae114db162ad692d9c7d3453285f73b284
| 24,777
|
py
|
Python
|
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py
|
vincenttran-msft/azure-sdk-for-python
|
348b56f9f03eeb3f7b502eed51daf494ffff874d
|
[
"MIT"
] | 1
|
2022-02-01T18:50:12.000Z
|
2022-02-01T18:50:12.000Z
|
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py
|
vincenttran-msft/azure-sdk-for-python
|
348b56f9f03eeb3f7b502eed51daf494ffff874d
|
[
"MIT"
] | null | null | null |
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py
|
vincenttran-msft/azure-sdk-for-python
|
348b56f9f03eeb3f7b502eed51daf494ffff874d
|
[
"MIT"
] | null | null | null |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import datetime
from typing import Dict, List, Optional, Union
from azure.core.exceptions import HttpResponseError
import msrest.serialization
from ._monitor_management_client_enums import *
class ErrorResponse(msrest.serialization.Model):
"""Describes the format of Error response.
:ivar code: Error code.
:vartype code: str
:ivar message: Error message indicating why the operation failed.
:vartype message: str
"""
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(
self,
*,
code: Optional[str] = None,
message: Optional[str] = None,
**kwargs
):
"""
:keyword code: Error code.
:paramtype code: str
:keyword message: Error message indicating why the operation failed.
:paramtype message: str
"""
super(ErrorResponse, self).__init__(**kwargs)
self.code = code
self.message = message
class LocalizableString(msrest.serialization.Model):
"""The localizable string class.
All required parameters must be populated in order to send to Azure.
:ivar value: Required. the invariant value.
:vartype value: str
:ivar localized_value: the locale specific value.
:vartype localized_value: str
"""
_validation = {
'value': {'required': True},
}
_attribute_map = {
'value': {'key': 'value', 'type': 'str'},
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}
def __init__(
self,
*,
value: str,
localized_value: Optional[str] = None,
**kwargs
):
"""
:keyword value: Required. the invariant value.
:paramtype value: str
:keyword localized_value: the locale specific value.
:paramtype localized_value: str
"""
super(LocalizableString, self).__init__(**kwargs)
self.value = value
self.localized_value = localized_value
class LogSettings(msrest.serialization.Model):
"""Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
All required parameters must be populated in order to send to Azure.
:ivar category: Name of a Diagnostic Log category for a resource type this setting is applied
to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET
diagnostic settings operation.
:vartype category: str
:ivar enabled: Required. a value indicating whether this log is enabled.
:vartype enabled: bool
:ivar retention_policy: the retention policy for this log.
:vartype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy
"""
_validation = {
'enabled': {'required': True},
}
_attribute_map = {
'category': {'key': 'category', 'type': 'str'},
'enabled': {'key': 'enabled', 'type': 'bool'},
'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'},
}
def __init__(
self,
*,
enabled: bool,
category: Optional[str] = None,
retention_policy: Optional["RetentionPolicy"] = None,
**kwargs
):
"""
:keyword category: Name of a Diagnostic Log category for a resource type this setting is
applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET
diagnostic settings operation.
:paramtype category: str
:keyword enabled: Required. a value indicating whether this log is enabled.
:paramtype enabled: bool
:keyword retention_policy: the retention policy for this log.
:paramtype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy
"""
super(LogSettings, self).__init__(**kwargs)
self.category = category
self.enabled = enabled
self.retention_policy = retention_policy
class Metric(msrest.serialization.Model):
"""A set of metric values in a time range.
All required parameters must be populated in order to send to Azure.
:ivar id: the id, resourceId, of the metric.
:vartype id: str
:ivar type: the resource type of the metric resource.
:vartype type: str
:ivar name: Required. the name and the display name of the metric, i.e. it is localizable
string.
:vartype name: ~$(python-base-namespace).v2016_09_01.models.LocalizableString
:ivar unit: Required. the unit of the metric. Possible values include: "Count", "Bytes",
"Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds",
"Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond".
:vartype unit: str or ~$(python-base-namespace).v2016_09_01.models.Unit
:ivar data: Required. Array of data points representing the metric values.
:vartype data: list[~$(python-base-namespace).v2016_09_01.models.MetricValue]
"""
_validation = {
'name': {'required': True},
'unit': {'required': True},
'data': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'LocalizableString'},
'unit': {'key': 'unit', 'type': 'str'},
'data': {'key': 'data', 'type': '[MetricValue]'},
}
def __init__(
self,
*,
name: "LocalizableString",
unit: Union[str, "Unit"],
data: List["MetricValue"],
id: Optional[str] = None,
type: Optional[str] = None,
**kwargs
):
"""
:keyword id: the id, resourceId, of the metric.
:paramtype id: str
:keyword type: the resource type of the metric resource.
:paramtype type: str
:keyword name: Required. the name and the display name of the metric, i.e. it is localizable
string.
:paramtype name: ~$(python-base-namespace).v2016_09_01.models.LocalizableString
:keyword unit: Required. the unit of the metric. Possible values include: "Count", "Bytes",
"Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds",
"Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond".
:paramtype unit: str or ~$(python-base-namespace).v2016_09_01.models.Unit
:keyword data: Required. Array of data points representing the metric values.
:paramtype data: list[~$(python-base-namespace).v2016_09_01.models.MetricValue]
"""
super(Metric, self).__init__(**kwargs)
self.id = id
self.type = type
self.name = name
self.unit = unit
self.data = data
class MetricCollection(msrest.serialization.Model):
"""The collection of metric value sets.
All required parameters must be populated in order to send to Azure.
:ivar value: Required. the value of the collection.
:vartype value: list[~$(python-base-namespace).v2016_09_01.models.Metric]
"""
_validation = {
'value': {'required': True},
}
_attribute_map = {
'value': {'key': 'value', 'type': '[Metric]'},
}
def __init__(
self,
*,
value: List["Metric"],
**kwargs
):
"""
:keyword value: Required. the value of the collection.
:paramtype value: list[~$(python-base-namespace).v2016_09_01.models.Metric]
"""
super(MetricCollection, self).__init__(**kwargs)
self.value = value
class MetricSettings(msrest.serialization.Model):
"""Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.
All required parameters must be populated in order to send to Azure.
:ivar time_grain: Required. the timegrain of the metric in ISO8601 format.
:vartype time_grain: ~datetime.timedelta
:ivar enabled: Required. a value indicating whether this timegrain is enabled.
:vartype enabled: bool
:ivar retention_policy: the retention policy for this timegrain.
:vartype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy
"""
_validation = {
'time_grain': {'required': True},
'enabled': {'required': True},
}
_attribute_map = {
'time_grain': {'key': 'timeGrain', 'type': 'duration'},
'enabled': {'key': 'enabled', 'type': 'bool'},
'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'},
}
def __init__(
self,
*,
time_grain: datetime.timedelta,
enabled: bool,
retention_policy: Optional["RetentionPolicy"] = None,
**kwargs
):
"""
:keyword time_grain: Required. the timegrain of the metric in ISO8601 format.
:paramtype time_grain: ~datetime.timedelta
:keyword enabled: Required. a value indicating whether this timegrain is enabled.
:paramtype enabled: bool
:keyword retention_policy: the retention policy for this timegrain.
:paramtype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy
"""
super(MetricSettings, self).__init__(**kwargs)
self.time_grain = time_grain
self.enabled = enabled
self.retention_policy = retention_policy
class MetricValue(msrest.serialization.Model):
"""Represents a metric value.
All required parameters must be populated in order to send to Azure.
:ivar time_stamp: Required. the timestamp for the metric value in ISO 8601 format.
:vartype time_stamp: ~datetime.datetime
:ivar average: the average value in the time range.
:vartype average: float
:ivar minimum: the least value in the time range.
:vartype minimum: float
:ivar maximum: the greatest value in the time range.
:vartype maximum: float
:ivar total: the sum of all of the values in the time range.
:vartype total: float
:ivar count: the number of samples in the time range. Can be used to determine the number of
values that contributed to the average value.
:vartype count: long
"""
_validation = {
'time_stamp': {'required': True},
}
_attribute_map = {
'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'},
'average': {'key': 'average', 'type': 'float'},
'minimum': {'key': 'minimum', 'type': 'float'},
'maximum': {'key': 'maximum', 'type': 'float'},
'total': {'key': 'total', 'type': 'float'},
'count': {'key': 'count', 'type': 'long'},
}
def __init__(
self,
*,
time_stamp: datetime.datetime,
average: Optional[float] = None,
minimum: Optional[float] = None,
maximum: Optional[float] = None,
total: Optional[float] = None,
count: Optional[int] = None,
**kwargs
):
"""
:keyword time_stamp: Required. the timestamp for the metric value in ISO 8601 format.
:paramtype time_stamp: ~datetime.datetime
:keyword average: the average value in the time range.
:paramtype average: float
:keyword minimum: the least value in the time range.
:paramtype minimum: float
:keyword maximum: the greatest value in the time range.
:paramtype maximum: float
:keyword total: the sum of all of the values in the time range.
:paramtype total: float
:keyword count: the number of samples in the time range. Can be used to determine the number of
values that contributed to the average value.
:paramtype count: long
"""
super(MetricValue, self).__init__(**kwargs)
self.time_stamp = time_stamp
self.average = average
self.minimum = minimum
self.maximum = maximum
self.total = total
self.count = count
class Resource(msrest.serialization.Model):
"""An azure resource object.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Azure resource Id.
:vartype id: str
:ivar name: Azure resource name.
:vartype name: str
:ivar type: Azure resource type.
:vartype type: str
:ivar location: Required. Resource location.
:vartype location: str
:ivar tags: A set of tags. Resource tags.
:vartype tags: dict[str, str]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(
self,
*,
location: str,
tags: Optional[Dict[str, str]] = None,
**kwargs
):
"""
:keyword location: Required. Resource location.
:paramtype location: str
:keyword tags: A set of tags. Resource tags.
:paramtype tags: dict[str, str]
"""
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.location = location
self.tags = tags
class RetentionPolicy(msrest.serialization.Model):
"""Specifies the retention policy for the log.
All required parameters must be populated in order to send to Azure.
:ivar enabled: Required. a value indicating whether the retention policy is enabled.
:vartype enabled: bool
:ivar days: Required. the number of days for the retention in days. A value of 0 will retain
the events indefinitely.
:vartype days: int
"""
_validation = {
'enabled': {'required': True},
'days': {'required': True, 'minimum': 0},
}
_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'days': {'key': 'days', 'type': 'int'},
}
def __init__(
self,
*,
enabled: bool,
days: int,
**kwargs
):
"""
:keyword enabled: Required. a value indicating whether the retention policy is enabled.
:paramtype enabled: bool
:keyword days: Required. the number of days for the retention in days. A value of 0 will retain
the events indefinitely.
:paramtype days: int
"""
super(RetentionPolicy, self).__init__(**kwargs)
self.enabled = enabled
self.days = days
class ServiceDiagnosticSettingsResource(Resource):
"""Description of a service diagnostic setting.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Azure resource Id.
:vartype id: str
:ivar name: Azure resource name.
:vartype name: str
:ivar type: Azure resource type.
:vartype type: str
:ivar location: Required. Resource location.
:vartype location: str
:ivar tags: A set of tags. Resource tags.
:vartype tags: dict[str, str]
:ivar storage_account_id: The resource ID of the storage account to which you would like to
send Diagnostic Logs.
:vartype storage_account_id: str
:ivar service_bus_rule_id: The service bus rule ID of the service bus namespace in which you
would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the
format: '{service bus resource ID}/authorizationrules/{key name}'.
:vartype service_bus_rule_id: str
:ivar event_hub_authorization_rule_id: The resource Id for the event hub namespace
authorization rule.
:vartype event_hub_authorization_rule_id: str
:ivar metrics: the list of metric settings.
:vartype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings]
:ivar logs: the list of logs settings.
:vartype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings]
:ivar workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log
Analytics workspace to which you would like to send Diagnostic Logs. Example:
/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2.
:vartype workspace_id: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'},
'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'},
'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'},
'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'},
'logs': {'key': 'properties.logs', 'type': '[LogSettings]'},
'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'},
}
def __init__(
self,
*,
location: str,
tags: Optional[Dict[str, str]] = None,
storage_account_id: Optional[str] = None,
service_bus_rule_id: Optional[str] = None,
event_hub_authorization_rule_id: Optional[str] = None,
metrics: Optional[List["MetricSettings"]] = None,
logs: Optional[List["LogSettings"]] = None,
workspace_id: Optional[str] = None,
**kwargs
):
"""
:keyword location: Required. Resource location.
:paramtype location: str
:keyword tags: A set of tags. Resource tags.
:paramtype tags: dict[str, str]
:keyword storage_account_id: The resource ID of the storage account to which you would like to
send Diagnostic Logs.
:paramtype storage_account_id: str
:keyword service_bus_rule_id: The service bus rule ID of the service bus namespace in which you
would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the
format: '{service bus resource ID}/authorizationrules/{key name}'.
:paramtype service_bus_rule_id: str
:keyword event_hub_authorization_rule_id: The resource Id for the event hub namespace
authorization rule.
:paramtype event_hub_authorization_rule_id: str
:keyword metrics: the list of metric settings.
:paramtype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings]
:keyword logs: the list of logs settings.
:paramtype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings]
:keyword workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log
Analytics workspace to which you would like to send Diagnostic Logs. Example:
/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2.
:paramtype workspace_id: str
"""
super(ServiceDiagnosticSettingsResource, self).__init__(location=location, tags=tags, **kwargs)
self.storage_account_id = storage_account_id
self.service_bus_rule_id = service_bus_rule_id
self.event_hub_authorization_rule_id = event_hub_authorization_rule_id
self.metrics = metrics
self.logs = logs
self.workspace_id = workspace_id
class ServiceDiagnosticSettingsResourcePatch(msrest.serialization.Model):
"""Service diagnostic setting resource for patch operations.
:ivar tags: A set of tags. Resource tags.
:vartype tags: dict[str, str]
:ivar storage_account_id: The resource ID of the storage account to which you would like to
send Diagnostic Logs.
:vartype storage_account_id: str
:ivar service_bus_rule_id: The service bus rule ID of the service bus namespace in which you
would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the
format: '{service bus resource ID}/authorizationrules/{key name}'.
:vartype service_bus_rule_id: str
:ivar event_hub_authorization_rule_id: The resource Id for the event hub namespace
authorization rule.
:vartype event_hub_authorization_rule_id: str
:ivar metrics: the list of metric settings.
:vartype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings]
:ivar logs: the list of logs settings.
:vartype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings]
:ivar workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log
Analytics workspace to which you would like to send Diagnostic Logs. Example:
/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2.
:vartype workspace_id: str
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'},
'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'},
'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'},
'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'},
'logs': {'key': 'properties.logs', 'type': '[LogSettings]'},
'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'},
}
def __init__(
self,
*,
tags: Optional[Dict[str, str]] = None,
storage_account_id: Optional[str] = None,
service_bus_rule_id: Optional[str] = None,
event_hub_authorization_rule_id: Optional[str] = None,
metrics: Optional[List["MetricSettings"]] = None,
logs: Optional[List["LogSettings"]] = None,
workspace_id: Optional[str] = None,
**kwargs
):
"""
:keyword tags: A set of tags. Resource tags.
:paramtype tags: dict[str, str]
:keyword storage_account_id: The resource ID of the storage account to which you would like to
send Diagnostic Logs.
:paramtype storage_account_id: str
:keyword service_bus_rule_id: The service bus rule ID of the service bus namespace in which you
would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the
format: '{service bus resource ID}/authorizationrules/{key name}'.
:paramtype service_bus_rule_id: str
:keyword event_hub_authorization_rule_id: The resource Id for the event hub namespace
authorization rule.
:paramtype event_hub_authorization_rule_id: str
:keyword metrics: the list of metric settings.
:paramtype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings]
:keyword logs: the list of logs settings.
:paramtype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings]
:keyword workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log
Analytics workspace to which you would like to send Diagnostic Logs. Example:
/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2.
:paramtype workspace_id: str
"""
super(ServiceDiagnosticSettingsResourcePatch, self).__init__(**kwargs)
self.tags = tags
self.storage_account_id = storage_account_id
self.service_bus_rule_id = service_bus_rule_id
self.event_hub_authorization_rule_id = event_hub_authorization_rule_id
self.metrics = metrics
self.logs = logs
self.workspace_id = workspace_id
| 39.579872
| 157
| 0.645155
| 2,888
| 24,777
| 5.408587
| 0.091413
| 0.015365
| 0.024328
| 0.03073
| 0.778873
| 0.751408
| 0.736044
| 0.720359
| 0.692446
| 0.675672
| 0
| 0.014024
| 0.240223
| 24,777
| 625
| 158
| 39.6432
| 0.815724
| 0.543205
| 0
| 0.594096
| 0
| 0
| 0.193588
| 0.029799
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04059
| false
| 0
| 0.01845
| 0
| 0.173432
| 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
|
41e312a8435442439bf68456922fd53bb3587946
| 199
|
py
|
Python
|
users/urls.py
|
Joabsonlg/ddm-rest-api
|
27d72f5e7dcb061f56b7fd504c76bc7746ecabe2
|
[
"MIT"
] | null | null | null |
users/urls.py
|
Joabsonlg/ddm-rest-api
|
27d72f5e7dcb061f56b7fd504c76bc7746ecabe2
|
[
"MIT"
] | null | null | null |
users/urls.py
|
Joabsonlg/ddm-rest-api
|
27d72f5e7dcb061f56b7fd504c76bc7746ecabe2
|
[
"MIT"
] | null | null | null |
from django.conf.urls import url
from users.views import PasswordResetView
urlpatterns = [
url(r'^password/reset/confirm/(?P<uid>[\w-]+)/(?P<token>[\w-]+)/$', PasswordResetView.as_view(), ),
]
| 24.875
| 103
| 0.678392
| 26
| 199
| 5.153846
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105528
| 199
| 7
| 104
| 28.428571
| 0.752809
| 0
| 0
| 0
| 0
| 0
| 0.296482
| 0.296482
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.4
| 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
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
41f145de90d8db0951e6947d894f25270bd87df6
| 347
|
py
|
Python
|
refined/predicates/__init__.py
|
espetro/refined
|
c2f38418268e8d89634ede1265d869d8d54dc9d4
|
[
"MIT"
] | 4
|
2021-10-04T19:53:04.000Z
|
2021-12-17T07:08:42.000Z
|
refined/predicates/__init__.py
|
espetro/refined
|
c2f38418268e8d89634ede1265d869d8d54dc9d4
|
[
"MIT"
] | null | null | null |
refined/predicates/__init__.py
|
espetro/refined
|
c2f38418268e8d89634ede1265d869d8d54dc9d4
|
[
"MIT"
] | null | null | null |
from .base import RefinementPredicate, RefinementTypeException
from .numeric import PositivePredicate, NegativePredicate
from .collection import EmptyPredicate, NonEmptyPredicate
from .string import (
ValidIntPredicate,
ValidFloatPredicate,
XmlPredicate,
CsvPredicate,
IPv4Predicate,
IPv6Predicate,
TrimmedPredicate,
)
| 26.692308
| 62
| 0.795389
| 25
| 347
| 11.04
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006849
| 0.158501
| 347
| 12
| 63
| 28.916667
| 0.938356
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
51060dd531668e89afc214b032d7874e7d4d14a8
| 83
|
py
|
Python
|
packages/jsii-rosetta/test/translations/imports/selective_import.py
|
NGL321/jsii
|
a31ebf5ef676391d97f2286edc21e5859c38c96c
|
[
"Apache-2.0"
] | 1,639
|
2019-07-05T07:21:00.000Z
|
2022-03-31T09:55:01.000Z
|
packages/jsii-rosetta/test/translations/imports/selective_import.py
|
NGL321/jsii
|
a31ebf5ef676391d97f2286edc21e5859c38c96c
|
[
"Apache-2.0"
] | 2,704
|
2019-07-01T23:10:28.000Z
|
2022-03-31T23:40:12.000Z
|
packages/jsii-rosetta/test/translations/imports/selective_import.py
|
NGL321/jsii
|
a31ebf5ef676391d97f2286edc21e5859c38c96c
|
[
"Apache-2.0"
] | 146
|
2019-07-02T14:36:25.000Z
|
2022-03-26T00:21:27.000Z
|
from scope.some_module import one, Two, some_three, four as renamed
Two()
renamed()
| 27.666667
| 67
| 0.783133
| 14
| 83
| 4.5
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120482
| 83
| 3
| 68
| 27.666667
| 0.863014
| 0
| 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
|
511431191016a23f97c536d51308273c8e87f098
| 7,592
|
py
|
Python
|
legislativeinfo/models.py
|
nhieckqo/lei
|
f461d8dcbc8f9e037c661abb18b226aa6fa7acae
|
[
"MIT"
] | null | null | null |
legislativeinfo/models.py
|
nhieckqo/lei
|
f461d8dcbc8f9e037c661abb18b226aa6fa7acae
|
[
"MIT"
] | null | null | null |
legislativeinfo/models.py
|
nhieckqo/lei
|
f461d8dcbc8f9e037c661abb18b226aa6fa7acae
|
[
"MIT"
] | null | null | null |
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models
class CfgApprovingOfficers(models.Model):
li_ao_id = models.AutoField(primary_key=True)
name = models.TextField(blank=True, null=True)
designation = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."cfg_approving_officers'
def __str__(self):
return str(self.name)
class CfgAttestingOfficers(models.Model):
li_ao_id = models.AutoField(primary_key=True)
name = models.TextField(blank=True, null=True)
designation = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."cfg_attesting_officers'
def __str__(self):
return str(self.name)
class CfgCertifyingOfficers(models.Model):
li_co_id = models.AutoField(primary_key=True)
name = models.TextField(blank=True, null=True)
designation = models.TextField(blank=True, null=True)
co_code = models.CharField(max_length=100, unique=True)
class Meta:
managed = False
db_table = 'lei"."cfg_certifying_officers'
def __str__(self):
return str(self.name) + " - " + str(self.designation)
class CfgGlobal(models.Model):
li_cg_id = models.AutoField(primary_key=True)
attribute_name = models.CharField(max_length=200, blank=True, null=True)
val_text = models.TextField(blank=True, null=True)
val_num = models.DecimalField(max_digits=65535, decimal_places=65535, blank=True, null=True)
val_date = models.DateField(blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."cfg_global'
def __str__(self):
return str(self.attribute_name)
class CfgOfficials(models.Model):
li_o_id = models.AutoField(primary_key=True)
name = models.TextField(blank=True, null=True)
designation = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."cfg_officials'
def __str__(self):
return str(self.name)
class CfgPresidingOfficers(models.Model):
li_po_id = models.AutoField(primary_key=True)
name = models.TextField(blank=True, null=True)
designation = models.TextField(blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."cfg_presiding_officers'
def __str__(self):
return str(self.name) + " - " + str(self.designation)
class LegApprovedBy(models.Model):
li_lab_id = models.AutoField(primary_key=True)
approved_by_name = models.TextField(blank=True, null=True)
approved_by_designation = models.TextField(blank=True, null=True)
approved_by_remarks = models.TextField(blank=True, null=True)
li_li = models.ForeignKey('LegislativeInfo', models.DO_NOTHING, blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."leg_approved_by'
def __str__(self):
return str(self.approved_by_name)
class LegAttendees(models.Model):
li_la_id = models.AutoField(primary_key=True)
name = models.TextField(blank=True, null=True)
designation = models.TextField(blank=True, null=True)
is_present = models.BooleanField(blank=True, null=True)
remarks = models.TextField(blank=True, null=True)
li_li = models.ForeignKey('LegislativeInfo', models.DO_NOTHING, blank=True, null=True)
li_li_o = models.ForeignKey('CfgOfficials', models.DO_NOTHING, blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."leg_attendees'
def __str__(self):
return str(self.name)
class LegAttestedBy(models.Model):
li_lab_id = models.AutoField(primary_key=True)
attested_by_name = models.TextField(blank=True, null=True)
attested_by_designation = models.TextField(blank=True, null=True)
attested_by_remarks = models.TextField(blank=True, null=True)
li_li = models.ForeignKey('LegislativeInfo', models.DO_NOTHING, blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."leg_attested_by'
def __str__(self):
return str(self.attested_by_name)
class LegCertifiedBy(models.Model):
li_lcb_id = models.AutoField(primary_key=True)
certified_by_name = models.TextField(blank=True, null=True)
certified_by_designation = models.TextField(blank=True, null=True)
certified_by_remarks = models.TextField(blank=True, null=True)
li_li = models.ForeignKey('LegislativeInfo', models.DO_NOTHING, blank=True, null=True)
# co_code = models.ForeignKey('CfgCertifyingOfficers', models.DO_NOTHING, blank=True, null=True, to_field="co_code")
li_li_co = models.ForeignKey('CfgCertifyingOfficers', models.DO_NOTHING, blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."leg_certified_by'
def __str__(self):
return str(self.li_li) + " / " +str(self.certified_by_name)
class LegPresidedOverBy(models.Model):
li_lpob_id = models.AutoField(primary_key=True)
presided_over_by_name = models.CharField(blank=True, null=True, max_length=500)
presided_over_by_designation = models.CharField(blank=True, null=True, max_length=500)
presided_over_by_remarks = models.CharField(blank=True, null=True, max_length=500)
li_li = models.ForeignKey('LegislativeInfo', models.DO_NOTHING, blank=True, null=True)
li_li_po = models.ForeignKey('CfgPresidingOfficers', models.DO_NOTHING, blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."leg_presided_over_by'
def __str__(self):
return str(self.li_li) + " / " +str(self.presided_over_by_name)
class LegislativeInfo(models.Model):
li_id = models.AutoField(primary_key=True)
record_no = models.CharField(max_length=100, blank=True, null=True)
series = models.CharField(max_length=100, blank=True, null=True)
approved_date = models.DateField(blank=True, null=True)
summary = models.TextField(blank=True, null=True)
body_text = models.TextField(blank=True, null=True)
created_by_username = models.CharField(max_length=100, blank=True, null=True)
created_date = models.DateTimeField(blank=True, null=True)
edited_date = models.DateTimeField(blank=True, null=True)
edited_by_username = models.CharField(max_length=100, blank=True, null=True)
whole_text = models.TextField(blank=True, null=True)
title = models.TextField(blank=True, null=True)
scanned = models.BooleanField(blank=True, null=True)
class Meta:
managed = False
db_table = 'lei"."legislative_info'
def __str__(self):
return str(self.record_no)+" - "+str(self.series)
class OverviewLi(models.Model):
li_id = models.IntegerField(blank=False, null=False, primary_key=True)
res_no_full = models.TextField(blank=True, null=True)
approved_date = models.DateField(blank=True, null=True)
title = models.TextField(blank=True, null=True)
summary = models.TextField(blank=True, null=True)
scanned = models.BooleanField(blank=True, null=True)
class Meta:
managed = False # Created from a view. Don't remove.
db_table = 'lei"."overview__li'
| 36.854369
| 120
| 0.712724
| 1,017
| 7,592
| 5.107178
| 0.154376
| 0.097035
| 0.140162
| 0.183288
| 0.747978
| 0.726415
| 0.686946
| 0.649788
| 0.562187
| 0.517328
| 0
| 0.005921
| 0.176897
| 7,592
| 205
| 121
| 37.034146
| 0.825252
| 0.081665
| 0
| 0.5
| 1
| 0
| 0.0632
| 0.035335
| 0
| 0
| 0
| 0
| 0
| 1
| 0.082192
| false
| 0
| 0.006849
| 0.082192
| 0.821918
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
513d958aebd657d8e7a78672d2fc67b1944313aa
| 261
|
py
|
Python
|
src/sample/atm/bank_account_main.py
|
acc-cosc-1336/cosc-1336-spring-2018-artgonzalezacc
|
c5dcc0ad7c47345c274d61c7e94f6c3b0ed42245
|
[
"MIT"
] | null | null | null |
src/sample/atm/bank_account_main.py
|
acc-cosc-1336/cosc-1336-spring-2018-artgonzalezacc
|
c5dcc0ad7c47345c274d61c7e94f6c3b0ed42245
|
[
"MIT"
] | null | null | null |
src/sample/atm/bank_account_main.py
|
acc-cosc-1336/cosc-1336-spring-2018-artgonzalezacc
|
c5dcc0ad7c47345c274d61c7e94f6c3b0ed42245
|
[
"MIT"
] | null | null | null |
from bank_account import BankAccount
joes_account = BankAccount(500)
print(joes_account.get_balance())
print()
joes_account.deposit(500)
print(joes_account.get_balance())
print()
joes_account.withdraw(100)
print(joes_account.get_balance())
| 16.3125
| 37
| 0.758621
| 34
| 261
| 5.529412
| 0.382353
| 0.351064
| 0.425532
| 0.303191
| 0.617021
| 0.478723
| 0.478723
| 0.478723
| 0.478723
| 0
| 0
| 0.039823
| 0.1341
| 261
| 15
| 38
| 17.4
| 0.792035
| 0
| 0
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.111111
| 0.555556
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
514615cd481fcb31980577d3ebc782c644b02aca
| 8,020
|
py
|
Python
|
sdk/python/pulumi_vault/jwt/_inputs.py
|
pulumi/pulumi-vault
|
1682875f4a5d7d508f36e166529ad2b8aec34090
|
[
"ECL-2.0",
"Apache-2.0"
] | 10
|
2019-10-07T17:44:18.000Z
|
2022-03-30T20:46:33.000Z
|
sdk/python/pulumi_vault/jwt/_inputs.py
|
pulumi/pulumi-vault
|
1682875f4a5d7d508f36e166529ad2b8aec34090
|
[
"ECL-2.0",
"Apache-2.0"
] | 79
|
2019-10-11T18:13:07.000Z
|
2022-03-31T21:09:41.000Z
|
sdk/python/pulumi_vault/jwt/_inputs.py
|
pulumi/pulumi-vault
|
1682875f4a5d7d508f36e166529ad2b8aec34090
|
[
"ECL-2.0",
"Apache-2.0"
] | 2
|
2019-10-28T10:08:40.000Z
|
2020-03-17T14:20:55.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'AuthBackendTuneArgs',
]
@pulumi.input_type
class AuthBackendTuneArgs:
def __init__(__self__, *,
allowed_response_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
audit_non_hmac_request_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
audit_non_hmac_response_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
default_lease_ttl: Optional[pulumi.Input[str]] = None,
listing_visibility: Optional[pulumi.Input[str]] = None,
max_lease_ttl: Optional[pulumi.Input[str]] = None,
passthrough_request_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
token_type: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_response_headers: List of headers to whitelist and allowing
a plugin to include them in the response.
:param pulumi.Input[Sequence[pulumi.Input[str]]] audit_non_hmac_request_keys: Specifies the list of keys that will
not be HMAC'd by audit devices in the request data object.
:param pulumi.Input[Sequence[pulumi.Input[str]]] audit_non_hmac_response_keys: Specifies the list of keys that will
not be HMAC'd by audit devices in the response data object.
:param pulumi.Input[str] default_lease_ttl: Specifies the default time-to-live.
If set, this overrides the global default.
Must be a valid [duration string](https://golang.org/pkg/time/#ParseDuration)
:param pulumi.Input[str] listing_visibility: Specifies whether to show this mount in
the UI-specific listing endpoint. Valid values are "unauth" or "hidden".
:param pulumi.Input[str] max_lease_ttl: Specifies the maximum time-to-live.
If set, this overrides the global default.
Must be a valid [duration string](https://golang.org/pkg/time/#ParseDuration)
:param pulumi.Input[Sequence[pulumi.Input[str]]] passthrough_request_headers: List of headers to whitelist and
pass from the request to the backend.
:param pulumi.Input[str] token_type: Specifies the type of tokens that should be returned by
the mount. Valid values are "default-service", "default-batch", "service", "batch".
"""
if allowed_response_headers is not None:
pulumi.set(__self__, "allowed_response_headers", allowed_response_headers)
if audit_non_hmac_request_keys is not None:
pulumi.set(__self__, "audit_non_hmac_request_keys", audit_non_hmac_request_keys)
if audit_non_hmac_response_keys is not None:
pulumi.set(__self__, "audit_non_hmac_response_keys", audit_non_hmac_response_keys)
if default_lease_ttl is not None:
pulumi.set(__self__, "default_lease_ttl", default_lease_ttl)
if listing_visibility is not None:
pulumi.set(__self__, "listing_visibility", listing_visibility)
if max_lease_ttl is not None:
pulumi.set(__self__, "max_lease_ttl", max_lease_ttl)
if passthrough_request_headers is not None:
pulumi.set(__self__, "passthrough_request_headers", passthrough_request_headers)
if token_type is not None:
pulumi.set(__self__, "token_type", token_type)
@property
@pulumi.getter(name="allowedResponseHeaders")
def allowed_response_headers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
List of headers to whitelist and allowing
a plugin to include them in the response.
"""
return pulumi.get(self, "allowed_response_headers")
@allowed_response_headers.setter
def allowed_response_headers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "allowed_response_headers", value)
@property
@pulumi.getter(name="auditNonHmacRequestKeys")
def audit_non_hmac_request_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies the list of keys that will
not be HMAC'd by audit devices in the request data object.
"""
return pulumi.get(self, "audit_non_hmac_request_keys")
@audit_non_hmac_request_keys.setter
def audit_non_hmac_request_keys(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "audit_non_hmac_request_keys", value)
@property
@pulumi.getter(name="auditNonHmacResponseKeys")
def audit_non_hmac_response_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Specifies the list of keys that will
not be HMAC'd by audit devices in the response data object.
"""
return pulumi.get(self, "audit_non_hmac_response_keys")
@audit_non_hmac_response_keys.setter
def audit_non_hmac_response_keys(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "audit_non_hmac_response_keys", value)
@property
@pulumi.getter(name="defaultLeaseTtl")
def default_lease_ttl(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the default time-to-live.
If set, this overrides the global default.
Must be a valid [duration string](https://golang.org/pkg/time/#ParseDuration)
"""
return pulumi.get(self, "default_lease_ttl")
@default_lease_ttl.setter
def default_lease_ttl(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_lease_ttl", value)
@property
@pulumi.getter(name="listingVisibility")
def listing_visibility(self) -> Optional[pulumi.Input[str]]:
"""
Specifies whether to show this mount in
the UI-specific listing endpoint. Valid values are "unauth" or "hidden".
"""
return pulumi.get(self, "listing_visibility")
@listing_visibility.setter
def listing_visibility(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "listing_visibility", value)
@property
@pulumi.getter(name="maxLeaseTtl")
def max_lease_ttl(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the maximum time-to-live.
If set, this overrides the global default.
Must be a valid [duration string](https://golang.org/pkg/time/#ParseDuration)
"""
return pulumi.get(self, "max_lease_ttl")
@max_lease_ttl.setter
def max_lease_ttl(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "max_lease_ttl", value)
@property
@pulumi.getter(name="passthroughRequestHeaders")
def passthrough_request_headers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
List of headers to whitelist and
pass from the request to the backend.
"""
return pulumi.get(self, "passthrough_request_headers")
@passthrough_request_headers.setter
def passthrough_request_headers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "passthrough_request_headers", value)
@property
@pulumi.getter(name="tokenType")
def token_type(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the type of tokens that should be returned by
the mount. Valid values are "default-service", "default-batch", "service", "batch".
"""
return pulumi.get(self, "token_type")
@token_type.setter
def token_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "token_type", value)
| 47.176471
| 124
| 0.683791
| 1,021
| 8,020
| 5.149853
| 0.131244
| 0.10251
| 0.085204
| 0.076075
| 0.821986
| 0.743248
| 0.694751
| 0.563522
| 0.547737
| 0.491061
| 0
| 0.000159
| 0.214589
| 8,020
| 169
| 125
| 47.455621
| 0.834577
| 0.318454
| 0
| 0.087912
| 1
| 0
| 0.130409
| 0.081778
| 0
| 0
| 0
| 0
| 0
| 1
| 0.186813
| false
| 0.098901
| 0.054945
| 0
| 0.340659
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
5147f21139dd6c9dc6a43a9b47e7cc9528a3b408
| 1,057
|
py
|
Python
|
bek.py
|
ReyBek/lb2
|
57e933d3137cd1f72c6651668c7e78a3223ed4d9
|
[
"MIT"
] | null | null | null |
bek.py
|
ReyBek/lb2
|
57e933d3137cd1f72c6651668c7e78a3223ed4d9
|
[
"MIT"
] | null | null | null |
bek.py
|
ReyBek/lb2
|
57e933d3137cd1f72c6651668c7e78a3223ed4d9
|
[
"MIT"
] | null | null | null |
print("что-то на бизарном\n\n")
print("Меня зовут Кира Йошикаге.")
print("Мне 33 года.")
print("Мой дом находится в северо-восточной части Морио, где расположены все виллы.")
print("Я не женат. Я работаю в универмаге Kame Yu и прихожу домой не позднее 8 вечера.")
print("Я не курю, но иногда выпиваю.")
print("Я ложусь спать в 11 вечера, и убеждаюсь, что я получаю ровно восемь часов сна, несмотря ни на что.")
print("Выпив стакан теплого молока и потянувшись минут двадцать перед сном, я обычно без проблем сплю до утра.")
print("Словно ребёнок я просыпаюсь утром без всякой усталости и стресса.")
print("На моём последнем осмотре мне сказали, что у меня нет никаких проблем со здоровьем.")
print("Я пытаюсь донести, что я обычный человек, который хочет жить спокойной жизнью.")
print("Я забочусь о том, чтобы не утруждать себя какими-либо врагами – победами и поражениями, которые могли бы потревожить мой сон.")
print("Вот как я отношусь к обществу, и я знаю, что это приносит мне счастье. Хотя, если бы мне пришлось сражаться, я бы никому не проиграл.")
| 81.307692
| 142
| 0.767266
| 178
| 1,057
| 4.561798
| 0.702247
| 0.036946
| 0.019704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005568
| 0.150426
| 1,057
| 13
| 142
| 81.307692
| 0.89755
| 0
| 0
| 0
| 0
| 0.230769
| 0.877127
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
5a98f69942b7ddee1c03b742b19eb1329ef1cfb4
| 9,728
|
py
|
Python
|
software/test/test.py
|
acmmmsys/2018-HTTP-Adaptive-Streaming-QoE-Estimation-With-P.1203
|
b73270267ce063532fb6280764a91910d18dba14
|
[
"zlib-acknowledgement"
] | 4
|
2018-10-28T08:52:06.000Z
|
2021-09-06T12:26:34.000Z
|
software/test/test.py
|
acmmmsys/2018-HTTP-Adaptive-Streaming-QoE-Estimation-With-P.1203
|
b73270267ce063532fb6280764a91910d18dba14
|
[
"zlib-acknowledgement"
] | null | null | null |
software/test/test.py
|
acmmmsys/2018-HTTP-Adaptive-Streaming-QoE-Estimation-With-P.1203
|
b73270267ce063532fb6280764a91910d18dba14
|
[
"zlib-acknowledgement"
] | 1
|
2020-11-19T08:28:59.000Z
|
2020-11-19T08:28:59.000Z
|
#!/usr/bin/env python3
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/../')
from itu_p1203 import __version__
from itu_p1203 import P1203Standalone
from itu_p1203 import P1203Pv
import itu_p1203.utils as utils
class TestP1203Parts(unittest.TestCase):
def test_parsing(self):
"""
Perform a small in-built test using example files
"""
print("Testing model version {}".format(__version__))
basedir = os.path.dirname(os.path.realpath(__file__)) + '/../'
if not os.path.isdir(basedir + "examples"):
print("Examples folder is missing.")
sys.exit(1)
test_files = [
basedir + "examples/mode0.json",
basedir + "examples/mode0_no_stalling.json",
basedir + "examples/mode0_with_representation_ids.json",
basedir + "examples/mode1.json",
basedir + "examples/mode1_without_audio_without_stalling.json",
basedir + "examples/mode3.json",
basedir + "examples/mode3_without_audio_without_stalling.json"
]
for test_file in sorted(test_files):
test_case = os.path.splitext(os.path.basename(test_file))[0]
test_data = utils.read_json_without_comments(test_file)
print("Checking {}".format(test_case))
test_model = P1203Standalone(test_data)
test_model.calculate_complete()
def test_model_functions(self):
"""
Run a series of tests against models
"""
print("Testing model version {}".format(__version__))
failed = 0
avg_qp_per_frame = [26.605956612329944, 30.17195734771418, 32.89184549356223, 34.06182531894014, 33.44129901960784, 29.722637578134574, 32.251378845446744, 33.26394507784725, 33.490804315841096, 29.593455080279448, 32.308805494235955, 33.448791855758614, 33.38045610593428, 29.569117647058825, 32.68492647058824, 33.27613678146832, 34.02036310107949, 29.60178943497978, 32.25796568627451, 33.3860294117647, 33.087388160313765, 29.707807329329576, 31.710413344781063, 33.097842079450714, 32.612452506434614, 29.593577644319158, 32.02500306410099, 32.81556372549019, 32.641666666666666, 34.54432863274065, 27.31764705882353, 30.356171099399436, 33.393111056631525, 34.91981363413438, 34.78062538320049, 30.418014705882353, 32.86985294117647, 34.362009803921566, 34.08370098039216, 30.840299056256896, 33.34681372549019, 33.40818828144153, 33.68730839975475, 31.09020713322711, 32.777178575805856, 33.80122549019608, 34.54001715896556, 31.11925481063856, 33.01911999019487, 34.29921549399363, 33.37153714145624, 31.462434121828654, 33.70106630714548, 34.37690044139284, 33.96542422756253, 31.5828431372549, 33.469607843137254, 34.24031862745098, 34.18799019607843, 35.191053921568624, 27.845833333333335, 31.17526657678637, 33.77561274509804, 34.446829387955354, 34.78239548853745, 31.00147076847653, 33.45030028189729, 34.64620098039216, 34.44056372549019, 31.30935163622993, 33.18163990685133, 34.2268660375046, 34.10626302242922, 31.07683823529412, 33.406004901960785, 34.60110294117647, 34.0031862745098, 31.03382767496017, 33.43982843137255, 34.810661764705884, 34.432598039215684, 30.966299019607842, 33.298811128814805, 34.02242921926707, 34.22904411764706, 30.73970588235294, 33.20269607843137, 34.1203431372549, 33.605343792131386, 36.01176470588236, 27.516666666666666, 30.825468807451895, 33.60220588235294, 35.32078940916892, 34.96678514523839, 30.816053921568628, 33.31629901960784, 34.98369498590168, 34.762319195881346, 31.131633778649345, 33.0015931372549, 33.88039215686275, 33.90783184213752, 30.938717980144627, 33.17904411764706, 34.2640931372549, 33.92719696041181, 31.126853781100625, 32.86076725088859, 34.1049148179924, 34.30187522980757, 31.080514705882354, 33.37124647628386, 34.11078431372549, 33.75781345753156, 30.7171568627451, 33.2371614168403, 33.86307918607502, 33.58666339789164, 35.29170241451158, 27.558892021081014, 30.987745098039216, 33.668219144503006, 35.569572146622534, 35.132720588235294, 31.158965559504843, 33.39441107978919, 34.090808823529414, 34.71356783919598, 30.907586714058095, 33.16055889202108, 34.32736635605689, 34.669733774996935, 30.881358009559996, 33.09597940671733, 34.663357843137256, 34.45919117647059, 30.64611424368718, 32.79568574580218, 34.22946800686443, 33.81470588235294, 30.834048290231646, 32.867140580953546, 34.171323529411765, 33.54057367001716, 31.029411764705884, 32.579237651673, 33.299509803921566, 33.12072557911509, 35.06545721990684, 27.720921681578623, 31.65510479225395, 33.56580882352941, 35.30134803921569, 34.6875842627773, 31.472116680965804, 33.74632352941177, 34.78886709171162, 34.991299019607844, 31.698039215686276, 33.51415614658659, 34.09411764705882, 34.722671568627455, 31.667238632185317, 33.43235294117647, 34.162377450980394, 34.56976459048553, 31.29031862745098, 33.24684397597745, 34.32189262074038, 33.98198529411765, 31.28949626179679, 32.90290547995587, 33.60343137254902, 34.200539347879385, 31.32099522000245, 33.12650159352783, 34.55232843137255, 34.53218094887826, 35.17796298566001, 28.126470588235293, 31.594607843137254, 33.75781345753156, 35.236209855356705, 34.658700980392155, 31.624877450980392, 33.898529411764706, 34.73406862745098, 34.6780637254902, 31.439705882352943, 33.74138987621032, 34.386539168812064, 34.56875, 31.53511459737713, 33.35171568627451, 34.8363569502329, 34.32700085794828, 31.65657556073048, 33.32769607843137, 34.62401960784314, 34.38921568627451, 31.586714058095353, 33.202550269740065, 34.99644477136202, 34.133823529411764, 31.738970588235293, 33.39154411764706, 34.513420762348325, 34.431372549019606, 35.01274509803922, 28.088981492830005, 31.47640642235568, 33.83956367201863, 34.95808823529412, 34.998896923642604, 31.674347346488542, 33.48394214268203, 34.74522058823529, 34.657433509008456, 31.460661764705883, 33.78686113494301, 34.73455882352941, 34.473161764705885, 31.331045471258733, 33.86260571148425, 34.78235294117647, 35.271936274509805, 31.622380193651182, 33.59840588595954, 34.74773117488349, 34.93713235294118, 31.464338235294118, 33.3879627359647, 34.86666666666667, 34.536764705882355, 31.547549019607843, 33.10712097070719, 34.12489275646525, 34.52923152347101, 35.229166666666664, 28.084324059320995, 32.025122549019606, 34.08848039215686, 35.199044000490254, 35.36891775952935, 31.686113494300773, 33.79654369408016, 34.70078450600637, 35.05247027093294, 31.674387254901962, 33.65931372549019, 35.03235294117647, 34.8938465310125, 31.730481676676064, 33.462132352941175, 34.74166666666667, 34.412867647058825, 31.54105392156863, 33.60424071577399, 34.321813725490195, 35.006005637945826, 31.856600073538424, 33.577573529411765, 34.89154411764706, 34.554479715651425, 31.653799019607842, 33.36609878661601, 34.666748376026476, 34.373130669281686, 35.40078440985415, 28.21289373697757, 31.628385831597008, 34.037254901960786, 35.17046568627451, 35.0234068627451, 31.579973035911262, 33.99436205417331, 34.90796568627451, 34.90686274509804, 31.70045348694693, 33.7109068627451, 34.69150631204805, 34.90145851207256, 31.48621154553254, 33.45740899620051, 34.9019487682314, 34.80781958573355, 31.74264705882353, 33.46825980392157, 34.48664215686274, 34.92313350496506, 31.46421568627451, 33.62046568627451, 34.84985905135433, 34.138007108714305, 31.483210784313727, 33.344485294117646, 34.30889924000981, 34.443804387792625, 35.37708333333333, 28.170976835396495, 31.956004901960785, 33.93345588235294, 35.29450711132908, 35.08335376317725, 31.724230910650814, 33.79671407552722, 35.314950980392155, 34.797916666666666, 31.761367814683172, 33.743718592964825, 34.753553921568624, 34.71997549019608, 31.56482843137255, 33.61691176470588, 34.767373452629, 34.947781318950724, 31.78208113739429, 33.56209390707368, 34.615686274509805, 34.90281862745098, 31.91469542836132, 33.58034072803039, 34.52120098039216, 34.77561274509804, 31.781468317195735, 33.27228147603285, 34.23664215686274, 34.34931338891614, 35.006624141315015, 28.3569064836377]
tests = {
"mode0": [
{ "mos": 4.311, "args": (1920*1080, 1920*1080, 2801.27587623, 30) },
{ "mos": 2.664, "args": (852*480, 1920*1080, 629.203792838, 30) },
{ "mos": 1.085, "args": (426*240, 1920*1080, 224.771246112, 30) }
],
"mode1": [
{ "mos": 4.061, "args": (1920*1080, 1920*1080, 2409.39329393, 30, [], 10.9551545708) },
{ "mos": 3.76, "args": (1920*1080, 1920*1080, 2805.94165942, 30, [], 7.4658972759) },
{ "mos": 2.551, "args": (852*480, 1920*1080, 529.580495805, 30, [], 11.7097170972) },
{ "mos": 1.118, "args": (426*240, 1920*1080, 132.874928749, 30, [], 22.5031055901) }
],
"mode3": [
{ "mos": 3.665, "args": (1920*1080, 1920*1080, 30, [], 0.6537627021) },
{ "mos": 1.05, "args": (102240, 1920*1080, 30, [], 0.7688713219) },
{ "mos": 3.671, "args": (1920*1080, 1920*1080, 30, [], None, avg_qp_per_frame)}
]
}
for mode, mode_tests in tests.items():
for test_data in mode_tests:
fun = getattr(P1203Pv, "video_model_function_" + mode)
ret = round(fun(*test_data["args"]), 3)
mos = test_data["mos"]
if abs(ret - mos) > 0.01:
print("{mode} test failed, expected {mos}, got {ret}".format(**locals()))
failed += 1
else:
print("{mode} test passed".format(mode=mode))
self.assertTrue(failed == 0)
if __name__ == '__main__':
unittest.main()
| 110.545455
| 6,410
| 0.742599
| 1,048
| 9,728
| 6.819656
| 0.467557
| 0.01679
| 0.015951
| 0.011194
| 0.05233
| 0.025185
| 0.008675
| 0
| 0
| 0
| 0
| 0.693079
| 0.138569
| 9,728
| 87
| 6,411
| 111.816092
| 0.159785
| 0.011102
| 0
| 0.061538
| 0
| 0
| 0.054006
| 0.02037
| 0
| 0
| 0
| 0
| 0.015385
| 1
| 0.030769
| false
| 0.015385
| 0.107692
| 0
| 0.153846
| 0.092308
| 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
|
5aae56eeb62afa137ba175a6b816eb92f861722b
| 293
|
py
|
Python
|
blog/post/tests.py
|
znf896/Django-React-
|
44bfbffc8f6a6fa13e001f3fc4b42005afa426bc
|
[
"MIT"
] | 1
|
2021-05-10T15:29:00.000Z
|
2021-05-10T15:29:00.000Z
|
blog/post/tests.py
|
znf896/Django-React-
|
44bfbffc8f6a6fa13e001f3fc4b42005afa426bc
|
[
"MIT"
] | 7
|
2020-09-07T12:44:21.000Z
|
2022-02-26T18:35:20.000Z
|
blog/post/tests.py
|
znf896/Django-React-
|
44bfbffc8f6a6fa13e001f3fc4b42005afa426bc
|
[
"MIT"
] | null | null | null |
from django.test import TestCase
from datetime import datetime, timedelta, timezone
# from .models import Post
# Create your tests here.
# print(datetime.now(timezone(timedelta(hours=8))))
# post = Post.objects.order_by('-id')
# post2 = Post.objects.get(pk=3)
# print(type(post), type(post2))
| 32.555556
| 51
| 0.744027
| 43
| 293
| 5.046512
| 0.627907
| 0.101382
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015385
| 0.112628
| 293
| 8
| 52
| 36.625
| 0.819231
| 0.668942
| 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
|
85133c6a80f52c8b906f714fba534711cefe9107
| 311
|
py
|
Python
|
config/profile.py
|
tenstone/xiaoyun-smart-speaker-server
|
6afcdedd1a2485269afffb425803aff71b6cbd51
|
[
"MIT"
] | 1
|
2020-05-18T06:58:25.000Z
|
2020-05-18T06:58:25.000Z
|
config/profile.py
|
tenstone/xiaoyun-smart-speaker-server
|
6afcdedd1a2485269afffb425803aff71b6cbd51
|
[
"MIT"
] | 1
|
2022-02-10T12:45:45.000Z
|
2022-02-10T12:45:45.000Z
|
config/profile.py
|
tenstone/xiaoyun-smart-speaker-server
|
6afcdedd1a2485269afffb425803aff71b6cbd51
|
[
"MIT"
] | null | null | null |
import config
yaml_settings = config.load_yaml_settings()
aliyun_ak_id = yaml_settings['aliyun']['ak_id']
aliyun_ak_secret = yaml_settings['aliyun']['ak_secret']
aliyun_iot_device_name = yaml_settings['aliyun']['iothub']['device_name']
aliyun_iot_product_key = yaml_settings['aliyun']['iothub']['product_key']
| 38.875
| 73
| 0.787781
| 44
| 311
| 5.090909
| 0.340909
| 0.321429
| 0.401786
| 0.267857
| 0.196429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057878
| 311
| 8
| 74
| 38.875
| 0.764505
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
51b38e61a90d7e467d243db43dea9b72fe3e2798
| 175
|
py
|
Python
|
backend/coreApi/coreApi/asgi.py
|
rochdikhalid/kopra-v1
|
1899e6f695ff8b3041aa7b4e24f99cb6f585085c
|
[
"MIT"
] | 3
|
2021-12-14T12:31:18.000Z
|
2021-12-15T08:12:45.000Z
|
backend/coreApi/coreApi/asgi.py
|
rochdikhalid/kopra-v1
|
1899e6f695ff8b3041aa7b4e24f99cb6f585085c
|
[
"MIT"
] | null | null | null |
backend/coreApi/coreApi/asgi.py
|
rochdikhalid/kopra-v1
|
1899e6f695ff8b3041aa7b4e24f99cb6f585085c
|
[
"MIT"
] | 1
|
2022-01-06T14:41:27.000Z
|
2022-01-06T14:41:27.000Z
|
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'coreApi.settings')
application = get_asgi_application()
| 21.875
| 68
| 0.794286
| 22
| 175
| 6.045455
| 0.590909
| 0.105263
| 0.270677
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 175
| 7
| 69
| 25
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0.22619
| 0.130952
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
51b85f9aa926f312768679de92c005addddd5a55
| 431
|
py
|
Python
|
pyfuncs/anonymous_functions/lambdas/open_closed/open_closed_tests.py
|
JASTYN/pythonmaster
|
46638ab09d28b65ce5431cd0759fe6df272fb85d
|
[
"Apache-2.0",
"MIT"
] | 3
|
2017-05-02T10:28:13.000Z
|
2019-02-06T09:10:11.000Z
|
pyfuncs/anonymous_functions/lambdas/open_closed/open_closed_tests.py
|
JASTYN/pythonmaster
|
46638ab09d28b65ce5431cd0759fe6df272fb85d
|
[
"Apache-2.0",
"MIT"
] | 2
|
2017-06-21T20:39:14.000Z
|
2020-02-25T10:28:57.000Z
|
pyfuncs/anonymous_functions/lambdas/open_closed/open_closed_tests.py
|
JASTYN/pythonmaster
|
46638ab09d28b65ce5431cd0759fe6df272fb85d
|
[
"Apache-2.0",
"MIT"
] | 2
|
2016-07-29T04:35:22.000Z
|
2017-01-18T17:05:36.000Z
|
import unittest
from Lambdas.OpenClosed.open_closed import greet, spoken, shouted, whispered
class MyTestCase(unittest.TestCase):
def test_1(self):
self.assertEqual(greet(spoken, "Hello"), "Hello.")
def test_2(self):
self.assertEqual(greet(shouted, "Hello"), "HELLO!")
def test_3(self):
self.assertEqual(greet(whispered, "Hello"), "hello.")
if __name__ == '__main__':
unittest.main()
| 22.684211
| 76
| 0.675174
| 51
| 431
| 5.470588
| 0.490196
| 0.075269
| 0.204301
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008499
| 0.180974
| 431
| 18
| 77
| 23.944444
| 0.78187
| 0
| 0
| 0
| 0
| 0
| 0.095128
| 0
| 0
| 0
| 0
| 0
| 0.272727
| 1
| 0.272727
| false
| 0
| 0.181818
| 0
| 0.545455
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
51f468130ef3c4010cdc5ac019207df588255d42
| 195
|
py
|
Python
|
samsa/kafka/exceptions.py
|
tombasche/samsa
|
c7e55f9cbc2f87df310a3ed8246b4c5784937984
|
[
"MIT"
] | null | null | null |
samsa/kafka/exceptions.py
|
tombasche/samsa
|
c7e55f9cbc2f87df310a3ed8246b4c5784937984
|
[
"MIT"
] | null | null | null |
samsa/kafka/exceptions.py
|
tombasche/samsa
|
c7e55f9cbc2f87df310a3ed8246b4c5784937984
|
[
"MIT"
] | 1
|
2019-07-01T12:03:51.000Z
|
2019-07-01T12:03:51.000Z
|
class KafkaTimeoutError(Exception):
"""
Error raised when the poll from Kafka returns nothing and therefore there is nothing to read.
"""
pass # pylint:disable=unnecessary-pass
| 27.857143
| 97
| 0.717949
| 24
| 195
| 5.833333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210256
| 195
| 6
| 98
| 32.5
| 0.909091
| 0.646154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
51fff6f063f69c8613fba172d3267c69077fa417
| 156
|
py
|
Python
|
src/cbopensource/connectors/taxii/__init__.py
|
jjfallete/cb-taxii-connector
|
31b42c8ea46d14f2af63788a8ffada0c998bdb46
|
[
"MIT"
] | 16
|
2015-09-21T18:22:00.000Z
|
2021-11-04T11:16:12.000Z
|
src/cbopensource/connectors/taxii/__init__.py
|
jjfallete/cb-taxii-connector
|
31b42c8ea46d14f2af63788a8ffada0c998bdb46
|
[
"MIT"
] | 20
|
2016-02-09T20:44:35.000Z
|
2022-03-28T20:48:09.000Z
|
src/cbopensource/connectors/taxii/__init__.py
|
jjfallete/cb-taxii-connector
|
31b42c8ea46d14f2af63788a8ffada0c998bdb46
|
[
"MIT"
] | 9
|
2015-09-28T08:12:23.000Z
|
2022-03-28T20:09:12.000Z
|
# coding: utf-8
# Copyright © 2014-2020 VMware, Inc. All Rights Reserved.
################################################################################
| 31.2
| 80
| 0.339744
| 12
| 156
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06338
| 0.089744
| 156
| 4
| 81
| 39
| 0.309859
| 0.442308
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cfbb01ef6985d34bcf988ce915307a2f0349dba2
| 237
|
py
|
Python
|
PY/test.py
|
digitalrobertlima/BrCrypto
|
a49a0020266bf89e76db7b1f57792727eab3470f
|
[
"MIT"
] | null | null | null |
PY/test.py
|
digitalrobertlima/BrCrypto
|
a49a0020266bf89e76db7b1f57792727eab3470f
|
[
"MIT"
] | null | null | null |
PY/test.py
|
digitalrobertlima/BrCrypto
|
a49a0020266bf89e76db7b1f57792727eab3470f
|
[
"MIT"
] | null | null | null |
import unittest
from Block import *
from Transaction import *
from ecdsa import SigningKey, NIST384p
class UnitTest(unittest.TestCase):
def hash(self):
self.assertEqual(calculateHash(0, "", 1465154705, [], 0, 0), "")
| 29.625
| 76
| 0.691983
| 27
| 237
| 6.074074
| 0.62963
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08377
| 0.194093
| 237
| 8
| 76
| 29.625
| 0.774869
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0.142857
| false
| 0
| 0.571429
| 0
| 0.857143
| 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
|
32150a316f825044e34a51fba264b73b769087ea
| 152
|
py
|
Python
|
seiretsu/matrix/scoring_matrix.py
|
ja-b/seiretsu
|
665804d48043696b34cbca5a0e2de0d1ab27b84d
|
[
"MIT"
] | null | null | null |
seiretsu/matrix/scoring_matrix.py
|
ja-b/seiretsu
|
665804d48043696b34cbca5a0e2de0d1ab27b84d
|
[
"MIT"
] | null | null | null |
seiretsu/matrix/scoring_matrix.py
|
ja-b/seiretsu
|
665804d48043696b34cbca5a0e2de0d1ab27b84d
|
[
"MIT"
] | null | null | null |
class ScoringMatrix(object):
"""
Defines a scoring-matrix between Kanji
"""
def get(self, **kwargs):
raise NotImplementedError
| 19
| 42
| 0.638158
| 15
| 152
| 6.466667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.256579
| 152
| 7
| 43
| 21.714286
| 0.858407
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5c63c79ad48961ad6e3375402609c9aeabf1b3d9
| 200
|
py
|
Python
|
api/crud_projects/router.py
|
pypeclub/openpype4-backend
|
a0abe2ed66887c6529b01bbb9cb00278bbff41e4
|
[
"Apache-2.0"
] | 2
|
2022-03-09T08:02:52.000Z
|
2022-03-15T00:34:01.000Z
|
api/crud_projects/router.py
|
pypeclub/openpype4-backend
|
a0abe2ed66887c6529b01bbb9cb00278bbff41e4
|
[
"Apache-2.0"
] | 1
|
2022-03-08T16:22:34.000Z
|
2022-03-08T16:22:34.000Z
|
api/crud_projects/router.py
|
pypeclub/openpype4-backend
|
a0abe2ed66887c6529b01bbb9cb00278bbff41e4
|
[
"Apache-2.0"
] | null | null | null |
from fastapi import APIRouter
from openpype.api import ResponseFactory
router = APIRouter(
tags=["Projects"],
responses={401: ResponseFactory.error(401), 403: ResponseFactory.error(403)},
)
| 22.222222
| 81
| 0.75
| 22
| 200
| 6.818182
| 0.636364
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069364
| 0.135
| 200
| 8
| 82
| 25
| 0.797688
| 0
| 0
| 0
| 0
| 0
| 0.04
| 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
|
5c736cbbc8168d23b68a2c4e75adab29b85191a6
| 1,206
|
py
|
Python
|
setup.py
|
dikkechill/LightMatchingEngine
|
112ea6c386aa33cb6d3dc024d9f5a1ec6c70aec4
|
[
"MIT"
] | 251
|
2017-02-08T00:18:15.000Z
|
2022-03-31T03:36:03.000Z
|
setup.py
|
dikkechill/LightMatchingEngine
|
112ea6c386aa33cb6d3dc024d9f5a1ec6c70aec4
|
[
"MIT"
] | 9
|
2017-02-08T02:20:49.000Z
|
2022-01-13T20:17:22.000Z
|
setup.py
|
dikkechill/LightMatchingEngine
|
112ea6c386aa33cb6d3dc024d9f5a1ec6c70aec4
|
[
"MIT"
] | 80
|
2017-06-06T15:58:08.000Z
|
2022-03-05T07:32:42.000Z
|
from setuptools import setup, find_packages, Extension
setup(
name="lightmatchingengine",
url="https://github.com/gavincyi/LightMatchingEngine",
license='MIT',
author="Gavin Chan",
author_email="gavincyi@gmail.com",
description="A light matching engine",
packages=find_packages(exclude=('tests',)),
use_scm_version=True,
install_requires=[],
setup_requires=['setuptools_scm', 'cython'],
ext_modules=[Extension(
'lightmatchingengine.lightmatchingengine',
['lightmatchingengine/lightmatchingengine.pyx'])],
tests_require=[
'pytest'
],
extras_require={
'performance': ['pandas', 'docopt', 'tabulate', 'tqdm']
},
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
)
| 28.714286
| 63
| 0.621061
| 112
| 1,206
| 6.589286
| 0.553571
| 0.205962
| 0.271003
| 0.176152
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013994
| 0.229685
| 1,206
| 41
| 64
| 29.414634
| 0.780409
| 0
| 0
| 0.058824
| 0
| 0
| 0.519071
| 0.067993
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.029412
| 0
| 0.029412
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5cbac6b3ac6d45387f075b5224ec67897c10f280
| 68
|
py
|
Python
|
flaskserver.py
|
listenzcc/HTML_backend_scripts
|
3441ee643461219d1d90212a7f5f072c294b2c6a
|
[
"MIT"
] | null | null | null |
flaskserver.py
|
listenzcc/HTML_backend_scripts
|
3441ee643461219d1d90212a7f5f072c294b2c6a
|
[
"MIT"
] | null | null | null |
flaskserver.py
|
listenzcc/HTML_backend_scripts
|
3441ee643461219d1d90212a7f5f072c294b2c6a
|
[
"MIT"
] | null | null | null |
from FlaskServer.server import Server
app = Server()
app.run()
| 13.6
| 38
| 0.705882
| 9
| 68
| 5.333333
| 0.666667
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191176
| 68
| 4
| 39
| 17
| 0.872727
| 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
|
5cbc5c4d39d797d14a96ee7e3cf1b420bebb4090
| 77
|
py
|
Python
|
protexam/protexam_output.py
|
caufieldjh/protexam
|
425b62ed33fe6c747bc82d28c20ab5da96b17357
|
[
"MIT"
] | null | null | null |
protexam/protexam_output.py
|
caufieldjh/protexam
|
425b62ed33fe6c747bc82d28c20ab5da96b17357
|
[
"MIT"
] | 1
|
2021-09-29T18:47:42.000Z
|
2021-09-29T23:48:51.000Z
|
protexam/protexam_output.py
|
caufieldjh/protexam
|
425b62ed33fe6c747bc82d28c20ab5da96b17357
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
#protexam_output.py
'''
Output functions for ProtExAM.
'''
| 12.833333
| 30
| 0.714286
| 10
| 77
| 5.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103896
| 77
| 5
| 31
| 15.4
| 0.782609
| 0.844156
| 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
|
5cd6116771f87fe8a6b99f8ba3cbb8f6acd5b7a9
| 480
|
py
|
Python
|
manage.py
|
robcharlwood/you-judge
|
16c15c8ac725f364fdfe0c48b7485d747d38c4d3
|
[
"MIT"
] | 5
|
2018-11-05T14:51:08.000Z
|
2020-11-29T10:32:20.000Z
|
manage.py
|
robcharlwood/you-judge
|
16c15c8ac725f364fdfe0c48b7485d747d38c4d3
|
[
"MIT"
] | 41
|
2018-07-30T19:49:30.000Z
|
2021-12-13T19:49:06.000Z
|
manage.py
|
robcharlwood/you-judge
|
16c15c8ac725f364fdfe0c48b7485d747d38c4d3
|
[
"MIT"
] | 1
|
2021-03-01T09:24:59.000Z
|
2021-03-01T09:24:59.000Z
|
#!/usr/bin/env python
import os
import sys
from core.boot import fix_path
fix_path(include_dev_libs=True)
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings.local')
from djangae.core.management import execute_from_command_line
from djangae.core.management import test_execute_from_command_line
if 'test' in sys.argv:
test_execute_from_command_line(sys.argv)
else:
execute_from_command_line(sys.argv)
| 25.263158
| 74
| 0.764583
| 70
| 480
| 4.842857
| 0.485714
| 0.129794
| 0.212389
| 0.259587
| 0.442478
| 0.171091
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152083
| 480
| 18
| 75
| 26.666667
| 0.832924
| 0.041667
| 0
| 0
| 0
| 0
| 0.115468
| 0.04793
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.416667
| 0
| 0.416667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
7a298f862f68bd7b75a12e7274f9edf27416d649
| 99
|
py
|
Python
|
examples/myqueryset/simplerelate/apps.py
|
zhengtong0898/django-decode
|
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
|
[
"MIT"
] | 5
|
2020-07-14T07:48:10.000Z
|
2021-12-20T21:20:10.000Z
|
examples/myqueryset/simplerelate/apps.py
|
zhengtong0898/django-decode
|
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
|
[
"MIT"
] | 7
|
2021-03-26T03:13:38.000Z
|
2022-03-12T00:42:03.000Z
|
examples/myqueryset/simplerelate/apps.py
|
zhengtong0898/django-decode
|
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
|
[
"MIT"
] | 1
|
2021-02-16T07:04:25.000Z
|
2021-02-16T07:04:25.000Z
|
from django.apps import AppConfig
class SimplerelateConfig(AppConfig):
name = 'simplerelate'
| 16.5
| 36
| 0.777778
| 10
| 99
| 7.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151515
| 99
| 5
| 37
| 19.8
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
7a2a336cd8c3364d0b4afa7365f32b55232c3c12
| 122
|
py
|
Python
|
djangobench/benchmarks/default_middleware/settings.py
|
Bouke/djangobench
|
94fc28d99f95c65d26d0fad8af44e46c49282220
|
[
"BSD-3-Clause"
] | 3
|
2016-11-27T22:25:34.000Z
|
2018-12-12T20:06:40.000Z
|
djangobench/benchmarks/default_middleware/settings.py
|
Bouke/djangobench
|
94fc28d99f95c65d26d0fad8af44e46c49282220
|
[
"BSD-3-Clause"
] | null | null | null |
djangobench/benchmarks/default_middleware/settings.py
|
Bouke/djangobench
|
94fc28d99f95c65d26d0fad8af44e46c49282220
|
[
"BSD-3-Clause"
] | null | null | null |
from djangobench.base_settings import *
INSTALLED_APPS = ['default_middleware']
ROOT_URLCONF = 'default_middleware.urls'
| 24.4
| 40
| 0.819672
| 14
| 122
| 6.785714
| 0.857143
| 0.357895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090164
| 122
| 4
| 41
| 30.5
| 0.855856
| 0
| 0
| 0
| 0
| 0
| 0.336066
| 0.188525
| 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
|
7a5dfdae8b762b229fea9c103d0e380405ed8de1
| 34
|
py
|
Python
|
check.py
|
skaidmd/Study_Bandits
|
02471926b5a5a3b568c8028a6234af9f85f99d37
|
[
"MIT"
] | null | null | null |
check.py
|
skaidmd/Study_Bandits
|
02471926b5a5a3b568c8028a6234af9f85f99d37
|
[
"MIT"
] | null | null | null |
check.py
|
skaidmd/Study_Bandits
|
02471926b5a5a3b568c8028a6234af9f85f99d37
|
[
"MIT"
] | null | null | null |
for i in xrange(10000):
print(i)
| 17
| 23
| 0.676471
| 7
| 34
| 3.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 0.176471
| 34
| 2
| 24
| 17
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
7a5f26a92d21e57f2287f5f6947b70d4a761e6bd
| 193
|
py
|
Python
|
.github/noep-pkg/setup.py
|
DropD/sparkplug
|
be817103ef32cbc908de004659b538993d14eeb4
|
[
"MIT"
] | 5
|
2017-11-28T14:57:53.000Z
|
2019-01-16T08:48:10.000Z
|
.github/noep-pkg/setup.py
|
DropD/sparkplug
|
be817103ef32cbc908de004659b538993d14eeb4
|
[
"MIT"
] | 49
|
2017-04-11T11:18:58.000Z
|
2021-02-10T23:06:20.000Z
|
.github/noep-pkg/setup.py
|
DropD/sparkplug
|
be817103ef32cbc908de004659b538993d14eeb4
|
[
"MIT"
] | 8
|
2017-06-16T17:01:33.000Z
|
2021-02-09T10:28:03.000Z
|
# pylint: disable=missing-docstring
from setuptools import setup, find_packages
if __name__ == '__main__':
setup(name='reentry-test-noep', packages=find_packages(), reentry_register=True)
| 32.166667
| 84
| 0.777202
| 24
| 193
| 5.791667
| 0.75
| 0.172662
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103627
| 193
| 5
| 85
| 38.6
| 0.803468
| 0.170984
| 0
| 0
| 0
| 0
| 0.158228
| 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
|
7a847cce09fc81526b2881206804678f14b67f3b
| 412
|
py
|
Python
|
Ex017 - Catetos e Hipotenusa.py
|
MarcusMendes81/Python
|
4af6653da324604930d24542a84a530348029d39
|
[
"Apache-2.0"
] | null | null | null |
Ex017 - Catetos e Hipotenusa.py
|
MarcusMendes81/Python
|
4af6653da324604930d24542a84a530348029d39
|
[
"Apache-2.0"
] | null | null | null |
Ex017 - Catetos e Hipotenusa.py
|
MarcusMendes81/Python
|
4af6653da324604930d24542a84a530348029d39
|
[
"Apache-2.0"
] | null | null | null |
'''cat1 = int(input('Digite o valor do primeiro cateto: '))
cat2 = int(input('Digite o valor do segundo cateto: '))
hip = ((cat1 ** 2) + (cat2 ** 2))**(1/2)
print('O valor da hipotenusa é: {:.2f} '.format(hip))'''
from math import hypot
co = int(input('Digite o valor do primeiro cateto:'))
ca = int(input('Digite o valor do segundo cateto:'))
hip = hypot(co, ca)
print('O valor da hipotenusa é:', hip)
| 41.2
| 60
| 0.635922
| 67
| 412
| 3.910448
| 0.38806
| 0.137405
| 0.21374
| 0.229008
| 0.748092
| 0.748092
| 0.564886
| 0.564886
| 0.290076
| 0
| 0
| 0.026549
| 0.177184
| 412
| 9
| 61
| 45.777778
| 0.746313
| 0.502427
| 0
| 0
| 0
| 0
| 0.478947
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.2
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 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
|
7aa64f9e6b0f3b48c9091946c0172bf03f6957d0
| 635
|
py
|
Python
|
django_thermostat/admin.py
|
jpardobl/django-thermostat
|
184e398134f289eb0337ec2af33c650f9ee26a13
|
[
"BSD-3-Clause"
] | null | null | null |
django_thermostat/admin.py
|
jpardobl/django-thermostat
|
184e398134f289eb0337ec2af33c650f9ee26a13
|
[
"BSD-3-Clause"
] | null | null | null |
django_thermostat/admin.py
|
jpardobl/django-thermostat
|
184e398134f289eb0337ec2af33c650f9ee26a13
|
[
"BSD-3-Clause"
] | null | null | null |
from django.contrib import admin
from models import *
class ThermometerAdmin(admin.ModelAdmin):
pass
admin.site.register(Thermometer, ThermometerAdmin)
class RuleAdmin(admin.ModelAdmin):
pass
admin.site.register(Rule, RuleAdmin)
class ConditionalAdmin(admin.ModelAdmin):
pass
admin.site.register(Conditional, ConditionalAdmin)
class DayAdmin(admin.ModelAdmin):
pass
admin.site.register(Day, DayAdmin)
class TimeRangeAdmin(admin.ModelAdmin):
pass
admin.site.register(TimeRange, TimeRangeAdmin)
class ThermometerDataAdmin(admin.ModelAdmin):
pass
admin.site.register(ThermometerData, ThermometerDataAdmin)
| 21.896552
| 58
| 0.801575
| 68
| 635
| 7.485294
| 0.338235
| 0.176817
| 0.223969
| 0.282908
| 0.424361
| 0.424361
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110236
| 635
| 28
| 59
| 22.678571
| 0.900885
| 0
| 0
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.3
| 0.1
| 0
| 0.4
| 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
|
7aacbb554973828c71b01733b077936fea952b6e
| 935
|
py
|
Python
|
nas4candle/nasapi/__init__.py
|
scrlnas2019/nas4candle
|
318959424cc66819c816054a87bd1cb5d426e2e7
|
[
"BSD-3-Clause"
] | 1
|
2021-01-22T04:03:00.000Z
|
2021-01-22T04:03:00.000Z
|
nas4candle/nasapi/__init__.py
|
scrlnas2019/nas4candle
|
318959424cc66819c816054a87bd1cb5d426e2e7
|
[
"BSD-3-Clause"
] | 1
|
2021-01-23T00:14:17.000Z
|
2021-01-23T00:14:17.000Z
|
nas4candle/nasapi/__init__.py
|
scrlnas2019/nas4candle
|
318959424cc66819c816054a87bd1cb5d426e2e7
|
[
"BSD-3-Clause"
] | 2
|
2019-11-27T04:42:00.000Z
|
2021-01-22T04:06:59.000Z
|
"""
nas4candle.nasapi is a Python package which provides a common interface for the implementation and study of scalable hyperparameter and neural architecture search methods. In this package we provide to the user different modules:
- ``benchmark``: a set of problems for hyperparameter or neural architecture search which the user can use to compare our different search algorithms or as examples to build their own problems.
- ``evaluator``: a set of objects which help to run search on different systems and for different cases such as quick and light experiments or long and heavy runs.
- ``search``: a set of algorithms for hyperparameter and neural architecture search. You will also find a modular way to define new search algorithms and specific sub modules for hyperparameter or neural architecture search.
"""
from nas4candle.nasapi.__version__ import __version__
name = 'nas4candle.nasapi'
version = __version__
| 103.888889
| 229
| 0.79893
| 136
| 935
| 5.404412
| 0.529412
| 0.097959
| 0.130612
| 0.095238
| 0.228571
| 0.117007
| 0
| 0
| 0
| 0
| 0
| 0.003822
| 0.160428
| 935
| 9
| 230
| 103.888889
| 0.932484
| 0.881283
| 0
| 0
| 0
| 0
| 0.163462
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
7abfbae47feb06ca012a74702e0b9b6405a037c8
| 206
|
py
|
Python
|
app/indexView.py
|
HenrikRyborg/flask-auth
|
e652d06b1ccc033b39511573ac0cc06d3e79882c
|
[
"MIT"
] | 1
|
2021-03-01T10:02:44.000Z
|
2021-03-01T10:02:44.000Z
|
app/indexView.py
|
HenrikRyborg/flask-auth
|
e652d06b1ccc033b39511573ac0cc06d3e79882c
|
[
"MIT"
] | null | null | null |
app/indexView.py
|
HenrikRyborg/flask-auth
|
e652d06b1ccc033b39511573ac0cc06d3e79882c
|
[
"MIT"
] | null | null | null |
from flask import render_template, Blueprint
indexBP = Blueprint('indexBP', __name__)
# indexView
@indexBP.route('/', methods=['GET','POST'])
def indexView():
return render_template('index.html')
| 22.888889
| 44
| 0.713592
| 23
| 206
| 6.130435
| 0.73913
| 0.198582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131068
| 206
| 9
| 45
| 22.888889
| 0.78771
| 0.043689
| 0
| 0
| 0
| 0
| 0.127551
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.4
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8fab65035aa835cebe9b59323b637d4a07f3dcab
| 263
|
py
|
Python
|
gizmo/__init__.py
|
davebshow/gizmo
|
d1679da0ec12e72e0fb1b4dd3e7d9a60ddb6b34a
|
[
"MIT"
] | 2
|
2015-04-15T20:20:50.000Z
|
2015-04-27T17:25:12.000Z
|
gizmo/__init__.py
|
davebshow/gizmo
|
d1679da0ec12e72e0fb1b4dd3e7d9a60ddb6b34a
|
[
"MIT"
] | null | null | null |
gizmo/__init__.py
|
davebshow/gizmo
|
d1679da0ec12e72e0fb1b4dd3e7d9a60ddb6b34a
|
[
"MIT"
] | null | null | null |
from .connection import ConnectionManager, aiohttp_factory, websockets_factory
from .client import AsyncGremlinClient
from .exceptions import RequestError, GremlinServerError, SocketClientError
from .tasks import async, group, chain, chord
__version__ = "0.1.12"
| 43.833333
| 78
| 0.840304
| 29
| 263
| 7.413793
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016878
| 0.098859
| 263
| 5
| 79
| 52.6
| 0.890295
| 0
| 0
| 0
| 0
| 0
| 0.022814
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.8
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8fccfa9e6bf33b4e1a6a7344dc07da92a9b53fc2
| 82
|
py
|
Python
|
events/moderation/__init__.py
|
DangVietH/DangVietBot
|
e59092c57d990339d6a4f0cd412e5f243df2d6ed
|
[
"MIT"
] | 2
|
2022-03-24T09:03:40.000Z
|
2022-03-25T18:31:42.000Z
|
events/moderation/__init__.py
|
DangVietH/DangVietBot
|
e59092c57d990339d6a4f0cd412e5f243df2d6ed
|
[
"MIT"
] | null | null | null |
events/moderation/__init__.py
|
DangVietH/DangVietBot
|
e59092c57d990339d6a4f0cd412e5f243df2d6ed
|
[
"MIT"
] | null | null | null |
from .log import ModLog
async def setup(bot):
await bot.add_cog(ModLog(bot))
| 16.4
| 34
| 0.719512
| 14
| 82
| 4.142857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170732
| 82
| 5
| 34
| 16.4
| 0.852941
| 0
| 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
|
8fd38b8dd9d252340d0aabfb1b4d87bf0813cafe
| 194
|
py
|
Python
|
models.py
|
Dingrongdeer/x-village-todo
|
0a82f32e14c2340af9986034381700e405b0f9f9
|
[
"MIT"
] | null | null | null |
models.py
|
Dingrongdeer/x-village-todo
|
0a82f32e14c2340af9986034381700e405b0f9f9
|
[
"MIT"
] | null | null | null |
models.py
|
Dingrongdeer/x-village-todo
|
0a82f32e14c2340af9986034381700e405b0f9f9
|
[
"MIT"
] | null | null | null |
from app import db
class Record(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(120), nullable=True)
cost = db.Column(db.Integer, nullable=True)
| 24.25
| 51
| 0.695876
| 31
| 194
| 4.322581
| 0.580645
| 0.179104
| 0.223881
| 0.253731
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018519
| 0.164948
| 194
| 7
| 52
| 27.714286
| 0.808642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
8ffbbc36f3f396fce6ccb9602bbbd4d2cb8602c2
| 142
|
py
|
Python
|
AlgoExpert/array/isValidSubsequence/data.py
|
Muzque/Leetcode
|
d06365792c9ef48e0a290da00ba5e71f212554d5
|
[
"MIT"
] | 1
|
2021-05-11T09:52:38.000Z
|
2021-05-11T09:52:38.000Z
|
AlgoExpert/array/isValidSubsequence/data.py
|
Muzque/Leetcode
|
d06365792c9ef48e0a290da00ba5e71f212554d5
|
[
"MIT"
] | null | null | null |
AlgoExpert/array/isValidSubsequence/data.py
|
Muzque/Leetcode
|
d06365792c9ef48e0a290da00ba5e71f212554d5
|
[
"MIT"
] | 1
|
2021-05-05T04:13:17.000Z
|
2021-05-05T04:13:17.000Z
|
samples = [
{
"input": {
"array": [5, 1, 22, 25, 6, -1, 8, 10],
},
"output": [1, 6, -1, 10],
},
]
| 15.777778
| 50
| 0.274648
| 16
| 142
| 2.4375
| 0.6875
| 0.102564
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.213333
| 0.471831
| 142
| 8
| 51
| 17.75
| 0.306667
| 0
| 0
| 0
| 0
| 0
| 0.112676
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8912fe2a35bf42f22d7c8914fa4f1894e330542c
| 155
|
py
|
Python
|
polyReorder/scripts/polyReorder/tools.py
|
rusn07/polyReorder
|
13da436761d5650707daf7d2660d19a27af4d949
|
[
"MIT"
] | 20
|
2017-04-21T11:57:40.000Z
|
2022-03-12T07:00:51.000Z
|
polyReorder/scripts/polyReorder/tools.py
|
kamilisa/polyReorder
|
13da436761d5650707daf7d2660d19a27af4d949
|
[
"MIT"
] | 1
|
2019-12-16T08:49:40.000Z
|
2019-12-23T14:15:50.000Z
|
polyReorder/scripts/polyReorder/tools.py
|
kamilisa/polyReorder
|
13da436761d5650707daf7d2660d19a27af4d949
|
[
"MIT"
] | 9
|
2017-04-18T18:28:26.000Z
|
2021-09-26T05:45:48.000Z
|
"""
polyReorder
Support script for polyReorder plugin.
"""
from maya import cmds
def polyReorderTool(*args):
cmds.setToolTo(cmds.polyReorderCtx())
| 15.5
| 41
| 0.741935
| 17
| 155
| 6.764706
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148387
| 155
| 10
| 41
| 15.5
| 0.871212
| 0.335484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8919ef8fea7fd7bcf98aa3474e10fa0054399229
| 607
|
py
|
Python
|
tests/kyu_8_tests/test_sum_mixed_array.py
|
the-zebulan/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 40
|
2016-03-09T12:26:20.000Z
|
2022-03-23T08:44:51.000Z
|
tests/kyu_8_tests/test_sum_mixed_array.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | null | null | null |
tests/kyu_8_tests/test_sum_mixed_array.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 36
|
2016-11-07T19:59:58.000Z
|
2022-03-31T11:18:27.000Z
|
import unittest
from katas.kyu_8.sum_mixed_array import sum_mix
class SumMixTestCase(unittest.TestCase):
def test_equal_1(self):
self.assertEqual(sum_mix([9, 3, '7', '3']), 22)
def test_equal_2(self):
self.assertEqual(sum_mix(['5', '0', 9, 3, 2, 1, '9', 6, 7]), 42)
def test_equal_3(self):
self.assertEqual(sum_mix(['3', 6, 6, 0, '5', 8, 5, '6', 2, '0']), 41)
def test_equal_4(self):
self.assertEqual(sum_mix(['1', '5', '8', 8, 9, 9, 2, '3']), 45)
def test_equal_5(self):
self.assertEqual(sum_mix([8, 0, 0, 8, 5, 7, 2, 3, 7, 8, 6, 7]), 61)
| 28.904762
| 77
| 0.574959
| 109
| 607
| 3.027523
| 0.293578
| 0.109091
| 0.181818
| 0.333333
| 0.378788
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124473
| 0.21911
| 607
| 20
| 78
| 30.35
| 0.57173
| 0
| 0
| 0
| 0
| 0
| 0.021417
| 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
|
64e713e31288c7168c26200e6daa2055d03e6268
| 149
|
py
|
Python
|
deui/html/view/footer_element.py
|
urushiyama/DeUI
|
14530d2dae7d96a3dee30759f85e02239fb433c5
|
[
"MIT"
] | 1
|
2021-10-17T01:54:18.000Z
|
2021-10-17T01:54:18.000Z
|
deui/html/view/footer_element.py
|
urushiyama/DeUI
|
14530d2dae7d96a3dee30759f85e02239fb433c5
|
[
"MIT"
] | null | null | null |
deui/html/view/footer_element.py
|
urushiyama/DeUI
|
14530d2dae7d96a3dee30759f85e02239fb433c5
|
[
"MIT"
] | null | null | null |
from .element import Element
class Footer(Element):
"""
Represents content footer.
"""
def __str__(self):
return "footer"
| 13.545455
| 30
| 0.610738
| 15
| 149
| 5.8
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.281879
| 149
| 10
| 31
| 14.9
| 0.813084
| 0.174497
| 0
| 0
| 0
| 0
| 0.056075
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
8f1178a64b796f6489e0144feddc7b10d494f607
| 258
|
py
|
Python
|
quake/client/base/plan.py
|
It4innovations/quake
|
a57f37e5c871e0c7c00b84aef638b925ef96690a
|
[
"MIT"
] | 1
|
2021-03-26T14:23:44.000Z
|
2021-03-26T14:23:44.000Z
|
quake/client/base/plan.py
|
It4innovations/quake
|
a57f37e5c871e0c7c00b84aef638b925ef96690a
|
[
"MIT"
] | null | null | null |
quake/client/base/plan.py
|
It4innovations/quake
|
a57f37e5c871e0c7c00b84aef638b925ef96690a
|
[
"MIT"
] | null | null | null |
class Plan:
def __init__(self):
self.tasks = []
def add_task(self, task):
assert task.task_id is None
self.tasks.append(task)
def take_tasks(self):
tasks = self.tasks
self.tasks = []
return tasks
| 19.846154
| 35
| 0.562016
| 33
| 258
| 4.181818
| 0.454545
| 0.326087
| 0.304348
| 0.26087
| 0.231884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.337209
| 258
| 12
| 36
| 21.5
| 0.807018
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 1
| 0.3
| false
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8f24965a1803dfe08e2c010f3f7432a7a795a728
| 218
|
py
|
Python
|
site/app/api_1_0/__init__.py
|
aijaz/qrCodeSigninServer
|
255289374f3e9ed0ce2a8bcb41281ff467eba902
|
[
"MIT"
] | 2
|
2020-07-07T20:53:06.000Z
|
2020-07-26T22:00:27.000Z
|
site/app/api_1_0/__init__.py
|
aijaz/qrCodeSigninServer
|
255289374f3e9ed0ce2a8bcb41281ff467eba902
|
[
"MIT"
] | 4
|
2021-04-30T21:22:23.000Z
|
2022-01-13T02:57:52.000Z
|
site/app/api_1_0/__init__.py
|
aijaz/qrCodeSigninServer
|
255289374f3e9ed0ce2a8bcb41281ff467eba902
|
[
"MIT"
] | null | null | null |
from flask import Blueprint, g
import psycopg2.extras
api = Blueprint('api', __name__)
def get_cursor():
return g.conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
from . import authentication, covid
| 18.166667
| 71
| 0.775229
| 28
| 218
| 5.821429
| 0.642857
| 0.171779
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010582
| 0.133028
| 218
| 11
| 72
| 19.818182
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0.013761
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0.166667
| 0.833333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
8f26f3271116dd21429a47d3b5c489f2df7de06a
| 369
|
py
|
Python
|
backend/tests/models/test_labeler.py
|
druzhynin-oleksii/model_garden
|
3599f5d0c81bc79139ceabed5dd647c29ccadc31
|
[
"MIT"
] | 8
|
2020-09-10T18:28:19.000Z
|
2022-02-22T03:41:14.000Z
|
backend/tests/models/test_labeler.py
|
druzhynin-oleksii/model_garden
|
3599f5d0c81bc79139ceabed5dd647c29ccadc31
|
[
"MIT"
] | 1
|
2020-09-15T21:20:29.000Z
|
2020-09-15T21:20:29.000Z
|
backend/tests/models/test_labeler.py
|
druzhynin-oleksii/model_garden
|
3599f5d0c81bc79139ceabed5dd647c29ccadc31
|
[
"MIT"
] | 8
|
2020-09-10T16:29:35.000Z
|
2022-01-25T15:05:03.000Z
|
from tests import BaseTestCase
class TestLabeler(BaseTestCase):
def test_create(self):
labeler = self.test_factory.create_labeler(labeler_id=3)
self.assertEqual(labeler.labeler_id, 3)
def test_str(self):
labeler = self.test_factory.create_labeler(labeler_id=3)
self.assertEqual(str(labeler), "Labeler(labeler_id=3, username='test_labeler_3')")
| 26.357143
| 86
| 0.764228
| 51
| 369
| 5.294118
| 0.333333
| 0.259259
| 0.237037
| 0.251852
| 0.474074
| 0.474074
| 0.474074
| 0.474074
| 0.474074
| 0.474074
| 0
| 0.01548
| 0.124661
| 369
| 13
| 87
| 28.384615
| 0.820433
| 0
| 0
| 0.25
| 0
| 0
| 0.130081
| 0.127371
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| false
| 0
| 0.125
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8f2f7ef6d5e7c1330d56e51fa54fe548064c6788
| 239
|
py
|
Python
|
PyInquirer/separator.py
|
kevindurston21/PyInquirer
|
48ecba84d62c6232a625d44e7f8cc6084f25b858
|
[
"MIT"
] | 1,587
|
2018-06-14T03:05:42.000Z
|
2022-03-31T17:51:51.000Z
|
PyInquirer/separator.py
|
kevindurston21/PyInquirer
|
48ecba84d62c6232a625d44e7f8cc6084f25b858
|
[
"MIT"
] | 131
|
2018-06-27T12:38:34.000Z
|
2022-03-09T16:26:27.000Z
|
PyInquirer/separator.py
|
kevindurston21/PyInquirer
|
48ecba84d62c6232a625d44e7f8cc6084f25b858
|
[
"MIT"
] | 257
|
2018-07-03T13:47:08.000Z
|
2022-03-24T19:49:46.000Z
|
# -*- coding: utf-8 -*-
"""
Used to space/separate choices group
"""
class Separator:
line = '-' * 15
def __init__(self, line=None):
if line:
self.line = line
def __str__(self):
return self.line
| 14.9375
| 36
| 0.543933
| 29
| 239
| 4.206897
| 0.689655
| 0.196721
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018293
| 0.313808
| 239
| 15
| 37
| 15.933333
| 0.72561
| 0.246862
| 0
| 0
| 0
| 0
| 0.005814
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.142857
| 0.714286
| 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
|
8f48ef7abe7245cfabea527642f841bb241003e5
| 90
|
py
|
Python
|
__init__.py
|
FelixTheC/electronic_memory
|
20f7d89983a8751894ea61caf5f643c8d387e4a2
|
[
"MIT"
] | null | null | null |
__init__.py
|
FelixTheC/electronic_memory
|
20f7d89983a8751894ea61caf5f643c8d387e4a2
|
[
"MIT"
] | null | null | null |
__init__.py
|
FelixTheC/electronic_memory
|
20f7d89983a8751894ea61caf5f643c8d387e4a2
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@created: 11.01.21
@author: felix
"""
| 11.25
| 23
| 0.555556
| 13
| 90
| 3.846154
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0.155556
| 90
| 7
| 24
| 12.857143
| 0.552632
| 0.855556
| 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
|
8f58e408ac4f709aa15d3bc6ca6f6868290b6766
| 919
|
py
|
Python
|
flexbe_core/src/flexbe_core/core/__init__.py
|
duwke/flexbe_behavior_engine
|
8e2ca45fbdb68818599944d2d155f9367b607c5c
|
[
"BSD-3-Clause"
] | 119
|
2015-07-14T20:24:17.000Z
|
2022-03-09T02:07:50.000Z
|
flexbe_core/src/flexbe_core/core/__init__.py
|
duwke/flexbe_behavior_engine
|
8e2ca45fbdb68818599944d2d155f9367b607c5c
|
[
"BSD-3-Clause"
] | 139
|
2015-11-05T15:11:00.000Z
|
2022-03-24T13:46:47.000Z
|
flexbe_core/src/flexbe_core/core/__init__.py
|
duwke/flexbe_behavior_engine
|
8e2ca45fbdb68818599944d2d155f9367b607c5c
|
[
"BSD-3-Clause"
] | 68
|
2015-11-24T01:50:24.000Z
|
2022-03-30T10:13:28.000Z
|
from .preemptable_state_machine import PreemptableStateMachine # noqa: F401
from .operatable_state_machine import OperatableStateMachine # noqa: F401
from .lockable_state_machine import LockableStateMachine # noqa: F401
from .ros_state_machine import RosStateMachine # noqa: F401
from .state_machine import StateMachine # noqa: F401
from .concurrency_container import ConcurrencyContainer # noqa: F401
from .priority_container import PriorityContainer # noqa: F401
from .state import State # noqa: F401
from .ros_state import RosState # noqa: F401
from .manually_transitionable_state import ManuallyTransitionableState # noqa: F401
from .lockable_state import LockableState # noqa: F401
from .preemptable_state import PreemptableState # noqa: F401
from .operatable_state import OperatableState # noqa: F401
from .event_state import EventState # noqa: F401
from .user_data import UserData # noqa: F401
| 48.368421
| 84
| 0.817193
| 109
| 919
| 6.715596
| 0.293578
| 0.163934
| 0.229508
| 0.060109
| 0.196721
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056533
| 0.133841
| 919
| 18
| 85
| 51.055556
| 0.863065
| 0.178455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8f67bb0d4edbe00c03299656c39bb0b60432dbd9
| 90
|
py
|
Python
|
Python_Basics/Lists_and_Strings/lists.py
|
samyumobi/A-Complete-Python-Guide-For-Beginners
|
6ee3d73ebb481dbb5788cb0e615efdaf09079a18
|
[
"MIT"
] | 7
|
2019-06-04T13:44:27.000Z
|
2021-01-05T22:42:15.000Z
|
Python_Basics/Lists_and_Strings/lists.py
|
samyumobi/A-Complete-Python-Guide-For-Beginners
|
6ee3d73ebb481dbb5788cb0e615efdaf09079a18
|
[
"MIT"
] | null | null | null |
Python_Basics/Lists_and_Strings/lists.py
|
samyumobi/A-Complete-Python-Guide-For-Beginners
|
6ee3d73ebb481dbb5788cb0e615efdaf09079a18
|
[
"MIT"
] | 5
|
2019-09-14T11:37:47.000Z
|
2021-07-26T19:49:24.000Z
|
my_list = ["one", 2, "three"]
print(my_list)
print(type(my_list))
l = [] # an empty list
| 15
| 29
| 0.622222
| 16
| 90
| 3.3125
| 0.625
| 0.339623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.166667
| 90
| 5
| 30
| 18
| 0.693333
| 0.144444
| 0
| 0
| 0
| 0
| 0.106667
| 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
|
8f7ba01a226f0d23dcdcf6f1f962ca6dc8e5bbca
| 259
|
py
|
Python
|
avilla/core/utilles/__init__.py
|
GraiaProject/Avilla
|
3642bc8ff6d6e53f96b16270571582c948caa73a
|
[
"MIT"
] | 55
|
2021-08-29T13:28:30.000Z
|
2022-03-13T14:11:51.000Z
|
avilla/core/utilles/__init__.py
|
GraiaProject/Avilla
|
3642bc8ff6d6e53f96b16270571582c948caa73a
|
[
"MIT"
] | 40
|
2021-09-03T13:21:50.000Z
|
2022-03-26T13:31:24.000Z
|
avilla/core/utilles/__init__.py
|
GraiaProject/Avilla
|
3642bc8ff6d6e53f96b16270571582c948caa73a
|
[
"MIT"
] | 13
|
2021-09-04T15:26:56.000Z
|
2022-02-12T12:38:04.000Z
|
import random
import string
def random_string(k: int = 12):
return "".join(random.choices(string.ascii_letters + string.digits, k=k))
def as_async(func):
async def wrapper(*args, **kwargs):
return func(*args, **kwargs)
return wrapper
| 18.5
| 77
| 0.675676
| 36
| 259
| 4.777778
| 0.527778
| 0.116279
| 0.186047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009569
| 0.19305
| 259
| 13
| 78
| 19.923077
| 0.813397
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.125
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
56a988b97f0d4c8117bce034498b320d152c8573
| 66
|
py
|
Python
|
sneakers/channels/googleDocs.py
|
michalkoczwara/sneaky-creeper
|
b398af8701d51b8b3a4baf37cdaa16de3d3649d1
|
[
"MIT"
] | 1
|
2018-01-25T01:49:05.000Z
|
2018-01-25T01:49:05.000Z
|
sneakers/channels/googleDocs.py
|
michalkoczwara/sneaky-creeper
|
b398af8701d51b8b3a4baf37cdaa16de3d3649d1
|
[
"MIT"
] | null | null | null |
sneakers/channels/googleDocs.py
|
michalkoczwara/sneaky-creeper
|
b398af8701d51b8b3a4baf37cdaa16de3d3649d1
|
[
"MIT"
] | null | null | null |
# see: https://github.com/themson/MurDocK/blob/master/docBuffer.py
| 66
| 66
| 0.787879
| 10
| 66
| 5.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 66
| 1
| 66
| 66
| 0.8125
| 0.969697
| 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
|
853950f342973bf6ba49138ab3ecebb7f2a056c1
| 471
|
py
|
Python
|
examples/blatt_02.py
|
mazenbesher/simplex
|
5cc3013f20f87891658fe64bf73c7c4cc2843240
|
[
"MIT"
] | null | null | null |
examples/blatt_02.py
|
mazenbesher/simplex
|
5cc3013f20f87891658fe64bf73c7c4cc2843240
|
[
"MIT"
] | null | null | null |
examples/blatt_02.py
|
mazenbesher/simplex
|
5cc3013f20f87891658fe64bf73c7c4cc2843240
|
[
"MIT"
] | null | null | null |
import numpy as np
from simplex.main import LP, simplex
"""1"""
# aufgabe1 = LP(
# np.matrix('2 0 6; -2 8 4; 3 6 5'),
# np.matrix('10; 12; 20'),
# np.matrix('2; 1; 3; 0; 0; 0'),
# [4, 5, 6])
# print(simplex(aufgabe1, True)[1])
"""2"""
# def aufgabe2(a, b, c):
# print(simplex(LP(
# np.matrix('{} {} 1 0; -1 {} 0 1'.format(a, b, c)),
# np.matrix('8; 4'),
# np.matrix('1; 1; 0; 0'),
# [3, 4])))
#
# aufgabe2(-8, 0, 0)
| 21.409091
| 60
| 0.456476
| 81
| 471
| 2.654321
| 0.358025
| 0.223256
| 0.093023
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138643
| 0.280255
| 471
| 21
| 61
| 22.428571
| 0.495575
| 0.779193
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
853a41bcaffda102fd47f7876038e46f5f77cc91
| 76
|
py
|
Python
|
imfp/core/model_helpers.py
|
akoskaaa/imfp
|
bb02cf259311352f8f33d1001f2f202345ee00c9
|
[
"MIT"
] | null | null | null |
imfp/core/model_helpers.py
|
akoskaaa/imfp
|
bb02cf259311352f8f33d1001f2f202345ee00c9
|
[
"MIT"
] | null | null | null |
imfp/core/model_helpers.py
|
akoskaaa/imfp
|
bb02cf259311352f8f33d1001f2f202345ee00c9
|
[
"MIT"
] | null | null | null |
def get_or_none(model, id):
return model.objects.filter(id=id).first()
| 19
| 46
| 0.710526
| 13
| 76
| 4
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 76
| 3
| 47
| 25.333333
| 0.787879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
85667e737fa24576cb6e3459b3def50f9b408313
| 86
|
py
|
Python
|
strings/Exercises/slicing.py
|
WebucatorTraining/classfiles-actionable-python
|
930c154a6dbfa6c54768557a998b4dbafb43df38
|
[
"MIT"
] | 2
|
2022-01-04T22:25:01.000Z
|
2022-01-16T16:50:23.000Z
|
strings/Exercises/slicing.py
|
WebucatorTraining/classfiles-actionable-python
|
930c154a6dbfa6c54768557a998b4dbafb43df38
|
[
"MIT"
] | null | null | null |
strings/Exercises/slicing.py
|
WebucatorTraining/classfiles-actionable-python
|
930c154a6dbfa6c54768557a998b4dbafb43df38
|
[
"MIT"
] | null | null | null |
def main():
phrase = input("Choose a phrase: ")
# Write your code here
main()
| 17.2
| 39
| 0.604651
| 12
| 86
| 4.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.255814
| 86
| 5
| 40
| 17.2
| 0.8125
| 0.232558
| 0
| 0
| 0
| 0
| 0.261538
| 0
| 0
| 0
| 0
| 0.2
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
856a19971c1f323aa725f82a64def3f9d01ef730
| 2,258
|
py
|
Python
|
tests/grammpy_test/rule_tests/computing_tests/FromRuleComputeRulesTest.py
|
PatrikValkovic/grammpy
|
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
|
[
"MIT"
] | 1
|
2021-02-04T12:41:08.000Z
|
2021-02-04T12:41:08.000Z
|
tests/grammpy_test/rule_tests/computing_tests/FromRuleComputeRulesTest.py
|
PatrikValkovic/grammpy
|
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
|
[
"MIT"
] | 3
|
2017-07-08T16:28:52.000Z
|
2020-04-23T18:06:24.000Z
|
tests/grammpy_test/rule_tests/computing_tests/FromRuleComputeRulesTest.py
|
PatrikValkovic/grammpy
|
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
|
[
"MIT"
] | 1
|
2021-02-04T12:41:10.000Z
|
2021-02-04T12:41:10.000Z
|
#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 02.08.2017 10:04
:Licence MIT
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
class Single(Rule):
rule = ([0], [1])
class TwoRight(Rule):
rule = ([0], [1, 2])
class ThreeLeft(Rule):
rule = ([0, 1, 'a'], [2])
class Multiple(Rule):
rule = ([0, 1, 2], [3, 4])
class FromRuleComputeRulesTest(TestCase):
def test_rules_single(self):
r = Single.rules
self.assertIsInstance(r, list)
self.assertEqual(len(r), 1)
self.assertEqual(r[0], Single.rule)
self.assertIsInstance(r[0], tuple)
self.assertEqual(r[0][0], [0])
self.assertEqual(r[0][1], [1])
self.assertEqual(r[0][0][0], 0)
self.assertEqual(r[0][1][0], 1)
def test_rules_twoRight(self):
r = TwoRight.rules
self.assertIsInstance(r, list)
self.assertEqual(len(r), 1)
self.assertEqual(r[0], TwoRight.rule)
self.assertIsInstance(r[0], tuple)
self.assertEqual(r[0][0], [0])
self.assertEqual(r[0][1], [1, 2])
self.assertEqual(r[0][0][0], 0)
self.assertEqual(r[0][1][0], 1)
self.assertEqual(r[0][1][1], 2)
def test_rules_threeLeft(self):
r = ThreeLeft.rules
self.assertIsInstance(r, list)
self.assertEqual(len(r), 1)
self.assertEqual(r[0], ThreeLeft.rule)
self.assertIsInstance(r[0], tuple)
self.assertEqual(r[0][0], [0, 1, 'a'])
self.assertEqual(r[0][1], [2])
self.assertEqual(r[0][0][0], 0)
self.assertEqual(r[0][0][1], 1)
self.assertEqual(r[0][0][2], 'a')
self.assertEqual(r[0][1][0], 2)
def test_rules_multiple(self):
r = Multiple.rules
self.assertIsInstance(r, list)
self.assertEqual(len(r), 1)
self.assertEqual(r[0], Multiple.rule)
self.assertIsInstance(r[0], tuple)
self.assertEqual(r[0][0], [0, 1, 2])
self.assertEqual(r[0][1], [3, 4])
self.assertEqual(r[0][0][0], 0)
self.assertEqual(r[0][0][1], 1)
self.assertEqual(r[0][0][2], 2)
self.assertEqual(r[0][1][0], 3)
self.assertEqual(r[0][1][1], 4)
if __name__ == '__main__':
main()
| 26.564706
| 46
| 0.568202
| 328
| 2,258
| 3.862805
| 0.146341
| 0.35517
| 0.328335
| 0.348856
| 0.668508
| 0.651144
| 0.590371
| 0.55959
| 0.55959
| 0.55959
| 0
| 0.070968
| 0.244907
| 2,258
| 84
| 47
| 26.880952
| 0.672141
| 0.043844
| 0
| 0.372881
| 0
| 0
| 0.005116
| 0
| 0
| 0
| 0
| 0
| 0.644068
| 1
| 0.067797
| false
| 0
| 0.033898
| 0
| 0.254237
| 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
|
857808fe45808e4184ed3399b41b3db2017e224f
| 162
|
py
|
Python
|
vizdoomaze/envs/vizdoomazethree6.py
|
fanyuzeng/Vizdoomaze
|
5b444f2d861c908c4d96ae374bcce660d364f22e
|
[
"MIT"
] | 3
|
2020-09-25T16:00:49.000Z
|
2020-10-29T10:32:30.000Z
|
vizdoomaze/envs/vizdoomazethree6.py
|
fanyuzeng/Vizdoomaze
|
5b444f2d861c908c4d96ae374bcce660d364f22e
|
[
"MIT"
] | null | null | null |
vizdoomaze/envs/vizdoomazethree6.py
|
fanyuzeng/Vizdoomaze
|
5b444f2d861c908c4d96ae374bcce660d364f22e
|
[
"MIT"
] | 1
|
2021-12-17T07:50:47.000Z
|
2021-12-17T07:50:47.000Z
|
from vizdoomaze.envs.vizdoomenv import VizdoomEnv
class vizdoomazeThree6(VizdoomEnv):
def __init__(self):
super(vizdoomazeThree6, self).__init__(59)
| 27
| 50
| 0.771605
| 17
| 162
| 6.882353
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028777
| 0.141975
| 162
| 6
| 50
| 27
| 0.81295
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 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
|
85c0614dbef5b628377280ca297cebaf7d202b13
| 285
|
py
|
Python
|
src/gitsweep/entrypoints.py
|
soehlert/git-sweep
|
2599b74c56bfcc6116e5ef983970cdc7f81b8350
|
[
"MIT"
] | 1,746
|
2015-01-04T17:56:24.000Z
|
2022-03-29T22:34:09.000Z
|
src/gitsweep/entrypoints.py
|
soehlert/git-sweep
|
2599b74c56bfcc6116e5ef983970cdc7f81b8350
|
[
"MIT"
] | 30
|
2015-01-03T14:36:08.000Z
|
2021-10-06T20:02:32.000Z
|
src/gitsweep/entrypoints.py
|
soehlert/git-sweep
|
2599b74c56bfcc6116e5ef983970cdc7f81b8350
|
[
"MIT"
] | 117
|
2015-01-03T14:13:58.000Z
|
2022-02-18T08:49:08.000Z
|
def main():
"""
Command-line interface.
"""
import sys
from gitsweep.cli import CommandLine
CommandLine(sys.argv).run()
def test():
"""
Run git-sweep's test suite.
"""
import nose
import sys
nose.main(argv=['nose'] + sys.argv[1:])
| 13.571429
| 43
| 0.561404
| 35
| 285
| 4.571429
| 0.571429
| 0.1125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004926
| 0.287719
| 285
| 20
| 44
| 14.25
| 0.783251
| 0.178947
| 0
| 0.25
| 0
| 0
| 0.019704
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 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
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a42281bcdeb80900603d7537e2c88a3e04bbe921
| 151
|
py
|
Python
|
src/send_test.py
|
pankdm/icfpc-2020
|
6cac8e1b2dfaa65d80db90cb82bdb642738fb423
|
[
"MIT"
] | null | null | null |
src/send_test.py
|
pankdm/icfpc-2020
|
6cac8e1b2dfaa65d80db90cb82bdb642738fb423
|
[
"MIT"
] | null | null | null |
src/send_test.py
|
pankdm/icfpc-2020
|
6cac8e1b2dfaa65d80db90cb82bdb642738fb423
|
[
"MIT"
] | null | null | null |
import unittest
from .send import do_send
class SendTest(unittest.TestCase):
def test_0(self):
self.assertEqual("1101000", do_send("0"))
| 18.875
| 49
| 0.708609
| 21
| 151
| 4.952381
| 0.666667
| 0.115385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072
| 0.172185
| 151
| 7
| 50
| 21.571429
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0.05298
| 0
| 0
| 0
| 0
| 0
| 0.2
| 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
|
a424caa01efd996e5163da2f7703756084dd4954
| 219
|
py
|
Python
|
DjangoAPI/models.py
|
qbdq/MLAPI_DJREST
|
eb8e716014fba0ef70f6c9d71f05557f268aefee
|
[
"MIT"
] | null | null | null |
DjangoAPI/models.py
|
qbdq/MLAPI_DJREST
|
eb8e716014fba0ef70f6c9d71f05557f268aefee
|
[
"MIT"
] | null | null | null |
DjangoAPI/models.py
|
qbdq/MLAPI_DJREST
|
eb8e716014fba0ef70f6c9d71f05557f268aefee
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
class house(models.Model):
Size = models.IntegerField()
Bedrooms = models.IntegerField()
def __str__(self):
return self.Size , self.Bedrooms
| 21.9
| 40
| 0.69863
| 27
| 219
| 5.518519
| 0.666667
| 0.241611
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205479
| 219
| 10
| 40
| 21.9
| 0.856322
| 0.109589
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0.166667
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a4361a6487b62b5b6c8706a2d07ae5a4867fc25c
| 141
|
py
|
Python
|
courses/context_processors.py
|
TareqMonwer/Enstructor
|
1eb32cf89e762233d3dfbc2a34ec1ad6e63ac2ef
|
[
"bzip2-1.0.6"
] | 3
|
2020-07-13T14:02:55.000Z
|
2020-10-31T10:00:16.000Z
|
courses/context_processors.py
|
TareqMonwer/Enstructor
|
1eb32cf89e762233d3dfbc2a34ec1ad6e63ac2ef
|
[
"bzip2-1.0.6"
] | 4
|
2020-06-06T04:27:09.000Z
|
2022-03-12T00:34:03.000Z
|
courses/context_processors.py
|
TareqMonwer/Enstructor
|
1eb32cf89e762233d3dfbc2a34ec1ad6e63ac2ef
|
[
"bzip2-1.0.6"
] | null | null | null |
from .models import Subject
def active_categories(request):
return {
'all_categories': Subject.ordered_active_subjects()
}
| 17.625
| 59
| 0.70922
| 15
| 141
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205674
| 141
| 7
| 60
| 20.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.099291
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
a437a954f816373df2f4e353e5d5016e5ad90509
| 260
|
py
|
Python
|
scapy_funcs/scapyget_tcp.py
|
SecTraversl/Toolbox_Python_3.8
|
0ad1d92d3a12225ea60e4eef3f263aecfffd1b65
|
[
"MIT"
] | null | null | null |
scapy_funcs/scapyget_tcp.py
|
SecTraversl/Toolbox_Python_3.8
|
0ad1d92d3a12225ea60e4eef3f263aecfffd1b65
|
[
"MIT"
] | null | null | null |
scapy_funcs/scapyget_tcp.py
|
SecTraversl/Toolbox_Python_3.8
|
0ad1d92d3a12225ea60e4eef3f263aecfffd1b65
|
[
"MIT"
] | null | null | null |
# %%
#######################################
# THIS IS NOT THE SAME AS: my_pcap.getlayer(TCP)
def scapyget_tcp(packet_list: scapy.plist.PacketList):
result_list = [ pckt for pckt in packet_list if pckt.haslayer('TCP')]
return PacketList(result_list)
| 32.5
| 73
| 0.619231
| 34
| 260
| 4.558824
| 0.705882
| 0.129032
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138462
| 260
| 7
| 74
| 37.142857
| 0.691964
| 0.192308
| 0
| 0
| 0
| 0
| 0.017964
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a450bfedc9467bc49637fe7829ee85ada78750da
| 59
|
py
|
Python
|
000test.py
|
qq453388937/TornadoManager_Git
|
2512312461be5b6347d6da8bb30fb66c99c5e953
|
[
"MIT"
] | null | null | null |
000test.py
|
qq453388937/TornadoManager_Git
|
2512312461be5b6347d6da8bb30fb66c99c5e953
|
[
"MIT"
] | null | null | null |
000test.py
|
qq453388937/TornadoManager_Git
|
2512312461be5b6347d6da8bb30fb66c99c5e953
|
[
"MIT"
] | null | null | null |
# -*- coding:utf-8 -*-
a = {"name":"pxd"}
print(a["name"])
| 14.75
| 22
| 0.474576
| 9
| 59
| 3.111111
| 0.777778
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019608
| 0.135593
| 59
| 4
| 23
| 14.75
| 0.529412
| 0.338983
| 0
| 0
| 0
| 0
| 0.289474
| 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
|
a45f0514f8fc0e0b21b254b7160b361bd3063340
| 225
|
py
|
Python
|
froide/foirequest/media_urls.py
|
rufuspollock/froide
|
8ef4dbdd54a74f8c986d59e90348dfdbd85c5da4
|
[
"MIT"
] | 1
|
2015-10-25T22:51:28.000Z
|
2015-10-25T22:51:28.000Z
|
froide/foirequest/media_urls.py
|
okfse/froide
|
5ed80cf6550fb4cbc757029b2c860b53e784eb93
|
[
"MIT"
] | null | null | null |
froide/foirequest/media_urls.py
|
okfse/froide
|
5ed80cf6550fb4cbc757029b2c860b53e784eb93
|
[
"MIT"
] | null | null | null |
from django.conf.urls import patterns
urlpatterns = patterns("froide.foirequest.views",
(r'^(?P<message_id>\d+)/(?P<attachment_name>.+)$', 'auth_message_attachment', {},
'foirequest-auth_message_attachment'),
)
| 28.125
| 85
| 0.697778
| 26
| 225
| 5.807692
| 0.692308
| 0.145695
| 0.278146
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115556
| 225
| 7
| 86
| 32.142857
| 0.758794
| 0
| 0
| 0
| 0
| 0
| 0.555556
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a48664e32869d0ddd095f1e2b856f8331bb78054
| 23,925
|
py
|
Python
|
equideepdmri/layers/layer_builders.py
|
philip-mueller/equivariant-deep-dmri
|
4391de51eacea045783742bfd2ca2f1e2f7e964e
|
[
"MIT"
] | 13
|
2021-02-19T06:08:53.000Z
|
2022-02-21T10:30:05.000Z
|
equideepdmri/layers/layer_builders.py
|
philip-mueller/equivariant-deep-dmri
|
4391de51eacea045783742bfd2ca2f1e2f7e964e
|
[
"MIT"
] | 3
|
2021-03-25T14:18:40.000Z
|
2021-11-05T12:32:57.000Z
|
equideepdmri/layers/layer_builders.py
|
philip-mueller/equivariant-deep-dmri
|
4391de51eacea045783742bfd2ca2f1e2f7e964e
|
[
"MIT"
] | 5
|
2021-04-23T12:59:00.000Z
|
2021-12-26T21:09:37.000Z
|
from collections import OrderedDict
from functools import partial
from typing import Union, List
import torch
from torch import nn
from e3nn.non_linearities.rescaled_act import sigmoid
from e3nn.non_linearities.gated_block import GatedBlock
from equideepdmri.layers.EquivariantPQLayer import EquivariantPQLayer
from equideepdmri.layers.BatchNormalization import BatchNorm
from equideepdmri.layers.QLengthWeightedPool import QLengthWeightedAvgPool
from equideepdmri.utils.q_space import Q_SamplingSchema
from equideepdmri.utils.spherical_tensor import SphericalTensorType
from equideepdmri.layers.filter.utils import get_scalar_non_linearity
def build_pq_layer(type_in: Union[SphericalTensorType, List[int]],
type_out: Union[SphericalTensorType, List[int]],
p_kernel_size: int,
kernel: str,
q_sampling_schema_in: Union[Q_SamplingSchema, torch.Tensor, List, None],
q_sampling_schema_out: Union[Q_SamplingSchema, torch.Tensor, List, None],
non_linearity_config=None,
use_non_linearity=True,
batch_norm_config=None,
use_batch_norm=True,
transposed=False,
auto_recompute=True,
**kernel_kwargs) -> nn.Module:
"""
Builds a pq-layer consisting of an EquivariantPQLayer followed by a nonlinearity (e.g. gated nonlinearity).
:param type_in: The spherical tensor type of the input feature map.
This defines how many channels of each tensor order the input feature map has.
It can either be given as SphericalTensorType object or as List[int]] the element at index i of the list
defines the number of order-i channels,
e.g. the first element defines the number of order-0 (scalar) channels
and the second the number of order-1 (vector) channels and so on.
For all orders corresponding to out-of-range indices the number of channels is 0.
:param type_out: The spherical tensor type of the output feature map (after non-linearity).
This defines how many channels of each tensor order the output feature map has.
It can either be given as SphericalTensorType object or as List[int]] the element at index i of the list
defines the number of order-i channels,
e.g. the first element defines the number of order-0 (scalar) channels
and the second the number of order-1 (vector) channels and so on.
For all orders corresponding to out-of-range indices the number of channels is 0.
:param p_kernel_size: Size of the kernel in p-space.
Note that the kernel always covers the whole q-space (as it is not translationally equivariant),
so there is no q_kernel_size.
:param kernel: Which filter basis to use in the EquivariantPQLayer layer.
Valid options are:
- "p_space": to use the p-space filter basis
using only p-space coordinate offsets in the angular and radial part.
- "q_space": to use the q-space filter basis
using only q-space coordinate offsets in the angular part
and q-space coordinates from input and output in the radial part.
- "pq_diff": to use the pq-diff filter basis
using difference between p- and q-space coordinate offsets in the angular part
and p-space coordinate offsets, q-space coordinates from input and output in the radial part.
- "pq_TP": to use the TP (tensor product) filter basis
using the tensor product of the p- and q-space filters in the angular part
and p-space coordinate offsets, q-space coordinates from input and output in the radial part.
- "sum(<filters>)": where <filters> is a ";"-separated list (without spaces) of valid options for kernel_definition,
e.g. "sum(pq_diff;p_space)" or "sum(pq_diff;q_space)". This uses the sum of the named basis filters.
- "concat(<filters>)" where <filters> is a ";"-separated list (without spaces) of strings "<output_channels>:<filter_type>"
where <output_channels> lists the channels of each order where the named filter is to be used
(e.g. "[3, 4]" to use it for 3 scalar and 4 vector output channelw) and
<filter_type> names a valid kernel_definition to use for these output channels.
The number of all concatenated channels needs to math type_out.
Example: "concat([3,4]:pq_diff,[5,2,1]:p_space)" which would require type_out = [8,6,1]
:param q_sampling_schema_in: The q-sampling schema of input feature map.
The q-sampling schema may either be given as a Q_SamplingSchema object,
a Tensor of size (Q_in, 3) or a list of length Q_in (one element for each vector) of lists of size 3 of floats.
Note that Q_in is not explicitly given but derived form the length of this parameter.
If this is None (default) then the input does not have q-space but only p-space.
:param q_sampling_schema_out: The q-sampling schema of output feature map.
The q-sampling schema may either be given as a Q_SamplingSchema object,
a Tensor of size (Q_out, 3) or a list of length Q_out (one element for each vector) of lists of size 3 of floats.
Note that Q_out is not explicitly given but derived form the length of this parameter.
If this is None (default) then the output does not have q-space but only p-space.
:param non_linearity_config: Dict with the following optional keys:
- tensor_non_lin: The nonlinearity to use for channels with l>0 (non-scalar channels).
Default (and currently only option) is "gated".
- scalar_non_lin: The nonlinearity to use for channles with l=0 (scalar channels).
Valid options are "swish" and "relu".
Default is "swish".
:param use_non_linearity: Whether to use a nonlinearity.
:param batch_norm_config: Dict with the following optional keys:
- eps: avoid division by zero when we normalize by the variance
- momentum: momentum of the running average
- affine: do we have weight and bias parameters
- reduce: method to contract over the spacial dimensions
:param use_batch_norm: Whether to use a batch normalization
:param transposed: Whether to perform a transposed convolution using the equivariant kernel
:param auto_recompute: Whether to automatically recompute the kernel in each forward pass.
By default it is recomputed each time.
If this parameter is set to false, it is not recomputed and the method recompute() needs to be called
explicitly after parameters of this nn.Module have been updated.
:param kernel_selection_rule: Rule defining which angular filter orders (l_filter) to use
for a paths form input orders l_in to output orders l_out.
Defaults to using all possible filter orders,
i.e. all l_filter with \|l_in - l_out\| <= l_filter <= l_in + l_out.
Options are:
- dict with key "lmax" and int value which additionally defines a maximum l_filter.
- dict with int-pairs as keys and list of ints as values that defines
for each pair of l_in and l_out the list of l_filter to use.
E.g. {(0,0): [0], (1,1): [0,1], (0,1): [1]}
:param p_radial_basis_type: The radial basis function type used for p-space.
Valid options are "gaussian" (default), "cosine", "bessel".
Note that this parameter is ignored if there is no basis filter using p-space.
:param p_radial_basis_params: A (optional) dict of additional parameters for the radial basis function used for p-space.
Valid keys in this dict are:
- num_layers: Number of layers in the FC applied to the radial basis function.
If num_layers = 0 (default) then no FC is applied to the radial basis function.
- num_units: Number of units (neurons) in each of the layer in the FC applied to the radial basis function.
No default, this parameter is required and must be >0 if num_layers > 0.
- activation_function: activation function used in the FC applied to the radial basis function,
valid are "relu" (default) or "swish"
Note that this parameter is ignored if there is no basis filter using p-space.
:param q_radial_basis_type: The radial basis function type used for q-space (q-in and q-out).
Valid options are "gaussian" (default), "cosine", "bessel".
Note that this parameter is ignored if there is no basis filter using q-space.
:param q_out_radial_basis_type: The radial basis function type used for q-out (q-space of output feature map).
See q_radial_basis_type but only for q-out.
Defaults to q_radial_basis_type.
:param q_in_radial_basis_type: The radial basis function type used for q-in (q-space of input feature map).
See q_radial_basis_type but only for q-in.
Defaults to q_radial_basis_type.
:param q_radial_basis_params: A (optional) dict of additional parameters for the radial basis function used for q-space.
Valid keys in this dict are:
- num_layers: Number of layers in the FC applied to the radial basis function.
If num_layers = 0 (default) then no FC is applied to the radial basis function.
- num_units: Number of units (neurons) in each of the layer in the FC applied to the radial basis function.
No default, this parameter is required and must be >0 if num_layers > 0.
- activation_function: activation function used in the FC applied to the radial basis function,
valid are "relu" (default) or "swish"
Note that this parameter is ignored if there is no basis filter using q-space.
:param q_out_radial_basis_params: A dict of additional parameters for the radial basis function used for q-out (q-space of output feature map).
See q_radial_basis_params but only for q-out.
Defaults to q_radial_basis_params.
:param q_in_radial_basis_params: A dict of additional parameters for the radial basis function used for q-in (q-space of input feature map).
See q_radial_basis_params but only for q-in.
Defaults to q_radial_basis_params.
:param sub_kernel_selection_rule:
Rule defining for the TP filter which pairs of l_p and l_q to use for each l_filter.
Defaults to "TP\pm 1".
Options are:
- dict with string keys: defines some constraints which combinations to use.
The following constraint always holds:
\|l_p - l_q\| <= l_filter <= l_p + l_q
Additionally constraints can be defined by the following keys in the dict:
- "l_diff_to_out_max": Maximum difference between l_p and l_filter as well as l_q and l_filter.
Default to 1 (as in "TP\pm 1")
- "l_max" (optional): Maximum value for l_p and l_q.
- "l_in_diff_max" (optional): Maximum difference between l_p and l_q.
- dict with ints as keys and list of int-pairs as values that defines
for each l_filter the used pairs of l_p and l_q.
E.g. {0: [(0, 0), (1, 1)], 1: [(0, 1), (1, 0), (1, 1)]}
Note that this parameter is ignored if no TP-filter basis is used.
For additional parameters see EquivariantPQLayer.
"""
type_in = SphericalTensorType.from_multiplicities_or_type(type_in)
type_out = SphericalTensorType.from_multiplicities_or_type(type_out)
if batch_norm_config is None:
batch_norm_config = {}
if non_linearity_config is None:
non_linearity_config = {}
if use_non_linearity:
type_non_lin_in, non_linearity = build_non_linearity(type_out, **non_linearity_config)
conv = EquivariantPQLayer(type_in, type_non_lin_in,
kernel_definition=kernel,
p_kernel_size=p_kernel_size,
q_sampling_schema_in=q_sampling_schema_in,
q_sampling_schema_out=q_sampling_schema_out,
transposed=transposed,
auto_recompute_kernel=auto_recompute,
**kernel_kwargs)
if use_batch_norm:
batch_norm = BatchNorm(type_non_lin_in.Rs, **batch_norm_config)
return nn.Sequential(
OrderedDict([('conv', conv), ('batch_norm', batch_norm), ('non_linearity', non_linearity)]))
else:
return nn.Sequential(OrderedDict([('conv', conv), ('non_linearity', non_linearity)]))
else:
conv = EquivariantPQLayer(type_in, type_out,
kernel_definition=kernel,
p_kernel_size=p_kernel_size,
q_sampling_schema_in=q_sampling_schema_in,
q_sampling_schema_out=q_sampling_schema_out,
transposed=transposed,
auto_recompute_kernel=auto_recompute,
**kernel_kwargs)
if use_batch_norm:
batch_norm = BatchNorm(type_out.Rs, **batch_norm_config)
return nn.Sequential(OrderedDict([('conv', conv), ('batch_norm', batch_norm)]))
else:
return conv
def build_p_layer(type_in: Union[SphericalTensorType, List[int]],
type_out: Union[SphericalTensorType, List[int]],
kernel_size: int,
non_linearity_config=None,
use_non_linearity=True,
batch_norm_config=None,
use_batch_norm=True,
transposed=False,
auto_recompute=True,
**kernel_kwargs):
"""
Builds a p-layer consisting of an EquivariantPLayer followed by a nonlinearity (e.g. gated nonlinearity).
:param type_in: The spherical tensor type of the input feature map.
This defines how many channels of each tensor order the input feature map has.
It can either be given as SphericalTensorType object or as List[int]] the element at index i of the list
defines the number of order-i channels,
e.g. the first element defines the number of order-0 (scalar) channels
and the second the number of order-1 (vector) channels and so on.
For all orders corresponding to out-of-range indices the number of channels is 0.
:param type_out: The spherical tensor type of the output feature map (after non-linearity).
This defines how many channels of each tensor order the output feature map has.
It can either be given as SphericalTensorType object or as List[int]] the element at index i of the list
defines the number of order-i channels,
e.g. the first element defines the number of order-0 (scalar) channels
and the second the number of order-1 (vector) channels and so on.
For all orders corresponding to out-of-range indices the number of channels is 0.
:param p_kernel_size: Size of the kernel in p-space.
Note that the kernel always covers the whole q-space (as it is not translationally equivariant),
so there is no q_kernel_size.
:param non_linearity_config: Dict with the following optional keys:
- tensor_non_lin: The nonlinearity to use for channels with l>0 (non-scalar channels).
Default (and currently only option) is "gated".
- scalar_non_lin: The nonlinearity to use for channles with l=0 (scalar channels).
Valid options are "swish" and "relu".
Default is "swish".
:param use_non_linearity: Whether to use a nonlinearity.
:param batch_norm_config: Dict with the following optional keys:
- eps: avoid division by zero when we normalize by the variance
- momentum: momentum of the running average
- affine: do we have weight and bias parameters
- reduce: method to contract over the spacial dimensions
:param use_batch_norm: Whether to use a batch normalization
:param transposed: Whether to perform a transposed convolution using the equivariant kernel
:param auto_recompute: Whether to automatically recompute the kernel in each forward pass.
By default it is recomputed each time.
If this parameter is set to false, it is not recomputed and the method recompute() needs to be called
explicitly after parameters of this nn.Module have been updated.
:param kernel_selection_rule: Rule defining which angular filter orders (l_filter) to use
for a paths form input orders l_in to output orders l_out.
Defaults to using all possible filter orders,
i.e. all l_filter with \|l_in - l_out\| <= l_filter <= l_in + l_out.
Options are:
- dict with key "lmax" and int value which additionally defines a maximum l_filter.
- dict with int-pairs as keys and list of ints as values that defines
for each pair of l_in and l_out the list of l_filter to use.
E.g. {(0,0): [0], (1,1): [0,1], (0,1): [1]}
:param p_radial_basis_type: The radial basis function type used for p-space.
Valid options are "gaussian" (default), "cosine", "bessel".
Note that this parameter is ignored if there is no basis filter using p-space.
:param p_radial_basis_params: A (optional) dict of additional parameters for the radial basis function used for p-space.
Valid keys in this dict are:
- num_layers: Number of layers in the FC applied to the radial basis function.
If num_layers = 0 (default) then no FC is applied to the radial basis function.
- num_units: Number of units (neurons) in each of the layer in the FC applied to the radial basis function.
No default, this parameter is required and must be >0 if num_layers > 0.
- activation_function: activation function used in the FC applied to the radial basis function,
valid are "relu" (default) or "swish"
Note that this parameter is ignored if there is no basis filter using p-space.
For additional parameters see EquivariantPLayer.
"""
return build_pq_layer(type_in, type_out, kernel_size,
kernel='p_space',
q_sampling_schema_in=None, q_sampling_schema_out=None,
non_linearity_config=non_linearity_config,
use_non_linearity=use_non_linearity,
batch_norm_config=batch_norm_config,
use_batch_norm=use_batch_norm,
transposed=transposed,
auto_recompute=auto_recompute,
**kernel_kwargs)
def build_q_reduction_layer(type_in: Union[SphericalTensorType, List[int]], q_sampling_schema_in: Q_SamplingSchema,
reduction='length_weighted_average',
auto_recompute=True,
**kwargs):
"""
Builds a q-reduction layer to globally reduce q-space leaving only p-space.
:param type_in: The spherical tensor type of the input feature map.
This defines how many channels of each tensor order the input feature map has.
It can either be given as SphericalTensorType object or as List[int]] the element at index i of the list
defines the number of order-i channels,
e.g. the first element defines the number of order-0 (scalar) channels
and the second the number of order-1 (vector) channels and so on.
For all orders corresponding to out-of-range indices the number of channels is 0.
:param q_sampling_schema_in: The q-sampling schema of input feature map.
The q-sampling schema may either be given as a Q_SamplingSchema object,
a Tensor of size (Q_in, 3) or a list of length Q_in (one element for each vector) of lists of size 3 of floats.
Note that Q_in is not explicitly given but derived form the length of this parameter.
If this is None (default) then the input does not have q-space but only p-space.
:param reduction: The type of reduction to use. Valid options are:
- length_weighted_average: To use QLengthWeightedAvgPool (global length-weighted avg-pooling over q-space)
For additional parameters in param kwargs see QLengthWeightedAvgPool.
- mean: To use global avg-pooling over q-space.
- conv: To use an EquivariantPQLayer (and gated nonlinearity) without output q-space.
For additional parameters in param kwargs see build_pq_layer
(except the params type_out, q_sampling_schema_out).
:param auto_recompute: Whether to automatically recompute the kernels in each forward pass.
:return (reduction_layer, type_out):
- reduction_layer: The created q-reduction layer (nn.Module)
- type_out: The spherical tensor type of the output feature map.
"""
type_in = SphericalTensorType.from_multiplicities_or_type(type_in)
if reduction == 'length_weighted_average':
return QLengthWeightedAvgPool(type_in, q_sampling_schema_in,
auto_recompute=auto_recompute, **kwargs), type_in
elif reduction == 'mean':
return partial(torch.mean, dim=2), type_in
elif reduction == 'conv':
type_out = SphericalTensorType.from_multiplicities_or_type(kwargs.pop('type_out', type_in))
return build_pq_layer(type_in, type_out,
q_sampling_schema_in=q_sampling_schema_in,
q_sampling_schema_out=None,
**kwargs), type_out
else:
raise ValueError(f'q-reduction "{reduction}" not supported.')
def build_non_linearity(type_out: SphericalTensorType, tensor_non_lin='gated', scalar_non_lin='swish') -> (
SphericalTensorType, nn.Module):
"""
Builds a nonlinearity for spherical tensor feature maps.
Currently only the gated nonlinearity is supported.
:param type_out: The spherical tensor type of the output feature map (after non-linearity).
This defines how many channels of each tensor order the output feature map has.
It can either be given as SphericalTensorType object or as List[int]] the element at index i of the list
defines the number of order-i channels,
e.g. the first element defines the number of order-0 (scalar) channels
and the second the number of order-1 (vector) channels and so on.
For all orders corresponding to out-of-range indices the number of channels is 0.
:param tensor_non_lin: The nonlinearity to use for channels with l>0 (non-scalar channels).
Default (and currently only option) is "gated".
:param scalar_non_lin: The nonlinearity to use for channles with l=0 (scalar channels).
Valid options are "swish" and "relu".
Default is "swish".
:return (type_in, nonlinearity):
- type_in: The expected spherical tensor type of the input feature map.
- nonlinearity: the nonlinearity (as nn.Module) which accepts the input feature map.
"""
type_out = SphericalTensorType.from_multiplicities_or_type(type_out)
if tensor_non_lin == 'gated':
scalar_non_lin = get_scalar_non_linearity(scalar_non_lin)
non_lin = GatedBlockNonLin(type_out.Rs, scalar_non_lin, sigmoid)
return SphericalTensorType.from_Rs(non_lin.Rs_in), non_lin
else:
raise ValueError(f'Tensor Non-linearity "{tensor_non_lin}" not supported.')
class GatedBlockNonLin(GatedBlock):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def forward(self, x):
x = super(GatedBlockNonLin, self).forward(x, dim=1)
return x
| 59.962406
| 147
| 0.680418
| 3,481
| 23,925
| 4.534329
| 0.089629
| 0.027876
| 0.025659
| 0.030664
| 0.768626
| 0.73923
| 0.733084
| 0.708122
| 0.697162
| 0.680373
| 0
| 0.00509
| 0.26094
| 23,925
| 398
| 148
| 60.113065
| 0.887569
| 0.697722
| 0
| 0.373913
| 0
| 0
| 0.037658
| 0.00734
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052174
| false
| 0
| 0.113043
| 0
| 0.26087
| 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
|
a48aa9fe8f0221dbec4ecf446df70abcc9722dce
| 163
|
py
|
Python
|
vizdoommaze/envs/vizdoommazeone20.py
|
Brodong/vizdoommaze
|
1b7531f59f6eb5e94d22193d95febaf52ff6a874
|
[
"MIT"
] | null | null | null |
vizdoommaze/envs/vizdoommazeone20.py
|
Brodong/vizdoommaze
|
1b7531f59f6eb5e94d22193d95febaf52ff6a874
|
[
"MIT"
] | null | null | null |
vizdoommaze/envs/vizdoommazeone20.py
|
Brodong/vizdoommaze
|
1b7531f59f6eb5e94d22193d95febaf52ff6a874
|
[
"MIT"
] | 1
|
2021-01-14T08:58:28.000Z
|
2021-01-14T08:58:28.000Z
|
from vizdoommaze.envs.vizdoomenv import VizdoomEnv
class VizdoomMazeOne20(VizdoomEnv):
def __init__(self):
super(VizdoomMazeOne20, self).__init__(33)
| 27.166667
| 50
| 0.773006
| 17
| 163
| 6.941176
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042857
| 0.141104
| 163
| 6
| 51
| 27.166667
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 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
|
a49d4b0e5ced335c5e40468014e18c6108f2d9e4
| 415
|
py
|
Python
|
tests/app/schema/allocation.py
|
abhan00/fastana
|
46f90832d8e24185619292f76cbd1b3ce73f2dae
|
[
"Apache-2.0"
] | 1
|
2021-05-01T13:44:44.000Z
|
2021-05-01T13:44:44.000Z
|
tests/app/schema/allocation.py
|
abhan00/fastana
|
46f90832d8e24185619292f76cbd1b3ce73f2dae
|
[
"Apache-2.0"
] | 9
|
2021-04-17T03:22:56.000Z
|
2021-05-12T16:40:53.000Z
|
tests/app/schema/allocation.py
|
abhan00/fastana
|
46f90832d8e24185619292f76cbd1b3ce73f2dae
|
[
"Apache-2.0"
] | null | null | null |
from datetime import datetime
from typing import Optional
from fastmsa.schema import BaseModel
class BatchAddSchema(BaseModel):
eta: Optional[datetime]
ref: str
sku: str
qty: int
class BatchDelete(BaseModel):
eta: Optional[datetime]
refs: list[str]
sku: str
qty: int
class BatchAllocateSchema(BaseModel):
eta: Optional[datetime]
orderid: str
sku: str
qty: int
| 15.961538
| 37
| 0.693976
| 50
| 415
| 5.76
| 0.42
| 0.125
| 0.208333
| 0.291667
| 0.190972
| 0.138889
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233735
| 415
| 25
| 38
| 16.6
| 0.90566
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f165f20daf8c2a9c1625ca9db17f8316e1d65a57
| 178
|
py
|
Python
|
config.py
|
josecahe/sd-midterm2
|
0c78e4c2b576ecc346e46e004617c455ff503680
|
[
"MIT"
] | null | null | null |
config.py
|
josecahe/sd-midterm2
|
0c78e4c2b576ecc346e46e004617c455ff503680
|
[
"MIT"
] | null | null | null |
config.py
|
josecahe/sd-midterm2
|
0c78e4c2b576ecc346e46e004617c455ff503680
|
[
"MIT"
] | null | null | null |
from pymongo import MongoClient
client = MongoClient("mongodb+srv://prueba:prueba123@cluster0-vba48.mongodb.net/test?retryWrites=true&w=majority")
db = client.test
DEBUG = True
| 29.666667
| 114
| 0.797753
| 24
| 178
| 5.916667
| 0.791667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036585
| 0.078652
| 178
| 5
| 115
| 35.6
| 0.829268
| 0
| 0
| 0
| 0
| 0.25
| 0.505618
| 0.505618
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f1791163c78209966040601a27272016205ccac3
| 53
|
py
|
Python
|
zoom/_assets/standard_apps/register/app.py
|
zodman/ZoomFoundry
|
87a69f519a2ab6b63aeec0a564ce41259e64f88d
|
[
"MIT"
] | 8
|
2017-04-10T09:53:15.000Z
|
2020-08-16T09:53:14.000Z
|
zoom/_assets/standard_apps/register/app.py
|
zodman/ZoomFoundry
|
87a69f519a2ab6b63aeec0a564ce41259e64f88d
|
[
"MIT"
] | 49
|
2017-04-13T22:51:48.000Z
|
2019-08-15T22:53:25.000Z
|
zoom/_assets/standard_apps/register/app.py
|
zodman/ZoomFoundry
|
87a69f519a2ab6b63aeec0a564ce41259e64f88d
|
[
"MIT"
] | 12
|
2017-04-11T04:16:47.000Z
|
2019-08-10T21:41:54.000Z
|
"""
basic app
"""
import zoom
app = zoom.App()
| 6.625
| 16
| 0.528302
| 7
| 53
| 4
| 0.571429
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.283019
| 53
| 7
| 17
| 7.571429
| 0.736842
| 0.169811
| 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
|
74c95efbfbb8ad8e3e41ded40fc76e86cf3528d3
| 219
|
py
|
Python
|
justredis/sync/environment.py
|
illuminatedwax/justredis
|
8e692d0983de5809964d4e4e361447c5fa400e88
|
[
"MIT"
] | 45
|
2020-02-28T17:43:10.000Z
|
2022-03-08T09:20:34.000Z
|
justredis/sync/environment.py
|
illuminatedwax/justredis
|
8e692d0983de5809964d4e4e361447c5fa400e88
|
[
"MIT"
] | 4
|
2020-02-29T00:05:04.000Z
|
2022-01-24T20:39:51.000Z
|
justredis/sync/environment.py
|
illuminatedwax/justredis
|
8e692d0983de5809964d4e4e361447c5fa400e88
|
[
"MIT"
] | 4
|
2020-06-08T19:50:48.000Z
|
2022-02-23T16:33:09.000Z
|
from .environments.threaded import ThreadedEnvironment
def get_environment(environment=ThreadedEnvironment, **kargs):
if environment == "threaded":
environment = ThreadedEnvironment
return environment
| 27.375
| 62
| 0.776256
| 18
| 219
| 9.388889
| 0.611111
| 0.35503
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155251
| 219
| 7
| 63
| 31.285714
| 0.913514
| 0
| 0
| 0
| 0
| 0
| 0.03653
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 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
|
74dd0489b316374331edf6e3a3e46fe92af004a4
| 61
|
py
|
Python
|
atividade1.py
|
Laura32855/logicaprogramacao
|
a295b4a34b0dc866dd1801bca36400181db1092c
|
[
"MIT"
] | null | null | null |
atividade1.py
|
Laura32855/logicaprogramacao
|
a295b4a34b0dc866dd1801bca36400181db1092c
|
[
"MIT"
] | null | null | null |
atividade1.py
|
Laura32855/logicaprogramacao
|
a295b4a34b0dc866dd1801bca36400181db1092c
|
[
"MIT"
] | null | null | null |
def atividade():
print( "Olá professor" )
atividade()
| 10.166667
| 26
| 0.622951
| 6
| 61
| 6.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229508
| 61
| 5
| 27
| 12.2
| 0.808511
| 0
| 0
| 0
| 0
| 0
| 0.213115
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
74dffe7b0562f3dbafee43522b694c412630ad19
| 600
|
py
|
Python
|
Chapter-04/Character Picture Grid.py
|
Carkzis/Automate-the-Boring-Stuff
|
093106c787f9f2cf297f33d72d9cd73872c3d748
|
[
"BSD-3-Clause"
] | null | null | null |
Chapter-04/Character Picture Grid.py
|
Carkzis/Automate-the-Boring-Stuff
|
093106c787f9f2cf297f33d72d9cd73872c3d748
|
[
"BSD-3-Clause"
] | null | null | null |
Chapter-04/Character Picture Grid.py
|
Carkzis/Automate-the-Boring-Stuff
|
093106c787f9f2cf297f33d72d9cd73872c3d748
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Character Picture Grid.
Makes a heart.
"""
grid = [['.', '.', '.', '.', '.', '.'],
['.', 'O', 'O', '.', '.', '.'],
['O', 'O', 'O', 'O', '.', '.'],
['O', 'O', 'O', 'O', 'O', '.'],
['.', 'O', 'O', 'O', 'O', 'O'],
['O', 'O', 'O', 'O', 'O', '.'],
['O', 'O', 'O', 'O', '.', '.'],
['.', 'O', 'O', '.', '.', '.'],
['.', '.', '.', '.', '.', '.']]
for y in range(6):
for x in range(9): # Loop within loop to switch x and y.
print(grid[x][y], end='') # Print the # or space.
print() # Print a newline at the end of the row.
| 30
| 60
| 0.293333
| 71
| 600
| 2.478873
| 0.394366
| 0.295455
| 0.426136
| 0.545455
| 0.153409
| 0.153409
| 0.153409
| 0.153409
| 0.153409
| 0.153409
| 0
| 0.004785
| 0.303333
| 600
| 19
| 61
| 31.578947
| 0.416268
| 0.225
| 0
| 0.461538
| 0
| 0
| 0.118943
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.153846
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
74ee146f7526b198ba84d68b77b4948be52f3ce2
| 659
|
gyp
|
Python
|
binding.gyp
|
godsflaw/node-opendkim
|
704e9b698ff7f216aa6871694cce5cd7175d2471
|
[
"MIT"
] | 1
|
2017-11-12T20:40:57.000Z
|
2017-11-12T20:40:57.000Z
|
binding.gyp
|
godsflaw/node-opendkim
|
704e9b698ff7f216aa6871694cce5cd7175d2471
|
[
"MIT"
] | 36
|
2017-05-12T17:26:57.000Z
|
2018-11-05T17:04:16.000Z
|
binding.gyp
|
godsflaw/node-opendkim
|
704e9b698ff7f216aa6871694cce5cd7175d2471
|
[
"MIT"
] | 5
|
2017-10-25T01:14:19.000Z
|
2018-10-12T10:07:09.000Z
|
{
"targets": [{
"target_name": "opendkim",
"sources": [
"src/opendkim_body_async.cc",
"src/opendkim_chunk_async.cc",
"src/opendkim_chunk_end_async.cc",
"src/opendkim_eoh_async.cc",
"src/opendkim_eom_async.cc",
"src/opendkim_flush_cache_async.cc",
"src/opendkim_header_async.cc",
"src/opendkim_sign_async.cc",
"src/opendkim_verify_async.cc",
"src/opendkim.cc",
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"libraries": [
"-lopendkim"
]
}]
}
| 27.458333
| 48
| 0.488619
| 63
| 659
| 4.761905
| 0.412698
| 0.366667
| 0.3
| 0.54
| 0.153333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.359636
| 659
| 23
| 49
| 28.652174
| 0.7109
| 0
| 0
| 0.086957
| 0
| 0
| 0.522003
| 0.377845
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
74f18beff942059c5e8be0eb0dc1227f9a45d244
| 66
|
py
|
Python
|
proxySTAR_V3/certbot/venv.1509389747.bak/lib/python2.7/site-packages/pylint/test/input/func_import_syntax_error.py
|
mami-project/lurk
|
98c293251e9b1e9c9a4b02789486c5ddaf46ba3c
|
[
"Apache-2.0"
] | 2
|
2017-07-05T09:57:33.000Z
|
2017-11-14T23:05:53.000Z
|
Libraries/Python/pylint/v1.4.4/pylint/test/input/func_import_syntax_error.py
|
davidbrownell/Common_Environment
|
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
|
[
"BSL-1.0"
] | 1
|
2019-01-17T14:26:22.000Z
|
2019-01-17T22:56:26.000Z
|
Libraries/Python/pylint/v1.4.4/pylint/test/input/func_import_syntax_error.py
|
davidbrownell/Common_Environment
|
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
|
[
"BSL-1.0"
] | 1
|
2017-08-31T14:33:03.000Z
|
2017-08-31T14:33:03.000Z
|
# pylint: disable=no-absolute-import
from . import syntax_error
| 22
| 37
| 0.772727
| 9
| 66
| 5.555556
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 66
| 2
| 38
| 33
| 0.877193
| 0.515152
| 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
|
74f9bc3ffd9a8a4f388f6f8f6a8233e86e4cf843
| 102
|
py
|
Python
|
app/email_delivery/apps.py
|
Younlab/Search-all-library-books-in-Ansan
|
d2050a455ca4d8acaf5e4d18a6e5cc4e99eaf85c
|
[
"MIT"
] | null | null | null |
app/email_delivery/apps.py
|
Younlab/Search-all-library-books-in-Ansan
|
d2050a455ca4d8acaf5e4d18a6e5cc4e99eaf85c
|
[
"MIT"
] | null | null | null |
app/email_delivery/apps.py
|
Younlab/Search-all-library-books-in-Ansan
|
d2050a455ca4d8acaf5e4d18a6e5cc4e99eaf85c
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class EmailDeliveryConfig(AppConfig):
name = 'email_delivery'
| 17
| 37
| 0.784314
| 11
| 102
| 7.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 102
| 5
| 38
| 20.4
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 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
|
2d00503ef20f9f86d2955031e531a4324ede2f50
| 341
|
py
|
Python
|
mysite/mobile/models.py
|
PUNITKUMARGAUTAM/mydjango
|
5dd86a99bc0fae0cad712412d2de9c0c6cee6dcc
|
[
"MIT"
] | null | null | null |
mysite/mobile/models.py
|
PUNITKUMARGAUTAM/mydjango
|
5dd86a99bc0fae0cad712412d2de9c0c6cee6dcc
|
[
"MIT"
] | null | null | null |
mysite/mobile/models.py
|
PUNITKUMARGAUTAM/mydjango
|
5dd86a99bc0fae0cad712412d2de9c0c6cee6dcc
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
class MobileBrand(models.Model):
mobilesplus = models.CharField(max_length = 300)
mobilesrealme = models.CharField(max_length = 50)
mobilesredmi = models.CharField(max_length = 50)
mobilesapple = models.CharField(max_length = 50)
class Meta:
db_table = "Mobiles"
| 28.416667
| 53
| 0.739003
| 42
| 341
| 5.880952
| 0.547619
| 0.242915
| 0.291498
| 0.388664
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031802
| 0.170088
| 341
| 11
| 54
| 31
| 0.840989
| 0.070381
| 0
| 0
| 0
| 0
| 0.022293
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 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
|
2d3ce5fb54a04454906060ab7c897b20d1daa49d
| 147
|
py
|
Python
|
dt_jax/test_with_cpu.py
|
yun-kwak/decision-transformer-jax
|
6b5cc8bd62a5d3f41c533b167b5d5f7e158f0df1
|
[
"MIT"
] | 1
|
2022-02-12T11:51:12.000Z
|
2022-02-12T11:51:12.000Z
|
dt_jax/test_with_cpu.py
|
yun-kwak/decision-transformer-jax
|
6b5cc8bd62a5d3f41c533b167b5d5f7e158f0df1
|
[
"MIT"
] | null | null | null |
dt_jax/test_with_cpu.py
|
yun-kwak/decision-transformer-jax
|
6b5cc8bd62a5d3f41c533b167b5d5f7e158f0df1
|
[
"MIT"
] | null | null | null |
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
os.environ["JAX_PLATFORM_NAME"] = "cpu"
os.environ["XLA_PYTHON_CLIENT_PREALLOCATE"] = "false"
| 24.5
| 53
| 0.748299
| 21
| 147
| 4.904762
| 0.761905
| 0.262136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.081633
| 147
| 5
| 54
| 29.4
| 0.755556
| 0
| 0
| 0
| 0
| 0
| 0.517007
| 0.197279
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
74224fd183ec77d5348bfd9efc83616155da1428
| 450
|
py
|
Python
|
tests/test_mixin_data.py
|
superzarzar/fixtures-mongoengine
|
da7f8ad73db498055b279d2e66ced0c81fe8a834
|
[
"MIT"
] | 6
|
2017-05-04T14:14:13.000Z
|
2020-02-04T08:05:49.000Z
|
tests/test_mixin_data.py
|
superzarzar/fixtures-mongoengine
|
da7f8ad73db498055b279d2e66ced0c81fe8a834
|
[
"MIT"
] | 8
|
2016-08-24T18:39:25.000Z
|
2020-02-03T13:37:45.000Z
|
tests/test_mixin_data.py
|
superzarzar/fixtures-mongoengine
|
da7f8ad73db498055b279d2e66ced0c81fe8a834
|
[
"MIT"
] | 5
|
2017-08-23T23:58:20.000Z
|
2020-02-03T13:12:57.000Z
|
# -*- coding: utf-8 -*-
from tests.test_case import MongoFixturesTestCase
# class BaseMixinDataFixtureTestCase(MongoFixturesTestCase):
#
# def __init__(self, methodName='runTest'):
# super(BaseMixinDataFixtureTestCase, self).__init__(methodName)
# FixtureMixin.__init__(self)
#
# def setUp(self):
# super(BaseMixinDataFixtureTestCase, self).setUp()
#
# self.unload_fixtures()
# self.load_fixtures()
| 26.470588
| 72
| 0.688889
| 38
| 450
| 7.763158
| 0.578947
| 0.054237
| 0.250847
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00274
| 0.188889
| 450
| 16
| 73
| 28.125
| 0.805479
| 0.826667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
744e0589d958e920488ee77fa2e5547e25a9703a
| 122
|
py
|
Python
|
run.py
|
admariner/social-media-profiler
|
2001167201fc9602fef3070ee9d31f005978bfe8
|
[
"MIT"
] | 34
|
2020-12-14T15:48:26.000Z
|
2022-02-27T14:24:29.000Z
|
run.py
|
pandrey2003/social-media-profiler
|
4160e318997d161d63b8233511a65669542da026
|
[
"MIT"
] | 1
|
2021-12-15T02:37:32.000Z
|
2021-12-15T02:37:32.000Z
|
run.py
|
admariner/social-media-profiler
|
2001167201fc9602fef3070ee9d31f005978bfe8
|
[
"MIT"
] | 6
|
2021-02-11T16:29:04.000Z
|
2022-03-23T11:42:32.000Z
|
# -*- coding: utf-8 -*-
"""The run file of the project."""
from app.app import run
if __name__ == '__main__':
run()
| 15.25
| 34
| 0.590164
| 18
| 122
| 3.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010417
| 0.213115
| 122
| 7
| 35
| 17.428571
| 0.65625
| 0.418033
| 0
| 0
| 0
| 0
| 0.123077
| 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
|
74571e7132346f3d854dde82b59e1f5d4d7c6437
| 19,733
|
py
|
Python
|
Blackjack.py
|
samalawadi/beginner-blackjack-python
|
c9503dbf58b839c93870eebc8d2049abf5214ee0
|
[
"MIT"
] | null | null | null |
Blackjack.py
|
samalawadi/beginner-blackjack-python
|
c9503dbf58b839c93870eebc8d2049abf5214ee0
|
[
"MIT"
] | null | null | null |
Blackjack.py
|
samalawadi/beginner-blackjack-python
|
c9503dbf58b839c93870eebc8d2049abf5214ee0
|
[
"MIT"
] | null | null | null |
import random
from turtle import *
hideturtle()
speed(0)
def hit_stand_dd_cmd(x,y,card_num):
global hit_stand_dd
global deposit
global round
global double_down
if double_down == True:
hit_stand_dd = raw_input("What do you want to do? (hit, stand, double down): ")
else:
hit_stand_dd = raw_input("What do you want to do? (hit, stand): ")
if hit_stand_dd == 'hit':
double_down = False
if card_num == player_five_num or card_num == player_six_num:
begin_fill()
color('white')
card_outline(x,y)
end_fill()
color('black')
player_card(x,y,card_num)
else:
player_card(x,y,card_num)
elif hit_stand_dd == 'stand':
dealer_ai()
elif hit_stand_dd == 'double down':
if double_down == True:
if round > deposit:
print "Insufficient funds"
print 'Your balance: $' + str(deposit)
hit_stand_dd_cmd(x,y,card_num)
elif card_num == player_five_num or card_num == player_six_num:
begin_fill()
color('white')
card_outline(x,y)
end_fill()
color('black')
player_card(x,y,card_num)
deposit = deposit - round
round = round*2
dealer_ai()
else:
player_card(x,y,card_num)
deposit = deposit - round
round = round*2
dealer_ai()
else:
print 'invalid command'
hit_stand_dd_cmd(x,y,card_num)
else:
print 'invalid command'
hit_stand_dd_cmd(x,y,card_num)
def card_outline(x,y):
penup()
setposition(x,y)
pendown()
for i in range (2):
forward(75)
left(90)
forward(100)
left(90)
#empty first dealer card
def card_empty(x,y):
card_outline(x,y)
left(53.13)
forward(125)
left(126.87)
forward(75)
left(126.87)
forward(125)
left(53.13)
penup()
#moves turtle out of the view
def tclear():
penup()
setposition(-200,-200)
def clear_table():
color('white')
begin_fill()
for i in range(4):
forward(400)
left(90)
end_fill()
color('black')
def two(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
for i in range(2):
forward(10)
right(90)
for i in range(2):
forward(10)
left(90)
forward(10)
def three(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
for i in range(2):
forward(10)
right(90)
forward(10)
backward(10)
left(90)
forward(10)
right(90)
forward(10)
right(180)
def four(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
right(90)
forward(10)
left(90)
forward(10)
backward(5)
left(90)
forward(10)
backward(20)
right(90)
def five(x,y):
card_outline(x,y)
penup()
setposition(x+20,y+90)
pendown()
left(180)
for i in range(2):
forward(10)
left(90)
for i in range(2):
forward(10)
right(90)
forward(10)
right(180)
def six(x,y):
card_outline(x,y)
penup()
setposition(x+20,y+90)
pendown()
left(180)
forward(10)
left(90)
forward(20)
for i in range(3):
left(90)
forward(10)
right(180)
def seven(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
forward(10)
right(90)
forward(20)
left(90)
def eight(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
for i in range(6):
forward(10)
right(90)
left(90)
for i in range(3):
forward(10)
right(90)
def nine(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
for i in range(5):
forward(10)
right(90)
forward(20)
left(90)
def ten(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
right(90)
forward(20)
penup()
setposition(x+15,y+90)
pendown()
left(180)
for i in range(2):
right(90)
forward(10)
right(90)
forward(20)
right(90)
def jack(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
forward(15)
backward(5)
right(90)
forward(20)
right(90)
forward(10)
right(90)
forward(10)
right(90)
def queen(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
for i in range(3):
forward(10)
right(90)
forward(20)
right(90)
forward(5)
left(90)
backward(5)
forward(5)
for i in range(2):
forward(5)
left(90)
right(90)
def king(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
right(90)
forward(20)
backward(10)
left(135)
forward(14.14)
backward(14.14)
right(90)
forward(14.14)
backward(14.14)
left(45)
def ace(x,y):
card_outline(x,y)
penup()
setposition(x+10,y+90)
pendown()
right(90)
forward(20)
backward(20)
left(90)
for i in range(5):
forward(10)
right(90)
forward(20)
left(90)
def club(x,y):
penup()
setposition(x+32.5,y+30)
pendown()
begin_fill()
forward(10)
left(90)
forward(10)
right(135)
for i in range(2):
circle(7.5,320)
right(255)
circle(7.5,320)
right(135)
forward(5)
end_fill()
left(90)
def diamond(x,y):
penup()
setposition(x+37.5,y+30)
pendown()
color("red")
begin_fill()
left(62.5)
forward(20)
left(55)
forward(20)
left(125)
forward(20)
end_fill()
left(117.5)
color("black")
def heart(x,y):
penup()
setposition(x+37.5,y+30)
pendown()
color("red")
begin_fill()
left(45)
forward(22.5)
left(45)
circle(7.5,180)
left(180)
circle(7.5,180)
end_fill()
left(90)
color("black")
def spade(x,y):
penup()
setposition(x+32.5,y+30)
pendown()
begin_fill()
forward(10)
left(90)
forward(10)
right(135)
circle(5,180)
forward(20)
left(90)
forward(20)
circle(5,180)
right(135)
forward(10.15)
left(90)
forward(5)
end_fill()
suits = [club,diamond,heart,spade]
cards_num = ("2","3","4","5","6","7","8","9","10","10","10","10","11")
ten_card = [ten, jack, queen, king]
#draws player card and adds to player total
def player_card(x,y,card_num):
global player_total
if card_num == '2':
two(x,y)
player_total = player_total + 2
elif card_num == '3':
three(x,y)
player_total = player_total + 3
elif card_num == '4':
four(x,y)
player_total = player_total + 4
elif card_num == '5':
five(x,y)
player_total = player_total + 5
elif card_num == '6':
six(x,y)
player_total = player_total + 6
elif card_num == '7':
seven(x,y)
player_total = player_total + 7
elif card_num == '8':
eight(x,y)
player_total = player_total + 8
elif card_num == '9':
nine(x,y)
player_total = player_total + 9
elif card_num == '10':
ten_card_rand(x,y)
player_total = player_total + 10
elif card_num == '11':
ace(x,y)
player_total = player_total + 11
random.choice(suits)(x,y)
def dealer_one_empty():
card_empty(-150,50)
def dealer_one_clear():
for i in range(8):
color("white")
card_empty(-150,50)
color("black")
#draws dealer card and adds to dealer's total
def dealer_card(x,y,card_num):
global dealer_total
if card_num == '2':
two(x,y)
dealer_total = dealer_total + 2
elif card_num == '3':
three(x,y)
dealer_total = dealer_total + 3
elif card_num == '4':
four(x,y)
dealer_total = dealer_total + 4
elif card_num == '5':
five(x,y)
dealer_total = dealer_total + 5
elif card_num == '6':
six(x,y)
dealer_total = dealer_total + 6
elif card_num == '7':
seven(x,y)
dealer_total = dealer_total + 7
elif card_num == '8':
eight(x,y)
dealer_total = dealer_total + 8
elif card_num == '9':
nine(x,y)
dealer_total = dealer_total + 9
elif card_num == '10':
ten_card_rand(x,y)
dealer_total = dealer_total + 10
elif card_num == '11':
ace(x,y)
dealer_total = dealer_total + 11
random.choice(suits)(x,y)
deposit = float(raw_input('How much money do you want to deposit? '))
def dealer_check():
global deposit
global dealer_total
global player_total
global dealer_soft
tclear()
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
if dealer_total > 21:
print 'You win'
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
elif player_total > 21:
print "Bust! You lose"
print 'Your balance: $' + str(deposit)
elif dealer_total == player_total:
print 'Its a draw!'
deposit = deposit + round
print 'Your balance: $' + str(deposit)
elif dealer_total == 21:
print 'You lose'
print 'Your balance: $' + str(deposit)
elif dealer_total < 21 and dealer_total > player_total:
print 'You lose'
print 'Your balance: $' + str(deposit)
elif dealer_total < 21 and dealer_total < player_total:
print 'You win'
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
def dealer_ai():
global deposit
global dealer_total
global player_total
global dealer_soft
dealer_one_clear()
dealer_card(-150,50,dealer_one_num)
if dealer_one_num == '11':
dealer_soft = True
if dealer_total >= 17:
if dealer_soft == True and dealer_total > 21:
dealer_total = dealer_total - 20
dealer_soft = False
dealer_card(10,50,dealer_three_num)
else:
dealer_check()
return
else:
dealer_card(10,50,dealer_three_num)
if dealer_three_num == '11':
dealer_soft = True
if dealer_total >= 17:
if dealer_total > 21 and dealer_soft == True:
dealer_total = dealer_total - 10
dealer_soft = False
if dealer_total <= 17:
dealer_card(90,50,dealer_four_num)
else:
dealer_check()
return
else:
dealer_card(90,50,dealer_four_num)
if dealer_four_num == '11':
dealer_soft = True
if dealer_total >= 17:
if dealer_total > 21 and dealer_soft == True:
dealer_total = dealer_total - 10
dealer_soft = False
if dealer_total <= 17:
color('white')
begin_fill()
card_outline(-125,13)
end_fill()
color('black')
dealer_card(-125,13,dealer_five_num)
if dealer_five_num == '11':
dealer_soft = True
else:
dealer_check()
return
else:
color('white')
begin_fill()
card_outline(-125,13)
end_fill()
color('black')
dealer_card(-125,13,dealer_five_num)
if dealer_five_num == '11':
dealer_soft = True
if dealer_total >= 17:
if dealer_total > 21 and dealer_soft == True:
dealer_total = dealer_total - 10
dealer_soft = False
if dealer_total <= 17:
color('white')
begin_fill()
card_outline(-45,13)
end_fill()
color('black')
dealer_card(-45,13,dealer_six_num)
if dealer_six_num == '11':
dealer_soft = True
else:
dealer_check()
return
else:
color('white')
begin_fill()
card_outline(-45,13)
end_fill()
color('black')
dealer_card(-45,13,dealer_six_num)
if dealer_six_num == '11':
dealer_soft = True
if dealer_total >= 17:
if dealer_total > 21 and dealer_soft == True:
dealer_total = dealer_total - 10
dealer_soft = False
dealer_check()
return
else:
dealer_check()
return
while True:
player_total = 0
dealer_total = 0
soft = False
dealer_soft = False
double_down = True
ten_card_rand = random.choice(ten_card)
player_one_num = random.choice(cards_num)
player_two_num = random.choice(cards_num)
player_three_num = random.choice(cards_num)
player_four_num = random.choice(cards_num)
player_five_num = random.choice(cards_num)
player_six_num = random.choice(cards_num)
dealer_one_num = random.choice(cards_num)
dealer_two_num = random.choice(cards_num)
dealer_three_num = random.choice(cards_num)
dealer_four_num = random.choice(cards_num)
dealer_five_num = random.choice(cards_num)
dealer_six_num = random.choice(cards_num)
if deposit == 0:
print 'You are bankrupt. Please run the game again.'
break
round = float(raw_input('How much do you want to bet? '))
if round > deposit:
print "Insufficient funds"
print 'Your balance: $' + str(deposit)
continue
tclear()
clear_table()
deposit = deposit - round
print 'Your balance: $' + str(deposit)
#first two dealer cards (1 empty, 1 not)
dealer_one_empty()
dealer_card(-70,50,dealer_two_num)
if dealer_two_num == '11':
dealer_soft = True
#first two player cards when game starts
player_card(-150,-150,player_one_num)
player_card(-70,-150,player_two_num)
if player_one_num == '11' or player_two_num == '11':
soft = True
if soft == True and player_total > 21:
player_total = player_total - 20
soft = False
if dealer_soft == True:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total) + ' soft'
else:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
elif dealer_soft == True:
print "Your Total: " + str(player_total) + ' soft,' + " Dealer's Total: " + str(dealer_total) + ' soft'
else:
print "Your Total: " + str(player_total) + ' soft,' + " Dealer's Total: " + str(dealer_total)
elif dealer_soft == True:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total) + ' soft'
else:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
tclear()
if player_total == 21:
print "Blackjack, You Win!"
deposit = deposit + round*1.5
print 'Your balance: $' + str(deposit)
continue
#card 3 player
else:
hit_stand_dd_cmd(10,-150,player_three_num)
if hit_stand_dd == 'stand' or hit_stand_dd == 'double down':
continue
else:
tclear()
if player_three_num == '11':
soft = True
if soft == True and player_total > 21:
player_total = player_total - 10
soft = False
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
elif soft == True and player_total < 21:
print "Your Total: " + str(player_total) + ' soft,' + " Dealer's Total: " + str(dealer_total)
else:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
if player_total == 21:
print "You win!"
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
continue
elif player_total > 21:
print "Bust! You lose"
print 'Your balance: $' + str(deposit)
continue
else:
hit_stand_dd_cmd(90,-150,player_four_num)
if hit_stand_dd == 'stand':
continue
else:
tclear()
if player_four_num == '11':
soft = True
if soft == True and player_total > 21:
player_total = player_total - 10
soft = False
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
elif soft == True and player_total < 21:
print "Your Total: " + str(player_total) + ' soft,' + " Dealer's Total: " + str(dealer_total)
else:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
if player_total == 21:
print "You win!"
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
continue
elif player_total > 21:
print "Bust! You lose"
print 'Your balance: $' + str(deposit)
continue
else:
hit_stand_dd_cmd(-125,-187,player_five_num)
if hit_stand_dd == 'stand' or hit_stand_dd == 'double down':
continue
else:
tclear()
if player_five_num == '11':
soft = True
if soft == True and player_total > 21:
player_total = player_total - 10
soft = False
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
elif soft == True and player_total < 21:
print "Your Total: " + str(player_total) + ' soft,' + " Dealer's Total: " + str(dealer_total)
else:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
if player_total == 21:
print "You win!"
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
continue
elif player_total > 21:
print "Bust! You lose"
print 'Your balance: $' + str(deposit)
continue
else:
hit_stand_dd_cmd(-45,-187,player_six_num)
if hit_stand_dd == 'stand' or hit_stand_dd == 'double down':
continue
else:
tclear()
if player_six_num == '11':
soft = True
if soft == True and player_total > 21:
player_total = player_total - 10
soft = False
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
elif soft == True and player_total < 21:
print "Your Total: " + str(player_total) + ' soft,' + " Dealer's Total: " + str(dealer_total)
else:
print "Your Total: " + str(player_total) + " Dealer's Total: " + str(dealer_total)
if player_total == 21:
print "You win!"
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
continue
elif player_total < 21:
print "You win!"
deposit = deposit + round*2
print 'Your balance: $' + str(deposit)
continue
elif player_total > 21:
print "Bust! You lose"
print 'Your balance: $' + str(deposit)
continue
print 'Gameover'
| 26.7023
| 116
| 0.543303
| 2,573
| 19,733
| 3.986397
| 0.066848
| 0.082578
| 0.014039
| 0.035195
| 0.814371
| 0.78132
| 0.680706
| 0.656332
| 0.626499
| 0.568587
| 0
| 0.057848
| 0.342979
| 19,733
| 738
| 117
| 26.738482
| 0.733282
| 0.011554
| 0
| 0.792754
| 0
| 0
| 0.084162
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.002899
| null | null | 0.086957
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
745bdcbec58f959ab95b87adc2635a5c089650f4
| 5,238
|
py
|
Python
|
data/dataset_nocyclone.py
|
cfld/MultitaskAIS
|
d9b95b8f2f94e5f1fd241108a4f5d14b505de0db
|
[
"MIT"
] | 62
|
2018-12-08T13:20:06.000Z
|
2022-03-30T11:04:31.000Z
|
data/dataset_nocyclone.py
|
cfld/MultitaskAIS
|
d9b95b8f2f94e5f1fd241108a4f5d14b505de0db
|
[
"MIT"
] | 21
|
2019-03-07T11:24:54.000Z
|
2020-12-24T04:05:08.000Z
|
data/dataset_nocyclone.py
|
cfld/MultitaskAIS
|
d9b95b8f2f94e5f1fd241108a4f5d14b505de0db
|
[
"MIT"
] | 35
|
2019-02-14T14:44:36.000Z
|
2022-02-27T14:32:21.000Z
|
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 20 09:50:23 2018
@author: vnguye04
"""
import numpy as np
import matplotlib.pyplot as plt
import pickle
LAT, LON, SOG, COG, HEADING, ROT, NAV_STT, TIMESTAMP, MMSI = list(range(9))
## Training set no cyclone
###############################################################################
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/dataset5/dataset5_train.pkl","rb") as f:
Vs_train = pickle.load(f)
Vs = Vs_train
for key in list(Vs.keys()):
tmp = Vs[key]
plt.plot(tmp[:,1],tmp[:,0])
plt.xlim([0,1])
plt.ylim([0,1])
for key in list(Vs.keys()):
tmp = Vs[key]
lat_max = np.max(tmp[:,LAT])
lon_max = np.max(tmp[:,LON])
lat_min = np.min(tmp[:,LAT])
lon_min = np.min(tmp[:,LON])
if (lat_max < 0.24) and (lat_min > 0.155) and (lon_max<0.53) and (lon_min>0.485):
Vs.pop(key,None)
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/dataset5/dataset5_train_nocyclone.pkl","wb") as f:
pickle.dump(Vs,f)
## Test set moved cyclone
###############################################################################
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_train.pkl","rb") as f:
Vs_test = pickle.load(f)
Vs = Vs_test
for key in list(Vs.keys()):
tmp = Vs[key]
lat_max = np.max(tmp[:,LAT])
lon_max = np.max(tmp[:,LON])
lat_min = np.min(tmp[:,LAT])
lon_min = np.min(tmp[:,LON])
if (lat_max < 0.24) and (lat_min > 0.155) and (lon_max<0.53) and (lon_min>0.485):
print(("key: ", key, "mmsi: ", tmp[0,MMSI]))
Vs[key][:,LON] += 3.8/10.5
Vs[key][:,LAT] += 0.5/3.5
else:
Vs.pop(key,None)
for key in list(Vs.keys()):
tmp = Vs[key]
plt.plot(tmp[:,1],tmp[:,0])
plt.xlim([0,1])
plt.ylim([0,1])
plt.show()
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_test_movedcyclones.pkl","wb") as f:
pickle.dump(Vs,f)
## Test set only cyclone
###############################################################################
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_train.pkl","rb") as f:
Vs_test = pickle.load(f)
Vs = Vs_test
for key in list(Vs.keys()):
tmp = Vs[key]
lat_max = np.max(tmp[:,LAT])
lon_max = np.max(tmp[:,LON])
lat_min = np.min(tmp[:,LAT])
lon_min = np.min(tmp[:,LON])
if (lat_max < 0.24) and (lat_min > 0.155) and (lon_max<0.53) and (lon_min>0.485):
print(("key: ", key, "mmsi: ", tmp[0,MMSI]))
else:
Vs.pop(key,None)
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_test_onlycyclones.pkl","wb") as f:
pickle.dump(Vs,f)
# Step 10: Route Divergence
###############################################################################
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_train.pkl","rb") as f:
Vs_train = pickle.load(f)
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_test.pkl","rb") as f:
Vs_test = pickle.load(f)
#for key in Vs.keys():
# tmp = Vs[key]
# lat_begin = tmp[0,LAT]
# lat_end = tmp[-1,LAT]
# lon_begin = tmp[0,LON]
# lon_end = tmp[-1,LON]
# if (lat_begin < 0.38) and (lat_begin > 0.35) and (lon_begin <0.43) and (lon_begin >0.36):
# print("key: ", key, "mmsi: ", tmp[0,MMSI])
# elif (lat_end < 0.38) and (lat_end > 0.35) and (lon_end <0.43) and (lon_end >0.36):
# print("key: ", key, "mmsi: ", tmp[0,MMSI])
# else:
# Vs.pop(key,None)
#for key in Vs.keys():
# tmp = Vs[key]
# print(tmp[0,MMSI], len(tmp)/2)
# plt.figure()
# plt.plot(tmp[:,1],tmp[:,0])
# plt.title(str(tmp[0,MMSI]))
# plt.xlim([0,1])
# plt.ylim([0,1])
FIG_DPI = 150
plt.figure(figsize=(1920/FIG_DPI, 640/FIG_DPI), dpi=FIG_DPI)
cmap = plt.cm.get_cmap('Blues')
Vs = Vs_test
d_i = 0
N = len(Vs)
l_v_true = []
for key in list(Vs.keys()):
tmp = Vs[key]
c = cmap(float(d_i)/(N-1))
d_i+=1
lat_begin = tmp[0,LAT]
lat_end = tmp[-1,LAT]
lon_begin = tmp[0,LON]
lon_end = tmp[-1,LON]
if (lat_end < 0.38) and (lat_end > 0.35) and (lon_end <0.43) and (lon_end >0.36):
if int(tmp[0,MMSI]) == 538200309:
# if True:
plt.plot(tmp[:,1],tmp[:,0],color='g',linewidth=2)
v_true = np.copy(tmp)
l_v_true.append(v_true)
else:
plt.plot(tmp[:,1],tmp[:,0],color=c,linewidth=0.3)
plt.xlim([0,1])
plt.ylim([0,1])
Vs_divergence = dict()
for e in range(-5,6):
Vs_divergence[e] = np.copy(v_true)
Vs_divergence[e][:,LAT] += e*0.01
# Vs_divergence[e][:,LON] += 0.5 # divergences 2 only
for key in list(Vs_divergence.keys()):
tmp = Vs_divergence[key]
plt.plot(tmp[:,1],tmp[:,0],linewidth=0.8)
plt.xlim([0,1])
plt.ylim([0,1])
plt.show()
with open("/homes/vnguye04/Bureau/Sanssauvegarde/Datasets/MarineC/MarineC_Jan2014_norm/MarineC_Jan2014_norm_test_divergences.pkl","wb") as f:
pickle.dump(Vs_divergence,f)
| 31.365269
| 143
| 0.590683
| 852
| 5,238
| 3.494131
| 0.161972
| 0.022842
| 0.084649
| 0.063487
| 0.750084
| 0.744038
| 0.744038
| 0.71179
| 0.672489
| 0.644273
| 0
| 0.061478
| 0.170867
| 5,238
| 166
| 144
| 31.554217
| 0.623993
| 0.174112
| 0
| 0.61
| 0
| 0
| 0.251134
| 0.239547
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.03
| 0
| 0.03
| 0.02
| 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
|
746ca4f2b408cb97359d82dde3cfc18070cca29c
| 115
|
py
|
Python
|
detention_data_dashboard/__init__.py
|
detentiondatadashboard/detention-data-dashboard
|
445ce560a463a415fd78e9a7a96eeec4bad885c7
|
[
"MIT"
] | 1
|
2021-12-16T02:02:36.000Z
|
2021-12-16T02:02:36.000Z
|
detention_data_dashboard/__init__.py
|
detentiondatadashboard/detention-data-dashboard
|
445ce560a463a415fd78e9a7a96eeec4bad885c7
|
[
"MIT"
] | null | null | null |
detention_data_dashboard/__init__.py
|
detentiondatadashboard/detention-data-dashboard
|
445ce560a463a415fd78e9a7a96eeec4bad885c7
|
[
"MIT"
] | null | null | null |
"""
importing all the functions from the app python script
"""
from .data_download import *
from .figure import *
| 16.428571
| 54
| 0.73913
| 16
| 115
| 5.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 115
| 6
| 55
| 19.166667
| 0.884211
| 0.469565
| 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
|
747ca7acf4499de7f3aabcfe1abe252911ceee6d
| 766
|
py
|
Python
|
main.py
|
LuisAlbuquerque/smart_gallery
|
46dcb15906c479b15dfdd364a81dc33735611e23
|
[
"MIT"
] | null | null | null |
main.py
|
LuisAlbuquerque/smart_gallery
|
46dcb15906c479b15dfdd364a81dc33735611e23
|
[
"MIT"
] | null | null | null |
main.py
|
LuisAlbuquerque/smart_gallery
|
46dcb15906c479b15dfdd364a81dc33735611e23
|
[
"MIT"
] | null | null | null |
import os
import shutil
def find_people(name,gallery):
if not os.path.exists(f'/label_photos/{ name }'):
return None
else:
#photos = os.listdir(f'/label_photos/{ name }')
photos_w_person = os.popen(f'face-recognition /label_photos/{ name } { gallery }').read()
def add_photo2find(name,photo):
# test if exist folder with NAME name else create
if not os.path.exists(f'/label_photos/{ name }'):
os.makedirs(f'/label_photos/{ name }')
# mv photo to this folder
photos = os.listdir(f'/label_photos/{ name }')
shutil.move(photo,f'/label_photos/{ name }/{ name }[{ len(photos) }]{ photo.split(".")[-1] }')
def all_photos(path):
return os.listdir(f'/label_photos/{ name }')
def main():
pass
main()
| 29.461538
| 98
| 0.63577
| 110
| 766
| 4.309091
| 0.4
| 0.185654
| 0.253165
| 0.236287
| 0.322785
| 0.322785
| 0.270042
| 0.139241
| 0.139241
| 0
| 0
| 0.003263
| 0.199739
| 766
| 25
| 99
| 30.64
| 0.769984
| 0.154047
| 0
| 0.117647
| 0
| 0
| 0.36124
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.235294
| false
| 0.058824
| 0.117647
| 0.058824
| 0.470588
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
778cc4275fb56d8c322c352e55edea2a57d981aa
| 135
|
py
|
Python
|
desafios/desafio 006.py
|
juaoantonio/curso_video_python
|
7520223d8647929530a1cd96f7c7d8c8f264ba1e
|
[
"MIT"
] | null | null | null |
desafios/desafio 006.py
|
juaoantonio/curso_video_python
|
7520223d8647929530a1cd96f7c7d8c8f264ba1e
|
[
"MIT"
] | null | null | null |
desafios/desafio 006.py
|
juaoantonio/curso_video_python
|
7520223d8647929530a1cd96f7c7d8c8f264ba1e
|
[
"MIT"
] | null | null | null |
n = int(input('Digite um número inteiro: '))
print(f'O dobro de {n} é {n*2}, o seu triplo é {n*3}, sua raiz quadrada é {n**(1/2):.1f}')
| 67.5
| 90
| 0.607407
| 30
| 135
| 2.733333
| 0.733333
| 0.073171
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044248
| 0.162963
| 135
| 2
| 90
| 67.5
| 0.681416
| 0
| 0
| 0
| 0
| 0.5
| 0.779412
| 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
|
77d01a9c16dca1699b702fe2c54c114cf8921c43
| 102
|
py
|
Python
|
grading_system/apps.py
|
joshuariveramnltech/projectIE
|
9f707f6f1a30ca728580ba738877c77785155ae5
|
[
"MIT"
] | null | null | null |
grading_system/apps.py
|
joshuariveramnltech/projectIE
|
9f707f6f1a30ca728580ba738877c77785155ae5
|
[
"MIT"
] | 5
|
2021-02-08T20:32:43.000Z
|
2021-09-08T01:13:03.000Z
|
grading_system/apps.py
|
joshuariveramnltech/projectIE
|
9f707f6f1a30ca728580ba738877c77785155ae5
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class GradingSystemConfig(AppConfig):
name = 'grading_system'
| 17
| 37
| 0.784314
| 11
| 102
| 7.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 102
| 5
| 38
| 20.4
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 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
|
77d1c2b0f66e2f75e113aef918eec9c976156c58
| 51
|
py
|
Python
|
extra/dynamic/integer_partition.py
|
lsbardel/mathfun
|
98e7c210409c2b5777e91059c3651cef4f3045dd
|
[
"BSD-3-Clause"
] | null | null | null |
extra/dynamic/integer_partition.py
|
lsbardel/mathfun
|
98e7c210409c2b5777e91059c3651cef4f3045dd
|
[
"BSD-3-Clause"
] | null | null | null |
extra/dynamic/integer_partition.py
|
lsbardel/mathfun
|
98e7c210409c2b5777e91059c3651cef4f3045dd
|
[
"BSD-3-Clause"
] | null | null | null |
def integert_partition(S: Sequence[int]):
pass
| 17
| 41
| 0.72549
| 7
| 51
| 5.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 51
| 2
| 42
| 25.5
| 0.837209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
77d70bde701d743048a08e51ae1350712adbdfa7
| 355
|
py
|
Python
|
iotd/index/admin.py
|
boilerplate-limdongjin/boilerplate_drf_elasticbeanstalk
|
21acc7c5ba031caef35002f9655b4f829de7e319
|
[
"MIT"
] | 2
|
2018-03-14T08:13:12.000Z
|
2018-03-14T08:17:54.000Z
|
iotd/index/admin.py
|
boilerplate-limdongjin/boilerplate_drf_elasticbeanstalk
|
21acc7c5ba031caef35002f9655b4f829de7e319
|
[
"MIT"
] | null | null | null |
iotd/index/admin.py
|
boilerplate-limdongjin/boilerplate_drf_elasticbeanstalk
|
21acc7c5ba031caef35002f9655b4f829de7e319
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
import index.models as models
# Register your models here.
admin.site.register(models.Bills)
admin.site.register(models.Newkeywords)
admin.site.register(models.People)
admin.site.register(models.Analyses)
admin.site.register(models.Attends)
admin.site.register(models.Post)
admin.site.register(models.Simdata)
| 29.583333
| 40
| 0.8
| 49
| 355
| 5.795918
| 0.387755
| 0.221831
| 0.419014
| 0.566901
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090141
| 355
| 11
| 41
| 32.272727
| 0.879257
| 0.073239
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.222222
| 0
| 0.222222
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
77ec8126c3fb9597356b15f72698c6193987d100
| 15,578
|
py
|
Python
|
data_preprocessing/uav123_annotation_to_video_converter.py
|
Hoclor/CoSADUV-Contextual-Saliency-for-Detecting-Anomalies-in-UAV-Video
|
674b72af15ba8833317b8daa9d1e614ea63151c1
|
[
"MIT"
] | 4
|
2019-07-01T14:55:33.000Z
|
2021-01-18T02:34:38.000Z
|
data_preprocessing/uav123_annotation_to_video_converter.py
|
Hoclor/CoSADUV-Contextual-Saliency-for-Detecting-Anomalies-in-UAV-Video
|
674b72af15ba8833317b8daa9d1e614ea63151c1
|
[
"MIT"
] | null | null | null |
data_preprocessing/uav123_annotation_to_video_converter.py
|
Hoclor/CoSADUV-Contextual-Saliency-for-Detecting-Anomalies-in-UAV-Video
|
674b72af15ba8833317b8daa9d1e614ea63151c1
|
[
"MIT"
] | null | null | null |
"""A tool to convert annotations for UAV123 datset into Ground-Truth or Bounding-Box images.
Based off the same code as `cvat_annotation_converter.py'
(https://gist.github.com/cheind/9850e35bb08cfe12500942fb8b55531f).
Created for use with NVVL, which was subsequently abandoned. Included for archival
purposes (not used).
"""
import os
import random
import time
import numpy as np
from tqdm import tqdm
import cv2
def draw_annotations(
dataset_folder, sequence_name, target_folder=None, display=False, settings={}
):
tqdm.write(sequence_name)
# Get the sequnce folder and annotations folder
sequence_folder = os.path.join(dataset_folder, "data_seq", "UAV123", sequence_name)
annotation_file = os.path.join(
dataset_folder, "anno", "UAV123", sequence_name + ".txt"
)
# Get the default target folder if none is given
if target_folder == None:
target_folder = os.path.join(
dataset_folder, "ground_truth", "UAV123", sequence_name
)
# Check if the target_folder exists
if not os.path.exists(target_folder):
# Create the target_folder
os.makedirs(target_folder)
# Get a list of frames in sequence_folder
if os.name == "posix":
# Unix
frames = os.listdir(sequence_folder)
else:
# Windows (os.name == 'nt')
with os.scandir(sequence_folder) as file_iterator:
frames = [file_object.name for file_object in list(file_iterator)]
# Extract the annotations from the annotation_file
try:
with open(annotation_file, "r") as f:
annotations = f.readlines()
except FileNotFoundError:
# Skip this sequence as it doesn't have a single annotation file
# (simplifies processing, but loses out on some data)
return 0
# Convert each line from a string to a list with 4 numbers
def process_line(line):
ret = line.strip().split(",")
ret = list(map(lambda n: int(n) if n != "NaN" else -1, ret))
return ret
annotations = list(map(process_line, annotations))
# Define the codec and create VideoWriter object
fourcc = cv2.VideoWriter_fourcc(*"DIVX")
framerate = 30
(width, height) = (1280, 720)
out = cv2.VideoWriter(
os.path.join(target_folder, sequence_name + ".avi"),
fourcc,
framerate,
(width, height),
1,
)
last_time = time.time()
for frame_count, annotation in enumerate(tqdm(annotations)):
# Get the corresponding frame name
frame_name = frames[frame_count]
# Read this frame
frame = cv2.imread(os.path.join(sequence_folder, frame_name))
# Only draw an annotiation if it exists - i.e. annotation is not -1
if all(a != -1 for a in annotation):
# Draw the rectangle as a red bounding box
x_tl = annotation[0]
y_tl = annotation[1]
x_br = x_tl + annotation[2]
y_br = y_tl + annotation[3]
cv2.rectangle(frame, (x_tl, y_tl), (x_br, y_br), [0, 0, 255], 2, -1)
# Write the frame with boxes
out.write(frame)
# Also save the frame individually
cv2.imwrite(os.path.join(target_folder, frame_name[:-4] + ".png"), frame)
# Display the resulting frame
if display:
# Force the function to run at the framerate of the video
while time.time() - last_time < ((1 / framerate) / 1.025):
# Enforce time passed as slightly less than 1/framerate,
# as displaying the output takes some time as well
pass
last_time = time.time()
cv2.imshow("frame", frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
# Release everything
out.release()
cv2.destroyAllWindows()
def draw_groundtruth(
dataset_folder, sequence_name, target_folder=None, display=False, settings={}
):
tqdm.write(sequence_name)
# Get the sequnce folder and annotations folder
sequence_folder = os.path.join(dataset_folder, "data_seq", "UAV123", sequence_name)
annotation_file = os.path.join(
dataset_folder, "anno", "UAV123", sequence_name + ".txt"
)
# Get the default target folder if none is given
if target_folder == None:
target_folder = os.path.join(
dataset_folder, "ground_truth", "UAV123", sequence_name
)
# Check if the target_folder exists
if not os.path.exists(target_folder):
# Create the target_folder
os.makedirs(target_folder)
# Get a list of frames in sequence_folder
if os.name == "posix":
# Unix
frames = os.listdir(sequence_folder)
else:
# Windows (os.name == 'nt')
with os.scandir(sequence_folder) as file_iterator:
frames = [file_object.name for file_object in list(file_iterator)]
# Extract the annotations from the annotation_file
try:
with open(annotation_file, "r") as f:
annotations = f.readlines()
except FileNotFoundError:
# Skip this sequence as it doesn't have a single annotation file
# (simplifies processing, but loses out on some data)
return 0
# Convert each line from a string to a list with 4 numbers
def process_line(line):
ret = line.strip().split(",")
ret = list(map(lambda n: int(n) if n != "NaN" else -1, ret))
return ret
annotations = list(map(process_line, annotations))
# Define the codec and create VideoWriter object
fourcc = cv2.VideoWriter_fourcc(*"DIVX")
framerate = 30
(width, height) = (1280, 720)
out = cv2.VideoWriter(
os.path.join(target_folder, sequence_name + ".avi"),
fourcc,
framerate,
(width, height),
0,
)
blank_frame = np.zeros((height, width), dtype=np.uint8)
last_time = time.time()
for frame_count, annotation in enumerate(tqdm(annotations)):
# Copy a new blank frame
frame = np.copy(blank_frame)
# Get the corresponding frame name
frame_name = frames[frame_count]
# Only draw an annotiation if it exists - i.e. annotation is not -1
if all(a != -1 for a in annotation):
# Draw the rectangle as a filled in white box
x_tl = annotation[0]
y_tl = annotation[1]
x_br = x_tl + annotation[2]
y_br = y_tl + annotation[3]
cv2.rectangle(frame, (x_tl, y_tl), (x_br, y_br), 255, cv2.FILLED)
# Write the frame with boxes
out.write(frame)
# Also save the frame individually
cv2.imwrite(os.path.join(target_folder, frame_name[:-4] + ".png"), frame)
# Display the resulting frame
if display:
# Force the function to run at the framerate of the video
while time.time() - last_time < ((1 / framerate) / 1.025):
# Enforce time passed as slightly less than 1/framerate,
# as displaying the output takes some time as well
pass
last_time = time.time()
cv2.imshow("frame", frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
# Release everything
out.release()
cv2.destroyAllWindows()
def prepare_for_nvvl(
dataset_folder, sequence_name, target_folder=None, display=False, settings={}
):
""" Creates a video of the original sequence, and a separate video of the
ground truth data, stored in target_folder and target_folder/targets respectively.
"""
# Read in optional settings
try:
random_start = settings["random_start"]
except KeyError:
# random_start not given, use default value
random_start = False
try:
duration = settings["duration"]
except KeyError:
# random_start not given, use default value
duration = -1
# Get the sequnce folder and annotations folder
sequence_folder = os.path.join(dataset_folder, "data_seq", "UAV123", sequence_name)
annotation_file = os.path.join(
dataset_folder, "anno", "UAV123", sequence_name + ".txt"
)
# Get the default target folder if none is given
if target_folder == None:
target_folder = os.path.join(
dataset_folder, "ground_truth", "UAV123", sequence_name
)
# Check if the target_folder exists
if not os.path.exists(target_folder):
# Create the target_folder
os.makedirs(target_folder)
# Get a list of frames in sequence_folder
if os.name == "posix":
# Unix
frames = os.listdir(sequence_folder)
else:
# Windows (os.name == 'nt')
with os.scandir(sequence_folder) as file_iterator:
frames = [file_object.name for file_object in list(file_iterator)]
# Extract the annotations from the annotation_file
try:
with open(annotation_file, "r") as f:
annotations = f.readlines()
except FileNotFoundError:
# Skip this sequence as it doesn't have a single annotation file
# (simplifies processing, but loses out on some data)
return 0
# If random_start is True, randomly generate a starting frame
# (that is at least 'duration' frames before the end of the video)
if random_start:
try:
start_time = random.randrange(0, len(annotations) - duration)
except ValueError:
# The sequence is too short for the requested duration, so skip it
return
else:
start_time = 0
# Print out the sequence name, start frame, end frame
tqdm.write(sequence_name + " " + str(start_time) + "-" + str(start_time + duration))
# Convert each line from a string to a list with 4 numbers
def process_line(line):
ret = line.strip().split(",")
ret = list(map(lambda n: int(n) if n != "NaN" else -1, ret))
return ret
annotations = list(map(process_line, annotations))
# Define the codec and create VideoWriter objects
fourcc = cv2.VideoWriter_fourcc(*"DIVX")
framerate = 30
(width, height) = (1280, 720)
out_data = cv2.VideoWriter(
os.path.join(target_folder, sequence_name + ".avi"),
fourcc,
framerate,
(width, height),
1,
)
out_target = cv2.VideoWriter(
os.path.join(target_folder, "targets", sequence_name + ".avi"),
fourcc,
framerate,
(width, height),
0,
)
blank_frame = np.zeros((height, width), dtype=np.uint8)
last_time = time.time()
for frame_count, annotation in enumerate(
tqdm(annotations[start_time : start_time + duration])
):
# Copy a new blank frame
frame = np.copy(blank_frame)
# Get the corresponding frame name
frame_name = frames[frame_count]
# Read the input data frame
input_frame = cv2.imread(os.path.join(sequence_folder, frame_name))
# Only draw an annotiation if it exists - i.e. annotation is not -1
if all(a != -1 for a in annotation):
# Draw the rectangle as a filled in white box
x_tl = annotation[0]
y_tl = annotation[1]
x_br = x_tl + annotation[2]
y_br = y_tl + annotation[3]
cv2.rectangle(frame, (x_tl, y_tl), (x_br, y_br), 255, cv2.FILLED)
# Write the frame with boxes
out_target.write(frame)
# Write the original input frame
out_data.write(input_frame)
# Display the resulting frame
if display:
# Force the function to run at the framerate of the video
while time.time() - last_time < ((1 / framerate) / 1.025):
# Enforce time passed as slightly less than 1/framerate,
# as displaying the output takes some time as well
pass
last_time = time.time()
cv2.imshow("input frame", input_frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
# Release everything
out_target.release()
out_data.release()
cv2.destroyAllWindows()
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(
description="Draw annotations, either on original videos or as ground-truth saliency maps"
)
parser.add_argument(
"--dataset",
"-d",
dest="dataset",
help="Folder containing the UAV123 dataset",
required=False,
default="C:\\Users\\simon\\Downloads\\Project Datasets\\UAV123\\UAV123",
)
parser.add_argument(
"--sequence",
"-s",
dest="name",
help="Name of sequence to be processed",
required=False,
)
parser.add_argument(
"--target",
"-t",
dest="target_folder",
help="Name of folder to write results to",
required=False,
)
parser.add_argument(
"--function",
"-f",
dest="drawing_function",
help="Function to use: 'bounding_boxes', 'groundtruth', or 'nvvl'",
required=True,
)
parser.add_argument("--verbose", "-v", dest="verbose", action="store_true")
args = parser.parse_args()
if args.drawing_function == "bounding_boxes":
drawing_function = draw_annotations
elif args.drawing_function == "groundtruth":
drawing_function = draw_groundtruth
elif args.drawing_function == "nvvl":
drawing_function = prepare_for_nvvl
try:
duration = int(input("Duration (in frames at 30fps, -1 for full video): "))
except ValueError:
duration = -1 # int not given, use -1 (default value)
rand_start = input("Choose a random starting frame? (y/n): ").lower()
rand_start = True if rand_start in "yes" and rand_start != "" else False
settings = {"random_start": rand_start, "duration": duration}
if args.name == None:
# Read all files in the folder and call the appropriate function on each
# video/annotation pair found.
# Get a list of frames in sequence_folder
if os.name == "posix":
# Unix
sequences = os.listdir(os.path.join(args.dataset, "data_seq", "UAV123"))
else:
# Windows (os.name == 'nt')
with os.scandir(
os.path.join(args.dataset, "data_seq", "UAV123")
) as folder_iterator:
sequences = [
folder_object.name for folder_object in list(folder_iterator)
]
# Call the drawing function with each sequence name in sequences
for seq_name in tqdm(sequences):
drawing_function(
args.dataset,
seq_name,
target_folder=args.target_folder,
display=args.verbose,
settings=settings,
)
elif len(args.name.strip().split(",")) > 1:
for seq_name in tqdm(args.name.strip().split(",")):
drawing_function(
args.dataset,
seq_name.strip(),
target_folder=args.target_folder,
display=args.verbose,
settings=settings,
)
else:
# Draw bounding boxes on the original video or ground-truth saliency maps,
# depending on if -bb was specified
drawing_function(
args.dataset,
args.name,
target_folder=args.target_folder,
display=args.verbose,
settings=settings,
)
| 34.928251
| 98
| 0.608679
| 1,950
| 15,578
| 4.734872
| 0.149231
| 0.050688
| 0.020578
| 0.016571
| 0.721217
| 0.711253
| 0.704538
| 0.700639
| 0.689808
| 0.679411
| 0
| 0.018338
| 0.29638
| 15,578
| 445
| 99
| 35.006742
| 0.824012
| 0.256259
| 0
| 0.677852
| 0
| 0
| 0.074229
| 0.005227
| 0
| 0
| 0.001045
| 0
| 0
| 1
| 0.020134
| false
| 0.010067
| 0.02349
| 0
| 0.067114
| 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
|
7ac4bdad94ae806f6f720e45259f6e5b4067675a
| 224
|
py
|
Python
|
namespaced/context_processors.py
|
ferrix/namespaced
|
56ac0b30fa0873f9b2cd0ea116b744337509d312
|
[
"MIT"
] | null | null | null |
namespaced/context_processors.py
|
ferrix/namespaced
|
56ac0b30fa0873f9b2cd0ea116b744337509d312
|
[
"MIT"
] | null | null | null |
namespaced/context_processors.py
|
ferrix/namespaced
|
56ac0b30fa0873f9b2cd0ea116b744337509d312
|
[
"MIT"
] | null | null | null |
''' Automatically set `current_app` into context based on URL namespace. '''
def namespaced(request):
''' Set `current_app` to url namespace '''
request.current_app = request.resolver_match.namespace
return {}
| 28
| 76
| 0.709821
| 27
| 224
| 5.740741
| 0.62963
| 0.193548
| 0.167742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174107
| 224
| 7
| 77
| 32
| 0.837838
| 0.464286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
7ae4f9789b88d0fdd254efdb7bce254578daecd8
| 198
|
py
|
Python
|
duel/utils.py
|
yupeng0921/duel
|
0bc29db597c6816c08673250ea5c5c8dc5e76e0e
|
[
"MIT"
] | null | null | null |
duel/utils.py
|
yupeng0921/duel
|
0bc29db597c6816c08673250ea5c5c8dc5e76e0e
|
[
"MIT"
] | null | null | null |
duel/utils.py
|
yupeng0921/duel
|
0bc29db597c6816c08673250ea5c5c8dc5e76e0e
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
class AssembleError(Exception):
def __init__(self, line_no, reason):
message = '%d: %s' % (line_no, reason)
super(AssembleError, self).__init__(message)
| 22
| 52
| 0.651515
| 24
| 198
| 4.958333
| 0.708333
| 0.10084
| 0.201681
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.20202
| 198
| 8
| 53
| 24.75
| 0.753165
| 0.10101
| 0
| 0
| 0
| 0
| 0.033898
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7af2c29059ce2ab6fd52661596a3831e6052d1a4
| 313
|
py
|
Python
|
tests/test_utils.py
|
MapleCCC/LZW-Compressor
|
df770b557abaa096817a0f158d3eabc515e21d0e
|
[
"WTFPL"
] | 2
|
2020-04-04T14:20:28.000Z
|
2020-05-05T11:39:07.000Z
|
tests/test_utils.py
|
MapleCCC/LZW-Compressor
|
df770b557abaa096817a0f158d3eabc515e21d0e
|
[
"WTFPL"
] | null | null | null |
tests/test_utils.py
|
MapleCCC/LZW-Compressor
|
df770b557abaa096817a0f158d3eabc515e21d0e
|
[
"WTFPL"
] | null | null | null |
import functools
from LZW.utils import undecorate
def test_undecorate():
def get_two(func):
return functools.wraps(func)(lambda: 2)
def get_one(func):
return functools.wraps(func)(lambda: 1)
@get_two
@get_one
def raw():
return 0
assert undecorate(raw)() == 0
| 16.473684
| 47
| 0.632588
| 42
| 313
| 4.595238
| 0.47619
| 0.134715
| 0.196891
| 0.248705
| 0.352332
| 0.352332
| 0
| 0
| 0
| 0
| 0
| 0.017316
| 0.261981
| 313
| 18
| 48
| 17.388889
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.25
| 0.75
| 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
|
7af5b566656aa5710fa5311e12698ad3150933fa
| 56
|
py
|
Python
|
cli.py
|
Overboard/httpfind
|
2c372daa66dcc7158e8bb179b29d8001d473bc4a
|
[
"MIT"
] | 2
|
2018-03-18T17:08:24.000Z
|
2018-12-24T01:07:53.000Z
|
cli.py
|
Overboard/httpfind
|
2c372daa66dcc7158e8bb179b29d8001d473bc4a
|
[
"MIT"
] | null | null | null |
cli.py
|
Overboard/httpfind
|
2c372daa66dcc7158e8bb179b29d8001d473bc4a
|
[
"MIT"
] | null | null | null |
""" Demo file of use """
from httpfind import cli
cli()
| 14
| 24
| 0.660714
| 9
| 56
| 4.111111
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196429
| 56
| 4
| 25
| 14
| 0.822222
| 0.285714
| 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
|
bb096e4e81fe8b2338a4a66bf7742d79e9a56fd6
| 88
|
py
|
Python
|
2020/examples-in-class-2020-11-26/example_list_comprehensions2.py
|
ati-ozgur/course-python
|
38237d120043c07230658b56dc3aeb01c3364933
|
[
"Apache-2.0"
] | 1
|
2021-02-04T16:59:11.000Z
|
2021-02-04T16:59:11.000Z
|
2020/examples-in-class-2020-11-26/example_list_comprehensions2.py
|
ati-ozgur/course-python
|
38237d120043c07230658b56dc3aeb01c3364933
|
[
"Apache-2.0"
] | null | null | null |
2020/examples-in-class-2020-11-26/example_list_comprehensions2.py
|
ati-ozgur/course-python
|
38237d120043c07230658b56dc3aeb01c3364933
|
[
"Apache-2.0"
] | 1
|
2019-10-30T14:37:48.000Z
|
2019-10-30T14:37:48.000Z
|
l1 = list(range(10))
new_list = [x*x + 2*x + 1 for x in l1]
print(l1)
print(new_list)
| 12.571429
| 38
| 0.613636
| 20
| 88
| 2.6
| 0.55
| 0.269231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0.204545
| 88
| 6
| 39
| 14.666667
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
bb1ec43e6b7238a88c39cfe89a1589ba6d14a0b9
| 252
|
py
|
Python
|
video/serializers.py
|
chandojo/climbbeta
|
17b393535413d035d6cf831cab700c5fd2dc703c
|
[
"MIT"
] | 1
|
2019-01-25T03:57:54.000Z
|
2019-01-25T03:57:54.000Z
|
video/serializers.py
|
chandojo/climbbeta
|
17b393535413d035d6cf831cab700c5fd2dc703c
|
[
"MIT"
] | 39
|
2019-03-29T17:13:06.000Z
|
2022-02-10T08:26:46.000Z
|
video/serializers.py
|
chandojo/climbbeta
|
17b393535413d035d6cf831cab700c5fd2dc703c
|
[
"MIT"
] | 1
|
2019-12-10T18:19:59.000Z
|
2019-12-10T18:19:59.000Z
|
from rest_framework import serializers
from .models import *
class VideoSerializer(serializers.ModelSerializer):
class Meta:
model = Videos
fields = ('uri', 'created', 'name', 'city', 'author', 'thumbnail', 'description', 'slug')
| 28
| 97
| 0.678571
| 25
| 252
| 6.8
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186508
| 252
| 8
| 98
| 31.5
| 0.829268
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 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
|
bb507315111c663857f3e274f8871f3624fe9ca5
| 190
|
py
|
Python
|
funcionario/forms.py
|
apolloalves/DCMNIT
|
161920dabacab79a81fc3c61216f5be46e2094d7
|
[
"MIT"
] | 1
|
2020-04-25T19:06:41.000Z
|
2020-04-25T19:06:41.000Z
|
funcionario/forms.py
|
apolloalves/DCMNIT
|
161920dabacab79a81fc3c61216f5be46e2094d7
|
[
"MIT"
] | null | null | null |
funcionario/forms.py
|
apolloalves/DCMNIT
|
161920dabacab79a81fc3c61216f5be46e2094d7
|
[
"MIT"
] | null | null | null |
from django import forms
from funcionario.models import Funcionario
class FuncionarioForm(forms.ModelForm):
class Meta:
model = Funcionario
fields = "__all__"
| 31.666667
| 44
| 0.689474
| 19
| 190
| 6.684211
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.257895
| 190
| 6
| 45
| 31.666667
| 0.900709
| 0
| 0
| 0
| 0
| 0
| 0.036649
| 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
|
bb5aa15ab50925a3780c37cbf39d77e2498f8e25
| 123
|
py
|
Python
|
test/conftest.py
|
nervecell23/position-sizing
|
1934ac6265660d7262ca3cc528237dfdfa152b0c
|
[
"MIT"
] | null | null | null |
test/conftest.py
|
nervecell23/position-sizing
|
1934ac6265660d7262ca3cc528237dfdfa152b0c
|
[
"MIT"
] | null | null | null |
test/conftest.py
|
nervecell23/position-sizing
|
1934ac6265660d7262ca3cc528237dfdfa152b0c
|
[
"MIT"
] | null | null | null |
import pytest
import os
@pytest.fixture(autouse=True)
def set_env(monkeypatch):
monkeypatch.setenv("TESTING", "TRUE")
| 17.571429
| 41
| 0.756098
| 16
| 123
| 5.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113821
| 123
| 6
| 42
| 20.5
| 0.844037
| 0
| 0
| 0
| 0
| 0
| 0.089431
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.