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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
960faa636c63399c1988c58ce0e7c98b90dc797e
| 169
|
py
|
Python
|
Lib/async/test/test_echoupper.py
|
pyparallel/pyparallel
|
11e8c6072d48c8f13641925d17b147bf36ee0ba3
|
[
"PSF-2.0"
] | 652
|
2015-07-26T00:00:17.000Z
|
2022-02-24T18:30:04.000Z
|
Lib/async/test/test_echoupper.py
|
tpn/pyparallel
|
11e8c6072d48c8f13641925d17b147bf36ee0ba3
|
[
"PSF-2.0"
] | 8
|
2015-09-07T03:38:19.000Z
|
2021-05-23T03:18:51.000Z
|
Lib/async/test/test_echoupper.py
|
tpn/pyparallel
|
11e8c6072d48c8f13641925d17b147bf36ee0ba3
|
[
"PSF-2.0"
] | 40
|
2015-07-24T19:45:08.000Z
|
2021-11-01T14:54:56.000Z
|
import async
from async.services import EchoUpperData
server = async.server('10.211.55.3', 20007)
async.register(transport=server, protocol=EchoUpperData)
async.run()
| 21.125
| 56
| 0.792899
| 23
| 169
| 5.826087
| 0.652174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084416
| 0.088757
| 169
| 7
| 57
| 24.142857
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0.065476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.4
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
824e54bffa5be7c6d4c645bb089554003a4f25bc
| 189
|
py
|
Python
|
Lyft-Dental/payments/pay/urls.py
|
Abhik1998/Lyft-sample_project
|
3f9a79fb86c7abee713ae37245f5e7971be09139
|
[
"MIT"
] | 1
|
2021-01-09T08:42:24.000Z
|
2021-01-09T08:42:24.000Z
|
Lyft-Dental/payments/pay/urls.py
|
Abhik1998/Lyft-sample_project
|
3f9a79fb86c7abee713ae37245f5e7971be09139
|
[
"MIT"
] | null | null | null |
Lyft-Dental/payments/pay/urls.py
|
Abhik1998/Lyft-sample_project
|
3f9a79fb86c7abee713ae37245f5e7971be09139
|
[
"MIT"
] | null | null | null |
from django.urls import path
from .views import initiate_payment, callback
urlpatterns = [
path('', initiate_payment, name='pay'),
path('callback/', callback, name='callback'),
]
| 21
| 49
| 0.703704
| 22
| 189
| 5.954545
| 0.545455
| 0.229008
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153439
| 189
| 8
| 50
| 23.625
| 0.81875
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
826cefe38aada7c6d25cf287d99f1f536d838887
| 97
|
py
|
Python
|
src/meetings/admin.py
|
Yalnyra/office-meeting-reservation
|
52f558ec11a9b5d69c28acb60de132d70b0a789b
|
[
"bzip2-1.0.6"
] | null | null | null |
src/meetings/admin.py
|
Yalnyra/office-meeting-reservation
|
52f558ec11a9b5d69c28acb60de132d70b0a789b
|
[
"bzip2-1.0.6"
] | null | null | null |
src/meetings/admin.py
|
Yalnyra/office-meeting-reservation
|
52f558ec11a9b5d69c28acb60de132d70b0a789b
|
[
"bzip2-1.0.6"
] | null | null | null |
from django.contrib import admin
from .models import Meeting
admin.site.register(Meeting)
| 16.166667
| 33
| 0.773196
| 13
| 97
| 5.769231
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164948
| 97
| 5
| 34
| 19.4
| 0.925926
| 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
| 0
| 0
|
0
| 4
|
829007d1ff44f42bdcbdcc5f79b823572db44839
| 194
|
py
|
Python
|
10/testtime.py
|
M0nica/python-foundations
|
fe5065d3af71511bdd0fcf437d1d9f15f9faf1ee
|
[
"MIT"
] | null | null | null |
10/testtime.py
|
M0nica/python-foundations
|
fe5065d3af71511bdd0fcf437d1d9f15f9faf1ee
|
[
"MIT"
] | null | null | null |
10/testtime.py
|
M0nica/python-foundations
|
fe5065d3af71511bdd0fcf437d1d9f15f9faf1ee
|
[
"MIT"
] | null | null | null |
import time
print (time.strftime("%B %e, %Y"))
# Guides:
# how to formate date:
# http://strftime.net/
# how to use time:
# http://www.cyberciti.biz/faq/howto-get-current-date-time-in-python/
| 19.4
| 69
| 0.680412
| 32
| 194
| 4.125
| 0.75
| 0.075758
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123711
| 194
| 9
| 70
| 21.555556
| 0.776471
| 0.690722
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
82c5f5ed054e4540c225e7fd44668ed1c842c358
| 312
|
py
|
Python
|
exercicios/ex074.py
|
CinatitBR/exercicios-phyton
|
16d9c14a83c9dbd6f7bda5477d665848bcd91184
|
[
"MIT"
] | null | null | null |
exercicios/ex074.py
|
CinatitBR/exercicios-phyton
|
16d9c14a83c9dbd6f7bda5477d665848bcd91184
|
[
"MIT"
] | null | null | null |
exercicios/ex074.py
|
CinatitBR/exercicios-phyton
|
16d9c14a83c9dbd6f7bda5477d665848bcd91184
|
[
"MIT"
] | null | null | null |
from random import randint
numeros = (randint(0, 10), randint(0, 10), randint(0, 10), randint(0, 10), randint(0, 10))
print(f'Os cinco números são: ', end='')
for n in numeros: # Exibe números sorteados
print(n, end=' ')
print(f'\nO MAIOR número é {max(numeros)}')
print(f'O MENOR número é {min(numeros)}')
| 39
| 90
| 0.666667
| 53
| 312
| 3.924528
| 0.509434
| 0.192308
| 0.240385
| 0.326923
| 0.240385
| 0.240385
| 0.240385
| 0.240385
| 0.240385
| 0.240385
| 0
| 0.056818
| 0.153846
| 312
| 7
| 91
| 44.571429
| 0.731061
| 0.073718
| 0
| 0
| 0
| 0
| 0.303136
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
7d6a59d7fa23a596aac99cdbb9dd178d370f5c83
| 95
|
py
|
Python
|
hydropy/__init__.py
|
GironsLopez/hydropy
|
59cb29254e4a3f02f994e2d049e3c1135e9295a2
|
[
"MIT"
] | null | null | null |
hydropy/__init__.py
|
GironsLopez/hydropy
|
59cb29254e4a3f02f994e2d049e3c1135e9295a2
|
[
"MIT"
] | null | null | null |
hydropy/__init__.py
|
GironsLopez/hydropy
|
59cb29254e4a3f02f994e2d049e3c1135e9295a2
|
[
"MIT"
] | null | null | null |
"""
Hydropy
=======
Provides functions to work with hydrological processes and equations
"""
| 11.875
| 68
| 0.705263
| 10
| 95
| 6.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 7
| 69
| 13.571429
| 0.8375
| 0.894737
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7d745ae2b2c11edcf86ebca48a6d9d1699e9100c
| 98
|
py
|
Python
|
test.py
|
ifplusor/actrie
|
54e9aff441594fbcd30a936d4fbc300ad81007b9
|
[
"BSD-3-Clause"
] | 8
|
2017-10-01T04:47:12.000Z
|
2022-02-15T10:16:11.000Z
|
test.py
|
ifplusor/actrie
|
54e9aff441594fbcd30a936d4fbc300ad81007b9
|
[
"BSD-3-Clause"
] | null | null | null |
test.py
|
ifplusor/actrie
|
54e9aff441594fbcd30a936d4fbc300ad81007b9
|
[
"BSD-3-Clause"
] | 4
|
2018-04-06T08:27:02.000Z
|
2021-05-11T07:56:17.000Z
|
# coding=utf-8
from actrie.tests.test_matcher import test
if __name__ == "__main__":
test()
| 14
| 42
| 0.704082
| 14
| 98
| 4.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012346
| 0.173469
| 98
| 6
| 43
| 16.333333
| 0.728395
| 0.122449
| 0
| 0
| 0
| 0
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
7d762add2bb0e919d8e50f41074b703f99873c98
| 265
|
py
|
Python
|
quickvision/pretrained/_pretrained_weights.py
|
zlapp/quickvision
|
cbf87756088bd7fe24d380ca831f5c1a204466f8
|
[
"Apache-2.0"
] | 47
|
2020-11-15T03:36:48.000Z
|
2021-04-08T05:28:02.000Z
|
quickvision/pretrained/_pretrained_weights.py
|
zlapp/quickvision
|
cbf87756088bd7fe24d380ca831f5c1a204466f8
|
[
"Apache-2.0"
] | 78
|
2020-11-14T17:55:28.000Z
|
2021-04-06T08:55:24.000Z
|
quickvision/pretrained/_pretrained_weights.py
|
zlapp/quickvision
|
cbf87756088bd7fe24d380ca831f5c1a204466f8
|
[
"Apache-2.0"
] | 15
|
2020-11-14T18:01:04.000Z
|
2021-02-16T14:50:12.000Z
|
import torch
__all__ = ["_load_pretrained_weights"]
def _load_pretrained_weights(weights_dict, model_name: str, pretrained: str):
state_dict = torch.hub.load_state_dict_from_url(weights_dict[model_name][pretrained], map_location="cpu")
return state_dict
| 29.444444
| 109
| 0.8
| 37
| 265
| 5.162162
| 0.513514
| 0.141361
| 0.219895
| 0.209424
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10566
| 265
| 8
| 110
| 33.125
| 0.805907
| 0
| 0
| 0
| 0
| 0
| 0.101887
| 0.090566
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
7d78430382af94d8d75d17a72371f34356ac1d39
| 193
|
py
|
Python
|
hris/apps/jobs/admin.py
|
Minedomain/hris_backend
|
90aab497c076c2d4ce4e05a441db0ee7a175df57
|
[
"MIT"
] | null | null | null |
hris/apps/jobs/admin.py
|
Minedomain/hris_backend
|
90aab497c076c2d4ce4e05a441db0ee7a175df57
|
[
"MIT"
] | null | null | null |
hris/apps/jobs/admin.py
|
Minedomain/hris_backend
|
90aab497c076c2d4ce4e05a441db0ee7a175df57
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import *
@admin.register(Job)
class JobAdmin(admin.ModelAdmin):
list_display = ['job_id', 'job_title', 'duties', 'min_salary', 'max_salary']
| 24.125
| 80
| 0.73057
| 26
| 193
| 5.230769
| 0.730769
| 0.161765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124352
| 193
| 7
| 81
| 27.571429
| 0.804734
| 0
| 0
| 0
| 0
| 0
| 0.212435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
7db12d202da616ad47115b53db18fc8f8d4df1a8
| 178
|
py
|
Python
|
Python/bot_2.py
|
maurovasconcelos/Ola-Mundo
|
526c6c271fbe916c4f9f22153828e4d8c726a544
|
[
"MIT"
] | 1
|
2021-02-16T17:36:53.000Z
|
2021-02-16T17:36:53.000Z
|
Python/bot_2.py
|
maurovasconcelos/Ola-Mundo
|
526c6c271fbe916c4f9f22153828e4d8c726a544
|
[
"MIT"
] | null | null | null |
Python/bot_2.py
|
maurovasconcelos/Ola-Mundo
|
526c6c271fbe916c4f9f22153828e4d8c726a544
|
[
"MIT"
] | null | null | null |
from selenium import webdriver
navegador = webdriver.Chrome()
navegador.get("https://webstatic-sea.mihoyo.com/ys/event/signin-sea/index.html?act_id=e202102251931481&lang=pt-pt")
| 44.5
| 115
| 0.808989
| 26
| 178
| 5.5
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 0.044944
| 178
| 4
| 115
| 44.5
| 0.752941
| 0
| 0
| 0
| 0
| 0.333333
| 0.547486
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
7db1db7e3a4320d312306a5a9f6265803704a70b
| 18,177
|
py
|
Python
|
vendor/istio.io/api/python/istio_api/envoy/config/filter/http/jwt_auth/v2alpha1/config_pb2.py
|
PinZhang/istio
|
dce455456d77ca5af34ba5848f9704577349c6bd
|
[
"Apache-2.0"
] | 794
|
2018-07-12T06:08:10.000Z
|
2019-05-12T20:06:00.000Z
|
vendor/istio.io/api/python/istio_api/envoy/config/filter/http/jwt_auth/v2alpha1/config_pb2.py
|
PinZhang/istio
|
dce455456d77ca5af34ba5848f9704577349c6bd
|
[
"Apache-2.0"
] | 25
|
2018-07-20T08:53:42.000Z
|
2019-05-05T06:23:11.000Z
|
vendor/istio.io/api/python/istio_api/envoy/config/filter/http/jwt_auth/v2alpha1/config_pb2.py
|
PinZhang/istio
|
dce455456d77ca5af34ba5848f9704577349c6bd
|
[
"Apache-2.0"
] | 116
|
2018-07-12T15:24:17.000Z
|
2019-05-10T10:11:32.000Z
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: envoy/config/filter/http/jwt_auth/v2alpha1/config.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='envoy/config/filter/http/jwt_auth/v2alpha1/config.proto',
package='istio.envoy.config.filter.http.jwt_auth.v2alpha1',
syntax='proto3',
serialized_pb=_b('\n7envoy/config/filter/http/jwt_auth/v2alpha1/config.proto\x12\x30istio.envoy.config.filter.http.jwt_auth.v2alpha1\x1a\x1egoogle/protobuf/duration.proto\"k\n\x07HttpUri\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x11\n\x07\x63luster\x18\x02 \x01(\tH\x00\x12*\n\x07timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x14\n\x12http_upstream_type\"^\n\nDataSource\x12\x12\n\x08\x66ilename\x18\x01 \x01(\tH\x00\x12\x16\n\x0cinline_bytes\x18\x02 \x01(\x0cH\x00\x12\x17\n\rinline_string\x18\x03 \x01(\tH\x00\x42\x0b\n\tspecifier\"\x87\x03\n\x07JwtRule\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x11\n\taudiences\x18\x02 \x03(\t\x12S\n\x0bremote_jwks\x18\x03 \x01(\x0b\x32<.istio.envoy.config.filter.http.jwt_auth.v2alpha1.RemoteJwksH\x00\x12R\n\nlocal_jwks\x18\x04 \x01(\x0b\x32<.istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSourceH\x00\x12\x0f\n\x07\x66orward\x18\x05 \x01(\x08\x12Q\n\x0c\x66rom_headers\x18\x06 \x03(\x0b\x32;.istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtHeader\x12\x13\n\x0b\x66rom_params\x18\x07 \x03(\t\x12\x1e\n\x16\x66orward_payload_header\x18\x08 \x01(\tB\x17\n\x15jwks_source_specifier\"\x8c\x01\n\nRemoteJwks\x12K\n\x08http_uri\x18\x01 \x01(\x0b\x32\x39.istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri\x12\x31\n\x0e\x63\x61\x63he_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"/\n\tJwtHeader\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cvalue_prefix\x18\x02 \x01(\t\"~\n\x11JwtAuthentication\x12H\n\x05rules\x18\x01 \x03(\x0b\x32\x39.istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule\x12\x1f\n\x17\x61llow_missing_or_failed\x18\x02 \x01(\x08\x42\x39Z7istio.io/api/envoy/config/filter/http/jwt_auth/v2alpha1b\x06proto3')
,
dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,])
_HTTPURI = _descriptor.Descriptor(
name='HttpUri',
full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='uri', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri.uri', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='cluster', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri.cluster', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timeout', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri.timeout', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='http_upstream_type', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri.http_upstream_type',
index=0, containing_type=None, fields=[]),
],
serialized_start=141,
serialized_end=248,
)
_DATASOURCE = _descriptor.Descriptor(
name='DataSource',
full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSource',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='filename', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSource.filename', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='inline_bytes', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSource.inline_bytes', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='inline_string', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSource.inline_string', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='specifier', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSource.specifier',
index=0, containing_type=None, fields=[]),
],
serialized_start=250,
serialized_end=344,
)
_JWTRULE = _descriptor.Descriptor(
name='JwtRule',
full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='issuer', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.issuer', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='audiences', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.audiences', index=1,
number=2, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='remote_jwks', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.remote_jwks', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='local_jwks', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.local_jwks', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='forward', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.forward', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='from_headers', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.from_headers', index=5,
number=6, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='from_params', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.from_params', index=6,
number=7, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='forward_payload_header', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.forward_payload_header', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='jwks_source_specifier', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule.jwks_source_specifier',
index=0, containing_type=None, fields=[]),
],
serialized_start=347,
serialized_end=738,
)
_REMOTEJWKS = _descriptor.Descriptor(
name='RemoteJwks',
full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.RemoteJwks',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='http_uri', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.RemoteJwks.http_uri', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='cache_duration', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.RemoteJwks.cache_duration', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=741,
serialized_end=881,
)
_JWTHEADER = _descriptor.Descriptor(
name='JwtHeader',
full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtHeader',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtHeader.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value_prefix', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtHeader.value_prefix', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=883,
serialized_end=930,
)
_JWTAUTHENTICATION = _descriptor.Descriptor(
name='JwtAuthentication',
full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtAuthentication',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='rules', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtAuthentication.rules', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='allow_missing_or_failed', full_name='istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtAuthentication.allow_missing_or_failed', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=932,
serialized_end=1058,
)
_HTTPURI.fields_by_name['timeout'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_HTTPURI.oneofs_by_name['http_upstream_type'].fields.append(
_HTTPURI.fields_by_name['cluster'])
_HTTPURI.fields_by_name['cluster'].containing_oneof = _HTTPURI.oneofs_by_name['http_upstream_type']
_DATASOURCE.oneofs_by_name['specifier'].fields.append(
_DATASOURCE.fields_by_name['filename'])
_DATASOURCE.fields_by_name['filename'].containing_oneof = _DATASOURCE.oneofs_by_name['specifier']
_DATASOURCE.oneofs_by_name['specifier'].fields.append(
_DATASOURCE.fields_by_name['inline_bytes'])
_DATASOURCE.fields_by_name['inline_bytes'].containing_oneof = _DATASOURCE.oneofs_by_name['specifier']
_DATASOURCE.oneofs_by_name['specifier'].fields.append(
_DATASOURCE.fields_by_name['inline_string'])
_DATASOURCE.fields_by_name['inline_string'].containing_oneof = _DATASOURCE.oneofs_by_name['specifier']
_JWTRULE.fields_by_name['remote_jwks'].message_type = _REMOTEJWKS
_JWTRULE.fields_by_name['local_jwks'].message_type = _DATASOURCE
_JWTRULE.fields_by_name['from_headers'].message_type = _JWTHEADER
_JWTRULE.oneofs_by_name['jwks_source_specifier'].fields.append(
_JWTRULE.fields_by_name['remote_jwks'])
_JWTRULE.fields_by_name['remote_jwks'].containing_oneof = _JWTRULE.oneofs_by_name['jwks_source_specifier']
_JWTRULE.oneofs_by_name['jwks_source_specifier'].fields.append(
_JWTRULE.fields_by_name['local_jwks'])
_JWTRULE.fields_by_name['local_jwks'].containing_oneof = _JWTRULE.oneofs_by_name['jwks_source_specifier']
_REMOTEJWKS.fields_by_name['http_uri'].message_type = _HTTPURI
_REMOTEJWKS.fields_by_name['cache_duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_JWTAUTHENTICATION.fields_by_name['rules'].message_type = _JWTRULE
DESCRIPTOR.message_types_by_name['HttpUri'] = _HTTPURI
DESCRIPTOR.message_types_by_name['DataSource'] = _DATASOURCE
DESCRIPTOR.message_types_by_name['JwtRule'] = _JWTRULE
DESCRIPTOR.message_types_by_name['RemoteJwks'] = _REMOTEJWKS
DESCRIPTOR.message_types_by_name['JwtHeader'] = _JWTHEADER
DESCRIPTOR.message_types_by_name['JwtAuthentication'] = _JWTAUTHENTICATION
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
HttpUri = _reflection.GeneratedProtocolMessageType('HttpUri', (_message.Message,), dict(
DESCRIPTOR = _HTTPURI,
__module__ = 'envoy.config.filter.http.jwt_auth.v2alpha1.config_pb2'
# @@protoc_insertion_point(class_scope:istio.envoy.config.filter.http.jwt_auth.v2alpha1.HttpUri)
))
_sym_db.RegisterMessage(HttpUri)
DataSource = _reflection.GeneratedProtocolMessageType('DataSource', (_message.Message,), dict(
DESCRIPTOR = _DATASOURCE,
__module__ = 'envoy.config.filter.http.jwt_auth.v2alpha1.config_pb2'
# @@protoc_insertion_point(class_scope:istio.envoy.config.filter.http.jwt_auth.v2alpha1.DataSource)
))
_sym_db.RegisterMessage(DataSource)
JwtRule = _reflection.GeneratedProtocolMessageType('JwtRule', (_message.Message,), dict(
DESCRIPTOR = _JWTRULE,
__module__ = 'envoy.config.filter.http.jwt_auth.v2alpha1.config_pb2'
# @@protoc_insertion_point(class_scope:istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtRule)
))
_sym_db.RegisterMessage(JwtRule)
RemoteJwks = _reflection.GeneratedProtocolMessageType('RemoteJwks', (_message.Message,), dict(
DESCRIPTOR = _REMOTEJWKS,
__module__ = 'envoy.config.filter.http.jwt_auth.v2alpha1.config_pb2'
# @@protoc_insertion_point(class_scope:istio.envoy.config.filter.http.jwt_auth.v2alpha1.RemoteJwks)
))
_sym_db.RegisterMessage(RemoteJwks)
JwtHeader = _reflection.GeneratedProtocolMessageType('JwtHeader', (_message.Message,), dict(
DESCRIPTOR = _JWTHEADER,
__module__ = 'envoy.config.filter.http.jwt_auth.v2alpha1.config_pb2'
# @@protoc_insertion_point(class_scope:istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtHeader)
))
_sym_db.RegisterMessage(JwtHeader)
JwtAuthentication = _reflection.GeneratedProtocolMessageType('JwtAuthentication', (_message.Message,), dict(
DESCRIPTOR = _JWTAUTHENTICATION,
__module__ = 'envoy.config.filter.http.jwt_auth.v2alpha1.config_pb2'
# @@protoc_insertion_point(class_scope:istio.envoy.config.filter.http.jwt_auth.v2alpha1.JwtAuthentication)
))
_sym_db.RegisterMessage(JwtAuthentication)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z7istio.io/api/envoy/config/filter/http/jwt_auth/v2alpha1'))
# @@protoc_insertion_point(module_scope)
| 45.329177
| 1,704
| 0.760301
| 2,426
| 18,177
| 5.408491
| 0.097279
| 0.04207
| 0.064629
| 0.076747
| 0.74598
| 0.719229
| 0.694002
| 0.672967
| 0.658182
| 0.628839
| 0
| 0.037471
| 0.107333
| 18,177
| 400
| 1,705
| 45.4425
| 0.77117
| 0.042966
| 0
| 0.628809
| 1
| 0.00277
| 0.287719
| 0.244406
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.019391
| 0
| 0.019391
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7dd3bf8d2c2f8bbd741f59dd7b443601e8b83316
| 282
|
py
|
Python
|
scripts/get_plat_name.py
|
uuosio/gscdk
|
995d99948d7090032f76b05656cad29c6cfbb647
|
[
"BSD-3-Clause"
] | 6
|
2021-09-03T09:02:39.000Z
|
2022-01-12T06:31:09.000Z
|
scripts/get_plat_name.py
|
learnforpractice/gscdk
|
dc17c43fa2be28500f38897a29bbbd9eb9c7ada7
|
[
"BSD-3-Clause"
] | 1
|
2021-11-01T16:46:09.000Z
|
2021-11-04T12:51:45.000Z
|
scripts/get_plat_name.py
|
learnforpractice/gscdk
|
dc17c43fa2be28500f38897a29bbbd9eb9c7ada7
|
[
"BSD-3-Clause"
] | 2
|
2021-11-10T01:56:15.000Z
|
2022-01-13T14:27:31.000Z
|
import platform
#check the platform for linux, macos, windows
if platform.system() == "Linux":
print("manylinux1_x86_64")
elif platform.system() == "Windows":
print("win-amd64")
elif platform.system() == "Darwin":
print("macosx_10_15_x86_64")
else:
print("Unknown")
| 25.636364
| 45
| 0.691489
| 37
| 282
| 5.108108
| 0.621622
| 0.222222
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0.148936
| 282
| 10
| 46
| 28.2
| 0.725
| 0.156028
| 0
| 0
| 0
| 0
| 0.295359
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.111111
| 0
| 0.111111
| 0.444444
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
8147a9961c8020efb6e931a049f2c9b13c430d08
| 84
|
py
|
Python
|
PMMH/apps/game/map/admin.py
|
metinberkkaratas/ProjectMagic-MightofHeroes
|
578697e637aba0f18b4f83762bf1c87fb20db2ee
|
[
"MIT"
] | null | null | null |
PMMH/apps/game/map/admin.py
|
metinberkkaratas/ProjectMagic-MightofHeroes
|
578697e637aba0f18b4f83762bf1c87fb20db2ee
|
[
"MIT"
] | 4
|
2021-03-19T02:37:45.000Z
|
2022-02-10T11:18:04.000Z
|
PMMH/apps/game/map/admin.py
|
metinberkkaratas/ProjectMagic-MightofHeroes
|
578697e637aba0f18b4f83762bf1c87fb20db2ee
|
[
"MIT"
] | 1
|
2019-10-21T20:32:20.000Z
|
2019-10-21T20:32:20.000Z
|
from django.contrib import admin
from .models import Map
admin.site.register(Map)
| 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
| 0
| 0
|
0
| 4
|
815225f9552d4d71ea93b38bd616e126479cf8c1
| 476
|
py
|
Python
|
htdfsdk/utils.py
|
youngqqcn/htdfsdk
|
c22f213a967c8233bb6ccfb01bf148112efd44db
|
[
"MIT"
] | 2
|
2021-01-21T01:46:29.000Z
|
2021-03-12T05:59:19.000Z
|
htdfsdk/utils.py
|
youngqqcn/htdfsdk
|
c22f213a967c8233bb6ccfb01bf148112efd44db
|
[
"MIT"
] | null | null | null |
htdfsdk/utils.py
|
youngqqcn/htdfsdk
|
c22f213a967c8233bb6ccfb01bf148112efd44db
|
[
"MIT"
] | null | null | null |
#coding:utf8
#author: yqq
#date: 2020/12/15 下午5:38
#descriptions:
from decimal import Decimal, getcontext
# getcontext()
def htdf_to_satoshi(amount_htdf: [float, int, str]) -> int:
return int(Decimal(str(amount_htdf)) * (10 ** 8))
if __name__ == '__main__':
assert htdf_to_satoshi(139623.71827296) == 13962371827296
assert htdf_to_satoshi('139623.71827296') == 13962371827296
assert htdf_to_satoshi(13962371827296) == 13962371827296 * 10 ** 8
pass
| 21.636364
| 70
| 0.714286
| 61
| 476
| 5.278689
| 0.557377
| 0.074534
| 0.161491
| 0.177019
| 0.350932
| 0.350932
| 0.350932
| 0.350932
| 0.350932
| 0.350932
| 0
| 0.255
| 0.159664
| 476
| 21
| 71
| 22.666667
| 0.55
| 0.14916
| 0
| 0
| 0
| 0
| 0.057644
| 0
| 0
| 0
| 0
| 0
| 0.375
| 1
| 0.125
| false
| 0.125
| 0.125
| 0.125
| 0.375
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 4
|
815d74b7b1790e6b997d1b97f06db916a5d075c4
| 65
|
py
|
Python
|
tests/gear_scripts/buitin_runtime_func_GearsBuilder.py
|
jsam/redgrease
|
245755b34bce287c63abb6624478cdf8189816b6
|
[
"MIT"
] | 17
|
2021-02-26T23:03:39.000Z
|
2022-01-26T11:21:49.000Z
|
tests/gear_scripts/buitin_runtime_func_GearsBuilder.py
|
jsam/redgrease
|
245755b34bce287c63abb6624478cdf8189816b6
|
[
"MIT"
] | 87
|
2021-02-16T08:54:59.000Z
|
2021-08-18T07:21:39.000Z
|
tests/gear_scripts/buitin_runtime_func_GearsBuilder.py
|
jsam/redgrease
|
245755b34bce287c63abb6624478cdf8189816b6
|
[
"MIT"
] | 3
|
2021-04-21T07:57:43.000Z
|
2021-10-04T09:13:14.000Z
|
from redgrease import GearsBuilder
gb = GearsBuilder()
gb.run()
| 13
| 34
| 0.769231
| 8
| 65
| 6.25
| 0.75
| 0.56
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138462
| 65
| 4
| 35
| 16.25
| 0.892857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
81780d1d21d48080345dc52c64611a0acffa03d7
| 232
|
py
|
Python
|
__init__.py
|
rolc/python-package
|
272fb6da9d7aa3c2a0c53dea6d4e958409ac5d12
|
[
"MIT"
] | null | null | null |
__init__.py
|
rolc/python-package
|
272fb6da9d7aa3c2a0c53dea6d4e958409ac5d12
|
[
"MIT"
] | null | null | null |
__init__.py
|
rolc/python-package
|
272fb6da9d7aa3c2a0c53dea6d4e958409ac5d12
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
#-------------------------------IMPORT--------------------------------#
from lib import *
#-------------------------------EXPORT--------------------------------#
__all__ = ['<#PREFIX#>_app','<#PREFIX#>_index']
| 23.2
| 71
| 0.284483
| 13
| 232
| 4.615385
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060345
| 232
| 9
| 72
| 25.777778
| 0.275229
| 0.663793
| 0
| 0
| 0
| 0
| 0.410959
| 0
| 0
| 0
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
817a13b6a8ab8c5ae685c931b654984848f5a51f
| 36,420
|
py
|
Python
|
bustime/requestmock.py
|
RemyPorter/BusTimeClient
|
a0bd3ef7e24e132e964e6847261ed6888e5735ee
|
[
"MIT"
] | 2
|
2017-06-24T14:10:42.000Z
|
2018-02-16T20:44:07.000Z
|
bustime/requestmock.py
|
RemyPorter/BusTimeClient
|
a0bd3ef7e24e132e964e6847261ed6888e5735ee
|
[
"MIT"
] | null | null | null |
bustime/requestmock.py
|
RemyPorter/BusTimeClient
|
a0bd3ef7e24e132e964e6847261ed6888e5735ee
|
[
"MIT"
] | null | null | null |
from urllib.parse import urlparse, parse_qs
from io import BytesIO
import json
class MockRequest:
def getmethod(self, path):
apiend = "v2/"
start = path.find(apiend) + len(apiend)
return path[start:]
def urlopen(self, url):
output = BytesIO()
parsed = urlparse(url)
params = parse_qs(parsed.query)
method = self.getmethod(parsed.path)
assert("key" in params)
s = getattr(self, method)(**params)
output.write(s.encode("UTF8"))
output.seek(0)
return output
def gettime(self, **kwargs):
return json.dumps(
{"bustime-response": {"tm": "20141012 10:21:04"}}
)
def getdirections(self, **kwargs):
assert("rt" in kwargs.keys())
return json.dumps(
{"bustime-response":
{"directions": [{"dir":"INBOUND"}, {"dir":"OUTBOUND"}]}
}
)
def getstops(self, **kwargs):
assert("rt" in kwargs.keys())
assert("dir" in kwargs.keys())
return json.dumps(
{
"bustime-response":
{"stops": [
{'stpid': '2564', 'stpnm': '5th Ave at Meyran Ave',
'lon': -79.959239533731, 'lat': 40.441172012068}]}
})
def getpredictions(self, **kwargs):
assert("stpid" in kwargs)
assert(type(kwargs.get("rt", [])) == list)
return json.dumps({
"bustime-response":{
"prd": [{'rt': '71C', 'typ': 'A',
'prdctdn': '5', 'prdtm': '20141022 12:37',
'rtdir': 'INBOUND', 'zone': '',
'des': 'Downtown', 'dly': False,
'dstp': 4198, 'stpnm': '5th Ave at Chesterfield Rd',
'stpid': '38', 'tatripid': '159261',
'tmstmp': '20141022 12:31', 'tablockid': '071C-150',
'vid': '5678'}]}
})
def getvehicles(self, **kwargs):
assert(len(kwargs.get("vid", [])) > 0 or len(kwargs.get("rt", [])) > 0)
return json.dumps({
"bustime-response":{
"vehicle":[{'tablockid': '071C-148', 'pid': 2363,
'tatripid': '159264', 'zone': '', 'des': 'Downtown',
'dly': False, 'spd': 0, 'pdist': 17607, 'hdg': '299',
'tmstmp': '20141022 12:52', 'lat': '40.46042251586914',
'rt': '71C', 'vid': '5669', 'lon': '-79.92157814719461'}]
}
})
def getroutes(self, **kwargs):
return json.dumps({
"bustime-response": {
"routes": [{'rt': '12', 'rtnm': 'MCKNIGHT', 'rtclr': '#cc00cc'}]
}
})
def getpatterns(self, **kwargs):
assert(len(kwargs.get("pid", [])) > 0 or len(kwargs.get("rt", [])) > 0)
return json.dumps({
"bustime-response": { #yes, it's a fucking long line. I wanted to have a solid pattern for testing.
"ptr": [{'ln': 48062.0, 'rtdir': 'INBOUND', 'pid': 2363, 'pt': [{'typ': 'S', 'stpid': '19988', 'seq': 1, 'lon': -79.89193733333298, 'stpnm': 'LAYOVER BRUSHTON TERMINAL', 'pdist': 0.0, 'lat': 40.449901185011}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.449815459172, 'lon': -79.89199634193102, 'seq': 2}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.449160346541, 'lon': -79.89106988890501, 'seq': 3}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.44854800997, 'lon': -79.89031887038101, 'seq': 4}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.447739717154, 'lon': -79.88950347883997, 'seq': 5}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.447155944074, 'lon': -79.88896703703699, 'seq': 6}, {'typ': 'S', 'stpid': '16111', 'seq': 7, 'lon': -79.88872563822599, 'stpnm': 'Wilkinsburg Station stop B', 'pdist': 1664.0, 'lat': 40.446845684989}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.445680436902, 'lon': -79.88800934987802, 'seq': 8}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.4445128499, 'lon': -79.88743535714798, 'seq': 9}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.444227073768, 'lon': -79.88744608598398, 'seq': 10}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.44292065312, 'lon': -79.88707057672201, 'seq': 11}, {'typ': 'S', 'stpid': '8153', 'seq': 12, 'lon': -79.88699011045202, 'stpnm': 'Hay St ramp outbound shelter', 'pdist': 3184.0, 'lat': 40.442822670548}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442713549274, 'lon': -79.886595606477, 'seq': 13}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442472674453, 'lon': -79.886718988092, 'seq': 14}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442713549274, 'lon': -79.887507557543, 'seq': 15}, {'typ': 'S', 'stpid': '19871', 'seq': 16, 'lon': -79.887233972223, 'stpnm': 'Pennwood Ave at Franklin', 'pdist': 3809.0, 'lat': 40.441803119568}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.44066404441, 'lon': -79.886885285051, 'seq': 17}, {'typ': 'S', 'stpid': '7084', 'seq': 18, 'lon': -79.887757249342, 'stpnm': 'Rowland Connector opp Highrise', 'pdist': 4362.0, 'lat': 40.440518615096}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.4404410428, 'lon': -79.887928910719, 'seq': 19}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.440228739215, 'lon': -79.888191767202, 'seq': 20}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.440196077066, 'lon': -79.888325877653, 'seq': 21}, {'typ': 'S', 'stpid': '7085', 'seq': 22, 'lon': -79.889442955026, 'stpnm': 'Kelly Ave at Pitt St', 'pdist': 4987.0, 'lat': 40.440550595192}, {'typ': 'S', 'stpid': '7086', 'seq': 23, 'lon': -79.891097240081, 'stpnm': 'Kelly Ave at West St', 'pdist': 5545.0, 'lat': 40.441113108446}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.441213613573, 'lon': -79.891389862428, 'seq': 24}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.44125444064, 'lon': -79.891786829362, 'seq': 25}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.441266688755, 'lon': -79.892339364419, 'seq': 26}, {'typ': 'S', 'stpid': '8224', 'seq': 27, 'lon': -79.892355457673, 'stpnm': 'Trenton Ave opp Rebecca (nearside)', 'pdist': 6113.0, 'lat': 40.441887256997}, {'typ': 'S', 'stpid': '8225', 'seq': 28, 'lon': -79.892379833333, 'stpnm': 'Trenton Ave at Franklin', 'pdist': 6606.0, 'lat': 40.443183767554}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.443363401196, 'lon': -79.892342282407, 'seq': 29}, {'typ': 'S', 'stpid': '8226', 'seq': 30, 'lon': -79.892166166667, 'stpnm': 'Trenton Ave at South', 'pdist': 6878.0, 'lat': 40.443920100848}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.445097455012, 'lon': -79.891708178573, 'seq': 31}, {'typ': 'S', 'stpid': '8227', 'seq': 32, 'lon': -79.891327304892, 'stpnm': 'Trenton Ave at Penn', 'pdist': 7526.0, 'lat': 40.445815966242}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.445893532335, 'lon': -79.891284389548, 'seq': 33}, {'typ': 'S', 'stpid': '18527', 'seq': 34, 'lon': -79.891631411372, 'stpnm': 'Penn Ave past Trenton', 'pdist': 7803.0, 'lat': 40.44601741031}, {'typ': 'S', 'stpid': '7628', 'seq': 35, 'lon': -79.89356461905, 'stpnm': 'Penn Ave at Brushton', 'pdist': 8206.0, 'lat': 40.446668068321}, {'typ': 'S', 'stpid': '7629', 'seq': 36, 'lon': -79.895090308202, 'stpnm': 'Penn Ave at Braddock', 'pdist': 8685.0, 'lat': 40.44715925159}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.447673625313, 'lon': -79.896608438504, 'seq': 37}, {'typ': 'S', 'stpid': '7630', 'seq': 38, 'lon': -79.898152870373, 'stpnm': 'Penn Ave opp Carnegie', 'pdist': 9608.0, 'lat': 40.44816623597}, {'typ': 'S', 'stpid': '7631', 'seq': 39, 'lon': -79.899677632935, 'stpnm': 'Penn Ave at Lexington', 'pdist': 10093.0, 'lat': 40.448684819403}, {'typ': 'S', 'stpid': '7632', 'seq': 40, 'lon': -79.901225994708, 'stpnm': 'Penn Ave at Homewood', 'pdist': 10522.0, 'lat': 40.449202240648}, {'typ': 'S', 'stpid': '7633', 'seq': 41, 'lon': -79.903692774473, 'stpnm': 'Penn Ave at Lang', 'pdist': 11274.0, 'lat': 40.450018821594}, {'typ': 'S', 'stpid': '18528', 'seq': 42, 'lon': -79.906128449073, 'stpnm': 'Penn Ave past Murtland', 'pdist': 12021.0, 'lat': 40.450823187894}, {'typ': 'S', 'stpid': '20762', 'seq': 43, 'lon': -79.908102313491, 'stpnm': 'Penn Ave at Dallas ', 'pdist': 12609.0, 'lat': 40.451481247155}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.451775156577, 'lon': -79.908847967597, 'seq': 44}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.452232346455, 'lon': -79.909700910064, 'seq': 45}, {'typ': 'S', 'stpid': '8229', 'seq': 46, 'lon': -79.910224384258, 'stpnm': 'Penn Ave at Linden', 'pdist': 13331.0, 'lat': 40.452589523632}, {'typ': 'S', 'stpid': '8230', 'seq': 47, 'lon': -79.912039435186, 'stpnm': 'Penn Ave at 5th Ave', 'pdist': 14004.0, 'lat': 40.453822374}, {'typ': 'S', 'stpid': '18942', 'seq': 48, 'lon': -79.915107988093, 'stpnm': 'Penn Ave at Bakery Square', 'pdist': 15237.0, 'lat': 40.455933324408}, {'typ': 'S', 'stpid': '20011', 'seq': 49, 'lon': -79.917314336642, 'stpnm': 'Penn Ave at East Liberty Blvd', 'pdist': 15990.0, 'lat': 40.457427481869}, {'typ': 'S', 'stpid': '8233', 'seq': 50, 'lon': -79.918370864419, 'stpnm': 'Penn Ave at Village of Eastside Shpg Ctr', 'pdist': 16430.0, 'lat': 40.458190021715}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.459063494845, 'lon': -79.919679782418, 'seq': 51}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.45921568281, 'lon': -79.91981071693, 'seq': 52}, {'typ': 'S', 'stpid': '8234', 'seq': 53, 'lon': -79.920277421298, 'stpnm': 'Penn Ave opp Shady Ave (nearside)', 'pdist': 17088.0, 'lat': 40.459550374354}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.459827922173, 'lon': -79.92062610847, 'seq': 54}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460195263114, 'lon': -79.921221558871, 'seq': 55}, {'typ': 'S', 'stpid': '19573', 'seq': 56, 'lon': -79.921578570767, 'stpnm': 'Penn Ave opp Eastside III Dr (Target)', 'pdist': 17587.0, 'lat': 40.460350125013}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460386858912, 'lon': -79.92178778307, 'seq': 57}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460676647854, 'lon': -79.922694369718, 'seq': 58}, {'typ': 'S', 'stpid': '8881', 'seq': 59, 'lon': -79.923569593255, 'stpnm': 'Penn Ave at Sheridan Ave', 'pdist': 18160.0, 'lat': 40.461008500156}, {'typ': 'S', 'stpid': '8882', 'seq': 60, 'lon': -79.92460004233, 'stpnm': 'Penn Ave at Highland Ave', 'pdist': 18488.0, 'lat': 40.46138158881}, {'typ': 'S', 'stpid': '8883', 'seq': 61, 'lon': -79.925521833333, 'stpnm': 'Penn Ave at Whitfield St', 'pdist': 18764.0, 'lat': 40.461677433225}, {'typ': 'S', 'stpid': '9124', 'seq': 62, 'lon': -79.928575802248, 'stpnm': 'Penn Ave at St Clair', 'pdist': 19679.0, 'lat': 40.462834921535}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.463556607817, 'lon': -79.930664010581, 'seq': 63}, {'typ': 'S', 'stpid': '19060', 'seq': 64, 'lon': -79.930969782409, 'stpnm': 'Negley Ave past Penn', 'pdist': 20408.0, 'lat': 40.463050518435}, {'typ': 'S', 'stpid': '8188', 'seq': 65, 'lon': -79.93160924008, 'stpnm': 'Negley Ave at Coral St', 'pdist': 20857.0, 'lat': 40.462015444544}, {'typ': 'S', 'stpid': '8189', 'seq': 66, 'lon': -79.932365500001, 'stpnm': 'Negley Ave at Friendship Ave', 'pdist': 21357.0, 'lat': 40.460807766604}, {'typ': 'S', 'stpid': '8190', 'seq': 67, 'lon': -79.933393646824, 'stpnm': 'Negley Ave at #370', 'pdist': 22054.0, 'lat': 40.459079351742}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.457797710009, 'lon': -79.93416612302, 'seq': 68}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.45757729782, 'lon': -79.9342197672, 'seq': 69}, {'typ': 'S', 'stpid': '8191', 'seq': 70, 'lon': -79.934196499999, 'stpnm': 'Negley Ave at Centre Ave', 'pdist': 22689.0, 'lat': 40.457446933451}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.457279582648, 'lon': -79.934116033729, 'seq': 71}, {'typ': 'S', 'stpid': '8192', 'seq': 72, 'lon': -79.936404395502, 'stpnm': 'Centre Ave at Graham St', 'pdist': 23393.0, 'lat': 40.456588788684}, {'typ': 'S', 'stpid': '8193', 'seq': 73, 'lon': -79.938546226853, 'stpnm': 'Centre Ave at Aiken Ave', 'pdist': 23939.0, 'lat': 40.45594147008}, {'typ': 'S', 'stpid': '8194', 'seq': 74, 'lon': -79.940120982802, 'stpnm': 'Centre Ave opp Shadyside Hospital', 'pdist': 24570.0, 'lat': 40.455471658241}, {'typ': 'S', 'stpid': '8195', 'seq': 75, 'lon': -79.941432683864, 'stpnm': 'Centre Ave at Cypress St', 'pdist': 24887.0, 'lat': 40.455069439451}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.454661251586, 'lon': -79.942848890224, 'seq': 76}, {'typ': 'S', 'stpid': '8196', 'seq': 77, 'lon': -79.94441278836, 'stpnm': 'Centre Ave at Morewood Ave', 'pdist': 25777.0, 'lat': 40.454203439285}, {'typ': 'S', 'stpid': '8197', 'seq': 78, 'lon': -79.947320525796, 'stpnm': 'Centre Ave at Millvale Ave', 'pdist': 26631.0, 'lat': 40.453325441844}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.452851703376, 'lon': -79.94905713492, 'seq': 79}, {'typ': 'S', 'stpid': '2631', 'seq': 80, 'lon': -79.949652585321, 'stpnm': 'Centre Ave opp Neville St', 'pdist': 27299.0, 'lat': 40.452651685031}, {'typ': 'S', 'stpid': '2632', 'seq': 81, 'lon': -79.950813788362, 'stpnm': 'Centre Ave at Melwood Ave', 'pdist': 27681.0, 'lat': 40.452286780054}, {'typ': 'S', 'stpid': '2633', 'seq': 82, 'lon': -79.952102351194, 'stpnm': 'Centre Ave at Craig St (nearside)', 'pdist': 28159.0, 'lat': 40.45194294909}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.451898046457, 'lon': -79.952070164685, 'seq': 83}, {'typ': 'S', 'stpid': '2634', 'seq': 84, 'lon': -79.950836166666, 'stpnm': 'Craig St at Bayard St', 'pdist': 28824.0, 'lat': 40.449890100525}, {'typ': 'S', 'stpid': '2635', 'seq': 85, 'lon': -79.949188166667, 'stpnm': 'Craig St at 5th Ave', 'pdist': 29896.0, 'lat': 40.447257934}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446951757745, 'lon': -79.949064785052, 'seq': 86}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446853781049, 'lon': -79.95005183797, 'seq': 87}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446796627911, 'lon': -79.951156908084, 'seq': 88}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446714980486, 'lon': -79.951516324092, 'seq': 89}, {'typ': 'S', 'stpid': '1171', 'seq': 90, 'lon': -79.951805621695, 'stpnm': '5th Ave at Bellefield', 'pdist': 30703.0, 'lat': 40.446598625546}, {'typ': 'S', 'stpid': '33', 'seq': 91, 'lon': -79.953128988756, 'stpnm': '5th Ave at Tennyson Ave', 'pdist': 31230.0, 'lat': 40.445674281789}, {'typ': 'S', 'stpid': '34', 'seq': 92, 'lon': -79.954654511245, 'stpnm': '5th Ave at Bigelow Blvd', 'pdist': 31839.0, 'lat': 40.444563354959}, {'typ': 'S', 'stpid': '35', 'seq': 93, 'lon': -79.956426053571, 'stpnm': '5th Ave at Thackeray Ave', 'pdist': 32525.0, 'lat': 40.443287941739}, {'typ': 'S', 'stpid': '36', 'seq': 94, 'lon': -79.958504737436, 'stpnm': '5th Ave opp Atwood St', 'pdist': 33276.0, 'lat': 40.441797374239}, {'typ': 'S', 'stpid': '38', 'seq': 95, 'lon': -79.961631833334, 'stpnm': '5th Ave at Chesterfield Rd', 'pdist': 34541.0, 'lat': 40.439498767751}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438439620008, 'lon': -79.963037673274, 'seq': 96}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438194646982, 'lon': -79.963327351848, 'seq': 97}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.43796192178, 'lon': -79.9637296832, 'seq': 98}, {'typ': 'S', 'stpid': '2639', 'seq': 99, 'lon': -79.964008632937, 'stpnm': '5th Ave opp Craft Ave', 'pdist': 35395.0, 'lat': 40.43786393198}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437761859121, 'lon': -79.964722100536, 'seq': 100}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437786356621, 'lon': -79.965043965617, 'seq': 101}, {'typ': 'S', 'stpid': '2640', 'seq': 102, 'lon': -79.965337675265, 'stpnm': '5th Ave at Robinson St', 'pdist': 35782.0, 'lat': 40.437783509968}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437501788161, 'lon': -79.965552251986, 'seq': 103}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437269060561, 'lon': -79.965616625003, 'seq': 104}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437056746959, 'lon': -79.965766828707, 'seq': 105}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436913843196, 'lon': -79.965874117068, 'seq': 106}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436762773174, 'lon': -79.966045778445, 'seq': 107}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436615785799, 'lon': -79.966260355166, 'seq': 108}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.43652187703, 'lon': -79.966560762576, 'seq': 109}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436472881098, 'lon': -79.966989916018, 'seq': 110}, {'typ': 'S', 'stpid': '18165', 'seq': 111, 'lon': -79.968430881616, 'stpnm': '5th Ave past Brenham St', 'pdist': 36887.0, 'lat': 40.436465920651}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436457754658, 'lon': -79.968661551591, 'seq': 112}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436484215649, 'lon': -79.968868819433, 'seq': 113}, {'typ': 'S', 'stpid': '2643', 'seq': 114, 'lon': -79.970167008596, 'stpnm': '5th Ave opp #2410', 'pdist': 37351.0, 'lat': 40.436912928767}, {'typ': 'S', 'stpid': '2644', 'seq': 115, 'lon': -79.970976146824, 'stpnm': '5th Ave opp #2358', 'pdist': 37622.0, 'lat': 40.437166181894}, {'typ': 'S', 'stpid': '18164', 'seq': 116, 'lon': -79.973009164022, 'stpnm': '5th Ave past Kirkpatrick St', 'pdist': 38216.0, 'lat': 40.437822924516}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437953577631, 'lon': -79.973400766539, 'seq': 117}, {'typ': 'S', 'stpid': '3147', 'seq': 118, 'lon': -79.974486406746, 'stpnm': '5th Ave past Moultrie', 'pdist': 38618.0, 'lat': 40.438030101164}, {'typ': 'S', 'stpid': '3148', 'seq': 119, 'lon': -79.975773604499, 'stpnm': '5th Ave opp Seneca St', 'pdist': 38981.0, 'lat': 40.438166929226}, {'typ': 'S', 'stpid': '3149', 'seq': 120, 'lon': -79.977394310846, 'stpnm': '5th Ave at Wyandotte St', 'pdist': 39420.0, 'lat': 40.438247594947}, {'typ': 'S', 'stpid': '3150', 'seq': 121, 'lon': -79.97944159061, 'stpnm': '5th Ave opp Gist St', 'pdist': 39979.0, 'lat': 40.438339593968}, {'typ': 'S', 'stpid': '3151', 'seq': 122, 'lon': -79.980569064815, 'stpnm': '5th Ave at Dinwiddie St', 'pdist': 40343.0, 'lat': 40.438395013737}, {'typ': 'S', 'stpid': '3152', 'seq': 123, 'lon': -79.982623861111, 'stpnm': '5th Ave opp Van Braam St', 'pdist': 40957.0, 'lat': 40.438484094732}, {'typ': 'S', 'stpid': '3154', 'seq': 124, 'lon': -79.984903019843, 'stpnm': '5th Ave at Pride St', 'pdist': 41518.0, 'lat': 40.438582096493}, {'typ': 'S', 'stpid': '3155', 'seq': 125, 'lon': -79.986305788361, 'stpnm': '5th Ave at Stevenson St', 'pdist': 41893.0, 'lat': 40.438632511731}, {'typ': 'S', 'stpid': '3156', 'seq': 126, 'lon': -79.988097240079, 'stpnm': '5th Ave at Magee St', 'pdist': 42426.0, 'lat': 40.438710016375}, {'typ': 'S', 'stpid': '3157', 'seq': 127, 'lon': -79.990663968915, 'stpnm': '5th Ave at Washington Pl', 'pdist': 43145.0, 'lat': 40.43883051923}, {'typ': 'S', 'stpid': '18161', 'seq': 128, 'lon': -79.992593541, 'stpnm': '5th Ave opp Diamond St', 'pdist': 43844.0, 'lat': 40.43889764138}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.43895888408, 'lon': -79.99469102845, 'seq': 129}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.439742785712, 'lon': -79.994202866409, 'seq': 130}, {'typ': 'S', 'stpid': '20292', 'seq': 131, 'lon': -79.994164892194, 'stpnm': '6th Ave at Center Ave', 'pdist': 44671.0, 'lat': 40.439906541484}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.44002494221, 'lon': -79.994191714284, 'seq': 132}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.440151508273, 'lon': -79.994266816137, 'seq': 133}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.440265825802, 'lon': -79.994379468915, 'seq': 134}, {'typ': 'S', 'stpid': '1509', 'seq': 135, 'lon': -79.994631135581, 'stpnm': '6th Ave at Bigelow Sq', 'pdist': 44962.0, 'lat': 40.440377273463}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.440657024606, 'lon': -79.995568611756, 'seq': 136}, {'typ': 'S', 'stpid': '3158', 'seq': 137, 'lon': -79.997612455025, 'stpnm': '6th Ave at Smithfield St', 'pdist': 45844.0, 'lat': 40.441420492964}, {'typ': 'S', 'stpid': '3159', 'seq': 138, 'lon': -79.999358695108, 'stpnm': '6th Ave at Wood St', 'pdist': 46378.0, 'lat': 40.442103148627}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442299115726, 'lon': -79.999809306222, 'seq': 139}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442462421206, 'lon': -79.999916594583, 'seq': 140}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.44171937807, 'lon': -80.002727549631, 'seq': 141}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.441507078522, 'lon': -80.00256661709, 'seq': 142}, {'typ': 'S', 'stpid': '20690', 'seq': 143, 'lon': -80.00084666204202, 'stpnm': '5th Ave at Wood St', 'pdist': 48062.0, 'lat': 40.44088273536}]}, {'ln': 43730.0, 'rtdir': 'OUTBOUND', 'pid': 2364, 'pt': [{'typ': 'S', 'stpid': '20690', 'seq': 1, 'lon': -80.00084666204202, 'stpnm': '5th Ave at Wood St', 'pdist': 0.0, 'lat': 40.44088273536}, {'typ': 'S', 'stpid': '20691', 'seq': 2, 'lon': -79.99866483333403, 'stpnm': '5th Ave at Smithfield St', 'pdist': 542.0, 'lat': 40.440055767723}, {'typ': 'S', 'stpid': '20293', 'seq': 3, 'lon': -79.995996042329, 'stpnm': '5th Ave at Ross St', 'pdist': 1454.0, 'lat': 40.439031583534}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438937678139, 'lon': -79.995684906083, 'seq': 4}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438896849666, 'lon': -79.994783683854, 'seq': 5}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438758032671, 'lon': -79.994783683854, 'seq': 6}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.43801494859, 'lon': -79.994343801576, 'seq': 7}, {'typ': 'S', 'stpid': '3241', 'seq': 8, 'lon': -79.993441129629, 'stpnm': 'Forbes Ave at Boyd St', 'pdist': 2309.0, 'lat': 40.437999108078}, {'typ': 'S', 'stpid': '3242', 'seq': 9, 'lon': -79.991346486111, 'stpnm': 'Forbes Ave at McAnulty Dr', 'pdist': 2920.0, 'lat': 40.437917437913}, {'typ': 'S', 'stpid': '3243', 'seq': 10, 'lon': -79.9887468168, 'stpnm': 'Forbes Ave at Magee St', 'pdist': 3680.0, 'lat': 40.437810426188}, {'typ': 'S', 'stpid': '3244', 'seq': 11, 'lon': -79.986794570767, 'stpnm': 'Forbes Ave at Stevenson St', 'pdist': 4191.0, 'lat': 40.437725178342}, {'typ': 'S', 'stpid': '3245', 'seq': 12, 'lon': -79.98534843783, 'stpnm': 'Forbes Ave at Pride St', 'pdist': 4573.0, 'lat': 40.437646432071}, {'typ': 'S', 'stpid': '3246', 'seq': 13, 'lon': -79.982940666667, 'stpnm': 'Forbes Ave at Van Braam St', 'pdist': 5263.0, 'lat': 40.437541934523}, {'typ': 'S', 'stpid': '3247', 'seq': 14, 'lon': -79.981758166667, 'stpnm': 'Forbes Ave at Miltenberger St', 'pdist': 5584.0, 'lat': 40.437488434527}, {'typ': 'S', 'stpid': '3248', 'seq': 15, 'lon': -79.979675333334, 'stpnm': 'Forbes Ave at Gist St', 'pdist': 6165.0, 'lat': 40.43739501512}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437313356274, 'lon': -79.977685134245, 'seq': 16}, {'typ': 'S', 'stpid': '3249', 'seq': 17, 'lon': -79.977664844577, 'stpnm': 'Jumonville St at Watson St', 'pdist': 6823.0, 'lat': 40.437740517434}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438185923097, 'lon': -79.977653302922, 'seq': 18}, {'typ': 'S', 'stpid': '3250', 'seq': 19, 'lon': -79.975984968915, 'stpnm': '5th Ave at Seneca St', 'pdist': 7437.0, 'lat': 40.438112431006}, {'typ': 'S', 'stpid': '3251', 'seq': 20, 'lon': -79.974548949073, 'stpnm': '5th Ave at Moulrie St', 'pdist': 7832.0, 'lat': 40.43797818236}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437889166532, 'lon': -79.97340458863, 'seq': 21}, {'typ': 'S', 'stpid': '3252', 'seq': 22, 'lon': -79.972862782409, 'stpnm': '5th Ave at Birmingham Bridge', 'pdist': 8327.0, 'lat': 40.437725849943}, {'typ': 'S', 'stpid': '2556', 'seq': 23, 'lon': -79.971299708996, 'stpnm': '5th Ave at #2358', 'pdist': 8811.0, 'lat': 40.437214433778}, {'typ': 'S', 'stpid': '2557', 'seq': 24, 'lon': -79.9702225, 'stpnm': '5th Ave at #2410', 'pdist': 9150.0, 'lat': 40.43686293456}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436434221124, 'lon': -79.968918946419, 'seq': 25}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436409723131, 'lon': -79.968758013878, 'seq': 26}, {'typ': 'S', 'stpid': '2558', 'seq': 27, 'lon': -79.968582166668, 'stpnm': '5th Ave opp Brenham St', 'pdist': 9629.0, 'lat': 40.436405101253}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436421433251, 'lon': -79.968040360447, 'seq': 28}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436425516249, 'lon': -79.966962112423, 'seq': 29}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436478595211, 'lon': -79.966511501309, 'seq': 30}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436580670019, 'lon': -79.966243280407, 'seq': 31}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436727657471, 'lon': -79.965996517178, 'seq': 32}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436850146768, 'lon': -79.965846313473, 'seq': 33}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.436988967702, 'lon': -79.965728296276, 'seq': 34}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437119622437, 'lon': -79.965658558842, 'seq': 35}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437262131201, 'lon': -79.965561438496, 'seq': 36}, {'typ': 'S', 'stpid': '19850', 'seq': 37, 'lon': -79.965362955029, 'stpnm': '5th Ave at Maurice St', 'pdist': 10655.0, 'lat': 40.437429531855}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437552019874, 'lon': -79.965164471562, 'seq': 38}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437641844279, 'lon': -79.964917708333, 'seq': 39}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437739834402, 'lon': -79.96443491071, 'seq': 40}, {'typ': 'S', 'stpid': '2561', 'seq': 41, 'lon': -79.964154864419, 'stpnm': '5th Ave at Craft Ave', 'pdist': 11043.0, 'lat': 40.437787848263}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437836843236, 'lon': -79.96390810119, 'seq': 42}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.437951164701, 'lon': -79.963613058198, 'seq': 43}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438171641264, 'lon': -79.963285828698, 'seq': 44}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438318625238, 'lon': -79.963103438485, 'seq': 45}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.438592177888, 'lon': -79.962744022477, 'seq': 46}, {'typ': 'S', 'stpid': '2562', 'seq': 47, 'lon': -79.962188666667, 'stpnm': '5th Ave at Halket St', 'pdist': 11768.0, 'lat': 40.439010601112}, {'typ': 'S', 'stpid': '17671', 'seq': 48, 'lon': -79.959905053573, 'stpnm': '5th Ave past McKee Pl', 'pdist': 12632.0, 'lat': 40.440680195665}, {'typ': 'S', 'stpid': '2564', 'seq': 49, 'lon': -79.959239533731, 'stpnm': '5th Ave at Meyran Ave', 'pdist': 12879.0, 'lat': 40.441172012068}, {'typ': 'S', 'stpid': '2565', 'seq': 50, 'lon': -79.957992499998, 'stpnm': '5th Ave at Oakland Ave', 'pdist': 13394.0, 'lat': 40.442085267612}, {'typ': 'S', 'stpid': '2566', 'seq': 51, 'lon': -79.956747457672, 'stpnm': '5th Ave opp Thackeray Ave', 'pdist': 13872.0, 'lat': 40.442990015366}, {'typ': 'S', 'stpid': '2567', 'seq': 52, 'lon': -79.954881824734, 'stpnm': '5th Ave at Bigelow Blvd', 'pdist': 14532.0, 'lat': 40.444335993965}, {'typ': 'S', 'stpid': '3253', 'seq': 53, 'lon': -79.953202708996, 'stpnm': '5th Ave opp Tennyson Ave', 'pdist': 15193.0, 'lat': 40.445546749707}, {'typ': 'S', 'stpid': '3254', 'seq': 54, 'lon': -79.952111093253, 'stpnm': '5th Ave at Bellefield Ave', 'pdist': 15623.0, 'lat': 40.44630592845}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446623373397, 'lon': -79.951609216288, 'seq': 55}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446721350429, 'lon': -79.951314173296, 'seq': 56}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446770338891, 'lon': -79.950579248026, 'seq': 57}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446835656786, 'lon': -79.949640474871, 'seq': 58}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446913221703, 'lon': -79.948980651453, 'seq': 59}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.447374526992, 'lon': -79.94917913492, 'seq': 60}, {'typ': 'S', 'stpid': '2571', 'seq': 61, 'lon': -79.949420533732, 'stpnm': 'Craig St at Park Plaza', 'pdist': 16851.0, 'lat': 40.447762347572}, {'typ': 'S', 'stpid': '2572', 'seq': 62, 'lon': -79.950570087302, 'stpnm': 'Craig St at Bayard St', 'pdist': 17630.0, 'lat': 40.449607534262}, {'typ': 'S', 'stpid': '2573', 'seq': 63, 'lon': -79.951959353173, 'stpnm': 'Craig St at Centre Ave', 'pdist': 18457.0, 'lat': 40.451872385571}, {'typ': 'S', 'stpid': '2574', 'seq': 64, 'lon': -79.951001553571, 'stpnm': 'Centre Ave at Melwood Ave', 'pdist': 18766.0, 'lat': 40.452173174704}, {'typ': 'S', 'stpid': '2575', 'seq': 65, 'lon': -79.949852615741, 'stpnm': 'Centre Ave at Neville St', 'pdist': 19116.0, 'lat': 40.452535756554}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.452783201296, 'lon': -79.94906657475, 'seq': 66}, {'typ': 'S', 'stpid': '8198', 'seq': 67, 'lon': -79.947097833333, 'stpnm': 'Centre Ave opp Millvale Ave', 'pdist': 19930.0, 'lat': 40.453342433673}, {'typ': 'S', 'stpid': '8199', 'seq': 68, 'lon': -79.944541689153, 'stpnm': 'Centre Ave at Morewood Ave', 'pdist': 20688.0, 'lat': 40.454097103115}, {'typ': 'S', 'stpid': '8201', 'seq': 69, 'lon': -79.941522513889, 'stpnm': 'Centre Ave opp Cypress St', 'pdist': 21562.0, 'lat': 40.45498568797}, {'typ': 'S', 'stpid': '8202', 'seq': 70, 'lon': -79.939839104496, 'stpnm': 'Centre Ave at Shadyside Hosptital', 'pdist': 22083.0, 'lat': 40.455500688037}, {'typ': 'S', 'stpid': '8203', 'seq': 71, 'lon': -79.938622420634, 'stpnm': 'Centre Ave at Aiken St', 'pdist': 22408.0, 'lat': 40.455849760816}, {'typ': 'S', 'stpid': '8204', 'seq': 72, 'lon': -79.936516138226, 'stpnm': 'Centre Ave at Graham St', 'pdist': 23051.0, 'lat': 40.456481021498}, {'typ': 'S', 'stpid': '8205', 'seq': 73, 'lon': -79.934715333332, 'stpnm': 'Centre Ave at Negley Ave', 'pdist': 23617.0, 'lat': 40.457034933475}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.457255347443, 'lon': -79.934001865734, 'seq': 74}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.457496169285, 'lon': -79.934119882931, 'seq': 75}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.457647192712, 'lon': -79.934130611767, 'seq': 76}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.457851277885, 'lon': -79.934082332004, 'seq': 77}, {'typ': 'S', 'stpid': '8206', 'seq': 78, 'lon': -79.933821595899, 'stpnm': 'Centre Ave at Baum Blvd', 'pdist': 24178.0, 'lat': 40.458263705021}, {'typ': 'S', 'stpid': '8207', 'seq': 79, 'lon': -79.932419593254, 'stpnm': 'Negley Ave at Friendship Ave', 'pdist': 25101.0, 'lat': 40.460559766618}, {'typ': 'S', 'stpid': '8208', 'seq': 80, 'lon': -79.931591155423, 'stpnm': 'Negley Ave opp Coral St', 'pdist': 25663.0, 'lat': 40.461936270313}, {'typ': 'S', 'stpid': '8209', 'seq': 81, 'lon': -79.930680564813, 'stpnm': 'Negley Ave at Penn Ave', 'pdist': 26175.0, 'lat': 40.463411168093}, {'typ': 'S', 'stpid': '9128', 'seq': 82, 'lon': -79.927021771164, 'stpnm': 'Penn Ave at Beatty St', 'pdist': 27341.0, 'lat': 40.462186421807}, {'typ': 'S', 'stpid': '9129', 'seq': 83, 'lon': -79.925920042329, 'stpnm': 'Penn Ave at Whitfield St', 'pdist': 27695.0, 'lat': 40.461761433221}, {'typ': 'S', 'stpid': '3133', 'seq': 84, 'lon': -79.924964833335, 'stpnm': 'Penn Ave at Highland Ave', 'pdist': 27978.0, 'lat': 40.461429599904}, {'typ': 'S', 'stpid': '18975', 'seq': 85, 'lon': -79.923960135581, 'stpnm': 'Penn Ave at Sheridan Sq', 'pdist': 28284.0, 'lat': 40.461080255601}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460778223843, 'lon': -79.923107193114, 'seq': 86}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460631288983, 'lon': -79.922769234778, 'seq': 87}, {'typ': 'S', 'stpid': '19574', 'seq': 88, 'lon': -79.921938462961, 'stpnm': 'Penn Ave at Eastside III Dr', 'pdist': 28861.0, 'lat': 40.460351862483}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460323291659, 'lon': -79.921852632273, 'seq': 89}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.460237579116, 'lon': -79.921788259256, 'seq': 90}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.45995186985, 'lon': -79.921112342585, 'seq': 91}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.4596865673, 'lon': -79.920774384249, 'seq': 92}, {'typ': 'S', 'stpid': '8276', 'seq': 93, 'lon': -79.920097333333, 'stpnm': 'Penn Ave past Shady Ave', 'pdist': 29549.0, 'lat': 40.459199365493}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.459080998544, 'lon': -79.919963222882, 'seq': 94}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.459015692551, 'lon': -79.919754010579, 'seq': 95}, {'typ': 'S', 'stpid': '8277', 'seq': 96, 'lon': -79.918572725527, 'stpnm': 'Penn Ave opp Village of Eastside Shpg Ctr', 'pdist': 30029.0, 'lat': 40.458219989936}, {'typ': 'S', 'stpid': '19381', 'seq': 97, 'lon': -79.9176930959, 'stpnm': 'Penn Ave opp East Liberty Blvd (farside)', 'pdist': 30400.0, 'lat': 40.457613502192}, {'typ': 'S', 'stpid': '8279', 'seq': 98, 'lon': -79.915559208994, 'stpnm': 'Penn Ave opp Bakery Square', 'pdist': 30705.0, 'lat': 40.456158097123}, {'typ': 'S', 'stpid': '8280', 'seq': 99, 'lon': -79.912942375661, 'stpnm': 'Penn Ave at 5th Ave', 'pdist': 31694.0, 'lat': 40.454361927924}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.453982309293, 'lon': -79.912395205022, 'seq': 100}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.453194491742, 'lon': -79.911279406072, 'seq': 101}, {'typ': 'S', 'stpid': '8281', 'seq': 102, 'lon': -79.910441722881, 'stpnm': 'Penn Ave at Linden', 'pdist': 32619.0, 'lat': 40.452643023645}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.452187911929, 'lon': -79.909776638236, 'seq': 103}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.451938906948, 'lon': -79.909347484794, 'seq': 104}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.451751132091, 'lon': -79.908955882277, 'seq': 105}, {'typ': 'S', 'stpid': '20763', 'seq': 106, 'lon': -79.908237050262, 'stpnm': 'Penn Ave at Dallas Ave', 'pdist': 33320.0, 'lat': 40.451444976306}, {'typ': 'S', 'stpid': '7692', 'seq': 107, 'lon': -79.906119717594, 'stpnm': 'Penn Ave opp Murtland', 'pdist': 33990.0, 'lat': 40.450752764737}, {'typ': 'S', 'stpid': '7693', 'seq': 108, 'lon': -79.903907833332, 'stpnm': 'Penn Ave at Lang', 'pdist': 34657.0, 'lat': 40.450015933852}, {'typ': 'S', 'stpid': '7694', 'seq': 109, 'lon': -79.901542666665, 'stpnm': 'Penn Ave at Homewood', 'pdist': 35380.0, 'lat': 40.449207267228}, {'typ': 'S', 'stpid': '7695', 'seq': 110, 'lon': -79.899738177912, 'stpnm': 'Penn Ave at Lexington', 'pdist': 35928.0, 'lat': 40.44861834093}, {'typ': 'S', 'stpid': '18542', 'seq': 111, 'lon': -79.898263060188, 'stpnm': 'Penn Ave past Carnegie', 'pdist': 36455.0, 'lat': 40.448122273561}, {'typ': 'S', 'stpid': '7697', 'seq': 112, 'lon': -79.895344437829, 'stpnm': 'Penn Ave at Braddock', 'pdist': 37204.0, 'lat': 40.447155681048}, {'typ': 'S', 'stpid': '7698', 'seq': 113, 'lon': -79.894080240081, 'stpnm': 'Penn Ave at East End', 'pdist': 37577.0, 'lat': 40.44674726544}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.445849137648, 'lon': -79.891376573394, 'seq': 114}, {'typ': 'S', 'stpid': '8283', 'seq': 115, 'lon': -79.891540499999, 'stpnm': 'Trenton Ave past Penn', 'pdist': 38534.0, 'lat': 40.445526100761}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.445060696134, 'lon': -79.891780072747, 'seq': 116}, {'typ': 'S', 'stpid': '8284', 'seq': 117, 'lon': -79.892091208993, 'stpnm': 'Trenton Ave at South', 'pdist': 38980.0, 'lat': 40.44430135164}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.444219701183, 'lon': -79.892101937829, 'seq': 118}, {'typ': 'S', 'stpid': '7329', 'seq': 119, 'lon': -79.890609666666, 'stpnm': 'South Ave at West', 'pdist': 39454.0, 'lat': 40.443714100858}, {'typ': 'S', 'stpid': '7330', 'seq': 120, 'lon': -79.888255084655, 'stpnm': 'South Ave at Pitt', 'pdist': 40151.0, 'lat': 40.442899450303}, {'typ': 'S', 'stpid': '20013', 'seq': 121, 'lon': -79.887481977515, 'stpnm': 'South Ave at Pennwood', 'pdist': 40395.0, 'lat': 40.442649715114}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442433335871, 'lon': -79.886747052245, 'seq': 122}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442743615323, 'lon': -79.886575390868, 'seq': 123}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442772193622, 'lon': -79.886698772483, 'seq': 124}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.442845680619, 'lon': -79.886800696425, 'seq': 125}, {'typ': 'S', 'stpid': '16014', 'seq': 126, 'lon': -79.88690183333199, 'stpnm': 'Hay St Ramp inbound shelter', 'pdist': 40996.0, 'lat': 40.443279227407}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.443626246017, 'lon': -79.88700912169202, 'seq': 127}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.443961015213, 'lon': -79.887186147487, 'seq': 128}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.444859168235, 'lon': -79.887545563495, 'seq': 129}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.445712402489, 'lon': -79.887985445774, 'seq': 130}, {'typ': 'S', 'stpid': '16118', 'seq': 131, 'lon': -79.88844805952203, 'stpnm': 'Wilkinsburg Station stop D', 'pdist': 42200.0, 'lat': 40.446499209682}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.446980929603, 'lon': -79.88878065344, 'seq': 132}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.447519798645, 'lon': -79.88925272222701, 'seq': 133}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.448026005021, 'lon': -79.88972479101301, 'seq': 134}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.448548536635, 'lon': -79.89027732607002, 'seq': 135}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.448956761632, 'lon': -79.89076548811101, 'seq': 136}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.449258846534, 'lon': -79.89114099737299, 'seq': 137}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.449581341079, 'lon': -79.89159160848703, 'seq': 138}, {'typ': 'W', 'pdist': 0.0, 'lat': 40.449760957623, 'lon': -79.89176326986399, 'seq': 139}, {'typ': 'S', 'stpid': '19988', 'seq': 140, 'lon': -79.89193733333298, 'stpnm': 'LAYOVER BRUSHTON TERMINAL', 'pdist': 43730.0, 'lat': 40.449901185011}]}]
}
})
| 337.222222
| 33,400
| 0.578913
| 5,139
| 36,420
| 4.102355
| 0.240708
| 0.067593
| 0.080543
| 0.065933
| 0.216488
| 0.185561
| 0.160611
| 0.044967
| 0.03605
| 0.011764
| 0
| 0.335268
| 0.138935
| 36,420
| 107
| 33,401
| 340.373832
| 0.33699
| 0.002087
| 0
| 0.233766
| 0
| 0
| 0.307389
| 0
| 0
| 0
| 0
| 0
| 0.103896
| 1
| 0.116883
| false
| 0
| 0.038961
| 0.025974
| 0.285714
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8182de99b8accab6efbe98871df960f416bdddf7
| 38,104
|
py
|
Python
|
t3f/riemannian.py
|
robol/t3f
|
d61037ba9c03c344e9fc31fce46648347b762b39
|
[
"MIT"
] | null | null | null |
t3f/riemannian.py
|
robol/t3f
|
d61037ba9c03c344e9fc31fce46648347b762b39
|
[
"MIT"
] | null | null | null |
t3f/riemannian.py
|
robol/t3f
|
d61037ba9c03c344e9fc31fce46648347b762b39
|
[
"MIT"
] | null | null | null |
import tensorflow as tf
from t3f.tensor_train import TensorTrain
from t3f.tensor_train_batch import TensorTrainBatch
from t3f import shapes
from t3f import decompositions
def project_sum(what, where, weights=None):
"""Project sum of `what` TTs on the tangent space of `where` TT.
project_sum(what, x) = P_x(what)
project_sum(batch_what, x) = P_x(\sum_i batch_what[i])
project_sum(batch_what, x, weights) = P_x(\sum_j weights[j] * batch_what[j])
This function implements the algorithm from the paper [1], theorem 3.1.
[1] C. Lubich, I. Oseledets and B. Vandereycken, Time integration of
Tensor Trains.
Args:
what: TensorTrain or TensorTrainBatch. In the case of batch returns
projection of the sum of elements in the batch.
where: TensorTrain, TT-tensor or TT-matrix on which tangent space to project
weights: python list or tf.Tensor of numbers or None, weights of the sum
Returns:
a TensorTrain with the TT-ranks equal 2 * tangent_space_tens.get_tt_ranks()
Complexity:
O(d r_where^3 m) for orthogonalizing the TT-cores of where
+O(batch_size d r_what r_where n (r_what + r_where))
d is the number of TT-cores (what.ndims());
r_what is the largest TT-rank of what max(what.get_tt_rank())
r_where is the largest TT-rank of where
n is the size of the axis dimension of what and where e.g.
for a tensor of size 4 x 4 x 4, n is 4;
for a 9 x 64 matrix of raw shape (3, 3, 3) x (4, 4, 4) n is 12
"""
# Always work with batch of TT objects for simplicity.
what = shapes.expand_batch_dim(what)
if weights is not None:
weights = tf.convert_to_tensor(weights, dtype=where.dtype)
if not isinstance(where, TensorTrain):
raise ValueError('The first argument should be a TensorTrain object, got '
'"%s".' % where)
if where.get_raw_shape() != what.get_raw_shape():
raise ValueError('The shapes of the tensor we want to project and of the '
'tensor on which tangent space we want to project should '
'match, got %s and %s.' %
(where.get_raw_shape(),
what.get_raw_shape()))
dtypes_compatible = (where.dtype.is_compatible_with(what.dtype) or
what.dtype.is_compatible_with(where.dtype))
if not dtypes_compatible:
raise ValueError('Dtypes of the arguments should coincide, got %s and %s.' %
(where.dtype,
what.dtype))
left_tangent_space_tens = decompositions.orthogonalize_tt_cores(
where)
right_tangent_space_tens = decompositions.orthogonalize_tt_cores(
left_tangent_space_tens, left_to_right=False)
ndims = where.ndims()
dtype = where.dtype
raw_shape = shapes.lazy_raw_shape(where)
batch_size = shapes.lazy_batch_size(what)
right_tangent_tt_ranks = shapes.lazy_tt_ranks(right_tangent_space_tens)
left_tangent_tt_ranks = shapes.lazy_tt_ranks(left_tangent_space_tens)
# For einsum notation.
mode_str = 'ij' if where.is_tt_matrix() else 'i'
right_rank_dim = where.right_tt_rank_dim
left_rank_dim = where.left_tt_rank_dim
if weights is not None:
weights_shape = weights.get_shape()
output_is_batch = len(weights_shape) > 1 and weights_shape[1] > 1
else:
output_is_batch = False
output_batch_str = 'o' if output_is_batch else ''
if output_is_batch:
right_rank_dim += 1
left_rank_dim += 1
output_batch_size = weights.get_shape()[1].value
# Prepare rhs vectors.
# rhs[core_idx] is of size
# batch_size x tensor_tt_ranks[core_idx] x tangent_tt_ranks[core_idx]
rhs = [None] * (ndims + 1)
rhs[ndims] = tf.ones((batch_size, 1, 1), dtype=dtype)
for core_idx in range(ndims - 1, 0, -1):
tens_core = what.tt_cores[core_idx]
right_tang_core = right_tangent_space_tens.tt_cores[core_idx]
einsum_str = 'sa{0}b,sbd,c{0}d->sac'.format(mode_str)
rhs[core_idx] = tf.einsum(einsum_str, tens_core, rhs[core_idx + 1],
right_tang_core)
# Prepare lhs vectors.
# lhs[core_idx] is of size
# batch_size x tangent_tt_ranks[core_idx] x tensor_tt_ranks[core_idx]
lhs = [None] * (ndims + 1)
lhs[0] = tf.ones((batch_size, 1, 1), dtype=dtype)
for core_idx in range(ndims - 1):
tens_core = what.tt_cores[core_idx]
left_tang_core = left_tangent_space_tens.tt_cores[core_idx]
einsum_str = 'sab,a{0}c,sb{0}d->scd'.format(mode_str)
lhs[core_idx + 1] = tf.einsum(einsum_str, lhs[core_idx], left_tang_core,
tens_core)
# Left to right sweep.
res_cores_list = []
for core_idx in range(ndims):
tens_core = what.tt_cores[core_idx]
left_tang_core = left_tangent_space_tens.tt_cores[core_idx]
right_tang_core = right_tangent_space_tens.tt_cores[core_idx]
if core_idx < ndims - 1:
einsum_str = 'sab,sb{0}c->sa{0}c'.format(mode_str)
proj_core = tf.einsum(einsum_str, lhs[core_idx], tens_core)
einsum_str = 'a{0}b,sbc->sa{0}c'.format(mode_str)
proj_core -= tf.einsum(einsum_str, left_tang_core, lhs[core_idx + 1])
if weights is None:
einsum_str = 'sa{0}b,sbc->a{0}c'.format(mode_str)
proj_core = tf.einsum(einsum_str, proj_core, rhs[core_idx + 1])
else:
einsum_str = 'sa{0}b,sbc->sa{0}c'.format(mode_str, output_batch_str)
proj_core_s = tf.einsum(einsum_str, proj_core, rhs[core_idx + 1])
einsum_str = 's{1},sa{0}c->{1}a{0}c'.format(mode_str, output_batch_str)
proj_core = tf.einsum(einsum_str, weights, proj_core_s)
if core_idx == ndims - 1:
if weights is None:
einsum_str = 'sab,sb{0}c->a{0}c'.format(mode_str)
proj_core = tf.einsum(einsum_str, lhs[core_idx], tens_core)
else:
einsum_str = 'sab,sb{0}c->sa{0}c'.format(mode_str, output_batch_str)
proj_core_s = tf.einsum(einsum_str, lhs[core_idx], tens_core)
einsum_str = 's{1},sa{0}c->{1}a{0}c'.format(mode_str, output_batch_str)
proj_core = tf.einsum(einsum_str, weights, proj_core_s)
if output_is_batch:
# Add batch dimension of size output_batch_size to left_tang_core and
# right_tang_core
extended_left_tang_core = tf.expand_dims(left_tang_core, 0)
extended_right_tang_core = tf.expand_dims(right_tang_core, 0)
if where.is_tt_matrix():
extended_left_tang_core = tf.tile(extended_left_tang_core,
[output_batch_size, 1, 1, 1, 1])
extended_right_tang_core = tf.tile(extended_right_tang_core,
[output_batch_size, 1, 1, 1, 1])
else:
extended_left_tang_core = tf.tile(extended_left_tang_core,
[output_batch_size, 1, 1, 1])
extended_right_tang_core = tf.tile(extended_right_tang_core,
[output_batch_size, 1, 1, 1])
else:
extended_left_tang_core = left_tang_core
extended_right_tang_core = right_tang_core
if core_idx == 0:
res_core = tf.concat((proj_core, extended_left_tang_core),
axis=right_rank_dim)
elif core_idx == ndims - 1:
res_core = tf.concat((extended_right_tang_core, proj_core), axis=left_rank_dim)
else:
rank_1 = right_tangent_tt_ranks[core_idx]
rank_2 = left_tangent_tt_ranks[core_idx + 1]
if where.is_tt_matrix():
mode_size_n = raw_shape[0][core_idx]
mode_size_m = raw_shape[1][core_idx]
shape = [rank_1, mode_size_n, mode_size_m, rank_2]
else:
mode_size = raw_shape[0][core_idx]
shape = [rank_1, mode_size, rank_2]
if output_is_batch:
shape = [output_batch_size] + shape
zeros = tf.zeros(shape, dtype)
upper = tf.concat((extended_right_tang_core, zeros), axis=right_rank_dim)
lower = tf.concat((proj_core, extended_left_tang_core),
axis=right_rank_dim)
res_core = tf.concat((upper, lower), axis=left_rank_dim)
res_cores_list.append(res_core)
# TODO: TT-ranks.
if output_is_batch:
res = TensorTrainBatch(res_cores_list, where.get_raw_shape(),
batch_size=output_batch_size)
else:
res = TensorTrain(res_cores_list, where.get_raw_shape())
res.projection_on = where
return res
def project(what, where):
"""Project `what` TTs on the tangent space of `where` TT.
project(what, x) = P_x(what)
project(batch_what, x) = batch(P_x(batch_what[0]), ..., P_x(batch_what[N]))
This function implements the algorithm from the paper [1], theorem 3.1.
[1] C. Lubich, I. Oseledets and B. Vandereycken, Time integration of
Tensor Trains.
Args:
what: TensorTrain or TensorTrainBatch. In the case of batch returns
batch with projection of each individual tensor.
where: TensorTrain, TT-tensor or TT-matrix on which tangent space to project
Returns:
a TensorTrain with the TT-ranks equal 2 * tangent_space_tens.get_tt_ranks()
Complexity:
O(d r_where^3 m) for orthogonalizing the TT-cores of where
+O(batch_size d r_what r_where n (r_what + r_where))
d is the number of TT-cores (what.ndims());
r_what is the largest TT-rank of what max(what.get_tt_rank())
r_where is the largest TT-rank of where
n is the size of the axis dimension of what and where e.g.
for a tensor of size 4 x 4 x 4, n is 4;
for a 9 x 64 matrix of raw shape (3, 3, 3) x (4, 4, 4) n is 12
"""
if not isinstance(where, TensorTrain):
raise ValueError('The first argument should be a TensorTrain object, got '
'"%s".' % where)
if where.get_raw_shape() != what.get_raw_shape():
raise ValueError('The shapes of the tensor we want to project and of the '
'tensor on which tangent space we want to project should '
'match, got %s and %s.' %
(where.get_raw_shape(),
what.get_raw_shape()))
dtypes_compatible = (where.dtype.is_compatible_with(what.dtype) or
what.dtype.is_compatible_with(where.dtype))
if not dtypes_compatible:
raise ValueError('Dtypes of the arguments should coincide, got %s and %s.' %
(where.dtype,
what.dtype))
left_tangent_space_tens = decompositions.orthogonalize_tt_cores(
where)
right_tangent_space_tens = decompositions.orthogonalize_tt_cores(
left_tangent_space_tens, left_to_right=False)
ndims = where.ndims()
dtype = where.dtype
raw_shape = shapes.lazy_raw_shape(where)
right_tangent_tt_ranks = shapes.lazy_tt_ranks(right_tangent_space_tens)
left_tangent_tt_ranks = shapes.lazy_tt_ranks(left_tangent_space_tens)
# For einsum notation.
mode_str = 'ij' if where.is_tt_matrix() else 'i'
right_rank_dim = what.right_tt_rank_dim
left_rank_dim = what.left_tt_rank_dim
output_is_batch = isinstance(what, TensorTrainBatch)
if output_is_batch:
output_batch_size = what.batch_size
# Always work with batch of TT objects for simplicity.
what = shapes.expand_batch_dim(what)
batch_size = shapes.lazy_batch_size(what)
# Prepare rhs vectors.
# rhs[core_idx] is of size
# batch_size x tensor_tt_ranks[core_idx] x tangent_tt_ranks[core_idx]
rhs = [None] * (ndims + 1)
rhs[ndims] = tf.ones((batch_size, 1, 1), dtype=dtype)
for core_idx in range(ndims - 1, 0, -1):
tens_core = what.tt_cores[core_idx]
right_tang_core = right_tangent_space_tens.tt_cores[core_idx]
einsum_str = 'sa{0}b,sbd,c{0}d->sac'.format(mode_str)
rhs[core_idx] = tf.einsum(einsum_str, tens_core, rhs[core_idx + 1],
right_tang_core)
# Prepare lhs vectors.
# lhs[core_idx] is of size
# batch_size x tangent_tt_ranks[core_idx] x tensor_tt_ranks[core_idx]
lhs = [None] * (ndims + 1)
lhs[0] = tf.ones((batch_size, 1, 1), dtype=dtype)
for core_idx in range(ndims - 1):
tens_core = what.tt_cores[core_idx]
left_tang_core = left_tangent_space_tens.tt_cores[core_idx]
einsum_str = 'sab,a{0}c,sb{0}d->scd'.format(mode_str)
lhs[core_idx + 1] = tf.einsum(einsum_str, lhs[core_idx], left_tang_core,
tens_core)
# Left to right sweep.
res_cores_list = []
for core_idx in range(ndims):
tens_core = what.tt_cores[core_idx]
left_tang_core = left_tangent_space_tens.tt_cores[core_idx]
right_tang_core = right_tangent_space_tens.tt_cores[core_idx]
if core_idx < ndims - 1:
einsum_str = 'sab,sb{0}c->sa{0}c'.format(mode_str)
proj_core = tf.einsum(einsum_str, lhs[core_idx], tens_core)
einsum_str = 'a{0}b,sbc->sa{0}c'.format(mode_str)
proj_core -= tf.einsum(einsum_str, left_tang_core, lhs[core_idx + 1])
if output_is_batch:
einsum_str = 'sa{0}b,sbc->sa{0}c'.format(mode_str)
else:
einsum_str = 'sa{0}b,sbc->a{0}c'.format(mode_str)
proj_core = tf.einsum(einsum_str, proj_core, rhs[core_idx + 1])
if core_idx == ndims - 1:
if output_is_batch:
einsum_str = 'sab,sb{0}c->sa{0}c'.format(mode_str)
else:
einsum_str = 'sab,sb{0}c->a{0}c'.format(mode_str)
proj_core = tf.einsum(einsum_str, lhs[core_idx], tens_core)
if output_is_batch:
# Add batch dimension of size output_batch_size to left_tang_core and
# right_tang_core
extended_left_tang_core = tf.expand_dims(left_tang_core, 0)
extended_right_tang_core = tf.expand_dims(right_tang_core, 0)
if where.is_tt_matrix():
extended_left_tang_core = tf.tile(extended_left_tang_core,
[output_batch_size, 1, 1, 1, 1])
extended_right_tang_core = tf.tile(extended_right_tang_core,
[output_batch_size, 1, 1, 1, 1])
else:
extended_left_tang_core = tf.tile(extended_left_tang_core,
[output_batch_size, 1, 1, 1])
extended_right_tang_core = tf.tile(extended_right_tang_core,
[output_batch_size, 1, 1, 1])
else:
extended_left_tang_core = left_tang_core
extended_right_tang_core = right_tang_core
if core_idx == 0:
res_core = tf.concat((proj_core, extended_left_tang_core),
axis=right_rank_dim)
elif core_idx == ndims - 1:
res_core = tf.concat((extended_right_tang_core, proj_core), axis=left_rank_dim)
else:
rank_1 = right_tangent_tt_ranks[core_idx]
rank_2 = left_tangent_tt_ranks[core_idx + 1]
if where.is_tt_matrix():
mode_size_n = raw_shape[0][core_idx]
mode_size_m = raw_shape[1][core_idx]
shape = [rank_1, mode_size_n, mode_size_m, rank_2]
else:
mode_size = raw_shape[0][core_idx]
shape = [rank_1, mode_size, rank_2]
if output_is_batch:
shape = [output_batch_size] + shape
zeros = tf.zeros(shape, dtype)
upper = tf.concat((extended_right_tang_core, zeros), axis=right_rank_dim)
lower = tf.concat((proj_core, extended_left_tang_core),
axis=right_rank_dim)
res_core = tf.concat((upper, lower), axis=left_rank_dim)
res_cores_list.append(res_core)
# TODO: TT-ranks.
if output_is_batch:
res = TensorTrainBatch(res_cores_list, where.get_raw_shape(),
batch_size=output_batch_size)
else:
res = TensorTrain(res_cores_list, where.get_raw_shape())
res.projection_on = where
return res
def project_matmul(what, where, matrix):
"""Project `matrix` * `what` TTs on the tangent space of `where` TT.
project(what, x) = P_x(what)
project(batch_what, x) = batch(P_x(batch_what[0]), ..., P_x(batch_what[N]))
This function implements the algorithm from the paper [1], theorem 3.1.
[1] C. Lubich, I. Oseledets and B. Vandereycken, Time integration of
Tensor Trains.
Args:
what: TensorTrain or TensorTrainBatch. In the case of batch returns
batch with projection of each individual tensor.
where: TensorTrain, TT-tensor or TT-matrix on which tangent space to project
matrix: TensorTrain, TT-matrix to multiply by what
Returns:
a TensorTrain with the TT-ranks equal 2 * tangent_space_tens.get_tt_ranks()
Complexity:
O(d r_where^3 m) for orthogonalizing the TT-cores of where
+O(batch_size d R r_what r_where (n r_what + n m R + m r_where))
d is the number of TT-cores (what.ndims());
r_what is the largest TT-rank of what max(what.get_tt_rank())
r_where is the largest TT-rank of where
matrix is of TT-rank R and of raw-shape (m, m, ..., m) x (n, n, ..., n).
"""
if not isinstance(where, TensorTrain):
raise ValueError('The first argument should be a TensorTrain object, got '
'"%s".' % where)
if where.get_raw_shape() != what.get_raw_shape():
raise ValueError('The shapes of the tensor we want to project and of the '
'tensor on which tangent space we want to project should '
'match, got %s and %s.' %
(where.get_raw_shape(),
what.get_raw_shape()))
dtypes_compatible = (where.dtype.is_compatible_with(what.dtype) or
what.dtype.is_compatible_with(where.dtype))
if not dtypes_compatible:
raise ValueError('Dtypes of the arguments should coincide, got %s and %s.' %
(where.dtype,
what.dtype))
left_tangent_space_tens = decompositions.orthogonalize_tt_cores(
where)
right_tangent_space_tens = decompositions.orthogonalize_tt_cores(
left_tangent_space_tens, left_to_right=False)
ndims = where.ndims()
dtype = where.dtype
raw_shape = shapes.lazy_raw_shape(where)
batch_size = shapes.lazy_batch_size(what)
right_tangent_tt_ranks = shapes.lazy_tt_ranks(right_tangent_space_tens)
left_tangent_tt_ranks = shapes.lazy_tt_ranks(left_tangent_space_tens)
# For einsum notation.
right_rank_dim = what.right_tt_rank_dim
left_rank_dim = what.left_tt_rank_dim
output_is_batch = isinstance(what, TensorTrainBatch)
if output_is_batch:
output_batch_size = what.batch_size
# Always work with batch of TT objects for simplicity.
what = shapes.expand_batch_dim(what)
# Prepare rhs vectors.
# rhs[core_idx] is of size
# batch_size x tensor_tt_ranks[core_idx] x matrix_tt_ranks[core_idx] x tangent_tt_ranks[core_idx]
rhs = [None] * (ndims + 1)
rhs[ndims] = tf.ones((batch_size, 1, 1, 1), dtype=dtype)
for core_idx in range(ndims - 1, 0, -1):
tens_core = what.tt_cores[core_idx]
right_tang_core = right_tangent_space_tens.tt_cores[core_idx]
matrix_core = matrix.tt_cores[core_idx]
rhs[core_idx] = tf.einsum('bije,cikf,sdef,sajkd->sabc', matrix_core,
right_tang_core, rhs[core_idx + 1], tens_core)
# Prepare lhs vectors.
# lhs[core_idx] is of size
# batch_size x tangent_tt_ranks[core_idx] x matrix_tt_ranks[core_idx] x tensor_tt_ranks[core_idx]
lhs = [None] * (ndims + 1)
lhs[0] = tf.ones((batch_size, 1, 1, 1), dtype=dtype)
for core_idx in range(ndims - 1):
tens_core = what.tt_cores[core_idx]
left_tang_core = left_tangent_space_tens.tt_cores[core_idx]
matrix_core = matrix.tt_cores[core_idx]
# TODO: brutforce order of indices in lhs??
lhs[core_idx + 1] = tf.einsum('bije,aikd,sabc,scjkf->sdef', matrix_core,
left_tang_core, lhs[core_idx], tens_core)
# Left to right sweep.
res_cores_list = []
for core_idx in range(ndims):
tens_core = what.tt_cores[core_idx]
matrix_core = matrix.tt_cores[core_idx]
left_tang_core = left_tangent_space_tens.tt_cores[core_idx]
right_tang_core = right_tangent_space_tens.tt_cores[core_idx]
if core_idx < ndims - 1:
proj_core = tf.einsum('scjke,sabc,bijd->saikde', tens_core,
lhs[core_idx], matrix_core)
proj_core -= tf.einsum('aikb,sbcd->saikcd', left_tang_core,
lhs[core_idx + 1])
proj_core = tf.einsum('saikcb,sbcd->saikd', proj_core, rhs[core_idx + 1])
if core_idx == ndims - 1:
# d and e dimensions take 1 value, since its the last rank.
# To make the result shape (?, ?, ?, 1), we are summing d and leaving e,
# but we could have done the opposite -- sum e and leave d.
proj_core = tf.einsum('sabc,bijd,scjke->saike', lhs[core_idx], matrix_core,
tens_core)
if output_is_batch:
# Add batch dimension of size output_batch_size to left_tang_core and
# right_tang_core
extended_left_tang_core = tf.expand_dims(left_tang_core, 0)
extended_right_tang_core = tf.expand_dims(right_tang_core, 0)
extended_left_tang_core = tf.tile(extended_left_tang_core,
[output_batch_size, 1, 1, 1, 1])
extended_right_tang_core = tf.tile(extended_right_tang_core,
[output_batch_size, 1, 1, 1, 1])
else:
extended_left_tang_core = left_tang_core
extended_right_tang_core = right_tang_core
if core_idx == 0:
res_core = tf.concat((proj_core, extended_left_tang_core),
axis=right_rank_dim)
elif core_idx == ndims - 1:
res_core = tf.concat((extended_right_tang_core, proj_core),
axis=left_rank_dim)
else:
rank_1 = right_tangent_tt_ranks[core_idx]
rank_2 = left_tangent_tt_ranks[core_idx + 1]
mode_size_n = raw_shape[0][core_idx]
mode_size_m = raw_shape[1][core_idx]
shape = [rank_1, mode_size_n, mode_size_m, rank_2]
if output_is_batch:
shape = [output_batch_size] + shape
zeros = tf.zeros(shape, dtype)
upper = tf.concat((extended_right_tang_core, zeros),
axis=right_rank_dim)
lower = tf.concat((proj_core, extended_left_tang_core),
axis=right_rank_dim)
res_core = tf.concat((upper, lower), axis=left_rank_dim)
res_cores_list.append(res_core)
# TODO: TT-ranks.
if output_is_batch:
res = TensorTrainBatch(res_cores_list, where.get_raw_shape(),
batch_size=output_batch_size)
else:
res = TensorTrain(res_cores_list, where.get_raw_shape())
res.projection_on = where
return res
def pairwise_flat_inner_projected(projected_tt_vectors_1,
projected_tt_vectors_2):
"""Scalar products between two batches of TTs from the same tangent space.
res[i, j] = t3f.flat_inner(projected_tt_vectors_1[i], projected_tt_vectors_1[j]).
pairwise_flat_inner_projected(projected_tt_vectors_1, projected_tt_vectors_2)
is equivalent to
pairwise_flat_inner(projected_tt_vectors_1, projected_tt_vectors_2)
, but works only on objects from the same tangent space and is much faster
than general pairwise_flat_inner.
Args:
projected_tt_vectors_1: TensorTrainBatch of tensors projected on the same
tangent space as projected_tt_vectors_2.
projected_tt_vectors_2: TensorTrainBatch.
Returns:
tf.tensor with the scalar product matrix.
Complexity:
O(batch_size^2 d r^2 n), where
d is the number of TT-cores (projected_tt_vectors_1.ndims());
r is the largest TT-rank max(projected_tt_vectors_1.get_tt_rank())
(i.e. 2 * {the TT-rank of the object we projected vectors onto}.
and n is the size of the axis dimension, e.g.
for a tensor of size 4 x 4 x 4, n is 4;
for a 9 x 64 matrix of raw shape (3, 3, 3) x (4, 4, 4) n is 12.
"""
if not hasattr(projected_tt_vectors_1, 'projection_on') or \
not hasattr(projected_tt_vectors_2, 'projection_on'):
raise ValueError('Both arguments should be projections on the tangent '
'space of some other TT-object. All projection* functions '
'leave .projection_on field in the resulting TT-object '
'which is not present in the arguments you\'ve provided')
if projected_tt_vectors_1.projection_on != projected_tt_vectors_2.projection_on:
raise ValueError('Both arguments should be projections on the tangent '
'space of the same TT-object. The provided arguments are '
'projections on different TT-objects (%s and %s). Or at '
'least the pointers are different.' %
(projected_tt_vectors_1.projection_on,
projected_tt_vectors_2.projection_on))
# Always work with batches of objects for simplicity.
projected_tt_vectors_1 = shapes.expand_batch_dim(projected_tt_vectors_1)
projected_tt_vectors_2 = shapes.expand_batch_dim(projected_tt_vectors_2)
ndims = projected_tt_vectors_1.ndims()
tt_ranks = shapes.lazy_tt_ranks(projected_tt_vectors_1)
if projected_tt_vectors_1.is_tt_matrix():
right_size = tt_ranks[1] // 2
curr_core_1 = projected_tt_vectors_1.tt_cores[0]
curr_core_2 = projected_tt_vectors_2.tt_cores[0]
curr_du_1 = curr_core_1[:, :, :, :, :right_size]
curr_du_2 = curr_core_2[:, :, :, :, :right_size]
res = tf.einsum('paijb,qaijb->pq', curr_du_1, curr_du_2)
for core_idx in range(1, ndims):
left_size = tt_ranks[core_idx] // 2
right_size = tt_ranks[core_idx + 1] // 2
curr_core_1 = projected_tt_vectors_1.tt_cores[core_idx]
curr_core_2 = projected_tt_vectors_2.tt_cores[core_idx]
curr_du_1 = curr_core_1[:, left_size:, :, :, :right_size]
curr_du_2 = curr_core_2[:, left_size:, :, :, :right_size]
res += tf.einsum('paijb,qaijb->pq', curr_du_1, curr_du_2)
left_size = tt_ranks[-2] // 2
curr_core_1 = projected_tt_vectors_1.tt_cores[-1]
curr_core_2 = projected_tt_vectors_2.tt_cores[-1]
curr_du_1 = curr_core_1[:, left_size:, :, :, :]
curr_du_2 = curr_core_2[:, left_size:, :, :, :]
res += tf.einsum('paijb,qaijb->pq', curr_du_1, curr_du_2)
else:
# Working with TT-tensor, not TT-matrix.
right_size = tt_ranks[1] // 2
curr_core_1 = projected_tt_vectors_1.tt_cores[0]
curr_core_2 = projected_tt_vectors_2.tt_cores[0]
curr_du_1 = curr_core_1[:, :, :, :right_size]
curr_du_2 = curr_core_2[:, :, :, :right_size]
res = tf.einsum('paib,qaib->pq', curr_du_1, curr_du_2)
for core_idx in range(1, ndims):
left_size = tt_ranks[core_idx] // 2
right_size = tt_ranks[core_idx + 1] // 2
curr_core_1 = projected_tt_vectors_1.tt_cores[core_idx]
curr_core_2 = projected_tt_vectors_2.tt_cores[core_idx]
curr_du_1 = curr_core_1[:, left_size:, :, :right_size]
curr_du_2 = curr_core_2[:, left_size:, :, :right_size]
res += tf.einsum('paib,qaib->pq', curr_du_1, curr_du_2)
left_size = tt_ranks[-2] // 2
curr_core_1 = projected_tt_vectors_1.tt_cores[-1]
curr_core_2 = projected_tt_vectors_2.tt_cores[-1]
curr_du_1 = curr_core_1[:, left_size:, :, :]
curr_du_2 = curr_core_2[:, left_size:, :, :]
res += tf.einsum('paib,qaib->pq', curr_du_1, curr_du_2)
return res
def add_n_projected(tt_objects, coef=None):
"""Adds all input TT-objects that are projections on the same tangent space.
add_projected((a, b)) is equivalent add(a, b) for a and b that are from the
same tangent space, but doesn't increase the TT-ranks.
Args:
tt_objects: a list of TT-objects that are projections on the same tangent
space.
coef: a list of numbers or anything else convertable to tf.Tensor.
If provided, computes weighted sum. The size of this array should be
len(tt_objects) x tt_objects[0].batch_size
Returns:
TT-objects representing the sum of the tt_objects (weighted sum if coef is
provided). The TT-rank of the result equals to the TT-ranks of the arguments.
"""
for tt in tt_objects:
if not hasattr(tt, 'projection_on'):
raise ValueError('Both arguments should be projections on the tangent '
'space of some other TT-object. All projection* functions '
'leave .projection_on field in the resulting TT-object '
'which is not present in the argument you\'ve provided.')
projection_on = tt_objects[0].projection_on
for tt in tt_objects[1:]:
if tt.projection_on != projection_on:
raise ValueError('All tt_objects should be projections on the tangent '
'space of the same TT-object. The provided arguments are '
'projections on different TT-objects (%s and %s). Or at '
'least the pointers are different.' % (tt.projection_on,
projection_on))
if coef is not None:
coef = tf.convert_to_tensor(coef, dtype=tt_objects[0].dtype)
if coef.get_shape().ndims > 1:
# In batch case we will need to multiply each core by this coefficients
# along the first axis. To do it need to reshape the coefs to match
# the TT-cores number of dimensions.
some_core = tt_objects[0].tt_cores[0]
dim_array = [1] * (some_core.get_shape().ndims + 1)
dim_array[0] = coef.get_shape()[0].value
dim_array[1] = coef.get_shape()[1].value
coef = tf.reshape(coef, dim_array)
ndims = tt_objects[0].ndims()
tt_ranks = shapes.lazy_tt_ranks(tt_objects[0])
left_rank_dim = tt_objects[0].left_tt_rank_dim
right_rank_dim = tt_objects[0].right_tt_rank_dim
res_cores = []
def slice_tt_core(tt_core, left_idx, right_idx):
num_tt_core_dims = len(tt_core.get_shape())
idx = [slice(None)] * num_tt_core_dims
idx[left_rank_dim] = left_idx
idx[right_rank_dim] = right_idx
return tt_core[idx]
right_half_rank = tt_ranks[1] // 2
left_chunks = []
for obj_idx, tt in enumerate(tt_objects):
curr_core = slice_tt_core(tt.tt_cores[0], slice(None),
slice(0, right_half_rank))
if coef is not None:
curr_core *= coef[obj_idx]
left_chunks.append(curr_core)
left_part = tf.add_n(left_chunks)
first_obj_core = tt_objects[0].tt_cores[0]
right_part = slice_tt_core(first_obj_core, slice(None),
slice(right_half_rank, None))
first_core = tf.concat((left_part, right_part), axis=right_rank_dim)
res_cores.append(first_core)
for core_idx in range(1, ndims - 1):
first_obj_core = tt_objects[0].tt_cores[core_idx]
left_half_rank = tt_ranks[core_idx] // 2
right_half_rank = tt_ranks[core_idx + 1] // 2
upper_part = slice_tt_core(tt.tt_cores[core_idx], slice(0, left_half_rank),
slice(None))
lower_right_part = slice_tt_core(first_obj_core,
slice(left_half_rank, None),
slice(right_half_rank, None))
lower_left_chunks = []
for obj_idx, tt in enumerate(tt_objects):
curr_core = slice_tt_core(tt.tt_cores[core_idx],
slice(left_half_rank, None),
slice(0, right_half_rank))
if coef is not None:
curr_core *= coef[obj_idx]
lower_left_chunks.append(curr_core)
lower_left_part = tf.add_n(lower_left_chunks)
lower_part = tf.concat((lower_left_part, lower_right_part),
axis=right_rank_dim)
curr_core = tf.concat((upper_part, lower_part), axis=left_rank_dim)
res_cores.append(curr_core)
left_half_rank = tt_ranks[ndims - 1] // 2
upper_part = slice_tt_core(tt.tt_cores[-1], slice(0, left_half_rank),
slice(None))
lower_chunks = []
for obj_idx, tt in enumerate(tt_objects):
curr_core = slice_tt_core(tt.tt_cores[-1], slice(left_half_rank, None),
slice(None))
if coef is not None:
curr_core *= coef[obj_idx]
lower_chunks.append(curr_core)
lower_part = tf.add_n(lower_chunks)
last_core = tf.concat((upper_part, lower_part), axis=left_rank_dim)
res_cores.append(last_core)
raw_shape = tt_objects[0].get_raw_shape()
static_tt_ranks = tt_objects[0].get_tt_ranks()
if isinstance(tt_objects[0], TensorTrain):
res = TensorTrain(res_cores, raw_shape, static_tt_ranks)
elif isinstance(tt_objects[0], TensorTrainBatch):
res = TensorTrainBatch(res_cores, raw_shape, static_tt_ranks,
tt_objects[0].batch_size)
# Maintain the projection_on property.
res.projection_on = tt_objects[0].projection_on
return res
def tangent_space_to_deltas(tt, name='t3f_tangent_space_to_deltas'):
"""Convert an element of the tangent space to deltas representation.
Tangent space elements (outputs of t3f.project) look like:
dP1 V2 ... Vd + U1 dP2 V3 ... Vd + ... + U1 ... Ud-1 dPd.
This function takes as input an element of the tangent space and converts
it to the list of deltas [dP1, ..., dPd].
Args:
tt: `TensorTrain` or `TensorTrainBatch` that is a result of t3f.project,
t3f.project_matmul, or other similar functions.
name: string, name of the Op.
Returns:
A list of delta-cores (tf.Tensors).
"""
if not hasattr(tt, 'projection_on') or tt.projection_on is None:
raise ValueError('tt argument is supposed to be a projection, but it '
'lacks projection_on field')
num_dims = tt.ndims()
left_tt_rank_dim = tt.left_tt_rank_dim
right_tt_rank_dim = tt.right_tt_rank_dim
deltas = [None] * num_dims
tt_ranks = shapes.lazy_tt_ranks(tt)
for i in range(1, num_dims - 1):
if int(tt_ranks[i] / 2) != tt_ranks[i] / 2:
raise ValueError('tt argument is supposed to be a projection, but its '
'ranks are not even.')
with tf.compat.v1.name_scope(name, values=tt.tt_cores):
for i in range(1, num_dims - 1):
r1, r2 = tt_ranks[i], tt_ranks[i + 1]
curr_core = tt.tt_cores[i]
slc = [slice(None)] * len(curr_core.shape)
slc[left_tt_rank_dim] = slice(int(r1 / 2), None)
slc[right_tt_rank_dim] = slice(0, int(r2 / 2))
deltas[i] = curr_core[slc]
slc = [slice(None)] * len(tt.tt_cores[0].shape)
slc[right_tt_rank_dim] = slice(0, int(tt_ranks[1] / 2))
deltas[0] = tt.tt_cores[0][slc]
slc = [slice(None)] * len(tt.tt_cores[0].shape)
slc[left_tt_rank_dim] = slice(int(tt_ranks[-2] / 2), None)
deltas[num_dims - 1] = tt.tt_cores[num_dims - 1][slc]
return deltas
def deltas_to_tangent_space(deltas, tt, left=None, right=None,
name='t3f_deltas_to_tangent_space'):
"""Converts deltas representation of tangent space vector to TT object.
Takes as input a list of [dP1, ..., dPd] and returns
dP1 V2 ... Vd + U1 dP2 V3 ... Vd + ... + U1 ... Ud-1 dPd.
This function is hard to use correctly because deltas should abey the
so called gauge conditions. If the don't, the function will silently return
incorrect result. This is why this function is not imported in __init__.
Args:
deltas: a list of deltas (essentially TT-cores) obeying the gauge
conditions.
tt: `TensorTrain` object on which the tangent space tensor represented by
delta is projected.
left: t3f.orthogonilize_tt_cores(tt). If you have it already compute, you
may pass it as argument to avoid recomputing.
right: t3f.orthogonilize_tt_cores(left, left_to_right=False). If you have
it already compute, you may pass it as argument to avoid recomputing.
name: string, name of the Op.
Returns:
`TensorTrain` object constructed from deltas, that is from the tangent
space at point `tt`.
"""
cores = []
dtype = tt.dtype
num_dims = tt.ndims()
# TODO: add cache instead of mannually pasisng precomputed stuff?
input_tensors = list(tt.tt_cores) + list(deltas)
if left is not None:
input_tensors += list(left.tt_cores)
if right is not None:
input_tensors += list(right.tt_cores)
with tf.compat.v1.name_scope(name, values=input_tensors):
if left is None:
left = decompositions.orthogonalize_tt_cores(tt)
if right is None:
right = decompositions.orthogonalize_tt_cores(left, left_to_right=False)
left_tangent_tt_ranks = shapes.lazy_tt_ranks(left)
right_tangent_tt_ranks = shapes.lazy_tt_ranks(left)
raw_shape = shapes.lazy_raw_shape(left)
right_rank_dim = left.right_tt_rank_dim
left_rank_dim = left.left_tt_rank_dim
is_batch_case = len(deltas[0].shape) > len(tt.tt_cores[0].shape)
if is_batch_case:
right_rank_dim += 1
left_rank_dim += 1
batch_size = deltas[0].shape.as_list()[0]
for i in range(num_dims):
left_tt_core = left.tt_cores[i]
right_tt_core = right.tt_cores[i]
if is_batch_case:
tile = [1] * len(left_tt_core.shape)
tile = [batch_size] + tile
left_tt_core = tf.tile(left_tt_core[None, ...], tile)
right_tt_core = tf.tile(right_tt_core[None, ...], tile)
if i == 0:
tangent_core = tf.concat((deltas[i], left_tt_core),
axis=right_rank_dim)
elif i == num_dims - 1:
tangent_core = tf.concat((right_tt_core, deltas[i]),
axis=left_rank_dim)
else:
rank_1 = right_tangent_tt_ranks[i]
rank_2 = left_tangent_tt_ranks[i + 1]
if tt.is_tt_matrix():
mode_size_n = raw_shape[0][i]
mode_size_m = raw_shape[1][i]
shape = [rank_1, mode_size_n, mode_size_m, rank_2]
else:
mode_size_n = raw_shape[0][i]
shape = [rank_1, mode_size_n, rank_2]
if is_batch_case:
shape = [batch_size] + shape
zeros = tf.zeros(shape, dtype=dtype)
upper = tf.concat((right_tt_core, zeros), axis=right_rank_dim)
lower = tf.concat((deltas[i], left_tt_core), axis=right_rank_dim)
tangent_core = tf.concat((upper, lower), axis=left_rank_dim)
cores.append(tangent_core)
if is_batch_case:
tangent = TensorTrainBatch(cores, batch_size=batch_size)
else:
tangent = TensorTrain(cores)
tangent.projection_on = tt
return tangent
| 42.90991
| 101
| 0.664943
| 5,949
| 38,104
| 3.955455
| 0.05917
| 0.036293
| 0.021929
| 0.018444
| 0.795419
| 0.760019
| 0.733798
| 0.70745
| 0.679954
| 0.669755
| 0
| 0.016205
| 0.237193
| 38,104
| 887
| 102
| 42.958286
| 0.793367
| 0.225121
| 0
| 0.666667
| 0
| 0
| 0.08068
| 0.009494
| 0
| 0
| 0
| 0.00451
| 0
| 1
| 0.0134
| false
| 0
| 0.008375
| 0
| 0.035176
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
819ef83975adf31b6a1082bbb314f1833657807e
| 246
|
bzl
|
Python
|
tools/build_rules/gtk_dependent.bzl
|
Ewpratten/frc_971_mirror
|
3a8a0c4359f284d29547962c2b4c43d290d8065c
|
[
"BSD-2-Clause"
] | 39
|
2021-06-18T03:22:30.000Z
|
2022-03-21T15:23:43.000Z
|
tools/build_rules/gtk_dependent.bzl
|
Ewpratten/frc_971_mirror
|
3a8a0c4359f284d29547962c2b4c43d290d8065c
|
[
"BSD-2-Clause"
] | 10
|
2021-06-18T03:22:19.000Z
|
2022-03-18T22:14:15.000Z
|
tools/build_rules/gtk_dependent.bzl
|
Ewpratten/frc_971_mirror
|
3a8a0c4359f284d29547962c2b4c43d290d8065c
|
[
"BSD-2-Clause"
] | 4
|
2021-08-19T19:20:04.000Z
|
2022-03-08T07:33:18.000Z
|
disable_gtk_binaries = True
def gtk_dependent_cc_library(**kwargs):
if not disable_gtk_binaries:
native.cc_library(**kwargs)
def gtk_dependent_cc_binary(**kwargs):
if not disable_gtk_binaries:
native.cc_binary(**kwargs)
| 24.6
| 39
| 0.739837
| 34
| 246
| 4.941176
| 0.382353
| 0.178571
| 0.321429
| 0.202381
| 0.440476
| 0.440476
| 0.440476
| 0.440476
| 0
| 0
| 0
| 0
| 0.166667
| 246
| 9
| 40
| 27.333333
| 0.819512
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0
| 0.285714
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
81a85ad97e42bc868e9ae369e44cafe2a61e536a
| 107
|
py
|
Python
|
Problems/sample.py
|
HKuz/Test_Code
|
798efc9fc668ef021736a6d9699ef4713cf8b718
|
[
"MIT"
] | 1
|
2020-06-14T20:10:04.000Z
|
2020-06-14T20:10:04.000Z
|
Problems/sample.py
|
makramjandar/Test_Code
|
798efc9fc668ef021736a6d9699ef4713cf8b718
|
[
"MIT"
] | null | null | null |
Problems/sample.py
|
makramjandar/Test_Code
|
798efc9fc668ef021736a6d9699ef4713cf8b718
|
[
"MIT"
] | 1
|
2019-12-09T12:48:05.000Z
|
2019-12-09T12:48:05.000Z
|
#!/usr/local/bin/python3
def main():
# Test suite
return
if __name__ == '__main__':
main()
| 9.727273
| 26
| 0.579439
| 13
| 107
| 4.153846
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012658
| 0.261682
| 107
| 10
| 27
| 10.7
| 0.670886
| 0.317757
| 0
| 0
| 0
| 0
| 0.112676
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0
| 0.25
| 0.5
| 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
| 0
| 1
| 0
| 0
|
0
| 4
|
81aeea522ff7190fbf314844be2ef81f5a72b4cb
| 3,894
|
py
|
Python
|
python/one-liner/cluster_of_non_0.py
|
Hamng/python-sources
|
0cc5a5d9e576440d95f496edcfd921ae37fcd05a
|
[
"Unlicense"
] | null | null | null |
python/one-liner/cluster_of_non_0.py
|
Hamng/python-sources
|
0cc5a5d9e576440d95f496edcfd921ae37fcd05a
|
[
"Unlicense"
] | 1
|
2019-02-23T18:30:51.000Z
|
2019-02-23T18:30:51.000Z
|
python/one-liner/cluster_of_non_0.py
|
Hamng/python-sources
|
0cc5a5d9e576440d95f496edcfd921ae37fcd05a
|
[
"Unlicense"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 8 07:38:05 2020
@author: Ham
Self Challenge: Count Cluster of Non-0s
Given a 1-dimension array of integers,
determine how many 'clusters' of non-0 in the array.
A 'cluster' is a group of consecutive non-0 values.
Scoring: a solution needs to be a 1-liner;
i.e. NO point if implementing with a traditional 'for' loop!
Sample Input (see STDIN_SIO)
A : [
9, 0, 0, 22, 0, 0, 39, 11, 3, 0, \
0, 24, 1, 0, 50, 23, 3, 44, 0, 23, \
25, 6, 36, 19, 10, 23, 0, 37, 4, 1, \
7, 12, 0, 0, 49
]
Expected Output:
8
"""
import itertools
STDIN_SIO = """
9, 0, 0, 22, 0, 0, 39, 11, 3, 0, \
0, 24, 1, 0, 50, 23, 3, 44, 0, 23, \
2, 8, 20, 35, 0, 40, 34, 26, 36, 0, \
35, 19, 20, 18, 11, 43, 19, 21, 40, 0, \
14, 0, 14, 0, 0, 25, 35, 24, 49, 15, \
13, 3, 0, 10, 31, 25, 27, 37, 27, 43, \
44, 27, 8, 43, 0, 0, 33, 25, 19, 47, \
0, 29, 5, 2, 12, 8, 7, 0, 16, 36, \
0, 6, 17, 35, 36, 21, 0, 9, 1, 0, \
43, 29, 39, 15, 18, 0, 34, 26, 48, 0, \
34, 35, 7, 10, 0, 0, 15, 5, 12, 26, \
0, 37, 30, 33, 27, 34, 9, 37, 22, 0, \
0, 24, 30, 0, 0, 38, 23, 25, 0, 30, \
39, 24, 31, 0, 6, 19, 25, 0, 28, 15, \
8, 0, 48, 0, 35, 41, 0, 24, 1, 41, \
31, 0, 35, 21, 15, 26, 15, 27, 4, 0, \
8, 4, 0, 0, 2, 42, 18, 0, 28, 18, \
49, 34, 5, 10, 41, 48, 26, 14, 45, 44, \
9, 0, 49, 50, 24, 0, 0, 0, 23, 0, \
17, 0, 47, 31, 0, 42, 0, 0, 0, 40, \
46, 22, 50, 32, 20, 3, 44, 22, 0, 37, \
25, 0, 19, 26, 14, 23, 27, 41, 0, 1, \
13, 0, 48, 20, 37, 8, 0, 18, 0, 26, \
12, 19, 32, 19, 22, 0, 0, 0, 0, 0, \
16, 0, 0, 43, 0, 10, 5, 0, 6, 26, \
0, 24, 40, 29, 0, 43, 18, 27, 0, 0, \
37, 0, 46, 35, 17, 0, 20, 44, 29, 29, \
40, 33, 22, 27, 0, 0, 38, 21, 4, 0, \
0, 15, 31, 48, 36, 10, 0, 41, 0, 45, \
39, 0, 11, 9, 3, 38, 16, 0, 11, 22, \
37, 0, 3, 44, 10, 12, 47, 22, 32, 7, \
24, 1, 0, 22, 25, 0, 14, 0, 0, 0, \
23, 0, 36, 1, 42, 46, 0, 48, 0, 33, \
5, 27, 45, 0, 15, 29, 0, 50, 2, 31, \
25, 6, 36, 19, 10, 23, 0, 37, 4, 1, \
7, 12, 0, 0, 49
""".strip()
def count_non_0_clusters_1(arr):
"""Translate each non-0 to an 'A' char, and 0 to a space.
Then join together to become a string.
Then split(), then return number of tokens.
"""
return len("".join(["A" if e else " " for e in arr]).split())
def count_non_0_clusters_2(arr):
"""groupby() partitions into groups as:
[[True , [list of non-0]],
[False, [list of 0s]],
[True , [list of non-0]],
[False, [list of 0s]],
...
[True , [list of non-0]]]
(Old) Next, the list comprenhension iterates thru each tuple,
then collects the 1st element in each tuple if True.
Finally, return the len/count of Trues:
return len([t[0] for t in itertools.groupby(...) if t[0]])
Next, the list comprenhension iterates thru each tuple,
then collects the 1st element in each tuple.
Then return the count() of True elements.
"""
return [t[0] for t in itertools.groupby(arr, lambda e: bool(e))].count(True)
if __name__ == '__main__':
a = list(map(int, STDIN_SIO.split(",")))
# Nicely print it, 10 entries per line, with continuation
# so can copy-n-paste back into STDIN_SIO
#print(len(a))
#for i in range(0, (len(a) // 10) * 10, 10):
# print("%3u," * 10 % tuple(a[i:i+10]), end=" \\\n")
#j = a[(len(a) // 10) * 10:]
#print("%3u," * (len(j) - 1) % tuple(j[:-1]), end="")
#print("%3u" % j[-1])
print("count_*_1() returns", count_non_0_clusters_1(a), "clusters of non-0")
print("count_*_2() returns", count_non_0_clusters_2(a), "clusters of non-0")
| 34.157895
| 81
| 0.48793
| 727
| 3,894
| 2.569464
| 0.23934
| 0.029979
| 0.019272
| 0.036403
| 0.276231
| 0.204497
| 0.204497
| 0.178801
| 0.178801
| 0.178801
| 0
| 0.259455
| 0.321007
| 3,894
| 113
| 82
| 34.460177
| 0.44705
| 0.397535
| 0
| 0
| 0
| 0.744681
| 0.774302
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.042553
| false
| 0
| 0.021277
| 0
| 0.106383
| 0.042553
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
81b626c300ff32d3e035f1c56e66bff3d7d1f4dc
| 592
|
py
|
Python
|
03_lecture_Django/lecture3/hello/views.py
|
MoStgt/CS50
|
62bd6eb38bea745c6356e1a8f03adb6ab70e2a37
|
[
"MIT"
] | null | null | null |
03_lecture_Django/lecture3/hello/views.py
|
MoStgt/CS50
|
62bd6eb38bea745c6356e1a8f03adb6ab70e2a37
|
[
"MIT"
] | null | null | null |
03_lecture_Django/lecture3/hello/views.py
|
MoStgt/CS50
|
62bd6eb38bea745c6356e1a8f03adb6ab70e2a37
|
[
"MIT"
] | null | null | null |
from http.client import HTTPResponse
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
# def index(request):
# return HttpResponse("Hello World!")
def index(request):
return render(request, "hello/index.html")
def brian(request):
return HttpResponse("Hello Brian")
def david(request):
return HttpResponse("Hello David")
# def greet(request, name):
# return HttpResponse(f"Hello, {name.capitalize()}!")
def greet(request, name):
return render(request, "hello/greet.html", {
"name": name.capitalize()
})
| 24.666667
| 57
| 0.706081
| 72
| 592
| 5.805556
| 0.347222
| 0.124402
| 0.179426
| 0.215311
| 0.119617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165541
| 592
| 24
| 58
| 24.666667
| 0.846154
| 0.278716
| 0
| 0
| 0
| 0
| 0.137441
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0
| 0.230769
| 0.307692
| 0.846154
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
81d63e7ca9da71f50fffa4b00a77a421574650e4
| 347
|
py
|
Python
|
main.py
|
soyoung97/MixText
|
22993cd028a4223a54e138a89b53cd7978a5e38b
|
[
"MIT"
] | null | null | null |
main.py
|
soyoung97/MixText
|
22993cd028a4223a54e138a89b53cd7978a5e38b
|
[
"MIT"
] | null | null | null |
main.py
|
soyoung97/MixText
|
22993cd028a4223a54e138a89b53cd7978a5e38b
|
[
"MIT"
] | null | null | null |
import os
os.system("pip install pytorch_transformers")
import nsml
print(nsml.DATASET_PATH)
os.system('python ./code/train.py --n-labeled 10 --data-path '+ nsml.DATASET_PATH + '/train/ --batch-size 4 --batch-size-u 8 --epochs 20 --val-iteration 1000 --lambda-u 1 --T 0.5 --alpha 16 --mix-layers-set 7 9 12 --lrmain 0.000005 --lrlast 0.00005'
)
| 38.555556
| 249
| 0.706052
| 61
| 347
| 3.967213
| 0.754098
| 0.066116
| 0.123967
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104918
| 0.121037
| 347
| 8
| 250
| 43.375
| 0.688525
| 0
| 0
| 0
| 0
| 0.166667
| 0.708092
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.166667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c4a20cea738e338abf0c6eb0710a2bbf72908f18
| 378
|
py
|
Python
|
BlurDetection.py
|
samaritan-security/samaritan-backend
|
3a4450e4a2e7a823d6d2fb1e982871ac0aa97744
|
[
"WTFPL"
] | null | null | null |
BlurDetection.py
|
samaritan-security/samaritan-backend
|
3a4450e4a2e7a823d6d2fb1e982871ac0aa97744
|
[
"WTFPL"
] | 59
|
2020-02-05T03:09:43.000Z
|
2020-04-23T19:29:58.000Z
|
BlurDetection.py
|
samaritan-security/samaritan-backend
|
3a4450e4a2e7a823d6d2fb1e982871ac0aa97744
|
[
"WTFPL"
] | null | null | null |
import cv2
def variance_of_laplacian(image):
return cv2.Laplacian(image, cv2.CV_64F).var()
"""
checks if an image is blurry
returns True if blurry, False otherwise
"""
def detect_blurry_image(image, threshold):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blur = variance_of_laplacian(image)
if(blur < threshold):
return True
return False
| 19.894737
| 50
| 0.708995
| 52
| 378
| 5
| 0.519231
| 0.161538
| 0.146154
| 0.184615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026403
| 0.198413
| 378
| 19
| 51
| 19.894737
| 0.831683
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.111111
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c4b0600fb893dd2bf03b8ad35d0df6623f45ef39
| 272
|
py
|
Python
|
02-current-time.py
|
KeithWilliamsGMIT/Emerging-Technologies-Python-Fundamentals
|
5eae96818baa3bf10e091bfe39498efe237c9e7f
|
[
"MIT"
] | null | null | null |
02-current-time.py
|
KeithWilliamsGMIT/Emerging-Technologies-Python-Fundamentals
|
5eae96818baa3bf10e091bfe39498efe237c9e7f
|
[
"MIT"
] | null | null | null |
02-current-time.py
|
KeithWilliamsGMIT/Emerging-Technologies-Python-Fundamentals
|
5eae96818baa3bf10e091bfe39498efe237c9e7f
|
[
"MIT"
] | null | null | null |
# Author: Keith Williams
# Date: 21/09/2017
from time import strftime
# This line prints the current date and time to the console in the format 01-10-2017 13:15:30.
# strftime must be imported from the time package before being used.
print(strftime("%d-%m-%Y %H:%M:%S"))
| 34
| 94
| 0.731618
| 50
| 272
| 3.98
| 0.78
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09607
| 0.158088
| 272
| 8
| 95
| 34
| 0.772926
| 0.731618
| 0
| 0
| 0
| 0
| 0.246377
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
c4b0d7f117651d7395b65de65e764c7fea1c1e3d
| 87
|
py
|
Python
|
hiisi/__init__.py
|
ritvje/hiisi
|
56f8abb3013296172c8c2919a33519856a903a81
|
[
"MIT"
] | null | null | null |
hiisi/__init__.py
|
ritvje/hiisi
|
56f8abb3013296172c8c2919a33519856a903a81
|
[
"MIT"
] | null | null | null |
hiisi/__init__.py
|
ritvje/hiisi
|
56f8abb3013296172c8c2919a33519856a903a81
|
[
"MIT"
] | null | null | null |
from .hiisi import HiisiHDF
from .odim import OdimPVOL, OdimCOMP
__version__ = "0.0.6"
| 21.75
| 36
| 0.770115
| 13
| 87
| 4.846154
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.137931
| 87
| 3
| 37
| 29
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.057471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c4b707a809f0ff9f343cd22eb8b5bddf218a75e6
| 656
|
py
|
Python
|
tests/test_utils.py
|
munirjojoverge/rl_AD_urban_baselines
|
c17cb97fb6a1edd3134b340194e82f4c3ca4f065
|
[
"MIT"
] | 6
|
2019-02-05T08:17:29.000Z
|
2022-03-22T12:47:53.000Z
|
tests/test_utils.py
|
munirjojoverge/rl_AD_urban_baselines
|
c17cb97fb6a1edd3134b340194e82f4c3ca4f065
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
munirjojoverge/rl_AD_urban_baselines
|
c17cb97fb6a1edd3134b340194e82f4c3ca4f065
|
[
"MIT"
] | 1
|
2019-09-08T14:15:56.000Z
|
2019-09-08T14:15:56.000Z
|
import numpy as np
from urban_AD_env.utils import rotated_rectangles_intersect
def test_rotated_rectangles_intersect():
assert rotated_rectangles_intersect(([12.86076812, 28.60182391], 5.0, 2.0, -0.4675779906495494),
([9.67753944, 28.90585412], 5.0, 2.0, -0.3417019364473201))
assert rotated_rectangles_intersect(([0, 0], 2, 1, 0), ([0, 1], 2, 1, 0))
assert not rotated_rectangles_intersect(([0, 0], 2, 1, 0), ([0, 2.1], 2, 1, 0))
assert not rotated_rectangles_intersect(([0, 0], 2, 1, 0), ([1, 1.1], 2, 1, 0))
assert rotated_rectangles_intersect(([0, 0], 2, 1, np.pi/4), ([1, 1.1], 2, 1, 0))
| 50.461538
| 100
| 0.625
| 105
| 656
| 3.742857
| 0.295238
| 0.045802
| 0.463104
| 0.050891
| 0.470738
| 0.445293
| 0.414758
| 0.414758
| 0.307888
| 0.223919
| 0
| 0.235741
| 0.198171
| 656
| 12
| 101
| 54.666667
| 0.511407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.555556
| 1
| 0.111111
| true
| 0
| 0.222222
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c4c2b89beca88decbb59d2f0d2ce782d1dc5da96
| 2,100
|
py
|
Python
|
gen_methods.py
|
mweeden2/desert_game
|
aaf561d11687455a23982771315b15a9bf5b1a86
|
[
"MIT"
] | null | null | null |
gen_methods.py
|
mweeden2/desert_game
|
aaf561d11687455a23982771315b15a9bf5b1a86
|
[
"MIT"
] | null | null | null |
gen_methods.py
|
mweeden2/desert_game
|
aaf561d11687455a23982771315b15a9bf5b1a86
|
[
"MIT"
] | null | null | null |
# created by Matt Weeden
# 7/8/16
import classes as c
def printIntro():
print 'Welcome to the\n'
print '''__/\\\\\\\\\\\\\\\\\\\\\\\\_________________________________________________\
__________________________\n _\\/\\\\\\////////\\\\\\___________________________________\
______________________________________\n _\\/\\\\\\______\\//\\\\\\___________________\
___________________________________________/\\\\\\______\n _\\/\\\\\\_______\\/\\\\\
\\_____/\\\\\\\\\\\\\\\\___/\\\\\\\\\\\\\\\\\\\\_____/\\\\\\\\\\\\\\\\___/\\\\/\\\\\\\\\\\
\\\\___/\\\\\\\\\\\\\\\\\\\\\\_\n _\\/\\\\\\_______\\/\\\\\\___/\\\\\\/////\\\\\\_\
\\/\\\\\\//////____/\\\\\\/////\\\\\\_\\/\\\\\\/////\\\\\\_\\////\\\\\\////__\n \
_\\/\\\\\\_______\\/\\\\\\__/\\\\\\\\\\\\\\\\\\\\\\__\\/\\\\\\\\\\\\\\\\\\\\__/\\\\\\\\\\\
\\\\\\\\\\\\__\\/\\\\\\___\\///_____\\/\\\\\\______\n _\\/\\\\\\_______/\\\\\\\
__\\//\\\\///////___\\////////\\\\\\_\\//\\\\///////___\\/\\\\\\____________\\/\\\\\\_/\\\
\\__\n _\\/\\\\\\\\\\\\\\\\\\\\\\\\/____\\//\\\\\\\\\\\\\\\\\\\\__/\\\\\\\\\
\\\\\\\\\\\\__\\//\\\\\\\\\\\\\\\\\\\\_\\/\\\\\\____________\\//\\\\\\\\\\___\n \
_\\////////////_______\\//////////__\\//////////____\\//////////__\\///____________\
__\\//\///____'''
print
print 'created by Matt Weeden\n'
def getUname():
done = False
while not done:
uname = raw_input("Enter your name: ")
if set(uname) <= set('qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'):
if len(uname) <= 40:
done = True
else:
print 'Please keep your name to 40 letters or less'
else:
print 'Please use only letters in your name'
return uname
def createPlayer(name):
#c.Person(mainp [main character or not], name, weight, health, xp)
return c.Person(True, name, 150, 10, 100, 0)
def printIntro1(player):
msg = """==================================================
Welcome to the desert, %s.
"To survival." *clink*
"""
print msg % player.getName()
| 38.181818
| 90
| 0.438571
| 119
| 2,100
| 4.411765
| 0.546218
| 0.026667
| 0.034286
| 0.038095
| 0.015238
| 0.015238
| 0.015238
| 0
| 0
| 0
| 0
| 0.010233
| 0.162381
| 2,100
| 54
| 91
| 38.888889
| 0.288232
| 0.044762
| 0
| 0.051282
| 0
| 0
| 0.736264
| 0.587912
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.025641
| null | null | 0.230769
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c4c33c445b5f51d288c06db4115d54abafa3991d
| 352
|
py
|
Python
|
entity_resolution/interfaces/IRecord.py
|
GeoJamesJones/ArcGIS-Senzing-Prototype
|
ebe7f1c3f516525f4bfbf5b4f1446e8c6612a67b
|
[
"MIT"
] | null | null | null |
entity_resolution/interfaces/IRecord.py
|
GeoJamesJones/ArcGIS-Senzing-Prototype
|
ebe7f1c3f516525f4bfbf5b4f1446e8c6612a67b
|
[
"MIT"
] | null | null | null |
entity_resolution/interfaces/IRecord.py
|
GeoJamesJones/ArcGIS-Senzing-Prototype
|
ebe7f1c3f516525f4bfbf5b4f1446e8c6612a67b
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
from abc import ABCMeta, abstractmethod
from typing import Dict, Any, List
class IRecord(metaclass=ABCMeta):
@abstractmethod
def to_dict(self) -> Dict[Any, Any]:
...
@abstractmethod
def to_json(self) -> str:
...
@abstractmethod
def to_list(self) -> List[Any]:
...
| 18.526316
| 40
| 0.636364
| 40
| 352
| 5.425
| 0.475
| 0.235023
| 0.262673
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.252841
| 352
| 19
| 41
| 18.526316
| 0.825095
| 0
| 0
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.230769
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c4d859124d413014c3e68fa4b2d4e0363025ecc6
| 79
|
py
|
Python
|
build_tests/python_opencv.py
|
AustinSchuh/971-Robot-Code
|
99abc66fd2d899c0bdab338dc6f57dc5def9be8d
|
[
"Apache-2.0"
] | 39
|
2021-06-18T03:22:30.000Z
|
2022-03-21T15:23:43.000Z
|
build_tests/python_opencv.py
|
AustinSchuh/971-Robot-Code
|
99abc66fd2d899c0bdab338dc6f57dc5def9be8d
|
[
"Apache-2.0"
] | 10
|
2021-06-18T03:22:19.000Z
|
2022-03-18T22:14:15.000Z
|
build_tests/python_opencv.py
|
AustinSchuh/971-Robot-Code
|
99abc66fd2d899c0bdab338dc6f57dc5def9be8d
|
[
"Apache-2.0"
] | 4
|
2021-08-19T19:20:04.000Z
|
2022-03-08T07:33:18.000Z
|
#!/usr/bin/python3
import cv2
if __name__ == '__main__':
cv2.SIFT_create()
| 11.285714
| 26
| 0.683544
| 11
| 79
| 4.090909
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044776
| 0.151899
| 79
| 6
| 27
| 13.166667
| 0.626866
| 0.21519
| 0
| 0
| 0
| 0
| 0.131148
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c4f2275c8950f55ba51fa504b3d7b04b4200e057
| 170
|
py
|
Python
|
hon/commands/clean.py
|
swquinn/hon
|
333332029ee884a8822d38024659d5d7da64ff1a
|
[
"MIT"
] | null | null | null |
hon/commands/clean.py
|
swquinn/hon
|
333332029ee884a8822d38024659d5d7da64ff1a
|
[
"MIT"
] | 14
|
2019-06-23T01:49:55.000Z
|
2021-02-22T01:26:51.000Z
|
hon/commands/clean.py
|
swquinn/hon
|
333332029ee884a8822d38024659d5d7da64ff1a
|
[
"MIT"
] | null | null | null |
import click
from ..cli import with_context
@click.command('clean', short_help="Cleans a book' output directories")
@with_context
def clean_command(ctx=None):
pass
| 18.888889
| 71
| 0.764706
| 25
| 170
| 5.04
| 0.76
| 0.174603
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129412
| 170
| 8
| 72
| 21.25
| 0.851351
| 0
| 0
| 0
| 0
| 0
| 0.223529
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.166667
| 0.333333
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
f219a6a5d2eba5cb99ad3a1f9f919f6e65e608c6
| 77
|
py
|
Python
|
settings/channel_archiver/NIH.pressure_downstream_settings.py
|
bopopescu/Lauecollect
|
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
|
[
"MIT"
] | null | null | null |
settings/channel_archiver/NIH.pressure_downstream_settings.py
|
bopopescu/Lauecollect
|
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
|
[
"MIT"
] | 1
|
2019-10-22T21:28:31.000Z
|
2019-10-22T21:39:12.000Z
|
settings/channel_archiver/NIH.pressure_downstream_settings.py
|
bopopescu/Lauecollect
|
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
|
[
"MIT"
] | 2
|
2019-06-06T15:06:46.000Z
|
2020-07-20T02:03:22.000Z
|
filename = '//mx340hs/data/anfinrud_1903/Archive/NIH.pressure_downstream.txt'
| 77
| 77
| 0.831169
| 10
| 77
| 6.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093333
| 0.025974
| 77
| 1
| 77
| 77
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0.820513
| 0.820513
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f2243459193cb30ca1ec87a1cec0d50174acfaea
| 170
|
py
|
Python
|
polliwog/tri/__init__.py
|
lace/polliwog
|
7744ce171738e4739e391fcff4f4689d9f177196
|
[
"BSD-2-Clause"
] | 18
|
2019-05-03T02:08:12.000Z
|
2022-03-24T11:49:59.000Z
|
polliwog/tri/__init__.py
|
lace/polliwog
|
7744ce171738e4739e391fcff4f4689d9f177196
|
[
"BSD-2-Clause"
] | 76
|
2019-04-03T15:24:01.000Z
|
2022-03-01T14:07:04.000Z
|
polliwog/tri/__init__.py
|
lace/polliwog
|
7744ce171738e4739e391fcff4f4689d9f177196
|
[
"BSD-2-Clause"
] | 3
|
2019-11-04T16:22:07.000Z
|
2022-03-09T08:50:52.000Z
|
from . import functions as _functions
from .functions import * # noqa: F401,F403
from .quad_faces import quads_to_tris
__all__ = _functions.__all__ + ["quads_to_tris"]
| 28.333333
| 48
| 0.776471
| 24
| 170
| 4.875
| 0.541667
| 0.119658
| 0.188034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041096
| 0.141176
| 170
| 5
| 49
| 34
| 0.760274
| 0.088235
| 0
| 0
| 0
| 0
| 0.084967
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1ef7c90725f50f509ebf7ce67bf02498f0dcedf7
| 181
|
py
|
Python
|
src/server/__main__.py
|
ENDERZOMBI102/chatapp
|
3f54e72a8d3b10457cf88ec5f87b2984cc84a51f
|
[
"MIT"
] | 1
|
2021-06-20T05:47:53.000Z
|
2021-06-20T05:47:53.000Z
|
src/server/__main__.py
|
ENDERZOMBI102/chatapp
|
3f54e72a8d3b10457cf88ec5f87b2984cc84a51f
|
[
"MIT"
] | null | null | null |
src/server/__main__.py
|
ENDERZOMBI102/chatapp
|
3f54e72a8d3b10457cf88ec5f87b2984cc84a51f
|
[
"MIT"
] | null | null | null |
from sys import argv
from server.AServer import AServer
if '--old' in argv:
from server.server import Server
Server()
else:
AServer( websocket='--websocket' in argv ).Start()
| 16.454545
| 51
| 0.729282
| 26
| 181
| 5.076923
| 0.461538
| 0.121212
| 0.212121
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160221
| 181
| 10
| 52
| 18.1
| 0.868421
| 0
| 0
| 0
| 0
| 0
| 0.088398
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.428571
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
48065a4ff80756ba525a0a9808129ee5012b319d
| 224
|
py
|
Python
|
experimentation/trap/statistics_calculator.py
|
GruppoPBDMNG-10/AIExam
|
22fd4dad20bcff689deeae227f179267b92a60d8
|
[
"MIT"
] | null | null | null |
experimentation/trap/statistics_calculator.py
|
GruppoPBDMNG-10/AIExam
|
22fd4dad20bcff689deeae227f179267b92a60d8
|
[
"MIT"
] | 5
|
2018-09-24T13:13:19.000Z
|
2018-09-24T18:34:22.000Z
|
experimentation/trap/statistics_calculator.py
|
GruppoPBDMNG-10/AIExam
|
22fd4dad20bcff689deeae227f179267b92a60d8
|
[
"MIT"
] | null | null | null |
import experimentation.statistics.statistics as statistics
intersection = statistics.find_matches_from_file('result/experimentation/hmm/anomalous.json', 'result/experimentation/rnn/anomalous.json')
print(len(intersection))
| 44.8
| 138
| 0.852679
| 25
| 224
| 7.52
| 0.64
| 0.223404
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044643
| 224
| 5
| 139
| 44.8
| 0.878505
| 0
| 0
| 0
| 0
| 0
| 0.364444
| 0.364444
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4810516c04a5fc1c2f18a86f01879ae7f2e15131
| 92
|
py
|
Python
|
BOJ_Solved/BOJ-19698.py
|
CodingLeeSeungHoon/Python_Algorithm_TeamNote
|
1e92986999b45aa9951e12e67b23062e410e9b36
|
[
"MIT"
] | 7
|
2021-11-19T14:50:59.000Z
|
2022-02-25T20:00:20.000Z
|
BOJ_Solved/BOJ-19698.py
|
CodingLeeSeungHoon/Python_Algorithm_TeamNote
|
1e92986999b45aa9951e12e67b23062e410e9b36
|
[
"MIT"
] | null | null | null |
BOJ_Solved/BOJ-19698.py
|
CodingLeeSeungHoon/Python_Algorithm_TeamNote
|
1e92986999b45aa9951e12e67b23062e410e9b36
|
[
"MIT"
] | null | null | null |
"""
백준 19698번 : 헛간 청약
"""
N, W, H, L = map(int, input().split())
print(min(W//L * H//L, N))
| 15.333333
| 38
| 0.48913
| 19
| 92
| 2.368421
| 0.736842
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067568
| 0.195652
| 92
| 6
| 39
| 15.333333
| 0.540541
| 0.184783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
4816994d8585786c6c9791f101c25452477dc72a
| 169
|
py
|
Python
|
vc/manager/generation_result.py
|
very-meanly/vc
|
41f63e8a8b159f3a49430bbee6872162de060901
|
[
"MIT"
] | null | null | null |
vc/manager/generation_result.py
|
very-meanly/vc
|
41f63e8a8b159f3a49430bbee6872162de060901
|
[
"MIT"
] | null | null | null |
vc/manager/generation_result.py
|
very-meanly/vc
|
41f63e8a8b159f3a49430bbee6872162de060901
|
[
"MIT"
] | null | null | null |
from vc.manager.base import Manager
from vc.model.generation_result import GenerationResult
class GenerationResultManager(Manager):
model_class = GenerationResult
| 24.142857
| 55
| 0.840237
| 19
| 169
| 7.368421
| 0.578947
| 0.085714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112426
| 169
| 6
| 56
| 28.166667
| 0.933333
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
48197fe7d2676b37c5b385a0395e386523f42d50
| 63
|
py
|
Python
|
test/tutorial/scripts/api/logout_api.py
|
GPelayo/dcp-cli
|
d585fd8b4687f29bfd034242472b870d17ed1e50
|
[
"MIT"
] | 8
|
2017-10-10T18:29:27.000Z
|
2019-06-15T04:25:43.000Z
|
test/tutorial/scripts/api/logout_api.py
|
GPelayo/dcp-cli
|
d585fd8b4687f29bfd034242472b870d17ed1e50
|
[
"MIT"
] | 440
|
2017-10-09T16:06:22.000Z
|
2021-03-25T17:12:18.000Z
|
test/tutorial/scripts/api/logout_api.py
|
GPelayo/dcp-cli
|
d585fd8b4687f29bfd034242472b870d17ed1e50
|
[
"MIT"
] | 10
|
2017-11-07T22:42:59.000Z
|
2020-05-05T15:36:01.000Z
|
from hca.dss import DSSClient
dss = DSSClient()
dss.logout()
| 10.5
| 29
| 0.730159
| 9
| 63
| 5.111111
| 0.666667
| 0.521739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15873
| 63
| 5
| 30
| 12.6
| 0.867925
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
484f03e9c4b7ff5aefbc6845368e72fc3dfe1209
| 114
|
py
|
Python
|
tests/shunit/data/bad_i18n_newline_5.py
|
nicole331/TWLight
|
fab9002e76868f8a2ef36f9279c777de34243b2c
|
[
"MIT"
] | 67
|
2017-12-14T22:27:48.000Z
|
2022-03-13T18:21:31.000Z
|
tests/shunit/data/bad_i18n_newline_5.py
|
nicole331/TWLight
|
fab9002e76868f8a2ef36f9279c777de34243b2c
|
[
"MIT"
] | 433
|
2017-03-24T22:51:23.000Z
|
2022-03-31T19:36:22.000Z
|
tests/shunit/data/bad_i18n_newline_5.py
|
Mahuton/TWLight
|
90b299d07b0479f21dc90e17b8d05f5a221b0de1
|
[
"MIT"
] | 105
|
2017-06-23T03:53:41.000Z
|
2022-03-30T17:24:29.000Z
|
# Single-quoted string is preceded and succeeded by newlines.
# Translators: This is a helpful comment.
_(
'5'
)
| 16.285714
| 61
| 0.736842
| 16
| 114
| 5.1875
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010638
| 0.175439
| 114
| 6
| 62
| 19
| 0.87234
| 0.868421
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4856168e71f578517034764f4b9110679f5820fe
| 24
|
py
|
Python
|
src/maho/modules/__init__.py
|
evangelos-ch/maho-bot
|
458c3ed0e4cb4d8edd300441b2defbc481aaf3f3
|
[
"MIT"
] | null | null | null |
src/maho/modules/__init__.py
|
evangelos-ch/maho-bot
|
458c3ed0e4cb4d8edd300441b2defbc481aaf3f3
|
[
"MIT"
] | null | null | null |
src/maho/modules/__init__.py
|
evangelos-ch/maho-bot
|
458c3ed0e4cb4d8edd300441b2defbc481aaf3f3
|
[
"MIT"
] | 1
|
2021-02-16T13:06:56.000Z
|
2021-02-16T13:06:56.000Z
|
"""Maho bot modules."""
| 12
| 23
| 0.583333
| 3
| 24
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 24
| 1
| 24
| 24
| 0.666667
| 0.708333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4876b544334a9fdacdb07da711e4c0eb80787e3b
| 339
|
py
|
Python
|
tests/test_parse.py
|
fphammerle/duplitab
|
8dcea2dbcb7f44405cdff24e24f598d338bdcea0
|
[
"MIT"
] | 1
|
2021-02-24T11:45:49.000Z
|
2021-02-24T11:45:49.000Z
|
tests/test_parse.py
|
fphammerle/duplitab
|
8dcea2dbcb7f44405cdff24e24f598d338bdcea0
|
[
"MIT"
] | null | null | null |
tests/test_parse.py
|
fphammerle/duplitab
|
8dcea2dbcb7f44405cdff24e24f598d338bdcea0
|
[
"MIT"
] | null | null | null |
import pytest
import datetime
import duplitab
@pytest.mark.parametrize(('duplicity_timestamp', 'expected'), [
['Tue Oct 11 11:02:01 2016', datetime.datetime(2016, 10, 11, 11, 2, 1)],
])
def test_parse_duplicity_timestamp(duplicity_timestamp, expected):
assert expected == duplitab._parse_duplicity_timestamp(duplicity_timestamp)
| 30.818182
| 79
| 0.769912
| 43
| 339
| 5.860465
| 0.511628
| 0.357143
| 0.206349
| 0.253968
| 0.325397
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079734
| 0.112094
| 339
| 10
| 80
| 33.9
| 0.757475
| 0
| 0
| 0
| 0
| 0
| 0.150442
| 0
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0.125
| false
| 0
| 0.375
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6f904b06f4d8b0199476081eeaa6c6a6c588158e
| 98
|
py
|
Python
|
test_cookiecutter_ali92hm/__main__.py
|
ali92hm/test-cookiecutter
|
5fbfef57e7ea8ae8b826958cb1db21812cc8467e
|
[
"ISC"
] | null | null | null |
test_cookiecutter_ali92hm/__main__.py
|
ali92hm/test-cookiecutter
|
5fbfef57e7ea8ae8b826958cb1db21812cc8467e
|
[
"ISC"
] | null | null | null |
test_cookiecutter_ali92hm/__main__.py
|
ali92hm/test-cookiecutter
|
5fbfef57e7ea8ae8b826958cb1db21812cc8467e
|
[
"ISC"
] | null | null | null |
from .cli import entrypoint
if __name__ == "__main__": # pragma: no cover
entrypoint.main()
| 19.6
| 46
| 0.693878
| 12
| 98
| 5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193878
| 98
| 4
| 47
| 24.5
| 0.759494
| 0.163265
| 0
| 0
| 0
| 0
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6f92f4f38b2cf0fe2438ae66792a5537b2e53d3f
| 30
|
py
|
Python
|
version.py
|
iridiumcow/OoT-Randomizer
|
3a5d2bebb2131e593f6611bd5c062ddd6fdac8ff
|
[
"MIT"
] | null | null | null |
version.py
|
iridiumcow/OoT-Randomizer
|
3a5d2bebb2131e593f6611bd5c062ddd6fdac8ff
|
[
"MIT"
] | null | null | null |
version.py
|
iridiumcow/OoT-Randomizer
|
3a5d2bebb2131e593f6611bd5c062ddd6fdac8ff
|
[
"MIT"
] | null | null | null |
__version__ = '5.2.158 f.LUM'
| 15
| 29
| 0.666667
| 6
| 30
| 2.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 0.133333
| 30
| 1
| 30
| 30
| 0.423077
| 0
| 0
| 0
| 0
| 0
| 0.433333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6fa1472d7ffbd2b29874a36ce2b115c7eb0c4881
| 120
|
py
|
Python
|
biothings-hub/files/nde-hub/hub/dataload/sources/figshare/dumper.py
|
NIAID-Data-Ecosystem/nde-crawlers
|
c0aff7dc1625ece1e67d03ad56555da7dbdc4a11
|
[
"Apache-2.0"
] | null | null | null |
biothings-hub/files/nde-hub/hub/dataload/sources/figshare/dumper.py
|
NIAID-Data-Ecosystem/nde-crawlers
|
c0aff7dc1625ece1e67d03ad56555da7dbdc4a11
|
[
"Apache-2.0"
] | null | null | null |
biothings-hub/files/nde-hub/hub/dataload/sources/figshare/dumper.py
|
NIAID-Data-Ecosystem/nde-crawlers
|
c0aff7dc1625ece1e67d03ad56555da7dbdc4a11
|
[
"Apache-2.0"
] | null | null | null |
from hub.dataload.nde import NDEFileSystemDumper
class FigshareDumper(NDEFileSystemDumper):
SRC_NAME = "figshare"
| 20
| 48
| 0.808333
| 12
| 120
| 8
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 120
| 5
| 49
| 24
| 0.914286
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6fa4dc608c43d4d875d4dbb6404a617e1898a215
| 169
|
py
|
Python
|
FileStorage/utils/__init__.py
|
Thiefxt/FileStorage
|
db2882b2ea861f4412cb453edef6439501b13705
|
[
"MIT"
] | 1
|
2020-07-15T10:02:40.000Z
|
2020-07-15T10:02:40.000Z
|
FileStorage/utils/__init__.py
|
Thiefxt/FileStorage
|
db2882b2ea861f4412cb453edef6439501b13705
|
[
"MIT"
] | null | null | null |
FileStorage/utils/__init__.py
|
Thiefxt/FileStorage
|
db2882b2ea861f4412cb453edef6439501b13705
|
[
"MIT"
] | null | null | null |
"""
@Author : xiaotao
@Email : [email protected]
@Lost modifid : 2020/4/24 10:02
@Filename : __init__.py.py
@Description :
@Software : PyCharm
"""
| 21.125
| 32
| 0.609467
| 20
| 169
| 4.95
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195313
| 0.242604
| 169
| 8
| 33
| 21.125
| 0.578125
| 1.43787
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6fa6d9568fc3d20a8fc6e092cfbe18e8adeb1122
| 134
|
py
|
Python
|
brian2sampledevice/__init__.py
|
brian-team/brian2sampledevice
|
d4b4e932aff35b3350e22039b05fcb022623e5fc
|
[
"MIT"
] | null | null | null |
brian2sampledevice/__init__.py
|
brian-team/brian2sampledevice
|
d4b4e932aff35b3350e22039b05fcb022623e5fc
|
[
"MIT"
] | null | null | null |
brian2sampledevice/__init__.py
|
brian-team/brian2sampledevice
|
d4b4e932aff35b3350e22039b05fcb022623e5fc
|
[
"MIT"
] | null | null | null |
from .device import SampleDevice
from .codeobject import SampleDeviceCodeObject
__all__ = ['SampleDevice', 'SampleDeviceCodeObject']
| 26.8
| 52
| 0.828358
| 11
| 134
| 9.727273
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097015
| 134
| 4
| 53
| 33.5
| 0.884298
| 0
| 0
| 0
| 0
| 0
| 0.253731
| 0.164179
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6fb9c69f0b059e1e502f8dc0059898eb346e1f36
| 320
|
py
|
Python
|
app.py
|
jero2rome/HelloWorld-Python
|
67a4b600415e4c0011e4598efea874d0b49abd79
|
[
"MIT"
] | null | null | null |
app.py
|
jero2rome/HelloWorld-Python
|
67a4b600415e4c0011e4598efea874d0b49abd79
|
[
"MIT"
] | null | null | null |
app.py
|
jero2rome/HelloWorld-Python
|
67a4b600415e4c0011e4598efea874d0b49abd79
|
[
"MIT"
] | null | null | null |
course = "Python Programming"
print(course.upper())
print(course.lower())
print(course.title())
course = " Python Programming"
print(course)
print(course.strip())
print(course.find("Pro"))
print(course.find("pro"))
print(course.replace("P", "-"))
print("Programming" in course)
print("Programming" not in course)
| 18.823529
| 34
| 0.709375
| 41
| 320
| 5.536585
| 0.341463
| 0.387665
| 0.202643
| 0.246696
| 0.506608
| 0.207048
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 320
| 16
| 35
| 20
| 0.788194
| 0
| 0
| 0.166667
| 0
| 0
| 0.21875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.833333
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6fc8616e9f969ac9e3ee973ff4f5b06bdc7a38e6
| 17
|
py
|
Python
|
pointcloud2raster/__version__.py
|
NorthArrowResearch/pointcloud2raster
|
419d82c9a62947e0258e308d2812f745df09794d
|
[
"MIT"
] | null | null | null |
pointcloud2raster/__version__.py
|
NorthArrowResearch/pointcloud2raster
|
419d82c9a62947e0258e308d2812f745df09794d
|
[
"MIT"
] | null | null | null |
pointcloud2raster/__version__.py
|
NorthArrowResearch/pointcloud2raster
|
419d82c9a62947e0258e308d2812f745df09794d
|
[
"MIT"
] | null | null | null |
__version__="0.3"
| 17
| 17
| 0.764706
| 3
| 17
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 0
| 17
| 1
| 17
| 17
| 0.411765
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6fd18ba88e62fdb096046d7f14533a962dedc716
| 283
|
py
|
Python
|
mmrazor/models/architectures/components/backbones/__init__.py
|
HIT-cwh/mmrazor
|
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
|
[
"Apache-2.0"
] | 553
|
2021-12-23T11:43:35.000Z
|
2022-03-31T01:04:20.000Z
|
mmrazor/models/architectures/components/backbones/__init__.py
|
HIT-cwh/mmrazor
|
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
|
[
"Apache-2.0"
] | 113
|
2021-12-23T12:09:06.000Z
|
2022-03-30T10:13:42.000Z
|
mmrazor/models/architectures/components/backbones/__init__.py
|
HIT-cwh/mmrazor
|
2dad24044d7f1dad88f20221f8fc071dd40fdd4f
|
[
"Apache-2.0"
] | 76
|
2021-12-23T11:48:39.000Z
|
2022-03-29T11:24:35.000Z
|
# Copyright (c) OpenMMLab. All rights reserved.
from .darts_backbone import DartsBackbone
from .searchable_mobilenet import SearchableMobileNet
from .searchable_shufflenet_v2 import SearchableShuffleNetV2
__all__ = ['DartsBackbone', 'SearchableShuffleNetV2', 'SearchableMobileNet']
| 40.428571
| 76
| 0.844523
| 26
| 283
| 8.884615
| 0.653846
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011628
| 0.088339
| 283
| 6
| 77
| 47.166667
| 0.883721
| 0.159011
| 0
| 0
| 0
| 0
| 0.228814
| 0.09322
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d229bf33f366491dd645f2b26164b3b0a59e7d44
| 114
|
py
|
Python
|
src/typeDefs/lineFlowSumm.py
|
nagasudhirpulla/wrldc_scada_mumbai_dashboard
|
bc107ef47568781b588316f0c5c0c0d2a08adac8
|
[
"MIT"
] | null | null | null |
src/typeDefs/lineFlowSumm.py
|
nagasudhirpulla/wrldc_scada_mumbai_dashboard
|
bc107ef47568781b588316f0c5c0c0d2a08adac8
|
[
"MIT"
] | null | null | null |
src/typeDefs/lineFlowSumm.py
|
nagasudhirpulla/wrldc_scada_mumbai_dashboard
|
bc107ef47568781b588316f0c5c0c0d2a08adac8
|
[
"MIT"
] | null | null | null |
from typing import TypedDict
class ILineFlowSumm(TypedDict):
inst: dict
maxFlow: dict
maxTime: dict
| 14.25
| 31
| 0.719298
| 13
| 114
| 6.307692
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.22807
| 114
| 7
| 32
| 16.285714
| 0.931818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
d2537e3317890ddaef34e1cff80e0e43d3fa3866
| 13,481
|
py
|
Python
|
testsuite/conversion.py
|
buganini/bsdconv
|
7830f4ebef9b04f9877a21f24a7705a48a4812c4
|
[
"BSD-2-Clause"
] | 33
|
2015-01-25T12:04:04.000Z
|
2021-12-12T23:16:55.000Z
|
testsuite/conversion.py
|
buganini/bsdconv
|
7830f4ebef9b04f9877a21f24a7705a48a4812c4
|
[
"BSD-2-Clause"
] | 14
|
2015-11-19T20:52:39.000Z
|
2021-06-15T03:18:31.000Z
|
testsuite/conversion.py
|
buganini/bsdconv
|
7830f4ebef9b04f9877a21f24a7705a48a4812c4
|
[
"BSD-2-Clause"
] | 5
|
2016-07-27T15:30:39.000Z
|
2020-07-06T11:52:15.000Z
|
# -*- coding: utf-8 -*-
import sys
import urllib
from bsdconv import Bsdconv
def bsdconv01(dt):
dt=dt.lstrip("0").upper()
if len(dt) & 1:
return "010"+dt
else:
return "01"+dt
def bnf(s):
return ",".join([bsdconv01(x) for x in s.strip().split(" ")])
iotest=[
["big5:utf-8","\xa5\x5c\x5c\xaf\xe0","功\能"],
["big5-5c,big5:utf-8","\xa5\x5c\x5c\xaf\xe0","功能"],
["utf-8:big5-5c,big5","功能","\xa5\x5c\x5c\xaf\xe0"],
["_cp950:utf-8","\xa5\x5c\xaf\xe0","功能"],
["utf-8:_cp950,ascii","喆",""],
["utf-8:_uao250,ascii","喆","\x95\xed"],
["utf-8:big5,cp950-trans","测试","\xb4\xfa\xb8\xd5"],
["ascii,3f:ascii","test測試test","test??????test"],
["ascii,any#0137:ascii","test測試test","test777777test"],
["utf-8:ascii,3f","test測試test","test??test"],
["utf-8:ascii,any#38","test測試test","test88test"],
["utf-8:uao250|_cp950,ascii,3f:utf-8","陶喆測試","陶?穘?試"],
["utf-8:uao250|_cp950,ascii,sub:utf-8","陶喆測試","陶�穘�試"],
["cns11643:utf-8","1234\x00\x01\x60\x41\x00\x01\x66\x5cabcd","1234測試abcd"],
["utf-8:cns11643","1234測試abcd","1234\x00\x01\x60\x41\x00\x01\x66\x5cabcd"],
["ansi-control,utf-8:split:bsdconv-keyword,bsdconv","a\033[1mb","0161,1B5B316D,0162,"],
["ascii-named-html-entity:utf-8","ü","ü"],
["ascii-numeric-html-entity:utf-8","測試","測試"],
["utf-8:ascii-hex-numeric-html-entity","測\n","測
"],
["utf-8:ascii-dec-numeric-html-entity","測\n","測 "],
["utf-8:ascii-named-html-entity","Ç","Ç"],
["bsdconv:utf-8","016e2c","測"],
["bsdconv:utf-8","016e2c,018a66","測試"],
["utf-8:bsdconv","測\n","016E2C010A"],
["utf-8:pass","測\n","\x01\x6e\x2c\x01\x0a"],
["utf-8:raw","測試\n","\x6e\x2c\x8a\x66\x0a"],
["bsdconv-keyword,utf-8:bsdconv-keyword,bsdconv|bsdconv-keyword,bsdconv:bsdconv-keyword,utf-8","測,試\t测,试\n","測,試\t测,试\n"],
["byte:byte","\xaa\xbb\xcc\xdd","\xaa\xbb\xcc\xdd"],
["escape:utf-8","%u6e2c","測"],
["escape:split:bsdconv-keyword,bsdconv","%u6e2c%e8%a9%a6","016E2C,03E8,03A9,03A6,"],
["escape:pass#mark&for=unicode,byte|pass#unmark,utf-8:utf-8","%u6e2c%e8%a9%a6","測試"],
["escape,utf-8:pass#mark&for=unicode,byte|pass#unmark,big5:utf-8","%u6e2c%b8%d5功能","測試功能"],
["escape,ascii-numeric-html-entity,utf-8:pass#mark&for=unicode,byte|pass#unmark,big5:utf-8","%u6e2c%b8%d5功能","測試功能"],
["escape:pass#mark&for=unicode,byte|pass#unmark,utf-8:utf-8","\\346\\270\\254\\350\\251\\246","測試"],
["utf-8:ascii,ascii-escaped-unicode","test測試","test\\u6E2C\\u8A66"],
["utf-8:ascii-html-cns11643-img","測","<img class=\"cns11643_img\" src=\"http://www.cns11643.gov.tw/AIDB/png.do?page=1&code=6041\" />"],
["utf-8:ascii-html-info","測\n","<a href=\"http://www.cns11643.gov.tw/AIDB/query_general_view.do?page=1&code=6041\"><img src=\"http://www.cns11643.gov.tw/AIDB/png.do?page=1&code=6041\" /></a><a href=\"http://www.fileformat.info/info/unicode/char/0A/index.htm\"><img class=\"unicode_img\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-A\" /></a>"],
["utf-8:ascii-html-unicode-img","測","<img class=\"unicode_img\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-6E2C\" />"],
["utf-8:null","blah",""],
["utf-8:ambiguous-pad:utf-8","БИ 2","Б И 2"],
["utf-8:ambiguous-unpad:utf-8","Б И 2","БИ 2"],
["ansi-control,byte:big5-defrag:byte,ansi-control|skip,big5:split:bsdconv-keyword,bsdconv","\xaf\033[1m\xe0","0180FD,1B5B316D,"],
["utf-8:chewing:utf-8","abc測試xyz","abcㄘㄜˋㄕˋxyz"],
["utf-8:chewing:han-pinyin:utf-8","測試","ce4shi4"],
["utf-8:kana-phonetic:utf-8","ドラえもん","doraemon"],
["ascii:alias-from:ascii","BIG5","UAO250"],
["ascii:alias-from:ascii","UAO250","ASCII,_UAO250"],
["ascii:alias-from:ascii","LOCALE","UTF-8"],
["ascii:alias-from:ascii","UTF-8","ASCII,_UTF-8"],
["ascii:alias-to:ascii","BIG5","CP950"],
["ascii:alias-to:ascii","CP950","_CP950,ASCII"],
["utf-8:cns11643:split:bsdconv-keyword,bsdconv","測試","02016041,0201665C,"],
["bsdconv:unicode:split:bsdconv-keyword,bsdconv","02016041,0201665C","016E2C,018A66,"],
["utf-8:upper:utf-8","testTEST","TESTTEST"],
["utf-8:lower:utf-8","testTEST","testtest"],
["utf-8:full:utf-8","testTEST1234","testTEST1234"],
["utf-8:half:utf-8","testTEST1234","testTEST1234"],
["utf-8:upsidedown:utf-8","FUNNY","Ⅎ∩ᴎᴎ⅄"],
["utf-8:unix:utf-8","a\r\nb","a\nb"],
["utf-8:mac:utf-8","a\r\nb","a\rb"],
["utf-8:win:utf-8","a\nb","a\r\nb"],
["utf-8:nl2br:utf-8","a\nb","a<br />b"],
["utf-8:trim-width#22&ambi-as-wide:utf-8","ˋˊ這是個很長的字串啊啊啊","ˋˊ這是個很長的字串啊"],
["utf-8:trim-width#22:utf-8","ˋˊ這是個很長的字串啊啊啊","ˋˊ這是個很長的字串啊啊"],
["utf-8:trim-width#10&ambiguous-as-wide:utf-8","三長兩短ˊˋ3長2短","三長兩短ˊ"],
["utf-8:zh-strings:utf-8","abd測試efg功能,hij","測試\n功能\n"],
["utf-8:zhcn:utf-8","測試","测试"],
["utf-8:zhtw:utf-8","测试之后","測試之后"],
["utf-8:zhtw:zhtw-words:utf-8","测试之后","測試之後"],
["utf-8:whitespace-derail:zhtw:zhtw-words:whitespace-rerail:utf-8","之 后","之 後"],
["utf-8:zh-decomp:zh-comp:utf-8","功夫不好不要艹我","巭孬嫑莪"],
["utf-8:ibm-37","EBCDIC test","\xc5\xc2\xc3\xc4\xc9\xc3\x40\xa3\x85\xa2\xa3"],
["utf-8:ibm-37|ibm-37:utf-8","EBCDIC test","EBCDIC test"],
["utf-8:ibm-930|ibm-930:utf-8","ドラえもん","ドラえもん"],
["utf-8:ibm-933|ibm-933:utf-8","십진법","십진법"],
["utf-8:ibm-935|ibm-935:utf-8","标准码","标准码"],
["utf-8:ibm-937|ibm-937:utf-8","編碼表","編碼表"],
["utf-8:ibm-939|ibm-939:utf-8","ドラえもん","ドラえもん"],
["utf-8:gb18030|gb18030:utf-8","标准码編碼表ドラえもん","标准码編碼表ドラえもん"],
["utf-8:ascii,escape#for=unicode&mode=16&prefix=2575","測a試b好","%u6E2Ca%u8A66b%u597D"],
["utf-8:big5|ascii,byte:ascii,escape#for=byte&mode=hex&prefix=5c78","測a試b好","\\xB4\\xFAa\\xB8\\xD5b\\xA6n"],
["utf-8:big5|ascii,byte:ascii,escape#for=byte&mode=oct&prefix=5c","測a試b好","\\264\\372a\\270\\325b\\246n"],
["utf-8:big5,pass#for=unicode&mark|pass#unmark,ascii,byte:ascii,url","測test喆試","%B4%FAtest%u5586%B8%D5"],
["utf-8:ascii,escape#for=unicode&prefix=2623&mode=10&suffix=3b","測test喆試","測test喆試"],
["utf-8:upper:utf-8","aăDžбᾥⅷⓐ","AĂDŽБᾭⅧⒶ"],
["utf-8:lower:utf-8","AĂDŽБᾭⅧⒶ","aădžбᾥⅷⓐ"],
["utf-8:nfd:utf-8","ăDžⓐ","ăDžⓐ"],
["utf-8:nfc:utf-8","ăDžⓐ","ăDžⓐ"],
["utf-8:nfkd:utf-8","ăDžⓐ","ăDža"],
["utf-8:nfkc:utf-8","ăDžⓐ","ăDža"],
["ascii,any#019644.012F:utf-8","A測B","A附/附/附/B"],
["utf-8:pass,zh-decomp:insert#after=002c:bsdconv-keyword,bsdconv","不大不要","014E0D,015927,014E0D,018981,"],
["utf-8:pass#limit=2,zh-decomp:insert#after=002c:bsdconv-keyword,bsdconv","不大不要","014E0D,015927,048D,040107,0476,"],
["bsdconv:nfd:_nf-order:insert#after=002c:bsdconv-keyword,bsdconv","011e9b,010323","01017F,010323,010307,"],
["utf-8:_nf-hangul-decomposition:utf-8","가","가"],
["utf-8:casefold:utf-8","AbяЯßẞ","abяяssss"],
["utf-8:replace#0142.0143=0132.0133:utf-8","ABCD","A23D"],
["utf-8:strings#min-len=2:utf-8","aㄎabㄎabcㄉabcd","ab\nabc\nabcd\n"],
["utf-8:strings#min-len=2&before=0128&after=0129.010a:utf-8","aㄎabㄎabcㄉabcd","(ab)\n(abc)\n(abcd)\n"],
["utf-8:whitespace-derail:zhtw:zhtw-words:whitespace-rerail:utf-8","之 后","之 後"],
["fallback-unicode:insert#after=002c:bsdconv-keyword,bsdconv", "\xe8","01E8,"],
["cp950-uda:insert#after=002c:bsdconv-keyword,bsdconv", "\xfa\x40\xfe\xfe\x8e\x40\xa0\xfe\x81\x40\x8d\xfe\xc6\xa1\xc8\xfe", "01E000,01E310,01E311,01EEB7,01EEB8,01F6B0,01F6B1,01F848,"],
["_utf-8:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xED\xB0\x80", ""],
["_utf-8#cesu:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xED\xB0\x80", "01010400,"],
["_utf-8#loose:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xED\xB0\x80", "01D801,01DC00,"],
["_utf-8#cesu,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81", "013F,013F,013F,"],
["_utf-8#cesu,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xB0\x80", "013F,013F,013F,"],
["_utf-8#cesu,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xe9\x99\x84", "013F,013F,013F,019644,"],
["_utf-8#cesu,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xB0\x80\xe9\x99\x84", "013F,013F,013F,019644,"],
["_utf-8#loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xe9\x99\x84", "01D801,019644,"],
["_utf-8#loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xB0\x80\xe9\x99\x84", "01DC00,019644,"],
["_utf-8#cesu&loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xe9\x99\x84", "01D801,019644,"],
["_utf-8#cesu&loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xB0\x80\xe9\x99\x84", "01DC00,019644,"],
["_utf-8#cesu&loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xED\xA0\x81", "01D801,01D801,"],
["_utf-8#cesu&loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xB0\x80\xED\xB0\x80", "01DC00,01DC00,"],
["_utf-8#loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xA0\x81\xED\xA0\x81", "01D801,01D801,"],
["_utf-8#loose,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xED\xB0\x80\xED\xB0\x80", "01DC00,01DC00,"],
["_utf-8:insert#after=002c:bsdconv-keyword,bsdconv", "\xf0\x80\x80\xaf", ""],
["_utf-8#overlong:insert#after=002c:bsdconv-keyword,bsdconv", "\xf0\x80\x80\xaf", "012F,"],
["_utf-8#super:insert#after=002c:bsdconv-keyword,bsdconv", "\xf8\x80\x80\x80\xaf", ""],
["_utf-8#super&overlong:insert#after=002c:bsdconv-keyword,bsdconv", "\xf8\x80\x80\x80\xaf", "012F,"],
["_utf-8#super,ascii,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xc1\xbf,\xe0\x9f\xbf,\xf0\x8f\xbf\xbf,\xf8\x87\xbf\xbf\xbf,\xfc\x83\xbf\xbf\xbf\xbf", "013F,013F,012C,013F,013F,013F,012C,013F,013F,013F,013F,012C,013F,013F,013F,013F,013F,012C,013F,013F,013F,013F,013F,013F,"],
["_utf-8#super&overlong,ascii,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xc1\xbf,\xe0\x9f\xbf,\xf0\x8f\xbf\xbf,\xf8\x87\xbf\xbf\xbf,\xfc\x83\xbf\xbf\xbf\xbf", "017F,012C,0107FF,012C,01FFFF,012C,011FFFFF,012C,0103FFFFFF,"],
["_utf-8#overlong,ascii,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xc1\xbf,\xe0\x9f\xbf,\xf0\x8f\xbf\xbf,\xf8\x87\xbf\xbf\xbf,\xfc\x83\xbf\xbf\xbf\xbf", "017F,012C,0107FF,012C,01FFFF,012C,013F,013F,013F,013F,013F,012C,013F,013F,013F,013F,013F,013F,"],
["_utf-8,ascii,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xc0\x80,\xe0\x80\x80,\xf0\x80\x80\x80,\xf8\x80\x80\x80\x80,\xfc\x80\x80\x80\x80\x80", "013F,013F,012C,013F,013F,013F,012C,013F,013F,013F,013F,012C,013F,013F,013F,013F,013F,012C,013F,013F,013F,013F,013F,013F,"],
["_utf-8#nul&overlong&super,ascii,3f:insert#after=002c:bsdconv-keyword,bsdconv", "\xc0\x80,\xe0\x80\x80,\xf0\x80\x80\x80,\xf8\x80\x80\x80\x80,\xfc\x80\x80\x80\x80\x80", "0100,012C,0100,012C,0100,012C,0100,012C,0100,"],
]
countertest=[
["utf-8:width:null","123Б測試",{"FULL":2,"AMBI":1,"HALF":3}],
["utf-8:count:null","123Б測試",{"COUNT":6}],
["utf-8:count#blah:null","123Б測試",{"BLAH":6}],
["utf-8:count#for=lala&for=cjk:null","123Б測a試bc",{"COUNT":2}],
]
passed=True
for c, i, o in iotest:
p=Bsdconv(c)
if not p:
print(Bsdconv.error())
print("Test failed at %s" % repr([c, i, o]))
del p
passed=False
continue
r=p.conv(i)
if o != r:
print("Test failed at %s" % repr([c, i, o]))
print("expected(%d): %s" % (len(o), repr(o)))
print("result(%d): %s" % (len(r), repr(r)))
passed=False
del p
for c, d, i in countertest:
p=Bsdconv(c)
if not p:
print(Bsdconv.error())
print("Test failed at %s" % repr([c, i, o]))
passed=False
continue
p.conv(d)
r=p.counter()
for k in i:
if i[k] != r[k]:
print("Test failed at %s" % repr([c, d, i]))
print("expected: %s" % repr(i))
print("result: %s" % repr(r))
passed=False
del p
url=""
f_map=open("tmp/map.txt")
for l in f_map:
l=l.strip().split("\t")
if l[0]=="NormalizationTest.txt":
url=l[1]
break
nt=open("tmp/NormalizationTest.txt")
toSRC=Bsdconv("bsdconv:insert#after=002c:bsdconv-keyword,bsdconv")
toNFC=Bsdconv("bsdconv:nfc:insert#after=002c:bsdconv-keyword,bsdconv")
toNFD=Bsdconv("bsdconv:nfd:insert#after=002c:bsdconv-keyword,bsdconv")
toNFKC=Bsdconv("bsdconv:nfkc:insert#after=002c:bsdconv-keyword,bsdconv")
toNFKD=Bsdconv("bsdconv:nfkd:insert#after=002c:bsdconv-keyword,bsdconv")
print("Normalization Tests: #"+url)
ln = 0
for l in nt:
ln += 1
if not l:
continue
if l[0]=="#":
continue
if l[0]=="@":
print("\t"+l.strip())
continue
c1,c2,c3,c4,c5,comment=l.strip().split(";",5)
c1=bnf(c1)
c2=bnf(c2)
c3=bnf(c3)
c4=bnf(c4)
c5=bnf(c5)
nftest=[
#NFC
[toSRC.conv(c2), toNFC.conv(c1), "c2 == toNFC(c1)"],
[toNFC.conv(c1), toNFC.conv(c2), "toNFC(c1) == toNFC(c2)"],
[toNFC.conv(c2), toNFC.conv(c3), "toNFC(c2) == toNFC(c3)"],
[toSRC.conv(c4), toNFC.conv(c4), "c4 == toNFC(c4)"],
[toNFC.conv(c4), toNFC.conv(c5), "toNFC(c4) == toNFC(c5)"],
#NFD
[toSRC.conv(c3), toNFD.conv(c1), "c3 == toNFD(c1)"],
[toNFD.conv(c1), toNFD.conv(c2), "toNFD(c1) == toNFD(c2)"],
[toNFD.conv(c2), toNFD.conv(c3), "toNFD(c2) == toNFD(c3)"],
[toSRC.conv(c5), toNFD.conv(c4), "c5 == toNFD(c4)"],
[toNFD.conv(c4), toNFD.conv(c5), "toNFD(c4) == toNFD(c5)"],
#NFKC
[toSRC .conv(c4), toNFKC.conv(c1), "c4 == toNFKC(c1)"],
[toNFKC.conv(c1), toNFKC.conv(c2), "toNFKC(c1) == toNFKC(c2)"],
[toNFKC.conv(c2), toNFKC.conv(c3), "toNFKC(c2) == toNFKC(c3)"],
[toNFKC.conv(c3), toNFKC.conv(c4), "toNFKC(c3) == toNFKC(c4)"],
[toNFKC.conv(c4), toNFKC.conv(c5), "toNFKC(c4) == toNFKC(c5)"],
#NFKD
[toSRC .conv(c5), toNFKD.conv(c1)," c5 == toNFKD(c1)"],
[toNFKD.conv(c1), toNFKD.conv(c2), "toNFKD(c1) == toNFKD(c2)"],
[toNFKD.conv(c2), toNFKD.conv(c3), "toNFKD(c2) == toNFKD(c3)"],
[toNFKD.conv(c3), toNFKD.conv(c4), "toNFKD(c3) == toNFKD(c4)"],
[toNFKD.conv(c4), toNFKD.conv(c5), "toNFKD(c4) == toNFKD(c5)"],
]
for a,b,desc in nftest:
if a!=b:
print ln, "Failed: ", desc, a, "!=", b, comment
print("Conversion tests finished.")
| 53.284585
| 350
| 0.656925
| 2,315
| 13,481
| 3.823326
| 0.198704
| 0.075924
| 0.097277
| 0.08451
| 0.484804
| 0.450006
| 0.361767
| 0.350921
| 0.345272
| 0.330697
| 0.000148
| 0.137888
| 0.059639
| 13,481
| 252
| 351
| 53.496032
| 0.557151
| 0.002596
| 0
| 0.098712
| 0
| 0.141631
| 0.67433
| 0.446057
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.055794
| 0.012876
| null | null | 0.060086
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
d279c195499d050dd18e9f8e03c43e9d1fc1fd2d
| 7,716
|
py
|
Python
|
pyy1/.pycharm_helpers/python_stubs/-1550516950/_ctypes.py
|
pyy1988/pyy_test1
|
6bea878409e658aa87441384419be51aaab061e7
|
[
"Apache-2.0"
] | null | null | null |
pyy1/.pycharm_helpers/python_stubs/-1550516950/_ctypes.py
|
pyy1988/pyy_test1
|
6bea878409e658aa87441384419be51aaab061e7
|
[
"Apache-2.0"
] | null | null | null |
pyy1/.pycharm_helpers/python_stubs/-1550516950/_ctypes.py
|
pyy1988/pyy_test1
|
6bea878409e658aa87441384419be51aaab061e7
|
[
"Apache-2.0"
] | null | null | null |
# encoding: utf-8
# module _ctypes
# from /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
# by generator 1.145
""" Create and manipulate C compatible data types in Python. """
# no imports
# Variables with simple values
FUNCFLAG_CDECL = 1
FUNCFLAG_PYTHONAPI = 4
FUNCFLAG_USE_ERRNO = 8
FUNCFLAG_USE_LASTERROR = 16
RTLD_GLOBAL = 256
RTLD_LOCAL = 0
_cast_addr = 140388692655680
_memmove_addr = 140388724844976
_memset_addr = 140388724996464
_string_at_addr = 140388692647104
_wstring_at_addr = 140388692653280
__version__ = '1.1.0'
# functions
def addressof(C_instance): # real signature unknown; restored from __doc__
"""
addressof(C instance) -> integer
Return the address of the C instance internal buffer
"""
return 0
def alignment(C_type): # real signature unknown; restored from __doc__
"""
alignment(C type) -> integer
alignment(C instance) -> integer
Return the alignment requirements of a C instance
"""
return 0
def buffer_info(*args, **kwargs): # real signature unknown
""" Return buffer interface information """
pass
def byref(C_instance, offset=0): # real signature unknown; restored from __doc__
"""
byref(C instance[, offset=0]) -> byref-object
Return a pointer lookalike to a C instance, only usable
as function argument
"""
pass
def call_cdeclfunction(*args, **kwargs): # real signature unknown
pass
def call_function(*args, **kwargs): # real signature unknown
pass
def dlclose(*args, **kwargs): # real signature unknown
""" dlclose a library """
pass
def dlopen(name, flag, *args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__
""" dlopen(name, flag={RTLD_GLOBAL|RTLD_LOCAL}) open a shared library """
pass
def dlsym(*args, **kwargs): # real signature unknown
""" find symbol in shared library """
pass
def get_errno(*args, **kwargs): # real signature unknown
pass
def pointer(*args, **kwargs): # real signature unknown
pass
def POINTER(*args, **kwargs): # real signature unknown
pass
def PyObj_FromPtr(*args, **kwargs): # real signature unknown
pass
def Py_DECREF(*args, **kwargs): # real signature unknown
pass
def Py_INCREF(*args, **kwargs): # real signature unknown
pass
def resize(*args, **kwargs): # real signature unknown
""" Resize the memory buffer of a ctypes instance """
pass
def set_errno(*args, **kwargs): # real signature unknown
pass
def sizeof(C_type): # real signature unknown; restored from __doc__
"""
sizeof(C type) -> integer
sizeof(C instance) -> integer
Return the size in bytes of a C instance
"""
return 0
def _unpickle(*args, **kwargs): # real signature unknown
pass
# classes
class ArgumentError(Exception):
# no doc
def __init__(self, *args, **kwargs): # real signature unknown
pass
__weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""list of weak references to the object (if defined)"""
class Array(_CData):
""" XXX to be provided """
def __delitem__(self, *args, **kwargs): # real signature unknown
""" Delete self[key]. """
pass
def __getitem__(self, *args, **kwargs): # real signature unknown
""" Return self[key]. """
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
def __len__(self, *args, **kwargs): # real signature unknown
""" Return len(self). """
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
def __setitem__(self, *args, **kwargs): # real signature unknown
""" Set self[key] to value. """
pass
class CFuncPtr(_CData):
""" Function Pointer """
def __bool__(self, *args, **kwargs): # real signature unknown
""" self != 0 """
pass
def __call__(self, *args, **kwargs): # real signature unknown
""" Call self as a function. """
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
def __repr__(self, *args, **kwargs): # real signature unknown
""" Return repr(self). """
pass
argtypes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""specify the argument types"""
errcheck = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""a function to check for errors"""
restype = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""specify the result type"""
class Structure(_CData):
""" Structure base class """
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
class Union(_CData):
""" Union base class """
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
class _Pointer(_CData):
""" XXX to be provided """
def __bool__(self, *args, **kwargs): # real signature unknown
""" self != 0 """
pass
def __delitem__(self, *args, **kwargs): # real signature unknown
""" Delete self[key]. """
pass
def __getitem__(self, *args, **kwargs): # real signature unknown
""" Return self[key]. """
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
def __setitem__(self, *args, **kwargs): # real signature unknown
""" Set self[key] to value. """
pass
contents = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""the object this pointer points to (read-write)"""
class _SimpleCData(_CData):
""" XXX to be provided """
def __bool__(self, *args, **kwargs): # real signature unknown
""" self != 0 """
pass
def __ctypes_from_outparam__(self, *args, **kwargs): # real signature unknown
pass
def __init__(self, *args, **kwargs): # real signature unknown
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
def __repr__(self, *args, **kwargs): # real signature unknown
""" Return repr(self). """
pass
value = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
"""current value"""
# variables with complex values
_pointer_type_cache = {
None: # (!) real value is ''
None # (!) real value is ''
,
None: # (!) real value is ''
None # (!) real value is ''
,
None: None, # (!) real value is ''
}
__loader__ = None # (!) real value is ''
__spec__ = None # (!) real value is ''
| 27.459075
| 106
| 0.636729
| 938
| 7,716
| 5.004264
| 0.202559
| 0.127397
| 0.195995
| 0.205795
| 0.684278
| 0.633788
| 0.592458
| 0.550916
| 0.499361
| 0.489774
| 0
| 0.018484
| 0.242742
| 7,716
| 280
| 107
| 27.557143
| 0.784871
| 0.416796
| 0
| 0.597015
| 0
| 0
| 0.001274
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.343284
| false
| 0.320896
| 0
| 0
| 0.462687
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
96736097d0c8c249aee5be77f87a2ac3b77a5f45
| 44
|
py
|
Python
|
name.py
|
dachuanz/crash-course
|
f7068e3ea502c1859e01f81772eafb179e5d2536
|
[
"MIT"
] | null | null | null |
name.py
|
dachuanz/crash-course
|
f7068e3ea502c1859e01f81772eafb179e5d2536
|
[
"MIT"
] | null | null | null |
name.py
|
dachuanz/crash-course
|
f7068e3ea502c1859e01f81772eafb179e5d2536
|
[
"MIT"
] | null | null | null |
name = "ada lovelace"
print(name.title())
| 14.666667
| 22
| 0.659091
| 6
| 44
| 4.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 44
| 2
| 23
| 22
| 0.783784
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
968244c4e4821aa3176a5163d517e2a86b8ed427
| 98
|
py
|
Python
|
example_app/core/models/input.py
|
dazza-codes/serverless-fast-api
|
c4cdce62326a22778157a8555b7cdaafc2519b8d
|
[
"MIT"
] | 2
|
2021-01-22T12:27:59.000Z
|
2021-09-09T14:54:11.000Z
|
example_app/core/models/input.py
|
dazza-codes/serverless-fast-api
|
c4cdce62326a22778157a8555b7cdaafc2519b8d
|
[
"MIT"
] | 4
|
2020-05-03T01:54:53.000Z
|
2021-01-21T18:20:27.000Z
|
example_app/core/models/input.py
|
dazza-codes/serverless-fast-api
|
c4cdce62326a22778157a8555b7cdaafc2519b8d
|
[
"MIT"
] | 1
|
2021-09-09T14:49:54.000Z
|
2021-09-09T14:49:54.000Z
|
from pydantic import BaseModel
class InputExample(BaseModel):
a: int = ...
b: int = ...
| 14
| 30
| 0.622449
| 11
| 98
| 5.545455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.244898
| 98
| 6
| 31
| 16.333333
| 0.824324
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
96897393cb06471fec8c0393bde8aeb577d2894c
| 228
|
py
|
Python
|
pyrez/exceptions/IdOrAuthEmpty.py
|
CLeendert/Pyrez
|
598d72d8b6bb9484f0c42c6146a262817332c666
|
[
"MIT"
] | 25
|
2018-07-26T02:32:14.000Z
|
2021-09-20T03:26:17.000Z
|
pyrez/exceptions/IdOrAuthEmpty.py
|
CLeendert/Pyrez
|
598d72d8b6bb9484f0c42c6146a262817332c666
|
[
"MIT"
] | 93
|
2018-08-26T11:44:25.000Z
|
2022-03-28T08:22:18.000Z
|
pyrez/exceptions/IdOrAuthEmpty.py
|
CLeendert/Pyrez
|
598d72d8b6bb9484f0c42c6146a262817332c666
|
[
"MIT"
] | 13
|
2018-09-05T09:38:07.000Z
|
2021-08-16T04:39:41.000Z
|
from .PyrezException import PyrezException
class IdOrAuthEmpty(PyrezException):
"""Raises an error that the current Credentials is invalid or missing"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
| 38
| 73
| 0.763158
| 27
| 228
| 6.148148
| 0.814815
| 0.120482
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118421
| 228
| 5
| 74
| 45.6
| 0.825871
| 0.289474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9697bf800b99049dd85751a04350650f26e3d26b
| 293
|
py
|
Python
|
deeplab_resnet/__init__.py
|
tramper2/SIGGRAPH18SSS
|
9bf22fa242044edfcf11cc4a58b93c63fcc71ff0
|
[
"MIT"
] | 390
|
2018-07-30T08:41:49.000Z
|
2022-03-29T15:44:13.000Z
|
deeplab_resnet/__init__.py
|
tramper2/SIGGRAPH18SSS
|
9bf22fa242044edfcf11cc4a58b93c63fcc71ff0
|
[
"MIT"
] | 20
|
2018-08-15T14:51:29.000Z
|
2020-04-21T09:49:49.000Z
|
deeplab_resnet/__init__.py
|
tramper2/SIGGRAPH18SSS
|
9bf22fa242044edfcf11cc4a58b93c63fcc71ff0
|
[
"MIT"
] | 109
|
2018-08-04T05:58:23.000Z
|
2021-10-17T12:02:29.000Z
|
from .model import DeepLabResNetModel
from .hc_deeplab import HyperColumn_Deeplabv2
from .image_reader import ImageReader, read_data_list, get_indicator_mat, get_batch_1chunk, read_an_image_from_disk, tf_wrap_get_patch, get_batch
from .utils import decode_labels, inv_preprocess, prepare_label
| 73.25
| 145
| 0.880546
| 44
| 293
| 5.409091
| 0.704545
| 0.067227
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.078498
| 293
| 4
| 146
| 73.25
| 0.874074
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
96a3b55fdb3ad0865f22a54baf973a421e94d7be
| 10,713
|
py
|
Python
|
MS-thesis/excel-format/sir/Updated/New folder/test.py
|
iffishells/Pushto-TTS-FYP
|
7ed3a180ba4c1e609ae5aa5e76bfd093a3d3d140
|
[
"Apache-2.0"
] | 2
|
2021-12-06T04:28:18.000Z
|
2021-12-20T03:33:00.000Z
|
MS-thesis/excel-format/sir/Updated/New folder/test.py
|
iffishells/Pushto-TTS-FYP
|
7ed3a180ba4c1e609ae5aa5e76bfd093a3d3d140
|
[
"Apache-2.0"
] | null | null | null |
MS-thesis/excel-format/sir/Updated/New folder/test.py
|
iffishells/Pushto-TTS-FYP
|
7ed3a180ba4c1e609ae5aa5e76bfd093a3d3d140
|
[
"Apache-2.0"
] | 1
|
2021-12-29T16:44:59.000Z
|
2021-12-29T16:44:59.000Z
|
import xlrd
import pandas as pd
from openpyxl import load_workbook
from xlrd import open_workbook
import nltk
from nltk.tree import Tree
from nltk.parse.generate import generate
from nltk.tree import *
import os
from nltk.tokenize import word_tokenize
from nltk.tokenize import sent_tokenize
import xml.etree.ElementTree as etree
import xlrd
import time
import sys
from nltk import induce_pcfg
from nltk.parse import pchart
from nltk import PCFG
from nltk.draw.util import CanvasFrame
import nltk
import re
import pandas
sys.setrecursionlimit(5000)
##start = time.time()
##PERIOD_OF_TIME = 15 # 5min
##while True :
sen = input("Enter your sentence: ")
sent = word_tokenize(sen)
#sen = "مهربانی وکړه بیاي ووايه . يوسف غلے شو . دیړ وخت وشو نہ خکاری"
##for i in sent_tokenize(sen):
## print(i)
##
##gram =("""
##S -> NP VP [1.0]
##NP -> ADJ [0.0041666667] | N [0.0041666667] | N N [0.3] | PN [0.0041666667] | ADJ N [0.0041666667] | AV N [0.0041666667] | N ADJ [0.1] | NU NU [0.5] | NU AP [0.0041666667] | ADJ AP [0.0041666667] | AV [0.0041666667] | ADJ AP [0.0041666667] | N PN [0.0041666667] | VP N [0.0041666667] | PN ADV [0.0041666667] | AV ADV [0.0041666667] | N VP [0.0041666667] | NU N [0.0041666667] | NU [0.0041666667] | V [0.0041666667] | AV AP [0.0041666667] | ADJ VP [0.0041666667] | N AP [0.0041666667] | ADJ AP [0.0041666667] | ADJ NP [0.0041666667] | N NP [0.0041666667]
##VP -> V AP [0.557] | ADJ V [0.05] | AP [0.00625] | NP [0.00625] | AV PN [0.056] | V ADV [0.00625] | V [0.00625] | AV AP [0.00625] | N ADV [0.00625] | N [0.00625] | NU N [0.1] | N V [0.0375] | ADJ AP [0.00625] | N AV [0.10] | V ADJ [0.00625] | ADJ NP [0.00625] | N AP [0.00625] | N NP [0.00625] | NP NP [0.00625] | AV VP [0.00625] | ADJ VP [0.00625] | N VP [0.00625]
##AP -> AV V [0.056] | V NP [0.166] | ADJ V [0.051] | NP VP [0.0142857143] | AV NP [0.0142857143] | PN NP [0.0142857143] | N V [0.037] | NU N [0.2] | AV N [0.2] | ADJ PN [0.066] | V VP [0.0142857143] | N ADV [0.0142857143] | PN AV [0.024] | ADJ VP [0.0142857143] | PN N [0.1] | AV ADV [0.0142857143]
##ADV -> ADV ADJ [0.4] | PN VP [0.025] | N AP [0.025] | AV AV [0.5] | V AP [0.025] | N V [0.025]
##""")
#0.0769231
gram = ("""
S -> NP NP RP VP RP NP PRP VP [0.0769230769]
NP -> N [0.0294118]
NP -> PRP N [0.0294118]
VP -> V [0.05]
NP -> N N [0.0294118]
VP -> V [0.05]
S -> NP RP POP NP NP PP ADJ VP [0.0769230769]
NP -> PRP N [0.0294118]
NP -> N [0.0294118]
NP -> PRP N [0.0294118]
PP -> NP POP [0.2]
NP -> PRP N [0.0294118]
VP -> V [0.05]
S -> ADVP INT CO PP ADV INT RP ADJ PP NP ADV VP [0.0769230769]
ADVP -> ADV NP [0.333333]
NP -> N [0.0294118]
PP -> NP POP [0.6]
NP -> N [0.0294118]
NP -> N [0.0294118]
NP -> PRN [0.0294118]
VP -> V [0.1]
S -> NP PP NP NP VP [0.0769230769]
NP -> N [0.0294118]
PP -> PRP NP [0.2]
NP -> PRP N [0.0294118]
NP -> PRP N [0.0294118]
NP -> PRP N N [0.0294118]
VP -> V [0.05]
S -> NP ADJP ADVP VP [0.0769230769]
NP -> NP CO NP [0.0294118]
NP -> PRP N [0.0294118]
NP -> PRP N [0.0294118]
ADJP -> ADJ ADJ NP [0.333333]
NP -> N [0.0294118]
ADVP -> ADV NP [0.333333]
NP -> N [0.0294118]
VP -> V [0.05]
S -> PP VP CO NP VP [0.0769230769]
NP -> N N [0.0294118]
VP -> V [0.05]
NP -> N [0.0294118]
VP -> V [0.05]
S -> NP NP NP VP VP [0.0769230769]
NP -> PRN [0.0294118]
NP -> PRP N N [0.0294118]
NP -> PRP N [0.0294118]
VP -> V [0.05]
VP -> V [0.1]
S -> NP NP VP [0.0769230769]
NP -> PRN [0.0294118]
NP -> N [0.0294118]
VP -> V [0.05]
S -> NP ADJP VP [0.0769230769]
NP -> PRN [0.0294118]
ADJP -> ADJ NP [0.333333]
NP -> N N [0.0294118]
VP -> V [0.05]
S -> NP ADJP VP VP [0.0769230769]
NP -> PRN [0.0294118]
ADJP -> ADJ NP [0.333333]
NP -> N [0.0294118]
VP -> V [0.05]
VP -> V [0.05]
S -> NP ADJ VP VP [0.0769230769]
NP -> PRN [0.0588235]
VP -> V [0.1]
S -> NP VP VP VP [0.0769230769]
VP -> V [0.05]
S -> NP ADVP VP [0.0769230769]
NP -> PRN [0.0294118]
ADVP -> PRP ADV RP [0.333333]
VP -> V [0.05]
""")
##gram =("""
##S -> NP VP [1.0]
##NP -> ADJ [0] | N [0] | N N [0.4] | PN [0] | ADJ N [0] | AV N [0] | N ADJ [0.1] | NU NU [0.5] | NU AP [0] | ADJ AP [0] | AV [0] | ADJ AP [0] | N PN [0] | VP N [0] | PN ADV [0] | AV ADV [0] | N VP [0] | NU N [0] | NU [0] | V [0] | AV AP [0] | ADJ VP [0] | N AP [0] | ADJ AP [0] | ADJ NP [0] | N NP [0]
##VP -> V AP [0.557] | ADJ V [0.05] | AP [0.00625] | NP [0.00625] | AV PN [0.056] | V ADV [0.00625] | V [0.00625] | AV AP [0.00625] | N ADV [0.00625] | N [0.00625] | NU N [0.1] | N V [0.0375] | ADJ AP [0.00625] | N AV [0.10] | V ADJ [0.00625] | ADJ NP [0.00625] | N AP [0.00625] | N NP [0.00625] | NP NP [0.00625] | AV VP [0.00625] | ADJ VP [0.00625] | N VP [0.00625]
##AP -> AV V [0.056] | V NP [0.166] | ADJ V [0.051] | NP VP [0.0142857143] | AV NP [0.0142857143] | PN NP [0.0142857143] | N V [0.037] | NU N [0.2] | AV N [0.2] | ADJ PN [0.066] | V VP [0.0142857143] | N ADV [0.0142857143] | PN AV [0.024] | ADJ VP [0.0142857143] | PN N [0.1] | AV ADV [0.0142857143]
##ADV -> ADV ADJ [0.4] | PN VP [0.025] | N AP [0.025] | AV AV [0.5] | V AP [0.025] | N V [0.025]
##""")
##
##د هغه ناوړه ملګري وویل
##
##gram = ("""
##S -> NP VP [1.0]
##NP -> AV [0.5] | ADJ AP [0.5]
##VP -> AP [1.0]
##AP -> PN NP [0.5] | N V [0.5]
##AV -> "د" [1.0]
##PN -> "هغه" [1.0]
##ADJ -> "ناوړه" [1.0]
##V -> "وویل" [1.0]
##N -> "ملګري" [1.0]
##""")
##یوه وفاداره میرمن جوړه شوه
##gram = ("""
##S -> NP VP
##NP -> NU | N N
##VP -> NP NP
##
##""")
#دویم تن وویل
##gram =("""
##S -> NP VP
##NP -> V
##VP -> N V
##""")
##dic = pandas.read_csv("dictionary.csv")
##doc = pandas.read_csv("corpus2.csv", quotechar='"', delimiter=',')
#book = open_workbook("Pastho dictionary2.xlsx")
##for sheet in book.sheets():
## for rowidx in range(sheet.nrows):
## row = sheet.row(rowidx)
## for i in sent:
## for colidx,cell in enumerate(row):
## if cell.value == i:#row value
## #print ("Found Row Element")
## #print(rowidx, colidx)
## #print(cell.value)
## print(row)
## print('\n')
##
##book = load_workbook("Pastho dictionary2.xlsx")
##worksheet = book.sheetnames
##sheet = book["Sheet1"]
##c=1
##for i in sheet:
## d = sheet.cell(row=c, column=2)
##
## if(d.value is None):
## print(" Try Again ")
##
##
## elif (d.value == " Noun "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "N ->" + "'" + cell.value + "'" + " " + "[0.0000851934]" + "\n"
##
##
## elif (d.value == "Noun "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "N ->" + "'" + cell.value + "'" + " " + "[0.0000851934]" + "\n"
##
##
## elif (d.value == " Verb "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "V ->" + "'" + cell.value + "'" + " " + "[0.0005530973]" + "\n"
##
##
## elif (d.value == "Verb "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "V ->" + "'" + cell.value + "'" + " " + "[0.0005530973]" + "\n"
##
##
## elif (d.value == " Adjective "):
##
## cell = sheet.cell(row=c, column=1)
## gram = gram + "ADJ ->" + "'" + cell.value + "'" + " " + "[0.000280112]" + "\n"
##
##
## elif (d.value == "Adjective "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "ADJ ->" + "'" + cell.value + "'" + " " + "[0.000280112]" + "\n"
##
##
## elif (d.value == " Participles "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "PP ->" + "'" + cell.value + "'" + " " + "[0.0588235294]" + "\n"
## #print("hi")
##
## elif (d.value == " Adverb "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "AV ->" + "'" + cell.value + "'" + " " + "[0.0025380711]" + "\n"
##
##
## elif (d.value == "Adverb "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "AV ->" + "'" + cell.value + "'" + " " + "[0.0025380711]" + "\n"
##
##
## elif (d.value == " numerical "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "NU ->" + "'" + cell.value + "'" + " " + "[0.0222222222]" + "\n"
##
##
## elif (d.value == "numerical "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "NU ->" + "'" + cell.value + "'" + " " + "[0.0222222222]" + "\n"
##
##
## elif (d.value == " proNoun "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "PN ->" + "'" + cell.value + "'" + " " + "[0.0125]" + "\n"
##
##
##
## elif (d.value == " ProNoun "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "PN ->" + "'" + cell.value + "'" + " " + "[0.0125]" + "\n"
##
##
##
## elif (d.value == "ProNoun "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "PN ->" + "'" + cell.value + "'" + " " + "[0.0125]" + "\n"
##
##
##
## elif (d.value == " suffix "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "SA ->" + "'" + cell.value + "'" + " " + "[0.0476190476]" + "\n"
##
##
##
## elif (d.value == " Suffix "):
## cell = sheet.cell(row=c, column=1)
## gram = gram + "SA ->" + "'" + cell.value + "'" + " " + "[0.0476190476]" + "\n"
## c=c+1
#print(gram)
grammar1 = nltk.PCFG.fromstring(gram)
sr_parser = nltk.ViterbiParser(grammar1)
#max=0
for tree in sr_parser.parse(sent):
print(tree)
##
## with open("prob.txt", "a", encoding='utf-8') as output:
## output.write(str(tree))
## output.write("\n")
##
## if (tree.prob() > max):
## max=tree.prob()
## max_tree=tree
##
##print(max)
##print(max_tree)
##sr_parser = nltk.parse.chart.ChartParser(grammar1)
#sr_parser = nltk.RecursiveDescentParser(grammar1)
#sr_parser = nltk.ShiftReduceParser(grammar1)
##for tree in sr_parser.parse(sent):
## #values = tree
##
## with open("test.txt", "a", encoding='utf-8') as output:
## output.write(str(tree))
## output.write("\n")
##
## print(tree)
## #break
##
| 31.508824
| 576
| 0.477364
| 1,628
| 10,713
| 3.128378
| 0.120393
| 0.018457
| 0.044178
| 0.043393
| 0.604555
| 0.585117
| 0.568035
| 0.524249
| 0.501669
| 0.469075
| 0
| 0.20139
| 0.301503
| 10,713
| 339
| 577
| 31.60177
| 0.47922
| 0.655839
| 0
| 0.543689
| 1
| 0
| 0.672831
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.213592
| 0
| 0.213592
| 0.009709
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
96b5076f3752a0f19a06b6d629287742be1b298b
| 414
|
py
|
Python
|
YorForger/modules/redis/afk_redis.py
|
Voidxtoxic/kita
|
b2a3007349727280e149dcca017413d7dc2e7648
|
[
"MIT"
] | null | null | null |
YorForger/modules/redis/afk_redis.py
|
Voidxtoxic/kita
|
b2a3007349727280e149dcca017413d7dc2e7648
|
[
"MIT"
] | null | null | null |
YorForger/modules/redis/afk_redis.py
|
Voidxtoxic/kita
|
b2a3007349727280e149dcca017413d7dc2e7648
|
[
"MIT"
] | null | null | null |
from YorForger import REDIS
# AFK
def is_user_afk(userid):
rget = REDIS.get(f"is_afk_{userid}")
return bool(rget)
def start_afk(userid, reason):
REDIS.set(f"is_afk_{userid}", reason)
def afk_reason(userid):
return strb(REDIS.get(f"is_afk_{userid}"))
def end_afk(userid):
REDIS.delete(f"is_afk_{userid}")
return True
# Helpers
def strb(redis_string):
return str(redis_string)
| 15.333333
| 46
| 0.695652
| 65
| 414
| 4.2
| 0.369231
| 0.230769
| 0.087912
| 0.175824
| 0.234432
| 0.14652
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 414
| 26
| 47
| 15.923077
| 0.798246
| 0.02657
| 0
| 0
| 0
| 0
| 0.150376
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.384615
| false
| 0
| 0.076923
| 0.153846
| 0.769231
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
96b9a2d50c1e158d5bd73be619a6523cec7b4cfa
| 45,634
|
py
|
Python
|
arraytool_rc.py
|
zinka/arraytool_gui
|
c1ba763e170f7efde99414a29946410c4994e924
|
[
"BSD-3-Clause"
] | 11
|
2017-04-20T20:08:04.000Z
|
2022-03-29T22:30:24.000Z
|
arraytool_rc.py
|
zinka/arraytool_gui
|
c1ba763e170f7efde99414a29946410c4994e924
|
[
"BSD-3-Clause"
] | null | null | null |
arraytool_rc.py
|
zinka/arraytool_gui
|
c1ba763e170f7efde99414a29946410c4994e924
|
[
"BSD-3-Clause"
] | 7
|
2018-01-28T12:59:45.000Z
|
2022-03-19T12:34:25.000Z
|
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt4 (Qt v4.8.7)
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore
qt_resource_data = "\
\x00\x00\x03\x97\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\x0d\xd7\
\x01\x42\x28\x9b\x78\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x03\x14\x49\x44\
\x41\x54\x38\x8d\x9d\x95\x4f\x68\x1c\x55\x1c\xc7\x3f\x6f\x66\x76\
\x36\x59\xdb\x22\x68\x0e\x36\x20\x45\x89\x50\x04\x0f\x1e\xa4\xb5\
\x88\x7f\xd0\x3d\x88\x47\x11\x64\x4c\x73\xf2\x56\xcf\x1e\xbd\x8a\
\x78\xea\x45\xeb\x41\x44\xcc\xa9\x67\xc1\x28\x88\x42\x6a\x6d\x83\
\xff\xb0\x17\xcd\xa1\x96\x6c\x43\x9a\xad\x49\x37\xdd\x9d\x9d\x79\
\xf3\x7b\xbf\x9f\x87\xdd\x6e\x77\xd3\xa8\x49\xbf\xf0\x98\xf9\x31\
\xcc\xe7\x7d\xdf\xf7\xfd\xe6\x8d\xcb\xb2\x8c\xff\x52\x15\xca\xc2\
\x39\x17\x9b\x99\x73\xce\x01\x70\xe7\x26\xad\xa5\x7f\xf4\xf3\xf2\
\xf9\x34\x4d\xdb\xbb\xdf\x4b\x00\xbc\xf7\xf1\xec\xec\xec\xe1\xbd\
\xc0\xeb\x1b\xad\xfa\x67\x9f\x7e\x8e\x73\x6e\x62\x00\x2c\x2e\x7e\
\x71\x7c\xe9\x9b\xa5\x15\xe0\x29\x60\xe7\x1e\xf0\xdc\xdc\xdc\xef\
\xce\xb9\xc7\x01\xdb\x0d\x36\x33\xd6\xd6\xd6\x28\xcb\x72\x54\x87\
\x10\x50\x55\x4e\x9f\x5e\xa0\xd3\xe9\x3c\xba\xf2\xd3\xca\x85\xb2\
\xef\x9f\x49\xd3\xb4\x3f\x01\x16\x91\xe3\xf3\xf3\xf3\x84\x10\x30\
\x33\x54\x15\x00\x55\xe5\x83\x0f\xdf\x27\x8a\x22\x2e\x5d\xbe\x34\
\x31\xe1\xc9\x13\x27\x00\x38\x73\xe6\x1d\x77\xee\x93\x8f\x9f\x5c\
\xbe\xb0\x7c\x16\xe3\xed\xdd\x60\x13\x11\xd7\x6a\xb5\x10\x11\x54\
\x15\x55\xc5\xcc\x70\xce\x91\xa6\x29\xcd\x57\x9a\x98\xd9\xc8\x35\
\x40\xbb\xdd\x46\x44\x78\xf6\xe4\x29\x77\xf1\xc7\x1f\xde\x50\xd9\
\x05\x0e\x21\x98\xaa\x3a\x11\x19\x2d\xf3\xce\x00\x48\x92\x84\xa5\
\xaf\xbf\x22\x84\x30\x72\xfc\xe2\x0b\x2f\xe1\xbd\x1f\x14\x0e\x54\
\x35\x82\x68\x32\x63\x91\xca\x44\x2a\x42\x08\xf8\xea\x2e\x58\x44\
\xc0\xc5\xe0\x62\x9a\xcd\x57\x27\xdc\x8e\x5f\x93\xa4\x8e\x59\xa4\
\xeb\xb5\x97\xa7\xbe\x3b\x76\xcd\x67\xab\xab\xea\xb2\x2c\xa3\xd1\
\x68\xc8\xc2\xc2\x42\x7c\xf1\x4a\x8b\xf3\xbf\x08\x51\x74\x77\x66\
\x33\x23\x72\x63\xf5\xae\xfd\x1d\xf2\x87\xab\x73\xc1\x39\xd7\xbe\
\x7c\xee\xcd\xa3\xa3\x8c\x43\x08\x6c\xde\x56\x9e\x7b\xfa\x18\xaf\
\x9d\x7a\x62\xf4\x02\xc0\xb0\xbb\xf6\xd4\xf8\xa3\xdc\x4b\xfc\xde\
\x47\xdf\xce\x64\xd9\x5b\x36\xca\x58\x44\xc8\x4b\x63\x66\xba\xce\
\x66\xa7\xe0\xfa\x56\xff\x5f\x50\x7b\x6b\xaa\x16\xf3\xf0\xe1\x1a\
\x51\x1c\x75\x61\xb2\x2b\xe8\x55\xf0\xd8\x03\x75\x30\x48\xc6\xe2\
\xd8\x8f\xd4\xa0\xf4\x81\xc8\x45\x9d\x11\xb8\xaa\x06\x9b\x97\x57\
\x8e\x23\x8d\x3a\x66\x90\xc4\xfb\x07\xf7\x0a\x61\x3a\x8d\xf1\x5e\
\x70\x11\xdb\x23\xf0\x20\x8a\x40\xee\xe1\x50\xa3\x06\x40\xb2\x0f\
\x6e\x50\x23\x2f\x03\x12\x94\xe9\xb4\x46\xd1\xf7\x00\x37\xc7\x1d\
\x13\x42\xa0\xa8\x00\x1c\x5e\xf4\x1e\x80\x1a\xc3\xaf\x72\x50\x7b\
\x51\xd4\x26\x3b\xa4\xd3\x2b\x31\xb5\x1b\xe3\x8e\x55\x44\xe8\x7b\
\xc3\x07\xa3\x5b\x04\x7a\xa5\xe0\x45\xf7\x04\xec\x19\x47\x19\xb3\
\x79\x2b\x47\x54\xd7\x27\x1c\x57\x22\xf8\x60\x6c\x77\x2b\x5a\x5b\
\x7d\x82\xfe\x3f\x6c\x5c\x3b\xb5\x88\xad\x4e\x51\x59\xd0\xcd\x11\
\x18\xd0\xbc\x0c\xd4\x6b\x31\xb7\xfa\x82\x1c\x10\x0a\x50\x56\xc6\
\x76\xb7\xf4\x38\xf7\xf7\x38\x98\x6e\xa1\x3c\xf2\xd0\x11\x1e\x6c\
\x24\x1c\x9a\x3a\x58\xab\x01\x44\xce\xd1\xeb\x95\x62\x6a\x5b\x00\
\xc9\xe2\xe2\x62\xd2\x6c\x36\xed\xcf\x8d\x92\x9b\x9d\x82\xef\x7f\
\xbe\x7a\x60\x28\x40\x30\xa5\xdb\xcb\x53\xe9\x6d\x5f\x23\x1e\x38\
\xae\xe7\x79\xfe\xe5\xaf\xab\xed\xd7\xab\x46\x3d\xb9\xdd\x2b\xee\
\x03\xeb\xcc\xcc\xa4\xdc\xd9\x58\xbe\x72\xfe\xdd\xab\xbf\x0d\x4f\
\x81\x1a\x70\x14\x98\x61\x2c\x9a\xfb\x90\x32\xf8\x3d\xfd\x95\x65\
\x59\x91\x00\x02\x5c\x07\x6e\x30\x79\xa6\x1c\x54\x36\x84\x57\x00\
\xff\x00\xf1\x00\xf2\xbe\xa6\x77\x61\xc0\x00\x00\x00\x00\x49\x45\
\x4e\x44\xae\x42\x60\x82\
\x00\x00\x04\x3c\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\x0d\xd7\
\x01\x42\x28\x9b\x78\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x03\xb9\x49\x44\
\x41\x54\x38\x8d\x8d\x95\xcf\x6b\x1d\x55\x14\xc7\x3f\xf7\xde\x99\
\x3b\xf3\x7e\x98\xa6\x79\x4d\x8a\x3e\x42\x63\x4c\x84\xb6\x21\xa5\
\x92\x55\x0b\xba\x68\x8c\xb8\x0b\xb4\x22\x2d\x6a\x31\x58\xc1\x8d\
\x74\xd9\x14\x04\x37\x21\x42\x71\x53\xf5\x1f\xa8\x88\x88\x5d\xb9\
\x10\x5c\x25\x8b\x4a\xba\x68\x5a\x5c\x34\xd0\x52\x5e\xc1\x1a\xac\
\xf0\x12\x5f\x26\xef\xe7\x9d\x1f\xd7\xc5\xfb\xe1\x7b\xc9\x0b\x7a\
\xe0\x30\xc3\xcc\xe1\x33\xdf\x7b\xe6\xfc\x10\xd6\x5a\xfe\x87\x09\
\x40\x02\x4e\xeb\x0a\x60\x81\x08\x88\x5b\xf7\x3d\xe6\x00\xbc\xf7\
\xc1\xa5\x25\x63\xcc\xf5\x83\xa8\x4a\x29\xd2\xe9\x34\x03\x03\x87\
\xf0\x3d\x0f\x80\x30\x0a\x71\x5d\x7d\x73\x79\xe9\x8b\x6b\x40\x7d\
\x2f\xdc\x01\x30\xc6\x5c\x7f\xe7\xfc\xbb\x14\x0a\x05\xaa\xd5\x2a\
\xb5\x5a\x8d\x5a\xad\x86\x31\x06\x63\x0c\x52\x4a\xa6\xa7\xa6\xb9\
\x72\xe5\x23\xa4\x6c\x0a\xae\xd7\x6b\x7c\xf5\xcd\xd7\x9f\x02\x4b\
\x80\x69\x29\xef\x05\x03\x78\x9e\x87\xd6\x9a\x30\x0c\x89\xa2\x88\
\x38\x8e\x49\x92\x04\x00\xad\x35\x43\x43\x43\x28\xa5\x50\x4a\x01\
\x90\x4e\x67\x18\x19\x1e\x06\x48\x03\xdb\x7d\x53\x01\xe0\xfb\x3e\
\x5a\x6b\xa2\x28\x22\x49\x12\xda\xb9\x37\xc6\xe0\x79\x1e\x99\x4c\
\x06\x21\x24\x42\x34\x15\x0b\x01\x5a\x7b\x3d\x8c\xbe\x60\xad\x35\
\xbe\xef\xf7\x40\x85\x10\x48\x29\xd1\x5a\xe3\xb5\x72\xdb\x6d\xad\
\xb4\x88\x7e\x60\xd9\x1d\xe4\x38\x0e\x9e\xe7\xe1\xfb\x3e\xbe\xef\
\xe3\x79\x5e\xc7\xb5\xd6\x88\xbe\x08\xf8\x21\x9b\x7d\xe3\x7b\x21\
\x6e\xf5\x55\x2c\xa5\xec\xb8\x52\x0a\xc7\x71\x98\x98\x98\x20\x8e\
\x63\x8a\xc5\x22\xae\xeb\xf6\x85\xfe\x3c\x3d\x7d\xf1\xf0\xd4\xd4\
\xf5\xe0\xd1\x23\xf5\x9d\x10\x1f\xb7\x1e\x47\x1d\xc5\xed\x63\x77\
\xfb\xe6\xe6\x26\xbe\xef\x33\x39\x39\xd9\xf9\x69\x6d\xb3\x49\x82\
\x73\xeb\x5b\xb2\xf9\xfc\xe2\x6b\x57\xaf\x7a\x4a\xa9\x48\x2a\x55\
\x96\x8e\x53\x16\x50\xec\x49\xfc\x5e\xb0\xb5\x96\x42\xa1\xc0\xa9\
\x53\xa7\x30\xc6\x74\xe2\xc2\x20\xe0\xce\xfc\x3c\xe3\xc3\xc3\x8c\
\x9f\x3d\xeb\xdb\x52\x89\xd7\x6f\xdc\xf0\xdb\xef\x7f\x59\x58\xf0\
\x7b\xc0\x7b\x55\x67\x32\x19\x66\x66\x66\xb8\x7b\xf7\x2e\xc7\x8f\
\x1f\x07\xa0\xf2\xf4\x29\xab\x73\x73\x8c\xce\xcc\x30\x3c\x3a\xca\
\xee\xca\x0a\x58\x8b\x50\x0a\x9b\x24\x0c\xcc\xce\x22\xa4\x64\x9f\
\x62\x21\x44\xe7\x03\x27\x4e\x9c\xe0\xd9\xb3\x67\x94\x4a\x25\x52\
\xa9\x14\x00\xbf\x5e\xb8\xc0\x91\x91\x11\x06\x7d\x9f\xdd\xd5\x55\
\x6c\x14\x91\x54\x2a\x24\x95\x0a\x32\x95\x22\x75\xf2\x24\x08\xc1\
\x81\x8a\xf3\xf9\x3c\xd5\x6a\x95\x87\x0f\x1f\x92\xcd\x66\x71\x9c\
\x66\xe8\xe9\x9b\x37\xb9\x33\x3f\x8f\x63\x0c\x2f\x00\xf5\x8d\x0d\
\x6c\xab\x91\x00\x1a\x4f\x9e\x60\xe3\x78\x7f\x71\xb7\xc1\x5b\x5b\
\x5b\xec\xec\xec\x90\x4e\xa7\xd1\x5a\x03\x90\x24\x09\x47\xce\x9c\
\xe1\xcd\xb5\x35\x56\xce\x9d\xe3\x70\x36\xc3\xd1\xd3\xa7\x91\x03\
\x03\xcd\x8e\x51\x8a\xb8\x5a\x05\xfa\x74\x4d\x1b\x1c\x86\x61\xa7\
\xc4\xa4\x94\x14\x0a\x05\xa4\x94\x8c\x8d\x8d\x91\x7b\x65\x9c\xd9\
\x7b\xf7\xf8\xe9\xec\x19\xea\x9b\x9b\xf5\x51\xc7\xf1\x7f\x5b\x5b\
\x33\xf6\xdf\xbe\xf8\x5b\x1e\x04\xee\xae\x67\xc7\x71\x28\x95\x4a\
\xec\x04\x3b\x54\x2a\x65\xe2\x38\x46\x0d\x1e\xa2\xb1\x78\x8d\x72\
\xad\xb6\xf2\x78\x63\xa3\x66\x21\xb9\x64\xad\xdb\xf2\x17\xf7\x81\
\xdb\x70\xa5\x14\x5a\x6b\x8a\xc5\x22\xeb\xf7\xd7\xd1\x9e\x26\xff\
\x52\x9e\x5c\x2e\x47\x14\x45\x18\x63\xa8\x9a\x06\xe7\xb7\xb7\x3f\
\xa9\x95\xcb\x5f\x0a\x78\xdc\xcd\xe8\x3b\x40\xb4\xd6\x04\x41\xc0\
\xfa\xfa\x3d\x5e\x1e\x1f\xe3\xf2\xe5\xf7\x39\x76\x6c\xac\x39\xfd\
\xa2\x90\x30\x0a\x89\xe3\x98\x60\x77\x17\xa0\x71\x31\x8a\x3e\x07\
\x3e\xeb\x0b\xb6\xd6\xa2\x94\xc2\x5a\xcb\x83\x07\xf7\x39\x34\x38\
\xc0\x87\x0b\x97\xc9\xe5\x72\xb8\xae\x4b\x1c\x87\xd4\xea\x11\x02\
\xb0\x16\x92\x24\x26\x08\x02\x80\x06\x07\x6d\x90\x38\x8e\x91\x52\
\xf2\xfc\xaf\xe7\x08\x2c\x6f\xbd\x3d\x47\x2a\xe5\xe3\xba\x6e\x73\
\xd8\x87\x61\xcf\x08\xb3\x34\x5b\xfa\x3f\xc1\xc1\x4e\xc0\x1f\x7f\
\xfe\xce\xc4\xab\xcd\xe3\x22\x2c\x8d\x46\x9d\x86\x69\x34\x81\x1d\
\xaa\xe8\x30\x92\xc4\x52\xa9\x94\xa1\xb9\x3d\xfa\x83\x47\x8e\x8e\
\x2c\xdf\xfe\xf1\xf6\x62\x77\xe7\x89\x83\x66\x64\x57\xea\xb4\xd6\
\xcb\xec\x59\x49\x6d\xfb\x07\xe7\xa5\x7a\x91\x9a\x1b\x94\x49\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x02\xb4\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xfc\x00\xe9\x00\x4f\x34\xd7\
\xb1\x0d\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\
\x0d\xd7\x01\x42\x28\x9b\x78\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xd5\x02\x12\x0e\x25\x30\xca\x43\x26\x09\x00\x00\x02\x41\x49\x44\
\x41\x54\x38\xcb\xad\x95\xcd\x6b\x13\x61\x10\x87\x9f\x99\xdd\x54\
\x9a\xe2\x07\x4d\x9b\x35\x08\x9e\x3c\x88\x78\x12\xc4\x56\xf0\x1f\
\xf0\xd2\x83\x27\x6f\xe2\xd5\xb3\x08\x62\x2f\xa2\xe2\xc7\x3f\xe1\
\xc1\x8b\x78\x90\xdc\x45\x11\x04\x35\xa5\x17\x0b\x7a\xb2\xb9\xd4\
\x90\x18\x28\x22\x31\xa6\xd9\x64\xc7\xc3\x7e\x66\x53\xed\x6a\x7d\
\x21\x64\x77\xd8\xf7\x79\x67\x7e\xbf\x99\x5d\x61\x9f\x6b\xd4\x59\
\x11\xa0\x04\xf8\xae\x57\xb7\x38\x2e\xf1\xc5\xfd\x87\x77\x6f\x03\
\xab\x7f\x03\x55\x09\xa8\x1c\x19\x50\x5b\xec\xe1\xa8\xb1\x33\xd4\
\xc7\x17\x2f\x34\xaf\xb9\x5e\xbd\xef\x66\x9e\x5b\xbd\x71\xfd\x66\
\x61\xa8\x99\x0f\xfe\x47\x82\xfe\x4b\x7c\xab\x60\x94\xd9\xfe\xfa\
\xe9\x8a\xe1\xbc\x1a\x75\x56\x9e\xba\xf9\x0d\xcd\x66\x13\xc7\x71\
\x30\x33\x44\x04\x91\xb0\xa8\xec\x35\x18\x25\x69\x51\xd6\x17\x38\
\xa5\x59\x6c\xe6\x12\xe2\xcc\x73\x68\xe1\x35\x16\x3c\xbb\x2c\xf6\
\x6d\x5d\xf3\xe0\x18\x10\x43\xcc\x0c\xcc\x30\x33\x2c\x30\xcc\x00\
\xc6\xa8\xf4\x10\xd9\xc1\x64\x01\x74\x1e\x50\xe0\x00\x30\x2e\x03\
\x87\xf7\x04\x23\x40\x1c\x53\x41\x15\x44\x1c\x02\x39\x48\xc0\x22\
\x32\xda\x04\xff\x0d\x04\x1d\x86\x83\x06\x62\x3f\x36\x80\xed\xdf\
\x82\x55\x35\xfc\x17\x41\x44\xd3\xc3\x44\x51\x71\x08\x38\xca\x80\
\x65\x86\x76\x02\x86\x6b\xb8\xfe\x73\x36\x3f\x6f\x21\x04\x4f\x80\
\x96\xbb\x1b\x58\x55\x53\x8d\x11\x90\xac\xc6\x02\x2a\x08\x33\x98\
\x1c\xc3\xa7\xc2\x98\x53\xcc\xce\x95\x68\x6c\x7c\xe7\xcc\xc9\xd6\
\x07\xe0\xe7\x54\xc6\x6b\xeb\x8d\x49\xb3\x32\xd9\x27\x3f\xe2\x2a\
\x1c\x4c\xe7\x30\xe7\x38\x32\x73\x9a\x5e\xbf\x84\xeb\xd5\xfb\xae\
\x57\xb7\x29\xf0\xb9\xb3\x4b\xd4\x6a\xb5\x9c\xa6\xa4\x72\xa8\x44\
\xf7\x51\x75\xa2\x61\x55\x93\x63\xc1\xae\x52\xb4\xdb\xed\x70\x93\
\x69\x28\x43\x52\x3e\x49\x15\x91\xa7\x44\x0f\x4c\x2d\xf7\x4f\x5d\
\x61\x62\x49\x76\xf9\x5e\x4e\x0e\x10\x41\x29\x00\x4e\x36\x01\x1a\
\x99\x15\x6a\x0a\xa2\xd1\x7d\x1c\x8f\x92\x0d\xe3\xb9\x71\xcf\x07\
\xde\xbd\x7f\x3b\x95\x91\x48\x28\x45\x0c\xcd\x6a\x2c\xb1\x09\x7b\
\x81\x97\x97\xce\x53\xad\x56\xd3\x1e\xd6\xc8\x44\x34\x32\x4e\x10\
\x14\xd5\x6c\x97\x68\x31\x8d\xbb\xdd\xee\x44\xbb\x31\xf1\x9e\x90\
\xe4\x80\x6c\x65\x85\x34\x4e\x4f\xd1\x8c\x79\x11\x90\x78\xc4\x49\
\xf4\x2f\x0c\x4e\xb2\xd1\xd4\xb8\x88\x17\x5b\x99\x4e\xa3\x49\xa6\
\x8f\x0b\x66\x9c\xb8\x1e\x8f\x36\x93\xc6\x85\x55\x50\x2c\x63\xcf\
\xf3\xf8\x1f\x2b\x01\x07\x41\x70\xe7\xc1\xa3\x7b\xb7\xf6\x03\xfb\
\xb2\xd5\xba\x3a\xf5\xcd\xcb\xab\xf0\x8f\xec\xe4\x63\xfa\x0b\x23\
\xfb\x93\xa3\x4d\x98\xb6\xe0\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
\x42\x60\x82\
\x00\x00\x04\x7e\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\
\x0d\xd7\x01\x42\x28\x9b\x78\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xd5\x0b\x0a\x0d\x34\x15\x48\x65\x72\x06\x00\x00\x04\x0b\x49\x44\
\x41\x54\x38\xcb\xad\x95\x5d\x6c\x14\x55\x14\xc7\x7f\x33\xfb\x39\
\x9d\x6d\xbb\xd3\x65\x97\xdd\xd6\x65\x59\x3e\x96\x22\x05\xda\x92\
\x56\x8b\x1f\x58\x13\x1f\x30\x42\x34\x46\x7c\xd0\x17\xd3\xf8\x00\
\x35\x48\x55\x52\x03\xfa\x20\x46\x02\x18\x8b\x69\x6c\x1f\x44\x1f\
\x34\x8a\x92\xc8\x8b\x0f\x68\x0c\x31\x36\xc6\x88\x34\x41\x54\xac\
\x25\xb4\xb5\x36\xc5\xd6\xdd\xb6\xd3\x76\xbf\x67\x67\x77\x7c\x68\
\x77\x6c\xa9\x50\x4c\xfc\x27\x37\xe7\xe6\x9e\x73\xfe\xf7\x7f\xcf\
\x3d\x33\x57\x60\x01\x9e\x7b\xa3\xfd\xfd\x3f\x12\x95\x8f\xc6\xa6\
\xb4\x8a\x85\xeb\x92\xcd\x48\xfa\x5c\xf1\xbe\x95\xf2\x6f\x6d\x9d\
\xaf\x7e\xf6\x1d\xb7\x01\xa1\x38\xe9\xfa\xa0\xad\xf6\xec\x8f\xe1\
\x8b\xab\x23\x1b\xb3\xa1\x95\x3e\x31\x9e\x13\x9d\x55\x65\x4e\xf1\
\xcf\xb8\xc6\x54\x3a\xcb\xf4\xd5\xf3\x43\xa9\x64\xc6\x11\x56\xfa\
\xdb\xbb\x5f\x3b\xfd\xf1\x72\xc4\x96\x22\xe9\xf9\xfe\xc0\xd9\x55\
\x5b\x1e\x70\x0f\x0f\xf4\xdb\x07\x87\x87\x6d\x23\xbf\x0f\x8a\x23\
\x13\x93\xd8\x4a\x2b\x50\x9c\x76\x9c\xde\x75\xca\x74\xba\x50\x76\
\x3d\xe6\xdc\xb9\xeb\x11\xcf\xa5\x8b\xdf\xfc\x3a\x70\x2b\x62\x11\
\xe0\x87\x6b\xce\xe3\x77\xac\xb0\x0e\x27\x06\xbe\xba\xda\xe8\xbd\
\xf0\x74\x4f\xc7\x3e\xf1\xbe\x50\xef\xce\xdc\xcc\xf5\xd9\xd1\xc1\
\x2b\x46\x74\x36\x4e\x3c\x99\x40\xf1\x05\x90\x7d\x41\xc7\x2f\xb1\
\xad\x9f\xbe\xf4\xfa\x2e\x79\x59\x62\x35\x25\xad\xb3\xe4\x13\x33\
\xf7\xaf\x1f\x7d\xe8\xe8\x8b\xef\x7d\x02\x70\xec\xe0\x47\x5f\x36\
\x04\x47\x8f\x24\x54\x55\x48\xce\x4e\xa1\x65\x52\x00\xf8\x82\xeb\
\x45\xaf\xac\x8d\x4c\x68\xe1\xee\x65\x6b\xfc\xd4\xa1\x17\x3e\x0f\
\x3b\x72\x3f\xcf\xaa\x85\xc3\x0b\x9d\x0e\x49\xe0\xdb\xa9\x10\xab\
\x37\xd5\x2f\x4a\x72\xa7\xfb\x98\xf8\x6b\x9c\xca\xc2\xf4\x8d\x7c\
\xed\x9d\x6f\x77\x9d\x00\xb0\x02\x04\xcb\xe2\x5f\xa4\x26\xed\xdd\
\xc7\x8e\xbe\xb9\x64\xe7\x07\xdb\xba\x96\xac\x65\x3c\x77\x31\x3a\
\xd4\xc3\x87\x27\x17\xe9\xe0\xe5\x43\x07\x8f\x03\x27\xcc\x52\xa4\
\xc6\xed\xd7\x14\xb7\x97\x54\x6a\xee\xb8\xc9\x64\xd2\x1c\x26\x59\
\xfa\x9f\xb9\xc5\x66\x5f\x14\x37\x32\x3a\x42\x32\x99\xc4\xeb\xf5\
\xb2\xff\x40\x6b\xad\xa9\x18\x58\xeb\xf7\x07\x00\x48\x24\x13\xb8\
\x64\xd7\xbf\x2a\x2d\xc2\x28\x14\x00\x78\xec\xc8\x69\x74\x4d\xe3\
\xcc\xe1\x3d\x00\x28\x8a\x42\x2c\x16\x8b\x00\x97\xc5\xf9\xd8\xdd\
\x75\x5b\xeb\x49\xa7\xd3\x08\x08\xa6\xd2\xea\x86\x1d\x54\x37\xec\
\xa0\x5c\xf1\x02\x90\xcd\x66\xe6\x6c\x3a\xce\xba\xda\xbb\x59\x53\
\xd3\x00\x40\x89\x54\x02\xc0\x3d\x4d\xf7\x02\x6c\x36\x4b\x01\x3c\
\x5c\x59\x59\xb5\x48\xd5\xbb\xcf\x37\x33\xf0\xd3\xf7\x00\x8c\x8d\
\x0e\x81\x61\x90\xd7\x73\x64\xd2\x49\xe2\x33\x2a\x00\x43\x57\x7a\
\x79\x67\xdf\x76\x33\x27\x18\x0c\x01\xbc\x02\x20\xee\x3f\xd0\x5a\
\x2b\x49\x25\xd8\xed\x76\x3c\x1e\x8f\x19\x14\xf0\x86\xe8\x68\xd9\
\x46\x7f\x6f\x0f\x15\xde\x4a\x0a\x86\x31\x5f\x07\x83\x32\xb7\x87\
\x81\xcb\x17\xe8\x68\xd9\x46\xa8\x32\x02\x80\x2c\xcb\xf3\xe5\xf0\
\xb0\xff\x40\x6b\xad\x08\x44\x56\xfa\xfc\x00\xa8\xaa\x8a\x2c\xcb\
\xc8\xb2\x8c\x28\x8a\x84\xab\x36\xd0\xb9\xb7\xc9\x24\x17\x05\x01\
\x57\x79\x05\x03\x97\x2f\xd0\xb9\xb7\x89\x70\xd5\x06\x33\x5e\x55\
\xe7\x4e\x51\x5e\x56\x0e\x10\x11\x81\xcd\x77\x6e\xdc\x44\x2e\x97\
\x33\xac\x56\x0b\x33\x33\x33\xa8\xaa\x8a\x24\x49\xc8\xb2\x4c\x4d\
\xa4\x9e\x53\x6d\xcd\xf4\xf7\xf6\xe0\x5e\x11\x60\xb8\xef\x12\xa7\
\xda\x9a\xa9\x89\xd4\x9b\x84\xaa\xaa\x92\xcf\xeb\x24\x12\x09\x63\
\xed\x9a\xb5\x00\x4d\x62\x36\x9b\xdd\xe2\xf7\xfb\x71\xb9\x5c\x82\
\xae\xe7\x29\xcc\xdf\x78\x31\x41\x55\x55\x2a\x4a\x03\x74\x3c\xdb\
\x40\x7f\x6f\x0f\x6f\x3d\x53\x4f\x45\x69\xc0\xf4\x01\xe4\xf3\x3a\
\x08\xa0\x28\x8a\x10\x0c\xae\x22\x93\xc9\x96\x5a\x1d\x0e\xc7\xee\
\x48\x24\x62\xb6\xcb\xcd\xa0\x28\x8d\x7c\x7d\xb2\x71\xd9\xdf\x65\
\x75\x75\x35\x4e\xa7\xa3\xc5\x0a\x10\x8b\xc5\x98\x9c\x9c\xbc\x79\
\xdf\x16\x2f\xee\x36\x7c\x5e\xef\x5c\x6b\x16\x3f\x10\x34\x4d\xc3\
\xe3\xf1\x70\xee\xdc\x39\x1c\x0e\x07\xb2\xab\x84\x52\x57\x19\xa2\
\x28\x22\x49\x12\x82\x20\x20\x49\x12\x2e\x97\x0b\x55\x55\xf1\xf9\
\x7c\x44\xa3\xd1\x25\xb6\x48\x2c\x2e\xdc\x4d\xd7\x75\x2c\x16\x0b\
\x86\x61\x20\x0a\x16\xb2\xd9\x2c\x9a\xa6\x61\x18\x06\x36\x9b\xed\
\x96\xca\x6f\x84\xa9\x58\x10\x04\xd2\xe9\x34\x75\x75\xb5\xe8\x7a\
\x1e\x8b\xc5\x82\xae\xeb\x66\xa0\xdd\x6e\xe7\xbf\xc0\x0a\x10\x8d\
\x46\x0d\xbf\xdf\x3f\xff\x4c\x79\x96\x4d\x72\xbb\xdd\x00\x84\xc3\
\xe1\x25\x76\x6c\x6c\xcc\x00\x04\xe1\x89\x27\x1f\xdf\x13\x08\xf8\
\xcf\xf0\x3f\x62\x6c\x6c\x7c\xfb\xdf\xe7\x60\x9f\x53\x70\x22\xd1\
\x6a\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x04\xd5\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\
\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\
\x67\x9b\xee\x3c\x1a\x00\x00\x04\x67\x49\x44\x41\x54\x38\x8d\xa5\
\x93\x7d\x68\xd5\x55\x1c\xc6\x3f\xe7\xf7\x7a\xef\xfd\xdd\xdd\x3b\
\xb7\xb6\xb9\x79\xa7\x6d\xbe\xcd\x19\xe9\x72\x58\x62\x43\x7b\x93\
\x62\x25\x46\x82\x34\xc8\x7f\xf2\x6a\x50\xa9\x11\x44\x21\xcd\x5c\
\x85\x95\x98\x53\x4a\x21\x15\x35\x19\x51\x52\x19\x68\x8a\x60\x66\
\x8a\xba\x4d\xa7\xd3\xcd\x97\x4d\x45\xd7\x72\x2f\x6d\x73\x6f\xf7\
\xde\xdd\x97\xdf\xef\xf4\x47\x57\xc9\x5a\xa0\xf8\x85\x87\x73\xe0\
\x70\x3e\xe7\xe1\xe1\x39\x62\xdd\xcb\x8a\x1f\x58\xa4\x08\xb1\x5c\
\x0a\x91\x2a\xa4\xb3\x61\x69\x95\xbd\x82\xfb\x1c\x45\x08\xde\xcd\
\x19\x53\xf8\xf1\xac\xb9\xc1\xc0\x93\xa5\xaf\x78\x3d\xbe\x11\xcb\
\x2a\xcb\xd4\x05\xf7\x0d\x56\x55\x3d\x58\x58\x3c\xdb\x0c\x5f\x3b\
\x48\xbc\xf7\x0a\x53\x1f\x9d\x63\x29\x82\x75\x95\x65\xaa\x7e\x5f\
\x60\xc7\x8e\xc7\x9c\x44\x02\x45\x35\x18\x6c\x3b\x8b\x65\x79\xc8\
\x1a\x35\xd6\x0f\x2c\xd9\xba\x52\xbc\xb0\xe3\x23\xf3\xd8\x57\x4b\
\xc4\x3d\x3f\xa2\x00\xdb\xcf\xd5\x1c\x88\xf8\xf2\x67\x63\x65\x4d\
\xa6\xbf\xa5\x86\x82\xa2\x12\x8f\x99\xc6\x1a\xc3\x95\xf2\xad\x94\
\x4c\x13\x39\xe4\xdd\xbb\x63\xc9\x8a\xee\xf6\x6b\x95\x47\xf6\x7f\
\x33\xa4\x8d\x98\x80\x99\xf6\x20\x2d\x9d\x47\x48\x1b\x9b\xee\x9a\
\xb7\x70\xb9\x3b\x3b\x77\x5c\x54\x24\x78\xf8\x5e\xc1\x42\x4a\x09\
\x40\x65\x99\x3a\x5f\xd3\xb5\xaf\xd3\x27\x7a\xdd\xbe\x0c\x8b\x19\
\x4f\x3d\x87\xcb\xf0\x72\xe6\xad\x3d\xf4\xfc\xd4\x6c\x0b\x5b\x6c\
\x2a\xb5\xed\x37\xef\xda\xf1\xad\x8d\x7f\xa2\x53\xe7\xce\x8b\xf5\
\x3d\x10\x30\x65\xd1\x8c\xc9\x44\x7e\x3f\x45\xcd\xb3\xdb\xe0\x70\
\x27\x85\x23\x03\xaa\xad\xc8\xd7\x36\x97\x8b\x85\x9b\xcb\xef\x2e\
\x6f\x05\x60\x6b\xb9\x98\x29\xa1\xae\x70\xea\xb8\x8c\x49\x53\x0b\
\x44\x6f\x6d\x13\x0d\xf3\xce\x92\xd6\xad\x13\xb0\x52\xb9\xf8\xe7\
\x0d\x52\x17\x17\x68\x39\xb9\xb9\x1b\x55\x4d\x5c\xdf\x5c\x2e\xe6\
\xdf\x55\x14\xdb\x56\x89\xbd\x52\xe8\x73\x52\xd3\xfc\x61\x4f\x63\
\xcc\xe3\xec\x08\x69\x05\x19\xa3\x18\x8a\xc7\xb8\xda\xd7\xc5\x98\
\x4f\xc6\x93\xf5\x4c\x00\x77\x4a\x31\x7d\x3d\xed\xd4\xfe\xb6\x3f\
\xdc\xd7\xd3\xd1\x18\x8f\x3b\x65\xc1\x0a\x79\xf9\x7f\xc1\x00\x5b\
\x56\x89\x00\x0e\x93\x46\x7e\xa6\x7c\x37\x21\x6d\x64\x6a\x77\x34\
\x44\xb7\x16\x25\x6f\xbd\xc4\x33\x5a\xc5\x34\x3d\xe8\x86\x85\xcb\
\xfb\x08\x9a\xa7\x88\x3f\xae\x5d\x90\xc7\x0f\xee\x09\xc7\xa2\x83\
\xab\x1d\x47\x7e\x1a\xac\x90\x89\x61\xc1\xb7\x66\xaf\xaa\xbe\x6f\
\xab\xf2\x83\x94\x59\xf9\x22\xe7\x9d\xeb\x42\x71\x49\x34\xcd\xc4\
\x34\x3d\x18\xa6\x07\x4d\x33\xd1\x35\x2f\xba\x35\x8d\xb8\xcc\xe7\
\x74\xf5\x2f\x91\x2b\x0d\x47\x7a\x63\xb1\xe8\x2a\x60\x7b\xb0\x42\
\x46\x87\x05\x03\x6c\x59\x29\xa2\xa5\x65\xaf\x1b\xa1\xae\x9d\x48\
\x27\x84\xa6\x19\x98\xa6\x85\x61\x5a\xe8\x7a\x1a\xc8\x28\x6e\xb7\
\x07\x55\x4f\x05\xb3\x88\xfe\x01\x8b\xfa\xea\x7d\xe1\xab\x17\x6a\
\xe3\x52\x3a\x6b\x1d\x87\x35\xca\x7f\xa8\x80\xa2\xd2\x1a\x1e\xec\
\x46\x35\x32\x01\x90\x52\x22\xf9\xdb\x80\xa2\x0c\xa1\x99\x01\x22\
\xa1\x28\xd2\x8e\x21\xa2\x27\xf1\xbb\xea\x79\xfc\xe9\x52\xcf\xf3\
\x65\xcb\xfc\x52\x28\x2b\x6e\xb7\xe2\xdf\x23\x1d\x76\x77\xb5\xb5\
\x38\x86\x6b\x3c\x20\x49\xc4\x13\x48\xdb\x01\x4c\xec\x84\x8d\xae\
\x86\xd0\x3d\x13\xe9\xed\xe9\xc7\x91\x06\x20\x51\x54\x2f\x97\x1b\
\xab\xa3\x9a\x42\x55\xb0\x42\x0e\x0d\x0b\x76\x1c\xbe\x6f\x3e\x7f\
\x26\xac\xbb\x27\x20\x84\x0b\x29\x1d\x62\xb1\x04\x52\x4a\x6c\x27\
\x85\x48\xa8\x17\x97\x5b\xc1\xe5\x2b\xa4\xb3\xad\x0f\x5b\x2f\xe1\
\x62\xfd\xf1\x44\xd3\xb9\xea\x96\x78\xdc\x79\x63\x58\xc7\x42\x08\
\x65\xf1\x87\xd4\x47\x42\xe1\x4b\x1d\xad\x4d\xd2\xf0\x4e\x41\x51\
\x21\x11\xb7\x89\x86\x7b\xd1\x5d\xe9\x0c\x45\x24\xe1\xde\x2b\x78\
\xfc\xf9\xb8\xfc\x25\xd4\x1e\xda\x19\x3f\xf1\xeb\x8f\x97\x7a\x7a\
\xed\x92\x60\x85\x8c\xdc\x01\x16\x42\x28\x42\x08\x1f\x90\x05\x64\
\x1f\x3e\xc9\xda\xb3\xb5\xd5\x51\xd3\x2a\x46\xd5\x33\x31\x3c\x99\
\x84\x07\x87\x88\x85\xaf\x92\x92\x31\x9d\xee\x6e\x95\x81\x7e\xc9\
\xf1\xc3\x7b\xa2\xa7\xeb\x1a\x4f\xac\xdc\x98\x58\xf0\xf6\xe7\x28\
\x42\x08\x9f\x10\x42\x28\x49\xa8\x00\xac\xa4\x52\x00\x5f\xd5\xcf\
\xdc\x68\xef\xe8\x69\xb8\x50\x77\x20\x61\xa5\xcf\xc5\x71\xe2\xb8\
\x7d\x63\xe9\xbb\x09\xaa\x91\x87\x61\x8d\x63\xff\xae\xf5\xb1\x93\
\xa7\x9a\xf6\x2d\x5d\x1d\x2f\x6f\xed\xc0\x4c\xde\xb5\x00\xeb\x76\
\xdd\x84\x10\xde\xe4\x81\x37\xa9\x94\x40\x16\x59\xef\xbd\xca\x17\
\x8f\xcd\x7a\x22\x23\x3b\x37\x53\x18\xae\x6c\xfa\xda\x1b\x69\xbd\
\xde\x6c\x5f\x3c\xdf\x12\xde\x77\xd4\xd9\xb0\xfb\x10\xc7\x80\x41\
\x60\x20\xb9\x0e\x02\x5d\x77\xf4\x58\x08\xe1\x02\xfc\x80\x27\x29\
\x77\x71\x21\xa3\x83\x2f\x89\x6d\x33\xe7\xcc\x4b\x89\x45\xda\x38\
\x53\x5d\x1b\xeb\xec\x72\x8e\xae\xaf\x92\x1b\xda\xba\xb8\x09\x44\
\x92\x0a\x03\x37\x81\x01\x29\xa5\x3d\xec\x07\x49\x46\x64\x00\x2e\
\xc0\x58\xf4\x22\x53\xa6\x3f\xc4\x0f\x71\x9b\x53\x0d\xcd\x7c\xb9\
\x69\x17\x35\x40\x1c\x88\x01\x43\x40\x14\x48\xc8\x7f\xc0\xfe\x02\
\xac\xc3\xe6\x28\xcc\x5c\x0b\x9f\x00\x00\x00\x00\x49\x45\x4e\x44\
\xae\x42\x60\x82\
\x00\x00\x04\x49\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\
\x0d\xd7\x01\x42\x28\x9b\x78\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xd5\x0b\x0a\x0d\x39\x23\x32\x71\x99\xd2\x00\x00\x03\xd6\x49\x44\
\x41\x54\x38\xcb\xad\x94\x5f\x4c\x5b\x55\x1c\xc7\x3f\xf7\x52\xfa\
\x87\x0b\x94\xdb\xae\xa5\x2d\x56\x56\x60\x1d\x73\x6c\x43\x96\x4e\
\x99\x7f\x26\x26\x3e\xcc\xb8\x45\x63\x9c\x0f\x1a\x63\xc2\xd3\xc6\
\x02\xd4\x6d\x62\x36\x7d\x70\xea\x1c\xd3\x30\x25\x42\x8c\xe8\x83\
\x46\xa7\x4b\xdc\x8b\x2f\x1a\xb3\x07\x89\x31\xe2\x48\x26\xea\x44\
\xb6\x41\xc5\xa6\x13\xa4\x8c\x0b\xf4\x7f\x0b\xbd\x3e\xb4\x54\xea\
\xdc\xc0\x84\x6f\x72\x73\xce\x3d\xe7\xfb\xfb\x9e\xef\xf9\xde\x73\
\xae\xc0\x32\x1c\x7c\xad\xe3\x83\x3f\xc2\x8e\x47\x83\x33\x49\xd3\
\xf2\x71\x43\xa1\x1a\xb1\x16\x87\x86\xcb\xa5\xdf\xbc\xdd\x2f\x7d\
\xfe\x1d\xab\x80\xb0\xd4\xe9\xf9\xd0\x5b\x7f\xee\x47\xd7\x85\xf5\
\xee\x4d\x89\xca\x72\xab\x18\x4a\x89\xfa\x8a\x52\xbd\xf8\x67\x28\
\xc9\x4c\x2c\xc1\xec\xe5\xf3\xbe\x68\x24\xae\x73\xc9\x23\x1d\xbd\
\x2f\x9f\xf9\x64\x25\xe1\x82\x25\xd1\xf3\x23\xf6\x73\xb7\x6f\x7d\
\xa0\x6c\x7c\x74\x44\x3b\x36\x3e\x5e\xe8\xff\x7d\x4c\xf4\x4f\x5f\
\xa7\xb0\xc4\x84\xac\xd7\xa2\xb7\xd4\xc8\xb3\xb1\x74\xe9\xb5\xa0\
\x7e\xf7\x9e\x47\xcc\x17\x2f\x7c\xf3\xeb\xe8\xad\x84\x45\x80\x1f\
\xae\xea\x3b\x6f\x5b\xa7\x19\x0f\x8f\x7e\x7d\x79\x87\x65\xe0\xe9\
\xfe\xae\x03\xe2\x7d\x95\x83\xbb\x53\x73\xd7\xe6\x03\x63\x97\xd4\
\xa9\xf9\x10\xa1\x48\x18\xd9\x6a\x47\xb2\x3a\x75\xbf\x04\xb7\x7d\
\x76\xf8\x95\x3d\xd2\x8a\xc2\x4a\xd4\x50\x53\xb0\x18\x9e\xbb\x7f\
\x43\xe0\xa1\x13\x87\xde\xff\x14\xe0\xe4\x91\x8f\xbf\xf2\x38\x03\
\xc7\xc3\x8a\x22\x44\xe6\x67\x48\xc6\xa3\x00\x58\x9d\x1b\x44\x8b\
\x94\xf4\x4f\x27\x5d\xbd\x2b\x66\xfc\xd4\xd1\xe7\xbe\x70\xe9\x52\
\x3f\xcf\x2b\xe9\x63\xcb\x27\x75\x06\x81\x6f\x67\x2a\x59\xbf\xb9\
\x21\xaf\xa8\x2c\x36\xcc\xf4\x5f\x93\x38\xd2\xb3\xff\xd6\xeb\xe8\
\x7e\xab\xe7\x14\x80\x06\xc0\x59\x1a\xfa\x32\x7a\x5d\xdb\x7b\xf2\
\xc4\x1b\x37\xac\xfc\xa0\xb7\xe7\x86\xb1\xb8\xf9\x2e\x02\xbe\x7e\
\x3e\x3a\x9d\xe7\x83\x17\x8e\x1e\xe9\x04\x4e\xe5\xa2\x88\x4e\x6a\
\xaf\xca\x65\x16\xa2\xd1\xcc\x76\x23\x91\x48\xee\xc9\x89\xc5\xfe\
\xe9\x17\x14\x6a\xf3\x78\xfe\x80\x9f\x48\x24\x82\xc5\x62\xa1\xb5\
\xbd\xa5\x3e\xe7\x18\xa8\xb6\xd9\xec\x00\x84\x23\x61\x8a\xa5\xe2\
\xff\x74\xba\x04\x35\x9d\x06\xe0\xb1\xe3\x67\x58\x48\x26\x39\x7b\
\x6c\x1f\x00\xb2\x2c\x13\x0c\x06\xdd\xc0\x90\x98\xe5\xee\xbd\x73\
\x5b\x03\xb1\x58\x0c\x01\x21\xe7\xb4\xd6\xb3\x8b\x5a\xcf\x2e\x8c\
\xb2\x05\x80\x44\x22\x9e\x69\x63\x21\x6a\xea\xef\xa6\xaa\xce\x03\
\x40\x91\xa1\x08\x80\x7b\x1a\xef\x05\xd8\x92\x8b\x02\x78\xd8\xe1\
\xa8\xc8\x73\xf5\x5e\x5b\x13\xa3\x3f\x7d\x0f\xc0\x44\xc0\x07\xaa\
\xca\xe2\x42\x8a\x78\x2c\x42\x68\x4e\x01\xc0\x77\x69\x90\x77\x0e\
\xec\xcc\xd5\x38\x9d\x95\x00\x2f\x02\x88\xad\xed\x2d\xf5\x06\x43\
\x11\x5a\xad\x16\xb3\xd9\x9c\x23\xd9\x2d\x95\x74\x35\x6f\x67\x64\
\xb0\x1f\x93\xc5\x41\x5a\x55\xb3\x39\xa8\x94\x96\x99\x19\x1d\x1a\
\xa0\xab\x79\x3b\x95\x0e\x37\x00\x92\x24\x65\xe3\x30\xd3\xda\xde\
\x52\x2f\x02\xee\x72\xab\x0d\x00\x45\x51\x90\x24\x09\x49\x92\x10\
\x45\x11\x57\xc5\x46\xba\xf7\x37\xe6\xc4\x45\x41\xa0\xd8\x68\x62\
\x74\x68\x80\xee\xfd\x8d\xb8\x2a\x36\xe6\xf8\x8a\x92\xd9\x85\xb1\
\xd4\x08\xe0\x16\x81\x2d\x77\x6c\xda\x4c\x2a\x95\x52\x35\x9a\x02\
\xe6\xe6\xe6\x50\x14\x05\x83\xc1\x80\x24\x49\xd4\xb9\x1b\xe8\xf3\
\x36\x31\x32\xd8\x4f\xd9\x3a\x3b\xe3\xc3\x17\xe9\xf3\x36\x51\xe7\
\x6e\xc8\x09\x2a\x8a\xc2\xe2\xe2\x02\xe1\x70\x58\xad\xae\xaa\x06\
\x68\xd4\x24\x12\x89\xad\x36\x9b\x8d\xd7\x3b\x5f\x15\x6e\x75\x93\
\x3c\x25\x49\x06\x07\x61\x47\xc9\x15\xfa\xde\xbd\x72\xd3\x0b\xf7\
\xec\x33\xcd\xc4\xe3\x89\x12\x8d\x4e\xa7\xdb\xeb\x76\x67\x72\x6a\
\x6f\x3b\x8c\xa0\xaa\xa8\x08\x80\x0a\x82\x00\xaa\xba\xd4\x64\x4b\
\x85\x2c\x07\xaa\xaa\xaa\xf0\xf9\x7c\x08\x42\xe6\x12\x9f\x7e\xfb\
\x4d\x6a\x6b\x6b\xd1\xeb\x75\xcd\x1a\x80\x60\x30\x98\x3d\x36\x06\
\xfc\x7e\xff\x6a\x7e\xb7\xd4\xd4\xd4\x00\x60\x32\xc9\xd9\xc3\x95\
\x59\x79\x49\x4b\x5c\x4e\x36\xc9\x26\x56\x0b\x59\x96\x33\x1f\xcb\
\x58\x86\xd1\x58\x8a\xd1\x68\xcc\x9b\xd7\x2c\x7f\x29\xd4\x16\xe2\
\xf1\x78\x58\x0b\xe4\x09\xb7\x79\x0f\xfe\xaf\xe2\xd6\xf6\x96\x9b\
\xd6\x68\x00\xa6\xa6\xa6\xd4\x43\xde\xe7\x85\xb5\x70\x3a\x31\x31\
\xa1\x02\x82\xf0\xc4\x93\x8f\xef\xb3\xdb\x6d\x67\x59\x43\x4c\x4c\
\x4c\xee\xfc\x1b\x0f\xd8\x70\x1b\x27\x6e\xb0\x4a\x00\x00\x00\x00\
\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x05\xd0\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\
\x0d\xd7\x01\x42\x28\x9b\x78\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xd6\x01\x05\x0d\x1e\x16\x2a\x40\x95\xcd\x00\x00\x05\x5d\x49\x44\
\x41\x54\x38\xcb\x8d\x95\x5d\x6c\x54\xc7\x15\xc7\x7f\x33\xf7\xde\
\xfd\x5e\x7b\xd7\x4b\xfc\xb1\xc4\x26\x36\x35\xb8\x24\xc1\xc1\x5e\
\x27\x0d\x21\x98\xd0\xa4\x69\x95\x14\x35\x44\x4d\xa5\xc4\x4d\x8b\
\x88\xa5\x7e\xa8\xe9\x53\xfa\x56\x59\x4d\x9e\xe8\x53\x55\xa9\x6a\
\x25\x2b\xb4\x2e\x8b\xd2\x56\x6d\x20\xa1\x2f\xc5\x0a\x15\x6d\x6a\
\x0a\xac\x1d\x30\x06\x4c\x83\x03\x98\x85\xf5\xae\xd7\xbb\x5e\xef\
\xf7\xbd\xbb\xf7\xf6\x21\xbb\xc6\x4e\xab\xaa\xe7\x69\x74\x66\xce\
\xef\xfc\x75\xce\x9c\x19\xc1\xff\x61\x3b\x5f\xfe\x69\x5c\x77\x07\
\x9b\xd7\xb8\xe2\x91\xd1\xa1\xd6\xff\x15\xa3\x7e\xd6\x11\x1a\x0e\
\xf7\x03\x44\x46\x87\x26\xeb\x3e\xdd\x1d\x6c\x7e\xe9\xd1\x66\xf2\
\xc5\x12\x7a\x41\x67\x7c\xae\xd4\xf2\x99\xf3\x47\x81\x57\xd6\xc6\
\xc8\x75\xd0\xd7\x8e\x7c\x13\x3d\x7f\x6e\x53\xb3\xeb\x5c\x68\x38\
\x7c\x60\x7d\x4a\x93\x1b\xd1\x24\x46\x45\x5f\x05\x86\x86\xc3\x03\
\xc2\x28\xfc\xe5\x41\xbf\xd9\x0d\x9c\xac\x8b\x02\x10\xab\xd0\x83\
\x63\x03\x4d\x32\xfb\xe1\x1b\xaf\x0e\xda\xe6\xa3\x71\x7e\x79\x6a\
\x61\x15\xf9\xc5\x1d\xed\x6c\x09\x28\x9c\x3a\x7b\x8d\x87\xba\x36\
\xf0\xa7\x8b\xd9\x7b\x7b\x9d\x82\x4d\xf7\x05\x88\xa6\x8a\x9c\xbc\
\x9e\x5f\x89\x8c\x0e\x35\xae\x07\x1f\x38\x9c\xf9\xfa\xae\x76\x6f\
\x57\xd0\x2f\x02\x3e\x0f\xc2\x32\x51\xa5\xc5\xcd\xd8\x0a\xa9\xe5\
\x3c\x91\x99\x5b\x08\x21\xd0\x54\x85\xe6\x26\x2f\xb9\x95\x14\xfe\
\xc0\x06\x12\xc9\x2c\x5d\x6d\x4d\xb4\x78\xed\x1c\x9d\x4a\x1a\xa9\
\x42\xe5\xf1\xc8\xe8\xd0\xe4\xbd\x52\xa8\xb6\xef\xff\xf9\xf4\xd5\
\xf4\x06\x9f\x13\xb0\x58\xce\x96\x49\xa4\x4b\x4c\xcd\xdc\x66\x7a\
\xf6\x0e\x0e\x4d\xc3\xa1\x69\x68\x52\x21\x93\x29\x62\x09\x17\xe9\
\x74\x91\x56\x7f\x03\x7a\xc5\xe2\xed\x33\x0b\x66\x1d\xba\x4e\xf1\
\xa7\x35\xfe\x6d\x28\xe0\x30\xcf\x8d\x1c\xd8\x25\x92\xe9\x3c\x4b\
\xe9\x1c\x97\x66\xef\xd0\x11\xf4\xd3\xd5\x71\x1f\x00\xa5\xb2\x41\
\x22\x99\xe5\xc6\xed\x24\x52\x08\x3a\x83\x01\x4e\x4c\xce\x5b\x8b\
\xba\x3a\x12\x19\x1d\x7a\xeb\xbf\x36\x4f\x29\x2e\x05\x37\xb5\x78\
\xb0\x4c\x0b\x55\x91\x78\xdd\x0e\x76\x0f\x74\xe3\x73\x49\xeb\x83\
\x0f\xa7\xaa\xff\x8c\xcc\x90\x4e\x2d\xe3\xb0\x69\x3c\xd6\xdb\x89\
\x43\xd3\x48\x65\x0a\x0c\x6e\x76\x0b\xaa\x95\x57\xd6\xb2\x44\x68\
\x38\xfc\x77\x60\x17\x40\x4f\x47\x13\x2f\x0f\x76\xa2\x58\x26\xd9\
\x5c\x89\x72\xb9\x42\x26\x93\x34\xc7\x4e\x47\xcf\x54\x35\xf7\xf3\
\x91\xd1\xa1\xe5\xbd\xfb\x7e\xf8\xd2\xd7\xbe\xfa\x74\xd8\xeb\xf1\
\x6b\x8a\x22\x29\x14\x74\xda\x9a\xbd\xbc\x75\xec\xea\x5a\xee\x9b\
\x4a\xb0\x7f\xff\xe1\xd7\xbf\xb4\x91\x67\x7a\x5b\x78\x6a\x7b\x10\
\x01\xc4\xe2\x19\x0a\x85\x32\x5b\x3a\x03\xfc\xfc\xf7\x13\xc5\xb2\
\xcd\x1f\x8a\x8c\x0e\x2d\x03\xdc\xb8\x76\xf6\xb2\xea\xb8\xbf\xf5\
\xd1\xfe\xed\x03\xdb\xb6\x6e\xc4\xed\xb4\x63\xd7\x34\xb6\xb7\xb8\
\xd8\x11\x74\xb2\x23\x68\x63\x32\x5a\x1c\x94\x00\x1d\xc1\x20\x86\
\xa1\x12\x4f\x16\xb8\x3e\x97\x60\x71\x31\xcb\xc2\xc2\x0a\x96\x69\
\x92\x57\x1a\x1d\x75\x68\xdd\xb2\x99\xa5\x23\x85\x42\x8e\xc6\x06\
\x27\xa5\x82\xc1\xb5\x7f\xc5\x59\x59\xd1\xa9\x56\x54\x7c\x8d\x81\
\x7b\x35\x9e\xba\x30\x6b\xc5\x62\x8b\x2c\xa5\xf2\xa4\xd2\x79\xaa\
\x15\x13\xbb\x4d\x45\x48\x81\xcd\x2c\x19\xa1\xe1\xb0\x6f\x2d\xd8\
\xe5\xf5\x3f\xbe\x6d\xeb\x03\xe8\xe5\x0a\xb1\xd8\x32\x1e\xb7\x9d\
\x06\x8f\xc4\x32\xf3\x56\x3c\x7e\xd7\x04\x50\x82\x7d\x2f\xf4\x5c\
\x8a\xeb\x0f\x5f\xbc\x5b\x24\x72\x73\x99\x3d\x3d\x2d\x58\x55\x0b\
\x4d\x51\xf0\x35\x78\x70\x92\x53\x67\x13\x95\x50\xb0\xff\xc5\x13\
\x77\xa7\xde\x2d\xed\xdc\xff\xe3\xcd\x4f\x86\x7a\xfe\xf8\x58\xff\
\x83\xda\x9d\x68\x9a\x62\xde\xc0\xeb\x71\x70\xf8\xbd\xf1\xfc\xdf\
\xe2\x76\xdb\xc5\x05\x5d\x00\x6f\xae\xbb\x6e\xcf\xbd\xf0\xfa\x3e\
\xfb\xe6\x9d\xc7\xbf\xbc\xad\x4d\x48\x21\x90\x42\xf0\x48\x6f\x3b\
\xff\x98\x9a\xe1\xe4\xc4\xac\xe5\x75\xd9\x45\x5f\x77\x90\xfd\xcf\
\x3f\x89\x94\x82\xf3\xe7\x6e\x22\x85\x20\xbe\xb4\xc0\xd8\x99\xe8\
\xcc\xd9\xb1\xef\x3c\xfc\x1f\x23\x5d\x7b\x2b\x3e\xd8\x11\x74\xee\
\xf9\x4a\x5f\xa7\x2c\xe4\x74\xa4\x10\x08\x21\xb8\xbf\xdd\x4f\x6b\
\x4b\x23\x52\x0a\xf2\xb9\x32\xd5\x8a\x09\x40\xf4\x76\x1a\x4d\x53\
\x38\x7f\x79\x86\xf7\x3e\xae\x64\x2d\xab\xba\x77\xf2\xed\x6f\x4f\
\x02\xd6\x2a\xb8\xff\xb5\x23\xa7\x7c\x2e\x75\xd7\x77\xf7\x3e\xa0\
\x08\xc3\x26\x2d\xd3\x5a\x05\x4b\x29\x6a\x6b\x50\x15\xc9\xa6\xce\
\x00\x20\x88\xde\x4a\x21\x85\xa0\x8a\xce\xf4\x27\x51\x7e\x37\x9d\
\x31\xcc\x4a\xf9\x89\xa9\x5f\x1f\x8c\xa8\x00\xfd\x07\x7f\x13\x12\
\x96\xb9\xfb\x5b\x4f\x74\x08\xb7\xe6\x91\x86\x59\xc1\xe3\xb3\x23\
\x85\xa4\x54\x30\x3e\xed\x72\x0d\x2e\x85\x20\xbd\x54\xa4\xb5\xad\
\x01\xd3\x2a\xe3\x75\x35\x62\x59\x76\x9a\x1b\x1c\xc8\x6a\x42\x35\
\xf4\x92\x02\x08\x05\x10\xb1\x8f\x8e\x2f\xb4\xf5\x3e\xf7\x85\xb9\
\x78\x6e\xf3\x9e\xcf\xb7\x8b\x7c\x29\xcb\xc8\xfb\x57\x38\x3f\x3d\
\x9d\x5a\x5c\xc9\x39\xfa\xba\x83\xc2\xa6\xa8\xa8\x52\x62\xb3\x49\
\xa6\xe6\xa2\xd6\xc8\xd1\x09\x7d\xfc\x72\x34\xe7\xd2\xb0\xd9\x9c\
\x0e\x31\x39\x3d\x53\xfd\x38\x59\xfc\x45\xd5\x28\x5d\x4d\x5c\x19\
\xbf\xab\xd4\xea\xac\xc4\x2e\x9c\x38\xd6\xb8\xe5\xa9\xed\x91\xf9\
\xec\xd6\x6b\xf1\x02\x4b\xe9\xd4\x47\x13\x63\x3f\xf8\x5e\xae\xf1\
\x21\xfe\x7a\x4b\xef\x7d\x71\xa0\x0b\x2c\x81\x40\x72\xec\xc2\x1d\
\x31\x3b\x33\xf1\xb3\x2b\xc7\x47\x0e\xc5\xbd\xbd\xbe\x4b\xf3\x8b\
\xdd\x97\xe6\x93\xe1\xe9\x3f\xbc\x71\x28\x71\x65\xfc\x06\x50\xad\
\x37\x50\x01\xdc\x40\x5b\xcf\xbe\x91\x1f\x3d\xf2\xea\xaf\xce\x03\
\x83\xc0\x33\xc0\xb3\xa1\xe1\xb0\x35\x77\x3d\x61\x45\x4e\x7f\x62\
\xcd\x5d\x4f\x58\xa1\xe1\xb0\x05\x3c\x0b\x3c\x0d\xec\x06\xfa\x80\
\xcf\x01\xad\x40\x03\x60\xab\x7f\x4d\x16\x50\x51\x34\x67\x69\xf6\
\xfd\x9f\xbc\x03\x9c\x00\x1c\x80\xbd\x96\x14\x00\xff\x46\xcf\xba\
\x01\xac\x29\xd3\x81\x3c\x50\x00\x4a\x40\x05\x30\xd5\x1a\x14\xa0\
\x52\x35\x8a\x45\xa0\x2a\x55\xbb\x6e\x73\x37\x39\x4b\x99\x98\x04\
\x64\x79\x65\xf1\xdd\x6f\x1c\x3a\xb9\xbf\x4e\x34\x0a\x99\x77\x80\
\x78\x5d\x50\x0d\x58\xae\x25\x31\x00\xf3\xdf\xf0\x11\x56\x82\x70\
\x21\x0b\x3b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x04\x7f\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x11\x00\x00\
\x0b\x11\x01\x7f\x64\x5f\x91\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xd5\x09\x1a\x0b\x18\x25\x79\xd9\x51\x49\x00\x00\x04\x0c\x49\x44\
\x41\x54\x38\xcb\xa5\x95\x7f\x4c\x94\x75\x1c\xc7\x5f\xcf\x71\x02\
\x29\xe0\xa1\x96\x72\x84\x88\xcd\x69\x56\xc2\x09\xa3\x0d\xee\x16\
\x85\xb8\x16\x0a\xce\x65\x69\xb2\xa6\x16\xcb\x6a\xfd\xe1\x58\x0b\
\x19\xee\xdb\x93\xc4\x51\xff\xd0\x06\xe4\xc8\xd6\x9a\x63\x2d\xcc\
\x2d\x73\xda\x26\xb1\x69\x2d\xd8\x94\x1f\x67\x3b\xa9\x43\x25\x76\
\xbb\x38\x90\x1e\x91\x2e\x40\xb8\x3b\x9e\xa7\x3f\xe4\xb9\x1d\xe7\
\x41\x6d\x7d\xb7\x67\x7b\x3e\xcf\xbe\xcf\x6b\xef\xef\xe7\xf3\x7e\
\x3f\x8f\x44\xc4\x12\x42\x08\xe0\xfd\xb9\xf2\x3d\xa0\x57\x96\xe5\
\x76\xfe\xef\x12\x42\x68\xa3\xb7\x47\xb4\x99\x99\x69\xcd\xe5\xfa\
\x4d\x13\x42\x68\x15\x15\x15\xc5\x80\xf4\x2f\xaf\x4a\x80\x41\x2f\
\x0c\x51\x36\x98\x9b\x3e\x3d\x81\xa6\xaa\xa4\x9a\xcd\xec\xdb\xb7\
\x97\x84\x84\x84\xf3\x80\xb6\x10\x3c\xa7\xbc\x25\xe5\x83\x13\xe7\
\xd4\x9c\xf2\x96\x53\x91\x60\x49\x08\x91\x05\x20\xcb\xf2\x30\x60\
\xb6\xd7\x7d\xc4\xcc\xf4\x3d\x32\x32\x32\x22\x55\x45\x42\xb3\x00\
\xef\xb1\xc3\x3b\x31\x2f\x67\x4d\x4e\x79\x4b\xbb\x0e\x96\xaa\xab\
\xab\x65\xc0\x21\x84\x38\xae\xc3\xad\x56\x2b\x92\xf4\xc0\x81\xd4\
\x28\x82\x1d\x5d\x9f\xed\xa7\xa7\xa7\x87\x83\xf9\xcb\x0a\x2d\xe9\
\xf1\x85\x00\x46\x60\x49\x4c\x4c\xcc\xb1\x37\x0f\x97\x63\x88\x89\
\x7d\x17\xa8\xde\xb2\x65\x0b\x9b\x36\x6d\x44\xd3\x54\x24\x49\xc2\
\x3f\x33\x79\x45\x08\x91\x25\xcb\xf2\xb5\x28\x6a\x19\x18\x18\xc0\
\xe3\xf1\xf0\xe1\xf7\x93\x00\xe6\xd0\xd1\x9a\x9b\x9b\x9d\xa5\x25\
\x3b\x9f\x5c\xba\xf4\x21\x02\x7e\x3f\x9a\xa6\xa1\x69\x5a\x08\x90\
\x64\x4a\xa6\xb6\xd6\x0e\x60\x9e\x6b\x95\x0e\x75\x74\x36\xbd\x44\
\xde\xdb\xa7\xf5\xad\x96\xee\x93\x65\xd7\x42\x60\x21\x44\x4a\x7c\
\x7c\xfc\xaf\xcf\x6f\x2f\x34\x3d\xfe\xc4\x53\x48\x92\x14\x9a\x95\
\x6f\xfc\xee\x7d\xf8\x72\x13\xb5\xf6\x3a\x00\xf3\x05\xef\x86\xd5\
\x80\xe3\x6a\xf3\x2b\xc1\xdc\x37\xbe\x32\x02\x45\xdd\x27\xcb\xda\
\xa3\x0e\x43\x08\x91\x95\x9e\x9e\xfe\xb9\xdb\xed\xce\xd6\x9f\xe5\
\xe6\xe6\x06\xb6\x6d\x2b\x5c\xf2\xf7\x5f\xe3\x68\x9a\xc6\xb2\xc4\
\x24\x5a\x5b\x5b\x69\xea\x8c\xe5\xe7\x86\x17\xb1\xbe\x73\x66\x9e\
\xca\x70\xae\xb4\x88\x9f\x53\x00\x1b\xd0\x5a\x55\x75\x94\xb1\x3b\
\x0a\xd7\x6f\xfe\xc1\xc7\x67\xdd\x7c\x7b\xbc\x98\x82\x23\x67\x17\
\x84\x02\x9a\xf4\x1f\x02\x93\x05\x38\xd6\x5a\x8a\x39\x71\xe1\x06\
\xdf\x54\xe5\x53\xf5\x45\x37\x25\x9b\x03\xb8\x5c\xfd\x96\xb0\x81\
\xea\xfd\x8b\xee\xcb\x70\xd3\x2b\x43\x1e\xaf\x5e\xaf\x4a\x4d\xe3\
\x72\xfd\x2e\x0e\xd4\xb5\xb1\xcb\x12\xcf\xcb\x25\x45\xd4\xd4\xd4\
\xe8\x03\x1d\x05\x66\x17\x35\x7c\x38\x74\xcf\xf6\x8d\x64\x6e\x5e\
\x8f\xa2\x8c\xf1\x49\xcb\x15\x56\xa5\xa6\x51\xb1\x23\x05\xb3\xc9\
\xc8\xfa\x8c\x75\xa4\x3e\x9a\x86\x2c\xcb\x00\x96\x48\x2b\x1a\x16\
\x83\xbe\x5a\x6a\x45\x9d\x50\x48\x34\x99\x28\xb4\x24\xa1\x0c\x79\
\x70\xf5\xfe\x84\xcd\x66\x23\x3e\x2e\x96\x3b\x7f\xde\xe6\xfe\x37\
\x0b\x87\x9e\xdc\xa8\x60\x1d\xfa\xfa\xee\x4c\x0e\xed\x7e\x86\xb6\
\x8b\x3f\xf0\x63\x4f\x3f\x18\x8c\xcc\x06\x83\x21\xaf\xca\xb2\xcc\
\xca\x87\x57\x23\x49\xd2\x82\x70\x43\x24\xf4\xe8\x6b\x56\xf6\x17\
\xe7\x71\xfa\xbb\x76\xba\xfa\x06\xc9\xb3\xd9\x70\xb9\x6e\x11\xf0\
\x4f\x03\xe0\xf3\xf9\x14\xbf\xdf\x9f\x2d\xcb\x32\x2b\x56\x3d\x02\
\x10\x82\xc7\xc5\xc5\x85\xe0\x06\x3d\x45\xca\x90\xc7\x2b\xbf\xf5\
\x2c\x7b\xb6\x67\x73\xea\xcc\x45\x06\x3d\x5e\x8a\x8a\x4b\x70\xb9\
\x6e\xe1\x75\xdf\xa4\xa3\x5f\xc5\x18\x1c\xdd\x50\x5f\x5f\x7f\xd7\
\x6e\xb7\xdf\x18\x19\x19\xb1\xea\xca\x67\xfc\x7e\x0e\x1e\x3c\x40\
\x65\x65\x25\x80\x23\x04\x56\x86\x3c\x8e\x23\x65\x4f\x53\x5a\x90\
\x49\xeb\xb9\xcb\x0c\x7a\xbc\xd8\x9e\x2b\x9c\x07\x0d\x8c\xf6\x5a\
\xa6\x14\x77\x12\xb0\x02\x58\xe9\x74\x3a\x03\x4e\xa7\xb3\x58\x96\
\x65\xcc\xa9\x69\x34\x36\x36\xe2\xf3\xf9\x42\x9d\x30\xea\x77\xe9\
\xeb\xd2\x98\x55\x35\x46\x87\x06\x1f\x80\x4e\xfc\xde\x56\xa0\xb8\
\x2e\x05\xe6\x84\x24\x03\x86\xce\xce\xce\x20\x30\x3c\x31\x31\xb1\
\xb7\xa1\xa1\xe1\xeb\xb1\xb1\x31\x54\x55\xbd\x1a\x08\x04\xec\xa1\
\xe4\xad\x7b\xc1\xae\xed\xc8\x37\x63\xc9\xb6\xf0\x58\x8a\x89\x5f\
\xfa\x6e\x71\xb5\xab\x8b\x8e\x7e\x95\x29\xf7\xa5\xfc\xd1\xbe\x36\
\x25\x62\x26\x6a\x98\x55\x67\x81\x19\x60\x12\x98\x06\x82\xc0\xac\
\x11\x60\xc5\x9a\x94\xad\xe7\x3b\xbc\xbd\x7a\x83\xee\x4d\x4d\xd0\
\xd1\xaf\x12\x67\x98\x2c\x50\x93\x53\xc7\x01\x25\xcc\xf7\x3a\x50\
\xff\xa3\xa8\x73\xf0\xa0\x0e\x9d\x17\xe9\xad\x87\xbe\xb4\x8c\x8d\
\x0c\xf7\xea\x75\x42\x62\xec\xda\xeb\xad\x15\x23\xe1\x31\x0d\x83\
\x4a\x51\x62\xac\xce\x5d\x1a\xa0\xfd\x03\x8c\xf6\xde\xf1\x62\xa0\
\xea\x2a\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x05\x4f\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\
\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\
\x67\x9b\xee\x3c\x1a\x00\x00\x04\xe1\x49\x44\x41\x54\x38\x8d\x8d\
\x94\x6b\x6c\x54\x45\x18\x86\x9f\x99\x33\xe7\xb6\x6d\x81\x82\x6d\
\x97\x3b\xbb\x6c\x2d\x97\x2d\x77\xe4\x2a\x01\x09\x24\xb2\x20\x26\
\x1a\x12\x12\x43\x54\x22\x28\x28\x26\x46\xa4\x5e\x12\x7f\x18\x65\
\x49\x48\xd0\x88\xc8\x1f\xf8\x01\x51\x13\x13\x23\x21\x6c\x00\xc1\
\x72\x11\xa4\x10\x25\x94\x96\x52\xe8\x65\x5b\x0a\x94\x36\x45\x28\
\xb4\xdd\xb6\xdb\x73\x8e\x3f\x76\xdb\xa0\x80\x38\xc9\x9b\xf9\x33\
\xf3\xcc\x97\x79\xbf\xf7\x13\x9e\xe7\xf1\xa4\x15\x88\x44\x0d\x20\
\x0c\xdc\x03\x6a\xe2\xb1\xa2\x27\x5e\x12\x8f\x03\x07\x22\xd1\x19\
\xc0\x3a\x60\x36\x30\x12\xe8\x04\x64\x5a\x97\x81\x13\xc0\xd6\x78\
\xac\xe8\xe6\xff\x02\xa7\xab\xdb\x0c\xac\x0d\x87\xfc\x19\x73\x26\
\x8e\x24\x1c\xf2\x53\x98\xef\x07\xa0\xbc\xba\x89\xb2\xea\x46\x4e\
\x5f\xa8\x4b\x96\x57\x37\x25\x80\xb7\xe2\xb1\xa2\xef\xff\x13\x1c\
\x88\x44\xc7\x02\x31\xdb\x54\xb9\x9b\x5e\x5b\x90\xb1\x78\x56\x3e\
\xc5\xe7\x6a\x28\xaf\x6d\xa2\xa2\xb6\x19\x29\x24\x85\x21\x3f\xe1\
\x50\x1e\xf3\xa7\x06\x38\xf4\xfb\x55\xa2\xbb\x8f\xb5\x25\xba\x92\
\x27\x80\x15\xf1\x58\x51\xc7\x43\xe0\x40\x24\x6a\x02\x95\xe3\x82\
\x79\x23\xbf\xf9\xf0\x45\x71\xae\xbc\x81\xad\x7b\x7f\xa3\x3b\xe9\
\xa0\x94\x86\xa6\x49\xa4\x94\x08\x21\x10\x02\x32\x6d\x83\x77\x57\
\xce\x66\x7c\x30\x87\x77\xa2\xfb\xbb\xca\xaa\x1b\xf7\xc6\x63\x45\
\x6f\x3c\x0a\xbc\xcd\xb6\xf4\x35\x07\xb7\xbf\xee\xdb\xba\xe7\x24\
\x27\xce\xd7\x31\x7d\xfc\x70\x5e\x5a\x38\x9e\x09\x21\x3f\x39\xd9\
\x19\x24\x7b\x1c\x1a\x6f\xb7\x71\xe8\x4c\x15\xfb\x4f\x56\xe2\xb8\
\x1e\x0b\xa6\x06\x58\xb5\x64\x12\xcf\xaf\xdf\xd5\x9e\xe8\x4a\x2e\
\x8b\xc7\x8a\x8e\xf5\x81\xd3\x46\x15\x7f\xb6\x6e\xb1\x4f\xd7\x35\
\x3e\xdf\x75\x1c\xd3\xd0\xd9\xb8\xea\x59\x56\x2c\x2a\x7c\xa4\xb9\
\x3f\xfe\x7a\x89\x3d\xb1\x52\x1c\xd7\xe5\xbd\x95\x33\x69\xb9\xdb\
\xce\xc7\x5f\x1f\x6c\xf6\x3c\x46\xc7\x63\x45\x6d\x32\x7d\xee\xed\
\x49\x05\x83\x7d\xcf\x3d\x13\x62\xdb\x77\xa7\x31\x4d\x1d\xd3\xd4\
\xf1\x80\xc3\x25\xd5\x7c\xb2\xb3\x98\xb5\x5b\x0e\xf0\xc3\x91\x4b\
\x7d\xe0\x85\xd3\x02\xd8\xb6\x89\x6d\x19\xec\x3e\x70\x81\xc5\x33\
\xf3\x99\x3c\x66\x68\x06\x10\x21\xdd\x3a\x00\xb3\xe7\x4e\x0e\x70\
\xa4\xa4\x8a\x1e\xc7\xc3\xd0\x15\xa6\xa1\xb3\xf7\x50\x19\x3b\x7f\
\xfe\x93\xab\xd7\xef\xd0\x96\x70\x38\x5d\x76\xbd\x0f\xac\x34\x89\
\xcf\x36\xb0\x2d\x03\xc7\x13\x9c\xab\xb8\xc9\xbc\x69\xa3\x7d\xc0\
\x4c\x00\x19\x88\x44\x2d\x60\xc4\x84\xfc\xc1\x54\xc4\x9b\xd1\x75\
\x0d\x43\x57\x18\x86\x42\x57\x1a\xa6\xa1\x63\x99\x06\x3e\xdb\x60\
\xf5\xd2\x49\x7d\xe0\x8b\xb5\x2d\xd8\x96\x89\x65\x19\x58\xa6\x41\
\x5d\xe3\x5d\x0a\x43\x7e\x21\xa5\x98\xd7\x5b\xf1\x44\x20\x51\x98\
\xef\xa7\xb2\xae\x05\xa5\x34\x74\x5d\xf5\xc9\x30\x52\xdf\xb2\x76\
\xf9\x64\x26\x3f\x9d\x07\xc0\xb5\xa6\x7b\xc4\x4a\xea\xb0\x2d\x03\
\xdb\x34\x30\x4d\x9d\xfa\xa6\xfb\x8c\x1d\x95\x83\xe7\x79\x63\x01\
\x14\xd0\x06\x48\x21\x04\x52\x93\x28\x4d\x43\x69\x12\x3d\xfd\x80\
\xa1\x2b\x5e\x98\x1b\x62\xda\x98\x54\x40\xea\x9b\xee\xb3\xf7\xe8\
\x55\x74\x43\x47\x48\x89\x94\x02\x04\xe8\x4a\xa5\x5a\x11\xd1\xd9\
\x5b\xf1\x65\x40\x55\xd4\x36\x13\x0e\xe6\x21\xa5\x44\xd3\x52\x52\
\x9a\x86\x52\x1a\x13\x43\xb9\x7d\x5f\x50\x5c\x7a\x13\x5d\xd7\xb1\
\x2d\x03\xcb\xd4\x31\x0c\x1d\x5d\x29\x46\x0f\xcb\xe6\xea\xb5\x16\
\x84\x14\x17\x00\x54\x3c\x56\xe4\x06\x22\xd1\xca\x8a\x9a\x5b\x13\
\xc7\x05\x73\x29\xb9\x74\x03\x29\x53\x61\xd0\xa4\x40\xd3\x24\x3b\
\xf6\x5d\xc4\x67\x1b\x58\x96\x91\x82\xda\x06\x3d\x8e\x8b\x00\x1c\
\xc7\x25\xa9\x24\xc1\x21\xfd\xa9\xa8\x6e\x74\x1d\xc7\x3d\xf9\x60\
\x57\x9c\x38\x55\x5a\xef\xcc\x9f\x1a\xc0\x32\x54\x2a\x39\x90\x4e\
\x99\xe0\x95\x45\x63\x58\x13\x09\xf3\xea\xa2\x02\xb2\xb3\x2c\x7c\
\xb6\x89\xae\x34\xa4\x26\x11\x52\x60\x1b\x8a\xc2\x60\x0e\xc5\x67\
\xab\x3a\x81\x92\x07\xc1\x5b\x4a\x4a\xeb\x13\x67\xcb\x1b\x58\xbd\
\x7c\x0a\x00\x1e\xe0\xe1\xe1\x79\x1e\xb9\xd9\x3e\xfc\x03\x7d\xe4\
\x0e\xb0\xc1\x73\x49\x74\x76\xd3\xd3\xe3\xe0\xba\x2e\x9e\xeb\xb1\
\x74\x56\x90\x53\x17\xea\xbd\xf3\x95\x37\x2a\x80\xc3\x7d\xe0\xf4\
\xe8\x5b\xff\xe9\xb7\xbf\x74\xcc\x0c\x0f\x63\x4a\xc1\x60\x5c\xd7\
\xc5\x75\x3c\x5c\xd7\x4d\xbd\x92\x5e\x5d\xdd\x3d\x24\x12\x5d\x74\
\x76\x25\xe9\x4e\xf6\x50\x30\xac\x3f\x01\x7f\x16\x1f\x7d\x15\xeb\
\x70\x1c\x77\x45\xef\xac\xfe\xc7\x74\x0b\x2e\x8d\x1e\x99\x51\x38\
\x72\xde\xb6\xf7\x97\x19\xe7\xaf\xdc\xe2\xa7\xe3\x95\x08\x4d\xc3\
\x32\x7b\x8d\x52\x28\xa5\x21\x85\x40\x69\x82\xc5\x53\x87\x13\xf0\
\xf7\x63\xfd\xe6\x7d\x1d\x7f\x5c\x6a\xd8\x58\x7b\x60\xd3\x8e\x5e\
\xd6\xbf\xc7\x66\xa6\x10\x62\x7b\x56\x86\xf9\xf2\x17\x1b\x96\x64\
\x4c\x1f\x37\x94\xf3\x57\x6e\x71\xad\xf9\x3e\x37\x5a\xda\xd1\x75\
\x8d\x51\xfe\x01\x8c\xc8\xcb\xa2\x30\x30\x88\x33\x65\x0d\xde\xa6\
\x2f\x0f\x74\xb4\x77\x74\x7f\xf0\x20\xf4\x21\x30\x29\xc3\x32\xfd\
\xb3\xde\x8c\xd8\xd9\x23\x76\xcc\x99\x12\xf4\xcd\x9f\x16\x32\xc3\
\xa3\xf3\x44\xfe\x88\x41\x00\x54\x37\xfc\x45\x79\xcd\x2d\xf7\xe8\
\x99\x2b\xc9\xb3\xa5\x35\xb5\xb7\xab\x8e\x6d\x68\xad\x3e\x76\x19\
\x68\xf5\x3c\xaf\xed\x91\x60\x21\x44\x36\x30\x10\x18\xa4\x67\xe4\
\x0c\xe9\x17\x98\xbb\xd0\xc8\xcc\x09\x9b\x59\x4f\x15\xa0\x32\x72\
\x04\x8e\xeb\x74\xb6\x36\x27\x5a\x1b\xab\xba\x5b\x1b\x2f\xb7\xd6\
\x1c\x3f\x0d\xde\x6d\xe0\x0e\x70\x1b\xb8\xe9\x79\x5e\xe2\x71\x15\
\x2b\xc0\x06\x7c\x40\x56\x5a\xfd\x80\xcc\xb4\xd9\x09\x52\x69\xbd\
\x9f\xde\xdb\xd3\xea\xf4\x1e\x80\xfd\x0d\xc2\x22\xe7\x20\xf7\x3e\
\x8c\x40\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = "\
\x00\x05\
\x00\x6f\xa6\x53\
\x00\x69\
\x00\x63\x00\x6f\x00\x6e\x00\x73\
\x00\x05\
\x00\x35\x9b\x52\
\x00\x32\
\x00\x32\x00\x78\x00\x32\x00\x32\
\x00\x04\
\x00\x06\x87\x73\
\x00\x61\
\x00\x70\x00\x70\x00\x73\
\x00\x0a\
\x0b\xeb\xbe\x83\
\x00\x63\
\x00\x61\x00\x74\x00\x65\x00\x67\x00\x6f\x00\x72\x00\x69\x00\x65\x00\x73\
\x00\x07\
\x07\xab\x06\x93\
\x00\x61\
\x00\x63\x00\x74\x00\x69\x00\x6f\x00\x6e\x00\x73\
\x00\x11\
\x01\xa6\xc4\x87\
\x00\x64\
\x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x6f\x00\x70\x00\x65\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
\
\x00\x12\
\x00\x03\x49\x87\
\x00\x73\
\x00\x79\x00\x73\x00\x74\x00\x65\x00\x6d\x00\x2d\x00\x6c\x00\x6f\x00\x67\x00\x2d\x00\x6f\x00\x75\x00\x74\x00\x2e\x00\x70\x00\x6e\
\x00\x67\
\x00\x10\
\x0c\xbc\x2e\x67\
\x00\x64\
\x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x6e\x00\x65\x00\x77\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x11\
\x0f\xe3\xd5\x67\
\x00\x64\
\x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x73\x00\x61\x00\x76\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
\
\x00\x0e\
\x0d\x8b\x39\xe7\
\x00\x65\
\x00\x64\x00\x69\x00\x74\x00\x2d\x00\x63\x00\x6c\x00\x65\x00\x61\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x14\
\x0b\xa9\xab\x27\
\x00\x64\
\x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x2d\x00\x73\x00\x61\x00\x76\x00\x65\x00\x2d\x00\x61\x00\x73\x00\x2e\
\x00\x70\x00\x6e\x00\x67\
\x00\x17\
\x0d\x58\x3e\xe7\
\x00\x61\
\x00\x70\x00\x70\x00\x6c\x00\x69\x00\x63\x00\x61\x00\x74\x00\x69\x00\x6f\x00\x6e\x00\x73\x00\x2d\x00\x73\x00\x79\x00\x73\x00\x74\
\x00\x65\x00\x6d\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x16\
\x01\x70\xe1\x87\
\x00\x70\
\x00\x72\x00\x65\x00\x66\x00\x65\x00\x72\x00\x65\x00\x6e\x00\x63\x00\x65\x00\x73\x00\x2d\x00\x73\x00\x79\x00\x73\x00\x74\x00\x65\
\x00\x6d\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x10\
\x0f\xad\xca\x47\
\x00\x68\
\x00\x65\x00\x6c\x00\x70\x00\x2d\x00\x62\x00\x72\x00\x6f\x00\x77\x00\x73\x00\x65\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x10\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\
\x00\x00\x00\x20\x00\x02\x00\x00\x00\x01\x00\x00\x00\x0f\
\x00\x00\x00\x48\x00\x02\x00\x00\x00\x06\x00\x00\x00\x09\
\x00\x00\x00\x2e\x00\x02\x00\x00\x00\x02\x00\x00\x00\x07\
\x00\x00\x01\x80\x00\x00\x00\x00\x00\x01\x00\x00\x1e\x0f\
\x00\x00\x01\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x18\x3b\
\x00\x00\x00\x84\x00\x00\x00\x00\x00\x01\x00\x00\x03\x9b\
\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x13\xee\
\x00\x00\x00\xae\x00\x00\x00\x00\x00\x01\x00\x00\x07\xdb\
\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x01\x00\x00\x0f\x15\
\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x93\
\x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x22\x92\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
| 59.887139
| 129
| 0.725884
| 10,978
| 45,634
| 3.015759
| 0.026781
| 0.052738
| 0.038602
| 0.013049
| 0.137101
| 0.130214
| 0.127858
| 0.121334
| 0.113903
| 0.10892
| 0
| 0.325711
| 0.017794
| 45,634
| 761
| 130
| 59.965834
| 0.412922
| 0.003309
| 0
| 0.087015
| 0
| 0.888889
| 0
| 0
| 0
| 1
| 0.000176
| 0
| 0
| 1
| 0.002677
| false
| 0
| 0.001339
| 0
| 0.004016
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
96bfcdd0287b23d40e6c42cd64034c753cbc7300
| 133
|
py
|
Python
|
sample4.py
|
vswamy/python
|
51835bf7cfec894059a41f2929509026fe611119
|
[
"Apache-2.0"
] | null | null | null |
sample4.py
|
vswamy/python
|
51835bf7cfec894059a41f2929509026fe611119
|
[
"Apache-2.0"
] | null | null | null |
sample4.py
|
vswamy/python
|
51835bf7cfec894059a41f2929509026fe611119
|
[
"Apache-2.0"
] | null | null | null |
#Learning Python
import os
list = [1,2,3]
##using list as a queue
print(list)
list.pop(0)
print(list)
list.append(5)
print(list)
| 9.5
| 23
| 0.691729
| 25
| 133
| 3.68
| 0.68
| 0.293478
| 0.282609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044643
| 0.157895
| 133
| 13
| 24
| 10.230769
| 0.776786
| 0.270677
| 0
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.428571
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
736d59ff49e38e22e2651e066d945a62407f38ec
| 73
|
py
|
Python
|
CodeWars/8 Kyu/Price of Mangoes.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
CodeWars/8 Kyu/Price of Mangoes.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
CodeWars/8 Kyu/Price of Mangoes.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
def mango(quantity, price):
return (quantity - quantity // 3) * price
| 36.5
| 45
| 0.671233
| 9
| 73
| 5.444444
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.191781
| 73
| 2
| 45
| 36.5
| 0.813559
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
738d3ae3312a3ea39b2dd401e3c5ee88d3d77ab6
| 18,859
|
py
|
Python
|
264_nth_ugly_number.py
|
gengwg/leetcode
|
0af5256ec98149ef5863f3bba78ed1e749650f6e
|
[
"Apache-2.0"
] | 2
|
2018-04-24T19:17:40.000Z
|
2018-04-24T19:33:52.000Z
|
264_nth_ugly_number.py
|
gengwg/leetcode
|
0af5256ec98149ef5863f3bba78ed1e749650f6e
|
[
"Apache-2.0"
] | null | null | null |
264_nth_ugly_number.py
|
gengwg/leetcode
|
0af5256ec98149ef5863f3bba78ed1e749650f6e
|
[
"Apache-2.0"
] | 3
|
2020-06-17T05:48:52.000Z
|
2021-01-02T06:08:25.000Z
|
# 264. Ugly Number II
#
# Write a program to check whether a given number is an ugly number.
#
# Ugly numbers are positive numbers whose prime factors only include
# 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since it
# includes another prime factor 7.
#
# Note that 1 is typically treated as an ugly number.
class Solution(object):
# brute force
def isUgly(self, num):
"""
:type num: int
:rtype: bool
"""
if num == 0:
return False
while num % 2 == 0:
num /= 2
while num % 3 == 0:
num /= 3
while num % 5 == 0:
num /= 5
return num == 1
def nthUglyNumber(self, n):
"""
:type n: int
:rtype: int
"""
if n <= 0:
return 0
number = 0
uglyFound = 0
while uglyFound < n:
number += 1
if self.isUgly(number):
uglyFound += 1
return number
# https://www.hrwhisper.me/leetcode-ugly-number-i-ii/
# 第一个ugly number 是1 我们讨论n大于1的情况
# 因为它只能被2,3,5整除,所以我们从1开始扩展,每次要么乘2,要么乘3,要么乘5.
# 对于1来说,我们分别乘以2,3,5得到[2,3,5],显然2是最小的。
# 于是第2个ugly number是2。
# 接着第3个呢?显然是 3 . 从 1 * 3 得到
# 第4个就不一样了,它是从2*2得到。
# 这有什么规律呢?规律就是,每个因子分别乘以当前得到的ugly number(初始为1),
# 当某因子x算出来的不大于其他两个因子,说明新的ugly number是当前因子算出来的,
# 下一轮,该因子应该乘以之前ugly number的下一个。
# 换句话说,每个因子分别乘以对应的ugly number[i]后,
# 如果得到了新的ugly number 就说明下一次应该乘以下一个(ugly number[i+1])。这样能保证乘出来的小而且不会漏掉。
def nthUglyNumber(self, n):
ugly = [1] * n # ugly[0] = 1; first ugly is 1.
i2 = i3 = i5 = 0 # index for candiate multiply by 2,3,5 separately
for i in range(1, n):
# find min among all candidates
ugly[i] = min(ugly[i2] * 2, ugly[i3] * 3, ugly[i5] * 5)
# if processed by any factor, increment it.
# note do not use elif: need increment all min.
if ugly[i] == ugly[i2] * 2: i2 += 1
if ugly[i] == ugly[i3] * 3: i3 += 1
if ugly[i] == ugly[i5] * 5: i5 += 1
return ugly[n-1]
# https://www.youtube.com/watch?v=ZG86C_U-vRg
def nthUglyNumber(self, n):
ugly = [1] # first ugly number is 1
i2 = 0
i3 = 0
i5 = 0
# calculate rest n-1 ugly numbers
for _ in range(1, n):
next2 = ugly[i2] * 2
next3 = ugly[i3] * 3
next5 = ugly[i5] * 5
next = min(next2, next3, next5)
ugly.append(next)
if next == next2:
i2 += 1
if next == next3:
i3 += 1
if next == next5:
i5 += 1
return ugly[-1]
# 打表法
# precompute all ugly numbers
class Solution(object):
ugly = [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384, 400, 405, 432, 450, 480, 486, 500, 512, 540, 576, 600, 625, 640, 648, 675, 720, 729, 750, 768, 800, 810, 864, 900, 960, 972, 1000, 1024, 1080, 1125, 1152, 1200, 1215, 1250, 1280, 1296, 1350, 1440, 1458, 1500, 1536, 1600, 1620, 1728, 1800, 1875, 1920, 1944, 2000, 2025, 2048, 2160, 2187, 2250, 2304, 2400, 2430, 2500, 2560, 2592, 2700, 2880, 2916, 3000, 3072, 3125, 3200, 3240, 3375, 3456, 3600, 3645, 3750, 3840, 3888, 4000, 4050, 4096, 4320, 4374, 4500, 4608, 4800, 4860, 5000, 5120, 5184, 5400, 5625, 5760, 5832, 6000, 6075, 6144, 6250, 6400, 6480, 6561, 6750, 6912, 7200, 7290, 7500, 7680, 7776, 8000, 8100, 8192, 8640, 8748, 9000, 9216, 9375, 9600, 9720, 10000, 10125, 10240, 10368, 10800, 10935, 11250, 11520, 11664, 12000, 12150, 12288, 12500, 12800, 12960, 13122, 13500, 13824, 14400, 14580, 15000, 15360, 15552, 15625, 16000, 16200, 16384, 16875, 17280, 17496, 18000, 18225, 18432, 18750, 19200, 19440, 19683, 20000, 20250, 20480, 20736, 21600, 21870, 22500, 23040, 23328, 24000, 24300, 24576, 25000, 25600, 25920, 26244, 27000, 27648, 28125, 28800, 29160, 30000, 30375, 30720, 31104, 31250, 32000, 32400, 32768, 32805, 33750, 34560, 34992, 36000, 36450, 36864, 37500, 38400, 38880, 39366, 40000, 40500, 40960, 41472, 43200, 43740, 45000, 46080, 46656, 46875, 48000, 48600, 49152, 50000, 50625, 51200, 51840, 52488, 54000, 54675, 55296, 56250, 57600, 58320, 59049, 60000, 60750, 61440, 62208, 62500, 64000, 64800, 65536, 65610, 67500, 69120, 69984, 72000, 72900, 73728, 75000, 76800, 77760, 78125, 78732, 80000, 81000, 81920, 82944, 84375, 86400, 87480, 90000, 91125, 92160, 93312, 93750, 96000, 97200, 98304, 98415, 100000, 101250, 102400, 103680, 104976, 108000, 109350, 110592, 112500, 115200, 116640, 118098, 120000, 121500, 122880, 124416, 125000, 128000, 129600, 131072, 131220, 135000, 138240, 139968, 140625, 144000, 145800, 147456, 150000, 151875, 153600, 155520, 156250, 157464, 160000, 162000, 163840, 164025, 165888, 168750, 172800, 174960, 177147, 180000, 182250, 184320, 186624, 187500, 192000, 194400, 196608, 196830, 200000, 202500, 204800, 207360, 209952, 216000, 218700, 221184, 225000, 230400, 233280, 234375, 236196, 240000, 243000, 245760, 248832, 250000, 253125, 256000, 259200, 262144, 262440, 270000, 273375, 276480, 279936, 281250, 288000, 291600, 294912, 295245, 300000, 303750, 307200, 311040, 312500, 314928, 320000, 324000, 327680, 328050, 331776, 337500, 345600, 349920, 354294, 360000, 364500, 368640, 373248, 375000, 384000, 388800, 390625, 393216, 393660, 400000, 405000, 409600, 414720, 419904, 421875, 432000, 437400, 442368, 450000, 455625, 460800, 466560, 468750, 472392, 480000, 486000, 491520, 492075, 497664, 500000, 506250, 512000, 518400, 524288, 524880, 531441, 540000, 546750, 552960, 559872, 562500, 576000, 583200, 589824, 590490, 600000, 607500, 614400, 622080, 625000, 629856, 640000, 648000, 655360, 656100, 663552, 675000, 691200, 699840, 703125, 708588, 720000, 729000, 737280, 746496, 750000, 759375, 768000, 777600, 781250, 786432, 787320, 800000, 810000, 819200, 820125, 829440, 839808, 843750, 864000, 874800, 884736, 885735, 900000, 911250, 921600, 933120, 937500, 944784, 960000, 972000, 983040, 984150, 995328, 1000000, 1012500, 1024000, 1036800, 1048576, 1049760, 1062882, 1080000, 1093500, 1105920, 1119744, 1125000, 1152000, 1166400, 1171875, 1179648, 1180980, 1200000, 1215000, 1228800, 1244160, 1250000, 1259712, 1265625, 1280000, 1296000, 1310720, 1312200, 1327104, 1350000, 1366875, 1382400, 1399680, 1406250, 1417176, 1440000, 1458000, 1474560, 1476225, 1492992, 1500000, 1518750, 1536000, 1555200, 1562500, 1572864, 1574640, 1594323, 1600000, 1620000, 1638400, 1640250, 1658880, 1679616, 1687500, 1728000, 1749600, 1769472, 1771470, 1800000, 1822500, 1843200, 1866240, 1875000, 1889568, 1920000, 1944000, 1953125, 1966080, 1968300, 1990656, 2000000, 2025000, 2048000, 2073600, 2097152, 2099520, 2109375, 2125764, 2160000, 2187000, 2211840, 2239488, 2250000, 2278125, 2304000, 2332800, 2343750, 2359296, 2361960, 2400000, 2430000, 2457600, 2460375, 2488320, 2500000, 2519424, 2531250, 2560000, 2592000, 2621440, 2624400, 2654208, 2657205, 2700000, 2733750, 2764800, 2799360, 2812500, 2834352, 2880000, 2916000, 2949120, 2952450, 2985984, 3000000, 3037500, 3072000, 3110400, 3125000, 3145728, 3149280, 3188646, 3200000, 3240000, 3276800, 3280500, 3317760, 3359232, 3375000, 3456000, 3499200, 3515625, 3538944, 3542940, 3600000, 3645000, 3686400, 3732480, 3750000, 3779136, 3796875, 3840000, 3888000, 3906250, 3932160, 3936600, 3981312, 4000000, 4050000, 4096000, 4100625, 4147200, 4194304, 4199040, 4218750, 4251528, 4320000, 4374000, 4423680, 4428675, 4478976, 4500000, 4556250, 4608000, 4665600, 4687500, 4718592, 4723920, 4782969, 4800000, 4860000, 4915200, 4920750, 4976640, 5000000, 5038848, 5062500, 5120000, 5184000, 5242880, 5248800, 5308416, 5314410, 5400000, 5467500, 5529600, 5598720, 5625000, 5668704, 5760000, 5832000, 5859375, 5898240, 5904900, 5971968, 6000000, 6075000, 6144000, 6220800, 6250000, 6291456, 6298560, 6328125, 6377292, 6400000, 6480000, 6553600, 6561000, 6635520, 6718464, 6750000, 6834375, 6912000, 6998400, 7031250, 7077888, 7085880, 7200000, 7290000, 7372800, 7381125, 7464960, 7500000, 7558272, 7593750, 7680000, 7776000, 7812500, 7864320, 7873200, 7962624, 7971615, 8000000, 8100000, 8192000, 8201250, 8294400, 8388608, 8398080, 8437500, 8503056, 8640000, 8748000, 8847360, 8857350, 8957952, 9000000, 9112500, 9216000, 9331200, 9375000, 9437184, 9447840, 9565938, 9600000, 9720000, 9765625, 9830400, 9841500, 9953280, 10000000, 10077696, 10125000, 10240000, 10368000, 10485760, 10497600, 10546875, 10616832, 10628820, 10800000, 10935000, 11059200, 11197440, 11250000, 11337408, 11390625, 11520000, 11664000, 11718750, 11796480, 11809800, 11943936, 12000000, 12150000, 12288000, 12301875, 12441600, 12500000, 12582912, 12597120, 12656250, 12754584, 12800000, 12960000, 13107200, 13122000, 13271040, 13286025, 13436928, 13500000, 13668750, 13824000, 13996800, 14062500, 14155776, 14171760, 14348907, 14400000, 14580000, 14745600, 14762250, 14929920, 15000000, 15116544, 15187500, 15360000, 15552000, 15625000, 15728640, 15746400, 15925248, 15943230, 16000000, 16200000, 16384000, 16402500, 16588800, 16777216, 16796160, 16875000, 17006112, 17280000, 17496000, 17578125, 17694720, 17714700, 17915904, 18000000, 18225000, 18432000, 18662400, 18750000, 18874368, 18895680, 18984375, 19131876, 19200000, 19440000, 19531250, 19660800, 19683000, 19906560, 20000000, 20155392, 20250000, 20480000, 20503125, 20736000, 20971520, 20995200, 21093750, 21233664, 21257640, 21600000, 21870000, 22118400, 22143375, 22394880, 22500000, 22674816, 22781250, 23040000, 23328000, 23437500, 23592960, 23619600, 23887872, 23914845, 24000000, 24300000, 24576000, 24603750, 24883200, 25000000, 25165824, 25194240, 25312500, 25509168, 25600000, 25920000, 26214400, 26244000, 26542080, 26572050, 26873856, 27000000, 27337500, 27648000, 27993600, 28125000, 28311552, 28343520, 28697814, 28800000, 29160000, 29296875, 29491200, 29524500, 29859840, 30000000, 30233088, 30375000, 30720000, 31104000, 31250000, 31457280, 31492800, 31640625, 31850496, 31886460, 32000000, 32400000, 32768000, 32805000, 33177600, 33554432, 33592320, 33750000, 34012224, 34171875, 34560000, 34992000, 35156250, 35389440, 35429400, 35831808, 36000000, 36450000, 36864000, 36905625, 37324800, 37500000, 37748736, 37791360, 37968750, 38263752, 38400000, 38880000, 39062500, 39321600, 39366000, 39813120, 39858075, 40000000, 40310784, 40500000, 40960000, 41006250, 41472000, 41943040, 41990400, 42187500, 42467328, 42515280, 43046721, 43200000, 43740000, 44236800, 44286750, 44789760, 45000000, 45349632, 45562500, 46080000, 46656000, 46875000, 47185920, 47239200, 47775744, 47829690, 48000000, 48600000, 48828125, 49152000, 49207500, 49766400, 50000000, 50331648, 50388480, 50625000, 51018336, 51200000, 51840000, 52428800, 52488000, 52734375, 53084160, 53144100, 53747712, 54000000, 54675000, 55296000, 55987200, 56250000, 56623104, 56687040, 56953125, 57395628, 57600000, 58320000, 58593750, 58982400, 59049000, 59719680, 60000000, 60466176, 60750000, 61440000, 61509375, 62208000, 62500000, 62914560, 62985600, 63281250, 63700992, 63772920, 64000000, 64800000, 65536000, 65610000, 66355200, 66430125, 67108864, 67184640, 67500000, 68024448, 68343750, 69120000, 69984000, 70312500, 70778880, 70858800, 71663616, 71744535, 72000000, 72900000, 73728000, 73811250, 74649600, 75000000, 75497472, 75582720, 75937500, 76527504, 76800000, 77760000, 78125000, 78643200, 78732000, 79626240, 79716150, 80000000, 80621568, 81000000, 81920000, 82012500, 82944000, 83886080, 83980800, 84375000, 84934656, 85030560, 86093442, 86400000, 87480000, 87890625, 88473600, 88573500, 89579520, 90000000, 90699264, 91125000, 92160000, 93312000, 93750000, 94371840, 94478400, 94921875, 95551488, 95659380, 96000000, 97200000, 97656250, 98304000, 98415000, 99532800, 100000000, 100663296, 100776960, 101250000, 102036672, 102400000, 102515625, 103680000, 104857600, 104976000, 105468750, 106168320, 106288200, 107495424, 108000000, 109350000, 110592000, 110716875, 111974400, 112500000, 113246208, 113374080, 113906250, 114791256, 115200000, 116640000, 117187500, 117964800, 118098000, 119439360, 119574225, 120000000, 120932352, 121500000, 122880000, 123018750, 124416000, 125000000, 125829120, 125971200, 126562500, 127401984, 127545840, 128000000, 129140163, 129600000, 131072000, 131220000, 132710400, 132860250, 134217728, 134369280, 135000000, 136048896, 136687500, 138240000, 139968000, 140625000, 141557760, 141717600, 143327232, 143489070, 144000000, 145800000, 146484375, 147456000, 147622500, 149299200, 150000000, 150994944, 151165440, 151875000, 153055008, 153600000, 155520000, 156250000, 157286400, 157464000, 158203125, 159252480, 159432300, 160000000, 161243136, 162000000, 163840000, 164025000, 165888000, 167772160, 167961600, 168750000, 169869312, 170061120, 170859375, 172186884, 172800000, 174960000, 175781250, 176947200, 177147000, 179159040, 180000000, 181398528, 182250000, 184320000, 184528125, 186624000, 187500000, 188743680, 188956800, 189843750, 191102976, 191318760, 192000000, 194400000, 195312500, 196608000, 196830000, 199065600, 199290375, 200000000, 201326592, 201553920, 202500000, 204073344, 204800000, 205031250, 207360000, 209715200, 209952000, 210937500, 212336640, 212576400, 214990848, 215233605, 216000000, 218700000, 221184000, 221433750, 223948800, 225000000, 226492416, 226748160, 227812500, 229582512, 230400000, 233280000, 234375000, 235929600, 236196000, 238878720, 239148450, 240000000, 241864704, 243000000, 244140625, 245760000, 246037500, 248832000, 250000000, 251658240, 251942400, 253125000, 254803968, 255091680, 256000000, 258280326, 259200000, 262144000, 262440000, 263671875, 265420800, 265720500, 268435456, 268738560, 270000000, 272097792, 273375000, 276480000, 279936000, 281250000, 283115520, 283435200, 284765625, 286654464, 286978140, 288000000, 291600000, 292968750, 294912000, 295245000, 298598400, 300000000, 301989888, 302330880, 303750000, 306110016, 307200000, 307546875, 311040000, 312500000, 314572800, 314928000, 316406250, 318504960, 318864600, 320000000, 322486272, 324000000, 327680000, 328050000, 331776000, 332150625, 335544320, 335923200, 337500000, 339738624, 340122240, 341718750, 344373768, 345600000, 349920000, 351562500, 353894400, 354294000, 358318080, 358722675, 360000000, 362797056, 364500000, 368640000, 369056250, 373248000, 375000000, 377487360, 377913600, 379687500, 382205952, 382637520, 384000000, 387420489, 388800000, 390625000, 393216000, 393660000, 398131200, 398580750, 400000000, 402653184, 403107840, 405000000, 408146688, 409600000, 410062500, 414720000, 419430400, 419904000, 421875000, 424673280, 425152800, 429981696, 430467210, 432000000, 437400000, 439453125, 442368000, 442867500, 447897600, 450000000, 452984832, 453496320, 455625000, 459165024, 460800000, 466560000, 468750000, 471859200, 472392000, 474609375, 477757440, 478296900, 480000000, 483729408, 486000000, 488281250, 491520000, 492075000, 497664000, 500000000, 503316480, 503884800, 506250000, 509607936, 510183360, 512000000, 512578125, 516560652, 518400000, 524288000, 524880000, 527343750, 530841600, 531441000, 536870912, 537477120, 540000000, 544195584, 546750000, 552960000, 553584375, 559872000, 562500000, 566231040, 566870400, 569531250, 573308928, 573956280, 576000000, 583200000, 585937500, 589824000, 590490000, 597196800, 597871125, 600000000, 603979776, 604661760, 607500000, 612220032, 614400000, 615093750, 622080000, 625000000, 629145600, 629856000, 632812500, 637009920, 637729200, 640000000, 644972544, 645700815, 648000000, 655360000, 656100000, 663552000, 664301250, 671088640, 671846400, 675000000, 679477248, 680244480, 683437500, 688747536, 691200000, 699840000, 703125000, 707788800, 708588000, 716636160, 717445350, 720000000, 725594112, 729000000, 732421875, 737280000, 738112500, 746496000, 750000000, 754974720, 755827200, 759375000, 764411904, 765275040, 768000000, 774840978, 777600000, 781250000, 786432000, 787320000, 791015625, 796262400, 797161500, 800000000, 805306368, 806215680, 810000000, 816293376, 819200000, 820125000, 829440000, 838860800, 839808000, 843750000, 849346560, 850305600, 854296875, 859963392, 860934420, 864000000, 874800000, 878906250, 884736000, 885735000, 895795200, 900000000, 905969664, 906992640, 911250000, 918330048, 921600000, 922640625, 933120000, 937500000, 943718400, 944784000, 949218750, 955514880, 956593800, 960000000, 967458816, 972000000, 976562500, 983040000, 984150000, 995328000, 996451875, 1000000000, 1006632960, 1007769600, 1012500000, 1019215872, 1020366720, 1024000000, 1025156250, 1033121304, 1036800000, 1048576000, 1049760000, 1054687500, 1061683200, 1062882000, 1073741824, 1074954240, 1076168025, 1080000000, 1088391168, 1093500000, 1105920000, 1107168750, 1119744000, 1125000000, 1132462080, 1133740800, 1139062500, 1146617856, 1147912560, 1152000000, 1162261467, 1166400000, 1171875000, 1179648000, 1180980000, 1194393600, 1195742250, 1200000000, 1207959552, 1209323520, 1215000000, 1220703125, 1224440064, 1228800000, 1230187500, 1244160000, 1250000000, 1258291200, 1259712000, 1265625000, 1274019840, 1275458400, 1280000000, 1289945088, 1291401630, 1296000000, 1310720000, 1312200000, 1318359375, 1327104000, 1328602500, 1342177280, 1343692800, 1350000000, 1358954496, 1360488960, 1366875000, 1377495072, 1382400000, 1399680000, 1406250000, 1415577600, 1417176000, 1423828125, 1433272320, 1434890700, 1440000000, 1451188224, 1458000000, 1464843750, 1474560000, 1476225000, 1492992000, 1500000000, 1509949440, 1511654400, 1518750000, 1528823808, 1530550080, 1536000000, 1537734375, 1549681956, 1555200000, 1562500000, 1572864000, 1574640000, 1582031250, 1592524800, 1594323000, 1600000000, 1610612736, 1612431360, 1620000000, 1632586752, 1638400000, 1640250000, 1658880000, 1660753125, 1677721600, 1679616000, 1687500000, 1698693120, 1700611200, 1708593750, 1719926784, 1721868840, 1728000000, 1749600000, 1757812500, 1769472000, 1771470000, 1791590400, 1793613375, 1800000000, 1811939328, 1813985280, 1822500000, 1836660096, 1843200000, 1845281250, 1866240000, 1875000000, 1887436800, 1889568000, 1898437500, 1911029760, 1913187600, 1920000000, 1934917632, 1937102445, 1944000000, 1953125000, 1966080000, 1968300000, 1990656000, 1992903750, 2000000000, 2013265920, 2015539200, 2025000000, 2038431744, 2040733440, 2048000000, 2050312500, 2066242608, 2073600000, 2097152000, 2099520000, 2109375000, 2123366400]
def nthUglyNumber(self, n):
"""
:type n: int
:rtype: int
"""
return self.ugly[n-1]
if __name__ == "__main__":
#print (Solution().nthUglyNumber(10))
#print (Solution().nthUglyNumber(1500))
print (Solution().nthUglyNumber(1690))
| 162.577586
| 15,773
| 0.74198
| 2,090
| 18,859
| 6.690431
| 0.877512
| 0.004291
| 0.005721
| 0.006007
| 0.010727
| 0.009011
| 0.005292
| 0.005292
| 0.005292
| 0
| 0
| 0.78048
| 0.149743
| 18,859
| 115
| 15,774
| 163.991304
| 0.09155
| 0.065963
| 0
| 0.111111
| 0
| 0
| 0.000457
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.092593
| false
| 0
| 0
| 0
| 0.277778
| 0.018519
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
73a657e874819eb1f55d87b508eba3c94d916b59
| 144
|
py
|
Python
|
src/lib/__init__.py
|
gfjiangly/RCNet
|
ef6860f23943eb8e21fdec565019f2f8eda17673
|
[
"MIT"
] | null | null | null |
src/lib/__init__.py
|
gfjiangly/RCNet
|
ef6860f23943eb8e21fdec565019f2f8eda17673
|
[
"MIT"
] | null | null | null |
src/lib/__init__.py
|
gfjiangly/RCNet
|
ef6860f23943eb8e21fdec565019f2f8eda17673
|
[
"MIT"
] | null | null | null |
# -*- encoding:utf-8 -*-
# @Time : 2019/10/23 15:45
# @Author : gfjiang
# @Site :
# @File : __init__.py
# @Software: PyCharm
| 18
| 30
| 0.513889
| 17
| 144
| 4.117647
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127451
| 0.291667
| 144
| 7
| 31
| 20.571429
| 0.558824
| 0.854167
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
73db434f1dcc511c2a6170ca3b1d4a1d255f07e3
| 87
|
py
|
Python
|
src/cms/models/offers/__init__.py
|
mckinly/cms-django
|
c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca
|
[
"Apache-2.0"
] | 14
|
2020-12-03T07:56:30.000Z
|
2021-10-30T13:09:50.000Z
|
src/cms/models/offers/__init__.py
|
Integreat/integreat-cms
|
b3f80964a6182d714f26ac229342b47e1c7c4f29
|
[
"Apache-2.0"
] | 367
|
2020-11-20T00:34:20.000Z
|
2021-12-14T15:20:42.000Z
|
src/cms/models/offers/__init__.py
|
mckinly/cms-django
|
c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca
|
[
"Apache-2.0"
] | 3
|
2021-02-09T18:46:52.000Z
|
2021-12-07T10:41:39.000Z
|
"""
This package contains :class:`~cms.models.offers.offer_template.OfferTemplate`
"""
| 21.75
| 78
| 0.758621
| 10
| 87
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 87
| 3
| 79
| 29
| 0.802469
| 0.896552
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
73febbee1eb35f8161409705d1117c1808557690
| 3,683
|
py
|
Python
|
API/models/models.py
|
Rkanehisa/Stone_Projeto
|
b022cc7031ba2c3b29181df2720197ca9edc1ab3
|
[
"MIT"
] | null | null | null |
API/models/models.py
|
Rkanehisa/Stone_Projeto
|
b022cc7031ba2c3b29181df2720197ca9edc1ab3
|
[
"MIT"
] | null | null | null |
API/models/models.py
|
Rkanehisa/Stone_Projeto
|
b022cc7031ba2c3b29181df2720197ca9edc1ab3
|
[
"MIT"
] | null | null | null |
from API.db import db
from datetime import datetime
from passlib.apps import custom_app_context as pwd_context
class User(db.Model):
__tablename__ = "users"
def __init__(self, username, password):
self.username = username
self.password = pwd_context.hash(password)
self.limit = 0
self.user_limit = 0
def verify_password(self, password):
return pwd_context.verify(password, self.password)
def json(self):
return {"id": self.id, "username": self.username, "password": str(self.password), "limit": self.limit,
"user limit": self.user_limit, "spent_limit": self.get_spent()}
def save_in_db(self):
db.session.add(self)
db.session.commit()
@classmethod
def get_by_id(cls, user_id):
return cls.query.filter_by(id=user_id).first()
@classmethod
def get_by_username(cls, username):
return cls.query.filter_by(username=username).first()
def get_limit(self):
return self.limit
def get_user_limit(self):
return self.user_limit
def set_limit(self, limit):
self.limit = limit
def set_user_limit(self, limit):
self.user_limit = limit
def get_cards(self):
return self.cards
def delete(self):
db.session.delete(self)
db.session.commit()
def get_cards(self):
return self.cards.order_by(Card.spent_limit).all()
def get_spent(self):
return sum(x.spent_limit for x in self.cards.all())
class Card(db.Model):
__tablename__ = "card"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.String(255), nullable=False)
number = db.Column(db.String(16), nullable=False)
ccv = db.Column(db.String(3), nullable=False)
due_date = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
expiration_date = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
limit = db.Column(db.Float, nullable=False)
spent_limit = db.Column(db.Float, nullable=False)
user_id = db.Column(db.Integer, db.ForeignKey("users.id"), nullable=False)
user = db.relationship("User", back_populates="cards")
def __init__(self, username, name, number, ccv, due_date, expiration_date, limit):
# Parse strings to convert to to datetime
datetime_due_date = datetime.strptime(due_date, "%Y/%m/%d")
datetime_expiration_date = datetime.strptime(expiration_date, "%Y/%m/%d")
self.user_id = User.query.filter_by(username=username).first().id
self.name = name
self. number = number
self.ccv = ccv
self.due_date = datetime_due_date
self.expiration_date = datetime_expiration_date
self.limit = limit
self.spent_limit = 0
def json(self):
return {"id": self.id, "name": self.name, "number": self.number, "ccv": self.ccv,
"due_date": str(self.due_date), "expiration_date": str(self.expiration_date), "limit": self.limit,
"spent limit": self.spent_limit, "user_id": self.user_id}
def save_in_db(self):
db.session.add(self)
db.session.commit()
@classmethod
def get_by_number(cls, number):
return cls.query.filter_by(number=number).first()
def get_limit(self):
return self.limit
def get_spent_limit(self):
return self.spent_limit
def set_spent_limit(self, spent_limit):
self.spent_limit = spent_limit
def delete(self):
user = User.query.filter_by(id=self.user_id).first()
user.set_limit(user.limit-self.limit)
db.session.delete(self)
db.session.commit()
| 31.211864
| 114
| 0.65653
| 505
| 3,683
| 4.59604
| 0.168317
| 0.06592
| 0.038776
| 0.032745
| 0.337785
| 0.271866
| 0.244722
| 0.139595
| 0.139595
| 0.139595
| 0
| 0.003145
| 0.222916
| 3,683
| 117
| 115
| 31.478632
| 0.807827
| 0.010589
| 0
| 0.294118
| 0
| 0
| 0.040362
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.258824
| false
| 0.070588
| 0.035294
| 0.152941
| 0.611765
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
fb64c2c423679d3b9a605145467c5cb4184c77b4
| 443
|
py
|
Python
|
stackflowCrawl/spiders/stackoverflow/constants/consult.py
|
matheuslins/stackflowCrawl
|
b6adacc29bfc2e6210a24968f691a54854952b2e
|
[
"MIT"
] | null | null | null |
stackflowCrawl/spiders/stackoverflow/constants/consult.py
|
matheuslins/stackflowCrawl
|
b6adacc29bfc2e6210a24968f691a54854952b2e
|
[
"MIT"
] | 2
|
2021-03-31T19:47:59.000Z
|
2021-12-13T20:41:06.000Z
|
stackflowCrawl/spiders/stackoverflow/constants/consult.py
|
matheuslins/stackflowCrawl
|
b6adacc29bfc2e6210a24968f691a54854952b2e
|
[
"MIT"
] | null | null | null |
XPAHS_CONSULT = {
'jobs_urls': '//div[contains(@class, "listResults")]//div[contains(@data-jobid, "")]//h2//a/@href',
'results': '//span[@class="description fc-light fs-body1"]//text()',
'pagination_indicator': '//a[contains(@class, "s-pagination--item")][last()]//span[contains(text(), "next")]',
'pagination_url': '//a[contains(@class, "s-pagination--item")][last()]/@href',
}
START_URL = 'https://stackoverflow.com/jobs/'
| 44.3
| 114
| 0.629797
| 53
| 443
| 5.169811
| 0.603774
| 0.142336
| 0.10219
| 0.109489
| 0.240876
| 0.240876
| 0.240876
| 0
| 0
| 0
| 0
| 0.004963
| 0.090293
| 443
| 9
| 115
| 49.222222
| 0.674938
| 0
| 0
| 0
| 0
| 0.285714
| 0.809955
| 0.404977
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fb71ff02d4840f857aab0f05feb1b65683b1dfad
| 88
|
py
|
Python
|
software_engineering-project/project/admin.py
|
mahdiieh/software_engineering_PROJECT
|
f0c40ccf0452f6da83fbb253050848b49c4f6153
|
[
"MIT"
] | null | null | null |
software_engineering-project/project/admin.py
|
mahdiieh/software_engineering_PROJECT
|
f0c40ccf0452f6da83fbb253050848b49c4f6153
|
[
"MIT"
] | null | null | null |
software_engineering-project/project/admin.py
|
mahdiieh/software_engineering_PROJECT
|
f0c40ccf0452f6da83fbb253050848b49c4f6153
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Movie
admin.site.register(Movie)
| 14.666667
| 32
| 0.806818
| 13
| 88
| 5.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 88
| 5
| 33
| 17.6
| 0.922078
| 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
| 0
| 0
|
0
| 4
|
fb886601d83ea5836e86da12edc2cb8f001f8166
| 382
|
py
|
Python
|
radiomicsfeatureextractionpipeline/backend/src/logic/entities/ct_series.py
|
Maastro-CDS-Imaging-Group/SQLite4Radiomics
|
e3a7afc181eec0fe04c18da00edc3772064e6758
|
[
"Apache-2.0"
] | null | null | null |
radiomicsfeatureextractionpipeline/backend/src/logic/entities/ct_series.py
|
Maastro-CDS-Imaging-Group/SQLite4Radiomics
|
e3a7afc181eec0fe04c18da00edc3772064e6758
|
[
"Apache-2.0"
] | 6
|
2021-06-09T19:39:27.000Z
|
2021-09-30T16:41:40.000Z
|
radiomicsfeatureextractionpipeline/backend/src/logic/entities/ct_series.py
|
Maastro-CDS-Imaging-Group/SQLite4Radiomics
|
e3a7afc181eec0fe04c18da00edc3772064e6758
|
[
"Apache-2.0"
] | null | null | null |
"""
This module is used to represent a CTSeries object from the DICOMSeries table in the database.
Inherits SeriesWithImageSlices module.
"""
from logic.entities.series_with_image_slices import SeriesWithImageSlices
class CtSeries(SeriesWithImageSlices):
"""
This class stores all information about a CT-series from the DICOMSeries table in the database.
"""
pass
| 29.384615
| 99
| 0.780105
| 48
| 382
| 6.145833
| 0.645833
| 0.047458
| 0.122034
| 0.155932
| 0.244068
| 0.244068
| 0.244068
| 0
| 0
| 0
| 0
| 0
| 0.164921
| 382
| 12
| 100
| 31.833333
| 0.924765
| 0.599476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
fbac3a021640dbdfd78f68fea5a2c6021008a044
| 88
|
py
|
Python
|
Source/RainyDay_utilities_Py3/__init__.py
|
Dewberry/RainyDay2
|
ed3206b1d81ca4ffded4ed79bf156e4b8d87d143
|
[
"MIT"
] | 12
|
2019-03-24T02:59:51.000Z
|
2021-11-05T07:45:08.000Z
|
Source/RainyDay_utilities_Py3/__init__.py
|
Dewberry/RainyDay2
|
ed3206b1d81ca4ffded4ed79bf156e4b8d87d143
|
[
"MIT"
] | null | null | null |
Source/RainyDay_utilities_Py3/__init__.py
|
Dewberry/RainyDay2
|
ed3206b1d81ca4ffded4ed79bf156e4b8d87d143
|
[
"MIT"
] | 13
|
2017-08-10T17:18:16.000Z
|
2022-02-10T00:08:47.000Z
|
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 6 17:38:00 2015
@author: dbwrigh3
"""
| 11
| 35
| 0.568182
| 14
| 88
| 3.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188406
| 0.215909
| 88
| 7
| 36
| 12.571429
| 0.536232
| 0.875
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fbc4f59dc823de1070c620320ec7ff2dee6fbd35
| 135
|
py
|
Python
|
du/ps_utils.py
|
diogo149/doo
|
d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f
|
[
"MIT"
] | 1
|
2016-11-17T06:34:39.000Z
|
2016-11-17T06:34:39.000Z
|
du/ps_utils.py
|
diogo149/doo
|
d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f
|
[
"MIT"
] | null | null | null |
du/ps_utils.py
|
diogo149/doo
|
d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f
|
[
"MIT"
] | null | null | null |
import os
import psutil
import time
def process_time():
p = psutil.Process(os.getpid())
return time.time() - p.create_time()
| 15
| 40
| 0.688889
| 20
| 135
| 4.55
| 0.5
| 0.10989
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185185
| 135
| 8
| 41
| 16.875
| 0.827273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
837ecef31551741e285f87a84d5925f220afb694
| 2,045
|
py
|
Python
|
jmetal/core/operator.py
|
LuckysonKhaidem/ProjectAlpha
|
e4b4779a8968a83f1e8add3490a4d2c4ad145d55
|
[
"MIT"
] | 1
|
2020-05-26T18:57:31.000Z
|
2020-05-26T18:57:31.000Z
|
jmetal/core/operator.py
|
LuckysonKhaidem/ProjectAlpha
|
e4b4779a8968a83f1e8add3490a4d2c4ad145d55
|
[
"MIT"
] | null | null | null |
jmetal/core/operator.py
|
LuckysonKhaidem/ProjectAlpha
|
e4b4779a8968a83f1e8add3490a4d2c4ad145d55
|
[
"MIT"
] | 2
|
2019-01-08T11:52:52.000Z
|
2020-05-25T13:21:26.000Z
|
from abc import ABCMeta, abstractmethod
from typing import TypeVar, Generic, List
S = TypeVar('S')
R = TypeVar('R')
"""
.. module:: Operator
:platform: Unix, Windows
:synopsis: Templates for operators.
.. moduleauthor:: Antonio J. Nebro <[email protected]>
"""
class Operator(Generic[S, R]):
""" Class representing operator """
__metaclass__ = ABCMeta
@abstractmethod
def execute(self, source: S) -> R:
pass
@abstractmethod
def get_name(self) -> str:
pass
class Mutation(Operator[S, S]):
""" Class representing mutation operator. """
__metaclass__ = ABCMeta
def __init__(self, probability: float):
if probability > 1.0:
raise Exception('The probability is greater than one: {}'.format(probability))
elif probability < 0.0:
raise Exception('The probability is lower than zero: {}'.format(probability))
self.probability = probability
@abstractmethod
def execute(self, source: S) -> R:
pass
@abstractmethod
def get_name(self) -> str:
pass
class Crossover(Operator[List[S], List[R]]):
""" Class representing crossover operator. """
__metaclass__ = ABCMeta
def __init__(self, probability: float):
if probability > 1.0:
raise Exception('The probability is greater than one: {}'.format(probability))
elif probability < 0.0:
raise Exception('The probability is lower than zero: {}'.format(probability))
self.probability = probability
@abstractmethod
def get_number_of_parents(self):
pass
@abstractmethod
def execute(self, source: S) -> R:
pass
@abstractmethod
def get_name(self) -> str:
pass
class Selection(Operator[S, R]):
""" Class representing selection operator. """
__metaclass__ = ABCMeta
def __init__(self):
pass
@abstractmethod
def execute(self, source: S) -> R:
pass
@abstractmethod
def get_name(self) -> str:
pass
| 21.989247
| 90
| 0.627873
| 223
| 2,045
| 5.600897
| 0.273543
| 0.122498
| 0.100881
| 0.089672
| 0.671737
| 0.671737
| 0.646918
| 0.646918
| 0.646918
| 0.646918
| 0
| 0.005295
| 0.261125
| 2,045
| 92
| 91
| 22.228261
| 0.82131
| 0.071394
| 0
| 0.811321
| 0
| 0
| 0.090645
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.226415
| false
| 0.188679
| 0.037736
| 0
| 0.415094
| 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
| 0
| 0
|
0
| 4
|
838c4a8c221ca4daa94ec9e1d608b97fed7bdb05
| 110
|
py
|
Python
|
cmsplugin_markdown/apps.py
|
glomium/cmstemplate
|
6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c
|
[
"BSD-3-Clause"
] | null | null | null |
cmsplugin_markdown/apps.py
|
glomium/cmstemplate
|
6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c
|
[
"BSD-3-Clause"
] | null | null | null |
cmsplugin_markdown/apps.py
|
glomium/cmstemplate
|
6d51a6d97cf5a132e41ea6d2404bdfedf9edf25c
|
[
"BSD-3-Clause"
] | null | null | null |
from django.apps import AppConfig
class CmspluginMarkdownConfig(AppConfig):
name = 'cmsplugin_markdown'
| 18.333333
| 41
| 0.8
| 11
| 110
| 7.909091
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 110
| 5
| 42
| 22
| 0.915789
| 0
| 0
| 0
| 0
| 0
| 0.163636
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
83b36d8e12e62551ee0f6bc0e1772654ff4d0f33
| 232
|
py
|
Python
|
comment/admin.py
|
Samurai-XHe/myblog
|
c9e182b84c3cb06b3207e7359f0a4d352c28d043
|
[
"MIT"
] | 1
|
2018-09-25T09:11:17.000Z
|
2018-09-25T09:11:17.000Z
|
comment/admin.py
|
Samurai-XHe/myblog
|
c9e182b84c3cb06b3207e7359f0a4d352c28d043
|
[
"MIT"
] | null | null | null |
comment/admin.py
|
Samurai-XHe/myblog
|
c9e182b84c3cb06b3207e7359f0a4d352c28d043
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Comment
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
list_display = ('id', 'content_object', 'text', 'comment_time', 'user', 'root', 'parent', 'reply_to')
| 29
| 105
| 0.728448
| 29
| 232
| 5.689655
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116379
| 232
| 7
| 106
| 33.142857
| 0.804878
| 0
| 0
| 0
| 0
| 0
| 0.232759
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
83c27bbb12a53e327e73c5820df10eeefe5bccca
| 239
|
py
|
Python
|
examples/django/015_deploy_app/project/example/views.py
|
HalfBottleOfMind/website
|
9bc83f11127ebb4f65124f794a7138373c95ab81
|
[
"Apache-2.0"
] | 12
|
2020-09-08T03:33:43.000Z
|
2021-09-03T12:31:38.000Z
|
examples/django/015_deploy_app/project/example/views.py
|
HalfBottleOfMind/website
|
9bc83f11127ebb4f65124f794a7138373c95ab81
|
[
"Apache-2.0"
] | 39
|
2021-01-29T16:11:45.000Z
|
2021-12-08T08:34:27.000Z
|
examples/django/015_deploy_app/project/example/views.py
|
HalfBottleOfMind/website
|
9bc83f11127ebb4f65124f794a7138373c95ab81
|
[
"Apache-2.0"
] | 23
|
2020-09-07T14:42:39.000Z
|
2021-12-07T20:41:29.000Z
|
from rest_framework import viewsets
from .models import Label
from .serizalizers import LabelSerializer
class LabelViewSet(viewsets.ModelViewSet):
queryset = Label.objects.all().order_by('id')
serializer_class = LabelSerializer
| 23.9
| 49
| 0.799163
| 27
| 239
| 6.962963
| 0.703704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129707
| 239
| 9
| 50
| 26.555556
| 0.903846
| 0
| 0
| 0
| 0
| 0
| 0.008368
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
83e465c1f4e10369e60b79f24679537b6a23af68
| 189
|
py
|
Python
|
pyradex/tests/setup_package_data.py
|
SpacialTree/pyradex
|
722f9fdc45ff080cdcb151e37aa7075fab548f68
|
[
"BSD-3-Clause"
] | 12
|
2016-01-26T13:39:56.000Z
|
2021-09-01T07:38:04.000Z
|
pyradex/tests/setup_package_data.py
|
SpacialTree/pyradex
|
722f9fdc45ff080cdcb151e37aa7075fab548f68
|
[
"BSD-3-Clause"
] | 27
|
2015-05-29T16:01:31.000Z
|
2022-01-31T23:41:36.000Z
|
pyradex/tests/setup_package_data.py
|
SpacialTree/pyradex
|
722f9fdc45ff080cdcb151e37aa7075fab548f68
|
[
"BSD-3-Clause"
] | 13
|
2015-01-13T10:40:50.000Z
|
2022-01-25T22:24:46.000Z
|
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
def get_package_data():
paths_test = [os.path.join('data', '*.out')]
return {'pyradex.tests': paths_test}
| 27
| 63
| 0.693122
| 29
| 189
| 4.37931
| 0.827586
| 0.141732
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006329
| 0.164021
| 189
| 6
| 64
| 31.5
| 0.797468
| 0.322751
| 0
| 0
| 0
| 0
| 0.174603
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
83e5b68657474d465d5e1fcc4797976830c9d62f
| 100
|
py
|
Python
|
cfpland_bot/exceptions/__init__.py
|
jonatasbaldin/cfpland-telegram-bot
|
fdd846240705ff6ce7705413336f6d7169a2e7fc
|
[
"MIT"
] | 3
|
2019-04-23T14:16:11.000Z
|
2019-04-24T06:21:10.000Z
|
cfpland_bot/exceptions/__init__.py
|
jonatasbaldin/cfpland-telegram-bot
|
fdd846240705ff6ce7705413336f6d7169a2e7fc
|
[
"MIT"
] | 2
|
2020-07-17T14:53:16.000Z
|
2021-05-09T21:42:43.000Z
|
cfpland_bot/exceptions/__init__.py
|
jonatasbaldin/cfpland-telegram-bot
|
fdd846240705ff6ce7705413336f6d7169a2e7fc
|
[
"MIT"
] | null | null | null |
from .exceptions import ( # noqa: F401
MissingCFPAttributes,
MissingEnvironmentVariable,
)
| 20
| 39
| 0.74
| 7
| 100
| 10.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0.19
| 100
| 4
| 40
| 25
| 0.876543
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
83e959ba13c92777006cc78510ef1401b37ed85b
| 633
|
py
|
Python
|
src/dagos/platform/__init__.py
|
DAG-OS/dagos
|
ac663ecf1cb9abe12669136e2b2e22b936ec88b5
|
[
"MIT"
] | null | null | null |
src/dagos/platform/__init__.py
|
DAG-OS/dagos
|
ac663ecf1cb9abe12669136e2b2e22b936ec88b5
|
[
"MIT"
] | 8
|
2022-02-20T15:43:03.000Z
|
2022-03-27T19:04:16.000Z
|
src/dagos/platform/__init__.py
|
DAG-OS/dagos
|
ac663ecf1cb9abe12669136e2b2e22b936ec88b5
|
[
"MIT"
] | null | null | null |
import dagos.platform.platform_utils as platform_utils
from .command_runner import CommandRunner
from .command_runner import ContainerCommandRunner
from .command_runner import LocalCommandRunner
from .platform_domain import CommandNotAvailableIssue
from .platform_domain import OperatingSystem
from .platform_domain import PlatformIssue
from .platform_domain import PlatformScope
from .platform_domain import UnsupportedOperatingSystemIssue
from .platform_exceptions import UnsupportedOperatingSystemException
from .platform_exceptions import UnsupportedPlatformException
from .platform_support_checker import PlatformSupportChecker
| 48.692308
| 68
| 0.903633
| 64
| 633
| 8.71875
| 0.359375
| 0.172043
| 0.16129
| 0.215054
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075829
| 633
| 12
| 69
| 52.75
| 0.953846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8606af2e767f86b97fc991c40020f2652a4de91b
| 9,424
|
py
|
Python
|
cancat/vstruct/defs/elf.py
|
kimocoder/CanCat
|
e06f45b22db68b67b6fd93d63d826df9b5d1069c
|
[
"BSD-2-Clause"
] | 2
|
2020-06-07T04:05:29.000Z
|
2022-02-09T00:00:49.000Z
|
vstruct/defs/elf.py
|
ConfusedMoonbear/vivisect
|
8d6048037f85f745cd11923c6a8d662c150fe330
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
vstruct/defs/elf.py
|
ConfusedMoonbear/vivisect
|
8d6048037f85f745cd11923c6a8d662c150fe330
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
import vstruct
from vstruct.primitives import *
EI_NIDENT = 4
EI_PADLEN = 7
class Elf32(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.e_ident = v_bytes(EI_NIDENT)
self.e_class = v_uint8()
self.e_data = v_uint8()
self.e_fileversion = v_uint8()
self.e_osabi = v_uint8()
self.e_abiversio = v_uint8()
self.e_pad = v_bytes(EI_PADLEN)
self.e_type = v_uint16(bigend=bigend)
self.e_machine = v_uint16(bigend=bigend)
self.e_version = v_uint32(bigend=bigend)
self.e_entry = v_uint32(bigend=bigend)
self.e_phoff = v_uint32(bigend=bigend)
self.e_shoff = v_uint32(bigend=bigend)
self.e_flags = v_uint32(bigend=bigend)
self.e_ehsize = v_uint16(bigend=bigend)
self.e_phentsize = v_uint16(bigend=bigend)
self.e_phnum = v_uint16(bigend=bigend)
self.e_shentsize = v_uint16(bigend=bigend)
self.e_shnum = v_uint16(bigend=bigend)
self.e_shstrndx = v_uint16(bigend=bigend)
class Elf32Section(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.sh_name = v_uint32(bigend=bigend)
self.sh_type = v_uint32(bigend=bigend)
self.sh_flags = v_uint32(bigend=bigend)
self.sh_addr = v_uint32(bigend=bigend)
self.sh_offset = v_uint32(bigend=bigend)
self.sh_size = v_uint32(bigend=bigend)
self.sh_link = v_uint32(bigend=bigend)
self.sh_info = v_uint32(bigend=bigend)
self.sh_addralign = v_uint32(bigend=bigend)
self.sh_entsize = v_uint32(bigend=bigend)
class Elf32Pheader(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.p_type = v_uint32(bigend=bigend)
self.p_offset = v_uint32(bigend=bigend)
self.p_vaddr = v_uint32(bigend=bigend)
self.p_paddr = v_uint32(bigend=bigend)
self.p_filesz = v_uint32(bigend=bigend)
self.p_memsz = v_uint32(bigend=bigend)
self.p_flags = v_uint32(bigend=bigend)
self.p_align = v_uint32(bigend=bigend)
class Elf32Reloc(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.r_offset = v_ptr32(bigend=bigend)
self.r_info = v_uint32(bigend=bigend)
def __eq__(self, other):
if self.name != other.name:
return False
if self.r_offset != other.r_offset:
return False
if self.r_info != other.r_info:
return False
return True
class Elf32Reloca(Elf32Reloc):
def __init__(self, bigend=False):
Elf32Reloc.__init__(self)
self.r_addend = v_uint32(bigend=bigend)
def __eq__(self, other):
if self.name != other.name:
return False
if self.r_offset != other.r_offset:
return False
if self.r_info != other.r_info:
return False
if self.r_addend != other.r_addend:
return False
return True
class Elf32Symbol(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.st_name = v_uint32(bigend=bigend)
self.st_value = v_uint32(bigend=bigend)
self.st_size = v_uint32(bigend=bigend)
self.st_info = v_uint8()
self.st_other = v_uint8()
self.st_shndx = v_uint16(bigend=bigend)
def __eq__(self, other):
if self.st_value != other.st_value:
return False
if self.st_name != other.st_name:
return False
if self.st_size != other.st_size:
return False
if self.st_info != other.st_info:
return False
if self.st_other != other.st_other:
return False
if self.st_shndx != other.st_shndx:
return False
return True
class Elf32Dynamic(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.d_tag = v_uint32(bigend=bigend)
self.d_value = v_uint32(bigend=bigend)
def __eq__(self, other):
if self.d_tag != other.d_tag:
return False
if self.d_value != other.d_value:
return False
return True
class Elf64(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.e_ident = v_bytes(EI_NIDENT)
self.e_class = v_uint8()
self.e_data = v_uint8()
self.e_fileversion = v_uint8()
self.e_osabi = v_uint8()
self.e_abiversio = v_uint8()
self.e_pad = v_bytes(EI_PADLEN)
self.e_type = v_uint16(bigend=bigend)
self.e_machine = v_uint16(bigend=bigend)
self.e_version = v_uint32(bigend=bigend)
self.e_entry = v_uint64(bigend=bigend)
self.e_phoff = v_uint64(bigend=bigend)
self.e_shoff = v_uint64(bigend=bigend)
self.e_flags = v_uint32(bigend=bigend)
self.e_ehsize = v_uint16(bigend=bigend)
self.e_phentsize = v_uint16(bigend=bigend)
self.e_phnum = v_uint16(bigend=bigend)
self.e_shentsize = v_uint16(bigend=bigend)
self.e_shnum = v_uint16(bigend=bigend)
self.e_shstrndx = v_uint16(bigend=bigend)
class Elf64Section(Elf32Section):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.sh_name = v_uint32(bigend=bigend)
self.sh_type = v_uint32(bigend=bigend)
self.sh_flags = v_uint64(bigend=bigend)
self.sh_addr = v_uint64(bigend=bigend)
self.sh_offset = v_uint64(bigend=bigend)
self.sh_size = v_uint64(bigend=bigend)
self.sh_link = v_uint32(bigend=bigend)
self.sh_info = v_uint32(bigend=bigend)
self.sh_addralign = v_uint64(bigend=bigend)
self.sh_entsize = v_uint64(bigend=bigend)
class Elf64Pheader(Elf32Pheader):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.p_type = v_uint32(bigend=bigend)
self.p_flags = v_uint32(bigend=bigend)
self.p_offset = v_uint64(bigend=bigend)
self.p_vaddr = v_uint64(bigend=bigend)
self.p_paddr = v_uint64(bigend=bigend)
self.p_filesz = v_uint64(bigend=bigend)
self.p_memsz = v_uint64(bigend=bigend)
self.p_align = v_uint64(bigend=bigend)
class Elf64Reloc(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.r_offset = v_ptr64(bigend=bigend)
self.r_info = v_uint64(bigend=bigend)
def __eq__(self, other):
if self.name != other.name:
return False
if self.r_offset != other.r_offset:
return False
if self.r_info != other.r_info:
return False
return True
class Elf64Reloca(Elf64Reloc):
def __init__(self, bigend=False):
#Elf64Reloc.__init__(self)
vstruct.VStruct.__init__(self)
self.r_offset = v_uint64(bigend=bigend)
self.r_info = v_uint64(bigend=bigend)
self.r_addend = v_uint64(bigend=bigend)
def __eq__(self, other):
if self.name != other.name:
return False
if self.r_offset != other.r_offset:
return False
if self.r_info != other.r_info:
return False
if self.r_addend != other.r_addend:
return False
return True
class Elf64Symbol(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.st_name = v_uint32(bigend=bigend)
self.st_info = v_uint8()
self.st_other = v_uint8()
self.st_shndx = v_uint16(bigend=bigend)
self.st_value = v_uint64(bigend=bigend)
self.st_size = v_uint64(bigend=bigend)
def __eq__(self, other):
if self.st_value != other.st_value:
return False
if self.st_name != other.st_name:
return False
if self.st_size != other.st_size:
return False
if self.st_info != other.st_info:
return False
if self.st_other != other.st_other:
return False
if self.st_shndx != other.st_shndx:
return False
return True
class Elf64Dynamic(Elf32Dynamic):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.d_tag = v_uint64(bigend=bigend)
self.d_value = v_uint64(bigend=bigend)
class ElfNote(vstruct.VStruct):
def __init__(self, bigend=False):
vstruct.VStruct.__init__(self)
self.namesz = v_uint32(bigend=bigend)
self.descsz = v_uint32(bigend=bigend)
self.ntype = v_uint32(bigend=bigend)
self.name = v_bytes()
self.desc = vstruct.VArray()
def pcb_namesz(self):
# padded to 4 byte alignment
namesz = ((self.namesz +3) /4) *4
self['name'].vsSetLength( namesz )
def pcb_descsz(self):
# padded to 4 byte alignment
descct = ((self.descsz +3) /4)
elems = [ v_uint32() for i in xrange(descct) ]
self.desc = vstruct.VArray(elems=elems)
| 35.969466
| 54
| 0.612585
| 1,235
| 9,424
| 4.340081
| 0.083401
| 0.190299
| 0.21194
| 0.148881
| 0.892351
| 0.841604
| 0.683582
| 0.683582
| 0.674627
| 0.663246
| 0
| 0.035431
| 0.290216
| 9,424
| 261
| 55
| 36.10728
| 0.765884
| 0.008383
| 0
| 0.662338
| 0
| 0
| 0.000428
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.103896
| false
| 0
| 0.008658
| 0
| 0.329004
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f7b75acf0297c3ab2601bc579ad2b3528994326d
| 28
|
py
|
Python
|
python/testData/keywordCompletion/noMatchInCondition.py
|
06needhamt/intellij-community
|
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
|
[
"Apache-2.0"
] | null | null | null |
python/testData/keywordCompletion/noMatchInCondition.py
|
06needhamt/intellij-community
|
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
|
[
"Apache-2.0"
] | null | null | null |
python/testData/keywordCompletion/noMatchInCondition.py
|
06needhamt/intellij-community
|
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
|
[
"Apache-2.0"
] | null | null | null |
matches = True
if mat<caret>
| 14
| 14
| 0.75
| 5
| 28
| 4.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 28
| 2
| 15
| 14
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f7cdafc3fcc754a52e3ada458ff7a926e8981f1d
| 71,088
|
py
|
Python
|
sdk/python/pulumi_azure_native/compute/v20200930/_inputs.py
|
polivbr/pulumi-azure-native
|
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_native/compute/v20200930/_inputs.py
|
polivbr/pulumi-azure-native
|
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_native/compute/v20200930/_inputs.py
|
polivbr/pulumi-azure-native
|
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
|
[
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ._enums import *
__all__ = [
'CreationDataArgs',
'DataDiskImageEncryptionArgs',
'DisallowedArgs',
'DiskSkuArgs',
'EncryptionImagesArgs',
'EncryptionSetIdentityArgs',
'EncryptionSettingsCollectionArgs',
'EncryptionSettingsElementArgs',
'EncryptionArgs',
'ExtendedLocationArgs',
'GalleryApplicationVersionPublishingProfileArgs',
'GalleryArtifactVersionSourceArgs',
'GalleryDataDiskImageArgs',
'GalleryImageFeatureArgs',
'GalleryImageIdentifierArgs',
'GalleryImageVersionPublishingProfileArgs',
'GalleryImageVersionStorageProfileArgs',
'GalleryOSDiskImageArgs',
'ImageDiskReferenceArgs',
'ImagePurchasePlanArgs',
'KeyForDiskEncryptionSetArgs',
'KeyVaultAndKeyReferenceArgs',
'KeyVaultAndSecretReferenceArgs',
'OSDiskImageEncryptionArgs',
'PrivateLinkServiceConnectionStateArgs',
'PurchasePlanArgs',
'RecommendedMachineConfigurationArgs',
'ResourceRangeArgs',
'SharingProfileArgs',
'SnapshotSkuArgs',
'SourceVaultArgs',
'TargetRegionArgs',
'UserArtifactManageArgs',
'UserArtifactSourceArgs',
]
@pulumi.input_type
class CreationDataArgs:
def __init__(__self__, *,
create_option: pulumi.Input[Union[str, 'DiskCreateOption']],
gallery_image_reference: Optional[pulumi.Input['ImageDiskReferenceArgs']] = None,
image_reference: Optional[pulumi.Input['ImageDiskReferenceArgs']] = None,
logical_sector_size: Optional[pulumi.Input[int]] = None,
source_resource_id: Optional[pulumi.Input[str]] = None,
source_uri: Optional[pulumi.Input[str]] = None,
storage_account_id: Optional[pulumi.Input[str]] = None,
upload_size_bytes: Optional[pulumi.Input[float]] = None):
"""
Data used when creating a disk.
:param pulumi.Input[Union[str, 'DiskCreateOption']] create_option: This enumerates the possible sources of a disk's creation.
:param pulumi.Input['ImageDiskReferenceArgs'] gallery_image_reference: Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
:param pulumi.Input['ImageDiskReferenceArgs'] image_reference: Disk source information.
:param pulumi.Input[int] logical_sector_size: Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
:param pulumi.Input[str] source_resource_id: If createOption is Copy, this is the ARM id of the source snapshot or disk.
:param pulumi.Input[str] source_uri: If createOption is Import, this is the URI of a blob to be imported into a managed disk.
:param pulumi.Input[str] storage_account_id: Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
:param pulumi.Input[float] upload_size_bytes: If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
"""
pulumi.set(__self__, "create_option", create_option)
if gallery_image_reference is not None:
pulumi.set(__self__, "gallery_image_reference", gallery_image_reference)
if image_reference is not None:
pulumi.set(__self__, "image_reference", image_reference)
if logical_sector_size is not None:
pulumi.set(__self__, "logical_sector_size", logical_sector_size)
if source_resource_id is not None:
pulumi.set(__self__, "source_resource_id", source_resource_id)
if source_uri is not None:
pulumi.set(__self__, "source_uri", source_uri)
if storage_account_id is not None:
pulumi.set(__self__, "storage_account_id", storage_account_id)
if upload_size_bytes is not None:
pulumi.set(__self__, "upload_size_bytes", upload_size_bytes)
@property
@pulumi.getter(name="createOption")
def create_option(self) -> pulumi.Input[Union[str, 'DiskCreateOption']]:
"""
This enumerates the possible sources of a disk's creation.
"""
return pulumi.get(self, "create_option")
@create_option.setter
def create_option(self, value: pulumi.Input[Union[str, 'DiskCreateOption']]):
pulumi.set(self, "create_option", value)
@property
@pulumi.getter(name="galleryImageReference")
def gallery_image_reference(self) -> Optional[pulumi.Input['ImageDiskReferenceArgs']]:
"""
Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
"""
return pulumi.get(self, "gallery_image_reference")
@gallery_image_reference.setter
def gallery_image_reference(self, value: Optional[pulumi.Input['ImageDiskReferenceArgs']]):
pulumi.set(self, "gallery_image_reference", value)
@property
@pulumi.getter(name="imageReference")
def image_reference(self) -> Optional[pulumi.Input['ImageDiskReferenceArgs']]:
"""
Disk source information.
"""
return pulumi.get(self, "image_reference")
@image_reference.setter
def image_reference(self, value: Optional[pulumi.Input['ImageDiskReferenceArgs']]):
pulumi.set(self, "image_reference", value)
@property
@pulumi.getter(name="logicalSectorSize")
def logical_sector_size(self) -> Optional[pulumi.Input[int]]:
"""
Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
"""
return pulumi.get(self, "logical_sector_size")
@logical_sector_size.setter
def logical_sector_size(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "logical_sector_size", value)
@property
@pulumi.getter(name="sourceResourceId")
def source_resource_id(self) -> Optional[pulumi.Input[str]]:
"""
If createOption is Copy, this is the ARM id of the source snapshot or disk.
"""
return pulumi.get(self, "source_resource_id")
@source_resource_id.setter
def source_resource_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "source_resource_id", value)
@property
@pulumi.getter(name="sourceUri")
def source_uri(self) -> Optional[pulumi.Input[str]]:
"""
If createOption is Import, this is the URI of a blob to be imported into a managed disk.
"""
return pulumi.get(self, "source_uri")
@source_uri.setter
def source_uri(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "source_uri", value)
@property
@pulumi.getter(name="storageAccountId")
def storage_account_id(self) -> Optional[pulumi.Input[str]]:
"""
Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
"""
return pulumi.get(self, "storage_account_id")
@storage_account_id.setter
def storage_account_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "storage_account_id", value)
@property
@pulumi.getter(name="uploadSizeBytes")
def upload_size_bytes(self) -> Optional[pulumi.Input[float]]:
"""
If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
"""
return pulumi.get(self, "upload_size_bytes")
@upload_size_bytes.setter
def upload_size_bytes(self, value: Optional[pulumi.Input[float]]):
pulumi.set(self, "upload_size_bytes", value)
@pulumi.input_type
class DataDiskImageEncryptionArgs:
def __init__(__self__, *,
lun: pulumi.Input[int],
disk_encryption_set_id: Optional[pulumi.Input[str]] = None):
"""
Contains encryption settings for a data disk image.
:param pulumi.Input[int] lun: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
:param pulumi.Input[str] disk_encryption_set_id: A relative URI containing the resource ID of the disk encryption set.
"""
pulumi.set(__self__, "lun", lun)
if disk_encryption_set_id is not None:
pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id)
@property
@pulumi.getter
def lun(self) -> pulumi.Input[int]:
"""
This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
"""
return pulumi.get(self, "lun")
@lun.setter
def lun(self, value: pulumi.Input[int]):
pulumi.set(self, "lun", value)
@property
@pulumi.getter(name="diskEncryptionSetId")
def disk_encryption_set_id(self) -> Optional[pulumi.Input[str]]:
"""
A relative URI containing the resource ID of the disk encryption set.
"""
return pulumi.get(self, "disk_encryption_set_id")
@disk_encryption_set_id.setter
def disk_encryption_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "disk_encryption_set_id", value)
@pulumi.input_type
class DisallowedArgs:
def __init__(__self__, *,
disk_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
"""
Describes the disallowed disk types.
:param pulumi.Input[Sequence[pulumi.Input[str]]] disk_types: A list of disk types.
"""
if disk_types is not None:
pulumi.set(__self__, "disk_types", disk_types)
@property
@pulumi.getter(name="diskTypes")
def disk_types(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
A list of disk types.
"""
return pulumi.get(self, "disk_types")
@disk_types.setter
def disk_types(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "disk_types", value)
@pulumi.input_type
class DiskSkuArgs:
def __init__(__self__, *,
name: Optional[pulumi.Input[Union[str, 'DiskStorageAccountTypes']]] = None):
"""
The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
:param pulumi.Input[Union[str, 'DiskStorageAccountTypes']] name: The sku name.
"""
if name is not None:
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[Union[str, 'DiskStorageAccountTypes']]]:
"""
The sku name.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[Union[str, 'DiskStorageAccountTypes']]]):
pulumi.set(self, "name", value)
@pulumi.input_type
class EncryptionImagesArgs:
def __init__(__self__, *,
data_disk_images: Optional[pulumi.Input[Sequence[pulumi.Input['DataDiskImageEncryptionArgs']]]] = None,
os_disk_image: Optional[pulumi.Input['OSDiskImageEncryptionArgs']] = None):
"""
Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
:param pulumi.Input[Sequence[pulumi.Input['DataDiskImageEncryptionArgs']]] data_disk_images: A list of encryption specifications for data disk images.
:param pulumi.Input['OSDiskImageEncryptionArgs'] os_disk_image: Contains encryption settings for an OS disk image.
"""
if data_disk_images is not None:
pulumi.set(__self__, "data_disk_images", data_disk_images)
if os_disk_image is not None:
pulumi.set(__self__, "os_disk_image", os_disk_image)
@property
@pulumi.getter(name="dataDiskImages")
def data_disk_images(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DataDiskImageEncryptionArgs']]]]:
"""
A list of encryption specifications for data disk images.
"""
return pulumi.get(self, "data_disk_images")
@data_disk_images.setter
def data_disk_images(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DataDiskImageEncryptionArgs']]]]):
pulumi.set(self, "data_disk_images", value)
@property
@pulumi.getter(name="osDiskImage")
def os_disk_image(self) -> Optional[pulumi.Input['OSDiskImageEncryptionArgs']]:
"""
Contains encryption settings for an OS disk image.
"""
return pulumi.get(self, "os_disk_image")
@os_disk_image.setter
def os_disk_image(self, value: Optional[pulumi.Input['OSDiskImageEncryptionArgs']]):
pulumi.set(self, "os_disk_image", value)
@pulumi.input_type
class EncryptionSetIdentityArgs:
def __init__(__self__, *,
type: Optional[pulumi.Input[Union[str, 'DiskEncryptionSetIdentityType']]] = None):
"""
The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.
:param pulumi.Input[Union[str, 'DiskEncryptionSetIdentityType']] type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.
"""
if type is not None:
pulumi.set(__self__, "type", type)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[Union[str, 'DiskEncryptionSetIdentityType']]]:
"""
The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[Union[str, 'DiskEncryptionSetIdentityType']]]):
pulumi.set(self, "type", value)
@pulumi.input_type
class EncryptionSettingsCollectionArgs:
def __init__(__self__, *,
enabled: pulumi.Input[bool],
encryption_settings: Optional[pulumi.Input[Sequence[pulumi.Input['EncryptionSettingsElementArgs']]]] = None,
encryption_settings_version: Optional[pulumi.Input[str]] = None):
"""
Encryption settings for disk or snapshot
:param pulumi.Input[bool] enabled: Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
:param pulumi.Input[Sequence[pulumi.Input['EncryptionSettingsElementArgs']]] encryption_settings: A collection of encryption settings, one for each disk volume.
:param pulumi.Input[str] encryption_settings_version: Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
"""
pulumi.set(__self__, "enabled", enabled)
if encryption_settings is not None:
pulumi.set(__self__, "encryption_settings", encryption_settings)
if encryption_settings_version is not None:
pulumi.set(__self__, "encryption_settings_version", encryption_settings_version)
@property
@pulumi.getter
def enabled(self) -> pulumi.Input[bool]:
"""
Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
"""
return pulumi.get(self, "enabled")
@enabled.setter
def enabled(self, value: pulumi.Input[bool]):
pulumi.set(self, "enabled", value)
@property
@pulumi.getter(name="encryptionSettings")
def encryption_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EncryptionSettingsElementArgs']]]]:
"""
A collection of encryption settings, one for each disk volume.
"""
return pulumi.get(self, "encryption_settings")
@encryption_settings.setter
def encryption_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EncryptionSettingsElementArgs']]]]):
pulumi.set(self, "encryption_settings", value)
@property
@pulumi.getter(name="encryptionSettingsVersion")
def encryption_settings_version(self) -> Optional[pulumi.Input[str]]:
"""
Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
"""
return pulumi.get(self, "encryption_settings_version")
@encryption_settings_version.setter
def encryption_settings_version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "encryption_settings_version", value)
@pulumi.input_type
class EncryptionSettingsElementArgs:
def __init__(__self__, *,
disk_encryption_key: Optional[pulumi.Input['KeyVaultAndSecretReferenceArgs']] = None,
key_encryption_key: Optional[pulumi.Input['KeyVaultAndKeyReferenceArgs']] = None):
"""
Encryption settings for one disk volume.
:param pulumi.Input['KeyVaultAndSecretReferenceArgs'] disk_encryption_key: Key Vault Secret Url and vault id of the disk encryption key
:param pulumi.Input['KeyVaultAndKeyReferenceArgs'] key_encryption_key: Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
"""
if disk_encryption_key is not None:
pulumi.set(__self__, "disk_encryption_key", disk_encryption_key)
if key_encryption_key is not None:
pulumi.set(__self__, "key_encryption_key", key_encryption_key)
@property
@pulumi.getter(name="diskEncryptionKey")
def disk_encryption_key(self) -> Optional[pulumi.Input['KeyVaultAndSecretReferenceArgs']]:
"""
Key Vault Secret Url and vault id of the disk encryption key
"""
return pulumi.get(self, "disk_encryption_key")
@disk_encryption_key.setter
def disk_encryption_key(self, value: Optional[pulumi.Input['KeyVaultAndSecretReferenceArgs']]):
pulumi.set(self, "disk_encryption_key", value)
@property
@pulumi.getter(name="keyEncryptionKey")
def key_encryption_key(self) -> Optional[pulumi.Input['KeyVaultAndKeyReferenceArgs']]:
"""
Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
"""
return pulumi.get(self, "key_encryption_key")
@key_encryption_key.setter
def key_encryption_key(self, value: Optional[pulumi.Input['KeyVaultAndKeyReferenceArgs']]):
pulumi.set(self, "key_encryption_key", value)
@pulumi.input_type
class EncryptionArgs:
def __init__(__self__, *,
disk_encryption_set_id: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'EncryptionType']]] = None):
"""
Encryption at rest settings for disk or snapshot
:param pulumi.Input[str] disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling encryption at rest.
:param pulumi.Input[Union[str, 'EncryptionType']] type: The type of key used to encrypt the data of the disk.
"""
if disk_encryption_set_id is not None:
pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id)
if type is not None:
pulumi.set(__self__, "type", type)
@property
@pulumi.getter(name="diskEncryptionSetId")
def disk_encryption_set_id(self) -> Optional[pulumi.Input[str]]:
"""
ResourceId of the disk encryption set to use for enabling encryption at rest.
"""
return pulumi.get(self, "disk_encryption_set_id")
@disk_encryption_set_id.setter
def disk_encryption_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "disk_encryption_set_id", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[Union[str, 'EncryptionType']]]:
"""
The type of key used to encrypt the data of the disk.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[Union[str, 'EncryptionType']]]):
pulumi.set(self, "type", value)
@pulumi.input_type
class ExtendedLocationArgs:
def __init__(__self__, *,
name: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'ExtendedLocationTypes']]] = None):
"""
The complex type of the extended location.
:param pulumi.Input[str] name: The name of the extended location.
:param pulumi.Input[Union[str, 'ExtendedLocationTypes']] type: The type of the extended location.
"""
if name is not None:
pulumi.set(__self__, "name", name)
if type is not None:
pulumi.set(__self__, "type", type)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the extended location.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[Union[str, 'ExtendedLocationTypes']]]:
"""
The type of the extended location.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[Union[str, 'ExtendedLocationTypes']]]):
pulumi.set(self, "type", value)
@pulumi.input_type
class GalleryApplicationVersionPublishingProfileArgs:
def __init__(__self__, *,
source: pulumi.Input['UserArtifactSourceArgs'],
enable_health_check: Optional[pulumi.Input[bool]] = None,
end_of_life_date: Optional[pulumi.Input[str]] = None,
exclude_from_latest: Optional[pulumi.Input[bool]] = None,
manage_actions: Optional[pulumi.Input['UserArtifactManageArgs']] = None,
replica_count: Optional[pulumi.Input[int]] = None,
storage_account_type: Optional[pulumi.Input[Union[str, 'StorageAccountType']]] = None,
target_regions: Optional[pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]]] = None):
"""
The publishing profile of a gallery image version.
:param pulumi.Input['UserArtifactSourceArgs'] source: The source image from which the Image Version is going to be created.
:param pulumi.Input[bool] enable_health_check: Optional. Whether or not this application reports health.
:param pulumi.Input[str] end_of_life_date: The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
:param pulumi.Input[bool] exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
:param pulumi.Input[int] replica_count: The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
:param pulumi.Input[Union[str, 'StorageAccountType']] storage_account_type: Specifies the storage account type to be used to store the image. This property is not updatable.
:param pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]] target_regions: The target regions where the Image Version is going to be replicated to. This property is updatable.
"""
pulumi.set(__self__, "source", source)
if enable_health_check is not None:
pulumi.set(__self__, "enable_health_check", enable_health_check)
if end_of_life_date is not None:
pulumi.set(__self__, "end_of_life_date", end_of_life_date)
if exclude_from_latest is not None:
pulumi.set(__self__, "exclude_from_latest", exclude_from_latest)
if manage_actions is not None:
pulumi.set(__self__, "manage_actions", manage_actions)
if replica_count is not None:
pulumi.set(__self__, "replica_count", replica_count)
if storage_account_type is not None:
pulumi.set(__self__, "storage_account_type", storage_account_type)
if target_regions is not None:
pulumi.set(__self__, "target_regions", target_regions)
@property
@pulumi.getter
def source(self) -> pulumi.Input['UserArtifactSourceArgs']:
"""
The source image from which the Image Version is going to be created.
"""
return pulumi.get(self, "source")
@source.setter
def source(self, value: pulumi.Input['UserArtifactSourceArgs']):
pulumi.set(self, "source", value)
@property
@pulumi.getter(name="enableHealthCheck")
def enable_health_check(self) -> Optional[pulumi.Input[bool]]:
"""
Optional. Whether or not this application reports health.
"""
return pulumi.get(self, "enable_health_check")
@enable_health_check.setter
def enable_health_check(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "enable_health_check", value)
@property
@pulumi.getter(name="endOfLifeDate")
def end_of_life_date(self) -> Optional[pulumi.Input[str]]:
"""
The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
"""
return pulumi.get(self, "end_of_life_date")
@end_of_life_date.setter
def end_of_life_date(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "end_of_life_date", value)
@property
@pulumi.getter(name="excludeFromLatest")
def exclude_from_latest(self) -> Optional[pulumi.Input[bool]]:
"""
If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
"""
return pulumi.get(self, "exclude_from_latest")
@exclude_from_latest.setter
def exclude_from_latest(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "exclude_from_latest", value)
@property
@pulumi.getter(name="manageActions")
def manage_actions(self) -> Optional[pulumi.Input['UserArtifactManageArgs']]:
return pulumi.get(self, "manage_actions")
@manage_actions.setter
def manage_actions(self, value: Optional[pulumi.Input['UserArtifactManageArgs']]):
pulumi.set(self, "manage_actions", value)
@property
@pulumi.getter(name="replicaCount")
def replica_count(self) -> Optional[pulumi.Input[int]]:
"""
The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
"""
return pulumi.get(self, "replica_count")
@replica_count.setter
def replica_count(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "replica_count", value)
@property
@pulumi.getter(name="storageAccountType")
def storage_account_type(self) -> Optional[pulumi.Input[Union[str, 'StorageAccountType']]]:
"""
Specifies the storage account type to be used to store the image. This property is not updatable.
"""
return pulumi.get(self, "storage_account_type")
@storage_account_type.setter
def storage_account_type(self, value: Optional[pulumi.Input[Union[str, 'StorageAccountType']]]):
pulumi.set(self, "storage_account_type", value)
@property
@pulumi.getter(name="targetRegions")
def target_regions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]]]:
"""
The target regions where the Image Version is going to be replicated to. This property is updatable.
"""
return pulumi.get(self, "target_regions")
@target_regions.setter
def target_regions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]]]):
pulumi.set(self, "target_regions", value)
@pulumi.input_type
class GalleryArtifactVersionSourceArgs:
def __init__(__self__, *,
id: Optional[pulumi.Input[str]] = None,
uri: Optional[pulumi.Input[str]] = None):
"""
The gallery artifact version source.
:param pulumi.Input[str] id: The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
:param pulumi.Input[str] uri: The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
"""
if id is not None:
pulumi.set(__self__, "id", id)
if uri is not None:
pulumi.set(__self__, "uri", uri)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
"""
The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter
def uri(self) -> Optional[pulumi.Input[str]]:
"""
The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
"""
return pulumi.get(self, "uri")
@uri.setter
def uri(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "uri", value)
@pulumi.input_type
class GalleryDataDiskImageArgs:
def __init__(__self__, *,
lun: pulumi.Input[int],
host_caching: Optional[pulumi.Input['HostCaching']] = None,
source: Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']] = None):
"""
This is the data disk image.
:param pulumi.Input[int] lun: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
:param pulumi.Input['HostCaching'] host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
:param pulumi.Input['GalleryArtifactVersionSourceArgs'] source: The gallery artifact version source.
"""
pulumi.set(__self__, "lun", lun)
if host_caching is not None:
pulumi.set(__self__, "host_caching", host_caching)
if source is not None:
pulumi.set(__self__, "source", source)
@property
@pulumi.getter
def lun(self) -> pulumi.Input[int]:
"""
This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
"""
return pulumi.get(self, "lun")
@lun.setter
def lun(self, value: pulumi.Input[int]):
pulumi.set(self, "lun", value)
@property
@pulumi.getter(name="hostCaching")
def host_caching(self) -> Optional[pulumi.Input['HostCaching']]:
"""
The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
"""
return pulumi.get(self, "host_caching")
@host_caching.setter
def host_caching(self, value: Optional[pulumi.Input['HostCaching']]):
pulumi.set(self, "host_caching", value)
@property
@pulumi.getter
def source(self) -> Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']]:
"""
The gallery artifact version source.
"""
return pulumi.get(self, "source")
@source.setter
def source(self, value: Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']]):
pulumi.set(self, "source", value)
@pulumi.input_type
class GalleryImageFeatureArgs:
def __init__(__self__, *,
name: Optional[pulumi.Input[str]] = None,
value: Optional[pulumi.Input[str]] = None):
"""
A feature for gallery image.
:param pulumi.Input[str] name: The name of the gallery image feature.
:param pulumi.Input[str] value: The value of the gallery image feature.
"""
if name is not None:
pulumi.set(__self__, "name", name)
if value is not None:
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the gallery image feature.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def value(self) -> Optional[pulumi.Input[str]]:
"""
The value of the gallery image feature.
"""
return pulumi.get(self, "value")
@value.setter
def value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "value", value)
@pulumi.input_type
class GalleryImageIdentifierArgs:
def __init__(__self__, *,
offer: pulumi.Input[str],
publisher: pulumi.Input[str],
sku: pulumi.Input[str]):
"""
This is the gallery image definition identifier.
:param pulumi.Input[str] offer: The name of the gallery image definition offer.
:param pulumi.Input[str] publisher: The name of the gallery image definition publisher.
:param pulumi.Input[str] sku: The name of the gallery image definition SKU.
"""
pulumi.set(__self__, "offer", offer)
pulumi.set(__self__, "publisher", publisher)
pulumi.set(__self__, "sku", sku)
@property
@pulumi.getter
def offer(self) -> pulumi.Input[str]:
"""
The name of the gallery image definition offer.
"""
return pulumi.get(self, "offer")
@offer.setter
def offer(self, value: pulumi.Input[str]):
pulumi.set(self, "offer", value)
@property
@pulumi.getter
def publisher(self) -> pulumi.Input[str]:
"""
The name of the gallery image definition publisher.
"""
return pulumi.get(self, "publisher")
@publisher.setter
def publisher(self, value: pulumi.Input[str]):
pulumi.set(self, "publisher", value)
@property
@pulumi.getter
def sku(self) -> pulumi.Input[str]:
"""
The name of the gallery image definition SKU.
"""
return pulumi.get(self, "sku")
@sku.setter
def sku(self, value: pulumi.Input[str]):
pulumi.set(self, "sku", value)
@pulumi.input_type
class GalleryImageVersionPublishingProfileArgs:
def __init__(__self__, *,
end_of_life_date: Optional[pulumi.Input[str]] = None,
exclude_from_latest: Optional[pulumi.Input[bool]] = None,
replica_count: Optional[pulumi.Input[int]] = None,
storage_account_type: Optional[pulumi.Input[Union[str, 'StorageAccountType']]] = None,
target_regions: Optional[pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]]] = None):
"""
The publishing profile of a gallery image Version.
:param pulumi.Input[str] end_of_life_date: The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
:param pulumi.Input[bool] exclude_from_latest: If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
:param pulumi.Input[int] replica_count: The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
:param pulumi.Input[Union[str, 'StorageAccountType']] storage_account_type: Specifies the storage account type to be used to store the image. This property is not updatable.
:param pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]] target_regions: The target regions where the Image Version is going to be replicated to. This property is updatable.
"""
if end_of_life_date is not None:
pulumi.set(__self__, "end_of_life_date", end_of_life_date)
if exclude_from_latest is not None:
pulumi.set(__self__, "exclude_from_latest", exclude_from_latest)
if replica_count is not None:
pulumi.set(__self__, "replica_count", replica_count)
if storage_account_type is not None:
pulumi.set(__self__, "storage_account_type", storage_account_type)
if target_regions is not None:
pulumi.set(__self__, "target_regions", target_regions)
@property
@pulumi.getter(name="endOfLifeDate")
def end_of_life_date(self) -> Optional[pulumi.Input[str]]:
"""
The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
"""
return pulumi.get(self, "end_of_life_date")
@end_of_life_date.setter
def end_of_life_date(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "end_of_life_date", value)
@property
@pulumi.getter(name="excludeFromLatest")
def exclude_from_latest(self) -> Optional[pulumi.Input[bool]]:
"""
If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
"""
return pulumi.get(self, "exclude_from_latest")
@exclude_from_latest.setter
def exclude_from_latest(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "exclude_from_latest", value)
@property
@pulumi.getter(name="replicaCount")
def replica_count(self) -> Optional[pulumi.Input[int]]:
"""
The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
"""
return pulumi.get(self, "replica_count")
@replica_count.setter
def replica_count(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "replica_count", value)
@property
@pulumi.getter(name="storageAccountType")
def storage_account_type(self) -> Optional[pulumi.Input[Union[str, 'StorageAccountType']]]:
"""
Specifies the storage account type to be used to store the image. This property is not updatable.
"""
return pulumi.get(self, "storage_account_type")
@storage_account_type.setter
def storage_account_type(self, value: Optional[pulumi.Input[Union[str, 'StorageAccountType']]]):
pulumi.set(self, "storage_account_type", value)
@property
@pulumi.getter(name="targetRegions")
def target_regions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]]]:
"""
The target regions where the Image Version is going to be replicated to. This property is updatable.
"""
return pulumi.get(self, "target_regions")
@target_regions.setter
def target_regions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['TargetRegionArgs']]]]):
pulumi.set(self, "target_regions", value)
@pulumi.input_type
class GalleryImageVersionStorageProfileArgs:
def __init__(__self__, *,
data_disk_images: Optional[pulumi.Input[Sequence[pulumi.Input['GalleryDataDiskImageArgs']]]] = None,
os_disk_image: Optional[pulumi.Input['GalleryOSDiskImageArgs']] = None,
source: Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']] = None):
"""
This is the storage profile of a Gallery Image Version.
:param pulumi.Input[Sequence[pulumi.Input['GalleryDataDiskImageArgs']]] data_disk_images: A list of data disk images.
:param pulumi.Input['GalleryOSDiskImageArgs'] os_disk_image: This is the OS disk image.
:param pulumi.Input['GalleryArtifactVersionSourceArgs'] source: The gallery artifact version source.
"""
if data_disk_images is not None:
pulumi.set(__self__, "data_disk_images", data_disk_images)
if os_disk_image is not None:
pulumi.set(__self__, "os_disk_image", os_disk_image)
if source is not None:
pulumi.set(__self__, "source", source)
@property
@pulumi.getter(name="dataDiskImages")
def data_disk_images(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GalleryDataDiskImageArgs']]]]:
"""
A list of data disk images.
"""
return pulumi.get(self, "data_disk_images")
@data_disk_images.setter
def data_disk_images(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['GalleryDataDiskImageArgs']]]]):
pulumi.set(self, "data_disk_images", value)
@property
@pulumi.getter(name="osDiskImage")
def os_disk_image(self) -> Optional[pulumi.Input['GalleryOSDiskImageArgs']]:
"""
This is the OS disk image.
"""
return pulumi.get(self, "os_disk_image")
@os_disk_image.setter
def os_disk_image(self, value: Optional[pulumi.Input['GalleryOSDiskImageArgs']]):
pulumi.set(self, "os_disk_image", value)
@property
@pulumi.getter
def source(self) -> Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']]:
"""
The gallery artifact version source.
"""
return pulumi.get(self, "source")
@source.setter
def source(self, value: Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']]):
pulumi.set(self, "source", value)
@pulumi.input_type
class GalleryOSDiskImageArgs:
def __init__(__self__, *,
host_caching: Optional[pulumi.Input['HostCaching']] = None,
source: Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']] = None):
"""
This is the OS disk image.
:param pulumi.Input['HostCaching'] host_caching: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
:param pulumi.Input['GalleryArtifactVersionSourceArgs'] source: The gallery artifact version source.
"""
if host_caching is not None:
pulumi.set(__self__, "host_caching", host_caching)
if source is not None:
pulumi.set(__self__, "source", source)
@property
@pulumi.getter(name="hostCaching")
def host_caching(self) -> Optional[pulumi.Input['HostCaching']]:
"""
The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
"""
return pulumi.get(self, "host_caching")
@host_caching.setter
def host_caching(self, value: Optional[pulumi.Input['HostCaching']]):
pulumi.set(self, "host_caching", value)
@property
@pulumi.getter
def source(self) -> Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']]:
"""
The gallery artifact version source.
"""
return pulumi.get(self, "source")
@source.setter
def source(self, value: Optional[pulumi.Input['GalleryArtifactVersionSourceArgs']]):
pulumi.set(self, "source", value)
@pulumi.input_type
class ImageDiskReferenceArgs:
def __init__(__self__, *,
id: pulumi.Input[str],
lun: Optional[pulumi.Input[int]] = None):
"""
The source image used for creating the disk.
:param pulumi.Input[str] id: A relative uri containing either a Platform Image Repository or user image reference.
:param pulumi.Input[int] lun: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
"""
pulumi.set(__self__, "id", id)
if lun is not None:
pulumi.set(__self__, "lun", lun)
@property
@pulumi.getter
def id(self) -> pulumi.Input[str]:
"""
A relative uri containing either a Platform Image Repository or user image reference.
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: pulumi.Input[str]):
pulumi.set(self, "id", value)
@property
@pulumi.getter
def lun(self) -> Optional[pulumi.Input[int]]:
"""
If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
"""
return pulumi.get(self, "lun")
@lun.setter
def lun(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "lun", value)
@pulumi.input_type
class ImagePurchasePlanArgs:
def __init__(__self__, *,
name: Optional[pulumi.Input[str]] = None,
product: Optional[pulumi.Input[str]] = None,
publisher: Optional[pulumi.Input[str]] = None):
"""
Describes the gallery image definition purchase plan. This is used by marketplace images.
:param pulumi.Input[str] name: The plan ID.
:param pulumi.Input[str] product: The product ID.
:param pulumi.Input[str] publisher: The publisher ID.
"""
if name is not None:
pulumi.set(__self__, "name", name)
if product is not None:
pulumi.set(__self__, "product", product)
if publisher is not None:
pulumi.set(__self__, "publisher", publisher)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The plan ID.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def product(self) -> Optional[pulumi.Input[str]]:
"""
The product ID.
"""
return pulumi.get(self, "product")
@product.setter
def product(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "product", value)
@property
@pulumi.getter
def publisher(self) -> Optional[pulumi.Input[str]]:
"""
The publisher ID.
"""
return pulumi.get(self, "publisher")
@publisher.setter
def publisher(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "publisher", value)
@pulumi.input_type
class KeyForDiskEncryptionSetArgs:
def __init__(__self__, *,
key_url: pulumi.Input[str],
source_vault: Optional[pulumi.Input['SourceVaultArgs']] = None):
"""
Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots
:param pulumi.Input[str] key_url: Fully versioned Key Url pointing to a key in KeyVault
:param pulumi.Input['SourceVaultArgs'] source_vault: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
"""
pulumi.set(__self__, "key_url", key_url)
if source_vault is not None:
pulumi.set(__self__, "source_vault", source_vault)
@property
@pulumi.getter(name="keyUrl")
def key_url(self) -> pulumi.Input[str]:
"""
Fully versioned Key Url pointing to a key in KeyVault
"""
return pulumi.get(self, "key_url")
@key_url.setter
def key_url(self, value: pulumi.Input[str]):
pulumi.set(self, "key_url", value)
@property
@pulumi.getter(name="sourceVault")
def source_vault(self) -> Optional[pulumi.Input['SourceVaultArgs']]:
"""
Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
"""
return pulumi.get(self, "source_vault")
@source_vault.setter
def source_vault(self, value: Optional[pulumi.Input['SourceVaultArgs']]):
pulumi.set(self, "source_vault", value)
@pulumi.input_type
class KeyVaultAndKeyReferenceArgs:
def __init__(__self__, *,
key_url: pulumi.Input[str],
source_vault: pulumi.Input['SourceVaultArgs']):
"""
Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey
:param pulumi.Input[str] key_url: Url pointing to a key or secret in KeyVault
:param pulumi.Input['SourceVaultArgs'] source_vault: Resource id of the KeyVault containing the key or secret
"""
pulumi.set(__self__, "key_url", key_url)
pulumi.set(__self__, "source_vault", source_vault)
@property
@pulumi.getter(name="keyUrl")
def key_url(self) -> pulumi.Input[str]:
"""
Url pointing to a key or secret in KeyVault
"""
return pulumi.get(self, "key_url")
@key_url.setter
def key_url(self, value: pulumi.Input[str]):
pulumi.set(self, "key_url", value)
@property
@pulumi.getter(name="sourceVault")
def source_vault(self) -> pulumi.Input['SourceVaultArgs']:
"""
Resource id of the KeyVault containing the key or secret
"""
return pulumi.get(self, "source_vault")
@source_vault.setter
def source_vault(self, value: pulumi.Input['SourceVaultArgs']):
pulumi.set(self, "source_vault", value)
@pulumi.input_type
class KeyVaultAndSecretReferenceArgs:
def __init__(__self__, *,
secret_url: pulumi.Input[str],
source_vault: pulumi.Input['SourceVaultArgs']):
"""
Key Vault Secret Url and vault id of the encryption key
:param pulumi.Input[str] secret_url: Url pointing to a key or secret in KeyVault
:param pulumi.Input['SourceVaultArgs'] source_vault: Resource id of the KeyVault containing the key or secret
"""
pulumi.set(__self__, "secret_url", secret_url)
pulumi.set(__self__, "source_vault", source_vault)
@property
@pulumi.getter(name="secretUrl")
def secret_url(self) -> pulumi.Input[str]:
"""
Url pointing to a key or secret in KeyVault
"""
return pulumi.get(self, "secret_url")
@secret_url.setter
def secret_url(self, value: pulumi.Input[str]):
pulumi.set(self, "secret_url", value)
@property
@pulumi.getter(name="sourceVault")
def source_vault(self) -> pulumi.Input['SourceVaultArgs']:
"""
Resource id of the KeyVault containing the key or secret
"""
return pulumi.get(self, "source_vault")
@source_vault.setter
def source_vault(self, value: pulumi.Input['SourceVaultArgs']):
pulumi.set(self, "source_vault", value)
@pulumi.input_type
class OSDiskImageEncryptionArgs:
def __init__(__self__, *,
disk_encryption_set_id: Optional[pulumi.Input[str]] = None):
"""
Contains encryption settings for an OS disk image.
:param pulumi.Input[str] disk_encryption_set_id: A relative URI containing the resource ID of the disk encryption set.
"""
if disk_encryption_set_id is not None:
pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id)
@property
@pulumi.getter(name="diskEncryptionSetId")
def disk_encryption_set_id(self) -> Optional[pulumi.Input[str]]:
"""
A relative URI containing the resource ID of the disk encryption set.
"""
return pulumi.get(self, "disk_encryption_set_id")
@disk_encryption_set_id.setter
def disk_encryption_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "disk_encryption_set_id", value)
@pulumi.input_type
class PrivateLinkServiceConnectionStateArgs:
def __init__(__self__, *,
actions_required: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[Union[str, 'PrivateEndpointServiceConnectionStatus']]] = None):
"""
A collection of information about the state of the connection between service consumer and provider.
:param pulumi.Input[str] actions_required: A message indicating if changes on the service provider require any updates on the consumer.
:param pulumi.Input[str] description: The reason for approval/rejection of the connection.
:param pulumi.Input[Union[str, 'PrivateEndpointServiceConnectionStatus']] status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
"""
if actions_required is not None:
pulumi.set(__self__, "actions_required", actions_required)
if description is not None:
pulumi.set(__self__, "description", description)
if status is not None:
pulumi.set(__self__, "status", status)
@property
@pulumi.getter(name="actionsRequired")
def actions_required(self) -> Optional[pulumi.Input[str]]:
"""
A message indicating if changes on the service provider require any updates on the consumer.
"""
return pulumi.get(self, "actions_required")
@actions_required.setter
def actions_required(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "actions_required", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
The reason for approval/rejection of the connection.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[Union[str, 'PrivateEndpointServiceConnectionStatus']]]:
"""
Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
"""
return pulumi.get(self, "status")
@status.setter
def status(self, value: Optional[pulumi.Input[Union[str, 'PrivateEndpointServiceConnectionStatus']]]):
pulumi.set(self, "status", value)
@pulumi.input_type
class PurchasePlanArgs:
def __init__(__self__, *,
name: pulumi.Input[str],
product: pulumi.Input[str],
publisher: pulumi.Input[str],
promotion_code: Optional[pulumi.Input[str]] = None):
"""
Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
:param pulumi.Input[str] name: The plan ID.
:param pulumi.Input[str] product: Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
:param pulumi.Input[str] publisher: The publisher ID.
:param pulumi.Input[str] promotion_code: The Offer Promotion Code.
"""
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "product", product)
pulumi.set(__self__, "publisher", publisher)
if promotion_code is not None:
pulumi.set(__self__, "promotion_code", promotion_code)
@property
@pulumi.getter
def name(self) -> pulumi.Input[str]:
"""
The plan ID.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: pulumi.Input[str]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def product(self) -> pulumi.Input[str]:
"""
Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
"""
return pulumi.get(self, "product")
@product.setter
def product(self, value: pulumi.Input[str]):
pulumi.set(self, "product", value)
@property
@pulumi.getter
def publisher(self) -> pulumi.Input[str]:
"""
The publisher ID.
"""
return pulumi.get(self, "publisher")
@publisher.setter
def publisher(self, value: pulumi.Input[str]):
pulumi.set(self, "publisher", value)
@property
@pulumi.getter(name="promotionCode")
def promotion_code(self) -> Optional[pulumi.Input[str]]:
"""
The Offer Promotion Code.
"""
return pulumi.get(self, "promotion_code")
@promotion_code.setter
def promotion_code(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "promotion_code", value)
@pulumi.input_type
class RecommendedMachineConfigurationArgs:
def __init__(__self__, *,
memory: Optional[pulumi.Input['ResourceRangeArgs']] = None,
v_cpus: Optional[pulumi.Input['ResourceRangeArgs']] = None):
"""
The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
:param pulumi.Input['ResourceRangeArgs'] memory: Describes the resource range.
:param pulumi.Input['ResourceRangeArgs'] v_cpus: Describes the resource range.
"""
if memory is not None:
pulumi.set(__self__, "memory", memory)
if v_cpus is not None:
pulumi.set(__self__, "v_cpus", v_cpus)
@property
@pulumi.getter
def memory(self) -> Optional[pulumi.Input['ResourceRangeArgs']]:
"""
Describes the resource range.
"""
return pulumi.get(self, "memory")
@memory.setter
def memory(self, value: Optional[pulumi.Input['ResourceRangeArgs']]):
pulumi.set(self, "memory", value)
@property
@pulumi.getter(name="vCPUs")
def v_cpus(self) -> Optional[pulumi.Input['ResourceRangeArgs']]:
"""
Describes the resource range.
"""
return pulumi.get(self, "v_cpus")
@v_cpus.setter
def v_cpus(self, value: Optional[pulumi.Input['ResourceRangeArgs']]):
pulumi.set(self, "v_cpus", value)
@pulumi.input_type
class ResourceRangeArgs:
def __init__(__self__, *,
max: Optional[pulumi.Input[int]] = None,
min: Optional[pulumi.Input[int]] = None):
"""
Describes the resource range.
:param pulumi.Input[int] max: The maximum number of the resource.
:param pulumi.Input[int] min: The minimum number of the resource.
"""
if max is not None:
pulumi.set(__self__, "max", max)
if min is not None:
pulumi.set(__self__, "min", min)
@property
@pulumi.getter
def max(self) -> Optional[pulumi.Input[int]]:
"""
The maximum number of the resource.
"""
return pulumi.get(self, "max")
@max.setter
def max(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "max", value)
@property
@pulumi.getter
def min(self) -> Optional[pulumi.Input[int]]:
"""
The minimum number of the resource.
"""
return pulumi.get(self, "min")
@min.setter
def min(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "min", value)
@pulumi.input_type
class SharingProfileArgs:
def __init__(__self__, *,
permissions: Optional[pulumi.Input[Union[str, 'GallerySharingPermissionTypes']]] = None):
"""
Profile for gallery sharing to subscription or tenant
:param pulumi.Input[Union[str, 'GallerySharingPermissionTypes']] permissions: This property allows you to specify the permission of sharing gallery. <br><br> Possible values are: <br><br> **Private** <br><br> **Groups**
"""
if permissions is not None:
pulumi.set(__self__, "permissions", permissions)
@property
@pulumi.getter
def permissions(self) -> Optional[pulumi.Input[Union[str, 'GallerySharingPermissionTypes']]]:
"""
This property allows you to specify the permission of sharing gallery. <br><br> Possible values are: <br><br> **Private** <br><br> **Groups**
"""
return pulumi.get(self, "permissions")
@permissions.setter
def permissions(self, value: Optional[pulumi.Input[Union[str, 'GallerySharingPermissionTypes']]]):
pulumi.set(self, "permissions", value)
@pulumi.input_type
class SnapshotSkuArgs:
def __init__(__self__, *,
name: Optional[pulumi.Input[Union[str, 'SnapshotStorageAccountTypes']]] = None):
"""
The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
:param pulumi.Input[Union[str, 'SnapshotStorageAccountTypes']] name: The sku name.
"""
if name is not None:
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[Union[str, 'SnapshotStorageAccountTypes']]]:
"""
The sku name.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[Union[str, 'SnapshotStorageAccountTypes']]]):
pulumi.set(self, "name", value)
@pulumi.input_type
class SourceVaultArgs:
def __init__(__self__, *,
id: Optional[pulumi.Input[str]] = None):
"""
The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
:param pulumi.Input[str] id: Resource Id
"""
if id is not None:
pulumi.set(__self__, "id", id)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
"""
Resource Id
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@pulumi.input_type
class TargetRegionArgs:
def __init__(__self__, *,
name: pulumi.Input[str],
encryption: Optional[pulumi.Input['EncryptionImagesArgs']] = None,
regional_replica_count: Optional[pulumi.Input[int]] = None,
storage_account_type: Optional[pulumi.Input[Union[str, 'StorageAccountType']]] = None):
"""
Describes the target region information.
:param pulumi.Input[str] name: The name of the region.
:param pulumi.Input['EncryptionImagesArgs'] encryption: Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
:param pulumi.Input[int] regional_replica_count: The number of replicas of the Image Version to be created per region. This property is updatable.
:param pulumi.Input[Union[str, 'StorageAccountType']] storage_account_type: Specifies the storage account type to be used to store the image. This property is not updatable.
"""
pulumi.set(__self__, "name", name)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if regional_replica_count is not None:
pulumi.set(__self__, "regional_replica_count", regional_replica_count)
if storage_account_type is not None:
pulumi.set(__self__, "storage_account_type", storage_account_type)
@property
@pulumi.getter
def name(self) -> pulumi.Input[str]:
"""
The name of the region.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: pulumi.Input[str]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def encryption(self) -> Optional[pulumi.Input['EncryptionImagesArgs']]:
"""
Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
"""
return pulumi.get(self, "encryption")
@encryption.setter
def encryption(self, value: Optional[pulumi.Input['EncryptionImagesArgs']]):
pulumi.set(self, "encryption", value)
@property
@pulumi.getter(name="regionalReplicaCount")
def regional_replica_count(self) -> Optional[pulumi.Input[int]]:
"""
The number of replicas of the Image Version to be created per region. This property is updatable.
"""
return pulumi.get(self, "regional_replica_count")
@regional_replica_count.setter
def regional_replica_count(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "regional_replica_count", value)
@property
@pulumi.getter(name="storageAccountType")
def storage_account_type(self) -> Optional[pulumi.Input[Union[str, 'StorageAccountType']]]:
"""
Specifies the storage account type to be used to store the image. This property is not updatable.
"""
return pulumi.get(self, "storage_account_type")
@storage_account_type.setter
def storage_account_type(self, value: Optional[pulumi.Input[Union[str, 'StorageAccountType']]]):
pulumi.set(self, "storage_account_type", value)
@pulumi.input_type
class UserArtifactManageArgs:
def __init__(__self__, *,
install: pulumi.Input[str],
remove: pulumi.Input[str],
update: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[str] install: Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
:param pulumi.Input[str] remove: Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
:param pulumi.Input[str] update: Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.
"""
pulumi.set(__self__, "install", install)
pulumi.set(__self__, "remove", remove)
if update is not None:
pulumi.set(__self__, "update", update)
@property
@pulumi.getter
def install(self) -> pulumi.Input[str]:
"""
Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
"""
return pulumi.get(self, "install")
@install.setter
def install(self, value: pulumi.Input[str]):
pulumi.set(self, "install", value)
@property
@pulumi.getter
def remove(self) -> pulumi.Input[str]:
"""
Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
"""
return pulumi.get(self, "remove")
@remove.setter
def remove(self, value: pulumi.Input[str]):
pulumi.set(self, "remove", value)
@property
@pulumi.getter
def update(self) -> Optional[pulumi.Input[str]]:
"""
Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.
"""
return pulumi.get(self, "update")
@update.setter
def update(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "update", value)
@pulumi.input_type
class UserArtifactSourceArgs:
def __init__(__self__, *,
media_link: pulumi.Input[str],
default_configuration_link: Optional[pulumi.Input[str]] = None):
"""
The source image from which the Image Version is going to be created.
:param pulumi.Input[str] media_link: Required. The mediaLink of the artifact, must be a readable storage page blob.
:param pulumi.Input[str] default_configuration_link: Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
"""
pulumi.set(__self__, "media_link", media_link)
if default_configuration_link is not None:
pulumi.set(__self__, "default_configuration_link", default_configuration_link)
@property
@pulumi.getter(name="mediaLink")
def media_link(self) -> pulumi.Input[str]:
"""
Required. The mediaLink of the artifact, must be a readable storage page blob.
"""
return pulumi.get(self, "media_link")
@media_link.setter
def media_link(self, value: pulumi.Input[str]):
pulumi.set(self, "media_link", value)
@property
@pulumi.getter(name="defaultConfigurationLink")
def default_configuration_link(self) -> Optional[pulumi.Input[str]]:
"""
Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
"""
return pulumi.get(self, "default_configuration_link")
@default_configuration_link.setter
def default_configuration_link(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_configuration_link", value)
| 42.138708
| 389
| 0.668763
| 8,509
| 71,088
| 5.419203
| 0.054413
| 0.096613
| 0.081584
| 0.035848
| 0.829784
| 0.749848
| 0.690623
| 0.63554
| 0.602772
| 0.569461
| 0
| 0.002188
| 0.228534
| 71,088
| 1,686
| 390
| 42.163701
| 0.838627
| 0.306409
| 0
| 0.554884
| 1
| 0
| 0.145614
| 0.06101
| 0
| 0
| 0
| 0
| 0
| 1
| 0.209466
| false
| 0
| 0.006042
| 0.001007
| 0.337362
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
79016946767147d0fbaeddece8c5f2511d1e6b1d
| 178
|
py
|
Python
|
floris/tools/optimization/scipy/__init__.py
|
eirikur16/flrs
|
c98604593753def05086b54ce82f5551f01d2529
|
[
"Apache-2.0"
] | 91
|
2019-06-04T08:56:29.000Z
|
2022-03-13T17:39:22.000Z
|
floris/tools/optimization/scipy/__init__.py
|
eirikur16/flrs
|
c98604593753def05086b54ce82f5551f01d2529
|
[
"Apache-2.0"
] | 224
|
2019-04-08T22:03:45.000Z
|
2022-03-31T17:56:09.000Z
|
floris/tools/optimization/scipy/__init__.py
|
eirikur16/flrs
|
c98604593753def05086b54ce82f5551f01d2529
|
[
"Apache-2.0"
] | 97
|
2019-04-23T20:48:20.000Z
|
2022-03-29T08:17:02.000Z
|
from . import (
yaw,
layout,
base_COE,
optimization,
layout_height,
power_density,
yaw_wind_rose,
power_density_1D,
yaw_wind_rose_parallel,
)
| 14.833333
| 27
| 0.651685
| 21
| 178
| 5.047619
| 0.666667
| 0.226415
| 0.207547
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007813
| 0.280899
| 178
| 11
| 28
| 16.181818
| 0.820313
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.090909
| 0
| 0.090909
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
790e259abafc3b78efd22c4e49725337604761c5
| 55
|
py
|
Python
|
src/__init__.py
|
codespacedot/CodeSpaceAPI
|
22b457088aa592c4fb9111718810075d2643d9ca
|
[
"Apache-2.0"
] | 3
|
2021-07-05T17:28:14.000Z
|
2021-12-07T10:08:14.000Z
|
src/__init__.py
|
git-vish/CodeSpaceAPI
|
7ad4327e0eef3019098730358c4a23312bc85615
|
[
"Apache-2.0"
] | 2
|
2021-07-29T13:55:15.000Z
|
2021-07-31T16:49:03.000Z
|
src/__init__.py
|
git-vish/CodeSpaceAPI
|
7ad4327e0eef3019098730358c4a23312bc85615
|
[
"Apache-2.0"
] | 3
|
2021-07-01T16:32:20.000Z
|
2021-07-05T04:50:30.000Z
|
"""FastAPI Project for CodeSpace.
https://csdot.ml
"""
| 13.75
| 33
| 0.690909
| 7
| 55
| 5.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 55
| 3
| 34
| 18.333333
| 0.77551
| 0.854545
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7915bd6303c3c35d054564976537a39f4bb990be
| 76
|
py
|
Python
|
nonbonded/cli/projects/__init__.py
|
SimonBoothroyd/nonbonded
|
3efbb7d943d936b47248975f9ad0d8a006ea8684
|
[
"MIT"
] | 5
|
2020-05-11T18:25:00.000Z
|
2022-01-27T10:55:09.000Z
|
nonbonded/cli/projects/__init__.py
|
SimonBoothroyd/nonbonded
|
3efbb7d943d936b47248975f9ad0d8a006ea8684
|
[
"MIT"
] | 88
|
2020-06-02T14:40:05.000Z
|
2022-03-02T09:20:39.000Z
|
nonbonded/cli/projects/__init__.py
|
SimonBoothroyd/nonbonded
|
3efbb7d943d936b47248975f9ad0d8a006ea8684
|
[
"MIT"
] | null | null | null |
# from nonbonded.cli.project.project import project
#
# __all__ = [project]
| 19
| 51
| 0.75
| 9
| 76
| 5.888889
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 76
| 3
| 52
| 25.333333
| 0.80303
| 0.907895
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
791aafa638d97478db2d6a462067e347380d5760
| 117
|
py
|
Python
|
ffmpeg_normalize/__init__.py
|
kostalski/ffmpeg-normalize
|
2c73f47ec4369de08c1e2051af490322084fd17b
|
[
"MIT"
] | 3
|
2019-04-01T11:03:04.000Z
|
2019-12-31T02:17:15.000Z
|
ffmpeg_normalize/__init__.py
|
kostalski/ffmpeg-normalize
|
2c73f47ec4369de08c1e2051af490322084fd17b
|
[
"MIT"
] | 1
|
2021-04-15T18:46:45.000Z
|
2021-04-15T18:46:45.000Z
|
ffmpeg_normalize/__init__.py
|
kostalski/ffmpeg-normalize
|
2c73f47ec4369de08c1e2051af490322084fd17b
|
[
"MIT"
] | 1
|
2021-09-23T13:43:07.000Z
|
2021-09-23T13:43:07.000Z
|
from ._ffmpeg_normalize import FFmpegNormalize
from ._media_file import MediaFile
from ._version import __version__
| 23.4
| 46
| 0.863248
| 14
| 117
| 6.571429
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 117
| 4
| 47
| 29.25
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f71362b0a4e90908b800515208bd4b73487ecd9e
| 1,823
|
py
|
Python
|
RiotGames/API/Match.py
|
Timohiho/RiotGames
|
f75256cca1b5c224393dca99296a6163b70b335f
|
[
"MIT"
] | 2
|
2021-05-05T12:33:51.000Z
|
2021-12-15T13:08:44.000Z
|
RiotGames/API/Match.py
|
Timohiho/RiotGames
|
f75256cca1b5c224393dca99296a6163b70b335f
|
[
"MIT"
] | null | null | null |
RiotGames/API/Match.py
|
Timohiho/RiotGames
|
f75256cca1b5c224393dca99296a6163b70b335f
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2021.
# The copyright lies with Timo Hirsch-Hoffmann, the further use is only permitted with reference to source
import urllib.request
from RiotGames.API.RiotApi import RiotApi
class Match(RiotApi):
__timeline_by_match_id_url: str = "https://{}.api.riotgames.com/lol/match/v4/timelines/by-match/{}?api_key={}"
def __init__(self, apikey: str):
"""
:param apikey:
"""
super().__init__(apikey)
self.__super = super()
def by_id(self, match_id: int, region: str):
"""
Special Function still in development
https://developer.riotgames.com/apis#match-v4/GET_getMatchlist
TODO
:param match_id:
:param region:
:return:
"""
pass
def matchlist_by_account_id(self, account_id: str, begin_time: int = None, end_time: int = None,
begin_index: int = None, end_index: int = None, champions: list = None,
queue: list = None, season: list = None):
"""
Special Function still in development
https://developer.riotgames.com/apis#match-v4/GET_getMatchlist
TODO
format url
:param account_id:
encrypted account id
:param begin_time:
:param end_time:
:param begin_index:
:param end_index:
:param champions:
:param queue:
:param season:
:return:
"""
pass
def timeline_by_match_id(self, match_id: int, region: str) -> dict:
"""
:param match_id:
:param region:
:return:
"""
return eval(bytes(
urllib.request.urlopen(
self.__timeline_by_match_id_url.format(region, match_id, super()._get_key())).read()).decode())
| 28.936508
| 114
| 0.580362
| 210
| 1,823
| 4.804762
| 0.361905
| 0.055501
| 0.044599
| 0.050545
| 0.323092
| 0.283449
| 0.225966
| 0.176412
| 0.176412
| 0.176412
| 0
| 0.005596
| 0.313769
| 1,823
| 62
| 115
| 29.403226
| 0.800959
| 0.33955
| 0
| 0.117647
| 0
| 0.058824
| 0.077895
| 0
| 0
| 0
| 0
| 0.032258
| 0
| 1
| 0.235294
| false
| 0.117647
| 0.117647
| 0
| 0.529412
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
f72eb585890bafe8941f0c78a9d950477be13230
| 2,555
|
py
|
Python
|
backtrader/backtrader/indicators/__init__.py
|
harshabakku/live-back-testing-trader
|
1fd69c7598dc15bea740f160eed886f396bcba2c
|
[
"MIT"
] | 1
|
2021-07-14T22:04:08.000Z
|
2021-07-14T22:04:08.000Z
|
backtrader/backtrader/indicators/__init__.py
|
ajmal017/LiveBackTestingTrader
|
8b4f5804c0aa6046128f6706582f9cde78a0519a
|
[
"MIT"
] | null | null | null |
backtrader/backtrader/indicators/__init__.py
|
ajmal017/LiveBackTestingTrader
|
8b4f5804c0aa6046128f6706582f9cde78a0519a
|
[
"MIT"
] | 3
|
2021-03-07T16:29:40.000Z
|
2022-03-17T21:42:38.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015, 2016, 2017 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from backtrader import Indicator
from backtrader.functions import *
# The modules below should/must define __all__ with the Indicator objects
# of prepend an "_" (underscore) to private classes/variables
from .basicops import *
# base for moving averages
from .mabase import *
# moving averages (so envelope and oscillators can be auto-generated)
from .sma import *
from .ema import *
from .smma import *
from .wma import *
from .dema import *
from .kama import *
from .zlema import *
from .hma import *
from .zlind import *
from .dma import *
# depends on moving averages
from .deviation import *
# depend on basicops, moving averages and deviations
from .atr import *
from .aroon import *
from .bollinger import *
from .cci import *
from .crossover import *
from .dpo import *
from .directionalmove import *
from .envelope import *
from .heikinashi import *
from .lrsi import *
from .macd import *
from .momentum import *
from .oscillator import *
from .percentchange import *
from .percentrank import *
from .pivotpoint import *
from .prettygoodoscillator import *
from .priceoscillator import *
from .psar import *
from .rsi import *
from .stochastic import *
from .trix import *
from .tsi import *
from .ultimateoscillator import *
from .williams import *
from .rmi import *
from .awesomeoscillator import *
from .accdecoscillator import *
from .dv2 import * # depends on percentrank
# Depends on Momentum
from .kst import *
from .ichimoku import *
from .hurst import *
from .ols import *
from .hadelta import *
| 28.076923
| 79
| 0.699413
| 331
| 2,555
| 5.362538
| 0.501511
| 0.230986
| 0.021972
| 0.032113
| 0.046197
| 0.031549
| 0
| 0
| 0
| 0
| 0
| 0.007529
| 0.168297
| 2,555
| 90
| 80
| 28.388889
| 0.827765
| 0.417221
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.980392
| 0
| 0.980392
| 0.019608
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f733fdfd6251a8d71a648d7c85c3dac02509dfc4
| 75
|
py
|
Python
|
cumulogenesis.py
|
stelligent/cumulogenesis
|
f5a3587aebd2592642c98cb4ad93d52a927dceeb
|
[
"MIT"
] | 1
|
2021-03-22T21:50:10.000Z
|
2021-03-22T21:50:10.000Z
|
cumulogenesis.py
|
stelligent/cumulogenesis
|
f5a3587aebd2592642c98cb4ad93d52a927dceeb
|
[
"MIT"
] | 1
|
2021-03-25T22:23:04.000Z
|
2021-03-25T22:23:04.000Z
|
cumulogenesis.py
|
stelligent/cumulogenesis
|
f5a3587aebd2592642c98cb4ad93d52a927dceeb
|
[
"MIT"
] | 1
|
2019-04-03T19:09:34.000Z
|
2019-04-03T19:09:34.000Z
|
#!/usr/bin/env python
from cumulogenesis.interfaces import cli
cli.run()
| 12.5
| 40
| 0.76
| 11
| 75
| 5.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 75
| 5
| 41
| 15
| 0.863636
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f78df0be4fb31a9f76737c561c3fe76708dbdcd5
| 187
|
py
|
Python
|
biopipen/core/defaults.py
|
pwwang/bioprocs
|
4055a62eed8ef4fba0a5f1be430af72a9e22143d
|
[
"MIT"
] | 4
|
2018-01-16T08:25:53.000Z
|
2019-01-03T23:41:31.000Z
|
biopipen/core/defaults.py
|
pwwang/bioprocs
|
4055a62eed8ef4fba0a5f1be430af72a9e22143d
|
[
"MIT"
] | 3
|
2018-05-22T20:11:46.000Z
|
2019-08-19T17:37:04.000Z
|
biopipen/core/defaults.py
|
pwwang/bioprocs
|
4055a62eed8ef4fba0a5f1be430af72a9e22143d
|
[
"MIT"
] | 1
|
2019-01-14T23:14:24.000Z
|
2019-01-14T23:14:24.000Z
|
"""Provide default settgins"""
from pathlib import Path
BIOPIPEN_DIR = Path(__file__).parent.parent.resolve()
REPORT_DIR = BIOPIPEN_DIR / "reports"
SCRIPT_DIR = BIOPIPEN_DIR / "scripts"
| 26.714286
| 53
| 0.770053
| 24
| 187
| 5.625
| 0.666667
| 0.244444
| 0.207407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112299
| 187
| 6
| 54
| 31.166667
| 0.813253
| 0.128342
| 0
| 0
| 0
| 0
| 0.089172
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e38df443614ff2ea0fe09c328aa447f49ee9a8df
| 146
|
py
|
Python
|
pythonic_binance/__init__.py
|
hANSIc99/pythonic-binance
|
df25353cc20f545224d97a34544844029dabe4ce
|
[
"MIT"
] | 1
|
2020-12-23T03:20:01.000Z
|
2020-12-23T03:20:01.000Z
|
pythonic_binance/__init__.py
|
hANSIc99/pythonic-binance
|
df25353cc20f545224d97a34544844029dabe4ce
|
[
"MIT"
] | null | null | null |
pythonic_binance/__init__.py
|
hANSIc99/pythonic-binance
|
df25353cc20f545224d97a34544844029dabe4ce
|
[
"MIT"
] | null | null | null |
"""An unofficial Python wrapper for the Binance exchange API v3
.. moduleauthor:: Sam McHardy
.. modified by Stephan Avenwedde for Pythonic
"""
| 20.857143
| 63
| 0.753425
| 19
| 146
| 5.789474
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008197
| 0.164384
| 146
| 6
| 64
| 24.333333
| 0.893443
| 0.938356
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e39b51664f30f25e2e70980af59a04bbf06d0208
| 10,685
|
py
|
Python
|
script/study/sedov/sedov_main_function.py
|
will-iam/Variant
|
5b6732134fd51cf6c2b90b51b7976be0693ba28d
|
[
"MIT"
] | 8
|
2017-05-04T07:50:02.000Z
|
2019-05-17T02:27:20.000Z
|
script/study/sedov/sedov_main_function.py
|
will-iam/Variant
|
5b6732134fd51cf6c2b90b51b7976be0693ba28d
|
[
"MIT"
] | null | null | null |
script/study/sedov/sedov_main_function.py
|
will-iam/Variant
|
5b6732134fd51cf6c2b90b51b7976be0693ba28d
|
[
"MIT"
] | null | null | null |
#Main Sedov Code Module
#Ported to python from fortran code written by James R Kamm and F X Timmes
#Original Paper and code found at http://cococubed.asu.edu/papers/la-ur-07-2849.pdf
import numpy as np
from globalvars import comvars as gv
from sedov_1d import sed_1d
from sedov_1d_time import sed_1d_time
from matplotlib import pyplot as plt
import pickle
gv.its = 20
# define sedov_main as a function
def sedov_main(geom_in, omega_in, time_in, blast_energy, gamma_in, outfile):
##Explicitly set variables
##Standard Cases
##Spherical constant density should reach r=1 at t=1
nstep = 12000
eblast = blast_energy
gv.xgeom = geom_in
gv.omega = omega_in
#outputfile = ??????
##input parameters
time = time_in
rho0 = 1.225E0
vel0 = 0.0E0
ener0 = 0.0E0
pres0 = 0.0E0
cs0 = 342.3E0
gv.gamma = gamma_in
##number of grid points, spatial domain, spatial stepsize.
##to match hydrocode output, use the mid-sell points.
#zpos = array of spatial points
zlo = 0.0E0
zhi = 1.2E3
zstep = (zhi - zlo)/float(nstep)
zpos = np.arange(zlo + zstep, zhi + zstep, zstep)
den, vel, pres, enertot, enertherm, enerkin, mach, zpos = sed_1d(time, nstep, zpos, eblast, rho0, vel0, ener0, pres0, cs0, gv)
#create final dictionary to pickle
###dictionary is a flexible array
single_time_output = {'density': den, 'velocity': vel, 'pressure': pres,
'total_energy': enertot, 'thermal_energy': enertherm,
'kinetic_energy': enerkin, 'mach': mach, 'position': zpos}
#open file, pickle and dump data, close file
output = open(outfile, 'wb')
pickle.dump(single_time_output, output)
output.close()
#plot outputs vss position
#zmax controls the maximum of the x-axis on the graphs.
zmax = 1.5 * gv.r2
plt.plot(zpos, den)
plt.axis([0, zmax, 0, max(den)])
plt.title('Density vs. Position')
plt.ylabel('Density (kg/m^3)')
plt.xlabel('Position (m)')
plt.show()
plt.plot(zpos, vel)
plt.axis([0, zmax, 0, max(vel)])
plt.title('Velocity vs. Position')
plt.ylabel('Velocity (m/s)')
plt.xlabel('Position (m)')
plt.show()
plt.plot(zpos, pres)
plt.axis([0, zmax, 0, max(pres)])
plt.title('Pressure vs. Position')
plt.ylabel('Pressure (Pa)')
plt.xlabel('Position (m)')
plt.show()
plt.plot(zpos, enertot)
plt.axis([0, zmax, 0, max(enertot)])
plt.title('Total Energy vs. Position')
plt.ylabel('Energy (J)')
plt.xlabel('Position (m)')
plt.show()
plt.plot(zpos, enertherm)
plt.axis([0, zmax, 0, max(enertherm)])
plt.title('Thermal Energy vs. Position')
plt.ylabel('Energy (J)')
plt.xlabel('Position (m)')
plt.show()
plt.plot(zpos, enerkin)
plt.axis([0, zmax, 0, max(enerkin)])
plt.title('Kinetic Energy vs. Position')
plt.ylabel('Energy (J)')
plt.xlabel('Position (m)')
plt.show()
plt.plot(zpos, mach)
plt.axis([0, zmax, 0, max(mach)])
plt.title('Mach Number vs. Position')
plt.ylabel('Mach Number')
plt.xlabel('Position (m)')
plt.show()
#final graph plots scaled density, pressure and velocity one one plot.
plt.plot(zpos, den/max(den), 'b', label = 'Density')
plt.plot(zpos, pres/max(pres), 'g', label = 'Pressure')
plt.plot(zpos, vel/max(vel), 'r', label = 'Velocity')
plt.axis([0, zmax, 0, 1])
plt.legend(loc = 'upper left')
plt.title('Scaled Density, Pressure, and Velocity')
plt.ylabel('Scaled Value (x/max(x))')
plt.xlabel('Position (m)')
plt.show()
#define function to produce results at different points in time instead of sedov_1d
def sedov_main_time(geom_in, omega_in, time_initial, time_final, time_steps, blast_energy, gamma_in, outfile):
##Explicitly set variables
##Standard Cases
##Spherical constant density should reach r=1 at t=1
nstep = 12000
eblast = blast_energy
gv.xgeom = geom_in
gv.omega = omega_in
#outputfile = ??????
##input parameters
rho0 = 1.225E0
vel0 = 0.0E0
ener0 = 0.0E0
pres0 = 0.0E0
cs0 = 342.3E0
gv.gamma = gamma_in
##number of grid points, spatial domain, spatial stepsize.
##to match hydrocode output, use the mid-sell points.
#zpos = array of spatial points
zlo = 0.0E0
zhi = 3.0E2
zstep = (zhi - zlo)/float(nstep)
zposition = np.arange(zlo + zstep, zhi + zstep, zstep)
den_time, vel_time, pres_time, enertot_time, enertherm_time, enerkin_time, mach_time, zpos_time, time = sed_1d_time(time_initial, time_final, time_steps, nstep, zposition, eblast, rho0, vel0, ener0, pres0, cs0, gv)
#create final dictionary to pickle
###dictionary is flexible array
time_step_output = {'density': den_time, 'velocity': vel_time, 'pressure': pres_time,
'total_energy': enertot_time, 'thermal_energy': enertherm_time,
'kinetic_energy': enerkin_time, 'mach': mach_time,
'position': zpos_time, 'time': time}
#open file, pickle and dump data, close file
output = open(outfile, 'wb')
pickle.dump(time_step_output, output)
output.close()
#zmax controls the maximum of the x-axis on the graphs.
zmax = 1.5 * gv.r2
# for loops graph a plot for each time step in the final soulution
for i in range(0, time_steps):
plt.plot(zpos_time[i], den_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Density vs. Position')
plt.ylabel('Density (kg/m^3)')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
for i in range(0, time_steps):
plt.plot(zpos_time[i], vel_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Velocity vs. Position')
plt.ylabel('Velocity (m/s)')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
for i in range(0, time_steps):
plt.plot(zpos_time[i], pres_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Pressure vs. Position')
plt.ylabel('Pressure (Pa)')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
for i in range(0, time_steps):
plt.plot(zpos_time[i], enertot_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Total Energy vs. Position')
plt.ylabel('Energy (J)')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
for i in range(0, time_steps):
plt.plot(zpos_time[i], enertherm_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Thermal Energy vs. Position')
plt.ylabel('Energy (J)')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
for i in range(0, time_steps):
plt.plot(zpos_time[i], enerkin_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Kinetic Energy vs. Position')
plt.ylabel('Energy (J)')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
for i in range(0, time_steps):
plt.plot(zpos_time[i], mach_time[i], label = 't=' + str(time[i]))
plt.xlim([0, zmax])
plt.title('Mach Number vs. Position')
plt.ylabel('Mach Number')
plt.xlabel('Position (m)')
plt.legend(loc = 'upper right', fontsize = 10)
plt.show()
#final graph plots scaled density, pressure and velocity one one plot.
# plt.plot(zpos, den/max(den), 'b', label = 'Density')
# plt.plot(zpos, pres/max(pres), 'g', label = 'Pressure')
# plt.plot(zpos, vel/max(vel), 'r', label = 'Velocity')
# plt.axis([0, zmax, 0, 1])
# plt.legend(loc = 'upper left')
# plt.title('Scaled Density, Pressure, and Velocity')
# plt.ylabel('Scaled Value (x/max(x))')
# plt.xlabel('Position (m)')
# plt.show()
| 44.3361
| 232
| 0.467759
| 1,181
| 10,685
| 4.156647
| 0.160881
| 0.021389
| 0.044816
| 0.058668
| 0.759014
| 0.744347
| 0.709717
| 0.709717
| 0.69668
| 0.687513
| 0
| 0.025028
| 0.420402
| 10,685
| 240
| 233
| 44.520833
| 0.767641
| 0.179504
| 0
| 0.67284
| 0
| 0
| 0.120954
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.012346
| false
| 0
| 0.037037
| 0
| 0.049383
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e3a0f222ef753f195c708bec4e9a91e2e4562806
| 34,106
|
py
|
Python
|
web_console_v2/api/testing/workflow_template/psi_join_tree_model_no_label.py
|
chen1i/fedlearner
|
981514dadbd0aa49ae87d185dd247d310e35605c
|
[
"Apache-2.0"
] | null | null | null |
web_console_v2/api/testing/workflow_template/psi_join_tree_model_no_label.py
|
chen1i/fedlearner
|
981514dadbd0aa49ae87d185dd247d310e35605c
|
[
"Apache-2.0"
] | null | null | null |
web_console_v2/api/testing/workflow_template/psi_join_tree_model_no_label.py
|
chen1i/fedlearner
|
981514dadbd0aa49ae87d185dd247d310e35605c
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2020 The FedLearner 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.
# coding: utf-8
import json
from google.protobuf.json_format import MessageToDict
from fedlearner_webconsole.proto.workflow_definition_pb2 import (
WorkflowDefinition, JobDefinition, JobDependency
)
from fedlearner_webconsole.proto.common_pb2 import (
Variable
)
def make_workflow_template():
workflow = WorkflowDefinition(
group_alias='psi_join_tree_model',
is_left=True,
variables=[
Variable(
name='image_version',
value='v1.5-rc3',
access_mode=Variable.PEER_READABLE),
Variable(
name='num_partitions',
value='2',
access_mode=Variable.PEER_WRITABLE),
],
job_definitions=[
JobDefinition(
name='raw-data-job',
job_type=JobDefinition.RAW_DATA,
is_federated=False,
is_manual=False,
variables=[
Variable(
name='input_dir',
value='/app/deploy/integrated_test/tfrecord_raw_data',
access_mode=Variable.PRIVATE),
Variable(
name='file_wildcard',
value='*.rd',
access_mode=Variable.PRIVATE),
Variable(
name='batch_size',
value='1024',
access_mode=Variable.PEER_WRITABLE),
Variable(
name='input_format',
value='TF_RECORD',
access_mode=Variable.PRIVATE),
Variable(
name='worker_cpu',
value='2000m',
access_mode=Variable.PEER_WRITABLE),
Variable(
name='worker_mem',
value='4Gi',
access_mode=Variable.PEER_WRITABLE),
],
yaml_template='''{
"apiVersion": "fedlearner.k8s.io/v1alpha1",
"kind": "FLApp",
"metadata": {
"name": "${workflow.jobs.raw-data-job.name}",
"namespace": "${project.variables.namespace}"
},
"spec": {
"cleanPodPolicy": "All",
"flReplicaSpecs": {
"Master": {
"template": {
"spec": {
"containers": [
{
"resources": {
"limits": {
"cpu": "1000m",
"memory": "2Gi"
},
"requests": {
"cpu": "1000m",
"memory": "2Gi"
}
},
"image": "artifact.bytedance.com/fedlearner/fedlearner:${workflow.variables.image_version}",
"ports": [
{
"containerPort": 50051,
"name": "flapp-port"
}
],
"command": [
"/app/deploy/scripts/data_portal/run_data_portal_master.sh"
],
"args": [],
"env": [
${system.basic_envs},
{
"name": "EGRESS_URL",
"value": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80"
},
{
"name": "EGRESS_HOST",
"value": "${project.participants[0].egress_host}"
},
{
"name": "EGRESS_DOMAIN",
"value": "${project.participants[0].egress_domain}"
},
{
"name": "STORAGE_ROOT_PATH",
"value": "${project.variables.storage_root_dir}"
},
{
"name": "APPLICATION_ID",
"value": "${workflow.jobs.raw-data-job.name}"
},
{
"name": "DATA_PORTAL_NAME",
"value": "${workflow.jobs.raw-data-job.name}"
},
{
"name": "OUTPUT_PARTITION_NUM",
"value": "${workflow.variables.num_partitions}"
},
{
"name": "INPUT_BASE_DIR",
"value": "${workflow.jobs.raw-data-job.variables.input_dir}"
},
{
"name": "OUTPUT_BASE_DIR",
"value": "${project.variables.storage_root_dir}/raw_data/${workflow.jobs.raw-data-job.name}"
},
{
"name": "RAW_DATA_PUBLISH_DIR",
"value": "portal_publish_dir/${workflow.jobs.raw-data-job.name}"
},
{
"name": "DATA_PORTAL_TYPE",
"value": "PSI"
},
{
"name": "FILE_WILDCARD",
"value": "${workflow.jobs.raw-data-job.variables.file_wildcard}"
}
],
"volumeMounts": [
{
"mountPath": "/data",
"name": "data"
}
],
"imagePullPolicy": "IfNotPresent",
"name": "tensorflow"
}
],
"imagePullSecrets": [
{
"name": "regcred"
}
],
"volumes": [
{
"persistentVolumeClaim": {
"claimName": "pvc-fedlearner-default"
},
"name": "data"
}
],
"restartPolicy": "Never"
}
},
"pair": false,
"replicas": 1
},
"Worker": {
"replicas": ${workflow.variables.num_partitions},
"template": {
"spec": {
"containers": [
{
"resources": {
"limits": {
"cpu": "${workflow.jobs.raw-data-job.variables.worker_cpu}",
"memory": "${workflow.jobs.raw-data-job.variables.worker_mem}"
},
"requests": {
"cpu": "${workflow.jobs.raw-data-job.variables.worker_cpu}",
"memory": "${workflow.jobs.raw-data-job.variables.worker_mem}"
}
},
"image": "artifact.bytedance.com/fedlearner/fedlearner:${workflow.variables.image_version}",
"command": [
"/app/deploy/scripts/data_portal/run_data_portal_worker.sh"
],
"args": [],
"env": [
${system.basic_envs},
{
"name": "EGRESS_URL",
"value": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80"
},
{
"name": "EGRESS_HOST",
"value": "${project.participants[0].egress_host}"
},
{
"name": "EGRESS_DOMAIN",
"value": "${project.participants[0].egress_domain}"
},
{
"name": "STORAGE_ROOT_PATH",
"value": "${project.variables.storage_root_dir}"
},
{
"name": "APPLICATION_ID",
"value": "${workflow.jobs.raw-data-job.name}"
},
{
"name": "BATCH_SIZE",
"value": "${workflow.jobs.raw-data-job.variables.batch_size}"
},
{
"name": "INPUT_DATA_FORMAT",
"value": "${workflow.jobs.raw-data-job.variables.input_format}"
},
{
"name": "COMPRESSED_TYPE",
"value": ""
},
{
"name": "OUTPUT_DATA_FORMAT",
"value": "TF_RECORD"
}
],
"volumeMounts": [
{
"mountPath": "/data",
"name": "data"
}
],
"imagePullPolicy": "IfNotPresent",
"name": "tensorflow"
}
],
"imagePullSecrets": [
{
"name": "regcred"
}
],
"volumes": [
{
"persistentVolumeClaim": {
"claimName": "pvc-fedlearner-default"
},
"name": "data"
}
],
"restartPolicy": "Never"
}
},
"pair": false
}
}
}
}
'''
),
JobDefinition(
name='data-join-job',
job_type=JobDefinition.PSI_DATA_JOIN,
is_federated=True,
is_manual=False,
variables=[
Variable(
name='worker_cpu',
value='4000m',
access_mode=Variable.PEER_WRITABLE),
Variable(
name='worker_mem',
value='4Gi',
access_mode=Variable.PEER_WRITABLE),
Variable(
name='rsa_public_key_path',
value='',
access_mode=Variable.PRIVATE),
],
dependencies=[
JobDependency(source='raw-data-job')
],
yaml_template='''
{
"apiVersion": "fedlearner.k8s.io/v1alpha1",
"kind": "FLApp",
"metadata": {
"name": "${workflow.jobs.data-join-job.name}",
"namespace": "${project.variables.namespace}"
},
"spec": {
"role": "Follower",
"cleanPodPolicy": "All",
"peerSpecs": {
"Follower": {
"peerURL": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80",
"authority": "${project.participants[0].egress_domain}",
"extraHeaders": {
"x-host": "default.fedlearner.operator"
}
}
},
"flReplicaSpecs": {
"Master": {
"template": {
"spec": {
"restartPolicy": "Never",
"containers": [
{
"env": [
${system.basic_envs},
{
"name": "EGRESS_URL",
"value": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80"
},
{
"name": "EGRESS_HOST",
"value": "${project.participants[0].egress_host}"
},
{
"name": "EGRESS_DOMAIN",
"value": "${project.participants[0].egress_domain}"
},
{
"name": "APPLICATION_ID",
"value": "${workflow.jobs.data-join-job.name}"
},
{
"name": "STORAGE_ROOT_PATH",
"value": "${project.variables.storage_root_dir}"
},
{
"name": "ROLE",
"value": "follower"
},
{
"name": "RAW_DATA_SUB_DIR",
"value": "portal_publish_dir/${workflow.jobs.raw-data-job.name}"
},
{
"name": "OUTPUT_BASE_DIR",
"value": "${project.variables.storage_root_dir}/data_source/${workflow.jobs.data-join-job.name}"
},
{
"name": "PARTITION_NUM",
"value": "${workflow.variables.num_partitions}"
},
{
"name": "START_TIME",
"value": "0"
},
{
"name": "END_TIME",
"value": "999999999999"
},
{
"name": "NEGATIVE_SAMPLING_RATE",
"value": "1.0"
}
],
"imagePullPolicy": "IfNotPresent",
"name": "tensorflow",
"volumeMounts": [
{
"mountPath": "/data",
"name": "data"
}
],
"image": "artifact.bytedance.com/fedlearner/fedlearner:${workflow.variables.image_version}",
"ports": [
{
"containerPort": 50051,
"name": "flapp-port"
}
],
"command": [
"/app/deploy/scripts/wait4pair_wrapper.sh"
],
"args": [
"/app/deploy/scripts/rsa_psi/run_psi_data_join_master.sh"
],
"resources": {
"limits": {
"cpu": "2000m",
"memory": "3Gi"
},
"requests": {
"cpu": "2000m",
"memory": "3Gi"
}
},
}
],
"imagePullSecrets": [
{
"name": "regcred"
}
],
"volumes": [
{
"persistentVolumeClaim": {
"claimName": "pvc-fedlearner-default"
},
"name": "data"
}
]
}
},
"pair": true,
"replicas": 1
},
"Worker": {
"template": {
"spec": {
"restartPolicy": "Never",
"containers": [
{
"env": [
${system.basic_envs},
{
"name": "EGRESS_URL",
"value": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80"
},
{
"name": "EGRESS_HOST",
"value": "${project.participants[0].egress_host}"
},
{
"name": "EGRESS_DOMAIN",
"value": "${project.participants[0].egress_domain}"
},
{
"name": "STORAGE_ROOT_PATH",
"value": "${project.variables.storage_root_dir}"
},
{
"name": "APPLICATION_ID",
"value": "${workflow.jobs.data-join-job.name}"
},
{
"name": "ROLE",
"value": "follower"
},
{
"name": "OUTPUT_BASE_DIR",
"value": "${project.variables.storage_root_dir}/data_source/${workflow.jobs.data-join-job.name}"
},
{
"name": "RSA_KEY_PATH",
"value": "${workflow.jobs.data-join-job.rsa_public_key_path}"
},
{
"name": "PSI_RAW_DATA_ITER",
"value": "TF_RECORD"
},
{
"name": "PSI_OUTPUT_BUILDER",
"value": "TF_RECORD"
},
{
"name": "DATA_BLOCK_BUILDER",
"value": "TF_RECORD"
},
{
"name": "DATA_BLOCK_DUMP_INTERVAL",
"value": "600"
},
{
"name": "DATA_BLOCK_DUMP_THRESHOLD",
"value": "524288"
},
{
"name": "EXAMPLE_ID_DUMP_INTERVAL",
"value": "600"
},
{
"name": "EXAMPLE_ID_DUMP_THRESHOLD",
"value": "524288"
},
{
"name": "EXAMPLE_JOINER",
"value": "SORT_RUN_JOINER"
},
{
"name": "SIGN_RPC_TIMEOUT_MS",
"value": "128000"
},
{
"name": "PARTITION_NUM",
"value": "${workflow.variables.num_partitions}"
},
{
"name": "RAW_DATA_SUB_DIR",
"value": "portal_publish_dir/${workflow.jobs.raw-data-job.name}"
}
],
"imagePullPolicy": "IfNotPresent",
"name": "tensorflow",
"volumeMounts": [
{
"mountPath": "/data",
"name": "data"
}
],
"image": "artifact.bytedance.com/fedlearner/fedlearner:${workflow.variables.image_version}",
"ports": [
{
"containerPort": 50051,
"name": "flapp-port"
}
],
"command": [
"/app/deploy/scripts/wait4pair_wrapper.sh"
],
"args": [
"/app/deploy/scripts/rsa_psi/run_psi_data_join_worker.sh"
],
"resources": {
"limits": {
"cpu": "${workflow.jobs.data-join-job.variables.worker_cpu}",
"memory": "${workflow.jobs.data-join-job.variables.worker_mem}"
},
"requests": {
"cpu": "${workflow.jobs.data-join-job.variables.worker_cpu}",
"memory": "${workflow.jobs.data-join-job.variables.worker_mem}"
}
}
}
],
"imagePullSecrets": [
{
"name": "regcred"
}
],
"volumes": [
{
"persistentVolumeClaim": {
"claimName": "pvc-fedlearner-default"
},
"name": "data"
}
]
}
},
"pair": true,
"replicas": ${workflow.variables.num_partitions}
}
}
}
}
'''
),
JobDefinition(
name='train-job',
job_type=JobDefinition.TREE_MODEL_TRAINING,
is_federated=True,
is_manual=False,
variables=[
Variable(
name='worker_cpu',
value='4000m',
access_mode=Variable.PEER_WRITABLE),
Variable(
name='worker_mem',
value='8Gi',
access_mode=Variable.PEER_WRITABLE),
Variable(
name='num_parallel',
value='4',
access_mode=Variable.PEER_WRITABLE),
],
dependencies=[
JobDependency(source='data-join-job')
],
yaml_template='''
{
"apiVersion": "fedlearner.k8s.io/v1alpha1",
"kind": "FLApp",
"metadata": {
"name": "${workflow.jobs.train-job.name}",
"namespace": "${project.variables.namespace}"
},
"spec": {
"role": "Follower",
"cleanPodPolicy": "All",
"peerSpecs": {
"Leader": {
"peerURL": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80",
"authority": "${project.participants[0].egress_domain}",
"extraHeaders": {
"x-host": "default.fedlearner.operator"
}
}
},
"flReplicaSpecs": {
"Worker": {
"template": {
"spec": {
"restartPolicy": "Never",
"containers": [
{
"env": [
${system.basic_envs},
{
"name": "EGRESS_URL",
"value": "fedlearner-stack-ingress-nginx-controller.default.svc.cluster.local:80"
},
{
"name": "EGRESS_HOST",
"value": "${project.participants[0].egress_host}"
},
{
"name": "EGRESS_DOMAIN",
"value": "${project.participants[0].egress_domain}"
},
{
"name": "APPLICATION_ID",
"value": "${workflow.jobs.train-job.name}"
},
{
"name": "STORAGE_ROOT_PATH",
"value": "${project.variables.storage_root_dir}"
},
{
"name": "ROLE",
"value": "follower"
},
{
"name": "OUTPUT_BASE_DIR",
"value": "${project.variables.storage_root_dir}/job_output/${workflow.jobs.train-job.name}"
},
{
"name": "MODE",
"value": "train"
},
{
"name": "NUM_PARALLEL",
"value": "${workflow.jobs.train-job.variables.num_parallel}"
},
{
"name": "DATA_SOURCE",
"value": "${workflow.jobs.data-join-job.name}"
}
],
"imagePullPolicy": "IfNotPresent",
"name": "tensorflow",
"volumeMounts": [
{
"mountPath": "/data",
"name": "data"
}
],
"image": "artifact.bytedance.com/fedlearner/fedlearner:${workflow.variables.image_version}",
"ports": [
{
"containerPort": 50051,
"name": "flapp-port"
}
],
"command": [
"/app/deploy/scripts/wait4pair_wrapper.sh"
],
"args": [
"/app/deploy/scripts/trainer/run_tree_worker.sh"
],
"resources": {
"limits": {
"cpu": "${workflow.jobs.train-job.variables.worker_cpu}",
"memory": "${workflow.jobs.train-job.variables.worker_mem}"
},
"requests": {
"cpu": "${workflow.jobs.train-job.variables.worker_cpu}",
"memory": "${workflow.jobs.train-job.variables.worker_mem}"
}
}
}
],
"imagePullSecrets": [
{
"name": "regcred"
}
],
"volumes": [
{
"persistentVolumeClaim": {
"claimName": "pvc-fedlearner-default"
},
"name": "data"
}
]
}
},
"pair": true,
"replicas": 1
}
}
}
}
'''
)
])
return workflow
if __name__ == '__main__':
print(json.dumps(MessageToDict(
make_workflow_template(),
preserving_proto_field_name=True,
including_default_value_fields=True)))
| 46.592896
| 136
| 0.27306
| 1,590
| 34,106
| 5.674843
| 0.172327
| 0.046548
| 0.019949
| 0.033692
| 0.763604
| 0.738225
| 0.69744
| 0.655325
| 0.633381
| 0.612213
| 0
| 0.012519
| 0.636985
| 34,106
| 731
| 137
| 46.656635
| 0.716259
| 0.017446
| 0
| 0.525352
| 0
| 0.015493
| 0.886942
| 0.146406
| 0
| 0
| 0
| 0
| 0
| 1
| 0.001408
| false
| 0
| 0.005634
| 0
| 0.008451
| 0.001408
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 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
| 4
|
e3a71e4692cca720e8c9165426c410f3c3fef261
| 396
|
py
|
Python
|
OpenDataCatalog/suggestions/urls.py
|
timwis/Open-Data-Catalog
|
0ccdc71f28773508c337875fd32478dd4324a50c
|
[
"MIT"
] | 3
|
2016-08-07T17:25:56.000Z
|
2019-11-12T00:51:14.000Z
|
suggestions/urls.py
|
opensandiego/Open-Data-Catalog
|
06f93bab36d22431ff86a87faea4e388d0491846
|
[
"MIT"
] | 1
|
2021-04-17T10:52:53.000Z
|
2021-04-17T10:52:53.000Z
|
suggestions/urls.py
|
opensandiego/Open-Data-Catalog
|
06f93bab36d22431ff86a87faea4e388d0491846
|
[
"MIT"
] | 2
|
2016-10-28T14:20:27.000Z
|
2021-04-17T10:52:28.000Z
|
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
(r'^$', 'suggestions.views.list_all'),
(r'^post/$', 'suggestions.views.add_suggestion'),
(r'^vote/(?P<suggestion_id>.*)/$', 'suggestions.views.add_vote'),
(r'^unvote/(?P<suggestion_id>.*)/$', 'suggestions.views.remove_vote'),
(r'^close/(?P<suggestion_id>.*)/$', 'suggestions.views.close'),
)
| 39.6
| 73
| 0.659091
| 48
| 396
| 5.291667
| 0.5
| 0.314961
| 0.153543
| 0.283465
| 0.34252
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 396
| 9
| 74
| 44
| 0.705556
| 0
| 0
| 0
| 0
| 0
| 0.593434
| 0.570707
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e3abcdda55715b1f38a3a0acd05e2b4c08e37048
| 3,509
|
py
|
Python
|
biosignalsnotebooks/build/lib/biosignalsnotebooks/__init__.py
|
csavur/biosignalsnotebooks
|
c99596741a854c58bdefb429906023ac48ddc3b7
|
[
"MIT"
] | 1
|
2020-06-26T05:05:11.000Z
|
2020-06-26T05:05:11.000Z
|
biosignalsnotebooks/build/lib/biosignalsnotebooks/__init__.py
|
csavur/biosignalsnotebooks
|
c99596741a854c58bdefb429906023ac48ddc3b7
|
[
"MIT"
] | null | null | null |
biosignalsnotebooks/build/lib/biosignalsnotebooks/__init__.py
|
csavur/biosignalsnotebooks
|
c99596741a854c58bdefb429906023ac48ddc3b7
|
[
"MIT"
] | null | null | null |
"""
OPENSIGNALSFACTORY PACKAGE INITIALISATION FILE (WITH IMPORT STATEMENTS)
The main purpose of biosignalsnotebooks package is to support the users of PLUX acquisition
devices, such as biosgnalsplux or bitalino, in some processing tasks that can be applied to the
acquired electrophysiological signals, namely ECG, EMG...
This package had been developed as part of the "OpenSignals Tools" project, that offers a set of
Jupyter Notebooks (tutorials) where it is explained step by step how the user can execute the
previously mentioned processing tasks (such as detection of muscular activation from EMG signal,
determination of each cardiac cycle duration from an ECG acquisition or monitoring fatigue by
generating EMG median power frequency evolution time series).
At the end of each Notebook is referred the correspondent biosignalsnotebooks function that synthesises
the processing functionality presented step by step.
In spite of being 'part' of an integrate solution for OpenSignals users, this package can be used
independently.
Package Documentation
---------------------
The docstring presented as the initial statement of each module function will help the user to
correctly and effectively use all biosignalsnotebooks functions.
A full guide that collects all the function docstring is available for download at:
...
OpenSignals Tools Project Repository
------------------------------------
More information's about the project and the respective files are available at:
https://github.com/biosignalsplux/biosignalsnotebooks
Available Modules
-----------------
aux_functions
Includes a set of auxiliary functions that are invoked in other biosignalsnotebooks modules.
This module has a 'private' classification, i.e., it was not specially designed for users.
__notebook_support__
Set of functions invoked in OpenSignals Tools Notebooks to present some graphical results.
These function are only designed for a single end, but we made them available to the user if he
want to explore graphical functionalities in an example format.
conversion
Module responsible for the definition of functions that convert Raw units (available in the
acquisition files returned by OpenSignals) and sample units to physical units like mV, A, ºC,
s,..., accordingly to the sensor under analysis.
detect
Contains functions intended to detect events on electrophysiological signals.
extract
Ensures to the user that he can extract multiple parameters from a specific electrophysiological
signal at once.
open
Module dedicated to read/load data from .txt and .h5 files generated by OpenSignals.
With the available functions the user can easily access data inside files (signal samples)
together with the metadata in the file header.
process
Processing capabilities that are more general than the categories of the remaining modules.
signal_samples
A module that gives an easy access to the biosignalsnotebooks dataset/library of signals (used in
OpenSignals Tools Notebooks).
visualise
Graphical data representation functions based on the application of Bokeh main functionalities.
/\
"""
from .conversion import *
from .detect import *
from .extract import *
from .load import *
from .process import *
from .visualise import *
from .signal_samples import *
from .factory import *
from .synchronisation import *
from .train_and_classify import *
from .__notebook_support__ import *
from .synchronisation import *
# 11/10/2018 16h45m :)
| 43.320988
| 103
| 0.785694
| 480
| 3,509
| 5.7125
| 0.46875
| 0.040117
| 0.016776
| 0.019694
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00442
| 0.161869
| 3,509
| 80
| 104
| 43.8625
| 0.927916
| 0.903961
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e3afe486c89ac3a00730c37ba0aa5141f39fe3fe
| 97
|
py
|
Python
|
test/integration/steps/pds.py
|
NHSDigital/list-reconciliation
|
37b1ebe99a64275e23b0e7fb6a89415b92d14306
|
[
"MIT"
] | 4
|
2021-06-25T08:28:54.000Z
|
2021-12-16T11:03:42.000Z
|
test/integration/steps/pds.py
|
NHSDigital/list-reconciliation
|
37b1ebe99a64275e23b0e7fb6a89415b92d14306
|
[
"MIT"
] | 184
|
2021-06-24T15:27:08.000Z
|
2022-03-17T12:44:28.000Z
|
test/integration/steps/pds.py
|
NHSDigital/list-reconciliation
|
37b1ebe99a64275e23b0e7fb6a89415b92d14306
|
[
"MIT"
] | 3
|
2021-11-05T10:21:44.000Z
|
2022-03-04T14:29:24.000Z
|
from behave import given
@given("we have processed PDS data")
def step_impl(context):
pass
| 13.857143
| 36
| 0.731959
| 15
| 97
| 4.666667
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185567
| 97
| 6
| 37
| 16.166667
| 0.886076
| 0
| 0
| 0
| 0
| 0
| 0.268041
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
e3f85ec084254dfe08068ef5fd90d188baae09d8
| 72
|
py
|
Python
|
barbarism.py
|
Matimed/Barbarism
|
4892092f24f314bc6cfacc1c780436dc59fc90ac
|
[
"MIT"
] | 2
|
2021-09-09T14:03:40.000Z
|
2021-11-03T03:35:55.000Z
|
barbarism.py
|
Matimed/Barbarism
|
4892092f24f314bc6cfacc1c780436dc59fc90ac
|
[
"MIT"
] | null | null | null |
barbarism.py
|
Matimed/Barbarism
|
4892092f24f314bc6cfacc1c780436dc59fc90ac
|
[
"MIT"
] | null | null | null |
import pygame as pg
pg.init()
from src.main import Main
main = Main()
| 10.285714
| 25
| 0.708333
| 13
| 72
| 3.923077
| 0.615385
| 0.313725
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.194444
| 72
| 6
| 26
| 12
| 0.87931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
541d99a0b05066f7ae098ca89430a31ca86b09cb
| 91,180
|
py
|
Python
|
4_Nback/Nback_practice_lastrun.py
|
Brinks0211/cognitive_paradigms_patients
|
30e3f8268e5c2b5ebfffcc4ebbcb46d8e60d039e
|
[
"MIT"
] | 2
|
2020-07-01T12:53:40.000Z
|
2020-07-01T13:30:23.000Z
|
4_Nback/Nback_practice_lastrun.py
|
Brinks0211/cognitive_paradigms_patients
|
30e3f8268e5c2b5ebfffcc4ebbcb46d8e60d039e
|
[
"MIT"
] | null | null | null |
4_Nback/Nback_practice_lastrun.py
|
Brinks0211/cognitive_paradigms_patients
|
30e3f8268e5c2b5ebfffcc4ebbcb46d8e60d039e
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2020.1.3),
on 六月 15, 2020, at 09:02
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK. (2019)
PsychoPy2: Experiments in behavior made easy Behav Res 51: 195.
https://doi.org/10.3758/s13428-018-01193-y
"""
from __future__ import absolute_import, division
from psychopy import locale_setup
from psychopy import prefs
from psychopy import sound, gui, visual, core, data, event, logging, clock
from psychopy.constants import (NOT_STARTED, STARTED, PLAYING, PAUSED,
STOPPED, FINISHED, PRESSED, RELEASED, FOREVER)
import numpy as np # whole numpy lib is available, prepend 'np.'
from numpy import (sin, cos, tan, log, log10, pi, average,
sqrt, std, deg2rad, rad2deg, linspace, asarray)
from numpy.random import random, randint, normal, shuffle
import os # handy system and path functions
import sys # to get file system encoding
from psychopy.hardware import keyboard
# Ensure that relative paths start from the same directory as this script
_thisDir = os.path.dirname(os.path.abspath(__file__))
os.chdir(_thisDir)
# Store info about the experiment session
psychopyVersion = '2020.1.3'
expName = 'Nback_Practice' # from the Builder filename that created this script
expInfo = {'participant': '', '姓名拼音': '', '男1/女2': '', '入院1/出院2': ''}
dlg = gui.DlgFromDict(dictionary=expInfo, sortKeys=False, title=expName)
if dlg.OK == False:
core.quit() # user pressed cancel
expInfo['date'] = data.getDateStr() # add a simple timestamp
expInfo['expName'] = expName
expInfo['psychopyVersion'] = psychopyVersion
# Data file name stem = absolute path + name; later add .psyexp, .csv, .log, etc
filename = _thisDir + os.sep + u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])
# An ExperimentHandler isn't essential but helps with data saving
thisExp = data.ExperimentHandler(name=expName, version='',
extraInfo=expInfo, runtimeInfo=None,
originPath='C:\\Users\\zhang\\Desktop\\张以昊\\课题组\\4_Nback\\Nback_practice_lastrun.py',
savePickle=True, saveWideText=True,
dataFileName=filename)
# save a log file for detail verbose info
logFile = logging.LogFile(filename+'.log', level=logging.EXP)
logging.console.setLevel(logging.WARNING) # this outputs to the screen, not a file
endExpNow = False # flag for 'escape' or other condition => quit the exp
frameTolerance = 0.001 # how close to onset before 'same' frame
# Start Code - component code to be run before the window creation
# Setup the Window
win = visual.Window(
size=[1024, 768], fullscr=False, screen=0,
winType='pyglet', allowGUI=True, allowStencil=False,
monitor='testMonitor', color=[0,0,0], colorSpace='rgb',
blendMode='avg', useFBO=True,
units='height')
# store frame rate of monitor if we can measure it
expInfo['frameRate'] = win.getActualFrameRate()
if expInfo['frameRate'] != None:
frameDur = 1.0 / round(expInfo['frameRate'])
else:
frameDur = 1.0 / 60.0 # could not measure, so guess
# create a default keyboard (e.g. to check for escape)
defaultKeyboard = keyboard.Keyboard()
# Initialize components for Routine "introduction1"
introduction1Clock = core.Clock()
introduction_1 = visual.TextStim(win=win, name='introduction_1',
text='欢迎参加测试\n\n本测试分三种类型\n现在是练习部分\n\n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
introduction1_2 = keyboard.Keyboard()
# Initialize components for Routine "introduction5"
introduction5Clock = core.Clock()
introduction_5 = visual.TextStim(win=win, name='introduction_5',
text='如果准备好了,请开始练习\n\n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp_7 = keyboard.Keyboard()
# Initialize components for Routine "tip1"
tip1Clock = core.Clock()
text_2 = visual.TextStim(win=win, name='text_2',
text='现在,练习第一种类型\n\n \n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp_4 = keyboard.Keyboard()
# Initialize components for Routine "introduction2"
introduction2Clock = core.Clock()
introduction2_1 = visual.TextStim(win=win, name='introduction2_1',
text='第一种类型\n\n开始时,屏幕中间会出现注视点“+”\n之后会连续出现一系列的数字\n\n在每个数字出现时\n您只需要按下空格键即可\n\n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
introduction2_2 = keyboard.Keyboard()
# Initialize components for Routine "_0back_pre"
_0back_preClock = core.Clock()
concentration_pre1 = visual.TextStim(win=win, name='concentration_pre1',
text='+',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
# Initialize components for Routine "_0back"
_0backClock = core.Clock()
back0_1 = visual.TextStim(win=win, name='back0_1',
text='default text',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp0 = keyboard.Keyboard()
message0=" "
# Initialize components for Routine "feedback_0"
feedback_0Clock = core.Clock()
text_3 = visual.TextStim(win=win, name='text_3',
text='default text',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
# Initialize components for Routine "tip2"
tip2Clock = core.Clock()
text = visual.TextStim(win=win, name='text',
text='现在,练习第二种类型\n\n(继续请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp_5 = keyboard.Keyboard()
# Initialize components for Routine "introduction3"
introduction3Clock = core.Clock()
introduction3_1 = visual.TextStim(win=win, name='introduction3_1',
text='第二种类型\n\n开始时,屏幕中间会出现注视点“+”\n之后会连续出现一系列的数字\n\n从第二个数字出现时\n您需要判断该数字与上一个数字是否一致\n一致,请按左键; 不一致,请按右键\n\n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
introduction3_2 = keyboard.Keyboard()
# Initialize components for Routine "_1back_pre"
_1back_preClock = core.Clock()
concentration1_pre = visual.TextStim(win=win, name='concentration1_pre',
text='+',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
back1_pre = visual.TextStim(win=win, name='back1_pre',
text='2\n(无需作答)',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=-1.0);
# Initialize components for Routine "_1back"
_1backClock = core.Clock()
back1_1 = visual.TextStim(win=win, name='back1_1',
text='default text',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp_2 = keyboard.Keyboard()
message1=0
# Initialize components for Routine "feedback_1"
feedback_1Clock = core.Clock()
feedback1 = visual.TextStim(win=win, name='feedback1',
text='default text',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
# Initialize components for Routine "tip3"
tip3Clock = core.Clock()
tip_3 = visual.TextStim(win=win, name='tip_3',
text='现在,练习第三种类型\n\n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp_6 = keyboard.Keyboard()
# Initialize components for Routine "introduction4"
introduction4Clock = core.Clock()
introduction4_1 = visual.TextStim(win=win, name='introduction4_1',
text='第三种类型\n\n开始时,屏幕中间会出现注视点“+”\n之后会连续出现一系列的数字\n\n从第三个数字出现时\n您需要判断该数字与倒数二个数字是否一致\n一致,请按左键; 不一致,请按右键\n\n(继续,请按空格键)',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp = keyboard.Keyboard()
# Initialize components for Routine "_2back_pre"
_2back_preClock = core.Clock()
concentration_pre = visual.TextStim(win=win, name='concentration_pre',
text='+',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
text_4 = visual.TextStim(win=win, name='text_4',
text='1\n(无需作答)',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=-1.0);
text_5 = visual.TextStim(win=win, name='text_5',
text='4\n(无需作答)',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=-2.0);
# Initialize components for Routine "_2back"
_2backClock = core.Clock()
back2_1 = visual.TextStim(win=win, name='back2_1',
text='default text',
font='Arial',
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
key_resp_3 = keyboard.Keyboard()
message2=" "
# Initialize components for Routine "feedback_2"
feedback_2Clock = core.Clock()
feedback2 = visual.TextStim(win=win, name='feedback2',
text='default text',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
# Initialize components for Routine "thanks"
thanksClock = core.Clock()
text_6 = visual.TextStim(win=win, name='text_6',
text='练习结束,请开始正式测试',
font='Arial',
pos=(0, 0), height=0.05, wrapWidth=None, ori=0,
color='white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
# Create some handy timers
globalClock = core.Clock() # to track the time since experiment started
routineTimer = core.CountdownTimer() # to track time remaining of each (non-slip) routine
# ------Prepare to start Routine "introduction1"-------
continueRoutine = True
# update component parameters for each repeat
introduction1_2.keys = []
introduction1_2.rt = []
_introduction1_2_allKeys = []
# keep track of which components have finished
introduction1Components = [introduction_1, introduction1_2]
for thisComponent in introduction1Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
introduction1Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "introduction1"-------
while continueRoutine:
# get current time
t = introduction1Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=introduction1Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *introduction_1* updates
if introduction_1.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction_1.frameNStart = frameN # exact frame index
introduction_1.tStart = t # local t and not account for scr refresh
introduction_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction_1, 'tStartRefresh') # time at next scr refresh
introduction_1.setAutoDraw(True)
# *introduction1_2* updates
waitOnFlip = False
if introduction1_2.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction1_2.frameNStart = frameN # exact frame index
introduction1_2.tStart = t # local t and not account for scr refresh
introduction1_2.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction1_2, 'tStartRefresh') # time at next scr refresh
introduction1_2.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(introduction1_2.clock.reset) # t=0 on next screen flip
win.callOnFlip(introduction1_2.clearEvents, eventType='keyboard') # clear events on next screen flip
if introduction1_2.status == STARTED and not waitOnFlip:
theseKeys = introduction1_2.getKeys(keyList=['space'], waitRelease=False)
_introduction1_2_allKeys.extend(theseKeys)
if len(_introduction1_2_allKeys):
introduction1_2.keys = _introduction1_2_allKeys[-1].name # just the last key pressed
introduction1_2.rt = _introduction1_2_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in introduction1Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "introduction1"-------
for thisComponent in introduction1Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
# the Routine "introduction1" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "introduction5"-------
continueRoutine = True
# update component parameters for each repeat
key_resp_7.keys = []
key_resp_7.rt = []
_key_resp_7_allKeys = []
# keep track of which components have finished
introduction5Components = [introduction_5, key_resp_7]
for thisComponent in introduction5Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
introduction5Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "introduction5"-------
while continueRoutine:
# get current time
t = introduction5Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=introduction5Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *introduction_5* updates
if introduction_5.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction_5.frameNStart = frameN # exact frame index
introduction_5.tStart = t # local t and not account for scr refresh
introduction_5.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction_5, 'tStartRefresh') # time at next scr refresh
introduction_5.setAutoDraw(True)
# *key_resp_7* updates
waitOnFlip = False
if key_resp_7.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
key_resp_7.frameNStart = frameN # exact frame index
key_resp_7.tStart = t # local t and not account for scr refresh
key_resp_7.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp_7, 'tStartRefresh') # time at next scr refresh
key_resp_7.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp_7.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp_7.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp_7.status == STARTED and not waitOnFlip:
theseKeys = key_resp_7.getKeys(keyList=['space'], waitRelease=False)
_key_resp_7_allKeys.extend(theseKeys)
if len(_key_resp_7_allKeys):
key_resp_7.keys = _key_resp_7_allKeys[-1].name # just the last key pressed
key_resp_7.rt = _key_resp_7_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in introduction5Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "introduction5"-------
for thisComponent in introduction5Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('introduction_5.started', introduction_5.tStartRefresh)
thisExp.addData('introduction_5.stopped', introduction_5.tStopRefresh)
# the Routine "introduction5" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "tip1"-------
continueRoutine = True
# update component parameters for each repeat
key_resp_4.keys = []
key_resp_4.rt = []
_key_resp_4_allKeys = []
# keep track of which components have finished
tip1Components = [text_2, key_resp_4]
for thisComponent in tip1Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
tip1Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "tip1"-------
while continueRoutine:
# get current time
t = tip1Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=tip1Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *text_2* updates
if text_2.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
text_2.frameNStart = frameN # exact frame index
text_2.tStart = t # local t and not account for scr refresh
text_2.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text_2, 'tStartRefresh') # time at next scr refresh
text_2.setAutoDraw(True)
# *key_resp_4* updates
waitOnFlip = False
if key_resp_4.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
key_resp_4.frameNStart = frameN # exact frame index
key_resp_4.tStart = t # local t and not account for scr refresh
key_resp_4.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp_4, 'tStartRefresh') # time at next scr refresh
key_resp_4.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp_4.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp_4.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp_4.status == STARTED and not waitOnFlip:
theseKeys = key_resp_4.getKeys(keyList=['space'], waitRelease=False)
_key_resp_4_allKeys.extend(theseKeys)
if len(_key_resp_4_allKeys):
key_resp_4.keys = _key_resp_4_allKeys[-1].name # just the last key pressed
key_resp_4.rt = _key_resp_4_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in tip1Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "tip1"-------
for thisComponent in tip1Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('text_2.started', text_2.tStartRefresh)
thisExp.addData('text_2.stopped', text_2.tStopRefresh)
# the Routine "tip1" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "introduction2"-------
continueRoutine = True
# update component parameters for each repeat
introduction2_2.keys = []
introduction2_2.rt = []
_introduction2_2_allKeys = []
# keep track of which components have finished
introduction2Components = [introduction2_1, introduction2_2]
for thisComponent in introduction2Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
introduction2Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "introduction2"-------
while continueRoutine:
# get current time
t = introduction2Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=introduction2Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *introduction2_1* updates
if introduction2_1.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction2_1.frameNStart = frameN # exact frame index
introduction2_1.tStart = t # local t and not account for scr refresh
introduction2_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction2_1, 'tStartRefresh') # time at next scr refresh
introduction2_1.setAutoDraw(True)
# *introduction2_2* updates
waitOnFlip = False
if introduction2_2.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction2_2.frameNStart = frameN # exact frame index
introduction2_2.tStart = t # local t and not account for scr refresh
introduction2_2.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction2_2, 'tStartRefresh') # time at next scr refresh
introduction2_2.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(introduction2_2.clock.reset) # t=0 on next screen flip
win.callOnFlip(introduction2_2.clearEvents, eventType='keyboard') # clear events on next screen flip
if introduction2_2.status == STARTED and not waitOnFlip:
theseKeys = introduction2_2.getKeys(keyList=['space'], waitRelease=False)
_introduction2_2_allKeys.extend(theseKeys)
if len(_introduction2_2_allKeys):
introduction2_2.keys = _introduction2_2_allKeys[-1].name # just the last key pressed
introduction2_2.rt = _introduction2_2_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in introduction2Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "introduction2"-------
for thisComponent in introduction2Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
# the Routine "introduction2" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "_0back_pre"-------
continueRoutine = True
routineTimer.add(1.000000)
# update component parameters for each repeat
# keep track of which components have finished
_0back_preComponents = [concentration_pre1]
for thisComponent in _0back_preComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
_0back_preClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "_0back_pre"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = _0back_preClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=_0back_preClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *concentration_pre1* updates
if concentration_pre1.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
concentration_pre1.frameNStart = frameN # exact frame index
concentration_pre1.tStart = t # local t and not account for scr refresh
concentration_pre1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(concentration_pre1, 'tStartRefresh') # time at next scr refresh
concentration_pre1.setAutoDraw(True)
if concentration_pre1.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > concentration_pre1.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
concentration_pre1.tStop = t # not accounting for scr refresh
concentration_pre1.frameNStop = frameN # exact frame index
win.timeOnFlip(concentration_pre1, 'tStopRefresh') # time at next scr refresh
concentration_pre1.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in _0back_preComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "_0back_pre"-------
for thisComponent in _0back_preComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('concentration_pre1.started', concentration_pre1.tStartRefresh)
thisExp.addData('concentration_pre1.stopped', concentration_pre1.tStopRefresh)
# set up handler to look after randomisation of conditions etc
loop_0back = data.TrialHandler(nReps=2, method='random',
extraInfo=expInfo, originPath=-1,
trialList=data.importConditions('documents\\document_0back_pre.xlsx'),
seed=None, name='loop_0back')
thisExp.addLoop(loop_0back) # add the loop to the experiment
thisLoop_0back = loop_0back.trialList[0] # so we can initialise stimuli with some values
# abbreviate parameter names if possible (e.g. rgb = thisLoop_0back.rgb)
if thisLoop_0back != None:
for paramName in thisLoop_0back:
exec('{} = thisLoop_0back[paramName]'.format(paramName))
for thisLoop_0back in loop_0back:
currentLoop = loop_0back
# abbreviate parameter names if possible (e.g. rgb = thisLoop_0back.rgb)
if thisLoop_0back != None:
for paramName in thisLoop_0back:
exec('{} = thisLoop_0back[paramName]'.format(paramName))
# ------Prepare to start Routine "_0back"-------
continueRoutine = True
routineTimer.add(4.000000)
# update component parameters for each repeat
back0_1.setText(num1)
key_resp0.keys = []
key_resp0.rt = []
_key_resp0_allKeys = []
# keep track of which components have finished
_0backComponents = [back0_1, key_resp0]
for thisComponent in _0backComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
_0backClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "_0back"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = _0backClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=_0backClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *back0_1* updates
if back0_1.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
back0_1.frameNStart = frameN # exact frame index
back0_1.tStart = t # local t and not account for scr refresh
back0_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(back0_1, 'tStartRefresh') # time at next scr refresh
back0_1.setAutoDraw(True)
if back0_1.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > back0_1.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
back0_1.tStop = t # not accounting for scr refresh
back0_1.frameNStop = frameN # exact frame index
win.timeOnFlip(back0_1, 'tStopRefresh') # time at next scr refresh
back0_1.setAutoDraw(False)
# *key_resp0* updates
waitOnFlip = False
if key_resp0.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
key_resp0.frameNStart = frameN # exact frame index
key_resp0.tStart = t # local t and not account for scr refresh
key_resp0.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp0, 'tStartRefresh') # time at next scr refresh
key_resp0.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp0.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp0.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp0.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > key_resp0.tStartRefresh + 3-frameTolerance:
# keep track of stop time/frame for later
key_resp0.tStop = t # not accounting for scr refresh
key_resp0.frameNStop = frameN # exact frame index
win.timeOnFlip(key_resp0, 'tStopRefresh') # time at next scr refresh
key_resp0.status = FINISHED
if key_resp0.status == STARTED and not waitOnFlip:
theseKeys = key_resp0.getKeys(keyList=['space'], waitRelease=False)
_key_resp0_allKeys.extend(theseKeys)
if len(_key_resp0_allKeys):
key_resp0.keys = _key_resp0_allKeys[-1].name # just the last key pressed
key_resp0.rt = _key_resp0_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in _0backComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "_0back"-------
for thisComponent in _0backComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
loop_0back.addData('back0_1.started', back0_1.tStartRefresh)
loop_0back.addData('back0_1.stopped', back0_1.tStopRefresh)
# check responses
if key_resp0.keys in ['', [], None]: # No response was made
key_resp0.keys = None
loop_0back.addData('key_resp0.keys',key_resp0.keys)
if key_resp0.keys != None: # we had a response
loop_0back.addData('key_resp0.rt', key_resp0.rt)
loop_0back.addData('key_resp0.started', key_resp0.tStartRefresh)
loop_0back.addData('key_resp0.stopped', key_resp0.tStopRefresh)
if not key_resp0.keys:
message0="请在三秒内按键"
# ------Prepare to start Routine "feedback_0"-------
continueRoutine = True
routineTimer.add(1.000000)
# update component parameters for each repeat
text_3.setText(message0)
# keep track of which components have finished
feedback_0Components = [text_3]
for thisComponent in feedback_0Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
feedback_0Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "feedback_0"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = feedback_0Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=feedback_0Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *text_3* updates
if text_3.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
text_3.frameNStart = frameN # exact frame index
text_3.tStart = t # local t and not account for scr refresh
text_3.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text_3, 'tStartRefresh') # time at next scr refresh
text_3.setAutoDraw(True)
if text_3.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > text_3.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
text_3.tStop = t # not accounting for scr refresh
text_3.frameNStop = frameN # exact frame index
win.timeOnFlip(text_3, 'tStopRefresh') # time at next scr refresh
text_3.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in feedback_0Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "feedback_0"-------
for thisComponent in feedback_0Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
loop_0back.addData('text_3.started', text_3.tStartRefresh)
loop_0back.addData('text_3.stopped', text_3.tStopRefresh)
thisExp.nextEntry()
# completed 2 repeats of 'loop_0back'
# ------Prepare to start Routine "tip2"-------
continueRoutine = True
# update component parameters for each repeat
key_resp_5.keys = []
key_resp_5.rt = []
_key_resp_5_allKeys = []
# keep track of which components have finished
tip2Components = [text, key_resp_5]
for thisComponent in tip2Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
tip2Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "tip2"-------
while continueRoutine:
# get current time
t = tip2Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=tip2Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *text* updates
if text.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
text.frameNStart = frameN # exact frame index
text.tStart = t # local t and not account for scr refresh
text.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text, 'tStartRefresh') # time at next scr refresh
text.setAutoDraw(True)
# *key_resp_5* updates
waitOnFlip = False
if key_resp_5.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
key_resp_5.frameNStart = frameN # exact frame index
key_resp_5.tStart = t # local t and not account for scr refresh
key_resp_5.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp_5, 'tStartRefresh') # time at next scr refresh
key_resp_5.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp_5.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp_5.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp_5.status == STARTED and not waitOnFlip:
theseKeys = key_resp_5.getKeys(keyList=['space'], waitRelease=False)
_key_resp_5_allKeys.extend(theseKeys)
if len(_key_resp_5_allKeys):
key_resp_5.keys = _key_resp_5_allKeys[-1].name # just the last key pressed
key_resp_5.rt = _key_resp_5_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in tip2Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "tip2"-------
for thisComponent in tip2Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('text.started', text.tStartRefresh)
thisExp.addData('text.stopped', text.tStopRefresh)
# the Routine "tip2" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "introduction3"-------
continueRoutine = True
# update component parameters for each repeat
introduction3_2.keys = []
introduction3_2.rt = []
_introduction3_2_allKeys = []
# keep track of which components have finished
introduction3Components = [introduction3_1, introduction3_2]
for thisComponent in introduction3Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
introduction3Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "introduction3"-------
while continueRoutine:
# get current time
t = introduction3Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=introduction3Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *introduction3_1* updates
if introduction3_1.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction3_1.frameNStart = frameN # exact frame index
introduction3_1.tStart = t # local t and not account for scr refresh
introduction3_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction3_1, 'tStartRefresh') # time at next scr refresh
introduction3_1.setAutoDraw(True)
# *introduction3_2* updates
waitOnFlip = False
if introduction3_2.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction3_2.frameNStart = frameN # exact frame index
introduction3_2.tStart = t # local t and not account for scr refresh
introduction3_2.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction3_2, 'tStartRefresh') # time at next scr refresh
introduction3_2.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(introduction3_2.clock.reset) # t=0 on next screen flip
win.callOnFlip(introduction3_2.clearEvents, eventType='keyboard') # clear events on next screen flip
if introduction3_2.status == STARTED and not waitOnFlip:
theseKeys = introduction3_2.getKeys(keyList=['space'], waitRelease=False)
_introduction3_2_allKeys.extend(theseKeys)
if len(_introduction3_2_allKeys):
introduction3_2.keys = _introduction3_2_allKeys[-1].name # just the last key pressed
introduction3_2.rt = _introduction3_2_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in introduction3Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "introduction3"-------
for thisComponent in introduction3Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
# the Routine "introduction3" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "_1back_pre"-------
continueRoutine = True
routineTimer.add(2.000000)
# update component parameters for each repeat
# keep track of which components have finished
_1back_preComponents = [concentration1_pre, back1_pre]
for thisComponent in _1back_preComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
_1back_preClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "_1back_pre"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = _1back_preClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=_1back_preClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *concentration1_pre* updates
if concentration1_pre.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
concentration1_pre.frameNStart = frameN # exact frame index
concentration1_pre.tStart = t # local t and not account for scr refresh
concentration1_pre.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(concentration1_pre, 'tStartRefresh') # time at next scr refresh
concentration1_pre.setAutoDraw(True)
if concentration1_pre.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > concentration1_pre.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
concentration1_pre.tStop = t # not accounting for scr refresh
concentration1_pre.frameNStop = frameN # exact frame index
win.timeOnFlip(concentration1_pre, 'tStopRefresh') # time at next scr refresh
concentration1_pre.setAutoDraw(False)
# *back1_pre* updates
if back1_pre.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
back1_pre.frameNStart = frameN # exact frame index
back1_pre.tStart = t # local t and not account for scr refresh
back1_pre.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(back1_pre, 'tStartRefresh') # time at next scr refresh
back1_pre.setAutoDraw(True)
if back1_pre.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > back1_pre.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
back1_pre.tStop = t # not accounting for scr refresh
back1_pre.frameNStop = frameN # exact frame index
win.timeOnFlip(back1_pre, 'tStopRefresh') # time at next scr refresh
back1_pre.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in _1back_preComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "_1back_pre"-------
for thisComponent in _1back_preComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('concentration1_pre.started', concentration1_pre.tStartRefresh)
thisExp.addData('concentration1_pre.stopped', concentration1_pre.tStopRefresh)
thisExp.addData('back1_pre.started', back1_pre.tStartRefresh)
thisExp.addData('back1_pre.stopped', back1_pre.tStopRefresh)
# set up handler to look after randomisation of conditions etc
loop_1back = data.TrialHandler(nReps=1, method='sequential',
extraInfo=expInfo, originPath=-1,
trialList=data.importConditions('documents\\document_1back_pre.xlsx'),
seed=None, name='loop_1back')
thisExp.addLoop(loop_1back) # add the loop to the experiment
thisLoop_1back = loop_1back.trialList[0] # so we can initialise stimuli with some values
# abbreviate parameter names if possible (e.g. rgb = thisLoop_1back.rgb)
if thisLoop_1back != None:
for paramName in thisLoop_1back:
exec('{} = thisLoop_1back[paramName]'.format(paramName))
for thisLoop_1back in loop_1back:
currentLoop = loop_1back
# abbreviate parameter names if possible (e.g. rgb = thisLoop_1back.rgb)
if thisLoop_1back != None:
for paramName in thisLoop_1back:
exec('{} = thisLoop_1back[paramName]'.format(paramName))
# ------Prepare to start Routine "_1back"-------
continueRoutine = True
routineTimer.add(4.000000)
# update component parameters for each repeat
back1_1.setText(num2)
key_resp_2.keys = []
key_resp_2.rt = []
_key_resp_2_allKeys = []
# keep track of which components have finished
_1backComponents = [back1_1, key_resp_2]
for thisComponent in _1backComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
_1backClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "_1back"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = _1backClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=_1backClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *back1_1* updates
if back1_1.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
back1_1.frameNStart = frameN # exact frame index
back1_1.tStart = t # local t and not account for scr refresh
back1_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(back1_1, 'tStartRefresh') # time at next scr refresh
back1_1.setAutoDraw(True)
if back1_1.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > back1_1.tStartRefresh + 1-frameTolerance:
# keep track of stop time/frame for later
back1_1.tStop = t # not accounting for scr refresh
back1_1.frameNStop = frameN # exact frame index
win.timeOnFlip(back1_1, 'tStopRefresh') # time at next scr refresh
back1_1.setAutoDraw(False)
# *key_resp_2* updates
waitOnFlip = False
if key_resp_2.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
key_resp_2.frameNStart = frameN # exact frame index
key_resp_2.tStart = t # local t and not account for scr refresh
key_resp_2.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp_2, 'tStartRefresh') # time at next scr refresh
key_resp_2.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp_2.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp_2.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp_2.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > key_resp_2.tStartRefresh + 3-frameTolerance:
# keep track of stop time/frame for later
key_resp_2.tStop = t # not accounting for scr refresh
key_resp_2.frameNStop = frameN # exact frame index
win.timeOnFlip(key_resp_2, 'tStopRefresh') # time at next scr refresh
key_resp_2.status = FINISHED
if key_resp_2.status == STARTED and not waitOnFlip:
theseKeys = key_resp_2.getKeys(keyList=['left', 'right'], waitRelease=False)
_key_resp_2_allKeys.extend(theseKeys)
if len(_key_resp_2_allKeys):
key_resp_2.keys = _key_resp_2_allKeys[-1].name # just the last key pressed
key_resp_2.rt = _key_resp_2_allKeys[-1].rt
# was this correct?
if (key_resp_2.keys == str(num2_corr)) or (key_resp_2.keys == num2_corr):
key_resp_2.corr = 1
else:
key_resp_2.corr = 0
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in _1backComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "_1back"-------
for thisComponent in _1backComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
loop_1back.addData('back1_1.started', back1_1.tStartRefresh)
loop_1back.addData('back1_1.stopped', back1_1.tStopRefresh)
# check responses
if key_resp_2.keys in ['', [], None]: # No response was made
key_resp_2.keys = None
# was no response the correct answer?!
if str(num2_corr).lower() == 'none':
key_resp_2.corr = 1; # correct non-response
else:
key_resp_2.corr = 0; # failed to respond (incorrectly)
# store data for loop_1back (TrialHandler)
loop_1back.addData('key_resp_2.keys',key_resp_2.keys)
loop_1back.addData('key_resp_2.corr', key_resp_2.corr)
if key_resp_2.keys != None: # we had a response
loop_1back.addData('key_resp_2.rt', key_resp_2.rt)
loop_1back.addData('key_resp_2.started', key_resp_2.tStartRefresh)
loop_1back.addData('key_resp_2.stopped', key_resp_2.tStopRefresh)
if not key_resp_2.keys:
message1="请在三秒内按键"
else:
if key_resp_2.corr:
message1="回答正确"
else:
message1="回答错误"
# ------Prepare to start Routine "feedback_1"-------
continueRoutine = True
routineTimer.add(1.000000)
# update component parameters for each repeat
feedback1.setText(message1)
# keep track of which components have finished
feedback_1Components = [feedback1]
for thisComponent in feedback_1Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
feedback_1Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "feedback_1"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = feedback_1Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=feedback_1Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *feedback1* updates
if feedback1.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
feedback1.frameNStart = frameN # exact frame index
feedback1.tStart = t # local t and not account for scr refresh
feedback1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(feedback1, 'tStartRefresh') # time at next scr refresh
feedback1.setAutoDraw(True)
if feedback1.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > feedback1.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
feedback1.tStop = t # not accounting for scr refresh
feedback1.frameNStop = frameN # exact frame index
win.timeOnFlip(feedback1, 'tStopRefresh') # time at next scr refresh
feedback1.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in feedback_1Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "feedback_1"-------
for thisComponent in feedback_1Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
loop_1back.addData('feedback1.started', feedback1.tStartRefresh)
loop_1back.addData('feedback1.stopped', feedback1.tStopRefresh)
thisExp.nextEntry()
# completed 1 repeats of 'loop_1back'
# ------Prepare to start Routine "tip3"-------
continueRoutine = True
# update component parameters for each repeat
key_resp_6.keys = []
key_resp_6.rt = []
_key_resp_6_allKeys = []
# keep track of which components have finished
tip3Components = [tip_3, key_resp_6]
for thisComponent in tip3Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
tip3Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "tip3"-------
while continueRoutine:
# get current time
t = tip3Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=tip3Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *tip_3* updates
if tip_3.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
tip_3.frameNStart = frameN # exact frame index
tip_3.tStart = t # local t and not account for scr refresh
tip_3.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(tip_3, 'tStartRefresh') # time at next scr refresh
tip_3.setAutoDraw(True)
# *key_resp_6* updates
waitOnFlip = False
if key_resp_6.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
key_resp_6.frameNStart = frameN # exact frame index
key_resp_6.tStart = t # local t and not account for scr refresh
key_resp_6.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp_6, 'tStartRefresh') # time at next scr refresh
key_resp_6.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp_6.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp_6.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp_6.status == STARTED and not waitOnFlip:
theseKeys = key_resp_6.getKeys(keyList=['space'], waitRelease=False)
_key_resp_6_allKeys.extend(theseKeys)
if len(_key_resp_6_allKeys):
key_resp_6.keys = _key_resp_6_allKeys[-1].name # just the last key pressed
key_resp_6.rt = _key_resp_6_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in tip3Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "tip3"-------
for thisComponent in tip3Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('tip_3.started', tip_3.tStartRefresh)
thisExp.addData('tip_3.stopped', tip_3.tStopRefresh)
# the Routine "tip3" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "introduction4"-------
continueRoutine = True
# update component parameters for each repeat
key_resp.keys = []
key_resp.rt = []
_key_resp_allKeys = []
# keep track of which components have finished
introduction4Components = [introduction4_1, key_resp]
for thisComponent in introduction4Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
introduction4Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "introduction4"-------
while continueRoutine:
# get current time
t = introduction4Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=introduction4Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *introduction4_1* updates
if introduction4_1.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
introduction4_1.frameNStart = frameN # exact frame index
introduction4_1.tStart = t # local t and not account for scr refresh
introduction4_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(introduction4_1, 'tStartRefresh') # time at next scr refresh
introduction4_1.setAutoDraw(True)
# *key_resp* updates
waitOnFlip = False
if key_resp.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
key_resp.frameNStart = frameN # exact frame index
key_resp.tStart = t # local t and not account for scr refresh
key_resp.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp, 'tStartRefresh') # time at next scr refresh
key_resp.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp.status == STARTED and not waitOnFlip:
theseKeys = key_resp.getKeys(keyList=['space'], waitRelease=False)
_key_resp_allKeys.extend(theseKeys)
if len(_key_resp_allKeys):
key_resp.keys = _key_resp_allKeys[-1].name # just the last key pressed
key_resp.rt = _key_resp_allKeys[-1].rt
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in introduction4Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "introduction4"-------
for thisComponent in introduction4Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('introduction4_1.started', introduction4_1.tStartRefresh)
thisExp.addData('introduction4_1.stopped', introduction4_1.tStopRefresh)
# the Routine "introduction4" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()
# ------Prepare to start Routine "_2back_pre"-------
continueRoutine = True
routineTimer.add(4.000000)
# update component parameters for each repeat
# keep track of which components have finished
_2back_preComponents = [concentration_pre, text_4, text_5]
for thisComponent in _2back_preComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
_2back_preClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "_2back_pre"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = _2back_preClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=_2back_preClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *concentration_pre* updates
if concentration_pre.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
concentration_pre.frameNStart = frameN # exact frame index
concentration_pre.tStart = t # local t and not account for scr refresh
concentration_pre.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(concentration_pre, 'tStartRefresh') # time at next scr refresh
concentration_pre.setAutoDraw(True)
if concentration_pre.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > concentration_pre.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
concentration_pre.tStop = t # not accounting for scr refresh
concentration_pre.frameNStop = frameN # exact frame index
win.timeOnFlip(concentration_pre, 'tStopRefresh') # time at next scr refresh
concentration_pre.setAutoDraw(False)
# *text_4* updates
if text_4.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
text_4.frameNStart = frameN # exact frame index
text_4.tStart = t # local t and not account for scr refresh
text_4.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text_4, 'tStartRefresh') # time at next scr refresh
text_4.setAutoDraw(True)
if text_4.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > text_4.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
text_4.tStop = t # not accounting for scr refresh
text_4.frameNStop = frameN # exact frame index
win.timeOnFlip(text_4, 'tStopRefresh') # time at next scr refresh
text_4.setAutoDraw(False)
# *text_5* updates
if text_5.status == NOT_STARTED and tThisFlip >= 3-frameTolerance:
# keep track of start time/frame for later
text_5.frameNStart = frameN # exact frame index
text_5.tStart = t # local t and not account for scr refresh
text_5.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text_5, 'tStartRefresh') # time at next scr refresh
text_5.setAutoDraw(True)
if text_5.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > text_5.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
text_5.tStop = t # not accounting for scr refresh
text_5.frameNStop = frameN # exact frame index
win.timeOnFlip(text_5, 'tStopRefresh') # time at next scr refresh
text_5.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in _2back_preComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "_2back_pre"-------
for thisComponent in _2back_preComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('concentration_pre.started', concentration_pre.tStartRefresh)
thisExp.addData('concentration_pre.stopped', concentration_pre.tStopRefresh)
thisExp.addData('text_4.started', text_4.tStartRefresh)
thisExp.addData('text_4.stopped', text_4.tStopRefresh)
thisExp.addData('text_5.started', text_5.tStartRefresh)
thisExp.addData('text_5.stopped', text_5.tStopRefresh)
# set up handler to look after randomisation of conditions etc
loop2back = data.TrialHandler(nReps=1, method='sequential',
extraInfo=expInfo, originPath=-1,
trialList=data.importConditions('documents\\document_2back_pre.xlsx'),
seed=None, name='loop2back')
thisExp.addLoop(loop2back) # add the loop to the experiment
thisLoop2back = loop2back.trialList[0] # so we can initialise stimuli with some values
# abbreviate parameter names if possible (e.g. rgb = thisLoop2back.rgb)
if thisLoop2back != None:
for paramName in thisLoop2back:
exec('{} = thisLoop2back[paramName]'.format(paramName))
for thisLoop2back in loop2back:
currentLoop = loop2back
# abbreviate parameter names if possible (e.g. rgb = thisLoop2back.rgb)
if thisLoop2back != None:
for paramName in thisLoop2back:
exec('{} = thisLoop2back[paramName]'.format(paramName))
# ------Prepare to start Routine "_2back"-------
continueRoutine = True
routineTimer.add(4.000000)
# update component parameters for each repeat
back2_1.setText(num3)
key_resp_3.keys = []
key_resp_3.rt = []
_key_resp_3_allKeys = []
# keep track of which components have finished
_2backComponents = [back2_1, key_resp_3]
for thisComponent in _2backComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
_2backClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "_2back"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = _2backClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=_2backClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *back2_1* updates
if back2_1.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
back2_1.frameNStart = frameN # exact frame index
back2_1.tStart = t # local t and not account for scr refresh
back2_1.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(back2_1, 'tStartRefresh') # time at next scr refresh
back2_1.setAutoDraw(True)
if back2_1.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > back2_1.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
back2_1.tStop = t # not accounting for scr refresh
back2_1.frameNStop = frameN # exact frame index
win.timeOnFlip(back2_1, 'tStopRefresh') # time at next scr refresh
back2_1.setAutoDraw(False)
# *key_resp_3* updates
waitOnFlip = False
if key_resp_3.status == NOT_STARTED and tThisFlip >= 1-frameTolerance:
# keep track of start time/frame for later
key_resp_3.frameNStart = frameN # exact frame index
key_resp_3.tStart = t # local t and not account for scr refresh
key_resp_3.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(key_resp_3, 'tStartRefresh') # time at next scr refresh
key_resp_3.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(key_resp_3.clock.reset) # t=0 on next screen flip
win.callOnFlip(key_resp_3.clearEvents, eventType='keyboard') # clear events on next screen flip
if key_resp_3.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > key_resp_3.tStartRefresh + 3-frameTolerance:
# keep track of stop time/frame for later
key_resp_3.tStop = t # not accounting for scr refresh
key_resp_3.frameNStop = frameN # exact frame index
win.timeOnFlip(key_resp_3, 'tStopRefresh') # time at next scr refresh
key_resp_3.status = FINISHED
if key_resp_3.status == STARTED and not waitOnFlip:
theseKeys = key_resp_3.getKeys(keyList=['left', 'right'], waitRelease=False)
_key_resp_3_allKeys.extend(theseKeys)
if len(_key_resp_3_allKeys):
key_resp_3.keys = _key_resp_3_allKeys[-1].name # just the last key pressed
key_resp_3.rt = _key_resp_3_allKeys[-1].rt
# was this correct?
if (key_resp_3.keys == str(num3_corr)) or (key_resp_3.keys == num3_corr):
key_resp_3.corr = 1
else:
key_resp_3.corr = 0
# a response ends the routine
continueRoutine = False
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in _2backComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "_2back"-------
for thisComponent in _2backComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
loop2back.addData('back2_1.started', back2_1.tStartRefresh)
loop2back.addData('back2_1.stopped', back2_1.tStopRefresh)
# check responses
if key_resp_3.keys in ['', [], None]: # No response was made
key_resp_3.keys = None
# was no response the correct answer?!
if str(num3_corr).lower() == 'none':
key_resp_3.corr = 1; # correct non-response
else:
key_resp_3.corr = 0; # failed to respond (incorrectly)
# store data for loop2back (TrialHandler)
loop2back.addData('key_resp_3.keys',key_resp_3.keys)
loop2back.addData('key_resp_3.corr', key_resp_3.corr)
if key_resp_3.keys != None: # we had a response
loop2back.addData('key_resp_3.rt', key_resp_3.rt)
loop2back.addData('key_resp_3.started', key_resp_3.tStartRefresh)
loop2back.addData('key_resp_3.stopped', key_resp_3.tStopRefresh)
if not key_resp_3.keys:
message2="请在三秒内按键"
else:
if key_resp_3.corr:
message2="回答正确"
else:
message2="回答错误"
# ------Prepare to start Routine "feedback_2"-------
continueRoutine = True
routineTimer.add(1.000000)
# update component parameters for each repeat
feedback2.setText(message2)
# keep track of which components have finished
feedback_2Components = [feedback2]
for thisComponent in feedback_2Components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
feedback_2Clock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "feedback_2"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = feedback_2Clock.getTime()
tThisFlip = win.getFutureFlipTime(clock=feedback_2Clock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *feedback2* updates
if feedback2.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
feedback2.frameNStart = frameN # exact frame index
feedback2.tStart = t # local t and not account for scr refresh
feedback2.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(feedback2, 'tStartRefresh') # time at next scr refresh
feedback2.setAutoDraw(True)
if feedback2.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > feedback2.tStartRefresh + 1.0-frameTolerance:
# keep track of stop time/frame for later
feedback2.tStop = t # not accounting for scr refresh
feedback2.frameNStop = frameN # exact frame index
win.timeOnFlip(feedback2, 'tStopRefresh') # time at next scr refresh
feedback2.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in feedback_2Components:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "feedback_2"-------
for thisComponent in feedback_2Components:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
loop2back.addData('feedback2.started', feedback2.tStartRefresh)
loop2back.addData('feedback2.stopped', feedback2.tStopRefresh)
thisExp.nextEntry()
# completed 1 repeats of 'loop2back'
# ------Prepare to start Routine "thanks"-------
continueRoutine = True
routineTimer.add(2.000000)
# update component parameters for each repeat
# keep track of which components have finished
thanksComponents = [text_6]
for thisComponent in thanksComponents:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, 'status'):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock="now")
thanksClock.reset(-_timeToFirstFrame) # t0 is time of first possible flip
frameN = -1
# -------Run Routine "thanks"-------
while continueRoutine and routineTimer.getTime() > 0:
# get current time
t = thanksClock.getTime()
tThisFlip = win.getFutureFlipTime(clock=thanksClock)
tThisFlipGlobal = win.getFutureFlipTime(clock=None)
frameN = frameN + 1 # number of completed frames (so 0 is the first frame)
# update/draw components on each frame
# *text_6* updates
if text_6.status == NOT_STARTED and tThisFlip >= 0.0-frameTolerance:
# keep track of start time/frame for later
text_6.frameNStart = frameN # exact frame index
text_6.tStart = t # local t and not account for scr refresh
text_6.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text_6, 'tStartRefresh') # time at next scr refresh
text_6.setAutoDraw(True)
if text_6.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > text_6.tStartRefresh + 2-frameTolerance:
# keep track of stop time/frame for later
text_6.tStop = t # not accounting for scr refresh
text_6.frameNStop = frameN # exact frame index
win.timeOnFlip(text_6, 'tStopRefresh') # time at next scr refresh
text_6.setAutoDraw(False)
# check for quit (typically the Esc key)
if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
core.quit()
# check if all components have finished
if not continueRoutine: # a component has requested a forced-end of Routine
break
continueRoutine = False # will revert to True if at least one component still running
for thisComponent in thanksComponents:
if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
continueRoutine = True
break # at least one component has not yet finished
# refresh the screen
if continueRoutine: # don't flip if this routine is over or we'll get a blank screen
win.flip()
# -------Ending Routine "thanks"-------
for thisComponent in thanksComponents:
if hasattr(thisComponent, "setAutoDraw"):
thisComponent.setAutoDraw(False)
thisExp.addData('text_6.started', text_6.tStartRefresh)
thisExp.addData('text_6.stopped', text_6.tStopRefresh)
# Flip one final time so any remaining win.callOnFlip()
# and win.timeOnFlip() tasks get executed before quitting
win.flip()
# these shouldn't be strictly necessary (should auto-save)
thisExp.saveAsWideText(filename+'.csv')
thisExp.saveAsPickle(filename)
logging.flush()
# make sure everything is closed down
thisExp.abort() # or data files will save again on exit
win.close()
core.quit()
| 45.842132
| 121
| 0.66599
| 10,922
| 91,180
| 5.446988
| 0.05347
| 0.024474
| 0.012203
| 0.020171
| 0.830885
| 0.794191
| 0.734586
| 0.676595
| 0.590869
| 0.558277
| 0
| 0.024408
| 0.246929
| 91,180
| 1,988
| 122
| 45.865191
| 0.841986
| 0.285095
| 0
| 0.498584
| 0
| 0.002125
| 0.062812
| 0.015663
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.009915
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
58146fc12bca47d19303bba6584622a1dcef7fcd
| 57
|
py
|
Python
|
tests/unit/sim_client/__init__.py
|
rkm/bluebird
|
2325ebb151724d4444c092c095a040d7365dda79
|
[
"MIT"
] | 8
|
2019-01-29T15:19:39.000Z
|
2020-07-16T03:55:36.000Z
|
tests/unit/sim_client/__init__.py
|
rkm/bluebird
|
2325ebb151724d4444c092c095a040d7365dda79
|
[
"MIT"
] | 46
|
2019-02-08T14:23:11.000Z
|
2021-04-06T13:45:10.000Z
|
tests/unit/sim_client/__init__.py
|
rkm/bluebird
|
2325ebb151724d4444c092c095a040d7365dda79
|
[
"MIT"
] | 3
|
2019-05-06T14:18:07.000Z
|
2021-06-17T10:39:59.000Z
|
"""
Module contains tests for the sim_client package
"""
| 14.25
| 48
| 0.736842
| 8
| 57
| 5.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 57
| 3
| 49
| 19
| 0.854167
| 0.842105
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
581c0ca0e2bb4ab7335e22da97be7ac35a4e0e71
| 513
|
py
|
Python
|
tools/scenario-player/scenario_player/exceptions.py
|
karlb/raiden
|
61ade0559add1a97588ae6bdedd5e0b99ed41de3
|
[
"MIT"
] | 8
|
2019-06-12T14:50:06.000Z
|
2022-02-15T16:20:07.000Z
|
tools/scenario-player/scenario_player/exceptions.py
|
karlb/raiden
|
61ade0559add1a97588ae6bdedd5e0b99ed41de3
|
[
"MIT"
] | 141
|
2019-06-18T13:04:08.000Z
|
2021-11-23T22:00:32.000Z
|
tools/scenario-player/scenario_player/exceptions.py
|
karlb/raiden
|
61ade0559add1a97588ae6bdedd5e0b99ed41de3
|
[
"MIT"
] | 17
|
2019-05-21T18:09:05.000Z
|
2020-10-29T13:01:01.000Z
|
class ScenarioError(Exception):
pass
class ScenarioTxError(ScenarioError):
pass
class TokenRegistrationError(ScenarioTxError):
pass
class ChannelError(ScenarioError):
pass
class TransferFailed(ScenarioError):
pass
class NodesUnreachableError(ScenarioError):
pass
class RESTAPIError(ScenarioError):
pass
class RESTAPIStatusMismatchError(ScenarioError):
pass
class UnknownTaskTypeError(ScenarioError):
pass
class ScenarioAssertionError(ScenarioError):
pass
| 13.153846
| 48
| 0.769981
| 40
| 513
| 9.875
| 0.325
| 0.205063
| 0.389873
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17154
| 513
| 38
| 49
| 13.5
| 0.929412
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
58230301eafe03e15cb587a17b91ac8b8de815f2
| 246
|
py
|
Python
|
cli/commands/update.py
|
gamesbrainiac/cli
|
bba7285607a8644911f720d1ceb1404ab502bf00
|
[
"Apache-2.0"
] | null | null | null |
cli/commands/update.py
|
gamesbrainiac/cli
|
bba7285607a8644911f720d1ceb1404ab502bf00
|
[
"Apache-2.0"
] | null | null | null |
cli/commands/update.py
|
gamesbrainiac/cli
|
bba7285607a8644911f720d1ceb1404ab502bf00
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
import click
from .. import cli
@cli.cli.command(hidden=True)
def update():
"""
Look for new version updates to CLI
"""
# TODO create update command
click.echo('Sorry, command not programmed yet.')
| 16.4
| 52
| 0.630081
| 33
| 246
| 4.69697
| 0.757576
| 0.077419
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005291
| 0.231707
| 246
| 14
| 53
| 17.571429
| 0.814815
| 0.345528
| 0
| 0
| 0
| 0
| 0.236111
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
584dcc24968eeec28c6969e280feb5d4d108b6e6
| 7,694
|
py
|
Python
|
db_adapter/curw_fcst/source/source_utils.py
|
CUrW-SL/curw_db_adapter
|
9d9ef24f42080910e0bd251bc7f001b0a4b0ab31
|
[
"MIT"
] | 2
|
2019-04-26T07:50:33.000Z
|
2019-09-28T20:15:33.000Z
|
db_adapter/curw_fcst/source/source_utils.py
|
CUrW-SL/curw_db_adapter
|
9d9ef24f42080910e0bd251bc7f001b0a4b0ab31
|
[
"MIT"
] | 1
|
2019-04-03T09:30:38.000Z
|
2019-04-20T18:11:59.000Z
|
db_adapter/curw_fcst/source/source_utils.py
|
shadhini/curw_db_adapter
|
4db8e1ea8794ffbd0dce29ac954a13315e83d843
|
[
"MIT"
] | null | null | null |
import json
import traceback
from db_adapter.exceptions import DatabaseAdapterError
from db_adapter.logger import logger
"""
Source JSON Object would looks like this
e.g.:
{
'model' : 'wrfSE',
'version' : 'v3',
'parameters': { }
}
{
'model' : 'OBS_WATER_LEVEL',
'version' : '',
'parameters': {
"CHANNEL_CELL_MAP" : {
"594" : "Wellawatta", "1547": "Ingurukade", "3255": "Yakbedda", "3730": "Wellampitiya",
"7033": "Janakala Kendraya"
}, "FLOOD_PLAIN_CELL_MAP": { }
}
}
"""
def get_source_by_id(pool, id_):
"""
Retrieve source by id
:param pool: database connection pool
:param id_: source id
:return: Source if source exists in the database, else None
"""
connection = pool.connection()
try:
with connection.cursor() as cursor:
sql_statement = "SELECT * FROM `source` WHERE `id`=%s"
row_count = cursor.execute(sql_statement, id_)
if row_count > 0:
return cursor.fetchone()
else:
return None
except Exception as exception:
error_message = "Retrieving source with source_id {} failed".format(id_)
logger.error(error_message)
traceback.print_exc()
raise exception
finally:
if connection is not None:
connection.close()
def get_source_id(pool, model, version) -> str:
"""
Retrieve Source id
:param pool: database connection pool
:param model:
:param version:
:return: str: source id if source exists in the database, else None
"""
connection = pool.connection()
try:
with connection.cursor() as cursor:
sql_statement = "SELECT `id` FROM `source` WHERE `model`=%s and `version`=%s"
row_count = cursor.execute(sql_statement, (model, version))
if row_count > 0:
return cursor.fetchone()['id']
else:
return None
except Exception as exception:
error_message = "Retrieving source id: model={} and version={} failed.".format(model, version)
logger.error(error_message)
traceback.print_exc()
raise exception
finally:
if connection is not None:
connection.close()
def add_source(pool, model, version, parameters=None):
"""
Insert sources into the database
:param pool: database connection pool
:param model: string
:param version: string
:param parameters: JSON
:return: True if the source has been added to the "Source' table of the database, else False
"""
connection = pool.connection()
try:
if get_source_id(pool=pool, model=model, version=version) is None:
with connection.cursor() as cursor:
sql_statement = "INSERT INTO `source` (`model`, `version`, `parameters`) VALUES ( %s, %s, %s)"
row_count = cursor.execute(sql_statement, (model, version, json.dumps(parameters)))
connection.commit()
return True if row_count > 0 else False
else:
logger.info("Source with model={} and version={} already exists in the database".format(model, version))
return False
except Exception as exception:
connection.rollback()
error_message = "Insertion of source: model={}, version={} and parameters={} failed".format(model, version, parameters)
logger.error(error_message)
traceback.print_exc()
raise exception
finally:
if connection is not None:
connection.close()
def add_sources(sources, pool):
"""
Add sources into Source table
:param sources: list of json objects that define source attributes
e.g.:
{
'model' : 'wrfSE',
'version' : 'v3',
'parameters': { }
}
{
'model' : 'OBS_WATER_LEVEL',
'version' : '',
'parameters': {
"CHANNEL_CELL_MAP" : {
"594" : "Wellawatta", "1547": "Ingurukade", "3255": "Yakbedda", "3730": "Wellampitiya",
"7033": "Janakala Kendraya"
}, "FLOOD_PLAIN_CELL_MAP": { }
}
}
:return:
"""
for source in sources:
print(add_source(pool=pool, model=source.get('model'), version=source.get('version'),
parameters=source.get('parameters')))
print(source.get('model'))
def delete_source(pool, model, version):
"""
Delete source from Source table, given model and version
:param pool: database connection pool
:param model: str
:param version: str
:return: True if the deletion was successful
"""
connection = pool.connection()
try:
with connection.cursor() as cursor:
sql_statement = "DELETE FROM `source` WHERE `model`=%s and `version`=%s"
row_count = cursor.execute(sql_statement, (model, version))
connection.commit()
if row_count > 0:
return True
else:
logger.info("There's no record of source in the database with model={} and version={}".format(model, version))
return False
except Exception as exception:
connection.rollback()
error_message = "Deleting source with model={} and version={} failed.".format(model, version)
logger.error(error_message)
traceback.print_exc()
raise exception
finally:
if connection is not None:
connection.close()
def delete_source_by_id(pool, id_):
"""
Delete source from Source table by id
:param pool: database connection pool
:param id_:
:return: True if the deletion was successful, else False
"""
connection = pool.connection()
try:
with connection.cursor() as cursor:
sql_statement = "DELETE FROM `source` WHERE `id`=%s"
row_count = cursor.execute(sql_statement, id_)
connection.commit()
if row_count > 0 :
return True
else:
logger.info("There's no record of source in the database with the source id {}".format(id_))
return False
except Exception as exception:
connection.rollback()
error_message = "Deleting source with id {} failed.".format(id_)
logger.error(error_message)
traceback.print_exc()
raise exception
finally:
if connection is not None:
connection.close()
def get_source_parameters(pool, model, version):
"""
Retrieve Source parameters
:param pool: database connection pool
:param model:
:param version:
:return: str: json object parameters if source exists in the database, else None
"""
connection = pool.connection()
try:
with connection.cursor() as cursor:
sql_statement = "SELECT `parameters` FROM `source` WHERE `model`=%s and `version`=%s"
row_count = cursor.execute(sql_statement, (model, version))
if row_count > 0:
return cursor.fetchone()['parameters']
else:
return None
except Exception as exception:
error_message = "Retrieving source parameters: model={} and version={} failed.".format(model, version)
logger.error(error_message)
traceback.print_exc()
raise exception
finally:
if connection is not None:
connection.close()
| 32.601695
| 127
| 0.583442
| 828
| 7,694
| 5.320048
| 0.147343
| 0.049035
| 0.023156
| 0.036776
| 0.743927
| 0.718729
| 0.708513
| 0.656981
| 0.656981
| 0.627469
| 0
| 0.00873
| 0.315181
| 7,694
| 235
| 128
| 32.740426
| 0.827292
| 0.206525
| 0
| 0.714286
| 0
| 0.007937
| 0.165658
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.055556
| false
| 0
| 0.031746
| 0
| 0.18254
| 0.063492
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.