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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e088db8bd0061955eecad17c452bcd01329eabc6
| 164
|
py
|
Python
|
puzzle/models/sql/__init__.py
|
J35P312/PuzzleWin
|
20f2521306492722fc035b5db18927578f1eae4a
|
[
"MIT"
] | 1
|
2018-01-28T23:51:32.000Z
|
2018-01-28T23:51:32.000Z
|
puzzle/models/sql/__init__.py
|
J35P312/PuzzleWin
|
20f2521306492722fc035b5db18927578f1eae4a
|
[
"MIT"
] | null | null | null |
puzzle/models/sql/__init__.py
|
J35P312/PuzzleWin
|
20f2521306492722fc035b5db18927578f1eae4a
|
[
"MIT"
] | null | null | null |
from .models import Case, Individual, BASE
from .phenotypeterm import PhenotypeTerm
from .genelist import GeneList, CaseGenelistLink
from .resource import Resource
| 32.8
| 48
| 0.841463
| 19
| 164
| 7.263158
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115854
| 164
| 4
| 49
| 41
| 0.951724
| 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
|
e0c2f08588a32fefd83b73f469d51d5378a56125
| 156
|
py
|
Python
|
bumblebee/users/apps.py
|
sthasam2/bumblebee-backend
|
22057399f34cdc1edb0ef04e622c97df46532de3
|
[
"Linux-OpenIB"
] | null | null | null |
bumblebee/users/apps.py
|
sthasam2/bumblebee-backend
|
22057399f34cdc1edb0ef04e622c97df46532de3
|
[
"Linux-OpenIB"
] | null | null | null |
bumblebee/users/apps.py
|
sthasam2/bumblebee-backend
|
22057399f34cdc1edb0ef04e622c97df46532de3
|
[
"Linux-OpenIB"
] | null | null | null |
from django.apps import AppConfig
class UsersConfig(AppConfig):
name = "bumblebee.users"
def ready(self):
import bumblebee.users.signals
| 17.333333
| 38
| 0.711538
| 18
| 156
| 6.166667
| 0.777778
| 0.252252
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205128
| 156
| 8
| 39
| 19.5
| 0.895161
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1cab1537e2db89b68abc298e8e48ad9cef8f0e94
| 141
|
py
|
Python
|
infobip_channels/web_rtc/models/response/generate_token.py
|
infobip-community/infobip-api-python-sdk
|
5ffc5ab877ee1748aa29391f991c8c5324387487
|
[
"MIT"
] | null | null | null |
infobip_channels/web_rtc/models/response/generate_token.py
|
infobip-community/infobip-api-python-sdk
|
5ffc5ab877ee1748aa29391f991c8c5324387487
|
[
"MIT"
] | null | null | null |
infobip_channels/web_rtc/models/response/generate_token.py
|
infobip-community/infobip-api-python-sdk
|
5ffc5ab877ee1748aa29391f991c8c5324387487
|
[
"MIT"
] | null | null | null |
from infobip_channels.core.models import ResponseBase
class GenerateTokenResponseOK(ResponseBase):
token: str
expiration_time: str
| 20.142857
| 53
| 0.808511
| 15
| 141
| 7.466667
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141844
| 141
| 6
| 54
| 23.5
| 0.92562
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
1cb8ffef061723cab4b255a08ee7702d24d0f818
| 163
|
py
|
Python
|
v3/net/server/rpcserver.py
|
osgvsun/gsiot
|
1ba144cd10fd5022c804646a062513ee655841a4
|
[
"MulanPSL-1.0"
] | null | null | null |
v3/net/server/rpcserver.py
|
osgvsun/gsiot
|
1ba144cd10fd5022c804646a062513ee655841a4
|
[
"MulanPSL-1.0"
] | null | null | null |
v3/net/server/rpcserver.py
|
osgvsun/gsiot
|
1ba144cd10fd5022c804646a062513ee655841a4
|
[
"MulanPSL-1.0"
] | null | null | null |
# -*- coding:utf-8 -*-
import socket
# from multiprocessing import Process
from datetime import datetime
from gsiot.v3 import *
from gsiot.v3.net.gssocket import *
| 27.166667
| 37
| 0.766871
| 23
| 163
| 5.434783
| 0.565217
| 0.144
| 0.176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.134969
| 163
| 6
| 38
| 27.166667
| 0.865248
| 0.343558
| 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
|
1cc399d851c17f29878af9af85eb249e0a6b0582
| 257
|
py
|
Python
|
pymvc/model/__init__.py
|
SiLeader/pymvc
|
d8d44ff1a5c5adce3c948251fa760567be3730fb
|
[
"Apache-2.0"
] | null | null | null |
pymvc/model/__init__.py
|
SiLeader/pymvc
|
d8d44ff1a5c5adce3c948251fa760567be3730fb
|
[
"Apache-2.0"
] | null | null | null |
pymvc/model/__init__.py
|
SiLeader/pymvc
|
d8d44ff1a5c5adce3c948251fa760567be3730fb
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .model_base import Model
from .datatypes import StringType, IntType, FloatType, UniqueIdType
from .datatypes import ForeignType, EnumType, ListType, BoolType, DatetimeType, HashType
from . import binder
| 28.555556
| 88
| 0.770428
| 31
| 257
| 6.354839
| 0.741935
| 0.13198
| 0.192893
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008929
| 0.128405
| 257
| 8
| 89
| 32.125
| 0.870536
| 0.167315
| 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
|
1cd97ee05cc710d575d0cbd643f5d783b7dec6be
| 36
|
py
|
Python
|
app/auth/__init__.py
|
jaskola8/noter
|
3b5b53d9c05cacd66ffe35c75b733aed5d2eb6d0
|
[
"MIT"
] | null | null | null |
app/auth/__init__.py
|
jaskola8/noter
|
3b5b53d9c05cacd66ffe35c75b733aed5d2eb6d0
|
[
"MIT"
] | null | null | null |
app/auth/__init__.py
|
jaskola8/noter
|
3b5b53d9c05cacd66ffe35c75b733aed5d2eb6d0
|
[
"MIT"
] | null | null | null |
from .models import initialize_users
| 36
| 36
| 0.888889
| 5
| 36
| 6.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 36
| 1
| 36
| 36
| 0.939394
| 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
|
1ce422b9d14fb44adf3def58b045da1a3de193b3
| 157
|
py
|
Python
|
bin/Python27/Lib/site-packages/numpy/doc/io.py
|
lefevre-fraser/openmeta-mms
|
08f3115e76498df1f8d70641d71f5c52cab4ce5f
|
[
"MIT"
] | null | null | null |
bin/Python27/Lib/site-packages/numpy/doc/io.py
|
lefevre-fraser/openmeta-mms
|
08f3115e76498df1f8d70641d71f5c52cab4ce5f
|
[
"MIT"
] | null | null | null |
bin/Python27/Lib/site-packages/numpy/doc/io.py
|
lefevre-fraser/openmeta-mms
|
08f3115e76498df1f8d70641d71f5c52cab4ce5f
|
[
"MIT"
] | null | null | null |
"""
=========
Array I/O
=========
Placeholder for array I/O documentation.
"""
from __future__ import division, absolute_import, print_function
| 14.272727
| 65
| 0.624204
| 17
| 157
| 5.411765
| 0.764706
| 0.130435
| 0.152174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191083
| 157
| 10
| 66
| 15.7
| 0.724409
| 0.452229
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 1
| 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
| 0
| 1
| 0
| 1
| 1
|
0
| 5
|
1cf88a33dc8df83c8f7c50ff7ee4ab24f9f26d5c
| 144
|
py
|
Python
|
{{ cookiecutter.project }}/{{ cookiecutter.project }}/views/__init__.py
|
0xdc/starly
|
11ae426d9b25b502c9b1372cbd0b9e0a6ebea8f2
|
[
"MIT"
] | null | null | null |
{{ cookiecutter.project }}/{{ cookiecutter.project }}/views/__init__.py
|
0xdc/starly
|
11ae426d9b25b502c9b1372cbd0b9e0a6ebea8f2
|
[
"MIT"
] | null | null | null |
{{ cookiecutter.project }}/{{ cookiecutter.project }}/views/__init__.py
|
0xdc/starly
|
11ae426d9b25b502c9b1372cbd0b9e0a6ebea8f2
|
[
"MIT"
] | null | null | null |
import pkgutil
for _, module_name, _ in pkgutil.walk_packages(__path__):
__import__('.'.join([__name__, module_name]))
del module_name
| 24
| 57
| 0.736111
| 18
| 144
| 4.888889
| 0.611111
| 0.340909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145833
| 144
| 5
| 58
| 28.8
| 0.715447
| 0
| 0
| 0
| 0
| 0
| 0.006944
| 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
|
e8066f67d1a36c338ed9e92c13b5efb1ad599b15
| 132
|
py
|
Python
|
models/0.py
|
brianjimenez/academic_auth
|
8878f2e5a287eca8dd3ef191656de2b593069e97
|
[
"MIT"
] | null | null | null |
models/0.py
|
brianjimenez/academic_auth
|
8878f2e5a287eca8dd3ef191656de2b593069e97
|
[
"MIT"
] | null | null | null |
models/0.py
|
brianjimenez/academic_auth
|
8878f2e5a287eca8dd3ef191656de2b593069e97
|
[
"MIT"
] | null | null | null |
"""
Only for development purposes
"""
# Enable for module reload
from gluon.custom_import import track_changes
track_changes(True)
| 16.5
| 45
| 0.795455
| 18
| 132
| 5.666667
| 0.777778
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128788
| 132
| 7
| 46
| 18.857143
| 0.886957
| 0.416667
| 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
|
1c1ff4cc4bc9fcd5a92d50857ff01bf4765440f9
| 52
|
py
|
Python
|
Variado_GeekUniversity/guppe/geek/geek1.py
|
PauloFTeixeira/curso_python
|
9040c7dcc5262620f6330bb9637710bb8899bc6b
|
[
"MIT"
] | null | null | null |
Variado_GeekUniversity/guppe/geek/geek1.py
|
PauloFTeixeira/curso_python
|
9040c7dcc5262620f6330bb9637710bb8899bc6b
|
[
"MIT"
] | null | null | null |
Variado_GeekUniversity/guppe/geek/geek1.py
|
PauloFTeixeira/curso_python
|
9040c7dcc5262620f6330bb9637710bb8899bc6b
|
[
"MIT"
] | null | null | null |
pi = 3.1456
def funcao1(a, b):
return a + b
| 6.5
| 18
| 0.519231
| 10
| 52
| 2.7
| 0.8
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 0.346154
| 52
| 7
| 19
| 7.428571
| 0.617647
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
1c411891a0597cb0401fdb6c761e6a64c989874a
| 12,476
|
py
|
Python
|
anchorecli/cli/account.py
|
bollwyvl/anchore-cli
|
83cf52e54a19e06b31b6aeffcf06e08c5c81a497
|
[
"Apache-2.0"
] | null | null | null |
anchorecli/cli/account.py
|
bollwyvl/anchore-cli
|
83cf52e54a19e06b31b6aeffcf06e08c5c81a497
|
[
"Apache-2.0"
] | null | null | null |
anchorecli/cli/account.py
|
bollwyvl/anchore-cli
|
83cf52e54a19e06b31b6aeffcf06e08c5c81a497
|
[
"Apache-2.0"
] | null | null | null |
import sys
import os
import re
import json
import click
import anchorecli.clients.apiexternal
config = {}
whoami = {}
@click.group(name='account', short_help='Account operations')
@click.pass_obj
def account(ctx_config):
global config, whoami
config = ctx_config
try:
anchorecli.cli.utils.check_access(config)
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account', {}, err))
sys.exit(2)
try:
ret = anchorecli.clients.apiexternal.get_account(config)
if ret['success']:
whoami['account'] = ret['payload']
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account', {}, err))
sys.exit(2)
try:
ret = anchorecli.clients.apiexternal.get_user(config)
if ret['success']:
whoami['user'] = ret['payload']
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account', {}, err))
sys.exit(2)
@account.command(name='whoami', short_help="Get current account/user information")
def whoami():
global whoami
ecode = 0
print(anchorecli.cli.utils.format_output(config, 'account_whoami', {}, whoami))
anchorecli.cli.utils.doexit(ecode)
@account.command(name='add', short_help="Add a new account (with no populated users by default)")
@click.argument('account_name', nargs=1, required=True)
@click.option('--email', help="Optional email address to associate with account")
def add(account_name, email):
"""
ACCOUNT_NAME: name of new account to create
EMAIL: email address associated with account (optional)
"""
ecode = 0
try:
ret = anchorecli.clients.apiexternal.add_account(config, account_name=account_name, email=email)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'account_add', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account_add', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@account.command(name='get', short_help="Get account information")
@click.argument('account_name', nargs=1, required=True)
def get(account_name):
"""
ACCOUNT_NAME: name of new account to create
"""
ecode = 0
try:
ret = anchorecli.clients.apiexternal.get_account(config, account_name=account_name)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'account_get', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account_get', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@account.command(name='list', short_help="List information about all accounts (admin only)")
def list_accounts():
"""
"""
ecode = 0
try:
ret = anchorecli.clients.apiexternal.list_accounts(config)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'account_list', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account_list', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@account.command(name='del', short_help="Delete an account (must be disabled first)")
@click.argument('account_name', nargs=1, required=True)
@click.option('--dontask', is_flag=True, help="Do not prompt for confirmation of account deletion")
def delete(account_name, dontask):
global input
"""
ACCOUNT_NAME: name of account to delete (must be disabled first)
"""
ecode = 0
answer = "n"
if dontask:
answer = "y"
else:
try:
input = raw_input
except NameError:
pass
try:
answer = input("This operation is irreversible. Really delete account {} along with *all* users and resources associated with this account? (y/N)".format(account_name))
except:
answer = "n"
if answer.lower() == "y":
try:
ret = anchorecli.clients.apiexternal.del_account(config, account_name=account_name)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'account_delete', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account_delete', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@account.command(name='enable', short_help="Enable a disabled account")
@click.argument('account_name', nargs=1, required=True)
def enable(account_name):
"""
ACCOUNT_NAME: name of account to enable
"""
ecode = 0
try:
ret = anchorecli.clients.apiexternal.enable_account(config, account_name=account_name)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'account_enable', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account_enable', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@account.command(name='disable', short_help="Disable an enabled account")
@click.argument('account_name', nargs=1, required=True)
def disable(account_name):
"""
ACCOUNT_NAME: name of account to disable
"""
ecode = 0
try:
ret = anchorecli.clients.apiexternal.disable_account(config, account_name=account_name)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'account_disable', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'account_disable', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
# user suboperation
whoami = {}
@account.group(name="user", short_help="Account user operations")
def user():
global config, whoami
@user.command(name="add", short_help="Add a new user")
@click.argument('user_name', nargs=1, required=True)
@click.argument('user_password', nargs=1, required=True)
@click.option('--account', help="Optional account name")
def user_add(user_name, user_password, account):
global whoami
"""
ACCOUNT: optional name of the account to act as
"""
if not account:
account = whoami.get('account', {}).get('name', None)
ecode = 0
try:
# do some input validation
if not re.match(".{6,128}$", user_password):
raise Exception("Please enter a password at least 6 characters long that contains no spaces.")
ret = anchorecli.clients.apiexternal.add_user(config, account_name=account, user_name=user_name, user_password=user_password)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'user_add', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'user_add', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@user.command(name="del", short_help="Delete a user")
@click.argument('user_name', nargs=1, required=True)
@click.option('--account', help="Optional account name")
def user_delete(user_name, account):
global whoami
"""
ACCOUNT: optional name of the account to act as
"""
if not account:
account = whoami.get('account', {}).get('name', None)
ecode = 0
try:
ret = anchorecli.clients.apiexternal.del_user(config, account_name=account, user_name=user_name)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'user_delete', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'user_delete', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@user.command(name="get", short_help="Get information about a user")
@click.argument('user_name', nargs=1, required=True)
@click.option('--account', help="Optional account name")
def user_get(user_name, account):
global whoami
"""
ACCOUNT: optional name of the account to act as
"""
if not account:
account = whoami.get('account', {}).get('name', None)
ecode = 0
try:
ret = anchorecli.clients.apiexternal.get_user(config, account_name=account, user_name=user_name)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'user_get', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'user_get', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@user.command(name="list", short_help="Get a list of account users")
@click.option('--account', help="Optional account name")
def user_list(account):
global whoami
"""
ACCOUNT: optional name of the account to act as
"""
if not account:
account = whoami.get('account', {}).get('name', None)
ecode = 0
try:
ret = anchorecli.clients.apiexternal.list_users(config, account_name=account)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'user_list', {}, ret['payload']))
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'user_list', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
@user.command(name="setpassword", short_help="(Re)set a user's password credential")
@click.argument('user_password', nargs=1, required=True)
@click.option('--username', help="Optional user name")
@click.option('--account', help="Optional account name")
def user_setpassword(user_password, username, account):
global whoami
"""
ACCOUNT: optional name of the account to act as
"""
if not account:
account = whoami.get('account', {}).get('name', None)
if not username:
username = whoami.get('user', {}).get('username', None)
ecode = 0
try:
ret = anchorecli.clients.apiexternal.update_user_password(config, account_name=account, user_name=username, user_password=user_password)
ecode = anchorecli.cli.utils.get_ecode(ret)
if ret['success']:
print(anchorecli.cli.utils.format_output(config, 'user_setpassword', {}, ret['payload']))
print ("NOTE: Be sure to change the password you're using for this client if you have reset your own password")
else:
raise Exception( json.dumps(ret['error'], indent=4))
except Exception as err:
print(anchorecli.cli.utils.format_error_output(config, 'user_setpassword', {}, err))
if not ecode:
ecode = 2
anchorecli.cli.utils.doexit(ecode)
| 32.071979
| 180
| 0.644117
| 1,557
| 12,476
| 5.05395
| 0.096981
| 0.082603
| 0.114373
| 0.075994
| 0.778498
| 0.765917
| 0.73923
| 0.72398
| 0.666921
| 0.643411
| 0
| 0.005585
| 0.225072
| 12,476
| 388
| 181
| 32.154639
| 0.808337
| 0.021962
| 0
| 0.646388
| 0
| 0.007605
| 0.155322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.053232
| false
| 0.053232
| 0.022814
| 0
| 0.076046
| 0.102662
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
1c4923a68f5b3aa7d928c0a1116e10e76c6838cc
| 52
|
py
|
Python
|
rl_trader/engine/rl_environment/types/test/env_account_types.test.py
|
AlexandreMahdhaoui/rl_trader
|
5bda02622c7e17c4e6f28a90c510cfe8f914f7a8
|
[
"Apache-2.0"
] | null | null | null |
rl_trader/engine/rl_environment/types/test/env_account_types.test.py
|
AlexandreMahdhaoui/rl_trader
|
5bda02622c7e17c4e6f28a90c510cfe8f914f7a8
|
[
"Apache-2.0"
] | null | null | null |
rl_trader/engine/rl_environment/types/test/env_account_types.test.py
|
AlexandreMahdhaoui/rl_trader
|
5bda02622c7e17c4e6f28a90c510cfe8f914f7a8
|
[
"Apache-2.0"
] | null | null | null |
# TODO: TokenWallet
# TODO: Wallets
# TODO: Order
| 8.666667
| 19
| 0.673077
| 6
| 52
| 5.833333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211538
| 52
| 5
| 20
| 10.4
| 0.853659
| 0.826923
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.2
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1c7ae98083c077d683f8986848217ca8e8cbad2d
| 142
|
py
|
Python
|
main/Sapphire/Potentials/Potentials.py
|
JonesRobM/SAPPHIRE
|
64fd62634279800642d21b959d0e8f2efd360ad4
|
[
"MIT"
] | null | null | null |
main/Sapphire/Potentials/Potentials.py
|
JonesRobM/SAPPHIRE
|
64fd62634279800642d21b959d0e8f2efd360ad4
|
[
"MIT"
] | 2
|
2022-03-30T12:33:42.000Z
|
2022-03-30T12:34:41.000Z
|
main/Sapphire/Potentials/Potentials.py
|
JonesRobM/Sapphire
|
fba875af56e48e2c5a4a3cf6788f51f359f63800
|
[
"MIT"
] | null | null | null |
from Utilities import GuptaParameters
class Potential():
def __init__(self, Potential : str, Quantities : list):
return None
| 23.666667
| 59
| 0.697183
| 15
| 142
| 6.333333
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.232394
| 142
| 6
| 60
| 23.666667
| 0.87156
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
1c7e4b35bc7387c3f5c536e74edc0feafa1811d9
| 1,798
|
py
|
Python
|
paddlex/cv/models/__init__.py
|
yzl19940819/test
|
71f2de3daa7e2287874697d3cc2f7f31706e54c0
|
[
"Apache-2.0"
] | null | null | null |
paddlex/cv/models/__init__.py
|
yzl19940819/test
|
71f2de3daa7e2287874697d3cc2f7f31706e54c0
|
[
"Apache-2.0"
] | null | null | null |
paddlex/cv/models/__init__.py
|
yzl19940819/test
|
71f2de3daa7e2287874697d3cc2f7f31706e54c0
|
[
"Apache-2.0"
] | null | null | null |
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .classifier import BaseClassifier
from .classifier import ResNet18
from .classifier import ResNet34
from .classifier import ResNet50
from .classifier import ResNet101
from .classifier import ResNet50_vd
from .classifier import ResNet101_vd
from .classifier import ResNet50_vd_ssld
from .classifier import ResNet101_vd_ssld
from .classifier import DarkNet53
from .classifier import MobileNetV1
from .classifier import MobileNetV2
from .classifier import MobileNetV3_small
from .classifier import MobileNetV3_large
from .classifier import MobileNetV3_small_ssld
from .classifier import MobileNetV3_large_ssld
from .classifier import Xception41
from .classifier import Xception65
from .classifier import DenseNet121
from .classifier import DenseNet161
from .classifier import DenseNet201
from .classifier import ShuffleNetV2
from .classifier import HRNet_W18
from .classifier import AlexNet
from .base import BaseAPI
from .yolo_v3 import YOLOv3
from .faster_rcnn import FasterRCNN
from .mask_rcnn import MaskRCNN
from .unet import UNet
from .deeplabv3p import DeepLabv3p
from .hrnet import HRNet
from .fast_scnn import FastSCNN
from .load_model import load_model
from .slim import prune
| 36.693878
| 74
| 0.825362
| 249
| 1,798
| 5.883534
| 0.445783
| 0.229352
| 0.327645
| 0.065529
| 0.200683
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035279
| 0.132925
| 1,798
| 48
| 75
| 37.458333
| 0.904426
| 0.323137
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1c8979e12494efe976dca7ff4f15332123f8d958
| 33
|
py
|
Python
|
test/samples/2lines.py
|
pjdelport/pytest-testmon
|
dbbaf2f29cc7e9a2745f27dae91e44ce973e8d10
|
[
"MIT"
] | null | null | null |
test/samples/2lines.py
|
pjdelport/pytest-testmon
|
dbbaf2f29cc7e9a2745f27dae91e44ce973e8d10
|
[
"MIT"
] | null | null | null |
test/samples/2lines.py
|
pjdelport/pytest-testmon
|
dbbaf2f29cc7e9a2745f27dae91e44ce973e8d10
|
[
"MIT"
] | null | null | null |
# -*- coding: cp1250 -*-
#2ndline
| 16.5
| 24
| 0.575758
| 3
| 33
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 0.151515
| 33
| 2
| 25
| 16.5
| 0.5
| 0.878788
| 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
|
98cdd5c3e0b45042d499e98f767bd2e1765f1683
| 174
|
py
|
Python
|
type_hinting.py
|
jnwanya/python-basic-lesson
|
d9afd21c6d2d8914a54210432d01936c630b5ee7
|
[
"MIT"
] | null | null | null |
type_hinting.py
|
jnwanya/python-basic-lesson
|
d9afd21c6d2d8914a54210432d01936c630b5ee7
|
[
"MIT"
] | null | null | null |
type_hinting.py
|
jnwanya/python-basic-lesson
|
d9afd21c6d2d8914a54210432d01936c630b5ee7
|
[
"MIT"
] | null | null | null |
from typing import List, Optional
def list_avg(sequence: Optional[List] = None) -> float:
my_sequence = sequence or []
return sum(my_sequence) / len(my_sequence)
| 19.333333
| 55
| 0.706897
| 24
| 174
| 4.958333
| 0.625
| 0.252101
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189655
| 174
| 8
| 56
| 21.75
| 0.843972
| 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
|
98e0fed70e7aa1ac9a7764b43376751b73c54a5e
| 197
|
py
|
Python
|
other/dec2ip.py
|
mmmonk/crap
|
96ba81723f043503e7ed2f96ea727b524d22b83f
|
[
"MIT"
] | 14
|
2015-01-14T15:53:22.000Z
|
2019-06-21T06:15:47.000Z
|
other/dec2ip.py
|
mmmonk/crap
|
96ba81723f043503e7ed2f96ea727b524d22b83f
|
[
"MIT"
] | 1
|
2018-04-01T08:40:17.000Z
|
2020-06-24T10:05:33.000Z
|
other/dec2ip.py
|
mmmonk/crap
|
96ba81723f043503e7ed2f96ea727b524d22b83f
|
[
"MIT"
] | 12
|
2015-05-13T10:52:04.000Z
|
2020-10-07T14:49:37.000Z
|
#!/usr/bin/env python
import sys
da = int(sys.argv[1])
ha=hex(da).replace("0x","").zfill(8)
print str(int(ha[6:8],16))+"."+str(int(ha[4:6],16))+"."+str(int(ha[2:4],16))+"."+str(int(ha[0:2],16))
| 21.888889
| 101
| 0.568528
| 43
| 197
| 2.604651
| 0.534884
| 0.214286
| 0.285714
| 0.267857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103261
| 0.06599
| 197
| 8
| 102
| 24.625
| 0.505435
| 0.101523
| 0
| 0
| 0
| 0
| 0.028409
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.25
| null | null | 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
98ee089b01b273af839fd106983040f280a9ed0c
| 222
|
py
|
Python
|
python/examples/book/learnManual4/ch11/print.py
|
CodyGuo/Python-Cody
|
749c36dd2a8be073ba13234aa4c1ae9828a78cf5
|
[
"Apache-2.0"
] | null | null | null |
python/examples/book/learnManual4/ch11/print.py
|
CodyGuo/Python-Cody
|
749c36dd2a8be073ba13234aa4c1ae9828a78cf5
|
[
"Apache-2.0"
] | null | null | null |
python/examples/book/learnManual4/ch11/print.py
|
CodyGuo/Python-Cody
|
749c36dd2a8be073ba13234aa4c1ae9828a78cf5
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# -*- coding=utf-8 -*-
from __future__ import print_function
print('spam')
print('spam', 'ham', 'eggs')
print('%s %s %s' % ('spam', 'ham', 'eggs'))
print('{0} {1} {2}'.format('spam', 'ham', 'eggs'))
| 24.666667
| 50
| 0.576577
| 33
| 222
| 3.727273
| 0.606061
| 0.170732
| 0.268293
| 0.260163
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020513
| 0.121622
| 222
| 9
| 50
| 24.666667
| 0.610256
| 0.184685
| 0
| 0
| 0
| 0
| 0.311111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 1
| 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
| 0
| 0
| 0
| 1
|
0
| 5
|
c753fc7a9cbb41fb718c69eadd9e715294e23846
| 211
|
py
|
Python
|
panel/template/fast/__init__.py
|
datalayer-contrib/holoviz-panel
|
c97b57e8eaff4b5f542add41f496395da2483b23
|
[
"BSD-3-Clause"
] | 1,130
|
2019-11-23T09:53:37.000Z
|
2022-03-31T11:30:07.000Z
|
panel/template/fast/__init__.py
|
datalayer-contrib/holoviz-panel
|
c97b57e8eaff4b5f542add41f496395da2483b23
|
[
"BSD-3-Clause"
] | 2,265
|
2019-11-20T17:09:09.000Z
|
2022-03-31T22:09:38.000Z
|
panel/template/fast/__init__.py
|
datalayer-contrib/holoviz-panel
|
c97b57e8eaff4b5f542add41f496395da2483b23
|
[
"BSD-3-Clause"
] | 215
|
2019-11-26T11:49:04.000Z
|
2022-03-30T10:23:11.000Z
|
"""
The Fast Templates provide easy to use, great looking templates for
Panel based on the https://fast.design framework.
"""
from .grid import FastGridTemplate # noqa
from .list import FastListTemplate # noqa
| 26.375
| 67
| 0.772512
| 29
| 211
| 5.62069
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151659
| 211
| 7
| 68
| 30.142857
| 0.910615
| 0.606635
| 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
|
c75de30f2408e9eee6b252c0ec7882ef0520384d
| 67
|
py
|
Python
|
django2_alexa/utils/enums/__init__.py
|
timwoocker/django-alexa
|
59f7e814de315992f3f703b6c6a742d20c726bdb
|
[
"Apache-2.0"
] | 2
|
2018-11-17T22:20:15.000Z
|
2018-11-17T22:20:17.000Z
|
django2_alexa/utils/enums/__init__.py
|
timwoocker/django-alexa
|
59f7e814de315992f3f703b6c6a742d20c726bdb
|
[
"Apache-2.0"
] | null | null | null |
django2_alexa/utils/enums/__init__.py
|
timwoocker/django-alexa
|
59f7e814de315992f3f703b6c6a742d20c726bdb
|
[
"Apache-2.0"
] | 2
|
2018-11-19T15:21:30.000Z
|
2020-02-21T15:22:09.000Z
|
from .locales import Locale
from .dialog_states import DialogState
| 22.333333
| 38
| 0.850746
| 9
| 67
| 6.222222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119403
| 67
| 2
| 39
| 33.5
| 0.949153
| 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
|
c777407c58caabd3c3a6bbd71ffcd54430f8e099
| 199
|
py
|
Python
|
wsgi.py
|
Avchhikara/number-plate-reader
|
f33647db4f3d58347c8bbca8d476eb88d4da0475
|
[
"MIT"
] | null | null | null |
wsgi.py
|
Avchhikara/number-plate-reader
|
f33647db4f3d58347c8bbca8d476eb88d4da0475
|
[
"MIT"
] | 1
|
2020-12-28T10:57:06.000Z
|
2020-12-28T11:56:07.000Z
|
wsgi.py
|
Avchhikara/number-plate-reader
|
f33647db4f3d58347c8bbca8d476eb88d4da0475
|
[
"MIT"
] | 1
|
2021-01-31T12:38:38.000Z
|
2021-01-31T12:38:38.000Z
|
from os import getenv
from app import app
if __name__ == "__main__":
app.secret_key = getenv('FLASK_SECRET_KEY') or "TEMP_SECRET_KEY"
app.config['SESSION_TYPE'] = 'filesystem'
app.run()
| 24.875
| 68
| 0.708543
| 29
| 199
| 4.37931
| 0.62069
| 0.212598
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170854
| 199
| 7
| 69
| 28.428571
| 0.769697
| 0
| 0
| 0
| 0
| 0
| 0.306533
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
4000291151fa69cab7e5c401577ae9478258581d
| 16,596
|
py
|
Python
|
data/aishell.py
|
Chriszhangmw/end2end-asr-pytorch
|
46ba70373fcadc12a2b9e1ed67f791349d357c63
|
[
"MIT"
] | null | null | null |
data/aishell.py
|
Chriszhangmw/end2end-asr-pytorch
|
46ba70373fcadc12a2b9e1ed67f791349d357c63
|
[
"MIT"
] | null | null | null |
data/aishell.py
|
Chriszhangmw/end2end-asr-pytorch
|
46ba70373fcadc12a2b9e1ed67f791349d357c63
|
[
"MIT"
] | null | null | null |
import os
import wget
import tarfile
import argparse
import subprocess
from utils import create_manifest
from tqdm import tqdm
import shutil
import re
import string
import unicodedata
root = "./Aishell_dataset/"
def traverse(root, path, search_fix=".txt"):
f_list = []
p = root + path
for s_p in sorted(os.listdir(p)):
# for sub_p in sorted(os.listdir(p + "/" + s_p)):
sub_p = p + "/" + s_p
if sub_p[len(sub_p)-len(search_fix):] == search_fix:
print(">", path, s_p, sub_p)
# f_list.append(p + "/" + s_p + "/" + sub_p)
f_list.append(p+ "/" + s_p )
return f_list
def remove_punctuation(seq):
# REMOVE CHINESE PUNCTUATION EXCEPT HYPEN / DASH AND FULL STOP
seq = re.sub("[\s+\\!\/_,$%=^*?:@&^~`(+\"]+|[+!,。?、~@#¥%……&*():;:;《)《》“”()»〔〕]+", " ", seq)
seq = seq.replace(" ' ", " ")
seq = seq.replace(" ’ ", " ")
seq = seq.replace(" ' ", " ")
seq = seq.replace(" ` ", " ")
seq = seq.replace(" '", "'")
seq = seq.replace(" ’", "’")
seq = seq.replace(" '", "'")
seq = seq.replace("’ ", " ")
seq = seq.replace("' ", " ")
seq = seq.replace("` ", " ")
seq = seq.replace(".", "")
seq = seq.replace("`", "")
seq = seq.replace("-", " ")
seq = seq.replace("?", " ")
seq = seq.replace(":", " ")
seq = seq.replace(";", " ")
seq = seq.replace("]", " ")
seq = seq.replace("[", " ")
seq = seq.replace("}", " ")
seq = seq.replace("{", " ")
seq = seq.replace("|", " ")
seq = seq.replace("_", " ")
seq = seq.replace("(", " ")
seq = seq.replace(")", " ")
seq = seq.replace("=", " ")
seq = seq.replace("doens't", "doesn't")
seq = seq.replace("o' clock", "o'clock")
seq = seq.replace("因为it's", "因为 it's")
seq = seq.replace("it' s", "it's")
seq = seq.replace("it ' s", "it's")
seq = seq.replace("it' s", "it's")
seq = seq.replace("y'", "y")
seq = seq.replace("y ' ", "y")
seq = seq.replace("看different", "看 different")
seq = seq.replace("it'self", "itself")
seq = seq.replace("it'ss", "it's")
seq = seq.replace("don'r", "don't")
seq = seq.replace("has't", "hasn't")
seq = seq.replace("don'know", "don't know")
seq = seq.replace("i'll", "i will")
seq = seq.replace("you're", "you are")
seq = seq.replace("'re ", " are ")
seq = seq.replace("'ll ", " will ")
seq = seq.replace("'ve ", " have ")
seq = seq.replace("'re\n", " are\n")
seq = seq.replace("'ll\n", " will\n")
seq = seq.replace("'ve\n", " have\n")
seq = remove_space_in_between_words(seq)
return seq
def remove_special_char(seq):
seq = re.sub("[【】·.%°℃×→①ぃγ ̄σς=~•+δ≤∶/⊥_ñãíå∈△β[]±]+", " ", seq)
return seq
def remove_space_in_between_words(seq):
return seq.replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").strip().lstrip()
def remove_return(seq):
return seq.replace("\n", "").replace("\r", "").replace("\t", "")
def preprocess(seq):
seq = seq.lower()
seq = re.sub("[\(\[].*?[\)\]]", "", seq) # REMOVE ALL WORDS WITH BRACKETS (HESITATION)
seq = re.sub("[\{\[].*?[\}\]]", "", seq) # REMOVE ALL WORDS WITH BRACKETS (HESITATION)
seq = re.sub("[\<\[].*?[\>\]]", "", seq) # REMOVE ALL WORDS WITH BRACKETS (HESITATION)
seq = re.sub("[\【\[].*?[\】\]]", "", seq) # REMOVE ALL WORDS WITH BRACKETS (HESITATION)
seq = seq.replace("\x7f", "")
seq = seq.replace("\x80", "")
seq = seq.replace("\u3000", " ")
seq = seq.replace("\xa0", "")
seq = seq.replace("[", " [")
seq = seq.replace("]", "] ")
seq = seq.replace("#", "")
seq = seq.replace(",", "")
seq = seq.replace("*", "")
seq = seq.replace("\n", "")
seq = seq.replace("\r", "")
seq = seq.replace("\t", "")
seq = seq.replace("~", "")
seq = seq.replace("—", "")
seq = seq.replace(" ", " ").replace(" ", " ")
seq = re.sub('\<.*?\>','', seq) # REMOVE < >
seq = re.sub('\【.*?\】','', seq) # REMOVE 【 】
seq = remove_special_char(seq)
seq = remove_space_in_between_words(seq)
seq = seq.strip()
seq = seq.lstrip()
seq = remove_punctuation(seq)
seq = remove_space_in_between_words(seq)
return seq
def is_chinese_char(cc):
return unicodedata.category(cc) == 'Lo'
def is_contain_chinese_word(seq):
for i in range(len(seq)):
if is_chinese_char(seq[i]):
return True
return False
CHINESE_TAG = "†"
ENGLISH_TAG = "‡"
def add_lang(seq):
new_seq = ""
words = seq.split(" ")
lang = 0
for i in range(len(words)):
if is_contain_chinese_word(words[i]):
if lang != 1:
lang = 1
new_seq += CHINESE_TAG
# print("zh")
else:
if lang != 2:
lang = 2
new_seq += ENGLISH_TAG
# print("en")
if new_seq != "":
new_seq += " "
new_seq += words[i]
return new_seq
def separate_chinese_chars(seq):
new_seq = ""
words = seq.split(" ")
for i in range(len(words)):
if is_contain_chinese_word(words[i]):
for char in words[i]:
if new_seq != "":
new_seq += " "
new_seq += char
else:
if new_seq != "":
new_seq += " "
new_seq += words[i]
return new_seq
print("PREPROCESSING")
if not os.path.isdir("Aishell_dataset/transcript_clean"):
os.system("mkdir Aishell_dataset/transcript_clean")
os.system("mkdir Aishell_dataset/transcript_clean/train")
os.system("mkdir Aishell_dataset/transcript_clean/dev")
os.system("mkdir Aishell_dataset/transcript_clean/test")
if not os.path.isdir("Aishell_dataset/transcript_clean_lang"):
os.system("mkdir Aishell_dataset/transcript_clean_lang")
os.system("mkdir Aishell_dataset/transcript_clean_lang/train")
os.system("mkdir Aishell_dataset/transcript_clean_lang/dev")
os.system("mkdir Aishell_dataset/transcript_clean_lang/test")
# PREPROCESS (additional remove all punctuation except '), and all hesitations
tr_file_list = traverse(root, "transcript/train", search_fix="")
dev_file_list = traverse(root, "transcript/dev", search_fix="")
test_file_list = traverse(root, "transcript/test", search_fix="")
for i in range(len(tr_file_list)):
text_file_path = tr_file_list[i]
new_text_file_path = tr_file_list[i].replace("transcript", "transcript_clean").replace(".wav","")
new_text_file_lang_path = tr_file_list[i].replace("transcript", "transcript_clean_lang").replace(".wav","")
with open(text_file_path, "r", encoding="utf-8") as text_file:
for line in text_file:
print(line)
line = preprocess(line).rstrip().strip().lstrip()
print(">", line)
lang_line = add_lang(line)
lang_line = separate_chinese_chars(lang_line).replace(" ", " ")
print(">>", lang_line)
if len(line) > 0:
if not os.path.isdir(os.path.dirname(new_text_file_path)):
os.makedirs(os.path.dirname(new_text_file_path))
with open(new_text_file_path, "w+", encoding="utf-8") as new_text_file:
new_text_file.write(line + "\n")
if not os.path.isdir(os.path.dirname(new_text_file_lang_path)):
os.makedirs(os.path.dirname(new_text_file_lang_path))
with open(new_text_file_lang_path, "w+", encoding="utf-8") as new_text_lang_file:
new_text_lang_file.write(lang_line + "\n")
break
for i in range(len(dev_file_list)):
text_file_path = dev_file_list[i]
new_text_file_path = dev_file_list[i].replace("transcript", "transcript_clean").replace(".wav",".txt")
new_text_file_lang_path = dev_file_list[i].replace("transcript", "transcript_clean_lang").replace(".wav","")
print(new_text_file_path)
with open(text_file_path, "r", encoding="utf-8") as text_file:
for line in text_file:
print(line)
line = preprocess(line).rstrip().strip().lstrip()
print(">", line)
lang_line = add_lang(line)
lang_line = separate_chinese_chars(lang_line).replace(" ", " ")
print(">>", lang_line)
if len(line) > 0:
if not os.path.isdir(os.path.dirname(new_text_file_path)):
os.makedirs(os.path.dirname(new_text_file_path))
with open(new_text_file_path, "w+", encoding="utf-8") as new_text_file:
new_text_file.write(line + "\n")
if not os.path.isdir(os.path.dirname(new_text_file_lang_path)):
os.makedirs(os.path.dirname(new_text_file_lang_path))
with open(new_text_file_lang_path, "w+", encoding="utf-8") as new_text_lang_file:
new_text_lang_file.write(lang_line + "\n")
break
for i in range(len(test_file_list)):
text_file_path = test_file_list[i]
new_text_file_path = test_file_list[i].replace("transcript", "transcript_clean").replace(".wav",".txt")
new_text_file_lang_path = test_file_list[i].replace("transcript", "transcript_clean_lang").replace(".wav","")
print(new_text_file_path)
with open(text_file_path, "r", encoding="utf-8") as text_file:
for line in text_file:
print(line)
line = preprocess(line).rstrip().strip().lstrip()
print(">", line)
lang_line = add_lang(line)
lang_line = separate_chinese_chars(lang_line).replace(" ", " ")
print(">>", lang_line)
if len(line) > 0:
if not os.path.isdir(os.path.dirname(new_text_file_path)):
os.makedirs(os.path.dirname(new_text_file_path))
with open(new_text_file_path, "w+", encoding="utf-8") as new_text_file:
new_text_file.write(line + "\n")
if not os.path.isdir(os.path.dirname(new_text_file_lang_path)):
os.makedirs(os.path.dirname(new_text_file_lang_path))
with open(new_text_file_lang_path, "w+", encoding="utf-8") as new_text_lang_file:
new_text_lang_file.write(lang_line + "\n")
break
tr_file_list = traverse(root, "wav/train", search_fix="")
dev_file_list = traverse(root, "wav/dev", search_fix="")
test_file_list = traverse(root, "wav/test", search_fix="")
print("MANIFEST")
print(">>", len(tr_file_list))
print(">>", len(dev_file_list))
print(">>", len(test_file_list))
labels = {}
labels["_"] = True
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
labels = {}
labels["_"] = True
for char in alpha:
labels[char] = True
with open("manifests/aishell_train_manifest.csv", "w+") as train_manifest:
for i in range(len(tr_file_list)):
wav_filename = tr_file_list[i]
text_filename = tr_file_list[i].replace(".wav", ".txt").replace("wav", "transcript_clean")
if os.path.isfile(text_filename):
print(text_filename)
with open(text_filename, "r", encoding="utf-8") as trans_file:
for line in trans_file:
for char in line:
if char != "\n" and char != "\r" and char != "\t":
labels[char] = True
train_manifest.write("data/" + wav_filename + "," + "data/" + text_filename + "\n")
with open("manifests/aishell_dev_manifest.csv", "w+") as valid_manifest:
for i in range(len(dev_file_list)):
wav_filename = dev_file_list[i]
text_filename = dev_file_list[i].replace(".wav", ".txt").replace("wav", "transcript_clean")
if os.path.isfile(text_filename):
print(text_filename)
with open(text_filename, "r", encoding="utf-8") as trans_file:
for line in trans_file:
for char in line:
if char != "\n" and char != "\r" and char != "\t":
labels[char] = True
valid_manifest.write("data/" + wav_filename + "," + "data/" + text_filename + "\n")
with open("manifests/aishell_test_manifest.csv", "w+") as test_manifest:
for i in range(len(test_file_list)):
wav_filename = test_file_list[i]
text_filename = test_file_list[i].replace(".wav", ".txt").replace("wav", "transcript_clean")
if os.path.isfile(text_filename):
print(text_filename)
with open(text_filename, "r", encoding="utf-8") as trans_file:
for line in trans_file:
for char in line:
if char != "\n" and char != "\r" and char != "\t":
labels[char] = True
test_manifest.write("data/" + wav_filename + "," + "data/" + text_filename + "\n")
with open("labels/aishell_labels.json", "w+") as labels_json:
labels_json.write("[")
i = 0
labels_json.write('\n"_"')
for char in labels:
if char == "" or char == "_" or char == " ":
continue
labels_json.write(',\n')
if char == "\\":
print("slash")
labels_json.write('"')
labels_json.write('\\')
labels_json.write('\\')
labels_json.write('"')
elif char == '"':
print('double quote', i, char)
labels_json.write('"\\""')
else:
labels_json.write('"' + char + '"')
i += 1
labels_json.write(',\n" "\n]')
print(len(labels))
### WITH LANG ###
with open("manifests/aishell_train_lang_manifest.csv", "w+") as train_manifest:
for i in range(len(tr_file_list)):
wav_filename = tr_file_list[i]
text_filename = tr_file_list[i].replace(".wav", ".txt").replace("wav", "transcript_clean_lang")
if os.path.isfile(text_filename):
print(text_filename)
with open(text_filename, "r", encoding="utf-8") as trans_file:
for line in trans_file:
for char in line:
if char != "\n" and char != "\r" and char != "\t":
labels[char] = True
train_manifest.write("data/" + wav_filename + "," + "data/" + text_filename + "\n")
with open("manifests/aishell_dev_lang_manifest.csv", "w+") as valid_manifest:
for i in range(len(dev_file_list)):
wav_filename = dev_file_list[i]
text_filename = dev_file_list[i].replace(".wav", ".txt").replace("wav", "transcript_clean_lang")
if os.path.isfile(text_filename):
print(text_filename)
with open(text_filename, "r", encoding="utf-8") as trans_file:
for line in trans_file:
for char in line:
if char != "\n" and char != "\r" and char != "\t":
labels[char] = True
valid_manifest.write("data/" + wav_filename + "," + "data/" + text_filename + "\n")
with open("manifests/aishell_test_lang_manifest.csv", "w+") as test_manifest:
for i in range(len(test_file_list)):
wav_filename = test_file_list[i]
text_filename = test_file_list[i].replace(".wav", ".txt").replace("wav", "transcript_clean_lang")
if os.path.isfile(text_filename):
print(text_filename)
with open(text_filename, "r", encoding="utf-8") as trans_file:
for line in trans_file:
for char in line:
if char != "\n" and char != "\r" and char != "\t":
labels[char] = True
test_manifest.write("data/" + wav_filename + "," + "data/" + text_filename + "\n")
with open("labels/aishell_lang_labels.json", "w+") as labels_json:
labels_json.write("[")
i = 0
labels_json.write('\n"_"')
labels[CHINESE_TAG] = True
labels[ENGLISH_TAG] = True
for char in labels:
if char == "" or char == "_" or char == " ":
continue
labels_json.write(',\n')
if char == "\\":
print("slash")
labels_json.write('"')
labels_json.write('\\')
labels_json.write('\\')
labels_json.write('"')
elif char == '"':
print('double quote', i, char)
labels_json.write('"\\""')
else:
labels_json.write('"' + char + '"')
i += 1
labels_json.write(',\n" "\n]')
print(len(labels))
| 37.890411
| 114
| 0.553688
| 2,152
| 16,596
| 4.05855
| 0.092472
| 0.048775
| 0.092283
| 0.05679
| 0.813946
| 0.784291
| 0.767689
| 0.753378
| 0.69739
| 0.683994
| 0
| 0.002971
| 0.269884
| 16,596
| 438
| 115
| 37.890411
| 0.715441
| 0.027718
| 0
| 0.561983
| 0
| 0
| 0.131538
| 0.052739
| 0
| 0
| 0
| 0
| 0
| 1
| 0.027548
| false
| 0
| 0.030303
| 0.008264
| 0.088154
| 0.07989
| 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
|
40d83ff59075f6cab80914552916bcc2db4dc133
| 5,862
|
py
|
Python
|
tests/test_case.py
|
bbeale/TestRailYak
|
f48e4cc916f4fc8052d4d63562e95e33e5b5563c
|
[
"MIT"
] | null | null | null |
tests/test_case.py
|
bbeale/TestRailYak
|
f48e4cc916f4fc8052d4d63562e95e33e5b5563c
|
[
"MIT"
] | null | null | null |
tests/test_case.py
|
bbeale/TestRailYak
|
f48e4cc916f4fc8052d4d63562e95e33e5b5563c
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from testrail_yak import Case
from testrail_yak.lib.testrail import APIClient
from tests import BASEURL, reqmock
client = APIClient(BASEURL)
case = Case(client)
def test_get_all(reqmock):
project_id = 10
reqmock.get(f"{BASEURL}/index.php?/api/v2/get_cases/{project_id}",
status_code=200,
text='''[{
"created_by": 5,
"created_on": 1392300984,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 1,
"milestone_id": 7,
"priority_id": 2,
"refs": "RF-1, RF-2",
"section_id": 1,
"suite_id": 1,
"title": "Change document attributes (author, title, organization)",
"type_id": 4,
"updated_by": 1,
"updated_on": 1393586511
}]''')
res = case.get_all(project_id)
assert res is not None
assert type(res) == list
assert type(res[0]) == dict
assert "created_by" in res[0].keys()
assert "created_on" in res[0].keys()
assert "custom_expected" in res[0].keys()
assert "custom_preconds" in res[0].keys()
assert "custom_steps" in res[0].keys()
assert "custom_steps_separated" in res[0].keys()
assert "estimate" in res[0].keys()
assert "estimate_forecast" in res[0].keys()
assert "id" in res[0].keys()
assert "milestone_id" in res[0].keys()
assert "priority_id" in res[0].keys()
assert "refs" in res[0].keys()
assert "section_id" in res[0].keys()
assert "suite_id" in res[0].keys()
assert "title" in res[0].keys()
assert "type_id" in res[0].keys()
assert "updated_by" in res[0].keys()
assert "updated_on" in res[0].keys()
def test_get(reqmock):
case_id = 1
reqmock.get(f"{BASEURL}/index.php?/api/v2/get_case/{case_id}",
status_code=200,
text='''{
"created_by": 5,
"created_on": 1392300984,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 1,
"milestone_id": 7,
"priority_id": 2,
"refs": "RF-1, RF-2",
"section_id": 1,
"suite_id": 1,
"title": "Change document attributes (author, title, organization)",
"type_id": 4,
"updated_by": 1,
"updated_on": 1393586511
}''')
res = case.get(case_id)
assert res is not None
assert type(res) == dict
def test_add(reqmock):
section_id = 100
data = {}
reqmock.post(f"{BASEURL}/index.php?/api/v2/add_case/{section_id}",
status_code=200,
text='''{
"created_by": 5,
"created_on": 1392300984,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 1,
"milestone_id": 7,
"priority_id": 2,
"refs": "RF-1, RF-2",
"section_id": 1,
"suite_id": 1,
"title": "Change document attributes (author, title, organization)",
"type_id": 4,
"updated_by": 1,
"updated_on": 1393586511
}''')
res = case.add(section_id, data)
assert res is not None
assert type(res) == dict
def test_update(reqmock):
case_id = 100
data = {}
reqmock.post(f"{BASEURL}/index.php?/api/v2/update_case/{case_id}",
status_code=200,
text='''{
"created_by": 5,
"created_on": 1392300984,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 1,
"milestone_id": 7,
"priority_id": 2,
"refs": "RF-1, RF-2",
"section_id": 1,
"suite_id": 1,
"title": "Change document attributes (author, title, organization)",
"type_id": 4,
"updated_by": 1,
"updated_on": 1393586511
}''')
res = case.update(case_id, data)
assert res is not None
assert type(res) == dict
def test_delete(reqmock):
case_id = 100
reqmock.post(f"{BASEURL}/index.php?/api/v2/delete_case/{case_id}", status_code=200, text='')
case.delete(case_id)
| 30.691099
| 96
| 0.474753
| 619
| 5,862
| 4.319871
| 0.142165
| 0.028422
| 0.040389
| 0.067315
| 0.823485
| 0.800299
| 0.706806
| 0.676515
| 0.664547
| 0.626028
| 0
| 0.053891
| 0.379563
| 5,862
| 190
| 97
| 30.852632
| 0.681331
| 0.007165
| 0
| 0.649425
| 0
| 0
| 0.704881
| 0.062736
| 0
| 0
| 0
| 0
| 0.155172
| 1
| 0.028736
| false
| 0
| 0.017241
| 0
| 0.045977
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dc00888923f5f0273eb604bea32d28398205cc70
| 8,993
|
py
|
Python
|
src/the_tale/the_tale/accounts/tests/test_requests_data_protection.py
|
kaktycc/the-tale
|
4e2c7d33ad6fe3b36e2a885b937bc34f47100536
|
[
"BSD-3-Clause"
] | null | null | null |
src/the_tale/the_tale/accounts/tests/test_requests_data_protection.py
|
kaktycc/the-tale
|
4e2c7d33ad6fe3b36e2a885b937bc34f47100536
|
[
"BSD-3-Clause"
] | null | null | null |
src/the_tale/the_tale/accounts/tests/test_requests_data_protection.py
|
kaktycc/the-tale
|
4e2c7d33ad6fe3b36e2a885b937bc34f47100536
|
[
"BSD-3-Clause"
] | null | null | null |
import smart_imports
smart_imports.all()
class DataProtectionGetDataDialogTests(utils_testcase.TestCase):
def setUp(self):
super().setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
def test_login_required(self):
self.check_html_ok(self.request_ajax_html(utils_urls.url('accounts:profile:data-protection-get-data-dialog')),
texts=['common.login_required'])
def test_success(self):
self.request_login(self.account.email)
self.check_html_ok(self.request_ajax_html(utils_urls.url('accounts:profile:data-protection-get-data-dialog')),
texts=[utils_urls.full_url('https', 'accounts:profile:data-protection-report', '')])
class DataProtectionReportTests(utils_testcase.TestCase):
def setUp(self):
super().setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
def test_not_exists(self):
self.check_html_ok(self.request_html(utils_urls.url('accounts:profile:data-protection-report', uuid.uuid4().hex)),
texts=['accounts.profile.data_protection_report.report_not_exists'])
def test_uncompleted(self):
report_id = tt_services.data_protector.cmd_request_report(ids=[('the_tale', self.account.id)])
report_url = utils_urls.full_url('https', 'accounts:profile:data-protection-report', report_id.hex)
self.check_html_ok(self.request_html(report_url),
texts=['accounts.profile.data_protection_report.report_processing'])
def test_success(self):
data = data_protection.collect_full_data(self.account.id)
data = [('the_tale', *record) for record in data]
report = tt_api_data_protector.Report(data=data,
state=tt_api_data_protector.REPORT_STATE.READY,
completed_at=datetime.datetime.now(),
expire_at=datetime.datetime.now() + datetime.timedelta(days=1))
with mock.patch('the_tale.accounts.tt_services.DataProtectorClient.cmd_get_report',
mock.Mock(return_value=report)):
self.check_html_ok(self.request_html(utils_urls.url('accounts:profile:data-protection-report', uuid.uuid4().hex)),
texts=[self.account.nick_verbose])
def test_success__technical(self):
data = data_protection.collect_full_data(self.account.id)
expected_data = [['the_tale', *record] for record in data]
report = tt_api_data_protector.Report(data=expected_data,
state=tt_api_data_protector.REPORT_STATE.READY,
completed_at=datetime.datetime.now(),
expire_at=datetime.datetime.now() + datetime.timedelta(days=1))
with mock.patch('the_tale.accounts.tt_services.DataProtectorClient.cmd_get_report',
mock.Mock(return_value=report)):
data = self.check_ajax_ok(self.request_json(utils_urls.url('accounts:profile:data-protection-report',
uuid.uuid4().hex,
mode='technical')))
self.maxDiff = None
self.assertEqual(data['report'], expected_data)
class DataProtectionCollectDataTests(tt_api_testcase.TestCaseMixin,
utils_testcase.TestCase):
def setUp(self):
super().setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
def create_data(self, secret):
return tt_protocol_data_protector_pb2.PluginReportRequest(account_id=str(self.account.id),
secret=secret).SerializeToString()
def test_wrong_secret_key(self):
data = self.create_data(secret='wrong.secret')
self.check_ajax_error(self.post_ajax_binary(utils_urls.url('accounts:profile:tt-data-protection-collect-data'), data),
'common.wrong_tt_secret', status_code=500)
def test_success(self):
data = self.create_data(secret=django_settings.TT_SECRET)
answer = self.check_protobuf_ok(self.post_ajax_binary(utils_urls.url('accounts:profile:tt-data-protection-collect-data'), data),
answer_type=tt_protocol_data_protector_pb2.PluginReportResponse)
self.assertEqual(answer.result, tt_protocol_data_protector_pb2.PluginReportResponse.ResultType.Value('SUCCESS'))
answer_data = s11n.from_json(answer.data)
expected_data = [list(record) for record in data_protection.collect_full_data(self.account.id)]
self.assertCountEqual(answer_data, expected_data)
class DataProtectionRequestDeletionTests(utils_testcase.TestCase):
def setUp(self):
super().setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
def test_login_required(self):
self.check_ajax_error(self.post_ajax_json(utils_urls.url('accounts:profile:data-protection-request-deletion')),
'common.login_required')
def test_success(self):
self.request_login(self.account.email)
old_password = self.account._model.password
with mock.patch('the_tale.common.tt_api.data_protector.Client.cmd_request_deletion') as cmd_request_deletion:
self.check_ajax_ok(self.post_ajax_json(utils_urls.url('accounts:profile:data-protection-request-deletion')))
self.assertEqual(cmd_request_deletion.call_args_list, [mock.call(core_id=self.account.id,
ids=[('the_tale', self.account.id),
('tt_players_properties', self.account.id),
('tt_personal_messages', self.account.id),
('tt_discord', self.account.id)])])
self.request_html('/')
self.check_logged_out()
self.account.reload()
self.assertGreater(self.account.removed_at,
datetime.datetime.now() - datetime.timedelta(seconds=1))
self.assertEqual(self.account.email, None)
self.assertNotEqual(self.account._model.password, old_password)
class DataProtectionDeleteDataTests(tt_api_testcase.TestCaseMixin,
utils_testcase.TestCase):
def setUp(self):
super().setUp()
game_logic.create_test_map()
self.account = self.accounts_factory.create_account()
def create_data(self, secret):
return tt_protocol_data_protector_pb2.PluginDeletionRequest(account_id=str(self.account.id),
secret=secret).SerializeToString()
def test_wrong_secret_key(self):
data = self.create_data(secret='wrong.secret')
self.check_ajax_error(self.post_ajax_binary(utils_urls.url('accounts:profile:tt-data-protection-delete-data'), data),
'common.wrong_tt_secret', status_code=500)
def test_first_call(self):
data = self.create_data(secret=django_settings.TT_SECRET)
with mock.patch('the_tale.game.heroes.data_protection.before_remove_data', mock.Mock(return_value=False)):
with self.check_not_changed(lambda: models.Account.objects.get(id=self.account.id).email):
url = utils_urls.url('accounts:profile:tt-data-protection-delete-data')
answer = self.check_protobuf_ok(self.post_ajax_binary(url, data),
answer_type=tt_protocol_data_protector_pb2.PluginDeletionResponse)
self.assertEqual(answer.result, tt_protocol_data_protector_pb2.PluginDeletionResponse.ResultType.Value('FAILED'))
def test_second_call(self):
data = self.create_data(secret=django_settings.TT_SECRET)
with mock.patch('the_tale.game.heroes.data_protection.before_remove_data', mock.Mock(return_value=True)):
with self.check_changed(lambda: models.Account.objects.get(id=self.account.id).email):
url = utils_urls.url('accounts:profile:tt-data-protection-delete-data')
answer = self.check_protobuf_ok(self.post_ajax_binary(url, data),
answer_type=tt_protocol_data_protector_pb2.PluginDeletionResponse)
self.assertEqual(answer.result, tt_protocol_data_protector_pb2.PluginDeletionResponse.ResultType.Value('SUCCESS'))
| 46.838542
| 136
| 0.632492
| 995
| 8,993
| 5.428141
| 0.153769
| 0.052953
| 0.031291
| 0.044436
| 0.791335
| 0.774301
| 0.750231
| 0.726162
| 0.710979
| 0.696538
| 0
| 0.003337
| 0.266874
| 8,993
| 191
| 137
| 47.08377
| 0.815865
| 0
| 0
| 0.511811
| 0
| 0
| 0.142571
| 0.127891
| 0
| 0
| 0
| 0
| 0.070866
| 1
| 0.15748
| false
| 0.015748
| 0.015748
| 0.015748
| 0.228346
| 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
|
dc09f6ab84ad3025bf26023596ae5d7834002c28
| 131
|
py
|
Python
|
scipy/integrate/vode_clr.py
|
jasonmccampbell/scipy-refactor
|
52708e04bca51e7043248d56383780b1e51e0d8f
|
[
"BSD-3-Clause"
] | 8
|
2015-10-07T00:37:32.000Z
|
2022-01-21T17:02:33.000Z
|
scipy/integrate/vode_clr.py
|
enthought/scipy-refactor
|
52708e04bca51e7043248d56383780b1e51e0d8f
|
[
"BSD-3-Clause"
] | null | null | null |
scipy/integrate/vode_clr.py
|
enthought/scipy-refactor
|
52708e04bca51e7043248d56383780b1e51e0d8f
|
[
"BSD-3-Clause"
] | 8
|
2015-05-09T14:23:57.000Z
|
2018-11-15T05:56:00.000Z
|
import sys
if sys.platform == 'cli':
import clr
clr.AddReference('integrate')
from scipy__integrate__vode import *
| 13.1
| 40
| 0.687023
| 16
| 131
| 5.375
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221374
| 131
| 9
| 41
| 14.555556
| 0.843137
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
906d36194bf015878a31d8605156735198adbc43
| 56
|
py
|
Python
|
PyQuantum/TCL_sink/WaveFunction.py
|
alexfmsu/pyquantum
|
78b09987cbfecf549e67b919bb5cb2046b21ad44
|
[
"MIT"
] | null | null | null |
PyQuantum/TCL_sink/WaveFunction.py
|
alexfmsu/pyquantum
|
78b09987cbfecf549e67b919bb5cb2046b21ad44
|
[
"MIT"
] | null | null | null |
PyQuantum/TCL_sink/WaveFunction.py
|
alexfmsu/pyquantum
|
78b09987cbfecf549e67b919bb5cb2046b21ad44
|
[
"MIT"
] | 2
|
2020-07-28T08:40:06.000Z
|
2022-02-16T23:04:58.000Z
|
from PyQuantum.TC_sink.WaveFunction import WaveFunction
| 28
| 55
| 0.892857
| 7
| 56
| 7
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 56
| 1
| 56
| 56
| 0.942308
| 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
|
908c0b3219a97fdc6f20853c0564f3918932a228
| 78
|
py
|
Python
|
cf/abstract/__init__.py
|
sadielbartholomew/cf-python
|
98541d8e55c703eca9bfba4168fb3d42755267da
|
[
"MIT"
] | 49
|
2019-10-08T12:46:39.000Z
|
2022-02-06T01:13:30.000Z
|
cf/abstract/__init__.py
|
sadielbartholomew/cf-python
|
98541d8e55c703eca9bfba4168fb3d42755267da
|
[
"MIT"
] | 279
|
2019-10-07T11:14:37.000Z
|
2022-03-31T13:46:37.000Z
|
cf/abstract/__init__.py
|
sadielbartholomew/cf-python
|
98541d8e55c703eca9bfba4168fb3d42755267da
|
[
"MIT"
] | 14
|
2019-10-25T08:54:06.000Z
|
2022-01-31T10:42:39.000Z
|
# from .coordinate import Coordinate
from .constructlist import ConstructList
| 26
| 40
| 0.846154
| 8
| 78
| 8.25
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 78
| 2
| 41
| 39
| 0.956522
| 0.435897
| 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
|
909e5d928b5d5522f76a6e4298c841d2ed8aaf43
| 126
|
py
|
Python
|
tests/fixtures/my_app/settings/__init__.py
|
peopledoc/django-compose-settings
|
83ce81d3f0de224efcdf632a7ba571759cf8662d
|
[
"MIT"
] | 2
|
2018-05-31T12:46:46.000Z
|
2020-06-30T19:21:02.000Z
|
tests/fixtures/my_app/settings/__init__.py
|
peopledoc/django-compose-settings
|
83ce81d3f0de224efcdf632a7ba571759cf8662d
|
[
"MIT"
] | null | null | null |
tests/fixtures/my_app/settings/__init__.py
|
peopledoc/django-compose-settings
|
83ce81d3f0de224efcdf632a7ba571759cf8662d
|
[
"MIT"
] | 2
|
2020-06-01T14:06:15.000Z
|
2021-07-06T11:46:26.000Z
|
from django_compose_settings import modules_loader
locals().update(modules_loader(prefix='my_app', default='base,etc,post'))
| 31.5
| 73
| 0.81746
| 18
| 126
| 5.444444
| 0.888889
| 0.265306
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 126
| 3
| 74
| 42
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0.150794
| 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
|
90a63891f322781890529bdcd9e7b5228e0b502c
| 80
|
py
|
Python
|
tkviews/core/__init__.py
|
eumis/tkviews
|
d4765602d08e48d8eb14f2019c0a78dbf0b9ee14
|
[
"MIT"
] | 5
|
2018-04-12T20:30:48.000Z
|
2021-01-03T19:11:06.000Z
|
tkviews/core/__init__.py
|
eumis/tkviews
|
d4765602d08e48d8eb14f2019c0a78dbf0b9ee14
|
[
"MIT"
] | null | null | null |
tkviews/core/__init__.py
|
eumis/tkviews
|
d4765602d08e48d8eb14f2019c0a78dbf0b9ee14
|
[
"MIT"
] | 2
|
2021-01-03T19:11:22.000Z
|
2021-01-31T12:26:59.000Z
|
"""Core package"""
from .rendering import TkRenderingContext, render_attribute
| 20
| 59
| 0.8
| 8
| 80
| 7.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 80
| 3
| 60
| 26.666667
| 0.875
| 0.15
| 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
|
90c2b9f12c25e86c45a9ab8626ca6ab734578ab1
| 68
|
py
|
Python
|
user_agent_rotator/__init__.py
|
elvesrodrigues/scrapy-user-agent-rotator
|
f67c308de604baea4b38e0cf999d0fb573cffc29
|
[
"MIT"
] | null | null | null |
user_agent_rotator/__init__.py
|
elvesrodrigues/scrapy-user-agent-rotator
|
f67c308de604baea4b38e0cf999d0fb573cffc29
|
[
"MIT"
] | null | null | null |
user_agent_rotator/__init__.py
|
elvesrodrigues/scrapy-user-agent-rotator
|
f67c308de604baea4b38e0cf999d0fb573cffc29
|
[
"MIT"
] | null | null | null |
from user_agent_rotator.middlewares import RotateUserAgentMiddleware
| 68
| 68
| 0.941176
| 7
| 68
| 8.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044118
| 68
| 1
| 68
| 68
| 0.953846
| 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
|
90d1453b3341bcce4f9807bc71cd21ed61ebcb72
| 187
|
py
|
Python
|
hyperparameter_optimization.py
|
jasperhyp/Chemprop4SE
|
c02b604b63b6766464db829fea0b306c67302e82
|
[
"MIT"
] | 1
|
2021-12-15T05:18:07.000Z
|
2021-12-15T05:18:07.000Z
|
hyperparameter_optimization.py
|
jasperhyp/chemprop4SE
|
c02b604b63b6766464db829fea0b306c67302e82
|
[
"MIT"
] | null | null | null |
hyperparameter_optimization.py
|
jasperhyp/chemprop4SE
|
c02b604b63b6766464db829fea0b306c67302e82
|
[
"MIT"
] | null | null | null |
"""Optimizes hyperparameters using Bayesian optimization."""
from chemprop.hyperparameter_optimization import chemprop_hyperopt
if __name__ == '__main__':
chemprop_hyperopt()
| 26.714286
| 67
| 0.780749
| 17
| 187
| 7.941176
| 0.764706
| 0.237037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139037
| 187
| 6
| 68
| 31.166667
| 0.838509
| 0.28877
| 0
| 0
| 0
| 0
| 0.066116
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
29047b166c793e7459c1b90abf260cdad55711a0
| 35
|
py
|
Python
|
python/src/__main__.py
|
tankersleyj/algorithms
|
821d9e86a9b1d167ca2abd5bdeb27b815b164f43
|
[
"MIT"
] | null | null | null |
python/src/__main__.py
|
tankersleyj/algorithms
|
821d9e86a9b1d167ca2abd5bdeb27b815b164f43
|
[
"MIT"
] | null | null | null |
python/src/__main__.py
|
tankersleyj/algorithms
|
821d9e86a9b1d167ca2abd5bdeb27b815b164f43
|
[
"MIT"
] | null | null | null |
from . import main
main.execute()
| 8.75
| 18
| 0.714286
| 5
| 35
| 5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171429
| 35
| 3
| 19
| 11.666667
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2918cdb9dbe80de8d5c660cae7a32e527ac7d872
| 122
|
py
|
Python
|
assistant/admin.py
|
brajeshkumar609/KumarLab
|
fdb79de662cc27c01c93d5f3599f492c9be6bf14
|
[
"MIT"
] | 2
|
2021-03-14T09:36:38.000Z
|
2021-12-15T10:59:22.000Z
|
assistant/admin.py
|
brajeshkumar609/KumarLab
|
fdb79de662cc27c01c93d5f3599f492c9be6bf14
|
[
"MIT"
] | 6
|
2021-03-30T12:45:27.000Z
|
2021-09-22T18:36:14.000Z
|
assistant/admin.py
|
saifulshihab/mlabreport
|
36282aa9204652c541ad38f11445324e7ba02db5
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import assistant
# Register your models here.
admin.site.register(assistant)
| 30.5
| 32
| 0.827869
| 17
| 122
| 5.941176
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106557
| 122
| 4
| 33
| 30.5
| 0.926606
| 0.213115
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
292363e64d276f53369ea151209972fcc9489e01
| 15,655
|
py
|
Python
|
audio/paddleaudio/features/layers.py
|
jerryuhoo/PaddleSpeech
|
1eec7b5e042da294c7524af92f0fae4c32a71aa3
|
[
"Apache-2.0"
] | 1,379
|
2021-11-10T02:42:21.000Z
|
2022-03-31T13:34:25.000Z
|
audio/paddleaudio/features/layers.py
|
jerryuhoo/PaddleSpeech
|
1eec7b5e042da294c7524af92f0fae4c32a71aa3
|
[
"Apache-2.0"
] | 268
|
2021-11-10T14:07:34.000Z
|
2022-03-31T02:25:20.000Z
|
audio/paddleaudio/features/layers.py
|
jerryuhoo/PaddleSpeech
|
1eec7b5e042da294c7524af92f0fae4c32a71aa3
|
[
"Apache-2.0"
] | 296
|
2021-11-15T02:37:11.000Z
|
2022-03-31T12:14:46.000Z
|
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from functools import partial
from typing import Optional
from typing import Union
import paddle
import paddle.nn as nn
from paddle import Tensor
from ..functional import compute_fbank_matrix
from ..functional import create_dct
from ..functional import power_to_db
from ..functional.window import get_window
__all__ = [
'Spectrogram',
'MelSpectrogram',
'LogMelSpectrogram',
'MFCC',
]
class Spectrogram(nn.Layer):
"""Compute spectrogram of given signals, typically audio waveforms.
The spectorgram is defined as the complex norm of the short-time Fourier transformation.
Args:
n_fft (int, optional): The number of frequency components of the discrete Fourier transform. Defaults to 512.
hop_length (Optional[int], optional): The hop length of the short time FFT. If `None`, it is set to `win_length//4`. Defaults to None.
win_length (Optional[int], optional): The window length of the short time FFT. If `None`, it is set to same as `n_fft`. Defaults to None.
window (str, optional): The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'kaiser', 'gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'. Defaults to 'hann'.
power (float, optional): Exponent for the magnitude spectrogram. Defaults to 2.0.
center (bool, optional): Whether to pad `x` to make that the :math:`t \times hop\\_length` at the center of `t`-th frame. Defaults to True.
pad_mode (str, optional): Choose padding pattern when `center` is `True`. Defaults to 'reflect'.
dtype (str, optional): Data type of input and window. Defaults to 'float32'.
"""
def __init__(self,
n_fft: int=512,
hop_length: Optional[int]=None,
win_length: Optional[int]=None,
window: str='hann',
power: float=2.0,
center: bool=True,
pad_mode: str='reflect',
dtype: str='float32') -> None:
super(Spectrogram, self).__init__()
assert power > 0, 'Power of spectrogram must be > 0.'
self.power = power
if win_length is None:
win_length = n_fft
self.fft_window = get_window(
window, win_length, fftbins=True, dtype=dtype)
self._stft = partial(
paddle.signal.stft,
n_fft=n_fft,
hop_length=hop_length,
win_length=win_length,
window=self.fft_window,
center=center,
pad_mode=pad_mode)
self.register_buffer('fft_window', self.fft_window)
def forward(self, x: Tensor) -> Tensor:
"""
Args:
x (Tensor): Tensor of waveforms with shape `(N, T)`
Returns:
Tensor: Spectrograms with shape `(N, n_fft//2 + 1, num_frames)`.
"""
stft = self._stft(x)
spectrogram = paddle.pow(paddle.abs(stft), self.power)
return spectrogram
class MelSpectrogram(nn.Layer):
"""Compute the melspectrogram of given signals, typically audio waveforms. It is computed by multiplying spectrogram with Mel filter bank matrix.
Args:
sr (int, optional): Sample rate. Defaults to 22050.
n_fft (int, optional): The number of frequency components of the discrete Fourier transform. Defaults to 512.
hop_length (Optional[int], optional): The hop length of the short time FFT. If `None`, it is set to `win_length//4`. Defaults to None.
win_length (Optional[int], optional): The window length of the short time FFT. If `None`, it is set to same as `n_fft`. Defaults to None.
window (str, optional): The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'kaiser', 'gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'. Defaults to 'hann'.
power (float, optional): Exponent for the magnitude spectrogram. Defaults to 2.0.
center (bool, optional): Whether to pad `x` to make that the :math:`t \times hop\\_length` at the center of `t`-th frame. Defaults to True.
pad_mode (str, optional): Choose padding pattern when `center` is `True`. Defaults to 'reflect'.
n_mels (int, optional): Number of mel bins. Defaults to 64.
f_min (float, optional): Minimum frequency in Hz. Defaults to 50.0.
f_max (Optional[float], optional): Maximum frequency in Hz. Defaults to None.
htk (bool, optional): Use HTK formula in computing fbank matrix. Defaults to False.
norm (Union[str, float], optional): Type of normalization in computing fbank matrix. Slaney-style is used by default. You can specify norm=1.0/2.0 to use customized p-norm normalization. Defaults to 'slaney'.
dtype (str, optional): Data type of input and window. Defaults to 'float32'.
"""
def __init__(self,
sr: int=22050,
n_fft: int=512,
hop_length: Optional[int]=None,
win_length: Optional[int]=None,
window: str='hann',
power: float=2.0,
center: bool=True,
pad_mode: str='reflect',
n_mels: int=64,
f_min: float=50.0,
f_max: Optional[float]=None,
htk: bool=False,
norm: Union[str, float]='slaney',
dtype: str='float32') -> None:
super(MelSpectrogram, self).__init__()
self._spectrogram = Spectrogram(
n_fft=n_fft,
hop_length=hop_length,
win_length=win_length,
window=window,
power=power,
center=center,
pad_mode=pad_mode,
dtype=dtype)
self.n_mels = n_mels
self.f_min = f_min
self.f_max = f_max
self.htk = htk
self.norm = norm
if f_max is None:
f_max = sr // 2
self.fbank_matrix = compute_fbank_matrix(
sr=sr,
n_fft=n_fft,
n_mels=n_mels,
f_min=f_min,
f_max=f_max,
htk=htk,
norm=norm,
dtype=dtype) # float64 for better numerical results
self.register_buffer('fbank_matrix', self.fbank_matrix)
def forward(self, x: Tensor) -> Tensor:
"""
Args:
x (Tensor): Tensor of waveforms with shape `(N, T)`
Returns:
Tensor: Mel spectrograms with shape `(N, n_mels, num_frames)`.
"""
spect_feature = self._spectrogram(x)
mel_feature = paddle.matmul(self.fbank_matrix, spect_feature)
return mel_feature
class LogMelSpectrogram(nn.Layer):
"""Compute log-mel-spectrogram feature of given signals, typically audio waveforms.
Args:
sr (int, optional): Sample rate. Defaults to 22050.
n_fft (int, optional): The number of frequency components of the discrete Fourier transform. Defaults to 512.
hop_length (Optional[int], optional): The hop length of the short time FFT. If `None`, it is set to `win_length//4`. Defaults to None.
win_length (Optional[int], optional): The window length of the short time FFT. If `None`, it is set to same as `n_fft`. Defaults to None.
window (str, optional): The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'kaiser', 'gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'. Defaults to 'hann'.
power (float, optional): Exponent for the magnitude spectrogram. Defaults to 2.0.
center (bool, optional): Whether to pad `x` to make that the :math:`t \times hop\\_length` at the center of `t`-th frame. Defaults to True.
pad_mode (str, optional): Choose padding pattern when `center` is `True`. Defaults to 'reflect'.
n_mels (int, optional): Number of mel bins. Defaults to 64.
f_min (float, optional): Minimum frequency in Hz. Defaults to 50.0.
f_max (Optional[float], optional): Maximum frequency in Hz. Defaults to None.
htk (bool, optional): Use HTK formula in computing fbank matrix. Defaults to False.
norm (Union[str, float], optional): Type of normalization in computing fbank matrix. Slaney-style is used by default. You can specify norm=1.0/2.0 to use customized p-norm normalization. Defaults to 'slaney'.
ref_value (float, optional): The reference value. If smaller than 1.0, the db level of the signal will be pulled up accordingly. Otherwise, the db level is pushed down. Defaults to 1.0.
amin (float, optional): The minimum value of input magnitude. Defaults to 1e-10.
top_db (Optional[float], optional): The maximum db value of spectrogram. Defaults to None.
dtype (str, optional): Data type of input and window. Defaults to 'float32'.
"""
def __init__(self,
sr: int=22050,
n_fft: int=512,
hop_length: Optional[int]=None,
win_length: Optional[int]=None,
window: str='hann',
power: float=2.0,
center: bool=True,
pad_mode: str='reflect',
n_mels: int=64,
f_min: float=50.0,
f_max: Optional[float]=None,
htk: bool=False,
norm: Union[str, float]='slaney',
ref_value: float=1.0,
amin: float=1e-10,
top_db: Optional[float]=None,
dtype: str='float32') -> None:
super(LogMelSpectrogram, self).__init__()
self._melspectrogram = MelSpectrogram(
sr=sr,
n_fft=n_fft,
hop_length=hop_length,
win_length=win_length,
window=window,
power=power,
center=center,
pad_mode=pad_mode,
n_mels=n_mels,
f_min=f_min,
f_max=f_max,
htk=htk,
norm=norm,
dtype=dtype)
self.ref_value = ref_value
self.amin = amin
self.top_db = top_db
def forward(self, x: Tensor) -> Tensor:
"""
Args:
x (Tensor): Tensor of waveforms with shape `(N, T)`
Returns:
Tensor: Log mel spectrograms with shape `(N, n_mels, num_frames)`.
"""
mel_feature = self._melspectrogram(x)
log_mel_feature = power_to_db(
mel_feature,
ref_value=self.ref_value,
amin=self.amin,
top_db=self.top_db)
return log_mel_feature
class MFCC(nn.Layer):
"""Compute mel frequency cepstral coefficients(MFCCs) feature of given waveforms.
Args:
sr (int, optional): Sample rate. Defaults to 22050.
n_mfcc (int, optional): [description]. Defaults to 40.
n_fft (int, optional): The number of frequency components of the discrete Fourier transform. Defaults to 512.
hop_length (Optional[int], optional): The hop length of the short time FFT. If `None`, it is set to `win_length//4`. Defaults to None.
win_length (Optional[int], optional): The window length of the short time FFT. If `None`, it is set to same as `n_fft`. Defaults to None.
window (str, optional): The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'kaiser', 'gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'. Defaults to 'hann'.
power (float, optional): Exponent for the magnitude spectrogram. Defaults to 2.0.
center (bool, optional): Whether to pad `x` to make that the :math:`t \times hop\\_length` at the center of `t`-th frame. Defaults to True.
pad_mode (str, optional): Choose padding pattern when `center` is `True`. Defaults to 'reflect'.
n_mels (int, optional): Number of mel bins. Defaults to 64.
f_min (float, optional): Minimum frequency in Hz. Defaults to 50.0.
f_max (Optional[float], optional): Maximum frequency in Hz. Defaults to None.
htk (bool, optional): Use HTK formula in computing fbank matrix. Defaults to False.
norm (Union[str, float], optional): Type of normalization in computing fbank matrix. Slaney-style is used by default. You can specify norm=1.0/2.0 to use customized p-norm normalization. Defaults to 'slaney'.
ref_value (float, optional): The reference value. If smaller than 1.0, the db level of the signal will be pulled up accordingly. Otherwise, the db level is pushed down. Defaults to 1.0.
amin (float, optional): The minimum value of input magnitude. Defaults to 1e-10.
top_db (Optional[float], optional): The maximum db value of spectrogram. Defaults to None.
dtype (str, optional): Data type of input and window. Defaults to 'float32'.
"""
def __init__(self,
sr: int=22050,
n_mfcc: int=40,
n_fft: int=512,
hop_length: Optional[int]=None,
win_length: Optional[int]=None,
window: str='hann',
power: float=2.0,
center: bool=True,
pad_mode: str='reflect',
n_mels: int=64,
f_min: float=50.0,
f_max: Optional[float]=None,
htk: bool=False,
norm: Union[str, float]='slaney',
ref_value: float=1.0,
amin: float=1e-10,
top_db: Optional[float]=None,
dtype: str=paddle.float32) -> None:
super(MFCC, self).__init__()
assert n_mfcc <= n_mels, 'n_mfcc cannot be larger than n_mels: %d vs %d' % (
n_mfcc, n_mels)
self._log_melspectrogram = LogMelSpectrogram(
sr=sr,
n_fft=n_fft,
hop_length=hop_length,
win_length=win_length,
window=window,
power=power,
center=center,
pad_mode=pad_mode,
n_mels=n_mels,
f_min=f_min,
f_max=f_max,
htk=htk,
norm=norm,
ref_value=ref_value,
amin=amin,
top_db=top_db,
dtype=dtype)
self.dct_matrix = create_dct(n_mfcc=n_mfcc, n_mels=n_mels, dtype=dtype)
self.register_buffer('dct_matrix', self.dct_matrix)
def forward(self, x: Tensor) -> Tensor:
"""
Args:
x (Tensor): Tensor of waveforms with shape `(N, T)`
Returns:
Tensor: Mel frequency cepstral coefficients with shape `(N, n_mfcc, num_frames)`.
"""
log_mel_feature = self._log_melspectrogram(x)
mfcc = paddle.matmul(
log_mel_feature.transpose((0, 2, 1)), self.dct_matrix).transpose(
(0, 2, 1)) # (B, n_mels, L)
return mfcc
| 47.583587
| 268
| 0.614309
| 2,076
| 15,655
| 4.510116
| 0.125723
| 0.060878
| 0.029051
| 0.013457
| 0.735128
| 0.723486
| 0.708534
| 0.708534
| 0.708534
| 0.700523
| 0
| 0.016243
| 0.288215
| 15,655
| 328
| 269
| 47.728659
| 0.824015
| 0.543596
| 0
| 0.590426
| 0
| 0
| 0.03594
| 0
| 0
| 0
| 0
| 0
| 0.010638
| 1
| 0.042553
| false
| 0
| 0.053191
| 0
| 0.138298
| 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
|
292374c13f14bec0d792ec8d8986e962fed7e17c
| 175
|
py
|
Python
|
pypesto/storage/__init__.py
|
LarsFroehling/pyPESTO
|
f9f4a526c0f34cda2c2670b7d61d4f9872a8e368
|
[
"BSD-3-Clause"
] | null | null | null |
pypesto/storage/__init__.py
|
LarsFroehling/pyPESTO
|
f9f4a526c0f34cda2c2670b7d61d4f9872a8e368
|
[
"BSD-3-Clause"
] | null | null | null |
pypesto/storage/__init__.py
|
LarsFroehling/pyPESTO
|
f9f4a526c0f34cda2c2670b7d61d4f9872a8e368
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Storage
======
"""
from .save_to_hdf5 import ProblemHDF5Writer, OptimizationResultHDF5Writer
from .read_from_hdf5 import ProblemHDF5Reader, OptimizationResultHDF5Reader
| 19.444444
| 75
| 0.817143
| 15
| 175
| 9.266667
| 0.733333
| 0.143885
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.091429
| 175
| 8
| 76
| 21.875
| 0.836478
| 0.08
| 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
|
29287dfc05938b7e642da5d87240ed8b9d9153b7
| 187
|
py
|
Python
|
languages/python/topics/log/Logger.py
|
lakshmikanth-tesla/DeveloperNotes2Myself
|
9a5dad930ddbb99ace46d2d672109e8553aecbc2
|
[
"MIT"
] | 2
|
2019-05-25T10:09:00.000Z
|
2022-03-11T09:06:23.000Z
|
languages/python/topics/log/Logger.py
|
lakshmikanth-tesla/DeveloperNotes2Myself
|
9a5dad930ddbb99ace46d2d672109e8553aecbc2
|
[
"MIT"
] | 2
|
2020-03-31T04:30:17.000Z
|
2020-10-30T07:54:28.000Z
|
languages/python/topics/log/Logger.py
|
lakshmikanth-tesla/DeveloperNotes2Myself
|
9a5dad930ddbb99ace46d2d672109e8553aecbc2
|
[
"MIT"
] | 4
|
2019-07-12T13:18:56.000Z
|
2021-11-17T08:04:55.000Z
|
from logging.config import dictConfig
# Custom settings for the logger
from LogSettings import LOG_SETTINGS
def initialise():
"""Initialize Logger"""
dictConfig(LOG_SETTINGS)
| 17
| 37
| 0.764706
| 22
| 187
| 6.409091
| 0.681818
| 0.156028
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165775
| 187
| 10
| 38
| 18.7
| 0.903846
| 0.262032
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
292da335147a3381c1d48f5f8f7bb9cfed044726
| 75
|
py
|
Python
|
website/project/views/__init__.py
|
bdyetton/prettychart
|
e8b33a7dfdc8c33d15969586be7f68172795f76d
|
[
"Apache-2.0"
] | null | null | null |
website/project/views/__init__.py
|
bdyetton/prettychart
|
e8b33a7dfdc8c33d15969586be7f68172795f76d
|
[
"Apache-2.0"
] | null | null | null |
website/project/views/__init__.py
|
bdyetton/prettychart
|
e8b33a7dfdc8c33d15969586be7f68172795f76d
|
[
"Apache-2.0"
] | null | null | null |
from . import contributor, log, node, register, tag, file, comment # noqa
| 37.5
| 74
| 0.72
| 10
| 75
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173333
| 75
| 1
| 75
| 75
| 0.870968
| 0.053333
| 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
|
29362afe1fa88690e7fca5a3c1df1488ee58eb3d
| 389
|
py
|
Python
|
decaylanguage/data/__init__.py
|
savalless/decaylanguage
|
e8e7889d3a388e3f625a8bd1fe31d56ec23ee310
|
[
"BSD-3-Clause"
] | null | null | null |
decaylanguage/data/__init__.py
|
savalless/decaylanguage
|
e8e7889d3a388e3f625a8bd1fe31d56ec23ee310
|
[
"BSD-3-Clause"
] | null | null | null |
decaylanguage/data/__init__.py
|
savalless/decaylanguage
|
e8e7889d3a388e3f625a8bd1fe31d56ec23ee310
|
[
"BSD-3-Clause"
] | null | null | null |
try:
from importlib.resources import open_text
except ImportError:
from importlib_resources import open_text
def get_mass_width():
return open_text('decaylanguage.data', 'mass_width_2008.csv')
def get_special():
return open_text('decaylanguage.data', 'MintDalitzSpecialParticles.csv')
def get_latex():
return open_text('decaylanguage.data', 'pdgID_to_latex.txt')
| 22.882353
| 76
| 0.766067
| 50
| 389
| 5.68
| 0.48
| 0.140845
| 0.147887
| 0.285211
| 0.580986
| 0.253521
| 0
| 0
| 0
| 0
| 0
| 0.011869
| 0.133676
| 389
| 16
| 77
| 24.3125
| 0.830861
| 0
| 0
| 0
| 0
| 0
| 0.311054
| 0.077121
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| true
| 0
| 0.3
| 0.3
| 0.9
| 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
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
29507f4261581c4e691a6a5e38fc65493f02db07
| 286
|
py
|
Python
|
docs/diagram.py
|
eiselems/data-processing-pipeline
|
51fb85211156123d9407ac47959fffe731007535
|
[
"MIT"
] | null | null | null |
docs/diagram.py
|
eiselems/data-processing-pipeline
|
51fb85211156123d9407ac47959fffe731007535
|
[
"MIT"
] | null | null | null |
docs/diagram.py
|
eiselems/data-processing-pipeline
|
51fb85211156123d9407ac47959fffe731007535
|
[
"MIT"
] | null | null | null |
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
#see https://diagrams.mingrammer.com/docs/diagram
with Diagram("Pipeline Architecture", show=True):
ELB("lb") >> EC2("web") >> RDS("userdb")
| 35.75
| 49
| 0.762238
| 41
| 286
| 5.317073
| 0.585366
| 0.220183
| 0.206422
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007843
| 0.108392
| 286
| 8
| 50
| 35.75
| 0.847059
| 0.167832
| 0
| 0
| 0
| 0
| 0.134454
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
297cd54793f4440a2802101daa4d56143055686d
| 285
|
py
|
Python
|
klap4/resources/__init__.py
|
vganesh1798/klap4-backend
|
9a823c3a210a7fca157ffdcdeaeda8c4d36ed973
|
[
"MIT"
] | 1
|
2020-02-12T20:45:41.000Z
|
2020-02-12T20:45:41.000Z
|
klap4/resources/__init__.py
|
vganesh1798/backendbois
|
9a823c3a210a7fca157ffdcdeaeda8c4d36ed973
|
[
"MIT"
] | null | null | null |
klap4/resources/__init__.py
|
vganesh1798/backendbois
|
9a823c3a210a7fca157ffdcdeaeda8c4d36ed973
|
[
"MIT"
] | 1
|
2020-04-04T20:02:49.000Z
|
2020-04-04T20:02:49.000Z
|
from klap4.resources.artist import ArtistListAPI, ArtistAPI
from klap4.resources.album import AlbumListAPI, AlbumAPI, AlbumReviewAPI
from klap4.resources.charts import ChartsAPI
from klap4.resources.playlist import PlaylistAPI, PlaylistEntryAPI
from klap4.resources.song import SongAPI
| 57
| 72
| 0.870175
| 34
| 285
| 7.294118
| 0.529412
| 0.181452
| 0.362903
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019084
| 0.080702
| 285
| 5
| 73
| 57
| 0.927481
| 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
|
4634590cf02e2a361912c23d83f324b4d1d83897
| 24,124
|
py
|
Python
|
sources/parsetab.py
|
juliennix/NXLT
|
73c1453027230f3073a60758421541086eba1d58
|
[
"MIT"
] | null | null | null |
sources/parsetab.py
|
juliennix/NXLT
|
73c1453027230f3073a60758421541086eba1d58
|
[
"MIT"
] | null | null | null |
sources/parsetab.py
|
juliennix/NXLT
|
73c1453027230f3073a60758421541086eba1d58
|
[
"MIT"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '|\x03\xc9\x8fL\xea\xa0\xa2`v\xc7\xe5\xf6L\xd3\xd2'
_lr_action_items = {'NUMBER':([3,8,12,15,33,35,39,40,43,50,52,54,55,56,57,58,63,64,65,67,68,69,71,73,74,76,77,78,79,80,81,82,83,84,85,86,96,98,100,121,122,123,124,125,126,127,128,129,130,138,140,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,18,26,26,-19,26,26,26,26,18,18,26,-29,-27,26,-23,26,-28,26,26,26,-18,-20,-22,26,-24,-26,26,-21,26,26,26,26,26,26,26,26,26,26,-52,-53,-56,-59,-58,-55,-57,26,-60,26,-25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,]),'LBRACKET':([21,38,60,61,66,97,135,148,],[53,68,96,68,100,100,-80,-81,]),'WHILE':([3,8,15,35,40,50,56,57,63,65,71,73,74,77,78,80,86,138,140,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,28,-19,28,28,-29,-27,-23,-28,-18,-20,-22,-24,-26,-21,28,28,-25,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,]),'PRINT':([3,8,15,35,40,50,56,57,63,65,71,73,74,77,78,80,86,138,140,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,30,-19,30,30,-29,-27,-23,-28,-18,-20,-22,-24,-26,-21,30,30,-25,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,]),'NEW':([3,8,15,35,40,50,56,57,63,65,71,73,74,77,78,80,86,138,140,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,31,-19,31,31,-29,-27,-23,-28,-18,-20,-22,-24,-26,-21,31,31,-25,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,]),'TRUE':([3,8,15,33,35,39,40,43,50,55,56,57,58,63,64,65,67,68,69,71,73,74,76,77,78,79,80,81,82,83,84,85,86,96,98,100,121,122,123,124,125,126,127,128,129,130,138,140,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,32,32,-19,32,32,32,32,32,-29,-27,32,-23,32,-28,32,32,32,-18,-20,-22,32,-24,-26,32,-21,32,32,32,32,32,32,32,32,32,32,-52,-53,-56,-59,-58,-55,-57,32,-60,32,-25,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,]),'MINUS':([3,8,15,24,26,29,32,33,35,38,39,40,43,45,49,50,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,94,96,98,100,101,102,103,105,107,112,113,114,115,116,117,121,122,123,124,125,126,127,128,129,130,133,134,135,136,138,140,141,146,147,148,149,151,152,153,154,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,33,-68,-67,-69,-70,33,-19,-72,33,33,33,-71,84,33,33,-29,-27,33,-72,-66,-23,33,-28,-75,33,33,33,84,-18,-20,-22,84,33,-24,-26,33,-21,33,33,33,33,33,33,84,33,33,33,84,-76,84,-73,-77,84,-64,-63,-61,-62,-65,33,-52,-53,-56,-59,-58,-55,-57,33,-60,-73,84,-80,-74,33,-25,33,84,-74,-81,33,33,33,33,84,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,]),'DIVIDE':([24,26,29,32,38,45,49,61,62,66,70,75,94,101,102,103,105,107,112,113,114,115,116,117,133,134,135,136,146,147,148,154,],[-68,-67,-69,-70,-72,-71,81,-72,-66,-75,81,81,81,81,-76,81,-73,-77,81,-64,-63,81,81,-65,-73,81,-80,-74,81,-74,-81,81,]),'LE':([24,26,29,32,45,61,62,66,94,102,107,113,114,115,116,117,133,135,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,128,-76,-77,-64,-63,-61,-62,-65,-73,-80,-74,-81,]),'RPAREN':([12,18,19,20,21,24,26,29,32,36,45,49,54,61,62,66,69,75,87,88,90,92,93,95,98,99,102,104,107,108,113,114,115,116,117,132,133,135,145,146,147,148,],[17,-16,51,-13,-15,-68,-67,-69,-70,-37,-71,-39,89,-72,-66,-75,105,107,-14,-17,119,120,-50,131,133,-38,-76,136,-77,137,-64,-63,-61,-62,-65,147,-73,-80,-51,-54,-74,-81,]),'NEWLINE':([0,3,4,9,16,17,24,25,26,27,29,32,34,36,37,41,42,45,46,47,48,49,51,61,62,66,70,72,89,91,97,99,101,102,105,107,109,110,111,112,113,114,115,116,117,118,119,120,131,133,135,136,137,138,143,147,148,149,153,154,156,159,160,166,170,171,173,175,176,178,179,180,],[3,3,3,3,3,-12,-68,3,-67,3,-69,-70,3,-37,3,3,3,-71,3,3,3,-39,-9,-72,-66,-75,-30,3,-11,-34,-78,-38,-31,-76,-35,-77,3,3,-79,-82,-64,-63,-61,-62,-65,3,-10,3,-86,-73,-80,-36,3,3,3,-74,-81,3,3,-83,3,3,-46,-42,-47,-48,-40,-44,-43,-49,-41,-45,]),'NE':([24,26,29,32,45,61,62,66,94,102,107,113,114,115,116,117,133,135,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,130,-76,-77,-64,-63,-61,-62,-65,-73,-80,-74,-81,]),'LT':([24,26,29,32,45,61,62,66,94,102,107,113,114,115,116,117,133,135,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,127,-76,-77,-64,-63,-61,-62,-65,-73,-80,-74,-81,]),'COMMA':([18,20,21,24,26,29,32,36,38,45,49,61,62,66,88,102,105,107,111,112,113,114,115,116,117,133,135,136,147,148,154,],[-16,52,-15,-68,-67,-69,-70,64,-72,-71,-39,-72,-66,-75,-17,-76,-73,-77,141,-82,-64,-63,-61,-62,-65,-73,-80,-74,-74,-81,-83,]),'PLUS':([24,26,29,32,38,45,49,61,62,66,70,75,94,101,102,103,105,107,112,113,114,115,116,117,133,134,135,136,146,147,148,154,],[-68,-67,-69,-70,-72,-71,83,-72,-66,-75,83,83,83,83,-76,83,-73,-77,83,-64,-63,-61,-62,-65,-73,83,-80,-74,83,-74,-81,83,]),'IDENTIFIER':([0,2,3,5,7,8,11,12,13,14,15,31,33,35,39,40,43,50,52,54,55,56,57,58,59,63,64,65,67,68,69,71,72,73,74,76,77,78,79,80,81,82,83,84,85,86,96,98,100,106,118,121,122,123,124,125,126,127,128,129,130,138,140,141,142,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[6,-4,-84,6,6,-85,-3,21,22,6,38,60,61,-19,61,38,61,38,21,21,61,-29,-27,61,95,-23,61,-28,61,61,61,-18,-6,-20,-22,61,-24,-26,61,-21,61,61,61,61,61,38,61,61,61,-8,-5,61,-52,-53,-56,-59,-58,-55,-57,61,-60,38,-25,61,-7,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,]),'OUT':([3,8,15,35,40,50,56,57,63,65,71,73,74,77,78,80,86,138,140,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,39,-19,39,39,-29,-27,-23,-28,-18,-20,-22,-24,-26,-21,39,39,-25,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,]),'GT':([24,26,29,32,45,61,62,66,94,102,107,113,114,115,116,117,133,135,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,124,-76,-77,-64,-63,-61,-62,-65,-73,-80,-74,-81,]),'RBRACE':([3,8,35,40,56,57,63,65,71,73,74,77,78,80,86,140,151,157,161,162,164,167,168,172,174,177,],[-84,-85,-19,72,-29,-27,-23,-28,-18,-20,-22,-24,-26,-21,118,-25,160,166,170,171,173,175,176,178,179,180,]),'EQUALS':([23,24,26,29,32,36,38,45,48,49,61,62,66,97,99,102,105,107,113,114,115,116,117,133,135,136,147,148,],[55,-68,-67,-69,-70,-37,67,-71,79,-39,-72,-66,-75,-78,-38,-76,-73,-77,-64,-63,-61,-62,-65,-73,-80,-74,-74,-81,]),'ELSE':([3,8,77,],[-84,-85,109,]),'GE':([24,26,29,32,45,61,62,66,94,102,107,113,114,115,116,117,133,135,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,126,-76,-77,-64,-63,-61,-62,-65,-73,-80,-74,-81,]),'LPAREN':([3,6,8,15,22,28,30,33,35,38,39,40,43,44,50,55,56,57,58,61,63,64,65,67,68,69,71,73,74,76,77,78,79,80,81,82,83,84,85,86,96,98,100,121,122,123,124,125,126,127,128,129,130,138,140,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,12,-85,43,54,58,59,43,-19,69,43,43,43,76,43,43,-29,-27,43,98,-23,43,-28,43,43,43,-18,-20,-22,43,-24,-26,43,-21,43,43,43,43,43,43,43,43,43,43,-52,-53,-56,-59,-58,-55,-57,43,-60,43,-25,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'TIMES':([24,26,29,32,38,45,49,61,62,66,70,75,94,101,102,103,105,107,112,113,114,115,116,117,133,134,135,136,146,147,148,154,],[-68,-67,-69,-70,-72,-71,82,-72,-66,-75,82,82,82,82,-76,82,-73,-77,82,-64,-63,82,82,-65,-73,82,-80,-74,82,-74,-81,82,]),'EQ':([24,26,29,32,45,61,62,66,94,102,107,113,114,115,116,117,133,135,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,125,-76,-77,-64,-63,-61,-62,-65,-73,-80,-74,-81,]),'IF':([3,8,15,35,40,50,56,57,63,65,71,73,74,77,78,80,86,138,140,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,44,-19,44,44,-29,-27,-23,-28,-18,-20,-22,-24,-26,-21,44,44,-25,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'AND':([24,26,29,32,45,61,62,66,93,102,107,113,114,115,116,117,133,135,146,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,122,-76,-77,-64,-63,-61,-62,-65,-73,-80,-54,-74,-81,]),'LBRACE':([3,4,8,10,17,51,89,109,119,120,137,139,144,150,],[-84,9,-85,16,-12,-9,-11,138,-10,143,149,153,156,159,]),'FALSE':([3,8,15,33,35,39,40,43,50,55,56,57,58,63,64,65,67,68,69,71,73,74,76,77,78,79,80,81,82,83,84,85,86,96,98,100,121,122,123,124,125,126,127,128,129,130,138,140,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,45,45,-19,45,45,45,45,45,-29,-27,45,-23,45,-28,45,45,45,-18,-20,-22,45,-24,-26,45,-21,45,45,45,45,45,45,45,45,45,45,-52,-53,-56,-59,-58,-55,-57,45,-60,45,-25,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'FLOAT':([3,8,15,33,35,39,40,43,50,55,56,57,58,63,64,65,67,68,69,71,73,74,76,77,78,79,80,81,82,83,84,85,86,96,98,100,121,122,123,124,125,126,127,128,129,130,138,140,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[-84,-85,24,24,-19,24,24,24,24,24,-29,-27,24,-23,24,-28,24,24,24,-18,-20,-22,24,-24,-26,24,-21,24,24,24,24,24,24,24,24,24,24,-52,-53,-56,-59,-58,-55,-57,24,-60,24,-25,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,]),'HASHTAG':([6,],[13,]),'RBRACKET':([24,26,29,32,45,53,61,62,66,68,102,103,107,113,114,115,116,117,133,134,135,147,148,],[-68,-67,-69,-70,-71,88,-72,-66,-75,102,-76,135,-77,-64,-63,-61,-62,-65,-73,148,-80,-74,-81,]),'$end':([1,2,3,5,8,11,14,72,106,118,142,],[0,-4,-84,-2,-85,-3,-1,-6,-8,-5,-7,]),'OR':([24,26,29,32,45,61,62,66,93,102,107,113,114,115,116,117,133,135,146,147,148,],[-68,-67,-69,-70,-71,-72,-66,-75,123,-76,-77,-64,-63,-61,-62,-65,-73,-80,-54,-74,-81,]),'MOD':([24,26,29,32,38,45,49,61,62,66,70,75,94,101,102,103,105,107,112,113,114,115,116,117,133,134,135,136,146,147,148,154,],[-68,-67,-69,-70,-72,-71,85,-72,-66,-75,85,85,85,85,-76,85,-73,-77,85,-64,-63,85,85,-65,-73,85,-80,-74,85,-74,-81,85,]),}
_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 = {'parameters_list':([15,40,50,55,64,69,86,98,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[23,23,23,91,99,104,23,132,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,]),'head':([0,5,7,14,],[4,4,4,4,]),'function_call':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,]),'boolean':([15,33,39,40,43,50,55,58,64,67,68,69,76,79,81,82,83,84,85,86,96,98,100,121,129,138,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,]),'argument_declaration':([12,52,54,],[20,20,20,]),'out':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,]),'condition_list':([58,76,121,],[92,108,145,]),'parralel_assignment':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,]),'program':([0,7,],[5,14,]),'argument_list':([12,52,54,],[19,87,90,]),'statement':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[35,71,35,71,35,35,71,35,35,35,71,35,35,71,71,35,71,35,71,71,35,71,71,71,]),'parameter_declaration':([15,40,50,55,64,69,86,98,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,]),'print':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,]),'newlines':([0,3,4,9,16,25,27,34,37,41,42,46,47,48,72,109,110,118,120,137,138,143,149,153,156,159,],[7,8,10,15,50,56,57,63,65,73,74,77,78,80,106,139,140,142,144,150,152,155,158,163,165,169,]),'body':([15,50,138,149,152,153,155,158,159,163,165,169,],[40,86,151,157,161,162,164,167,168,172,174,177,]),'begin':([0,],[1,]),'value_list':([79,],[111,]),'assignment':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,]),'comp_symbol':([94,],[129,]),'array_assignment':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,]),'else_block':([77,],[110,]),'bracket_list':([38,60,61,],[66,97,66,]),'condition':([58,76,121,],[93,93,93,]),'function_definition':([0,5,7,14,],[2,11,2,11,]),'comb_symbol':([93,],[121,]),'if_block':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,]),'while_block':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,]),'array_declaration':([15,40,50,86,138,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,]),'expression':([15,33,39,40,43,50,55,58,64,67,68,69,76,79,81,82,83,84,85,86,96,98,100,121,129,138,141,149,151,152,153,155,157,158,159,161,162,163,164,165,167,168,169,172,174,177,],[49,62,70,49,75,49,49,94,49,101,103,49,94,112,113,114,115,116,117,49,103,49,134,94,146,49,154,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,]),}
_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' -> begin","S'",1,None,None,None),
('begin -> newlines program','begin',2,'p_begin','/home/nix/workspace/JG3/Parser.py',25),
('begin -> program','begin',1,'p_begin','/home/nix/workspace/JG3/Parser.py',26),
('program -> program function_definition','program',2,'p_program','/home/nix/workspace/JG3/Parser.py',33),
('program -> function_definition','program',1,'p_program','/home/nix/workspace/JG3/Parser.py',34),
('function_definition -> head newlines LBRACE newlines body RBRACE','function_definition',6,'p_function_definition','/home/nix/workspace/JG3/Parser.py',42),
('function_definition -> head LBRACE newlines body RBRACE','function_definition',5,'p_function_definition','/home/nix/workspace/JG3/Parser.py',43),
('function_definition -> head newlines LBRACE newlines body RBRACE newlines','function_definition',7,'p_function_definition','/home/nix/workspace/JG3/Parser.py',44),
('function_definition -> head LBRACE newlines body RBRACE newlines','function_definition',6,'p_function_definition','/home/nix/workspace/JG3/Parser.py',45),
('head -> IDENTIFIER LPAREN argument_list RPAREN','head',4,'p_head','/home/nix/workspace/JG3/Parser.py',57),
('head -> IDENTIFIER HASHTAG IDENTIFIER LPAREN argument_list RPAREN','head',6,'p_head','/home/nix/workspace/JG3/Parser.py',58),
('head -> IDENTIFIER HASHTAG IDENTIFIER LPAREN RPAREN','head',5,'p_head','/home/nix/workspace/JG3/Parser.py',59),
('head -> IDENTIFIER LPAREN RPAREN','head',3,'p_head','/home/nix/workspace/JG3/Parser.py',60),
('argument_list -> argument_declaration','argument_list',1,'p_argument_list','/home/nix/workspace/JG3/Parser.py',72),
('argument_list -> argument_declaration COMMA argument_list','argument_list',3,'p_argument_list','/home/nix/workspace/JG3/Parser.py',73),
('argument_declaration -> IDENTIFIER','argument_declaration',1,'p_argument_declaration','/home/nix/workspace/JG3/Parser.py',81),
('argument_declaration -> NUMBER','argument_declaration',1,'p_argument_declaration','/home/nix/workspace/JG3/Parser.py',82),
('argument_declaration -> IDENTIFIER LBRACKET RBRACKET','argument_declaration',3,'p_argument_declaration','/home/nix/workspace/JG3/Parser.py',83),
('body -> body statement','body',2,'p_body','/home/nix/workspace/JG3/Parser.py',93),
('body -> statement','body',1,'p_body','/home/nix/workspace/JG3/Parser.py',94),
('statement -> assignment newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',103),
('statement -> array_declaration newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',104),
('statement -> array_assignment newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',105),
('statement -> parralel_assignment newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',106),
('statement -> if_block newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',107),
('statement -> if_block newlines else_block newlines','statement',4,'p_statement','/home/nix/workspace/JG3/Parser.py',108),
('statement -> while_block newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',109),
('statement -> function_call newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',110),
('statement -> print newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',111),
('statement -> out newlines','statement',2,'p_statement','/home/nix/workspace/JG3/Parser.py',112),
('out -> OUT expression','out',2,'p_out','/home/nix/workspace/JG3/Parser.py',120),
('assignment -> IDENTIFIER EQUALS expression','assignment',3,'p_assignment','/home/nix/workspace/JG3/Parser.py',125),
('multiple_assignment -> assignment','multiple_assignment',1,'p_multiple_assignment','/home/nix/workspace/JG3/Parser.py',130),
('multiple_assignment -> IDENTIFIER EQUALS multiple_assignment','multiple_assignment',3,'p_multiple_assignment','/home/nix/workspace/JG3/Parser.py',131),
('parralel_assignment -> parameters_list EQUALS parameters_list','parralel_assignment',3,'p_parralel_assignment','/home/nix/workspace/JG3/Parser.py',140),
('function_call -> IDENTIFIER LPAREN RPAREN','function_call',3,'p_function_call','/home/nix/workspace/JG3/Parser.py',145),
('function_call -> IDENTIFIER LPAREN parameters_list RPAREN','function_call',4,'p_function_call','/home/nix/workspace/JG3/Parser.py',146),
('parameters_list -> parameter_declaration','parameters_list',1,'p_parameters_list','/home/nix/workspace/JG3/Parser.py',154),
('parameters_list -> parameter_declaration COMMA parameters_list','parameters_list',3,'p_parameters_list','/home/nix/workspace/JG3/Parser.py',155),
('parameter_declaration -> expression','parameter_declaration',1,'p_parameter_declaration','/home/nix/workspace/JG3/Parser.py',163),
('while_block -> WHILE LPAREN condition_list RPAREN LBRACE newlines body RBRACE','while_block',8,'p_while_block','/home/nix/workspace/JG3/Parser.py',168),
('while_block -> WHILE LPAREN condition_list RPAREN newlines LBRACE newlines body RBRACE','while_block',9,'p_while_block','/home/nix/workspace/JG3/Parser.py',169),
('if_block -> IF LPAREN condition_list RPAREN LBRACE body RBRACE','if_block',7,'p_if_block','/home/nix/workspace/JG3/Parser.py',177),
('if_block -> IF LPAREN condition_list RPAREN newlines LBRACE body RBRACE','if_block',8,'p_if_block','/home/nix/workspace/JG3/Parser.py',178),
('if_block -> IF LPAREN condition_list RPAREN LBRACE newlines body RBRACE','if_block',8,'p_if_block','/home/nix/workspace/JG3/Parser.py',179),
('if_block -> IF LPAREN condition_list RPAREN newlines LBRACE newlines body RBRACE','if_block',9,'p_if_block','/home/nix/workspace/JG3/Parser.py',180),
('else_block -> ELSE LBRACE body RBRACE','else_block',4,'p_else_block','/home/nix/workspace/JG3/Parser.py',192),
('else_block -> ELSE LBRACE newlines body RBRACE','else_block',5,'p_else_block','/home/nix/workspace/JG3/Parser.py',193),
('else_block -> ELSE newlines LBRACE body RBRACE','else_block',5,'p_else_block','/home/nix/workspace/JG3/Parser.py',194),
('else_block -> ELSE newlines LBRACE newlines body RBRACE','else_block',6,'p_else_block','/home/nix/workspace/JG3/Parser.py',195),
('condition_list -> condition','condition_list',1,'p_condition_list','/home/nix/workspace/JG3/Parser.py',205),
('condition_list -> condition comb_symbol condition_list','condition_list',3,'p_condition_list','/home/nix/workspace/JG3/Parser.py',206),
('comb_symbol -> AND','comb_symbol',1,'p_comb_symbol','/home/nix/workspace/JG3/Parser.py',214),
('comb_symbol -> OR','comb_symbol',1,'p_comb_symbol','/home/nix/workspace/JG3/Parser.py',215),
('condition -> expression comp_symbol expression','condition',3,'p_condition','/home/nix/workspace/JG3/Parser.py',220),
('comp_symbol -> LT','comp_symbol',1,'p_comp_symbol','/home/nix/workspace/JG3/Parser.py',225),
('comp_symbol -> GT','comp_symbol',1,'p_comp_symbol','/home/nix/workspace/JG3/Parser.py',226),
('comp_symbol -> LE','comp_symbol',1,'p_comp_symbol','/home/nix/workspace/JG3/Parser.py',227),
('comp_symbol -> GE','comp_symbol',1,'p_comp_symbol','/home/nix/workspace/JG3/Parser.py',228),
('comp_symbol -> EQ','comp_symbol',1,'p_comp_symbol','/home/nix/workspace/JG3/Parser.py',229),
('comp_symbol -> NE','comp_symbol',1,'p_comp_symbol','/home/nix/workspace/JG3/Parser.py',230),
('expression -> expression PLUS expression','expression',3,'p_expression_binop','/home/nix/workspace/JG3/Parser.py',235),
('expression -> expression MINUS expression','expression',3,'p_expression_binop','/home/nix/workspace/JG3/Parser.py',236),
('expression -> expression TIMES expression','expression',3,'p_expression_binop','/home/nix/workspace/JG3/Parser.py',237),
('expression -> expression DIVIDE expression','expression',3,'p_expression_binop','/home/nix/workspace/JG3/Parser.py',238),
('expression -> expression MOD expression','expression',3,'p_expression_binop','/home/nix/workspace/JG3/Parser.py',239),
('expression -> MINUS expression','expression',2,'p_expression_uminus','/home/nix/workspace/JG3/Parser.py',244),
('expression -> NUMBER','expression',1,'p_expression_number','/home/nix/workspace/JG3/Parser.py',249),
('expression -> FLOAT','expression',1,'p_expression_float','/home/nix/workspace/JG3/Parser.py',254),
('expression -> boolean','expression',1,'p_expression_boolean','/home/nix/workspace/JG3/Parser.py',259),
('boolean -> TRUE','boolean',1,'p_boolean','/home/nix/workspace/JG3/Parser.py',264),
('boolean -> FALSE','boolean',1,'p_boolean','/home/nix/workspace/JG3/Parser.py',265),
('expression -> IDENTIFIER','expression',1,'p_expression_name','/home/nix/workspace/JG3/Parser.py',270),
('expression -> IDENTIFIER LPAREN RPAREN','expression',3,'p_exprFunction','/home/nix/workspace/JG3/Parser.py',281),
('expression -> IDENTIFIER LPAREN parameters_list RPAREN','expression',4,'p_exprFunction','/home/nix/workspace/JG3/Parser.py',282),
('expression -> IDENTIFIER bracket_list','expression',2,'p_exprArray','/home/nix/workspace/JG3/Parser.py',290),
('expression -> IDENTIFIER LBRACKET RBRACKET','expression',3,'p_exprArray','/home/nix/workspace/JG3/Parser.py',291),
('expression -> LPAREN expression RPAREN','expression',3,'p_group','/home/nix/workspace/JG3/Parser.py',299),
('array_declaration -> NEW IDENTIFIER bracket_list','array_declaration',3,'p_array_declaration','/home/nix/workspace/JG3/Parser.py',303),
('array_assignment -> array_declaration EQUALS value_list','array_assignment',3,'p_array_assignment','/home/nix/workspace/JG3/Parser.py',308),
('bracket_list -> LBRACKET expression RBRACKET','bracket_list',3,'p_bracket_list','/home/nix/workspace/JG3/Parser.py',313),
('bracket_list -> bracket_list LBRACKET expression RBRACKET','bracket_list',4,'p_bracket_list','/home/nix/workspace/JG3/Parser.py',314),
('value_list -> expression','value_list',1,'p_value_list','/home/nix/workspace/JG3/Parser.py',322),
('value_list -> value_list COMMA expression','value_list',3,'p_value_list','/home/nix/workspace/JG3/Parser.py',323),
('newlines -> NEWLINE','newlines',1,'p_newlines','/home/nix/workspace/JG3/Parser.py',332),
('newlines -> NEWLINE newlines','newlines',2,'p_newlines','/home/nix/workspace/JG3/Parser.py',333),
('print -> PRINT LPAREN IDENTIFIER RPAREN','print',4,'p_print','/home/nix/workspace/JG3/Parser.py',341),
]
| 207.965517
| 9,467
| 0.679365
| 5,119
| 24,124
| 3.134597
| 0.065638
| 0.037517
| 0.085753
| 0.101832
| 0.681728
| 0.651377
| 0.620965
| 0.578774
| 0.522373
| 0.453696
| 0
| 0.353366
| 0.030219
| 24,124
| 115
| 9,468
| 209.773913
| 0.332507
| 0.00257
| 0
| 0.018868
| 1
| 0.009434
| 0.36969
| 0.134176
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.028302
| 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
|
466074eb18e96f7ddcce72ea7ab7ace24162f9c7
| 66
|
py
|
Python
|
(function)string_cleaning_function.py
|
ElvinOuyang/adb_parse
|
6d4fb7e1675bf2f06dccb4aa7bc0ee767019ef46
|
[
"MIT"
] | null | null | null |
(function)string_cleaning_function.py
|
ElvinOuyang/adb_parse
|
6d4fb7e1675bf2f06dccb4aa7bc0ee767019ef46
|
[
"MIT"
] | null | null | null |
(function)string_cleaning_function.py
|
ElvinOuyang/adb_parse
|
6d4fb7e1675bf2f06dccb4aa7bc0ee767019ef46
|
[
"MIT"
] | null | null | null |
def clean_string(string):
return ' '.join(str(string).split())
| 33
| 40
| 0.681818
| 9
| 66
| 4.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 66
| 2
| 40
| 33
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0.014925
| 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
|
4672e24992fbe9fe3503b8cf46ffaf0cd812ee3b
| 211
|
py
|
Python
|
utils/common.py
|
smwsk/gif-python
|
29e606ee28d22049f34ff0cddb9f4ef1f6edc676
|
[
"Apache-2.0"
] | 2
|
2020-03-16T13:28:28.000Z
|
2020-03-17T13:47:58.000Z
|
utils/common.py
|
smwsk/gif-python
|
29e606ee28d22049f34ff0cddb9f4ef1f6edc676
|
[
"Apache-2.0"
] | null | null | null |
utils/common.py
|
smwsk/gif-python
|
29e606ee28d22049f34ff0cddb9f4ef1f6edc676
|
[
"Apache-2.0"
] | null | null | null |
import platform
def replace_path(path_name):
if 'Windows' in platform.system():
path_name = path_name.replace('/','\\')
else:
path_name = path_name.replace('\\','/')
return path_name
| 26.375
| 47
| 0.625592
| 26
| 211
| 4.807692
| 0.461538
| 0.384
| 0.192
| 0.256
| 0.368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21327
| 211
| 8
| 48
| 26.375
| 0.753012
| 0
| 0
| 0
| 0
| 0
| 0.061321
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.142857
| 0
| 0.428571
| 0
| 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
|
469d5fb9d46611b9e17b6a0912b9e3463b11b026
| 553
|
py
|
Python
|
tonic/__init__.py
|
nmichlo/tonic-conf
|
9ae707fc1b7c534b39e0a9b9fe91ae858d74404e
|
[
"MIT"
] | null | null | null |
tonic/__init__.py
|
nmichlo/tonic-conf
|
9ae707fc1b7c534b39e0a9b9fe91ae858d74404e
|
[
"MIT"
] | 1
|
2020-05-04T12:00:55.000Z
|
2020-05-04T13:33:02.000Z
|
tonic/__init__.py
|
nmichlo/tonic-config
|
9ae707fc1b7c534b39e0a9b9fe91ae858d74404e
|
[
"MIT"
] | null | null | null |
from tonic.config import Config
# ========================================================================= #
# __init__ #
# ========================================================================= #
# default config instance
config = Config()
# ========================================================================= #
# END #
# ========================================================================= #
| 30.722222
| 78
| 0.128391
| 12
| 553
| 5.583333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.312839
| 553
| 17
| 79
| 32.529412
| 0.176316
| 0.855335
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
46ab6b555e3706d59d44ae6371982a88c4dd0c07
| 68
|
py
|
Python
|
mpicpy/__init__.py
|
keisukefukuda/mpicpy
|
0f74ea279cca5b23a4c654d93d891c21d2a3ac9f
|
[
"MIT"
] | 1
|
2019-09-13T15:18:59.000Z
|
2019-09-13T15:18:59.000Z
|
mpicpy/__init__.py
|
keisukefukuda/mpicpy
|
0f74ea279cca5b23a4c654d93d891c21d2a3ac9f
|
[
"MIT"
] | 3
|
2020-02-12T01:23:41.000Z
|
2020-02-20T04:46:30.000Z
|
mpicpy/__init__.py
|
keisukefukuda/mpicpy
|
0f74ea279cca5b23a4c654d93d891c21d2a3ac9f
|
[
"MIT"
] | 1
|
2019-09-05T01:23:21.000Z
|
2019-09-05T01:23:21.000Z
|
from .mpicpy import parse_chunk_size, calc_md5, get_num_chunks, main
| 68
| 68
| 0.852941
| 12
| 68
| 4.416667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.088235
| 68
| 1
| 68
| 68
| 0.83871
| 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
|
d3e37195008bc41f805260c09fb145f928a5adfd
| 88
|
py
|
Python
|
core/celery/beatsqlalchemy/exceptions.py
|
anthill-arch/platform
|
ff45dc71b2f3141bbd95baaf4da7ff1d2ac24ca0
|
[
"MIT"
] | 1
|
2018-11-30T21:56:14.000Z
|
2018-11-30T21:56:14.000Z
|
core/celery/beatsqlalchemy/exceptions.py
|
anthill-arch/platform
|
ff45dc71b2f3141bbd95baaf4da7ff1d2ac24ca0
|
[
"MIT"
] | null | null | null |
core/celery/beatsqlalchemy/exceptions.py
|
anthill-arch/platform
|
ff45dc71b2f3141bbd95baaf4da7ff1d2ac24ca0
|
[
"MIT"
] | null | null | null |
class ConstraintError(Exception):
pass
class ValidationError(Exception):
pass
| 12.571429
| 33
| 0.75
| 8
| 88
| 8.25
| 0.625
| 0.393939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 88
| 6
| 34
| 14.666667
| 0.916667
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
318d8717d8dd5ac911aecf39990b760758653493
| 183
|
py
|
Python
|
hacker/challenges/crypto/how_faint_the_tune.py
|
Tenebrar/codebase
|
59c9a35289fb29afedad0e3edd0519b67372ef9f
|
[
"Unlicense"
] | 1
|
2020-04-21T11:39:25.000Z
|
2020-04-21T11:39:25.000Z
|
hacker/challenges/crypto/how_faint_the_tune.py
|
Tenebrar/codebase
|
59c9a35289fb29afedad0e3edd0519b67372ef9f
|
[
"Unlicense"
] | 7
|
2020-02-12T01:08:01.000Z
|
2022-02-10T11:56:56.000Z
|
hacker/challenges/crypto/how_faint_the_tune.py
|
Tenebrar/codebase
|
59c9a35289fb29afedad0e3edd0519b67372ef9f
|
[
"Unlicense"
] | null | null | null |
# Since a lot of the characters look like letters, '... is the answer you seek' is legible, filling those letters
# in the first word gives:
print('armstrong is the answer you seek')
| 45.75
| 113
| 0.743169
| 31
| 183
| 4.387097
| 0.709677
| 0.073529
| 0.161765
| 0.205882
| 0.264706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180328
| 183
| 3
| 114
| 61
| 0.906667
| 0.743169
| 0
| 0
| 0
| 0
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
31c3eb152203e5014dd9a80cec0c44a4d9315198
| 69
|
py
|
Python
|
PuppeteerLibrary/playwright/async_keywords/__init__.py
|
sdvicorp/robotframework-puppeteer
|
af6fa68b04c3cdac3a7662cffda6da2a5ace38d1
|
[
"Apache-2.0"
] | 37
|
2019-10-28T01:35:43.000Z
|
2022-03-31T04:11:49.000Z
|
PuppeteerLibrary/playwright/async_keywords/__init__.py
|
sdvicorp/robotframework-puppeteer
|
af6fa68b04c3cdac3a7662cffda6da2a5ace38d1
|
[
"Apache-2.0"
] | 61
|
2020-07-16T00:18:22.000Z
|
2022-03-24T07:12:05.000Z
|
PuppeteerLibrary/playwright/async_keywords/__init__.py
|
sdvicorp/robotframework-puppeteer
|
af6fa68b04c3cdac3a7662cffda6da2a5ace38d1
|
[
"Apache-2.0"
] | 10
|
2020-03-03T05:28:05.000Z
|
2022-02-14T10:03:44.000Z
|
from .playwright_browsermanagement import PlaywrightBrowserManagement
| 69
| 69
| 0.942029
| 5
| 69
| 12.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 69
| 1
| 69
| 69
| 0.969697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
31d4237000b618ec742c9e20dd2fb5281d9c294b
| 374
|
py
|
Python
|
src/jig/formatters/utils.py
|
Lightslayer/jig
|
7287f594f63f8bc8cc1f42dcafec292dd75c89f2
|
[
"BSD-2-Clause"
] | null | null | null |
src/jig/formatters/utils.py
|
Lightslayer/jig
|
7287f594f63f8bc8cc1f42dcafec292dd75c89f2
|
[
"BSD-2-Clause"
] | null | null | null |
src/jig/formatters/utils.py
|
Lightslayer/jig
|
7287f594f63f8bc8cc1f42dcafec292dd75c89f2
|
[
"BSD-2-Clause"
] | null | null | null |
def green_bold(payload):
"""
Format payload as green.
"""
return '\x1b[32;1m{0}\x1b[39;22m'.format(payload)
def yellow_bold(payload):
"""
Format payload as yellow.
"""
return '\x1b[33;1m{0}\x1b[39;22m'.format(payload)
def red_bold(payload):
"""
Format payload as red.
"""
return '\x1b[31;1m{0}\x1b[39;22m'.format(payload)
| 18.7
| 53
| 0.596257
| 54
| 374
| 4.074074
| 0.314815
| 0.354545
| 0.231818
| 0.327273
| 0.709091
| 0.354545
| 0.354545
| 0.245455
| 0
| 0
| 0
| 0.10274
| 0.219251
| 374
| 19
| 54
| 19.684211
| 0.650685
| 0.195187
| 0
| 0
| 0
| 0
| 0.282353
| 0.282353
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
9ecea44bc829ebb78db4abbe1de3631bc81788a1
| 30
|
py
|
Python
|
python/testData/refactoring/changeSignature/multipleDoubleStarredParameters.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/refactoring/changeSignature/multipleDoubleStarredParameters.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/refactoring/changeSignature/multipleDoubleStarredParameters.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
def func(foo, **bar):
pass
| 15
| 21
| 0.566667
| 5
| 30
| 3.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233333
| 30
| 2
| 22
| 15
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
9edf737f1a5a91650a0bf8ac1611e2ed833184c7
| 243
|
py
|
Python
|
goat_tweet_analyzer/translators.py
|
goatgalaxy/goat-tweet-analyzer
|
ef7a48540064298135ede39d27973f98a70c4b1d
|
[
"MIT"
] | null | null | null |
goat_tweet_analyzer/translators.py
|
goatgalaxy/goat-tweet-analyzer
|
ef7a48540064298135ede39d27973f98a70c4b1d
|
[
"MIT"
] | null | null | null |
goat_tweet_analyzer/translators.py
|
goatgalaxy/goat-tweet-analyzer
|
ef7a48540064298135ede39d27973f98a70c4b1d
|
[
"MIT"
] | null | null | null |
import json
from loafer.message_translators import AbstractMessageTranslator
class GoatMessagesTranslator(AbstractMessageTranslator):
def translate(self, message):
return {'content': json.loads(message["Body"]), 'metadata': {}}
| 27
| 71
| 0.765432
| 22
| 243
| 8.409091
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127572
| 243
| 9
| 71
| 27
| 0.872642
| 0
| 0
| 0
| 0
| 0
| 0.077869
| 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
|
9ee4474a89f63e8429b47f6a81fb4093642809e1
| 30
|
py
|
Python
|
main.py
|
rusvoskres/test_git
|
ead44d8ab7b787d92cb85d817067855ac001d478
|
[
"MIT"
] | null | null | null |
main.py
|
rusvoskres/test_git
|
ead44d8ab7b787d92cb85d817067855ac001d478
|
[
"MIT"
] | null | null | null |
main.py
|
rusvoskres/test_git
|
ead44d8ab7b787d92cb85d817067855ac001d478
|
[
"MIT"
] | null | null | null |
print(''This is master branch)
| 30
| 30
| 0.766667
| 5
| 30
| 4.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 30
| 1
| 30
| 30
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
9eec0809191ebe176fe268484e6df61f24953f6c
| 97
|
py
|
Python
|
keras_contrib/optimizers.py
|
jmtatsch/keras-contrib
|
14d5ba1227d1d78ea9fe299db0cfacbbdb41970f
|
[
"MIT"
] | null | null | null |
keras_contrib/optimizers.py
|
jmtatsch/keras-contrib
|
14d5ba1227d1d78ea9fe299db0cfacbbdb41970f
|
[
"MIT"
] | null | null | null |
keras_contrib/optimizers.py
|
jmtatsch/keras-contrib
|
14d5ba1227d1d78ea9fe299db0cfacbbdb41970f
|
[
"MIT"
] | 1
|
2019-01-24T05:12:26.000Z
|
2019-01-24T05:12:26.000Z
|
from __future__ import absolute_import
from . import backend as K
from keras.optimizers import *
| 24.25
| 38
| 0.824742
| 14
| 97
| 5.357143
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14433
| 97
| 3
| 39
| 32.333333
| 0.903614
| 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
|
9efd5cfdbd9cb26502b5e015b485cbeec3f92e58
| 274
|
py
|
Python
|
Darlington/phase2/STRINGS/day 35 solution/qtn1.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 6
|
2020-05-23T19:53:25.000Z
|
2021-05-08T20:21:30.000Z
|
Darlington/phase2/STRINGS/day 35 solution/qtn1.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 8
|
2020-05-14T18:53:12.000Z
|
2020-07-03T00:06:20.000Z
|
Darlington/phase2/STRINGS/day 35 solution/qtn1.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 39
|
2020-05-10T20:55:02.000Z
|
2020-09-12T17:40:59.000Z
|
# program to remove duplicate characters of a given string.
from collections import OrderedDict
def remove_duplicate(str1):
return "".join(OrderedDict.fromkeys(str1))
print(remove_duplicate("python exercises practice solution"))
print(remove_duplicate("w3resource"))
| 39.142857
| 61
| 0.79927
| 33
| 274
| 6.545455
| 0.727273
| 0.277778
| 0.185185
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012295
| 0.109489
| 274
| 7
| 62
| 39.142857
| 0.872951
| 0.208029
| 0
| 0
| 0
| 0
| 0.203704
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.4
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
73275ed89f352bec56982d6658698537dd96c4a6
| 4,538
|
py
|
Python
|
temboo/core/Library/Google/Spreadsheets/__init__.py
|
jordanemedlock/psychtruths
|
52e09033ade9608bd5143129f8a1bfac22d634dd
|
[
"Apache-2.0"
] | 7
|
2016-03-07T02:07:21.000Z
|
2022-01-21T02:22:41.000Z
|
temboo/core/Library/Google/Spreadsheets/__init__.py
|
jordanemedlock/psychtruths
|
52e09033ade9608bd5143129f8a1bfac22d634dd
|
[
"Apache-2.0"
] | null | null | null |
temboo/core/Library/Google/Spreadsheets/__init__.py
|
jordanemedlock/psychtruths
|
52e09033ade9608bd5143129f8a1bfac22d634dd
|
[
"Apache-2.0"
] | 8
|
2016-06-14T06:01:11.000Z
|
2020-04-22T09:21:44.000Z
|
from temboo.Library.Google.Spreadsheets.AddListRows import AddListRows, AddListRowsInputSet, AddListRowsResultSet, AddListRowsChoreographyExecution
from temboo.Library.Google.Spreadsheets.AddWorksheet import AddWorksheet, AddWorksheetInputSet, AddWorksheetResultSet, AddWorksheetChoreographyExecution
from temboo.Library.Google.Spreadsheets.AppendRow import AppendRow, AppendRowInputSet, AppendRowResultSet, AppendRowChoreographyExecution
from temboo.Library.Google.Spreadsheets.DeleteListRow import DeleteListRow, DeleteListRowInputSet, DeleteListRowResultSet, DeleteListRowChoreographyExecution
from temboo.Library.Google.Spreadsheets.DeleteRow import DeleteRow, DeleteRowInputSet, DeleteRowResultSet, DeleteRowChoreographyExecution
from temboo.Library.Google.Spreadsheets.DeleteWorksheet import DeleteWorksheet, DeleteWorksheetInputSet, DeleteWorksheetResultSet, DeleteWorksheetChoreographyExecution
from temboo.Library.Google.Spreadsheets.DownloadBase64EncodedSpreadsheet import DownloadBase64EncodedSpreadsheet, DownloadBase64EncodedSpreadsheetInputSet, DownloadBase64EncodedSpreadsheetResultSet, DownloadBase64EncodedSpreadsheetChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveCellFeed import RetrieveCellFeed, RetrieveCellFeedInputSet, RetrieveCellFeedResultSet, RetrieveCellFeedChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveCellList import RetrieveCellList, RetrieveCellListInputSet, RetrieveCellListResultSet, RetrieveCellListChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveCellValue import RetrieveCellValue, RetrieveCellValueInputSet, RetrieveCellValueResultSet, RetrieveCellValueChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveLastColumnValue import RetrieveLastColumnValue, RetrieveLastColumnValueInputSet, RetrieveLastColumnValueResultSet, RetrieveLastColumnValueChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveListFeed import RetrieveListFeed, RetrieveListFeedInputSet, RetrieveListFeedResultSet, RetrieveListFeedChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveListRow import RetrieveListRow, RetrieveListRowInputSet, RetrieveListRowResultSet, RetrieveListRowChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveRow import RetrieveRow, RetrieveRowInputSet, RetrieveRowResultSet, RetrieveRowChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveSpecificRowsOrColumns import RetrieveSpecificRowsOrColumns, RetrieveSpecificRowsOrColumnsInputSet, RetrieveSpecificRowsOrColumnsResultSet, RetrieveSpecificRowsOrColumnsChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveSpreadsheetDetailsByName import RetrieveSpreadsheetDetailsByName, RetrieveSpreadsheetDetailsByNameInputSet, RetrieveSpreadsheetDetailsByNameResultSet, RetrieveSpreadsheetDetailsByNameChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveSpreadsheets import RetrieveSpreadsheets, RetrieveSpreadsheetsInputSet, RetrieveSpreadsheetsResultSet, RetrieveSpreadsheetsChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveWorksheet import RetrieveWorksheet, RetrieveWorksheetInputSet, RetrieveWorksheetResultSet, RetrieveWorksheetChoreographyExecution
from temboo.Library.Google.Spreadsheets.RetrieveWorksheets import RetrieveWorksheets, RetrieveWorksheetsInputSet, RetrieveWorksheetsResultSet, RetrieveWorksheetsChoreographyExecution
from temboo.Library.Google.Spreadsheets.SearchColumn import SearchColumn, SearchColumnInputSet, SearchColumnResultSet, SearchColumnChoreographyExecution
from temboo.Library.Google.Spreadsheets.StructuredQuery import StructuredQuery, StructuredQueryInputSet, StructuredQueryResultSet, StructuredQueryChoreographyExecution
from temboo.Library.Google.Spreadsheets.UpdateCells import UpdateCells, UpdateCellsInputSet, UpdateCellsResultSet, UpdateCellsChoreographyExecution
from temboo.Library.Google.Spreadsheets.UpdateListRows import UpdateListRows, UpdateListRowsInputSet, UpdateListRowsResultSet, UpdateListRowsChoreographyExecution
from temboo.Library.Google.Spreadsheets.UpdateRow import UpdateRow, UpdateRowInputSet, UpdateRowResultSet, UpdateRowChoreographyExecution
from temboo.Library.Google.Spreadsheets.UpdateWorksheet import UpdateWorksheet, UpdateWorksheetInputSet, UpdateWorksheetResultSet, UpdateWorksheetChoreographyExecution
from temboo.Library.Google.Spreadsheets.UploadSpreadsheet import UploadSpreadsheet, UploadSpreadsheetInputSet, UploadSpreadsheetResultSet, UploadSpreadsheetChoreographyExecution
| 168.074074
| 252
| 0.919788
| 286
| 4,538
| 14.594406
| 0.384615
| 0.06229
| 0.105894
| 0.143268
| 0.218016
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002296
| 0.040106
| 4,538
| 26
| 253
| 174.538462
| 0.955923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
73293c6efaf8df32ed5332ca37bacf6b4acfb896
| 11,931
|
py
|
Python
|
corehq/apps/smsbillables/tests/test_gateway_charges.py
|
omari-funzone/commcare-hq
|
5edb462c891fc08e51c4babd7acdf12c0006a602
|
[
"BSD-3-Clause"
] | 471
|
2015-01-10T02:55:01.000Z
|
2022-03-29T18:07:18.000Z
|
corehq/apps/smsbillables/tests/test_gateway_charges.py
|
omari-funzone/commcare-hq
|
5edb462c891fc08e51c4babd7acdf12c0006a602
|
[
"BSD-3-Clause"
] | 14,354
|
2015-01-01T07:38:23.000Z
|
2022-03-31T20:55:14.000Z
|
corehq/apps/smsbillables/tests/test_gateway_charges.py
|
omari-funzone/commcare-hq
|
5edb462c891fc08e51c4babd7acdf12c0006a602
|
[
"BSD-3-Clause"
] | 175
|
2015-01-06T07:16:47.000Z
|
2022-03-29T13:27:01.000Z
|
from decimal import Decimal
from django.test import TestCase
from mock import patch
from corehq.apps.sms.api import create_billable_for_sms
from corehq.apps.smsbillables.models import SmsBillable, SmsGatewayFee
from corehq.apps.smsbillables.tests.utils import get_fake_sms, short_text, long_text
from corehq.messaging.smsbackends.test.models import SQLTestSMSBackend
from corehq.messaging.smsbackends.twilio.models import SQLTwilioBackend
class TestGatewayChargeWithNoAPISupport(TestCase):
"""
Test SmsBillable.gateway_charge for a backend that does not support an API
"""
@classmethod
def setUpClass(cls):
super(TestGatewayChargeWithNoAPISupport, cls).setUpClass()
cls.domain = 'sms_test_domain'
cls.backend = SQLTestSMSBackend(
name="TEST BACKEND",
is_global=True,
domain=cls.domain,
hq_api_id=SQLTestSMSBackend.get_api_id()
)
cls.backend.save()
@classmethod
def tearDownClass(cls):
cls.backend.delete()
super(TestGatewayChargeWithNoAPISupport, cls).tearDownClass()
def setUp(self):
super(TestGatewayChargeWithNoAPISupport, self).setUp()
self.billable = self.msg = None
self.gateway_fees = []
def tearDown(self):
if self.billable is not None:
self.billable.delete()
if self.gateway_fees is not None:
[gateway_fee.delete() for gateway_fee in self.gateway_fees]
if self.msg is not None:
self.msg.delete()
super(TestGatewayChargeWithNoAPISupport, self).tearDown()
def test_gateway_charge_general_criteria(self):
"""
Create a gateway fee with no specific criteria and ensure gateway charge is expected
"""
expected_gateway_charge = Decimal('0.01')
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, short_text)
self.gateway_fees += [
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, expected_gateway_charge),
]
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_fee = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_fee)
def test_gateway_charge_for_country_code(self):
"""
Create a generic gateway fee and a specific gateway fee with country code
"""
specific_gateway_fee_amount = Decimal('0.01')
generic_gateway_fee_amount = Decimal('0.005')
expected_gateway_charge = specific_gateway_fee_amount
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, short_text)
self.gateway_fees += [
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, generic_gateway_fee_amount),
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, specific_gateway_fee_amount,
country_code=1),
]
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_gateway_charge = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_gateway_charge)
class TestGatewayChargeWithAPISupport(TestCase):
"""
Test SmsBillable.gateway_charge for a backend that supports an API
"""
@classmethod
def setUpClass(cls):
super(TestGatewayChargeWithAPISupport, cls).setUpClass()
cls.domain = 'sms_test_api_domain'
cls.backend = SQLTwilioBackend(
name="TEST API BACKEND",
is_global=True,
domain=cls.domain,
hq_api_id=SQLTwilioBackend.get_api_id()
)
cls.backend.save()
@classmethod
def tearDownClass(cls):
cls.backend.delete()
super(TestGatewayChargeWithAPISupport, cls).tearDownClass()
def setUp(self):
super(TestGatewayChargeWithAPISupport, self).setUp()
self.billable = self.msg = None
self.gateway_fees = []
def tearDown(self):
if self.billable is not None:
self.billable.delete()
if self.gateway_fees is not None:
[gateway_fee.delete() for gateway_fee in self.gateway_fees]
if self.msg is not None:
self.msg.delete()
super(TestGatewayChargeWithAPISupport, self).tearDown()
def test_gateway_charge_with_api(self):
"""
A backend that uses an API to fetch prices with a gateway_fee.amount = None should always return
the price specified by the API
"""
expected_gateway_charge = Decimal('0.01')
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, short_text)
self.gateway_fees += [
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, None),
]
with patch('corehq.apps.smsbillables.models.SmsBillable.get_charge_details_through_api',
return_value=(expected_gateway_charge, 1)):
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_gateway_charge = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_gateway_charge)
def test_gateway_charge_with_api_and_matching_gateway_fee(self):
"""
A backend with both a matching gateway_fee and an API should charge using the gateway_fee
'Matching' means the message under test fits with the criteria set for the gateway_fee
"""
api_fee = Decimal('0.01')
gateway_fee_amount = Decimal('0.0075')
# expect to charge the gateway_fee
expected_gateway_charge = gateway_fee_amount
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, short_text)
self.gateway_fees += [
# the default number used in this test case has a country code of 1
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, gateway_fee_amount,
country_code=1),
]
with patch('corehq.apps.smsbillables.models.SmsBillable.get_charge_details_through_api',
return_value=(api_fee, 1)):
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_gateway_charge = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_gateway_charge)
def test_gateway_charge_with_api_and_non_matching_gateway_fee(self):
"""
A backend with non-matching gateway_fee and an API should charge using the API
'Non-matching' means the message under test does not fit the gateway fee criteria
"""
api_fee = Decimal('0.01')
gateway_fee_amount = Decimal('0.0075')
# expect to return the api price
expected_gateway_charge = api_fee
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, short_text)
self.gateway_fees += [
# the default number here has a country code of 1, so make this code different
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, gateway_fee_amount,
country_code=10),
]
with patch('corehq.apps.smsbillables.models.SmsBillable.get_charge_details_through_api',
return_value=(api_fee, 1)):
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_gateway_charge = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_gateway_charge)
def test_gateway_charge_with_api_and_non_matching_gateway_fee_multiple_messages(self):
"""
A backend with non-matching gateway_fee and an API should charge using the API
'Non-matching' means the message under test does not fit the gateway fee criteria
ASSUMPTION: we assume that the API will return a value accounting for multiple messages if applicable
This may be true for Twilio, but as we add other gateways that support an API we should check
"""
api_fee = Decimal('0.01')
gateway_fee_amount = Decimal('0.0075')
# expect to return the api fee as is
expected_gateway_charge = api_fee
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, long_text)
self.gateway_fees += [
# the default number here has a country code of 1, so make this code different
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, gateway_fee_amount,
country_code=10),
]
with patch('corehq.apps.smsbillables.models.SmsBillable.get_charge_details_through_api',
return_value=(api_fee, 1)):
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_gateway_charge = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_gateway_charge)
def test_gateway_charge_with_api_and_matching_gateway_fee_multiple_messages(self):
"""
A backend with non-matching gateway_fee and an API should charge using the API
'Matching' means the message under test fits with the criteria set for the gateway_fee
If using the gateway fee we need to do the calculation for the cost of multiple messages
"""
api_fee = Decimal('0.01')
gateway_fee_amount = Decimal('0.0075')
# expect to return the gateway fee x 2 (long_text takes up 2 messages)
expected_gateway_charge = gateway_fee_amount * 2
self.msg = get_fake_sms(self.domain, self.backend.hq_api_id,
self.backend.couch_id, long_text)
self.gateway_fees += [
SmsGatewayFee.create_new(self.backend.hq_api_id, self.msg.direction, gateway_fee_amount),
]
with patch('corehq.apps.smsbillables.models.SmsBillable.get_charge_details_through_api',
return_value=(api_fee, None)):
create_billable_for_sms(self.msg, delay=False)
sms_billables = SmsBillable.objects.filter(
domain=self.domain,
log_id=self.msg.couch_id
)
self.assertEqual(sms_billables.count(), 1)
self.billable = sms_billables[0]
actual_gateway_charge = self.billable.gateway_charge
self.assertEqual(expected_gateway_charge, actual_gateway_charge)
| 41.283737
| 109
| 0.660464
| 1,463
| 11,931
| 5.138072
| 0.107997
| 0.077824
| 0.015831
| 0.031928
| 0.785819
| 0.779433
| 0.739657
| 0.727684
| 0.727684
| 0.714115
| 0
| 0.008522
| 0.262342
| 11,931
| 288
| 110
| 41.427083
| 0.845586
| 0.148102
| 0
| 0.686567
| 0
| 0
| 0.049384
| 0.037366
| 0
| 0
| 0
| 0
| 0.069652
| 1
| 0.074627
| false
| 0
| 0.039801
| 0
| 0.124378
| 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
|
7346148d679468d37dffa1ba27163e39863b57c3
| 58
|
py
|
Python
|
topsisRaghavKapahi/__init__.py
|
raghav-kapahi/topsis_101903516
|
2841415cdd9e6690de7f91d8a004b52703aa658e
|
[
"MIT"
] | null | null | null |
topsisRaghavKapahi/__init__.py
|
raghav-kapahi/topsis_101903516
|
2841415cdd9e6690de7f91d8a004b52703aa658e
|
[
"MIT"
] | null | null | null |
topsisRaghavKapahi/__init__.py
|
raghav-kapahi/topsis_101903516
|
2841415cdd9e6690de7f91d8a004b52703aa658e
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from .top import *
| 19.333333
| 38
| 0.827586
| 8
| 58
| 5.375
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 58
| 2
| 39
| 29
| 0.86
| 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
|
73499216cf3aadda0dc6be61771f2c8e263eb5cf
| 3,636
|
py
|
Python
|
pisacov/sys/crop.py
|
jjavier-bm/PISACov
|
71179276def8aa744ca96d1e7e70d7e51861a153
|
[
"BSD-3-Clause"
] | null | null | null |
pisacov/sys/crop.py
|
jjavier-bm/PISACov
|
71179276def8aa744ca96d1e7e70d7e51861a153
|
[
"BSD-3-Clause"
] | null | null | null |
pisacov/sys/crop.py
|
jjavier-bm/PISACov
|
71179276def8aa744ca96d1e7e70d7e51861a153
|
[
"BSD-3-Clause"
] | null | null | null |
"""
This is PISACov, a program designed to infer quaternary structure
of proteins from evolutionary covariance.
"""
from pisacov import __prog__, __description__, __version__
from pisacov import __author__, __date__, __copyright__
import os
import importlib
import sys
import logging
def runcrops(seqin, strin, dbin, thin=None, upin=None, outdirin = None):#, loggingfile):
"""Run CROPS to produce clean sequence and structure files.
:param seqin: Sequence filepath.
:type seqin: str
:param strin: Structure filepath.
:type strin: str
:param dbin: SIFTS database filepath.
:type dbin: str
:param thin: Uniprot threshold, defaults to None.
:type thin: str, int, optional
:param upin: Uniclust filepath (or server-only url), defaults to None.
:type upin: str, int, optional
:param outdirin: Output directory's path. If not given, seqin dir will use instead, defaults to None.
:type outdirin: str, optional
"""
#cropsdir = os.path.dirname(crops.__file__)
pythonexec = '"'+sys.executable+'"'
#CROP SEQUENCE AND STRUCTURE
cst = importlib.import_module('crops.command_line.crops-cropstr')
cropspy = (cst.__file__)
if outdirin is None:
outdirin = os.dirname(seqin)
command = pythonexec + ' ' + cropspy + ' ' + seqin + ' ' + strin + ' ' + dbin
if thin is not None:
command += ' -u ' + thin + ' ' + upin
command += ' -o ' + outdirin + ' -i'
try:
os.system(command) # + ' > ' + loggingfile)
except Exception:
logging.critical(' An error occurred while executing Crops-cropstr')
raise OSError
return
def renumcrops(seqin, strin, outdirin = None):#, loggingfile):
"""Run CROPS to produce clean sequence and structure files.
:param seqin: Sequence filepath.
:type seqin: str
:param strin: Structure filepath.
:type strin: str
:param outdirin: Output directory's path. If not given, seqin dir will use instead, defaults to None.
:type outdirin: str, optional
"""
#cropsdir = os.path.dirname(crops.__file__)
pythonexec = '"'+sys.executable+'"'
#Renumber STRUCTURE
logging.info(' Running crops-renumber...')
cst = importlib.import_module('crops.command_line.crops-renumber')
cropspy = (cst.__file__)
if outdirin is None:
outdirin = os.dirname(seqin)
command = (pythonexec + ' ' + cropspy + ' ' + seqin + ' ' + strin + ' ' +
' -o ' + outdirin)
try:
os.system(command) # + ' > ' + loggingfile)
except Exception:
logging.critical(' An error occurred while executing Crops-renumber')
raise OSError
return
def splitseqs(seqin, outdirin = None):#, loggingfile):
"""Run CROPS to split sequence files.
:param seqin: Sequence filepath.
:type seqin: str
:param outdirin: Output directory's path. If not given, seqin dir will use instead, defaults to None.
:type outdirin: str, optional
"""
#cropsdir = os.path.dirname(crops.__file__)
pythonexec = '"'+sys.executable+'"'
#Renumber STRUCTURE
logging.info(' Running crops-renumber...')
cst = importlib.import_module('crops.command_line.crops-splitseqs')
cropspy = (cst.__file__)
if outdirin is None:
outdirin = os.dirname(seqin)
command = (pythonexec + ' ' + cropspy + ' ' + seqin + ' ' + ' -i'
' -o ' + outdirin)
try:
os.system(command) # + ' > ' + loggingfile)
except Exception:
logging.critical(' An error occurred while executing Crops-renumber')
raise OSError
return
| 29.803279
| 105
| 0.641089
| 413
| 3,636
| 5.513317
| 0.251816
| 0.031621
| 0.030742
| 0.039526
| 0.734739
| 0.734739
| 0.720246
| 0.720246
| 0.700483
| 0.682916
| 0
| 0
| 0.246425
| 3,636
| 121
| 106
| 30.049587
| 0.831022
| 0.39824
| 0
| 0.634615
| 0
| 0
| 0.177734
| 0.04834
| 0
| 0
| 0
| 0
| 0
| 1
| 0.057692
| false
| 0
| 0.173077
| 0
| 0.288462
| 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
|
73641ffe306e6cc4aed727ed17a72551de8d6219
| 216
|
py
|
Python
|
trinity/protocol/eth/monitors.py
|
dendisuhubdy/trinity
|
001664781259c7dd0779a0ef6f822451b608ded4
|
[
"MIT"
] | 3
|
2019-06-17T13:59:20.000Z
|
2021-05-02T22:09:13.000Z
|
trinity/protocol/eth/monitors.py
|
dendisuhubdy/trinity
|
001664781259c7dd0779a0ef6f822451b608ded4
|
[
"MIT"
] | 2
|
2019-04-30T06:22:12.000Z
|
2019-06-14T04:27:18.000Z
|
trinity/protocol/eth/monitors.py
|
dendisuhubdy/trinity
|
001664781259c7dd0779a0ef6f822451b608ded4
|
[
"MIT"
] | 2
|
2019-09-05T01:31:56.000Z
|
2019-09-17T09:09:16.000Z
|
from trinity.protocol.common.monitors import BaseChainTipMonitor
from trinity.protocol.eth import commands
class ETHChainTipMonitor(BaseChainTipMonitor):
subscription_msg_types = frozenset({commands.NewBlock})
| 30.857143
| 64
| 0.847222
| 22
| 216
| 8.227273
| 0.727273
| 0.121547
| 0.209945
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087963
| 216
| 6
| 65
| 36
| 0.918782
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b40aa75ba25857ab57b2c2502fe1813089a65a51
| 7,902
|
py
|
Python
|
transformers/examples/text-generation/gen_compose.py
|
jordiclive/ControlPrefixes
|
b647f68bf0c7e771f847c4a51e5f22af2ac95699
|
[
"Apache-1.1"
] | 26
|
2021-11-23T09:01:32.000Z
|
2022-03-25T11:34:15.000Z
|
transformers/examples/text-generation/gen_compose.py
|
jordiclive/ControlPrefixes
|
b647f68bf0c7e771f847c4a51e5f22af2ac95699
|
[
"Apache-1.1"
] | 3
|
2021-12-10T17:43:23.000Z
|
2022-03-18T11:37:19.000Z
|
transformers/examples/text-generation/gen_compose.py
|
jordiclive/ControlPrefixes
|
b647f68bf0c7e771f847c4a51e5f22af2ac95699
|
[
"Apache-1.1"
] | 5
|
2021-12-19T03:22:08.000Z
|
2022-02-14T04:41:04.000Z
|
import os, sys
# example: python train_run.py keyword temp_keyword _
if __name__ == '__main__':
mode = sys.argv[1]
control_mode = sys.argv[2]
use_prefixtuning = (sys.argv[3] == 'yes')
model_file = None
old_model = None
MODEL_FILE = sys.argv[4]
MODEL_FILE_second = sys.argv[5]
split_file = sys.argv[6]
if mode == 'embMatch' and not use_prefixtuning:
MODEL_FILE="/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_medium_matching_cleanbert"
Token_FILE="/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_medium_matching_cleanbert"
SENT_FILE = '/u/scr/xlisali/contrast_LM/data_api/dataset/matching_train_small.txt'
SENT_FILE='/u/scr/xlisali/contrast_LM/data_api/dataset/matching_dev_small.txt'
if model_file:
Model_FILE = model_file
else:
Model_FILE="medium_matching"
if old_model != '_':
OLD_MODEL=old_model
else:
OLD_MODEL="gpt2-medium"
if mode == 'keyword' and not use_prefixtuning:
if control_mode == 'no':
MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_keyword"
Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_keyword"
else:
# MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/keyword_temp"
# Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/keyword_temp"
# mid
MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/keyword_temp2/checkpoint-90000"
Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_keyword"
#
# MODEL_FILE = "gpt2-medium"
# Token_FILE = "gpt2-medium"
TRAIN_FILE='/u/scr/xlisali/contrast_LM/data_api/dataset/matching_train_small.txt'
TEST_FILE='/u/scr/xlisali/contrast_LM/data_api/dataset/matching_dev_small.txt'
if model_file:
Model_FILE = model_file
else:
Model_FILE="medium_matching"
if old_model != '_':
OLD_MODEL=old_model
else:
OLD_MODEL="gpt2-medium"
elif mode == 'topic':
if control_mode == 'no':
pass
# MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_topic"
# Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/language-modeling/temp_topic"
else:
# MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/topic_temp"
# Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/topic_temp"
# MODEL_FILE = "gpt2-medium"
# Token_FILE = "gpt2-medium"
# mid
# MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/topic_temp2"
# Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/topic_temp2"
MODEL_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/topicprefixtune"
Token_FILE = "/u/scr/xlisali/contrast_LM/transformers/examples/control/topicprefixtune"
TRAIN_FILE = None
TEST_FILE = None
if 'finetune' in MODEL_FILE:
tuning_mode = 'finetune'
app = ''
elif 'prefixtune' in MODEL_FILE:
tuning_mode = 'prefixtune'
# if 'inputpara' not in MODEL_FILE and "-emb-" not in MODEL_FILE:
# app = '--optim_prefix {} --preseqlen {}'.format('yes', 10)
# else:
app = '--optim_prefix {} --preseqlen {} '.format('no', 10)
if "-emb" in MODEL_FILE:
app += "--prefix_mode embedding "
MODEL_FILE2 = MODEL_FILE
MODEL_FILE = 'gpt2-medium'
elif mode =='data2text':
Token_FILE = MODEL_FILE
if 'finetune' in MODEL_FILE:
tuning_mode = 'finetune'
app = ''
elif 'prefixtune' in MODEL_FILE:
tuning_mode = 'prefixtune'
if "_y_20" in MODEL_FILE:
app = '--optim_prefix {} --preseqlen {} '.format('yes', 20)
else:
app = '--optim_prefix {} --preseqlen {} '.format('no', 20)
if "_emb" in MODEL_FILE:
app += "--prefix_mode embedding "
elif "_act" in MODEL_FILE:
app += "--prefix_mode activation "
if "_inf" in MODEL_FILE or 'infix' in MODEL_FILE:
app += " --format_mode infix "
elif "_cat" in MODEL_FILE:
app += " --format_mode cat "
elif "_pee" in MODEL_FILE:
app += " --format_mode peek "
MODEL_FILE2 = MODEL_FILE
MODEL_FILE2_second = MODEL_FILE_second
MODEL_FILE = 'gpt2-medium'
elif mode == 'triples':
Token_FILE = MODEL_FILE
if 'finetune' in MODEL_FILE:
tuning_mode = 'finetune'
app = ''
elif 'prefixtune' in MODEL_FILE:
tuning_mode = 'prefixtune'
if "tune_y_" in MODEL_FILE:
app = '--optim_prefix {} --preseqlen {} '.format('yes', 20)
else:
app = '--optim_prefix {} --preseqlen {} '.format('no', 20)
if "_emb" in MODEL_FILE:
app += "--prefix_mode embedding "
elif "_act" in MODEL_FILE:
app += "--prefix_mode activation "
if "_inf" in MODEL_FILE or 'infix' in MODEL_FILE:
app += " --format_mode infix "
elif "_cat" in MODEL_FILE:
app += " --format_mode cat "
elif "_pee" in MODEL_FILE:
app += " --format_mode peek "
MODEL_FILE2 = MODEL_FILE
MODEL_FILE = 'gpt2-medium'
elif mode == 'webnlg':
Token_FILE = MODEL_FILE
if 'finetune' in MODEL_FILE:
tuning_mode = 'finetune'
app = ''
elif 'prefixtune' in MODEL_FILE:
tuning_mode = 'prefixtune'
if "tune_y_" in MODEL_FILE:
app = '--optim_prefix {} --preseqlen {} '.format('yes', 20)
else:
app = '--optim_prefix {} --preseqlen {} '.format('no', 20)
if "_emb" in MODEL_FILE:
app += "--prefix_mode embedding "
elif "_act" in MODEL_FILE:
app += "--prefix_mode activation "
if "_inf" in MODEL_FILE or 'infix' in MODEL_FILE:
app += " --format_mode infix "
elif "_cat" in MODEL_FILE:
app += " --format_mode cat "
elif "_pee" in MODEL_FILE:
app += " --format_mode peek "
MODEL_FILE2 = MODEL_FILE
MODEL_FILE = 'gpt2-medium'
COMMANDLINE = "python run_compose.py \
--model_type=gpt2 \
--length 100 \
--model_name_or_path={} \
--num_return_sequences 5 \
--stop_token [EOS] \
--tokenizer_name={} \
--task_mode={} \
--control_mode={} --tuning_mode {} --split_file {}\
".format(MODEL_FILE, Token_FILE, mode, control_mode, tuning_mode, split_file)
COMMANDLINE += app
if tuning_mode == 'prefixtune':
COMMANDLINE += ' --prefixModel_name_or_path {} --prefixModel_name_or_path2 {} '.format(MODEL_FILE2, MODEL_FILE2_second)
else:
COMMANDLINE += ' --model_name_or_path2 {} '.format(MODEL_FILE_second)
os.system(COMMANDLINE)
# name = os.path.basename(MODEL_FILE2)
# name = 'e2e_results_new/{}'.format(name)
# full_command = "nlprun -a lisa-base-torch -g 1 -n {} -x jagupard4,jagupard5,jagupard6,jagupard7,jagupard8 \'{}\'".format(name,COMMANDLINE)
# print(full_command)
# os.system(full_command)
| 37.273585
| 144
| 0.581498
| 901
| 7,902
| 4.805771
| 0.144284
| 0.139261
| 0.081293
| 0.069284
| 0.783834
| 0.773672
| 0.767436
| 0.743649
| 0.726097
| 0.70739
| 0
| 0.011786
| 0.302075
| 7,902
| 211
| 145
| 37.450237
| 0.773345
| 0.158314
| 0
| 0.666667
| 0
| 0
| 0.30574
| 0.151662
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.006944
| 0.006944
| 0
| 0.006944
| 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
|
b40dd38245d1e58638b14ca478aa2a098782dad6
| 40
|
py
|
Python
|
python/testData/codeInsight/smartEnter/forSecond.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/codeInsight/smartEnter/forSecond.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/codeInsight/smartEnter/forSecond.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
def foo():
for a<caret>
pass
| 13.333333
| 16
| 0.475
| 6
| 40
| 3.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4
| 40
| 3
| 17
| 13.333333
| 0.791667
| 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
|
b42f82bf9ee560e171ee7cf76a1e29b8a5b7983f
| 41
|
py
|
Python
|
ex47.py
|
cohadar/learn-python-the-hard-way
|
10d88fe59a8abc5303661cfe91c6db9fa71bdd56
|
[
"MIT"
] | null | null | null |
ex47.py
|
cohadar/learn-python-the-hard-way
|
10d88fe59a8abc5303661cfe91c6db9fa71bdd56
|
[
"MIT"
] | null | null | null |
ex47.py
|
cohadar/learn-python-the-hard-way
|
10d88fe59a8abc5303661cfe91c6db9fa71bdd56
|
[
"MIT"
] | null | null | null |
# reconstructed the game Room from tests.
| 41
| 41
| 0.804878
| 6
| 41
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 41
| 1
| 41
| 41
| 0.942857
| 0.95122
| 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
|
b43a284b1f8c03eaa2811df07127ea870b62a7e6
| 55
|
py
|
Python
|
examples/DecryptLoginExamples/crawlers/delallweibos/__init__.py
|
hedou/DecryptLogin
|
ff86a5d378c8a42d1caebbb7482658a95053f716
|
[
"Apache-2.0"
] | null | null | null |
examples/DecryptLoginExamples/crawlers/delallweibos/__init__.py
|
hedou/DecryptLogin
|
ff86a5d378c8a42d1caebbb7482658a95053f716
|
[
"Apache-2.0"
] | null | null | null |
examples/DecryptLoginExamples/crawlers/delallweibos/__init__.py
|
hedou/DecryptLogin
|
ff86a5d378c8a42d1caebbb7482658a95053f716
|
[
"Apache-2.0"
] | null | null | null |
'''initialize'''
from .delallweibos import DelAllWeibos
| 27.5
| 38
| 0.8
| 5
| 55
| 8.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072727
| 55
| 2
| 38
| 27.5
| 0.862745
| 0.181818
| 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
|
b44b754edd5ec600588311d3c456ad8be9a3f364
| 530
|
py
|
Python
|
adventure_game/contracts/i_writer.py
|
Def4l71diot/adventure-game-base
|
6f62ecf07980beba8804114b007d6bd7a4f55cc7
|
[
"MIT"
] | 2
|
2017-10-23T14:40:35.000Z
|
2017-10-23T14:40:38.000Z
|
adventure_game/contracts/i_writer.py
|
Def4l71diot/A-Day-in-the-Kremlin
|
6f62ecf07980beba8804114b007d6bd7a4f55cc7
|
[
"MIT"
] | null | null | null |
adventure_game/contracts/i_writer.py
|
Def4l71diot/A-Day-in-the-Kremlin
|
6f62ecf07980beba8804114b007d6bd7a4f55cc7
|
[
"MIT"
] | null | null | null |
from abc import ABCMeta, abstractmethod
class IWriter(metaclass=ABCMeta):
@abstractmethod
def write(self, text):
pass
@abstractmethod
def write_slowly(self, text):
pass
@abstractmethod
def write_separator(self):
pass
@abstractmethod
def write_info(self, text):
pass
@abstractmethod
def write_error(self, error):
pass
@abstractmethod
def write_success(self, message):
pass
@abstractmethod
def clear(self):
pass
| 16.5625
| 39
| 0.626415
| 54
| 530
| 6.055556
| 0.37037
| 0.363914
| 0.40367
| 0.397554
| 0.311927
| 0.311927
| 0
| 0
| 0
| 0
| 0
| 0
| 0.301887
| 530
| 31
| 40
| 17.096774
| 0.883784
| 0
| 0
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.304348
| false
| 0.304348
| 0.043478
| 0
| 0.391304
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b44eacb5eb318996056226ec25f86094af071827
| 319
|
py
|
Python
|
Arbie/address.py
|
owodunni/Arbie
|
abc209a9f209bcd1f61e3b0209ec80b13f7b8f8b
|
[
"MIT"
] | 12
|
2021-03-17T10:21:49.000Z
|
2022-03-06T04:26:39.000Z
|
Arbie/address.py
|
owodunni/arbie
|
abc209a9f209bcd1f61e3b0209ec80b13f7b8f8b
|
[
"MIT"
] | 45
|
2020-07-22T19:33:04.000Z
|
2022-03-04T11:35:41.000Z
|
Arbie/address.py
|
owodunni/Arbie
|
abc209a9f209bcd1f61e3b0209ec80b13f7b8f8b
|
[
"MIT"
] | 3
|
2020-08-13T12:25:09.000Z
|
2021-03-17T10:21:51.000Z
|
"""Helper functions for interacting with eth addresses."""
import os
from Arbie.Variables.token import Token
def dummy_address_generator() -> str:
return f"0x{os.urandom(20).hex()}" # noqa: WPS432
def dummy_token_generator(name, value=None) -> Token:
return Token(name, dummy_address_generator(), value)
| 22.785714
| 58
| 0.733542
| 44
| 319
| 5.181818
| 0.659091
| 0.070175
| 0.184211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021978
| 0.144201
| 319
| 13
| 59
| 24.538462
| 0.813187
| 0.206897
| 0
| 0
| 0
| 0
| 0.097166
| 0.097166
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
b47dceb4405c889b3ae39c1f3c9bf2bbfc89a010
| 144
|
py
|
Python
|
Python/Activies/l2q1.py
|
FranciscoMends/Python_Codes
|
fd0b33443d67b56b092beeea0e778285be6a42a9
|
[
"MIT"
] | null | null | null |
Python/Activies/l2q1.py
|
FranciscoMends/Python_Codes
|
fd0b33443d67b56b092beeea0e778285be6a42a9
|
[
"MIT"
] | null | null | null |
Python/Activies/l2q1.py
|
FranciscoMends/Python_Codes
|
fd0b33443d67b56b092beeea0e778285be6a42a9
|
[
"MIT"
] | null | null | null |
a = int(input('Digite o primeiro número: '))
b = int(input('Digite o segundo número: '))
print()
print('O maior valor é: {}!'.format(min(a, b)))
| 36
| 47
| 0.638889
| 24
| 144
| 3.833333
| 0.625
| 0.173913
| 0.304348
| 0.326087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 144
| 4
| 47
| 36
| 0.741935
| 0
| 0
| 0
| 0
| 0
| 0.489655
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
81ed72bd27fbc5704bb8e8bd263d2ea3fb65a3b2
| 95
|
py
|
Python
|
home/hairygael/GESTURES/stopTracking.py
|
rv8flyboy/pyrobotlab
|
4e04fb751614a5cb6044ea15dcfcf885db8be65a
|
[
"Apache-2.0"
] | 63
|
2015-02-03T18:49:43.000Z
|
2022-03-29T03:52:24.000Z
|
home/hairygael/GESTURES/stopTracking.py
|
hirwaHenryChristian/pyrobotlab
|
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
|
[
"Apache-2.0"
] | 16
|
2016-01-26T19:13:29.000Z
|
2018-11-25T21:20:51.000Z
|
home/hairygael/GESTURES/stopTracking.py
|
hirwaHenryChristian/pyrobotlab
|
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
|
[
"Apache-2.0"
] | 151
|
2015-01-03T18:55:54.000Z
|
2022-03-04T07:04:23.000Z
|
def stopTracking():
i01.headTracking.stopTracking()
i01.eyesTracking.stopTracking()
| 19
| 36
| 0.726316
| 8
| 95
| 8.625
| 0.625
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0.157895
| 95
| 4
| 37
| 23.75
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c309d398e90c37439c8ac5174725d3917fcbd33e
| 1,249
|
py
|
Python
|
tests/jobs/test_disable.py
|
jlakin2/python-jenkins
|
2b69951603d1f57b3fe82e119bba62a19156a629
|
[
"BSD-3-Clause"
] | 7
|
2020-01-08T19:34:50.000Z
|
2022-03-07T15:54:43.000Z
|
tests/jobs/test_disable.py
|
jlakin2/python-jenkins
|
2b69951603d1f57b3fe82e119bba62a19156a629
|
[
"BSD-3-Clause"
] | 2
|
2021-03-31T12:35:39.000Z
|
2021-08-17T16:30:34.000Z
|
tests/jobs/test_disable.py
|
jlakin2/python-jenkins
|
2b69951603d1f57b3fe82e119bba62a19156a629
|
[
"BSD-3-Clause"
] | 6
|
2017-12-02T23:31:32.000Z
|
2021-12-13T02:26:05.000Z
|
import json
from mock import patch
import jenkins
from tests.jobs.base import JenkinsJobsTestBase
class JenkinsDisableJobTest(JenkinsJobsTestBase):
@patch.object(jenkins.Jenkins, 'jenkins_open')
def test_simple(self, jenkins_mock):
jenkins_mock.side_effect = [
json.dumps({'name': 'Test Job'}),
json.dumps({'name': 'Test Job'}),
]
self.j.disable_job(u'Test Job')
self.assertEqual(
jenkins_mock.call_args_list[0][0][0].get_full_url(),
self.make_url('job/Test%20Job/disable'))
self.assertTrue(self.j.job_exists('Test Job'))
self._check_requests(jenkins_mock.call_args_list)
@patch.object(jenkins.Jenkins, 'jenkins_open')
def test_in_folder(self, jenkins_mock):
jenkins_mock.side_effect = [
json.dumps({'name': 'Test Job'}),
json.dumps({'name': 'Test Job'}),
]
self.j.disable_job(u'a Folder/Test Job')
self.assertEqual(
jenkins_mock.call_args_list[0][0][0].get_full_url(),
self.make_url('job/a%20Folder/job/Test%20Job/disable'))
self.assertTrue(self.j.job_exists('a Folder/Test Job'))
self._check_requests(jenkins_mock.call_args_list)
| 32.025641
| 67
| 0.642114
| 163
| 1,249
| 4.693252
| 0.269939
| 0.115033
| 0.086275
| 0.088889
| 0.801307
| 0.783007
| 0.783007
| 0.783007
| 0.670588
| 0.670588
| 0
| 0.012371
| 0.223379
| 1,249
| 38
| 68
| 32.868421
| 0.776289
| 0
| 0
| 0.482759
| 0
| 0
| 0.144916
| 0.047238
| 0
| 0
| 0
| 0
| 0.137931
| 1
| 0.068966
| false
| 0
| 0.137931
| 0
| 0.241379
| 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
|
c356e699a02f948597eb54b69b430c92b2a73231
| 213
|
py
|
Python
|
atm_backend/atm_backend/interface/__init__.py
|
sperrys/2018-ectf-insecure-example
|
283a73e848a0b6e382bcc8ddeb03d60c43a21fba
|
[
"Apache-2.0"
] | null | null | null |
atm_backend/atm_backend/interface/__init__.py
|
sperrys/2018-ectf-insecure-example
|
283a73e848a0b6e382bcc8ddeb03d60c43a21fba
|
[
"Apache-2.0"
] | null | null | null |
atm_backend/atm_backend/interface/__init__.py
|
sperrys/2018-ectf-insecure-example
|
283a73e848a0b6e382bcc8ddeb03d60c43a21fba
|
[
"Apache-2.0"
] | 1
|
2018-09-10T05:54:53.000Z
|
2018-09-10T05:54:53.000Z
|
from .bank import Bank, DummyBank
from .card import Card, DummyCard
from .hsm import HSM, DummyHSM
from .psoc import Psoc
from .psoc import DeviceRemoved, NotProvisioned, AlreadyProvisioned
import serial_emulator
| 30.428571
| 67
| 0.826291
| 28
| 213
| 6.25
| 0.5
| 0.091429
| 0.16
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126761
| 213
| 6
| 68
| 35.5
| 0.94086
| 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
|
c367bfee4b64537a4fc41a8aa8edfa4cd26c0f8a
| 779
|
py
|
Python
|
environ/line_token.py
|
watcharap0n/customers-mango
|
44e1b288eb10b8e7fc6cf646c25ec07dea8e1940
|
[
"Apache-2.0"
] | null | null | null |
environ/line_token.py
|
watcharap0n/customers-mango
|
44e1b288eb10b8e7fc6cf646c25ec07dea8e1940
|
[
"Apache-2.0"
] | null | null | null |
environ/line_token.py
|
watcharap0n/customers-mango
|
44e1b288eb10b8e7fc6cf646c25ec07dea8e1940
|
[
"Apache-2.0"
] | null | null | null |
"""
1. line notifyMKT
2. mango server
3. mango test
"""
line_bot_api = 'kRC4gIlLRwvJ80crtV5g5yNPq3QwqhlbSt2KEliih2VaKiwIC8ruldSn6cvmyVrWSoO0URuuEqfMs+IH9xDyMa4u6oiTm2tUJ+HNtG0414HtSEepysKxV6Y/e9h1pO/PcXlaI4BxO6aQZHfLCjsj7AdB04t89/1O/w1cDnyilFU='
handler = 'd61b703734bf899efae9c86a14365240'
mango_channel = '55zHqfzX2vguSp2YjK2Gt73Ejpzt1DHgsmiM1k3YRNYKJED7x6KXW1Je3FvUZe39fFENh0teAR9CiYXl4emWDmLVmFlqTOczl9Sos1jJDU3MOVM8zYH9Xfrzmdk7r3TuSZwZKFRoE4rxifjGZ7MvAgdB04t89/1O/w1cDnyilFU='
mango_secret = '5ce03e1c23a9e6a0e21ac62eac70c0cf'
# mango_channel = 'Sf4TAbP7RND+5f2j7HQwv4CohR/H51mJfQUtylXYZQOz6wFbIvYwRAx98+Vs+9Kj2QVKvTuM043TXRrwbM/q9Mx63lkWutr9WAE6CO2RN6MreYGd4NJ+AzmLq6e3Ec8/kN2C+gwGu53GxolPsZl0ggdB04t89/1O/w1cDnyilFU='
# mango_secret = '70af3e2a9fdf07d2ba6a63ac14290824'
| 55.642857
| 192
| 0.893453
| 45
| 779
| 15.333333
| 0.733333
| 0.052174
| 0.049275
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217158
| 0.042362
| 779
| 13
| 193
| 59.923077
| 0.707775
| 0.370988
| 0
| 0
| 0
| 0
| 0.848233
| 0.848233
| 0
| 1
| 0
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
488f8c9e0b5f1ce9d2a922469d1e8dd8ec094757
| 84
|
py
|
Python
|
python-django-piscine/day06/ex/admin.py
|
maxdesalle/libft
|
8845656e1f5cc1fec052cf97fc8f5839b2b590a8
|
[
"Unlicense"
] | 3
|
2021-01-06T13:50:12.000Z
|
2022-02-28T09:16:15.000Z
|
python-django-piscine/day06/ex/admin.py
|
maxdesalle/libft
|
8845656e1f5cc1fec052cf97fc8f5839b2b590a8
|
[
"Unlicense"
] | null | null | null |
python-django-piscine/day06/ex/admin.py
|
maxdesalle/libft
|
8845656e1f5cc1fec052cf97fc8f5839b2b590a8
|
[
"Unlicense"
] | 1
|
2020-11-23T12:58:18.000Z
|
2020-11-23T12:58:18.000Z
|
from django.contrib import admin
from .models import Tip
admin.site.register(Tip)
| 14
| 32
| 0.797619
| 13
| 84
| 5.153846
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130952
| 84
| 5
| 33
| 16.8
| 0.917808
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
48a0ada6d4a1355aeb70aadf9548baef1ea71355
| 115
|
py
|
Python
|
skdatasets/__init__.py
|
vnmabus/scikit-datasets
|
ef6f4f9dda7f6c929e438d186806553ba04c2809
|
[
"MIT"
] | 13
|
2017-11-24T13:24:16.000Z
|
2022-03-14T11:29:56.000Z
|
skdatasets/__init__.py
|
vnmabus/scikit-datasets
|
ef6f4f9dda7f6c929e438d186806553ba04c2809
|
[
"MIT"
] | 20
|
2018-09-03T17:12:58.000Z
|
2022-03-17T09:49:54.000Z
|
skdatasets/__init__.py
|
vnmabus/scikit-datasets
|
ef6f4f9dda7f6c929e438d186806553ba04c2809
|
[
"MIT"
] | 3
|
2018-08-08T13:51:40.000Z
|
2020-06-19T06:44:33.000Z
|
"""
Scikit-learn-compatible datasets.
@author: David Diaz Vico
@license: MIT
"""
from .repositories import fetch
| 12.777778
| 33
| 0.73913
| 14
| 115
| 6.071429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13913
| 115
| 8
| 34
| 14.375
| 0.858586
| 0.634783
| 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
|
48a863f5fea40b2d2c28c259656dd0c4ea4dda14
| 84
|
py
|
Python
|
atomate/feff/workflows/__init__.py
|
dongsenfo/atomate
|
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
|
[
"BSD-3-Clause-LBNL"
] | 1
|
2019-09-02T00:55:26.000Z
|
2019-09-02T00:55:26.000Z
|
atomate/feff/workflows/__init__.py
|
dongsenfo/atomate
|
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
|
[
"BSD-3-Clause-LBNL"
] | 1
|
2019-04-09T20:55:30.000Z
|
2019-04-09T21:30:24.000Z
|
atomate/feff/workflows/__init__.py
|
dongsenfo/atomate
|
01558e8c3e38470c02bc8b50c0ee3aa6198e5206
|
[
"BSD-3-Clause-LBNL"
] | 3
|
2018-09-01T00:08:51.000Z
|
2021-11-17T01:32:14.000Z
|
from __future__ import unicode_literals
from .core import *
from .presets import *
| 16.8
| 39
| 0.797619
| 11
| 84
| 5.636364
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154762
| 84
| 4
| 40
| 21
| 0.873239
| 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
|
48b46ae1d58f6840b90755a4df8d3ed6a43e7963
| 133
|
py
|
Python
|
hyperparameter_hunter/keys/__init__.py
|
mdjabc/hyperparameter_hunter
|
bfbd1faf63272a62e6f971d7e9a0487d71aea8f6
|
[
"MIT"
] | 1
|
2019-04-22T02:22:03.000Z
|
2019-04-22T02:22:03.000Z
|
hyperparameter_hunter/keys/__init__.py
|
mdjabc/hyperparameter_hunter
|
bfbd1faf63272a62e6f971d7e9a0487d71aea8f6
|
[
"MIT"
] | null | null | null |
hyperparameter_hunter/keys/__init__.py
|
mdjabc/hyperparameter_hunter
|
bfbd1faf63272a62e6f971d7e9a0487d71aea8f6
|
[
"MIT"
] | null | null | null |
from .makers import CrossExperimentKeyMaker, HyperparameterKeyMaker
__all__ = ["CrossExperimentKeyMaker", "HyperparameterKeyMaker"]
| 33.25
| 67
| 0.849624
| 8
| 133
| 13.625
| 0.75
| 0.825688
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075188
| 133
| 3
| 68
| 44.333333
| 0.886179
| 0
| 0
| 0
| 0
| 0
| 0.338346
| 0.338346
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
48ce5191d1f4dddd56f8e01580f2b2c1f36bcd1f
| 52
|
py
|
Python
|
source/pyprompt_version.py
|
bratpeki/pyprompt
|
8830efc417825b4db8a07b26d814a037b435205d
|
[
"MIT"
] | null | null | null |
source/pyprompt_version.py
|
bratpeki/pyprompt
|
8830efc417825b4db8a07b26d814a037b435205d
|
[
"MIT"
] | null | null | null |
source/pyprompt_version.py
|
bratpeki/pyprompt
|
8830efc417825b4db8a07b26d814a037b435205d
|
[
"MIT"
] | null | null | null |
version = "1.0"
def getVersion():
return version
| 8.666667
| 17
| 0.673077
| 7
| 52
| 5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.192308
| 52
| 5
| 18
| 10.4
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0.057692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
48d0278264730d3fadafa0f93a0184c86802545b
| 17,184
|
py
|
Python
|
windows/winproxy/apis/advapi32.py
|
1orenz0/PythonForWindows
|
f3de7b528b020b45ac6a871c975006fc1db1c3b0
|
[
"BSD-3-Clause"
] | 1
|
2021-06-22T16:50:31.000Z
|
2021-06-22T16:50:31.000Z
|
windows/winproxy/apis/advapi32.py
|
1orenz0/PythonForWindows
|
f3de7b528b020b45ac6a871c975006fc1db1c3b0
|
[
"BSD-3-Clause"
] | null | null | null |
windows/winproxy/apis/advapi32.py
|
1orenz0/PythonForWindows
|
f3de7b528b020b45ac6a871c975006fc1db1c3b0
|
[
"BSD-3-Clause"
] | 1
|
2021-05-12T12:58:27.000Z
|
2021-05-12T12:58:27.000Z
|
import ctypes
import windows.generated_def as gdef
from ..apiproxy import ApiProxy, NeededParameter
from ..error import fail_on_zero, succeed_on_zero, result_is_error_code
class Advapi32Proxy(ApiProxy):
APIDLL = "advapi32"
default_error_check = staticmethod(fail_on_zero)
# Process
@Advapi32Proxy()
def CreateProcessAsUserA(hToken, lpApplicationName, lpCommandLine=None, lpProcessAttributes=None, lpThreadAttributes=None, bInheritHandles=False,
dwCreationFlags=0, lpEnvironment=None, lpCurrentDirectory=None, lpStartupInfo=None, lpProcessInformation=None):
if lpStartupInfo is None:
StartupInfo = gdef.STARTUPINFOA()
StartupInfo.cb = ctypes.sizeof(StartupInfo)
StartupInfo.dwFlags = 0
# StartupInfo.wShowWindow = gdef.SW_HIDE
lpStartupInfo = ctypes.byref(StartupInfo)
if lpProcessInformation is None:
lpProcessInformation = ctypes.byref(gdef.PROCESS_INFORMATION())
return CreateProcessAsUserA.ctypes_function(hToken, lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation)
return CreateProcessAsUserA.ctypes_function(hToken, lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation)
@Advapi32Proxy()
def CreateProcessAsUserW(hToken, lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation):
return CreateProcessAsUserW.ctypes_function(hToken, lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation)
# Token
@Advapi32Proxy()
def OpenProcessToken(ProcessHandle=None, DesiredAccess=NeededParameter, TokenHandle=NeededParameter):
"""If ProcessHandle is None: take the current process"""
if ProcessHandle is None:
# TODO: FAIL
ProcessHandle = GetCurrentProcess()
return OpenProcessToken.ctypes_function(ProcessHandle, DesiredAccess, TokenHandle)
@Advapi32Proxy()
def OpenThreadToken(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle):
return OpenThreadToken.ctypes_function(ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle)
@Advapi32Proxy()
def SetThreadToken(Thread, Token):
if isinstance(Thread, (int, long)):
Thread = gdef.HANDLE(Thread)
return SetThreadToken.ctypes_function(Thread, Token)
@Advapi32Proxy()
def DuplicateToken(ExistingTokenHandle, ImpersonationLevel, DuplicateTokenHandle):
return DuplicateToken.ctypes_function(ExistingTokenHandle, ImpersonationLevel, DuplicateTokenHandle)
@Advapi32Proxy()
def DuplicateTokenEx(hExistingToken, dwDesiredAccess, lpTokenAttributes, ImpersonationLevel, TokenType, phNewToken):
return DuplicateTokenEx.ctypes_function(hExistingToken, dwDesiredAccess, lpTokenAttributes, ImpersonationLevel, TokenType, phNewToken)
@Advapi32Proxy()
def GetTokenInformation(TokenHandle=NeededParameter, TokenInformationClass=NeededParameter, TokenInformation=None, TokenInformationLength=0, ReturnLength=None):
if ReturnLength is None:
ReturnLength = ctypes.byref(gdef.DWORD())
return GetTokenInformation.ctypes_function(TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength, ReturnLength)
@Advapi32Proxy()
def SetTokenInformation(TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength):
return SetTokenInformation.ctypes_function(TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength)
# Token - Privilege
@Advapi32Proxy()
def LookupPrivilegeValueA(lpSystemName=None, lpName=NeededParameter, lpLuid=NeededParameter):
return LookupPrivilegeValueA.ctypes_function(lpSystemName, lpName, lpLuid)
@Advapi32Proxy()
def LookupPrivilegeValueW(lpSystemName=None, lpName=NeededParameter, lpLuid=NeededParameter):
return LookupPrivilegeValueW.ctypes_function(lpSystemName, lpName, lpLuid)
@Advapi32Proxy()
def LookupPrivilegeNameA(lpSystemName, lpLuid, lpName, cchName):
return LookupPrivilegeNameA.ctypes_function(lpSystemName, lpLuid, lpName, cchName)
@Advapi32Proxy()
def LookupPrivilegeNameW(lpSystemName, lpLuid, lpName, cchName):
return LookupPrivilegeNameW.ctypes_function(lpSystemName, lpLuid, lpName, cchName)
@Advapi32Proxy()
def AdjustTokenPrivileges(TokenHandle, DisableAllPrivileges=False, NewState=NeededParameter, BufferLength=None, PreviousState=None, ReturnLength=None):
if BufferLength is None:
BufferLength = ctypes.sizeof(NewState)
return AdjustTokenPrivileges.ctypes_function(TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength)
# Sid
@Advapi32Proxy()
def LookupAccountSidA(lpSystemName, lpSid, lpName, cchName, lpReferencedDomainName, cchReferencedDomainName, peUse):
return LookupAccountSidA.ctypes_function(lpSystemName, lpSid, lpName, cchName, lpReferencedDomainName, cchReferencedDomainName, peUse)
@Advapi32Proxy()
def LookupAccountSidW(lpSystemName, lpSid, lpName, cchName, lpReferencedDomainName, cchReferencedDomainName, peUse):
return LookupAccountSidW.ctypes_function(lpSystemName, lpSid, lpName, cchName, lpReferencedDomainName, cchReferencedDomainName, peUse)
@Advapi32Proxy()
def CreateWellKnownSid(WellKnownSidType, DomainSid=None, pSid=None, cbSid=NeededParameter):
return CreateWellKnownSid.ctypes_function(WellKnownSidType, DomainSid, pSid, cbSid)
@Advapi32Proxy()
def GetLengthSid(pSid):
return GetLengthSid.ctypes_function(pSid)
@Advapi32Proxy()
def EqualSid(pSid1, pSid2):
return EqualSid.ctypes_function(pSid1, pSid2)
@Advapi32Proxy()
def GetSidSubAuthority(pSid, nSubAuthority):
return GetSidSubAuthority.ctypes_function(pSid, nSubAuthority)
@Advapi32Proxy()
def GetSidSubAuthorityCount(pSid):
return GetSidSubAuthorityCount.ctypes_function(pSid)
@Advapi32Proxy()
def ConvertStringSidToSidA(StringSid, Sid):
return ConvertStringSidToSidA.ctypes_function(StringSid, Sid)
@Advapi32Proxy()
def ConvertStringSidToSidW(StringSid, Sid):
return ConvertStringSidToSidW.ctypes_function(StringSid, Sid)
@Advapi32Proxy()
def ConvertSidToStringSidA(Sid, StringSid):
return ConvertSidToStringSidA.ctypes_function(Sid, StringSid)
@Advapi32Proxy()
def ConvertSidToStringSidW(Sid, StringSid):
return ConvertSidToStringSidW.ctypes_function(Sid, StringSid)
@Advapi32Proxy()
def CopySid(nDestinationSidLength, pDestinationSid, pSourceSid):
return CopySid.ctypes_function(nDestinationSidLength, pDestinationSid, pSourceSid)
# Security descriptor
@Advapi32Proxy(error_check=result_is_error_code)
def GetNamedSecurityInfoA(pObjectName, ObjectType, SecurityInfo, ppsidOwner=None, ppsidGroup=None, ppDacl=None, ppSacl=None, ppSecurityDescriptor=None):
return GetNamedSecurityInfoA.ctypes_function(pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor)
@Advapi32Proxy(error_check=result_is_error_code)
def GetNamedSecurityInfoW(pObjectName, ObjectType, SecurityInfo, ppsidOwner=None, ppsidGroup=None, ppDacl=None, ppSacl=None, ppSecurityDescriptor=None):
return GetNamedSecurityInfoW.ctypes_function(pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor)
@Advapi32Proxy(error_check=succeed_on_zero)
def GetSecurityInfo(handle, ObjectType, SecurityInfo, ppsidOwner=None, ppsidGroup=None, ppDacl=None, ppSacl=None, ppSecurityDescriptor=None):
return GetSecurityInfo.ctypes_function(handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor)
@Advapi32Proxy()
def IsValidSecurityDescriptor(pSecurityDescriptor):
return IsValidSecurityDescriptor.ctypes_function(pSecurityDescriptor)
@Advapi32Proxy()
def ConvertStringSecurityDescriptorToSecurityDescriptorA(StringSecurityDescriptor, StringSDRevision, SecurityDescriptor, SecurityDescriptorSize):
return ConvertStringSecurityDescriptorToSecurityDescriptorA.ctypes_function(StringSecurityDescriptor, StringSDRevision, SecurityDescriptor, SecurityDescriptorSize)
@Advapi32Proxy()
def ConvertStringSecurityDescriptorToSecurityDescriptorW(StringSecurityDescriptor, StringSDRevision, SecurityDescriptor, SecurityDescriptorSize):
return ConvertStringSecurityDescriptorToSecurityDescriptorW.ctypes_function(StringSecurityDescriptor, StringSDRevision, SecurityDescriptor, SecurityDescriptorSize)
@Advapi32Proxy()
def ConvertSecurityDescriptorToStringSecurityDescriptorA(SecurityDescriptor, RequestedStringSDRevision, SecurityInformation, StringSecurityDescriptor, StringSecurityDescriptorLen):
return ConvertSecurityDescriptorToStringSecurityDescriptorA.ctypes_function(SecurityDescriptor, RequestedStringSDRevision, SecurityInformation, StringSecurityDescriptor, StringSecurityDescriptorLen)
@Advapi32Proxy()
def ConvertSecurityDescriptorToStringSecurityDescriptorW(SecurityDescriptor, RequestedStringSDRevision, SecurityInformation, StringSecurityDescriptor, StringSecurityDescriptorLen):
return ConvertSecurityDescriptorToStringSecurityDescriptorW.ctypes_function(SecurityDescriptor, RequestedStringSDRevision, SecurityInformation, StringSecurityDescriptor, StringSecurityDescriptorLen)
@Advapi32Proxy()
def GetSecurityDescriptorDacl(pSecurityDescriptor, lpbDaclPresent, pDacl, lpbDaclDefaulted):
return GetSecurityDescriptorDacl.ctypes_function(pSecurityDescriptor, lpbDaclPresent, pDacl, lpbDaclDefaulted)
@Advapi32Proxy()
def GetSecurityDescriptorLength(pSecurityDescriptor):
return GetSecurityDescriptorLength.ctypes_function(pSecurityDescriptor)
@Advapi32Proxy()
def GetSecurityDescriptorControl(pSecurityDescriptor, pControl, lpdwRevision):
return GetSecurityDescriptorControl.ctypes_function(pSecurityDescriptor, pControl, lpdwRevision)
@Advapi32Proxy()
def GetSecurityDescriptorOwner(pSecurityDescriptor, pOwner, lpbOwnerDefaulted):
return GetSecurityDescriptorOwner.ctypes_function(pSecurityDescriptor, pOwner, lpbOwnerDefaulted)
@Advapi32Proxy()
def GetSecurityDescriptorGroup(pSecurityDescriptor, pGroup, lpbGroupDefaulted):
return GetSecurityDescriptorGroup.ctypes_function(pSecurityDescriptor, pGroup, lpbGroupDefaulted)
@Advapi32Proxy()
def GetSecurityDescriptorSacl(pSecurityDescriptor, lpbSaclPresent, pSacl, lpbSaclDefaulted):
return GetSecurityDescriptorSacl.ctypes_function(pSecurityDescriptor, lpbSaclPresent, pSacl, lpbSaclDefaulted)
# ACE - ACL
@Advapi32Proxy()
def GetAclInformation(pAcl, pAclInformation, nAclInformationLength, dwAclInformationClass):
return GetAclInformation.ctypes_function(pAcl, pAclInformation, nAclInformationLength, dwAclInformationClass)
@Advapi32Proxy()
def GetAce(pAcl, dwAceIndex, pAce):
return GetAce.ctypes_function(pAcl, dwAceIndex, pAce)
# Registry
@Advapi32Proxy(error_check=succeed_on_zero)
def RegOpenKeyExA(hKey, lpSubKey, ulOptions, samDesired, phkResult):
return RegOpenKeyExA.ctypes_function(hKey, lpSubKey, ulOptions, samDesired, phkResult)
@Advapi32Proxy(error_check=succeed_on_zero)
def RegOpenKeyExW(hKey, lpSubKey, ulOptions, samDesired, phkResult):
return RegOpenKeyExW.ctypes_function(hKey, lpSubKey, ulOptions, samDesired, phkResult)
@Advapi32Proxy(error_check=succeed_on_zero)
def RegGetValueA(hkey, lpSubKey, lpValue, dwFlags, pdwType, pvData, pcbData):
return RegGetValueA.ctypes_function(hkey, lpSubKey, lpValue, dwFlags, pdwType, pvData, pcbData)
@Advapi32Proxy(error_check=succeed_on_zero)
def RegGetValueW(hkey, lpSubKey=None, lpValue=NeededParameter, dwFlags=0, pdwType=None, pvData=None, pcbData=None):
return RegGetValueW.ctypes_function(hkey, lpSubKey, lpValue, dwFlags, pdwType, pvData, pcbData)
@Advapi32Proxy(error_check=succeed_on_zero)
def RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData):
return RegQueryValueExA.ctypes_function(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData)
@Advapi32Proxy(error_check=succeed_on_zero)
def RegQueryValueExW(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData):
return RegQueryValueExA.ctypes_function(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData)
@Advapi32Proxy(error_check=succeed_on_zero)
def RegCloseKey(hKey):
return RegCloseKey.ctypes_function(hKey)
# Service
@Advapi32Proxy()
def OpenSCManagerA(lpMachineName=None, lpDatabaseName=None, dwDesiredAccess=gdef.SC_MANAGER_ALL_ACCESS):
return OpenSCManagerA.ctypes_function(lpMachineName, lpDatabaseName, dwDesiredAccess)
@Advapi32Proxy()
def OpenSCManagerW(lpMachineName=None, lpDatabaseName=None, dwDesiredAccess=gdef.SC_MANAGER_ALL_ACCESS):
return OpenSCManagerW.ctypes_function(lpMachineName, lpDatabaseName, dwDesiredAccess)
@Advapi32Proxy()
def EnumServicesStatusExA(hSCManager, InfoLevel, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle, pszGroupName):
return EnumServicesStatusExA.ctypes_function(hSCManager, InfoLevel, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle, pszGroupName)
@Advapi32Proxy()
def EnumServicesStatusExW(hSCManager, InfoLevel, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle, pszGroupName):
return EnumServicesStatusExW.ctypes_function(hSCManager, InfoLevel, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle, pszGroupName)
@Advapi32Proxy()
def StartServiceA(hService, dwNumServiceArgs, lpServiceArgVectors):
return StartServiceA.ctypes_function(hService, dwNumServiceArgs, lpServiceArgVectors)
@Advapi32Proxy()
def StartServiceW(hService, dwNumServiceArgs, lpServiceArgVectors):
return StartServiceW.ctypes_function(hService, dwNumServiceArgs, lpServiceArgVectors)
@Advapi32Proxy()
def OpenServiceA(hSCManager, lpServiceName, dwDesiredAccess):
return OpenServiceA.ctypes_function(hSCManager, lpServiceName, dwDesiredAccess)
@Advapi32Proxy()
def OpenServiceW(hSCManager, lpServiceName, dwDesiredAccess):
return OpenServiceW.ctypes_function(hSCManager, lpServiceName, dwDesiredAccess)
@Advapi32Proxy()
def CloseServiceHandle(hSCObject):
return CloseServiceHandle.ctypes_function(hSCObject)
# Event log
@Advapi32Proxy()
def OpenEventLogA(lpUNCServerName=None, lpSourceName=NeededParameter):
return OpenEventLogA.ctypes_function(lpUNCServerName, lpSourceName)
@Advapi32Proxy()
def OpenEventLogW(lpUNCServerName=None, lpSourceName=NeededParameter):
return OpenEventLogW.ctypes_function(lpUNCServerName, lpSourceName)
@Advapi32Proxy()
def OpenBackupEventLogA(lpUNCServerName=None, lpSourceName=NeededParameter):
return OpenBackupEventLogA.ctypes_function(lpUNCServerName, lpSourceName)
@Advapi32Proxy()
def OpenBackupEventLogW(lpUNCServerName=None, lpSourceName=NeededParameter):
return OpenBackupEventLogW.ctypes_function(lpUNCServerName, lpSourceName)
@Advapi32Proxy()
def ReadEventLogA(hEventLog, dwReadFlags, dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded):
return ReadEventLogA.ctypes_function(hEventLog, dwReadFlags, dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded)
@Advapi32Proxy()
def ReadEventLogW(hEventLog, dwReadFlags, dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded):
return ReadEventLogW.ctypes_function(hEventLog, dwReadFlags, dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded)
@Advapi32Proxy()
def GetEventLogInformation(hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded):
return GetEventLogInformation.ctypes_function(hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded)
@Advapi32Proxy()
def GetNumberOfEventLogRecords(hEventLog, NumberOfRecords):
return GetNumberOfEventLogRecords.ctypes_function(hEventLog, NumberOfRecords)
@Advapi32Proxy()
def CloseEventLog(hEventLog):
return CloseEventLog.ctypes_function(hEventLog)
# Crypto
## Crypto key
@Advapi32Proxy()
def CryptGenKey(hProv, Algid, dwFlags, phKey):
return CryptGenKey.ctypes_function(hProv, Algid, dwFlags, phKey)
@Advapi32Proxy()
def CryptDestroyKey(hKey):
return CryptDestroyKey.ctypes_function(hKey)
@Advapi32Proxy()
def CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen):
return CryptExportKey.ctypes_function(hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen)
## crypt context
@Advapi32Proxy()
def CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags):
return CryptAcquireContextA.ctypes_function(phProv, pszContainer, pszProvider, dwProvType, dwFlags)
@Advapi32Proxy()
def CryptAcquireContextW(phProv, pszContainer, pszProvider, dwProvType, dwFlags):
return CryptAcquireContextW.ctypes_function(phProv, pszContainer, pszProvider, dwProvType, dwFlags)
@Advapi32Proxy()
def CryptReleaseContext(hProv, dwFlags):
return CryptReleaseContext.ctypes_function(hProv, dwFlags)
| 48
| 236
| 0.837465
| 1,386
| 17,184
| 10.292208
| 0.204185
| 0.072625
| 0.016123
| 0.016824
| 0.510831
| 0.460217
| 0.37245
| 0.318963
| 0.257974
| 0.22727
| 0
| 0.010068
| 0.086767
| 17,184
| 357
| 237
| 48.134454
| 0.898936
| 0.013152
| 0
| 0.316872
| 1
| 0
| 0.000472
| 0
| 0
| 0
| 0
| 0.002801
| 0
| 1
| 0.300412
| false
| 0
| 0.016461
| 0.279835
| 0.633745
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
48de78818b665dd3fbb2cb85b03940b713e2a9ee
| 93
|
py
|
Python
|
aioazstorage/__init__.py
|
rcarmo/aioazstorage
|
cdd06f68fe43b4b9308330744b639dd38ddcedb1
|
[
"MIT"
] | 2
|
2019-07-09T13:54:59.000Z
|
2021-01-23T15:25:27.000Z
|
aioazstorage/__init__.py
|
rcarmo/aioazstorage
|
cdd06f68fe43b4b9308330744b639dd38ddcedb1
|
[
"MIT"
] | 1
|
2020-02-04T15:08:53.000Z
|
2020-02-04T15:08:53.000Z
|
aioazstorage/__init__.py
|
rcarmo/aioazstorage
|
cdd06f68fe43b4b9308330744b639dd38ddcedb1
|
[
"MIT"
] | 1
|
2021-01-23T15:25:29.000Z
|
2021-01-23T15:25:29.000Z
|
from .tables import TableClient
from .queues import QueueClient
from .blobs import BlobClient
| 31
| 31
| 0.849462
| 12
| 93
| 6.583333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11828
| 93
| 3
| 32
| 31
| 0.963415
| 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
|
d2896502defe5af95c84c76fdaeb9a34569defcf
| 45
|
py
|
Python
|
libs/multiverso/theano_ext/lasagne_ext/__init__.py
|
fyabc/NMT
|
7fa10737967424d80c3c23d597a0648df1ed4015
|
[
"MIT"
] | null | null | null |
libs/multiverso/theano_ext/lasagne_ext/__init__.py
|
fyabc/NMT
|
7fa10737967424d80c3c23d597a0648df1ed4015
|
[
"MIT"
] | null | null | null |
libs/multiverso/theano_ext/lasagne_ext/__init__.py
|
fyabc/NMT
|
7fa10737967424d80c3c23d597a0648df1ed4015
|
[
"MIT"
] | null | null | null |
#! /usr/bin/python
# -*- encoding: utf-8 -*-
| 15
| 25
| 0.533333
| 6
| 45
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026316
| 0.155556
| 45
| 2
| 26
| 22.5
| 0.605263
| 0.911111
| 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
|
d29e75858e8ca0c0cc043151a482a5b8976aeeff
| 176
|
py
|
Python
|
prettyqt/core/modelindex.py
|
phil65/PrettyQt
|
26327670c46caa039c9bd15cb17a35ef5ad72e6c
|
[
"MIT"
] | 7
|
2019-05-01T01:34:36.000Z
|
2022-03-08T02:24:14.000Z
|
prettyqt/core/modelindex.py
|
phil65/PrettyQt
|
26327670c46caa039c9bd15cb17a35ef5ad72e6c
|
[
"MIT"
] | 141
|
2019-04-16T11:22:01.000Z
|
2021-04-14T15:12:36.000Z
|
prettyqt/core/modelindex.py
|
phil65/PrettyQt
|
26327670c46caa039c9bd15cb17a35ef5ad72e6c
|
[
"MIT"
] | 5
|
2019-04-17T11:48:19.000Z
|
2021-11-21T10:30:19.000Z
|
from __future__ import annotations
from prettyqt.qt import QtCore
class ModelIndex(QtCore.QModelIndex):
def __getitem__(self, flag: int):
return self.data(flag)
| 19.555556
| 37
| 0.75
| 22
| 176
| 5.636364
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176136
| 176
| 8
| 38
| 22
| 0.855172
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
d2ec3d00a50d1e8b129f1a638fa18853160e2f89
| 186
|
py
|
Python
|
contact/admin.py
|
udaybk/Civil-Construction-Website
|
33ffd3efd06494cba4f90f3c795f988e582350ed
|
[
"MIT"
] | 3
|
2018-05-08T15:32:55.000Z
|
2019-10-24T05:25:13.000Z
|
contact/admin.py
|
udaybk/Civil-Construction-Website
|
33ffd3efd06494cba4f90f3c795f988e582350ed
|
[
"MIT"
] | null | null | null |
contact/admin.py
|
udaybk/Civil-Construction-Website
|
33ffd3efd06494cba4f90f3c795f988e582350ed
|
[
"MIT"
] | 1
|
2020-04-01T18:19:49.000Z
|
2020-04-01T18:19:49.000Z
|
from django.contrib import admin
from contact.models import userprofile,subscribe_model
# Register your models here.
admin.site.register(userprofile)
admin.site.register(subscribe_model)
| 37.2
| 54
| 0.854839
| 25
| 186
| 6.28
| 0.56
| 0.178344
| 0.216561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075269
| 186
| 5
| 55
| 37.2
| 0.912791
| 0.139785
| 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
|
d2ecada70f93afc8763e53c9216f61c74386480f
| 224
|
py
|
Python
|
scripts/ssc/deprecated/euler_scripts_TopoAE/run_topoae_euler_spheres_1.py
|
MrBellamonte/MT-VAEs-TDA
|
8881b5db607c673fb558f7b74ece27f244b16b77
|
[
"MIT"
] | null | null | null |
scripts/ssc/deprecated/euler_scripts_TopoAE/run_topoae_euler_spheres_1.py
|
MrBellamonte/MT-VAEs-TDA
|
8881b5db607c673fb558f7b74ece27f244b16b77
|
[
"MIT"
] | 1
|
2020-09-22T13:04:58.000Z
|
2020-09-22T13:05:23.000Z
|
scripts/ssc/deprecated/euler_scripts_TopoAE/run_topoae_euler_spheres_1.py
|
MrBellamonte/AEs-VAEs-TDA
|
8881b5db607c673fb558f7b74ece27f244b16b77
|
[
"MIT"
] | null | null | null |
from scripts.ssc.models.TopoAE import spheres_lowmemory_lowbs_euler_seed1_1
from src.models.TopoAE.train_engine import simulator_TopoAE
if __name__ == "__main__":
simulator_TopoAE(spheres_lowmemory_lowbs_euler_seed1_1)
| 37.333333
| 75
| 0.861607
| 32
| 224
| 5.375
| 0.59375
| 0.139535
| 0.244186
| 0.302326
| 0.372093
| 0.372093
| 0
| 0
| 0
| 0
| 0
| 0.019417
| 0.080357
| 224
| 5
| 76
| 44.8
| 0.815534
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 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
|
825b21c8cfd435979399a40ff70ea26d798b757c
| 363
|
py
|
Python
|
Problems/Dynamic Programming/Hard/EditDistance/test_edit_distance.py
|
dolong2110/Algorithm-By-Problems-Python
|
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
|
[
"MIT"
] | 1
|
2021-08-16T14:52:05.000Z
|
2021-08-16T14:52:05.000Z
|
Problems/Dynamic Programming/Hard/EditDistance/test_edit_distance.py
|
dolong2110/Algorithm-By-Problems-Python
|
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
|
[
"MIT"
] | null | null | null |
Problems/Dynamic Programming/Hard/EditDistance/test_edit_distance.py
|
dolong2110/Algorithm-By-Problems-Python
|
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from edit_distance import editDistance
class Test(TestCase):
def test_edit_distance(self):
self.assertEqual(editDistance("geek", "gesek"), 1)
self.assertEqual(editDistance("cat", "cut"), 1)
self.assertEqual(editDistance("sunday", "saturday"), 3)
self.assertEqual(editDistance("FOOD", "MONEY"), 4)
| 40.333333
| 63
| 0.69697
| 41
| 363
| 6.097561
| 0.560976
| 0.24
| 0.432
| 0.224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013201
| 0.165289
| 363
| 9
| 64
| 40.333333
| 0.811881
| 0
| 0
| 0
| 0
| 0
| 0.104396
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.125
| false
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8270ac4ab44099b8825b72df1ab2b8dc41c8ea3d
| 473
|
py
|
Python
|
terrascript/vmc/r.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/vmc/r.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/vmc/r.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/vmc/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class vmc_cluster(terrascript.Resource):
pass
class vmc_public_ip(terrascript.Resource):
pass
class vmc_sddc(terrascript.Resource):
pass
class vmc_site_recovery(terrascript.Resource):
pass
class vmc_srm_node(terrascript.Resource):
pass
| 15.766667
| 79
| 0.763214
| 58
| 473
| 6.086207
| 0.551724
| 0.113314
| 0.325779
| 0.31728
| 0.351275
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0025
| 0.154334
| 473
| 29
| 80
| 16.310345
| 0.88
| 0.143763
| 0
| 0.333333
| 1
| 0
| 0.097015
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.133333
| 0
| 0.466667
| 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
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
828904cc011162682fe6e0ebad8bb0159b154dc9
| 630
|
py
|
Python
|
alipy/query_strategy/__init__.py
|
JlsBssmnn/ALiPy
|
57f5a1e4c0252436ecf2572da6973d054807add5
|
[
"BSD-3-Clause"
] | 1
|
2021-08-17T01:58:14.000Z
|
2021-08-17T01:58:14.000Z
|
alipy/query_strategy/__init__.py
|
JlsBssmnn/ALiPy
|
57f5a1e4c0252436ecf2572da6973d054807add5
|
[
"BSD-3-Clause"
] | null | null | null |
alipy/query_strategy/__init__.py
|
JlsBssmnn/ALiPy
|
57f5a1e4c0252436ecf2572da6973d054807add5
|
[
"BSD-3-Clause"
] | 1
|
2019-12-19T07:02:07.000Z
|
2019-12-19T07:02:07.000Z
|
from .query_labels import *
from .cost_sensitive import QueryCostSensitiveHALC, QueryCostSensitiveRandom, QueryCostSensitivePerformance
from .multi_label import QueryMultiLabelQUIRE, QueryMultiLabelAUDI, QueryMultiLabelMMC, QueryMultiLabelAdaptive, QueryMultiLabelRandom
from .noisy_oracles import QueryNoisyOraclesCEAL, QueryNoisyOraclesIEthresh, QueryNoisyOraclesAll, QueryNoisyOraclesRandom
from .query_features import QueryFeatureAFASMC, QueryFeatureRandom, QueryFeatureStability
from .query_type import check_query_type, QueryTypeAURO
from .cost_sensitive import select_Knapsack_01, select_POSS, hierarchical_multilabel_mark
| 78.75
| 134
| 0.898413
| 55
| 630
| 10.036364
| 0.654545
| 0.048913
| 0.061594
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003401
| 0.066667
| 630
| 7
| 135
| 90
| 0.935374
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
82b64454f53fff95020a5182c8500abb24332ce3
| 363
|
py
|
Python
|
activation_functions/sigmoid.py
|
SteliosKliafas/numpy_python_ann
|
725946de6829c4e214bce48f028688a567a2cea4
|
[
"MIT"
] | null | null | null |
activation_functions/sigmoid.py
|
SteliosKliafas/numpy_python_ann
|
725946de6829c4e214bce48f028688a567a2cea4
|
[
"MIT"
] | null | null | null |
activation_functions/sigmoid.py
|
SteliosKliafas/numpy_python_ann
|
725946de6829c4e214bce48f028688a567a2cea4
|
[
"MIT"
] | null | null | null |
import numpy as np
class Sigmoid_Layer:
def forward_pass(self, layer_inputs):
self.layer_inputs = layer_inputs
self.layer_output = 1 / (1 + np.exp(-layer_inputs)) # apply sigmoid formula
def backward_pass(self, grad_inputs):
self.grad_output = self.layer_output * (1 - self.layer_output) * grad_inputs # derivative of sigmoid
| 33
| 109
| 0.702479
| 51
| 363
| 4.745098
| 0.411765
| 0.18595
| 0.18595
| 0.165289
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010453
| 0.209366
| 363
| 10
| 110
| 36.3
| 0.832753
| 0.118457
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.285714
| 0.142857
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
82bb70535fc5d4d2c1c0541cf2eab7e590f100d1
| 197
|
py
|
Python
|
frontend/urls.py
|
joshgoshbgosh/ccs-final-project
|
566bf8bfaa82986010a2dfbdc3b32592c796d4a9
|
[
"MIT"
] | 1
|
2020-11-05T14:21:45.000Z
|
2020-11-05T14:21:45.000Z
|
frontend/urls.py
|
joshgoshbgosh/ccs-final-project
|
566bf8bfaa82986010a2dfbdc3b32592c796d4a9
|
[
"MIT"
] | null | null | null |
frontend/urls.py
|
joshgoshbgosh/ccs-final-project
|
566bf8bfaa82986010a2dfbdc3b32592c796d4a9
|
[
"MIT"
] | null | null | null |
from django.urls import include, path
from . import views
app_name = 'frontend'
urlpatterns = [
path('<path:resource>', views.IndexView.as_view()),
path('', views.IndexView.as_view()),
]
| 19.7
| 55
| 0.685279
| 25
| 197
| 5.28
| 0.6
| 0.212121
| 0.242424
| 0.30303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152284
| 197
| 9
| 56
| 21.888889
| 0.790419
| 0
| 0
| 0
| 0
| 0
| 0.116751
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.285714
| 0
| 0.285714
| 0
| 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
|
7d5c6aa341d78c69ba6cf05d2cab7a652cc47bb3
| 112
|
py
|
Python
|
ashe/op_list.py
|
Ailln/ashe
|
ce9eb3626841aef059792c721d1bd7c07b93193f
|
[
"MIT"
] | null | null | null |
ashe/op_list.py
|
Ailln/ashe
|
ce9eb3626841aef059792c721d1bd7c07b93193f
|
[
"MIT"
] | null | null | null |
ashe/op_list.py
|
Ailln/ashe
|
ce9eb3626841aef059792c721d1bd7c07b93193f
|
[
"MIT"
] | null | null | null |
from typing import List
def reverse(input_list: List) -> List:
input_list.reverse()
return input_list
| 16
| 38
| 0.723214
| 16
| 112
| 4.875
| 0.5
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196429
| 112
| 6
| 39
| 18.666667
| 0.866667
| 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
|
7da797c09018c72d08a804bc1523ebeadb47273d
| 172
|
py
|
Python
|
demo.py
|
RuanJylf/Data_Visualization
|
0980e979e39eaf4e7d2dbd57c9c11c0b4efb7563
|
[
"MIT"
] | 4
|
2019-12-10T05:19:32.000Z
|
2021-06-28T06:33:09.000Z
|
demo.py
|
RuanJylf/Data_Visualization
|
0980e979e39eaf4e7d2dbd57c9c11c0b4efb7563
|
[
"MIT"
] | 5
|
2020-02-29T01:51:06.000Z
|
2022-03-12T00:07:54.000Z
|
demo.py
|
RuanJylf/Data_Visualization
|
0980e979e39eaf4e7d2dbd57c9c11c0b4efb7563
|
[
"MIT"
] | 2
|
2020-02-17T03:00:43.000Z
|
2021-12-01T05:11:27.000Z
|
# type_list = [['TY体'], ['180'], ['平坦']]
#
# tip_str = ""
#
# for i in type_list:
#
# tip_str += ''.join(i) + ' '
#
# print(tip_str)
#
for i in range(10):
print(i)
| 13.230769
| 40
| 0.476744
| 26
| 172
| 2.961538
| 0.538462
| 0.233766
| 0.233766
| 0.25974
| 0.311688
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038462
| 0.244186
| 172
| 13
| 41
| 13.230769
| 0.553846
| 0.686047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7de1aa8a34f62c7e9615ba4c4b38a1f8141a275a
| 21,397
|
py
|
Python
|
test/python/T0_t/WMBS_t/JobSplitting_t/Repack_t.py
|
silviodonato/T0
|
a093729d08b31175ed35cd20e889bd7094ce152a
|
[
"Apache-2.0"
] | 6
|
2016-03-09T14:36:19.000Z
|
2021-07-27T01:28:00.000Z
|
test/python/T0_t/WMBS_t/JobSplitting_t/Repack_t.py
|
silviodonato/T0
|
a093729d08b31175ed35cd20e889bd7094ce152a
|
[
"Apache-2.0"
] | 193
|
2015-01-07T21:03:43.000Z
|
2022-03-31T12:22:18.000Z
|
test/python/T0_t/WMBS_t/JobSplitting_t/Repack_t.py
|
silviodonato/T0
|
a093729d08b31175ed35cd20e889bd7094ce152a
|
[
"Apache-2.0"
] | 36
|
2015-01-28T19:01:54.000Z
|
2021-12-15T17:18:20.000Z
|
#!/usr/bin/env python
"""
_Repack_t_
Repack job splitting test
"""
import unittest
import threading
import logging
import time
from WMCore.WMBS.File import File
from WMCore.WMBS.Fileset import Fileset
from WMCore.WMBS.Subscription import Subscription
from WMCore.WMBS.Workflow import Workflow
from WMCore.DataStructs.Run import Run
from WMCore.DAOFactory import DAOFactory
from WMCore.JobSplitting.SplitterFactory import SplitterFactory
from WMCore.Services.UUIDLib import makeUUID
from WMQuality.TestInit import TestInit
class RepackTest(unittest.TestCase):
"""
_RepackTest_
Test for Repack job splitter
"""
def setUp(self):
"""
_setUp_
"""
import WMQuality.TestInit
WMQuality.TestInit.deleteDatabaseAfterEveryTest("I'm Serious")
self.testInit = TestInit(__file__)
self.testInit.setLogging()
self.testInit.setDatabaseConnection()
self.testInit.setSchema(customModules = ["WMComponent.DBS3Buffer", "T0.WMBS"])
self.splitterFactory = SplitterFactory(package = "T0.JobSplitting")
myThread = threading.currentThread()
daoFactory = DAOFactory(package = "T0.WMBS",
logger = logging,
dbinterface = myThread.dbi)
myThread.dbi.processData("""INSERT INTO wmbs_location
(id, site_name, state, state_time)
VALUES (1, 'SomeSite', 1, 1)
""", transaction = False)
myThread.dbi.processData("""INSERT INTO wmbs_pnns
(id, pnn)
VALUES (2, 'SomePNN')
""", transaction = False)
myThread.dbi.processData("""INSERT INTO wmbs_location_pnns
(location, pnn)
VALUES (1, 2)
""", transaction = False)
insertRunDAO = daoFactory(classname = "RunConfig.InsertRun")
insertRunDAO.execute(binds = { 'RUN' : 1,
'HLTKEY' : "someHLTKey" },
transaction = False)
insertLumiDAO = daoFactory(classname = "RunConfig.InsertLumiSection")
for lumi in [1, 2, 3, 4]:
insertLumiDAO.execute(binds = { 'RUN' : 1,
'LUMI' : lumi },
transaction = False)
insertStreamDAO = daoFactory(classname = "RunConfig.InsertStream")
insertStreamDAO.execute(binds = { 'STREAM' : "A" },
transaction = False)
insertStreamFilesetDAO = daoFactory(classname = "RunConfig.InsertStreamFileset")
insertStreamFilesetDAO.execute(1, "A", "TestFileset1")
self.fileset1 = Fileset(name = "TestFileset1")
self.fileset1.load()
workflow1 = Workflow(spec = "spec.xml", owner = "hufnagel", name = "TestWorkflow1", task="Test")
workflow1.create()
self.subscription1 = Subscription(fileset = self.fileset1,
workflow = workflow1,
split_algo = "Repack",
type = "Repack")
self.subscription1.create()
# keep for later
self.insertClosedLumiDAO = daoFactory(classname = "RunLumiCloseout.InsertClosedLumi")
self.currentTime = int(time.time())
# default split parameters
self.splitArgs = {}
self.splitArgs['maxSizeSingleLumi'] = 20*1024*1024*1024
self.splitArgs['maxSizeMultiLumi'] = 10*1024*1024*1024
self.splitArgs['maxInputEvents'] = 500000
self.splitArgs['maxInputFiles'] = 1000
self.splitArgs['maxLatency'] = 50000
return
def tearDown(self):
"""
_tearDown_
"""
self.testInit.clearDatabase()
return
def getNumActiveSplitLumis(self):
"""
_getNumActiveSplitLumis_
helper function that counts the number of active split lumis
"""
myThread = threading.currentThread()
results = myThread.dbi.processData("""SELECT COUNT(*)
FROM lumi_section_split_active
""", transaction = False)[0].fetchall()
return results[0][0]
def test00(self):
"""
_test00_
Test that the job name prefix feature works
Test multi lumi size threshold
Multi lumi input
"""
mySplitArgs = self.splitArgs.copy()
for lumi in [1, 2, 3, 4]:
filecount = 2
for i in range(filecount):
newFile = File(makeUUID(), size = 1000, events = 100)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
mySplitArgs['maxSizeMultiLumi'] = self.splitArgs['maxSizeMultiLumi']
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 0,
"ERROR: JobFactory should have returned no JobGroup")
mySplitArgs['maxSizeMultiLumi'] = 5000
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create a single job")
job = jobGroups[0].jobs[0]
self.assertTrue(job['name'].startswith("Repack-"),
"ERROR: Job has wrong name")
self.assertEqual(len(job.getFiles()), 4,
"ERROR: Job does not process 4 files")
self.fileset1.markOpen(False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create a single job")
job = jobGroups[0].jobs[0]
self.assertTrue(job['name'].startswith("Repack-"),
"ERROR: Job has wrong name")
self.assertEqual(len(job.getFiles()), 4,
"ERROR: Job does not process 4 files")
self.assertEqual(self.getNumActiveSplitLumis(), 0,
"ERROR: Split lumis were created")
return
def test01(self):
"""
_test01_
Test multi lumi event threshold
Multi lumi input
"""
mySplitArgs = self.splitArgs.copy()
insertClosedLumiBinds = []
for lumi in [1, 2, 3, 4]:
filecount = 2
for i in range(filecount):
newFile = File(makeUUID(), size = 1000, events = 100)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
insertClosedLumiBinds.append( { 'RUN' : 1,
'LUMI' : lumi,
'STREAM' : "A",
'FILECOUNT' : filecount,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime } )
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
self.insertClosedLumiDAO.execute(binds = insertClosedLumiBinds,
transaction = False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 0,
"ERROR: JobFactory should have returned no JobGroup")
mySplitArgs['maxInputEvents'] = 500
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create a single job")
job = jobGroups[0].jobs[0]
self.assertEqual(len(job.getFiles()), 4,
"ERROR: Job does not process 4 files")
self.fileset1.markOpen(False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create a single job")
job = jobGroups[0].jobs[0]
self.assertEqual(len(job.getFiles()), 4,
"ERROR: Job does not process 4 files")
self.assertEqual(self.getNumActiveSplitLumis(), 0,
"ERROR: Split lumis were created")
return
def test02(self):
"""
_test02_
Test single lumi size threshold
Single lumi input
"""
mySplitArgs = self.splitArgs.copy()
insertClosedLumiBinds = []
for lumi in [1]:
filecount = 8
for i in range(filecount):
newFile = File(makeUUID(), size = 1000, events = 100)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
insertClosedLumiBinds.append( { 'RUN' : 1,
'LUMI' : lumi,
'STREAM' : "A",
'FILECOUNT' : filecount,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime } )
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
self.insertClosedLumiDAO.execute(binds = insertClosedLumiBinds,
transaction = False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 0,
"ERROR: JobFactory should have returned no JobGroup")
mySplitArgs['maxSizeSingleLumi'] = 6500
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 2,
"ERROR: JobFactory didn't create two jobs")
job = jobGroups[0].jobs[0]
self.assertEqual(len(job.getFiles()), 6,
"ERROR: Job does not process 6 files")
job = jobGroups[0].jobs[1]
self.assertEqual(len(job.getFiles()), 2,
"ERROR: Job does not process 2 files")
self.assertEqual(self.getNumActiveSplitLumis(), 1,
"ERROR: Split lumis were not created")
return
def test03(self):
"""
_test03_
Test single lumi event threshold
Single lumi input
"""
mySplitArgs = self.splitArgs.copy()
insertClosedLumiBinds = []
for lumi in [1]:
filecount = 8
for i in range(filecount):
newFile = File(makeUUID(), size = 1000, events = 100)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
insertClosedLumiBinds.append( { 'RUN' : 1,
'LUMI' : lumi,
'STREAM' : "A",
'FILECOUNT' : filecount,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime } )
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
self.insertClosedLumiDAO.execute(binds = insertClosedLumiBinds,
transaction = False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 0,
"ERROR: JobFactory should have returned no JobGroup")
mySplitArgs['maxInputEvents'] = 650
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 2,
"ERROR: JobFactory didn't create two jobs")
job = jobGroups[0].jobs[0]
self.assertEqual(len(job.getFiles()), 6,
"ERROR: Job does not process 6 files")
job = jobGroups[0].jobs[1]
self.assertEqual(len(job.getFiles()), 2,
"ERROR: Job does not process 2 files")
self.assertEqual(self.getNumActiveSplitLumis(), 1,
"ERROR: Split lumis were not created")
return
def test04(self):
"""
_test04_
Test streamer count threshold (only multi lumi)
Multi lumi input
"""
mySplitArgs = self.splitArgs.copy()
insertClosedLumiBinds = []
for lumi in [1, 2, 3, 4]:
filecount = 2
for i in range(filecount):
newFile = File(makeUUID(), size = 1000, events = 100)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
insertClosedLumiBinds.append( { 'RUN' : 1,
'LUMI' : lumi,
'STREAM' : "A",
'FILECOUNT' : filecount,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime } )
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
self.insertClosedLumiDAO.execute(binds = insertClosedLumiBinds,
transaction = False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 0,
"ERROR: JobFactory should have returned no JobGroup")
mySplitArgs['maxInputFiles'] = 5
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create a single job")
job = jobGroups[0].jobs[0]
self.assertEqual(len(job.getFiles()), 4,
"ERROR: Job does not process 4 files")
self.fileset1.markOpen(False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create a single job")
job = jobGroups[0].jobs[0]
self.assertEqual(len(job.getFiles()), 4,
"ERROR: Job does not process 4 files")
self.assertEqual(self.getNumActiveSplitLumis(), 0,
"ERROR: Split lumis were created")
return
def test05(self):
"""
_test05_
Test repacking of multiple lumis with holes in the lumi sequence
Multi lumi input
"""
mySplitArgs = self.splitArgs.copy()
insertClosedLumiBinds = []
for lumi in [1, 2, 4]:
filecount = 2
for i in range(filecount):
newFile = File(makeUUID(), size = 1000, events = 100)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
insertClosedLumiBinds.append( { 'RUN' : 1,
'LUMI' : lumi,
'STREAM' : "A",
'FILECOUNT' : filecount,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime } )
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
self.insertClosedLumiDAO.execute(binds = insertClosedLumiBinds,
transaction = False)
mySplitArgs['maxInputFiles'] = 5
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 0,
"ERROR: JobFactory should have returned no JobGroup")
self.insertClosedLumiDAO.execute(binds = { 'RUN' : 1,
'LUMI' : 3,
'STREAM' : "A",
'FILECOUNT' : 0,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime },
transaction = False)
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 1,
"ERROR: JobFactory didn't create one job")
self.assertEqual(len(jobGroups[0].jobs[0].getFiles()), 4,
"ERROR: first job does not process 4 files")
return
def test06(self):
"""
_test06_
Test repacking of 3 lumis
2 small lumis (single job), followed by a big one (multiple jobs)
files for lumi 1 and 2 are below multi-lumi thresholds
files for lumi 3 are above single-lumi threshold
"""
mySplitArgs = self.splitArgs.copy()
insertClosedLumiBinds = []
for lumi in [1, 2, 3]:
filecount = 2
for i in range(filecount):
if lumi == 3:
nevents = 500
else:
nevents = 100
newFile = File(makeUUID(), size = 1000, events = nevents)
newFile.addRun(Run(1, *[lumi]))
newFile.setLocation("SomePNN", immediateSave = False)
newFile.create()
self.fileset1.addFile(newFile)
insertClosedLumiBinds.append( { 'RUN' : 1,
'LUMI' : lumi,
'STREAM' : "A",
'FILECOUNT' : filecount,
'INSERT_TIME' : self.currentTime,
'CLOSE_TIME' : self.currentTime } )
self.fileset1.commit()
jobFactory = self.splitterFactory(package = "WMCore.WMBS",
subscription = self.subscription1)
self.insertClosedLumiDAO.execute(binds = insertClosedLumiBinds,
transaction = False)
mySplitArgs['maxInputEvents'] = 900
jobGroups = jobFactory(**mySplitArgs)
self.assertEqual(len(jobGroups), 1,
"ERROR: JobFactory didn't return one JobGroup")
self.assertEqual(len(jobGroups[0].jobs), 3,
"ERROR: JobFactory didn't create three jobs")
self.assertEqual(len(jobGroups[0].jobs[0].getFiles()), 4,
"ERROR: first job does not process 4 files")
self.assertEqual(len(jobGroups[0].jobs[1].getFiles()), 1,
"ERROR: second job does not process 1 file")
self.assertEqual(len(jobGroups[0].jobs[2].getFiles()), 1,
"ERROR: third job does not process 1 file")
return
if __name__ == '__main__':
unittest.main()
| 36.576068
| 104
| 0.504463
| 1,799
| 21,397
| 5.966092
| 0.13174
| 0.06289
| 0.067083
| 0.075468
| 0.721513
| 0.710705
| 0.703531
| 0.689928
| 0.668685
| 0.66766
| 0
| 0.026782
| 0.401458
| 21,397
| 584
| 105
| 36.638699
| 0.811275
| 0.002804
| 0
| 0.730667
| 0
| 0
| 0.17529
| 0.007818
| 0
| 0
| 0
| 0
| 0.125333
| 0
| null | null | 0
| 0.037333
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
815b84a65cbf2c234c892029d31bdf6d8e42afa3
| 99
|
py
|
Python
|
toad/nn/trainer/__init__.py
|
qianweishuo/toad
|
b207145b0b15bc2c7e0d8d480845ff30fb1f8839
|
[
"MIT"
] | null | null | null |
toad/nn/trainer/__init__.py
|
qianweishuo/toad
|
b207145b0b15bc2c7e0d8d480845ff30fb1f8839
|
[
"MIT"
] | null | null | null |
toad/nn/trainer/__init__.py
|
qianweishuo/toad
|
b207145b0b15bc2c7e0d8d480845ff30fb1f8839
|
[
"MIT"
] | null | null | null |
from .history import History
from .earlystopping import EarlyStopping
from .trainer import Trainer
| 24.75
| 40
| 0.848485
| 12
| 99
| 7
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 99
| 3
| 41
| 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
|
816549fd675744ca961250146041a50ab639f87f
| 115
|
py
|
Python
|
pythonBackend/camera.py
|
sosaysthecaptain/profilometerMain
|
cb2d0cedcc4e467e53772fec7cdc07a9c040d15c
|
[
"CC0-1.0"
] | null | null | null |
pythonBackend/camera.py
|
sosaysthecaptain/profilometerMain
|
cb2d0cedcc4e467e53772fec7cdc07a9c040d15c
|
[
"CC0-1.0"
] | null | null | null |
pythonBackend/camera.py
|
sosaysthecaptain/profilometerMain
|
cb2d0cedcc4e467e53772fec7cdc07a9c040d15c
|
[
"CC0-1.0"
] | null | null | null |
def testFunction(data):
print('hi, I\'m a function in the camera module. Here\'s the data you passed: ' + data)
| 57.5
| 91
| 0.686957
| 20
| 115
| 3.95
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182609
| 115
| 2
| 91
| 57.5
| 0.840426
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
|
0
| 5
|
8169279aadf17affec67ff266cd9055d38ba8bc9
| 27
|
py
|
Python
|
scripts/test_python_hook.py
|
NathanKewley/lolite
|
f3d6cd07e9893bbb6b923d49ecb8681cd218eace
|
[
"Apache-2.0"
] | 5
|
2021-05-04T06:07:43.000Z
|
2021-12-11T15:08:01.000Z
|
scripts/test_python_hook.py
|
NathanKewley/lolite
|
f3d6cd07e9893bbb6b923d49ecb8681cd218eace
|
[
"Apache-2.0"
] | 4
|
2021-05-01T07:20:21.000Z
|
2021-05-29T04:51:56.000Z
|
scripts/test_python_hook.py
|
NathanKewley/lolite
|
f3d6cd07e9893bbb6b923d49ecb8681cd218eace
|
[
"Apache-2.0"
] | null | null | null |
import sys
sys.exit(0)
| 6.75
| 12
| 0.62963
| 5
| 27
| 3.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0.259259
| 27
| 3
| 13
| 9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
816abdf24bdccfac3ef35013b6086ade0cde207a
| 40
|
py
|
Python
|
workflow/pnmlpy/__init__.py
|
SODALITE-EU/verification
|
584e3c61bc20e65944e34b875eb5ed0ec02d6fa9
|
[
"Apache-2.0"
] | null | null | null |
workflow/pnmlpy/__init__.py
|
SODALITE-EU/verification
|
584e3c61bc20e65944e34b875eb5ed0ec02d6fa9
|
[
"Apache-2.0"
] | 2
|
2020-03-30T12:02:32.000Z
|
2021-04-20T19:09:25.000Z
|
workflow/pnmlpy/__init__.py
|
SODALITE-EU/verification
|
584e3c61bc20e65944e34b875eb5ed0ec02d6fa9
|
[
"Apache-2.0"
] | null | null | null |
import os
os.environ['PYTHONPATH'] = '.'
| 20
| 30
| 0.675
| 5
| 40
| 5.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 2
| 30
| 20
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.268293
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
81ab70f055f3b0bcda3ec7991e3f017cca66b731
| 4,114
|
py
|
Python
|
tests/test_xray/test_xray_client.py
|
gtourkas/moto
|
307104417b579d23d02f670ff55217a2d4a16bee
|
[
"Apache-2.0"
] | 5,460
|
2015-01-01T01:11:17.000Z
|
2022-03-31T23:45:38.000Z
|
tests/test_xray/test_xray_client.py
|
gtourkas/moto
|
307104417b579d23d02f670ff55217a2d4a16bee
|
[
"Apache-2.0"
] | 4,475
|
2015-01-05T19:37:30.000Z
|
2022-03-31T13:55:12.000Z
|
tests/test_xray/test_xray_client.py
|
gtourkas/moto
|
307104417b579d23d02f670ff55217a2d4a16bee
|
[
"Apache-2.0"
] | 1,831
|
2015-01-14T00:00:44.000Z
|
2022-03-31T20:30:04.000Z
|
from moto import mock_xray_client, XRaySegment, mock_dynamodb2
import sure # noqa # pylint: disable=unused-import
import boto3
from moto.xray.mock_client import MockEmitter
import aws_xray_sdk.core as xray_core
import aws_xray_sdk.core.patcher as xray_core_patcher
import botocore.client
import botocore.endpoint
original_make_api_call = botocore.client.BaseClient._make_api_call
original_encode_headers = botocore.endpoint.Endpoint._encode_headers
import requests
original_session_request = requests.Session.request
original_session_prep_request = requests.Session.prepare_request
@mock_xray_client
@mock_dynamodb2
def test_xray_dynamo_request_id():
# Could be ran in any order, so we need to tell sdk that its been unpatched
xray_core_patcher._PATCHED_MODULES = set()
xray_core.patch_all()
client = boto3.client("dynamodb", region_name="us-east-1")
with XRaySegment():
resp = client.list_tables()
resp["ResponseMetadata"].should.contain("RequestId")
id1 = resp["ResponseMetadata"]["RequestId"]
with XRaySegment():
client.list_tables()
resp = client.list_tables()
id2 = resp["ResponseMetadata"]["RequestId"]
id1.should_not.equal(id2)
setattr(botocore.client.BaseClient, "_make_api_call", original_make_api_call)
setattr(botocore.endpoint.Endpoint, "_encode_headers", original_encode_headers)
setattr(requests.Session, "request", original_session_request)
setattr(requests.Session, "prepare_request", original_session_prep_request)
def test_xray_dynamo_request_id_with_context_mgr():
with mock_xray_client():
assert isinstance(xray_core.xray_recorder._emitter, MockEmitter)
with mock_dynamodb2():
# Could be ran in any order, so we need to tell sdk that its been unpatched
xray_core_patcher._PATCHED_MODULES = set()
xray_core.patch_all()
client = boto3.client("dynamodb", region_name="us-east-1")
with XRaySegment():
resp = client.list_tables()
resp["ResponseMetadata"].should.contain("RequestId")
id1 = resp["ResponseMetadata"]["RequestId"]
with XRaySegment():
client.list_tables()
resp = client.list_tables()
id2 = resp["ResponseMetadata"]["RequestId"]
id1.should_not.equal(id2)
setattr(
botocore.client.BaseClient, "_make_api_call", original_make_api_call
)
setattr(
botocore.endpoint.Endpoint, "_encode_headers", original_encode_headers
)
setattr(requests.Session, "request", original_session_request)
setattr(requests.Session, "prepare_request", original_session_prep_request)
# Verify we have unmocked the xray recorder
assert not isinstance(xray_core.xray_recorder._emitter, MockEmitter)
@mock_xray_client
def test_xray_udp_emitter_patched():
# Could be ran in any order, so we need to tell sdk that its been unpatched
xray_core_patcher._PATCHED_MODULES = set()
xray_core.patch_all()
assert isinstance(xray_core.xray_recorder._emitter, MockEmitter)
setattr(botocore.client.BaseClient, "_make_api_call", original_make_api_call)
setattr(botocore.endpoint.Endpoint, "_encode_headers", original_encode_headers)
setattr(requests.Session, "request", original_session_request)
setattr(requests.Session, "prepare_request", original_session_prep_request)
@mock_xray_client
def test_xray_context_patched():
# Could be ran in any order, so we need to tell sdk that its been unpatched
xray_core_patcher._PATCHED_MODULES = set()
xray_core.patch_all()
xray_core.xray_recorder._context.context_missing.should.equal("LOG_ERROR")
setattr(botocore.client.BaseClient, "_make_api_call", original_make_api_call)
setattr(botocore.endpoint.Endpoint, "_encode_headers", original_encode_headers)
setattr(requests.Session, "request", original_session_request)
setattr(requests.Session, "prepare_request", original_session_prep_request)
| 37.743119
| 87
| 0.729703
| 502
| 4,114
| 5.64741
| 0.181275
| 0.039506
| 0.038801
| 0.03351
| 0.819753
| 0.775661
| 0.739683
| 0.707584
| 0.669489
| 0.669489
| 0
| 0.004769
| 0.184492
| 4,114
| 108
| 88
| 38.092593
| 0.840238
| 0.090666
| 0
| 0.653333
| 0
| 0
| 0.106349
| 0
| 0
| 0
| 0
| 0
| 0.04
| 1
| 0.053333
| false
| 0
| 0.12
| 0
| 0.173333
| 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
|
81b63e241284a2b7209261db6525878fad3a21ed
| 26,129
|
py
|
Python
|
api/tests/app/test_camera.py
|
myunyui22/smart-social-distancing-dev
|
2b71c4330420758a3ff6833923cf2ef81cdebdb1
|
[
"Apache-2.0"
] | null | null | null |
api/tests/app/test_camera.py
|
myunyui22/smart-social-distancing-dev
|
2b71c4330420758a3ff6833923cf2ef81cdebdb1
|
[
"Apache-2.0"
] | 1
|
2021-08-25T16:13:56.000Z
|
2021-08-25T16:15:19.000Z
|
api/tests/app/test_camera.py
|
myunyui22/smart-social-distancing-dev
|
2b71c4330420758a3ff6833923cf2ef81cdebdb1
|
[
"Apache-2.0"
] | null | null | null |
import pytest
import os
import base64
import copy
import numpy
import shutil
from api.tests.utils.common_functions import get_section_from_config_file, get_config_file_json
# The line below is absolutely necessary. Fixtures are passed as arguments to test functions. That is why IDE could
# not recognized them.
from api.tests.utils.fixtures_tests import config_rollback, camera_sample, rollback_screenshot_camera_folder, h_inverse_matrix, pts_destination, rollback_homography_matrix_folder
# TODO: Test stuffs related with the parameter reboot_processor.
def create_a_camera(client, camera):
return client.post("/cameras", json=camera)
def create_n_cameras(client, camera_base, number_of_cameras, enable=False):
list_of_created_cameras = []
for i in range(number_of_cameras):
camera = copy.deepcopy(camera_base)
del camera['id']
camera["live_feed_enabled"] = enable
created = client.post("/cameras", json=camera)
list_of_created_cameras.append(created)
return list_of_created_cameras
def get_all_cameras(config_sample_path, with_image=False):
config_file_json = get_config_file_json(config_sample_path, decamelize=True)
list_of_cameras = {
"cameras": [config_file_json[camera] for camera in config_file_json if camera.startswith("source__")]}
for camera in list_of_cameras["cameras"]:
camera.update({"id": str(camera["id"])})
if with_image:
from api.routers.cameras import get_camera_default_image_string
image_string = get_camera_default_image_string(camera["id"])
camera["image"] = image_string.decode("utf-8")
else:
camera["image"] = None
return list_of_cameras
def get_camera_from_config_file(camera_id, config_sample_path):
list_of_cameras = get_all_cameras(config_sample_path)["cameras"]
for camera in list_of_cameras:
if camera["id"] == camera_id:
return camera
return None
# pytest -v api/tests/app/test_camera.py::TestsListCameras
class TestsListCameras:
"""List Cameras, GET /cameras"""
def test_get_all_cameras_no_image(self, config_rollback):
client, config_sample_path = config_rollback
list_of_cameras = get_all_cameras(config_sample_path)
response = client.get("/cameras")
assert response.status_code == 200
assert response.json() == list_of_cameras
def test_get_all_cameras_with_image(self, config_rollback):
client, config_sample_path = config_rollback
list_of_cameras = get_all_cameras(config_sample_path, with_image=True)
response = client.get("/cameras?options=withImage")
assert response.status_code == 200
assert response.json() == list_of_cameras
# pytest -v api/tests/app/test_camera.py::TestsCreateCamera
class TestsCreateCamera:
"""Create Camera, POST /cameras"""
def test_create_one_camera_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
response = client.post("/cameras", json=camera_sample)
assert response.status_code == 201
for key in camera_sample:
if key is not "image":
assert response.json()[key] == camera_sample[key]
def test_try_create_camera_twice(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
response_1 = client.post("/cameras", json=camera_sample)
response_2 = client.post("/cameras", json=camera_sample)
assert response_1.status_code == 201
assert response_2.status_code == 400
assert response_2.json() == {'detail': [{'loc': [], 'msg': 'Camera already exists', 'type': 'config '
'duplicated '
'camera'}]}
def test_create_same_camera_twice_different_ids(self, config_rollback, camera_sample,
rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
body = camera_sample
response_1 = client.post("/cameras", json=body)
body["id"] = 54
response_2 = client.post("/cameras", json=body)
assert response_1.status_code == 201
assert response_2.status_code == 201
def test_try_create_camera_empty_body(self, config_rollback):
client, config_sample_path = config_rollback
body = {}
response = client.post("/cameras", json=body)
assert response.status_code == 400
def test_create_a_camera_function(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
response = create_a_camera(client, camera_sample)
assert response.status_code == 201
# pytest -v api/tests/app/test_camera.py::TestsGetCamera
class TestsGetCamera:
""" Get Camera, GET /cameras/{camera_id} """
def test_get_one_camera_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = int(camera_sample["id"])
response = client.get(f"/cameras/{camera_id}")
assert response.status_code == 200
for key in camera_sample:
if key is not "image":
assert response.json()[key] == camera_sample[key]
def test_try_get_camera_non_existent_id(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
response = client.get(f"/cameras/{camera_id}")
assert response.status_code == 404
# pytest -v api/tests/app/test_camera.py::TestsEditCamera
class TestsEditCamera:
""" Edit Camera, PUT /cameras/{camera_id} """
def test_edit_a_camera_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
body = {
"violation_threshold": 22,
"notify_every_minutes": 22,
"emails": "new_john@email.com,new_doe@email.com",
"enable_slack_notifications": True,
"daily_report": False,
"daily_report_time": "11:22",
"id": camera_id,
"name": "new_Kitchen",
"video_path": "/repo/data/softbio_vid.mp4",
"tags": "new_kitchen,new_living_room",
"image": "new_Base64 image",
"dist_method": "new_CenterPointsDistance",
"live_feed_enabled": False
}
response = client.put(f"cameras/{camera_id}", json=body)
assert response.status_code == 200
for key in body:
if key != "image":
assert response.json()[key] == body[key]
def test_try_edit_a_camera_non_existent_id(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = "Non-existent ID"
body = {
"violation_threshold": 22,
"notify_every_minutes": 22,
"emails": "new_john@email.com,new_doe@email.com",
"enable_slack_notifications": True,
"daily_report": False,
"daily_report_time": "11:22",
"id": camera_id,
"name": "new_Kitchen",
"video_path": "/repo/data/softbio_vid.mp4",
"tags": "new_kitchen,new_living_room",
"image": "new_Base64 image",
"dist_method": "new_CenterPointsDistance",
"live_feed_enabled": False
}
response = client.put(f"cameras/{camera_id}", json=body)
assert response.status_code == 404
assert response.json() == {"detail": f"The camera: {camera_id} does not exist"}
def test_try_edit_camera_wrong_video_path(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
body = {
"violation_threshold": 22,
"notify_every_minutes": 22,
"emails": "new_john@email.com,new_doe@email.com",
"enable_slack_notifications": True,
"daily_report": False,
"daily_report_time": "11:22",
"id": camera_id,
"name": "new_Kitchen",
"video_path": "WRONG_PATH",
"tags": "new_kitchen,new_living_room",
"image": "new_Base64 image",
"dist_method": "new_CenterPointsDistance",
"live_feed_enabled": False
}
response = client.put(f"cameras/{camera_id}", json=body)
assert response.status_code == 400
assert response.json()["detail"][0]["msg"] == "Failed to load video. The video URI is not valid"
def test_edit_same_camera_twice(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
body_1 = {
"violation_threshold": 22,
"notify_every_minutes": 22,
"emails": "new_john@email.com,new_doe@email.com",
"enable_slack_notifications": True,
"daily_report": False,
"daily_report_time": "11:22",
"id": camera_id,
"name": "new_Kitchen",
"video_path": "/repo/data/softbio_vid.mp4",
"tags": "new_kitchen,new_living_room",
"image": "new_Base64 image",
"dist_method": "new_CenterPointsDistance",
"live_feed_enabled": False
}
body_2 = {
"violation_threshold": 33,
"notify_every_minutes": 33,
"emails": "new_new_john@email.com,new_new_doe@email.com",
"enable_slack_notifications": False,
"daily_report": False,
"daily_report_time": "10:33",
"id": camera_id,
"name": "new_new_Kitchen",
"video_path": "/repo/data/softbio_vid.mp4",
"tags": "new_new_kitchen,new_new_living_room",
"image": "new_new_Base64 image",
"dist_method": "new_new_CenterPointsDistance",
"live_feed_enabled": False
}
client.put(f"cameras/{camera_id}", json=body_1)
response = client.put(f"cameras/{camera_id}", json=body_2)
assert response.status_code == 200
for key in body_2:
if key != "image":
assert response.json()[key] == body_2[key]
def test_try_edit_camera_empty_json(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
body = {
}
response = client.put(f"cameras/{camera_id}", json=body)
"""
Fields required: Name, video_path. Id is not required anymore.
"""
assert response.status_code == 400
assert response.json() == {"detail": [{"loc": ["body", "name"], "msg": "field required",
"type": "value_error.missing"}, {"loc": ["body", "video_path"],
"msg": "field required",
"type": "value_error.missing"}],
"body": {}}
def test_edit_camera_empty_string_fields(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
# Video path is correctly setted
body = {
"violation_threshold": 33,
"notify_every_minutes": 33,
"emails": "",
"enable_slack_notifications": False,
"daily_report": False,
"daily_report_time": "",
"id": camera_id,
"name": "",
"video_path": "/repo/data/softbio_vid.mp4",
"tags": "",
"image": "",
"dist_method": "",
"live_feed_enabled": False
}
response = client.put(f"/cameras/{camera_id}", json=body)
assert response.status_code == 200
for key in camera_sample:
if key is not "image":
assert response.json()[key] == body[key]
# pytest -v api/tests/app/test_camera.py::TestsDeleteCamera
class TestsDeleteCamera:
""" Delete Camera, DELETE /cameras/{camera_id} """
def test_delete_a_camera_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
response = client.delete(f"/cameras/{camera_id}")
assert response.status_code == 204
def test_try_delete_a_camera_twice(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
response_1 = client.delete(f"/cameras/{camera_id}")
response_2 = client.delete(f"/cameras/{camera_id}")
assert response_1.status_code == 204
assert response_2.status_code == 404
def test_try_delete_a_camera_non_existent_id(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
response = client.delete(f"/cameras/{camera_id}")
assert response.status_code == 404
def test_try_delete_a_camera_id_none(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = None
response = client.delete(f"/cameras/{camera_id}")
assert response.status_code == 404
def test_delete_a_camera_int_id(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = int(camera_sample["id"])
response = client.delete(f"/cameras/{camera_id}")
assert response.status_code == 204
def get_string_bytes_from_image(camera_id):
camera_screenshot_directory = os.path.join(os.environ.get("ScreenshotsDirectory"), str(camera_id))
image_name = os.listdir(camera_screenshot_directory)[0]
camera_screenshot_file = os.path.join(camera_screenshot_directory, image_name)
with open(camera_screenshot_file, "rb") as file:
return base64.b64encode(file.read()).decode("utf-8")
# pytest -v api/tests/app/test_camera.py::TestsGetCameraImage
class TestsGetCameraImage:
""" Get Camera Image, GET /cameras/{camera_id}/image """
def test_get_camera_image_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
response = client.get(f"/cameras/{camera_id}/image")
assert response.status_code == 200
assert response.json()["image"] == get_string_bytes_from_image(camera_id)
def test_try_get_camera_image_non_existent_id(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
response = client.get(f"/cameras/{camera_id}/image")
assert response.status_code == 404
assert response.json() == {"detail": f"The camera: {camera_id} does not exist"}
def get_h_inverse(camera_id):
path = f"/repo/data/processor/static/data/sources/{camera_id}/homography_matrix/h_inverse.txt"
with open(path, "r") as file:
h_inverse = file.read()
return h_inverse
# pytest -v api/tests/app/test_camera.py::TestsConfigCalibratedDistance
class TestsConfigCalibratedDistance:
""" Config Calibrated Distance, POST /cameras/{camera_id}/homography_matrix """
# pytest -v api/tests/app/test_camera.py::TestsConfigCalibratedDistance::test_set_coordinates_properly
def test_set_coordinates_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder, h_inverse_matrix, pts_destination, rollback_homography_matrix_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
body = pts_destination
camera_id = camera_sample["id"]
response = client.post(f"/cameras/{camera_id}/homography_matrix", json=body)
assert response.status_code == 204
assert get_h_inverse(camera_id) == h_inverse_matrix["h_inverse.txt"]
# pytest -v api/tests/app/test_camera.py::TestsConfigCalibratedDistance::test_try_set_coordinates_0_arrays
def test_try_set_coordinates_0_arrays(self, config_rollback, camera_sample, rollback_screenshot_camera_folder, rollback_homography_matrix_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
body = {
"pts_destination": [
[
0,
0
],
[
0,
0
],
[
0,
0
],
[
0,
0
]
]
}
camera_id = camera_sample["id"]
with pytest.raises(numpy.linalg.LinAlgError):
client.post(f"/cameras/{camera_id}/homography_matrix", json=body)
def test_try_set_coordinates_non_existent_id(self, config_rollback, pts_destination):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
body = pts_destination
response = client.post(f"/cameras/{camera_id}/homography_matrix", json=body)
assert response.status_code == 404
assert response.json() == {"detail": f"The camera: {camera_id} does not exist"}
def test_try_set_coordinates_empty_request_body(self, config_rollback, camera_sample,
rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
body = {}
response = client.post(f"/cameras/{camera_id}/homography_matrix", json=body)
assert response.status_code == 400
assert response.json() == {"detail": [{"loc": ["body", "pts_destination"], "msg": "field required",
"type": "value_error.missing"}], "body": {}}
def test_try_set_coordinates_bad_request_body(self, config_rollback, camera_sample,
rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
body = {"pts_destination": [None]}
response = client.post(f"/cameras/{camera_id}/homography_matrix", json=body)
assert response.status_code == 400
assert response.json() == {"detail": [{"loc": ["body", "pts_destination"], "msg": "ensure this value has at "
"least 4 items",
"type": "value_error.list.min_items", "ctx": {"limit_value": 4}}],
"body": {"pts_destination": [None]}}
# pytest -v api/tests/app/test_camera.py::TestsGetCameraCalibrationImage
class TestsGetCameraCalibrationImage:
""" Get Camera Calibration Image, GET /cameras/{camera_id}/calibration_image """
def test_get_camera_calibration_image_properly(self, config_rollback, camera_sample,
rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
response = client.get(f"/cameras/{camera_id}/calibration_image")
assert response.status_code == 200
def test_try_get_camera_image_non_existent_id(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
response = client.get(f"/cameras/{camera_id}/calibration_image")
assert response.status_code == 404
assert response.json() == {"detail": f"The camera: {camera_id} does not exist"}
# pytest -v api/tests/app/test_camera.py::TestsGetVideoLiveFeedEnabled
class TestsGetVideoLiveFeedEnabled:
""" Get Camera Calibration Image, GET /cameras/{camera_id}/video_live_feed_enabled """
def test_get_camera_calibration_image_properly(self, config_rollback, camera_sample,
rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
response = client.get(f"/cameras/{camera_id}/video_live_feed_enabled")
expected_response = {
"enabled": camera_sample["live_feed_enabled"]
}
assert response.status_code == 200
assert response.json() == expected_response
def test_try_get_camera_image_non_existent_id(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
response = client.get(f"/cameras/{camera_id}/video_live_feed_enabled")
assert response.status_code == 404
assert response.json() == {"detail": f"The camera: {camera_id} does not exist"}
# pytest -v api/tests/app/test_camera.py::TestsEnableVideoLiveFeed
def rollback_screenshot_cameras_list(cameras_list):
for camera in cameras_list:
# Deletes the camera screenshots directory and all its content.
camera_screenshot_directory = os.path.join(os.environ.get("ScreenshotsDirectory"), str(camera.json()["id"]))
if os.path.exists(camera_screenshot_directory):
shutil.rmtree(camera_screenshot_directory)
class TestsEnableVideoLiveFeed:
""" Enable Video Live Feed, PUT /cameras/{camera_id}/enable_video_live_feed """
def test_enable_video_live_feed_properly(self, config_rollback, camera_sample, rollback_screenshot_camera_folder):
client, config_sample_path = config_rollback
camera_sample["live_feed_enabled"] = False
create_a_camera(client, camera_sample)
camera_id = camera_sample["id"]
response = client.put(f"/cameras/{camera_id}/enable_video_live_feed")
camera_from_config_file = get_camera_from_config_file(camera_id, config_sample_path)
assert response.status_code == 204
assert camera_from_config_file["live_feed_enabled"] is True
def test_try_enable_video_live_feed_non_existent_id(self, config_rollback):
client, config_sample_path = config_rollback
camera_id = "Non-existent ID"
response = client.put(f"/cameras/{camera_id}/enable_video_live_feed")
assert response.status_code == 404
assert response.json() == {"detail": f"The camera: {camera_id} does not exist"}
def test_enable_one_video_live_feed_disable_the_rest(self, config_rollback, camera_sample):
client, config_sample_path = config_rollback
cameras_list = create_n_cameras(client, camera_sample, 3)
camera_1 = cameras_list[0].json()
camera_2 = cameras_list[1].json()
camera_3 = cameras_list[2].json()
camera_id = camera_1['id']
response = client.put(f"/cameras/{camera_id}/enable_video_live_feed?disable_other_cameras=true")
camera_from_config_file_0 = get_camera_from_config_file(camera_id, config_sample_path)
camera_from_config_file_2 = get_camera_from_config_file(camera_2["id"], config_sample_path)
camera_from_config_file_1 = get_camera_from_config_file(camera_3["id"], config_sample_path)
assert response.status_code == 204
assert camera_from_config_file_0["live_feed_enabled"] is True
assert camera_from_config_file_1["live_feed_enabled"] is False
assert camera_from_config_file_2["live_feed_enabled"] is False
rollback_screenshot_cameras_list(cameras_list)
def test_enable_video_feed_disable_other_cameras_false(self, config_rollback, camera_sample):
client, config_sample_path = config_rollback
cameras_list = create_n_cameras(client, camera_sample, 3, enable=True)
camera_1 = cameras_list[0].json()
camera_2 = cameras_list[1].json()
camera_3 = cameras_list[2].json()
camera_id = camera_1['id']
response = client.put(f"/cameras/{camera_id}/enable_video_live_feed?disable_other_cameras=false")
camera_from_config_file_0 = get_camera_from_config_file(camera_id, config_sample_path)
camera_from_config_file_1 = get_camera_from_config_file(camera_2["id"], config_sample_path)
camera_from_config_file_2 = get_camera_from_config_file(camera_3["id"], config_sample_path)
assert response.status_code == 204
assert camera_from_config_file_0["live_feed_enabled"] is True
assert camera_from_config_file_1["live_feed_enabled"] is True
assert camera_from_config_file_2["live_feed_enabled"] is True
rollback_screenshot_cameras_list(cameras_list)
| 39.952599
| 181
| 0.655058
| 3,110
| 26,129
| 5.131511
| 0.081029
| 0.047121
| 0.048123
| 0.048249
| 0.814086
| 0.770098
| 0.733818
| 0.710947
| 0.665957
| 0.638198
| 0
| 0.012458
| 0.24735
| 26,129
| 653
| 182
| 40.013783
| 0.799044
| 0.06288
| 0
| 0.573009
| 0
| 0
| 0.165098
| 0.062076
| 0
| 0
| 0
| 0.001531
| 0.143805
| 1
| 0.09292
| false
| 0
| 0.019912
| 0.002212
| 0.150442
| 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
|
81bd6beaeacfd0649bd5d34fdf36c72577740013
| 110
|
py
|
Python
|
api/v1/resources/ping.py
|
urkonn/shogun
|
fbbd9dfd5773d223949d1030c954e81fd353f175
|
[
"MIT"
] | null | null | null |
api/v1/resources/ping.py
|
urkonn/shogun
|
fbbd9dfd5773d223949d1030c954e81fd353f175
|
[
"MIT"
] | null | null | null |
api/v1/resources/ping.py
|
urkonn/shogun
|
fbbd9dfd5773d223949d1030c954e81fd353f175
|
[
"MIT"
] | null | null | null |
from flask_restful import Resource
class Ping(Resource):
def get(self):
return {'ping': 'pong'}
| 15.714286
| 34
| 0.654545
| 14
| 110
| 5.071429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 110
| 6
| 35
| 18.333333
| 0.835294
| 0
| 0
| 0
| 0
| 0
| 0.072727
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
81d0c00b18896daa2ccc6b09feb299a13436d914
| 55,212
|
py
|
Python
|
parser/team23/grammar/parsetab.py
|
Lenin201/tytus
|
cace7587b0274ceb26327b583201493bd1048b96
|
[
"MIT"
] | 1
|
2021-01-09T05:32:35.000Z
|
2021-01-09T05:32:35.000Z
|
parser/team23/grammar/parsetab.py
|
XiomRB/tytus
|
0873e4bdce5c110bee6ef2aa98240be6a93ae024
|
[
"MIT"
] | null | null | null |
parser/team23/grammar/parsetab.py
|
XiomRB/tytus
|
0873e4bdce5c110bee6ef2aa98240be6a93ae024
|
[
"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 = 'leftPAR_ABREPAR_CIERRArightIGUALleftORleftANDleftNO_IGUALnonassocMAYORMENORMAYOR_IGUALMENOR_IGUALleftMASMENOSleftASTERISCODIVISIONMODULOleftPOTENCIArightNOTleftLLAVE_ABRELLAVE_CIERRAADD ALL ALTER AND AS ASC ASTERISCO AVG BETWEEN BIGINT BOOLEAN BY CADENA CASE CASTEO CHAR CHARACTER CHECK COLUMN COMA CONSTRAINT CORCHE_ABRE CORCHE_CIERRA COUNT CREATE CURRENT_USER DATABASE DATABASES DATE DAY DECIMAL DECIMAL_NUM DEFAULT DELETE DESC DIFERENTE DISTINCT DIVISION DOUBLE DROP ELSE END ENTERO ENUM EXISTS FALSE FIELDS FIRST FOREIGN FROM FULL GREATEST GROUP HAVING HOUR ID IF IGUAL ILIKE IN INHERITS INNER INSERT INTEGER INTERSECT INTERVAL INTO IS ISNULL JOIN KEY LAST LEAST LEFT LIKE LIMIT LLAVE_ABRE LLAVE_CIERRA MAS MAYOR MAYOR_IGUAL MENOR MENOR_IGUAL MENOS MINUTE MODE MODULO MONEY MONTH NOT NOTNULL NO_IGUAL NULL NULLS NUMERIC OFFSET OR ORDER OUTER OWNER PAR_ABRE PAR_CIERRA POTENCIA PRECISION PRIMARY PUNTO PUNTOCOMA REAL REFERENCE REFERENCES RENAME REPLACE RIGHT SECOND SELECT SESSION_USER SET SHOW SIMILAR SMALLINT SUBSTRING SUM SYMMETRIC TABLE TEXT THEN TIME TIMESTAMP TO TRUE TYPE UNION UNIQUE UNKNOWN UPDATE USE VALUES VARCHAR VARYING WHEN WHERE WITH WITHOUT YEAR ZONEinit : instruccionesinstrucciones : instrucciones instruccioninstrucciones : instruccion instruccion : crear_statement PUNTOCOMA\n | alter_statement PUNTOCOMA\n | drop_statement PUNTOCOMA\n | seleccionar PUNTOCOMAinstruccion : SHOW DATABASES PUNTOCOMA\n | INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA\n | UPDATE ID SET ID IGUAL op_val where PUNTOCOMA\n | DELETE FROM ID WHERE ID IGUAL op_val PUNTOCOMA\n | USE DATABASE ID PUNTOCOMAcrear_statement : CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statementcrear_statement : CREATE or_replace DATABASE if_not_exists ID owner_ mode_or_replace : OR REPLACE\n | if_not_exists : IF NOT EXISTS\n | owner_ : OWNER IGUAL ID\n | mode_ : MODE IGUAL ENTERO\n | alter_statement : ALTER DATABASE ID rename_owneralter_statement : ALTER TABLE ID alter_oprename_owner : RENAME TO ID\n | OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRAow_op : ID\n | CURRENT_USER\n | SESSION_USERdrop_statement : DROP DATABASE if_exists IDdrop_statement : DROP TABLE IDif_exists : IF EXISTS\n | contenido_tabla : contenido_tabla COMA manejo_tablacontenido_tabla : manejo_tablamanejo_tabla : declaracion_columna\n | condition_columndeclaracion_columna : ID type_column condition_column_rowdeclaracion_columna : ID type_columntype_column : SMALLINT\n | INTEGER\n\t | BIGINT\n\t | DECIMAL\n\t | NUMERIC\n\t | REAL\n\t | DOUBLE PRECISION\n\t | MONEY\n\t | VARCHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA\n \t | TEXT\n\t | DATE\n | TIMESTAMP\n | TIMEcondition_column_row : condition_column_row condition_columncondition_column_row : condition_columncondition_column : constraint UNIQUE op_unique\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | key_tablecondition_column : DEFAULT op_val\n | NULL\n | NOT NULL\n\t | REFERENCE ID\n\t\t | CONSTRAINT ID key_table\n \t\t | constraint : CONSTRAINT ID\n | op_unique : PAR_ABRE list_id PAR_CIERRA\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | list_id : list_id COMA aliaslist_id : aliasalias : IDkey_table : PRIMARY KEY list_key\n\t | FOREIGN KEY PAR_ABRE list_id PAR_CIERRA REFERENCES ID PAR_ABRE list_id PAR_CIERRAlist_key : PAR_ABRE list_id PAR_CIERRA\n\t | alter_op : ADD op_add\n\t | ALTER COLUMN ID alter_col_op\n\t | DROP alter_drop IDalter_drop : CONSTRAINT\n\t | COLUMN op_add : CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA\n | CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA\n | key_table REFERENCES PAR_ABRE list_id PAR_CIERRAalter_col_op : SET NOT NULL\n | TYPE type_columninherits_statement : INHERITS PAR_ABRE ID PAR_CIERRA\n | list_val : list_val COMA op_vallist_val : op_valop_val : ID\n | CADENA\n | DECIMAL\n | ENTEROwhere : WHERE ID IGUAL op_val\n | seleccionar : SELECT distinto select_list FROM table_expression list_fin_selectseleccionar : SELECT GREATEST expressiones\n | SELECT LEAST expressioneslist_fin_select : list_fin_select fin_selectlist_fin_select : fin_selectfin_select : group_by \n\t | donde\n\t | order_by\n\t | group_having\n\t | limite\n \t| expressiones : PAR_ABRE list_expression PAR_CIERRAexpressiones : list_expressiondistinto : DISTINCT\n\t | select_list : ASTERISCO\n\t | expressiones table_expression : expressionesdonde : WHERE expressionesgroup_by : GROUP BY expressiones order_by : ORDER BY expressiones asc_desc nulls_f_lgroup_having : HAVING expressiones asc_desc : ASC\n\t | DESCnulls_f_l : NULLS LAST\n\t | NULLS FIRST\n\t | limite : LIMIT ENTERO\n\t | LIMIT ALL\n\t | OFFSET ENTEROlist_expression : list_expression COMA expressionlist_expression : expressionexpression : expression MAYOR expression\n | expression MENOR expression\n | expression MAYOR_IGUAL expression\n | expression MENOR_IGUAL expression\n | expression AND expression\n | expression OR expression\n | NOT expression\n | expression IGUAL expression\n | expression NO_IGUAL expression\n | expression DIFERENTE expression\n | PAR_ABRE expression PAR_CIERRA\n | expression BETWEEN expression AND expression\n | expression NOT BETWEEN expression AND expression \n | expression BETWEEN SYMMETRIC expression AND expression\n | expression NOT BETWEEN SYMMETRIC expression AND expression\n | expression IS DISTINCT FROM expression\n | expression IS NOT DISTINCT FROM expression\n | ID PUNTO ID\n | expression IS NULL\n | expression IS NOT NULL\n | expression ISNULL\n | expression NOTNULL\n | expression IS TRUE\n | expression IS NOT TRUE\n | expression IS FALSE\n | expression IS NOT FALSE\n | expression IS UNKNOWN\n | expression IS NOT UNKNOWN\n | SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA\n | SUM PAR_ABRE expression PAR_CIERRA\n | COUNT PAR_ABRE expression PAR_CIERRA\n | AVG PAR_ABRE expression PAR_CIERRA\n | seleccionarexpression : ID\n | ASTERISCOexpression : ENTEROexpression : DECIMAL_NUMexpression : CADENA'
_lr_action_items = {'SHOW':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[8,8,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'INSERT':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[9,9,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'UPDATE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[10,10,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'DELETE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[11,11,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'USE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[12,12,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'CREATE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[13,13,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'ALTER':([0,2,3,17,18,19,20,21,38,47,73,292,294,296,],[14,14,-3,-2,-4,-5,-6,-7,-8,80,-12,-9,-10,-11,]),'DROP':([0,2,3,17,18,19,20,21,38,47,73,292,294,296,],[15,15,-3,-2,-4,-5,-6,-7,-8,83,-12,-9,-10,-11,]),'SELECT':([0,2,3,16,17,18,19,20,21,34,35,36,37,38,54,57,73,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,292,294,296,323,325,332,],[16,16,-3,-113,-2,-4,-5,-6,-7,16,16,16,-112,-8,16,16,-12,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,-9,-10,-11,16,16,16,]),'$end':([1,2,3,17,18,19,20,21,38,73,292,294,296,],[0,-1,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'PUNTOCOMA':([4,5,6,7,22,42,50,55,56,58,63,64,65,66,67,68,69,77,81,84,103,104,105,128,133,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,169,172,173,174,175,178,179,180,181,182,183,185,189,190,191,192,193,203,206,212,213,214,215,216,217,218,219,232,233,234,235,237,238,239,240,242,244,247,252,264,271,277,279,281,282,283,284,285,289,312,313,315,319,321,322,324,327,328,329,338,339,342,343,344,345,346,348,349,350,354,355,356,358,361,362,],[18,19,20,21,38,73,-31,-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-23,-24,-30,-151,-152,-137,-20,-79,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-93,-94,-95,-96,-98,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-90,-22,-25,-81,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,292,294,296,-46,-13,-14,-80,-102,-117,-120,-126,-127,-128,-142,-146,-19,-26,-88,-118,-144,-143,-147,-48,-49,-50,-21,-87,-86,-125,-121,-122,-145,-97,-51,-89,-84,-85,-119,-159,-123,-124,]),'DATABASES':([8,],[22,]),'INTO':([9,],[23,]),'ID':([10,16,23,25,26,27,30,31,32,33,34,35,36,37,40,44,48,54,57,72,74,75,85,86,87,90,91,92,93,94,95,96,97,98,99,100,106,107,108,109,110,111,112,121,124,125,130,132,135,137,138,139,156,157,176,194,205,207,209,221,223,226,229,230,236,241,243,257,258,259,262,263,266,276,278,280,286,287,290,302,317,323,325,326,332,334,353,363,],[24,-113,39,41,42,43,46,47,-33,50,58,58,58,-112,71,-18,84,58,58,113,114,128,-32,58,58,58,58,58,58,58,58,58,58,58,58,58,164,58,58,58,58,169,169,169,199,200,206,208,210,212,-82,-83,58,58,169,114,-17,268,274,58,58,58,58,58,58,169,295,306,307,58,306,306,312,306,58,58,58,58,58,331,341,58,58,169,58,306,360,306,]),'FROM':([11,51,52,53,55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,158,160,161,162,163,164,213,214,215,216,217,218,219,231,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[25,86,-114,-115,-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,230,-149,-153,-155,-157,-148,-99,-103,-104,-105,-106,-107,-108,290,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'DATABASE':([12,13,14,15,28,45,],[26,-16,30,32,44,-15,]),'TABLE':([13,14,15,],[27,31,33,]),'OR':([13,52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[29,-165,-111,96,-164,-163,-166,-167,-168,-100,-165,-101,96,-151,-152,-137,-109,-116,96,-110,-141,96,-131,-132,-133,-134,-135,-136,96,-139,96,96,-149,-153,-155,-157,-148,96,96,96,96,-99,-103,-104,-105,-106,-107,-108,96,96,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,96,96,96,96,-118,-135,-135,96,-125,-121,-122,-135,96,96,-119,-159,-123,-124,]),'GREATEST':([16,],[35,]),'LEAST':([16,],[36,]),'DISTINCT':([16,102,159,],[37,158,231,]),'ASTERISCO':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,52,68,68,-112,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,]),'PAR_ABRE':([16,34,35,36,37,43,54,57,59,60,61,62,70,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,134,156,157,186,187,188,195,196,201,202,211,221,223,226,229,230,236,251,253,259,275,278,280,286,287,290,303,323,325,332,360,],[-113,54,54,54,-112,74,87,87,107,108,109,110,111,54,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,209,87,87,248,249,250,257,259,262,263,276,54,54,87,87,87,87,301,302,87,317,54,54,87,87,87,332,87,87,87,363,]),'NOT':([16,34,35,36,37,52,54,55,56,57,58,63,64,65,66,67,68,69,74,76,86,87,89,90,91,92,93,94,95,96,97,98,99,100,102,103,104,105,107,108,109,110,120,122,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,160,161,162,163,164,165,166,167,168,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,213,214,215,216,217,218,219,221,223,226,227,228,229,230,232,233,234,235,236,237,238,239,245,246,247,256,259,260,261,272,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,297,308,319,321,322,323,324,325,327,328,329,332,333,335,336,343,344,345,346,347,349,351,356,358,359,361,362,365,],[-113,57,57,57,-112,-165,57,-111,101,57,-164,-163,-166,-167,-168,-100,-165,-101,123,129,57,57,101,57,57,57,57,57,57,57,57,57,57,57,159,-151,-152,101,57,57,57,57,-60,-62,-109,-116,101,-110,-141,101,101,101,101,101,101,101,101,101,101,101,57,57,-149,-153,-155,-157,-148,101,101,101,101,-93,-94,-95,-96,123,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,123,-71,-61,-63,-64,-78,-99,-103,-104,-105,-106,-107,-108,57,57,57,101,101,57,57,-150,-154,-156,-158,57,-160,-161,-162,123,-57,-46,-58,57,-65,-75,314,-102,57,-117,57,-120,-126,-127,-128,101,57,57,101,101,57,101,-56,101,-118,101,101,57,101,57,-48,-49,-50,57,-69,-59,-77,-125,-121,-122,101,101,-51,101,-119,-159,-70,-123,-124,-76,]),'SUBSTRING':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,59,59,59,-112,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,]),'SUM':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,60,60,60,-112,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,]),'COUNT':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,61,61,61,-112,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,]),'AVG':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,62,62,62,-112,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,]),'ENTERO':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,111,112,121,156,157,176,221,223,224,225,226,229,230,236,241,248,249,250,259,278,280,286,287,290,301,311,323,325,326,332,],[-113,64,64,64,-112,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,174,174,174,64,64,174,64,64,282,284,64,64,64,64,174,298,299,300,64,64,64,64,64,64,330,338,64,64,174,64,]),'DECIMAL_NUM':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,65,65,65,-112,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,]),'CADENA':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,111,112,121,156,157,176,221,223,226,229,230,236,241,259,278,280,286,287,290,316,323,325,326,332,],[-113,66,66,66,-112,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,172,172,172,66,66,172,66,66,66,66,66,66,172,66,66,66,66,66,66,340,66,66,172,66,]),'SET':([24,208,],[40,272,]),'REPLACE':([29,],[45,]),'IF':([32,44,],[49,76,]),'VALUES':([39,],[70,]),'WHERE':([41,55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,169,172,173,174,175,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[72,-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,221,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-93,-94,-95,-96,243,221,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'RENAME':([46,],[78,]),'OWNER':([46,128,],[79,204,]),'ADD':([47,],[82,]),'EXISTS':([49,129,],[85,205,]),'MAYOR':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,91,-164,-163,-166,-167,-168,-100,-165,-101,91,-151,-152,-137,-109,-116,91,-110,-141,91,None,None,None,None,91,91,91,91,91,91,-149,-153,-155,-157,-148,91,91,91,91,-99,-103,-104,-105,-106,-107,-108,91,91,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,91,91,91,91,91,-118,91,91,91,-125,-121,-122,91,91,91,-119,-159,-123,-124,]),'MENOR':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,92,-164,-163,-166,-167,-168,-100,-165,-101,92,-151,-152,-137,-109,-116,92,-110,-141,92,None,None,None,None,92,92,92,92,92,92,-149,-153,-155,-157,-148,92,92,92,92,-99,-103,-104,-105,-106,-107,-108,92,92,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,92,92,92,92,92,-118,92,92,92,-125,-121,-122,92,92,92,-119,-159,-123,-124,]),'MAYOR_IGUAL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,93,-164,-163,-166,-167,-168,-100,-165,-101,93,-151,-152,-137,-109,-116,93,-110,-141,93,None,None,None,None,93,93,93,93,93,93,-149,-153,-155,-157,-148,93,93,93,93,-99,-103,-104,-105,-106,-107,-108,93,93,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,93,93,93,93,93,-118,93,93,93,-125,-121,-122,93,93,93,-119,-159,-123,-124,]),'MENOR_IGUAL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,94,-164,-163,-166,-167,-168,-100,-165,-101,94,-151,-152,-137,-109,-116,94,-110,-141,94,None,None,None,None,94,94,94,94,94,94,-149,-153,-155,-157,-148,94,94,94,94,-99,-103,-104,-105,-106,-107,-108,94,94,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,94,94,94,94,94,-118,94,94,94,-125,-121,-122,94,94,94,-119,-159,-123,-124,]),'AND':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,95,-164,-163,-166,-167,-168,-100,-165,-101,95,-151,-152,-137,-109,-116,95,-110,-141,95,-131,-132,-133,-134,-135,95,95,-139,95,226,-149,-153,-155,-157,-148,95,95,95,95,-99,-103,-104,-105,-106,-107,-108,286,287,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,323,95,95,95,-118,-135,-135,95,-125,-121,-122,-135,95,95,-119,-159,-123,-124,]),'IGUAL':([52,55,56,58,63,64,65,66,67,68,69,71,89,103,104,105,113,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,204,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,265,277,279,281,282,283,284,285,288,289,291,295,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,97,-164,-163,-166,-167,-168,-100,-165,-101,112,97,-151,-152,-137,176,-109,-116,97,-110,-141,97,-131,-132,-133,-134,-135,-136,97,-139,97,97,-149,-153,-155,-157,-148,97,97,97,97,266,-99,-103,-104,-105,-106,-107,-108,97,97,-150,-154,-156,-158,-160,-161,-162,311,-102,-117,-120,-126,-127,-128,-135,97,97,97,326,97,-118,-135,-135,97,-125,-121,-122,-135,97,97,-119,-159,-123,-124,]),'NO_IGUAL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,98,-164,-163,-166,-167,-168,-100,-165,-101,98,-151,-152,-137,-109,-116,98,-110,-141,98,-131,-132,-133,-134,98,98,98,-139,98,98,-149,-153,-155,-157,-148,98,98,98,98,-99,-103,-104,-105,-106,-107,-108,98,98,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,98,98,98,98,98,-118,98,98,98,-125,-121,-122,98,98,98,-119,-159,-123,-124,]),'DIFERENTE':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,274,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,99,-164,-163,-166,-167,-168,-100,-165,-101,99,-151,-152,-137,-109,-116,99,-110,-141,99,-131,-132,-133,-134,-135,-136,-138,-139,99,99,-149,-153,-155,-157,-148,99,99,99,99,-99,-103,-104,-105,-106,-107,-108,99,99,-150,-154,-156,-158,-160,-161,-162,316,-102,-117,-120,-126,-127,-128,-135,99,99,99,99,-118,-135,-135,99,-125,-121,-122,-135,99,99,-119,-159,-123,-124,]),'BETWEEN':([52,55,56,58,63,64,65,66,67,68,69,89,101,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,100,-164,-163,-166,-167,-168,-100,-165,-101,100,157,-151,-152,-137,-109,-116,100,-110,-141,100,-131,-132,-133,-134,-135,-136,-138,-139,100,100,-149,-153,-155,-157,-148,100,100,100,100,-99,-103,-104,-105,-106,-107,-108,100,100,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,100,100,100,100,-118,-135,-135,100,-125,-121,-122,-135,100,100,-119,-159,-123,-124,]),'IS':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,102,-164,-163,-166,-167,-168,-100,-165,-101,102,-151,-152,-137,-109,-116,102,-110,-141,102,-131,-132,-133,-134,-135,-136,-138,-139,102,102,-149,-153,-155,-157,-148,102,102,102,102,-99,-103,-104,-105,-106,-107,-108,102,102,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,102,102,102,102,-118,-135,-135,102,-125,-121,-122,-135,102,102,-119,-159,-123,-124,]),'ISNULL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,103,-164,-163,-166,-167,-168,-100,-165,-101,103,-151,-152,-137,-109,-116,103,-110,-141,103,-131,-132,-133,-134,-135,-136,-138,-139,103,103,-149,-153,-155,-157,-148,103,103,103,103,-99,-103,-104,-105,-106,-107,-108,103,103,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,103,103,103,103,-118,-135,-135,103,-125,-121,-122,-135,103,103,-119,-159,-123,-124,]),'NOTNULL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,104,-164,-163,-166,-167,-168,-100,-165,-101,104,-151,-152,-137,-109,-116,104,-110,-141,104,-131,-132,-133,-134,-135,-136,-138,-139,104,104,-149,-153,-155,-157,-148,104,104,104,104,-99,-103,-104,-105,-106,-107,-108,104,104,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,104,104,104,104,-118,-135,-135,104,-125,-121,-122,-135,104,104,-119,-159,-123,-124,]),'COMA':([52,55,56,58,63,64,65,66,67,68,69,74,88,89,103,104,105,115,116,117,118,120,122,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,165,169,170,171,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,213,214,215,216,217,218,219,232,233,234,235,237,238,239,245,246,247,254,256,260,261,277,279,281,282,283,284,285,289,291,293,297,304,305,306,309,310,318,319,321,322,324,327,328,329,333,335,336,343,344,345,346,349,352,356,358,359,361,362,364,365,],[-165,90,-130,-164,-163,-166,-167,-168,-100,-165,-101,-66,90,-130,-151,-152,-137,194,-35,-36,-37,-60,-62,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,236,-93,241,-92,-94,-95,-96,-39,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-66,-71,-61,-63,-64,-78,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-38,-57,-46,-34,-58,-65,-75,-102,-117,-120,-126,-127,-128,-142,-146,325,-91,-56,334,-73,-74,334,334,334,-118,-144,-143,-147,-48,-49,-50,-69,-59,-77,-125,-121,-122,-145,-51,-72,-119,-159,-70,-123,-124,334,-76,]),'PAR_CIERRA':([55,56,58,63,64,65,66,67,68,69,74,88,89,103,104,105,115,116,117,118,120,122,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,166,167,168,169,170,171,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,213,214,215,216,217,218,219,232,233,234,235,237,238,239,245,246,247,254,256,260,261,277,279,281,282,283,284,285,289,293,297,298,299,300,304,305,306,308,309,310,318,319,321,322,324,327,328,329,330,331,333,335,336,340,341,343,344,345,346,347,349,351,352,356,358,359,361,362,364,365,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-66,143,144,-151,-152,-137,193,-35,-36,-37,-60,-62,-109,-116,144,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,237,238,239,-93,240,-92,-94,-95,-96,-39,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-66,-71,-61,-63,-64,-78,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-38,-57,-46,-34,-58,-65,-75,-102,-117,-120,-126,-127,-128,-142,-146,-91,-56,327,328,329,333,-73,-74,335,336,337,342,-118,-144,-143,-147,-48,-49,-50,349,350,-69,-59,-77,354,355,-125,-121,-122,-145,358,-51,359,-72,-119,-159,-70,-123,-124,365,-76,]),'GROUP':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,220,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,220,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'ORDER':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,222,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,222,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'HAVING':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,223,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,223,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'LIMIT':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,224,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,224,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'OFFSET':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,225,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,225,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'ASC':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,320,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,344,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'DESC':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,320,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,345,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'PUNTO':([58,],[106,]),'DEFAULT':([74,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[121,-60,-62,-93,-94,-95,-96,121,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,121,-71,-61,-63,-64,-78,121,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'NULL':([74,102,120,122,123,159,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,314,327,328,329,333,335,336,349,359,365,],[122,160,-60,-62,198,232,-93,-94,-95,-96,122,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,122,-71,-61,-63,-64,-78,122,-57,-46,-58,-65,-75,-56,339,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'REFERENCE':([74,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[124,-60,-62,-93,-94,-95,-96,124,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,124,-71,-61,-63,-64,-78,124,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'CONSTRAINT':([74,82,83,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[125,135,138,-60,-62,-93,-94,-95,-96,125,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,125,258,-61,-63,-64,-78,125,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'UNIQUE':([74,119,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,210,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[-68,195,-60,-62,-93,-94,-95,-96,-66,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-68,-71,-61,-63,-64,-67,-78,275,-66,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'CHECK':([74,82,119,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,245,246,247,255,256,260,261,297,307,327,328,329,333,335,336,349,359,365,],[-68,134,196,-60,-62,-93,-94,-95,-96,-66,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-68,-68,-61,-63,-64,-67,-78,-66,-57,-46,303,-58,-65,-75,-56,-67,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'PRIMARY':([74,82,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[126,126,-60,-62,-93,-94,-95,-96,126,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,126,-71,-61,-63,-64,126,-78,126,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'FOREIGN':([74,82,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[127,127,-60,-62,-93,-94,-95,-96,127,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,127,-71,-61,-63,-64,127,-78,127,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'TO':([78,79,],[130,131,]),'COLUMN':([80,83,],[132,139,]),'SYMMETRIC':([100,157,],[156,229,]),'TRUE':([102,159,],[161,233,]),'FALSE':([102,159,],[162,234,]),'UNKNOWN':([102,159,],[163,235,]),'DECIMAL':([111,112,114,121,176,241,273,326,],[173,173,181,173,173,173,181,173,]),'SMALLINT':([114,273,],[178,178,]),'INTEGER':([114,273,],[179,179,]),'BIGINT':([114,273,],[180,180,]),'NUMERIC':([114,273,],[182,182,]),'REAL':([114,273,],[183,183,]),'DOUBLE':([114,273,],[184,184,]),'MONEY':([114,273,],[185,185,]),'VARCHAR':([114,273,],[186,186,]),'CHAR':([114,273,],[187,187,]),'CHARACTER':([114,273,],[188,188,]),'TEXT':([114,273,],[189,189,]),'DATE':([114,273,],[190,190,]),'TIMESTAMP':([114,273,],[191,191,]),'TIME':([114,273,],[192,192,]),'KEY':([126,127,],[201,202,]),'MODE':([128,203,312,],[-20,265,-19,]),'LLAVE_ABRE':([131,],[207,]),'REFERENCES':([136,201,261,336,337,365,],[211,-78,-75,-77,353,-76,]),'PRECISION':([184,],[247,]),'VARYING':([188,],[251,]),'INHERITS':([193,],[253,]),'CURRENT_USER':([207,],[269,]),'SESSION_USER':([207,],[270,]),'TYPE':([208,],[273,]),'BY':([220,222,],[278,280,]),'ALL':([224,],[283,]),'LLAVE_CIERRA':([267,268,269,270,],[313,-27,-28,-29,]),'NULLS':([343,344,345,],[357,-121,-122,]),'LAST':([357,],[361,]),'FIRST':([357,],[362,]),}
_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 = {'init':([0,],[1,]),'instrucciones':([0,],[2,]),'instruccion':([0,2,],[3,17,]),'crear_statement':([0,2,],[4,4,]),'alter_statement':([0,2,],[5,5,]),'drop_statement':([0,2,],[6,6,]),'seleccionar':([0,2,34,35,36,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[7,7,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,]),'or_replace':([13,],[28,]),'distinto':([16,],[34,]),'if_exists':([32,],[48,]),'select_list':([34,],[51,]),'expressiones':([34,35,36,86,221,223,278,280,],[53,67,69,141,279,281,319,320,]),'list_expression':([34,35,36,54,86,221,223,278,280,],[55,55,55,88,55,55,55,55,55,]),'expression':([34,35,36,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[56,56,56,89,105,56,142,145,146,147,148,149,150,151,152,153,154,155,165,166,167,168,227,228,56,56,285,288,289,291,308,56,56,321,322,324,346,347,351,]),'if_not_exists':([44,],[75,]),'rename_owner':([46,],[77,]),'alter_op':([47,],[81,]),'contenido_tabla':([74,],[115,]),'manejo_tabla':([74,194,],[116,254,]),'declaracion_columna':([74,194,],[117,117,]),'condition_column':([74,177,194,245,],[118,246,118,297,]),'constraint':([74,177,194,195,245,],[119,119,119,255,119,]),'key_table':([74,82,177,194,200,245,],[120,136,120,120,260,120,]),'op_add':([82,],[133,]),'alter_drop':([83,],[137,]),'table_expression':([86,],[140,]),'list_val':([111,],[170,]),'op_val':([111,112,121,176,241,326,],[171,175,197,244,293,348,]),'type_column':([114,273,],[177,315,]),'owner_':([128,],[203,]),'list_fin_select':([140,],[213,]),'fin_select':([140,213,],[214,277,]),'group_by':([140,213,],[215,215,]),'donde':([140,213,],[216,216,]),'order_by':([140,213,],[217,217,]),'group_having':([140,213,],[218,218,]),'limite':([140,213,],[219,219,]),'where':([175,],[242,]),'condition_column_row':([177,],[245,]),'inherits_statement':([193,],[252,]),'op_unique':([195,],[256,]),'list_key':([201,],[261,]),'mode_':([203,],[264,]),'ow_op':([207,],[267,]),'alter_col_op':([208,],[271,]),'list_id':([257,262,263,276,363,],[304,309,310,318,364,]),'alias':([257,262,263,276,334,363,],[305,305,305,305,352,305,]),'asc_desc':([320,],[343,]),'nulls_f_l':([343,],[356,]),}
_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' -> init","S'",1,None,None,None),
('init -> instrucciones','init',1,'p_init','sql_grammar.py',295),
('instrucciones -> instrucciones instruccion','instrucciones',2,'p_instrucciones_lista','sql_grammar.py',299),
('instrucciones -> instruccion','instrucciones',1,'p_instrucciones_instruccion','sql_grammar.py',304),
('instruccion -> crear_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',308),
('instruccion -> alter_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',309),
('instruccion -> drop_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',310),
('instruccion -> seleccionar PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',311),
('instruccion -> SHOW DATABASES PUNTOCOMA','instruccion',3,'p_aux_instruccion','sql_grammar.py',315),
('instruccion -> INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',316),
('instruccion -> UPDATE ID SET ID IGUAL op_val where PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',317),
('instruccion -> DELETE FROM ID WHERE ID IGUAL op_val PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',318),
('instruccion -> USE DATABASE ID PUNTOCOMA','instruccion',4,'p_aux_instruccion','sql_grammar.py',319),
('crear_statement -> CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statement','crear_statement',7,'p_crear_statement_tbl','sql_grammar.py',338),
('crear_statement -> CREATE or_replace DATABASE if_not_exists ID owner_ mode_','crear_statement',7,'p_crear_statement_db','sql_grammar.py',344),
('or_replace -> OR REPLACE','or_replace',2,'p_or_replace_db','sql_grammar.py',350),
('or_replace -> <empty>','or_replace',0,'p_or_replace_db','sql_grammar.py',351),
('if_not_exists -> IF NOT EXISTS','if_not_exists',3,'p_if_not_exists_db','sql_grammar.py',359),
('if_not_exists -> <empty>','if_not_exists',0,'p_if_not_exists_db','sql_grammar.py',360),
('owner_ -> OWNER IGUAL ID','owner_',3,'p_owner_db','sql_grammar.py',368),
('owner_ -> <empty>','owner_',0,'p_owner_db','sql_grammar.py',369),
('mode_ -> MODE IGUAL ENTERO','mode_',3,'p_mode_db','sql_grammar.py',379),
('mode_ -> <empty>','mode_',0,'p_mode_db','sql_grammar.py',380),
('alter_statement -> ALTER DATABASE ID rename_owner','alter_statement',4,'p_alter_db','sql_grammar.py',390),
('alter_statement -> ALTER TABLE ID alter_op','alter_statement',4,'p_alter_tbl','sql_grammar.py',396),
('rename_owner -> RENAME TO ID','rename_owner',3,'p_rename_owner_db','sql_grammar.py',403),
('rename_owner -> OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRA','rename_owner',5,'p_rename_owner_db','sql_grammar.py',404),
('ow_op -> ID','ow_op',1,'p_ow_op_db','sql_grammar.py',414),
('ow_op -> CURRENT_USER','ow_op',1,'p_ow_op_db','sql_grammar.py',415),
('ow_op -> SESSION_USER','ow_op',1,'p_ow_op_db','sql_grammar.py',416),
('drop_statement -> DROP DATABASE if_exists ID','drop_statement',4,'p_drop_db','sql_grammar.py',420),
('drop_statement -> DROP TABLE ID','drop_statement',3,'p_drop_tbl','sql_grammar.py',430),
('if_exists -> IF EXISTS','if_exists',2,'p_if_exists_db','sql_grammar.py',436),
('if_exists -> <empty>','if_exists',0,'p_if_exists_db','sql_grammar.py',437),
('contenido_tabla -> contenido_tabla COMA manejo_tabla','contenido_tabla',3,'p_contenido_tabla','sql_grammar.py',444),
('contenido_tabla -> manejo_tabla','contenido_tabla',1,'p_aux_contenido_table','sql_grammar.py',449),
('manejo_tabla -> declaracion_columna','manejo_tabla',1,'p_manejo_tabla','sql_grammar.py',453),
('manejo_tabla -> condition_column','manejo_tabla',1,'p_manejo_tabla','sql_grammar.py',454),
('declaracion_columna -> ID type_column condition_column_row','declaracion_columna',3,'p_aux_declaracion_columna','sql_grammar.py',458),
('declaracion_columna -> ID type_column','declaracion_columna',2,'p_declaracion_columna','sql_grammar.py',464),
('type_column -> SMALLINT','type_column',1,'p_type_column','sql_grammar.py',470),
('type_column -> INTEGER','type_column',1,'p_type_column','sql_grammar.py',471),
('type_column -> BIGINT','type_column',1,'p_type_column','sql_grammar.py',472),
('type_column -> DECIMAL','type_column',1,'p_type_column','sql_grammar.py',473),
('type_column -> NUMERIC','type_column',1,'p_type_column','sql_grammar.py',474),
('type_column -> REAL','type_column',1,'p_type_column','sql_grammar.py',475),
('type_column -> DOUBLE PRECISION','type_column',2,'p_type_column','sql_grammar.py',476),
('type_column -> MONEY','type_column',1,'p_type_column','sql_grammar.py',477),
('type_column -> VARCHAR PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',478),
('type_column -> CHAR PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',479),
('type_column -> CHARACTER PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',480),
('type_column -> CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA','type_column',5,'p_type_column','sql_grammar.py',481),
('type_column -> TEXT','type_column',1,'p_type_column','sql_grammar.py',482),
('type_column -> DATE','type_column',1,'p_type_column','sql_grammar.py',483),
('type_column -> TIMESTAMP','type_column',1,'p_type_column','sql_grammar.py',484),
('type_column -> TIME','type_column',1,'p_type_column','sql_grammar.py',485),
('condition_column_row -> condition_column_row condition_column','condition_column_row',2,'p_condition_column_row','sql_grammar.py',519),
('condition_column_row -> condition_column','condition_column_row',1,'p_aux_condition_column_row','sql_grammar.py',524),
('condition_column -> constraint UNIQUE op_unique','condition_column',3,'p_condition_column','sql_grammar.py',528),
('condition_column -> constraint CHECK PAR_ABRE expression PAR_CIERRA','condition_column',5,'p_condition_column','sql_grammar.py',529),
('condition_column -> key_table','condition_column',1,'p_condition_column','sql_grammar.py',530),
('condition_column -> DEFAULT op_val','condition_column',2,'p_aux_condition_column','sql_grammar.py',546),
('condition_column -> NULL','condition_column',1,'p_aux_condition_column','sql_grammar.py',547),
('condition_column -> NOT NULL','condition_column',2,'p_aux_condition_column','sql_grammar.py',548),
('condition_column -> REFERENCE ID','condition_column',2,'p_aux_condition_column','sql_grammar.py',549),
('condition_column -> CONSTRAINT ID key_table','condition_column',3,'p_aux_condition_column','sql_grammar.py',550),
('condition_column -> <empty>','condition_column',0,'p_aux_condition_column','sql_grammar.py',551),
('constraint -> CONSTRAINT ID','constraint',2,'p_constraint','sql_grammar.py',575),
('constraint -> <empty>','constraint',0,'p_constraint','sql_grammar.py',576),
('op_unique -> PAR_ABRE list_id PAR_CIERRA','op_unique',3,'p_op_unique','sql_grammar.py',588),
('op_unique -> constraint CHECK PAR_ABRE expression PAR_CIERRA','op_unique',5,'p_op_unique','sql_grammar.py',589),
('op_unique -> <empty>','op_unique',0,'p_op_unique','sql_grammar.py',590),
('list_id -> list_id COMA alias','list_id',3,'p_list_id','sql_grammar.py',604),
('list_id -> alias','list_id',1,'p_aux_list_id','sql_grammar.py',609),
('alias -> ID','alias',1,'p_alias','sql_grammar.py',613),
('key_table -> PRIMARY KEY list_key','key_table',3,'p_key_table','sql_grammar.py',619),
('key_table -> FOREIGN KEY PAR_ABRE list_id PAR_CIERRA REFERENCES ID PAR_ABRE list_id PAR_CIERRA','key_table',10,'p_key_table','sql_grammar.py',620),
('list_key -> PAR_ABRE list_id PAR_CIERRA','list_key',3,'p_list_key','sql_grammar.py',633),
('list_key -> <empty>','list_key',0,'p_list_key','sql_grammar.py',634),
('alter_op -> ADD op_add','alter_op',2,'p_alter_op','sql_grammar.py',641),
('alter_op -> ALTER COLUMN ID alter_col_op','alter_op',4,'p_alter_op','sql_grammar.py',642),
('alter_op -> DROP alter_drop ID','alter_op',3,'p_alter_op','sql_grammar.py',643),
('alter_drop -> CONSTRAINT','alter_drop',1,'p_aux_alter_op','sql_grammar.py',660),
('alter_drop -> COLUMN','alter_drop',1,'p_aux_alter_op','sql_grammar.py',661),
('op_add -> CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA','op_add',6,'p_op_add','sql_grammar.py',666),
('op_add -> CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA','op_add',6,'p_op_add','sql_grammar.py',667),
('op_add -> key_table REFERENCES PAR_ABRE list_id PAR_CIERRA','op_add',5,'p_op_add','sql_grammar.py',668),
('alter_col_op -> SET NOT NULL','alter_col_op',3,'p_alter_col_op','sql_grammar.py',685),
('alter_col_op -> TYPE type_column','alter_col_op',2,'p_alter_col_op','sql_grammar.py',686),
('inherits_statement -> INHERITS PAR_ABRE ID PAR_CIERRA','inherits_statement',4,'p_inherits_tbl','sql_grammar.py',699),
('inherits_statement -> <empty>','inherits_statement',0,'p_inherits_tbl','sql_grammar.py',700),
('list_val -> list_val COMA op_val','list_val',3,'p_list_val','sql_grammar.py',709),
('list_val -> op_val','list_val',1,'p_aux_list_val','sql_grammar.py',714),
('op_val -> ID','op_val',1,'p_op_val','sql_grammar.py',718),
('op_val -> CADENA','op_val',1,'p_op_val','sql_grammar.py',719),
('op_val -> DECIMAL','op_val',1,'p_op_val','sql_grammar.py',720),
('op_val -> ENTERO','op_val',1,'p_op_val','sql_grammar.py',721),
('where -> WHERE ID IGUAL op_val','where',4,'p_where','sql_grammar.py',725),
('where -> <empty>','where',0,'p_where','sql_grammar.py',726),
('seleccionar -> SELECT distinto select_list FROM table_expression list_fin_select','seleccionar',6,'p_seleccionar','sql_grammar.py',736),
('seleccionar -> SELECT GREATEST expressiones','seleccionar',3,'p_aux_seleccionar','sql_grammar.py',746),
('seleccionar -> SELECT LEAST expressiones','seleccionar',3,'p_aux_seleccionar','sql_grammar.py',747),
('list_fin_select -> list_fin_select fin_select','list_fin_select',2,'p_list_fin_select','sql_grammar.py',753),
('list_fin_select -> fin_select','list_fin_select',1,'p_aux_list_fin_select','sql_grammar.py',758),
('fin_select -> group_by','fin_select',1,'p_fin_select','sql_grammar.py',762),
('fin_select -> donde','fin_select',1,'p_fin_select','sql_grammar.py',763),
('fin_select -> order_by','fin_select',1,'p_fin_select','sql_grammar.py',764),
('fin_select -> group_having','fin_select',1,'p_fin_select','sql_grammar.py',765),
('fin_select -> limite','fin_select',1,'p_fin_select','sql_grammar.py',766),
('fin_select -> <empty>','fin_select',0,'p_fin_select','sql_grammar.py',767),
('expressiones -> PAR_ABRE list_expression PAR_CIERRA','expressiones',3,'p_expressiones','sql_grammar.py',774),
('expressiones -> list_expression','expressiones',1,'p_aux_expressiones','sql_grammar.py',778),
('distinto -> DISTINCT','distinto',1,'p_distinto','sql_grammar.py',782),
('distinto -> <empty>','distinto',0,'p_distinto','sql_grammar.py',783),
('select_list -> ASTERISCO','select_list',1,'p_select_list','sql_grammar.py',790),
('select_list -> expressiones','select_list',1,'p_select_list','sql_grammar.py',791),
('table_expression -> expressiones','table_expression',1,'p_table_expression','sql_grammar.py',795),
('donde -> WHERE expressiones','donde',2,'p_donde','sql_grammar.py',799),
('group_by -> GROUP BY expressiones','group_by',3,'p_group_by','sql_grammar.py',808),
('order_by -> ORDER BY expressiones asc_desc nulls_f_l','order_by',5,'p_order_by','sql_grammar.py',817),
('group_having -> HAVING expressiones','group_having',2,'p_group_having','sql_grammar.py',826),
('asc_desc -> ASC','asc_desc',1,'p_asc_desc','sql_grammar.py',835),
('asc_desc -> DESC','asc_desc',1,'p_asc_desc','sql_grammar.py',836),
('nulls_f_l -> NULLS LAST','nulls_f_l',2,'p_nulls_f_l','sql_grammar.py',840),
('nulls_f_l -> NULLS FIRST','nulls_f_l',2,'p_nulls_f_l','sql_grammar.py',841),
('nulls_f_l -> <empty>','nulls_f_l',0,'p_nulls_f_l','sql_grammar.py',842),
('limite -> LIMIT ENTERO','limite',2,'p_limite','sql_grammar.py',849),
('limite -> LIMIT ALL','limite',2,'p_limite','sql_grammar.py',850),
('limite -> OFFSET ENTERO','limite',2,'p_limite','sql_grammar.py',851),
('list_expression -> list_expression COMA expression','list_expression',3,'p_list_expression','sql_grammar.py',860),
('list_expression -> expression','list_expression',1,'p_aux_list_expression','sql_grammar.py',865),
('expression -> expression MAYOR expression','expression',3,'p_expression','sql_grammar.py',869),
('expression -> expression MENOR expression','expression',3,'p_expression','sql_grammar.py',870),
('expression -> expression MAYOR_IGUAL expression','expression',3,'p_expression','sql_grammar.py',871),
('expression -> expression MENOR_IGUAL expression','expression',3,'p_expression','sql_grammar.py',872),
('expression -> expression AND expression','expression',3,'p_expression','sql_grammar.py',873),
('expression -> expression OR expression','expression',3,'p_expression','sql_grammar.py',874),
('expression -> NOT expression','expression',2,'p_expression','sql_grammar.py',875),
('expression -> expression IGUAL expression','expression',3,'p_expression','sql_grammar.py',876),
('expression -> expression NO_IGUAL expression','expression',3,'p_expression','sql_grammar.py',877),
('expression -> expression DIFERENTE expression','expression',3,'p_expression','sql_grammar.py',878),
('expression -> PAR_ABRE expression PAR_CIERRA','expression',3,'p_expression','sql_grammar.py',879),
('expression -> expression BETWEEN expression AND expression','expression',5,'p_expression','sql_grammar.py',880),
('expression -> expression NOT BETWEEN expression AND expression','expression',6,'p_expression','sql_grammar.py',881),
('expression -> expression BETWEEN SYMMETRIC expression AND expression','expression',6,'p_expression','sql_grammar.py',882),
('expression -> expression NOT BETWEEN SYMMETRIC expression AND expression','expression',7,'p_expression','sql_grammar.py',883),
('expression -> expression IS DISTINCT FROM expression','expression',5,'p_expression','sql_grammar.py',884),
('expression -> expression IS NOT DISTINCT FROM expression','expression',6,'p_expression','sql_grammar.py',885),
('expression -> ID PUNTO ID','expression',3,'p_expression','sql_grammar.py',886),
('expression -> expression IS NULL','expression',3,'p_expression','sql_grammar.py',887),
('expression -> expression IS NOT NULL','expression',4,'p_expression','sql_grammar.py',888),
('expression -> expression ISNULL','expression',2,'p_expression','sql_grammar.py',889),
('expression -> expression NOTNULL','expression',2,'p_expression','sql_grammar.py',890),
('expression -> expression IS TRUE','expression',3,'p_expression','sql_grammar.py',891),
('expression -> expression IS NOT TRUE','expression',4,'p_expression','sql_grammar.py',892),
('expression -> expression IS FALSE','expression',3,'p_expression','sql_grammar.py',893),
('expression -> expression IS NOT FALSE','expression',4,'p_expression','sql_grammar.py',894),
('expression -> expression IS UNKNOWN','expression',3,'p_expression','sql_grammar.py',895),
('expression -> expression IS NOT UNKNOWN','expression',4,'p_expression','sql_grammar.py',896),
('expression -> SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA','expression',8,'p_expression','sql_grammar.py',897),
('expression -> SUM PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression','sql_grammar.py',898),
('expression -> COUNT PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression','sql_grammar.py',899),
('expression -> AVG PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression','sql_grammar.py',900),
('expression -> seleccionar','expression',1,'p_expression','sql_grammar.py',901),
('expression -> ID','expression',1,'p_solouno_expression','sql_grammar.py',905),
('expression -> ASTERISCO','expression',1,'p_solouno_expression','sql_grammar.py',906),
('expression -> ENTERO','expression',1,'p_expression_entero','sql_grammar.py',916),
('expression -> DECIMAL_NUM','expression',1,'p_expression_decimal','sql_grammar.py',934),
('expression -> CADENA','expression',1,'p_expression_cadena','sql_grammar.py',961),
]
| 277.447236
| 28,620
| 0.672155
| 10,718
| 55,212
| 3.355477
| 0.072961
| 0.046713
| 0.056056
| 0.023245
| 0.641113
| 0.587838
| 0.534284
| 0.479591
| 0.437604
| 0.387693
| 0
| 0.375044
| 0.063211
| 55,212
| 198
| 28,621
| 278.848485
| 0.320289
| 0.001521
| 0
| 0.010638
| 1
| 0.005319
| 0.380114
| 0.023058
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 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
|
c4fd300aed04c9f59ce88f277ed892c3c0a35cd1
| 2,259
|
py
|
Python
|
release/stubs.min/Grasshopper/GUI/Canvas/TagArtists.py
|
htlcnn/ironpython-stubs
|
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
|
[
"MIT"
] | 182
|
2017-06-27T02:26:15.000Z
|
2022-03-30T18:53:43.000Z
|
release/stubs.min/Grasshopper/GUI/Canvas/TagArtists.py
|
htlcnn/ironpython-stubs
|
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
|
[
"MIT"
] | 28
|
2017-06-27T13:38:23.000Z
|
2022-03-15T11:19:44.000Z
|
release/stubs.min/Grasshopper/GUI/Canvas/TagArtists.py
|
htlcnn/ironpython-stubs
|
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
|
[
"MIT"
] | 67
|
2017-06-28T09:43:59.000Z
|
2022-03-20T21:17:10.000Z
|
# encoding: utf-8
# module Grasshopper.GUI.Canvas.TagArtists calls itself TagArtists
# from Grasshopper,Version=1.0.0.20,Culture=neutral,PublicKeyToken=dda4f5ec2cd80803
# by generator 1.145
""" NamespaceTracker represent a CLS namespace. """
# no imports
# no functions
# classes
class GH_TagArtist(object,IGH_TagArtist):
# no doc
def Paint(self,canvas,channel):
""" Paint(self: GH_TagArtist,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,*args): #cannot find CLR constructor
""" __new__(cls: type,id: Guid) """
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
ID=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: ID(self: GH_TagArtist) -> Guid
"""
class GH_TagArtist_WirePainter(GH_TagArtist,IGH_TagArtist):
""" GH_TagArtist_WirePainter(source: IGH_Param,target: IGH_Param,colour: Color,width: int) """
def Paint(self,canvas,channel):
""" Paint(self: GH_TagArtist_WirePainter,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,source,target,colour,width):
""" __new__(cls: type,source: IGH_Param,target: IGH_Param,colour: Color,width: int) """
pass
WirePainter_ID=None
class IGH_TagArtist:
# no doc
def Paint(self,canvas,channel):
""" Paint(self: IGH_TagArtist,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
ID=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: ID(self: IGH_TagArtist) -> Guid
"""
| 33.716418
| 215
| 0.707393
| 294
| 2,259
| 4.897959
| 0.255102
| 0.083333
| 0.088889
| 0.105556
| 0.654167
| 0.654167
| 0.654167
| 0.654167
| 0.654167
| 0.621528
| 0
| 0.009385
| 0.150952
| 2,259
| 66
| 216
| 34.227273
| 0.741397
| 0.577689
| 0
| 0.730769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.346154
| false
| 0.346154
| 0
| 0
| 0.576923
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
f203601fe4b179d2c2e6224026a166b027c7d9d4
| 104
|
py
|
Python
|
conversions/hexadecimal_to_rgb.py
|
maurxeugenio/Python
|
0700aa6313c3d03ce84ca16563c27e447f5bc7a7
|
[
"MIT"
] | null | null | null |
conversions/hexadecimal_to_rgb.py
|
maurxeugenio/Python
|
0700aa6313c3d03ce84ca16563c27e447f5bc7a7
|
[
"MIT"
] | null | null | null |
conversions/hexadecimal_to_rgb.py
|
maurxeugenio/Python
|
0700aa6313c3d03ce84ca16563c27e447f5bc7a7
|
[
"MIT"
] | null | null | null |
def hex_to_rgb(hex):
hex = hex.lstrip('#')
return tuple(int(hex[i:i+2], 16) for i in (0, 2, 4))
| 26
| 56
| 0.567308
| 22
| 104
| 2.590909
| 0.681818
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 0.211538
| 104
| 3
| 57
| 34.666667
| 0.621951
| 0
| 0
| 0
| 0
| 0
| 0.009615
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
f20a7120affd6bdcca022e14213658a558b5e1ff
| 4,652
|
py
|
Python
|
tools/pythonpkg/tests/fast/arrow/test_tpch.py
|
AldoMyrtaj/duckdb
|
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
|
[
"MIT"
] | 1,824
|
2021-04-06T19:21:01.000Z
|
2022-03-31T14:29:50.000Z
|
tools/pythonpkg/tests/fast/arrow/test_tpch.py
|
AldoMyrtaj/duckdb
|
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
|
[
"MIT"
] | 1,310
|
2021-04-06T16:04:52.000Z
|
2022-03-31T13:52:53.000Z
|
tools/pythonpkg/tests/fast/arrow/test_tpch.py
|
AldoMyrtaj/duckdb
|
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
|
[
"MIT"
] | 270
|
2021-04-09T06:18:28.000Z
|
2022-03-31T11:55:37.000Z
|
import duckdb
try:
import pyarrow
import pyarrow.parquet
import numpy as np
can_run = True
except:
can_run = False
def munge(cell):
try:
cell = round(float(cell), 2)
except (ValueError, TypeError):
cell = str(cell)
return cell
def check_result(result,answers):
for q_res in answers:
db_result = result.fetchone()
cq_results = q_res.split("|")
# The end of the rows, continue
if cq_results == [''] and str(db_result) == 'None' or str(db_result[0]) == 'None':
continue
ans_result = [munge(cell) for cell in cq_results]
db_result = [munge(cell) for cell in db_result]
assert ans_result == db_result
return True
class TestTPCHArrow(object):
def test_tpch_arrow(self,duckdb_cursor):
if not can_run:
return
tpch_tables = ['part', 'partsupp', 'supplier', 'customer', 'lineitem', 'orders', 'nation', 'region']
arrow_tables = []
duckdb_conn = duckdb.connect()
duckdb_conn.execute("CALL dbgen(sf=0.01);")
for tpch_table in tpch_tables:
duck_tbl = duckdb_conn.table(tpch_table)
arrow_tables.append(duck_tbl.arrow())
duck_arrow_table = duckdb_conn.from_arrow_table(arrow_tables[-1])
duckdb_conn.execute("DROP TABLE "+tpch_table)
duck_arrow_table.create(tpch_table)
for i in range (1,23):
query = duckdb_conn.execute("select query from tpch_queries() where query_nr="+str(i)).fetchone()[0]
answers = duckdb_conn.execute("select answer from tpch_answers() where scale_factor = 0.01 and query_nr="+str(i)).fetchone()[0].split("\n")[1:]
result = duckdb_conn.execute(query)
assert(check_result(result,answers))
print ("Query " + str(i) + " works")
def test_tpch_arrow_01(self,duckdb_cursor):
if not can_run:
return
tpch_tables = ['part', 'partsupp', 'supplier', 'customer', 'lineitem', 'orders', 'nation', 'region']
arrow_tables = []
duckdb_conn = duckdb.connect()
duckdb_conn.execute("CALL dbgen(sf=0.1);")
for tpch_table in tpch_tables:
duck_tbl = duckdb_conn.table(tpch_table)
arrow_tables.append(duck_tbl.arrow())
duck_arrow_table = duckdb_conn.from_arrow_table(arrow_tables[-1])
duckdb_conn.execute("DROP TABLE "+tpch_table)
duck_arrow_table.create(tpch_table)
for i in range (1,23):
query = duckdb_conn.execute("select query from tpch_queries() where query_nr="+str(i)).fetchone()[0]
answers = duckdb_conn.execute("select answer from tpch_answers() where scale_factor = 0.1 and query_nr="+str(i)).fetchone()[0].split("\n")[1:]
result = duckdb_conn.execute(query)
assert(check_result(result,answers))
print ("Query " + str(i) + " works")
def test_tpch_arrow_batch(self,duckdb_cursor):
if not can_run:
return
tpch_tables = ['part', 'partsupp', 'supplier', 'customer', 'lineitem', 'orders', 'nation', 'region']
arrow_tables = []
duckdb_conn = duckdb.connect()
duckdb_conn.execute("CALL dbgen(sf=0.01);")
for tpch_table in tpch_tables:
duck_tbl = duckdb_conn.table(tpch_table)
arrow_tables.append(pyarrow.Table.from_batches(duck_tbl.arrow().to_batches(10)))
duck_arrow_table = duckdb_conn.from_arrow_table(arrow_tables[-1])
duckdb_conn.execute("DROP TABLE "+tpch_table)
duck_arrow_table.create(tpch_table)
for i in range (1,23):
query = duckdb_conn.execute("select query from tpch_queries() where query_nr="+str(i)).fetchone()[0]
answers = duckdb_conn.execute("select answer from tpch_answers() where scale_factor = 0.01 and query_nr="+str(i)).fetchone()[0].split("\n")[1:]
result = duckdb_conn.execute(query)
assert(check_result(result,answers))
print ("Query " + str(i) + " works")
duckdb_conn.execute("PRAGMA threads=4")
duckdb_conn.execute("PRAGMA verify_parallelism")
for i in range (1,23):
query = duckdb_conn.execute("select query from tpch_queries() where query_nr="+str(i)).fetchone()[0]
answers = duckdb_conn.execute("select answer from tpch_answers() where scale_factor = 0.01 and query_nr="+str(i)).fetchone()[0].split("\n")[1:]
result = duckdb_conn.execute(query)
assert(check_result(result,answers))
print ("Query " + str(i) + " works (Parallel)")
| 41.168142
| 155
| 0.622743
| 607
| 4,652
| 4.546952
| 0.171334
| 0.105072
| 0.123188
| 0.066667
| 0.797101
| 0.797101
| 0.77971
| 0.77971
| 0.77971
| 0.77971
| 0
| 0.015186
| 0.249785
| 4,652
| 112
| 156
| 41.535714
| 0.775645
| 0.006234
| 0
| 0.644444
| 0
| 0
| 0.184808
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 1
| 0.055556
| false
| 0
| 0.044444
| 0
| 0.166667
| 0.044444
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.