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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
433f965c2b734dee5586decf66d1dfdbcf625889
| 2,848
|
py
|
Python
|
sampi/sdes/catalog.py
|
Jonathan-Lindbloom/sampi
|
2953e19d60df77b617779daaf90712f4f1099ff8
|
[
"MIT"
] | null | null | null |
sampi/sdes/catalog.py
|
Jonathan-Lindbloom/sampi
|
2953e19d60df77b617779daaf90712f4f1099ff8
|
[
"MIT"
] | null | null | null |
sampi/sdes/catalog.py
|
Jonathan-Lindbloom/sampi
|
2953e19d60df77b617779daaf90712f4f1099ff8
|
[
"MIT"
] | null | null | null |
# This contains a catalog of explicit solutions to some SDEs.
from sampi.sdes.base import StochDiffEq
import numpy as np
def basic_linear(a=1, b=1):
"""Returns a function implementing the explicit solution to the SDE
dX_t = a X_t dt + b X_t dW_t.
"""
drift = lambda x, t : a*x
diffusion = lambda x, t : b*x
true_sol = lambda x0, t, wt : x0*np.exp( (a - 0.5*b*b)*t + b*wt)
return StochDiffEq(drift=drift, diffusion=diffusion, true_sol=true_sol, eqn="dX_t = a X_t dt + b X_t dW_t")
def kloeden_4_15(a=1):
"""Returns a function implementing the explicit solution to the SDE
dX_t = 0.5*a*(a-1)*(X_t)^(1 - 2/a) dt + a*(X_t)^(1 - 1/a) dW_t.
Taken from (Kloden & Platen, 1992), page 120.
"""
drift = lambda x, t : 0.5*a*(a-1)*(x**(1 - 2/a))
diffusion = lambda x, t : a*(x**(1 - 1/a))
true_sol = lambda x0, t, wt : (wt + x0**(1/a))**a
return StochDiffEq(drift=drift, diffusion=diffusion, true_sol=true_sol, eqn="dX_t = 0.5*a*(a-1)*(X_t)^(1 - 2/a) dt + a*(X_t)^(1 - 1/a) dW_t")
def kloeden_4_16(a=1):
"""Returns a function implementing the explicit solution to the SDE
dX_t = 0.5*a^2 X_t dt + a X_t dW_t.
Taken from (Kloden & Platen, 1992), page 120.
"""
drift = lambda x, t : 0.5*a*a*x
diffusion = lambda x, t : a*x
true_sol = lambda x0, t, wt : x0*np.exp(a*wt)
return StochDiffEq(drift=drift, diffusion=diffusion, true_sol=true_sol, eqn="dX_t = 0.5*a^2 X_t dt + a X_t dW_t")
def kloeden_4_20(a=1):
"""Returns a function implementing the explicit solution to the SDE
dX_t = -0.5*a^2 X_t dt - a*sqrt(1 - (X_t)^2) dW_t
Taken from (Kloden & Platen, 1992), page 121.
"""
drift = lambda x, t : -0.5*a*a*x
diffusion = lambda x, t : -a*np.sqrt(1 - x**2)
true_sol = lambda x0, t, wt : np.cos(a*wt + np.arccos(x0))
return StochDiffEq(drift=drift, diffusion=diffusion, true_sol=true_sol, eqn="dX_t = -0.5*a^2 X_t dt - a*sqrt(1 - (X_t)^2) dW_t")
def double_well():
"""Returns a SDE object implementing the drift and diffusion functions for SDE
dX_t = 4*(X_t - (X_t)^3) dt + dW_t
Taken from (Saarkk et. al, 2019), page 269.
"""
drift = lambda x, t : 4*(x - x**3)
diffusion = lambda x, t : 1
true_sol = None
return StochDiffEq(drift=drift, diffusion=diffusion, true_sol=true_sol, eqn="dX_t = 4*(x - x^3) dt + dW_t")
def garcia_m3():
"""Returns a SDE object implementing the drift and diffusion functions for the SDE
dX_t = -(X_t)**3 dt + (0.2 + x**2) dW_t
Taken from (Garcia et. al, 2017).
"""
drift = lambda x, t : -x**3
diffusion = lambda x, t : (0.2 + x**2)
true_sol = None
return StochDiffEq(drift=drift, diffusion=diffusion, true_sol=true_sol, eqn="dX_t = -(X_t)**3 dt + (0.2 + x**2) dW_t")
| 41.275362
| 145
| 0.602528
| 540
| 2,848
| 3.046296
| 0.144444
| 0.038906
| 0.058359
| 0.021885
| 0.820061
| 0.795137
| 0.727052
| 0.712462
| 0.694833
| 0.694833
| 0
| 0.055633
| 0.242626
| 2,848
| 69
| 146
| 41.275362
| 0.707
| 0.353581
| 0
| 0.0625
| 0
| 0.0625
| 0.13913
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1875
| false
| 0
| 0.0625
| 0
| 0.4375
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
43422f6523dcc22c3b6b4405cdef09387414c14e
| 83
|
py
|
Python
|
acestream/ACEStream/Core/DecentralizedTracking/pymdht/__init__.py
|
GrandPaRPi/p2ptv-pi
|
6f79c00f9055a3763ddfe1dc41e14d2cb533f4c3
|
[
"MIT"
] | null | null | null |
acestream/ACEStream/Core/DecentralizedTracking/pymdht/__init__.py
|
GrandPaRPi/p2ptv-pi
|
6f79c00f9055a3763ddfe1dc41e14d2cb533f4c3
|
[
"MIT"
] | null | null | null |
acestream/ACEStream/Core/DecentralizedTracking/pymdht/__init__.py
|
GrandPaRPi/p2ptv-pi
|
6f79c00f9055a3763ddfe1dc41e14d2cb533f4c3
|
[
"MIT"
] | 2
|
2018-04-17T17:34:39.000Z
|
2020-07-26T03:43:33.000Z
|
#Embedded file name: ACEStream\Core\DecentralizedTracking\pymdht\__init__.pyo
pass
| 27.666667
| 77
| 0.855422
| 10
| 83
| 6.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060241
| 83
| 2
| 78
| 41.5
| 0.858974
| 0.915663
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
43488ae602105837e436fe58b21b0a1741d357b8
| 154
|
py
|
Python
|
securityheaders/models/xframeoptions/__init__.py
|
th3cyb3rc0p/securityheaders
|
941264be581dc01afe28f6416f2d7bed79aecfb3
|
[
"Apache-2.0"
] | 151
|
2018-07-29T22:34:43.000Z
|
2022-03-22T05:08:27.000Z
|
securityheaders/models/xframeoptions/__init__.py
|
th3cyb3rc0p/securityheaders
|
941264be581dc01afe28f6416f2d7bed79aecfb3
|
[
"Apache-2.0"
] | 5
|
2019-04-24T07:31:36.000Z
|
2021-04-15T14:31:23.000Z
|
securityheaders/models/xframeoptions/__init__.py
|
th3cyb3rc0p/securityheaders
|
941264be581dc01afe28f6416f2d7bed79aecfb3
|
[
"Apache-2.0"
] | 42
|
2018-07-31T08:18:59.000Z
|
2022-03-28T08:18:32.000Z
|
from .xframeoptionsdirective import XFrameOptionsDirective
from .xframeoptions import XFrameOptions
__all__ = ['XFrameOptionsDirective','XFrameOptions']
| 30.8
| 58
| 0.857143
| 11
| 154
| 11.636364
| 0.454545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077922
| 154
| 4
| 59
| 38.5
| 0.901408
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4a98bad3d93dcb8eaec1e0c8af4d95b85ff80c8d
| 66
|
py
|
Python
|
mxdParser/__init__.py
|
milieuinfo/arcgis2qgs
|
d0d2e4da7cb9d6f08ef82b6c6f94d3340b96f9ba
|
[
"MIT"
] | 18
|
2015-11-24T20:08:35.000Z
|
2021-11-12T15:10:22.000Z
|
mxdParser/__init__.py
|
canglangshushu/arcgis2qgs
|
d0d2e4da7cb9d6f08ef82b6c6f94d3340b96f9ba
|
[
"MIT"
] | 1
|
2021-04-08T14:21:01.000Z
|
2021-04-08T14:21:01.000Z
|
mxdParser/__init__.py
|
canglangshushu/arcgis2qgs
|
d0d2e4da7cb9d6f08ef82b6c6f94d3340b96f9ba
|
[
"MIT"
] | 9
|
2017-06-09T04:31:52.000Z
|
2021-11-22T11:32:14.000Z
|
from _mxdReader import mxdReader
from _srsLookUp import srsLookUp
| 33
| 33
| 0.878788
| 8
| 66
| 7
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 66
| 2
| 33
| 33
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4a98cb043132a5757e8c917edc8893c2951f65ba
| 77
|
py
|
Python
|
OpenAttack/victim/classifiers/__init__.py
|
e-tornike/OpenAttack
|
b19c53af2e01f096505f8ebb8f48a54388295003
|
[
"MIT"
] | 444
|
2020-07-14T12:13:26.000Z
|
2022-03-28T02:46:30.000Z
|
OpenAttack/victim/classifiers/__init__.py
|
e-tornike/OpenAttack
|
b19c53af2e01f096505f8ebb8f48a54388295003
|
[
"MIT"
] | 50
|
2020-07-15T01:34:42.000Z
|
2022-01-24T12:19:19.000Z
|
OpenAttack/victim/classifiers/__init__.py
|
e-tornike/OpenAttack
|
b19c53af2e01f096505f8ebb8f48a54388295003
|
[
"MIT"
] | 86
|
2020-08-02T13:16:45.000Z
|
2022-03-27T06:22:04.000Z
|
from .base import Classifier
from .transformers import TransformersClassifier
| 38.5
| 48
| 0.883117
| 8
| 77
| 8.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 77
| 2
| 48
| 38.5
| 0.971429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4aa44f0cd831834be47193dfb9b9c40eed0d1539
| 129
|
py
|
Python
|
trains/utilities/pyhocon/__init__.py
|
iou2much/trains
|
0ccdd5db4840936888ffa1ab2818657fe7f8b265
|
[
"Apache-2.0"
] | null | null | null |
trains/utilities/pyhocon/__init__.py
|
iou2much/trains
|
0ccdd5db4840936888ffa1ab2818657fe7f8b265
|
[
"Apache-2.0"
] | null | null | null |
trains/utilities/pyhocon/__init__.py
|
iou2much/trains
|
0ccdd5db4840936888ffa1ab2818657fe7f8b265
|
[
"Apache-2.0"
] | null | null | null |
from .config_parser import ConfigParser, ConfigFactory
from .config_tree import ConfigTree
from .converter import HOCONConverter
| 32.25
| 54
| 0.868217
| 15
| 129
| 7.333333
| 0.666667
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100775
| 129
| 3
| 55
| 43
| 0.948276
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
435875ff07b078a50ccb5a8073cf5208138f07af
| 120
|
py
|
Python
|
projects/admin.py
|
ChegeDaniella/awards
|
9b2bd27b089a87bbd7595b51395fdc7cfedda349
|
[
"MIT"
] | null | null | null |
projects/admin.py
|
ChegeDaniella/awards
|
9b2bd27b089a87bbd7595b51395fdc7cfedda349
|
[
"MIT"
] | 4
|
2021-03-30T13:32:53.000Z
|
2021-09-08T02:08:19.000Z
|
projects/admin.py
|
ChegeDaniella/awards
|
9b2bd27b089a87bbd7595b51395fdc7cfedda349
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Posts,Rates
admin.site.register(Posts)
admin.site.register(Rates)
| 20
| 32
| 0.816667
| 18
| 120
| 5.444444
| 0.555556
| 0.183673
| 0.346939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091667
| 120
| 5
| 33
| 24
| 0.899083
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4375bb6181d8ab352ccd70f0e3197ad389123760
| 138
|
py
|
Python
|
controllers/base_controller.py
|
simrit1/outlook-mail-archiver
|
54b308938c36e57011df4ed3e738fc9917281c2a
|
[
"MIT"
] | 2
|
2021-12-25T20:34:39.000Z
|
2021-12-26T22:07:09.000Z
|
controllers/base_controller.py
|
simrit1/outlook-mail-archiver
|
54b308938c36e57011df4ed3e738fc9917281c2a
|
[
"MIT"
] | null | null | null |
controllers/base_controller.py
|
simrit1/outlook-mail-archiver
|
54b308938c36e57011df4ed3e738fc9917281c2a
|
[
"MIT"
] | 3
|
2021-12-26T22:07:22.000Z
|
2022-01-08T17:23:58.000Z
|
from resources.robot_driver import RobotDriver
class BaseController:
def __init__(self):
self.robot_driver = RobotDriver()
| 17.25
| 46
| 0.746377
| 15
| 138
| 6.466667
| 0.733333
| 0.226804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188406
| 138
| 7
| 47
| 19.714286
| 0.866071
| 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 | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
4375c615796d1cee022ac88e9fd80260474ff6c9
| 238
|
py
|
Python
|
adventofcode/tests/y2020/test_2020_08.py
|
andreasbjornstrom/adventofcode-python
|
71db65568bf0f327dd56e5e1c7488e356a24f403
|
[
"MIT"
] | null | null | null |
adventofcode/tests/y2020/test_2020_08.py
|
andreasbjornstrom/adventofcode-python
|
71db65568bf0f327dd56e5e1c7488e356a24f403
|
[
"MIT"
] | null | null | null |
adventofcode/tests/y2020/test_2020_08.py
|
andreasbjornstrom/adventofcode-python
|
71db65568bf0f327dd56e5e1c7488e356a24f403
|
[
"MIT"
] | null | null | null |
'''
Test for year 2020, day 8 solution.
Run tests from project root with `PYTHONPATH=$(pwd) py.test`.
'''
from adventofcode.solutions.y2020.d08 import run
def test_run() -> None:
# not yet implemented!
assert run('') == (None, None)
| 23.8
| 61
| 0.689076
| 35
| 238
| 4.657143
| 0.771429
| 0.08589
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055276
| 0.163866
| 238
| 9
| 62
| 26.444444
| 0.763819
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
438c68df8845157b4b426de5c82c4bb3b544e3fe
| 223
|
py
|
Python
|
neurosky/__init__.py
|
Bituhh/NeuroSky
|
cd61623d73f72983594c1949b41cbd7b7e9ebef8
|
[
"MIT"
] | 2
|
2021-07-03T13:16:38.000Z
|
2021-07-08T11:43:05.000Z
|
neurosky/__init__.py
|
Bituhh/NeuroSky
|
cd61623d73f72983594c1949b41cbd7b7e9ebef8
|
[
"MIT"
] | 1
|
2021-09-08T19:37:46.000Z
|
2022-01-08T19:24:27.000Z
|
neurosky/__init__.py
|
Bituhh/NeuroSky
|
cd61623d73f72983594c1949b41cbd7b7e9ebef8
|
[
"MIT"
] | 1
|
2020-02-29T09:20:10.000Z
|
2020-02-29T09:20:10.000Z
|
from neurosky._connector import Connector
from neurosky._processor import Processor
from neurosky._trainer import Trainer
from neurosky.utils import KeyHandler
__all__ = ['Connector', 'Processor', 'Trainer', 'KeyHandler']
| 31.857143
| 61
| 0.816143
| 25
| 223
| 7
| 0.36
| 0.274286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103139
| 223
| 6
| 62
| 37.166667
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.156951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4397f5f5ca479e01882b41ed970ccb80f2abaebb
| 157
|
py
|
Python
|
unagi/test/test_query.py
|
Christopher-Bradshaw/unagi
|
29bb2df0c8674438f24c3932e0b1b65a83dec4ae
|
[
"MIT"
] | 20
|
2019-06-04T02:21:17.000Z
|
2021-08-17T01:59:18.000Z
|
unagi/test/test_query.py
|
minaskar/unagi
|
821858aa3912bd5bc7bc347a54e3b70afceeb101
|
[
"MIT"
] | 19
|
2018-08-19T07:09:54.000Z
|
2021-10-08T08:45:28.000Z
|
unagi/test/test_query.py
|
minaskar/unagi
|
821858aa3912bd5bc7bc347a54e3b70afceeb101
|
[
"MIT"
] | 9
|
2019-08-04T22:30:39.000Z
|
2021-10-08T09:10:10.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, print_function, absolute_import,
unicode_literals)
| 22.428571
| 66
| 0.624204
| 17
| 157
| 5.352941
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008547
| 0.254777
| 157
| 6
| 67
| 26.166667
| 0.769231
| 0.267516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
43b1636ce5f3db6c08501c686eb6b2a560553735
| 849
|
py
|
Python
|
idfy_rest_client/models/status.py
|
dealflowteam/Idfy
|
fa3918a6c54ea0eedb9146578645b7eb1755b642
|
[
"MIT"
] | null | null | null |
idfy_rest_client/models/status.py
|
dealflowteam/Idfy
|
fa3918a6c54ea0eedb9146578645b7eb1755b642
|
[
"MIT"
] | null | null | null |
idfy_rest_client/models/status.py
|
dealflowteam/Idfy
|
fa3918a6c54ea0eedb9146578645b7eb1755b642
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
idfy_rest_client.models.status
This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io )
"""
class Status(object):
"""Implementation of the 'Status' enum.
TODO: type enum description here.
Attributes:
UNKNOWN: TODO: type description here.
SUCCESS: TODO: type description here.
ERROR: TODO: type description here.
USERABORTED: TODO: type description here.
INVALIDATED: TODO: type description here.
TIMEOUT: TODO: type description here.
CREATED: TODO: type description here.
"""
UNKNOWN = 'UNKNOWN'
SUCCESS = 'SUCCESS'
ERROR = 'ERROR'
USERABORTED = 'USERABORTED'
INVALIDATED = 'INVALIDATED'
TIMEOUT = 'TIMEOUT'
CREATED = 'CREATED'
| 21.225
| 92
| 0.606596
| 85
| 849
| 6.035294
| 0.447059
| 0.124756
| 0.259259
| 0.31384
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005034
| 0.297998
| 849
| 39
| 93
| 21.769231
| 0.855705
| 0.62073
| 0
| 0
| 1
| 0
| 0.251142
| 0
| 0
| 0
| 0
| 0.205128
| 0
| 1
| 0
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
78e0d39adc961e6b8ec700f3ccfa92a120c116dd
| 49
|
py
|
Python
|
10 WhileLoop/main.py
|
codewithsandy/Python-Basic-Exp
|
4c70ada4a042923a94301453c7bd76e704cd2989
|
[
"MIT"
] | 3
|
2021-05-08T13:11:41.000Z
|
2021-05-14T02:43:20.000Z
|
10 WhileLoop/main.py
|
codewithsandy/Python-Basic-Exp
|
4c70ada4a042923a94301453c7bd76e704cd2989
|
[
"MIT"
] | null | null | null |
10 WhileLoop/main.py
|
codewithsandy/Python-Basic-Exp
|
4c70ada4a042923a94301453c7bd76e704cd2989
|
[
"MIT"
] | null | null | null |
i = 0
while (i < 50):
print(i)
i = i + 1
| 9.8
| 15
| 0.387755
| 10
| 49
| 1.9
| 0.6
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0.428571
| 49
| 5
| 16
| 9.8
| 0.535714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 1
| 1
| 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
| 0
|
0
| 5
|
6005faaa0d7155c24897ef997bc3bbed0ca4a54c
| 100
|
py
|
Python
|
upfpy/__init__.py
|
rickhonda/upfpy
|
3badc49e8eb0c0baa48bfbdac16e703f07165b9b
|
[
"MIT"
] | 5
|
2020-06-09T17:46:29.000Z
|
2021-05-07T13:24:53.000Z
|
upfpy/__init__.py
|
rickhonda/upfpy
|
3badc49e8eb0c0baa48bfbdac16e703f07165b9b
|
[
"MIT"
] | 1
|
2020-06-24T18:52:09.000Z
|
2020-06-24T21:20:50.000Z
|
upfpy/__init__.py
|
rickhonda/upfpy
|
3badc49e8eb0c0baa48bfbdac16e703f07165b9b
|
[
"MIT"
] | null | null | null |
#upfpy
from .upf import *
if __name__ == "__main__":
import upfpy.__main__
__main__.main()
| 14.285714
| 26
| 0.67
| 12
| 100
| 4.25
| 0.583333
| 0.313725
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21
| 100
| 6
| 27
| 16.666667
| 0.64557
| 0.05
| 0
| 0
| 0
| 0
| 0.085106
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6040ceedb31c1887b5cf2c5d6ac53940a4695ae9
| 2,573
|
py
|
Python
|
server.py
|
IT-Department-Projects/HCI-Project
|
e9875198d3580fa0ef5c2f41b4d9b03c48397306
|
[
"MIT"
] | null | null | null |
server.py
|
IT-Department-Projects/HCI-Project
|
e9875198d3580fa0ef5c2f41b4d9b03c48397306
|
[
"MIT"
] | null | null | null |
server.py
|
IT-Department-Projects/HCI-Project
|
e9875198d3580fa0ef5c2f41b4d9b03c48397306
|
[
"MIT"
] | null | null | null |
from imports import *
from utils import *
from auth import *
"""
REST API Call to detect image in a particular picture
Argument takes in image with POST Key as 'file'
Returns JSON of 'face_exists' and 'number_of_faces'
"""
@app.route('/image_detection', methods=['GET', 'POST'])
def image_detection():
# Check if a valid image file was uploaded
if request.method == 'POST':
if 'file' not in request.files:
return redirect(request.url)
file = request.files['file']
if file.filename == '':
return redirect(request.url)
if file and allowed_file(file.filename):
# The image file seems valid! Detect faces and return the result.
return detect_faces_in_image(file)
# If no valid image file was uploaded, show the file upload form:
return '''
<!doctype html>
<title>Have you uploaded a picture yet?</title>
<h1>Upload a picture and see the number of people in the picture!</h1>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
'''
"""
REST API Call to recognise images in a particular picture
Argument takes in image with POST Key as 'file'
Returns JSON of 'face_exists' and 'number_of_faces'
"""
@app.route('/image_recongnition', methods=['GET', 'POST'])
def image_recognition():
# Check if a valid image file was uploaded
if request.method == 'POST':
if 'file' not in request.files:
return redirect(request.url)
file = request.files['file']
if file.filename == '':
return redirect(request.url)
if file and allowed_file(file.filename):
# The image file seems valid! Detect faces and return the result.
return recognise_faces_in_image(file)
# If no valid image file was uploaded, show the file upload form:
return '''
<!doctype html>
<title>Have you uploaded a picture yet?</title>
<h1>Upload a picture and see the who all are the people in the picture!</h1>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
'''
"""
REST APT to render the static page index.html
"""
@app.route('/')
@auth.login_required
def index():
return render_template('index.html', name='Cycle Project')
"""
Main method to run the Flask Application
"""
if __name__ == '__main__':
# Set server address 0.0.0.0:5000/
app.run(host="0.0.0.0", port=5000, debug=True)
| 30.630952
| 80
| 0.65138
| 364
| 2,573
| 4.527473
| 0.285714
| 0.043689
| 0.033981
| 0.041262
| 0.769417
| 0.742718
| 0.742718
| 0.742718
| 0.742718
| 0.742718
| 0
| 0.010096
| 0.230082
| 2,573
| 84
| 81
| 30.630952
| 0.821807
| 0.143801
| 0
| 0.638298
| 0
| 0
| 0.405879
| 0.033917
| 0
| 0
| 0
| 0
| 0
| 1
| 0.06383
| false
| 0
| 0.06383
| 0.021277
| 0.319149
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
605b158de059394a3db4d15dc5b80f50fc54dc04
| 106
|
py
|
Python
|
rotkehlchen/chain/ethereum/modules/gitcoin/__init__.py
|
rotkehlchenio/rotkehlchen
|
98f49cd3ed26c641fec03b78eff9fe1872385fbf
|
[
"BSD-3-Clause"
] | 137
|
2018-03-05T11:53:29.000Z
|
2019-11-03T16:38:42.000Z
|
rotkehlchen/chain/ethereum/modules/gitcoin/__init__.py
|
rotkehlchenio/rotkehlchen
|
98f49cd3ed26c641fec03b78eff9fe1872385fbf
|
[
"BSD-3-Clause"
] | 385
|
2018-03-08T12:43:41.000Z
|
2019-11-10T09:15:36.000Z
|
rotkehlchen/chain/ethereum/modules/gitcoin/__init__.py
|
rotkehlchenio/rotkehlchen
|
98f49cd3ed26c641fec03b78eff9fe1872385fbf
|
[
"BSD-3-Clause"
] | 59
|
2018-03-08T10:08:27.000Z
|
2019-10-26T11:30:44.000Z
|
from .accountant import GitcoinAccountant # noqa: F401
from .decoder import GitcoinDecoder # noqa: F401
| 35.333333
| 55
| 0.792453
| 12
| 106
| 7
| 0.666667
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.150943
| 106
| 2
| 56
| 53
| 0.866667
| 0.198113
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
607491badc3e42dbdcf1c3f25cf344a3b17029b7
| 719
|
py
|
Python
|
wandb/sdk/__init__.py
|
nbardy/client
|
dfd6345d6a39f20252ac2107652e0f530fc67c98
|
[
"MIT"
] | 1
|
2021-09-07T09:55:27.000Z
|
2021-09-07T09:55:27.000Z
|
wandb/sdk/__init__.py
|
jiaqianjing/client
|
41fa2443b9fa28682cbf4ddde85e04df6f9cd9a8
|
[
"MIT"
] | null | null | null |
wandb/sdk/__init__.py
|
jiaqianjing/client
|
41fa2443b9fa28682cbf4ddde85e04df6f9cd9a8
|
[
"MIT"
] | null | null | null |
#
# -*- coding: utf-8 -*-
"""
module sdk
"""
from . import wandb_helper as helper # noqa: F401
from .wandb_alerts import AlertLevel # noqa: F401
from .wandb_artifacts import Artifact # noqa: F401
from .wandb_config import Config # noqa: F401
from .wandb_history import History # noqa: F401
from .wandb_init import init # noqa: F401
from .wandb_login import login # noqa: F401
from .wandb_require import require # noqa: F401
from .wandb_run import finish # noqa: F401
from .wandb_save import save # noqa: F401
from .wandb_settings import Settings # noqa: F401
from .wandb_setup import setup # noqa: F401
from .wandb_summary import Summary # noqa: F401
from .wandb_watch import unwatch, watch # noqa: F401
| 34.238095
| 53
| 0.742698
| 105
| 719
| 4.952381
| 0.27619
| 0.215385
| 0.3
| 0.425
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072513
| 0.175243
| 719
| 20
| 54
| 35.95
| 0.804384
| 0.260083
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6085515af8d0ea25c0a6fd8be7b62296d14e9f12
| 64
|
py
|
Python
|
src/colorist/helper/__init__.py
|
jakob-bagterp/colorist-for-python
|
6e9f9cc3a345cac7459cdc494f5fd635aecf19f7
|
[
"MIT"
] | null | null | null |
src/colorist/helper/__init__.py
|
jakob-bagterp/colorist-for-python
|
6e9f9cc3a345cac7459cdc494f5fd635aecf19f7
|
[
"MIT"
] | null | null | null |
src/colorist/helper/__init__.py
|
jakob-bagterp/colorist-for-python
|
6e9f9cc3a345cac7459cdc494f5fd635aecf19f7
|
[
"MIT"
] | null | null | null |
__all__ = ["color", "effect"]
from .print import color, effect
| 16
| 32
| 0.6875
| 8
| 64
| 5
| 0.75
| 0.55
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 64
| 3
| 33
| 21.333333
| 0.740741
| 0
| 0
| 0
| 0
| 0
| 0.171875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
| 1
| 0
| 0
| 1
|
0
| 5
|
60aa4ce614ac8ad3379b0467e76ecc325109be44
| 173
|
py
|
Python
|
lantz/lantz/drivers/keysight/__init__.py
|
zhong-lab/optics
|
9de1942d9a128183ecb3d360b160b27126e7b8f0
|
[
"BSD-2-Clause"
] | 1
|
2022-03-27T07:47:19.000Z
|
2022-03-27T07:47:19.000Z
|
lantz/lantz/drivers/keysight/__init__.py
|
zhong-lab/optics
|
9de1942d9a128183ecb3d360b160b27126e7b8f0
|
[
"BSD-2-Clause"
] | null | null | null |
lantz/lantz/drivers/keysight/__init__.py
|
zhong-lab/optics
|
9de1942d9a128183ecb3d360b160b27126e7b8f0
|
[
"BSD-2-Clause"
] | 4
|
2019-11-08T22:39:04.000Z
|
2021-11-05T02:39:37.000Z
|
from .Keysight_33622A import Keysight_33622A
from .seqbuild import SeqBuild
from .arbseq_class import Arbseq_Class
__all__ = ['Keysight_33622A', 'SeqBuild', 'Arbseq_Class']
| 34.6
| 57
| 0.820809
| 22
| 173
| 6
| 0.363636
| 0.318182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 0.098266
| 173
| 5
| 57
| 34.6
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.201149
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
60ab54a26394e4fae6fcb28ae91ad32359cbd719
| 215
|
py
|
Python
|
lib/dataset/__init__.py
|
Amberrferr/Faster_RCNN_for_DOTA
|
6cd0407052f3d9cc095f8ac2e1cea9d4c3adafc5
|
[
"Apache-2.0"
] | null | null | null |
lib/dataset/__init__.py
|
Amberrferr/Faster_RCNN_for_DOTA
|
6cd0407052f3d9cc095f8ac2e1cea9d4c3adafc5
|
[
"Apache-2.0"
] | null | null | null |
lib/dataset/__init__.py
|
Amberrferr/Faster_RCNN_for_DOTA
|
6cd0407052f3d9cc095f8ac2e1cea9d4c3adafc5
|
[
"Apache-2.0"
] | null | null | null |
from dataset.imdb import IMDB
from dataset.pascal_voc import PascalVOC
from dataset.cityscape import CityScape
from dataset.coco import coco
from dataset.DOTA import DOTA_oriented,DOTA
from dataset.UCAS import UCAS
| 30.714286
| 43
| 0.855814
| 33
| 215
| 5.515152
| 0.363636
| 0.362637
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111628
| 215
| 6
| 44
| 35.833333
| 0.95288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
60af629018020c154d46aec361f98dfc49a2a8e8
| 8,745
|
py
|
Python
|
eclipse-mosquitto/test/broker/01-connect-zero-length-id.py
|
HenriqueBuzin/mosquitto-eclipse-mqtt
|
00468923fcf70eefdf2c707b6ba9bdd4f859faf2
|
[
"Unlicense"
] | 2
|
2021-04-20T14:28:59.000Z
|
2021-05-06T07:46:53.000Z
|
eclipse-mosquitto/test/broker/01-connect-zero-length-id.py
|
HenriqueBuzin/mosquitto-eclipse-mqtt
|
00468923fcf70eefdf2c707b6ba9bdd4f859faf2
|
[
"Unlicense"
] | null | null | null |
eclipse-mosquitto/test/broker/01-connect-zero-length-id.py
|
HenriqueBuzin/mosquitto-eclipse-mqtt
|
00468923fcf70eefdf2c707b6ba9bdd4f859faf2
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python3
# Test whether a CONNECT with a zero length client id results in the correct behaviour.
# MQTT v3.1.1 - zero length is allowed, unless allow_zero_length_clientid is false, and unless clean_start is False.
# MQTT v5.0 - zero length is allowed, unless allow_zero_length_clientid is false
from mosq_test_helper import *
def write_config(filename, port1, port2, per_listener, allow_zero):
with open(filename, 'w') as f:
f.write("per_listener_settings %s\n" % (per_listener))
f.write("listener %d\n" % (port2))
f.write("allow_anonymous true\n")
if allow_zero != "":
f.write("allow_zero_length_clientid %s\n" % (allow_zero))
f.write("listener %d\n" % (port1))
f.write("allow_anonymous true\n")
if allow_zero != "":
f.write("allow_zero_length_clientid %s\n" % (allow_zero))
def do_test(per_listener, proto_ver, clean_start, allow_zero, client_port, expect_fail):
conf_file = os.path.basename(__file__).replace('.py', '.conf')
write_config(conf_file, port1, port2, per_listener, allow_zero)
rc = 1
keepalive = 10
connect_packet = mosq_test.gen_connect("", keepalive=keepalive, proto_ver=proto_ver, clean_session=clean_start)
if proto_ver == 4:
if expect_fail == True:
connack_packet = mosq_test.gen_connack(rc=2, proto_ver=proto_ver)
else:
connack_packet = mosq_test.gen_connack(rc=0, proto_ver=proto_ver)
else:
if expect_fail == True:
connack_packet = mosq_test.gen_connack(rc=128, proto_ver=proto_ver, properties=None)
else:
props = mqtt5_props.gen_string_prop(mqtt5_props.PROP_ASSIGNED_CLIENT_IDENTIFIER, "auto-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
connack_packet = mosq_test.gen_connack(rc=0, proto_ver=proto_ver, properties=props)
# Remove the "xxxx" part - this means the front part of the packet
# is correct (so remaining length etc. is correct), but we don't
# need to match against the random id.
connack_packet = connack_packet[:-39]
broker = mosq_test.start_broker(filename=os.path.basename(__file__), port=port1, use_conf=True)
try:
sock = mosq_test.do_client_connect(connect_packet, connack_packet, port=client_port)
sock.close()
rc = 0
except mosq_test.TestError:
pass
finally:
broker.terminate()
broker.wait()
(stdo, stde) = broker.communicate()
os.remove(conf_file)
if rc:
print(stde.decode('utf-8'))
print("per_listener:%s proto_ver:%d client_port:%d clean_start:%d allow_zero:%s" % (per_listener, proto_ver, client_port, clean_start, allow_zero))
print("port1:%d port2:%d" % (port1, port2))
exit(rc)
(port1, port2) = mosq_test.get_port(2)
test_v4 = True
test_v5 = True
if test_v4 == True:
do_test(per_listener="false", proto_ver=4, client_port=port1, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="false", proto_ver=4, client_port=port1, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port1, clean_start=False, allow_zero="true", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port1, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port1, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="true", proto_ver=4, client_port=port1, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port1, clean_start=False, allow_zero="true", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port1, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port2, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="false", proto_ver=4, client_port=port2, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port2, clean_start=False, allow_zero="true", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port2, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port2, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="true", proto_ver=4, client_port=port2, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port2, clean_start=False, allow_zero="true", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port2, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port1, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="false", proto_ver=4, client_port=port1, clean_start=False, allow_zero="", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port1, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="true", proto_ver=4, client_port=port1, clean_start=False, allow_zero="", expect_fail=True)
do_test(per_listener="false", proto_ver=4, client_port=port2, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="false", proto_ver=4, client_port=port2, clean_start=False, allow_zero="", expect_fail=True)
do_test(per_listener="true", proto_ver=4, client_port=port2, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="true", proto_ver=4, client_port=port2, clean_start=False, allow_zero="", expect_fail=True)
if test_v5 == True:
do_test(per_listener="false", proto_ver=5, client_port=port1, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port1, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=5, client_port=port1, clean_start=False, allow_zero="true", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port1, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=5, client_port=port1, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port1, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=5, client_port=port1, clean_start=False, allow_zero="true", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port1, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=5, client_port=port2, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port2, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=5, client_port=port2, clean_start=False, allow_zero="true", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port2, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=5, client_port=port2, clean_start=True, allow_zero="true", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port2, clean_start=True, allow_zero="false", expect_fail=True)
do_test(per_listener="true", proto_ver=5, client_port=port2, clean_start=False, allow_zero="true", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port2, clean_start=False, allow_zero="false", expect_fail=True)
do_test(per_listener="false", proto_ver=5, client_port=port1, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port1, clean_start=False, allow_zero="", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port1, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port1, clean_start=False, allow_zero="", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port2, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="false", proto_ver=5, client_port=port2, clean_start=False, allow_zero="", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port2, clean_start=True, allow_zero="", expect_fail=False)
do_test(per_listener="true", proto_ver=5, client_port=port2, clean_start=False, allow_zero="", expect_fail=False)
exit(0)
| 67.269231
| 159
| 0.737907
| 1,369
| 8,745
| 4.385683
| 0.096421
| 0.082612
| 0.073451
| 0.138741
| 0.794803
| 0.77948
| 0.769487
| 0.769487
| 0.769487
| 0.769487
| 0
| 0.018038
| 0.131504
| 8,745
| 129
| 160
| 67.790698
| 0.772482
| 0.053288
| 0
| 0.108911
| 0
| 0
| 0.080029
| 0.013781
| 0
| 0
| 0
| 0
| 0
| 1
| 0.019802
| false
| 0.009901
| 0.009901
| 0
| 0.029703
| 0.029703
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
60c151ec731bd78ea385b33fba2ddc63e01a5ef7
| 4,796
|
py
|
Python
|
tester.py
|
joshuachen0/kanban
|
867822c1f6df3e94a2a3e778a6b90cea986d55c5
|
[
"MIT"
] | null | null | null |
tester.py
|
joshuachen0/kanban
|
867822c1f6df3e94a2a3e778a6b90cea986d55c5
|
[
"MIT"
] | null | null | null |
tester.py
|
joshuachen0/kanban
|
867822c1f6df3e94a2a3e778a6b90cea986d55c5
|
[
"MIT"
] | null | null | null |
from kanban import *
import sys
import StringIO
# Testing suite for kanban class
#Need to test add, remove, and move functions, including behavior of errors.
#Need to try and catch errors and display the proper functions
# Generate test file
file_name = 'tester'
with open(file_name, 'w') as f:
f.write('to do|4||\n')
f.write('on hold|3||\n')
f.write('doing|2||\n')
f.write('done|9||\n')
# Instantiate instance of kanban class with test file
kb = kanban('tester')
assert kb.name == 'tester'
assert kb.num_of_areas == 4
assert kb.area_names == ['to do', 'on hold', 'doing', 'done']
assert kb.sizes == [4, 3, 2, 9]
assert kb.tasks == [[], [], [], []]
assert kb.display == '+-------+---------+-------+------+\n| to do | on hold | doing | done |\n+-------+---------+-------+------+\n+-------+---------+-------+------+\n| | | | |\n+-------+---------+-------+------+\n| | | | |\n+-------+---------+-------+------+\n| | |~~~~~~~| |\n+-------+---------+-------+------+\n| |~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n'
# Add tasks to kanban board
kb.add_task('play games')
kb.generate_display()
assert kb.tasks == [['1 play games'], [], [], []]
assert kb.display == '+--------------+---------+-------+------+\n| to do | on hold | doing | done |\n+--------------+---------+-------+------+\n+--------------+---------+-------+------+\n| 1 play games | | | |\n+--------------+---------+-------+------+\n| | | | |\n+--------------+---------+-------+------+\n| | |~~~~~~~| |\n+--------------+---------+-------+------+\n| |~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n'
temp = sys.stdin
f = StringIO.StringIO('y')
sys.stdin = f
kb.rem_task(1)
sys.stdin = temp
f.close()
kb.generate_display()
assert kb.tasks == [[], [], [], []]
assert kb.display == '+-------+---------+-------+------+\n| to do | on hold | doing | done |\n+-------+---------+-------+------+\n+-------+---------+-------+------+\n| | | | |\n+-------+---------+-------+------+\n| | | | |\n+-------+---------+-------+------+\n| | |~~~~~~~| |\n+-------+---------+-------+------+\n| |~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n|~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+-------+---------+-------+------+\n'
try:
while 1:
kb.add_task('play games')
except Exception as e:
pass
kb.generate_display()
assert type(e) == AreaOutOfSpaceError
assert e.area == 'to do'
assert kb.tasks == [['1 play games', '2 play games', '3 play games', '4 play games'], [], [], []]
assert kb.display == '+--------------+---------+-------+------+\n| to do | on hold | doing | done |\n+--------------+---------+-------+------+\n+--------------+---------+-------+------+\n| 1 play games | | | |\n+--------------+---------+-------+------+\n| 2 play games | | | |\n+--------------+---------+-------+------+\n| 3 play games | |~~~~~~~| |\n+--------------+---------+-------+------+\n| 4 play games |~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n|~~~~~~~~~~~~~~|~~~~~~~~~|~~~~~~~| |\n+--------------+---------+-------+------+\n'
| 88.814815
| 969
| 0.221643
| 334
| 4,796
| 3.149701
| 0.218563
| 0.142586
| 0.188213
| 0.228137
| 0.398289
| 0.364068
| 0.278517
| 0.278517
| 0.278517
| 0.278517
| 0
| 0.005234
| 0.16347
| 4,796
| 53
| 970
| 90.490566
| 0.256979
| 0.054837
| 0
| 0.230769
| 0
| 0.102564
| 0.805789
| 0.584622
| 0
| 0
| 0
| 0
| 0.358974
| 1
| 0
| false
| 0.025641
| 0.076923
| 0
| 0.076923
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
60e8067e3a982ed69ebe605eade49c7ab3013f1d
| 167
|
py
|
Python
|
randfacts/__init__.py
|
notkar1m/randfacts
|
84f45650f440f1118544e91f617f36637a2e71ec
|
[
"MIT"
] | null | null | null |
randfacts/__init__.py
|
notkar1m/randfacts
|
84f45650f440f1118544e91f617f36637a2e71ec
|
[
"MIT"
] | null | null | null |
randfacts/__init__.py
|
notkar1m/randfacts
|
84f45650f440f1118544e91f617f36637a2e71ec
|
[
"MIT"
] | null | null | null |
from .__version__ import __title__, __description__, __url__, __version__, __author__, __author_email__, __license__, __copyright__
from randfacts.main import getFact
| 55.666667
| 131
| 0.856287
| 17
| 167
| 6.235294
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08982
| 167
| 2
| 132
| 83.5
| 0.697368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
60ead695f8acbf1ce8dc58cdf515691ca6abf91e
| 4,501
|
py
|
Python
|
yandex/cloud/billing/v1/sku_service_pb2_grpc.py
|
korsar182/python-sdk
|
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
|
[
"MIT"
] | 36
|
2018-12-23T13:51:50.000Z
|
2022-03-25T07:48:24.000Z
|
yandex/cloud/billing/v1/sku_service_pb2_grpc.py
|
korsar182/python-sdk
|
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
|
[
"MIT"
] | 15
|
2019-02-28T04:55:09.000Z
|
2022-03-06T23:17:24.000Z
|
yandex/cloud/billing/v1/sku_service_pb2_grpc.py
|
korsar182/python-sdk
|
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
|
[
"MIT"
] | 18
|
2019-02-23T07:10:57.000Z
|
2022-03-28T14:41:08.000Z
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from yandex.cloud.billing.v1 import sku_pb2 as yandex_dot_cloud_dot_billing_dot_v1_dot_sku__pb2
from yandex.cloud.billing.v1 import sku_service_pb2 as yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2
class SkuServiceStub(object):
"""A set of methods for managing Sku resources.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Get = channel.unary_unary(
'/yandex.cloud.billing.v1.SkuService/Get',
request_serializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.GetSkuRequest.SerializeToString,
response_deserializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__pb2.Sku.FromString,
)
self.List = channel.unary_unary(
'/yandex.cloud.billing.v1.SkuService/List',
request_serializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.ListSkusRequest.SerializeToString,
response_deserializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.ListSkusResponse.FromString,
)
class SkuServiceServicer(object):
"""A set of methods for managing Sku resources.
"""
def Get(self, request, context):
"""Returns the specified SKU.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def List(self, request, context):
"""Retrieves the list of SKUs.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_SkuServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Get': grpc.unary_unary_rpc_method_handler(
servicer.Get,
request_deserializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.GetSkuRequest.FromString,
response_serializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__pb2.Sku.SerializeToString,
),
'List': grpc.unary_unary_rpc_method_handler(
servicer.List,
request_deserializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.ListSkusRequest.FromString,
response_serializer=yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.ListSkusResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'yandex.cloud.billing.v1.SkuService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class SkuService(object):
"""A set of methods for managing Sku resources.
"""
@staticmethod
def Get(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/yandex.cloud.billing.v1.SkuService/Get',
yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.GetSkuRequest.SerializeToString,
yandex_dot_cloud_dot_billing_dot_v1_dot_sku__pb2.Sku.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def List(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/yandex.cloud.billing.v1.SkuService/List',
yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.ListSkusRequest.SerializeToString,
yandex_dot_cloud_dot_billing_dot_v1_dot_sku__service__pb2.ListSkusResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
| 42.462264
| 133
| 0.691846
| 505
| 4,501
| 5.726733
| 0.19802
| 0.043568
| 0.067773
| 0.082296
| 0.784578
| 0.774205
| 0.769364
| 0.720263
| 0.687759
| 0.673237
| 0
| 0.010762
| 0.23617
| 4,501
| 105
| 134
| 42.866667
| 0.830425
| 0.100644
| 0
| 0.438356
| 1
| 0
| 0.073006
| 0.048169
| 0
| 0
| 0
| 0
| 0
| 1
| 0.082192
| false
| 0
| 0.041096
| 0.027397
| 0.191781
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
71484f3ab13d309f51f3a9a9be79c8ce9eba87f8
| 694
|
py
|
Python
|
Beriflapp/1 RLOTFS/RLOTFS.py
|
rootaniumcca/Beriflapp
|
036126550942c2825281325f13e5f70642de3566
|
[
"MIT"
] | null | null | null |
Beriflapp/1 RLOTFS/RLOTFS.py
|
rootaniumcca/Beriflapp
|
036126550942c2825281325f13e5f70642de3566
|
[
"MIT"
] | null | null | null |
Beriflapp/1 RLOTFS/RLOTFS.py
|
rootaniumcca/Beriflapp
|
036126550942c2825281325f13e5f70642de3566
|
[
"MIT"
] | null | null | null |
# Read lines of text from STDIN.
def Beriflapp():
while True:
# Reading the input from the user
i = input("What is the value of 2+8 = ")
# Only exits when meets the condition
if i == '10':
break
print("The value", i, "is the wrong answer. Try again")
print("The value", i, "is the right answer")
while True:
# Reading the input from the user
i = input("What is the value of 4+1 = ")
# Only exits when meets the condition
if i == '5':
break
print("The value", i, "is the wrong answer. Try again")
print("The value", i, "is the right answer")
Beriflapp()
| 33.047619
| 64
| 0.544669
| 99
| 694
| 3.818182
| 0.373737
| 0.079365
| 0.137566
| 0.148148
| 0.862434
| 0.862434
| 0.862434
| 0.862434
| 0.687831
| 0.687831
| 0
| 0.01559
| 0.353026
| 694
| 21
| 65
| 33.047619
| 0.826281
| 0.239193
| 0
| 0.571429
| 0
| 0
| 0.379722
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| false
| 0
| 0
| 0
| 0.071429
| 0.285714
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
714ad787a20188d8e89a80347e6256d299a9539e
| 9,979
|
py
|
Python
|
tests/pitchpx/game/test_game.py
|
ktak199/pitchpx
|
d8d700b3ce2d31e45705d7a2b3d2cb59023b29ed
|
[
"MIT"
] | 14
|
2016-01-02T15:03:31.000Z
|
2020-03-15T01:58:16.000Z
|
tests/pitchpx/game/test_game.py
|
ktak199/pitchpx
|
d8d700b3ce2d31e45705d7a2b3d2cb59023b29ed
|
[
"MIT"
] | 17
|
2015-12-31T13:12:49.000Z
|
2021-03-31T18:26:11.000Z
|
tests/pitchpx/game/test_game.py
|
ktak199/pitchpx
|
d8d700b3ce2d31e45705d7a2b3d2cb59023b29ed
|
[
"MIT"
] | 2
|
2018-04-10T02:59:25.000Z
|
2018-04-10T03:59:39.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
from datetime import datetime as dt
from unittest import TestCase, main
from pitchpx.game.game import Game
__author__ = 'Shinichi Nakagawa'
class TestGame(TestCase):
"""
MLBAM Game Data testing(game.xml)
"""
GAME_XML = """
<game type="R" local_game_time="12:40" game_pk="415346" game_time_et="03:40 PM" gameday_sw="P">
<team type="home" code="sea" file_code="sea" abbrev="SEA" id="136" name="Seattle" name_full="Seattle Mariners" name_brief="Mariners" w="54" l="61" division_id="200" league_id="103" league="AL"/>
<team type="away" code="bal" file_code="bal" abbrev="BAL" id="110" name="Baltimore" name_full="Baltimore Orioles" name_brief="Orioles" w="57" l="56" division_id="201" league_id="103" league="AL"/>
<stadium id="680" name="Safeco Field" venue_w_chan_loc="USWA0395" location="Seattle, WA"/>
"""
DUMMY_XML = """
<game>
<hoge type="home" code="sea" file_code="sea" abbrev="SEA" id="136" name="Seattle" name_full="Seattle Mariners" name_brief="Mariners" w="54" l="61" division_id="200" league_id="103" league="AL"/>
<hoge type="away" code="bal" file_code="bal" abbrev="BAL" id="110" name="Baltimore" name_full="Baltimore Orioles" name_brief="Orioles" w="57" l="56" division_id="201" league_id="103" league="AL"/>
<fuga id="680" name="Safeco Field" venue_w_chan_loc="USWA0395" location="Seattle, WA"/>
</game>
"""
def setUp(self):
self.game = BeautifulSoup(TestGame.GAME_XML, 'lxml')
self.dummy = BeautifulSoup(TestGame.DUMMY_XML, 'lxml')
def tearDown(self):
self.game = None
self.dummy = None
def test_row(self):
"""
Game Object Data(row data)
"""
game = Game._generate_game_object(self.game, dt.strptime('2015-08-13', '%Y-%m-%d'), 2)
row = game.row()
# Base Data
self.assertEqual(row['game_type'], 'R')
self.assertEqual(row['game_type_des'], 'Regular Season')
self.assertEqual(row['st_fl'], 'F')
self.assertEqual(row['regseason_fl'], 'T')
self.assertEqual(row['local_game_time'], '12:40')
self.assertEqual(row['game_id'], '415346')
# Team Data
self.assertEqual(row['home_team_id'], 'sea')
self.assertEqual(row['away_team_id'], 'bal')
self.assertEqual(row['home_team_lg'], 'AL')
self.assertEqual(row['away_team_lg'], 'AL')
self.assertEqual(row['home_team_name'], 'Seattle')
self.assertEqual(row['away_team_name'], 'Baltimore')
self.assertEqual(row['home_team_name_full'], 'Seattle Mariners')
self.assertEqual(row['away_team_name_full'], 'Baltimore Orioles')
# Stadium Data
self.assertEqual(row['park_id'], '680')
self.assertEqual(row['park_name'], 'Safeco Field')
self.assertEqual(row['park_loc'], 'Seattle, WA')
# Retro ID
self.assertEqual(row['retro_game_id'], 'SEA201508131')
def test_generate_game_object(self):
"""
Game Object Data
"""
game = Game._generate_game_object(self.game, dt.strptime('2015-08-12', '%Y-%m-%d'), 1)
# Base Data
self.assertEqual(game.game_type, 'R')
self.assertEqual(game.game_type_des, 'Regular Season')
self.assertEqual(game.st_fl, 'F')
self.assertEqual(game.regseason_fl, 'T')
self.assertEqual(game.local_game_time, '12:40')
self.assertEqual(game.game_id, '415346')
# Team Data
self.assertEqual(game.home_team_id, 'sea')
self.assertEqual(game.away_team_id, 'bal')
self.assertEqual(game.home_team_lg, 'AL')
self.assertEqual(game.away_team_lg, 'AL')
self.assertEqual(game.home_team_name, 'Seattle')
self.assertEqual(game.away_team_name, 'Baltimore')
self.assertEqual(game.home_team_name_full, 'Seattle Mariners')
self.assertEqual(game.away_team_name_full, 'Baltimore Orioles')
# Stadium Data
self.assertEqual(game.park_id, '680')
self.assertEqual(game.park_name, 'Safeco Field')
self.assertEqual(game.park_loc, 'Seattle, WA')
# Retro ID
self.assertEqual(game.retro_game_id, 'SEA201508120')
def test_spring_training(self):
"""
Spring Training Data
"""
self.assertEqual(Game._get_game_type_des('S'), 'Spring Training')
self.assertEqual(Game._get_st_fl('S'), 'T')
self.assertEqual(Game._get_regseason_fl('S'), 'F')
self.assertEqual(Game._get_playoff_fl('S'), 'F')
def test_regular_season(self):
"""
Regular Season Data
"""
self.assertEqual(Game._get_game_type_des('R'), 'Regular Season')
self.assertEqual(Game._get_st_fl('R'), 'F')
self.assertEqual(Game._get_regseason_fl('R'), 'T')
self.assertEqual(Game._get_playoff_fl('R'), 'F')
def test_wild_card_game(self):
"""
Wild-card Game Data
"""
self.assertEqual(Game._get_game_type_des('F'), 'Wild-card Game')
self.assertEqual(Game._get_st_fl('F'), 'F')
self.assertEqual(Game._get_regseason_fl('F'), 'F')
self.assertEqual(Game._get_playoff_fl('F'), 'T')
def test_divisional_series(self):
"""
Divisional Series Data
"""
self.assertEqual(Game._get_game_type_des('D'), 'Divisional Series')
self.assertEqual(Game._get_st_fl('D'), 'F')
self.assertEqual(Game._get_regseason_fl('D'), 'F')
self.assertEqual(Game._get_playoff_fl('D'), 'T')
def test_world_series(self):
"""
World Series Data
"""
self.assertEqual(Game._get_game_type_des('W'), 'World Series')
self.assertEqual(Game._get_st_fl('W'), 'F')
self.assertEqual(Game._get_regseason_fl('W'), 'F')
self.assertEqual(Game._get_playoff_fl('W'), 'T')
def test_game_type_unknown(self):
"""
Unknow Game Type
"""
self.assertEqual(Game._get_game_type_des('U'), 'Unknown')
self.assertEqual(Game._get_st_fl('U'), 'F')
self.assertEqual(Game._get_regseason_fl('U'), 'F')
self.assertEqual(Game._get_playoff_fl('U'), 'F')
def test_league_champion_ship(self):
"""
League Champion Ship Data
"""
self.assertEqual(Game._get_game_type_des('L'), 'LCS')
self.assertEqual(Game._get_st_fl('L'), 'F')
self.assertEqual(Game._get_regseason_fl('L'), 'F')
self.assertEqual(Game._get_playoff_fl('L'), 'T')
def test_interleague(self):
"""
inter league
"""
self.assertEqual(Game._get_interleague_fl('AL', 'NL'), 'T')
def test_not_interleague(self):
"""
inter league(not)
"""
self.assertEqual(Game._get_interleague_fl('AL', 'AL'), 'F')
self.assertEqual(Game._get_interleague_fl('NL', 'NL'), 'F')
def test_unknown_interleague(self):
"""
inter league(unknown)
"""
self.assertEqual(Game._get_interleague_fl('AL', 'U'), 'U')
self.assertEqual(Game._get_interleague_fl('U', 'NL'), 'U')
def test_team_attributes_exists(self):
"""
Team attributes Data
"""
self.assertEqual(Game._get_team_attribute(self.game, 'home', 'code'), 'sea')
self.assertEqual(Game._get_team_attribute(self.game, 'away', 'code'), 'bal')
self.assertEqual(Game._get_team_attribute(self.game, 'home', 'league'), 'AL')
self.assertEqual(Game._get_team_attribute(self.game, 'away', 'league'), 'AL')
self.assertEqual(Game._get_team_attribute(self.game, 'home', 'name'), 'Seattle')
self.assertEqual(Game._get_team_attribute(self.game, 'away', 'name'), 'Baltimore')
self.assertEqual(Game._get_team_attribute(self.game, 'home', 'name_full'), 'Seattle Mariners')
self.assertEqual(Game._get_team_attribute(self.game, 'away', 'name_full'), 'Baltimore Orioles')
def test_team_stadium_exists(self):
"""
Stadium Data
"""
self.assertEqual(Game._get_stadium_attribute(self.game, 'id'), '680')
self.assertEqual(Game._get_stadium_attribute(self.game, 'name'), 'Safeco Field')
self.assertEqual(Game._get_stadium_attribute(self.game, 'location'), 'Seattle, WA')
def test_team_attributes_not_exists(self):
"""
Team attributes Data(not exists)
"""
self.assertEqual(Game._get_team_attribute(self.dummy, 'home', 'code'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'away', 'code'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'home', 'league'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'away', 'league'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'home', 'name'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'away', 'name'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'home', 'name_full'), 'Unknown')
self.assertEqual(Game._get_team_attribute(self.dummy, 'home', 'name_full'), 'Unknown')
def test_team_stadium_not_exists(self):
"""
Stadium Data(not exists)
"""
self.assertEqual(Game._get_stadium_attribute(self.dummy, 'id'), 'Unknown')
self.assertEqual(Game._get_stadium_attribute(self.dummy, 'name'), 'Unknown')
self.assertEqual(Game._get_stadium_attribute(self.dummy, 'location'), 'Unknown')
def test_retro_id(self):
"""
Retro ID
"""
self.assertEqual(Game._get_retro_id('SEA', dt.strptime('2015-08-12', '%Y-%m-%d'), 1), 'SEA201508120')
self.assertEqual(Game._get_retro_id('OAK', dt.strptime('2015-04-03', '%Y-%m-%d'), 2), 'OAK201504031')
self.assertEqual(Game._get_retro_id('MIA', dt.strptime('2015-10-01', '%Y-%m-%d'), 3), 'MIA201510012')
if __name__ == '__main__':
main()
| 41.928571
| 201
| 0.63323
| 1,286
| 9,979
| 4.646967
| 0.117418
| 0.235944
| 0.241633
| 0.213521
| 0.773762
| 0.702142
| 0.56158
| 0.414157
| 0.330321
| 0.260877
| 0
| 0.025283
| 0.203327
| 9,979
| 237
| 202
| 42.105485
| 0.726415
| 0.050406
| 0
| 0.028369
| 0
| 0.049645
| 0.249034
| 0.013136
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.134752
| false
| 0
| 0.028369
| 0
| 0.184397
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
714bf82c33e08332e2c73d56020a588503fa90f8
| 196
|
py
|
Python
|
src/pandas_profiling/report/presentation/flavours/qt/dataset.py
|
damirazo/pandas-profiling
|
e436694befc25463073652b4abddc9b9537a555d
|
[
"MIT"
] | 2
|
2020-01-30T15:01:18.000Z
|
2020-01-30T15:01:19.000Z
|
src/pandas_profiling/report/presentation/flavours/qt/dataset.py
|
damirazo/pandas-profiling
|
e436694befc25463073652b4abddc9b9537a555d
|
[
"MIT"
] | null | null | null |
src/pandas_profiling/report/presentation/flavours/qt/dataset.py
|
damirazo/pandas-profiling
|
e436694befc25463073652b4abddc9b9537a555d
|
[
"MIT"
] | null | null | null |
from PyQt5.QtWidgets import QPushButton
from pandas_profiling.report.presentation.core import Dataset
class QtDataset(Dataset):
def render(self):
return QPushButton("PyQt5 button")
| 21.777778
| 61
| 0.77551
| 23
| 196
| 6.565217
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012048
| 0.153061
| 196
| 8
| 62
| 24.5
| 0.89759
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 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
| 1
| 1
| 0
|
0
| 5
|
714dd67c627637f515695f7c53cbea3c635ffab5
| 792
|
py
|
Python
|
photonai_graph/GraphConstruction/__init__.py
|
wwu-mmll/photonai_graph
|
b758c7efa878ef4533ed4f66d6579019167bfa9e
|
[
"MIT"
] | null | null | null |
photonai_graph/GraphConstruction/__init__.py
|
wwu-mmll/photonai_graph
|
b758c7efa878ef4533ed4f66d6579019167bfa9e
|
[
"MIT"
] | 4
|
2022-03-30T20:09:02.000Z
|
2022-03-31T13:55:59.000Z
|
photonai_graph/GraphConstruction/__init__.py
|
wwu-mmll/photonai_graph
|
b758c7efa878ef4533ed4f66d6579019167bfa9e
|
[
"MIT"
] | null | null | null |
from photonai_graph.GraphConstruction.graph_constructor_percentage_window import GraphConstructorPercentageWindow
from photonai_graph.GraphConstruction.graph_constructor_random_walks import GraphConstructorRandomWalks
from photonai_graph.GraphConstruction.graph_constructor_percentage import GraphConstructorPercentage
from photonai_graph.GraphConstruction.graph_constructor import GraphConstructor
from photonai_graph.GraphConstruction.graph_constructor_knn import GraphConstructorKNN
from photonai_graph.GraphConstruction.graph_constructor_spatial import GraphConstructorSpatial
from photonai_graph.GraphConstruction.graph_constructor_threshold import GraphConstructorThreshold
from photonai_graph.GraphConstruction.graph_constructor_threshold_window import GraphConstructorThresholdWindow
| 88
| 113
| 0.939394
| 74
| 792
| 9.702703
| 0.283784
| 0.133705
| 0.189415
| 0.37883
| 0.610028
| 0.610028
| 0.331476
| 0
| 0
| 0
| 0
| 0
| 0.040404
| 792
| 8
| 114
| 99
| 0.944737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
715aa710b6233b2933c18fb5f8ff6c4183e26a9e
| 157
|
py
|
Python
|
Pilhas e Listas/04.py
|
HugoLeda/EstruturaDeDados
|
ed3b2489b7b1421ca8f8adf580aabaa967cf4a25
|
[
"MIT"
] | null | null | null |
Pilhas e Listas/04.py
|
HugoLeda/EstruturaDeDados
|
ed3b2489b7b1421ca8f8adf580aabaa967cf4a25
|
[
"MIT"
] | null | null | null |
Pilhas e Listas/04.py
|
HugoLeda/EstruturaDeDados
|
ed3b2489b7b1421ca8f8adf580aabaa967cf4a25
|
[
"MIT"
] | null | null | null |
# Implemente uma aplicação que utilize uma pilha para conversão de expressões da notação tradicional (infixa), para a notação polonesa reversa (pós-fixada).
| 78.5
| 156
| 0.808917
| 22
| 157
| 5.772727
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140127
| 157
| 1
| 157
| 157
| 0.940741
| 0.980892
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7195cf24c2ed1bb1d7a85df9a8a011883a1d25d6
| 137
|
py
|
Python
|
my_test.py
|
ericdrosado-teacher/without-replit
|
b333ad6f9cb5d28b39d98c1b017811ec25bf3fc0
|
[
"Apache-2.0"
] | null | null | null |
my_test.py
|
ericdrosado-teacher/without-replit
|
b333ad6f9cb5d28b39d98c1b017811ec25bf3fc0
|
[
"Apache-2.0"
] | 1
|
2020-04-16T00:23:49.000Z
|
2020-04-16T00:35:09.000Z
|
my_test.py
|
ericdrosado-teacher/without-replit
|
b333ad6f9cb5d28b39d98c1b017811ec25bf3fc0
|
[
"Apache-2.0"
] | null | null | null |
from my_code import double_it
def test_inc():
assert 8 == double_it(4)
assert 0 == double_it(0)
assert -2 == double_it(-1)
| 17.125
| 30
| 0.642336
| 24
| 137
| 3.416667
| 0.625
| 0.390244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 0.233577
| 137
| 7
| 31
| 19.571429
| 0.72381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.6
| 1
| 0.2
| true
| 0
| 0.2
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
71a26c94cc1d43737773bac7c82acd0be402dd7d
| 425
|
py
|
Python
|
forge/core/core_utils/maya_utils/attr.py
|
AndresMWeber/Forge
|
90b2958a2a40d37b52232091bea9c3ddbd88566b
|
[
"MIT"
] | 1
|
2021-08-17T02:36:06.000Z
|
2021-08-17T02:36:06.000Z
|
forge/core/core_utils/maya_utils/attr.py
|
AndresMWeber/Forge
|
90b2958a2a40d37b52232091bea9c3ddbd88566b
|
[
"MIT"
] | 1
|
2017-06-12T04:32:54.000Z
|
2017-06-12T04:32:54.000Z
|
forge/core/core_utils/maya_utils/attr.py
|
AndresMWeber/Forge
|
90b2958a2a40d37b52232091bea9c3ddbd88566b
|
[
"MIT"
] | 1
|
2017-06-12T05:47:21.000Z
|
2017-06-12T05:47:21.000Z
|
import maya.cmds as mc
def connect_attr(attr_source, attr_destination, **kwargs):
return mc.connectAttr(attr_source, attr_destination, **kwargs)
def set_attr(node_attr_dag, *args, **kwargs):
return mc.setAttr(node_attr_dag, *args, **kwargs)
def get_attr(node_attr_dag, *args, **kwargs):
return mc.getAttr(node_attr_dag, *args, **kwargs)
def add_attr(node, **kwargs):
return mc.addAttr(node, **kwargs)
| 23.611111
| 66
| 0.724706
| 63
| 425
| 4.634921
| 0.349206
| 0.164384
| 0.191781
| 0.205479
| 0.60274
| 0.390411
| 0.226027
| 0.226027
| 0
| 0
| 0
| 0
| 0.136471
| 425
| 17
| 67
| 25
| 0.79564
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0
| 0.111111
| 0.444444
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
71de88fc9f8de4a010b8fe1fb680c27194693e7e
| 301
|
py
|
Python
|
bitmovin_api_sdk/encoding/manifests/dash/periods/adaptationsets/contentprotection/__init__.py
|
jaythecaesarean/bitmovin-api-sdk-python
|
48166511fcb9082041c552ace55a9b66cc59b794
|
[
"MIT"
] | 11
|
2019-07-03T10:41:16.000Z
|
2022-02-25T21:48:06.000Z
|
bitmovin_api_sdk/encoding/manifests/dash/periods/adaptationsets/contentprotection/__init__.py
|
jaythecaesarean/bitmovin-api-sdk-python
|
48166511fcb9082041c552ace55a9b66cc59b794
|
[
"MIT"
] | 8
|
2019-11-23T00:01:25.000Z
|
2021-04-29T12:30:31.000Z
|
bitmovin_api_sdk/encoding/manifests/dash/periods/adaptationsets/contentprotection/__init__.py
|
jaythecaesarean/bitmovin-api-sdk-python
|
48166511fcb9082041c552ace55a9b66cc59b794
|
[
"MIT"
] | 13
|
2020-01-02T14:58:18.000Z
|
2022-03-26T12:10:30.000Z
|
from bitmovin_api_sdk.encoding.manifests.dash.periods.adaptationsets.contentprotection.contentprotection_api import ContentprotectionApi
from bitmovin_api_sdk.encoding.manifests.dash.periods.adaptationsets.contentprotection.content_protection_list_query_params import ContentProtectionListQueryParams
| 100.333333
| 163
| 0.92691
| 31
| 301
| 8.709677
| 0.580645
| 0.088889
| 0.111111
| 0.133333
| 0.57037
| 0.57037
| 0.57037
| 0.57037
| 0.57037
| 0.57037
| 0
| 0
| 0.026578
| 301
| 2
| 164
| 150.5
| 0.921502
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e0b9e52e077079a1e07c348402036bad39e7c4dd
| 73
|
py
|
Python
|
notebooks/preprocessing.py
|
erccarls/berkely_snowfall
|
9995d9833481cf61bda3cde9738cdfc4037edcb9
|
[
"MIT"
] | 3
|
2017-02-28T13:37:55.000Z
|
2020-04-20T12:23:57.000Z
|
notebooks/preprocessing.py
|
erccarls/berkely_snowfall
|
9995d9833481cf61bda3cde9738cdfc4037edcb9
|
[
"MIT"
] | null | null | null |
notebooks/preprocessing.py
|
erccarls/berkely_snowfall
|
9995d9833481cf61bda3cde9738cdfc4037edcb9
|
[
"MIT"
] | null | null | null |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
| 14.6
| 31
| 0.794521
| 13
| 73
| 4.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191781
| 73
| 4
| 32
| 18.25
| 0.983051
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4605fbc170c458911f7c6fb5554e3890f0e5647d
| 3,283
|
py
|
Python
|
code/python/Formula/v1/fds/sdk/Formula/__init__.py
|
factset/enterprise-sdk
|
3fd4d1360756c515c9737a0c9a992c7451d7de7e
|
[
"Apache-2.0"
] | 6
|
2022-02-07T16:34:18.000Z
|
2022-03-30T08:04:57.000Z
|
code/python/Formula/v1/fds/sdk/Formula/__init__.py
|
factset/enterprise-sdk
|
3fd4d1360756c515c9737a0c9a992c7451d7de7e
|
[
"Apache-2.0"
] | 2
|
2022-02-07T05:25:57.000Z
|
2022-03-07T14:18:04.000Z
|
code/python/Formula/v1/fds/sdk/Formula/__init__.py
|
factset/enterprise-sdk
|
3fd4d1360756c515c9737a0c9a992c7451d7de7e
|
[
"Apache-2.0"
] | null | null | null |
# flake8: noqa
"""
FactSet Formula API
**FactSet Formula API** FactSet’s Formula API is a modern, flexible, formula-based API that enables users to access FactSet’s wide range of financial data and content. The API offers two endpoints, one optimized for time-series analysis and one designed for cross-sectional analysis, providing users a simplified interface into FactSet’s expansive offering. By providing two endpoints, it allows for the optimization of user workflows, while reducing complexity. Leverage the power and flexibility of the Formula API to - * Pull data from across most content sets that a user has access to in a single request * Include business logic and mathematical operations in request * Submit a dynamic universe in both endpoints * Return the fsymId to easily combine with other FactSet content / products * Set the trading calendar * Define custom display names **Formula API Request Builder** The Formula API Request Builder provides users everything they need to form a Formula API request. In the Request Builder, you can select identifiers, build a universe expression, select FQL or Screening formulas, easily apply business logic and mathematical functions to the FQL or Screening formulas, specify optional parameters, and construct a GET or POST request. The Request Builder eliminates the need to have previous FQL and Screening knowledge and allows you to quickly find your desired data items and form the request. The Formula API Request Builder can be accessed by navigating to [https://developer.factset.com/formula-api-request-builder](https://developer.factset.com/formula-api-request-builder) and logging in using your FactSet.net ID. When using the Request Builder to construct requests for the one of the Formula API's endpoints, be sure to toggle to the correct endpoint at the top of the page. **How to Check the Health and Availability of the Formula API** Please use the below endpoint to check the health and availability of the Formula API. You must be authorized for this API to use the Health endpoint. [https://api.factset.com/formula-api/health](https://api.factset.com/formula-api/health) **How to Programmatically Download API Specification File** Please use the below endpoint to download the FactSet Formula API Specification File in .yaml. You must be authorized for this API to extract. This specification can then be used for Codegen to create your own SDKs. You can also download the spec using the \"Download Spec\" button to the right of the version number. [https://api.factset.com/formula-api/v1/spec](https://api.factset.com/formula-api/v1/spec) # noqa: E501
The version of the OpenAPI document: 1.2.0
Generated by: https://openapi-generator.tech
"""
__version__ = "0.20.0"
# import ApiClient
from fds.sdk.Formula.api_client import ApiClient
# import Configuration
from fds.sdk.Formula.configuration import Configuration
# import exceptions
from fds.sdk.Formula.exceptions import OpenApiException
from fds.sdk.Formula.exceptions import ApiAttributeError
from fds.sdk.Formula.exceptions import ApiTypeError
from fds.sdk.Formula.exceptions import ApiValueError
from fds.sdk.Formula.exceptions import ApiKeyError
from fds.sdk.Formula.exceptions import ApiException
| 117.25
| 2,620
| 0.797137
| 504
| 3,283
| 5.18254
| 0.376984
| 0.072741
| 0.030628
| 0.052067
| 0.264165
| 0.243492
| 0.147779
| 0.121746
| 0.035222
| 0.035222
| 0
| 0.00465
| 0.14834
| 3,283
| 27
| 2,621
| 121.592593
| 0.929542
| 0.851051
| 0
| 0
| 0
| 0
| 0.013043
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.888889
| 0
| 0.888889
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1cb15f4f8bd7f7e450efb8f29cf076d38db45264
| 115
|
py
|
Python
|
UVTextureConverter/__init__.py
|
shiba6v/UVTextureConverter
|
6a0db3829d8df21960ccfd8823ddd3b835102f5a
|
[
"MIT"
] | 115
|
2019-10-18T02:17:26.000Z
|
2022-03-24T06:24:34.000Z
|
UVTextureConverter/__init__.py
|
shiba6v/UVTextureConverter
|
6a0db3829d8df21960ccfd8823ddd3b835102f5a
|
[
"MIT"
] | 20
|
2020-01-17T07:06:00.000Z
|
2021-12-20T11:24:08.000Z
|
UVTextureConverter/__init__.py
|
shiba6v/UVTextureConverter
|
6a0db3829d8df21960ccfd8823ddd3b835102f5a
|
[
"MIT"
] | 17
|
2020-01-16T12:07:52.000Z
|
2022-02-23T03:24:07.000Z
|
from .Atlas2Normal import Atlas2Normal
from .Normal2Atlas import Normal2Atlas
from .UVConverter import UVConverter
| 28.75
| 38
| 0.869565
| 12
| 115
| 8.333333
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038835
| 0.104348
| 115
| 3
| 39
| 38.333333
| 0.932039
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1cb268da681613a07fc278be916e91c747a3a836
| 1,194
|
py
|
Python
|
PuzzleGenerator/Puzzle6.py
|
Pelikens/SymmetryGroupPuzzle
|
972309a70a29f4c2c244b68b4df8032e4dd7a99d
|
[
"MIT"
] | null | null | null |
PuzzleGenerator/Puzzle6.py
|
Pelikens/SymmetryGroupPuzzle
|
972309a70a29f4c2c244b68b4df8032e4dd7a99d
|
[
"MIT"
] | 11
|
2018-07-02T16:49:26.000Z
|
2018-07-31T17:44:13.000Z
|
PuzzleGenerator/Puzzle6.py
|
Pelikens/SymmetryGroupPuzzle
|
972309a70a29f4c2c244b68b4df8032e4dd7a99d
|
[
"MIT"
] | 1
|
2018-07-21T14:06:08.000Z
|
2018-07-21T14:06:08.000Z
|
# Puzzle6.py
import math
from Puzzle import Puzzle, CutRegion
from math2d_affine_transform import AffineTransform
from math2d_vector import Vector
from math2d_polygon import Polygon
class Puzzle6(Puzzle):
def __init__(self):
super().__init__()
cut_region = CutRegion()
cut_region.GenerateRegularPolygon(4, 7.0 * math.sqrt(2.0))
hole = Polygon()
hole.MakeRegularPolygon(4, 5.0 * math.sqrt(2.0))
cut_region.region.sub_region_list[0].hole_list.append(hole)
transform = AffineTransform()
transform.RigidBodyMotion(math.pi / 4.0, Vector(3.0, 3.0))
cut_region.Transform(transform)
self.cut_region_list.append(cut_region)
cut_region = CutRegion()
cut_region.GenerateRegularPolygon(4, 7.0 * math.sqrt(2.0))
hole = Polygon()
hole.MakeRegularPolygon(4, 5.0 * math.sqrt(2.0))
cut_region.region.sub_region_list[0].hole_list.append(hole)
transform = AffineTransform()
transform.RigidBodyMotion(math.pi / 4.0, Vector(-3.0, -3.0))
cut_region.Transform(transform)
self.cut_region_list.append(cut_region)
def Name(self):
return 'Puzzle6'
| 34.114286
| 68
| 0.676717
| 156
| 1,194
| 4.974359
| 0.237179
| 0.139175
| 0.046392
| 0.051546
| 0.721649
| 0.721649
| 0.721649
| 0.721649
| 0.721649
| 0.721649
| 0
| 0.042508
| 0.211893
| 1,194
| 35
| 69
| 34.114286
| 0.782147
| 0.008375
| 0
| 0.571429
| 0
| 0
| 0.005917
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| false
| 0
| 0.178571
| 0.035714
| 0.321429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e82d6deaa69c4087ea8cdb50042659c57152bcb0
| 480
|
py
|
Python
|
resource.py
|
zhanganyuan/ReCalendar
|
eb7583cd53606156006b641a18ad78a898f5316d
|
[
"MIT"
] | null | null | null |
resource.py
|
zhanganyuan/ReCalendar
|
eb7583cd53606156006b641a18ad78a898f5316d
|
[
"MIT"
] | null | null | null |
resource.py
|
zhanganyuan/ReCalendar
|
eb7583cd53606156006b641a18ad78a898f5316d
|
[
"MIT"
] | null | null | null |
class Resource:
# 各种需要用到的页面
img_url = "http://210.42.121.241/servlet/GenImg" # 获取验证码的页面
login_url = "http://210.42.121.241/servlet/Login" # 登录页面
index_url = "http://210.42.121.241/stu/stu_index.jsp" # 登录之后的主页面,在这里获取令牌
gpa_url = "http://210.42.121.241/stu/stu_score_credit_statics.jsp" # 带日历的总分和成绩
lessons_url = "http://210.42.121.241/servlet/Svlt_QueryStuLsn?{}" # 课程的页面
scores_url = "http://210.42.121.241/servlet/Svlt_QueryStuScore?{}" # 成绩的页面
| 53.333333
| 83
| 0.685417
| 72
| 480
| 4.402778
| 0.444444
| 0.132492
| 0.189274
| 0.227129
| 0.492114
| 0.492114
| 0.492114
| 0.334385
| 0
| 0
| 0
| 0.160194
| 0.141667
| 480
| 8
| 84
| 60
| 0.609223
| 0.129167
| 0
| 0
| 0
| 0
| 0.643902
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
1c267fa7c1b3bd880e9c6f7bb01018cf88df7c17
| 264
|
py
|
Python
|
Leetcode/0705. Design HashSet/0705.py
|
Next-Gen-UI/Code-Dynamics
|
a9b9d5e3f27e870b3e030c75a1060d88292de01c
|
[
"MIT"
] | null | null | null |
Leetcode/0705. Design HashSet/0705.py
|
Next-Gen-UI/Code-Dynamics
|
a9b9d5e3f27e870b3e030c75a1060d88292de01c
|
[
"MIT"
] | null | null | null |
Leetcode/0705. Design HashSet/0705.py
|
Next-Gen-UI/Code-Dynamics
|
a9b9d5e3f27e870b3e030c75a1060d88292de01c
|
[
"MIT"
] | null | null | null |
class MyHashSet:
def __init__(self):
self.set = [False] * 1000001
def add(self, key: int) -> None:
self.set[key] = True
def remove(self, key: int) -> None:
self.set[key] = False
def contains(self, key: int) -> bool:
return self.set[key]
| 20.307692
| 39
| 0.609848
| 39
| 264
| 4.025641
| 0.435897
| 0.178344
| 0.191083
| 0.178344
| 0.305732
| 0.305732
| 0.305732
| 0
| 0
| 0
| 0
| 0.034653
| 0.234848
| 264
| 12
| 40
| 22
| 0.742574
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0
| 0
| 0.111111
| 0.666667
| 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
| 1
| 0
|
0
| 5
|
1c6aba9420cafa71fe4098a7e3538932fc8f6871
| 76
|
py
|
Python
|
app/schemas/source_site.py
|
ParvezMullah/product_details
|
0aabb12e1062fe9911f05915a50dd5a9b75f21e5
|
[
"Apache-1.1"
] | null | null | null |
app/schemas/source_site.py
|
ParvezMullah/product_details
|
0aabb12e1062fe9911f05915a50dd5a9b75f21e5
|
[
"Apache-1.1"
] | null | null | null |
app/schemas/source_site.py
|
ParvezMullah/product_details
|
0aabb12e1062fe9911f05915a50dd5a9b75f21e5
|
[
"Apache-1.1"
] | null | null | null |
from pydantic import BaseModel
class SourceSite(BaseModel):
url : str
| 12.666667
| 30
| 0.75
| 9
| 76
| 6.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197368
| 76
| 5
| 31
| 15.2
| 0.934426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1c71f7483d1e0d38ccf0b2717ff824f2136bf44e
| 147
|
py
|
Python
|
rubicon/intake_rubicon/__init__.py
|
jeklein/rubicon-ml
|
a4a3c4d3504cb251597890dbfa8302b0bde06f30
|
[
"Apache-2.0"
] | 42
|
2021-02-23T23:30:49.000Z
|
2021-05-01T02:54:03.000Z
|
rubicon/intake_rubicon/__init__.py
|
jeklein/rubicon-ml
|
a4a3c4d3504cb251597890dbfa8302b0bde06f30
|
[
"Apache-2.0"
] | 56
|
2021-05-13T13:47:50.000Z
|
2022-03-24T13:46:49.000Z
|
rubicon/intake_rubicon/__init__.py
|
jeklein/rubicon-ml
|
a4a3c4d3504cb251597890dbfa8302b0bde06f30
|
[
"Apache-2.0"
] | 9
|
2021-02-23T23:30:51.000Z
|
2021-04-24T16:42:28.000Z
|
import intake # noqa F401
from rubicon_ml.intake_rubicon import ExperimentSource, ProjectSource
__all__ = ["ExperimentSource", "ProjectSource"]
| 24.5
| 69
| 0.809524
| 15
| 147
| 7.533333
| 0.666667
| 0.513274
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023077
| 0.115646
| 147
| 5
| 70
| 29.4
| 0.846154
| 0.061224
| 0
| 0
| 0
| 0
| 0.213235
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
98c037ee699c4f42f6d79b150c56ec416cdfc457
| 350
|
py
|
Python
|
katas/kyu_7/the_most_amicable_of_numbers.py
|
the-zebulan/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 40
|
2016-03-09T12:26:20.000Z
|
2022-03-23T08:44:51.000Z
|
katas/kyu_7/the_most_amicable_of_numbers.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | null | null | null |
katas/kyu_7/the_most_amicable_of_numbers.py
|
akalynych/CodeWars
|
1eafd1247d60955a5dfb63e4882e8ce86019f43a
|
[
"MIT"
] | 36
|
2016-11-07T19:59:58.000Z
|
2022-03-31T11:18:27.000Z
|
def proper_divisors_sum(n):
return sum(a for a in xrange(1, n) if not n % a)
def amicable_numbers(a, b):
return proper_divisors_sum(a) == b and proper_divisors_sum(b) == a
# def amicable_numbers(a, b):
# # this works after multiple submissions to get lucky on random inputs
# return sum(c for c in xrange(1, a) if not a % c) == b
| 29.166667
| 75
| 0.674286
| 65
| 350
| 3.507692
| 0.446154
| 0.184211
| 0.223684
| 0.166667
| 0.184211
| 0.184211
| 0
| 0
| 0
| 0
| 0
| 0.007326
| 0.22
| 350
| 11
| 76
| 31.818182
| 0.827839
| 0.451429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
98d2027687a21922b1093a864b9cbe0234f95afe
| 40,178
|
py
|
Python
|
tests/providers/github/test_provider.py
|
birdbrained/waterbutler
|
60a6eb7f2dfce88b7a00457034c01b20da0aef23
|
[
"Apache-2.0"
] | null | null | null |
tests/providers/github/test_provider.py
|
birdbrained/waterbutler
|
60a6eb7f2dfce88b7a00457034c01b20da0aef23
|
[
"Apache-2.0"
] | null | null | null |
tests/providers/github/test_provider.py
|
birdbrained/waterbutler
|
60a6eb7f2dfce88b7a00457034c01b20da0aef23
|
[
"Apache-2.0"
] | null | null | null |
import pytest
import io
import os
import json
import base64
import hashlib
from http import client
import aiohttpretty
from waterbutler.core import streams
from waterbutler.core import exceptions
from waterbutler.core.path import WaterButlerPath
from waterbutler.core.provider import build_url
from waterbutler.providers.github import GitHubProvider
from waterbutler.providers.github import settings as github_settings
from waterbutler.providers.github.provider import GitHubPath
from waterbutler.providers.github.metadata import GitHubRevision
from waterbutler.providers.github.metadata import GitHubFileTreeMetadata
from waterbutler.providers.github.metadata import GitHubFolderTreeMetadata
from waterbutler.providers.github.metadata import GitHubFileContentMetadata
from waterbutler.providers.github.metadata import GitHubFolderContentMetadata
@pytest.fixture
def auth():
return {
'name': 'cat',
'email': 'cat@cat.com',
}
@pytest.fixture
def credentials():
return {'token': 'naps'}
@pytest.fixture
def settings():
return {
'owner': 'cat',
'repo': 'food',
}
@pytest.fixture
def file_content():
return b'hungry'
@pytest.fixture
def file_like(file_content):
return io.BytesIO(file_content)
@pytest.fixture
def file_stream(file_like):
return streams.FileStreamReader(file_like)
@pytest.fixture
def upload_response():
return {
"content": {
"name": "hello.txt",
"path": "notes/hello.txt",
"sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"size": 9,
"url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt",
"git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt"
}
},
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"committer": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
@pytest.fixture
def create_folder_response():
return {
"content": {
"name": ".gitkeep",
"path": "i/like/trains/.gitkeep",
"sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"size": 9,
"url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt",
"git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt"
}
},
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"committer": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
@pytest.fixture
def repo_metadata():
return {
'full_name': 'octocat/Hello-World',
'permissions': {
'push': False,
'admin': False,
'pull': True
},
'has_downloads': True,
'notifications_url': 'https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}',
'releases_url': 'https://api.github.com/repos/octocat/Hello-World/releases{/id}',
'downloads_url': 'https://api.github.com/repos/octocat/Hello-World/downloads',
'merges_url': 'https://api.github.com/repos/octocat/Hello-World/merges',
'owner': {
'avatar_url': 'https://avatars.githubusercontent.com/u/583231?v=3',
'organizations_url': 'https://api.github.com/users/octocat/orgs',
'type': 'User',
'starred_url': 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
'url': 'https://api.github.com/users/octocat',
'html_url': 'https://github.com/octocat',
'received_events_url': 'https://api.github.com/users/octocat/received_events',
'subscriptions_url': 'https://api.github.com/users/octocat/subscriptions',
'site_admin': False,
'gravatar_id': '',
'repos_url': 'https://api.github.com/users/octocat/repos',
'gists_url': 'https://api.github.com/users/octocat/gists{/gist_id}',
'id': 583231,
'events_url': 'https://api.github.com/users/octocat/events{/privacy}',
'login': 'octocat',
'following_url': 'https://api.github.com/users/octocat/following{/other_user}',
'followers_url': 'https://api.github.com/users/octocat/followers'
},
'html_url': 'https://github.com/octocat/Hello-World',
'comments_url': 'https://api.github.com/repos/octocat/Hello-World/comments{/number}',
'git_url': 'git://github.com/octocat/Hello-World.git',
'ssh_url': 'git@github.com:octocat/Hello-World.git',
'language': None,
'pulls_url': 'https://api.github.com/repos/octocat/Hello-World/pulls{/number}',
'subscribers_count': 1850,
'forks_count': 1085,
'watchers_count': 1407,
'id': 1296269,
'keys_url': 'https://api.github.com/repos/octocat/Hello-World/keys{/key_id}',
'default_branch': 'master',
'stargazers_count': 1407,
'tags_url': 'https://api.github.com/repos/octocat/Hello-World/tags',
'clone_url': 'https://github.com/octocat/Hello-World.git',
'homepage': '',
'forks_url': 'https://api.github.com/repos/octocat/Hello-World/forks',
'branches_url': 'https://api.github.com/repos/octocat/Hello-World/branches{/branch}',
'url': 'https://api.github.com/repos/octocat/Hello-World',
'contents_url': 'https://api.github.com/repos/octocat/Hello-World/contents/{+path}',
'hooks_url': 'https://api.github.com/repos/octocat/Hello-World/hooks',
'git_tags_url': 'https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}',
'statuses_url': 'https://api.github.com/repos/octocat/Hello-World/statuses/{sha}',
'trees_url': 'https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}',
'contributors_url': 'https://api.github.com/repos/octocat/Hello-World/contributors',
'open_issues': 126,
'has_pages': False,
'pushed_at': '2014-06-11T21:51:23Z',
'network_count': 1085,
'commits_url': 'https://api.github.com/repos/octocat/Hello-World/commits{/sha}',
'git_commits_url': 'https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}',
'svn_url': 'https://github.com/octocat/Hello-World',
'forks': 1085,
'fork': False,
'subscription_url': 'https://api.github.com/repos/octocat/Hello-World/subscription',
'archive_url': 'https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}',
'subscribers_url': 'https://api.github.com/repos/octocat/Hello-World/subscribers',
'description': 'This your first repo!',
'blobs_url': 'https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}',
'teams_url': 'https://api.github.com/repos/octocat/Hello-World/teams',
'compare_url': 'https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}',
'issues_url': 'https://api.github.com/repos/octocat/Hello-World/issues{/number}',
'stargazers_url': 'https://api.github.com/repos/octocat/Hello-World/stargazers',
'private': False,
'created_at': '2011-01-26T19:01:12Z',
'issue_comment_url': 'https://api.github.com/repos/octocat/Hello-World/issues/comments/{number}',
'has_issues': True,
'milestones_url': 'https://api.github.com/repos/octocat/Hello-World/milestones{/number}',
'issue_events_url': 'https://api.github.com/repos/octocat/Hello-World/issues/events{/number}',
'languages_url': 'https://api.github.com/repos/octocat/Hello-World/languages',
'name': 'Hello-World',
'mirror_url': None,
'has_wiki': True,
'updated_at': '2014-12-12T16:45:49Z',
'watchers': 1407,
'open_issues_count': 126,
'labels_url': 'https://api.github.com/repos/octocat/Hello-World/labels{/name}',
'collaborators_url': 'https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}',
'assignees_url': 'https://api.github.com/repos/octocat/Hello-World/assignees{/user}',
'size': 558,
'git_refs_url': 'https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}',
'events_url': 'https://api.github.com/repos/octocat/Hello-World/events'
}
@pytest.fixture
def branch_metadata():
return {
'commit': {
'html_url': 'https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d',
'url': 'https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d',
'committer': {
'html_url': 'https://github.com/octocat',
'login': 'octocat',
'type': 'User',
'gravatar_id': '',
'avatar_url': 'https://avatars.githubusercontent.com/u/583231?v=3',
'received_events_url': 'https://api.github.com/users/octocat/received_events',
'id': 583231,
'starred_url': 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
'subscriptions_url': 'https://api.github.com/users/octocat/subscriptions',
'organizations_url': 'https://api.github.com/users/octocat/orgs',
'url': 'https://api.github.com/users/octocat',
'following_url': 'https://api.github.com/users/octocat/following{/other_user}',
'followers_url': 'https://api.github.com/users/octocat/followers',
'repos_url': 'https://api.github.com/users/octocat/repos',
'events_url': 'https://api.github.com/users/octocat/events{/privacy}',
'gists_url': 'https://api.github.com/users/octocat/gists{/gist_id}',
'site_admin': False
},
'parents': [{
'html_url': 'https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e',
'url': 'https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e',
'sha': '553c2077f0edc3d5dc5d17262f6aa498e69d6f8e'
}, {
'html_url': 'https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303',
'url': 'https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303',
'sha': '762941318ee16e59dabbacb1b4049eec22f0d303'
}],
'sha': '7fd1a60b01f91b314f59955a4e4d4e80d8edf11d',
'author': {
'html_url': 'https://github.com/octocat',
'login': 'octocat',
'type': 'User',
'gravatar_id': '',
'avatar_url': 'https://avatars.githubusercontent.com/u/583231?v=3',
'received_events_url': 'https://api.github.com/users/octocat/received_events',
'id': 583231,
'starred_url': 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
'subscriptions_url': 'https://api.github.com/users/octocat/subscriptions',
'organizations_url': 'https://api.github.com/users/octocat/orgs',
'url': 'https://api.github.com/users/octocat',
'following_url': 'https://api.github.com/users/octocat/following{/other_user}',
'followers_url': 'https://api.github.com/users/octocat/followers',
'repos_url': 'https://api.github.com/users/octocat/repos',
'events_url': 'https://api.github.com/users/octocat/events{/privacy}',
'gists_url': 'https://api.github.com/users/octocat/gists{/gist_id}',
'site_admin': False
},
'comments_url': 'https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments',
'commit': {
'url': 'https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d',
'message': 'Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.',
'committer': {
'email': 'octocat@nowhere.com',
'date': '2012-03-06T23:06:50Z',
'name': 'The Octocat'
},
'tree': {
'url': 'https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608',
'sha': 'b4eecafa9be2f2006ce1b709d6857b07069b4608'
},
'comment_count': 51,
'author': {
'email': 'octocat@nowhere.com',
'date': '2012-03-06T23:06:50Z',
'name': 'The Octocat'
}
}
},
'_links': {
'html': 'https://github.com/octocat/Hello-World/tree/master',
'self': 'https://api.github.com/repos/octocat/Hello-World/branches/master'
},
'name': 'master'
}
@pytest.fixture
def content_repo_metadata_root():
return [
{
'path': 'file.txt',
'type': 'file',
'html_url': 'https://github.com/icereval/test/blob/master/file.txt',
'git_url': 'https://api.github.com/repos/icereval/test/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'url': 'https://api.github.com/repos/icereval/test/contents/file.txt?ref=master',
'sha': 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'_links': {
'git': 'https://api.github.com/repos/icereval/test/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'self': 'https://api.github.com/repos/icereval/test/contents/file.txt?ref=master',
'html': 'https://github.com/icereval/test/blob/master/file.txt'
},
'name': 'file.txt',
'size': 0,
'download_url': 'https://raw.githubusercontent.com/icereval/test/master/file.txt'
}, {
'path': 'level1',
'type': 'dir',
'html_url': 'https://github.com/icereval/test/tree/master/level1',
'git_url': 'https://api.github.com/repos/icereval/test/git/trees/bc1087ebfe8354a684bf9f8b75517784143dde86',
'url': 'https://api.github.com/repos/icereval/test/contents/level1?ref=master',
'sha': 'bc1087ebfe8354a684bf9f8b75517784143dde86',
'_links': {
'git': 'https://api.github.com/repos/icereval/test/git/trees/bc1087ebfe8354a684bf9f8b75517784143dde86',
'self': 'https://api.github.com/repos/icereval/test/contents/level1?ref=master',
'html': 'https://github.com/icereval/test/tree/master/level1'
},
'name': 'level1',
'size': 0,
'download_url': None
}, {
'path': 'test.rst',
'type': 'file',
'html_url': 'https://github.com/icereval/test/blob/master/test.rst',
'git_url': 'https://api.github.com/repos/icereval/test/git/blobs/ca39bcbf849231525ce9e775935fcb18ed477b5a',
'url': 'https://api.github.com/repos/icereval/test/contents/test.rst?ref=master',
'sha': 'ca39bcbf849231525ce9e775935fcb18ed477b5a',
'_links': {
'git': 'https://api.github.com/repos/icereval/test/git/blobs/ca39bcbf849231525ce9e775935fcb18ed477b5a',
'self': 'https://api.github.com/repos/icereval/test/contents/test.rst?ref=master',
'html': 'https://github.com/icereval/test/blob/master/test.rst'
},
'name': 'test.rst',
'size': 190,
'download_url': 'https://raw.githubusercontent.com/icereval/test/master/test.rst'
}
]
@pytest.fixture
def repo_tree_metadata_root():
return {
'tree': [
{
'url': 'https://api.github.com/repos/icereval/test/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'size': 0,
'type': 'blob',
'path': 'file.txt',
'mode': '100644',
'sha': 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'
},
{
'type': 'tree',
'url': 'https://api.github.com/repos/icereval/test/git/trees/05353097666f449344b7f69036c70a52dc504088',
'path': 'level1',
'mode': '040000',
'sha': '05353097666f449344b7f69036c70a52dc504088'
},
{
'url': 'https://api.github.com/repos/icereval/test/git/blobs/ca39bcbf849231525ce9e775935fcb18ed477b5a',
'size': 190,
'type': 'blob',
'path': 'test.rst',
'mode': '100644',
'sha': 'ca39bcbf849231525ce9e775935fcb18ed477b5a'
}
],
'url': 'https://api.github.com/repos/icereval/test/git/trees/cd83e4a08261a54f1c4630fbb1de34d1e48f0c8a',
'truncated': False,
'sha': 'cd83e4a08261a54f1c4630fbb1de34d1e48f0c8a'
}
@pytest.fixture
def content_repo_metadata_root_file_txt():
return {
'_links': {
'git': 'https://api.github.com/repos/icereval/test/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'self': 'https://api.github.com/repos/icereval/test/contents/file.txt?ref=master',
'html': 'https://github.com/icereval/test/blob/master/file.txt'
},
'content': '',
'url': 'https://api.github.com/repos/icereval/test/contents/file.txt?ref=master',
'html_url': 'https://github.com/icereval/test/blob/master/file.txt',
'download_url': 'https://raw.githubusercontent.com/icereval/test/master/file.txt',
'name': 'file.txt',
'type': 'file',
'sha': 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'encoding': 'base64',
'git_url': 'https://api.github.com/repos/icereval/test/git/blobs/e69de29bb2d1d6434b8b29ae775ad8c2e48c5391',
'path': 'file.txt',
'size': 0
}
@pytest.fixture
def provider(auth, credentials, settings, repo_metadata):
provider = GitHubProvider(auth, credentials, settings)
provider._repo = repo_metadata
provider.default_branch = repo_metadata['default_branch']
return provider
class TestHelpers:
async def test_build_repo_url(self, provider, settings):
expected = provider.build_url('repos', settings['owner'], settings['repo'], 'contents')
assert provider.build_repo_url('contents') == expected
async def test_committer(self, auth, provider):
expected = {
'name': auth['name'],
'email': auth['email'],
}
assert provider.committer == expected
class TestValidatePath:
def test_child_gets_branch(self):
parent = GitHubPath('/', _ids=[('master', None)], folder=True)
child_file = parent.child('childfile', folder=False)
assert child_file.identifier[0] == 'master'
child_folder = parent.child('childfolder', folder=True)
assert child_folder.identifier[0] == 'master'
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_validate_v1_path_file(self, provider, branch_metadata, repo_tree_metadata_root):
branch_url = provider.build_repo_url('branches', provider.default_branch)
tree_url = provider.build_repo_url('git', 'trees',
branch_metadata['commit']['commit']['tree']['sha'],
recursive=1)
aiohttpretty.register_json_uri('GET', branch_url, body=branch_metadata)
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
blob_path = 'file.txt'
try:
wb_path_v1 = await provider.validate_v1_path('/' + blob_path)
except Exception as exc:
pytest.fail(str(exc))
with pytest.raises(exceptions.NotFoundError) as exc:
await provider.validate_v1_path('/' + blob_path + '/')
assert exc.value.code == client.NOT_FOUND
wb_path_v0 = await provider.validate_path('/' + blob_path)
assert wb_path_v1 == wb_path_v0
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_validate_v1_path_folder(self, provider, branch_metadata, repo_tree_metadata_root):
branch_url = provider.build_repo_url('branches', provider.default_branch)
tree_url = provider.build_repo_url('git', 'trees',
branch_metadata['commit']['commit']['tree']['sha'],
recursive=1)
aiohttpretty.register_json_uri('GET', branch_url, body=branch_metadata)
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
tree_path = 'level1'
try:
wb_path_v1 = await provider.validate_v1_path('/' + tree_path + '/')
except Exception as exc:
pytest.fail(str(exc))
with pytest.raises(exceptions.NotFoundError) as exc:
await provider.validate_v1_path('/' + tree_path)
assert exc.value.code == client.NOT_FOUND
wb_path_v0 = await provider.validate_path('/' + tree_path + '/')
assert wb_path_v1 == wb_path_v0
@pytest.mark.asyncio
async def test_validate_path(self, provider):
path = await provider.validate_path('/this/is/my/path')
assert path.is_dir is False
assert path.is_file is True
assert path.name == 'path'
assert isinstance(path.identifier, tuple)
assert path.identifier == (provider.default_branch, None)
assert path.parts[0].identifier == (provider.default_branch, None)
@pytest.mark.asyncio
async def test_validate_path_passes_branch(self, provider):
path = await provider.validate_path('/this/is/my/path', branch='NotMaster')
assert path.is_dir is False
assert path.is_file is True
assert path.name == 'path'
assert isinstance(path.identifier, tuple)
assert path.identifier == ('NotMaster', None)
assert path.parts[0].identifier == ('NotMaster', None)
@pytest.mark.asyncio
async def test_validate_path_passes_ref(self, provider):
path = await provider.validate_path('/this/is/my/path', ref='NotMaster')
assert path.is_dir is False
assert path.is_file is True
assert path.name == 'path'
assert isinstance(path.identifier, tuple)
assert path.identifier == ('NotMaster', None)
assert path.parts[0].identifier == ('NotMaster', None)
@pytest.mark.asyncio
async def test_validate_path_passes_file_sha(self, provider):
path = await provider.validate_path('/this/is/my/path', fileSha='Thisisasha')
assert path.is_dir is False
assert path.is_file is True
assert path.name == 'path'
assert isinstance(path.identifier, tuple)
assert path.identifier == (provider.default_branch, 'Thisisasha')
assert path.parts[0].identifier == (provider.default_branch, None)
class TestCRUD:
# @pytest.mark.asyncio
# @pytest.mark.aiohttpretty
# async def test_download_by_file_sha(self, provider, content_repo_metadata_root_file_txt):
# ref = hashlib.sha1().hexdigest()
# url = provider.build_repo_url('git', 'refs', 'heads', 'master')
# path = WaterButlerPath('/file.txt', _ids=(None, ('master', ref)))
# aiohttpretty.register_uri('GET', url, body=b'delicious')
# aiohttpretty.register_json_uri('GET', url, body={'object': {'sha': ref}})
# result = await provider.download(path)
# content = await result.read()
# assert content == b'delicious'
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_download_by_path(self, provider, repo_tree_metadata_root):
ref = hashlib.sha1().hexdigest()
file_sha = repo_tree_metadata_root['tree'][0]['sha']
path = await provider.validate_path('/file.txt')
url = provider.build_repo_url('git', 'blobs', file_sha)
tree_url = provider.build_repo_url('git', 'trees', ref, recursive=1)
latest_sha_url = provider.build_repo_url('git', 'refs', 'heads', path.identifier[0])
commit_url = provider.build_repo_url('commits', path=path.path.lstrip('/'), sha=path.identifier[0])
aiohttpretty.register_uri('GET', url, body=b'delicious')
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
aiohttpretty.register_json_uri('GET', commit_url, body=[{'commit': {'tree': {'sha': ref}}}])
result = await provider.download(path)
content = await result.read()
assert content == b'delicious'
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_download_by_path_ref_branch(self, provider, repo_tree_metadata_root):
ref = hashlib.sha1().hexdigest()
file_sha = repo_tree_metadata_root['tree'][0]['sha']
path = await provider.validate_path('/file.txt', branch='other_branch')
url = provider.build_repo_url('git', 'blobs', file_sha)
tree_url = provider.build_repo_url('git', 'trees', ref, recursive=1)
commit_url = provider.build_repo_url('commits', path=path.path.lstrip('/'), sha=path.identifier[0])
aiohttpretty.register_uri('GET', url, body=b'delicious')
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
aiohttpretty.register_json_uri('GET', commit_url, body=[{'commit': {'tree': {'sha': ref}}}])
result = await provider.download(path)
content = await result.read()
assert content == b'delicious'
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_download_by_path_revision(self, provider, repo_tree_metadata_root):
ref = hashlib.sha1().hexdigest()
file_sha = repo_tree_metadata_root['tree'][0]['sha']
path = await provider.validate_path('/file.txt', branch='other_branch')
url = provider.build_repo_url('git', 'blobs', file_sha)
tree_url = provider.build_repo_url('git', 'trees', ref, recursive=1)
commit_url = provider.build_repo_url('commits', path=path.path.lstrip('/'), sha='Just a test')
aiohttpretty.register_uri('GET', url, body=b'delicious')
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
aiohttpretty.register_json_uri('GET', commit_url, body=[{'commit': {'tree': {'sha': ref}}}])
result = await provider.download(path, revision='Just a test')
content = await result.read()
assert content == b'delicious'
# @pytest.mark.asyncio
# @pytest.mark.aiohttpretty
# async def test_download_bad_status(self, provider):
# ref = hashlib.sha1().hexdigest()
# url = provider.build_repo_url('git', 'blobs', ref)
# aiohttpretty.register_uri('GET', url, body=b'delicious', status=418)
# with pytest.raises(exceptions.DownloadError):
# await provider.download('', fileSha=ref)
# @pytest.mark.asyncio
# @pytest.mark.aiohttpretty
# async def test_upload_create(self, provider, upload_response, file_content, file_stream):
# message = 'so hungry'
# path = upload_response['content']['path'][::-1]
# metadata_url = provider.build_repo_url('contents', os.path.dirname(path))
# aiohttpretty.register_json_uri('GET', metadata_url, body=[upload_response['content']], status=200)
# upload_url = provider.build_repo_url('contents', path)
# aiohttpretty.register_json_uri('PUT', upload_url, body=upload_response, status=201)
# await provider.upload(file_stream, path, message)
# expected_data = {
# 'path': path,
# 'message': message,
# 'content': base64.b64encode(file_content).decode('utf-8'),
# 'committer': provider.committer,
# }
# assert aiohttpretty.has_call(method='GET', uri=metadata_url)
# assert aiohttpretty.has_call(method='PUT', uri=upload_url, data=json.dumps(expected_data))
#
# @pytest.mark.asyncio
# @pytest.mark.aiohttpretty
# async def test_upload_update(self, provider, upload_response, file_content, file_stream):
# message = 'so hungry'
# sha = upload_response['content']['sha']
# path = '/' + upload_response['content']['path']
#
# upload_url = provider.build_repo_url('contents', provider.build_path(path))
# metadata_url = provider.build_repo_url('contents', os.path.dirname(path))
#
# aiohttpretty.register_json_uri('PUT', upload_url, body=upload_response)
# aiohttpretty.register_json_uri('GET', metadata_url, body=[upload_response['content']])
#
# await provider.upload(file_stream, path, message)
#
# expected_data = {
# 'path': path,
# 'message': message,
# 'content': base64.b64encode(file_content).decode('utf-8'),
# 'committer': provider.committer,
# 'sha': sha,
# }
#
# assert aiohttpretty.has_call(method='GET', uri=metadata_url)
# assert aiohttpretty.has_call(method='PUT', uri=upload_url, data=json.dumps(expected_data))
# @pytest.mark.asyncio
# @pytest.mark.aiohttpretty
# async def test_delete_with_branch(self, provider, repo_contents):
# path = os.path.join('/', repo_contents[0]['path'])
# sha = repo_contents[0]['sha']
# branch = 'master'
# message = 'deleted'
# url = provider.build_repo_url('contents', path)
# aiohttpretty.register_json_uri('DELETE', url)
# await provider.delete(path, message, sha, branch=branch)
# expected_data = {
# 'message': message,
# 'sha': sha,
# 'committer': provider.committer,
# 'branch': branch,
# }
#
# assert aiohttpretty.has_call(method='DELETE', uri=url, data=json.dumps(expected_data))
#
# @pytest.mark.asyncio
# @pytest.mark.aiohttpretty
# async def test_delete_without_branch(self, provider, repo_contents):
# path = repo_contents[0]['path']
# sha = repo_contents[0]['sha']
# message = 'deleted'
# url = provider.build_repo_url('contents', path)
# aiohttpretty.register_json_uri('DELETE', url)
# await provider.delete(path, message, sha)
# expected_data = {
# 'message': message,
# 'sha': sha,
# 'committer': provider.committer,
# }
#
# assert aiohttpretty.has_call(method='DELETE', uri=url, data=json.dumps(expected_data))
class TestMetadata:
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_metadata_file(self, provider, repo_metadata, repo_tree_metadata_root):
ref = hashlib.sha1().hexdigest()
path = await provider.validate_path('/file.txt')
tree_url = provider.build_repo_url('git', 'trees', ref, recursive=1)
commit_url = provider.build_repo_url('commits', path=path.path.lstrip('/'), sha=path.identifier[0])
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
aiohttpretty.register_json_uri('GET', commit_url, body=[{
'commit': {
'tree': {'sha': ref},
'author': {'date': 'this is totally date'}
},
}])
result = await provider.metadata(path)
item = repo_tree_metadata_root['tree'][0]
web_view = provider._web_view(path=path)
assert result == GitHubFileTreeMetadata(item, web_view=web_view, commit={
'tree': {'sha': ref}, 'author': {'date': 'this is totally date'}
})
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_metadata_doesnt_exist(self, provider, repo_metadata, repo_tree_metadata_root):
ref = hashlib.sha1().hexdigest()
path = await provider.validate_path('/file.txt')
tree_url = provider.build_repo_url('git', 'trees', ref, recursive=1)
commit_url = provider.build_repo_url('commits', path=path.path.lstrip('/'), sha=path.identifier[0])
aiohttpretty.register_json_uri('GET', tree_url, body=repo_tree_metadata_root)
aiohttpretty.register_json_uri('GET', commit_url, body=[])
with pytest.raises(exceptions.NotFoundError):
await provider.metadata(path)
# TODO: Additional Tests
# async def test_metadata_root_file_txt_branch(self, provider, repo_metadata, branch_metadata, repo_metadata_root):
# async def test_metadata_root_file_txt_commit_sha(self, provider, repo_metadata, branch_metadata, repo_metadata_root):
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_metadata_folder_root(self, provider, repo_metadata, content_repo_metadata_root):
path = await provider.validate_path('/')
url = provider.build_repo_url('contents', path.path, ref=provider.default_branch)
aiohttpretty.register_json_uri('GET', url, body=content_repo_metadata_root)
result = await provider.metadata(path)
ret = []
for item in content_repo_metadata_root:
if item['type'] == 'dir':
ret.append(GitHubFolderContentMetadata(item))
else:
ret.append(GitHubFileContentMetadata(item, web_view=item['html_url']))
assert result == ret
# TODO: Additional Tests
# async def test_metadata_non_root_folder(self, provider, repo_metadata, branch_metadata, repo_metadata_root):
# async def test_metadata_non_root_folder_branch(self, provider, repo_metadata, branch_metadata, repo_metadata_root):
# async def test_metadata_non_root_folder_commit_sha(self, provider, repo_metadata, branch_metadata, repo_metadata_root):
class TestCreateFolder:
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_errors_out(self, provider, repo_metadata):
path = await provider.validate_path('/Imarealboy/')
url = provider.build_repo_url('contents', path.child('.gitkeep').path)
aiohttpretty.register_uri('PUT', url, status=400)
with pytest.raises(exceptions.CreateFolderError) as e:
await provider.create_folder(path)
assert e.value.code == 400
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_must_be_folder(self, provider, repo_metadata):
path = await provider.validate_path('/Imarealboy')
with pytest.raises(exceptions.CreateFolderError) as e:
await provider.create_folder(path)
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_already_exists(self, provider, repo_metadata):
path = await provider.validate_path('/Imarealboy/')
url = provider.build_repo_url('contents', os.path.join(path.path, '.gitkeep'))
aiohttpretty.register_json_uri('PUT', url, status=422, body={
'message': 'Invalid request.\n\n"sha" wasn\'t supplied.'
})
with pytest.raises(exceptions.FolderNamingConflict) as e:
await provider.create_folder(path)
assert e.value.code == 409
assert e.value.message == 'Cannot create folder "Imarealboy" because a file or folder already exists at path "/Imarealboy/"'
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_raises_other_422(self, provider, repo_metadata):
path = await provider.validate_path('/Imarealboy/')
url = provider.build_repo_url('contents', os.path.join(path.path, '.gitkeep'))
aiohttpretty.register_json_uri('PUT', url, status=422, body={
'message': 'github no likey'
})
with pytest.raises(exceptions.CreateFolderError) as e:
await provider.create_folder(path)
assert e.value.code == 422
assert e.value.data == {'message': 'github no likey'}
@pytest.mark.asyncio
@pytest.mark.aiohttpretty
async def test_returns_metadata(self, provider, repo_metadata, create_folder_response):
path = await provider.validate_path('/i/like/trains/')
url = provider.build_repo_url('contents', os.path.join(path.path, '.gitkeep'))
aiohttpretty.register_json_uri('PUT', url, status=201, body=create_folder_response)
metadata = await provider.create_folder(path)
assert metadata.kind == 'folder'
assert metadata.name == 'trains'
assert metadata.path == '/i/like/trains/'
| 45.39887
| 137
| 0.624322
| 4,365
| 40,178
| 5.590149
| 0.088202
| 0.049793
| 0.061391
| 0.074546
| 0.77673
| 0.763329
| 0.745338
| 0.72706
| 0.714725
| 0.630507
| 0
| 0.056834
| 0.231868
| 40,178
| 884
| 138
| 45.450226
| 0.733815
| 0.117129
| 0
| 0.50229
| 0
| 0.059542
| 0.403438
| 0.028983
| 0
| 0
| 0
| 0.001131
| 0.068702
| 1
| 0.022901
| false
| 0.00458
| 0.030534
| 0.019847
| 0.082443
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
98d8e5d7a1768f3b5059cdcae83cc4da9b9ae6a8
| 214
|
py
|
Python
|
Lib/site-packages/mysql_cymysql/schema.py
|
Desarrolloweb8/ultimo2
|
cdf14a6ae9cb212b8c933b404766f1aa2a58ceb6
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/mysql_cymysql/schema.py
|
Desarrolloweb8/ultimo2
|
cdf14a6ae9cb212b8c933b404766f1aa2a58ceb6
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/mysql_cymysql/schema.py
|
Desarrolloweb8/ultimo2
|
cdf14a6ae9cb212b8c933b404766f1aa2a58ceb6
|
[
"bzip2-1.0.6"
] | null | null | null |
import cymysql
from django.db.backends.mysql import schema
class DatabaseSchemaEditor(schema.DatabaseSchemaEditor):
def quote_value(self, value):
return cymysql.converters.escape_item(value, 'utf-8')
| 26.75
| 61
| 0.780374
| 26
| 214
| 6.346154
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005376
| 0.130841
| 214
| 7
| 62
| 30.571429
| 0.88172
| 0
| 0
| 0
| 0
| 0
| 0.023364
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 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
| 1
| 1
| 0
|
0
| 5
|
98ee86fbef27cd397e92d868377db413e09f6b47
| 70
|
py
|
Python
|
checkov/kustomize/registry.py
|
pmalkki/checkov
|
b6cdf386dd976fe27c16fed6d550756a678a5d7b
|
[
"Apache-2.0"
] | 1
|
2022-02-20T21:20:39.000Z
|
2022-02-20T21:20:39.000Z
|
checkov/kustomize/registry.py
|
pmalkki/checkov
|
b6cdf386dd976fe27c16fed6d550756a678a5d7b
|
[
"Apache-2.0"
] | 3
|
2022-03-07T20:37:31.000Z
|
2022-03-21T20:20:14.000Z
|
checkov/kustomize/registry.py
|
pmalkki/checkov
|
b6cdf386dd976fe27c16fed6d550756a678a5d7b
|
[
"Apache-2.0"
] | null | null | null |
from checkov.kubernetes.registry import Registry as KubernetesRegistry
| 70
| 70
| 0.9
| 8
| 70
| 7.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 70
| 1
| 70
| 70
| 0.969231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c71230e34ee9b99668788714b0dd1bbc445c0f24
| 131
|
py
|
Python
|
scripts/contech_wrapper++.py
|
Ridhii/SyncdSim
|
4cd120e9f7d4db348d405db4608ef9c6f9499d01
|
[
"BSD-3-Clause"
] | 50
|
2015-10-21T23:16:35.000Z
|
2021-09-27T12:52:04.000Z
|
scripts/contech_wrapper++.py
|
Ridhii/SyncdSim
|
4cd120e9f7d4db348d405db4608ef9c6f9499d01
|
[
"BSD-3-Clause"
] | 187
|
2015-01-08T22:24:54.000Z
|
2020-04-17T17:23:50.000Z
|
scripts/contech_wrapper++.py
|
Ridhii/SyncdSim
|
4cd120e9f7d4db348d405db4608ef9c6f9499d01
|
[
"BSD-3-Clause"
] | 25
|
2015-11-02T17:54:49.000Z
|
2020-06-16T07:28:11.000Z
|
#!/usr/bin/env python
# C++ Wrapper compiler for contech front end
import contech_wrapper
contech_wrapper.main(isCpp = True)
| 13.1
| 44
| 0.748092
| 19
| 131
| 5.052632
| 0.789474
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160305
| 131
| 9
| 45
| 14.555556
| 0.872727
| 0.480916
| 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 | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c7576b5cdb9d67e55a1934b87c8a0ca7278e0fc8
| 35
|
py
|
Python
|
python/testData/codeInsight/mlcompletion/classNotBuiltins.py
|
tgodzik/intellij-community
|
f5ef4191fc30b69db945633951fb160c1cfb7b6f
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/codeInsight/mlcompletion/classNotBuiltins.py
|
tgodzik/intellij-community
|
f5ef4191fc30b69db945633951fb160c1cfb7b6f
|
[
"Apache-2.0"
] | 2
|
2022-02-19T09:45:05.000Z
|
2022-02-27T20:32:55.000Z
|
python/testData/codeInsight/mlcompletion/classNotBuiltins.py
|
tgodzik/intellij-community
|
f5ef4191fc30b69db945633951fb160c1cfb7b6f
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
class MyClazz:
pass
a = M<caret>
| 8.75
| 14
| 0.657143
| 6
| 35
| 3.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.228571
| 35
| 4
| 15
| 8.75
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.333333
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
c75a7a2a3b2eea3eb0e8a08f8ad4d8d2b5c6c256
| 19
|
py
|
Python
|
python/testData/quickFixes/PyAugmentAssignmentQuickFixTest/references_after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/quickFixes/PyAugmentAssignmentQuickFixTest/references_after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/quickFixes/PyAugmentAssignmentQuickFixTest/references_after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
v = 0
f = 1
v += f
| 4.75
| 6
| 0.315789
| 6
| 19
| 1
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.473684
| 19
| 3
| 7
| 6.333333
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c763ee49645bb4dc11d6157ec6d6162774d9eea7
| 4,214
|
py
|
Python
|
last_records/last_records/doctype/smart_order_new.py
|
hrgadeha/Records
|
edd6155c2eaaa36859ff00df6eb137e12b9b55ee
|
[
"MIT"
] | null | null | null |
last_records/last_records/doctype/smart_order_new.py
|
hrgadeha/Records
|
edd6155c2eaaa36859ff00df6eb137e12b9b55ee
|
[
"MIT"
] | null | null | null |
last_records/last_records/doctype/smart_order_new.py
|
hrgadeha/Records
|
edd6155c2eaaa36859ff00df6eb137e12b9b55ee
|
[
"MIT"
] | 1
|
2020-11-30T07:11:46.000Z
|
2020-11-30T07:11:46.000Z
|
from __future__ import unicode_literals
import frappe
from frappe import msgprint
from frappe.model.document import Document
from datetime import date
from datetime import datetime, timedelta
from frappe.utils import money_in_words
@frappe.whitelist(allow_guest=True)
def getStock1(item_code,warehouse):
stock = frappe.db.sql("""select actual_qty from `tabBin` where item_code = %s and
warehouse = %s""",(item_code,warehouse))
return stock[0][0]
def makeSE(doc,method):
for i in doc.items:
stock = frappe.db.sql("""select actual_qty from `tabBin` where item_code = %s and
warehouse = %s""",(i.item_code,doc.stock_warehouse))
if stock and stock[0][0] != 0:
if stock[0][0] >= i.qty:
mt = frappe.get_doc({
"doctype": "Stock Entry",
"company": doc.company,
"stock_entry_type": "Reservation of Stock",
"posting_date": doc.transaction_date,
# "posting_time": datetime.now(),
"from_warehouse": doc.stock_warehouse,
"to_warehouse": doc.set_warehouse,
"sales_order" : doc.name,
"items": [{
"item_code": i.item_code,
"qty": i.qty,
"uom":i.uom,
"s_warehouse":doc.stock_warehouse,
"t_warehouse":doc.set_warehouse,
"basic_rate":i.rate
}]
})
mt.insert(ignore_permissions=True)
mt.save(ignore_permissions=True)
frappe.msgprint(frappe._("Qty {0} Of Item {1} Transfered to {2} From {3}.").format(i.qty,i.item_code,doc.set_warehouse,doc.stock_warehouse))
if stock[0][0] < i.qty:
mt = frappe.get_doc({
"doctype": "Stock Entry",
"company": doc.company,
"stock_entry_type": "Reservation of Stock",
"posting_date": doc.transaction_date,
# "posting_time": datetime.now(),
"from_warehouse": doc.stock_warehouse,
"to_warehouse": doc.set_warehouse,
"sales_order" : doc.name,
"items": [{
"item_code": i.item_code,
"qty": stock[0][0],
"uom":i.uom,
"s_warehouse":doc.stock_warehouse,
"t_warehouse":doc.set_warehouse,
"basic_rate":i.rate
}]
})
mt.insert(ignore_permissions=True)
mt.save(ignore_permissions=True)
frappe.msgprint(frappe._("Qty {0} Of Item {1} Transfered to {2} From {3}.").format(stock[0][0],i.item_code,doc.set_warehouse,doc.stock_warehouse))
n_mr = frappe.get_doc({
"doctype": "Material Request",
"material_request_type": "Purchase",
"schedule_date": doc.transaction_date,
"transaction_date": doc.transaction_date,
"against_sales_order": doc.name,
"items": [{
"item_code": i.item_code_with_bq,
"qty":(i.qty - stock[0][0]) / i.po_box_qty,
"uom":i.uom,
"so_qty": i.qty,
"warehouse":doc.set_warehouse,
"sales_order":doc.name,
"schedule_date": doc.transaction_date
}]
})
n_mr.insert(ignore_permissions=True)
n_mr.save(ignore_permissions=True)
frappe.msgprint(frappe._("Material Request Generated For Item {0} with Qty {1}.").format(i.item_code_with_bq,((i.qty - stock[0][0]) / i.po_box_qty)))
if not stock or stock[0][0] == 0:
n_mr = frappe.get_doc({
"doctype": "Material Request",
"material_request_type": "Purchase",
"schedule_date": doc.transaction_date,
"transaction_date": doc.transaction_date,
"against_sales_order": doc.name,
"items": [{
"item_code": i.item_code_with_bq,
"qty":(i.qty / i.po_box_qty),
"uom":i.uom,
"so_qty": i.qty,
"warehouse":doc.set_warehouse,
"sales_order":doc.name,
"schedule_date": doc.transaction_date
}]
})
n_mr.insert(ignore_permissions=True)
n_mr.save(ignore_permissions=True)
frappe.msgprint(frappe._("Material Request Generated For Item {0} with Qty {1}.").format(i.item_code_with_bq,(i.qty / i.po_box_qty)))
@frappe.whitelist(allow_guest=True)
def canMR(doc,method):
mi = frappe.get_list('Material Request', filters={'against_sales_order': doc.name,'per_ordered': 0}, fields=['name'])
if mi:
for i in mi:
mr = frappe.get_doc("Material Request",i)
if mr.docstatus == 1:
mr.cancel()
mr.delete()
if mr.docstatus == 0:
mr.delete()
so = frappe.get_list('Stock Entry', filters={'sales_order': doc.name}, fields=['name'])
if so:
for d in so:
se = frappe.get_doc("Stock Entry",d)
se.cancel()
se.delete()
| 32.666667
| 153
| 0.669435
| 611
| 4,214
| 4.396072
| 0.165303
| 0.050633
| 0.023455
| 0.065525
| 0.768429
| 0.750558
| 0.72338
| 0.72338
| 0.72338
| 0.684289
| 0
| 0.010312
| 0.171571
| 4,214
| 128
| 154
| 32.921875
| 0.759095
| 0.015662
| 0
| 0.66087
| 0
| 0
| 0.264848
| 0.01014
| 0
| 0
| 0
| 0
| 0
| 1
| 0.026087
| false
| 0
| 0.06087
| 0
| 0.095652
| 0.043478
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c7bc48ebf114eb6254ddd6c332fa68df877c6bbf
| 51
|
py
|
Python
|
utils/logger.py
|
killf/FarSeg
|
a696576bfe76ad4b2c5fea842830ae2e60e0b867
|
[
"MIT"
] | 7
|
2020-10-22T08:27:12.000Z
|
2021-11-14T15:27:18.000Z
|
utils/logger.py
|
killf/FarSeg
|
a696576bfe76ad4b2c5fea842830ae2e60e0b867
|
[
"MIT"
] | 1
|
2020-10-29T02:13:04.000Z
|
2020-10-29T13:27:58.000Z
|
utils/logger.py
|
killf/FarSeg
|
a696576bfe76ad4b2c5fea842830ae2e60e0b867
|
[
"MIT"
] | 1
|
2021-05-05T05:32:28.000Z
|
2021-05-05T05:32:28.000Z
|
from torch.utils.tensorboard import SummaryWriter
| 17
| 49
| 0.862745
| 6
| 51
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098039
| 51
| 2
| 50
| 25.5
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c7de815013c050587027568096e7b73a8a2db2a0
| 120
|
py
|
Python
|
tests/models/filters_test.py
|
aasiffaizal/cowin-alert-system
|
4c15509e2794dea684ce0babd7fe30937a5aa527
|
[
"Apache-2.0"
] | 1
|
2021-05-20T05:01:04.000Z
|
2021-05-20T05:01:04.000Z
|
tests/models/filters_test.py
|
aasiffaizal/cowin-alert-system
|
4c15509e2794dea684ce0babd7fe30937a5aa527
|
[
"Apache-2.0"
] | null | null | null |
tests/models/filters_test.py
|
aasiffaizal/cowin-alert-system
|
4c15509e2794dea684ce0babd7fe30937a5aa527
|
[
"Apache-2.0"
] | null | null | null |
from models.filters import ConfiguredFilter
def test_filters_model(db):
db.query(ConfiguredFilter).limit(1).all()
| 20
| 45
| 0.783333
| 16
| 120
| 5.75
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0.108333
| 120
| 5
| 46
| 24
| 0.850467
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4036ceec260476e38a6dd863482ac8a3999e73a5
| 374
|
py
|
Python
|
mialab/classifier/__init__.py
|
mrunibe/MIALab
|
82d3f0f4344620fd22384108b022730cde9c7215
|
[
"Apache-2.0"
] | 2
|
2018-12-05T09:03:28.000Z
|
2019-01-02T15:31:35.000Z
|
mialab/classifier/__init__.py
|
riedj1/MIALab
|
82d3f0f4344620fd22384108b022730cde9c7215
|
[
"Apache-2.0"
] | null | null | null |
mialab/classifier/__init__.py
|
riedj1/MIALab
|
82d3f0f4344620fd22384108b022730cde9c7215
|
[
"Apache-2.0"
] | 1
|
2018-10-20T21:27:55.000Z
|
2018-10-20T21:27:55.000Z
|
"""
======================================
Classifier (:mod:`classifier` package)
======================================
This package provides supervised machine learning classifiers.
The decision forest module (:mod:`classifier.decision_forest`)
--------------------------------------------------------------
.. automodule:: classifier.decision_forest
:members:
"""
| 26.714286
| 62
| 0.475936
| 24
| 374
| 7.333333
| 0.625
| 0.238636
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082888
| 374
| 14
| 63
| 26.714286
| 0.51312
| 0.975936
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
403c084769fc23eaa5498d84d571e33a97fee128
| 397
|
py
|
Python
|
tests/test_munin_client.py
|
jloehel/munin_client
|
eea975291757e0daea340f52a6a71f6fcad1dd8c
|
[
"MIT"
] | null | null | null |
tests/test_munin_client.py
|
jloehel/munin_client
|
eea975291757e0daea340f52a6a71f6fcad1dd8c
|
[
"MIT"
] | null | null | null |
tests/test_munin_client.py
|
jloehel/munin_client
|
eea975291757e0daea340f52a6a71f6fcad1dd8c
|
[
"MIT"
] | null | null | null |
import pytest
class TestMuninClient(object):
def config_test(self):
# Mock server
# Create a cli MuninClient(mock_server)
# cli.config("test_plugin")
# assert with expected result
pass
def fetch_test(self):
pass
def list_test(self):
pass
def nodes_test(self):
pass
def version_test(self):
pass
| 16.541667
| 47
| 0.581864
| 46
| 397
| 4.869565
| 0.543478
| 0.178571
| 0.214286
| 0.200893
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.345088
| 397
| 23
| 48
| 17.26087
| 0.861538
| 0.259446
| 0
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.416667
| false
| 0.416667
| 0.083333
| 0
| 0.583333
| 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
| 1
| 0
|
0
| 5
|
4046635eb7107151b111dcde00bb6254c6eb504b
| 50
|
py
|
Python
|
segnlp/layers/encoders/__init__.py
|
AxlAlm/SegNLP
|
89b8d077952397dfcea089376b373b117bcf6a65
|
[
"Apache-2.0"
] | 1
|
2021-01-21T17:16:55.000Z
|
2021-01-21T17:16:55.000Z
|
segnlp/layers/encoders/__init__.py
|
AxlAlm/SegNLP
|
89b8d077952397dfcea089376b373b117bcf6a65
|
[
"Apache-2.0"
] | 2
|
2021-01-24T20:07:54.000Z
|
2021-01-26T16:59:28.000Z
|
segnlp/layers/encoders/__init__.py
|
AxlAlm/SegNLP
|
89b8d077952397dfcea089376b373b117bcf6a65
|
[
"Apache-2.0"
] | 1
|
2021-01-21T17:16:57.000Z
|
2021-01-21T17:16:57.000Z
|
from .lstm import LSTM
from .linear import Linear
| 16.666667
| 26
| 0.8
| 8
| 50
| 5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 50
| 3
| 26
| 16.666667
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4088221213e52711c7e1185cc3fd1e8f8c5d2716
| 240
|
py
|
Python
|
SimG4Core/Configuration/python/SimG4Core_cff.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 852
|
2015-01-11T21:03:51.000Z
|
2022-03-25T21:14:00.000Z
|
SimG4Core/Configuration/python/SimG4Core_cff.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 30,371
|
2015-01-02T00:14:40.000Z
|
2022-03-31T23:26:05.000Z
|
SimG4Core/Configuration/python/SimG4Core_cff.py
|
ckamtsikis/cmssw
|
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
|
[
"Apache-2.0"
] | 3,240
|
2015-01-02T05:53:18.000Z
|
2022-03-31T17:24:21.000Z
|
import FWCore.ParameterSet.Config as cms
# Geometry and Magnetic field must be initialized separately
# Geant4-based CMS Detector simulation (OscarProducer)
# - returns label "g4SimHits"
#
from SimG4Core.Application.g4SimHits_cfi import *
| 30
| 60
| 0.8125
| 29
| 240
| 6.689655
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019048
| 0.125
| 240
| 7
| 61
| 34.285714
| 0.904762
| 0.579167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4092817366dd93b9bc3a4a91400fa7dbb27bb079
| 179
|
py
|
Python
|
ee/clickhouse/migrations/0002_events_materialized.py
|
avoajaugochukwu/posthog
|
7e7fd42b0542ebc4734aedb926df11d462e3dd4f
|
[
"MIT"
] | 1
|
2021-11-13T15:47:23.000Z
|
2021-11-13T15:47:23.000Z
|
ee/clickhouse/migrations/0002_events_materialized.py
|
avoajaugochukwu/posthog
|
7e7fd42b0542ebc4734aedb926df11d462e3dd4f
|
[
"MIT"
] | 1
|
2021-10-13T10:05:26.000Z
|
2021-10-13T10:05:26.000Z
|
ee/clickhouse/migrations/0002_events_materialized.py
|
avoajaugochukwu/posthog
|
7e7fd42b0542ebc4734aedb926df11d462e3dd4f
|
[
"MIT"
] | 4
|
2021-02-16T20:39:01.000Z
|
2022-03-19T17:00:05.000Z
|
from infi.clickhouse_orm import migrations
from ee.clickhouse.sql.events import EVENTS_WITH_PROPS_TABLE_SQL
operations = [
migrations.RunSQL(EVENTS_WITH_PROPS_TABLE_SQL),
]
| 22.375
| 64
| 0.832402
| 25
| 179
| 5.6
| 0.56
| 0.142857
| 0.214286
| 0.285714
| 0.328571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106145
| 179
| 7
| 65
| 25.571429
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
40b4bf19fca0a00c615ba2c3e22a3936506e92e5
| 40,097
|
py
|
Python
|
tests/system_tests_qdstat.py
|
pwright/qpid-dispatch
|
94f523a12631d592503d8e4acbe075b879c8d3bd
|
[
"Apache-2.0"
] | 1
|
2019-07-16T10:24:40.000Z
|
2019-07-16T10:24:40.000Z
|
tests/system_tests_qdstat.py
|
finp/qpid-dispatch
|
94f523a12631d592503d8e4acbe075b879c8d3bd
|
[
"Apache-2.0"
] | 101
|
2020-10-15T06:49:34.000Z
|
2022-03-31T04:04:25.000Z
|
tests/system_tests_qdstat.py
|
pwright/qpid-dispatch
|
94f523a12631d592503d8e4acbe075b879c8d3bd
|
[
"Apache-2.0"
] | null | null | null |
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License
#
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
import os
import re
import system_test
import unittest
import sys
from subprocess import PIPE
from proton import Url, SSLDomain, SSLUnavailable, SASL
from system_test import main_module, SkipIfNeeded
from proton.utils import BlockingConnection
class QdstatTest(system_test.TestCase):
"""Test qdstat tool output"""
@classmethod
def setUpClass(cls):
super(QdstatTest, cls).setUpClass()
config = system_test.Qdrouterd.Config([
('router', {'id': 'QDR.A', 'workerThreads': 1}),
('listener', {'port': cls.tester.get_port()}),
])
cls.router = cls.tester.qdrouterd('test-router', config)
def run_qdstat(self, args, regexp=None, address=None):
if args:
popen_args = ['qdstat', '--bus', str(address or self.router.addresses[0]), '--timeout', str(system_test.TIMEOUT) ] + args
else:
popen_args = ['qdstat', '--bus',
str(address or self.router.addresses[0]),
'--timeout', str(system_test.TIMEOUT)]
p = self.popen(popen_args,
name='qdstat-'+self.id(), stdout=PIPE, expect=None,
universal_newlines=True)
out = p.communicate()[0]
assert p.returncode == 0, \
"qdstat exit status %s, output:\n%s" % (p.returncode, out)
if regexp: assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
return out
def test_help(self):
self.run_qdstat(['--help'], r'Usage: qdstat')
def test_general(self):
out = self.run_qdstat(['--general'], r'(?s)Router Statistics.*Mode\s*Standalone')
self.assertTrue(re.match(r"(.*)\bConnections\b[ \t]+\b1\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertTrue(re.match(r"(.*)\bNodes\b[ \t]+\b0\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertTrue(re.match(r"(.*)\bAuto Links\b[ \t]+\b0\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertTrue(re.match(r"(.*)\bLink Routes\b[ \t]+\b0\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertTrue(re.match(r"(.*)\bWorker Threads\b[ \t]+\b1\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertTrue(re.match(r"(.*)\bRouter Id\b[ \t]+\bQDR.A\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertTrue(re.match(r"(.*)\bMode\b[ \t]+\bstandalone\b(.*)",
out, flags=re.DOTALL) is not None, out)
self.assertEqual(out.count("QDR.A"), 2)
def test_general_csv(self):
out = self.run_qdstat(['--general', '--csv'], r'(?s)Router Statistics.*Mode","Standalone')
self.assertIn('"Connections","1"', out)
self.assertIn('"Worker Threads","1"', out)
self.assertIn('"Nodes","0"', out)
self.assertIn('"Auto Links","0"', out)
self.assertIn('"Link Routes","0"', out)
self.assertIn('"Router Id","QDR.A"', out)
self.assertIn('"Mode","standalone"', out)
self.assertEqual(out.count("QDR.A"), 2)
def test_connections(self):
self.run_qdstat(['--connections'], r'host.*container.*role')
outs = self.run_qdstat(['--connections'], 'no-auth')
outs = self.run_qdstat(['--connections'], 'QDR.A')
def test_connections_csv(self):
self.run_qdstat(['--connections', "--csv"], r'host.*container.*role')
outs = self.run_qdstat(['--connections'], 'no-auth')
outs = self.run_qdstat(['--connections'], 'QDR.A')
def test_links(self):
self.run_qdstat(['--links'], r'QDR.A')
out = self.run_qdstat(['--links'], r'endpoint.*out.*local.*temp.')
parts = out.split("\n")
self.assertEqual(len(parts), 9)
def test_links_csv(self):
self.run_qdstat(['--links', "--csv"], r'QDR.A')
out = self.run_qdstat(['--links'], r'endpoint.*out.*local.*temp.')
parts = out.split("\n")
self.assertEqual(len(parts), 9)
def test_links_with_limit(self):
out = self.run_qdstat(['--links', '--limit=1'])
parts = out.split("\n")
self.assertEqual(len(parts), 8)
def test_links_with_limit_csv(self):
out = self.run_qdstat(['--links', '--limit=1', "--csv"])
parts = out.split("\n")
self.assertEqual(len(parts), 7)
def test_nodes(self):
self.run_qdstat(['--nodes'], r'No Router List')
def test_nodes_csv(self):
self.run_qdstat(['--nodes', "--csv"], r'No Router List')
def test_address(self):
out = self.run_qdstat(['--address'], r'QDR.A')
out = self.run_qdstat(['--address'], r'\$management')
parts = out.split("\n")
self.assertEqual(len(parts), 11)
def test_address_csv(self):
out = self.run_qdstat(['--address'], r'QDR.A')
out = self.run_qdstat(['--address'], r'\$management')
parts = out.split("\n")
self.assertEqual(len(parts), 11)
def test_qdstat_no_args(self):
outs = self.run_qdstat(args=None)
self.assertTrue("Presettled Count" in outs)
self.assertTrue("Dropped Presettled Count" in outs)
self.assertTrue("Accepted Count" in outs)
self.assertTrue("Rejected Count" in outs)
self.assertTrue("Deliveries from Route Container" in outs)
self.assertTrue("Deliveries to Route Container" in outs)
self.assertTrue("Deliveries to Fallback" in outs)
self.assertTrue("Egress Count" in outs)
self.assertTrue("Ingress Count" in outs)
self.assertTrue("Uptime" in outs)
def test_qdstat_no_other_args_csv(self):
outs = self.run_qdstat(["--csv"])
self.assertTrue("Presettled Count" in outs)
self.assertTrue("Dropped Presettled Count" in outs)
self.assertTrue("Accepted Count" in outs)
self.assertTrue("Rejected Count" in outs)
self.assertTrue("Deliveries from Route Container" in outs)
self.assertTrue("Deliveries to Route Container" in outs)
self.assertTrue("Deliveries to Fallback" in outs)
self.assertTrue("Egress Count" in outs)
self.assertTrue("Ingress Count" in outs)
self.assertTrue("Uptime" in outs)
def test_address_priority(self):
out = self.run_qdstat(['--address'])
lines = out.split("\n")
# make sure the output contains a header line
self.assertTrue(len(lines) >= 2)
# see if the header line has the word priority in it
priorityregexp = r'pri'
priority_column = re.search(priorityregexp, lines[4]).start()
self.assertTrue(priority_column > -1)
# extract the number in the priority column of every address
for i in range(6, len(lines) - 1):
pri = re.findall(r'[-\d]+', lines[i][priority_column:])
# make sure the priority found is a hyphen or a legal number
if pri[0] == '-':
pass # naked hypnen is allowed
else:
self.assertTrue(len(pri) > 0, "Can not find numeric priority in '%s'" % lines[i])
priority = int(pri[0])
# make sure the priority is from -1 to 9
self.assertTrue(priority >= -1, "Priority was less than -1")
self.assertTrue(priority <= 9, "Priority was greater than 9")
def test_address_priority_csv(self):
HEADER_ROW = 4
PRI_COL = 4
out = self.run_qdstat(['--address', "--csv"])
lines = out.split("\n")
# make sure the output contains a header line
self.assertTrue(len(lines) >= 2)
# see if the header line has the word priority in it
header_line = lines[HEADER_ROW].split(',')
self.assertTrue(header_line[PRI_COL] == '"pri"')
# extract the number in the priority column of every address
for i in range(HEADER_ROW + 1, len(lines) - 1):
line = lines[i].split(',')
pri = line[PRI_COL][1:-1] # unquoted value
# make sure the priority found is a hyphen or a legal number
if pri == '-':
pass # naked hypnen is allowed
else:
priority = int(pri)
# make sure the priority is from -1 to 9
self.assertTrue(priority >= -1, "Priority was less than -1")
self.assertTrue(priority <= 9, "Priority was greater than 9")
def test_address_with_limit(self):
out = self.run_qdstat(['--address', '--limit=1'])
parts = out.split("\n")
self.assertEqual(len(parts), 8)
def test_address_with_limit_csv(self):
out = self.run_qdstat(['--address', '--limit=1', '--csv'])
parts = out.split("\n")
self.assertEqual(len(parts), 7)
def test_memory(self):
out = self.run_qdstat(['--memory'])
if out.strip() == "No memory statistics available":
# router built w/o memory pools enabled]
return self.skipTest("Router's memory pools disabled")
self.assertTrue("QDR.A" in out)
self.assertTrue("UTC" in out)
regexp = r'qdr_address_t\s+[0-9]+'
assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
def test_memory_csv(self):
out = self.run_qdstat(['--memory', '--csv'])
if out.strip() == "No memory statistics available":
# router built w/o memory pools enabled]
return self.skipTest("Router's memory pools disabled")
self.assertTrue("QDR.A" in out)
self.assertTrue("UTC" in out)
regexp = r'qdr_address_t","[0-9]+'
assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
def test_policy(self):
out = self.run_qdstat(['--policy'])
self.assertTrue("Maximum Concurrent Connections" in out)
self.assertTrue("Total Denials" in out)
def test_policy_csv(self):
out = self.run_qdstat(['-p', "--csv"])
self.assertTrue("Maximum Concurrent Connections" in out)
self.assertTrue("Total Denials" in out)
def test_log(self):
self.run_qdstat(['--log', '--limit=5'], r'AGENT \(debug\).*GET-LOG')
def test_yy_query_many_links(self):
# This test will fail without the fix for DISPATCH-974
c = BlockingConnection(self.router.addresses[0])
count = 0
links = []
COUNT = 5000
ADDRESS_SENDER = "examples-sender"
ADDRESS_RECEIVER = "examples-receiver"
# This loop creates 5000 consumer and 5000 producer links
while True:
count += 1
r = c.create_receiver(ADDRESS_RECEIVER + str(count))
links.append(r)
s = c.create_sender(ADDRESS_SENDER + str(count))
links.append(c)
if count == COUNT:
break
# Now we run qdstat command and check if we got back details
# about all the 10000 links
# We do not specify the limit which means unlimited
# which means get everything that is there.
outs = self.run_qdstat(['--links'])
out_list = outs.split("\n")
out_links = 0
in_links = 0
for out in out_list:
if "endpoint in" in out and ADDRESS_SENDER in out:
in_links += 1
if "endpoint out" in out and ADDRESS_RECEIVER in out:
out_links += 1
self.assertEqual(in_links, COUNT)
self.assertEqual(out_links, COUNT)
# Run qdstat with a limit more than 10,000
outs = self.run_qdstat(['--links', '--limit=15000'])
out_list = outs.split("\n")
out_links = 0
in_links = 0
for out in out_list:
if "endpoint in" in out and ADDRESS_SENDER in out:
in_links += 1
if "endpoint out" in out and ADDRESS_RECEIVER in out:
out_links += 1
self.assertEqual(in_links, COUNT)
self.assertEqual(out_links, COUNT)
# Run qdstat with a limit less than 10,000
outs = self.run_qdstat(['--links', '--limit=2000'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, 2000)
# Run qdstat with a limit less than 10,000
# repeat with --csv
outs = self.run_qdstat(['--links', '--limit=2000', '--csv'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, 2000)
# Run qdstat with a limit of 700 because 700
# is the maximum number of rows we get per request
outs = self.run_qdstat(['--links', '--limit=700'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, 700)
# Run qdstat with a limit of 700 because 700
# is the maximum number of rows we get per request
# repeat with --csv
outs = self.run_qdstat(['--links', '--limit=700', '--csv'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, 700)
# Run qdstat with a limit of 500 because 700
# is the maximum number of rows we get per request
# and we want to try something less than 700
outs = self.run_qdstat(['--links', '--limit=500'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, 500)
# Run qdstat with a limit of 500 because 700
# is the maximum number of rows we get per request
# and we want to try something less than 700
# repeat with --csv
outs = self.run_qdstat(['--links', '--limit=500', '--csv'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, 500)
# DISPATCH-1485. Try to run qdstat with a limit=0. Without the fix for DISPATCH-1485
# this following command will hang and the test will fail.
outs = self.run_qdstat(['--links', '--limit=0'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, COUNT*2)
# DISPATCH-1485. Try to run qdstat with a limit=0. Without the fix for DISPATCH-1485
# this following command will hang and the test will fail.
# repeat with --csv
outs = self.run_qdstat(['--links', '--limit=0', '--csv'])
out_list = outs.split("\n")
links = 0
for out in out_list:
if "endpoint" in out and "examples" in out:
links += 1
self.assertEqual(links, COUNT*2)
# This test would fail without the fix for DISPATCH-974
outs = self.run_qdstat(['--address'])
out_list = outs.split("\n")
sender_addresses = 0
receiver_addresses = 0
for out in out_list:
if ADDRESS_SENDER in out:
sender_addresses += 1
if ADDRESS_RECEIVER in out:
receiver_addresses += 1
self.assertEqual(sender_addresses, COUNT)
self.assertEqual(receiver_addresses, COUNT)
# Test if there is a non-zero uptime for the router in the output of
# qdstat -g
non_zero_seconds = False
outs = self.run_qdstat(args=None)
parts = outs.split("\n")
for part in parts:
if "Uptime" in part:
uptime_parts = part.split(" ")
for uptime_part in uptime_parts:
if uptime_part.startswith("000"):
time_parts = uptime_part.split(":")
if int(time_parts[3]) > 0:
non_zero_seconds = True
if not non_zero_seconds:
if int(time_parts[2]) > 0:
non_zero_seconds = True
self.assertTrue(non_zero_seconds)
c.close()
class QdstatTestVhostPolicy(system_test.TestCase):
"""Test qdstat-with-policy tool output"""
@classmethod
def setUpClass(cls):
super(QdstatTestVhostPolicy, cls).setUpClass()
config = system_test.Qdrouterd.Config([
('router', {'id': 'QDR.A', 'workerThreads': 1}),
('listener', {'port': cls.tester.get_port()}),
('policy', {'maxConnections': 100, 'enableVhostPolicy': 'true'}),
('vhost', {
'hostname': '$default',
'maxConnections': 2,
'allowUnknownUser': 'true',
'groups': {
'$default': {
'users': '*',
'remoteHosts': '*',
'sources': '*',
'targets': '*',
'allowDynamicSource': True
},
'HGCrawler': {
'users': 'Farmers',
'remoteHosts': '*',
'sources': '*',
'targets': '*',
'allowDynamicSource': True
},
},
})
])
cls.router = cls.tester.qdrouterd('test-router', config)
def run_qdstat(self, args, regexp=None, address=None):
if args:
popen_args = ['qdstat', '--bus', str(address or self.router.addresses[0]), '--timeout', str(system_test.TIMEOUT) ] + args
else:
popen_args = ['qdstat', '--bus',
str(address or self.router.addresses[0]),
'--timeout', str(system_test.TIMEOUT)]
p = self.popen(popen_args,
name='qdstat-'+self.id(), stdout=PIPE, expect=None,
universal_newlines=True)
out = p.communicate()[0]
assert p.returncode == 0, \
"qdstat exit status %s, output:\n%s" % (p.returncode, out)
if regexp: assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
return out
def test_vhost(self):
out = self.run_qdstat(['--vhosts'])
self.assertTrue("Vhosts" in out)
self.assertTrue("allowUnknownUser" in out)
def test_vhost_csv(self):
out = self.run_qdstat(['--vhosts', '--csv'])
self.assertTrue("Vhosts" in out)
self.assertTrue("allowUnknownUser" in out)
def test_vhostgroups(self):
out = self.run_qdstat(['--vhostgroups'])
self.assertTrue("Vhost Groups" in out)
self.assertTrue("allowAdminStatusUpdate" in out)
self.assertTrue("Vhost '$default' UserGroup '$default'" in out)
self.assertTrue("Vhost '$default' UserGroup 'HGCrawler'" in out)
def test_vhostgroups_csv(self):
out = self.run_qdstat(['--vhostgroups', '--csv'])
self.assertTrue("Vhost Groups" in out)
self.assertTrue("allowAdminStatusUpdate" in out)
self.assertTrue("Vhost '$default' UserGroup '$default'" in out)
self.assertTrue("Vhost '$default' UserGroup 'HGCrawler'" in out)
def test_vhoststats(self):
out = self.run_qdstat(['--vhoststats'])
self.assertTrue("Vhost Stats" in out)
self.assertTrue("maxMessageSizeDenied" in out)
self.assertTrue("Vhost User Stats" in out)
self.assertTrue("remote hosts" in out)
def test_vhoststats_csv(self):
out = self.run_qdstat(['--vhoststats', '--csv'])
self.assertTrue("Vhost Stats" in out)
self.assertTrue("maxMessageSizeDenied" in out)
self.assertTrue("Vhost User Stats" in out)
self.assertTrue("remote hosts" in out)
class QdstatLinkPriorityTest(system_test.TestCase):
"""Need 2 routers to get inter-router links for the link priority test"""
@classmethod
def setUpClass(cls):
super(QdstatLinkPriorityTest, cls).setUpClass()
cls.inter_router_port = cls.tester.get_port()
config_1 = system_test.Qdrouterd.Config([
('router', {'mode': 'interior', 'id': 'R1'}),
('listener', {'port': cls.tester.get_port()}),
('connector', {'role': 'inter-router', 'port': cls.inter_router_port})
])
config_2 = system_test.Qdrouterd.Config([
('router', {'mode': 'interior', 'id': 'R2'}),
('listener', {'role': 'inter-router', 'port': cls.inter_router_port}),
])
cls.router_2 = cls.tester.qdrouterd('test_router_2', config_2, wait=True)
cls.router_1 = cls.tester.qdrouterd('test_router_1', config_1, wait=True)
cls.router_1.wait_router_connected('R2')
def address(self):
return self.router_1.addresses[0]
def run_qdstat(self, args):
p = self.popen(
['qdstat', '--bus', str(self.address()), '--timeout', str(system_test.TIMEOUT) ] + args,
name='qdstat-'+self.id(), stdout=PIPE, expect=None,
universal_newlines=True)
out = p.communicate()[0]
assert p.returncode == 0, \
"qdstat exit status %s, output:\n%s" % (p.returncode, out)
return out
def test_link_priority(self):
out = self.run_qdstat(['--links'])
lines = out.split("\n")
# make sure the output contains a header line
self.assertTrue(len(lines) >= 2)
# see if the header line has the word priority in it
priorityregexp = r'pri'
priority_column = re.search(priorityregexp, lines[4]).start()
self.assertTrue(priority_column > -1)
# extract the number in the priority column of every inter-router link
priorities = {}
for i in range(6, len(lines) - 1):
if re.search(r'inter-router', lines[i]):
pri = re.findall(r'[-\d]+', lines[i][priority_column:])
# make sure the priority found is a number
self.assertTrue(len(pri) > 0, "Can not find numeric priority in '%s'" % lines[i])
self.assertTrue(pri[0] != '-') # naked hypen disallowed
priority = int(pri[0])
# make sure the priority is from 0 to 9
self.assertTrue(priority >= 0, "Priority was less than 0")
self.assertTrue(priority <= 9, "Priority was greater than 9")
# mark this priority as present
priorities[priority] = True
# make sure that all priorities are present in the list (currently 0-9)
self.assertEqual(len(priorities.keys()), 10, "Not all priorities are present")
def test_link_priority_csv(self):
HEADER_ROW = 4
TYPE_COL = 0
PRI_COL = 9
out = self.run_qdstat(['--links', '--csv'])
lines = out.split("\n")
# make sure the output contains a header line
self.assertTrue(len(lines) >= 2)
# see if the header line has the word priority in it
header_line = lines[HEADER_ROW].split(',')
self.assertTrue(header_line[PRI_COL] == '"pri"')
# extract the number in the priority column of every inter-router link
priorities = {}
for i in range(HEADER_ROW + 1, len(lines) - 1):
line = lines[i].split(',')
if line[TYPE_COL] == '"inter-router"':
pri = line[PRI_COL][1:-1]
# make sure the priority found is a number
self.assertTrue(len(pri) > 0, "Can not find numeric priority in '%s'" % lines[i])
self.assertTrue(pri != '-') # naked hypen disallowed
priority = int(pri)
# make sure the priority is from 0 to 9
self.assertTrue(priority >= 0, "Priority was less than 0")
self.assertTrue(priority <= 9, "Priority was greater than 9")
# mark this priority as present
priorities[priority] = True
# make sure that all priorities are present in the list (currently 0-9)
self.assertEqual(len(priorities.keys()), 10, "Not all priorities are present")
def _test_links_all_routers(self, command):
out = self.run_qdstat(command)
self.assertTrue(out.count('UTC') == 1)
self.assertTrue(out.count('Router Links') == 2)
self.assertTrue(out.count('inter-router') == 40)
self.assertTrue(out.count('router-control') == 4)
def test_links_all_routers(self):
self._test_links_all_routers(['--links', '--all-routers'])
def test_links_all_routers_csv(self):
self._test_links_all_routers(['--links', '--all-routers', '--csv'])
def _test_all_entities(self, command):
out = self.run_qdstat(command)
self.assertTrue(out.count('UTC') == 1)
self.assertTrue(out.count('Router Links') == 1)
self.assertTrue(out.count('Router Addresses') == 1)
self.assertTrue(out.count('Connections') == 6)
self.assertTrue(out.count('AutoLinks') == 2)
self.assertTrue(out.count('Link Routes') == 3)
self.assertTrue(out.count('Router Statistics') == 1)
self.assertTrue(out.count('Memory Pools') == 1)
def test_all_entities(self):
self._test_all_entities(['--all-entities'])
def test_all_entities_csv(self):
self._test_all_entities(['--all-entities', '--csv'])
def _test_all_entities_all_routers(self, command):
out = self.run_qdstat(command)
self.assertTrue(out.count('UTC') == 1)
self.assertTrue(out.count('Router Links') == 2)
self.assertTrue(out.count('Router Addresses') == 2)
self.assertTrue(out.count('Connections') == 12)
self.assertTrue(out.count('AutoLinks') == 4)
self.assertTrue(out.count('Link Routes') == 6)
self.assertTrue(out.count('Router Statistics') == 2)
self.assertTrue(out.count('Memory Pools') == 2)
def test_all_entities_all_routers(self):
self._test_all_entities_all_routers(['--all-entities', '--all-routers'])
def test_all_entities_all_routers_csv(self):
self._test_all_entities_all_routers(['--all-entities', '--csv', '--all-routers'])
try:
SSLDomain(SSLDomain.MODE_CLIENT)
class QdstatSslTest(system_test.TestCase):
"""Test qdstat tool output"""
@staticmethod
def ssl_file(name):
return os.path.join(system_test.DIR, 'ssl_certs', name)
@staticmethod
def sasl_path():
return os.path.join(system_test.DIR, 'sasl_configs')
@classmethod
def setUpClass(cls):
super(QdstatSslTest, cls).setUpClass()
# Write SASL configuration file:
with open('tests-mech-EXTERNAL.conf', 'w') as sasl_conf:
sasl_conf.write("mech_list: EXTERNAL ANONYMOUS DIGEST-MD5 PLAIN\n")
# qdrouterd configuration:
config = system_test.Qdrouterd.Config([
('router', {'id': 'QDR.B',
'saslConfigPath': os.getcwd(),
'workerThreads': 1,
'saslConfigName': 'tests-mech-EXTERNAL'}),
('sslProfile', {'name': 'server-ssl',
'caCertFile': cls.ssl_file('ca-certificate.pem'),
'certFile': cls.ssl_file('server-certificate.pem'),
'privateKeyFile': cls.ssl_file('server-private-key.pem'),
'password': 'server-password'}),
('listener', {'port': cls.tester.get_port()}),
('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl', 'authenticatePeer': 'no', 'requireSsl': 'yes'}),
('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl', 'authenticatePeer': 'no', 'requireSsl': 'no'}),
('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl', 'authenticatePeer': 'yes', 'requireSsl': 'yes',
'saslMechanisms': 'EXTERNAL'})
])
cls.router = cls.tester.qdrouterd('test-router', config)
def run_qdstat(self, args, regexp=None, address=None):
p = self.popen(
['qdstat', '--bus', str(address or self.router.addresses[0]), '--ssl-disable-peer-name-verify',
'--timeout', str(system_test.TIMEOUT) ] + args,
name='qdstat-'+self.id(), stdout=PIPE, expect=None,
universal_newlines=True)
out = p.communicate()[0]
assert p.returncode == 0, \
"qdstat exit status %s, output:\n%s" % (p.returncode, out)
if regexp: assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
return out
def get_ssl_args(self):
args = dict(
sasl_external = ['--sasl-mechanisms', 'EXTERNAL'],
trustfile = ['--ssl-trustfile', self.ssl_file('ca-certificate.pem')],
bad_trustfile = ['--ssl-trustfile', self.ssl_file('bad-ca-certificate.pem')],
client_cert = ['--ssl-certificate', self.ssl_file('client-certificate.pem')],
client_key = ['--ssl-key', self.ssl_file('client-private-key.pem')],
client_pass = ['--ssl-password', 'client-password'])
args['client_cert_all'] = args['client_cert'] + args['client_key'] + args['client_pass']
return args
def ssl_test(self, url_name, arg_names):
"""Run simple SSL connection test with supplied parameters.
See test_ssl_* below.
"""
args = self.get_ssl_args()
addrs = [self.router.addresses[i] for i in range(4)];
urls = dict(zip(['none', 'strict', 'unsecured', 'auth'], addrs))
urls.update(zip(['none_s', 'strict_s', 'unsecured_s', 'auth_s'],
(Url(a, scheme="amqps") for a in addrs)))
self.run_qdstat(['--general'] + sum([args[n] for n in arg_names], []),
regexp=r'(?s)Router Statistics.*Mode\s*Standalone',
address=str(urls[url_name]))
def ssl_test_bad(self, url_name, arg_names):
self.assertRaises(AssertionError, self.ssl_test, url_name, arg_names)
# Non-SSL enabled listener should fail SSL connections.
def test_ssl_none(self):
self.ssl_test('none', [])
def test_ssl_scheme_to_none(self):
self.ssl_test_bad('none_s', [])
def test_ssl_cert_to_none(self):
self.ssl_test_bad('none', ['client_cert'])
# Strict SSL listener, SSL only
def test_ssl_none_to_strict(self):
self.ssl_test_bad('strict', [])
def test_ssl_schema_to_strict(self):
self.ssl_test('strict_s', [])
def test_ssl_cert_to_strict(self):
self.ssl_test('strict_s', ['client_cert_all'])
def test_ssl_trustfile_to_strict(self):
self.ssl_test('strict_s', ['trustfile'])
def test_ssl_trustfile_cert_to_strict(self):
self.ssl_test('strict_s', ['trustfile', 'client_cert_all'])
def test_ssl_bad_trustfile_to_strict(self):
self.ssl_test_bad('strict_s', ['bad_trustfile'])
# Require-auth SSL listener
def test_ssl_none_to_auth(self):
self.ssl_test_bad('auth', [])
def test_ssl_schema_to_auth(self):
self.ssl_test_bad('auth_s', [])
def test_ssl_trustfile_to_auth(self):
self.ssl_test_bad('auth_s', ['trustfile'])
def test_ssl_cert_to_auth(self):
self.ssl_test('auth_s', ['client_cert_all'])
def test_ssl_trustfile_cert_to_auth(self):
self.ssl_test('auth_s', ['trustfile', 'client_cert_all'])
def test_ssl_bad_trustfile_to_auth(self):
self.ssl_test_bad('auth_s', ['bad_trustfile', 'client_cert_all'])
def test_ssl_cert_explicit_external_to_auth(self):
self.ssl_test('auth_s', ['sasl_external', 'client_cert_all'])
# Unsecured SSL listener, allows non-SSL
def test_ssl_none_to_unsecured(self):
self.ssl_test('unsecured', [])
def test_ssl_schema_to_unsecured(self):
self.ssl_test('unsecured_s', [])
def test_ssl_cert_to_unsecured(self):
self.ssl_test('unsecured_s', ['client_cert_all'])
def test_ssl_trustfile_to_unsecured(self):
self.ssl_test('unsecured_s', ['trustfile'])
def test_ssl_trustfile_cert_to_unsecured(self):
self.ssl_test('unsecured_s', ['trustfile', 'client_cert_all'])
def test_ssl_bad_trustfile_to_unsecured(self):
self.ssl_test_bad('unsecured_s', ['bad_trustfile'])
except SSLUnavailable:
class QdstatSslTest(system_test.TestCase):
def test_skip(self):
self.skipTest("Proton SSL support unavailable.")
try:
SSLDomain(SSLDomain.MODE_CLIENT)
class QdstatSslTestSslPasswordFile(QdstatSslTest):
"""
Tests the --ssl-password-file command line parameter
"""
def get_ssl_args(self):
args = dict(
sasl_external = ['--sasl-mechanisms', 'EXTERNAL'],
trustfile = ['--ssl-trustfile', self.ssl_file('ca-certificate.pem')],
bad_trustfile = ['--ssl-trustfile', self.ssl_file('bad-ca-certificate.pem')],
client_cert = ['--ssl-certificate', self.ssl_file('client-certificate.pem')],
client_key = ['--ssl-key', self.ssl_file('client-private-key.pem')],
client_pass = ['--ssl-password-file', self.ssl_file('client-password-file.txt')])
args['client_cert_all'] = args['client_cert'] + args['client_key'] + args['client_pass']
return args
except SSLUnavailable:
class QdstatSslTest(system_test.TestCase):
def test_skip(self):
self.skipTest("Proton SSL support unavailable.")
try:
SSLDomain(SSLDomain.MODE_CLIENT)
class QdstatSslNoExternalTest(system_test.TestCase):
"""Test qdstat can't connect without sasl_mech EXTERNAL"""
@staticmethod
def ssl_file(name):
return os.path.join(system_test.DIR, 'ssl_certs', name)
@staticmethod
def sasl_path():
return os.path.join(system_test.DIR, 'sasl_configs')
@classmethod
def setUpClass(cls):
super(QdstatSslNoExternalTest, cls).setUpClass()
# Write SASL configuration file:
with open('tests-mech-NOEXTERNAL.conf', 'w') as sasl_conf:
sasl_conf.write("mech_list: ANONYMOUS DIGEST-MD5 PLAIN\n")
# qdrouterd configuration:
config = system_test.Qdrouterd.Config([
('router', {'id': 'QDR.C',
'saslConfigPath': os.getcwd(),
'workerThreads': 1,
'saslConfigName': 'tests-mech-NOEXTERNAL'}),
('sslProfile', {'name': 'server-ssl',
'caCertFile': cls.ssl_file('ca-certificate.pem'),
'certFile': cls.ssl_file('server-certificate.pem'),
'privateKeyFile': cls.ssl_file('server-private-key.pem'),
'password': 'server-password'}),
('listener', {'port': cls.tester.get_port()}),
('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl', 'authenticatePeer': 'no', 'requireSsl': 'yes'}),
('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl', 'authenticatePeer': 'no', 'requireSsl': 'no'}),
('listener', {'port': cls.tester.get_port(), 'sslProfile': 'server-ssl', 'authenticatePeer': 'yes', 'requireSsl': 'yes',
'saslMechanisms': 'EXTERNAL'})
])
cls.router = cls.tester.qdrouterd('test-router', config)
def run_qdstat(self, args, regexp=None, address=None):
p = self.popen(
['qdstat', '--bus', str(address or self.router.addresses[0]), '--timeout', str(system_test.TIMEOUT) ] + args,
name='qdstat-'+self.id(), stdout=PIPE, expect=None,
universal_newlines=True)
out = p.communicate()[0]
assert p.returncode == 0, \
"qdstat exit status %s, output:\n%s" % (p.returncode, out)
if regexp: assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out)
return out
def ssl_test(self, url_name, arg_names):
"""Run simple SSL connection test with supplied parameters.
See test_ssl_* below.
"""
args = dict(
trustfile = ['--ssl-trustfile', self.ssl_file('ca-certificate.pem')],
bad_trustfile = ['--ssl-trustfile', self.ssl_file('bad-ca-certificate.pem')],
client_cert = ['--ssl-certificate', self.ssl_file('client-certificate.pem')],
client_key = ['--ssl-key', self.ssl_file('client-private-key.pem')],
client_pass = ['--ssl-password', 'client-password'])
args['client_cert_all'] = args['client_cert'] + args['client_key'] + args['client_pass']
addrs = [self.router.addresses[i] for i in range(4)];
urls = dict(zip(['none', 'strict', 'unsecured', 'auth'], addrs))
urls.update(zip(['none_s', 'strict_s', 'unsecured_s', 'auth_s'],
(Url(a, scheme="amqps") for a in addrs)))
self.run_qdstat(['--general'] + sum([args[n] for n in arg_names], []),
regexp=r'(?s)Router Statistics.*Mode\s*Standalone',
address=str(urls[url_name]))
def ssl_test_bad(self, url_name, arg_names):
self.assertRaises(AssertionError, self.ssl_test, url_name, arg_names)
@SkipIfNeeded(not SASL.extended(), "Cyrus library not available. skipping test")
def test_ssl_cert_to_auth_fail_no_sasl_external(self):
self.ssl_test_bad('auth_s', ['client_cert_all'])
def test_ssl_trustfile_cert_to_auth_fail_no_sasl_external(self):
self.ssl_test_bad('auth_s', ['trustfile', 'client_cert_all'])
except SSLUnavailable:
class QdstatSslTest(system_test.TestCase):
def test_skip(self):
self.skipTest("Proton SSL support unavailable.")
if __name__ == '__main__':
unittest.main(main_module())
| 41.252058
| 137
| 0.57513
| 4,856
| 40,097
| 4.607908
| 0.098641
| 0.06069
| 0.033116
| 0.020737
| 0.831918
| 0.781596
| 0.730962
| 0.704237
| 0.671881
| 0.635413
| 0
| 0.01181
| 0.288326
| 40,097
| 971
| 138
| 41.294542
| 0.772323
| 0.103549
| 0
| 0.601148
| 0
| 0
| 0.195497
| 0.020504
| 0
| 0
| 0
| 0
| 0.205165
| 1
| 0.129125
| false
| 0.015782
| 0.018651
| 0.007174
| 0.180775
| 0.001435
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
40c6faf5555fd82651e7933b0e0fca8f35e192fe
| 270
|
py
|
Python
|
tests/test_roleplay.py
|
kintaclausin01/GHG-reduction-project
|
afd5b0967756ce5b67e3a664a082f17f9b91063b
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_roleplay.py
|
kintaclausin01/GHG-reduction-project
|
afd5b0967756ce5b67e3a664a082f17f9b91063b
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_roleplay.py
|
kintaclausin01/GHG-reduction-project
|
afd5b0967756ce5b67e3a664a082f17f9b91063b
|
[
"BSD-3-Clause"
] | 6
|
2021-03-31T05:08:47.000Z
|
2021-07-18T03:58:03.000Z
|
import sys
import os
parent_dir = os.path.join(os.path.dirname(__file__), '..')
sys.path.append(parent_dir)
from roleplay import *
#main.roleplayRun(sys.argv[1],sys.argv[2],sys.argv[3])
#main2.roleplayRun(sys.argv[1],sys.argv[2],sys.argv[3])
main2.roleplayRun()
| 30
| 59
| 0.718519
| 45
| 270
| 4.177778
| 0.422222
| 0.223404
| 0.191489
| 0.202128
| 0.484043
| 0.484043
| 0.484043
| 0.484043
| 0.484043
| 0.484043
| 0
| 0.03252
| 0.088889
| 270
| 9
| 60
| 30
| 0.731707
| 0.396296
| 0
| 0
| 0
| 0
| 0.012987
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
90707b6136be9a038e3c697d98d61c1e94cba850
| 40
|
py
|
Python
|
tests/components/synology/__init__.py
|
alexguzun/home-assistant
|
29403d28e2196d9424987c0b880210752a6c5846
|
[
"Apache-2.0"
] | null | null | null |
tests/components/synology/__init__.py
|
alexguzun/home-assistant
|
29403d28e2196d9424987c0b880210752a6c5846
|
[
"Apache-2.0"
] | null | null | null |
tests/components/synology/__init__.py
|
alexguzun/home-assistant
|
29403d28e2196d9424987c0b880210752a6c5846
|
[
"Apache-2.0"
] | null | null | null |
"""Tests for the synology component."""
| 20
| 39
| 0.7
| 5
| 40
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 40
| 1
| 40
| 40
| 0.8
| 0.825
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9085b513d305630aa4e2ed94ceaa1559b18cdbaa
| 63
|
py
|
Python
|
lagmenot/__init__.py
|
David-Durst/lagmenot
|
8f24a8659e3810c6febf51c3ff333f3a880c115d
|
[
"MIT"
] | null | null | null |
lagmenot/__init__.py
|
David-Durst/lagmenot
|
8f24a8659e3810c6febf51c3ff333f3a880c115d
|
[
"MIT"
] | null | null | null |
lagmenot/__init__.py
|
David-Durst/lagmenot
|
8f24a8659e3810c6febf51c3ff333f3a880c115d
|
[
"MIT"
] | null | null | null |
from .player import *
from .server import *
from .main import *
| 21
| 21
| 0.730159
| 9
| 63
| 5.111111
| 0.555556
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174603
| 63
| 3
| 22
| 21
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9088ea6ae791463dc47312b911b6a136bfbf767b
| 75
|
py
|
Python
|
rc_data_feed_plugin_odbcfeed/data_feeder_plugins/__init__.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 65
|
2017-12-04T13:58:32.000Z
|
2022-03-24T18:33:17.000Z
|
rc_data_feed_plugin_odbcfeed/data_feeder_plugins/__init__.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 48
|
2018-03-02T19:17:14.000Z
|
2022-03-09T22:00:38.000Z
|
rc_data_feed_plugin_odbcfeed/data_feeder_plugins/__init__.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 95
|
2018-01-11T16:23:39.000Z
|
2022-03-21T11:34:29.000Z
|
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| 25
| 42
| 0.84
| 10
| 75
| 4.9
| 0.6
| 0.408163
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106667
| 75
| 3
| 42
| 25
| 0.731343
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
90987258fcc44fca1973de2b3f1051cafe232361
| 159
|
py
|
Python
|
exercicios/PythonExercicios/ex007.py
|
Roberto-Sartore/Python
|
98f91f13cf78d761893c4a1f3264ed999244d32b
|
[
"MIT"
] | null | null | null |
exercicios/PythonExercicios/ex007.py
|
Roberto-Sartore/Python
|
98f91f13cf78d761893c4a1f3264ed999244d32b
|
[
"MIT"
] | null | null | null |
exercicios/PythonExercicios/ex007.py
|
Roberto-Sartore/Python
|
98f91f13cf78d761893c4a1f3264ed999244d32b
|
[
"MIT"
] | null | null | null |
n1 = float(input('Digite a primeira nota '))
n2 = float(input('Digite a segunda nota '))
print('A média entre {} e {} é {:.2f}'.format(n1, n2, ((n1 + n2)/2)))
| 39.75
| 69
| 0.603774
| 27
| 159
| 3.555556
| 0.62963
| 0.208333
| 0.333333
| 0.354167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06015
| 0.163522
| 159
| 3
| 70
| 53
| 0.661654
| 0
| 0
| 0
| 0
| 0
| 0.471698
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 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
| 5
|
90996734385214587d9abbc089ff477462af4af0
| 1,330
|
py
|
Python
|
fouruc/base/views.py
|
Alfareiza/4uc-manager-silver
|
8a83d2a9e3630d18322c78e0fd632e73bf59a799
|
[
"MIT"
] | null | null | null |
fouruc/base/views.py
|
Alfareiza/4uc-manager-silver
|
8a83d2a9e3630d18322c78e0fd632e73bf59a799
|
[
"MIT"
] | 12
|
2021-05-11T11:18:16.000Z
|
2021-09-30T14:13:30.000Z
|
fouruc/base/views.py
|
Alfareiza/4uc-manager-silver
|
8a83d2a9e3630d18322c78e0fd632e73bf59a799
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from decouple import config
from django.views.decorators.cache import cache_page
@cache_page(60 * 10)
@login_required
def dashboard(request):
return render(request, 'base/index.html')
@login_required
def charts(request):
return render(request, 'charts-morris.html')
@login_required
def maps(request):
return render(request, 'maps-google.html')
@login_required
def blank(request):
return render(request, 'page-blank.html')
@login_required
def badges(request):
return render(request, 'ui-badges.html')
@login_required
def breadcrumb_pagination(request):
return render(request, 'ui-breadcrumb-pagination.html')
@login_required
def forms(request):
return render(request, 'ui-forms.html')
@login_required
def button(request):
return render(request, 'ui-button.html')
@login_required
def collapse(request):
return render(request, 'ui-collapse.html')
@login_required
def icons(request):
return render(request, 'ui-icons.html')
@login_required
def tables(request):
return render(request, 'ui-tables.html')
@login_required
def tabs(request):
return render(request, 'ui-tabs.html')
@login_required
def typography(request):
return render(request, 'ui-typography.html')
| 18.732394
| 59
| 0.75188
| 174
| 1,330
| 5.649425
| 0.229885
| 0.185148
| 0.211597
| 0.343845
| 0.256358
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003463
| 0.131579
| 1,330
| 70
| 60
| 19
| 0.847619
| 0
| 0
| 0.295455
| 0
| 0
| 0.155639
| 0.021805
| 0
| 0
| 0
| 0
| 0
| 1
| 0.295455
| false
| 0
| 0.090909
| 0.295455
| 0.681818
| 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
| 1
| 0
|
0
| 5
|
90a82a8c54dc3843ab2db09b571647520dfeedbd
| 34
|
py
|
Python
|
mashiyat.py
|
gsdesign4innovation/MuharramCountdown
|
f99a24fae53a2587c52c1a728c22cdfbecfdf1b4
|
[
"MIT"
] | null | null | null |
mashiyat.py
|
gsdesign4innovation/MuharramCountdown
|
f99a24fae53a2587c52c1a728c22cdfbecfdf1b4
|
[
"MIT"
] | null | null | null |
mashiyat.py
|
gsdesign4innovation/MuharramCountdown
|
f99a24fae53a2587c52c1a728c22cdfbecfdf1b4
|
[
"MIT"
] | null | null | null |
print("Mashiyat")
print("Hussain")
| 17
| 17
| 0.735294
| 4
| 34
| 6.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029412
| 34
| 2
| 18
| 17
| 0.757576
| 0
| 0
| 0
| 0
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
90b58200f86d5778ce8c2e8d4413bd0a3e01b417
| 181
|
py
|
Python
|
boa3_test/test_sc/interop_test/contract/CreateContractTooManyArguments.py
|
DanPopa46/neo3-boa
|
e4ef340744b5bd25ade26f847eac50789b97f3e9
|
[
"Apache-2.0"
] | null | null | null |
boa3_test/test_sc/interop_test/contract/CreateContractTooManyArguments.py
|
DanPopa46/neo3-boa
|
e4ef340744b5bd25ade26f847eac50789b97f3e9
|
[
"Apache-2.0"
] | null | null | null |
boa3_test/test_sc/interop_test/contract/CreateContractTooManyArguments.py
|
DanPopa46/neo3-boa
|
e4ef340744b5bd25ade26f847eac50789b97f3e9
|
[
"Apache-2.0"
] | null | null | null |
from typing import Any
from boa3.builtin.interop.contract import create_contract
def Main(script: bytes, manifest: bytes, arg0: Any):
create_contract(script, manifest, arg0)
| 22.625
| 57
| 0.779006
| 25
| 181
| 5.56
| 0.6
| 0.201439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.138122
| 181
| 7
| 58
| 25.857143
| 0.871795
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2901b3d7050f83d00258547ca036ac9f7a05e362
| 551
|
py
|
Python
|
openff/evaluator/tests/test_utils/test_tcp.py
|
jaketanderson/openff-evaluator
|
68541612fb0dacacc909d02f273c66ae830051d5
|
[
"MIT"
] | 14
|
2019-02-01T18:56:58.000Z
|
2019-12-10T18:01:38.000Z
|
openff/evaluator/tests/test_utils/test_tcp.py
|
jaketanderson/openff-evaluator
|
68541612fb0dacacc909d02f273c66ae830051d5
|
[
"MIT"
] | 168
|
2019-01-31T19:54:11.000Z
|
2020-02-05T21:47:00.000Z
|
openff/evaluator/tests/test_utils/test_tcp.py
|
jaketanderson/openff-evaluator
|
68541612fb0dacacc909d02f273c66ae830051d5
|
[
"MIT"
] | 4
|
2019-05-01T17:45:24.000Z
|
2019-11-11T19:34:28.000Z
|
"""
Units tests for openff.evaluator.utils.tcp
"""
from openff.evaluator.utils import tcp
def test_message_packing():
"""Test that packing / unpacking ints works as expected"""
assert tcp.unpack_int(tcp.pack_int(20))[0] == 20
def test_message_type_enum():
"""Test the message type enum creation."""
assert tcp.EvaluatorMessageTypes(0) == tcp.EvaluatorMessageTypes.Undefined
assert tcp.EvaluatorMessageTypes(1) == tcp.EvaluatorMessageTypes.Submission
assert tcp.EvaluatorMessageTypes(2) == tcp.EvaluatorMessageTypes.Query
| 29
| 79
| 0.751361
| 67
| 551
| 6.074627
| 0.522388
| 0.353808
| 0.22113
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016807
| 0.136116
| 551
| 18
| 80
| 30.611111
| 0.838235
| 0.239564
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.571429
| 1
| 0.285714
| true
| 0
| 0.142857
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
294e21b460f84b34d33817fb1e929744bd154503
| 164
|
py
|
Python
|
src/GUI/__init__.py
|
shulip/ShoppingMallSystem
|
01e5a04a8353ca319ed2dc002fc358f6e44c33dd
|
[
"MIT"
] | null | null | null |
src/GUI/__init__.py
|
shulip/ShoppingMallSystem
|
01e5a04a8353ca319ed2dc002fc358f6e44c33dd
|
[
"MIT"
] | null | null | null |
src/GUI/__init__.py
|
shulip/ShoppingMallSystem
|
01e5a04a8353ca319ed2dc002fc358f6e44c33dd
|
[
"MIT"
] | 1
|
2021-04-22T15:14:21.000Z
|
2021-04-22T15:14:21.000Z
|
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from .LCEOWindow import *
from .LProprietorWindow import *
from .LLoginWindow import *
from .LManagerWindow import *
| 20.5
| 32
| 0.719512
| 19
| 164
| 6.210526
| 0.684211
| 0.254237
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007143
| 0.146341
| 164
| 7
| 33
| 23.428571
| 0.835714
| 0.256098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
298323d8c34d70f476cec079cc8b891953d0e46f
| 56
|
py
|
Python
|
leetcode/0-250/122-toLowerCase.py
|
palash24/algorithms-and-data-structures
|
164be7d1a501a21af808673888964bbab36243a1
|
[
"MIT"
] | 23
|
2018-11-06T03:54:00.000Z
|
2022-03-14T13:30:40.000Z
|
leetcode/0-250/122-toLowerCase.py
|
palash24/algorithms-and-data-structures
|
164be7d1a501a21af808673888964bbab36243a1
|
[
"MIT"
] | null | null | null |
leetcode/0-250/122-toLowerCase.py
|
palash24/algorithms-and-data-structures
|
164be7d1a501a21af808673888964bbab36243a1
|
[
"MIT"
] | 5
|
2019-05-24T16:56:45.000Z
|
2022-03-10T17:29:10.000Z
|
def toLowerCase(self, str):
return str.lower()
| 14
| 27
| 0.625
| 7
| 56
| 5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 56
| 3
| 28
| 18.666667
| 0.833333
| 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
| 1
| 0
|
0
| 5
|
461ea241be85f81f1ec96bd074df6d4fe326ba42
| 341
|
py
|
Python
|
interface/error.py
|
404neko/Marisa
|
29260845bd65df1a765d9cee847afe89c5a2f94f
|
[
"MIT"
] | null | null | null |
interface/error.py
|
404neko/Marisa
|
29260845bd65df1a765d9cee847afe89c5a2f94f
|
[
"MIT"
] | null | null | null |
interface/error.py
|
404neko/Marisa
|
29260845bd65df1a765d9cee847afe89c5a2f94f
|
[
"MIT"
] | null | null | null |
class SystemCallFault(Exception):
def __init__(self):
pass
def __str__(self):
return 'System not give expect response.'
class NecessaryLibraryNotFound(Exception):
def __init__(self,value = '?'):
self.value = value
def __str__(self):
return 'Necessary library \'%s\' not found.'%self.value
| 22.733333
| 63
| 0.648094
| 37
| 341
| 5.540541
| 0.540541
| 0.131707
| 0.156098
| 0.195122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240469
| 341
| 15
| 63
| 22.733333
| 0.791506
| 0
| 0
| 0.2
| 0
| 0
| 0.184211
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.1
| 0
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
46a2e23b98d5fff052b48bf193e3ac35af8c2c72
| 198
|
py
|
Python
|
tests/test_code_detection.py
|
serenpa/coast_core
|
b516b99201f22ab6dbf7e8dbb7c894fc5ec38668
|
[
"MIT"
] | 2
|
2018-10-29T00:13:03.000Z
|
2019-08-07T09:48:29.000Z
|
tests/test_code_detection.py
|
zedrem/coast_core
|
b516b99201f22ab6dbf7e8dbb7c894fc5ec38668
|
[
"MIT"
] | null | null | null |
tests/test_code_detection.py
|
zedrem/coast_core
|
b516b99201f22ab6dbf7e8dbb7c894fc5ec38668
|
[
"MIT"
] | 1
|
2019-02-18T00:51:23.000Z
|
2019-02-18T00:51:23.000Z
|
"""
Title:
Author:
Description:
"""
import unittest
from coast_core import code_detection
@unittest.skip("Not implemented yet")
class TestCodeDetection(unittest.TestCase):
pass
| 12.375
| 43
| 0.712121
| 21
| 198
| 6.619048
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191919
| 198
| 15
| 44
| 13.2
| 0.86875
| 0.146465
| 0
| 0
| 0
| 0
| 0.127517
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
46ae6594bcf08dc862f460c0d3e8be32c8aa381d
| 58,919
|
py
|
Python
|
backup/backup.py
|
quadcube/pyEchonetLite
|
b625d48ce073aaa727cfdf6dc674aebec6dd6eac
|
[
"MIT"
] | null | null | null |
backup/backup.py
|
quadcube/pyEchonetLite
|
b625d48ce073aaa727cfdf6dc674aebec6dd6eac
|
[
"MIT"
] | null | null | null |
backup/backup.py
|
quadcube/pyEchonetLite
|
b625d48ce073aaa727cfdf6dc674aebec6dd6eac
|
[
"MIT"
] | null | null | null |
#
# Random snippet
#
{
'CGC_SENSOR_RELATED': 0x00,
'CGC_AIR_CONDITIONER_RELATED': 0x01,
'CGC_HOUSING_RELATED': 0x02,
'CGC_COOKING_RELATED': 0x03,
'CGC_HEALTH_RELATED': 0x04,
'CGC_MANAGEMENT_RELATED': 0x05,
'CGC_AV_RELATED': 0x06,
'CGC_PROFILE_CLASS': 0x0E,
'CGC_USER_DEFINITION_CLASS': 0x0F,
}
CGC_SENSOR_RELATED = 0x00
CGC_AIR_CONDITIONER_RELATED = 0x01
CGC_HOUSING_RELATED = 0x02
CGC_COOKING_RELATED = 0x03
CGC_HEALTH_RELATED = 0x04
CGC_MANAGEMENT_RELATED = 0x05
CGC_AV_RELATED = 0x06
CGC_PROFILE_CLASS = 0x0E
CGC_USER_DEFINITION_CLASS = 0x0F
# Echonet Lite Class Group Code (EOJ)
{
"CGC_SENSOR_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x00
# Note: Sensor related device class group
'CC_GAS_LEAK_SENSOR': 0x01,
'CC_CRIME_PREVENTION_SENSOR': 0x02,
'CC_EMERGENCY_BUTTON': 0x03,
'CC_FIRST_AID_SENSOR': 0x04,
'CC_EARTHQUAKE_SENSOR': 0x05,
'CC_ELECTRIC_LEAK_SENSOR': 0x06,
'CC_HUMAN_DETECTION_SENSOR': 0x07,
'CC_VISITOR_SENSOR': 0x08,
'CC_CALL_SENSOR': 0x09,
'CC_CONDENSATION_SENSOR': 0x0A,
'CC_AIR_POLLUTION_SENSOR': 0x0B,
'CC_OXYGEN_SENSOR': 0x0C,
'CC_ILLUMINANCE_SENSOR': 0x0D,
'CC_SOUND_SENSOR': 0x0E,
'CC_MAILING_SENSOR': 0x0F,
'CC_WEIGHT_SENSOR': 0x10,
'CC_TEMPERTURE_SENSOR': 0x11,
'CC_HUMIDITY_SENSOR': 0x12,
'CC_RAIN_SENSOR': 0x13,
'CC_WATER_LEVEL_SENSOR': 0x14,
'CC_BATH_WATER_LEVEL_SENSOR': 0x15,
'CC_BATH_HEATING_STATUS_SENSOR': 0x16,
'CC_WATER_LEAK_SENSOR': 0x17,
'CC_WATER_OVERFLOW_SENSOR': 0x18,
'CC_FIRE_SENSOR': 0x19,
'CC_CIGARETTE_SMOKE_SENSOR': 0x1A,
'CC_CO2_SENSOR': 0x1B,
'CC_GAS_SENSOR': 0x1C,
'CC_VOC_SENSOR': 0x1D,
'CC_DIFFERENTIAL_PRESSURE_SENSOR': 0x1E,
'CC_AIR_SPEED_SENSOR': 0x1F,
'CC_ODOR_SENSOR': 0x20,
'CC_FLAME_SENSOR': 0x21,
'CC_ELECTRIC_ENERGY_SENSOR': 0x22,
'CC_CURRENT_VALUE_SENSOR': 0x23,
'CC_DAYLIGHT_SENSOR': 0x24,
'CC_WATER_FLOW_RATE_SENSOR': 0x25,
'CC_MICROMOTION_SENSOR': 0x26,
'CC_PASSAGE_SENSOR': 0x27,
'CC_BED_PRESENCE_SENSOR': 0x28,
'CC_OPEN_CLOSE_SENSOR': 0x29,
'CC_ACTIVITY_AMOUNT_SENSOR': 0x2A,
'CC_HUMAN_BODY_LOCATION_SENSOR': 0x2B,
'CC_SNOW_SENSOR': 0x2C,
'CC_AIR_PRESSURE_SENSOR': 0x2D,
},
"CGC_AIR_CONDITIONER_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x01
# Note: Air-conditional device class group
'CC_HOME_AIR_CONDITIONER': 0x30,
'CC_COLD_BLASTER': 0x31,
'CC_ELECTRIC_FAN': 0x32,
'CC_VENTILATION_FAN': 0x33,
'CC_AIR_CONDITIONER_VENTILATION_FAN': 0x34,
'CC_AIR_CLEANER': 0x35,
'CC_COLD_BLAST_FAN': 0x36,
'CC_CIRCULATOR': 0x37,
'CC_DEHUMIDIFIER': 0x38,
'CC_HUMIDIFIER': 0x39,
'CC_CEILING_FAN': 0x3A,
'CC_ELECTRIC_KOTATSU': 0x3B,
'CC_ELECTRIC_HEATING_PAD': 0x3C,
'CC_ELECTRIC_BLANKET': 0x3D,
'CC_SPACE_HEATER': 0x3E,
'CC_PANEL_HEATER': 0x3F,
'CC_ELECTRIC_CARPET': 0x40,
'CC_FLOOR_HEATER_0x01': 0x41,
'CC_ELECTRIC_HEATER': 0x42,
'CC_FAN_HEATER': 0x43,
'CC_BATTERY_CHARGER': 0x44,
'CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_INDOOR': 0x45,
'CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_OUTDOOR': 0x46,
'CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_THERMAL': 0x47,
'CC_COMMERCIAL_FAN_COIL_UNIT': 0x48,
'CC_COMMERCIAL_AIRCOND_COLD_SOURCE_CHILLER': 0x49,
'CC_COMMERCIAL_AIRCOND_HOT_SOURCE_BOILER': 0x50,
'CC_AIRCOND_VAV_FOR_COMMERCIAL_APPLICATIONS': 0x51,
'CC_AIRCOND_FOR_COMMERCIAL_APPLICATIONS': 0x52,
'CC_UNIT_COOLER': 0x53,
'CC_CONDENSING_UNIT_FOR_COMMERCIAL_APP': 0x54,
'CC_ELECTRIC_STORAGE_HEATER': 0x55,
},
"CGC_HOUSING_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x02
# Note: Housing/facility device class group
'CC_ELECTRICALLY_OPERATED_BLIND': 0x60,
'CC_ELECTRICALLY_OPERATED_SHUTTER': 0x61,
'CC_ELECTRICALLY_OPERATED_CURTAIN': 0x62,
'CC_ELECTRICALLY_OPERATED_RAIN_SLIDING_DOOR': 0x63,
'CC_ELECTRICALLY_OPERATED_GATE': 0x64,
'CC_ELECTRICALLY_OPERATED_WINDOW': 0x65,
'CC_AUTOMATICALLY_OPERATED_ENTRANCE_DOOR': 0x66,
'CC_GARDEN_SPRINKLER': 0x67,
'CC_FIRE_SPRINKLER': 0x68,
'CC_FOUNTAIN': 0x69,
'CC_INSTANTANEOUS_WATER_HEATER': 0x6A,
'CC_ELECTRIC_WATER_HEATER': 0x6B,
'CC_SOLAR_WATER_HEATER': 0x6C,
'CC_CIRCULATION_PUMP': 0x6D,
'CC_BIDET_EQUIPPED_TOILET': 0x6E,
'CC_ELECTRIC_LOCK': 0x6F,
'CC_GAS_LINE_VALVE': 0x70,
'CC_HOME_SAUNA': 0x71,
'CC_HOT_WATER_GENERATOR': 0x72,
'CC_BATHROOM_DRYER': 0x73,
'CC_HOME_ELEVATOR': 0x74,
'CC_ELECTRICALLY_OPERATED_ROOM_DIVIDER': 0x75,
'CC_HORIZONTAL_TRANSFER': 0x76,
'CC_ELECTRICALLY_OPERATED_CLOTH_DRYING_POLE': 0x77,
'CC_SEPTIC_TANK': 0x78,
'CC_HOME_SOLAR_POWER_GENERATION': 0x79,
'CC_COLD_HOT_WATER_HEAT_SOURCE_EQUIPMENT': 0x7A,
'CC_FLOOR_HEATER_0x02': 0x7B,
'CC_FUEL_CELL': 0x7C,
'CC_STORAGE_BATTERY': 0x7D,
'CC_ELECTRIC_VEHICLE_CHARGER_DISCHARGER': 0x7E,
'CC_ENGINE_COGENERATION': 0x7F,
'CC_ELECTRIC_ENERGY_METER': 0x80,
'CC_WATER_FLOW_METER': 0x81,
'CC_GAS_METER': 0x82,
'CC_LP_GAS_METER': 0x83,
'CC_CLOCK': 0x84,
'CC_AUTOMATIC_DOOR': 0x85,
'CC_COMMERCIAL_ELEVATOR': 0x86,
'CC_DISTRIBUTION_PANEL_METERING': 0x87,
'CC_LOW_VOLTAGE_SMART_ELECTRIC_ENERGY_METER': 0x88,
'CC_SMART_GAS_METER': 0x89,
'CC_HIGH_VOLTAGE_SMART_ELECTRIC_ENERGY_METER': 0x8A,
'CC_GENERAL_LIGHTING_CLASS': 0x90,
'CC_SINGLE_FUNCTION_LIGHTING': 0x91,
'CC_EMERGENCY_LIGHTING': 0x99,
'CC_EQUIPMENT_LIGHT': 0x9D,
'CC_BUZZER': 0xA0,
},
"CGC_COOKING_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x03
# Note: Cooking/Household-related device class group
'CC_COFFEE_MACHINE': 0xB0,
'CC_COFFEE_MILL': 0xB1,
'CC_ELECTRIC_HOT_WATER_POT': 0xB2,
'CC_ELECTRIC_STOVE': 0xB3,
'CC_TOASTER': 0xB4,
'CC_JUICER_FOOD_MIXER': 0xB5,
'CC_FOOD_PROCESSOR': 0xB6,
'CC_REFRIGERATOR': 0xB7,
'CC_COMBINATION_MICROWAVE_OVEN': 0xB8,
'CC_COOKING_HEATER': 0xB9,
'CC_OVEN': 0xBA,
'CC_RICE_COOKER': 0xBB,
'CC_ELECTRONIC_JAR': 0xBC,
'CC_DISH_WASHER': 0xBD,
'CC_DISH_DRYER': 0xBE,
'CC_ELECTRIC_RICE_CARD_COOKER': 0xBF,
'CC_KEEP_WARM_MACHINE': 0xC0,
'CC_RICE_MILL': 0xC1,
'CC_AUTOMATIC_BREAD_COOKER': 0xC2,
'CC_SLOW_COOKER': 0xC3,
'CC_ELECTRIC_PICKLES_COOKER': 0xC4,
'CC_WASHING_MACHINE': 0xC5,
'CC_CLOTHES_DRYER': 0xC6,
'CC_ELECTRIC_IRON': 0xC7,
'CC_TROUSER_PRESS': 0xC8,
'CC_FUTON_DRYER': 0xC9,
'CC_SMALL_ARTICLE_SHOES_DRYER': 0xCA,
'CC_ELECTRIC_VACUUM_CLEANER': 0xCB,
'CC_DISPOSER': 0xCC,
'CC_ELECTRIC_MOSQUITO_CATCHER': 0xCD,
'CC_COMMERCIAL_SHOW_CASE': 0xCE,
'CC_COMMERCIAL_REFRIGERATOR': 0xCF,
'CC_COMMERCIAL_HOT_CASE': 0xD0,
'CC_COMMERCIAL_FRYER': 0xD1,
'CC_COMMERCIAL_MICROWAVE_OVEN': 0xD2,
'CC_WASHER_AND_DRYER': 0xD3,
'CC_COMMERCIAL_SHOW_CASE_OUTDOOR_UNIT': 0xD4,
},
"CGC_HEALTH_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x04
# Note: Health-related device class group
'CC_WEIGHTING_MACHINE': 0x01,
'CC_CLINICAL_THERMOMETER': 0x02,
'CC_BLOOD_PRESSURE_METER': 0x03,
'CC_BLOOD_SUGAR_METER': 0x04,
'CC_BODY_FAT_METER': 0x05,
},
"CGC_MANAGEMENT_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x05
# Note: Management/operation-related device class group
'CC_SECURE_COMM_SHARED_KEY_SETUP_NODE': 0xFC,
'CC_SWITCH': 0xFD,
'CC_PORTABLE_TERMINAL': 0xFE,
'CC_CONTROLLER': 0xFF,
},
"CGC_AV_RELATED": {
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x06
# Note: Audiovisual-related device class group
'CC_DISPLAY': 0x01,
'CC_TELEVISION': 0x02,
'CC_AUDIO': 0x03,
'CC_NETWORK_CAMERA': 0x04,
},
"CGC_PROFILE_CLASS": {
# Echonet Lite Class Code (EOJ)
# Note: Class Group Code = 0x0E
'CC_NODE_PROFILE': 0xF0,
},
"CGC_USER_DEFINITION_CLASS": {
# Echonet Lite Instance Code (EOJ)
# Note: 1. Only for Class Code = Profile Class (0x0E)
# 2. only for Class Group Code = Node Profile Class (0xF0)
'IC_GENERAL_NODE': 0x01,
'IC_TRANSMISSION_ONLY_NODE': 0x02,
},
}
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x00
# Note: Sensor related device class group
CC_GAS_LEAK_SENSOR = 0x01
CC_CRIME_PREVENTION_SENSOR = 0x02
CC_EMERGENCY_BUTTON = 0x03
CC_FIRST_AID_SENSOR = 0x04
CC_EARTHQUAKE_SENSOR = 0x05
CC_ELECTRIC_LEAK_SENSOR = 0x06
CC_HUMAN_DETECTION_SENSOR = 0x07
CC_VISITOR_SENSOR = 0x08
CC_CALL_SENSOR = 0x09
CC_CONDENSATION_SENSOR = 0x0A
CC_AIR_POLLUTION_SENSOR = 0x0B
CC_OXYGEN_SENSOR = 0x0C
CC_ILLUMINANCE_SENSOR = 0x0D
CC_SOUND_SENSOR = 0x0E
CC_MAILING_SENSOR = 0x0F
CC_WEIGHT_SENSOR = 0x10
CC_TEMPERTURE_SENSOR = 0x11
CC_HUMIDITY_SENSOR = 0x12
CC_RAIN_SENSOR = 0x13
CC_WATER_LEVEL_SENSOR = 0x14
CC_BATH_WATER_LEVEL_SENSOR = 0x15
CC_BATH_HEATING_STATUS_SENSOR = 0x16
CC_WATER_LEAK_SENSOR = 0x17
CC_WATER_OVERFLOW_SENSOR = 0x18
CC_FIRE_SENSOR = 0x19
CC_CIGARETTE_SMOKE_SENSOR = 0x1A
CC_CO2_SENSOR = 0x1B
CC_GAS_SENSOR = 0x1C
CC_VOC_SENSOR = 0x1D
CC_DIFFERENTIAL_PRESSURE_SENSOR = 0x1E
CC_AIR_SPEED_SENSOR = 0x1F
CC_ODOR_SENSOR = 0x20
CC_FLAME_SENSOR = 0x21
CC_ELECTRIC_ENERGY_SENSOR = 0x22
CC_CURRENT_VALUE_SENSOR = 0x23
CC_DAYLIGHT_SENSOR = 0x24
CC_WATER_FLOW_RATE_SENSOR = 0x25
CC_MICROMOTION_SENSOR = 0x26
CC_PASSAGE_SENSOR = 0x27
CC_BED_PRESENCE_SENSOR = 0x28
CC_OPEN_CLOSE_SENSOR = 0x29
CC_ACTIVITY_AMOUNT_SENSOR = 0x2A
CC_HUMAN_BODY_LOCATION_SENSOR = 0x2B
CC_SNOW_SENSOR = 0x2C
CC_AIR_PRESSURE_SENSOR = 0x2D
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x01
# Note: Air-conditional device class group
CC_HOME_AIR_CONDITIONER = 0x30
CC_COLD_BLASTER = 0x31
CC_ELECTRIC_FAN = 0x32
CC_VENTILATION_FAN = 0x33
CC_AIR_CONDITIONER_VENTILATION_FAN = 0x34
CC_AIR_CLEANER = 0x35
CC_COLD_BLAST_FAN = 0x36
CC_CIRCULATOR = 0x37
CC_DEHUMIDIFIER = 0x38
CC_HUMIDIFIER = 0x39
CC_CEILING_FAN = 0x3A
CC_ELECTRIC_KOTATSU = 0x3B
CC_ELECTRIC_HEATING_PAD = 0x3C
CC_ELECTRIC_BLANKET = 0x3D
CC_SPACE_HEATER = 0x3E
CC_PANEL_HEATER = 0x3F
CC_ELECTRIC_CARPET = 0x40
CC_FLOOR_HEATER_0x01 = 0x41
CC_ELECTRIC_HEATER = 0x42
CC_FAN_HEATER = 0x43
CC_BATTERY_CHARGER = 0x44
CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_INDOOR = 0x45
CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_OUTDOOR = 0x46
CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_THERMAL = 0x47
CC_COMMERCIAL_FAN_COIL_UNIT = 0x48
CC_COMMERCIAL_AIRCOND_COLD_SOURCE_CHILLER = 0x49
CC_COMMERCIAL_AIRCOND_HOT_SOURCE_BOILER = 0x50
CC_AIRCOND_VAV_FOR_COMMERCIAL_APPLICATIONS = 0x51
CC_AIRCOND_FOR_COMMERCIAL_APPLICATIONS = 0x52
CC_UNIT_COOLER = 0x53
CC_CONDENSING_UNIT_FOR_COMMERCIAL_APP = 0x54
CC_ELECTRIC_STORAGE_HEATER = 0x55
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x02
# Note: Housing/facility device class group
CC_ELECTRICALLY_OPERATED_BLIND = 0x60
CC_ELECTRICALLY_OPERATED_SHUTTER = 0x61
CC_ELECTRICALLY_OPERATED_CURTAIN = 0x62
CC_ELECTRICALLY_OPERATED_RAIN_SLIDING_DOOR = 0x63
CC_ELECTRICALLY_OPERATED_GATE = 0x64
CC_ELECTRICALLY_OPERATED_WINDOW = 0x65
CC_AUTOMATICALLY_OPERATED_ENTRANCE_DOOR = 0x66
CC_GARDEN_SPRINKLER = 0x67
CC_FIRE_SPRINKLER = 0x68
CC_FOUNTAIN = 0x69
CC_INSTANTANEOUS_WATER_HEATER = 0x6A
CC_ELECTRIC_WATER_HEATER = 0x6B
CC_SOLAR_WATER_HEATER = 0x6C
CC_CIRCULATION_PUMP = 0x6D
CC_BIDET_EQUIPPED_TOILET = 0x6E
CC_ELECTRIC_LOCK = 0x6F
CC_GAS_LINE_VALVE = 0x70
CC_HOME_SAUNA = 0x71
CC_HOT_WATER_GENERATOR = 0x72
CC_BATHROOM_DRYER = 0x73
CC_HOME_ELEVATOR = 0x74
CC_ELECTRICALLY_OPERATED_ROOM_DIVIDER = 0x75
CC_HORIZONTAL_TRANSFER = 0x76
CC_ELECTRICALLY_OPERATED_CLOTH_DRYING_POLE = 0x77
CC_SEPTIC_TANK = 0x78
CC_HOME_SOLAR_POWER_GENERATION = 0x79
CC_COLD_HOT_WATER_HEAT_SOURCE_EQUIPMENT = 0x7A
CC_FLOOR_HEATER_0x02 = 0x7B
CC_FUEL_CELL = 0x7C
CC_STORAGE_BATTERY = 0x7D
CC_ELECTRIC_VEHICLE_CHARGER_DISCHARGER = 0x7E
CC_ENGINE_COGENERATION = 0x7F
CC_ELECTRIC_ENERGY_METER = 0x80
CC_WATER_FLOW_METER = 0x81
CC_GAS_METER = 0x82
CC_LP_GAS_METER = 0x83
CC_CLOCK = 0x84
CC_AUTOMATIC_DOOR = 0x85
CC_COMMERCIAL_ELEVATOR = 0x86
CC_DISTRIBUTION_PANEL_METERING = 0x87
CC_LOW_VOLTAGE_SMART_ELECTRIC_ENERGY_METER = 0x88
CC_SMART_GAS_METER = 0x89
CC_HIGH_VOLTAGE_SMART_ELECTRIC_ENERGY_METER = 0x8A
CC_GENERAL_LIGHTING_CLASS = 0x90
CC_SINGLE_FUNCTION_LIGHTING = 0x91
CC_EMERGENCY_LIGHTING = 0x99
CC_EQUIPMENT_LIGHT = 0x9D
CC_BUZZER = 0xA0
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x03
# Note: Cooking/Household-related device class group
CC_COFFEE_MACHINE = 0xB0
CC_COFFEE_MILL = 0xB1
CC_ELECTRIC_HOT_WATER_POT = 0xB2
CC_ELECTRIC_STOVE = 0xB3
CC_TOASTER = 0xB4
CC_JUICER_FOOD_MIXER = 0xB5
CC_FOOD_PROCESSOR = 0xB6
CC_REFRIGERATOR = 0xB7
CC_COMBINATION_MICROWAVE_OVEN = 0xB8
CC_COOKING_HEATER = 0xB9
CC_OVEN = 0xBA
CC_RICE_COOKER = 0xBB
CC_ELECTRONIC_JAR = 0xBC
CC_DISH_WASHER = 0xBD
CC_DISH_DRYER = 0xBE
CC_ELECTRIC_RICE_CARD_COOKER = 0xBF
CC_KEEP_WARM_MACHINE = 0xC0
CC_RICE_MILL = 0xC1
CC_AUTOMATIC_BREAD_COOKER = 0xC2
CC_SLOW_COOKER = 0xC3
CC_ELECTRIC_PICKLES_COOKER = 0xC4
CC_WASHING_MACHINE = 0xC5
CC_CLOTHES_DRYER = 0xC6
CC_ELECTRIC_IRON = 0xC7
CC_TROUSER_PRESS = 0xC8
CC_FUTON_DRYER = 0xC9
CC_SMALL_ARTICLE_SHOES_DRYER = 0xCA
CC_ELECTRIC_VACUUM_CLEANER = 0xCB
CC_DISPOSER = 0xCC
CC_ELECTRIC_MOSQUITO_CATCHER = 0xCD
CC_COMMERCIAL_SHOW_CASE = 0xCE
CC_COMMERCIAL_REFRIGERATOR = 0xCF
CC_COMMERCIAL_HOT_CASE = 0xD0
CC_COMMERCIAL_FRYER = 0xD1
CC_COMMERCIAL_MICROWAVE_OVEN = 0xD2
CC_WASHER_AND_DRYER = 0xD3
CC_COMMERCIAL_SHOW_CASE_OUTDOOR_UNIT = 0xD4
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x04
# Note: Health-related device class group
CC_WEIGHTING_MACHINE = 0x01
CC_CLINICAL_THERMOMETER = 0x02
CC_BLOOD_PRESSURE_METER = 0x03
CC_BLOOD_SUGAR_METER = 0x04
CC_BODY_FAT_METER = 0x05
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x05
# Note: Management/operation-related device class group
CC_SECURE_COMM_SHARED_KEY_SETUP_NODE = 0xFC
CC_SWITCH = 0xFD
CC_PORTABLE_TERMINAL = 0xFE
CC_CONTROLLER = 0xFF
# Echonet Lite Class Code (EOJ)
# Class Group Code = 0x06
# Note: Audiovisual-related device class group
CC_DISPLAY = 0x01
CC_TELEVISION = 0x02
CC_AUDIO = 0x03
CC_NETWORK_CAMERA = 0x04
# Echonet Lite Class Code (EOJ)
# Note: Class Group Code = 0x0E
CC_NODE_PROFILE = 0xF0
# Echonet Lite Instance Code (EOJ)
# Note: 1. Only for Class Code = Profile Class (0x0E)
# 2. only for Class Group Code = Node Profile Class (0xF0)
IC_GENERAL_NODE = 0x01
IC_TRANSMISSION_ONLY_NODE = 0x02
{
'ESV_SetI': 0x60,
'ESV_SetC': 0x61,
'ESV_Get': 0x62,
'ESV_INF_REQ': 0x63,
'ESV_SetGet': 0x6E,
'ESV_Set_Res': 0x71,
'ESV_Get_Res': 0x72,
'ESV_INF': 0x73,
'ESV_INFC': 0x74,
'ESV_INFC_Res': 0x7A,
'ESV_SetGet_Res': 0x7E,
'ESV_SetI_SNA': 0x50,
'ESV_SetC_SNA': 0x51,
'ESV_Get_SNA': 0x52,
'ESV_INF_SNA': 0x53,
'ESV_SetGet_SNA': 0x5E,
}
# Echonet Lite Service (ESV)
# Note: Service codes for request
ESV_SetI = 0x60
ESV_SetC = 0x61
ESV_Get = 0x62
ESV_INF_REQ = 0x63
ESV_SetGet = 0x6E
# Echonet Lite Service (ESV)
# Note: Service codes for response/notification
ESV_Set_Res = 0x71
ESV_Get_Res = 0x72
ESV_INF = 0x73
ESV_INFC = 0x74
ESV_INFC_Res = 0x7A
ESV_SetGet_Res = 0x7E
# Echonet Lite Service (ESV)
# Note: Service codes for response not possible
ESV_SetI_SNA = 0x50
ESV_SetC_SNA = 0x51
ESV_Get_SNA = 0x52
ESV_INF_SNA = 0x53
ESV_SetGet_SNA = 0x5E
# Echonet Lite Processing Target Property Counters (OPC)
"CC_GAS_LEAK_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_GAS_LEAK_OCCURRENCE_STATUS": "0xB1",
"EPC_GAS_LEAK_OCCURRENCE_STATUS_RESET": "0xBF"
},
"CC_CRIME_PREVENTION_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_INVASION_OCCURRENCE_STATUS": "0xB1",
"EPC_INVASION_OCCURRENCE_STATUS_RESET": "0xBF"
},
"CC_EMERGENCY_BUTTON": {
"EPC_EMERGENCY_OCCURRENCE_STATUS": "0xB1",
"EPC_EMERGENCY_OCCURRENCE_STATUS_RESET": "0xBF"
},
"CC_FIRST_AID_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_FIRST_AID_OCCURRENCE_STATUS": "0xB1",
"EPC_FIRST_AID_OCCURRENCE_STATUS_RESET": "0xBF"
},
"CC_EARTHQUAKE_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_EARTHQUAKE_OCCURRENCE_STATUS": "0xB1",
"EPC_EARTHQUAKE_OCCURRENCE_STATUS_RESET": "0xBF"
},
"CC_ELECTRIC_LEAK_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_ELECTRIC_LEAK_OCCURRENCE_STATUS": "0xB1",
"EPC_ELECTRIC_LEAK_OCCURRENCE_STATUS_RESET": "0xBF"
},
"CC_HUMAN_DETECTION_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_HUMAN_DETECTION_STATUS": "0xB1"
},
"CC_VISITOR_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_VISITOR_DETECTION_STATUS": "0xB1",
"EPC_VISITOR_DETECTION_HOLDING_TIME": "0xBE"
},
"CC_CALL_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_CALL_STATUS": "0xB1",
"EPC_CALL_HOLDING_TIME": "0xBE"
},
"CC_CONDENSATION_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_CONDENSATION_DETECTION_STATUS": "0xB1"
},
"CC_AIR_POLLUTION_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_AIR_POLLUTION_DETECTION_STATUS": "0xB1"
},
"CC_OXYGEN_SENSOR": {
"EPC_MEASURE_OXYGEN_CONCENTRATION_VALUE": "0xE0"
},
"CC_ILLUMINANCE_SENSOR": {
"EPC_MEASURE_ILLUMINANCE_LUX_VALUE": "0xE0",
"EPC_MEASURE_ILLUMINANCE_KILOLUX_VALUE": "0xE1"
},
"CC_SOUND_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_SOUND_DETECTION_STATUS": "0xB1",
"EPC_SOUND_DETECTION_HOLDING_TIME": "0xBE"
},
"CC_MAILING_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_MAILING_DETECTION_STATUS": "0xB1"
},
"CC_WEIGHT_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_WEIGHT_DETECTION_STATUS": "0xB1"
},
"CC_TEMPERTURE_SENSOR": {
"EPC_MEASURE_TEMPERATURE_VALUE": "0xE0"
},
"CC_HUMIDITY_SENSOR": {
"EPC_MEASURE_HUMIDITY_VALUE": "0xE0"
},
"CC_RAIN_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_RAIN_DETECTION_STATUS": "0xB1"
},
"CC_WATER_LEVEL_SENSOR": {
"EPC_WATER_LEVEL_OVER_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_WATER_LEVEL_OVER_DETECTION_STATUS": "0xB1",
"EPC_MEASURE_WATER_LEVEL_VALUE": "0xE0"
},
"CC_BATH_WATER_LEVEL_SENSOR": {
"EPC_BATH_WATER_LEVEL_OVER_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_BATH_WATER_LEVEL_OVER_DETECTION_STATUS": "0xB1",
"EPC_MEASURE_BATH_WATER_LEVEL_VALUE": "0xE0"
},
"CC_BATH_HEATING_STATUS_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_BATH_HEATING_DETECTION_STATUS": "0xB1"
},
"CC_WATER_LEAK_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_WATER_LEAK_DETECTION_STATUS": "0xB1"
},
"CC_WATER_OVERFLOW_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_WATER_OVERFLOW_DETECTION_STATUS": "0xB1"
},
"CC_FIRE_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_FIRE_OCCURRENCE_DETECTION_STATUS": "0xB1",
"EPC_FIRE_OCCURRENCE_DETECTION_STATUS_RESET": "0xBF"
},
"CC_CIGARETTE_SMOKE_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_SMOKE_DETECTION_STATUS": "0xB1"
},
"CC_CO2_SENSOR": {
"EPC_MEASURE_CO2_CONCENTRATION_VALUE": "0xE0"
},
"CC_GAS_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_GAS_DETECTION_STATUS": "0xB1",
"EPC_MEASURE_GAS_CONCENTRATION_VALUE": "0xE0"
},
"CC_VOC_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_VOC_DETECTION_STATUS": "0xB1",
"EPC_MEASURE_VOC_CONCENTRATION_VALUE": "0xE0"
},
"CC_DIFFERENTIAL_PRESSURE_SENSOR": {
"EPC_MEASURE_DIFFERENTIAL_PRESSURE_VALUE": "0xE0"
},
"CC_AIR_SPEED_SENSOR": {
"EPC_MEASURE_AIR_SPEED_VALUE": "0xE0",
"EPC_AIR_FLOW_DIRECTION": "0xE1"
},
"CC_ODOR_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_ODOR_DETECTION_STATUS": "0xB1",
"EPC_MEASURE_ODOR_VALUE": "0xE0"
},
"CC_FLAME_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_FLAME_DETECTION_STATUS": "0xB1",
"EPC_FLAME_DETECTION_STATUS_RESET": "0xBF"
},
"CC_ELECTRIC_ENERGY_SENSOR": {
"EPC_CUMULATIVE_AMOUNT_ELECTRIC_ENERGY": "0xE0",
"EPC_MEDIUM_CAPACITY_SENSOR_INSTANTANEOUS_ELECTRIC_ENERGY": "0xE1",
"EPC_SMALL_CAPACITY_SENSOR_INSTATANEOUS_ELECTRIC_ENERGY": "0xE2",
"EPC_LARGE_CAPACITY_SENSOR_INSTATANEOUS_ELECTRIC_ENERGY": "0xE3",
"EPC_CUMULATIVE_AMOUNT_ELECTRIC_ENERGY_MEASUREMENT_LOG": "0xE4",
"EPC_EFFECTIVE_VOLTAGE_VALUE": "0xE5"
},
"CC_CURRENT_VALUE_SENSOR": {
"EPC_MEASURE_CURRENT_VALUE_1": "0xE0",
"EPC_RATED_VOLTAGE_TO_BE_MEASURED": "0xE1",
"EPC_MEASURE_CURRENT_VALUE_2": "0xE2"
},
"CC_DAYLIGHT_SENSOR": {
},
"CC_WATER_FLOW_RATE_SENSOR": {
"EPC_CUMULATIVE_FLOW_RATE": "0xE0",
"EPC_FLOW_RATE": "0xE2"
},
"CC_MICROMOTION_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_MICROMOTION_DETECTION_STATUS": "0xB1",
"EPC_DETECTION_COUNTER": "0xB2",
"EPC_SAMPLING_COUNT": "0xBC",
"EPC_SAMPLING_CYCLE": "0xBD"
},
"CC_PASSAGE_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_PASSAGE_DETECTION_HOLD_TIME": "0xBE",
"EPC_PASSAGE_DETECTION_DIRECTION": "0xE0"
},
"CC_BED_PRESENCE_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_BED_PRESENCE_DETECTION_STATUS": "0xB1"
},
"CC_OPEN_CLOSE_SENSOR": {
"EPC_DEGREE_OF_OPENING_DETECTION_STATUS_1": "0xE0",
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_DEGREE_OF_OPENING_DETECTION_STATIS_2": "0xB1"
},
"CC_ACTIVITY_AMOUNT_SENSOR": {
"EPC_ACTIVITY_AMOUNT_LEVEL_1": "0xE0",
"EPC_MAXIMUM_NUMBER_OF_HUMAN_BODY_ID": "0xE1",
"EPC_ACTIVITY_AMOUNT_LEVEL_2": "0xE2",
"EPC_HUMAN_BODY_EXISTENCE_INFORMATION": "0xE3"
},
"CC_HUMAN_BODY_LOCATION_SENSOR": {
"EPC_HUMAN_BODY_DETECTION_LOCATION_1": "0xE0",
"EPC_MAXIMUM_NUMBER_OF_HUMAN_BODY_ID": "0xE1",
"EPC_HUMAN_BODY_DETECTION_LOCATION_2": "0xE2",
"EPC_HUMAN_BODY_EXISTENCE_INFORMATION": "0xE3"
},
"CC_SNOW_SENSOR": {
"EPC_DETECTION_THRESHOLD_LEVEL": "0xB0",
"EPC_SNOW_DETECTION_STATUS": "0xB1"
},
"CC_AIR_PRESSURE_SENSOR": {
"EPC_AIR_PRESSURE_MEASUREMENT": "0xE0"
}
},
"CGC_AIR_CONDITIONER_RELATED": {
"CC_HOME_AIR_CONDITIONER": {
"EPC_OPERATION_POWER_SAVING": "0x8F",
"EPC_OPERATION_MODE_SETTING": "0xB0",
"EPC_AUTOMATIC_TEMPERATURE_CONTROL_SETTING": "0xB1",
"EPC_NORMAL_HIGHSPEED_SILENT_OPERATION_SETTING": "0xB2",
"EPC_SET_TEMPERATURE_VALUE": "0xB3",
"EPC_SET_RELATIVE_HUMIDITY_IN_DEHUMIDIFYING_MODE": "0xB4",
"EPC_SET_TEMPERATURE_IN_COOLING_MODE": "0xB5",
"EPC_SET_TEMPERATURE_IN_HEATING_MODE": "0xB6",
"EPC_SET_TEMPERATURE_IN_DEHUMIDIFYING_MODE": "0xB7",
"EPC_RATED_POWER_CONSUMPTION": "0xB8",
"EPC_MEASURED_VALUE_OF_CURRENT_CONSUMPTION": "0xB9",
"EPC_MEASURED_VALUE_OF_ROOM_RELATIVE_HUMIDITY": "0xBA",
"EPC_MEASURED_VALUE_OF_ROOM_TEMPERATURE": "0xBB",
"EPC_SET_TEMPERATURE_OF_USER_REMOTE_CONTROL": "0xBC",
"EPC_MEASURED_COOLED_AIR_TEMPERATURE": "0xBD",
"EPC_MEASURED_OUTDOOR_AIR_TEMPERATURE": "0xBE",
"EPC_RELATIVE_TEMPERATURE_SETTING": "0xBF",
"EPC_AIRFLOW_RATE_SETTING": "0xA0",
"EPC_AUTOMATIC_CONTROL_AIRFLOW_DIRECTION_SETTING": "0xA1",
"EPC_AUTOMATIC_SWING_AIRFLOW_SETTING": "0xA3",
"EPC_AIRFLOW_DIRECTION_VERTICAL_SETTING": "0xA4",
"EPC_AIRFLOW_DIRECTION_HORIZONTAL_SETTING": "0xA5",
"EPC_SPECIAL_STATE": "0xAA",
"EPC_NON_PRIORITY_STATE": "0xAB",
"EPC_VENTILATION_FUNCTION_SETTING": "0xC0",
"EPC_HUMIDIFIER_FUNCTION_SETTING": "0xC1",
"EPC_VENTILATION_AIR_FLOW_RATE_SETTING": "0xC2",
"EPC_DEGREE_OF_HUMIDIFICATION_SETTING": "0xC4",
"EPC_MOUNTED_AIR_CLEANING_METHOD": "0xC6",
"EPC_AIR_PURIFIER_FUNCTION_SETTING": "0xC7",
"EPC_MOUNTED_AIR_REFRESH_METHOD": "0xC8",
"EPC_AIR_REFRESHER_FUNCTION_SETTING": "0xC9",
"EPC_MOUNTED_SELF_CLEANING_METHOD": "0xCA",
"EPC_SELF_CLEANING_FUNCTION_SETTING": "0xCB",
"EPC_SPECIAL_FUNCTION_SETTING": "0xCC",
"EPC_OPERATION_STATUS_OF_COMPONENTS": "0xCD",
"EPC_THERMOSTAT_SETTING_OVERRIDE_FUNCTION": "0xCE",
"EPC_AIR_PURIFICATION_MODE_SETTING": "0xCF",
"EPC_ON_TIMER_BASED_RESERVATION_SETTING": "0x90",
"EPC_ON_TIMER_SETTING_TIME": "0x91",
"EPC_ON_TIMER_SETTING_RELATIVE_TIME": "0x92",
"EPC_OFF_TIMER_BASED_RESERVATION_SETTING": "0x94",
"EPC_OFF_TIMER_SETTING_TIME": "0x95",
"EPC_OFF_TIMER_SETTING_RELATIVE_TIME": "0x96"
},
"CC_COLD_BLASTER": {
},
"CC_ELECTRIC_FAN": {
},
"CC_VENTILATION_FAN": {
"EPC_SET_ROOM_RELATIVE_HUMIDITY_VALUE": "0xB4"
},
"CC_AIR_CONDITIONER_VENTILATION_FAN": {
},
"CC_AIR_CLEANER": {
},
"CC_COLD_BLAST_FAN": {
},
"CC_CIRCULATOR": {
},
"CC_DEHUMIDIFIER": {
},
"CC_HUMIDIFIER": {
},
"CC_CEILING_FAN": {
},
"CC_ELECTRIC_KOTATSU": {
},
"CC_ELECTRIC_HEATING_PAD": {
},
"CC_ELECTRIC_BLANKET": {
},
"CC_SPACE_HEATER": {
},
"CC_PANEL_HEATER": {
},
"CC_ELECTRIC_CARPET": {
},
"CC_FLOOR_HEATER_0x01": {
},
"CC_ELECTRIC_HEATER": {
},
"CC_FAN_HEATER": {
},
"CC_BATTERY_CHARGER": {
},
"CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_INDOOR": {
},
"CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_OUTDOOR": {
},
"CC_PACKAGE_TYPE_COMMERCIAL_AIRCOND_THERMAL": {
},
"CC_COMMERCIAL_FAN_COIL_UNIT": {
},
"CC_COMMERCIAL_AIRCOND_COLD_SOURCE_CHILLER": {
},
"CC_COMMERCIAL_AIRCOND_HOT_SOURCE_BOILER": {
},
"CC_AIRCOND_VAV_FOR_COMMERCIAL_APPLICATIONS": {
},
"CC_AIRCOND_FOR_COMMERCIAL_APPLICATIONS": {
},
"CC_UNIT_COOLER": {
},
"CC_CONDENSING_UNIT_FOR_COMMERCIAL_APP": {
},
"CC_ELECTRIC_STORAGE_HEATER": {
}
},
"CGC_HOUSING_RELATED": {
"CC_ELECTRICALLY_OPERATED_BLIND": {
},
"CC_ELECTRICALLY_OPERATED_SHUTTER": {
},
"CC_ELECTRICALLY_OPERATED_CURTAIN": {
},
"CC_ELECTRICALLY_OPERATED_RAIN_SLIDING_DOOR": {
},
"CC_ELECTRICALLY_OPERATED_GATE": {
},
"CC_ELECTRICALLY_OPERATED_WINDOW": {
},
"CC_AUTOMATICALLY_OPERATED_ENTRANCE_DOOR": {
},
"CC_GARDEN_SPRINKLER": {
},
"CC_FIRE_SPRINKLER": {
},
"CC_FOUNTAIN": {
},
"CC_INSTANTANEOUS_WATER_HEATER": {
},
"CC_ELECTRIC_WATER_HEATER": {
},
"CC_SOLAR_WATER_HEATER": {
},
"CC_CIRCULATION_PUMP": {
},
"CC_BIDET_EQUIPPED_TOILET": {
},
"CC_ELECTRIC_LOCK": {
},
"CC_GAS_LINE_VALVE": {
},
"CC_HOME_SAUNA": {
},
"CC_HOT_WATER_GENERATOR": {
},
"CC_BATHROOM_DRYER": {
},
"CC_HOME_ELEVATOR": {
},
"CC_ELECTRICALLY_OPERATED_ROOM_DIVIDER": {
},
"CC_HORIZONTAL_TRANSFER": {
},
"CC_ELECTRICALLY_OPERATED_CLOTH_DRYING_POLE": {
},
"CC_SEPTIC_TANK": {
},
"CC_HOME_SOLAR_POWER_GENERATION": {
},
"CC_COLD_HOT_WATER_HEAT_SOURCE_EQUIPMENT": {
},
"CC_FLOOR_HEATER_0x02": {
},
"CC_FUEL_CELL": {
},
"CC_STORAGE_BATTERY": {
},
"CC_ELECTRIC_VEHICLE_CHARGER_DISCHARGER": {
},
"CC_ENGINE_COGENERATION": {
},
"CC_ELECTRIC_ENERGY_METER": {
},
"CC_WATER_FLOW_METER": {
},
"CC_GAS_METER": {
},
"CC_LP_GAS_METER": {
},
"CC_CLOCK": {
},
"CC_AUTOMATIC_DOOR": {
},
"CC_COMMERCIAL_ELEVATOR": {
},
"CC_DISTRIBUTION_PANEL_METERING": {
},
"CC_LOW_VOLTAGE_SMART_ELECTRIC_ENERGY_METER": {
},
"CC_SMART_GAS_METER": {
},
"CC_HIGH_VOLTAGE_SMART_ELECTRIC_ENERGY_METER": {
},
"CC_GENERAL_LIGHTING_CLASS": {
},
"CC_SINGLE_FUNCTION_LIGHTING": {
},
"CC_EMERGENCY_LIGHTING": {
},
"CC_EQUIPMENT_LIGHT": {
},
"CC_BUZZER": {
}
},
"CGC_COOKING_RELATED": {
"CC_COFFEE_MACHINE": {
},
"CC_COFFEE_MILL": {
},
"CC_ELECTRIC_HOT_WATER_POT": {
},
"CC_ELECTRIC_STOVE": {
},
"CC_TOASTER": {
},
"CC_JUICER_FOOD_MIXER": {
},
"CC_FOOD_PROCESSOR": {
},
"CC_REFRIGERATOR": {
},
"CC_COMBINATION_MICROWAVE_OVEN": {
},
"CC_COOKING_HEATER": {
},
"CC_OVEN": {
},
"CC_RICE_COOKER": {
},
"CC_ELECTRONIC_JAR": {
},
"CC_DISH_WASHER": {
},
"CC_DISH_DRYER": {
},
"CC_ELECTRIC_RICE_CARD_COOKER": {
},
"CC_KEEP_WARM_MACHINE": {
},
"CC_RICE_MILL": {
},
"CC_AUTOMATIC_BREAD_COOKER": {
},
"CC_SLOW_COOKER": {
},
"CC_ELECTRIC_PICKLES_COOKER": {
},
"CC_WASHING_MACHINE": {
},
"CC_CLOTHES_DRYER": {
},
"CC_ELECTRIC_IRON": {
},
"CC_TROUSER_PRESS": {
},
"CC_FUTON_DRYER": {
},
"CC_SMALL_ARTICLE_SHOES_DRYER": {
},
"CC_ELECTRIC_VACUUM_CLEANER": {
},
"CC_DISPOSER": {
},
"CC_ELECTRIC_MOSQUITO_CATCHER": {
},
"CC_COMMERCIAL_SHOW_CASE": {
},
"CC_COMMERCIAL_REFRIGERATOR": {
},
"CC_COMMERCIAL_HOT_CASE": {
},
"CC_COMMERCIAL_FRYER": {
},
"CC_COMMERCIAL_MICROWAVE_OVEN": {
},
"CC_WASHER_AND_DRYER": {
},
"CC_COMMERCIAL_SHOW_CASE_OUTDOOR_UNIT": {
}
},
"CGC_HEALTH_RELATED": {
"CC_WEIGHTING_MACHINE": {
},
"CC_CLINICAL_THERMOMETER": {
},
"CC_BLOOD_PRESSURE_METER": {
},
"CC_BLOOD_SUGAR_METER": {
},
"CC_BODY_FAT_METER": {
}
},
"CGC_MANAGEMENT_RELATED": {
"CC_SECURE_COMM_SHARED_KEY_SETUP_NODE": {
},
"CC_SWITCH": {
},
"CC_PORTABLE_TERMINAL": {
},
"CC_CONTROLLER": {
}
},
"CGC_AV_RELATED": {
"CC_DISPLAY": {
},
"CC_TELEVISION": {
},
"CC_AUDIO": {
},
"CC_NETWORK_CAMERA": {
}
},
"CGC_PROFILE_CLASS": {
"CC_NODE_PROFILE": {
"EPC_UNIQUE_IDENTIFIER_DATA": "0xBF",
"EPC_NUMBER_OF_SELF_NODE_INSTANCES": "0xD3",
"EPC_NUMBER_OF_SELF_NODE_CLASSES": "0xD4",
"EPC_INSTANCE_LIST_NOTIFICATION": "0xD5",
"EPC_SELF_NODE_INSTANCE_LIST_S": "0xD6",
"EPC_SELF_NODE_CLASS_LIST_S": "0xD7"
}
},
"CGC_USER_DEFINITION_CLASS": {
"IC_GENERAL_NODE": {
},
"IC_TRANSMISSION_ONLY_NODE": {
}
}
}
# Echonet Lite Property (EPC)
# Note: Super class
EPC_OPERATIONAL_STATUS = 0x80
EPC_INSTALLATION_LOCATION = 0x81
EPC_STANDARD_VERSION_INFORMATION = 0x82
EPC_IDENTIFICATION_NUMBER = 0x83
EPC_MEASURE_INSTANTANEOUS_POWER_CONSUMPTION = 0x84
EPC_MEASURE_CUMULATIVE_POWER_CONSUMPTION = 0x85
EPC_MANUFACTURER_FAULT_CODE = 0x86
EPC_CURRENT_LIMIT_SETTING = 0x87
EPC_FAULT_STATUS = 0x88
EPC_FAULT_DESCRIPTION = 0x89
EPC_MANUFACTURER_CODE = 0x8A
EPC_BUSINESS_FACILITY_CODE = 0x8B
EPC_PRODUCT_CODE = 0x8C
EPC_PRODUCTION_NUMBER = 0x8D
EPC_PRODUCTION_DATE = 0x8E
EPC_POWER_SAVING_OPERATIONAL_SETTING = 0x8F
EPC_REMOTE_CONTROL_SETTING = 0x93
EPC_CURRENT_TIME_SETTING = 0x97
EPC_CURRENT_DATE_SETTING = 0x98
EPC_POWER_LIMIT_SETTING = 0x99
EPC_CUMULATIVE_OPERATING_TIME = 0x9A
EPC_SET_M_PROPERTY_MAP = 0x9B
EPC_GET_M_PROPERTY_MAP = 0x9C
EPC_STATUS_CHANGE_ANNOUCEMENT_PROPERTY_MAP = 0x9D
EPC_SET_PROPERTY_MAP = 0x9E
EPC_GET_PROPERTY_MAP = 0x9F
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Gas Leak Sensor (0x01)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_GAS_LEAK_OCCURRENCE_STATUS = 0xB1
EPC_GAS_LEAK_OCCURRENCE_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Crime Prevention Sensor (0x02)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_INVASION_OCCURRENCE_STATUS = 0xB1
EPC_INVASION_OCCURRENCE_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Emergency Button (0x03)
EPC_EMERGENCY_OCCURRENCE_STATUS = 0xB1
EPC_EMERGENCY_OCCURRENCE_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), First-aid Sensor (0x04)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_FIRST_AID_OCCURRENCE_STATUS = 0xB1
EPC_FIRST_AID_OCCURRENCE_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Earthquake Sensor (0x05)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_EARTHQUAKE_OCCURRENCE_STATUS = 0xB1
EPC_EARTHQUAKE_OCCURRENCE_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Electric Leak Sensor (0x06)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_ELECTRIC_LEAK_OCCURRENCE_STATUS = 0xB1
EPC_ELECTRIC_LEAK_OCCURRENCE_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Human Detection Sensor (0x07)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_HUMAN_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Visitor Sensor (0x08)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_VISITOR_DETECTION_STATUS = 0xB1
EPC_VISITOR_DETECTION_HOLDING_TIME = 0xBE
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Call Sensor (0x09)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_CALL_STATUS = 0xB1
EPC_CALL_HOLDING_TIME = 0xBE
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Condensation Sensor (0x0A)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_CONDENSATION_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Air Pollution Sensor (0x0B)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_AIR_POLLUTION_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Oxygen Sensor (0x0C)
EPC_MEASURE_OXYGEN_CONCENTRATION_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Illuminance Sensor (0x0D)
EPC_MEASURE_ILLUMINANCE_LUX_VALUE = 0xE0
EPC_MEASURE_ILLUMINANCE_KILOLUX_VALUE = 0xE1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Sound Sensor (0x0E)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_SOUND_DETECTION_STATUS = 0xB1
EPC_SOUND_DETECTION_HOLDING_TIME = 0xBE
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Mailing Sensor (0x0F)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_MAILING_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Weight Sensor (0x10)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_WEIGHT_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Temperature Sensor (0x11)
EPC_MEASURE_TEMPERATURE_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Temperature Sensor (0x12)
EPC_MEASURE_HUMIDITY_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Rain Sensor (0x13)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_RAIN_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Water Level Sensor (0x14)
EPC_WATER_LEVEL_OVER_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_WATER_LEVEL_OVER_DETECTION_STATUS = 0xB1
EPC_MEASURE_WATER_LEVEL_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Bath Water Level Sensor (0x15)
EPC_BATH_WATER_LEVEL_OVER_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_BATH_WATER_LEVEL_OVER_DETECTION_STATUS = 0xB1
EPC_MEASURE_BATH_WATER_LEVEL_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Bath Heating Status Sensor (0x16)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_BATH_HEATING_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Water Leak Sensor (0x17)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_WATER_LEAK_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Water Overflow Sensor (0x18)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_WATER_OVERFLOW_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Fire Sensor (0x19)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_FIRE_OCCURRENCE_DETECTION_STATUS = 0xB1
EPC_FIRE_OCCURRENCE_DETECTION_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Cigarette Smoke Sensor (0x1A)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_SMOKE_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), CO2 Sensor (0x1B)
EPC_MEASURE_CO2_CONCENTRATION_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Gas Sensor (0x1C)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_GAS_DETECTION_STATUS = 0xB1
EPC_MEASURE_GAS_CONCENTRATION_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), VOC Sensor (0x1D)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_VOC_DETECTION_STATUS = 0xB1
EPC_MEASURE_VOC_CONCENTRATION_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Differential Pressure Sensor (0x1E)
EPC_MEASURE_DIFFERENTIAL_PRESSURE_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Air Speed Sensor (0x1F)
EPC_MEASURE_AIR_SPEED_VALUE = 0xE0
EPC_AIR_FLOW_DIRECTION = 0xE1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Odor Sensor (0x20)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_ODOR_DETECTION_STATUS = 0xB1
EPC_MEASURE_ODOR_VALUE = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Flame Sensor (0x21)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_FLAME_DETECTION_STATUS = 0xB1
EPC_FLAME_DETECTION_STATUS_RESET = 0xBF
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Electric Energy Sensor (0x22)
EPC_CUMULATIVE_AMOUNT_ELECTRIC_ENERGY = 0xE0
EPC_MEDIUM_CAPACITY_SENSOR_INSTANTANEOUS_ELECTRIC_ENERGY = 0xE1
EPC_SMALL_CAPACITY_SENSOR_INSTATANEOUS_ELECTRIC_ENERGY = 0xE2
EPC_LARGE_CAPACITY_SENSOR_INSTATANEOUS_ELECTRIC_ENERGY = 0xE3
EPC_CUMULATIVE_AMOUNT_ELECTRIC_ENERGY_MEASUREMENT_LOG = 0xE4
EPC_EFFECTIVE_VOLTAGE_VALUE = 0xE5
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Current Value Sensor (0x23)
EPC_MEASURE_CURRENT_VALUE_1 = 0xE0
EPC_RATED_VOLTAGE_TO_BE_MEASURED = 0xE1
EPC_MEASURE_CURRENT_VALUE_2 = 0xE2
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Water Flow Rate Sensor (0x25)
EPC_CUMULATIVE_FLOW_RATE = 0xE0
EPC_FLOW_RATE = 0xE2
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Micromotion Sensor (0x26)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_MICROMOTION_DETECTION_STATUS = 0xB1
EPC_DETECTION_COUNTER = 0xB2
EPC_SAMPLING_COUNT = 0xBC
EPC_SAMPLING_CYCLE = 0xBD
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Passage Sensor (0x27)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_PASSAGE_DETECTION_HOLD_TIME = 0xBE
EPC_PASSAGE_DETECTION_DIRECTION = 0xE0
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Bed Presence Sensor (0x28)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_BED_PRESENCE_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Open/Close Sensor (0x29)
EPC_DEGREE_OF_OPENING_DETECTION_STATUS_1 = 0xE0
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_DEGREE_OF_OPENING_DETECTION_STATIS_2 = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Activity Amount Sensor (0x2A)
EPC_ACTIVITY_AMOUNT_LEVEL_1 = 0xE0
EPC_MAXIMUM_NUMBER_OF_HUMAN_BODY_ID = 0xE1
EPC_ACTIVITY_AMOUNT_LEVEL_2 = 0xE2
EPC_HUMAN_BODY_EXISTENCE_INFORMATION = 0xE3
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Human Body Location Sensor (0x2B)
EPC_HUMAN_BODY_DETECTION_LOCATION_1 = 0xE0
EPC_MAXIMUM_NUMBER_OF_HUMAN_BODY_ID = 0xE1
EPC_HUMAN_BODY_DETECTION_LOCATION_2 = 0xE2
EPC_HUMAN_BODY_EXISTENCE_INFORMATION = 0xE3
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Snow Sensor (0x2C)
EPC_DETECTION_THRESHOLD_LEVEL = 0xB0
EPC_SNOW_DETECTION_STATUS = 0xB1
# Echonet Lite Property (EPC)
# Note: Sensor Class (0x00), Air Pressure Sensor (0x2D)
EPC_AIR_PRESSURE_MEASUREMENT = 0xE0
# Echonet Lite Property (EPC)
# Note: Node profile class
EPC_UNIQUE_IDENTIFIER_DATA = 0xBF
# Echonet Lite Property (EPC)
# Note: Node profile class
EPC_NUMBER_OF_SELF_NODE_INSTANCES = 0xD3
EPC_NUMBER_OF_SELF_NODE_CLASSES = 0xD4
EPC_INSTANCE_LIST_NOTIFICATION = 0xD5
EPC_SELF_NODE_INSTANCE_LIST_S = 0xD6
EPC_SELF_NODE_CLASS_LIST_S = 0xD7
# Echonet Lite Property (EPC)
# Note: Air Conditioner Related Class (0x01), Home Air Conditioner (0x30)
EPC_AIRCOND_OPERATION_POWER_SAVING = 0x8F
EPC_AIRCOND_OPERATION_MODE_SETTING = 0xB0
EPC_AIRCOND_AUTOMATIC_TEMPERATURE_CONTROL_SETTING = 0xB1
EPC_AIRCOND_NORMAL_HIGHSPEED_SILENT_OPERATION_SETTING = 0xB2
EPC_AIRCOND_SET_TEMPERATURE_VALUE = 0xB3
EPC_AIRCOND_SET_RELATIVE_HUMIDITY_IN_DEHUMIDIFYING_MODE = 0xB4
EPC_AIRCOND_SET_TEMPERATURE_IN_COOLING_MODE = 0xB5
EPC_AIRCOND_SET_TEMPERATURE_IN_HEATING_MODE = 0xB6
EPC_AIRCOND_SET_TEMPERATURE_IN_DEHUMIDIFYING_MODE = 0xB7
EPC_AIRCOND_RATED_POWER_CONSUMPTION = 0xB8
EPC_AIRCOND_MEASURED_VALUE_OF_CURRENT_CONSUMPTION = 0xB9
EPC_AIRCOND_MEASURED_VALUE_OF_ROOM_RELATIVE_HUMIDITY = 0xBA
EPC_AIRCOND_MEASURED_VALUE_OF_ROOM_TEMPERATURE = 0xBB
EPC_AIRCOND_SET_TEMPERATURE_OF_USER_REMOTE_CONTROL = 0xBC
EPC_AIRCOND_MEASURED_COOLED_AIR_TEMPERATURE = 0xBD
EPC_AIRCOND_MEASURED_OUTDOOR_AIR_TEMPERATURE = 0xBE
EPC_AIRCOND_RELATIVE_TEMPERATURE_SETTING = 0xBF
EPC_AIRCOND_AIRFLOW_RATE_SETTING = 0xA0
EPC_AIRCOND_AUTOMATIC_CONTROL_AIRFLOW_DIRECTION_SETTING = 0xA1
EPC_AIRCOND_AUTOMATIC_SWING_AIRFLOW_SETTING = 0xA3
EPC_AIRCOND_AIRFLOW_DIRECTION_VERTICAL_SETTING = 0xA4
EPC_AIRCOND_AIRFLOW_DIRECTION_HORIZONTAL_SETTING = 0xA5
EPC_AIRCOND_SPECIAL_STATE = 0xAA
EPC_AIRCOND_NON_PRIORITY_STATE = 0xAB
EPC_AIRCOND_VENTILATION_FUNCTION_SETTING = 0xC0
EPC_AIRCOND_HUMIDIFIER_FUNCTION_SETTING = 0xC1
EPC_AIRCOND_VENTILATION_AIR_FLOW_RATE_SETTING = 0xC2
EPC_AIRCOND_DEGREE_OF_HUMIDIFICATION_SETTING = 0xC4
EPC_AIRCOND_MOUNTED_AIR_CLEANING_METHOD = 0xC6
EPC_AIRCOND_AIR_PURIFIER_FUNCTION_SETTING = 0xC7
EPC_AIRCOND_MOUNTED_AIR_REFRESH_METHOD = 0xC8
EPC_AIRCOND_AIR_REFRESHER_FUNCTION_SETTING = 0xC9
EPC_AIRCOND_MOUNTED_SELF_CLEANING_METHOD = 0xCA
EPC_AIRCOND_SELF_CLEANING_FUNCTION_SETTING = 0xCB
EPC_AIRCOND_SPECIAL_FUNCTION_SETTING = 0xCC
EPC_AIRCOND_OPERATION_STATUS_OF_COMPONENTS = 0xCD
EPC_AIRCOND_THERMOSTAT_SETTING_OVERRIDE_FUNCTION = 0xCE
EPC_AIRCOND_AIR_PURIFICATION_MODE_SETTING = 0xCF
EPC_AIRCOND_ON_TIMER_BASED_RESERVATION_SETTING = 0x90
EPC_AIRCOND_ON_TIMER_SETTING_TIME = 0x91
EPC_AIRCOND_ON_TIMER_SETTING_RELATIVE_TIME = 0x92
EPC_AIRCOND_OFF_TIMER_BASED_RESERVATION_SETTING = 0x94
EPC_AIRCOND_OFF_TIMER_SETTING_TIME = 0x95
EPC_AIRCOND_OFF_TIMER_SETTING_RELATIVE_TIME = 0x96
| 38.839156
| 79
| 0.532443
| 5,490
| 58,919
| 5.183971
| 0.107286
| 0.027442
| 0.048489
| 0.056922
| 0.847786
| 0.799508
| 0.734329
| 0.695467
| 0.681167
| 0.659136
| 0
| 0.057599
| 0.400652
| 58,919
| 1,516
| 80
| 38.864776
| 0.748336
| 0
| 0
| 0.069384
| 0
| 0
| 0.267571
| 0.185051
| 0
| 0
| 0.057119
| 0
| 0
| 0
| null | null | 0.006071
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
310b2491566e14521a18a4c4ecc995447148e871
| 22
|
py
|
Python
|
Audio/__init__.py
|
jwbrooks0/johnspythonlibrary2
|
10ca519276d8c32da0fbd41a597f75c0c98a8736
|
[
"MIT"
] | null | null | null |
Audio/__init__.py
|
jwbrooks0/johnspythonlibrary2
|
10ca519276d8c32da0fbd41a597f75c0c98a8736
|
[
"MIT"
] | null | null | null |
Audio/__init__.py
|
jwbrooks0/johnspythonlibrary2
|
10ca519276d8c32da0fbd41a597f75c0c98a8736
|
[
"MIT"
] | null | null | null |
from ._audio import *
| 11
| 21
| 0.727273
| 3
| 22
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 22
| 1
| 22
| 22
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3115c82c1d9282c8328e484930f5cd3e68046323
| 238
|
py
|
Python
|
2-resources/BLOG/ciriculumn/week-18/W18D2_lectures/07-forms/app/forms/login.py
|
impastasyndrome/Lambda-Resource-Static-Assets
|
7070672038620d29844991250f2476d0f1a60b0a
|
[
"MIT"
] | null | null | null |
2-resources/BLOG/ciriculumn/week-18/W18D2_lectures/07-forms/app/forms/login.py
|
impastasyndrome/Lambda-Resource-Static-Assets
|
7070672038620d29844991250f2476d0f1a60b0a
|
[
"MIT"
] | null | null | null |
2-resources/BLOG/ciriculumn/week-18/W18D2_lectures/07-forms/app/forms/login.py
|
impastasyndrome/Lambda-Resource-Static-Assets
|
7070672038620d29844991250f2476d0f1a60b0a
|
[
"MIT"
] | 1
|
2021-11-05T07:48:26.000Z
|
2021-11-05T07:48:26.000Z
|
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
class LoginForm(FlaskForm):
username = StringField("Username")
password = PasswordField("Password")
submit = SubmitField("Sign In")
| 26.444444
| 59
| 0.764706
| 24
| 238
| 7.541667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151261
| 238
| 8
| 60
| 29.75
| 0.89604
| 0
| 0
| 0
| 0
| 0
| 0.096639
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.333333
| 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
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
311f4eebaf5e5687dfce906e4e12e03d2be2e017
| 8,100
|
py
|
Python
|
code/model/MT_model_reg.py
|
justinyeh1995/MTL_Research
|
ebc4e40869570ddcd2335a9b7f96c9b7d05e552a
|
[
"MIT"
] | null | null | null |
code/model/MT_model_reg.py
|
justinyeh1995/MTL_Research
|
ebc4e40869570ddcd2335a9b7f96c9b7d05e552a
|
[
"MIT"
] | null | null | null |
code/model/MT_model_reg.py
|
justinyeh1995/MTL_Research
|
ebc4e40869570ddcd2335a9b7f96c9b7d05e552a
|
[
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
import torch.nn.functional as F
from transformer import MultiHeadAtt as attention
## Huggin face - Tranformers ##
from transformers import BertModel, BertConfig
import args
arg = args.process_command()
lang = arg.lang
gpu = arg.gpu
if lang == 'en':
weight = 'bert-base-cased'
else:
weight = 'cl-tohoku/bert-base-japanese-whole-word-masking'
#torch.cuda.set_device(1)
embed_size = 300
gamma = 1
class BERT(nn.Module):
def __init__(self, bert_model = BertModel, bert_weight = weight, classes=2):
super(BERT, self).__init__()
self.loss1 = nn.MSELoss()
self.loss2 = nn.MSELoss()
# Main
self.pretrained = bert_model.from_pretrained(bert_weight)
for param in self.pretrained.parameters():
param.requires_grad = False
for param in self.pretrained.encoder.layer[-1].parameters():
param.requires_grad = True
for param in self.pretrained.encoder.layer[-2].parameters():
param.requires_grad = True
# for param in self.pretrained.encoder.layer[-3].parameters():
# param.requires_grad = True
# for param in self.pretrained.encoder.layer[-4].parameters():
# param.requires_grad = True
self.dropout = nn.Dropout(p=0.1)
self.final = nn.Linear(768, 1)
# Aux
self.pretrained_aux = bert_model.from_pretrained(bert_weight)
for param in self.pretrained_aux.parameters():
param.requires_grad = False
for param in self.pretrained_aux.encoder.layer[-1].parameters():
param.requires_grad = True
for param in self.pretrained_aux.encoder.layer[-2].parameters():
param.requires_grad = True
# for param in self.pretrained_aux.encoder.layer[-3].parameters():
# param.requires_grad = True
# for param in self.pretrained_aux.encoder.layer[-4].parameters():
# param.requires_grad = True
self.dropout_aux = nn.Dropout(p=0.1)
self.tolower = nn.Linear(1536, 768)
self.final_aux = nn.Linear(768, 1)
def loss_func(self):
return self.loss1
def main_task(self, data, doc1, doc2, mode='train'):
# content_ids
encoder = self.pretrained(data)
hidden_reps, cls_head = encoder[0], encoder[1]
ratings = self.final(cls_head)
if mode == 'train':
# aux_ids
encoder1 = self.pretrained_aux(doc1)
hidden_reps, cls_head = encoder1[0], encoder1[1]
rating1 = self.final_aux(cls_head)
return ratings, rating1
else:
return ratings
def forward(self, data_, mode='train'):
doc_org = data_[4]
y = data_[1]
if mode == 'train':
aux1 = data_[5]
aux2 = None
label = data_[3]
y_rating, y_label = self.main_task(doc_org, aux1, aux2, mode=mode)
return self.loss1(y_rating, y) + gamma*self.loss2(y_label.squeeze(), label)
else:
y_rating = self.main_task(doc_org, None, None, mode=mode)
return y_rating.view(y_rating.size(0),)
class MLP(nn.Module):
def __init__(self):
super(MLP, self).__init__()
self.loss1 = nn.MSELoss()
self.loss2 = nn.MSELoss()
self.doc0 = nn.Linear(300, 10)
self.doc1 = nn.Linear(10, 10)
self.final = nn.Linear(10, 1)
self.doc01 = nn.Linear(300, 10)
self.doc11 = nn.Linear(20, 10)
self.final1 = nn.Linear(10, 1)
def main_task(self, x, doc1, doc2, mode='train'):
x = F.avg_pool2d(x, (x.size(1), 1)).squeeze(1)
x = self.doc0(x)
x = F.relu(x)
x1 = self.doc1(x)
x1 = F.relu(x1)
rating = self.final(x1)
if mode == 'train':
doc1 = F.avg_pool2d(doc1, (doc1.size(1), 1)).squeeze(1)
doc1 = self.doc01(doc1)
doc1 = F.relu(doc1)
doc1 = self.doc11(torch.cat([x, doc1], 1))
doc1 = F.relu(doc1)
rating1 = self.final1(doc1)
return rating, rating1
else:
return rating
def loss_func(self):
return self.loss1
def forward(self, data_, mode='train'):
doc_org = data_[0]
y = data_[1]
if mode == 'train':
aux1 = data_[2]
aux2 = None
label = data_[3]
y_rating, y_label = self.main_task(doc_org, aux1, aux2, mode=mode)
return self.loss1(y_rating, y) + gamma*self.loss2(y_label.squeeze(), label)
else:
y_rating = self.main_task(doc_org, None, None, mode=mode)
return y_rating.view(y_rating.size(0),)
class CNN(nn.Module):
def __init__(self):
super(CNN, self).__init__()
self.loss1 = nn.MSELoss()
self.loss2 = nn.MSELoss()
self.conv0 = nn.Conv2d(1, 10, (3, 300), padding=(1, 0))
self.doc1 = nn.Linear(10, 10)
self.final = nn.Linear(10, 1)
self.conv01 = nn.Conv2d(1, 10, (3, 300), padding=(1, 0))
self.doc11 = nn.Linear(20, 10)
self.final1 = nn.Linear(10, 1)
def main_task(self, x, doc1, doc2, mode='train'):
x = self.conv0(x)
x = F.relu(x).squeeze(3)
x = F.max_pool1d(x, x.size(2)).squeeze(2)
x1 = self.doc1(x)
x1 = F.relu(x1)
rating = self.final(x1)
if mode == 'train':
doc1 = self.conv01(doc1)
doc1 = F.relu(doc1).squeeze(3)
doc1 = F.max_pool1d(doc1, doc1.size(2)).squeeze(2)
doc1 = self.doc11(torch.cat([x, doc1], 1))
doc1 = F.relu(doc1)
rating1 = self.final1(doc1)
return rating, rating1
else:
return rating
def loss_func(self):
return self.loss1
def forward(self, data_, mode='train'):
doc_org = data_[0].unsqueeze(1)
y = data_[1]
if mode == 'train':
aux1 = data_[2].unsqueeze(1)
aux2 = None
label = data_[3]
y_rating, y_label = self.main_task(doc_org, aux1, aux2, mode=mode)
return self.loss1(y_rating, y) + gamma*self.loss2(y_label.squeeze(), label)
else:
y_rating = self.main_task(doc_org, None, None, mode=mode)
return y_rating.view(y_rating.size(0),)
class RNN(nn.Module):
def __init__(self):
super(RNN, self).__init__()
self.loss1 = nn.MSELoss()
self.loss2 = nn.MSELoss()
self.rnn0 = nn.GRU(embed_size, 10, 1, bidirectional=True)
self.doc1 = nn.Linear(10*2, 10*2)
self.final = nn.Linear(10*2, 1)
self.rnn1 = nn.GRU(embed_size, 10, 1, bidirectional=True)
self.doc11 = nn.Linear(10*2*2, 10*2)
self.final1 = nn.Linear(10*2, 1)
def main_task(self, x, doc1, doc2, mode='train'):
x, hidden = self.rnn0(x)
x = F.avg_pool2d(x, (x.size(1), 1)).squeeze(1)
x1 = self.doc1(x)
x1 = F.relu(x1)
rating = self.final(x1)
if mode == 'train':
doc1, hidden = self.rnn1(doc1)
doc1 = F.avg_pool2d(doc1, (doc1.size(1), 1)).squeeze(1)
doc1 = self.doc11(torch.cat([x, doc1], 1))
doc1 = F.relu(doc1)
rating1 = self.final1(doc1)
return rating, rating1
else:
return rating
def loss_func(self):
return self.loss1
def forward(self, data_, mode='train'):
doc_org = data_[0]
y = data_[1]
if mode == 'train':
aux1 = data_[2]
aux2 = None
label = data_[3]
y_rating, y_label = self.main_task(doc_org, aux1, aux2, mode=mode)
return self.loss1(y_rating, y) + gamma*self.loss2(y_label.squeeze(), label)
else:
y_rating = self.main_task(doc_org, None, None, mode=mode)
return y_rating.view(y_rating.size(0),)
class Att(nn.Module):
def __init__(self):
super(Att, self).__init__()
self.loss1 = nn.MSELoss()
self.loss2 = nn.MSELoss()
self.att0 = attention(2, embed_size, 2)
self.doc1 = nn.Linear(embed_size, embed_size)
self.final = nn.Linear(embed_size, 1)
self.att1 = attention(2, embed_size, 2)
self.doc11 = nn.Linear(embed_size*2, embed_size)
self.final1 = nn.Linear(embed_size, 1)
def main_task(self, x, doc1, doc2, mode='train'):
x = self.att0(x)
x = F.avg_pool2d(x, (x.size(1), 1)).squeeze(1)
x1 = self.doc1(x)
x1 = F.relu(x1)
rating = self.final(x1)
if mode == 'train':
doc1 = self.att1(doc1)
doc1 = F.avg_pool2d(doc1, (doc1.size(1), 1)).squeeze(1)
doc1 = self.doc11(torch.cat([x, doc1], 1))
doc1 = F.relu(doc1)
rating1 = self.final1(doc1)
return rating, rating1
else:
return rating
def loss_func(self):
return self.loss1
def forward(self, data_, mode='train'):
doc_org = data_[0]
y = data_[1]
if mode == 'train':
aux1 = data_[2]
aux2 = None
label = data_[3]
y_rating, y_label = self.main_task(doc_org, aux1, aux2, mode=mode)
return self.loss1(y_rating, y) + gamma*self.loss2(y_label.squeeze(), label)
else:
y_rating = self.main_task(doc_org, None, None, mode=mode)
return y_rating.view(y_rating.size(0),)
| 24.620061
| 79
| 0.659753
| 1,300
| 8,100
| 3.963077
| 0.105385
| 0.033967
| 0.01941
| 0.027174
| 0.788432
| 0.752329
| 0.717585
| 0.717585
| 0.705745
| 0.678766
| 0
| 0.056541
| 0.185556
| 8,100
| 328
| 80
| 24.695122
| 0.72442
| 0.055679
| 0
| 0.649123
| 0
| 0
| 0.021494
| 0.00616
| 0
| 0
| 0
| 0
| 0
| 1
| 0.087719
| false
| 0
| 0.026316
| 0.02193
| 0.245614
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3125fb8962617ee67c0b8f9f226c4c72b708e149
| 216
|
py
|
Python
|
src/tests/MyApp/test_2.py
|
Py-Himanshu-Patel/Learn-PyTest
|
c7fea656c0473345a3d77c98bd41ec1db913ece0
|
[
"MIT"
] | null | null | null |
src/tests/MyApp/test_2.py
|
Py-Himanshu-Patel/Learn-PyTest
|
c7fea656c0473345a3d77c98bd41ec1db913ece0
|
[
"MIT"
] | null | null | null |
src/tests/MyApp/test_2.py
|
Py-Himanshu-Patel/Learn-PyTest
|
c7fea656c0473345a3d77c98bd41ec1db913ece0
|
[
"MIT"
] | null | null | null |
import pytest
@pytest.mark.skip
def test_example2():
print("Inside string test")
assert 'Hi' == 'Hi'
@pytest.mark.xfail
def test_example1():
assert 1 == 1
@pytest.mark.xfail
def test_example3():
assert 1 == 2
| 14.4
| 28
| 0.699074
| 33
| 216
| 4.484848
| 0.515152
| 0.202703
| 0.202703
| 0.243243
| 0.297297
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038251
| 0.152778
| 216
| 14
| 29
| 15.428571
| 0.770492
| 0
| 0
| 0.181818
| 0
| 0
| 0.101852
| 0
| 0
| 0
| 0
| 0
| 0.272727
| 1
| 0.272727
| true
| 0
| 0.090909
| 0
| 0.363636
| 0.090909
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
315cb2a3aa9c371e81ad402d8ed8c9fb8df5fb92
| 280
|
py
|
Python
|
projectB/projectBapp/models.py
|
cs-fullstack-2019-fall/django-models3-cw-b-chrisawill
|
acffb9e1ce08c0dc1384c00458dcaa9ff674c305
|
[
"Apache-2.0"
] | null | null | null |
projectB/projectBapp/models.py
|
cs-fullstack-2019-fall/django-models3-cw-b-chrisawill
|
acffb9e1ce08c0dc1384c00458dcaa9ff674c305
|
[
"Apache-2.0"
] | null | null | null |
projectB/projectBapp/models.py
|
cs-fullstack-2019-fall/django-models3-cw-b-chrisawill
|
acffb9e1ce08c0dc1384c00458dcaa9ff674c305
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
from django.utils import timezone
class Books(models.Model):
Name = models.CharField(max_length=100)
Page_Number = models.CharField(max_length=200)
Genre = models.CharField(max_length=50)
pub_date = models.Field(default=timezone.now)
| 31.111111
| 50
| 0.764286
| 40
| 280
| 5.225
| 0.625
| 0.215311
| 0.258373
| 0.344498
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033195
| 0.139286
| 280
| 8
| 51
| 35
| 0.834025
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.285714
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
31601a1f67f36f22c811926a271f5ea85e76edde
| 189
|
py
|
Python
|
pylib/circuitpy_sim/socketpool.py
|
kstillson/ktools
|
99690e5a40a0b94545e766efddfd2e39ff8cc78e
|
[
"MIT"
] | null | null | null |
pylib/circuitpy_sim/socketpool.py
|
kstillson/ktools
|
99690e5a40a0b94545e766efddfd2e39ff8cc78e
|
[
"MIT"
] | null | null | null |
pylib/circuitpy_sim/socketpool.py
|
kstillson/ktools
|
99690e5a40a0b94545e766efddfd2e39ff8cc78e
|
[
"MIT"
] | null | null | null |
import socket
class SocketPool:
def __init__(self, __unused_radio):
pass
@staticmethod
def socket():
return socket.socket(socket.AF_INET, socket.SOCK_STREAM)
| 17.181818
| 64
| 0.68254
| 22
| 189
| 5.454545
| 0.727273
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 189
| 10
| 65
| 18.9
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.142857
| 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
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
31a892d5f2a42d38281556c7057f0deac806f5ed
| 87
|
py
|
Python
|
Chapter 02/ch2_46.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
Chapter 02/ch2_46.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
Chapter 02/ch2_46.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
import random
print(random.randrange(20,50,3))
# using print() to print the result
| 21.75
| 36
| 0.724138
| 14
| 87
| 4.5
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068493
| 0.16092
| 87
| 4
| 36
| 21.75
| 0.794521
| 0.37931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
31b3e2cb3c01c04a6f6ce5888e39ba2c5fe087d7
| 129
|
py
|
Python
|
baselines/VLG-Net/lib/modeling/__init__.py
|
Soldelli/MAD
|
3c4e85cc792236fec2c94e5095f3bc793bf07529
|
[
"MIT"
] | 51
|
2021-12-06T10:30:47.000Z
|
2022-03-31T13:09:34.000Z
|
lib/modeling/__init__.py
|
Soldelli/VLG-Net
|
c14940a3f9c5ea7b642ff0608175e2484ae11c72
|
[
"MIT"
] | 3
|
2021-11-30T01:54:20.000Z
|
2022-01-23T07:57:19.000Z
|
baselines/VLG-Net/lib/modeling/__init__.py
|
Soldelli/MAD
|
3c4e85cc792236fec2c94e5095f3bc793bf07529
|
[
"MIT"
] | 1
|
2022-03-14T08:37:17.000Z
|
2022-03-14T08:37:17.000Z
|
from .model import VLG
ARCHITECTURES = {"VLG": VLG}
def build_model(cfg):
return ARCHITECTURES[cfg.MODEL.ARCHITECTURE](cfg)
| 21.5
| 53
| 0.744186
| 17
| 129
| 5.588235
| 0.588235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131783
| 129
| 5
| 54
| 25.8
| 0.848214
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 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
| 1
| 1
| 0
|
0
| 5
|
31ccd530d6d0035264d7b194cc4feb90c198455e
| 17,211
|
py
|
Python
|
src/parsing/parsetab.py
|
RodroVMS/cool-compiler-2022
|
718f962a647dc62be8562c946cf76fad419c08c5
|
[
"MIT"
] | null | null | null |
src/parsing/parsetab.py
|
RodroVMS/cool-compiler-2022
|
718f962a647dc62be8562c946cf76fad419c08c5
|
[
"MIT"
] | null | null | null |
src/parsing/parsetab.py
|
RodroVMS/cool-compiler-2022
|
718f962a647dc62be8562c946cf76fad419c08c5
|
[
"MIT"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = "rightASSIGNrightNOTnonassocLESSEQ<=left+-left*/rightISVOIDleft~left@left.ASSIGN CASE CLASS COMMENT ELSE ESAC FALSE FI ID IF IN INHERITS INT ISVOID LESSEQ LET LOOP NEW NOT OF POOL RET STRING THEN TRUE TYPE WHILEprogram : class_listclass_list : class ';' class_list\n | class ';'class : CLASS TYPE INHERITS TYPE '{' feature_list '}'\n | CLASS TYPE '{' feature_list '}'feature_list : attribute ';' feature_list\n | method ';' feature_list\n | emptyattribute : ID ':' TYPE ASSIGN expression\n | ID ':' TYPE method : ID '(' params_list ')' ':' TYPE '{' expression '}'params_list : param ',' params_list\n | paramparams_list : emptyparam : ID ':' TYPEexpression_list : expression ';' expression_list\n | expression ';' expression : ID ASSIGN expressionexpression : IF expression THEN expression ELSE expression FIexpression : WHILE expression LOOP expression POOLexpression : '{' expression_list '}'expression : LET let_list IN expressionlet_list : let_single ',' let_list\n | let_singlelet_single : ID ':' TYPE ASSIGN expression\n | ID ':' TYPEexpression : CASE expression OF case_list ESACcase_list : case_single case_list\n | case_singlecase_single : ID ':' TYPE RET expression ';'expression : expression '@' TYPE '.' ID '(' args_list ')'\n | expression '.' ID '(' args_list ')'\n | ID '(' args_list ')'args_list : expression ',' args_list\n | expressionargs_list : emptyexpression : NEW TYPEexpression : ISVOID expressionexpression : NOT expressionexpression : '~' expressionexpression : expression '+' expressionexpression : expression '-' expressionexpression : expression '/' expressionexpression : expression '*' expressionexpression : expression '<' expressionexpression : expression LESSEQ expressionexpression : expression '=' expressionexpression : '(' expression ')'expression : STRINGexpression : IDexpression : TRUEexpression : FALSEexpression : INTempty : "
_lr_action_items = {'CLASS':([0,5,],[4,4,]),'$end':([1,2,5,7,],[0,-1,-3,-2,]),';':([3,12,13,17,25,30,35,36,47,48,49,50,68,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,109,120,122,125,127,132,134,135,],[5,18,19,-5,-10,-4,-50,-9,-49,-51,-52,-53,95,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-20,-27,-11,-32,-19,-31,136,]),'TYPE':([4,8,20,32,43,52,56,98,124,],[6,10,25,51,74,78,83,111,130,]),'INHERITS':([6,],[8,]),'{':([6,10,31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,78,92,93,95,96,101,103,105,119,121,126,133,],[9,16,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,101,39,39,39,39,39,39,39,39,39,39,39,]),'ID':([9,16,18,19,21,31,34,37,38,39,40,41,42,44,45,46,54,55,57,58,59,60,61,62,63,64,92,93,95,96,97,99,101,103,104,105,113,119,121,126,133,136,],[15,15,15,15,26,35,26,35,35,35,71,35,35,35,35,35,35,35,84,35,35,35,35,35,35,35,35,35,35,35,71,114,35,35,117,35,114,35,35,35,35,-30,]),'}':([9,11,14,16,18,19,22,23,24,35,47,48,49,50,67,74,75,76,77,79,85,86,87,88,89,90,91,94,95,100,102,108,109,115,120,122,127,132,134,],[-54,17,-8,-54,-54,-54,30,-6,-7,-50,-49,-51,-52,-53,94,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-17,-48,-33,-16,-22,125,-20,-27,-32,-19,-31,]),':':([15,26,33,71,114,],[20,32,52,98,124,]),'(':([15,31,35,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,84,92,93,95,96,101,103,105,117,119,121,126,133,],[21,42,55,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,105,42,42,42,42,42,42,42,126,42,42,42,42,]),')':([21,27,28,29,34,35,47,48,49,50,51,53,55,73,74,75,76,77,79,80,81,82,85,86,87,88,89,90,91,94,100,102,103,105,109,116,118,120,122,126,127,131,132,134,],[-54,33,-13,-14,-54,-50,-49,-51,-52,-53,-15,-12,-54,100,-37,-38,-39,-40,-18,102,-35,-36,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-54,-54,-22,-34,127,-20,-27,-54,-32,134,-19,-31,]),'ASSIGN':([25,35,111,],[31,54,121,]),',':([28,35,47,48,49,50,51,70,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,109,111,120,122,127,129,132,134,],[34,-50,-49,-51,-52,-53,-15,97,-37,-38,-39,-40,-18,103,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-26,-20,-27,-32,-25,-19,-31,]),'IF':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,]),'WHILE':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,]),'LET':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,]),'CASE':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,]),'NEW':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'ISVOID':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'NOT':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'~':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,]),'STRING':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,]),'TRUE':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,]),'FALSE':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,]),'INT':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,]),'@':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,56,-49,-51,-52,-53,56,56,56,56,56,-37,56,56,56,56,56,56,56,56,56,56,56,56,-21,-48,-33,56,56,56,56,-20,-27,-32,56,56,-19,-31,56,]),'.':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,83,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,57,-49,-51,-52,-53,57,57,57,57,57,-37,57,57,57,57,57,104,57,57,57,57,57,57,57,-21,-48,-33,57,57,57,57,-20,-27,-32,57,57,-19,-31,57,]),'+':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,58,-49,-51,-52,-53,58,58,58,58,58,-37,-38,58,-40,58,58,-41,-42,-43,-44,58,58,58,-21,-48,-33,58,58,58,58,-20,-27,-32,58,58,-19,-31,58,]),'-':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,59,-49,-51,-52,-53,59,59,59,59,59,-37,-38,59,-40,59,59,-41,-42,-43,-44,59,59,59,-21,-48,-33,59,59,59,59,-20,-27,-32,59,59,-19,-31,59,]),'/':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,60,-49,-51,-52,-53,60,60,60,60,60,-37,-38,60,-40,60,60,60,60,-43,-44,60,60,60,-21,-48,-33,60,60,60,60,-20,-27,-32,60,60,-19,-31,60,]),'*':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,61,-49,-51,-52,-53,61,61,61,61,61,-37,-38,61,-40,61,61,61,61,-43,-44,61,61,61,-21,-48,-33,61,61,61,61,-20,-27,-32,61,61,-19,-31,61,]),'<':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,62,-49,-51,-52,-53,62,62,62,62,62,-37,-38,62,-40,62,62,-41,-42,-43,-44,None,None,None,-21,-48,-33,62,62,62,62,-20,-27,-32,62,62,-19,-31,62,]),'LESSEQ':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,63,-49,-51,-52,-53,63,63,63,63,63,-37,-38,63,-40,63,63,-41,-42,-43,-44,None,None,None,-21,-48,-33,63,63,63,63,-20,-27,-32,63,63,-19,-31,63,]),'=':([35,36,47,48,49,50,65,66,68,72,73,74,75,76,77,79,81,85,86,87,88,89,90,91,94,100,102,106,107,109,115,120,122,127,128,129,132,134,135,],[-50,64,-49,-51,-52,-53,64,64,64,64,64,-37,-38,64,-40,64,64,-41,-42,-43,-44,None,None,None,-21,-48,-33,64,64,64,64,-20,-27,-32,64,64,-19,-31,64,]),'THEN':([35,47,48,49,50,65,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,109,120,122,127,132,134,],[-50,-49,-51,-52,-53,92,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-20,-27,-32,-19,-31,]),'LOOP':([35,47,48,49,50,66,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,109,120,122,127,132,134,],[-50,-49,-51,-52,-53,93,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-20,-27,-32,-19,-31,]),'OF':([35,47,48,49,50,72,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,109,120,122,127,132,134,],[-50,-49,-51,-52,-53,99,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-20,-27,-32,-19,-31,]),'ELSE':([35,47,48,49,50,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,106,109,120,122,127,132,134,],[-50,-49,-51,-52,-53,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,119,-22,-20,-27,-32,-19,-31,]),'POOL':([35,47,48,49,50,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,107,109,120,122,127,132,134,],[-50,-49,-51,-52,-53,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,120,-22,-20,-27,-32,-19,-31,]),'FI':([35,47,48,49,50,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,109,120,122,127,128,132,134,],[-50,-49,-51,-52,-53,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-20,-27,-32,132,-19,-31,]),'IN':([35,47,48,49,50,69,70,74,75,76,77,79,85,86,87,88,89,90,91,94,100,102,109,110,111,120,122,127,129,132,134,],[-50,-49,-51,-52,-53,96,-24,-37,-38,-39,-40,-18,-41,-42,-43,-44,-45,-46,-47,-21,-48,-33,-22,-23,-26,-20,-27,-32,-25,-19,-31,]),'ESAC':([112,113,123,136,],[122,-29,-28,-30,]),'RET':([130,],[133,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'program':([0,],[1,]),'class_list':([0,5,],[2,7,]),'class':([0,5,],[3,3,]),'feature_list':([9,16,18,19,],[11,22,23,24,]),'attribute':([9,16,18,19,],[12,12,12,12,]),'method':([9,16,18,19,],[13,13,13,13,]),'empty':([9,16,18,19,21,34,55,103,105,126,],[14,14,14,14,29,29,82,82,82,82,]),'params_list':([21,34,],[27,53,]),'param':([21,34,],[28,28,]),'expression':([31,37,38,39,41,42,44,45,46,54,55,58,59,60,61,62,63,64,92,93,95,96,101,103,105,119,121,126,133,],[36,65,66,68,72,73,75,76,77,79,81,85,86,87,88,89,90,91,106,107,68,109,115,81,81,128,129,81,135,]),'expression_list':([39,95,],[67,108,]),'let_list':([40,97,],[69,110,]),'let_single':([40,97,],[70,70,]),'args_list':([55,103,105,126,],[80,116,118,131,]),'case_list':([99,113,],[112,123,]),'case_single':([99,113,],[113,113,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> program","S'",1,None,None,None),
('program -> class_list','program',1,'p_program','parsing_rules.py',13),
('class_list -> class ; class_list','class_list',3,'p_class_list','parsing_rules.py',18),
('class_list -> class ;','class_list',2,'p_class_list','parsing_rules.py',19),
('class -> CLASS TYPE INHERITS TYPE { feature_list }','class',7,'p_class','parsing_rules.py',27),
('class -> CLASS TYPE { feature_list }','class',5,'p_class','parsing_rules.py',28),
('feature_list -> attribute ; feature_list','feature_list',3,'p_feature_list','parsing_rules.py',39),
('feature_list -> method ; feature_list','feature_list',3,'p_feature_list','parsing_rules.py',40),
('feature_list -> empty','feature_list',1,'p_feature_list','parsing_rules.py',41),
('attribute -> ID : TYPE ASSIGN expression','attribute',5,'p_attribute','parsing_rules.py',49),
('attribute -> ID : TYPE','attribute',3,'p_attribute','parsing_rules.py',50),
('method -> ID ( params_list ) : TYPE { expression }','method',9,'p_method','parsing_rules.py',60),
('params_list -> param , params_list','params_list',3,'p_params_list','parsing_rules.py',66),
('params_list -> param','params_list',1,'p_params_list','parsing_rules.py',67),
('params_list -> empty','params_list',1,'p_params_list_empty','parsing_rules.py',74),
('param -> ID : TYPE','param',3,'p_param','parsing_rules.py',79),
('expression_list -> expression ; expression_list','expression_list',3,'p_expression_list','parsing_rules.py',86),
('expression_list -> expression ;','expression_list',2,'p_expression_list','parsing_rules.py',87),
('expression -> ID ASSIGN expression','expression',3,'p_expression_assigment','parsing_rules.py',95),
('expression -> IF expression THEN expression ELSE expression FI','expression',7,'p_expression_if_then_else','parsing_rules.py',102),
('expression -> WHILE expression LOOP expression POOL','expression',5,'p_expression_while','parsing_rules.py',109),
('expression -> { expression_list }','expression',3,'p_expression_block','parsing_rules.py',116),
('expression -> LET let_list IN expression','expression',4,'p_expression_let_in','parsing_rules.py',123),
('let_list -> let_single , let_list','let_list',3,'p_let_list','parsing_rules.py',130),
('let_list -> let_single','let_list',1,'p_let_list','parsing_rules.py',131),
('let_single -> ID : TYPE ASSIGN expression','let_single',5,'p_let_single','parsing_rules.py',139),
('let_single -> ID : TYPE','let_single',3,'p_let_single','parsing_rules.py',140),
('expression -> CASE expression OF case_list ESAC','expression',5,'p_expression_case','parsing_rules.py',150),
('case_list -> case_single case_list','case_list',2,'p_case_list','parsing_rules.py',157),
('case_list -> case_single','case_list',1,'p_case_list','parsing_rules.py',158),
('case_single -> ID : TYPE RET expression ;','case_single',6,'p_case_single','parsing_rules.py',166),
('expression -> expression @ TYPE . ID ( args_list )','expression',8,'p_expression_dispatch','parsing_rules.py',174),
('expression -> expression . ID ( args_list )','expression',6,'p_expression_dispatch','parsing_rules.py',175),
('expression -> ID ( args_list )','expression',4,'p_expression_dispatch','parsing_rules.py',176),
('args_list -> expression , args_list','args_list',3,'p_args_list','parsing_rules.py',192),
('args_list -> expression','args_list',1,'p_args_list','parsing_rules.py',193),
('args_list -> empty','args_list',1,'p_args_list_empty','parsing_rules.py',201),
('expression -> NEW TYPE','expression',2,'p_expression_instatiate','parsing_rules.py',205),
('expression -> ISVOID expression','expression',2,'p_expression_isvoid','parsing_rules.py',212),
('expression -> NOT expression','expression',2,'p_expression_not','parsing_rules.py',218),
('expression -> ~ expression','expression',2,'p_expression_complement','parsing_rules.py',225),
('expression -> expression + expression','expression',3,'p_expression_plus','parsing_rules.py',232),
('expression -> expression - expression','expression',3,'p_expression_minus','parsing_rules.py',239),
('expression -> expression / expression','expression',3,'p_expression_div','parsing_rules.py',246),
('expression -> expression * expression','expression',3,'p_expression_star','parsing_rules.py',252),
('expression -> expression < expression','expression',3,'p_expression_less','parsing_rules.py',258),
('expression -> expression LESSEQ expression','expression',3,'p_expression_lesseq','parsing_rules.py',264),
('expression -> expression = expression','expression',3,'p_expression_equals','parsing_rules.py',270),
('expression -> ( expression )','expression',3,'p_expression_parentheses','parsing_rules.py',276),
('expression -> STRING','expression',1,'p_expression_string','parsing_rules.py',283),
('expression -> ID','expression',1,'p_expression_variable','parsing_rules.py',290),
('expression -> TRUE','expression',1,'p_expression_true','parsing_rules.py',297),
('expression -> FALSE','expression',1,'p_expression_false','parsing_rules.py',304),
('expression -> INT','expression',1,'p_expression_int','parsing_rules.py',311),
('empty -> <empty>','empty',0,'p_empty','parsing_rules.py',318),
]
| 202.482353
| 8,550
| 0.649585
| 3,596
| 17,211
| 3.018354
| 0.07703
| 0.059701
| 0.069652
| 0.019163
| 0.612769
| 0.513543
| 0.417634
| 0.369265
| 0.369265
| 0.369265
| 0
| 0.342822
| 0.056998
| 17,211
| 84
| 8,551
| 204.892857
| 0.32594
| 0.004881
| 0
| 0.027027
| 1
| 0.013514
| 0.369233
| 0.017638
| 0.013514
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
73027eb94bff185e49afbb88fdeb3e3913cb91fe
| 299
|
py
|
Python
|
scrapy_app/scrapy_app/runspiders.py
|
shiromdk/scrapyd-heroku
|
4eb59cbdef8f032d32a79f9eab92351b4a167c71
|
[
"MIT"
] | null | null | null |
scrapy_app/scrapy_app/runspiders.py
|
shiromdk/scrapyd-heroku
|
4eb59cbdef8f032d32a79f9eab92351b4a167c71
|
[
"MIT"
] | null | null | null |
scrapy_app/scrapy_app/runspiders.py
|
shiromdk/scrapyd-heroku
|
4eb59cbdef8f032d32a79f9eab92351b4a167c71
|
[
"MIT"
] | null | null | null |
# import scrapy
# from scrapy.crawler import CrawlerProcess
# from scrapy.utils.project import get_project_settings
#
# def
# crawler_settings = get_project_settings()
# crawler = CrawlerProcess(get_project_settings())
# crawler.crawl(LoversSpider)
# crawler.start()
| 29.9
| 58
| 0.712375
| 31
| 299
| 6.645161
| 0.419355
| 0.145631
| 0.262136
| 0.242718
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.200669
| 299
| 9
| 59
| 33.222222
| 0.861925
| 0.936455
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7315dd8692474447d3948c9fee54abb029869d30
| 55
|
py
|
Python
|
subdir1/example_file4.py
|
kdeckerpyplus/PyPlus_Class1
|
f6d058db7dd612c22f619a24e76c46dd618ea478
|
[
"Apache-2.0"
] | null | null | null |
subdir1/example_file4.py
|
kdeckerpyplus/PyPlus_Class1
|
f6d058db7dd612c22f619a24e76c46dd618ea478
|
[
"Apache-2.0"
] | null | null | null |
subdir1/example_file4.py
|
kdeckerpyplus/PyPlus_Class1
|
f6d058db7dd612c22f619a24e76c46dd618ea478
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
print("This is example file 4")
| 13.75
| 31
| 0.690909
| 10
| 55
| 3.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.145455
| 55
| 3
| 32
| 18.333333
| 0.787234
| 0.363636
| 0
| 0
| 0
| 0
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
b441955caa337479035fca30a857a1a50ed5f67d
| 46
|
py
|
Python
|
app.py
|
matbog/epwWindroseDash
|
48c0ce14a11f39e30fe3089e792f0c0befa9c8bb
|
[
"MIT"
] | null | null | null |
app.py
|
matbog/epwWindroseDash
|
48c0ce14a11f39e30fe3089e792f0c0befa9c8bb
|
[
"MIT"
] | null | null | null |
app.py
|
matbog/epwWindroseDash
|
48c0ce14a11f39e30fe3089e792f0c0befa9c8bb
|
[
"MIT"
] | null | null | null |
#initial file
#test fonctionnement github ok
| 11.5
| 30
| 0.804348
| 6
| 46
| 6.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 3
| 31
| 15.333333
| 0.948718
| 0.891304
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b471f609065e1142f107b12935f7a960108cf5cc
| 77
|
py
|
Python
|
helm/dagster/schema/schema/charts/dagster/subschema/migrate.py
|
asamoal/dagster
|
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
|
[
"Apache-2.0"
] | null | null | null |
helm/dagster/schema/schema/charts/dagster/subschema/migrate.py
|
asamoal/dagster
|
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
|
[
"Apache-2.0"
] | null | null | null |
helm/dagster/schema/schema/charts/dagster/subschema/migrate.py
|
asamoal/dagster
|
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
|
[
"Apache-2.0"
] | null | null | null |
from pydantic import BaseModel
class Migrate(BaseModel):
enabled: bool
| 12.833333
| 30
| 0.766234
| 9
| 77
| 6.555556
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 77
| 5
| 31
| 15.4
| 0.936508
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c317ad419d87bdba4e916bc0907765fc8989af30
| 51
|
py
|
Python
|
opendatatools/nhindex/__init__.py
|
solider245/OpenData
|
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
|
[
"Apache-2.0"
] | 1,179
|
2018-05-28T07:14:41.000Z
|
2022-03-27T16:03:51.000Z
|
opendatatools/nhindex/__init__.py
|
taoyeah/OpenData
|
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
|
[
"Apache-2.0"
] | 42
|
2018-07-05T02:44:56.000Z
|
2022-03-29T12:12:30.000Z
|
opendatatools/nhindex/__init__.py
|
taoyeah/OpenData
|
031aa29b7b6b26a903f378e3da10520fd3a1b7ab
|
[
"Apache-2.0"
] | 297
|
2018-05-28T07:39:38.000Z
|
2022-03-28T02:35:59.000Z
|
# encoding: utf-8
from .nhindex_interface import *
| 17
| 32
| 0.764706
| 7
| 51
| 5.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.137255
| 51
| 3
| 32
| 17
| 0.840909
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c33cac999800b5fc68065181400007fba7fc8f4a
| 247
|
py
|
Python
|
tests/utils/get_file_extension.py
|
opendatadiscovery/odd-collector-aws
|
b654f8c8441b9a3d5427b119d9d6549e611c301a
|
[
"Apache-2.0"
] | 1
|
2022-03-10T11:17:07.000Z
|
2022-03-10T11:17:07.000Z
|
tests/utils/get_file_extension.py
|
opendatadiscovery/odd-collector-aws
|
b654f8c8441b9a3d5427b119d9d6549e611c301a
|
[
"Apache-2.0"
] | null | null | null |
tests/utils/get_file_extension.py
|
opendatadiscovery/odd-collector-aws
|
b654f8c8441b9a3d5427b119d9d6549e611c301a
|
[
"Apache-2.0"
] | null | null | null |
import odd_collector_aws.utils
def test_get_file_extension():
assert odd_collector_aws.utils.get_file_extension("file.csv") == ".csv"
assert (
odd_collector_aws.utils.get_file_extension("/path/to/file.csv.gz") == ".csv.gz"
)
| 27.444444
| 87
| 0.712551
| 36
| 247
| 4.527778
| 0.416667
| 0.220859
| 0.276074
| 0.368098
| 0.515337
| 0.515337
| 0.515337
| 0.515337
| 0
| 0
| 0
| 0
| 0.145749
| 247
| 8
| 88
| 30.875
| 0.772512
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.166667
| true
| 0
| 0.166667
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c35dab5963b5b24099eb512fcf6b743aceaa1b33
| 502
|
py
|
Python
|
run.py
|
yehonadav/aws_domain_transfer_between_accounts
|
f80dae05397e21b08bf8687e93636f7e19071180
|
[
"MIT"
] | null | null | null |
run.py
|
yehonadav/aws_domain_transfer_between_accounts
|
f80dae05397e21b08bf8687e93636f7e19071180
|
[
"MIT"
] | null | null | null |
run.py
|
yehonadav/aws_domain_transfer_between_accounts
|
f80dae05397e21b08bf8687e93636f7e19071180
|
[
"MIT"
] | null | null | null |
from aws_domain_transfer_between_accounts import transfer_domain_between_2_aws_accounts
from secret import (
domain,
from_aws_access_key_id,
from_aws_secret_access_key,
to_aws_access_key_id,
to_aws_secret_access_key,
to_account,
)
if __name__ == "__main__":
transfer_domain_between_2_aws_accounts(
from_aws_access_key_id,
from_aws_secret_access_key,
domain,
to_account,
to_aws_access_key_id,
to_aws_secret_access_key,
)
| 23.904762
| 87
| 0.741036
| 71
| 502
| 4.450704
| 0.239437
| 0.227848
| 0.151899
| 0.177215
| 0.708861
| 0.702532
| 0.702532
| 0.481013
| 0.481013
| 0.481013
| 0
| 0.005089
| 0.217131
| 502
| 20
| 88
| 25.1
| 0.798982
| 0
| 0
| 0.666667
| 0
| 0
| 0.015936
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.111111
| 0
| 0.111111
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c3661ac68daddbfd806a7a6e1289866c72611b70
| 66
|
py
|
Python
|
PyFrac/__init__.py
|
BatsiBoy/PyFrac
|
a898f6111295fa9196c382613639fc84e73d6035
|
[
"MIT"
] | null | null | null |
PyFrac/__init__.py
|
BatsiBoy/PyFrac
|
a898f6111295fa9196c382613639fc84e73d6035
|
[
"MIT"
] | null | null | null |
PyFrac/__init__.py
|
BatsiBoy/PyFrac
|
a898f6111295fa9196c382613639fc84e73d6035
|
[
"MIT"
] | null | null | null |
from . import engine
from . import coeffs
from . import variations
| 22
| 24
| 0.787879
| 9
| 66
| 5.777778
| 0.555556
| 0.576923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 66
| 3
| 24
| 22
| 0.945455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c37bb919d3dd19e88408db8f1eafa014a58500eb
| 92
|
py
|
Python
|
test_module.py
|
pankajr141/workflows
|
1f4d2cb206017f5d04059367af48dd1b78886d87
|
[
"Apache-2.0"
] | null | null | null |
test_module.py
|
pankajr141/workflows
|
1f4d2cb206017f5d04059367af48dd1b78886d87
|
[
"Apache-2.0"
] | null | null | null |
test_module.py
|
pankajr141/workflows
|
1f4d2cb206017f5d04059367af48dd1b78886d87
|
[
"Apache-2.0"
] | null | null | null |
# content of test_module.py
import os
def testcase1():
pass
def testcase2():
pass
| 10.222222
| 27
| 0.673913
| 13
| 92
| 4.692308
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.23913
| 92
| 8
| 28
| 11.5
| 0.842857
| 0.271739
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| true
| 0.4
| 0.2
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
5ee6774297af877d9ec468c210b7f9ab16970866
| 141
|
py
|
Python
|
bmemcached/__init__.py
|
alexmv/python-binary-memcached
|
41ed6136a029eda65271055c88f1bbbb4e4f1aba
|
[
"MIT"
] | 103
|
2015-01-30T15:38:37.000Z
|
2022-02-17T02:03:59.000Z
|
bmemcached/__init__.py
|
alexmv/python-binary-memcached
|
41ed6136a029eda65271055c88f1bbbb4e4f1aba
|
[
"MIT"
] | 135
|
2015-01-26T11:16:27.000Z
|
2021-12-28T14:58:07.000Z
|
bmemcached/__init__.py
|
alexmv/python-binary-memcached
|
41ed6136a029eda65271055c88f1bbbb4e4f1aba
|
[
"MIT"
] | 45
|
2015-02-04T16:32:29.000Z
|
2021-12-27T22:29:18.000Z
|
__all__ = ('Client', 'ReplicatingClient', 'DistributedClient', )
from bmemcached.client import Client, ReplicatingClient, DistributedClient
| 35.25
| 74
| 0.801418
| 11
| 141
| 9.909091
| 0.636364
| 0.422018
| 0.733945
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092199
| 141
| 3
| 75
| 47
| 0.851563
| 0
| 0
| 0
| 0
| 0
| 0.283688
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6f32546aaf0aae529e767f42e255515aadeaa337
| 49
|
py
|
Python
|
tests/settings.py
|
yezz123/pyngo
|
d11646455b19e35f72fc4b2f558f43afcd026685
|
[
"MIT"
] | 12
|
2021-12-14T12:41:52.000Z
|
2021-12-23T19:44:52.000Z
|
tests/settings.py
|
yezz123/pyngo
|
d11646455b19e35f72fc4b2f558f43afcd026685
|
[
"MIT"
] | 13
|
2022-01-03T11:26:57.000Z
|
2022-03-28T12:56:00.000Z
|
tests/settings.py
|
yezz123/pyngo
|
d11646455b19e35f72fc4b2f558f43afcd026685
|
[
"MIT"
] | 1
|
2022-02-26T12:08:25.000Z
|
2022-02-26T12:08:25.000Z
|
# Empty settings file just so we can pass Django
| 24.5
| 48
| 0.77551
| 9
| 49
| 4.222222
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204082
| 49
| 1
| 49
| 49
| 0.974359
| 0.938776
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
6f46549d1946462d6f7717342e983e87967aa87b
| 265
|
py
|
Python
|
bitsv/network/services/__init__.py
|
carpemer/bitsv
|
487e21d94956ebd4af4559b0e4e6a459da967183
|
[
"MIT"
] | 1
|
2019-08-31T14:14:23.000Z
|
2019-08-31T14:14:23.000Z
|
bitsv/network/services/__init__.py
|
xloem/bitsv
|
fa9b40c77a126023d71999045e5636461f18fe22
|
[
"MIT"
] | null | null | null |
bitsv/network/services/__init__.py
|
xloem/bitsv
|
fa9b40c77a126023d71999045e5636461f18fe22
|
[
"MIT"
] | null | null | null |
from .bitindex import BitIndex
from .bitindex3 import (
BitIndex3, BitIndex3MainNet, BitIndex3TestNet, BitIndex3STN)
from .insight import InsightAPI
from .network import NetworkAPI, set_service_timeout, DEFAULT_TIMEOUT
from .whatsonchain import WhatsonchainAPI
| 37.857143
| 69
| 0.841509
| 28
| 265
| 7.857143
| 0.607143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.113208
| 265
| 6
| 70
| 44.166667
| 0.914894
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6f66432befe9eaa2fc4c152a0929f6b97601df34
| 246
|
py
|
Python
|
app/error/handlers.py
|
GaryMcPolin/flask-login
|
36830a6c9213b0479f322c861125230829531fcc
|
[
"MIT"
] | null | null | null |
app/error/handlers.py
|
GaryMcPolin/flask-login
|
36830a6c9213b0479f322c861125230829531fcc
|
[
"MIT"
] | null | null | null |
app/error/handlers.py
|
GaryMcPolin/flask-login
|
36830a6c9213b0479f322c861125230829531fcc
|
[
"MIT"
] | null | null | null |
from app.error import bp
from flask import render_template
@bp.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
@bp.errorhandler(500)
def internal_server_error(error):
return render_template('500.html'), 500
| 18.923077
| 40
| 0.784553
| 38
| 246
| 4.894737
| 0.526316
| 0.225806
| 0.215054
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081818
| 0.105691
| 246
| 12
| 41
| 20.5
| 0.763636
| 0
| 0
| 0
| 0
| 0
| 0.065041
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
6f798c2612b10f988ab15381394d4bc12d2c468b
| 19
|
py
|
Python
|
src/omfgp/scp02.py
|
stepansnigirev/omfgp
|
1554714085018ff3706308f01d7ae549df0c92ee
|
[
"MIT"
] | null | null | null |
src/omfgp/scp02.py
|
stepansnigirev/omfgp
|
1554714085018ff3706308f01d7ae549df0c92ee
|
[
"MIT"
] | null | null | null |
src/omfgp/scp02.py
|
stepansnigirev/omfgp
|
1554714085018ff3706308f01d7ae549df0c92ee
|
[
"MIT"
] | 1
|
2020-12-03T09:18:15.000Z
|
2020-12-03T09:18:15.000Z
|
class SCP02:
pass
| 6.333333
| 12
| 0.736842
| 3
| 19
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 0.210526
| 19
| 2
| 13
| 9.5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
489c77a6dbab9ab9b13aec401722e56e4042788d
| 317
|
py
|
Python
|
assistant/corpus/corpus.py
|
Serafim-End/bearAI
|
32d9896ddcac8a7509f2e32a75923e17f29a9af8
|
[
"Unlicense"
] | 1
|
2017-06-05T10:37:43.000Z
|
2017-06-05T10:37:43.000Z
|
assistant/corpus/corpus.py
|
Serafim-End/bearAI
|
32d9896ddcac8a7509f2e32a75923e17f29a9af8
|
[
"Unlicense"
] | null | null | null |
assistant/corpus/corpus.py
|
Serafim-End/bearAI
|
32d9896ddcac8a7509f2e32a75923e17f29a9af8
|
[
"Unlicense"
] | null | null | null |
# coding: utf-8
class CorpusInterface(object):
def load_corpus(self, corpus):
pass
def read_corpus(self, filename):
pass
class Corpus(object):
def load_corpus(self, corpus):
raise NotImplementedError()
def read_corpus(self, filename):
raise NotImplementedError()
| 17.611111
| 36
| 0.659306
| 35
| 317
| 5.857143
| 0.428571
| 0.195122
| 0.126829
| 0.185366
| 0.526829
| 0.282927
| 0
| 0
| 0
| 0
| 0
| 0.004202
| 0.249211
| 317
| 17
| 37
| 18.647059
| 0.857143
| 0.041009
| 0
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
48c903506e64079a284fb4e0390107e72d885036
| 438
|
py
|
Python
|
tests/test_socfaker_timestamp.py
|
priamai/soc-faker
|
51b587f0cec52212136905280406e915006d2afc
|
[
"MIT"
] | 122
|
2020-02-21T16:06:54.000Z
|
2022-03-21T13:53:03.000Z
|
tests/test_socfaker_timestamp.py
|
priamai/soc-faker
|
51b587f0cec52212136905280406e915006d2afc
|
[
"MIT"
] | 13
|
2020-01-29T16:37:05.000Z
|
2022-01-27T21:30:10.000Z
|
tests/test_socfaker_timestamp.py
|
priamai/soc-faker
|
51b587f0cec52212136905280406e915006d2afc
|
[
"MIT"
] | 20
|
2020-04-10T11:59:29.000Z
|
2022-02-10T09:20:26.000Z
|
def test_socfaker_timestamp_in_the_past(socfaker_fixture):
assert socfaker_fixture.timestamp.in_the_past()
def test_socfaker_timestamp_in_the_future(socfaker_fixture):
assert socfaker_fixture.timestamp.in_the_future()
def test_socfaker_timestamp_current(socfaker_fixture):
assert socfaker_fixture.timestamp.current
def test_socfaker_timestamp_date_string(socfaker_fixture):
assert socfaker_fixture.timestamp.date_string
| 39.818182
| 60
| 0.86758
| 58
| 438
| 6.034483
| 0.224138
| 0.342857
| 0.171429
| 0.274286
| 0.708571
| 0.708571
| 0.285714
| 0.285714
| 0
| 0
| 0
| 0
| 0.077626
| 438
| 11
| 61
| 39.818182
| 0.866337
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5b151948253bd04248a38aa116cd073cd12618f3
| 243
|
py
|
Python
|
createsend/__init__.py
|
Smarsh/createsend-python
|
a1bf076d9f664df126aefe421f119c845c9b8cec
|
[
"MIT"
] | null | null | null |
createsend/__init__.py
|
Smarsh/createsend-python
|
a1bf076d9f664df126aefe421f119c845c9b8cec
|
[
"MIT"
] | null | null | null |
createsend/__init__.py
|
Smarsh/createsend-python
|
a1bf076d9f664df126aefe421f119c845c9b8cec
|
[
"MIT"
] | null | null | null |
from createsend import __version__
from createsend import *
from client import Client
from template import Template
from list import List
from segment import Segment
from subscriber import Subscriber
from campaign import Campaign
import utils
| 24.3
| 34
| 0.855967
| 33
| 243
| 6.181818
| 0.333333
| 0.137255
| 0.196078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139918
| 243
| 9
| 35
| 27
| 0.976077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d2c8d5274b3be6c0ebf1e52398619d985d1b062c
| 122
|
py
|
Python
|
utilities/factory.py
|
aleksanderujek/tsp
|
1b6b6930795c68b2faaf1f5329cb68175a6e2c24
|
[
"MIT"
] | null | null | null |
utilities/factory.py
|
aleksanderujek/tsp
|
1b6b6930795c68b2faaf1f5329cb68175a6e2c24
|
[
"MIT"
] | null | null | null |
utilities/factory.py
|
aleksanderujek/tsp
|
1b6b6930795c68b2faaf1f5329cb68175a6e2c24
|
[
"MIT"
] | null | null | null |
def factory(classToInstantiate):
def f(*arg):
def g():
return classToInstantiate(*arg)
return g
return f
| 20.333333
| 37
| 0.655738
| 15
| 122
| 5.333333
| 0.466667
| 0.175
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.237705
| 122
| 6
| 38
| 20.333333
| 0.860215
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.166667
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
d2d6fe863ea00d194e1e80c3c44ac35349067638
| 4,984
|
py
|
Python
|
tests/example_tx_requests.py
|
geometry-labs/icon-sdk-python
|
e530df02eb16b394c3022d2d7d0383bd972e129a
|
[
"Apache-2.0"
] | 51
|
2018-08-29T04:15:36.000Z
|
2022-03-14T10:02:08.000Z
|
tests/example_tx_requests.py
|
geometry-labs/icon-sdk-python
|
e530df02eb16b394c3022d2d7d0383bd972e129a
|
[
"Apache-2.0"
] | 24
|
2018-09-03T03:16:19.000Z
|
2022-01-17T08:28:04.000Z
|
tests/example_tx_requests.py
|
geometry-labs/icon-sdk-python
|
e530df02eb16b394c3022d2d7d0383bd972e129a
|
[
"Apache-2.0"
] | 44
|
2018-09-06T22:36:16.000Z
|
2022-03-15T06:46:05.000Z
|
# -*- coding: utf-8 -*-
# Copyright 2018 ICON Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
TEST_REQUEST_TRANSFER_ICX = {
"jsonrpc": "2.0",
"method": "icx_sendTransaction",
"id": 1234,
"params": {
"version": "0x3",
"from": "hxbe258ceb872e08851f1f59694dac2558708ece11",
"to": "hx5bfdb090f43a808005ffc27c25b213145e80b7cd",
"value": "0xde0b6b3a7640000",
"stepLimit": "0x12345",
"timestamp": "0x563a6cf330136",
"nid": "0x3f",
"nonce": "0x1",
"signature": "VAia7YZ2Ji6igKWzjR2YsGa2m53nKPrfK7uXYW78QLE+ATehAVZPC40szvAiA6NEU5gCYB4c4qaQzqDh2ugcHgA="
}
}
TEST_REQUEST_SCORE_FUNCTION_CALL = {
"jsonrpc": "2.0",
"method": "icx_sendTransaction",
"id": 1234,
"params": {
"version": "0x3",
"from": "hxbe258ceb872e08851f1f59694dac2558708ece11",
"to": "cxb0776ee37f5b45bfaea8cff1d8232fbb6122ec32",
"stepLimit": "0x12345",
"timestamp": "0x563a6cf330136",
"nid": "0x3f",
"nonce": "0x1",
"signature": "VAia7YZ2Ji6igKWzjR2YsGa2m53nKPrfK7uXYW78QLE+ATehAVZPC40szvAiA6NEU5gCYB4c4qaQzqDh2ugcHgA=",
"dataType": "call",
"data": {
"method": "transfer",
"params": {
"to": "hxab2d8215eab14bc6bdd8bfb2c8151257032ecd8b",
"value": "0x1"
}
}
}
}
TEST_REQUEST_SCORE_ISNTALL = {
"jsonrpc": "2.0",
"method": "icx_sendTransaction",
"id": 1234,
"params": {
"version": "0x3",
"from": "hxbe258ceb872e08851f1f59694dac2558708ece11",
"to": "cx0000000000000000000000000000000000000000",
"stepLimit": "0x12345",
"timestamp": "0x563a6cf330136",
"nid": "0x3f",
"nonce": "0x1",
"signature": "VAia7YZ2Ji6igKWzjR2YsGa2m53nKPrfK7uXYW78QLE+ATehAVZPC40szvAiA6NEU5gCYB4c4qaQzqDh2ugcHgA=",
"dataType": "deploy",
"data": {
"contentType": "application/zip",
"content": "0x1867291283973610982301923812873419826abcdef91827319263187263a7326e...",
"params": {
"name": "ABCToken",
"symbol": "abc",
"decimals": "0x12"
}
}
}
}
TEST_REQUEST_SCORE_UPDATE = {
"jsonrpc": "2.0",
"method": "icx_sendTransaction",
"id": 1234,
"params": {
"version": "0x3",
"from": "hxbe258ceb872e08851f1f59694dac2558708ece11",
"to": "cxb0776ee37f5b45bfaea8cff1d8232fbb6122ec32",
"stepLimit": "0x12345",
"timestamp": "0x563a6cf330136",
"nid": "0x3f",
"nonce": "0x1",
"signature": "VAia7YZ2Ji6igKWzjR2YsGa2m53nKPrfK7uXYW78QLE+ATehAVZPC40szvAiA6NEU5gCYB4c4qaQzqDh2ugcHgA=",
"dataType": "deploy",
"data": {
"contentType": "application/zip",
"content": "0x1867291283973610982301923812873419826abcdef91827319263187263a7326e...",
"params": {
"amount": "0x1234"
}
}
}
}
TEST_REQUEST_SEND_MESSAGE = {
"jsonrpc": "2.0",
"method": "icx_sendTransaction",
"id": 1234,
"params": {
"version": "0x3",
"from": "hxbe258ceb872e08851f1f59694dac2558708ece11",
"to": "hxbe258ceb872e08851f1f59694dac2558708ece11",
"stepLimit": "0x12345",
"timestamp": "0x563a6cf330136",
"nid": "0x3f",
"nonce": "0x1",
"signature": "VAia7YZ2Ji6igKWzjR2YsGa2m53nKPrfK7uXYW78QLE+ATehAVZPC40szvAiA6NEU5gCYB4c4qaQzqDh2ugcHgA=",
"dataType": "message",
"data": "0x4c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e7365637465747572206164697069736963696e6720656c69742c2073656420646f20656975736d6f642074656d706f7220696e6369646964756e74207574206c61626f726520657420646f6c6f7265206d61676e6120616c697175612e20557420656e696d206164206d696e696d2076656e69616d2c2071756973206e6f737472756420657865726369746174696f6e20756c6c616d636f206c61626f726973206e69736920757420616c697175697020657820656120636f6d6d6f646f20636f6e7365717561742e2044756973206175746520697275726520646f6c6f7220696e20726570726568656e646572697420696e20766f6c7570746174652076656c697420657373652063696c6c756d20646f6c6f726520657520667567696174206e756c6c612070617269617475722e204578636570746575722073696e74206f6363616563617420637570696461746174206e6f6e2070726f6964656e742c2073756e7420696e2063756c706120717569206f666669636961206465736572756e74206d6f6c6c697420616e696d20696420657374206c61626f72756d2e"
}
}
| 40.193548
| 912
| 0.678571
| 286
| 4,984
| 11.751748
| 0.41958
| 0.004165
| 0.013389
| 0.022315
| 0.479917
| 0.479917
| 0.479917
| 0.479917
| 0.479917
| 0.479917
| 0
| 0.369477
| 0.209872
| 4,984
| 123
| 913
| 40.520325
| 0.484002
| 0.114366
| 0
| 0.653846
| 0
| 0
| 0.636281
| 0.440555
| 0
| 0
| 0.277336
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d2d90d4d947f617f3e0a7d4ca99f29f920011544
| 247
|
py
|
Python
|
reprlearn/layers/conv_layer.py
|
cocoaaa/ReprLearn
|
58dc682aa62dbd59201ccc55b9b26480ff3d6773
|
[
"MIT"
] | null | null | null |
reprlearn/layers/conv_layer.py
|
cocoaaa/ReprLearn
|
58dc682aa62dbd59201ccc55b9b26480ff3d6773
|
[
"MIT"
] | null | null | null |
reprlearn/layers/conv_layer.py
|
cocoaaa/ReprLearn
|
58dc682aa62dbd59201ccc55b9b26480ff3d6773
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
"""
@author: sherlock
@contact: sherlockliao01@gmail.com
"""
from torch import nn
def conv3x3(in_planes, out_planes, stride=1):
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)
| 20.583333
| 96
| 0.736842
| 37
| 247
| 4.783784
| 0.756757
| 0.090395
| 0.124294
| 0.19209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04186
| 0.129555
| 247
| 11
| 97
| 22.454545
| 0.781395
| 0.283401
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
d2e3f5d9a0e72315749905ee526bffcb4b979f26
| 88
|
py
|
Python
|
watchdogs/web/views/__init__.py
|
watchdogoblivion/watchdogs-offsec
|
66212988a83b97e54caabcf3ec1ea48e76dafedc
|
[
"MIT"
] | null | null | null |
watchdogs/web/views/__init__.py
|
watchdogoblivion/watchdogs-offsec
|
66212988a83b97e54caabcf3ec1ea48e76dafedc
|
[
"MIT"
] | 10
|
2021-08-19T17:48:20.000Z
|
2021-09-15T03:40:40.000Z
|
watchdogs/web/views/__init__.py
|
watchdogoblivion/offsec-python
|
66212988a83b97e54caabcf3ec1ea48e76dafedc
|
[
"MIT"
] | null | null | null |
from .BlindSQLRRView import BlindSQLRRView
from .ErrorSQLIRRView import ErrorSQLIRRView
| 29.333333
| 44
| 0.886364
| 8
| 88
| 9.75
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 88
| 2
| 45
| 44
| 0.975
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.