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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35225a410ee5796c22748fde0fbd273789548e29 | 295 | py | Python | tools/__init__.py | Adobe12327/Sollumz | 783e6d5d9f90ec455100f3d75e97a7d5d52fc534 | [
"MIT"
] | 131 | 2020-12-13T14:05:06.000Z | 2022-03-27T13:33:33.000Z | tools/__init__.py | Adobe12327/Sollumz | 783e6d5d9f90ec455100f3d75e97a7d5d52fc534 | [
"MIT"
] | 163 | 2021-03-17T01:06:16.000Z | 2022-03-31T22:51:19.000Z | tools/__init__.py | Adobe12327/Sollumz | 783e6d5d9f90ec455100f3d75e97a7d5d52fc534 | [
"MIT"
] | 61 | 2020-12-20T04:21:04.000Z | 2022-03-19T11:11:52.000Z | if "bpy" in locals():
import importlib
importlib.reload(xml)
importlib.reload(cats)
importlib.reload(meshgen)
importlib.reload(jenkhash)
else:
from . import xml
from . import cats
from . import meshgen
from . import cats
from . import jenkhash
import bpy | 21.071429 | 30 | 0.674576 | 36 | 295 | 5.527778 | 0.361111 | 0.251256 | 0.140704 | 0.180905 | 0.241206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.247458 | 295 | 14 | 31 | 21.071429 | 0.896396 | 0 | 0 | 0.153846 | 0 | 0 | 0.010135 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.846154 | 0 | 0.846154 | 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 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
352543c705844f891011f54bb34017c16a052d13 | 173 | py | Python | vit/formatter/scheduled_remaining.py | kinifwyne/vit | e2cbafce922b1e09c4a66e7dc9592c51fe628e9d | [
"MIT"
] | 179 | 2020-07-28T08:21:51.000Z | 2022-03-30T21:39:37.000Z | vit/formatter/scheduled_remaining.py | kinifwyne/vit | e2cbafce922b1e09c4a66e7dc9592c51fe628e9d | [
"MIT"
] | 255 | 2017-02-01T11:49:12.000Z | 2020-07-26T22:31:25.000Z | vit/formatter/scheduled_remaining.py | kinifwyne/vit | e2cbafce922b1e09c4a66e7dc9592c51fe628e9d | [
"MIT"
] | 26 | 2017-01-17T20:31:13.000Z | 2020-06-17T13:09:01.000Z | from vit.formatter.scheduled import Scheduled
class ScheduledRemaining(Scheduled):
def format_datetime(self, scheduled, task):
return self.remaining(scheduled)
| 28.833333 | 47 | 0.780347 | 19 | 173 | 7.052632 | 0.736842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144509 | 173 | 5 | 48 | 34.6 | 0.905405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
1021089ab5737c0e5de06f4fbf16ce4a5fa140a9 | 151 | py | Python | web/logic/movie.py | Dkner/six | 3ecabf47b38f7b49191679b63ae5744c04bd0411 | [
"BSD-2-Clause"
] | null | null | null | web/logic/movie.py | Dkner/six | 3ecabf47b38f7b49191679b63ae5744c04bd0411 | [
"BSD-2-Clause"
] | null | null | null | web/logic/movie.py | Dkner/six | 3ecabf47b38f7b49191679b63ae5744c04bd0411 | [
"BSD-2-Clause"
] | null | null | null | from model.movie import MovieModel
class MovieService(object):
@classmethod
def get_all_movie(cls):
return MovieModel.get_all_movie()
| 21.571429 | 41 | 0.741722 | 19 | 151 | 5.684211 | 0.736842 | 0.111111 | 0.203704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.18543 | 151 | 6 | 42 | 25.166667 | 0.878049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0.2 | 0.8 | 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 | 0 | 1 | 1 | 0 | 0 | 5 |
1042f59d2a47873c8db2c2f45a5f0a0c819aeb0a | 99 | py | Python | utils/__init__.py | xxcheng0708/AudioEmbeddingExtraction | 999beb3520259e2cc9372b788af4e9a67b39faac | [
"Apache-2.0"
] | 1 | 2022-03-01T07:13:51.000Z | 2022-03-01T07:13:51.000Z | utils/__init__.py | xxcheng0708/AudioEmbeddingExtraction | 999beb3520259e2cc9372b788af4e9a67b39faac | [
"Apache-2.0"
] | null | null | null | utils/__init__.py | xxcheng0708/AudioEmbeddingExtraction | 999beb3520259e2cc9372b788af4e9a67b39faac | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
"""
Created by cheng star at 2022/1/16 17:48
@email : xxcheng0708@163.com
""" | 19.8 | 44 | 0.636364 | 17 | 99 | 3.705882 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.240506 | 0.20202 | 99 | 5 | 45 | 19.8 | 0.556962 | 0.828283 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
10620b5eca76341224c33bf9f9017fb57ff80f10 | 245 | py | Python | 07/00/0.py | pylangstudy/201706 | f1cc6af6b18e5bd393cda27f5166067c4645d4d3 | [
"CC0-1.0"
] | null | null | null | 07/00/0.py | pylangstudy/201706 | f1cc6af6b18e5bd393cda27f5166067c4645d4d3 | [
"CC0-1.0"
] | 70 | 2017-06-01T11:02:51.000Z | 2017-06-30T00:35:32.000Z | 07/00/0.py | pylangstudy/201706 | f1cc6af6b18e5bd393cda27f5166067c4645d4d3 | [
"CC0-1.0"
] | null | null | null | def Cond1():
print('Cond1')
return True
def Cond2():
print('Cond2')
return True
print('----- or -----')
if Cond1() or Cond2():
print('Finished!!')
print('----- and -----')
if Cond1() and Cond2():
print('Finished!!')
| 17.5 | 24 | 0.514286 | 28 | 245 | 4.5 | 0.357143 | 0.238095 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042105 | 0.22449 | 245 | 13 | 25 | 18.846154 | 0.621053 | 0 | 0 | 0.333333 | 0 | 0 | 0.240816 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | true | 0 | 0 | 0 | 0.333333 | 0.5 | 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 | 1 | 0 | 5 |
1084f171bcc64f6bf6536fe6434971e71820ca2c | 90 | py | Python | python/ovs/unixctl/PaxHeaders.47482/__init__.py | xiaobinglu/openvswitch | b206a49997a51909d73fd5c11784c17aa885f76b | [
"Apache-2.0"
] | null | null | null | python/ovs/unixctl/PaxHeaders.47482/__init__.py | xiaobinglu/openvswitch | b206a49997a51909d73fd5c11784c17aa885f76b | [
"Apache-2.0"
] | null | null | null | python/ovs/unixctl/PaxHeaders.47482/__init__.py | xiaobinglu/openvswitch | b206a49997a51909d73fd5c11784c17aa885f76b | [
"Apache-2.0"
] | null | null | null | 30 mtime=1365496689.478878594
30 atime=1440176559.425245608
30 ctime=1440177385.065309749
| 22.5 | 29 | 0.866667 | 12 | 90 | 6.5 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.75 | 0.066667 | 90 | 3 | 30 | 30 | 0.178571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
52cd68f5ec75af741bdc2ca7315a80397b58e2fc | 158 | py | Python | tests/classes/simple_language.py | Jesse-Yung/jsonclasses | d40c52aec42bcb978a80ceb98b93ab38134dc790 | [
"MIT"
] | null | null | null | tests/classes/simple_language.py | Jesse-Yung/jsonclasses | d40c52aec42bcb978a80ceb98b93ab38134dc790 | [
"MIT"
] | null | null | null | tests/classes/simple_language.py | Jesse-Yung/jsonclasses | d40c52aec42bcb978a80ceb98b93ab38134dc790 | [
"MIT"
] | null | null | null | from __future__ import annotations
from jsonclasses import jsonclass
@jsonclass(validate_all_fields=True)
class SimpleLanguage:
name: str
code: str
| 17.555556 | 36 | 0.797468 | 19 | 158 | 6.315789 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.158228 | 158 | 8 | 37 | 19.75 | 0.902256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.833333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
52d425c0b8171da0f044ab8e5ee020efddeba3e6 | 98 | py | Python | backend/tracker/api/scalars/roles.py | dmitriyvek/Tracker | b2903d0e980c8480e9c9cbecbfa3987997c7f04e | [
"MIT"
] | null | null | null | backend/tracker/api/scalars/roles.py | dmitriyvek/Tracker | b2903d0e980c8480e9c9cbecbfa3987997c7f04e | [
"MIT"
] | null | null | null | backend/tracker/api/scalars/roles.py | dmitriyvek/Tracker | b2903d0e980c8480e9c9cbecbfa3987997c7f04e | [
"MIT"
] | null | null | null | import graphene
class EmailList(graphene.List):
'''GraphQL list type with max lenght = 5'''
| 16.333333 | 47 | 0.704082 | 13 | 98 | 5.307692 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0125 | 0.183673 | 98 | 5 | 48 | 19.6 | 0.85 | 0.377551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 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 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
52f1112bebc4e5cf673931cb921c53c0e48e7ba5 | 217 | py | Python | entity_extract/extractor/pos_tagger/pos_tagger.py | RaymondKlass/entity-extract | c5d06536b4660da280ecf1ae1de04d93c69ffe95 | [
"MIT"
] | null | null | null | entity_extract/extractor/pos_tagger/pos_tagger.py | RaymondKlass/entity-extract | c5d06536b4660da280ecf1ae1de04d93c69ffe95 | [
"MIT"
] | null | null | null | entity_extract/extractor/pos_tagger/pos_tagger.py | RaymondKlass/entity-extract | c5d06536b4660da280ecf1ae1de04d93c69ffe95 | [
"MIT"
] | null | null | null | # Part of Speach Tagger
import nltk
class PosTagger(object):
def __init__(self):
self.pos_tagger = nltk.pos_tag
def tag(self, sent_tokenized):
return self.pos_tagger(sent_tokenized) | 19.727273 | 46 | 0.672811 | 29 | 217 | 4.724138 | 0.586207 | 0.10219 | 0.189781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.248848 | 217 | 11 | 46 | 19.727273 | 0.840491 | 0.096774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 0.166667 | 0.833333 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
eaa35dee5a4c66ece8933c0bb0acd3395dd08e1c | 77 | py | Python | ws/handler/event/appliance/sound/player/fade_in/__init__.py | fabaff/automate-ws | a9442f287692787e3f253e1ff23758bec8f3902e | [
"MIT"
] | null | null | null | ws/handler/event/appliance/sound/player/fade_in/__init__.py | fabaff/automate-ws | a9442f287692787e3f253e1ff23758bec8f3902e | [
"MIT"
] | 1 | 2021-12-21T11:34:47.000Z | 2021-12-21T11:34:47.000Z | ws/handler/event/appliance/sound/player/fade_in/__init__.py | fabaff/automate-ws | a9442f287692787e3f253e1ff23758bec8f3902e | [
"MIT"
] | 1 | 2021-12-21T10:10:13.000Z | 2021-12-21T10:10:13.000Z | from ws.handler.event.appliance.sound.player.fade_in import volume, playlist
| 38.5 | 76 | 0.844156 | 12 | 77 | 5.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064935 | 77 | 1 | 77 | 77 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
eab6bc3a5638d696863ed54e26c0c53da1a48a8d | 102 | py | Python | mspell/__init__.py | malcolmsailor/mspell | 6023c02507145c63f241e4ebf0ced8fa28a9b2ad | [
"MIT"
] | null | null | null | mspell/__init__.py | malcolmsailor/mspell | 6023c02507145c63f241e4ebf0ced8fa28a9b2ad | [
"MIT"
] | null | null | null | mspell/__init__.py | malcolmsailor/mspell | 6023c02507145c63f241e4ebf0ced8fa28a9b2ad | [
"MIT"
] | null | null | null | from .group_speller import GroupSpeller
from .speller import Speller
from .unspeller import Unspeller
| 25.5 | 39 | 0.852941 | 13 | 102 | 6.615385 | 0.461538 | 0.302326 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117647 | 102 | 3 | 40 | 34 | 0.955556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
eac1f572bcc1fc873d5fa8aaf10a9d38a7e65d4e | 156 | py | Python | manipdados.py | isabela121/Manipuladados | 49071873eedccaa43dc8e15263b01de6d29cabe9 | [
"MIT"
] | null | null | null | manipdados.py | isabela121/Manipuladados | 49071873eedccaa43dc8e15263b01de6d29cabe9 | [
"MIT"
] | null | null | null | manipdados.py | isabela121/Manipuladados | 49071873eedccaa43dc8e15263b01de6d29cabe9 | [
"MIT"
] | null | null | null | num_int = 5
num_dec = 7.3
val_str = "qualquer coisa"
print("o valor Γ©:", num_int)
print("o valor Γ©: %i" %num_int)
print("o valor Γ©: " + str(num_int))
| 22.285714 | 36 | 0.628205 | 31 | 156 | 2.967742 | 0.483871 | 0.26087 | 0.358696 | 0.391304 | 0.391304 | 0.391304 | 0 | 0 | 0 | 0 | 0 | 0.024 | 0.198718 | 156 | 6 | 37 | 26 | 0.712 | 0 | 0 | 0 | 0 | 0 | 0.32 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
eacfd140b22d9e05f96285805d0b0460dd821358 | 158 | py | Python | bsblan/__init__.py | thecode/python-bsblan | f56b1bdefbfca9a6f848e588d5adb5d2512c663e | [
"MIT"
] | 2 | 2020-01-13T07:53:26.000Z | 2020-06-11T14:17:15.000Z | bsblan/__init__.py | thecode/python-bsblan | f56b1bdefbfca9a6f848e588d5adb5d2512c663e | [
"MIT"
] | 351 | 2020-03-06T20:27:54.000Z | 2022-03-31T13:02:08.000Z | bsblan/__init__.py | thecode/python-bsblan | f56b1bdefbfca9a6f848e588d5adb5d2512c663e | [
"MIT"
] | 1 | 2022-01-20T19:18:31.000Z | 2022-01-20T19:18:31.000Z | """Asynchronous Python client for BSB-Lan."""
from .bsblan import BSBLan, BSBLanConnectionError, BSBLanError # noqa
from .models import Info, State # noqa
| 31.6 | 70 | 0.759494 | 19 | 158 | 6.315789 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14557 | 158 | 4 | 71 | 39.5 | 0.888889 | 0.316456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
eafa3dedf97e0cc3db6d2eafaa7737f616f4d335 | 84 | py | Python | notebooks/paths.py | uk-gov-mirror/nhsconnect.prm-gp2gp-data-sandbox | a26698ec36a400e75e4cbbb636a0f1ab150ef63b | [
"Apache-2.0"
] | 1 | 2022-02-02T15:43:10.000Z | 2022-02-02T15:43:10.000Z | notebooks/paths.py | uk-gov-mirror/nhsconnect.prm-gp2gp-data-sandbox | a26698ec36a400e75e4cbbb636a0f1ab150ef63b | [
"Apache-2.0"
] | null | null | null | notebooks/paths.py | uk-gov-mirror/nhsconnect.prm-gp2gp-data-sandbox | a26698ec36a400e75e4cbbb636a0f1ab150ef63b | [
"Apache-2.0"
] | 1 | 2021-04-11T07:23:49.000Z | 2021-04-11T07:23:49.000Z | import sys
import pathlib
sys.path.insert(0, str(pathlib.Path().resolve().parent))
| 16.8 | 56 | 0.75 | 13 | 84 | 4.846154 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012987 | 0.083333 | 84 | 4 | 57 | 21 | 0.805195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d8233c26e1c102d81cd1d4c7ff9c0fb94ad8ac15 | 10,023 | py | Python | edenai/models/__init__.py | SamyMe/edenai-python | b92ca21086c90a0c31cd68ba92fff897811752d2 | [
"Apache-2.0"
] | 20 | 2021-08-11T09:37:42.000Z | 2022-01-14T08:05:49.000Z | edenai/models/__init__.py | SamyMe/edenai-python | b92ca21086c90a0c31cd68ba92fff897811752d2 | [
"Apache-2.0"
] | 2 | 2021-08-11T09:36:21.000Z | 2022-03-13T13:49:53.000Z | edenai/models/__init__.py | SamyMe/edenai-python | b92ca21086c90a0c31cd68ba92fff897811752d2 | [
"Apache-2.0"
] | 7 | 2021-08-06T10:08:59.000Z | 2022-01-29T22:10:45.000Z | # coding: utf-8
# flake8: noqa
"""
Eden AI API Documentation
<a href=\"https://app.edenai.run/user/login\" target=\"_blank\"><img src=\"/static/images/welcome.png\"></a>. # Welcome Eden AI simplifies the use and integration of AI technologies by providing a unique API connected to the best AI engines and combined with a powerful management platform. The platform covers a wide range of AI technologies: * Vision: <a href=\"https://www.edenai.co/vision\" target=\"_blank\">www.edenai.co/vision</a>. * Text & NLP: <a href=\"https://www.edenai.co/text\" target=\"_blank\">www.edenai.co/text</a>. * Speech & Audio: <a href=\"https://www.edenai.co/speech\" target=\"_blank\">www.edenai.co/speech</a>. * OCR: <a href=\"https://www.edenai.co/ocr\" target=\"_blank\">www.edenai.co/ocr</a>. * Machine Translation: <a href=\"https://www.edenai.co/translation\" target=\"_blank\">www.edenai.co/translation</a>. * Prediction: <a href=\"https://www.edenai.co/prediction\" target=\"_blank\">www.edenai.co/prediction</a>. For all the proposed technologies, we provide a single endpoint: the service provider is only a parameter that can be changed very easily. All the engines available on Eden AI are listed here: www.edenai.co/catalog # Support & community ### 1- Support If you have any problems, please contact us at this email address: contact@edenai.co. We will be happy to help you in the use of Eden AI. ### 2- Community You can interact personally with other people actively using and working with Eden AI and join our <a href=\"https://join.slack.com/t/edenai/shared_invite/zt-t68c2pr9-4lDKQ_qEqmLiWNptQzB_6w\" target=\"_blank\">Slack community</a>. We are always updating our docs, so a good way to always stay up to date is to watch our documentation repo on Github: <a href=\"https://github.com/edenai\" target=\"_blank\">https://github.com/edenai</a>. ### 3- Blog We also regularly publish various articles with Eden AI news and technical articles on the different AI engines that exist. You can find these articles here: <a href=\"https://www.edenai.co/blog\" target=\"_blank\">https://www.edenai.co/blog</a>. # Authentication ## Create account  To create an account, please go to this link: <a href=\"https://app.edenai.run/user/login\" target=\"_blank\">app.edenai.run/user/login</a>. You can create an account with your email address or by using your account on available platforms (Gmail, Github, etc.). By creating an account with your email address, you will receive a confirmation email with a link to click. Check your spam if needed and contact us if you have any problem: contact@edenai.co  ## API key By going to your account page on the platform: <a href=\"https://app.edenai.run/admin/account\" target=\"_blank\">https://app.edenai.run/admin/account</a>, you will have access to your API key to start using the different AI engines offered by Eden AI.  # Portal Guide Eden AI provides a web portal that allows you to do several tasks:  ### 1- Benchmark and test The platform allows you to easily compare competing engines without having to code. By uploading your data, you have access to the prediction results of the different engines. This gives you a first overview of the performance of AI engines.  ### 2- Cost management The <a href=\"https://app.edenai.run/admin/cost-management\" target=\"_blank\">cost management page</a> also allows you to centralize the costs associated with the different engines with various filters to simplify the analysis. This page also allows you to define monthly budget limits not to be exceeded to secure the use of different AI engines.  ### 3- Account The <a href=\"https://app.edenai.run/admin/account\" target=\"_blank\">account page</a> allows you to change your information and password. It also gives you access to your API key that you can renew if needed. This page also allows you to add a credit card and to buy with credits to use all the engines offered by Eden AI.  # API Guide Eden AI API has different endpoints that refer to different AI services. The connected providers are thus parameters that the user can easily change. # noqa: E501
OpenAPI spec version: v1
Contact: contact@edenai.co
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import models into model package
from edenai.models.audio_speech_recognition_async_body import AudioSpeechRecognitionAsyncBody
from edenai.models.audio_speech_recognition_body import AudioSpeechRecognitionBody
from edenai.models.audio_text_to_speech_body import AudioTextToSpeechBody
from edenai.models.inline_response200 import InlineResponse200
from edenai.models.inline_response2001 import InlineResponse2001
from edenai.models.inline_response20010 import InlineResponse20010
from edenai.models.inline_response20010_result import InlineResponse20010Result
from edenai.models.inline_response20010_result1 import InlineResponse20010Result1
from edenai.models.inline_response20010_result_landmarks import InlineResponse20010ResultLandmarks
from edenai.models.inline_response20011 import InlineResponse20011
from edenai.models.inline_response20011_result import InlineResponse20011Result
from edenai.models.inline_response20011_result1 import InlineResponse20011Result1
from edenai.models.inline_response20012 import InlineResponse20012
from edenai.models.inline_response20012_result import InlineResponse20012Result
from edenai.models.inline_response2001_result import InlineResponse2001Result
from edenai.models.inline_response2001_result1 import InlineResponse2001Result1
from edenai.models.inline_response2001_result_bounding_boxes import InlineResponse2001ResultBoundingBoxes
from edenai.models.inline_response2002 import InlineResponse2002
from edenai.models.inline_response2002_customer_information import InlineResponse2002CustomerInformation
from edenai.models.inline_response2002_item_lines import InlineResponse2002ItemLines
from edenai.models.inline_response2002_locale import InlineResponse2002Locale
from edenai.models.inline_response2002_merchant_information import InlineResponse2002MerchantInformation
from edenai.models.inline_response2002_result import InlineResponse2002Result
from edenai.models.inline_response2002_result1 import InlineResponse2002Result1
from edenai.models.inline_response2002_results import InlineResponse2002Results
from edenai.models.inline_response2003 import InlineResponse2003
from edenai.models.inline_response2003_result import InlineResponse2003Result
from edenai.models.inline_response2003_result1 import InlineResponse2003Result1
from edenai.models.inline_response2004 import InlineResponse2004
from edenai.models.inline_response2004_result import InlineResponse2004Result
from edenai.models.inline_response2004_result1 import InlineResponse2004Result1
from edenai.models.inline_response2005 import InlineResponse2005
from edenai.models.inline_response2005_result import InlineResponse2005Result
from edenai.models.inline_response2005_result1 import InlineResponse2005Result1
from edenai.models.inline_response2006 import InlineResponse2006
from edenai.models.inline_response2006_result import InlineResponse2006Result
from edenai.models.inline_response2006_result1 import InlineResponse2006Result1
from edenai.models.inline_response2007 import InlineResponse2007
from edenai.models.inline_response2007_result import InlineResponse2007Result
from edenai.models.inline_response2007_result1 import InlineResponse2007Result1
from edenai.models.inline_response2008 import InlineResponse2008
from edenai.models.inline_response2008_result import InlineResponse2008Result
from edenai.models.inline_response2008_result1 import InlineResponse2008Result1
from edenai.models.inline_response2009 import InlineResponse2009
from edenai.models.inline_response2009_result import InlineResponse2009Result
from edenai.models.inline_response2009_result1 import InlineResponse2009Result1
from edenai.models.inline_response201 import InlineResponse201
from edenai.models.inline_response2011 import InlineResponse2011
from edenai.models.inline_response2011_result import InlineResponse2011Result
from edenai.models.inline_response2011_result1 import InlineResponse2011Result1
from edenai.models.inline_response201_result import InlineResponse201Result
from edenai.models.inline_response201_result1 import InlineResponse201Result1
from edenai.models.ocr_ocr_body import OcrOcrBody
from edenai.models.ocr_ocr_invoice_body import OcrOcrInvoiceBody
from edenai.models.pipelines_body import PipelinesBody
from edenai.models.project_id_train_body import ProjectIdTrainBody
from edenai.models.project_project_id_body import ProjectProjectIdBody
from edenai.models.text_keyword_extraction_body import TextKeywordExtractionBody
from edenai.models.text_named_entity_recognition_body import TextNamedEntityRecognitionBody
from edenai.models.text_project_body import TextProjectBody
from edenai.models.text_sentiment_analysis_body import TextSentimentAnalysisBody
from edenai.models.text_syntax_analysis_body import TextSyntaxAnalysisBody
from edenai.models.tools_search_body import ToolsSearchBody
from edenai.models.tools_search_body1 import ToolsSearchBody1
from edenai.models.train_id_prediction_body import TrainIdPredictionBody
from edenai.models.translation_automatic_translation_body import TranslationAutomaticTranslationBody
from edenai.models.translation_language_detection_body import TranslationLanguageDetectionBody
from edenai.models.vision_explicit_content_detection_body import VisionExplicitContentDetectionBody
from edenai.models.vision_face_detection_body import VisionFaceDetectionBody
from edenai.models.vision_object_detection_body import VisionObjectDetectionBody
| 115.206897 | 4,375 | 0.839669 | 1,322 | 10,023 | 6.233737 | 0.274584 | 0.084941 | 0.135906 | 0.130809 | 0.313069 | 0.087975 | 0.025118 | 0.025118 | 0.021114 | 0.021114 | 0 | 0.049182 | 0.09119 | 10,023 | 86 | 4,376 | 116.546512 | 0.855528 | 0.450863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d82c6aaaf08eda0817623e884f21869b3b1069be | 192 | py | Python | software/multicut_src/cython_tools/__init__.py | ilastik/nature_methods_multicut_pipeline | 1dc596505ab8c995b50561eeb969c59673b7dcab | [
"BSD-3-Clause"
] | 14 | 2017-02-07T12:41:06.000Z | 2022-01-19T02:52:32.000Z | software/multicut_src/cython_tools/__init__.py | ilastik/nature_methods_multicut_pipeline | 1dc596505ab8c995b50561eeb969c59673b7dcab | [
"BSD-3-Clause"
] | 5 | 2017-02-07T01:51:34.000Z | 2021-03-31T15:00:33.000Z | software/multicut_src/cython_tools/__init__.py | ilastik/nature_methods_multicut_pipeline | 1dc596505ab8c995b50561eeb969c59673b7dcab | [
"BSD-3-Clause"
] | 3 | 2017-11-16T04:04:55.000Z | 2018-05-11T11:33:51.000Z | from edge_volumes import fast_edge_volume_from_uvs_in_plane, fast_edge_volume_from_uvs_between_plane, fast_edge_volume_for_skip_edges_slice
from numpy_helper import find_matching_indices_fast
| 64 | 139 | 0.9375 | 33 | 192 | 4.757576 | 0.575758 | 0.152866 | 0.267516 | 0.229299 | 0.267516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052083 | 192 | 2 | 140 | 96 | 0.862637 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
dc611c3d5cb33f685285db57db56953392e8eaec | 25,933 | py | Python | fart/fonts/nscript.py | evdcush/fart | 82c8a5b355a0b8d2833f3583a40780862c3be0aa | [
"BSD-3-Clause"
] | 7 | 2020-03-23T13:13:36.000Z | 2022-02-26T14:46:04.000Z | fart/fonts/nscript.py | evdcush/fart | 82c8a5b355a0b8d2833f3583a40780862c3be0aa | [
"BSD-3-Clause"
] | null | null | null | fart/fonts/nscript.py | evdcush/fart | 82c8a5b355a0b8d2833f3583a40780862c3be0aa | [
"BSD-3-Clause"
] | null | null | null | font = {
' ' : [
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'!' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg,gg ',
'gdP" "Y8I ',
"I8' ,8I ",
'Y8, ,d8b,',
'`Y8888P"`Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'"' : [
' ',
',dPYb, ',
"IP'`Yb ",
'I8 8I ',
"I8 8' ",
'I8,dP ',
'I8P" 88gg',
'I8, 8I ',
'I8b, ,8I ',
' "Y888P"\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'#' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg, ',
'gdP" "Yb',
"I8' ",
'Y8,_ _',
' "Y8888PP',
' ',
' ',
' ',
' ',
' ',
' ',
],
'$' : [
' 8 8 ',
' ad88888ba ',
'd8" 8 8 "8b ',
'Y8, 8 8 ',
'`Y8a8a8a, ',
' `"8"8"8b, ',
' 8 8 `8b ',
'Y8a 8 8 a8P ',
' "Y88888P" ',
' 8 8 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'%' : [
' ',
' 8I ',
' 8I ',
' 8I ',
' 8I ',
' ,gggg,8I ',
'gdP" "Y8I ',
"I8' ,8I ",
'Y8, ,d8b,',
'`Y8888P"`Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'&' : [
' ',
' ',
' ',
' ',
' ',
' ,ggg, ',
'i8" "8i ',
"I8baaP' ",
'Y8,_ ',
'`"Y8888P',
' ',
' ',
' ',
' ',
' ',
' ',
],
"'" : [
" d8'",
" d8' ",
' "" ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'(' : [
' ',
',dPYb, ',
"IP'`Yb ",
'I8 8I ',
"I8 8' ",
'I8,dP ',
'I8P" ',
'I8, ',
'I8b,_ ',
'I8"8888',
'I8 `8, ',
'I8 `8,',
'I8 8I',
'I8 8I',
"I8, ,8'",
' "Y8P\' ',
],
')' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg,gg ',
'gdP" "Y8I ',
"I8' ,8I ",
'Y8, ,d8I ',
'`Y8888P"888',
" ,d8I'",
" ,dP'8I ",
' ,8" 8I ',
' I8 8I ',
' `8, ,8I ',
' `Y8P" ',
],
'*' : [
' ',
' ',
' I8a a8I ',
' "Yb,,dP" ',
' aaaa8888aaaa ',
' """"8888"""" ',
" ,dP'`Yb, ",
' I8" "8I ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'+' : [
' ',
',dPYb, ',
"IP'`Yb ",
'I8 8I ',
"I8 8' ",
'I8,dPgg, ',
'I88P" "8I ',
'I8P I8 ',
'I8 I8,',
'I8 `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
',' : [
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' aaa ',
' "88 ',
" d8' ",
' 8" ',
' ',
' ',
' ',
' ',
],
'-' : [
' ',
' ',
' ',
' ',
' ',
' aaaaaaaa ',
' """""""" ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'.' : [
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' d8b ',
' Y8P ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'/' : [
' ',
' ',
' ',
'gg ',
'"" ',
'gg ',
'88 ',
'88 ',
'88,_',
'"Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'0' : [
' ,a888a, ',
' ,8P"\' `"Y8, ',
',8P Y8, ',
'88 88 ',
'88 88 ',
'88 88 ',
'88 88 ',
"`8b d8' ",
" `8ba, ,ad8' ",
' "Y888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'1' : [
' 88 ',
' ,d88 ',
'888888 ',
' 88 ',
' 88 ',
' 88 ',
' 88 ',
' 88 ',
' 88 ',
' 88 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'2' : [
' ad888888b, ',
'd8" "88 ',
' 88 ',
' d8P ',
' a8P ',
' ,d8P ',
" ,d8P' ",
" ,d8P' ",
'a88" ',
'88888888888 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'3' : [
' ad888888b, ',
'd8" "88 ',
' a88 ',
' ,88P ',
' aad8" ',
' ""Y8, ',
' `88b ',
' "88 ',
'Y8, a88 ',
' "Y888888P\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'4' : [
' a8 ',
' ,d88 ',
' a8P88 ',
' ,d8" 88 ',
" a8P' 88 ",
',d8" 88 ',
'888888888888 ',
' 88 ',
' 88 ',
' 88 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'5' : [
'88888888888 ',
'88 ',
'88 ',
'88 ____ ',
'88a8PPPP8b, ',
'PP" `8b ',
' 88 ',
' 88 ',
'Y8a a8P ',
' "Y88888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'6' : [
' ad8888ba, ',
' 8P\' "Y8 ',
'd8 ',
'88 ',
'88,dd888bb, ',
"88P' `8b ",
'88 88 ',
'88 88 ',
'88a a8P ',
' "Y88888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'7' : [
'888888888888 ',
" ,88' ",
' ,88" ',
" ,88' ",
' aaa888aa ',
' ,8P ',
' ,88 ',
" 88' ",
' 88 ',
' 88 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'8' : [
' ad88888ba ',
'd8" "8b ',
'88 88 ',
'Y8a a8P ',
' "Y8aaa8P" ',
' ,d8"""8b, ',
'd8" "8b ',
'88 88 ',
'Y8a a8P ',
' "Y88888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'9' : [
' ad88888ba ',
'd8" "88 ',
'88 88 ',
'88 88 ',
'Y8, ,d88 ',
' "PPPPPP"88 ',
' 88 ',
' 8P ',
'8b, a8P ',
'`"Y8888P\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
':' : [
' ',
' ',
' ',
' gg ',
' "" ',
' ,gg ',
' gP"8I ',
' 8I ',
' 8I ',
' 888',
" ,d8I'",
" ,dP'8I ",
',8" 8I ',
'I8 8I ',
'`8, ,8I ',
' `Y8P" ',
],
';' : [
' ',
',dPYb, ',
"IP'`Yb ",
'I8 8I ',
'I8 8bgg, ',
'I8,dP" "8 ',
'I888bggP" ',
'I8\' "Yb, ',
'I8 `Yb,',
'I8 Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'<' : [
' ',
',dPYb,',
"IP'`Yb",
'I8 8I',
"I8 8'",
'I8,dP ',
'I8P" ',
'I8, ',
'`Yb,_ ',
' "Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'=' : [
' ',
' ',
' ',
' ',
' ',
',gg,,ggg,,ggg, ',
'P""8P" "8P" "8, ',
' 8I 8I 8I ',
' 8I 8I Yb,',
' 8I 8I `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'>' : [
' ',
' ',
' ',
' ',
' ',
',gg,,ggg, ',
'P""8P" "8, ',
' 8I 8I ',
' 8I Yb,',
' 8I `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'?' : [
' ad88888ba ',
'd8" "8b ',
'"" a8P ',
' ,a8P" ',
' d8" ',
' 88 ',
' 88 ',
' ',
' aa ',
' 88 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'@' : [
' ',
' ',
' ',
' ',
' ',
' ,ggggg, ',
'gdP" "Y8ggg',
"I8' ,8I ",
"Y8, ,d8' ",
'`Y8888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'A' : [
' ,ggg, ',
' dP""8I ',
' dP 88 ',
' dP 88 ',
" ,8' 88 ",
' d88888888 ',
' __ ,8" 88 ',
'dP" ,8P Y8 ',
'Yb,_,dP `8b,',
' "Y8P" `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'B' : [
' ,ggggggggggg, ',
'dP"""88""""""Y8,',
'Yb, 88 `8b',
' `" 88 ,8P',
' 88aaaad8P" ',
' 88""""Y8ba ',
' 88 `8b',
' 88 ,8P',
" 88_____,d8'",
' 88888888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'C' : [
' ,gggg, ',
' ,88"""Y8b,',
' d8" `Y8',
" d8' 8b d8",
',8I "Y88P\'',
"I8' ",
'd8 ',
'Y8, ',
'`Yba,,_____, ',
' `"Y8888888 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'D' : [
' ,gggggggggggg, ',
'dP"""88""""""Y8b, ',
'Yb, 88 `8b,',
' `" 88 `8b',
' 88 Y8',
' 88 d8',
' 88 ,8P',
" 88 ,8P'",
" 88______,dP' ",
' 888888888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'E' : [
' ,ggggggg, ',
' ,dP""""""Y8b',
" d8' a Y8",
' 88 "Y8P\'',
' `8baaaa ',
',d8P"""" ',
'd8" ',
'Y8, ',
'`Yba,,_____, ',
' `"Y8888888 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'F' : [
' ,gggggggggggggg',
'dP""""""88""""""',
'Yb,_ 88 ',
' `"" 88 ',
' ggg88gggg ',
' 88 8 ',
' 88 ',
' gg, 88 ',
' "Yb,,8P ',
' "Y8P\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'G' : [
' ,gg, ',
' i8""8i ',
" `8,,8' ",
' `Y88aaad8 ',
' d8""""Y8,',
' ,8P 8b',
' dP Y8',
"_ ,dP' I8",
'"888,,_____,dP',
'a8P"Y888888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'H' : [
' ,ggg, gg ',
'dP""Y8b 88 ',
'Yb, `88 88 ',
' `" 88 88 ',
' 88aaaaaaa88 ',
' 88"""""""88 ',
' 88 88 ',
' 88 88 ',
' 88 Y8,',
' 88 `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'I' : [
' ,a8a, ',
' ,8" "8,',
' d8 8b',
' 88 88',
' 88 88',
' Y8 8P',
" `8, ,8'",
'8888 "8,8" ',
'`8b, ,d8b, ',
' "Y88P" "Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'J' : [
' gg ',
' dP8, ',
' dP Yb ',
' ,8 `8, ',
' I8 Yb ',
' `8b, `8, ',
' `"Y88888 ',
' "Y8 ',
' ,88,',
' ,ad88888',
' ,dP"\' Yb',
" ,8' I8",
",8' I8",
"I8, ,8'",
"`Y8,___,d8' ",
' "Y888P" ',
],
'K' : [
' ,ggg, gg ',
'dP""Y8b dP ',
"Yb, `88 d8' ",
' `" 88 ,dP\' ',
' 88aaad8" ',
' 88""""Yb, ',
' 88 "8b ',
' 88 `8i ',
' 88 Yb,',
' 88 Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'L' : [
' ,gggg, ',
' d8" "8I ',
' 88 ,dP ',
' 8888888P" ',
' 88 ',
' 88 ',
' ,aa,_88 ',
'dP" "88P ',
'Yb,_,d88b,,_ ',
' "Y8P" "Y88888',
' ',
' ',
' ',
' ',
' ',
' ',
],
'M' : [
' ,ggg, ,ggg,_,ggg, ',
'dP""Y8dP""Y88P""Y8b ',
"Yb, `88' `88' `88 ",
' `" 88 88 88 ',
' 88 88 88 ',
' 88 88 88 ',
' 88 88 88 ',
' 88 88 88 ',
' 88 88 Y8,',
' 88 88 `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'N' : [
' ,ggg, ,ggggggg, ',
'dP""Y8,8P"""""Y8b ',
"Yb, `8dP' `88 ",
' `" 88\' 88 ',
' 88 88 ',
' 88 88 ',
' 88 88 ',
' 88 88 ',
' 88 Y8,',
' 88 `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'O' : [
' _,gggggg,_ ',
' ,d8P""d8P"Y8b, ',
',d8\' Y8 "8b,dP',
"d8' `Ybaaad88P'",
'8P `""""Y8 ',
'8b d8 ',
'Y8, ,8P ',
"`Y8, ,8P' ",
" `Y8b,,__,,d8P' ",
' `"Y8888P"\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'P' : [
' ,ggggggggggg, ',
'dP"""88""""""Y8,',
'Yb, 88 `8b',
' `" 88 ,8P',
' 88aaaad8P" ',
' 88""""" ',
' 88 ',
' 88 ',
' 88 ',
' 88 ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'Q' : [
' _,ggg,_ ',
' d8P"""Y8b, ',
' 88, "8b, ',
' "Y8baaa`8b ',
' `""" Y8 ',
' d8 ',
',ad8888b, ,8P ',
'I8P\' `"Y8a,8P\' ',
'I8b,,___,,888b,_',
' `"Y88888P"\' "Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'R' : [
' ,ggggggggggg, ',
'dP"""88""""""Y8, ',
'Yb, 88 `8b ',
' `" 88 ,8P ',
' 88aaaad8P" ',
' 88""""Yb, ',
' 88 "8b ',
' 88 `8i ',
' 88 Yb,',
' 88 Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'S' : [
' ,gg, ',
' i8""8i ',
" `8,,8' ",
" `88' ",
' dP"8, ',
" dP' `8a ",
" dP' `Yb",
"_ ,dP' I8",
'"888,,____,dP',
'a8P"Y88888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'T' : [
' ,ggggggggggggggg',
'dP""""""88"""""""',
'Yb,_ 88 ',
' `"" 88 ',
' 88 ',
' 88 ',
' 88 ',
' gg, 88 ',
' "Yb,,8P ',
' "Y8P\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'U' : [
' ,ggg, gg ',
'dP""Y8a 88 ',
'Yb, `88 88 ',
' `" 88 88 ',
' 88 88 ',
' 88 88 ',
' 88 88 ',
' 88 88 ',
' Y8b,____,d88,',
' "Y888888P"Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'V' : [
' ,ggg, ,gg',
'dP""Y8a ,8P ',
"Yb, `88 d8' ",
' `" 88 88 ',
' 88 88 ',
' I8 8I ',
" `8, ,8' ",
' Y8, ,8P ',
' Yb,_,dP ',
' "Y8P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'W' : [
' ,ggg, gg ,gg',
'dP""Y8a 88 ,8P ',
"Yb, `88 88 d8' ",
' `" 88 88 88 ',
' 88 88 88 ',
' 88 88 88 ',
' 88 88 88 ',
' Y8 ,88, 8P ',
' Yb,,d8""8b,,dP ',
' "88" "88" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'X' : [
' ,ggg, ,gg',
'dP"""Y8, ,dP\' ',
'Yb,_ "8b, d8" ',
' `"" Y8,,8P\' ',
' Y88" ',
' ,888b ',
' d8" "8b, ',
" ,8P' Y8, ",
' d8" "Yb, ',
' ,8P\' "Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'Y' : [
' ,ggg, gg ',
'dP""Y8a 88 ',
'Yb, `88 88 ',
' `" 88 88 ',
' 88 88 ',
' 88 88 ',
' 88 ,88 ',
' Y8b,___,d888 ',
' "Y88888P"88,',
' ,ad8888',
' d8P" 88 ',
" ,d8' 88 ",
" d8' 88 ",
' 88 88 ',
' Y8,_ _,88 ',
' "Y888P" ',
],
'Z' : [
' ,gggggggg, ',
'd8P""""""Y8b, ',
'88,_a `8b ',
'`Y8P" 88 ',
' 88 ',
" d8' ",
" _,d8' ",
' d8888ba, ',
' "Y88b,',
' ,d8888',
' ,8P" 88',
" d8' 88",
" d8' ,88",
" 88 d8'",
' Y8,_ _,8P ',
' "Y888P" ',
],
'[' : [
' ',
' ',
' ',
' ',
' ',
'gg,gggg, ',
'88P" "Yb ',
"I8' ,8i ",
"I8 _ ,d8' ",
'I8 YY88888P',
'I8 ',
'I8 ',
'I8 ',
'I8 ',
'I8 ',
'I8 ',
],
'\\' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg,gg ',
'gdP" "Y8I ',
"I8' ,8I ",
'Y8, ,d8b ',
'`Y8888P"88d',
' I8P',
" I8'",
' I8 ',
' I8 ',
' I8 ',
' I8 ',
],
']' : [
' ',
' ',
' ',
' ',
' ',
',ggggg, ',
'8""""8I ',
' 8I ',
' Y8,',
' `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'^' : [
' ',
' ',
' ',
' ',
' ',
' ,g, ',
"gdP'8, ",
'8, Yb ',
'`Ya, ,8) ',
' "Y88P88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'_' : [
' ',
' I8 ',
' I8 ',
'88888888',
' I8 ',
' ,dI8 ',
'8P"I8 ',
' I8, ',
' `8b,_',
' "Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'`' : [
' ',
' ',
' ',
' ',
' ',
'gg gg ',
'88 8I ',
'I8, ,8I ',
'`8b, ,d8b,',
' "Y88P"`Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'a' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg,gg ',
' dP" "Y8I ',
" i8' ,8I ",
',d8, ,d8b,',
'P"Y8888P"`Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'b' : [
' ',
' ,dPYb, ',
" IP'`Yb ",
' I8 8I ',
" I8 8' ",
' I8 dP ',
' I8dP 88gg',
' I8P 8I ',
',d8b, ,8I ',
'8P\'"Y88P"\' ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'c' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg, ',
' dP" "Yb',
" i8' ",
',d8,_ _',
'P""Y8888PP',
' ',
' ',
' ',
' ',
' ',
' ',
],
'd' : [
' ',
' 8I ',
' 8I ',
' 8I ',
' 8I ',
' ,gggg,8I ',
' dP" "Y8I ',
" i8' ,8I ",
',d8, ,d8b,',
'P"Y8888P"`Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'e' : [
' ',
' ',
' ',
' ',
' ',
' ,ggg, ',
' i8" "8i ',
' I8, ,8I ',
" `YbadP' ",
'888P"Y888',
' ',
' ',
' ',
' ',
' ',
' ',
],
'f' : [
' ',
' ,dPYb, ',
" IP'`Yb ",
' I8 8I ',
" I8 8' ",
' I8 dP ',
' I8dP ',
' I8P ',
',d8b,_ ',
'PI8"8888',
' I8 `8, ',
' I8 `8,',
' I8 8I',
' I8 8I',
" I8, ,8'",
' "Y8P\' ',
],
'g' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg,gg ',
' dP" "Y8I ',
" i8' ,8I ",
',d8, ,d8I ',
'P"Y8888P"888',
" ,d8I'",
" ,dP'8I ",
' ,8" 8I ',
' I8 8I ',
' `8, ,8I ',
' `Y8P" ',
],
'h' : [
' ',
' ,dPYb, ',
" IP'`Yb ",
' I8 8I ',
" I8 8' ",
' I8 dPgg, ',
' I8dP" "8I ',
' I8P I8 ',
',d8 I8,',
'88P `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'i' : [
' ',
' ',
' ',
' gg ',
' "" ',
' gg ',
' 88 ',
' 88 ',
'_,88,_',
'8P""Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'j' : [
' ',
' ',
' ',
' gg ',
' "" ',
' gg ',
' 8I ',
' ,8I ',
' _,d8I ',
'888P"888',
" ,d8I'",
" ,dP'8I ",
',8" 8I ',
'I8 8I ',
'`8, ,8I ',
' `Y8P" ',
],
'k' : [
' ',
' ,dPYb, ',
" IP'`Yb ",
' I8 8I ',
' I8 8bgg, ',
' I8 dP" "8 ',
' I8d8bggP" ',
' I8P\' "Yb, ',
',d8 `Yb,',
'88P Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'l' : [
' ',
' ,dPYb,',
" IP'`Yb",
' I8 8I',
" I8 8'",
' I8 dP ',
' I8dP ',
' I8P ',
',d8b,_ ',
'8P\'"Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'm' : [
' ',
' ',
' ',
' ',
' ',
' ,ggg,,ggg,,ggg, ',
' ,8" "8P" "8P" "8, ',
' I8 8I 8I 8I ',
',dP 8I 8I Yb,',
"8P' 8I 8I `Y8",
' ',
' ',
' ',
' ',
' ',
' ',
],
'n' : [
' ',
' ',
' ',
' ',
' ',
' ,ggg,,ggg, ',
' ,8" "8P" "8, ',
' I8 8I 8I ',
',dP 8I Yb,',
"8P' 8I `Y8",
' ',
' ',
' ',
' ',
' ',
' ',
],
'name' : [
'N',
'S',
'c',
'r',
'i',
'p',
't',
],
'o' : [
' ',
' ',
' ',
' ',
' ',
' ,ggggg, ',
' dP" "Y8ggg',
" i8' ,8I ",
",d8, ,d8' ",
'P"Y8888P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'p' : [
' ',
' ',
' ',
' ',
' ',
' gg,gggg, ',
' I8P" "Yb ',
" I8' ,8i ",
",I8 _ ,d8' ",
'PI8 YY88888P',
' I8 ',
' I8 ',
' I8 ',
' I8 ',
' I8 ',
' I8 ',
],
'q' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg,gg ',
' dP" "Y8I ',
" i8' ,8I ",
',d8, ,d8b ',
'P"Y8888P"88d',
' I8P',
" I8'",
' I8 ',
' I8 ',
' I8 ',
' I8 ',
],
'r' : [
' ',
' ',
' ',
' ',
' ',
' ,gggggg, ',
' dP""""8I ',
" ,8' 8I ",
',dP Y8,',
'8P `Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
's' : [
' ',
' ',
' ',
' ',
' ',
' ,g, ',
" ,8'8, ",
" ,8' Yb ",
",8'_ 8) ",
'P\' "YY8P8P',
' ',
' ',
' ',
' ',
' ',
' ',
],
't' : [
' ',
' I8 ',
' I8 ',
'88888888',
' I8 ',
' I8 ',
' I8 ',
' ,I8, ',
' ,d88b, ',
'88P""Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'u' : [
' ',
' ',
' ',
' ',
' ',
' gg gg ',
' I8 8I ',
' I8, ,8I ',
',d8b, ,d8b,',
'8P\'"Y88P"`Y8',
' ',
' ',
' ',
' ',
' ',
' ',
],
'v' : [
' ',
' ',
' ',
' ',
' ',
' ggg gg ',
' d8"Yb 88bg',
' dP I8 8I ',
',dP I8, ,8I ',
'8" "Y8P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'w' : [
' ',
' ',
' ',
' ',
' ',
' gg gg gg ',
' I8 I8 88bg',
' I8 I8 8I ',
',d8, ,d8, ,8I ',
'P""Y88P""Y88P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'x' : [
' ',
' ',
' ',
' ',
' ',
' ,gg, ,gg',
' d8""8b,dP" ',
' dP ,88" ',
',dP ,dP"Y8, ',
'8" dP" "Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'y' : [
' ',
' ',
' ',
' ',
' ',
' gg gg ',
' I8 8I ',
' I8, ,8I ',
',d8b, ,d8I ',
'P""Y88P"888',
" ,d8I'",
" ,dP'8I ",
' ,8" 8I ',
' I8 8I ',
' `8, ,8I ',
' `Y8P" ',
],
'z' : [
' ',
' ',
' ',
' ',
' ',
' ,gggg, ',
' d8" Yb ',
' dP dP ',
",dP ,adP' ",
'8" ""Y8d8',
" ,d8I'",
" ,dP'8I ",
' ,8" 8I ',
' I8 8I ',
' `8, ,8I ',
' `Y8P" ',
],
'{' : [
' ',
' ',
' ',
' ',
' ',
',gg gg ',
'P"Yb 88bg',
' I8 8I ',
' I8, ,8I ',
' "Y8P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'|' : [
' ',
' ',
' ',
' ',
' ',
'gg gg gg ',
'88 I8 88bg',
'I8 I8 8I ',
'I8, ,d8, ,8I ',
' "Y88P""Y88P" ',
' ',
' ',
' ',
' ',
' ',
' ',
],
'}' : [
' ',
' ',
' ',
' ',
' ',
',gg, ,gg',
'P""8b,dP" ',
' ,88" ',
' ,dP"Y8, ',
'dP" "Y88',
' ',
' ',
' ',
' ',
' ',
' ',
],
'~' : [
' ',
' ',
' ',
' ',
' ',
'gg gg ',
'88 8I ',
'I8, ,8I ',
'I8b, ,d8I ',
' "Y88P"888',
" ,d8I'",
" ,dP'8I ",
' ,8" 8I ',
' I8 8I ',
' `8, ,8I ',
' `Y8P" ',
],
} | 14.280286 | 26 | 0.1463 | 1,489 | 25,933 | 2.486904 | 0.110141 | 0.143667 | 0.15717 | 0.162031 | 0.425061 | 0.36781 | 0.321361 | 0.277343 | 0.258169 | 0.225493 | 0 | 0.169475 | 0.599545 | 25,933 | 1,816 | 27 | 14.280286 | 0.187097 | 0 | 0 | 0.740267 | 0 | 0 | 0.716897 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
dc840c045077a5baad2dc00ed412ad3ee98e1e8b | 154 | py | Python | BlackBoxAuditing/__init__.py | alatenko/BlackBoxAuditing | b06c4faed5591cd7088475b2a203127bc5820483 | [
"Apache-2.0"
] | 125 | 2016-06-15T17:46:55.000Z | 2022-02-19T14:44:49.000Z | BlackBoxAuditing/__init__.py | alatenko/BlackBoxAuditing | b06c4faed5591cd7088475b2a203127bc5820483 | [
"Apache-2.0"
] | 12 | 2016-12-13T14:27:13.000Z | 2019-10-02T11:50:08.000Z | BlackBoxAuditing/__init__.py | alatenko/BlackBoxAuditing | b06c4faed5591cd7088475b2a203127bc5820483 | [
"Apache-2.0"
] | 32 | 2016-09-07T02:48:07.000Z | 2021-12-20T18:36:41.000Z | from .BlackBoxAuditor import Auditor
from .data import load_data, load_from_file
from .measurements import accuracy, BCR
from .test_data import preloaded
| 30.8 | 43 | 0.844156 | 22 | 154 | 5.727273 | 0.545455 | 0.15873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116883 | 154 | 4 | 44 | 38.5 | 0.926471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
dc897b50da935e4e07989f89eee3b99091e4e4a3 | 107 | py | Python | norma43utils/__init__.py | sergief/norma43utils | 64d4d257a7bd9159e3396842868ffe21e94f47cb | [
"MIT"
] | null | null | null | norma43utils/__init__.py | sergief/norma43utils | 64d4d257a7bd9159e3396842868ffe21e94f47cb | [
"MIT"
] | 2 | 2021-02-08T20:44:10.000Z | 2021-04-30T21:14:51.000Z | norma43utils/__init__.py | sergief/norma43utils | 64d4d257a7bd9159e3396842868ffe21e94f47cb | [
"MIT"
] | 1 | 2022-01-25T18:33:24.000Z | 2022-01-25T18:33:24.000Z | from .services import Service, GoogleSpreadsheetService
__all__ = ("Service", "GoogleSpreadsheetService")
| 26.75 | 55 | 0.813084 | 8 | 107 | 10.375 | 0.75 | 0.746988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093458 | 107 | 3 | 56 | 35.666667 | 0.85567 | 0 | 0 | 0 | 0 | 0 | 0.28972 | 0.224299 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
dc8e1d6d09ca25c14030c523376c006ec1a603e4 | 228 | py | Python | psctb/utils/__init__.py | exe0cdc/PyscesToolbox | 86937da2f86615589ead6967ff83aab88e1c21eb | [
"BSD-3-Clause"
] | 3 | 2017-07-24T16:29:03.000Z | 2018-10-04T13:29:24.000Z | psctb/utils/__init__.py | PySCeS/PyscesToolbox | f1f7a8b901e3c32023079e0ad3e523dcf866a53c | [
"BSD-3-Clause"
] | 3 | 2015-11-03T09:52:30.000Z | 2020-08-21T08:45:33.000Z | psctb/utils/__init__.py | exe0cdc/PyscesToolbox | 86937da2f86615589ead6967ff83aab88e1c21eb | [
"BSD-3-Clause"
] | 2 | 2016-12-08T07:44:17.000Z | 2017-09-19T07:32:45.000Z | from . import misc
from . import plotting
from . import model_graph
from .config import ConfigReader
from .model_comparing import compare_models, SteadyStateComparer, SimulationComparer, ParameterScanComparer, ClosedOpenComparer | 45.6 | 127 | 0.859649 | 24 | 228 | 8.041667 | 0.625 | 0.15544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.100877 | 228 | 5 | 127 | 45.6 | 0.941463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
dca4b0f1c5492416baf879bbe2b56b66b540145f | 57 | py | Python | tests/test_quick_test.py | alexella1/python-ascii_magic | df189da5dc59d4cd6f6fe003a75c99539247851f | [
"MIT"
] | 23 | 2020-11-27T01:10:05.000Z | 2022-03-04T18:50:09.000Z | tests/test_quick_test.py | alexella1/python-ascii_magic | df189da5dc59d4cd6f6fe003a75c99539247851f | [
"MIT"
] | 3 | 2021-02-18T18:58:16.000Z | 2022-03-08T06:27:33.000Z | tests/test_quick_test.py | alexella1/python-ascii_magic | df189da5dc59d4cd6f6fe003a75c99539247851f | [
"MIT"
] | 10 | 2020-11-26T21:17:44.000Z | 2022-02-15T05:26:40.000Z | from context import ascii_magic
ascii_magic.quick_test() | 19 | 31 | 0.859649 | 9 | 57 | 5.111111 | 0.777778 | 0.434783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.087719 | 57 | 3 | 32 | 19 | 0.884615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
dca9d68fd9ab147b447bda644510ee00dc2ff135 | 641 | py | Python | python-skimage/write_benchmarks.py | JuliaImages/image_benchmarks | 4e701308bbdffd7e039277d2b93b424a5b2146a5 | [
"MIT"
] | 5 | 2021-09-14T20:09:15.000Z | 2022-02-17T04:12:43.000Z | python-skimage/write_benchmarks.py | JuliaImages/image_benchmarks | 4e701308bbdffd7e039277d2b93b424a5b2146a5 | [
"MIT"
] | 3 | 2021-09-14T19:38:51.000Z | 2022-02-05T15:01:56.000Z | python-skimage/write_benchmarks.py | JuliaImages/image_benchmarks | 4e701308bbdffd7e039277d2b93b424a5b2146a5 | [
"MIT"
] | null | null | null | def write_benchmarks(filename, bench):
with open(filename, "w") as io:
io.write("Benchmark,File,Time(s)\n")
for (b, d) in bench.items():
for (f, t) in d.items():
io.write(b)
io.write(',')
io.write(f)
io.write(',')
io.write(str(t))
io.write('\n')
def write_special_benchmarks(filename, bench):
with open(filename, "w") as io:
io.write("Benchmark,Time(s)\n")
for (b, t) in bench.items():
io.write(b)
io.write(',')
io.write(str(t))
io.write('\n')
| 30.52381 | 46 | 0.455538 | 83 | 641 | 3.481928 | 0.289157 | 0.290657 | 0.093426 | 0.145329 | 0.802768 | 0.733564 | 0.733564 | 0.733564 | 0.595156 | 0.415225 | 0 | 0 | 0.374415 | 641 | 20 | 47 | 32.05 | 0.720698 | 0 | 0 | 0.578947 | 0 | 0 | 0.081123 | 0.037442 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105263 | false | 0 | 0 | 0 | 0.105263 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 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 | 0 | 0 | 5 |
dcaf1d3287b6f8e3604e7dd1e555eaf82078a89b | 83 | py | Python | LearnPython3TheHardWay/ex28.py | lanjing99/UsePython | 19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4 | [
"MIT"
] | null | null | null | LearnPython3TheHardWay/ex28.py | lanjing99/UsePython | 19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4 | [
"MIT"
] | null | null | null | LearnPython3TheHardWay/ex28.py | lanjing99/UsePython | 19a84e3ef65dc326cf9c4bfccbf2d99c22f858a4 | [
"MIT"
] | null | null | null |
print (f"{'test' and 'test'}")
print (f"{0 and 1}")
print (f"{(2 and 3) == True}") | 20.75 | 30 | 0.518072 | 16 | 83 | 2.6875 | 0.5625 | 0.418605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057971 | 0.168675 | 83 | 4 | 31 | 20.75 | 0.565217 | 0 | 0 | 0 | 0 | 0 | 0.566265 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
f4e13b9db4143cb0216ce1c32cb16f90ec94801a | 2,121 | py | Python | tests/test_readers_hs.py | scrapinghub/exporters | b14f70530826bbbd6163d9e56e74345e762a9189 | [
"BSD-3-Clause"
] | 41 | 2016-06-16T15:29:39.000Z | 2021-08-06T03:29:13.000Z | tests/test_readers_hs.py | bbotella/fluxo | c9fb01db1771ada4672bbffd67cb46e1f7802ab9 | [
"BSD-3-Clause"
] | 52 | 2016-06-20T12:46:57.000Z | 2018-02-08T12:22:03.000Z | tests/test_readers_hs.py | bbotella/fluxo | c9fb01db1771ada4672bbffd67cb46e1f7802ab9 | [
"BSD-3-Clause"
] | 10 | 2016-06-23T08:49:36.000Z | 2018-01-13T10:12:10.000Z | import mock
import unittest
from exporters.readers import HubstorageReader
from .utils import meta
class HubstorageReaderTest(unittest.TestCase):
def setUp(self):
pass
@mock.patch('exporters.readers.hubstorage_reader.HubstorageReader._create_collection_scanner')
def test_set_last_position_legacy(self, mock_create_scanner):
options = dict(apikey='fake', collection_name='collection', project_id='10804')
hs_reader = HubstorageReader(dict(options=options), meta())
hs_reader.set_last_position('resumekey')
self.assertEquals([mock.call.set_startafter('resumekey')],
mock_create_scanner.return_value.mock_calls)
self.assertEquals(dict(last_key='resumekey'), hs_reader.last_position)
@mock.patch('exporters.readers.hubstorage_reader.HubstorageReader._create_collection_scanner')
def test_set_last_position(self, mock_create_scanner):
options = dict(apikey='fake', collection_name='collection', project_id=10804)
hs_reader = HubstorageReader(dict(options=options), meta())
hs_reader.set_last_position(dict(last_key='resumekey'))
self.assertEquals([mock.call.set_startafter('resumekey')],
mock_create_scanner.return_value.mock_calls)
self.assertEquals(dict(last_key='resumekey'), hs_reader.last_position)
@mock.patch('exporters.readers.hubstorage_reader.HubstorageReader._create_collection_scanner')
def test_update_last_position_after_getting_batch(self, mock_create_scanner):
mock_create_scanner.return_value.get_new_batch.side_effect = [
[{'_key': 'value1'}, {'_key': 'value2'}],
[{'_key': 'value3'}, {'_key': 'value4'}],
]
options = dict(apikey='fake', collection_name='collection', project_id='10804')
hs_reader = HubstorageReader(dict(options=options), meta())
list(hs_reader.get_next_batch())
self.assertEquals('value2', hs_reader.last_position['last_key'])
list(hs_reader.get_next_batch())
self.assertEquals('value4', hs_reader.last_position['last_key'])
| 49.325581 | 98 | 0.717115 | 244 | 2,121 | 5.885246 | 0.237705 | 0.061281 | 0.071031 | 0.05571 | 0.802228 | 0.78273 | 0.745125 | 0.745125 | 0.689415 | 0.689415 | 0 | 0.011838 | 0.163602 | 2,121 | 42 | 99 | 50.5 | 0.797632 | 0 | 0 | 0.457143 | 0 | 0 | 0.193777 | 0.11174 | 0 | 0 | 0 | 0 | 0.171429 | 1 | 0.114286 | false | 0.028571 | 0.114286 | 0 | 0.257143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
762f64c4def50cab448cc77f0e74e8e4381e9c8c | 1,082 | py | Python | lib/losses/uncertainty_loss.py | sjg02122/monodle | 9eaf405b206f71ae13a5b86ad7a47f44f3b060a9 | [
"MIT"
] | 92 | 2021-03-31T02:40:27.000Z | 2022-03-30T03:35:27.000Z | lib/losses/uncertainty_loss.py | sjg02122/monodle | 9eaf405b206f71ae13a5b86ad7a47f44f3b060a9 | [
"MIT"
] | 22 | 2021-06-17T02:32:26.000Z | 2022-01-30T14:23:41.000Z | lib/losses/uncertainty_loss.py | sjg02122/monodle | 9eaf405b206f71ae13a5b86ad7a47f44f3b060a9 | [
"MIT"
] | 17 | 2021-06-13T23:39:30.000Z | 2022-03-03T07:09:14.000Z | import numpy as np
import torch
def laplacian_aleatoric_uncertainty_loss(input, target, log_variance, reduction='mean'):
'''
References:
MonoPair: Monocular 3D Object Detection Using Pairwise Spatial Relationships, CVPR'20
Geometry and Uncertainty in Deep Learning for Computer Vision, University of Cambridge
'''
assert reduction in ['mean', 'sum']
loss = 1.4142 * torch.exp(-log_variance) * torch.abs(input - target) + log_variance
return loss.mean() if reduction == 'mean' else loss.sum()
def gaussian_aleatoric_uncertainty_loss(input, target, log_variance, reduction='mean'):
'''
References:
What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?, Neuips'17
Geometry and Uncertainty in Deep Learning for Computer Vision, University of Cambridge
'''
assert reduction in ['mean', 'sum']
loss = 0.5 * torch.exp(-log_variance) * torch.abs(input - target)**2 + 0.5 * log_variance
return loss.mean() if reduction == 'mean' else loss.sum()
if __name__ == '__main__':
pass
| 36.066667 | 95 | 0.700555 | 140 | 1,082 | 5.271429 | 0.45 | 0.089431 | 0.056911 | 0.089431 | 0.743902 | 0.704607 | 0.704607 | 0.704607 | 0.601626 | 0.601626 | 0 | 0.017301 | 0.198706 | 1,082 | 29 | 96 | 37.310345 | 0.83391 | 0.357671 | 0 | 0.333333 | 0 | 0 | 0.058642 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0.166667 | false | 0.083333 | 0.166667 | 0 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
5232874763140832e66cd61a56676bf5f51fcba4 | 68 | py | Python | tests/pydecompile-test/baselines/event_handlers.py | jaydeetay/pxt | aad1beaf15edc46e1327806367298cbc942dcbc1 | [
"MIT"
] | 977 | 2019-05-06T23:12:55.000Z | 2022-03-29T19:11:44.000Z | tests/pydecompile-test/baselines/event_handlers.py | jaydeetay/pxt | aad1beaf15edc46e1327806367298cbc942dcbc1 | [
"MIT"
] | 3,980 | 2019-05-09T20:48:14.000Z | 2022-03-28T20:33:07.000Z | tests/pydecompile-test/baselines/event_handlers.py | jaydeetay/pxt | aad1beaf15edc46e1327806367298cbc942dcbc1 | [
"MIT"
] | 306 | 2016-04-09T05:28:07.000Z | 2019-05-02T14:23:29.000Z | def on_forever():
basic.show_number(2)
basic.forever(on_forever) | 22.666667 | 25 | 0.764706 | 11 | 68 | 4.454545 | 0.636364 | 0.367347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016393 | 0.102941 | 68 | 3 | 25 | 22.666667 | 0.786885 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
bfdc3b730b4c445472d16596955e3b6001073a73 | 30 | py | Python | Network Automation/Router/Mikrotik/__init__.py | kuhakuu04/Network_Automation | f3eb99943e569f3311233f437ea17cd1862e3dc9 | [
"Apache-2.0"
] | null | null | null | Network Automation/Router/Mikrotik/__init__.py | kuhakuu04/Network_Automation | f3eb99943e569f3311233f437ea17cd1862e3dc9 | [
"Apache-2.0"
] | null | null | null | Network Automation/Router/Mikrotik/__init__.py | kuhakuu04/Network_Automation | f3eb99943e569f3311233f437ea17cd1862e3dc9 | [
"Apache-2.0"
] | null | null | null | from .Basic_Configure import * | 30 | 30 | 0.833333 | 4 | 30 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 30 | 1 | 30 | 30 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
bfe04c886878bb11a4c59649480cb89fcd962658 | 61,898 | py | Python | experiments/experiments_gdsc/convergence/nmtf_icm.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 16 | 2017-04-19T12:04:47.000Z | 2021-12-03T00:50:43.000Z | experiments/experiments_gdsc/convergence/nmtf_icm.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 1 | 2017-04-20T11:26:16.000Z | 2017-04-20T11:26:16.000Z | experiments/experiments_gdsc/convergence/nmtf_icm.py | ThomasBrouwer/BNMTF | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | [
"Apache-2.0"
] | 8 | 2015-12-15T05:29:43.000Z | 2019-06-05T03:14:11.000Z | """
Run NMTF ICM on the Sanger dataset.
We can plot the MSE, R2 and Rp as it converges, on the entire dataset.
We give flat priors (1/10).
"""
import sys, os
project_location = os.path.dirname(__file__)+"/../../../../"
sys.path.append(project_location)
from BNMTF.code.models.nmtf_icm import nmtf_icm
from BNMTF.data_drug_sensitivity.gdsc.load_data import load_gdsc
import numpy, matplotlib.pyplot as plt
##########
standardised = False #standardised Sanger or unstandardised
iterations = 1000
init_FG = 'kmeans'
init_S = 'random'
I, J, K, L = 622,138,5,5
minimum_TN = 0.1
alpha, beta = 1., 1.
lambdaF = numpy.ones((I,K))/10.
lambdaS = numpy.ones((K,L))/10.
lambdaG = numpy.ones((J,L))/10.
priors = { 'alpha':alpha, 'beta':beta, 'lambdaF':lambdaF, 'lambdaS':lambdaS, 'lambdaG':lambdaG }
# Load in data
(_,R,M,_,_,_,_) = load_gdsc(standardised=standardised)
# Run the VB algorithm
NMTF = nmtf_icm(R,M,K,L,priors)
NMTF.initialise(init_S,init_FG)
NMTF.run(iterations,minimum_TN=minimum_TN)
# Extract the performances across all iterations
print "icm_all_performances = %s" % NMTF.all_performances
'''
icm_all_performances = {'R^2': [0.037804981423833595, 0.6439409885791966, 0.721160861337115, 0.7438840962351604, 0.7533196412210279, 0.7584979460292265, 0.7619337879573317, 0.7644835851499027, 0.7665062347147026, 0.7681687265546489, 0.7695747818261927, 0.7707857292348244, 0.7718427459598073, 0.7727761252250168, 0.7736066628969382, 0.7743529437258718, 0.7750276137729556, 0.7756407855270708, 0.776201060805582, 0.7767157729868093, 0.777191090280779, 0.7776316890426254, 0.7780417083425109, 0.7784242886978606, 0.7787768936767614, 0.779109894737608, 0.7794247023627859, 0.7797251884741314, 0.7800134892732759, 0.7802920388736556, 0.7805621763515059, 0.780824943203189, 0.7810812106742502, 0.7813318128350808, 0.7815772922461595, 0.7818183058471, 0.7820553449060146, 0.7822883314547547, 0.7825160332958224, 0.7827401929091634, 0.7829606101172988, 0.7831771484481374, 0.7833902682973224, 0.7835997039659697, 0.7838053281493929, 0.7840084411110724, 0.7842084183276546, 0.7844052650164265, 0.7845995303065433, 0.7847912934162294, 0.7849808316379776, 0.7851683465807627, 0.7853539263986429, 0.7855375221909149, 0.7857190011600447, 0.7858983937075581, 0.786075567526773, 0.786250742718877, 0.7864238677500013, 0.7865946303129514, 0.7867630916985245, 0.7869293549332869, 0.7870936870103844, 0.7872558085850491, 0.7874161346150945, 0.7875742434088736, 0.7877304407535038, 0.7878849315440482, 0.7880377726255183, 0.7881889842609917, 0.7883385812491093, 0.7884866706107927, 0.7886330378880086, 0.7887776648208537, 0.7889206998566438, 0.7890621796444784, 0.7892021139713625, 0.7893405409831132, 0.7894775494677817, 0.7896131568922319, 0.7897473579828568, 0.7898801876269292, 0.7900116635157753, 0.7901418192090544, 0.7902706734673377, 0.7903982470179719, 0.7905245615238534, 0.7906496376817752, 0.7907734969066039, 0.790895839932489, 0.7910168195223707, 0.7911365667648482, 0.7912549825978736, 0.7913720269622793, 0.7914877756556478, 0.7916023654051502, 0.7917158824149042, 0.7918283325514194, 0.7919397578782301, 0.7920501847011204, 0.7921596875286611, 0.7922682659310067, 0.792375947283317, 0.7924827597265057, 0.7925887498424768, 0.792693907944299, 0.7927982546835282, 0.7929016821732573, 0.7930042860075119, 0.7931061433309342, 0.7932072995806999, 0.7933077879221192, 0.7934076643468713, 0.7935069271857349, 0.7936055964321514, 0.7937036975178355, 0.7938012538485304, 0.7938982897394244, 0.7939948288038688, 0.794090893692821, 0.7941865077860956, 0.7942816608388614, 0.7943763623868972, 0.7944707249043301, 0.7945647152970777, 0.7946583570394146, 0.7947516684549104, 0.7948446755822185, 0.7949373981889819, 0.7950298563340653, 0.795122059585329, 0.7952140320813424, 0.7953057861463483, 0.7953973319167928, 0.7954886984059953, 0.795579898801037, 0.7956709515714505, 0.7957617365553556, 0.7958523708470181, 0.7959429477663396, 0.796033475168382, 0.7961239337645696, 0.7962143676761574, 0.796304772296554, 0.7963951604149114, 0.7964855509771858, 0.796575946404745, 0.7966663402004475, 0.7967567390691852, 0.7968470913992975, 0.7969374508443752, 0.7970277981535232, 0.7971180994350772, 0.7972084002373062, 0.7972987373633439, 0.7973891290429906, 0.7974795864507238, 0.7975701174059981, 0.7976606828369911, 0.7977513406394166, 0.7978420934399871, 0.7979329499465619, 0.798023898047944, 0.7981149051283281, 0.7982059733778721, 0.7982971485644522, 0.7983884271133239, 0.7984797461836723, 0.7985712435447039, 0.7986629866930925, 0.7987548230814263, 0.7988467378455191, 0.7989387117983602, 0.7990307566775801, 0.7991228809252477, 0.7992150869888158, 0.7993073754255853, 0.7993997730592278, 0.7994922493292007, 0.7995847880120248, 0.799677335786886, 0.7997698912298484, 0.7998624876348841, 0.7999551317614912, 0.800047824681148, 0.8001405648346986, 0.8002333543174194, 0.8003261677018635, 0.8004189943158686, 0.8005117873303469, 0.8006044082476735, 0.8006969688590241, 0.8007894997781273, 0.8008820025153636, 0.800974505582636, 0.8010670009327558, 0.8011594509267581, 0.8012518516869798, 0.8013441970934382, 0.8014364585409537, 0.8015286468844484, 0.8016207540017375, 0.8017127928988288, 0.8018047592430939, 0.801896622032503, 0.801988349431477, 0.8020798300445989, 0.8021710854618002, 0.8022621791156692, 0.8023530548162132, 0.8024437008288894, 0.8025340914919731, 0.8026242482747725, 0.8027141910433936, 0.8028039156579887, 0.8028934196368843, 0.8029827070451121, 0.8030717732769099, 0.8031606497567388, 0.803249092702575, 0.8033372426522881, 0.8034251052258663, 0.8035127487675147, 0.8036001215915236, 0.8036872606344675, 0.8037741227023294, 0.8038606765601907, 0.8039467600386068, 0.8040324781709198, 0.8041177979105489, 0.8042027305420327, 0.8042872649541585, 0.8043713933747653, 0.8044551260413562, 0.8045383448680865, 0.804621192360966, 0.8047035960926746, 0.8047855727904751, 0.8048671445300485, 0.804948325837069, 0.8050290966218002, 0.8051094683592807, 0.8051894208495076, 0.8052689458626185, 0.8053480032148934, 0.8054265954524995, 0.805504750197936, 0.8055824344338338, 0.8056596010846103, 0.8057362787739708, 0.8058125073070421, 0.805888284611855, 0.8059636348329902, 0.8060385683677471, 0.8061130425309542, 0.806187056164133, 0.8062606011280833, 0.8063336742557689, 0.8064062737081114, 0.806478398043309, 0.806550028524593, 0.8066211491689066, 0.8066917319178765, 0.8067617986469149, 0.8068313418455979, 0.8069003843268862, 0.806968967667946, 0.8070370475611311, 0.8071046054496649, 0.8071716347871358, 0.8072381818307517, 0.8073042420180445, 0.8073697890772699, 0.8074348488171371, 0.8074994112173771, 0.8075632660855304, 0.8076265302750837, 0.8076893160835241, 0.8077516114816903, 0.8078134614952661, 0.8078748209176192, 0.8079356903732028, 0.8079960357220389, 0.8080558545587752, 0.8081151598912795, 0.8081739750265239, 0.8082323127946475, 0.8082901747952633, 0.8083475647647441, 0.8084044855932776, 0.8084609478496229, 0.8085168948412647, 0.8085723887799432, 0.8086274366990923, 0.8086820498153564, 0.8087362230942055, 0.8087899527105423, 0.8088432391233884, 0.8088960837007384, 0.8089484517808272, 0.8090003456169709, 0.8090514428902107, 0.8091021053125842, 0.8091523435673337, 0.8092021603731621, 0.8092515583584343, 0.8093005409840007, 0.8093491300003243, 0.8093973110841157, 0.8094450584093216, 0.809492384894598, 0.8095393058716911, 0.8095858304968093, 0.8096316901213462, 0.8096769898938979, 0.8097217925375039, 0.8097660166371959, 0.8098097173388316, 0.809852913806578, 0.8098955909883092, 0.8099377743530158, 0.8099794979111652, 0.8100207630400601, 0.810061583165467, 0.8101019711638776, 0.8101419489322653, 0.810181522938316, 0.8102206923255689, 0.8102594660854088, 0.8102978527777199, 0.8103358730614542, 0.8103735267749554, 0.8104108185244867, 0.8104477556716813, 0.810484344830787, 0.8105205939505514, 0.810556513454065, 0.8105921073586029, 0.8106273813081063, 0.8106623408935041, 0.8106969916008302, 0.8107313387408527, 0.8107653875772484, 0.8107991432655344, 0.810832608931153, 0.810865789242845, 0.8108986942749181, 0.8109313316754625, 0.8109637068727954, 0.8109958253306625, 0.8110276831846399, 0.8110592949747197, 0.811090668226307, 0.8111217948467827, 0.8111526802774793, 0.8111833200291695, 0.8112137375359835, 0.8112439217643572, 0.8112738791266014, 0.8113036156223834, 0.811333182848091, 0.8113625679419507, 0.8113917426755983, 0.811420709352555, 0.8114494751984539, 0.8114780358267861, 0.8115063919631665, 0.8115345516281816, 0.8115625222218472, 0.8115903063966723, 0.8116179081888567, 0.8116453318193699, 0.8116725913617739, 0.8116996550264275, 0.8117264675795685, 0.8117530770908568, 0.8117795001767221, 0.8118057495293916, 0.8118318330416827, 0.8118577564335342, 0.8118835241408506, 0.8119091392557796, 0.8119346053357483, 0.8119599184303149, 0.8119850847194044, 0.8120101105079015, 0.8120349971373332, 0.8120597352462001, 0.812084357930557, 0.8121088482784123, 0.8121332083407562, 0.8121574409172223, 0.8121815501268995, 0.812205538611248, 0.8122294088534215, 0.8122531634712852, 0.8122768048271791, 0.8123003350726868, 0.812323756280763, 0.812347070457476, 0.8123702795442942, 0.8123933854827653, 0.812416390211287, 0.8124392956279014, 0.812462103640785, 0.8124848160200651, 0.8125074211575513, 0.812529924224838, 0.8125523367889396, 0.8125746605655157, 0.8125968972831175, 0.8126190466627675, 0.8126411074465107, 0.8126630845540227, 0.8126849801301207, 0.8127067906785601, 0.8127285062830317, 0.8127501341619574, 0.812771682324274, 0.8127931538029275, 0.8128145487228664, 0.8128358688366653, 0.812857115962938, 0.8128782917255147, 0.8128993977145534, 0.8129204353331538, 0.8129414059104466, 0.8129623161109443, 0.8129831428210352, 0.8130038607919035, 0.8130244956949547, 0.8130450559008057, 0.8130655450873604, 0.8130859674446327, 0.8131063246065193, 0.8131266120937547, 0.8131468323452609, 0.8131669905272716, 0.8131870884157333, 0.8132071274641617, 0.8132271089342074, 0.8132470339832036, 0.8132669037851936, 0.8132867195647557, 0.8133064822790913, 0.8133261914756045, 0.8133456330920112, 0.8133649318268104, 0.8133841902984008, 0.8134034083963496, 0.8134225814608806, 0.8134417122130544, 0.813460801460771, 0.8134798497361072, 0.8134988574657713, 0.8135180181962004, 0.813537146362352, 0.8135562377180823, 0.8135752924888916, 0.8135943109535141, 0.8136132934143644, 0.8136322402704745, 0.8136511518899645, 0.813670028721431, 0.8136888712273445, 0.8137076789518767, 0.8137264521574175, 0.813745191506641, 0.8137638975687883, 0.8137825708566098, 0.8138012118370874, 0.813819820916021, 0.8138383985296611, 0.8138569450756008, 0.8138754609185526, 0.8138939450855871, 0.8139123903300155, 0.8139307982715623, 0.813949173835742, 0.8139675181997598, 0.8139858321675202, 0.8140040722672928, 0.8140217269615334, 0.814039337119884, 0.8140569119637213, 0.8140744463708373, 0.8140919409264207, 0.8141093968820223, 0.8141268154575736, 0.8141441996811021, 0.8141615471999735, 0.814178859019437, 0.8141961355383202, 0.8142133770949698, 0.8142304814226246, 0.8142475258799415, 0.8142645369663639, 0.814281514758962, 0.814298459463269, 0.814315371277073, 0.8143322504011792, 0.8143490968147709, 0.8143659109306907, 0.8143826902126386, 0.8143994310517337, 0.8144161355435887, 0.8144328049437625, 0.8144494412503649, 0.8144660381085622, 0.8144826027251427, 0.8144991352927297, 0.8145156359448609, 0.8145320995198414, 0.8145485293243988, 0.8145649257578891, 0.8145812890576315, 0.8145976194102355, 0.814613916983187, 0.8146301819237098, 0.8146464143578763, 0.8146626140633986, 0.8146787803903757, 0.8146949142764792, 0.8147110158310971, 0.8147271429420173, 0.8147432672251155, 0.814759359748677, 0.8147754205160952, 0.8147914500801742, 0.8148074480216938, 0.8148234142598456, 0.8148393495245108, 0.8148552502592147, 0.8148711192870297, 0.8148869569499566, 0.8149027633625103, 0.8149185385593796, 0.8149342825294166, 0.8149499952360971, 0.8149656766309642, 0.8149813266594013, 0.8149969453072308, 0.8150125327518428, 0.8150280889528896, 0.8150436138780213, 0.8150591074994116, 0.8150745697932832, 0.8150900007392214, 0.8151054003194576, 0.8151207685996564, 0.8151361056964062, 0.8151514113738414, 0.8151666856225301, 0.8151819284314693, 0.8151971397882515, 0.8152123196790855, 0.8152274681331265, 0.8152424835037326, 0.8152573019012868, 0.8152720894917515, 0.8152868468441905, 0.81530157162895, 0.8153162628520662, 0.8153309253250304, 0.8153455569344702, 0.8153601575708008, 0.815374727204214, 0.8153892658084996, 0.8154037733587456, 0.8154182498352354, 0.8154326952259662, 0.8154471095276153, 0.8154614927454814, 0.8154758448927304, 0.8154901659893181, 0.815504456060758, 0.8155187150986607, 0.815532943102073, 0.8155471401274323, 0.8155613062273565, 0.8155754414510639, 0.8155895458445909, 0.8156036194508807, 0.8156176623097999, 0.8156316744581535, 0.8156457125044126, 0.815659727823408, 0.8156737135752843, 0.8156876695495596, 0.8157016100455337, 0.8157155345174487, 0.8157294043209466, 0.8157431973636547, 0.8157569535321434, 0.8157706791635655, 0.8157843741552726, 0.8157980384912078, 0.8158116721090106, 0.8158252749155376, 0.8158388467990452, 0.8158523876398417, 0.8158658973221822, 0.8158793757341586, 0.8158929280090598, 0.8159064956441928, 0.8159200333026173, 0.8159335406625634, 0.8159470086403801, 0.815960428927105, 0.815973812882703, 0.8159869153035544, 0.81599991187354, 0.8160128648843947, 0.8160257787983096, 0.8160386565099529, 0.8160514995350103, 0.8160643087151511, 0.8160770845015343, 0.8160898271402431, 0.8161025367462553, 0.8161152134343035, 0.8161278573314883, 0.8161404684976289, 0.8161530470096583, 0.8161655929392894, 0.816178106334396, 0.8161905871875602, 0.8162030356119875, 0.8162154517457562, 0.8162278357241274, 0.8162401838075273, 0.8162524889586305, 0.8162647559374194, 0.8162769903774091, 0.8162892692820155, 0.8163015416074354, 0.816313781967704, 0.8163259911134036, 0.8163380645383873, 0.8163498708469471, 0.8163616292528757, 0.8163733466276341, 0.8163850355494258, 0.8163966831894899, 0.8164082954900718, 0.8164198753319386, 0.8164314286545982, 0.8164429542779646, 0.8164544521389394, 0.8164659222625492, 0.8164773645171997, 0.8164887786905947, 0.8165001645368557, 0.8165115218487023, 0.816522850368933, 0.8165341496767747, 0.8165454196929997, 0.8165566603770474, 0.8165678719935753, 0.8165790544688236, 0.8165902077963718, 0.8166013319490718, 0.8166124268875521, 0.8166234926114389, 0.816634529163635, 0.8166455365931737, 0.8166565149544571, 0.8166674643064767, 0.8166783846407605, 0.8166892758943556, 0.816700138167579, 0.8167109715588103, 0.8167217761660952, 0.816732552087168, 0.8167432994194285, 0.8167540182598972, 0.8167647084624782, 0.8167753700215573, 0.8167860035782549, 0.816796609184569, 0.8168071868930497, 0.8168177368184395, 0.8168282590818444, 0.8168387538021611, 0.8168492210898395, 0.8168596611370557, 0.8168700740998209, 0.8168804601106232, 0.8168908192728113, 0.8169011518586536, 0.8169114584054404, 0.8169217390589496, 0.816931993963095, 0.8169422232574837, 0.8169524270781101, 0.8169626055578295, 0.8169727588323332, 0.8169828870400795, 0.8169929901129527, 0.8170030681152813, 0.8170131218696247, 0.8170231516162993, 0.8170331574417797, 0.8170431393120687, 0.8170530975020835, 0.8170630321159698, 0.8170729432366066, 0.8170828309394044, 0.8170926953240047, 0.8171025364890109, 0.81711235453235, 0.817122149551198, 0.8171319216418982, 0.8171416708998798, 0.8171513974668484, 0.8171611014377919, 0.8171707829092989, 0.8171804368742261, 0.8171900619755779, 0.8171996647029931, 0.8172092652081357, 0.8172188481055581, 0.8172284089125131, 0.8172379478316926, 0.8172474649680344, 0.8172569496812752, 0.8172664152792097, 0.8172758578077882, 0.8172852769975695, 0.8172946729711483, 0.817304045869859, 0.8173133958097061, 0.8173227229245854, 0.8173318876922238, 0.8173409842464413, 0.8173500586847251, 0.8173591112587562, 0.8173681421602681, 0.8173771515435426, 0.8173861395469368, 0.817395106311978, 0.8174040519527114, 0.8174129765744286, 0.8174218802780204, 0.8174307631623027, 0.8174396253255068, 0.8174484658152366, 0.8174572796718887, 0.8174660712224613, 0.8174748409481157, 0.8174835892480283, 0.8174923164543118, 0.8175010228445159, 0.8175097087075482, 0.817518374298991, 0.8175270198470135, 0.8175356455600925, 0.8175442511204901, 0.8175528324099839, 0.8175613944606315, 0.8175699374355581, 0.8175784614227146, 0.8175869665060416, 0.8175954527594063, 0.8176039202890095, 0.8176123691908872, 0.8176207969191753, 0.8176292035966148, 0.8176375902111078, 0.8176459571680894, 0.8176543047848186, 0.8176626333229828, 0.8176709429995367, 0.8176792340028949, 0.8176875065009205, 0.8176957606468329, 0.8177039965832478, 0.8177122144449358, 0.8177204117242022, 0.8177285888379145, 0.8177367468356342, 0.8177448860661098, 0.8177530068335158, 0.8177611094086588, 0.8177691940342133, 0.8177772609290571, 0.8177853102918973, 0.8177933423043043, 0.8178013571332724, 0.8178093549333693, 0.8178173358480749, 0.8178253000126116, 0.8178332475788423, 0.8178411786892513, 0.817849093485999, 0.8178569916857447, 0.817864873369204, 0.8178727397414035, 0.8178805909038779, 0.8178884269608546, 0.8178962480152681, 0.8179040541685565, 0.8179118455206423, 0.8179196221845066, 0.8179273842689672, 0.8179351318782339, 0.8179428651112869, 0.8179505840604624, 0.8179582888170184, 0.8179659794710048, 0.8179736561113351, 0.8179813188258239, 0.817988967700221, 0.8179966028297728, 0.8180042243193527, 0.8180118322709894, 0.818019426784172, 0.8180270032727668, 0.8180345288962998, 0.8180420424193804, 0.8180495437156896, 0.8180570329179484, 0.8180645100848338, 0.8180719752359886, 0.8180794283970356, 0.818086869598015, 0.818094298873322, 0.818101716261577, 0.8181091218053836, 0.8181165155510042, 0.8181238975480123, 0.8181312678489943, 0.8181386265091739, 0.818145973586138, 0.818153309139527, 0.8181606332307766, 0.8181679459205622, 0.8181752472745031, 0.8181825373616988, 0.8181898162521655, 0.818197084016415, 0.8182043407253722, 0.8182115864732771, 0.8182188253154994, 0.8182260522002326, 0.818233264694979, 0.8182404639359895, 0.8182476505759122, 0.8182548250834604, 0.8182619877975368, 0.8182691373643012, 0.8182762755918805, 0.8182834026720858, 0.8182905187772381, 0.8182976240620516, 0.8183047186685685, 0.8183118027294248, 0.8183188763700044, 0.8183259397098478, 0.818332992863609, 0.8183400358944566, 0.8183470689158951, 0.8183540920488755, 0.8183611049438296, 0.8183681079796821, 0.8183751031014723, 0.8183820887769323, 0.8183890650723882, 0.8183960320597007, 0.8184029898137339, 0.8184099384112652, 0.8184168779302661, 0.8184238084492896, 0.8184307300471134, 0.8184376428024225, 0.8184445467936184, 0.8184514420986722, 0.818458328801773, 0.818465207045301, 0.8184720769400742, 0.8184789385988426, 0.8184857921242545, 0.8184926375984435, 0.8184994751164957, 0.8185063047700354, 0.8185131266477553, 0.8185199408357522, 0.8185267474177874, 0.8185335464755161, 0.8185403380887162, 0.8185471223354648, 0.8185538992922976, 0.8185606690343348, 0.8185674316354367, 0.8185741871682748, 0.8185809357044531, 0.8185876773145884, 0.8185944120683741, 0.8186011400346427, 0.8186078612814436, 0.8186145758760687, 0.8186212838851152, 0.8186279853745265, 0.8186346804096, 0.8186413690550545, 0.8186480513750425, 0.8186547274331634, 0.8186613972925082, 0.8186680610156643, 0.8186747186647338, 0.8186813703013596, 0.8186880159867305, 0.8186946558154802, 0.8187012898534, 0.8187079181334435, 0.8187145407317661, 0.8187211566315058, 0.8187277667106689, 0.8187343712928904, 0.8187409704448767, 0.8187475642316042, 0.8187541588038907, 0.818760753467854, 0.818767342242577, 0.8187739267538421, 0.8187805078329666, 0.8187870859536531, 0.8187936613557283, 0.8188002341285577, 0.8188068042683145, 0.8188133717171331, 0.8188199363894846, 0.8188264981895019, 0.818833057022028, 0.8188396127993061, 0.818846165444627, 0.8188527148940116, 0.8188592610965557, 0.818865804013979, 0.8188723436196519, 0.8188788798922935, 0.818885412821477, 0.8188919424075025, 0.8188984686573602, 0.8189049915836775, 0.8189115112037264, 0.8189180275386255, 0.8189245406125936, 0.8189310488346698, 0.8189375526918349, 0.8189440534104186, 0.8189505510162268, 0.8189570455291109, 0.818963536967865, 0.8189700253821054, 0.8189765108192723, 0.8189829933250466, 0.8189894729435597, 0.8189959497251704, 0.8190024256123332, 0.8190088985464967, 0.8190153686625513, 0.8190218360228325, 0.8190283006849461, 0.819034762702684, 0.8190412221267747, 0.819047679005423, 0.8190541333848744, 0.8190605853099708, 0.8190670348240956, 0.8190734819692707, 0.8190799267723934, 0.8190863692698905, 0.8190928095015726, 0.8190992474955671, 0.8191056832996133, 0.8191121169593952, 0.819118548519389, 0.8191249781061729, 0.8191314057583149, 0.8191378315129991, 0.819144255406294, 0.819150677473272, 0.8191570977481784, 0.8191635162645068, 0.8191699330551317, 0.8191763481523686, 0.8191827615880554, 0.8191891733936143, 0.8191955836001069, 0.8192019922382745, 0.8192083993385668, 0.819214804967787, 0.8192212092156891, 0.8192276119872751, 0.819234013314503, 0.8192404132286458, 0.8192468117605523, 0.8192532089407032, 0.819259604799321], 'MSE': [11.253556389330123, 4.1643638613744969, 3.2612224236397065, 2.9954579992389729, 2.8851025769882437, 2.8245386122667928, 2.7843539925833811, 2.7545322974654685, 2.7308759694925668, 2.7114319427553242, 2.6949871244187591, 2.6808242315701607, 2.6684616677557447, 2.6575451321357515, 2.6478314022327827, 2.6391031161488367, 2.6312123691874936, 2.6240408885852657, 2.6174880699585343, 2.6114681442221825, 2.6059089697645681, 2.6007558532800918, 2.5959603853937541, 2.5914858355163823, 2.5873618690266253, 2.5834671843279988, 2.5797852848239113, 2.5762708856294099, 2.572899002344188, 2.5696411662770915, 2.5664817159773388, 2.5634084704028219, 2.5604112397160463, 2.5574802688694422, 2.5546092122315884, 2.5517903864255751, 2.5490180457207599, 2.5462931020101975, 2.5436299667216762, 2.5410082603105626, 2.5384303239951151, 2.5358977539136887, 2.5334051654111649, 2.5309556660253265, 2.5285507446751958, 2.5261751938528207, 2.5238363178038461, 2.5215340555083863, 2.5192619845096678, 2.5170191782941047, 2.5148023937284005, 2.5126092728519311, 2.510438784640169, 2.5082915010216835, 2.5061689751582659, 2.5040708514824082, 2.5019986774150356, 2.4999498787159218, 2.4979250581103796, 2.4959278682535979, 2.4939575923060286, 2.4920130252985642, 2.4900910445561055, 2.4881949172147735, 2.4863197900472445, 2.4844705950378212, 2.4826437557882679, 2.4808368759048167, 2.4790492905445465, 2.4772807627163309, 2.475531119339518, 2.4737991087281652, 2.4720872391217927, 2.4703957240829864, 2.4687228274146, 2.467068120479301, 2.465431488811094, 2.4638124862674644, 2.4622100744088833, 2.4606240489479325, 2.4590544715632032, 2.4575009342231784, 2.4559632300151932, 2.4544409664351186, 2.4529339240647032, 2.4514418604828592, 2.4499645223265767, 2.4485016675321116, 2.4470530456373409, 2.4456221567696383, 2.4442072142575628, 2.442806684926532, 2.4414217273777883, 2.4400528101318422, 2.4386990466819536, 2.4373588379064253, 2.4360311755866744, 2.4347159911096923, 2.4334127925124682, 2.4321212721301144, 2.4308405585318016, 2.4295706567448767, 2.4283112465973411, 2.4270619989611544, 2.4258223690277574, 2.4245924700927151, 2.4233720606213631, 2.4221624024279578, 2.4209623774722528, 2.4197710834926864, 2.4185879890691093, 2.4174127063095852, 2.416244580351528, 2.4150836307176693, 2.4139296235704655, 2.41278226146789, 2.4116412706631003, 2.4105063667726374, 2.4093772736215366, 2.4082537262907069, 2.4071354513365595, 2.4060225685796914, 2.4049149664923783, 2.4038113296095549, 2.4027120449900954, 2.4016168380856344, 2.4005254945889654, 2.3994377099594839, 2.3983532530005172, 2.3972718891093501, 2.396193506383038, 2.3951178225038112, 2.3940446933308692, 2.3929740003112498, 2.3919054041135088, 2.390838750505337, 2.3897738234723844, 2.3887120283934697, 2.387651995767714, 2.3865926341523691, 2.3855338516768874, 2.3844758739349077, 2.3834181848969132, 2.3823608384402712, 2.3813036849867379, 2.3802465029498543, 2.3791892640099968, 2.3781320441558682, 2.3770747649689765, 2.3760180300844707, 2.3749612119853762, 2.3739045358246265, 2.3728483979893884, 2.3717922657601958, 2.3707357086981777, 2.3696785135928282, 2.3686205497506698, 2.3675617257176103, 2.3665024984664536, 2.3654421908655703, 2.364380772193686, 2.3633181406061836, 2.3622544377521395, 2.3611900450966417, 2.3601249370242279, 2.3590585782469753, 2.3579910105740685, 2.356922968973616, 2.3558528421365779, 2.3547798406412523, 2.3537057486383275, 2.3526307399750532, 2.3515550390571875, 2.350478508604783, 2.3494010498818234, 2.3483226342636088, 2.3472432552321054, 2.3461625990653587, 2.3450810231906942, 2.3439987173532582, 2.3429163051779711, 2.3418338033187762, 2.3407508223789457, 2.3396672833013308, 2.3385831735542308, 2.3374985113730844, 2.3364132722521429, 2.3353277535835137, 2.3342420801857404, 2.3331567997583766, 2.3320735321298374, 2.3309909698226599, 2.3299087547874726, 2.3288268693593031, 2.327744980071123, 2.3266631810405434, 2.3255819124820793, 2.3245012197477628, 2.3234211744151509, 2.3223421110422047, 2.3212639026728743, 2.3201866443018999, 2.3191101838147499, 2.3180345718846049, 2.3169601711022905, 2.3158873538075926, 2.3148174228492913, 2.3137501257177533, 2.3126847205236567, 2.3116218644490067, 2.3105616947376433, 2.3095045115217223, 2.3084500637023853, 2.3073981189313693, 2.3063487256271387, 2.3053019128146368, 2.3042576329504199, 2.3032159399021594, 2.3021764661383899, 2.3011420628635961, 2.3001110863872465, 2.2990834709795744, 2.2980584173064016, 2.2970365298689299, 2.2960173766676055, 2.2950014628872326, 2.2939891538424431, 2.2929823462204517, 2.2919798115814749, 2.2909819364288264, 2.2899885887817866, 2.2889998985939024, 2.2880159567661384, 2.2870366435635989, 2.2860633400843824, 2.2850943796191614, 2.2841306092570504, 2.2831718333607935, 2.2822177937395711, 2.2812683205052715, 2.2803236486216774, 2.279383643880037, 2.2784485425337757, 2.2775184408370008, 2.2765938087669517, 2.2756746165443893, 2.2747605411045018, 2.2738519686089469, 2.2729494496402092, 2.2720526494236597, 2.2711611024099749, 2.2702748328323121, 2.269393558302593, 2.2685171572169933, 2.2676461288090111, 2.2667804866278769, 2.265920325867337, 2.2650656835681375, 2.2642165812396096, 2.2633730357446531, 2.2625352662231308, 2.2617034596082797, 2.2608779440627691, 2.2600584637380665, 2.2592451064739314, 2.2584376054565327, 2.2576354744112823, 2.2568392315476764, 2.2560490939004407, 2.2552651380345252, 2.2544868229389197, 2.2537142019749385, 2.2529475824093548, 2.2521866623909221, 2.251431559113827, 2.2506847309286635, 2.2499448111506379, 2.2492104863806137, 2.2484818973082072, 2.2477585173259595, 2.2470408751576509, 2.2463289634998542, 2.2456231816439405, 2.2449235577222217, 2.2442299395984096, 2.2435420546808613, 2.2428597529119561, 2.2421830155830782, 2.2415117989946891, 2.240846069343982, 2.2401857030217887, 2.2395313630874725, 2.2388823219304017, 2.2382384972895535, 2.2375997579782814, 2.2369661628789994, 2.2363377567289473, 2.2357145341595395, 2.2350964791711045, 2.2344839971576835, 2.2338770617651411, 2.2332794427433811, 2.2326869096123692, 2.232099337423977, 2.2315166943810363, 2.2309389497429448, 2.230366063032593, 2.2297977798628166, 2.2292342677546912, 2.2286758287623143, 2.2281223117927969, 2.2275735375304433, 2.2270293988868706, 2.2264930378989667, 2.225963224778972, 2.2254392259362468, 2.2249219935768556, 2.2244108827307016, 2.2239056692591919, 2.2234065292076655, 2.2229131646981304, 2.2224251779539337, 2.2219425528665377, 2.2214651324120394, 2.2209927659906881, 2.2205251975017792, 2.2200623513011184, 2.2196042374056231, 2.219150750654642, 2.2187017909342281, 2.2182571166232199, 2.2178167296122986, 2.2173805760279355, 2.2169485697705875, 2.2165206334819083, 2.2160966741956338, 2.2156765700062935, 2.2152602739289899, 2.2148477199538115, 2.2144388426908588, 2.2140335779770575, 2.2136318636991899, 2.2132336382948052, 2.2128388414664557, 2.212447436659867, 2.2120593692707908, 2.211674521473018, 2.2112928038166833, 2.2109141528137495, 2.2105385045618182, 2.2101659042580795, 2.209796181846964, 2.2094292493134979, 2.209065201306629, 2.2087039741860943, 2.208345620456607, 2.2079898660393158, 2.2076368399796138, 2.20728646728096, 2.2069386777729672, 2.2065928679991136, 2.2062491883870057, 2.2059079690874794, 2.205569183159211, 2.2052327460932726, 2.2048987091930119, 2.2045670639718464, 2.2042377166233016, 2.2039105805989174, 2.2035856248757124, 2.2032628022474534, 2.2029420633468964, 2.2026232435737012, 2.2023067147303799, 2.2019931228151344, 2.2016819056190431, 2.2013728688011169, 2.2010658639167153, 2.2007607986537141, 2.2004576061133543, 2.2001562344145706, 2.1998566473924939, 2.1995588034404769, 2.1992627487617549, 2.1989684110776975, 2.1986757166481876, 2.1983846497831103, 2.1980953199718716, 2.1978073401325275, 2.1975209080628706, 2.1972359997751112, 2.1969525825255354, 2.1966706081384655, 2.196390045720142, 2.1961108662283126, 2.1958330390451799, 2.1955565365414915, 2.1952813335529462, 2.1950074058348599, 2.194734729924837, 2.1944632831160193, 2.194193042700622, 2.1939239860077047, 2.19365609083831, 2.1933893348749569, 2.1931236974147437, 2.1928593142237296, 2.192596124816431, 2.1923339939083752, 2.1920729014336966, 2.1918128271757622, 2.1915537743974083, 2.1912957578113175, 2.1910387198783776, 2.190782635513421, 2.1905275456075226, 2.1902735661389818, 2.1900206126832149, 2.1897685915699938, 2.1895174673268576, 2.1892672384924428, 2.1890178845691421, 2.18876938428697, 2.1885217186540742, 2.1882748690724263, 2.1880288191317736, 2.1877835532869869, 2.1875389935918417, 2.1872954103764974, 2.1870530989438497, 2.1868117590485139, 2.1865712927901644, 2.1863316571530906, 2.1860928031320981, 2.1858547116175968, 2.1856174349977917, 2.185380944747751, 2.1851451804446884, 2.1849101213176478, 2.1846757503667233, 2.1844420528360167, 2.184209015189686, 2.1839766236964633, 2.1837448640340287, 2.1835137250072325, 2.1832832119095058, 2.1830558283517973, 2.1828301158963055, 2.1826048743477302, 2.1823801049976645, 2.1821558623455082, 2.1819321145665231, 2.181708852211738, 2.1814860690581397, 2.1812637601150691, 2.1810396617190242, 2.1808159441854107, 2.1805926571759051, 2.1803697980531189, 2.1801473635570603, 2.1799253501507727, 2.1797037531672929, 2.1794825683011942, 2.1792617903058202, 2.1790414137722482, 2.1788214440317164, 2.1786018780153849, 2.1783827079728102, 2.1781639272463131, 2.1779455298389099, 2.1777275102889138, 2.1775098638502102, 2.1772925854205338, 2.1770756703497538, 2.1768591143722946, 2.1766429288672602, 2.1764271985898396, 2.1762119045962001, 2.1759969892789424, 2.1757824388698097, 2.1755682439665671, 2.1753549130020797, 2.1751484287724407, 2.1749424654217719, 2.1747369150994986, 2.1745318377134981, 2.1743272264195683, 2.1741230665799294, 2.1739193439266176, 2.1737160230446917, 2.1735131314498841, 2.173310657385092, 2.1731085961857408, 2.1729069438946236, 2.172706896594391, 2.1725075495204198, 2.172308592742842, 2.1721100253602619, 2.1719118449688271, 2.1717140492552605, 2.1715166358710043, 2.1713196050595243, 2.1711229519923316, 2.1709267063332627, 2.170730910290751, 2.1705355393551131, 2.1703405788416941, 2.1701460053811732, 2.1699518932978594, 2.1697581583032295, 2.1695647981444179, 2.1693718112596034, 2.1691792580184859, 2.1689870997465324, 2.1687953317729884, 2.1686039513222353, 2.1684129562117449, 2.1682223444826478, 2.1680321144130588, 2.1678422645284696, 2.1676527974286963, 2.1674637207147955, 2.1672750234200255, 2.1670867042650221, 2.1668980862108498, 2.1667095012300712, 2.1665212876997058, 2.1663334455800656, 2.1661459684057123, 2.1659588610797251, 2.1657721245472157, 2.1655857502717049, 2.1653997798486944, 2.1652141802603437, 2.1650289475067117, 2.1648440802484603, 2.1646595780798839, 2.164475441131362, 2.1642916698300727, 2.1641082647427536, 2.1639252265081854, 2.1637425552921825, 2.1635602490200436, 2.1633783081636642, 2.1631967331013993, 2.1630155241586952, 2.1628346816136466, 2.1626542057050169, 2.162474096640624, 2.162294353652471, 2.1621149753769759, 2.1619359645727529, 2.161757321350116, 2.1615790458377551, 2.1614011381807812, 2.1612235985404937, 2.1610464265759015, 2.1608708111169137, 2.1606974993981312, 2.1605245479902102, 2.1603519502375459, 2.160179733387102, 2.1600079090639941, 2.1598364209943983, 2.1596652938957135, 2.1594945290496117, 2.1593241268047221, 2.159154087467591, 2.1589844113295813, 2.1588150986212926, 2.1586461494831073, 2.1584775639538853, 2.1583093419716555, 2.1581414833824342, 2.1579739879528219, 2.1578068553844214, 2.1576400857753542, 2.1574736791367637, 2.1573076348085802, 2.1571419521753978, 2.1569766306615716, 2.1568116697286741, 2.1566470688744537, 2.1564828276326433, 2.1563189455727816, 2.156154760618461, 2.1559908414756843, 2.1558272681414343, 2.1556640430774467, 2.1555009990432232, 2.1553381424217868, 2.1551759251864451, 2.15501460572324, 2.1548537175303064, 2.1546931864901264, 2.1545330138032468, 2.1543731996574658, 2.154213744782131, 2.1540546502666227, 2.153895917417862, 2.1537375476357274, 2.1535795422739401, 2.1534219026413428, 2.1532633991292065, 2.153104715968214, 2.1529463834061877, 2.152788405206457, 2.1526308876087934, 2.1524739277924319, 2.1523173928944894, 2.152164150746025, 2.1520121465988638, 2.1518606519067789, 2.1517096144812653, 2.1515590004671141, 2.151408792137302, 2.1512589796479085, 2.1511095577223056, 2.1509605234823743, 2.1508118755833689, 2.1506636126834104, 2.1505157332959661, 2.1503682367214059, 2.1502211220599463, 2.1500743884728513, 2.1499280354002042, 2.1497820629287623, 2.1496364697345078, 2.1494912542025144, 2.1493464147508092, 2.1492019951163703, 2.1490580776057366, 2.1489146065475175, 2.1487715160537424, 2.1486279055145894, 2.1484843719237121, 2.1483412121880567, 2.1481984175290281, 2.1480572102204851, 2.1479191270288638, 2.147781604092649, 2.1476445610452077, 2.1475078507754866, 2.1473716233249873, 2.1472358091949153, 2.1471003746926445, 2.1469652503514007, 2.1468304499731263, 2.1466959742958078, 2.1465618230267367, 2.146427997705004, 2.1462945008135654, 2.1461613352281432, 2.1460285033730311, 2.1458960082563832, 2.1457638547994424, 2.1456320439288312, 2.1455005761189341, 2.1453694482743955, 2.1452386612578858, 2.1451082151445013, 2.1449781102517544, 2.1448483470401261, 2.1447189255139851, 2.1445898451715539, 2.1444611054393543, 2.1443327056811143, 2.1442046452068855, 2.144076924115756, 2.1439495431440019, 2.1438225011183456, 2.143695796888168, 2.1435694293067553, 2.1434433972310343, 2.143317699521845, 2.1431923350444624, 2.1430673055075857, 2.1429426109768728, 2.1428182439539669, 2.1426942038307129, 2.1425704899925004, 2.1424471010973334, 2.1423240357287905, 2.1422012924962925, 2.1420788701080462, 2.1419567663164174, 2.1418349792967417, 2.14171350749948, 2.1415923497158924, 2.1414715027616058, 2.1413509603526295, 2.1412307207839851, 2.1411107823724991, 2.1409911434853677, 2.1408718025320375, 2.1407527579586731, 2.1406340081782669, 2.1405155515714522, 2.140397388934888, 2.1402795195162061, 2.140161933694992, 2.1400446286605708, 2.1399276034015626, 2.139810858315589, 2.1396943901872945, 2.1395781977986248, 2.139462280180247, 2.1393466364501839, 2.139231265443057, 2.1391161660056297, 2.1390013369925751, 2.1388867772673494, 2.1387724857031523, 2.1386584611838688, 2.138544702052152, 2.1384312071970504, 2.1383179754888908, 2.1382050654897822, 2.1380924930707579, 2.1379801823308631, 2.1378678975820313, 2.1377558187680337, 2.1376439983177944, 2.1375324338606858, 2.1374211241693875, 2.1373101936893582, 2.1371994867764572, 2.1370890496761143, 2.1369788855396363, 2.1368689929331879, 2.1367593702037664, 2.1366500159946158, 2.1365409287397261, 2.136433740251507, 2.1363273495678521, 2.1362212175458017, 2.1361153412417671, 2.1360097184132871, 2.1359043472559276, 2.1357992261515037, 2.135694353444753, 2.1355897278018348, 2.1354853479912874, 2.135381212833122, 2.1352773211716198, 2.1351736718578898, 2.1350702760308877, 2.1349671916967061, 2.1348643682480213, 2.134761800057305, 2.1346594824559073, 2.134557411559534, 2.1344555841220418, 2.13435399676445, 2.1342526464975449, 2.1341515306527215, 2.1340506467916973, 2.1339499986306416, 2.1338496343351023, 2.1337494950515778, 2.1336495788722041, 2.1335498847683305, 2.1334504117582149, 2.1333511589779257, 2.1332521251853693, 2.1331533092573371, 2.1330547409695235, 2.1329564188863848, 2.132858331453702, 2.1327604739296215, 2.1326628426035765, 2.1325654344149427, 2.1324682468262823, 2.1323712776339527, 2.1322745248746737, 2.1321779867564348, 2.1320816616112479, 2.1319855478628686, 2.1318896748405796, 2.1317940376688127, 2.1316986240722033, 2.1316034299718858, 2.1315084518103253, 2.131413686420244, 2.131319130963389, 2.1312247828798303, 2.1311306398455487, 2.1310366997369456, 2.1309429606009056, 2.1308494206296493, 2.1307560781450752, 2.1306629315656638, 2.130569979115267, 2.130477219127433, 2.1303846499394932, 2.1302922748653175, 2.1302000929608798, 2.1301080901325369, 2.1300162651927677, 2.129924616922557, 2.1298331441180154, 2.1297418455927484, 2.1296507201780921, 2.1295597665526551, 2.1294689834437324, 2.1293783696325179, 2.1292879239613662, 2.1291976453503403, 2.1291075327321138, 2.1290175850534867, 2.1289278012745552, 2.1288381803682621, 2.128748721331704, 2.1286594230509062, 2.1285702842992986, 2.1284813038835853, 2.1283924806401679, 2.1283038682071487, 2.1282158506772744, 2.1281279746708117, 2.1280402416651545, 2.1279526501080341, 2.1278651993131819, 2.1277778890508605, 2.1276907190213943, 2.1276036888734429, 2.1275167982047263, 2.1274300465635538, 2.1273434334516459, 2.1272569583279304, 2.1271706206126111, 2.1270844196906498, 2.1269983549161675, 2.1269124256156449, 2.126826631091546, 2.1267409706253337, 2.126655443507369, 2.1265700489701844, 2.126484786205614, 2.126399654394767, 2.1263146527129586, 2.1262297803306729, 2.1261450361457039, 2.1260603727276131, 2.1259758491608789, 2.1258914938952933, 2.1258072936415955, 2.1257232407665971, 2.1256393297883642, 2.1255555567431879, 2.1254719374651949, 2.1253884508070495, 2.1253050945253897, 2.1252218666047931, 2.1251387652357701, 2.1250557887570349, 2.1249729356173144, 2.1248902043501552, 2.1248075935574482, 2.1247251018982287, 2.1246427286336997, 2.1245604724363396, 2.1244783318915443, 2.1243963110877626, 2.1243144055932017, 2.1242325926592343, 2.1241508902068338, 2.124069297460264, 2.1239878135790633, 2.1239064376876433, 2.1238251688880392, 2.1237440062683173, 2.1236629489097432, 2.123581995890957, 2.1235011462916824, 2.1234203991949556, 2.1233397536888527, 2.1232592087887157, 2.1231787628293142, 2.1230984145145486, 2.1230181625257272, 2.1229380056623053, 2.1228579429636731, 2.1227779733177305, 2.1226980956528663, 2.1226183089317536, 2.1225386121474323, 2.1224590043202531, 2.1223794844952, 2.1223000517392134, 2.1222207051391266, 2.1221414437998005, 2.1220622668426485, 2.1219831734038257, 2.1219041626333817, 2.1218252336938619, 2.1217463857593497, 2.1216676180147322, 2.1215889296549637, 2.1215103198841581, 2.1214317879152893, 2.1213533329694543, 2.1212749542753984, 2.1211966510694231, 2.1211184225945945, 2.1210402681006051, 2.120962186843613, 2.1208841780857246, 2.1208062410949355, 2.1207283751449171, 2.1206505795147126, 2.1205728534886759, 2.1204951959599958, 2.1204176061591991, 2.1203400837008686, 2.1202626276943111, 2.1201852500324558, 2.1201079404463901, 2.1200306951509749, 2.1199535133660294, 2.1198763943316075, 2.1197992661095144, 2.1197221368151955, 2.1196450763997405, 2.119568065848461, 2.1194910954385127, 2.1194141596296041, 2.1193372556167929, 2.1192603823548839, 2.1191835398886361, 2.1191067288948289, 2.1190299503737813, 2.1189532054467297, 2.1188764952266022, 2.118799820739778, 2.1187231828834232, 2.1186465824058227, 2.1185700199023327, 2.1184934958206738, 2.118417010472295, 2.1183405641060937, 2.1182641568440159, 2.1181877886825524, 2.1181114595399508, 2.1180351692685213, 2.1179589176662561, 2.1178827044861599, 2.1178065294449748, 2.1177304111501227, 2.1176543439060183, 2.1175783133698567, 2.1175023192398248, 2.1174263612837438, 2.1173504392818043, 2.1172745526537069, 2.117198700844606, 2.1171228833202287, 2.1170470995644304, 2.1169713489882263, 2.11689560887323, 2.1168199032956618, 2.1167442306778868, 2.1166685902908453, 2.1165929814607964, 2.1165174035586056, 2.116441855990967, 2.1163663381940925, 2.116290849627104, 2.1162153897655478, 2.1161399581020226, 2.1160645541450518, 2.1159891775800532, 2.1159138279809873, 2.115838504882245, 2.1157632079548523, 2.1156879366404642, 2.1156126904047765, 2.1155374687276067, 2.1154622701285346, 2.1153870941564761, 2.1153119403765386, 2.1152368083668764, 2.1151616977172902, 2.1150866080272595, 2.1150115389050517, 2.1149364899661744, 2.114861460832679, 2.1147864511321948, 2.1147114604972179, 2.1146364885644608, 2.1145615349743827, 2.1144865993708506, 2.1144116809725579, 2.1143367787297627, 2.1142618937535356, 2.1141870256701081, 2.1141121741137154, 2.1140373387235623, 2.1139625191431537, 2.1138877150190156], 'Rp': [0.60321885372517614, 0.81156645067810351, 0.85145805750180925, 0.86311721985246015, 0.8681552121057402, 0.87100047454625562, 0.87292188883982225, 0.87436072295592393, 0.87550817128793035, 0.87645399826719061, 0.87725508153258747, 0.87794532892952126, 0.87854788266540662, 0.87907975711779307, 0.87955269947191994, 0.87997731351668596, 0.88036086597513241, 0.8807091775646908, 0.88102720304461091, 0.88131917505702051, 0.88158863222533046, 0.8818382526428733, 0.88207056766170999, 0.88228723323216041, 0.88248697056180914, 0.88267550017573315, 0.88285361469674417, 0.88302359471110015, 0.88318667015334285, 0.88334420094926769, 0.88349694510704069, 0.88364553028131976, 0.88379038681676114, 0.88393202181594177, 0.88407076165442955, 0.8842069524128211, 0.88434087719343268, 0.88447250859559789, 0.8846011533580187, 0.88472776042584456, 0.88485224938869034, 0.88497454774192408, 0.88509488224792476, 0.8852131202049589, 0.8853291994519451, 0.88544385339318588, 0.88555674411246155, 0.88566785615142785, 0.88577749949849782, 0.8858857137513918, 0.88599265886772471, 0.88609845087662464, 0.88620313854251231, 0.88630669692574171, 0.88640905246125756, 0.88651021875150571, 0.88661012615116586, 0.88670889621820725, 0.88680650225630131, 0.886902767165338, 0.88699772203540506, 0.88709143038925342, 0.88718403772119347, 0.8872753928524838, 0.8873657336683527, 0.88745483042504103, 0.88754283810600387, 0.88762987444787311, 0.88771597189195328, 0.8878011440116399, 0.88788539759228735, 0.88796879395136885, 0.88805120886520672, 0.88813263814314036, 0.88821316472562117, 0.88829280828230028, 0.88837157464027217, 0.88844948541900215, 0.8885265906630051, 0.88860290072720416, 0.88867841280987148, 0.88875314677314154, 0.88882711297811134, 0.88890033025520465, 0.88897280937160894, 0.88904456207786109, 0.88911560060959804, 0.88918593671272428, 0.88925558348278766, 0.88932438754652254, 0.8893924184092773, 0.88945974385624949, 0.88952632766999695, 0.88959213782979418, 0.88965720796970438, 0.88972161929669125, 0.88978542183342102, 0.8898486184005463, 0.88991123326669741, 0.8899732819083721, 0.89003480574616667, 0.89009580532393295, 0.89015629609145597, 0.89021629401943791, 0.8902758265882238, 0.89033488966522756, 0.89039349322710093, 0.89045157692675214, 0.89050919021282582, 0.89056637973043806, 0.89062317145808723, 0.8906795842248475, 0.89073564996863908, 0.89079136682502824, 0.89084674644229889, 0.89090180326534663, 0.89095655052968459, 0.89101100198690864, 0.89106517094823723, 0.89111907015232006, 0.89117271275406285, 0.8912260928956045, 0.8912792145770787, 0.89133214320668408, 0.89138486012482243, 0.89143737821475788, 0.8914897076980669, 0.89154186309326966, 0.89159385551671355, 0.89164569612648381, 0.89169739067573517, 0.89174895238423302, 0.89180038687456464, 0.89185170120578716, 0.89190291312638503, 0.89195402872909557, 0.89200505833607124, 0.89205587303575884, 0.89210664576585585, 0.89215740130573129, 0.8922081280559413, 0.89225881300546206, 0.8923094806672327, 0.89236012804749942, 0.89241076241910555, 0.89246139446789163, 0.8925120255845076, 0.89256265044369565, 0.89261327486508957, 0.89266387026420546, 0.89271446656463005, 0.89276505420596064, 0.8928156106254499, 0.89286616323052281, 0.89291673341368416, 0.89296733144373375, 0.89301796352158636, 0.8930686337398025, 0.89311932094376367, 0.89317005693231055, 0.89322084267791912, 0.89327168332785145, 0.89332257304073515, 0.89337349151047529, 0.89342443922364512, 0.89347544680349333, 0.8935265091885608, 0.89357759387758673, 0.89362877518632988, 0.89368009011275662, 0.89373145395499365, 0.89378285879897956, 0.89383429353034327, 0.89388576434891831, 0.89393727669782008, 0.89398883194711709, 0.89404043040794101, 0.89409208894149939, 0.89414378843171904, 0.89419551988083612, 0.8942472546630863, 0.89429899193326989, 0.89435074918689761, 0.89440253030140759, 0.89445433574684041, 0.89450616460100629, 0.89455801796172574, 0.894609881327323, 0.89466174923658615, 0.89471359640259829, 0.89476534658233575, 0.89481705735317552, 0.89486874959692897, 0.89492042318643195, 0.89497209456448279, 0.89502376119189031, 0.89507539936576364, 0.89512700707792081, 0.89517858095517089, 0.89523010503256906, 0.89528158536260438, 0.89533301751711103, 0.89538440873743086, 0.89543575752991378, 0.89548704942330259, 0.89553826052722307, 0.89558933009995068, 0.89564027118880607, 0.89569111888809372, 0.89574184188390782, 0.8957924390976959, 0.89584289268512207, 0.89589320655000826, 0.89594339855759453, 0.89599346602277719, 0.89604340755484113, 0.89609322543235559, 0.89614291691417791, 0.89619249976134507, 0.89624183812283265, 0.89629101112402421, 0.89634002182686134, 0.89638890639707902, 0.89643763723044445, 0.89648623506120728, 0.89653467585715885, 0.89658294229873703, 0.8966309441520508, 0.89667874032266115, 0.89672631164822036, 0.8967736646781781, 0.89682079353907218, 0.89686769380980025, 0.89691437053825751, 0.89696075699754907, 0.89700693566417478, 0.8970528652239903, 0.89709855486685386, 0.89714401607511196, 0.89718925718977527, 0.89723426712868648, 0.89727905248100392, 0.89732360199609074, 0.89736791126505688, 0.89741195782776406, 0.89745574305635256, 0.8974992823825958, 0.89754255872473365, 0.89758554352355091, 0.89762825378460298, 0.8976707118958247, 0.89771291673848885, 0.8977548818334532, 0.8977966130131082, 0.89783808645305585, 0.89787930154067908, 0.89792025388053698, 0.89796094168545881, 0.89800136391838936, 0.89804151994972492, 0.89808139948211396, 0.89812099251149402, 0.89816028467193565, 0.89819928977366714, 0.8982380007836247, 0.89827643134867308, 0.89831460480480507, 0.89835249641070425, 0.89839009589023511, 0.89842740060621173, 0.89846443549097843, 0.8985011977768641, 0.89853767367967763, 0.89857387632823171, 0.89860980058540263, 0.89864532953321918, 0.89868052836557999, 0.89871545973349298, 0.89875011684102746, 0.89878452485432758, 0.89881865863217392, 0.89885251854900472, 0.8988860863315109, 0.89891936075697798, 0.89895234732119778, 0.89898505984691113, 0.89901750580414597, 0.89904968603449653, 0.89908160264562975, 0.89911325727331237, 0.89914465586088588, 0.89917576830059476, 0.8992066272249245, 0.89923723701671121, 0.89926760397282912, 0.89929772529700025, 0.89932759887575653, 0.89935722499799953, 0.8993866044595229, 0.89941571800161058, 0.89944456694052843, 0.89947297212196509, 0.89950113477243421, 0.89952906081171835, 0.89955675175063499, 0.89958420906055736, 0.89961143467969229, 0.89963844074313559, 0.89966521976287872, 0.89969175675448998, 0.89971805859640619, 0.89974413434935352, 0.89976998905023353, 0.89979551758549436, 0.89982070340757692, 0.89984560346114095, 0.89987018094358751, 0.89989446671142159, 0.89991847339389608, 0.89994219112933138, 0.89996563394672702, 0.89998882077246989, 0.90001175234306596, 0.9000344361242304, 0.90005687926228151, 0.90007909399219976, 0.90010108389409815, 0.90012284845675228, 0.90014439268982382, 0.90016572136198814, 0.90018684591565046, 0.90020776621464349, 0.90022848494863272, 0.90024900623405191, 0.90026933373797224, 0.90028947190585407, 0.90030942654171309, 0.90032919987309346, 0.90034879504333265, 0.90036821516315402, 0.90038746328717656, 0.900406542371745, 0.90042545530045259, 0.90044420484226739, 0.90046279337739288, 0.90048122340376491, 0.90049949925031259, 0.90051762572917315, 0.90053560619197126, 0.90055344373004276, 0.900571134859669, 0.9005886896528762, 0.90060611220980558, 0.90062339763835153, 0.90064054874772159, 0.90065756285710663, 0.90067445397459112, 0.90069121529102003, 0.90070785031364331, 0.90072436236319442, 0.90074078011361991, 0.90075709644907642, 0.90077329565189679, 0.900789378983754, 0.90080535051874677, 0.90082120824241363, 0.90083695272877951, 0.90085258787909606, 0.90086811782082377, 0.9008835439350128, 0.90089886846888689, 0.90091409377190268, 0.90092922880333637, 0.90094425801981015, 0.90095914504716257, 0.90097391863576048, 0.90098858801885284, 0.90100316040322359, 0.90101764030140985, 0.90103203093559758, 0.90104633479249796, 0.90106055368885318, 0.90107468960216497, 0.90108874109478465, 0.90110271061570368, 0.90111660148433725, 0.90113041379062397, 0.90114414221089667, 0.90115780796274814, 0.90117139995205531, 0.9011849193682423, 0.90119836778519546, 0.90121174746258292, 0.90122505987374957, 0.90123830640157943, 0.90125148850662384, 0.90126460751592175, 0.90127766462200654, 0.90129066097368249, 0.90130359768364321, 0.90131647582924712, 0.9013292964877414, 0.90134206073615808, 0.90135476963553318, 0.90136742424955096, 0.90138002556311025, 0.90139256716933469, 0.90140505192771303, 0.90141748627203344, 0.90142987116532602, 0.90144220754537618, 0.90145449537520472, 0.90146673502343955, 0.90147892797171436, 0.90149107541940077, 0.9015031753370949, 0.90151522234143444, 0.90152722093971294, 0.90153917534492245, 0.90155108702205489, 0.90156295599714331, 0.90157478321968265, 0.90158656968308248, 0.90159831628080622, 0.90161002390111611, 0.90162169333003239, 0.90163332530590645, 0.90164492248971584, 0.90165647048543496, 0.90166795733877136, 0.90167939819578946, 0.90169079791710216, 0.90170215880826388, 0.90171348290504294, 0.90172477050961997, 0.90173601917544444, 0.90174723106496302, 0.90175840884228842, 0.90176955332936393, 0.90178066522961309, 0.90179174517627814, 0.90180279376881878, 0.90181381165471419, 0.90182479946363525, 0.90183575757755619, 0.9018466853502225, 0.90185746398633848, 0.90186816336677644, 0.90187884099689331, 0.9018894967006279, 0.90190012728887758, 0.90191073429957036, 0.90192131816671428, 0.90193187917443429, 0.9019424175517573, 0.90195304070490812, 0.90196364558801889, 0.90197422994236509, 0.90198479387775332, 0.90199533753565342, 0.90200586107453373, 0.9020163647112116, 0.90202684865030192, 0.90203731314085311, 0.90204775811199056, 0.90205818358478962, 0.90206858986668315, 0.90207897729537612, 0.90208934616609682, 0.90209969674807833, 0.90211002929192963, 0.90212034401773655, 0.90213064116185604, 0.90214092094019771, 0.90215118355121027, 0.90216142796605447, 0.90217164918775838, 0.90218185019175312, 0.90219203354204214, 0.90220219973655713, 0.90221234911959947, 0.90222245767193698, 0.90223224335508057, 0.90224200326391024, 0.90225174307758804, 0.90226146007898655, 0.90227115466989083, 0.90228082758688211, 0.90229047956490371, 0.90230011241961106, 0.90230972468673343, 0.90231931696215684, 0.90232888948517564, 0.90233844245890027, 0.90234791947042603, 0.90235736307761572, 0.90236678801133863, 0.90237619433976879, 0.90238558217343656, 0.90239495162535144, 0.90240430281171391, 0.90241363577693801, 0.90242295070045175, 0.9024322457394337, 0.90244151938382244, 0.90245077311128086, 0.90246000748208954, 0.90246922348546166, 0.9024784175274142, 0.90248759361507636, 0.90249675183557132, 0.90250589225232103, 0.90251501214816854, 0.90252411320102899, 0.9025331956331677, 0.90254225957943923, 0.90255130514126647, 0.9025603324118664, 0.90256934147421619, 0.90257833240127838, 0.90258730507911633, 0.90259625917470743, 0.90260519518717708, 0.90261411317901263, 0.90262304523054793, 0.90263197559738118, 0.90264088827301803, 0.90264978327344869, 0.90265866115445659, 0.90266752147670892, 0.90267636409930407, 0.90268518809447806, 0.90269399331410205, 0.90270278119651914, 0.90271155181047047, 0.90272030514581614, 0.90272904117670905, 0.90273775986908755, 0.90274646118538626, 0.90275514508787202, 0.90276381154045382, 0.90277246053238613, 0.90278109215694169, 0.90278970638957157, 0.90279830321125276, 0.9028068826059753, 0.90281544456013907, 0.90282398906227768, 0.90283251610259896, 0.90284102572224756, 0.90284951799318469, 0.90285799277090328, 0.90286645005108368, 0.90287488982844832, 0.9028833120968891, 0.90289171684950886, 0.90290010410653088, 0.9029084179730662, 0.90291662326204858, 0.90292481130956703, 0.90293298246464493, 0.90294113466053072, 0.90294926835732614, 0.90295738656321367, 0.90296548754401473, 0.90297357124145861, 0.90298163764263273, 0.90298968673687396, 0.90299771851427435, 0.9030057329676987, 0.90301373009417474, 0.90302170989543662, 0.90302967237781362, 0.90303761755178247, 0.90304554543142401, 0.90305345603372666, 0.90306134935722682, 0.90306922540501189, 0.90307708421139099, 0.90308492580807476, 0.90309275022449342, 0.90310055748797291, 0.90310834762394854, 0.90311612065591762, 0.90312387660557469, 0.90313164687725511, 0.90313940446243646, 0.90314714570660959, 0.90315487045537579, 0.90316258660269577, 0.90317029382738157, 0.90317797037879077, 0.9031856035917939, 0.90319321655444407, 0.90320081279536057, 0.90320839219198068, 0.90321595467259508, 0.90322350016464836, 0.90323102859303184, 0.90323853988083957, 0.90324603395211356, 0.90325351073606974, 0.90326097016575702, 0.903268470446148, 0.90327597914687774, 0.90328347121676655, 0.90329094649990327, 0.90329840218927204, 0.90330583208886739, 0.90331324303528349, 0.90332049775879197, 0.9033276926086552, 0.90333486277729258, 0.90334201093095046, 0.90334913877330159, 0.90335624719114804, 0.90336333667882407, 0.9033704075046507, 0.90337745981959994, 0.90338449369823137, 0.90339150921832623, 0.90339850646483533, 0.90340548547725841, 0.90341244630466511, 0.90341938899475849, 0.90342631359960957, 0.90343322012773419, 0.90344010862314217, 0.9034469791669576, 0.90345383183751349, 0.90346066517326717, 0.90346747561006258, 0.90347426411355758, 0.90348103413361547, 0.90348782854959675, 0.9034946192354929, 0.90350139206927294, 0.90350814749908159, 0.90351482437813779, 0.903521346966072, 0.90352784469714875, 0.90353432228917063, 0.90354078705052843, 0.90354722995161441, 0.90355366069228471, 0.90356007374723257, 0.90356646712777344, 0.9035728454649371, 0.9035792086464175, 0.90358555659857831, 0.90359188918214761, 0.9035982062298451, 0.90360450756977562, 0.9036107930601488, 0.90361706253848784, 0.9036233157572181, 0.90362955266843936, 0.90363577325559541, 0.90364197777434319, 0.90364816605234488, 0.90365433808889828, 0.90366049387075753, 0.90366663337988085, 0.90367275661973445, 0.90367886361692107, 0.90368495440150665, 0.90369102900668241, 0.90369708746823851, 0.90370312978666179, 0.90370915593497769, 0.90371516597295287, 0.90372115995672297, 0.90372713794224369, 0.90373309998536377, 0.90373904614161216, 0.90374497646632734, 0.90375089084749605, 0.90375678928138348, 0.90376267217254724, 0.90376853955837233, 0.90377439147293459, 0.90378022797730351, 0.90378604913046778, 0.90379185500666792, 0.90379764566588039, 0.90380342120023416, 0.90380918170033886, 0.90381492724482682, 0.90382065790835797, 0.90382637387737386, 0.90383207540750887, 0.90383776257679893, 0.9038434354629985, 0.90384909414188708, 0.90385473868752464, 0.90386036917242674, 0.90386598567112364, 0.90387158825988945, 0.90387717659265798, 0.90388275093612402, 0.90388831193363384, 0.90389385968718328, 0.90389939421983356, 0.90390491549586716, 0.90391042365999763, 0.90391591876107791, 0.90392140083897166, 0.90392686993439819, 0.90393232609861174, 0.90393776938340287, 0.90394319984093263, 0.90394861752355105, 0.9039540224835596, 0.9039594147730492, 0.90396479447147282, 0.90397016163710731, 0.90397551632108253, 0.9039808558026754, 0.90398617934046632, 0.9039914904640034, 0.90399680050897258, 0.90400210074311904, 0.90400738867134656, 0.90401266442326744, 0.90401792875702447, 0.90402318293265471, 0.90402841949191737, 0.90403364342084425, 0.90403885448971644, 0.90404405272808641, 0.90404923818974359, 0.90405441092389227, 0.90405957099478929, 0.9040646416732383, 0.90406967461670573, 0.90407469520994099, 0.90407970361384482, 0.90408469993533769, 0.90408968426235348, 0.90409465667810118, 0.90409961727138277, 0.90410456610587853, 0.90410950324141537, 0.90411442873587411, 0.90411934264622584, 0.90412424502906397, 0.9041291353839862, 0.90413401106121161, 0.90413887431983064, 0.90414372543435073, 0.90414856463060411, 0.90415339209696266, 0.90415820799260516, 0.90416301247892028, 0.9041678056988276, 0.90417258777983611, 0.90417735883933414, 0.90418211869830789, 0.90418686503865164, 0.90419160072296723, 0.90419632583338527, 0.90420104041357974, 0.90420574450740654, 0.90421043815657864, 0.904215121417281, 0.90421979433593536, 0.90422445443440613, 0.90422910302636783, 0.90423374068708329, 0.90423836759220433, 0.90424298388165836, 0.9042475896739699, 0.90425218506934846, 0.90425677015707173, 0.90426134501865307, 0.90426590972999366, 0.90427046436313552, 0.90427500898717728, 0.90427954220438911, 0.90428406424946606, 0.90428857570307686, 0.90429307675400405, 0.90429756756726309, 0.90430204829028038, 0.90430651905564574, 0.90431097998325161, 0.90431543118220736, 0.90431987275248982, 0.90432430478609904, 0.90432872736843861, 0.90433314057917946, 0.90433754449993597, 0.9043419392136518, 0.90434632479831745, 0.90435070133015338, 0.90435506865145698, 0.90435942681465076, 0.90436377649020983, 0.90436811773152093, 0.90437245059457161, 0.90437677513504922, 0.90438109140804301, 0.90438539946810015, 0.90438969937767277, 0.90439399120264075, 0.9043982749965519, 0.90440255081189613, 0.90440681869966055, 0.90441107871026938, 0.90441533089347714, 0.90441957529843364, 0.90442381197377864, 0.904428040969531, 0.90443226234286145, 0.90443647615086142, 0.9044406824491521, 0.90444488129215184, 0.90444907017535137, 0.90445323114005816, 0.90445738519307506, 0.90446153246630856, 0.90446567301848713, 0.90446980687273748, 0.90447393403650711, 0.90447805452347541, 0.90448216835118489, 0.90448627554037619, 0.9044903761144818, 0.90449447009918793, 0.90449855752222175, 0.90450263841291356, 0.90450671280221062, 0.90451078072219893, 0.90451484220620793, 0.90451889728850332, 0.90452294600417416, 0.90452698838648771, 0.90453102447239808, 0.90453505430129211, 0.904539077913038, 0.90454309534732558, 0.90454710664410765, 0.90455111186501114, 0.90455511328386495, 0.9045591077644709, 0.90456309400821133, 0.90456707285623283, 0.9045710447311075, 0.90457500992367146, 0.90457896863537191, 0.90458292013430708, 0.90458686542017031, 0.90459080459061836, 0.90459473773270882, 0.90459866492374785, 0.90460258623450196, 0.90460650173114554, 0.90461041147670573, 0.90461431553170801, 0.90461821395487041, 0.90462210678175936, 0.9046259940720216, 0.90462987588895916, 0.90463375203077856, 0.90463762270937831, 0.90464148903119779, 0.90464535012752345, 0.90464920603005605, 0.90465305677497421, 0.90465690240094165, 0.90466074294841181, 0.90466457845903137, 0.90466840897513245, 0.90467223453955148, 0.90467605519522942, 0.90467987098520342, 0.90468368195242432, 0.90468748814711486, 0.90469128965420131, 0.90469508653297226, 0.9046988788412712, 0.90470266663249788, 0.90470644995770633, 0.90471022886879737, 0.90471400341597519, 0.9047177736479789, 0.90472153961218948, 0.90472530135466223, 0.90472905892045552, 0.90473281235360115, 0.90473656169712002, 0.90474030699330099, 0.904744048283601, 0.90474778560884905, 0.90475151900916573, 0.90475524852413047, 0.90475897419278339, 0.90476269605362236, 0.90476641414468184, 0.90477012850360283, 0.90477383916757026, 0.9047775461734312, 0.90478124955761352, 0.90478494935626164, 0.90478864560511763, 0.90479233833970263, 0.90479602759516142, 0.90479971340641296, 0.90480339580804658, 0.9048070748344279, 0.9048107505196632, 0.90481442289758196, 0.90481809201175634, 0.90482175790793895, 0.90482542061770277, 0.90482908018120123, 0.90483273603448311, 0.90483638866444416, 0.90484003824862136, 0.90484368482245825, 0.90484732842071947, 0.90485097414275784, 0.90485462188156718, 0.90485826555151749, 0.90486190633963182, 0.90486554481789772, 0.90486918132717575, 0.90487281605788328, 0.90487644910283604, 0.90488008049355173, 0.90488371022457281, 0.90488733827021028, 0.90489096459531837, 0.90489458916237875, 0.90489821193574538, 0.90490183288417969, 0.90490545198206607, 0.90490906920974334, 0.90491268455357199, 0.90491629800549134, 0.90491990956059054, 0.90492351921881686, 0.9049271269846888, 0.90493073286604242, 0.90493433687329261, 0.90493793901899167, 0.90494153931760246, 0.90494513778481633, 0.90494873353195115, 0.90495232683328419, 0.90495591838232559, 0.90495950819690263, 0.90496309628851612, 0.90496668267059033, 0.90497026736935837, 0.90497385041034839, 0.9049774318183228, 0.90498101161742017, 0.90498458983546548, 0.90498816758982004, 0.90499174369872526, 0.90499531823563173, 0.90499889123455268, 0.90500246272719265, 0.90500603274325053, 0.90500960131086794, 0.90501316845677493, 0.90501673420665041, 0.90502029858566824, 0.90502386161821391, 0.90502742332753727, 0.90503098373049073, 0.90503454285116081, 0.90503810071071855, 0.90504165732646802, 0.90504521272380045, 0.90504876692711023, 0.90505231996025048, 0.90505587189469627, 0.90505942275094586, 0.905062972548768, 0.9050665213074145, 0.90507006904572374, 0.90507361578210477, 0.9050771615345895, 0.90508070632094184, 0.90508425015869509, 0.90508779306509335, 0.90509133505721739, 0.90509487615197914, 0.9050984163661373, 0.9051019557163138, 0.90510549423965392, 0.90510903198618764, 0.9051125689014724, 0.90511610500323614, 0.90511964030881353, 0.90512317483529314, 0.90512670859959354, 0.90513024161841682]}
'''
# Plot the MSE values
plt.figure()
plt.plot(NMTF.all_performances['MSE'])
plt.ylim(0,10) | 1,167.886792 | 60,691 | 0.848703 | 6,198 | 61,898 | 8.470636 | 0.498548 | 0.000533 | 0.000381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.879673 | 0.051019 | 61,898 | 53 | 60,692 | 1,167.886792 | 0.014113 | 0.002229 | 0 | 0 | 0 | 0 | 0.091916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.16 | null | null | 0.04 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
bff1e3568f7c073b7fbfd28690c813bd3a37840f | 23,197 | py | Python | scheduling/methods/PNT_pairwise_crisp.py | CORE-Robotics-Lab/Personalized_Neural_Trees | 3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e | [
"MIT"
] | 3 | 2021-05-22T19:25:01.000Z | 2021-12-01T07:59:56.000Z | scheduling/methods/PNT_pairwise_crisp.py | CORE-Robotics-Lab/Personalized_Neural_Trees | 3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e | [
"MIT"
] | null | null | null | scheduling/methods/PNT_pairwise_crisp.py | CORE-Robotics-Lab/Personalized_Neural_Trees | 3e8dd12fe4fc850be65c96c847eb143ef3bcdc2e | [
"MIT"
] | null | null | null | """
Created by Rohan Paleja on Sep 9, 2019
"""
import torch
import sys
import torch.nn as nn
from AndrewSilva.tree_nets.utils.fuzzy_to_crispy import convert_to_crisp
sys.path.insert(0, '/home/Anonymous/PycharmProjects/bayesian_prolo')
from low_dim.prolonet import ProLoNet
import numpy as np
from scheduling.argument_parser import Logger
import pickle
from torch.autograd import Variable
from utils.global_utils import save_pickle
from utils.pairwise_utils import create_new_data, find_which_schedule_this_belongs_to, create_sets_of_20_from_x_for_pairwise_comparisions
from utils.pairwise_utils import load_in_pairwise_data
sys.path.insert(0, '../')
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
torch.manual_seed(0)
np.random.seed(0)
# noinspection PyArgumentList
class ProLoTrain:
"""
class structure to train the BDT with a certain alpha.
This class handles training the BDT, evaluating the BDT, and saving
"""
def __init__(self, num_schedules, i):
self.arguments = Logger()
self.num_schedules = num_schedules
self.home_dir = self.arguments.home_dir
self.total_loss_array = []
self.num_test_schedules = 100
self.X_train_pairwise, self.Y_train_pairwise, self.schedule_array_train_pairwise, self.start_of_each_set_twenty_train, self.X_test_pairwise, self.Y_test_pairwise, self.schedule_array_test_pairwise, self.start_of_each_set_twenty_test = load_in_pairwise_data(
250,250)
self.X_train_pairwise, \
self.Y_train_pairwise, \
self.schedule_array_train_pairwise, \
self.start_of_each_set_twenty_train = self.sample_data(150)
self.X_test_pairwise, \
self.Y_test_pairwise, \
self.schedule_array_test_pairwise, \
self.start_of_each_set_twenty_test = self.sample_test_data(100)
use_gpu = False
self.use_gpu = use_gpu
self.model = ProLoNet(input_dim=len(self.X_train_pairwise[0]),
weights=None,
comparators=None,
leaves=32,
output_dim=1,
bayesian_embedding_dim=8,
alpha=1.5,
use_gpu=use_gpu,
vectorized=True,
is_value=True)
if use_gpu:
self.model = self.model.cuda()
print(self.model.state_dict())
self.opt = torch.optim.RMSprop(
[{'params': list(self.model.parameters())[:-1]}, {'params': self.model.bayesian_embedding.parameters(), 'lr': .01}], lr=.01)
self.num_iterations_predict_task = 0
self.total_iterations = 0
self.covergence_epsilon = .01
self.when_to_save = 1000
self.embedding_list = [torch.ones(8) * 1 / 3 for _ in range(self.num_schedules)]
checkpoint = torch.load('/home/Anonymous/PycharmProjects/bayesian_prolo/scheduling_env/models/all_PDDT_pairwise_info.tar')
self.model.load_state_dict(checkpoint['nn_state_dict'])
checkpoint = torch.load(
'/home/Anonymous/PycharmProjects/bayesian_prolo/saved_models/HRI/test_embedding_' + str(i + 1) + '.tar')
# self.training_embeddings = checkpoint['training_embeddings']
self.testing_embeddings = checkpoint['test_embeddings']
def sample_data(self, size):
# return self.X_train_pairwise[0:size * 20 * 20], \
# self.Y_train_pairwise[0:size * 20 * 20], \
# self.schedule_array_train_pairwise[0:size], \
# self.start_of_each_set_twenty_train[0:size * 20]
if size == 250:
set_of_twenty = 0
else:
set_of_twenty = np.random.randint(250-size)
self.sample_min = set_of_twenty * 400
return self.X_train_pairwise[set_of_twenty*400:set_of_twenty*400 + size * 20 * 20], \
self.Y_train_pairwise[set_of_twenty*400:set_of_twenty*400 + size * 20 * 20], \
self.schedule_array_train_pairwise[set_of_twenty:set_of_twenty+size], \
self.start_of_each_set_twenty_train[set_of_twenty*20:set_of_twenty*20+size * 20]
def sample_test_data(self, size):
# return self.X_train_pairwise[0:size * 20 * 20], \
# self.Y_train_pairwise[0:size * 20 * 20], \
# self.schedule_array_train_pairwise[0:size], \
# self.start_of_each_set_twenty_train[0:size * 20]
if size == 250:
set_of_twenty = 0
else:
set_of_twenty = np.random.randint(250 - size)
self.sample_test_min = set_of_twenty * 400
return self.X_test_pairwise[set_of_twenty * 400:set_of_twenty * 400 + size * 20 * 20], \
self.Y_test_pairwise[set_of_twenty * 400:set_of_twenty * 400 + size * 20 * 20], \
self.schedule_array_test_pairwise[set_of_twenty:set_of_twenty + size], \
self.start_of_each_set_twenty_test[set_of_twenty * 20:set_of_twenty * 20 + size * 20]
def evaluate_on_test_data(self, model, load_in_model=False):
"""
Evaluate performance of a trained network tuned upon the alpha divergence loss.
This is tested on 20% of the data and will be stored in a text file.
Note this function is called after training convergence
:return:
"""
# define new optimizer that only optimizes gradient
num_schedules = 100
# load in new data
load_directory = '/home/Anonymous/PycharmProjects/bayesian_prolo/scheduling_env/scheduling_dataset/' + str(
num_schedules) + 'EDF_DIST_8_28_2019_test_pairwise.pkl'
sig = torch.nn.Sigmoid()
data = pickle.load(open(load_directory, "rb"))
X, Y, schedule_array = create_new_data(num_schedules, data)
prediction_accuracy = [0, 0]
percentage_accuracy_top1 = []
percentage_accuracy_top3 = []
embedding_optimizer = torch.optim.SGD([{'params': self.model.bayesian_embedding.parameters()}], lr=.01)
criterion = torch.nn.BCELoss()
embedding_list = [torch.ones(3) * 1 / 3 for i in range(num_schedules)]
for j in range(0, num_schedules):
schedule_bounds = schedule_array[j]
step = schedule_bounds[0]
model.set_bayesian_embedding(embedding_list[j])
while step < schedule_bounds[1]:
probability_matrix = np.zeros((20, 20))
for m, counter in enumerate(range(step, step + 20)):
phi_i = X[counter]
phi_i_numpy = np.asarray(phi_i)
# for each set of twenty
for n, second_counter in enumerate(range(step, step + 20)):
# fill entire array with diagonals set to zero
if second_counter == counter: # same as m = n
continue
phi_j = X[second_counter]
phi_j_numpy = np.asarray(phi_j)
feature_input = phi_i_numpy - phi_j_numpy
if torch.cuda.is_available():
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)).cuda())
else:
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)))
# push through nets
preference_prob = model.forward(feature_input)
sig = torch.nn.Sigmoid()
preference_prob = sig(preference_prob)
probability_matrix[m][n] = preference_prob[0].data.detach()[
0].item()
# probability_matrix[n][m] = preference_prob[0].data.detach()[1].item()
# Set of twenty is completed
column_vec = np.sum(probability_matrix, axis=1)
embedding_list[j] = torch.Tensor(self.model.get_bayesian_embedding().detach().cpu().numpy()) # very ugly
# top 1
# given all inputs, and their liklihood of being scheduled, predict the output
highest_val = max(column_vec)
all_indexes_that_have_highest_val = [i for i, e in enumerate(list(column_vec)) if e == highest_val]
if len(all_indexes_that_have_highest_val) > 1:
print('length of indexes greater than 1: ', all_indexes_that_have_highest_val)
# top 1
choice = np.random.choice(all_indexes_that_have_highest_val)
# choice = np.argmax(probability_vector)
# top 3
_, top_three = torch.topk(torch.Tensor(column_vec), 3)
# Then do training update loop
truth = Y[step]
# index top 1
if choice == truth:
prediction_accuracy[0] += 1
# index top 3
if truth in top_three:
prediction_accuracy[1] += 1
# Then do training update loop
phi_i_num = truth + step
phi_i = X[phi_i_num]
phi_i_numpy = np.asarray(phi_i)
# iterate over pairwise comparisons
for counter in range(step, step + 20):
if counter == phi_i_num:
continue
else:
phi_j = X[counter]
phi_j_numpy = np.asarray(phi_j)
feature_input = phi_i_numpy - phi_j_numpy
if torch.cuda.is_available():
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)).cuda())
label = Variable(torch.Tensor(torch.ones((1, 1))).cuda())
else:
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)))
label = Variable(torch.Tensor(torch.ones((1, 1))))
output = model(feature_input)
output = sig(output)
loss = criterion(output, label)
# prepare optimizer, compute gradient, update params
embedding_optimizer.zero_grad()
loss.backward()
# torch.nn.utils.clip_grad_norm_(self.model.parameters(), 0.5)
embedding_optimizer.step()
# print(model.EmbeddingList.state_dict())
for counter in range(step, step + 20):
if counter == phi_i_num:
continue
else:
phi_j = X[counter]
phi_j_numpy = np.asarray(phi_j)
feature_input = phi_j_numpy - phi_i_numpy
if torch.cuda.is_available():
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)).cuda())
label = Variable(torch.Tensor(torch.zeros((1, 1))).cuda())
else:
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)))
label = Variable(torch.Tensor(torch.zeros((1, 1))))
output = model.forward(feature_input)
output = sig(output)
embedding_optimizer.zero_grad()
loss = criterion(output, label)
loss.backward()
# torch.nn.utils.clip_grad_norm_(self.model.parameters(), 0.5)
embedding_optimizer.step()
# print(model.EmbeddingList.state_dict())
# add average loss to array
step += 20
# schedule finished
print('Prediction Accuracy: top1: ', prediction_accuracy[0] / 20, ' top3: ', prediction_accuracy[1] / 20)
print('schedule num:', j)
percentage_accuracy_top1.append(prediction_accuracy[0] / 20)
percentage_accuracy_top3.append(prediction_accuracy[1] / 20)
embedding_list[j] = torch.Tensor(self.model.get_bayesian_embedding().detach().cpu().numpy()) # very ugly
prediction_accuracy = [0, 0]
# self.save_performance_results(percentage_accuracy_top1, percentage_accuracy_top3, 'PDDT_pairwise'+ str(self.num_schedules))
return embedding_list
def save_trained_nets(self, name):
"""
saves the model
:return:
"""
torch.save({'nn_state_dict': self.model.state_dict(),
'parameters': self.arguments},
'/home/Anonymous/PycharmProjects/bayesian_prolo/scheduling_env/models/9062019_' + name + '.tar')
def save_performance_results(self, top1, top3, special_string):
"""
saves performance of top1 and top3
:return:
"""
print('top1_mean for is : ', np.mean(top1))
data = {'top1_mean': np.mean(top1),
'top3_mean': np.mean(top3),
'top1_stderr': np.std(top1) / np.sqrt(len(top1)),
'top3_stderr': np.std(top3) / np.sqrt(len(top3))}
save_pickle(file=data, file_location='/home/Anonymous/PycharmProjects/bayesian_prolo/scheduling_env/results',
special_string=special_string)
def test_again_fuzzy(self, model, test_embeddings):
"""
Evaluate performance of a trained network tuned upon the alpha divergence loss.
This is tested on 20% of the data and will be stored in a text file.
Note this function is called after training convergence
:return:
"""
# define new optimizer that only optimizes gradient
num_schedules = 100
# load in new data
load_directory = '/home/Anonymous/PycharmProjects/bayesian_prolo/scheduling_env/scheduling_dataset/' + str(
num_schedules) + 'EDF_DIST_8_28_2019_test_pairwise.pkl'
sig = torch.nn.Sigmoid()
data = pickle.load(open(load_directory, "rb"))
X, Y, schedule_array = create_new_data(num_schedules, data)
prediction_accuracy = [0, 0]
percentage_accuracy_top1 = []
percentage_accuracy_top3 = []
# embedding_optimizer = torch.optim.SGD([{'params': self.model.bayesian_embedding.parameters()}], lr=.01)
# criterion = torch.nn.BCELoss()
embedding_list = test_embeddings
for j in range(0, num_schedules):
schedule_bounds = schedule_array[j]
step = schedule_bounds[0]
model.set_bayesian_embedding(embedding_list[j])
while step < schedule_bounds[1]:
probability_matrix = np.zeros((20, 20))
for m, counter in enumerate(range(step, step + 20)):
phi_i = X[counter]
phi_i_numpy = np.asarray(phi_i)
# for each set of twenty
for n, second_counter in enumerate(range(step, step + 20)):
# fill entire array with diagonals set to zero
if second_counter == counter: # same as m = n
continue
phi_j = X[second_counter]
phi_j_numpy = np.asarray(phi_j)
feature_input = phi_i_numpy - phi_j_numpy
if torch.cuda.is_available():
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)).cuda())
else:
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)))
# push through nets
preference_prob = model.forward(feature_input)
preference_prob = sig(preference_prob)
probability_matrix[m][n] = preference_prob[0].data.detach()[
0].item()
# probability_matrix[n][m] = preference_prob[0].data.detach()[1].item()
# Set of twenty is completed
column_vec = np.sum(probability_matrix, axis=1)
embedding_list[j] = torch.Tensor(self.model.get_bayesian_embedding().detach().cpu().numpy()) # very ugly
# top 1
# given all inputs, and their liklihood of being scheduled, predict the output
highest_val = max(column_vec)
all_indexes_that_have_highest_val = [i for i, e in enumerate(list(column_vec)) if e == highest_val]
if len(all_indexes_that_have_highest_val) > 1:
print('length of indexes greater than 1: ', all_indexes_that_have_highest_val)
# top 1
choice = np.random.choice(all_indexes_that_have_highest_val)
# choice = np.argmax(probability_vector)
# top 3
_, top_three = torch.topk(torch.Tensor(column_vec), 3)
# Then do training update loop
truth = Y[step]
# index top 1
if choice == truth:
prediction_accuracy[0] += 1
# index top 3
if truth in top_three:
prediction_accuracy[1] += 1
# add average loss to array
step += 20
# schedule finished
print('Prediction Accuracy: top1: ', prediction_accuracy[0] / 20, ' top3: ', prediction_accuracy[1] / 20)
print('schedule num:', j)
percentage_accuracy_top1.append(prediction_accuracy[0] / 20)
percentage_accuracy_top3.append(prediction_accuracy[1] / 20)
embedding_list[j] = torch.Tensor(self.model.get_bayesian_embedding().detach().cpu().numpy()) # very ugly
prediction_accuracy = [0, 0]
print(np.mean(prediction_accuracy[0]))
self.save_performance_results(percentage_accuracy_top1, percentage_accuracy_top3, 'results_PDDT_pairwise_fuzzy')
def test_again_crisp(self, model, test_embeddings):
"""
Evaluate performance of a trained network tuned upon the alpha divergence loss.
This is tested on 20% of the data and will be stored in a text file.
Note this function is called after training convergence
:return:
"""
# define new optimizer that only optimizes gradient
self.model = convert_to_crisp(model, None)
sig = torch.nn.Sigmoid()
prediction_accuracy = [0, 0]
percentage_accuracy_top1 = []
percentage_accuracy_top3 = []
# embedding_optimizer = torch.optim.SGD([{'params': self.model.bayesian_embedding.parameters()}], lr=.01)
# criterion = torch.nn.BCELoss()
embedding_list = test_embeddings
for j in range(0, self.num_test_schedules):
schedule_bounds = self.schedule_array_test_pairwise[j]
step = schedule_bounds[0]-self.sample_test_min
model.set_bayesian_embedding(embedding_list[j])
while step < schedule_bounds[1]-self.sample_test_min:
probability_matrix = np.zeros((20, 20))
for m, counter in enumerate(range(step, step + 20)):
phi_i = self.X_test_pairwise[counter]
phi_i_numpy = np.asarray(phi_i)
# for each set of twenty
for n, second_counter in enumerate(range(step, step + 20)):
# fill entire array with diagonals set to zero
if second_counter == counter: # same as m = n
continue
phi_j = self.X_test_pairwise[second_counter]
phi_j_numpy = np.asarray(phi_j)
feature_input = phi_i_numpy - phi_j_numpy
if self.use_gpu:
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)).cuda())
else:
feature_input = Variable(torch.Tensor(feature_input.reshape(1, 13)))
# push through nets
preference_prob = model.forward(feature_input)
preference_prob = sig(preference_prob)
probability_matrix[m][n] = preference_prob[0].data.detach()[
0].item()
# probability_matrix[n][m] = preference_prob[0].data.detach()[1].item()
# Set of twenty is completed
column_vec = np.sum(probability_matrix, axis=1)
# embedding_list[j] = torch.Tensor(self.model.get_bayesian_embedding().detach().cpu().numpy()) # very ugly
# top 1
# given all inputs, and their liklihood of being scheduled, predict the output
highest_val = max(column_vec)
all_indexes_that_have_highest_val = [i for i, e in enumerate(list(column_vec)) if e == highest_val]
if len(all_indexes_that_have_highest_val) > 1:
print('length of indexes greater than 1: ', all_indexes_that_have_highest_val)
# top 1
choice = np.random.choice(all_indexes_that_have_highest_val)
# choice = np.argmax(probability_vector)
# top 3
_, top_three = torch.topk(torch.Tensor(column_vec), 3)
# Then do training update loop
truth = self.Y_test_pairwise[step]
# index top 1
if choice == truth:
prediction_accuracy[0] += 1
# index top 3
if truth in top_three:
prediction_accuracy[1] += 1
# add average loss to array
step += 20
# schedule finished
print('Prediction Accuracy: top1: ', prediction_accuracy[0] / 20, ' top3: ', prediction_accuracy[1] / 20)
print('schedule num:', j)
percentage_accuracy_top1.append(prediction_accuracy[0] / 20)
percentage_accuracy_top3.append(prediction_accuracy[1] / 20)
# embedding_list[j] = torch.Tensor(self.model.get_bayesian_embedding().detach().cpu().numpy()) # very ugly
prediction_accuracy = [0, 0]
print(np.mean(prediction_accuracy[0]))
# self.save_performance_results(percentage_accuracy_top1, percentage_accuracy_top3, 'results_PDDT_pairwise_crisp')
def main():
"""
entry point for file
:return:
"""
for i in range(3):
print('on iteration', i)
num_schedules = 150
trainer = ProLoTrain(num_schedules, i)
# trainer.train()
test_embeddings = trainer.testing_embeddings
# trainer.test_again_fuzzy(trainer.model, test_embeddings)
trainer.test_again_crisp(trainer.model, test_embeddings)
if __name__ == '__main__':
main()
| 44.523992 | 265 | 0.575161 | 2,682 | 23,197 | 4.710664 | 0.115585 | 0.028495 | 0.024379 | 0.017097 | 0.785262 | 0.761279 | 0.761279 | 0.754947 | 0.72859 | 0.72859 | 0 | 0.027378 | 0.335518 | 23,197 | 520 | 266 | 44.609615 | 0.792267 | 0.173471 | 0 | 0.605863 | 0 | 0 | 0.054939 | 0.033282 | 0 | 0 | 0 | 0 | 0 | 1 | 0.029316 | false | 0 | 0.039088 | 0 | 0.081433 | 0.045603 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5e4048fc4a307125e709609f241d8c28c9ae6a22 | 215 | py | Python | src/lib/modules/flipcoin.py | zenithinc/ubi | 6e6c237aa1b82d1ef7c5a6aeaf4f4f23322ea6e1 | [
"MIT"
] | null | null | null | src/lib/modules/flipcoin.py | zenithinc/ubi | 6e6c237aa1b82d1ef7c5a6aeaf4f4f23322ea6e1 | [
"MIT"
] | null | null | null | src/lib/modules/flipcoin.py | zenithinc/ubi | 6e6c237aa1b82d1ef7c5a6aeaf4f4f23322ea6e1 | [
"MIT"
] | null | null | null | import random
def main():
flip_ = random.randint(1, 2)
if flip_ == 1:
return [["fileKeep", "server/assets/Tails.png"]]
elif flip_ == 2:
return [["fileKeep", "server/assets/Heads.png"]]
| 21.5 | 56 | 0.581395 | 27 | 215 | 4.518519 | 0.62963 | 0.229508 | 0.327869 | 0.42623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02454 | 0.24186 | 215 | 9 | 57 | 23.888889 | 0.723926 | 0 | 0 | 0 | 0 | 0 | 0.288372 | 0.213953 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0 | 0.571429 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5e584e97480cfe25698602f745e7e020b1d1c022 | 43 | py | Python | class_01.py | Pallavidighe2/python_201901 | 48696f34df9747edbecf2551c07aefab5078d664 | [
"MIT"
] | null | null | null | class_01.py | Pallavidighe2/python_201901 | 48696f34df9747edbecf2551c07aefab5078d664 | [
"MIT"
] | null | null | null | class_01.py | Pallavidighe2/python_201901 | 48696f34df9747edbecf2551c07aefab5078d664 | [
"MIT"
] | 1 | 2019-02-02T07:48:59.000Z | 2019-02-02T07:48:59.000Z | print("Hello world")
print("Pallavi")
| 5.375 | 20 | 0.627907 | 5 | 43 | 5.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.186047 | 43 | 7 | 21 | 6.142857 | 0.771429 | 0 | 0 | 0 | 0 | 0 | 0.473684 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
5e676c19fd92c5cc3d7009003e4eee339d24af17 | 5,137 | py | Python | bot-marcus-python/cogs/obrazki.py | OLEK4640/Marcus-bot | 5b979f385bcab9f0fedf169ea177496caf71182e | [
"CC0-1.0"
] | null | null | null | bot-marcus-python/cogs/obrazki.py | OLEK4640/Marcus-bot | 5b979f385bcab9f0fedf169ea177496caf71182e | [
"CC0-1.0"
] | null | null | null | bot-marcus-python/cogs/obrazki.py | OLEK4640/Marcus-bot | 5b979f385bcab9f0fedf169ea177496caf71182e | [
"CC0-1.0"
] | 1 | 2021-04-07T09:01:21.000Z | 2021-04-07T09:01:21.000Z | import aiohttp
import discord
from discord.ext import commands
import random
from PIL import Image,ImageFont,ImageDraw
import requests
class Obrazki(commands.Cog):
def __init__(self, bot):
self.bot = bot
print('Komendy obrazkowe zaΕadowane pomyΕlnie!.')
#komenty
@commands.command()
async def meme(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/meme/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - memy")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@commands.command()
@commands.is_nsfw()
async def nudes(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/pussy/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - nudes")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@nudes.error
async def nudes_error(self, ctx, error):
if isinstance(error, commands.NSFWChannelRequired):
await ctx.send('<a:zle:823893146832338954> **To nie jest kanaΕ nsfw!**')
@commands.command()
async def doggo(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/dog/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - doggo")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@commands.command()
@commands.is_nsfw()
async def boobs(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/boobs/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - boobs")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@boobs.error
async def boobs_error(self, ctx, error):
if isinstance(error, commands.NSFWChannelRequired):
await ctx.send('<a:zle:823893146832338954> **To nie jest kanaΕ nsfw!**')
@commands.command()
async def aww(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/aww/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - aww")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@commands.command()
@commands.is_nsfw()
async def ass(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/ass/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - ass")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@ass.error
async def ass_error(self, ctx, error):
if isinstance(error, commands.NSFWChannelRequired):
await ctx.send('<a:zle:823893146832338954> **To nie jest kanaΕ nsfw!**')
@commands.command()
async def cat(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/cat/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - cat")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@commands.command()
@commands.is_nsfw()
async def bdsm(self, ctx):
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/bdsm/new.json?sort=all') as r:
res = await r.json()
embed = discord.Embed(title="Marcus - bdsm")
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
@bdsm.error
async def bdsm_error(self, ctx, error):
if isinstance(error, commands.NSFWChannelRequired):
await ctx.send('<a:zle:823893146832338954> **To nie jest kanaΕ nsfw!**')
@commands.command()
async def achievement(self, ctx, *, text = "Nie wprowadzono tekstu"):
try:
img = Image.open("white.jpg")
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("Minecraft.ttf", 10)
ImageDraw.Draw(img).text((0,150), img, (0, 0, 0), font=font)
img.save("text.jpg")
await ctx.send(file=discord.File("text.jpg"))
except Exception as e:
await ctx.send("WystΔ
piΕ bΕΔ
d: \n {}: {}\n".format(type(e).__name__, e))
def setup(bot):
bot.add_cog(Obrazki(bot)) | 34.246667 | 95 | 0.598404 | 679 | 5,137 | 4.490427 | 0.159057 | 0.047229 | 0.0551 | 0.041981 | 0.767465 | 0.767465 | 0.767465 | 0.767465 | 0.767465 | 0.767465 | 0 | 0.027076 | 0.245085 | 5,137 | 150 | 96 | 34.246667 | 0.759154 | 0.001363 | 0 | 0.495327 | 0 | 0 | 0.189474 | 0.020273 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018692 | false | 0 | 0.056075 | 0 | 0.084112 | 0.009346 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5ea0c9875f13a87f2285e404610037a3836b8e8f | 107 | py | Python | post_gnome/plotting/__init__.py | rsignell-usgs/post_gnome | e24492751458570e00d07e7dd1958881f6dfa51b | [
"MIT",
"Unlicense"
] | 2 | 2017-02-15T20:45:42.000Z | 2020-10-09T16:00:00.000Z | post_gnome/plotting/__init__.py | rsignell-usgs/post_gnome | e24492751458570e00d07e7dd1958881f6dfa51b | [
"MIT",
"Unlicense"
] | 10 | 2015-06-25T23:42:11.000Z | 2021-06-22T16:19:19.000Z | post_gnome/plotting/__init__.py | rsignell-usgs/post_gnome | e24492751458570e00d07e7dd1958881f6dfa51b | [
"MIT",
"Unlicense"
] | 15 | 2016-01-11T20:49:10.000Z | 2020-10-15T18:02:20.000Z | """
package for making simple plots from GNOME netCDF output files
uses Cartopy and matplotlib
"""
pass
| 11.888889 | 62 | 0.757009 | 15 | 107 | 5.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.186916 | 107 | 8 | 63 | 13.375 | 0.931034 | 0.841122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
5ea3b9edcd40faf01d89eb8f88198cba69d56552 | 349 | py | Python | vfmgui/__init__.py | sharkwouter/vaporos-flatpak-manager | da1dce2a806fdb51aa9366408ace50c28fbc3ff6 | [
"MIT"
] | null | null | null | vfmgui/__init__.py | sharkwouter/vaporos-flatpak-manager | da1dce2a806fdb51aa9366408ace50c28fbc3ff6 | [
"MIT"
] | 21 | 2019-09-15T08:42:58.000Z | 2021-08-28T16:48:54.000Z | vfmgui/__init__.py | sharkwouter/vaporos-flatpak-manager | da1dce2a806fdb51aa9366408ace50c28fbc3ff6 | [
"MIT"
] | null | null | null | from vfmgui.gui import gui
from vfmgui.colors import Colors
from vfmgui.button import Button
from vfmgui.fonts import Fonts
from vfmgui.application_button import ApplicationButton
from vfmgui.list_menu import ListMenu
from vfmgui.application_menu import ApplicationMenu, ApplicationMenuButtons
from vfmgui.main_menu import MainMenu, MainMenuButtons
| 38.777778 | 75 | 0.873926 | 46 | 349 | 6.543478 | 0.369565 | 0.265781 | 0.139535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097421 | 349 | 8 | 76 | 43.625 | 0.955556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
5eb1bcb8838dccc45cb5e6d63aa2f82c23f95ac4 | 443 | py | Python | config.py | Z3r0ish/instaScraper | 250dc0c60321a3dfb7a6169973df51421354057f | [
"WTFPL"
] | null | null | null | config.py | Z3r0ish/instaScraper | 250dc0c60321a3dfb7a6169973df51421354057f | [
"WTFPL"
] | null | null | null | config.py | Z3r0ish/instaScraper | 250dc0c60321a3dfb7a6169973df51421354057f | [
"WTFPL"
] | null | null | null | token = "NzM3MTc3MjYzNjA2NDY0NTEz.Xx5j0w.8dsXyggHXrA7sIR63X8oxTgwKzw"
jsonPath = "/instaScraper/configs.json"
followerXpath = """//*[@id="react-root"]/section/main/div/header/section/ul/li[2]/a/span"""
timeXpath = """//*[@id="react-root"]/section/main/div/div/article/div[3]/div[2]/a/time"""
connentXpath = """//meta[@property="og:type"]"""
likesXpath = """//*[@id="react-root"]/section/main/div/div/article/div[3]/section[2]/div/div/button""" | 73.833333 | 102 | 0.699774 | 58 | 443 | 5.344828 | 0.551724 | 0.067742 | 0.106452 | 0.174194 | 0.332258 | 0.332258 | 0.251613 | 0.251613 | 0.251613 | 0.251613 | 0 | 0.037559 | 0.038375 | 443 | 6 | 102 | 73.833333 | 0.690141 | 0 | 0 | 0 | 0 | 0.5 | 0.754505 | 0.754505 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5ed36fbac3c2598e4f2f8f5dda11b09868740d5d | 48 | py | Python | tests/__init__.py | Group-13-Bachelor/FileExplorer | 08a9a6eb033ec8c492a9a9c471e651a243cc31e7 | [
"MIT"
] | null | null | null | tests/__init__.py | Group-13-Bachelor/FileExplorer | 08a9a6eb033ec8c492a9a9c471e651a243cc31e7 | [
"MIT"
] | 7 | 2022-02-14T09:30:43.000Z | 2022-02-16T18:29:32.000Z | tests/__init__.py | Group-13-Bachelor/Microservice | c7186953e6ef63d141ea148e74b6bbbe3242f71e | [
"MIT"
] | null | null | null | # This is here so relative package import works
| 24 | 47 | 0.791667 | 8 | 48 | 4.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1875 | 48 | 1 | 48 | 48 | 0.974359 | 0.9375 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
0d583452fe4c57aa2871c476616d03320fee0030 | 71 | py | Python | app_routes/threads/thread_id/invite/__init__.py | kskarbinski/threads-api | c144c1cb51422095922310d278f80e4996c10ea0 | [
"MIT"
] | null | null | null | app_routes/threads/thread_id/invite/__init__.py | kskarbinski/threads-api | c144c1cb51422095922310d278f80e4996c10ea0 | [
"MIT"
] | null | null | null | app_routes/threads/thread_id/invite/__init__.py | kskarbinski/threads-api | c144c1cb51422095922310d278f80e4996c10ea0 | [
"MIT"
] | null | null | null | from .threads_thread_id_invite_route import ThreadsThreadIdInviteRoute
| 35.5 | 70 | 0.929577 | 8 | 71 | 7.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.056338 | 71 | 1 | 71 | 71 | 0.925373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
0d83656ed653a2acd37ec6e7254066d84073eabf | 120 | py | Python | playstore_review_crawler/crawler/admin.py | abel-castro/playstore_review_crawler | 33b6c8c3794b6ff2c37321a433b9ccd3bdd08033 | [
"MIT"
] | 2 | 2021-03-04T13:29:44.000Z | 2021-03-10T15:42:28.000Z | playstore_review_crawler/crawler/admin.py | abel-castro/playstore_review_crawler | 33b6c8c3794b6ff2c37321a433b9ccd3bdd08033 | [
"MIT"
] | null | null | null | playstore_review_crawler/crawler/admin.py | abel-castro/playstore_review_crawler | 33b6c8c3794b6ff2c37321a433b9ccd3bdd08033 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import App, Review
admin.site.register(App)
admin.site.register(Review)
| 17.142857 | 32 | 0.8 | 18 | 120 | 5.333333 | 0.555556 | 0.1875 | 0.354167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108333 | 120 | 6 | 33 | 20 | 0.897196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
0d9a250466ba5fdc43f9a639bdc8d2c928bf7c02 | 4,103 | py | Python | tests/test_users_endpoints.py | machariamarigi/shopping_list_api | 79effc34145b25413f84ce02704281ccadf214ca | [
"MIT"
] | 2 | 2018-08-18T12:53:49.000Z | 2020-06-19T23:31:11.000Z | tests/test_users_endpoints.py | machariamarigi/shopping_list_api | 79effc34145b25413f84ce02704281ccadf214ca | [
"MIT"
] | 21 | 2017-09-04T19:49:18.000Z | 2017-12-19T09:07:39.000Z | tests/test_users_endpoints.py | machariamarigi/shopping_list_api | 79effc34145b25413f84ce02704281ccadf214ca | [
"MIT"
] | 2 | 2017-09-15T18:43:02.000Z | 2017-10-09T10:48:36.000Z | """Module to test users endpoints"""
from tests.basetest import TestBase
class UsersEndpointsTestCase(TestBase):
"""Class to test operations on users"""
def test_get_all_users(self):
"""Test if API can get all users"""
self.get_access_token()
res = self.client.get(
'/api/v1/users',
headers=dict(Authorization=self.access_token)
)
self.assertEqual(res.status_code, 200)
def test_get_all_users_with_search_query(self):
"""Test if API can get all users"""
self.get_access_token()
res = self.client.get(
'/api/v1/users?q=tes',
headers=dict(Authorization=self.access_token)
)
self.assertEqual(res.status_code, 200)
def test_get_all_users_with_bad_search_query(self):
"""Test if API can get all users"""
self.get_access_token()
res = self.client.get(
'/api/v1/users?q=dfdd',
headers=dict(Authorization=self.access_token)
)
self.assertIn('No users matchin dfdd were found', str(res.data))
def test_get_a_single_user(self):
"""Test if API can return a single user"""
self.get_access_token()
res = self.client.get(
'/api/v1/user',
headers=dict(Authorization=self.access_token)
)
self.assertEqual(res.status_code, 200)
def test_edit_a_single_user(self):
"""Test if API can edit a single user"""
self.get_access_token()
user = {
'username': 'test_user',
'email': 'test3@test.com',
'password': 'test_password'
}
res = self.client.put(
'api/v1/user',
headers=dict(Authorization=self.access_token),
data=user
)
res = self.client.get(
'/api/v1/user',
headers=dict(Authorization=self.access_token)
)
self.assertIn('test3@test.com', str(res.data))
def test_edit_a_single_user_with_bad_email(self):
"""Test if API cannot edit a single user with a badly formated email"""
self.get_access_token()
bad_user = {
'username': 'test_user',
'email': 'testtest.com',
'password': 'test_password'
}
res = self.client.put(
'api/v1/user',
headers=dict(Authorization=self.access_token),
data=bad_user
)
self.assertEqual(res.status_code, 400)
def test_edit_a_single_user_with_bad_username(self):
"""Test if API cannot edit a single user with a badly formated email"""
self.get_access_token()
bad_user = {
'username': ' ',
'email': 'test@test.com',
'password': 'test_password'
}
res = self.client.put(
'api/v1/user',
headers=dict(Authorization=self.access_token),
data=bad_user
)
self.assertEqual(res.status_code, 400)
def test_editing_a_user_with_existing_name(self):
"""
Test if API cannot edit user name or to one that already
exits
"""
self.get_access_token()
user = {
'username': 'test3_user',
'email': 'test3@test.com',
'password': 'test_password'
}
res = self.client.post(
'/api/v1/auth/register',
data=user
)
res = self.client.put(
'api/v1/user',
headers=dict(Authorization=self.access_token),
data=user
)
self.assertEqual(res.status_code, 400)
def test_delete_a_shopping_list(self):
"""Test if API can delete a single user"""
self.get_access_token()
res = self.client.delete(
'/api/v1/user',
headers=dict(Authorization=self.access_token)
)
res = self.client.get(
'/api/v1/user',
headers=dict(Authorization=self.access_token)
)
self.assertNotIn('test@test.com', str(res.data))
| 28.692308 | 79 | 0.563734 | 487 | 4,103 | 4.556468 | 0.160164 | 0.099144 | 0.070302 | 0.138801 | 0.850383 | 0.799009 | 0.767913 | 0.754845 | 0.680937 | 0.647138 | 0 | 0.012221 | 0.32196 | 4,103 | 142 | 80 | 28.894366 | 0.785406 | 0.111626 | 0 | 0.60396 | 0 | 0 | 0.124332 | 0.005907 | 0 | 0 | 0 | 0 | 0.089109 | 1 | 0.089109 | false | 0.039604 | 0.009901 | 0 | 0.108911 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
0db971c54099d3624c590d86d0da10d3974e923d | 100 | py | Python | sigmund/admin.py | mattcaldwell/sigmund-remote-logger | 5c904a067ad34b5df7618db2c34dd4bd24c2f6b0 | [
"MIT"
] | 1 | 2015-11-04T16:24:40.000Z | 2015-11-04T16:24:40.000Z | sigmund/admin.py | mattcaldwell/sigmund-remote-logger | 5c904a067ad34b5df7618db2c34dd4bd24c2f6b0 | [
"MIT"
] | null | null | null | sigmund/admin.py | mattcaldwell/sigmund-remote-logger | 5c904a067ad34b5df7618db2c34dd4bd24c2f6b0 | [
"MIT"
] | null | null | null | from django.contrib import admin
from sigmund.models import LogEntry
admin.site.register(LogEntry)
| 20 | 35 | 0.84 | 14 | 100 | 6 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 100 | 4 | 36 | 25 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
0ddb434908dc2dc53565eeb8235eb5ca790681d4 | 6,501 | py | Python | smart_load_balancer/test_balancer.py | airenas/smart_load_balancer | 07e64ca185f3db5abc2a765eb561bcd91f1af371 | [
"BSD-3-Clause"
] | null | null | null | smart_load_balancer/test_balancer.py | airenas/smart_load_balancer | 07e64ca185f3db5abc2a765eb561bcd91f1af371 | [
"BSD-3-Clause"
] | null | null | null | smart_load_balancer/test_balancer.py | airenas/smart_load_balancer | 07e64ca185f3db5abc2a765eb561bcd91f1af371 | [
"BSD-3-Clause"
] | null | null | null | import logging
import time
from typing import Tuple, List, Dict
from smart_load_balancer.balancer import Balancer, add_work_dic, pop_work_dic
from smart_load_balancer.work import Work
def test_balancer_init(caplog):
# caplog.set_level(logging.INFO)
bal = Balancer(wrk_count=1)
assert len(bal._Balancer__workers) == 1
bal = Balancer(wrk_count=3)
assert len(bal._Balancer__workers) == 3
def test_balancer_add_wrk():
bal = Balancer(wrk_count=1)
assert len(bal._Balancer__workers) == 1
bal.start()
def work_test_func(name, data, wrk_data):
return name
wrk = Work(name="olia", data=None, work_func=work_test_func)
bal.add_wrk(wrk)
res = wrk.wait()
assert res.res == "olia"
def test_balancer_add_several_wrk():
bal = Balancer(wrk_count=1)
bal.start()
wc = 0
def work_test_func(name, data, wrk_data):
nonlocal wc
wc += 1
time.sleep(0.1)
return wc
wrk = Work(name="olia", data="w1", work_func=work_test_func)
wrk2 = Work(name="olia1", data="w2", work_func=work_test_func)
wrk3 = Work(name="olia", data="w3", work_func=work_test_func)
wrk4 = Work(name="olia", data="w4", work_func=work_test_func)
bal.add_wrk(wrk)
bal.add_wrk(wrk2)
bal.add_wrk(wrk3)
bal.add_wrk(wrk4)
res4 = wrk4.wait()
res3 = wrk3.wait()
res = wrk.wait()
res2 = wrk2.wait()
assert res.res == 1
assert res2.res == 4
assert res3.res == 2
assert res4.res == 3
def test_balancer_several_workers(caplog):
caplog.set_level(logging.INFO)
bal = Balancer(wrk_count=2)
bal.start()
def work_test_func(name, data, wrk_data):
time.sleep(0.1)
return name
wrk = Work(name="olia", data="w1", work_func=work_test_func)
wrk2 = Work(name="olia1", data="w2", work_func=work_test_func)
wrk3 = Work(name="olia", data="w3", work_func=work_test_func)
wrk4 = Work(name="olia1", data="w4", work_func=work_test_func)
bal.add_wrk(wrk)
bal.add_wrk(wrk2)
bal.add_wrk(wrk3)
bal.add_wrk(wrk4)
res4 = wrk4.wait()
res3 = wrk3.wait()
res = wrk.wait()
res2 = wrk2.wait()
assert res.worker_id == 0
assert res2.worker_id == 1
assert res3.worker_id == 0
assert res4.worker_id == 1
def test_balancer_prefer_old():
bal = Balancer(wrk_count=1)
bal.start()
wc = 0
def work_test_func(name, data, wrk_data):
nonlocal wc
wc += 1
time.sleep(0.1)
return wc
t = time.time()
wrk = Work(name="olia", data="w1", work_func=work_test_func, added=t)
wrk2 = Work(name="olia1", data="w2", work_func=work_test_func, added=t - 11)
wrk3 = Work(name="olia", data="w3", work_func=work_test_func, added=t + 1)
wrk4 = Work(name="olia", data="w4", work_func=work_test_func, added=t + 2)
bal.add_wrk(wrk)
bal.add_wrk(wrk3)
bal.add_wrk(wrk4)
bal.add_wrk(wrk2)
res4 = wrk4.wait()
res3 = wrk3.wait()
res = wrk.wait()
res2 = wrk2.wait()
assert res.res == 1
assert res2.res == 2
assert res3.res == 3
assert res4.res == 4
def test_balancer_prefer_empty(caplog):
caplog.set_level(logging.INFO)
bal = Balancer(wrk_count=2)
bal._Balancer__workers[0].name = "olia"
bal.start()
def work_test_func(name, data, wrk_data):
return name
t = time.time()
wrk = Work(name="olia1", data="w1", work_func=work_test_func, added=t)
bal.add_wrk(wrk)
res = wrk.wait()
assert res.worker_id == 1
def test_add_wrk(caplog):
caplog.set_level(logging.INFO)
wrks: Dict[str, List[Tuple[float, Work]]] = dict()
add_work_dic(wrks, Work(name="olia", data=1, added=10, priority=1))
add_work_dic(wrks, Work(name="olia", data=2, added=10, priority=2))
add_work_dic(wrks, Work(name="olia", data=3, added=10, priority=3))
add_work_dic(wrks, Work(name="olia1", data=4, added=10, priority=1))
assert len(wrks["olia"]) == 3
assert wrks["olia"][0][0] == 11
assert wrks["olia"][0][1].data == 1
assert wrks["olia"][1][1].data == 2
assert wrks["olia"][2][1].data == 3
assert len(wrks["olia1"]) == 1
assert wrks["olia1"][0][0] == 11
assert wrks["olia1"][0][1].data == 4
def test_add_wrk_float(caplog):
caplog.set_level(logging.INFO)
wrks: Dict[str, List[Tuple[float, Work]]] = dict()
add_work_dic(wrks, Work(name="olia", data=1, added=10.01, priority=1))
add_work_dic(wrks, Work(name="olia", data=2, added=10.005, priority=1))
assert len(wrks["olia"]) == 2
assert wrks["olia"][0][0] == 11.005
assert wrks["olia"][0][1].data == 2
assert wrks["olia"][1][0] == 11.01
assert wrks["olia"][1][1].data == 1
def test_add_pop_wrk_empty(caplog):
caplog.set_level(logging.INFO)
wrks: Dict[str, List[Tuple[float, Work]]] = dict()
add_work_dic(wrks, Work(name="olia", data=1, added=10, priority=1))
add_work_dic(wrks, Work(name="olia1", data=2, added=10, priority=2))
assert len(wrks) == 2
pop_work_dic(wrks, "olia")
pop_work_dic(wrks, "olia1")
assert len(wrks) == 0
def test_add_pop_wrk_float(caplog):
caplog.set_level(logging.INFO)
wrks: Dict[str, List[Tuple[float, Work]]] = dict()
add_work_dic(wrks, Work(name="olia", data=1, added=0.001, priority=1))
add_work_dic(wrks, Work(name="olia", data=2, added=0.0001, priority=1))
add_work_dic(wrks, Work(name="olia", data=3, added=0.00011, priority=1))
add_work_dic(wrks, Work(name="olia", data=4, added=0.000105, priority=1))
wrk = pop_work_dic(wrks, "olia")
assert wrk.data == 2
wrk = pop_work_dic(wrks, "olia")
assert wrk.data == 4
def test_add_pop_wrk(caplog):
caplog.set_level(logging.INFO)
wrks: Dict[str, List[Tuple[float, Work]]] = dict()
add_work_dic(wrks, Work(name="olia", data=1, added=10, priority=1))
add_work_dic(wrks, Work(name="olia", data=2, added=10, priority=0))
add_work_dic(wrks, Work(name="olia", data=3, added=10, priority=-1))
wrk = pop_work_dic(wrks, "olia")
assert wrk.data == 3
wrk = pop_work_dic(wrks, "olia")
assert wrk.data == 2
wrk = pop_work_dic(wrks, "olia")
assert wrk.data == 1
def test_add_wrk_default_value(caplog):
caplog.set_level(logging.INFO)
wrks: Dict[str, List[Tuple[float, Work]]] = dict()
for i in range(100):
add_work_dic(wrks, Work(name="olia", data=i))
time.sleep(0.0001)
for i in range(100):
wrk = pop_work_dic(wrks, "olia")
assert wrk.data == i
| 30.665094 | 80 | 0.641132 | 1,054 | 6,501 | 3.766603 | 0.078748 | 0.060453 | 0.066499 | 0.092695 | 0.837531 | 0.783627 | 0.720403 | 0.703023 | 0.678841 | 0.64005 | 0 | 0.047335 | 0.200585 | 6,501 | 211 | 81 | 30.810427 | 0.716567 | 0.004615 | 0 | 0.563953 | 0 | 0 | 0.038491 | 0 | 0 | 0 | 0 | 0 | 0.22093 | 1 | 0.098837 | false | 0 | 0.02907 | 0.011628 | 0.156977 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
0dedb103440352361da26bdbfb7690b1c1bbd2e9 | 56 | py | Python | exercises/solution_01_01.py | throughput-ec/ec_workshops_py | 08d68c27fd916c34eb3636f6d382d6f9bf8ea969 | [
"MIT"
] | 1 | 2022-02-18T23:37:47.000Z | 2022-02-18T23:37:47.000Z | exercises/solution_01_01.py | LinkedEarth/ec_workshops_py | 44b4f8ea890da31311a51541a7f7e01c30a5acd1 | [
"MIT"
] | null | null | null | exercises/solution_01_01.py | LinkedEarth/ec_workshops_py | 44b4f8ea890da31311a51541a7f7e01c30a5acd1 | [
"MIT"
] | 2 | 2022-02-18T23:34:12.000Z | 2022-03-14T23:33:20.000Z | print("I love doing paleoclimate research with Python")
| 28 | 55 | 0.803571 | 8 | 56 | 5.625 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 56 | 1 | 56 | 56 | 0.918367 | 0 | 0 | 0 | 0 | 0 | 0.821429 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
219407627cb98586342c594aefddd7aac4c46bad | 269 | py | Python | open_oauth/resources.py | Zim95/login_module | be3c94f676f33efc3f2aadc8721b61be100057f9 | [
"MIT"
] | null | null | null | open_oauth/resources.py | Zim95/login_module | be3c94f676f33efc3f2aadc8721b61be100057f9 | [
"MIT"
] | null | null | null | open_oauth/resources.py | Zim95/login_module | be3c94f676f33efc3f2aadc8721b61be100057f9 | [
"MIT"
] | null | null | null | from flask_restful import Resource
class Ping(Resource):
def get(self):
return 'Ping:get it now'
def post(self):
return 'Ping:post'
def put(self):
return 'Ping:put'
def delete(self):
return 'Ping:delete' | 16.8125 | 34 | 0.568773 | 34 | 269 | 4.470588 | 0.470588 | 0.263158 | 0.368421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.330855 | 269 | 16 | 35 | 16.8125 | 0.844444 | 0 | 0 | 0 | 0 | 0 | 0.159259 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.1 | 0.4 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
21a0bba08de7a1151c784c43c7e39d895f00e848 | 12,954 | py | Python | optionmodels/finitedifferencemethods.py | GBERESEARCH/optionmodels | 4f2528317eb8bf38238fcf21a0fa286758385f69 | [
"MIT"
] | 2 | 2021-02-08T22:05:12.000Z | 2021-09-10T04:29:58.000Z | optionmodels/finitedifferencemethods.py | GBERESEARCH/optionmodels | 4f2528317eb8bf38238fcf21a0fa286758385f69 | [
"MIT"
] | null | null | null | optionmodels/finitedifferencemethods.py | GBERESEARCH/optionmodels | 4f2528317eb8bf38238fcf21a0fa286758385f69 | [
"MIT"
] | 2 | 2020-12-21T08:36:45.000Z | 2021-09-10T04:29:59.000Z | """
Finite Difference option pricing models
"""
import numpy as np
from optionmodels.utils import Utils
# pylint: disable=invalid-name
class FiniteDifference():
"""
Finite Difference option pricing models
"""
@staticmethod
def explicit_finite_difference(**kwargs):
"""
Explicit Finite Difference
Parameters
----------
S : Float
Stock Price. The default is 100.
K : Float
Strike Price. The default is 100.
T : Float
Time to Maturity. The default is 0.25 (3 Months).
r : Float
Interest Rate. The default is 0.005 (50bps)
q : Float
Dividend Yield. The default is 0.
sigma : Float
Implied Volatility. The default is 0.2 (20%).
nodes : Int
Number of price steps. The default is 100.
option : Str
Type of option. 'put' or 'call'. The default is 'call'.
american : Bool
Whether the option is American. The default is False.
default : Bool
Whether the function is being called directly (in which
case values that are not supplied are set to default
values) or called from another function where they have
already been updated.
Returns
-------
result : Float
Option Price.
"""
# Update pricing input parameters to default if not supplied
if 'refresh' in kwargs and kwargs['refresh']:
params = Utils.init_params(kwargs)
S = params['S']
K = params['K']
T = params['T']
r = params['r']
q = params['q']
sigma = params['sigma']
nodes = params['nodes']
option = params['option']
american = params['american']
if option == 'call':
z = 1
else:
z = -1
b = r - q
dS = S / nodes
nodes = int(K / dS) * 2
St = np.zeros((nodes + 2), dtype='float')
SGridtPt = int(S / dS)
dt = (dS ** 2) / ((sigma ** 2) * 4 * (K ** 2))
N = int(T / dt) + 1
C = np.zeros((N + 1, nodes + 2), dtype='float')
dt = T / N
Df = 1 / (1 + r * dt)
for i in range(nodes + 1):
St[i] = i * dS # Asset price at maturity
C[N, i] = max(0, z * (St[i] - K) ) # At maturity
for j in range(N - 1, -1, -1):
for i in range(1, nodes):
pu = 0.5 * ((sigma ** 2) * (i ** 2) + b * i) * dt
pm = 1 - (sigma ** 2) * (i ** 2) * dt
pd = 0.5 * ((sigma ** 2) * (i ** 2) - b * i) * dt
C[j, i] = Df * (pu * C[j + 1, i + 1] + pm * C[
j + 1, i] + pd * C[j + 1, i - 1])
if american:
C[j, i] = max(z * (St[i] - K), C[j, i])
if z == 1: # Call option
C[j, 0] = 0
C[j, nodes] = (St[i] - K)
else:
C[j, 0] = K
C[j, nodes] = 0
result = C[0, SGridtPt]
return result
@staticmethod
def implicit_finite_difference(**kwargs):
"""
Implicit Finite Difference
# Slow to converge - steps has small effect, need nodes 3000+
Parameters
----------
S : Float
Stock Price. The default is 100.
K : Float
Strike Price. The default is 100.
T : Float
Time to Maturity. The default is 0.25 (3 Months).
r : Float
Interest Rate. The default is 0.005 (50bps)
q : Float
Dividend Yield. The default is 0.
sigma : Float
Implied Volatility. The default is 0.2 (20%).
steps : Int
Number of time steps. The default is 1000.
nodes : Float
Number of price steps. The default is 100.
option : Str
Type of option. 'put' or 'call'. The default is 'call'.
american : Bool
Whether the option is American. The default is False.
default : Bool
Whether the function is being called directly (in which
case values that are not supplied are set to default
values) or called from another function where they have
already been updated.
Returns
-------
result : Float
Option Price.
"""
# Update pricing input parameters to default if not supplied
if 'refresh' in kwargs and kwargs['refresh']:
params = Utils.init_params(kwargs)
S = params['S']
K = params['K']
T = params['T']
r = params['r']
q = params['q']
sigma = params['sigma']
steps = params['steps']
nodes = params['nodes']
option = params['option']
american = params['american']
if option == 'call':
z = 1
else:
z = -1
# Make sure current asset price falls at grid point
dS = 2 * S / nodes
SGridtPt = int(S / dS)
nodes = int(K / dS) * 2
dt = T / steps
b = r - q
CT = np.zeros(nodes + 1)
p = np.zeros((nodes + 1, nodes + 1), dtype='float')
for j in range(nodes + 1):
CT[j] = max(0, z * (j * dS - K)) # At maturity
for i in range(nodes + 1):
p[j, i] = 0
p[0, 0] = 1
for i in range(1, nodes):
p[i, i - 1] = 0.5 * i * (b - (sigma ** 2) * i) * dt
p[i, i] = 1 + (r + (sigma ** 2) * (i ** 2)) * dt
p[i, i + 1] = 0.5 * i * (-b - (sigma ** 2) * i) * dt
p[nodes, nodes] = 1
C = np.matmul(np.linalg.inv(p), CT.T)
for j in range(steps - 1, 0, -1):
C = np.matmul(np.linalg.inv(p), C)
if american:
for i in range(1, nodes + 1):
C[i] = max(float(C[i]), z * (
(i - 1) * dS - K))
result = C[SGridtPt + 1]
return result
@staticmethod
def explicit_finite_difference_lns(**kwargs):
"""
Explicit Finite Differences - rewrite BS-PDE in terms of ln(S)
Parameters
----------
S : Float
Stock Price. The default is 100.
K : Float
Strike Price. The default is 100.
T : Float
Time to Maturity. The default is 0.25 (3 Months).
r : Float
Interest Rate. The default is 0.005 (50bps)
q : Float
Dividend Yield. The default is 0.
sigma : Float
Implied Volatility. The default is 0.2 (20%).
steps : Int
Number of time steps. The default is 1000.
nodes : Float
Number of price steps. The default is 100.
option : Str
Type of option. 'put' or 'call'. The default is 'call'.
american : Bool
Whether the option is American. The default is False.
default : Bool
Whether the function is being called directly (in which
case values that are not supplied are set to default
values) or called from another function where they have
already been updated.
Returns
-------
result : Float
Option Price.
"""
# Update pricing input parameters to default if not supplied
if 'refresh' in kwargs and kwargs['refresh']:
params = Utils.init_params(kwargs)
S = params['S']
K = params['K']
T = params['T']
r = params['r']
q = params['q']
sigma = params['sigma']
steps_itt = params['steps_itt']
nodes = params['nodes']
option = params['option']
american = params['american']
if option == 'call':
z = 1
else:
z = -1
b = r - q
dt = T / steps_itt
dx = sigma * np.sqrt(3 * dt)
pu = 0.5 * dt * (((sigma / dx) ** 2) + (b - (sigma ** 2) / 2) / dx)
pm = 1 - dt * ((sigma / dx) ** 2) - r * dt
pd = 0.5 * dt * (((sigma / dx) ** 2) - (b - (sigma ** 2) / 2) / dx)
St = np.zeros(nodes + 2)
St[0] = S * np.exp(-nodes / 2 * dx)
C = np.zeros((int(nodes / 2) + 1, nodes + 2), dtype='float')
C[steps_itt, 0] = max(0, z * (St[0] - K))
for i in range(1, nodes + 1):
St[i] = St[i - 1] * np.exp(dx) # Asset price at maturity
C[steps_itt, i] = max(0, z * (St[i] - K) ) # At maturity
for j in range(steps_itt - 1, -1, -1):
for i in range(1, nodes):
C[j, i] = pu * C[j + 1, i + 1] + pm * C[j + 1, i] + (
pd * C[j + 1, i - 1])
if american:
C[j, i] = max(C[j, i], z * (St[i] - K))
# Upper boundary
C[j, nodes] = C[j, nodes - 1] + (St[nodes] - St[nodes - 1])
# Lower boundary
C[j, 0] = C[j, 1]
result = C[0, int(nodes / 2)]
return result
@staticmethod
def crank_nicolson(**kwargs):
"""
Crank Nicolson
Parameters
----------
S : Float
Stock Price. The default is 100.
K : Float
Strike Price. The default is 100.
T : Float
Time to Maturity. The default is 0.25 (3 Months).
r : Float
Interest Rate. The default is 0.005 (50bps)
q : Float
Dividend Yield. The default is 0.
sigma : Float
Implied Volatility. The default is 0.2 (20%).
steps : Int
Number of time steps. The default is 1000.
nodes : Float
Number of price steps. The default is 100.
option : Str
Type of option. 'put' or 'call'. The default is 'call'.
american : Bool
Whether the option is American. The default is False.
default : Bool
Whether the function is being called directly (in which
case values that are not supplied are set to default
values) or called from another function where they have
already been updated.
Returns
-------
result : Float
Option Price.
"""
# Update pricing input parameters to default if not supplied
if 'refresh' in kwargs and kwargs['refresh']:
params = Utils.init_params(kwargs)
S = params['S']
K = params['K']
T = params['T']
r = params['r']
q = params['q']
sigma = params['sigma']
steps = params['steps']
nodes = params['nodes']
option = params['option']
american = params['american']
if option == 'call':
z = 1
else:
z = -1
b = r - q
dt = T / steps
dx = sigma * np.sqrt(3 * dt)
pu = -0.25 * dt * (((sigma / dx) ** 2) + (b - (sigma ** 2) / 2) / dx)
pm = 1 + 0.5 * dt * ((sigma / dx) ** 2) + 0.5 * r * dt
pd = -0.25 * dt * (((sigma / dx) ** 2) - (b - (sigma ** 2) / 2) / dx)
St = np.zeros(nodes + 2)
pmd = np.zeros(nodes + 1)
p = np.zeros(nodes + 1)
St[0] = S * np.exp(-nodes / 2 * dx)
C = np.zeros((int(nodes / 2) + 2, nodes + 2), dtype='float')
C[0, 0] = max(0, z * (St[0] - K))
for node in range(1, nodes + 1):
St[node] = St[node - 1] * np.exp(dx) # Asset price at maturity
C[0, node] = max(0, z * (St[node] - K)) # At maturity
pmd[1] = pm + pd
p[1] = (-pu * C[0, 2]
- (pm - 2) * C[0, 1]
- pd * C[0, 0]
- pd * (St[1] - St[0]))
step = steps - 1
while step > -1:
for outer_node in range(2, nodes):
p[outer_node] = (-pu * C[0, outer_node + 1]
- (pm - 2) * C[0, outer_node]
- pd * C[0, outer_node - 1]
- p[outer_node - 1] * pd / pmd[outer_node - 1])
pmd[outer_node] = pm - pu * pd / pmd[outer_node - 1]
for outer_node in range(nodes - 2, 0, -1):
C[1, outer_node] = (
(p[outer_node] - pu * C[1, outer_node + 1])
/ pmd[outer_node])
for inner_node in range(nodes + 1):
if american:
C[0, inner_node] = max(
C[1, inner_node], z * (St[inner_node] - K))
else:
C[0, inner_node] = C[1, inner_node]
step -= 1
result = C[0, int(nodes / 2)]
return result
| 31.82801 | 77 | 0.452293 | 1,657 | 12,954 | 3.512975 | 0.099578 | 0.066999 | 0.080399 | 0.035733 | 0.80536 | 0.741453 | 0.716028 | 0.707267 | 0.689057 | 0.647827 | 0 | 0.041072 | 0.426741 | 12,954 | 406 | 78 | 31.906404 | 0.742796 | 0.328084 | 0 | 0.520619 | 0 | 0 | 0.030595 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.020619 | false | 0 | 0.010309 | 0 | 0.056701 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
21af672cf3f072436e84a6b7d2e809356e431b4e | 110 | py | Python | tnep/df/__init__.py | jbarberia/TNEP.py | 86513ebc50a9074a3ec12ac4fcd04f427baf0e2c | [
"MIT"
] | null | null | null | tnep/df/__init__.py | jbarberia/TNEP.py | 86513ebc50a9074a3ec12ac4fcd04f427baf0e2c | [
"MIT"
] | 3 | 2021-04-13T19:49:08.000Z | 2021-04-29T12:24:04.000Z | tnep/df/__init__.py | jbarberia/TNEP.py | 86513ebc50a9074a3ec12ac4fcd04f427baf0e2c | [
"MIT"
] | null | null | null | # Sub modulo para lectura y escritura en Excel
from .parameters import Parameters
from .reports import Reports | 36.666667 | 46 | 0.827273 | 16 | 110 | 5.6875 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145455 | 110 | 3 | 47 | 36.666667 | 0.968085 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
21d499e31ecd43363496b7c2b7f0d2120836fc8c | 9,499 | py | Python | agents.py | bandreghetti/autoplay | 4d3ba7c7383dfb2abf73040bf521f463b1966c30 | [
"MIT"
] | null | null | null | agents.py | bandreghetti/autoplay | 4d3ba7c7383dfb2abf73040bf521f463b1966c30 | [
"MIT"
] | null | null | null | agents.py | bandreghetti/autoplay | 4d3ba7c7383dfb2abf73040bf521f463b1966c30 | [
"MIT"
] | null | null | null | from keras.models import Sequential, load_model, model_from_json
from keras.layers import Dense, Conv2D, MaxPooling2D, Conv3D, MaxPooling3D, Flatten
from keras.optimizers import SGD
import numpy as np
from skimage.transform import resize
import os
from keras import backend as K
K.set_image_dim_ordering('tf')
bNOOP = np.array([0, 0, 0, 0, 0])
bFIRE = np.array([1, 0, 0, 0, 0])
bUP = np.array([0, 1, 0, 0, 0])
bRIGHT = np.array([0, 0, 1, 0, 0])
bLEFT = np.array([0, 0, 0, 1, 0])
bDOWN = np.array([0, 0, 0, 0, 1])
bUPRIGHT = np.array([0, 1, 1, 0, 0])
bUPLEFT = np.array([0, 1, 0, 1, 0])
bDOWNRIGHT = np.array([0, 0, 1, 0, 1])
bDOWNLEFT = np.array([0, 0, 0, 1, 1])
bUPFIRE = np.array([1, 1, 0, 0, 0])
bRIGHTFIRE = np.array([1, 0, 1, 0, 0])
bLEFTFIRE = np.array([1, 0, 0, 1, 0])
bDOWNFIRE = np.array([1, 0, 0, 0, 1])
bUPRIGHTFIRE = np.array([1, 1, 1, 0, 0])
bUPLEFTFIRE = np.array([1, 1, 0, 1, 0])
bDOWNRIGHTFIRE = np.array([1, 0, 1, 0, 1])
bDOWNLEFTFIRE = np.array([1, 0, 0, 1, 1])
def load(game, topology):
modelName = '{}_{}'.format(game, topology)
if topology == "MLP":
# load json and create model
json_path = os.path.join(modelName, 'model.json')
with open(json_path, 'r') as json_file:
loaded_model_json = json_file.read()
json_file.close()
model = model_from_json(loaded_model_json)
# load weights into new model
weightsPath = os.path.join(modelName, 'weights.h5')
model.load_weights(weightsPath)
print("Loaded model from disk")
elif topology == "Conv":
# load json and create model
json_path = os.path.join(modelName, 'model.json')
with open(json_path, 'r') as json_file:
loaded_model_json = json_file.read()
json_file.close()
model = model_from_json(loaded_model_json)
# load weights into new model
weightsPath = os.path.join(modelName, 'weights.h5')
model.load_weights(weightsPath)
print("Loaded model from disk")
else:
print("Available topologies:")
print(" - MLP")
exit()
return model
class MLP():
def __init__(self, env):
self.frame_size = (128, 128)
observation_sample = env.observation_space.sample()
observation_sample = resize(observation_sample, self.frame_size, anti_aliasing=True, mode='constant')
self.input_size = observation_sample.size
self.output_size = env.action_space.n
self.batch_size = 32
self.sample_idx = 0
self.gamma = 0.99
self.epsilon = 1
self.batch_inputs = np.zeros((self.batch_size, self.input_size))
self.batch_targets = np.zeros((self.batch_size, self.output_size))
self.history_x = [0]
self.history_y = [0]
sgd = SGD(lr=0.01)
# Configure model
self.model = Sequential()
self.model.add(Dense(units=64, activation='relu', kernel_initializer="uniform", input_dim=self.input_size))
self.model.add(Dense(units=32, activation='relu', kernel_initializer="uniform"))
self.model.add(Dense(units=self.output_size, activation='relu', kernel_initializer="uniform"))
self.model.compile(optimizer=sgd, loss='categorical_crossentropy', metrics=['accuracy'])
def getWeights(self):
return self.model.get_weights()
def setWeights(self, weights):
self.model.set_weights(weights)
def Q(self, observation):
observation = resize(observation, self.frame_size, anti_aliasing=True, mode='constant')
flatScreen = observation.reshape(1, -1)
output = self.model.predict(flatScreen)
return output
def action(self, observation):
if np.random.rand() < self.epsilon:
return np.random.randint(self.output_size)
predicted_rewards = self.Q(observation)
return np.argmax(predicted_rewards)
def train(self, observation, new_observation, reward, done):
observation_resized = resize(observation, self.frame_size, anti_aliasing=True, mode='constant')
self.batch_inputs[self.sample_idx] = observation_resized.flatten()
target = self.Q(observation)[0]
action = np.argmax(target)
if done:
target[action] = reward
else:
Q_new = self.Q(new_observation)
target[action] = reward + self.gamma * np.max(Q_new)
self.batch_targets[self.sample_idx] = target
self.sample_idx += 1
if self.sample_idx >= self.batch_size:
# print('Epsilon: {}'.format(self.epsilon))
self.model.train_on_batch(self.batch_inputs, self.batch_targets)
self.sample_idx = 0
if self.epsilon > 1:
self.epsilon -= 0.00001
def add_history(self, time, reward):
print('After training for {0:.2f} hours, got {1} reward in the last episode'.format(time, reward))
self.history_x.append(time)
self.history_y.append(reward)
def save(self, game):
modelName = '{}_MLP'.format(game)
os.makedirs(modelName, exist_ok=True)
# serialize model to JSON
model_json = self.model.to_json()
with open(os.path.join(modelName, 'model.json'), "w") as json_file:
json_file.write(model_json)
# serialize weights to HDF5
self.model.save_weights(os.path.join(modelName, 'weights.h5'))
np.save(os.path.join(modelName, 'history_x.npy'), self.history_x)
np.save(os.path.join(modelName, 'history_y.npy'), self.history_y)
class Conv():
def __init__(self, env):
self.frame_size = (128, 128)
observation_sample = env.observation_space.sample()
observation_sample = resize(observation_sample, self.frame_size, anti_aliasing=True, mode='constant')
self.input_shape = observation_sample.shape
self.output_size = env.action_space.n
self.batch_size = 32
self.sample_idx = 0
self.gamma = 0.99
self.epsilon = 1
self.batch_inputs = np.zeros((self.batch_size, self.input_shape[0], self.input_shape[1], self.input_shape[2]))
self.batch_targets = np.zeros((self.batch_size, self.output_size))
self.history_x = [0]
self.history_y = [0]
# Configure model
self.model = Sequential()
self.model.add(Conv2D(16, kernel_size=(5, 5), padding='valid', data_format="channels_last", activation='sigmoid', input_shape=self.input_shape))
self.model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
self.model.add(Conv2D(32, kernel_size=(5, 5), padding='valid', activation='sigmoid', data_format='channels_last'))
self.model.add(MaxPooling2D(pool_size=(2, 2)))
self.model.add(Flatten())
self.model.add(Dense(64, activation='relu'))
self.model.add(Dense(self.output_size, activation='relu'))
self.model.compile(optimizer='sgd', loss='categorical_crossentropy', metrics=['accuracy'])
def getWeights(self):
return self.model.get_weights()
def setWeights(self, weights):
self.model.set_weights(weights)
def Q(self, observation):
observation = resize(observation, self.frame_size, anti_aliasing=True, mode='constant')
data = observation.reshape((1, 128, 128, 3))
output = self.model.predict(np.array(data))
return output
def action(self, observation):
if np.random.rand() < self.epsilon:
return np.random.randint(self.output_size)
predicted_rewards = self.Q(observation)
return np.argmax(predicted_rewards)
def train(self, observation, new_observation, reward, done):
observation_resized = resize(observation, self.frame_size, anti_aliasing=True, mode='constant')
self.batch_inputs[self.sample_idx] = observation_resized
target = self.Q(observation)[0]
action = np.argmax(target)
if done:
target[action] = reward
else:
new_observation = resize(new_observation, self.frame_size, anti_aliasing=True, mode='constant')
Q_new = self.model.predict(new_observation.reshape((1, 128, 128, 3)))
target[action] = reward + self.gamma * np.max(Q_new)
self.batch_targets[self.sample_idx] = target
self.sample_idx += 1
if self.sample_idx >= self.batch_size:
# print('Epsilon: {}'.format(self.epsilon))
self.model.train_on_batch(self.batch_inputs, self.batch_targets)
self.sample_idx = 0
if self.epsilon > 0.2:
self.epsilon = 0.99*self.epsilon
def add_history(self, time, reward):
print('After training for {0:.2f} hours, got {1} reward in the last episode'.format(time, reward))
self.history_x.append(time)
self.history_y.append(reward)
def save(self, game):
modelName = '{}_Conv'.format(game)
os.makedirs(modelName, exist_ok=True)
# serialize model to JSON
model_json = self.model.to_json()
with open(os.path.join(modelName, 'model.json'), "w") as json_file:
json_file.write(model_json)
# serialize weights to HDF5
self.model.save_weights(os.path.join(modelName, 'weights.h5'))
np.save(os.path.join(modelName, 'history_x.npy'), self.history_x)
np.save(os.path.join(modelName, 'history_y.npy'), self.history_y)
| 40.76824 | 153 | 0.633751 | 1,270 | 9,499 | 4.590551 | 0.148032 | 0.009605 | 0.006175 | 0.039108 | 0.807204 | 0.774443 | 0.734648 | 0.720069 | 0.692967 | 0.684048 | 0 | 0.02787 | 0.236972 | 9,499 | 232 | 154 | 40.943966 | 0.77649 | 0.034214 | 0 | 0.632432 | 0 | 0 | 0.063858 | 0.00524 | 0 | 0 | 0 | 0 | 0 | 1 | 0.091892 | false | 0 | 0.037838 | 0.010811 | 0.189189 | 0.032432 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
df286935ad1b4282338f75fcc0d8260a8ed50233 | 65 | py | Python | parsers/__init__.py | Muflhi01/Chatistics | c091db38099f9edf9b39c2ed5fe99ace6a864d87 | [
"MIT"
] | 851 | 2018-01-22T00:38:32.000Z | 2022-03-28T10:32:46.000Z | parsers/__init__.py | Muflhi01/Chatistics | c091db38099f9edf9b39c2ed5fe99ace6a864d87 | [
"MIT"
] | 57 | 2018-01-21T22:58:08.000Z | 2020-11-12T12:16:13.000Z | parsers/__init__.py | Muflhi01/Chatistics | c091db38099f9edf9b39c2ed5fe99ace6a864d87 | [
"MIT"
] | 101 | 2018-01-22T15:52:29.000Z | 2022-01-31T21:54:28.000Z | import logging.config
logging.config.fileConfig('logging.conf')
| 16.25 | 41 | 0.815385 | 8 | 65 | 6.625 | 0.625 | 0.490566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061538 | 65 | 3 | 42 | 21.666667 | 0.868852 | 0 | 0 | 0 | 0 | 0 | 0.184615 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
df3b62baa230a530cc07034639de11846df8a710 | 22,013 | py | Python | alembic/versions/e0c6eb21771f_reset_migrations_with_new_schema.py | philip-dds/atst | a227044ccf464dd0e3144dd74cecfafe8d6841b9 | [
"MIT"
] | 1 | 2020-01-16T16:15:52.000Z | 2020-01-16T16:15:52.000Z | alembic/versions/e0c6eb21771f_reset_migrations_with_new_schema.py | philip-dds/atst | a227044ccf464dd0e3144dd74cecfafe8d6841b9 | [
"MIT"
] | null | null | null | alembic/versions/e0c6eb21771f_reset_migrations_with_new_schema.py | philip-dds/atst | a227044ccf464dd0e3144dd74cecfafe8d6841b9 | [
"MIT"
] | null | null | null | """reset migrations with new schema
Revision ID: e0c6eb21771f
Revises:
Create Date: 2019-06-19 15:17:59.205433
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'e0c6eb21771f'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
connection = op.get_bind()
op.execute("""
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
""")
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('attachments',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('filename', sa.String(), nullable=False),
sa.Column('object_name', sa.String(), nullable=False),
sa.Column('resource', sa.String(), nullable=True),
sa.Column('resource_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('object_name')
)
op.create_index(op.f('ix_attachments_resource_id'), 'attachments', ['resource_id'], unique=False)
op.create_table('notification_recipients',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('email', sa.String(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('permission_sets',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('display_name', sa.String(), nullable=False),
sa.Column('description', sa.String(), nullable=False),
sa.Column('permissions', postgresql.ARRAY(sa.String()), server_default='{}', nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_permission_sets_name'), 'permission_sets', ['name'], unique=True)
op.create_index(op.f('ix_permission_sets_permissions'), 'permission_sets', ['permissions'], unique=False)
op.create_table('portfolios',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('deleted', sa.Boolean(), server_default=sa.text('false'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('defense_component', sa.String(), nullable=True),
sa.Column('app_migration', sa.String(), nullable=True),
sa.Column('complexity', sa.ARRAY(sa.String()), nullable=True),
sa.Column('complexity_other', sa.String(), nullable=True),
sa.Column('description', sa.String(), nullable=True),
sa.Column('dev_team', sa.ARRAY(sa.String()), nullable=True),
sa.Column('dev_team_other', sa.String(), nullable=True),
sa.Column('native_apps', sa.String(), nullable=True),
sa.Column('team_experience', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('users',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('username', sa.String(), nullable=True),
sa.Column('email', sa.String(), nullable=True),
sa.Column('dod_id', sa.String(), nullable=False),
sa.Column('first_name', sa.String(), nullable=True),
sa.Column('last_name', sa.String(), nullable=True),
sa.Column('phone_number', sa.String(), nullable=True),
sa.Column('phone_ext', sa.String(), nullable=True),
sa.Column('service_branch', sa.String(), nullable=True),
sa.Column('citizenship', sa.String(), nullable=True),
sa.Column('designation', sa.String(), nullable=True),
sa.Column('date_latest_training', sa.Date(), nullable=True),
sa.Column('last_login', sa.TIMESTAMP(timezone=True), nullable=True),
sa.Column('last_session_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('provisional', sa.Boolean(), nullable=True),
sa.Column('cloud_id', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('dod_id')
)
op.create_table('applications',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('deleted', sa.Boolean(), server_default=sa.text('false'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('description', sa.String(), nullable=False),
sa.Column('portfolio_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.ForeignKeyConstraint(['portfolio_id'], ['portfolios.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('portfolio_roles',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('portfolio_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('status', sa.Enum('ACTIVE', 'DISABLED', 'PENDING', name='status', native_enum=False), nullable=True),
sa.ForeignKeyConstraint(['portfolio_id'], ['portfolios.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_portfolio_roles_portfolio_id'), 'portfolio_roles', ['portfolio_id'], unique=False)
op.create_index(op.f('ix_portfolio_roles_user_id'), 'portfolio_roles', ['user_id'], unique=False)
op.create_index('portfolio_role_user_portfolio', 'portfolio_roles', ['user_id', 'portfolio_id'], unique=True)
op.create_table('task_orders',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('portfolio_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('pdf_attachment_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('number', sa.String(), nullable=True),
sa.Column('signer_dod_id', sa.String(), nullable=True),
sa.Column('signed_at', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['pdf_attachment_id'], ['attachments.id'], ),
sa.ForeignKeyConstraint(['portfolio_id'], ['portfolios.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('users_permission_sets',
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('permission_set_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.ForeignKeyConstraint(['permission_set_id'], ['permission_sets.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], )
)
op.create_table('application_roles',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('deleted', sa.Boolean(), server_default=sa.text('false'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('application_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('status', sa.Enum('ACTIVE', 'DISABLED', 'PENDING', name='status', native_enum=False), nullable=True),
sa.ForeignKeyConstraint(['application_id'], ['applications.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index('application_role_user_application', 'application_roles', ['user_id', 'application_id'], unique=True)
op.create_index(op.f('ix_application_roles_application_id'), 'application_roles', ['application_id'], unique=False)
op.create_index(op.f('ix_application_roles_user_id'), 'application_roles', ['user_id'], unique=False)
op.create_table('audit_events',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('portfolio_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('application_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('changed_state', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column('event_details', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column('resource_type', sa.String(), nullable=False),
sa.Column('resource_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('display_name', sa.String(), nullable=True),
sa.Column('action', sa.String(), nullable=False),
sa.ForeignKeyConstraint(['application_id'], ['applications.id'], ),
sa.ForeignKeyConstraint(['portfolio_id'], ['portfolios.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_audit_events_application_id'), 'audit_events', ['application_id'], unique=False)
op.create_index(op.f('ix_audit_events_portfolio_id'), 'audit_events', ['portfolio_id'], unique=False)
op.create_index(op.f('ix_audit_events_resource_id'), 'audit_events', ['resource_id'], unique=False)
op.create_index(op.f('ix_audit_events_user_id'), 'audit_events', ['user_id'], unique=False)
op.create_table('clins',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('task_order_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('number', sa.String(), nullable=True),
sa.Column('loas', postgresql.ARRAY(sa.String()), server_default='{}', nullable=True),
sa.Column('start_date', sa.Date(), nullable=True),
sa.Column('end_date', sa.Date(), nullable=True),
sa.Column('obligated_amount', sa.Numeric(scale=2), nullable=True),
sa.Column('jedi_clin_type', sa.Enum('JEDI_CLIN_1', 'JEDI_CLIN_2', 'JEDI_CLIN_3', 'JEDI_CLIN_4', name='jediclintype', native_enum=False), nullable=True),
sa.ForeignKeyConstraint(['task_order_id'], ['task_orders.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('environments',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('deleted', sa.Boolean(), server_default=sa.text('false'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('application_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('cloud_id', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['application_id'], ['applications.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('portfolio_invitations',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('status', sa.Enum('ACCEPTED', 'REVOKED', 'PENDING', 'REJECTED_WRONG_USER', 'REJECTED_EXPIRED', name='status', native_enum=False), nullable=True),
sa.Column('expiration_time', sa.TIMESTAMP(timezone=True), nullable=True),
sa.Column('token', sa.String(), nullable=True),
sa.Column('email', sa.String(), nullable=False),
sa.Column('dod_id', sa.String(), nullable=True),
sa.Column('first_name', sa.String(), nullable=True),
sa.Column('last_name', sa.String(), nullable=True),
sa.Column('phone_number', sa.String(), nullable=True),
sa.Column('portfolio_role_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('inviter_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.ForeignKeyConstraint(['inviter_id'], ['users.id'], ),
sa.ForeignKeyConstraint(['portfolio_role_id'], ['portfolio_roles.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_portfolio_invitations_inviter_id'), 'portfolio_invitations', ['inviter_id'], unique=False)
op.create_index(op.f('ix_portfolio_invitations_portfolio_role_id'), 'portfolio_invitations', ['portfolio_role_id'], unique=False)
op.create_index(op.f('ix_portfolio_invitations_token'), 'portfolio_invitations', ['token'], unique=False)
op.create_index(op.f('ix_portfolio_invitations_user_id'), 'portfolio_invitations', ['user_id'], unique=False)
op.create_table('portfolio_roles_permission_sets',
sa.Column('portfolio_role_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('permission_set_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.ForeignKeyConstraint(['permission_set_id'], ['permission_sets.id'], ),
sa.ForeignKeyConstraint(['portfolio_role_id'], ['portfolio_roles.id'], )
)
op.create_table('application_invitations',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('status', sa.Enum('ACCEPTED', 'REVOKED', 'PENDING', 'REJECTED_WRONG_USER', 'REJECTED_EXPIRED', name='status', native_enum=False), nullable=True),
sa.Column('expiration_time', sa.TIMESTAMP(timezone=True), nullable=True),
sa.Column('token', sa.String(), nullable=True),
sa.Column('email', sa.String(), nullable=False),
sa.Column('dod_id', sa.String(), nullable=True),
sa.Column('first_name', sa.String(), nullable=True),
sa.Column('last_name', sa.String(), nullable=True),
sa.Column('phone_number', sa.String(), nullable=True),
sa.Column('application_role_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('user_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('inviter_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.ForeignKeyConstraint(['application_role_id'], ['application_roles.id'], ),
sa.ForeignKeyConstraint(['inviter_id'], ['users.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_application_invitations_application_role_id'), 'application_invitations', ['application_role_id'], unique=False)
op.create_index(op.f('ix_application_invitations_inviter_id'), 'application_invitations', ['inviter_id'], unique=False)
op.create_index(op.f('ix_application_invitations_token'), 'application_invitations', ['token'], unique=False)
op.create_index(op.f('ix_application_invitations_user_id'), 'application_invitations', ['user_id'], unique=False)
op.create_table('application_roles_permission_sets',
sa.Column('application_role_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.Column('permission_set_id', postgresql.UUID(as_uuid=True), nullable=True),
sa.ForeignKeyConstraint(['application_role_id'], ['application_roles.id'], ),
sa.ForeignKeyConstraint(['permission_set_id'], ['permission_sets.id'], )
)
op.create_table('environment_roles',
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
sa.Column('deleted', sa.Boolean(), server_default=sa.text('false'), nullable=False),
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('environment_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('role', sa.String(), nullable=True),
sa.Column('application_role_id', postgresql.UUID(as_uuid=True), nullable=False),
sa.ForeignKeyConstraint(['application_role_id'], ['application_roles.id'], ),
sa.ForeignKeyConstraint(['environment_id'], ['environments.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index('environments_role_user_environment', 'environment_roles', ['application_role_id', 'environment_id'], unique=True)
connection = op.get_bind()
connection.execute("""
CREATE OR REPLACE FUNCTION lock_dod_id()
RETURNS TRIGGER
AS $$
BEGIN
IF NEW.dod_id != OLD.dod_id THEN
RAISE EXCEPTION 'DOD ID cannot be updated';
END IF;
RETURN NEW;
END
$$ LANGUAGE plpgsql;
CREATE TRIGGER lock_dod_id
BEFORE UPDATE ON users
FOR EACH ROW
EXECUTE PROCEDURE lock_dod_id();
""")
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('environments_role_user_environment', table_name='environment_roles')
op.drop_table('environment_roles')
op.drop_table('application_roles_permission_sets')
op.drop_index(op.f('ix_application_invitations_user_id'), table_name='application_invitations')
op.drop_index(op.f('ix_application_invitations_token'), table_name='application_invitations')
op.drop_index(op.f('ix_application_invitations_inviter_id'), table_name='application_invitations')
op.drop_index(op.f('ix_application_invitations_application_role_id'), table_name='application_invitations')
op.drop_table('application_invitations')
op.drop_table('portfolio_roles_permission_sets')
op.drop_index(op.f('ix_portfolio_invitations_user_id'), table_name='portfolio_invitations')
op.drop_index(op.f('ix_portfolio_invitations_token'), table_name='portfolio_invitations')
op.drop_index(op.f('ix_portfolio_invitations_portfolio_role_id'), table_name='portfolio_invitations')
op.drop_index(op.f('ix_portfolio_invitations_inviter_id'), table_name='portfolio_invitations')
op.drop_table('portfolio_invitations')
op.drop_table('environments')
op.drop_table('clins')
op.drop_index(op.f('ix_audit_events_user_id'), table_name='audit_events')
op.drop_index(op.f('ix_audit_events_resource_id'), table_name='audit_events')
op.drop_index(op.f('ix_audit_events_portfolio_id'), table_name='audit_events')
op.drop_index(op.f('ix_audit_events_application_id'), table_name='audit_events')
op.drop_table('audit_events')
op.drop_index(op.f('ix_application_roles_user_id'), table_name='application_roles')
op.drop_index(op.f('ix_application_roles_application_id'), table_name='application_roles')
op.drop_index('application_role_user_application', table_name='application_roles')
op.drop_table('application_roles')
op.drop_table('users_permission_sets')
op.drop_table('task_orders')
op.drop_index('portfolio_role_user_portfolio', table_name='portfolio_roles')
op.drop_index(op.f('ix_portfolio_roles_user_id'), table_name='portfolio_roles')
op.drop_index(op.f('ix_portfolio_roles_portfolio_id'), table_name='portfolio_roles')
op.drop_table('portfolio_roles')
op.drop_table('applications')
op.drop_table('users')
op.drop_table('portfolios')
op.drop_index(op.f('ix_permission_sets_permissions'), table_name='permission_sets')
op.drop_index(op.f('ix_permission_sets_name'), table_name='permission_sets')
op.drop_table('permission_sets')
op.drop_table('notification_recipients')
op.drop_index(op.f('ix_attachments_resource_id'), table_name='attachments')
op.drop_table('attachments')
connection = op.get_bind()
connection.execute("""
DROP TRIGGER IF EXISTS lock_dod_id ON users;
DROP FUNCTION IF EXISTS lock_dod_id();
""")
# ### end Alembic commands ###
| 63.621387 | 159 | 0.722346 | 2,932 | 22,013 | 5.186562 | 0.069236 | 0.078385 | 0.069968 | 0.093904 | 0.8865 | 0.836588 | 0.798974 | 0.729006 | 0.650095 | 0.615375 | 0 | 0.002729 | 0.10094 | 22,013 | 345 | 160 | 63.805797 | 0.765651 | 0.013674 | 0 | 0.447853 | 0 | 0 | 0.293518 | 0.094025 | 0 | 0 | 0 | 0 | 0 | 1 | 0.006135 | false | 0 | 0.009202 | 0 | 0.015337 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
df53a63a345599a957c047da27e57322682bb483 | 43 | py | Python | security_advisor_cre/__init__.py | sahil2303/ta_cloud_exchange_plugins | 931299ed317ea12968ce53edd7bf4318d23c1e3e | [
"BSD-3-Clause"
] | 1 | 2022-02-22T13:52:27.000Z | 2022-02-22T13:52:27.000Z | security_advisor_cre/__init__.py | sahil2303/ta_cloud_exchange_plugins | 931299ed317ea12968ce53edd7bf4318d23c1e3e | [
"BSD-3-Clause"
] | 1 | 2022-03-31T10:25:57.000Z | 2022-03-31T10:25:57.000Z | security_advisor_cre/__init__.py | sahil2303/ta_cloud_exchange_plugins | 931299ed317ea12968ce53edd7bf4318d23c1e3e | [
"BSD-3-Clause"
] | 4 | 2022-01-31T05:32:14.000Z | 2022-02-07T10:07:42.000Z | """Security Advisor CRE plugin package."""
| 21.5 | 42 | 0.72093 | 5 | 43 | 6.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116279 | 43 | 1 | 43 | 43 | 0.815789 | 0.837209 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
df7f371e63b65be266417d5957e5f4abd6a5fed5 | 169 | py | Python | huey/tests/registry.py | chocri/huey | 31756ea83e5a010ea44d04f8d3abfe444406738b | [
"MIT"
] | null | null | null | huey/tests/registry.py | chocri/huey | 31756ea83e5a010ea44d04f8d3abfe444406738b | [
"MIT"
] | null | null | null | huey/tests/registry.py | chocri/huey | 31756ea83e5a010ea44d04f8d3abfe444406738b | [
"MIT"
] | null | null | null | import datetime
import unittest
from huey.exceptions import QueueException
from huey.registry import registry
class HueyRegistryTestCase(unittest.TestCase):
pass
| 16.9 | 46 | 0.83432 | 19 | 169 | 7.421053 | 0.631579 | 0.113475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130178 | 169 | 9 | 47 | 18.777778 | 0.959184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.166667 | 0.666667 | 0 | 0.833333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
10de2bfa13de35f11436fb97c785ec0930db9e2d | 77 | py | Python | esolang/__init__.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 56 | 2019-03-21T21:03:26.000Z | 2022-03-14T08:26:55.000Z | esolang/__init__.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 38 | 2019-08-20T02:18:27.000Z | 2022-02-22T11:19:05.000Z | esolang/__init__.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 44 | 2019-07-04T06:17:54.000Z | 2022-03-25T19:18:31.000Z | from .esolang import Esolang
def setup(bot):
bot.add_cog(Esolang(bot))
| 12.833333 | 29 | 0.714286 | 12 | 77 | 4.5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168831 | 77 | 5 | 30 | 15.4 | 0.84375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
3382bb3f01503576be21dcc4262a8d591b957ff3 | 171 | py | Python | groupy/garray/__init__.py | veya2ztn/mltool | 4ed151152845ebe3de128e1f53c478581c1492e4 | [
"IJG"
] | null | null | null | groupy/garray/__init__.py | veya2ztn/mltool | 4ed151152845ebe3de128e1f53c478581c1492e4 | [
"IJG"
] | null | null | null | groupy/garray/__init__.py | veya2ztn/mltool | 4ed151152845ebe3de128e1f53c478581c1492e4 | [
"IJG"
] | null | null | null |
from .Z2_array import Z2Array
from .p4_array import P4Array
from .p4m_array import P4MArray
from .C4_array import C4Array, C4Group
from .D4_array import D4Array, D4Group
| 24.428571 | 38 | 0.824561 | 27 | 171 | 5.037037 | 0.555556 | 0.404412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081081 | 0.134503 | 171 | 6 | 39 | 28.5 | 0.837838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
33c64b31b8d60f87c087db3661cb5019e38ed363 | 9,722 | py | Python | tests/test_managers/test_on_level_manager.py | michaeldavie/pyinsteon | e5b2e2910f4eff1474f158051fa71f75c2077dd6 | [
"MIT"
] | null | null | null | tests/test_managers/test_on_level_manager.py | michaeldavie/pyinsteon | e5b2e2910f4eff1474f158051fa71f75c2077dd6 | [
"MIT"
] | null | null | null | tests/test_managers/test_on_level_manager.py | michaeldavie/pyinsteon | e5b2e2910f4eff1474f158051fa71f75c2077dd6 | [
"MIT"
] | null | null | null | """Test the on/off manager."""
from asyncio import sleep
import unittest
from pyinsteon.address import Address
from pyinsteon.managers.on_level_manager import OnLevelManager
from pyinsteon.topics import ON, ON_FAST, OFF, OFF_FAST
from pyinsteon.constants import MessageFlagType
from tests import set_log_levels
from tests.utils import TopicItem, send_topics, async_case, random_address, cmd_kwargs
class TestOnLevelManager(unittest.TestCase):
"""Test the on/off manager.
1. On message => on_level = 255 & call_count = 1
2. Off message => on_level = 0 & call_count = 1
3. On_fast message => on_level = 255 & call_count = 1
4. Off_fast message => on_level = 0 & call_count = 1
5. Two On messages within 2 sec => on_level = 255 & call_count = 1
6. Two Off messages within 2 sec => on_level = 0 & call_count = 1
7. Two On_fast messages within 2 sec => on_level = 255 & call_count = 1
8. Two Off_fast messages within 2 sec => on_level = 0 & call_count = 1
9. On All-Link Cleanup message => on_level = 255 & call_count = 1
10. Off All-Link Cleanup message => on_level = 0 & call_count = 1
11. On_fast All-Link Cleanup message => on_level = 255 & call_count = 1
12. Off_fast All-Link Cleanup message => on_level = 0 & call_count = 1
13. One on and one off message => on_level = 0 & call_count = 2
14. One on and one on cleanup => on_level = 255 and call_count = 1
15. One of and one off cleanup => on_level = 0 and call_count = 1
"""
def setUp(self):
"""Set up the test."""
self.address = random_address()
self.group = 6
self.target = Address(f"0000{self.group:02d}")
self.on_level_manager = OnLevelManager(self.address, self.group)
self.on_level_manager.subscribe(self.handle_on_off)
self.on_level = None
self.call_count = 0
set_log_levels(
logger="info",
logger_pyinsteon="info",
logger_messages="info",
logger_topics=True,
)
def handle_on_off(self, on_level):
"""Handle the on/off commands."""
self.on_level = on_level
self.call_count += 1
async def run_test(self, topics, on_level_expected, call_count_expected):
"""Run the test and validate outcomes."""
sleep_for = 0.2
for topic in topics:
sleep_for += topic.delay
send_topics(topics)
await sleep(sleep_for)
assert self.on_level == on_level_expected
assert self.call_count == call_count_expected
def create_topic(self, topic, msg_type, group, kwargs, delay):
"""Create a topic item."""
full_topic = f"{repr(self.address)}.{group}.{topic}.{str(msg_type).lower()}"
return TopicItem(topic=full_topic, kwargs=kwargs, delay=delay)
@async_case
async def test_on(self):
"""Test On message => on_level = 255 & call_count = 1."""
kwargs = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(ON, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs, 0.1)
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off(self):
"""Test Off message => on_level = 0 & call_count = 1."""
kwargs = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(OFF, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs, 0.1)
]
await self.run_test(topics, 0, 1)
@async_case
async def test_on_fast(self):
"""Test Off message => on_level = 0 & call_count = 1."""
kwargs = cmd_kwargs(0x12, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(
ON_FAST, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs, 0.1
)
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off_fast(self):
"""Test Off message => on_level = 0 & call_count = 1."""
kwargs = cmd_kwargs(0x14, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(
OFF_FAST, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs, 0.1
)
]
await self.run_test(topics, 0, 1)
@async_case
async def test_on_2_msg_reduce_hops(self):
"""Test two On messages within 2 sec => on_level = 255 & call_count = 1."""
kwargs0 = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=2)
topics = [
self.create_topic(ON, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1),
self.create_topic(ON, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs1, 0.3),
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off_2_msg_reduce_hops(self):
"""Test two Off messages within 2 sec => on_level = 0 & call_count = 1."""
kwargs0 = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=2)
topics = [
self.create_topic(OFF, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1),
self.create_topic(OFF, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs1, 0.3),
]
await self.run_test(topics, 0, 1)
@async_case
async def test_on_fast_2_msg_reduce_hops(self):
"""Test two On_fast messages within 2 sec => on_level = 255 & call_count = 1."""
kwargs0 = cmd_kwargs(0x12, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x12, 0x00, None, self.target, hops_left=2)
topics = [
self.create_topic(
ON_FAST, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1
),
self.create_topic(
ON_FAST, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs1, 0.3
),
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off_fast_2_msg_reduce_hops(self):
"""Test two Off_fast messages within 2 sec => on_level = 255 & call_count = 1."""
kwargs0 = cmd_kwargs(0x14, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x14, 0x00, None, self.target, hops_left=2)
topics = [
self.create_topic(
OFF_FAST, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1
),
self.create_topic(
OFF_FAST, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs1, 0.3
),
]
await self.run_test(topics, 0, 1)
@async_case
async def test_on_cleanup(self):
"""Test On All-Link Cleanup message => on_level = 255 & call_count = 1."""
kwargs = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(ON, MessageFlagType.ALL_LINK_CLEANUP, 6, kwargs, 0.1)
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off_cleanup(self):
"""Test Off All-Link Cleanup message => on_level = 0 & call_count = 1."""
kwargs = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(OFF, MessageFlagType.ALL_LINK_CLEANUP, 6, kwargs, 0.1)
]
await self.run_test(topics, 0, 1)
@async_case
async def test_on_fast_cleanup(self):
"""Test On_fast All-Link Cleanup message => on_level = 255 & call_count = 1."""
kwargs = cmd_kwargs(0x12, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(ON_FAST, MessageFlagType.ALL_LINK_CLEANUP, 6, kwargs, 0.1)
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off_fast_cleanup(self):
"""Test Off_fast All-Link Cleanup message => on_level = 0 & call_count = 1."""
kwargs = cmd_kwargs(0x14, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(
OFF_FAST, MessageFlagType.ALL_LINK_CLEANUP, 6, kwargs, 0.1
)
]
await self.run_test(topics, 0, 1)
@async_case
async def test_on_then_off(self):
"""Test one on and one off message => on_level = 0 & call_count = 2."""
kwargs0 = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(ON, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1),
self.create_topic(OFF, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs1, 0.3),
]
await self.run_test(topics, 0, 2)
@async_case
async def test_on_and_on_cleanup(self):
"""Test one on and one on cleanup => on_level = 255 and call_count = 1."""
kwargs0 = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x11, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(ON, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1),
self.create_topic(ON, MessageFlagType.ALL_LINK_CLEANUP, 6, kwargs1, 0.3),
]
await self.run_test(topics, 255, 1)
@async_case
async def test_off_and_off_cleanup(self):
"""Test one off and one off cleanup => on_level = 255 and call_count = 1."""
kwargs0 = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=3)
kwargs1 = cmd_kwargs(0x13, 0x00, None, self.target, hops_left=3)
topics = [
self.create_topic(OFF, MessageFlagType.ALL_LINK_BROADCAST, 6, kwargs0, 0.1),
self.create_topic(OFF, MessageFlagType.ALL_LINK_CLEANUP, 6, kwargs1, 0.3),
]
await self.run_test(topics, 0, 1)
| 42.269565 | 89 | 0.626106 | 1,373 | 9,722 | 4.202476 | 0.081573 | 0.048527 | 0.05026 | 0.068631 | 0.792374 | 0.779549 | 0.755633 | 0.74662 | 0.721144 | 0.716984 | 0 | 0.059731 | 0.266406 | 9,722 | 229 | 90 | 42.454148 | 0.749299 | 0.109854 | 0 | 0.452941 | 0 | 0 | 0.012329 | 0.008041 | 0 | 0 | 0.023586 | 0 | 0.011765 | 1 | 0.017647 | false | 0 | 0.047059 | 0 | 0.076471 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
33d0bf5e8789ff67e0050e6778f94f6349ea23a4 | 103 | py | Python | home/admin.py | McCarthyCode/Susan-Kill-Kegan-and-Associates | 4b3416aa9d94d409232ecb970d75d36cfd8928f9 | [
"MIT"
] | null | null | null | home/admin.py | McCarthyCode/Susan-Kill-Kegan-and-Associates | 4b3416aa9d94d409232ecb970d75d36cfd8928f9 | [
"MIT"
] | 1 | 2020-06-09T02:06:39.000Z | 2020-06-09T02:06:39.000Z | home/admin.py | McCarthyCode/Susan-Kill-Kegan-and-Associates | 4b3416aa9d94d409232ecb970d75d36cfd8928f9 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import CarouselImage
admin.site.register(CarouselImage)
| 20.6 | 34 | 0.84466 | 13 | 103 | 6.692308 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097087 | 103 | 4 | 35 | 25.75 | 0.935484 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
33e18c9e3abbd396118d2144d8a0e17714ff7991 | 200 | py | Python | forumdemo/activate/urls.py | lamdba0602/forumdemo | 82c6223d6b6d7fb3bac049e342d3048a5117a2b7 | [
"Apache-2.0"
] | null | null | null | forumdemo/activate/urls.py | lamdba0602/forumdemo | 82c6223d6b6d7fb3bac049e342d3048a5117a2b7 | [
"Apache-2.0"
] | null | null | null | forumdemo/activate/urls.py | lamdba0602/forumdemo | 82c6223d6b6d7fb3bac049e342d3048a5117a2b7 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from .views import activate_prepare
from .views import activate_deal
urlpatterns = [
url(r'^$', activate_prepare),
url(r'^(?P<code>\w+)$', activate_deal),
]
| 20 | 43 | 0.7 | 28 | 200 | 4.857143 | 0.535714 | 0.132353 | 0.220588 | 0.338235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 200 | 9 | 44 | 22.222222 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0.085 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
33ee12c3b745cacf5ddf2bbd3da21dab174bde94 | 157 | py | Python | search/admin.py | mental689/pyano-admin | 00c6ed53a55017598ebc3f577e15fba0f5ed2a7c | [
"MIT"
] | null | null | null | search/admin.py | mental689/pyano-admin | 00c6ed53a55017598ebc3f577e15fba0f5ed2a7c | [
"MIT"
] | null | null | null | search/admin.py | mental689/pyano-admin | 00c6ed53a55017598ebc3f577e15fba0f5ed2a7c | [
"MIT"
] | null | null | null | from django.contrib import admin
from search.models import *
# Register your models here.
admin.site.register(KeywordSearch)
admin.site.register(QBESearch) | 22.428571 | 34 | 0.815287 | 21 | 157 | 6.095238 | 0.619048 | 0.140625 | 0.265625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.101911 | 157 | 7 | 35 | 22.428571 | 0.907801 | 0.165605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
d5065c69a29f9db4ba00ec424ac279aa4bc63869 | 20,462 | py | Python | tests/test_stream.py | semuconsulting/pyrtcm | 1f0ed1dce8cff226f81e60ee10380f98f687d88c | [
"BSD-3-Clause"
] | 3 | 2022-03-21T07:40:42.000Z | 2022-03-28T03:23:33.000Z | tests/test_stream.py | semuconsulting/pyrtcm | 1f0ed1dce8cff226f81e60ee10380f98f687d88c | [
"BSD-3-Clause"
] | 1 | 2022-03-22T12:00:21.000Z | 2022-03-31T16:42:59.000Z | tests/test_stream.py | semuconsulting/pyrtcm | 1f0ed1dce8cff226f81e60ee10380f98f687d88c | [
"BSD-3-Clause"
] | 1 | 2022-03-19T17:21:41.000Z | 2022-03-19T17:21:41.000Z | """
Stream method tests using actual receiver binary outputs for pyrtcm.rtcmReader
Created on 3 Oct 2020
*** NB: must be saved in UTF-8 format ***
@author: semuadmin
"""
# pylint: disable=line-too-long, invalid-name, missing-docstring, no-member
import os
import unittest
from pyrtcm import RTCMReader, RTCMMessage
import pyrtcm.exceptions as rte
import pyrtcm.rtcmtypes_core as rtt
class StreamTest(unittest.TestCase):
def setUp(self):
self.maxDiff = None
dirname = os.path.dirname(__file__)
self._raw1005ex = b"\xD3\x00\x13\x3E\xD7\xD3\x02\x02\x98\x0E\xDE\xEF\x34\xB4\xBD\x62\xAC\x09\x41\x98\x6F\x33\x36\x0B\x98"
self._raw1005 = (
b"\xd3\x00\x13>\xd0\x00\x03\x8aX\xd9I<\x87/4\x10\x9d\x07\xd6\xafH Z\xd7\xf7"
)
self._raw1007 = b"\xd3\x00\x08>\xf4\xd2\x03ABC\xeapo\xc7"
# 00111110 11110100 11010010 00000011 01000001 01000010 01000011 11101010
self._raw1065 = (
b"\xd3\x00\x12B\x91\x81\xc9\x84\x00\x04B\xb8\x88\x008\x80\t\xd0F\x00(\xf0kf"
)
self._payload1007 = self._raw1007[3:-3]
def tearDown(self):
pass
def test1005example(
self,
): # test sample 1005 given in RTCM standard (with scaling applied)
EXPECTED_RESULT = "<RTCM(1005, DF002=1005, DF003=2003, DF021=0, DF022=1, DF023=0, DF024=0, DF141=0, DF025=1114104.5999, DF142=0, DF001_1=0, DF026=-4850729.7108, DF364=0, DF027=3975521.4643)>"
msg = RTCMReader.parse(self._raw1005ex)
self.assertEqual(str(msg), EXPECTED_RESULT)
self.assertEqual(msg.DF025, 1114104.5999)
self.assertEqual(msg.DF026, -4850729.7108)
self.assertEqual(msg.DF027, 3975521.4643)
def testMIXEDRTCM_NOSCALE(
self,
): # test mixed stream of NMEA, UBX & RTCM messages with no scaling applied
EXPECTED_RESULTS = (
"<RTCM(1005, DF002=1005, DF003=0, DF021=0, DF022=1, DF023=1, DF024=1, DF141=0, DF025=44440308028, DF142=1, DF001_1=0, DF026=30856712349, DF364=0, DF027=33666582560)>",
"<RTCM(4072, DF002=4072, Not_Yet_Implemented)>",
"<RTCM(1077, DF002=1077, DF003=0, GNSSEpoch=204137001, DF393=1, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=760738918298550272, NSat=10, DF395=1073807360, NSig=2, DF396=1044459, DF405_01=308405, DF405_02=84035, DF405_03=328885, DF405_04=150343, DF405_05=0, DF405_06=0, DF405_07=6691, DF405_08=-248690, DF405_09=-471948, DF405_10=-205719, DF405_11=-501406, DF405_12=-11330, DF405_13=-192673, DF405_14=269791, DF405_15=-53208, DF405_16=329796, DF405_17=164857, DF405_18=343883, DF405_19=76821, DF405_20=76146, DF406_01=3335715, DF406_02=2913984, DF406_03=-6996952, DF406_04=-3723880, DF406_05=7457979, DF406_06=1848654, DF406_07=7644135, DF406_08=-184532, DF406_09=7533336, DF406_10=-3937275, DF406_11=3750797, DF406_12=7647703, DF406_13=-7651254, DF406_14=6950987, DF406_15=3055820, DF406_16=-5308213, DF406_17=2100994, DF406_18=646922, DF406_19=-8388426, DF406_20=2052210, DF407_01=81, DF407_02=263, DF407_03=78, DF407_04=927, DF407_05=632, DF407_06=728, DF407_07=999, DF407_08=970, DF407_09=959, DF407_10=185, DF407_11=731, DF407_12=973, DF407_13=14, DF407_14=13, DF407_15=540, DF407_16=64, DF407_17=913, DF407_18=527, DF407_19=983, DF407_20=206, DF420_01=0, DF420_02=0, DF420_03=0, DF420_04=0, DF420_05=1, DF420_06=1, DF420_07=1, DF420_08=1, DF420_09=0, DF420_10=1, DF420_11=0, DF420_12=1, DF420_13=1, DF420_14=1, DF420_15=1, DF420_16=0, DF420_17=0, DF420_18=0, DF420_19=0, DF420_20=0, DF408_01=29, DF408_02=341, DF408_03=341, DF408_04=341, DF408_05=341, DF408_06=341, DF408_07=341, DF408_08=341, DF408_09=341, DF408_10=341, DF408_11=341, DF408_12=341, DF408_13=341, DF408_14=341, DF408_15=157, DF408_16=341, DF408_17=341, DF408_18=340, DF408_19=0, DF408_20=22, DF404_01=-15776, DF404_02=-10733, DF404_03=-15760, DF404_04=-13802, DF404_05=-15648, DF404_06=-9197, DF404_07=-15840, DF404_08=-9709, DF404_09=496, DF404_10=-9705, DF404_11=656, DF404_12=-9231, DF404_13=-9194, DF404_14=-8321, DF404_15=-8326, DF404_16=-4107, DF404_17=-4072, DF404_18=2451, DF404_19=-693, DF404_20=-684)>",
"<RTCM(1087, DF002=1087, DF003=0, GNSSEpoch=310554457, DF393=1, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=4039168114821169152, NSat=7, DF395=1090519040, NSig=2, DF396=16382, DF405_01=283652, DF405_02=-439230, DF405_03=287980, DF405_04=-162553, DF405_05=-351659, DF405_06=-48877, DF405_07=-97420, DF405_08=-7555, DF405_09=421895, DF405_10=272911, DF405_11=462834, DF405_12=-195360, DF405_13=81184, DF405_14=-330976, DF406_01=-1331299, DF406_02=-2033342, DF406_03=-5236897, DF406_04=184723, DF406_05=-2403522, DF406_06=-2540334, DF406_07=8048310, DF406_08=4343116, DF406_09=2466558, DF406_10=1102600, DF406_11=2876424, DF406_12=3647230, DF406_13=6976766, DF406_14=5381632, DF407_01=374, DF407_02=112, DF407_03=45, DF407_04=742, DF407_05=61, DF407_06=653, DF407_07=707, DF407_08=995, DF407_09=31, DF407_10=820, DF407_11=798, DF407_12=243, DF407_13=702, DF407_14=416, DF420_01=1, DF420_02=0, DF420_03=0, DF420_04=1, DF420_05=0, DF420_06=0, DF420_07=0, DF420_08=1, DF420_09=1, DF420_10=0, DF420_11=1, DF420_12=1, DF420_13=0, DF420_14=0, DF408_01=192, DF408_02=604, DF408_03=130, DF408_04=992, DF408_05=960, DF408_06=661, DF408_07=341, DF408_08=341, DF408_09=277, DF408_10=277, DF408_11=341, DF408_12=341, DF408_13=277, DF408_14=341, DF404_01=10922, DF404_02=-10923, DF404_03=10920, DF404_04=5, DF404_05=-3936, DF404_06=6021, DF404_07=8380, DF404_08=4996, DF404_09=-16252, DF404_10=6149, DF404_11=12480, DF404_12=5125, DF404_13=4287, DF404_14=-64)>",
"<RTCM(1097, DF002=1097, DF003=0, GNSSEpoch=204137001, DF393=1, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=216181732825628672, NSat=5, DF395=1073872896, NSig=2, DF396=1023, DF405_01=324933, DF405_02=-438701, DF405_03=0, DF405_04=164097, DF405_05=372092, DF405_06=273395, DF405_07=-329744, DF405_08=108288, DF405_09=-384, DF405_10=-24373, DF406_01=-242675, DF406_02=2781653, DF406_03=2724848, DF406_04=-5553741, DF406_05=3072198, DF406_06=-1082673, DF406_07=-2534145, DF406_08=-6684696, DF406_09=-5074959, DF406_10=2252615, DF407_01=167, DF407_02=501, DF407_03=312, DF407_04=736, DF407_05=1010, DF407_06=930, DF407_07=65, DF407_08=662, DF407_09=318, DF407_10=893, DF420_01=1, DF420_02=1, DF420_03=1, DF420_04=1, DF420_05=1, DF420_06=0, DF420_07=1, DF420_08=0, DF420_09=1, DF420_10=1, DF408_01=957, DF408_02=771, DF408_03=255, DF408_04=418, DF408_05=783, DF408_06=1017, DF408_07=97, DF408_08=341, DF408_09=341, DF408_10=341, DF404_01=10922, DF404_02=-10923, DF404_03=10922, DF404_04=-10923, DF404_05=10912, DF404_06=736, DF404_07=-7660, DF404_08=-15696, DF404_09=-10731, DF404_10=-15664)>",
"<RTCM(1127, DF002=1127, DF003=0, GNSSEpoch=204123001, DF393=0, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=198178247981137920, NSat=10, DF395=1074003968, NSig=2, DF396=387754, DF405_01=-518073, DF405_02=-111791, DF405_03=345316, DF405_04=-359850, DF405_05=0, DF405_06=0, DF405_07=123373, DF405_08=325351, DF405_09=430664, DF405_10=-461494, DF405_11=-441678, DF405_12=-8257, DF405_13=-233493, DF405_14=-261617, DF405_15=-407525, DF405_16=325591, DF405_17=-16387, DF405_18=163919, DF405_19=-208596, DF405_20=122033, DF406_01=3467427, DF406_02=4103914, DF406_03=2215836, DF406_04=4665386, DF406_05=3288696, DF406_06=-2149697, DF406_07=554457, DF406_08=8314676, DF406_09=7843958, DF406_10=-4235053, DF406_11=6574287, DF406_12=-2691160, DF406_13=7950310, DF406_14=-7069503, DF406_15=-2731893, DF406_16=2547580, DF406_17=5418945, DF406_18=-3747995, DF406_19=6002005, DF406_20=5592405, DF407_01=341, DF407_02=341, DF407_03=341, DF407_04=341, DF407_05=341, DF407_06=341, DF407_07=341, DF407_08=320, DF407_09=22, DF407_10=532, DF407_11=533, DF407_12=22, DF407_13=536, DF407_14=23, DF407_15=21, DF407_16=23, DF407_17=536, DF407_18=22, DF407_19=21, DF407_20=538, DF420_01=0, DF420_02=1, DF420_03=1, DF420_04=1, DF420_05=0, DF420_06=1, DF420_07=0, DF420_08=1, DF420_09=1, DF420_10=0, DF420_11=1, DF420_12=1, DF420_13=0, DF420_14=1, DF420_15=0, DF420_16=0, DF420_17=0, DF420_18=0, DF420_19=0, DF420_20=0, DF408_01=798, DF408_02=664, DF408_03=982, DF408_04=389, DF408_05=872, DF408_06=795, DF408_07=513, DF408_08=708, DF408_09=889, DF408_10=410, DF408_11=169, DF408_12=813, DF408_13=613, DF408_14=1002, DF408_15=0, DF408_16=0, DF408_17=0, DF408_18=0, DF408_19=0, DF408_20=0, DF404_01=0, DF404_02=0, DF404_03=0, DF404_04=0, DF404_05=0, DF404_06=0, DF404_07=0, DF404_08=0, DF404_09=0, DF404_10=0, DF404_11=0, DF404_12=0, DF404_13=0, DF404_14=0, DF404_15=0, DF404_16=0, DF404_17=0, DF404_18=0, DF404_19=0, DF404_20=0)>",
"<RTCM(1230, DF002=1230, DF003=0, DF421=1, DF001_3=0, DF422=0, )>", # TODO CHECK this may not be right
"<RTCM(1007, DF002=1007, DF003=1234, DF029=3, DF030_01=A, DF030_02=B, DF030_03=C, DF031=234)>",
)
dirname = os.path.dirname(__file__)
stream = open(os.path.join(dirname, "pygpsdata-RTCM3.log"), "rb")
i = 0
raw = 0
rtr = RTCMReader(stream, scaling=False)
for (raw, parsed) in rtr.iterate():
if raw is not None:
# print(parsed)
self.assertEqual(str(parsed), EXPECTED_RESULTS[i])
i += 1
stream.close()
def testMIXEDRTCM_SCALE(
self,
): # test mixed stream of NMEA, UBX & RTCM messages with scaling applied
EXPECTED_RESULTS = (
"<RTCM(1005, DF002=1005, DF003=0, DF021=0, DF022=1, DF023=1, DF024=1, DF141=0, DF025=4444030.8028, DF142=1, DF001_1=0, DF026=3085671.2349, DF364=0, DF027=3366658.256)>",
"<RTCM(4072, DF002=4072, Not_Yet_Implemented)>",
"<RTCM(1077, DF002=1077, DF003=0, GNSSEpoch=204137001, DF393=1, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=760738918298550272, NSat=10, DF395=1073807360, NSig=2, DF396=1044459, DF405_01=0.00057445, DF405_02=0.00015653, DF405_03=0.0006126, DF405_04=0.00028004, DF405_05=0.0, DF405_06=0.0, DF405_07=1.246e-05, DF405_08=-0.00046322, DF405_09=-0.00087907, DF405_10=-0.00038318, DF405_11=-0.00093394, DF405_12=-2.11e-05, DF405_13=-0.00035888, DF405_14=0.00050252, DF405_15=-9.911e-05, DF405_16=0.00061429, DF405_17=0.00030707, DF405_18=0.00064053, DF405_19=0.00014309, DF405_20=0.00014183, DF406_01=0.00155331, DF406_02=0.00135693, DF406_03=-0.00325821, DF406_04=-0.00173407, DF406_05=0.00347289, DF406_06=0.00086085, DF406_07=0.00355958, DF406_08=-8.593e-05, DF406_09=0.00350798, DF406_10=-0.00183344, DF406_11=0.0017466, DF406_12=0.00356124, DF406_13=-0.00356289, DF406_14=0.00323681, DF406_15=0.00142298, DF406_16=-0.00247183, DF406_17=0.00097835, DF406_18=0.00030125, DF406_19=-0.00390617, DF406_20=0.00095563, DF407_01=81, DF407_02=263, DF407_03=78, DF407_04=927, DF407_05=632, DF407_06=728, DF407_07=999, DF407_08=970, DF407_09=959, DF407_10=185, DF407_11=731, DF407_12=973, DF407_13=14, DF407_14=13, DF407_15=540, DF407_16=64, DF407_17=913, DF407_18=527, DF407_19=983, DF407_20=206, DF420_01=0, DF420_02=0, DF420_03=0, DF420_04=0, DF420_05=1, DF420_06=1, DF420_07=1, DF420_08=1, DF420_09=0, DF420_10=1, DF420_11=0, DF420_12=1, DF420_13=1, DF420_14=1, DF420_15=1, DF420_16=0, DF420_17=0, DF420_18=0, DF420_19=0, DF420_20=0, DF408_01=464, DF408_02=5456, DF408_03=5456, DF408_04=5456, DF408_05=5456, DF408_06=5456, DF408_07=5456, DF408_08=5456, DF408_09=5456, DF408_10=5456, DF408_11=5456, DF408_12=5456, DF408_13=5456, DF408_14=5456, DF408_15=2512, DF408_16=5456, DF408_17=5456, DF408_18=5440, DF408_19=0, DF408_20=352, DF404_01=-1.5776, DF404_02=-1.0733, DF404_03=-1.576, DF404_04=-1.3802, DF404_05=-1.5648, DF404_06=-0.9197, DF404_07=-1.584, DF404_08=-0.9709, DF404_09=0.0496, DF404_10=-0.9705, DF404_11=0.0656, DF404_12=-0.9231, DF404_13=-0.9194, DF404_14=-0.8321, DF404_15=-0.8326, DF404_16=-0.4107, DF404_17=-0.4072, DF404_18=0.2451, DF404_19=-0.0693, DF404_20=-0.0684)>",
"<RTCM(1087, DF002=1087, DF003=0, GNSSEpoch=310554457, DF393=1, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=4039168114821169152, NSat=7, DF395=1090519040, NSig=2, DF396=16382, DF405_01=0.00052834, DF405_02=-0.00081813, DF405_03=0.0005364, DF405_04=-0.00030278, DF405_05=-0.00065502, DF405_06=-9.104e-05, DF405_07=-0.00018146, DF405_08=-1.407e-05, DF405_09=0.00078584, DF405_10=0.00050834, DF405_11=0.0008621, DF405_12=-0.00036389, DF405_13=0.00015122, DF405_14=-0.00061649, DF406_01=-0.00061993, DF406_02=-0.00094685, DF406_03=-0.00243862, DF406_04=8.602e-05, DF406_05=-0.00111923, DF406_06=-0.00118294, DF406_07=0.00374779, DF406_08=0.00202242, DF406_09=0.00114858, DF406_10=0.00051344, DF406_11=0.00133944, DF406_12=0.00169837, DF406_13=0.00324881, DF406_14=0.00250602, DF407_01=374, DF407_02=112, DF407_03=45, DF407_04=742, DF407_05=61, DF407_06=653, DF407_07=707, DF407_08=995, DF407_09=31, DF407_10=820, DF407_11=798, DF407_12=243, DF407_13=702, DF407_14=416, DF420_01=1, DF420_02=0, DF420_03=0, DF420_04=1, DF420_05=0, DF420_06=0, DF420_07=0, DF420_08=1, DF420_09=1, DF420_10=0, DF420_11=1, DF420_12=1, DF420_13=0, DF420_14=0, DF408_01=3072, DF408_02=9664, DF408_03=2080, DF408_04=15872, DF408_05=15360, DF408_06=10576, DF408_07=5456, DF408_08=5456, DF408_09=4432, DF408_10=4432, DF408_11=5456, DF408_12=5456, DF408_13=4432, DF408_14=5456, DF404_01=1.0922, DF404_02=-1.0923, DF404_03=1.092, DF404_04=0.0005, DF404_05=-0.3936, DF404_06=0.6021, DF404_07=0.838, DF404_08=0.4996, DF404_09=-1.6252, DF404_10=0.6149, DF404_11=1.248, DF404_12=0.5125, DF404_13=0.4287, DF404_14=-0.0064)>",
"<RTCM(1097, DF002=1097, DF003=0, GNSSEpoch=204137001, DF393=1, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=216181732825628672, NSat=5, DF395=1073872896, NSig=2, DF396=1023, DF405_01=0.00060523, DF405_02=-0.00081714, DF405_03=0.0, DF405_04=0.00030565, DF405_05=0.00069308, DF405_06=0.00050924, DF405_07=-0.0006142, DF405_08=0.0002017, DF405_09=-7.2e-07, DF405_10=-4.54e-05, DF406_01=-0.000113, DF406_02=0.00129531, DF406_03=0.00126886, DF406_04=-0.00258616, DF406_05=0.0014306, DF406_06=-0.00050416, DF406_07=-0.00118005, DF406_08=-0.0031128, DF406_09=-0.00236321, DF406_10=0.00104896, DF407_01=167, DF407_02=501, DF407_03=312, DF407_04=736, DF407_05=1010, DF407_06=930, DF407_07=65, DF407_08=662, DF407_09=318, DF407_10=893, DF420_01=1, DF420_02=1, DF420_03=1, DF420_04=1, DF420_05=1, DF420_06=0, DF420_07=1, DF420_08=0, DF420_09=1, DF420_10=1, DF408_01=15312, DF408_02=12336, DF408_03=4080, DF408_04=6688, DF408_05=12528, DF408_06=16272, DF408_07=1552, DF408_08=5456, DF408_09=5456, DF408_10=5456, DF404_01=1.0922, DF404_02=-1.0923, DF404_03=1.0922, DF404_04=-1.0923, DF404_05=1.0912, DF404_06=0.0736, DF404_07=-0.766, DF404_08=-1.5696, DF404_09=-1.0731, DF404_10=-1.5664)>",
"<RTCM(1127, DF002=1127, DF003=0, GNSSEpoch=204123001, DF393=0, DF409=0, DF001_7=0, DF411=0, DF412=0, DF417=0, DF418=0, DF394=198178247981137920, NSat=10, DF395=1074003968, NSig=2, DF396=387754, DF405_01=-0.00096499, DF405_02=-0.00020823, DF405_03=0.0006432, DF405_04=-0.00067027, DF405_05=0.0, DF405_06=0.0, DF405_07=0.0002298, DF405_08=0.00060601, DF405_09=0.00080217, DF405_10=-0.0008596, DF405_11=-0.00082269, DF405_12=-1.538e-05, DF405_13=-0.00043491, DF405_14=-0.0004873, DF405_15=-0.00075907, DF405_16=0.00060646, DF405_17=-3.052e-05, DF405_18=0.00030532, DF405_19=-0.00038854, DF405_20=0.0002273, DF406_01=0.00161465, DF406_02=0.00191103, DF406_03=0.00103183, DF406_04=0.00217249, DF406_05=0.00153142, DF406_06=-0.00100103, DF406_07=0.00025819, DF406_08=0.00387182, DF406_09=0.00365263, DF406_10=-0.0019721, DF406_11=0.00306139, DF406_12=-0.00125317, DF406_13=0.00370215, DF406_14=-0.00329199, DF406_15=-0.00127214, DF406_16=0.00118631, DF406_17=0.00252339, DF406_18=-0.0017453, DF406_19=0.0027949, DF406_20=0.00260417, DF407_01=341, DF407_02=341, DF407_03=341, DF407_04=341, DF407_05=341, DF407_06=341, DF407_07=341, DF407_08=320, DF407_09=22, DF407_10=532, DF407_11=533, DF407_12=22, DF407_13=536, DF407_14=23, DF407_15=21, DF407_16=23, DF407_17=536, DF407_18=22, DF407_19=21, DF407_20=538, DF420_01=0, DF420_02=1, DF420_03=1, DF420_04=1, DF420_05=0, DF420_06=1, DF420_07=0, DF420_08=1, DF420_09=1, DF420_10=0, DF420_11=1, DF420_12=1, DF420_13=0, DF420_14=1, DF420_15=0, DF420_16=0, DF420_17=0, DF420_18=0, DF420_19=0, DF420_20=0, DF408_01=12768, DF408_02=10624, DF408_03=15712, DF408_04=6224, DF408_05=13952, DF408_06=12720, DF408_07=8208, DF408_08=11328, DF408_09=14224, DF408_10=6560, DF408_11=2704, DF408_12=13008, DF408_13=9808, DF408_14=16032, DF408_15=0, DF408_16=0, DF408_17=0, DF408_18=0, DF408_19=0, DF408_20=0, DF404_01=0.0, DF404_02=0.0, DF404_03=0.0, DF404_04=0.0, DF404_05=0.0, DF404_06=0.0, DF404_07=0.0, DF404_08=0.0, DF404_09=0.0, DF404_10=0.0, DF404_11=0.0, DF404_12=0.0, DF404_13=0.0, DF404_14=0.0, DF404_15=0.0, DF404_16=0.0, DF404_17=0.0, DF404_18=0.0, DF404_19=0.0, DF404_20=0.0)>",
"<RTCM(1230, DF002=1230, DF003=0, DF421=1, DF001_3=0, DF422=0, )>",
"<RTCM(1007, DF002=1007, DF003=1234, DF029=3, DF030_01=A, DF030_02=B, DF030_03=C, DF031=234)>",
)
dirname = os.path.dirname(__file__)
stream = open(os.path.join(dirname, "pygpsdata-RTCM3.log"), "rb")
i = 0
raw = 0
rtr = RTCMReader(stream, scaling=True)
for (raw, parsed) in rtr.iterate():
if raw is not None:
# print(parsed)
self.assertEqual(str(parsed), EXPECTED_RESULTS[i])
i += 1
stream.close()
def testSerialize(self): # test serialize()
payload = self._raw1005[3:-3]
msg1 = RTCMReader.parse(self._raw1005)
msg2 = RTCMMessage(payload=payload)
res = msg1.serialize()
self.assertEqual(res, self._raw1005)
res1 = msg2.serialize()
self.assertEqual(res, self._raw1005)
def testsetattr(self): # test immutability
EXPECTED_ERROR = (
"Object is immutable. Updates to DF002 not permitted after initialisation."
)
with self.assertRaisesRegex(rte.RTCMMessageError, EXPECTED_ERROR):
msg = RTCMReader.parse(self._raw1005)
msg.DF002 = 9999
def testrepr(self): # test repr, check eval recreates original object
EXPECTED_RESULT = "RTCMMessage(payload=b'>\\xd0\\x00\\x03\\x8aX\\xd9I<\\x87/4\\x10\\x9d\\x07\\xd6\\xafH ')"
msg1 = RTCMReader.parse(self._raw1005)
self.assertEqual(repr(msg1), EXPECTED_RESULT)
msg2 = eval(repr(msg1))
self.assertEqual(str(msg1), str(msg2))
def testpayload(self): # test payload getter
msg = RTCMReader.parse(self._raw1005)
payload = self._raw1005[3:-3]
self.assertEqual(msg.payload, payload)
def testgroups(self): # test message with repeating group (1007)
EXPECTED_RESULT = "<RTCM(1007, DF002=1007, DF003=1234, DF029=3, DF030_01=A, DF030_02=B, DF030_03=C, DF031=234)>"
msg1 = RTCMMessage(payload=self._payload1007)
msg2 = RTCMReader.parse(self._raw1007)
self.assertEqual(str(msg1), EXPECTED_RESULT)
self.assertEqual(str(msg2), EXPECTED_RESULT)
def testnestedgroups(self): # test message with nested repeating group (1059, 1065)
EXPECTED_RESULT = "<RTCM(1065, DF002=1065, DF386=12345, DF391=3, DF388=0, DF413=1, DF414=1, DF415=1, DF387=2, DF384_01=23, DF379_01=2, DF381_01_01=4, DF383_01_01=0.07, DF381_01_02=2, DF383_01_02=0.09, DF384_02=26, DF379_02=1, DF381_02_01=3, DF383_02_01=0.05)>"
msg = RTCMReader.parse(self._raw1065, scaling=True)
self.assertEqual(str(msg), EXPECTED_RESULT)
def testbadCRC(
self,
): # test mixed stream of NMEA, UBX & RTCM messages with invalid RTCM CRC
EXPECTED_ERROR = "RTCM3 message invalid - failed CRC: (.*)"
dirname = os.path.dirname(__file__)
stream = open(os.path.join(dirname, "pygpsdata-MIXED-RTCM3BADCRC.log"), "rb")
i = 0
raw = 0
rtr = RTCMReader(stream, protfilter=7)
with self.assertRaisesRegex(rte.RTCMParseError, EXPECTED_ERROR):
for (raw, parsed) in rtr.iterate(quitonerror=rtt.ERR_RAISE):
if raw is not None:
print(parsed)
i += 1
stream.close()
if __name__ == "__main__":
# import sys;sys.argv = ['', 'Test.testName']
unittest.main()
| 128.691824 | 2,209 | 0.716988 | 3,651 | 20,462 | 3.779239 | 0.208984 | 0.02696 | 0.009639 | 0.006958 | 0.427598 | 0.409407 | 0.394477 | 0.392666 | 0.375634 | 0.359907 | 0 | 0.496446 | 0.133711 | 20,462 | 158 | 2,210 | 129.506329 | 0.281959 | 0.043349 | 0 | 0.401575 | 0 | 0.165354 | 0.793235 | 0.073786 | 0 | 0 | 0 | 0.006329 | 0.125984 | 1 | 0.094488 | false | 0.007874 | 0.03937 | 0 | 0.141732 | 0.007874 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
1d33f69bdaeccd52e9aba4d32b0a608f4aa4fb63 | 164 | py | Python | src/config/schema.py | mp5maker/djangoninja | ba87bbf0b62a6842087e6cc4de087456bde3a06b | [
"MIT"
] | null | null | null | src/config/schema.py | mp5maker/djangoninja | ba87bbf0b62a6842087e6cc4de087456bde3a06b | [
"MIT"
] | 5 | 2020-06-05T19:24:11.000Z | 2022-03-11T23:33:29.000Z | src/config/schema.py | mp5maker/djangoninja | ba87bbf0b62a6842087e6cc4de087456bde3a06b | [
"MIT"
] | null | null | null | from graphene import ObjectType, Schema
from api.schema import ArticleListQuery
class Query(ArticleListQuery, ObjectType):
pass
schema = Schema(query=Query)
| 18.222222 | 42 | 0.79878 | 19 | 164 | 6.894737 | 0.526316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140244 | 164 | 8 | 43 | 20.5 | 0.929078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.2 | 0.4 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 5 |
1d4051c8b24cbc816a30ee3d2bc8f5d983774cb0 | 47 | py | Python | pytimelapse/test/__init__.py | lietu/pytimelapse | cd37d900334fe720d5d584bb4a7f291310fc7acf | [
"BSD-3-Clause"
] | 1 | 2016-11-03T05:17:54.000Z | 2016-11-03T05:17:54.000Z | pytimelapse/test/__init__.py | lietu/pytimelapse | cd37d900334fe720d5d584bb4a7f291310fc7acf | [
"BSD-3-Clause"
] | null | null | null | pytimelapse/test/__init__.py | lietu/pytimelapse | cd37d900334fe720d5d584bb4a7f291310fc7acf | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
#
# Copyright 2013 Janne Enberg
| 11.75 | 29 | 0.723404 | 7 | 47 | 4.857143 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 0.170213 | 47 | 3 | 30 | 15.666667 | 0.74359 | 0.851064 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
1d46e679d0b21f99360e532c9fb1925d89bd2bed | 140 | py | Python | crypto_trading/connection/__init__.py | Sebastiencreoff/crypto_trading | 53c8d79208f4338eeea6f320510b8a48d98c9b45 | [
"MIT"
] | 4 | 2018-12-19T12:59:55.000Z | 2019-04-05T23:13:40.000Z | crypto_trading/connection/__init__.py | Sebastiencreoff/crypto_trading | 53c8d79208f4338eeea6f320510b8a48d98c9b45 | [
"MIT"
] | null | null | null | crypto_trading/connection/__init__.py | Sebastiencreoff/crypto_trading | 53c8d79208f4338eeea6f320510b8a48d98c9b45 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from .coinBase import CoinBaseConnect
from .simulation import SimulationConnect, EndOfProcess
| 23.333333 | 55 | 0.764286 | 16 | 140 | 6.6875 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008065 | 0.114286 | 140 | 5 | 56 | 28 | 0.854839 | 0.292857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
1d480f0ab1ed78cadab6863e1baf2e4119a58cfb | 114 | py | Python | gluoncv/torch/model_zoo/__init__.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 20 | 2021-07-13T13:08:57.000Z | 2022-03-29T09:38:00.000Z | gluoncv/torch/model_zoo/__init__.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 1 | 2021-02-24T04:21:39.000Z | 2021-02-24T04:21:39.000Z | gluoncv/torch/model_zoo/__init__.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 2 | 2021-07-12T08:42:53.000Z | 2022-03-04T18:41:25.000Z | """GluonCV-Torch model zoo"""
from .model_zoo import get_model, get_model_list
from .action_recognition import *
| 22.8 | 48 | 0.789474 | 17 | 114 | 5 | 0.588235 | 0.188235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114035 | 114 | 4 | 49 | 28.5 | 0.841584 | 0.201754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d51ccc10ac94632bb12c5f21da5a50651d1f7ae3 | 64 | py | Python | test/tab_indentation.py | ysv/pyit | 681535dd162613ee4ab8bb55216f0770e596f82e | [
"MIT"
] | null | null | null | test/tab_indentation.py | ysv/pyit | 681535dd162613ee4ab8bb55216f0770e596f82e | [
"MIT"
] | null | null | null | test/tab_indentation.py | ysv/pyit | 681535dd162613ee4ab8bb55216f0770e596f82e | [
"MIT"
] | null | null | null | """test tab indent"""
def tab_func():
"""yo"""
print("yo")
| 8 | 21 | 0.515625 | 9 | 64 | 3.555556 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1875 | 64 | 7 | 22 | 9.142857 | 0.615385 | 0.28125 | 0 | 0 | 0 | 0 | 0.058824 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0 | 0.5 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
d51da3e8311ec476843bc4d57872cd3c1fbdfdf0 | 91 | py | Python | archive/kontrol_v1/sensact/__init__.py | terrencetec/kontrol | ba6461784e38d01399efeb7a42911259f9254db0 | [
"MIT"
] | 3 | 2020-08-31T10:34:43.000Z | 2021-08-10T20:48:59.000Z | archive/kontrol_v1/sensact/__init__.py | terrencetec/kontrol | ba6461784e38d01399efeb7a42911259f9254db0 | [
"MIT"
] | 33 | 2020-06-16T18:38:25.000Z | 2022-03-24T00:48:55.000Z | archive/kontrol_v1/sensact/__init__.py | terrencetec/kontrol | ba6461784e38d01399efeb7a42911259f9254db0 | [
"MIT"
] | null | null | null | # A Kontrol subpackage for sensors and actuators related.
from .diagonalization import *
| 30.333333 | 58 | 0.791209 | 11 | 91 | 6.545455 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164835 | 91 | 2 | 59 | 45.5 | 0.947368 | 0.604396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d55c2da336aea798bf4dc26ea4d248a158002890 | 104 | py | Python | pyaz/vm/monitor/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/vm/monitor/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/vm/monitor/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | '''
Manage monitor aspect for a vm.
'''
from ... pyaz_utils import _call_az
from . import log, metrics
| 14.857143 | 35 | 0.701923 | 16 | 104 | 4.375 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.182692 | 104 | 6 | 36 | 17.333333 | 0.823529 | 0.298077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
d578ebad3395c3e961428321168fd3c79f20e52e | 391 | py | Python | src/views/__init__.py | YYZA/yyzas | 70fc2b258838d54e1822a971dab327b3384f0058 | [
"MIT"
] | 2 | 2021-11-29T02:57:13.000Z | 2022-01-08T03:10:53.000Z | src/views/__init__.py | YYZA/yyzas | 70fc2b258838d54e1822a971dab327b3384f0058 | [
"MIT"
] | null | null | null | src/views/__init__.py | YYZA/yyzas | 70fc2b258838d54e1822a971dab327b3384f0058 | [
"MIT"
] | 1 | 2021-11-05T10:39:40.000Z | 2021-11-05T10:39:40.000Z | import src
def register_blueprints_on_app():
from .index_pages import index_pages
src.app.register_blueprint(index_pages)
from .login_pages import login_pages
src.app.register_blueprint(login_pages)
from .join_pages import join_pages
src.app.register_blueprint(join_pages)
from .upload_modal import my_page_pages
src.app.register_blueprint(my_page_pages) | 26.066667 | 45 | 0.787724 | 57 | 391 | 5.035088 | 0.298246 | 0.111498 | 0.15331 | 0.264808 | 0.390244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153453 | 391 | 15 | 45 | 26.066667 | 0.867069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | true | 0 | 0.5 | 0 | 0.6 | 0.5 | 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 | 1 | 0 | 5 |
d597888b213b6fdae1a320331116cd09fabf6485 | 13,782 | py | Python | eval/evaluate.py | JuliaChae/M3D-RPN-Waymo | e73cba585563a094f67a2ba184a22330c134857c | [
"MIT"
] | 3 | 2021-03-30T17:36:29.000Z | 2021-12-07T03:02:43.000Z | eval/evaluate.py | JuliaChae/M3D-RPN-Waymo | e73cba585563a094f67a2ba184a22330c134857c | [
"MIT"
] | 2 | 2021-02-11T15:29:46.000Z | 2021-07-19T15:03:15.000Z | eval/evaluate.py | JuliaChae/M3D-RPN-Waymo | e73cba585563a094f67a2ba184a22330c134857c | [
"MIT"
] | null | null | null | import time
import fire
import kitti_common as kitti
from eval import get_official_eval_result, get_coco_eval_result
import pdb
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pickle
import os
def _read_imageset_file(path):
with open(path, 'r') as f:
lines = f.readlines()
return [int(line) for line in lines]
def evaluate(label_path,
result_path,
save_path,
current_class=['Car', 'Pedestrian', 'Cyclist'],
coco=False,
score_thresh=-1):
class_to_name = {0: 'Car',
1: 'Pedestrian',
2: 'Cyclist',
3: 'DontCare'}
gt_annos = kitti.get_label_annos(label_path)
dt_annos = kitti.get_label_annos(result_path)
# visualize(gt_annos, dt_annos)
print(len(dt_annos))
if score_thresh > 0:
dt_annos = kitti.filter_annos_low_score(dt_annos, score_thresh)
if coco:
print(get_coco_eval_result(dt_annos, dt_annos, current_class))
else:
result_str, _ = get_official_eval_result(gt_annos, dt_annos, current_class, class_to_name)
print(result_str)
with open(save_path, 'w+') as f:
f.write("\n")
f.write(result_str)
def analyze(front_path, frontleft_path, left_path, save_path):
gt_front = kitti.get_label_annos(front_path)
gt_frontleft = kitti.get_label_annos(frontleft_path)
gt_left = kitti.get_label_annos(left_path)
gt_dataset = [gt_front, gt_frontleft, gt_left]
annos_name = ["Front", "FrontLeft", "Left"]
split = "left_pred_"
for i in range(0, 3):
count = {'Car': 0, 'Pedestrian': 0, 'Cyclist': 0, 'DontCare': 0}
ranges = {'Car': [], 'Pedestrian': [], 'Cyclist': [], 'DontCare': []}
rot_y = {'Car': [], 'Pedestrian': [], 'Cyclist': [], 'DontCare': []}
for frame in gt_dataset[i]:
for j in range(0, len(frame['name'])):
cls = frame['name'][j]
distance = frame['location'][j][2]
ranges[cls].append(distance)
ry = frame['rotation_y'][j] * (180 / np.pi)
rot_y[cls].append(ry)
count[cls] += 1
print("Count of classes:" + str(count) + '\n')
with open(save_path + split + "classes.txt", 'a+') as f:
f.write(annos_name[i] + ' ' + str(count) + '\n')
sns_plot = sns.distplot(ranges["Car"], color="skyblue", label="Car").set_title(
annos_name[i] + " Car Distances")
fig = sns_plot.get_figure()
fig.savefig("output/eval/dataset_vis/" + split + annos_name[i] + "_car.png")
plt.clf()
sns_plot_ped = sns.distplot(ranges["Pedestrian"], color="red", label="Pedestrian").set_title(
annos_name[i] + " Pedestrian Distances")
fig_ped = sns_plot_ped.get_figure()
fig_ped.savefig("output/eval/dataset_vis/" + split + annos_name[i] + "_ped.png")
plt.clf()
sns_plot_cyc = sns.distplot(ranges["Cyclist"], color="teal", label="Cyclist").set_title(
annos_name[i] + " Cyclist Distances")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/" + split + annos_name[i] + "_cyc.png")
plt.clf()
sns_plot = sns.distplot(rot_y["Car"], color="skyblue", label="Car").set_title(annos_name[i] + " Car Rotation")
fig = sns_plot.get_figure()
fig.savefig("output/eval/dataset_vis/" + split + "ry_" + annos_name[i] + "_car.png")
plt.clf()
sns_plot_ped = sns.distplot(rot_y["Pedestrian"], color="red", label="Pedestrian").set_title(
annos_name[i] + " Pedestrian Rotation")
fig_ped = sns_plot_ped.get_figure()
fig_ped.savefig("output/eval/dataset_vis/" + split + "ry_" + annos_name[i] + "_ped.png")
plt.clf()
sns_plot_cyc = sns.distplot(rot_y["Cyclist"], color="teal", label="Cyclist").set_title(
annos_name[i] + " Cyclist Rotation")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/" + split + "ry_" + annos_name[i] + "_cyc.png")
plt.clf()
#print("Count of ranges:" + str(ranges)+'\n')
#print("Count of ry:" + str(rot_y)+'\n')
def training_analyze(front_path, frontleft_path, left_path):
gt_front = kitti.get_label_annos(front_path)
gt_frontleft = kitti.get_label_annos(frontleft_path)
gt_left = kitti.get_label_annos(left_path)
gt_dataset = [gt_front, gt_frontleft, gt_left]
x = ['Car', 'Pedestrian', 'Cyclist', 'DontCare']
annos_name = ["Front", "FrontLeft", "Left"]
count = {"Front": [0, 0, 0, 0], "FrontLeft": [0, 0, 0, 0], "Left": [0, 0, 0, 0]}
for i in range(0, 3):
view = annos_name[i]
for frame in gt_dataset[i]:
view_count = count[view]
for j in range(0, len(frame['name'])):
cls = frame['name'][j]
view_count[x.index(cls)] += 1
# set width of bar
barWidth = 0.25
# set height of bar
bars1 = count["Front"]
bars2 = count["FrontLeft"]
bars3 = count["Left"]
# Set position of bar on X axis
r1 = np.arange(len(bars1))
r2 = [x + barWidth for x in r1]
r3 = [x + barWidth for x in r2]
# Make the plot
plt.bar(r1, bars1, color='#7f6d5f', width=barWidth, edgecolor='white', label='Front')
plt.bar(r2, bars2, color='#557f2d', width=barWidth, edgecolor='white', label='FrontLeft')
plt.bar(r3, bars3, color='#2d7f5e', width=barWidth, edgecolor='white', label='Left')
# Add xticks on the middle of the group bars
plt.xlabel('group', fontweight='bold')
plt.xticks([r + barWidth for r in range(len(bars1))], ['Car', 'Pedestrian', 'Cyclist', 'Sign'])
plt.title("Class Count Across Camera Views")
# Create legend & Show graphic
plt.legend()
plt.savefig("output/eval/dataset_vis/train_class_count.png")
def training_density_analysis(front_path, frontleft_path, left_path):
gt_front = kitti.get_label_annos(front_path)
gt_frontleft = kitti.get_label_annos(frontleft_path)
gt_left = kitti.get_label_annos(left_path)
gt_dataset = [gt_front, gt_frontleft, gt_left]
x = ['Car', 'Pedestrian', 'Cyclist', 'DontCare']
annos_name = ["Front", "FrontLeft", "Left"]
count = {"Front": [0, 0, 0, 0], "FrontLeft": [0, 0, 0, 0], "Left": [0, 0, 0, 0]}
total_images = 0
total_car = 0
for i in range(0, 1):
view = annos_name[i]
for frame in gt_dataset[i]:
view_count = count[view]
if len(frame['name']) != 0:
total_images += 1
for j in range(0, len(frame['name'])):
cls = frame['name'][j]
if (cls) == 'Car' or (cls) == 'Pedestrian' or (cls) == 'Cyclist' :
total_car += 1
print(str(total_car/total_images))
# set width of bar
barWidth = 0.25
# set height of bar
bars1 = count["Front"]
bars2 = count["FrontLeft"]
bars3 = count["Left"]
# Set position of bar on X axis
r1 = np.arange(len(bars1))
r2 = [x + barWidth for x in r1]
r3 = [x + barWidth for x in r2]
# Make the plot
plt.bar(r1, bars1, color='#7f6d5f', width=barWidth, edgecolor='white', label='Front')
plt.bar(r2, bars2, color='#557f2d', width=barWidth, edgecolor='white', label='FrontLeft')
plt.bar(r3, bars3, color='#2d7f5e', width=barWidth, edgecolor='white', label='Left')
# Add xticks on the middle of the group bars
plt.xlabel('group', fontweight='bold')
plt.xticks([r + barWidth for r in range(len(bars1))], ['Car', 'Pedestrian', 'Cyclist', 'Sign'])
plt.title("Class Count Across Camera Views")
# Create legend & Show graphic
plt.legend()
plt.savefig("output/eval/dataset_vis/train_class_count.png")
def visualize(gt_annos, dt_annos):
sns.set()
ranges = {'Car': [], 'Pedestrian': [], 'Cyclist': [], 'DontCare': []}
for frame in gt_annos:
for i in range(0, len(frame['location'])):
distance = frame['location'][i][2]
cls = frame['name'][i]
ranges[cls].append(distance)
sns_plot = sns.distplot(ranges["Car"], color="skyblue", label="Car")
fig = sns_plot.get_figure()
fig.savefig("output/eval/dataset_vis/val_car.png")
plt.clf()
sns_plot_ped = sns.distplot(ranges["Pedestrian"], color="red", label="Pedestrian")
fig_ped = sns_plot_ped.get_figure()
fig_ped.savefig("output/eval/dataset_vis/val_ped.png")
plt.clf()
sns_plot_cyc = sns.distplot(ranges["Cyclist"], color="teal", label="Cyclist")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/val_cyc.png")
plt.clf()
ranges = {'Car': [], 'Pedestrian': [], 'Cyclist': [], 'DontCare': []}
for frame in dt_annos:
for i in range(0, len(frame['location'])):
distance = frame['location'][i][2]
cls = frame['name'][i]
ranges[cls].append(distance)
sns_plot = sns.distplot(ranges["Car"], color="skyblue", label="Car")
fig = sns_plot.get_figure()
fig.savefig("output/eval/dataset_vis/pred_car.png")
plt.clf()
sns_plot_ped = sns.distplot(ranges["Pedestrian"], color="red", label="Pedestrian")
fig_ped = sns_plot_ped.get_figure()
fig_ped.savefig("output/eval/dataset_vis/pred_ped.png")
plt.clf()
sns_plot_cyc = sns.distplot(ranges["Cyclist"], color="teal", label="Cyclist")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/pred_cyc.png")
breakpoint()
def analyze_tp():
training_views = ['front', 'frontleft', 'left']
eval_views = ['front', 'frontleft', 'left']
for train in training_views:
for evalu in eval_views:
name = 'output/eval/detections/' + train + '_' + evalu + '.pkl'
with open(name, 'rb') as f:
tp_annos = pickle.load(f)
fig, axes = plt.subplots(ncols=2)
ranges = [x[2] for x in tp_annos['locs']]
sns.distplot(ranges, color="skyblue", ax=axes[0]).set_title("Distance from car")
ry = [x * (180 / np.pi) for x in tp_annos["ry"]]
sns.distplot(ry, color="red", ax=axes[1]).set_title("Rotation_y of detections")
fig.savefig("output/eval/detections/" + train + '_' + evalu + '.png')
plt.clf()
ry = frame['rotation_y'][j] * (180 / np.pi)
rot_y[cls].append(ry)
count[cls] += 1
print("Count of classes:" + str(count) + '\n')
with open(save_path + split + "classes.txt", 'a+') as f:
f.write(annos_name[i] + ' ' + str(count) + '\n')
sns_plot = sns.distplot(ranges["Car"], color="skyblue", label="Car").set_title(
annos_name[i] + " Car Distances")
fig = sns_plot.get_figure()
fig.savefig("output/eval/dataset_vis/" + split + annos_name[i] + "_car.png")
plt.clf()
sns_plot_ped = sns.distplot(ranges["Pedestrian"], color="red", label="Pedestrian").set_title(
annos_name[i] + " Pedestrian Distances")
fig_ped = sns_plot_ped.get_figure()
fig_ped.savefig("output/eval/dataset_vis/" + split + annos_name[i] + "_ped.png")
plt.clf()
sns_plot_cyc = sns.distplot(ranges["Cyclist"], color="teal", label="Cyclist").set_title(
annos_name[i] + " Cyclist Distances")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/" + split + annos_name[i] + "_cyc.png")
plt.clf()
sns_plot = sns.distplot(rot_y["Car"], color="skyblue", label="Car").set_title(annos_name[i] + " Car Rotation")
fig = sns_plot.get_figure()
fig.savefig("output/eval/dataset_vis/" + split + "ry_" + annos_name[i] + "_car.png")
plt.clf()
sns_plot_ped = sns.distplot(rot_y["Pedestrian"], color="red", label="Pedestrian").set_title(
annos_name[i] + " Pedestrian Rotation")
fig_ped = sns_plot_ped.get_figure()
fig_ped.savefig("output/eval/dataset_vis/" + split + "ry_" + annos_name[i] + "_ped.png")
plt.clf()
sns_plot_cyc = sns.distplot(rot_y["Cyclist"], color="teal", label="Cyclist").set_title(
annos_name[i] + " Cyclist Rotation")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/" + split + "ry_" + annos_name[i] + "_cyc.png")
plt.clf()
#print("Count of ranges:" + str(ranges)+'\n')
#print("Count of ry:" + str(rot_y)+'\n')
def analyze_velocity():
CALIB_PATH = "data/waymo/training/img_calib"
path, dirs, files = next(os.walk(CALIB_PATH))
files.sort()
velocity = []
angular_velocity = []
hs_count = 0
for file in files:
f = open(CALIB_PATH + '/' + file)
lines = f.readlines()
v0 = lines[5].split(' ')[1:]
cam0_vel = np.array([float(x) for x in v0])
cam0_v = np.linalg.norm(cam0_vel[:3])
cam0_w = np.linalg.norm(cam0_vel[3:])
velocity.append(cam0_v*3.6)
angular_velocity.append(cam0_w)
if cam0_v*3.6 > 40:
hs_count +=1
print("Percentage is: " + str(hs_count/len(files)))
sns_plot_cyc = sns.distplot(velocity, color="teal", label="Velocity").set_title("Velocity distribution in Training Set")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/velocity.png")
plt.clf()
sns_plot_cyc = sns.distplot(angular_velocity, color="teal", label="Angular Velocity").set_title("Ang Velocity Distribution in Training Set")
fig_cyc = sns_plot_cyc.get_figure()
fig_cyc.savefig("output/eval/dataset_vis/ang_velocity.png")
plt.clf()
if __name__ == '__main__':
fire.Fire()
| 39.717579 | 144 | 0.604339 | 1,896 | 13,782 | 4.181962 | 0.107595 | 0.035313 | 0.035313 | 0.066591 | 0.780174 | 0.741329 | 0.727708 | 0.722159 | 0.70198 | 0.70198 | 0 | 0.014177 | 0.237411 | 13,782 | 346 | 145 | 39.83237 | 0.740247 | 0.036062 | 0 | 0.627306 | 0 | 0 | 0.183387 | 0.055928 | 0 | 0 | 0 | 0 | 0 | 1 | 0.02952 | false | 0 | 0.0369 | 0 | 0.070111 | 0.02583 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
633cf6bc619db366c93f1dd1c95d4485d54743b7 | 12,072 | py | Python | pokemongo_bot/test/polyline_walker_test.py | timgates42/PokemonGo-Bot | 5e80f20760f32478a84a8f0ced7ca24cdf41fe03 | [
"MIT"
] | 5,362 | 2016-07-21T02:38:46.000Z | 2022-03-23T13:34:51.000Z | pokemongo_bot/test/polyline_walker_test.py | timgates42/PokemonGo-Bot | 5e80f20760f32478a84a8f0ced7ca24cdf41fe03 | [
"MIT"
] | 5,897 | 2016-07-21T05:05:49.000Z | 2022-03-17T09:21:35.000Z | pokemongo_bot/test/polyline_walker_test.py | timgates42/PokemonGo-Bot | 5e80f20760f32478a84a8f0ced7ca24cdf41fe03 | [
"MIT"
] | 3,379 | 2016-07-21T02:38:48.000Z | 2022-03-30T02:46:57.000Z | import os
import pickle
import unittest
from geographiclib.geodesic import Geodesic
from mock import MagicMock, patch, mock
import requests_mock
from pokemongo_bot.walkers.polyline_generator import PolylineObjectHandler
from pokemongo_bot.walkers.polyline_walker import PolylineWalker
ex_orig = (47.1706378, 8.5167405)
ex_dest = (47.1700271, 8.518072999999998)
ex_speed = 2.5
ex_total_distance = 194
ex_resp_directions = 'example_directions.pickle'
ex_resp_elevations = 'example_elevations.pickle'
ex_enc_polyline = 'o_%7C~Gsl~r@??h@LVDf@LDcBFi@AUEUQg@EKCI?G?GBG@EBEJKNC??'
ex_nr_samples = 64
class TestPolylineWalker(unittest.TestCase):
def setUp(self):
self.patcherSleep = patch('pokemongo_bot.walkers.step_walker.sleep')
self.patcherSleep.start()
self.bot = MagicMock()
self.bot.api = MagicMock()
# let us get back the position set by the PolylineWalker
def api_set_position(lat, lng, alt):
self.bot.position = [lat, lng, alt]
def hearbeat():
return True
self.bot.config.gmapkey = ''
self.bot.api.set_position = api_set_position
self.bot.heartbeat = hearbeat
directions_path = os.path.join(os.path.dirname(__file__), 'resources', ex_resp_directions)
with open(directions_path, 'rb') as directions:
ex_directions = pickle.load(directions)
elevations_path = os.path.join(os.path.dirname(__file__), 'resources', ex_resp_elevations)
with open(elevations_path, 'rb') as elevations:
ex_elevations = pickle.load(elevations)
with requests_mock.Mocker() as m:
m.get(
"https://maps.googleapis.com/maps/api/directions/json?mode=walking&origin={},{}&destination={},{}".format(
ex_orig[0], ex_orig[1], ex_dest[0], ex_dest[1]
), json=ex_directions, status_code=200)
m.get("https://maps.googleapis.com/maps/api/elevation/json?path=enc:{}&samples={}".format(
ex_enc_polyline, ex_nr_samples
), json=ex_elevations, status_code=200)
self.polyline = PolylineObjectHandler.cached_polyline(ex_orig, ex_dest)
self.bot.position = [ex_orig[0], ex_orig[1], self.polyline.get_alt(ex_orig)]
def tearDown(self):
self.bot.position = [0, 0, 0]
self.patcherSleep.stop()
def test_polyline_fetched(self):
self.assertEqual(self.polyline._points[0], ex_orig)
self.assertEqual(self.polyline._points[-1], ex_dest)
total_seconds = self.polyline.get_total_distance() / 3
self.assertAlmostEqual(total_seconds, ex_nr_samples, places=0)
self.assertEquals(self.polyline.get_total_distance(), ex_total_distance)
self.assertEquals(self.polyline.get_last_pos(), self.polyline._last_pos)
def test_one_small_speed(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
speed = 0.247503233266
precision = 0.0
dlat = 47.17064
dlng = 8.51674
self.bot.config.walk_max = speed
self.bot.config.walk_min = speed
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return pw.step()
finishedWalking = run_step()
self.assertFalse(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(dlat, dlng, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = (dlat, dlng)
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_one_small_speed_big_precision(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
speed = 0.247503233266
precision = 2.5
dlat = 47.170635631
dlng = 8.51673976413
self.bot.config.walk_max = speed
self.bot.config.walk_min = speed
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return pw.step()
finishedWalking = run_step()
self.assertFalse(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(dlat, dlng, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = (dlat, dlng)
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_intermediary_speed(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
speed = 166.8285172348795
precision = 0.0
dlat = 47.17022
dlng = 8.51789
self.bot.config.walk_max = speed
self.bot.config.walk_min = speed
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return pw.step()
finishedWalking = run_step()
self.assertFalse(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(dlat, dlng, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = (dlat, dlng)
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_intermediary_speed_big_precision(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
speed = 166.8285172348795
precision = 2.5
dlat = 47.17022
dlng = 8.51789
self.bot.config.walk_max = speed
self.bot.config.walk_min = speed
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return pw.step()
finishedWalking = run_step()
self.assertFalse(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(dlat, dlng, self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = (dlat, dlng)
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_bigger_then_total_speed(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
speed = 300
precision = 0.0
self.bot.config.walk_max = speed
self.bot.config.walk_min = speed
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return pw.step()
finishedWalking = run_step()
self.assertTrue(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(ex_dest[0], ex_dest[1], self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = self.polyline.destination
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_bigger_then_total_speed_big_precision_offset(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
speed = 300
precision = 2.5
self.bot.config.walk_max = speed
self.bot.config.walk_min = speed
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
@mock.patch('random.uniform')
def run_step(mock_random):
mock_random.return_value = 0.0
return pw.step()
finishedWalking = run_step()
self.assertTrue(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(ex_dest[0], ex_dest[1], self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = self.polyline.destination
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_stay_put(self):
altitude = 429.5
self.bot.position = [47.1706378, 8.5167405, altitude]
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
precision = 0.0
speed = 0.0
self.bot.config.walk_max = 4
self.bot.config.walk_min = 2
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
finishedWalking = pw.step(speed=speed)
self.assertFalse(finishedWalking, 'step should return False')
distance = Geodesic.WGS84.Inverse(ex_orig[0], ex_orig[1], self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.assertTrue(altitude - 1 <= self.bot.position[2] <= altitude + 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
def test_teleport(self):
walk_max = self.bot.config.walk_max
walk_min = self.bot.config.walk_min
precision = 0.0
speed = float("inf")
self.bot.config.walk_max = 4
self.bot.config.walk_min = 2
pw = PolylineWalker(self.bot, ex_dest[0], ex_dest[1], precision=precision)
self.assertEqual(pw.dest_lat, ex_dest[0], 'dest_lat did not match')
self.assertEqual(pw.dest_lng, ex_dest[1], 'dest_lng did not match')
finishedWalking = pw.step(speed=speed)
self.assertTrue(finishedWalking, 'step should return True')
distance = Geodesic.WGS84.Inverse(ex_dest[0], ex_dest[1], self.bot.position[0], self.bot.position[1])["s12"]
self.assertTrue(0.0 <= distance <= (pw.precision + pw.epsilon))
self.polyline._last_pos = self.polyline.destination
self.assertTrue(abs(self.polyline.get_alt() - self.bot.position[2]) <= 1)
self.bot.config.walk_max = walk_max
self.bot.config.walk_min = walk_min
| 40.24 | 122 | 0.653496 | 1,662 | 12,072 | 4.555957 | 0.104091 | 0.082277 | 0.084126 | 0.107765 | 0.787639 | 0.751453 | 0.74234 | 0.737982 | 0.729266 | 0.729266 | 0 | 0.039645 | 0.224818 | 12,072 | 299 | 123 | 40.374582 | 0.769502 | 0.004473 | 0 | 0.681034 | 0 | 0.012931 | 0.08239 | 0.011984 | 0 | 0 | 0 | 0 | 0.193966 | 1 | 0.081897 | false | 0 | 0.034483 | 0.00431 | 0.150862 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
63661b093f521d1ba0e2c541046284ecb4797e3c | 77 | py | Python | zazi/apps/mpesa_loan/tests.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | zazi/apps/mpesa_loan/tests.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | 1 | 2021-08-20T06:41:57.000Z | 2021-08-20T06:41:57.000Z | zazi/apps/mpesa_loan/tests.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | from django.test import TestCase
class MpesaLoanTestCase(TestCase):
pass | 19.25 | 34 | 0.805195 | 9 | 77 | 6.888889 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 77 | 4 | 35 | 19.25 | 0.939394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
638023c46fcee50a86ce45832d4be15f2a6756d2 | 281 | py | Python | cla_backend/apps/call_centre/tests/api/test_diagnosis_api.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 3 | 2019-10-02T15:31:03.000Z | 2022-01-13T10:15:53.000Z | cla_backend/apps/call_centre/tests/api/test_diagnosis_api.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 206 | 2015-01-02T16:50:11.000Z | 2022-02-16T20:16:05.000Z | cla_backend/apps/call_centre/tests/api/test_diagnosis_api.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 6 | 2015-03-23T23:08:42.000Z | 2022-02-15T17:04:44.000Z | from rest_framework.test import APITestCase
from legalaid.tests.views.test_base import CLAOperatorAuthBaseApiTestMixin
from diagnosis.tests.diagnosis_api import DiagnosisAPIMixin
class DiagnosisTestCase(CLAOperatorAuthBaseApiTestMixin, DiagnosisAPIMixin, APITestCase):
pass
| 31.222222 | 89 | 0.875445 | 27 | 281 | 9 | 0.62963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085409 | 281 | 8 | 90 | 35.125 | 0.945525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.2 | 0.6 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
63a68e85090d9d88e935f288500ddcc72c62d2be | 53 | py | Python | tests/test_buffer.py | davebshow/asyncbolt | 6820e92928a3e331d82efdfba8c01b95261c6e4e | [
"MIT"
] | 12 | 2017-12-08T03:35:27.000Z | 2021-09-18T18:25:53.000Z | tests/test_buffer.py | davebshow/asyncbolt | 6820e92928a3e331d82efdfba8c01b95261c6e4e | [
"MIT"
] | 1 | 2017-12-08T18:43:11.000Z | 2017-12-08T18:43:11.000Z | tests/test_buffer.py | davebshow/asyncbolt | 6820e92928a3e331d82efdfba8c01b95261c6e4e | [
"MIT"
] | 3 | 2017-12-08T17:45:57.000Z | 2020-10-28T21:28:57.000Z | """Buffer tests"""
def test_simple_write():
pass | 13.25 | 24 | 0.660377 | 7 | 53 | 4.714286 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.169811 | 53 | 4 | 25 | 13.25 | 0.75 | 0.226415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
63ae6a7e8b1206a551505ecdf8f09f29f0b5dd09 | 36 | py | Python | python/testData/completion/className/simple/simple.after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/completion/className/simple/simple.after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/completion/className/simple/simple.after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | from mypackage import Shazam
Shazam | 12 | 28 | 0.861111 | 5 | 36 | 6.2 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.138889 | 36 | 3 | 29 | 12 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
89585d71d0dcf41e58fdaf816afa6371bdf10d59 | 15 | py | Python | AWS/S3-2.py | ls-2018/tips | 1f5f5195d7181b5dd4616db02166f7f92c97f1cd | [
"MIT"
] | 2 | 2019-05-07T03:08:25.000Z | 2020-05-22T10:10:00.000Z | AWS/S3-2.py | ls-2018/tips | 1f5f5195d7181b5dd4616db02166f7f92c97f1cd | [
"MIT"
] | 7 | 2020-05-22T13:29:42.000Z | 2021-09-23T23:30:25.000Z | AWS/S3-2.py | ls-2018/py | 1f5f5195d7181b5dd4616db02166f7f92c97f1cd | [
"MIT"
] | null | null | null | print(bool(3))
| 7.5 | 14 | 0.666667 | 3 | 15 | 3.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 0.066667 | 15 | 1 | 15 | 15 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
8962edcf9ebc552b24f453f08099e453100e5a67 | 38 | py | Python | src/core/forms.py | sandeepraju/shfl | bacd7a8df4dd22854f1def75ac2133cecb2680ec | [
"MIT"
] | 1 | 2016-08-07T16:12:50.000Z | 2016-08-07T16:12:50.000Z | src/core/forms.py | sandeepraju/shfl | bacd7a8df4dd22854f1def75ac2133cecb2680ec | [
"MIT"
] | null | null | null | src/core/forms.py | sandeepraju/shfl | bacd7a8df4dd22854f1def75ac2133cecb2680ec | [
"MIT"
] | null | null | null | # defining forms to use with flask-wtf | 38 | 38 | 0.789474 | 7 | 38 | 4.285714 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 38 | 1 | 38 | 38 | 0.9375 | 0.947368 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
897ba5ea0e27584106de4202e7187b200df3df82 | 57 | py | Python | sr_apx/vc/apx/__init__.py | TiP-internal/structural-rounding | 5d033c9ce4bcd2aa72bf10976c07f4842dde2b76 | [
"BSD-3-Clause"
] | 4 | 2019-10-17T02:29:48.000Z | 2022-02-20T17:03:42.000Z | sr_apx/vc/apx/__init__.py | TheoryInPractice/structural-rounding | 0aa961b9c8ecd4fd12f65302f6e95145ccb00cb6 | [
"BSD-3-Clause"
] | 3 | 2020-02-12T09:06:17.000Z | 2020-03-01T04:35:29.000Z | sr_apx/vc/apx/__init__.py | TiP-internal/structural-rounding | 5d033c9ce4bcd2aa72bf10976c07f4842dde2b76 | [
"BSD-3-Clause"
] | 1 | 2020-01-14T15:51:50.000Z | 2020-01-14T15:51:50.000Z |
from .lib_vc_apx import dfs_apx, std_apx, heuristic_apx
| 19 | 55 | 0.824561 | 11 | 57 | 3.818182 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122807 | 57 | 2 | 56 | 28.5 | 0.84 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
899ca34678e61324c4e247d19d61749034c3f54f | 129 | py | Python | Blob_Lib/assimp-5.2.3/assimp/test/regression/utils.py | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | Blob_Lib/assimp-5.2.3/assimp/test/regression/utils.py | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | Blob_Lib/assimp-5.2.3/assimp/test/regression/utils.py | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:7b433a286703aa4db2f4b4a4f46a5b905ecb7cba758e72a3f1c3e03e6ab21c02
size 2606
| 32.25 | 75 | 0.883721 | 13 | 129 | 8.769231 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.365854 | 0.046512 | 129 | 3 | 76 | 43 | 0.560976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
89a2947ba9504595dbafd04883418d0f83777d85 | 265 | py | Python | main.py | mirkoperillo/brick-server | c640e9e2f5b664a079ec0dbc3ce4b7c678e869a3 | [
"BSD-3-Clause"
] | null | null | null | main.py | mirkoperillo/brick-server | c640e9e2f5b664a079ec0dbc3ce4b7c678e869a3 | [
"BSD-3-Clause"
] | null | null | null | main.py | mirkoperillo/brick-server | c640e9e2f5b664a079ec0dbc3ce4b7c678e869a3 | [
"BSD-3-Clause"
] | null | null | null | import os
os.environ["BRICK_CONFIGFILE"] = './configs/configs.json'
from brick_server import app
from brick_server.auth.authorization import *
from brick_server.dependencies import update_dependency_supplier
#update_dependency_supplier('auth_logic', check_admin2)
| 33.125 | 64 | 0.841509 | 35 | 265 | 6.085714 | 0.542857 | 0.126761 | 0.211268 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004082 | 0.075472 | 265 | 7 | 65 | 37.857143 | 0.865306 | 0.203774 | 0 | 0 | 0 | 0 | 0.180952 | 0.104762 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.8 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
89a3d740197688c08f92eaf53e5201bab37e7d88 | 185 | py | Python | backend/__init__.py | Hyago0897/locadora_carros_grupo1_info3 | 854cbf2394947e8477a046dfcdfbb0cd4d0bff9b | [
"MIT"
] | 2 | 2021-08-28T23:26:32.000Z | 2021-09-01T12:50:38.000Z | backend/__init__.py | Hyago0897/locadora_carros_grupo1_info3 | 854cbf2394947e8477a046dfcdfbb0cd4d0bff9b | [
"MIT"
] | null | null | null | backend/__init__.py | Hyago0897/locadora_carros_grupo1_info3 | 854cbf2394947e8477a046dfcdfbb0cd4d0bff9b | [
"MIT"
] | null | null | null | from .conexao import BancoDeDados
from .backup import Backup
from .manutencao import TabelaManutencao
from .veiculo import TabelaVeiculo
from .exe_backup_interface_cod import ExeTarefas | 37 | 48 | 0.87027 | 23 | 185 | 6.869565 | 0.565217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102703 | 185 | 5 | 48 | 37 | 0.951807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
89b9689c809e14bccdce8eeb0a4b983a3cce7e46 | 51 | py | Python | django_auto_one_to_one/__init__.py | petterreinholdtsen/django-auto-one-to-one | de0e15ba32c7439a06f1be22d14d509479986d63 | [
"BSD-3-Clause"
] | 13 | 2016-04-08T17:49:58.000Z | 2021-10-01T12:29:47.000Z | django_auto_one_to_one/__init__.py | petterreinholdtsen/django-auto-one-to-one | de0e15ba32c7439a06f1be22d14d509479986d63 | [
"BSD-3-Clause"
] | 8 | 2015-02-24T18:15:59.000Z | 2020-08-27T16:57:06.000Z | django_auto_one_to_one/__init__.py | petterreinholdtsen/django-auto-one-to-one | de0e15ba32c7439a06f1be22d14d509479986d63 | [
"BSD-3-Clause"
] | 5 | 2015-06-22T17:09:59.000Z | 2020-09-23T16:13:50.000Z | from .models import AutoOneToOneModel, PerUserData
| 25.5 | 50 | 0.862745 | 5 | 51 | 8.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.098039 | 51 | 1 | 51 | 51 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
89be3a6bc13451e7975b1cf625bb38ebd2b2fdfc | 32 | py | Python | fairseq/version.py | dohe0342/fairseq | a3c34cada4023788be84676d86a176ea248546e9 | [
"MIT"
] | 3 | 2022-03-23T09:44:30.000Z | 2022-03-24T05:32:06.000Z | fairseq/version.py | dohe0342/fairseq | a3c34cada4023788be84676d86a176ea248546e9 | [
"MIT"
] | null | null | null | fairseq/version.py | dohe0342/fairseq | a3c34cada4023788be84676d86a176ea248546e9 | [
"MIT"
] | null | null | null | __version__ = "1.0.0a0+5f2515e"
| 16 | 31 | 0.71875 | 5 | 32 | 3.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.310345 | 0.09375 | 32 | 1 | 32 | 32 | 0.344828 | 0 | 0 | 0 | 0 | 0 | 0.46875 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
9861e32e2d4e6279154c87108c495aae4402ac62 | 23 | py | Python | nipype/workflows/fmri/__init__.py | carlohamalainen/nipype | 0c4f587946f48277de471b1801b60bd18fdfb775 | [
"BSD-3-Clause"
] | 1 | 2018-04-18T12:13:37.000Z | 2018-04-18T12:13:37.000Z | nipype/workflows/fmri/__init__.py | ito-takuya/nipype | 9099a5809487b55868cdec82a719030419cbd6ba | [
"BSD-3-Clause"
] | 2 | 2017-10-05T21:08:38.000Z | 2018-10-09T23:01:23.000Z | nipype/workflows/fmri/__init__.py | ito-takuya/nipype | 9099a5809487b55868cdec82a719030419cbd6ba | [
"BSD-3-Clause"
] | 1 | 2020-02-19T13:47:05.000Z | 2020-02-19T13:47:05.000Z | from . import fsl, spm
| 11.5 | 22 | 0.695652 | 4 | 23 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.217391 | 23 | 1 | 23 | 23 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
9863d83f2c1483327a98db376c81ecd9d06f0403 | 4,606 | py | Python | idl2py/jd/ct2lst.py | RapidLzj/idl2py | 193051cd8d01db0d125b8975713b885ad521a992 | [
"MIT"
] | null | null | null | idl2py/jd/ct2lst.py | RapidLzj/idl2py | 193051cd8d01db0d125b8975713b885ad521a992 | [
"MIT"
] | null | null | null | idl2py/jd/ct2lst.py | RapidLzj/idl2py | 193051cd8d01db0d125b8975713b885ad521a992 | [
"MIT"
] | null | null | null | """
By Dr Jie Zheng -Q, NAOC
v1 2019-04-27
"""
import numpy as np
from..util import *
def ct2lst():
pass
#PRO CT2LST, lst, lng, tz, tme, day, mon, year
#;+
#; NAME:
#; CT2LST
#; PURPOSE:
#; To convert from Local Civil Time to Local Mean Sidereal Time.
#;
#; CALLING SEQUENCE:
#; CT2LST, Lst, Lng, Tz, Time, [Day, Mon, Year]
#; or
#; CT2LST, Lst, Lng, dummy, JD
#;
#; INPUTS:
#; Lng - The longitude in degrees (east of Greenwich) of the place for
#; which the local sidereal time is desired, scalar. The Greenwich
#; mean sidereal time (GMST) can be found by setting Lng = 0.
#; Tz - The time zone of the site in hours, positive East of the Greenwich
#; meridian (ahead of GMT). Use this parameter to easily account
#; for Daylight Savings time (e.g. -4=EDT, -5 = EST/CDT), scalar
#; This parameter is not needed (and ignored) if Julian date is
#; supplied. ***Note that the sign of TZ was changed in July 2008
#; to match the standard definition.***
#; Time or JD - If more than four parameters are specified, then this is
#; the time of day of the specified date in decimal hours. If
#; exactly four parameters are specified, then this is the
#; Julian date of time in question, scalar or vector
#;
#; OPTIONAL INPUTS:
#; Day - The day of the month (1-31),integer scalar or vector
#; Mon - The month, in numerical format (1-12), integer scalar or vector
#; Year - The 4 digit year (e.g. 2008), integer scalar or vector
#;
#; OUTPUTS:
#; Lst The Local Sidereal Time for the date/time specified in hours.
#;
#; RESTRICTIONS:
#; If specified, the date should be in numerical form. The year should
#; appear as yyyy.
#;
#; PROCEDURE:
#; The Julian date of the day and time is question is used to determine
#; the number of days to have passed since 0 Jan 2000. This is used
#; in conjunction with the GST of that date to extrapolate to the current
#; GST; this is then used to get the LST. See Astronomical Algorithms
#; by Jean Meeus, p. 84 (Eq. 11-4) for the constants used.
#;
#; EXAMPLE:
#; Find the Greenwich mean sidereal time (GMST) on 2008 Jul 30 at 15:53 pm
#; in Baltimore, Maryland (longitude=-76.72 degrees). The timezone is
#; EDT or tz=-4
#;
#; IDL> CT2LST, lst, -76.72, -4,ten(15,53), 30, 07, 2008
#;
#; ==> lst = 11.356505 hours (= 11h 21m 23.418s)
#;
#; The Web site http://tycho.usno.navy.mil/sidereal.html contains more
#; info on sidereal time, as well as an interactive calculator.
#; PROCEDURES USED:
#; jdcnv - Convert from year, month, day, hour to julian date
#;
#; MODIFICATION HISTORY:
#; Adapted from the FORTRAN program GETSD by Michael R. Greason, STX,
#; 27 October 1988.
#; Use IAU 1984 constants Wayne Landsman, HSTX, April 1995, results
#; differ by about 0.1 seconds
#; Longitudes measured *east* of Greenwich W. Landsman December 1998
#; Time zone now measure positive East of Greenwich W. Landsman July 2008
#; Remove debugging print statement W. Landsman April 2009
#;-
# On_error,2
# compile_opt idl2
#
# if N_params() LT 3 THEN BEGIN
# print,'Syntax - CT2LST, Lst, Lng, Tz, Time, Day, Mon, Year'
# print,' or'
# print,' CT2LST, Lst, Lng, Tz, JD'
# return
# endif
#; If all parameters were given, then compute
#; the Julian date; otherwise assume it is stored
#; in Time.
#;
#
# IF N_params() gt 4 THEN BEGIN
# time = tme - tz
# jdcnv, year, mon, day, time, jd
#
# ENDIF ELSE jd = double(tme)
#;
#; Useful constants, see Meeus, p.84
#;
# c = [280.46061837d0, 360.98564736629d0, 0.000387933d0, 38710000.0 ]
# jd2000 = 2451545.0D0
# t0 = jd - jd2000
# t = t0/36525
#;
#; Compute GST in seconds.
#;
# theta = c[0] + (c[1] * t0) + t^2*(c[2] - t/ c[3] )
#;
#; Compute LST in hours.
#;
# lst = ( theta + double(lng))/15.0d
# neg = where(lst lt 0.0D0, n)
# if n gt 0 then lst[neg] = 24.D0 + (lst[neg] mod 24)
# lst = lst mod 24.D0
#;
# RETURN
# END
| 37.145161 | 82 | 0.561007 | 627 | 4,606 | 4.114833 | 0.432217 | 0.02093 | 0.023256 | 0.021705 | 0.095349 | 0.076744 | 0.051938 | 0.051938 | 0 | 0 | 0 | 0.071825 | 0.334998 | 4,606 | 123 | 83 | 37.447154 | 0.770486 | 0.888841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0.25 | 0.5 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
7f4357e30f011846827418a85e278c23ecfb3453 | 643 | py | Python | standup_and_prosper_sdk/__init__.py | Teaminator/standup-and-prosper-sdk.py | ccdba4a24f395dc0b45d9f9da9bdf5038e1b1617 | [
"Apache-2.0"
] | 1 | 2021-09-16T08:02:35.000Z | 2021-09-16T08:02:35.000Z | standup_and_prosper_sdk/__init__.py | Teaminator/standup-and-prosper-sdk.py | ccdba4a24f395dc0b45d9f9da9bdf5038e1b1617 | [
"Apache-2.0"
] | 1 | 2021-06-14T16:45:56.000Z | 2021-06-14T16:56:05.000Z | standup_and_prosper_sdk/__init__.py | Teaminator/standup-and-prosper-sdk.py | ccdba4a24f395dc0b45d9f9da9bdf5038e1b1617 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
# import apis into sdk package
from standup_and_prosper_sdk.api.standups_api import StandupsApi
# import ApiClient
from standup_and_prosper_sdk.api_client import ApiClient
from standup_and_prosper_sdk.rest import ApiException
# import models into sdk package
from standup_and_prosper_sdk.models.question import Question
from standup_and_prosper_sdk.models.response import Response
from standup_and_prosper_sdk.models.thread import Thread
from standup_and_prosper_sdk.models.thread_collection import ThreadCollection
from standup_and_prosper_sdk.models.user_response import UserResponse
| 40.1875 | 77 | 0.881804 | 94 | 643 | 5.680851 | 0.308511 | 0.164794 | 0.209738 | 0.314607 | 0.558052 | 0.558052 | 0.423221 | 0.142322 | 0 | 0 | 0 | 0.001704 | 0.087092 | 643 | 15 | 78 | 42.866667 | 0.908007 | 0.139969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
7f7c23f1fd67cc5fa78a7c344d5dacc127d2c604 | 12,110 | py | Python | lib/bmc_ssh_utils.py | Chengyiyu/test_automation | 188c29d9b03a70ba0a2f97d36501e042bce8a0c4 | [
"Apache-2.0"
] | null | null | null | lib/bmc_ssh_utils.py | Chengyiyu/test_automation | 188c29d9b03a70ba0a2f97d36501e042bce8a0c4 | [
"Apache-2.0"
] | null | null | null | lib/bmc_ssh_utils.py | Chengyiyu/test_automation | 188c29d9b03a70ba0a2f97d36501e042bce8a0c4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
r"""
This module provides many valuable bmc ssh functions such as bmc_execute_command.
"""
import os
import gen_valid as gv
import gen_robot_ssh as grs
from robot.libraries.BuiltIn import BuiltIn
def bmc_execute_command(cmd_buf,
print_out=0,
print_err=0,
ignore_err=0,
fork=0,
quiet=None,
test_mode=None,
time_out=None):
r"""
Run the given command in an BMC SSH session and return the stdout, stderr and the return code.
This function will obtain the global values for OPENBMC_HOST, OPENBMC_USERNAME, etc.
Description of arguments:
cmd_buf The command string to be run in an SSH session.
print_out If this is set, this function will print the stdout/stderr generated by
the shell command.
print_err If show_err is set, this function will print a standardized error report
if the shell command returns non-zero.
ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
ignored.
fork Indicates that sshlib.start is to be used rather than
sshlib.execute_command.
quiet Indicates whether this function should run the pissuing() function prints
an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
value.
test_mode If test_mode is set, this function will not actually run the command.
This defaults to the global test_mode value.
time_out The amount of time to allow for the execution of cmd_buf. A value of
None means that there is no limit to how long the command may take.
"""
# Get global BMC variable values.
openbmc_host = BuiltIn().get_variable_value("${OPENBMC_HOST}", default="")
ssh_port = BuiltIn().get_variable_value("${SSH_PORT}", default="22")
openbmc_username = BuiltIn().get_variable_value("${OPENBMC_USERNAME}",
default="")
openbmc_password = BuiltIn().get_variable_value("${OPENBMC_PASSWORD}",
default="")
if not gv.valid_value(openbmc_host):
return "", "", 1
if not gv.valid_value(openbmc_username):
return "", "", 1
if not gv.valid_value(openbmc_password):
return "", "", 1
if not gv.valid_value(ssh_port):
return "", "", 1
open_connection_args = {'host': openbmc_host, 'alias': 'bmc_connection',
'timeout': '25.0', 'prompt': '# ', 'port': ssh_port}
login_args = {'username': openbmc_username, 'password': openbmc_password}
openbmc_user_type = os.environ.get('USER_TYPE', "") or \
BuiltIn().get_variable_value("${USER_TYPE}", default="")
if openbmc_user_type == 'sudo':
cmd_buf = 'sudo ' + cmd_buf
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
quiet, test_mode, time_out)
def os_execute_command(cmd_buf,
print_out=0,
print_err=0,
ignore_err=0,
fork=0,
quiet=None,
test_mode=None,
time_out=None,
os_host="",
os_username="",
os_password=""):
r"""
Run the given command in an OS SSH session and return the stdout, stderr and the return code.
This function will obtain the global values for OS_HOST, OS_USERNAME, etc.
Description of arguments:
cmd_buf The command string to be run in an SSH session.
print_out If this is set, this function will print the stdout/stderr generated by
the shell command.
print_err If show_err is set, this function will print a standardized error report
if the shell command returns non-zero.
ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
ignored.
fork Indicates that sshlib.start is to be used rather than
sshlib.execute_command.
quiet Indicates whether this function should run the pissuing() function prints
an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
value.
test_mode If test_mode is set, this function will not actually run the command.
This defaults to the global test_mode value.
time_out The amount of time to allow for the execution of cmd_buf. A value of
None means that there is no limit to how long the command may take.
"""
# Get global OS variable values.
if os_host == "":
os_host = BuiltIn().get_variable_value("${OS_HOST}", default="")
if os_username == "":
os_username = BuiltIn().get_variable_value("${OS_USERNAME}", default="")
if os_password == "":
os_password = BuiltIn().get_variable_value("${OS_PASSWORD}", default="")
if not gv.valid_value(os_host):
return "", "", 1
if not gv.valid_value(os_username):
return "", "", 1
if not gv.valid_value(os_password):
return "", "", 1
open_connection_args = {'host': os_host, 'alias': 'os_connection'}
login_args = {'username': os_username, 'password': os_password}
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
quiet, test_mode, time_out)
def xcat_execute_command(cmd_buf,
print_out=0,
print_err=0,
ignore_err=0,
fork=0,
quiet=None,
test_mode=None):
r"""
Run the given command in an XCAT SSH session and return the stdout, stderr and the return code.
This function will obtain the global values for XCAT_HOST, XCAT_USERNAME, etc.
Description of arguments:
cmd_buf The command string to be run in an SSH session.
print_out If this is set, this function will print the stdout/stderr generated by
the shell command.
print_err If show_err is set, this function will print a standardized error report
if the shell command returns non-zero.
ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
ignored.
fork Indicates that sshlib.start is to be used rather than
sshlib.execute_command.
quiet Indicates whether this function should run the pissuing() function prints
an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
value.
test_mode If test_mode is set, this function will not actually run the command.
This defaults to the global test_mode value.
"""
# Get global XCAT variable values.
xcat_host = BuiltIn().get_variable_value("${XCAT_HOST}", default="")
xcat_username = BuiltIn().get_variable_value("${XCAT_USERNAME}",
default="")
xcat_password = BuiltIn().get_variable_value("${XCAT_PASSWORD}",
default="")
xcat_port = BuiltIn().get_variable_value("${XCAT_PORT}",
default="22")
if not gv.valid_value(xcat_host):
return "", "", 1
if not gv.valid_value(xcat_username):
return "", "", 1
if not gv.valid_value(xcat_password):
return "", "", 1
if not gv.valid_value(xcat_port):
return "", "", 1
open_connection_args = {'host': xcat_host, 'alias': 'xcat_connection',
'port': xcat_port}
login_args = {'username': xcat_username, 'password': xcat_password}
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
quiet, test_mode)
def device_write(cmd_buf,
print_out=0,
quiet=None,
test_mode=None):
r"""
Write the given command in a device SSH session and return the stdout, stderr and the return code.
This function is useful for writing to a switch.
This function will obtain the global values for DEVICE_HOST, DEVICE_USERNAME, etc.
Description of arguments:
cmd_buf The command string to be run in an SSH session.
print_out If this is set, this function will print the stdout/stderr generated by
the shell command.
print_err If show_err is set, this function will print a standardized error report
if the shell command returns non-zero.
ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
ignored.
fork Indicates that sshlib.start is to be used rather than
sshlib.execute_command.
quiet Indicates whether this function should run the pissuing() function prints
an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
value.
test_mode If test_mode is set, this function will not actually run the command.
This defaults to the global test_mode value.
"""
# Get global DEVICE variable values.
device_host = BuiltIn().get_variable_value("${DEVICE_HOST}", default="")
device_username = BuiltIn().get_variable_value("${DEVICE_USERNAME}",
default="")
device_password = BuiltIn().get_variable_value("${DEVICE_PASSWORD}",
default="")
device_port = BuiltIn().get_variable_value("${DEVICE_PORT}",
default="22")
if not gv.valid_value(device_host):
return "", "", 1
if not gv.valid_value(device_username):
return "", "", 1
if not gv.valid_value(device_password):
return "", "", 1
if not gv.valid_value(device_port):
return "", "", 1
open_connection_args = {'host': device_host, 'alias': 'device_connection',
'port': device_port}
login_args = {'username': device_username, 'password': device_password}
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err=0, ignore_err=1,
fork=0, quiet=quiet, test_mode=test_mode)
| 50.041322 | 109 | 0.537077 | 1,358 | 12,110 | 4.594993 | 0.103093 | 0.026923 | 0.041026 | 0.058974 | 0.813942 | 0.729327 | 0.721635 | 0.688141 | 0.603205 | 0.603205 | 0 | 0.00559 | 0.394385 | 12,110 | 241 | 110 | 50.248963 | 0.845241 | 0.497275 | 0 | 0.434426 | 0 | 0 | 0.078049 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032787 | false | 0.114754 | 0.032787 | 0 | 0.221311 | 0.090164 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
7f8e490b330547cb97c1662987bcc314c4869b46 | 174 | py | Python | basicdevice/admin.py | CRLTeam/iot_device | afde149e3d94f456c32d2f3c8ef3d4002042f017 | [
"Apache-2.0"
] | 1 | 2021-02-10T23:50:41.000Z | 2021-02-10T23:50:41.000Z | basicdevice/admin.py | CRLTeam/iot_device | afde149e3d94f456c32d2f3c8ef3d4002042f017 | [
"Apache-2.0"
] | null | null | null | basicdevice/admin.py | CRLTeam/iot_device | afde149e3d94f456c32d2f3c8ef3d4002042f017 | [
"Apache-2.0"
] | null | null | null | #from django.contrib import admin
#from app.models import Log, Setting, Simulation
#admin.site.register(Log)
#admin.site.register(Setting)
#admin.site.register(Simulation)
| 21.75 | 48 | 0.793103 | 24 | 174 | 5.75 | 0.5 | 0.195652 | 0.369565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086207 | 174 | 7 | 49 | 24.857143 | 0.867925 | 0.931034 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
7f971ba3a4c90b1c5558c0a059cdc57036b5b1c5 | 83 | py | Python | api/namex/services/nro/__init__.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 4 | 2018-10-05T23:41:05.000Z | 2019-06-19T16:17:50.000Z | api/namex/services/nro/__init__.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 635 | 2018-05-31T04:12:46.000Z | 2022-03-31T18:45:42.000Z | api/namex/services/nro/__init__.py | rarmitag/namex | 1b308bf96130619d4a61d44e075cc7ab177dc6cd | [
"Apache-2.0"
] | 71 | 2018-05-14T20:47:55.000Z | 2022-03-31T23:08:30.000Z |
from .exceptions import NROServicesError
from .oracle_services import NROServices
| 20.75 | 40 | 0.86747 | 9 | 83 | 7.888889 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108434 | 83 | 3 | 41 | 27.666667 | 0.959459 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
f68a767252a28d5328a51d8982f4351c757c5a29 | 16 | py | Python | pkgs/vscode-include-fix/src/__init__.py | faker2021/vitalpkgs | 8f1f7e327af10086edc7be81763bbe47d6379a44 | [
"MIT"
] | null | null | null | pkgs/vscode-include-fix/src/__init__.py | faker2021/vitalpkgs | 8f1f7e327af10086edc7be81763bbe47d6379a44 | [
"MIT"
] | null | null | null | pkgs/vscode-include-fix/src/__init__.py | faker2021/vitalpkgs | 8f1f7e327af10086edc7be81763bbe47d6379a44 | [
"MIT"
] | 3 | 2021-06-11T17:31:24.000Z | 2022-03-15T02:48:55.000Z | # Placeholder
| 4 | 13 | 0.6875 | 1 | 16 | 11 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 16 | 3 | 14 | 5.333333 | 0.916667 | 0.6875 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 1 | 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 | 5 |
f691161180a41bf3e0a8e3063756d590f9eb3312 | 156 | py | Python | tests/example_package/test_example_package.py | johnhkchen/python-basics | 8d6743a40fd0e3fd49591e2c4d3ae7eda51c68fe | [
"MIT"
] | null | null | null | tests/example_package/test_example_package.py | johnhkchen/python-basics | 8d6743a40fd0e3fd49591e2c4d3ae7eda51c68fe | [
"MIT"
] | null | null | null | tests/example_package/test_example_package.py | johnhkchen/python-basics | 8d6743a40fd0e3fd49591e2c4d3ae7eda51c68fe | [
"MIT"
] | null | null | null | ''' Bare-bones test to see if package(s) can be discovered '''
from example_package.example import add_one
def test_add_one():
assert add_one(1) == 2
| 22.285714 | 62 | 0.717949 | 27 | 156 | 3.962963 | 0.740741 | 0.168224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015504 | 0.173077 | 156 | 6 | 63 | 26 | 0.813953 | 0.346154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
f691776f05e0b56850fa8f499a14eeab2db4e897 | 1,061 | py | Python | twitsocket/templatetags/twitsocket_tags.py | leekchan/django-twitsocket | ca14a9fcb7dc33c41912f99e0fc5bac1630657e4 | [
"BSD-3-Clause"
] | 6 | 2016-01-26T02:50:26.000Z | 2021-01-07T20:54:41.000Z | twitsocket/templatetags/twitsocket_tags.py | brutasse-archive/django-twitsocket | ca14a9fcb7dc33c41912f99e0fc5bac1630657e4 | [
"BSD-3-Clause"
] | null | null | null | twitsocket/templatetags/twitsocket_tags.py | brutasse-archive/django-twitsocket | ca14a9fcb7dc33c41912f99e0fc5bac1630657e4 | [
"BSD-3-Clause"
] | 2 | 2015-09-16T02:10:05.000Z | 2016-07-25T07:40:49.000Z | from django import template
from django.conf import settings
from twitsocket.models import Tweet, Top, Flooder
register = template.Library()
@register.inclusion_tag('twitsocket/websocket.html')
def websocket_client():
return {'websocket_server': settings.WEBSOCKET_SERVER}
@register.inclusion_tag('twitsocket/tweets.html')
def render_tweets(count):
count = int(count)
return {'tweets': Tweet.objects.all()[:count]}
@register.inclusion_tag('twitsocket/flash_hack.html')
def flash_hack():
return {'STATIC_URL': settings.STATIC_URL}
@register.inclusion_tag('twitsocket/top_tweets.html')
def top_tweets(count):
count = int(count)
return {'top_tweets': Top.objects.all()[:count]}
@register.inclusion_tag('twitsocket/top_users.html')
def top_users(count):
count = int(count)
return {'top_users': Flooder.objects.all()[:count]}
@register.inclusion_tag('twitsocket/count.html')
def count():
return {'count': Tweet.objects.count()}
@register.inclusion_tag('twitsocket/switch.html')
def retweet_switch():
return {}
| 23.577778 | 58 | 0.739868 | 134 | 1,061 | 5.69403 | 0.253731 | 0.155963 | 0.183486 | 0.275229 | 0.387942 | 0.294889 | 0.176933 | 0 | 0 | 0 | 0 | 0 | 0.115928 | 1,061 | 44 | 59 | 24.113636 | 0.813433 | 0 | 0 | 0.107143 | 0 | 0 | 0.210179 | 0.157399 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.107143 | 0.142857 | 0.607143 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
f695eca678cb07686710f3a8dc35e7e3269ebbc9 | 42 | py | Python | 1_getting_started/week3/hello_world.py | thanyad/learning-python | 2389f1abe9f898ed8deee50e538f0ee30057e0d5 | [
"Apache-2.0"
] | null | null | null | 1_getting_started/week3/hello_world.py | thanyad/learning-python | 2389f1abe9f898ed8deee50e538f0ee30057e0d5 | [
"Apache-2.0"
] | null | null | null | 1_getting_started/week3/hello_world.py | thanyad/learning-python | 2389f1abe9f898ed8deee50e538f0ee30057e0d5 | [
"Apache-2.0"
] | null | null | null | print('Hello World!')
print('first code')
| 14 | 21 | 0.690476 | 6 | 42 | 4.833333 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095238 | 42 | 2 | 22 | 21 | 0.763158 | 0 | 0 | 0 | 0 | 0 | 0.52381 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
f6e4bc208d3d0497d9252876b9bfa7a4058b8669 | 6,542 | py | Python | tempest/lib/api_schema/response/volume/groups.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 254 | 2015-01-05T19:22:52.000Z | 2022-03-29T08:14:54.000Z | tempest/lib/api_schema/response/volume/groups.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 13 | 2015-03-02T15:53:04.000Z | 2022-02-16T02:28:14.000Z | tempest/lib/api_schema/response/volume/groups.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 367 | 2015-01-07T15:05:39.000Z | 2022-03-04T09:50:35.000Z | # Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tempest.lib.api_schema.response.compute.v2_1 import parameter_types
create_group = {
'status_code': [202],
'response_body': {
'type': 'object',
'properties': {
'group': {
'type': 'object',
'properties': {
'id': {'type': 'string', 'format': 'uuid'},
'name': {'type': 'string'},
},
'additionalProperties': False,
'required': ['id', 'name']
}
},
'additionalProperties': False,
'required': ['group']
}
}
delete_group = {'status_code': [202]}
show_group = {
'status_code': [200],
'response_body': {
'type': 'object',
'properties': {
'group': {
'type': 'object',
'properties': {
'status': {'type': 'string'},
'description': {'type': ['string', 'null']},
'availability_zone': {'type': 'string'},
'created_at': parameter_types.date_time,
'group_type': {'type': 'string', 'format': 'uuid'},
'group_snapshot_id': {'type': ['string', 'null']},
'source_group_id': {'type': ['string', 'null']},
'volume_types': {
'type': 'array',
'items': {'type': 'string', 'format': 'uuid'}
},
'id': {'type': 'string', 'format': 'uuid'},
'name': {'type': 'string'},
# TODO(zhufl): volumes is added in 3.25, we should move it
# to the 3.25 schema file when microversion is supported
# in volume interfaces
'volumes': {
'type': 'array',
'items': {'type': 'string', 'format': 'uuid'}
},
# TODO(zhufl): replication_status is added in 3.38, we
# should move it to the 3.38 schema file when microversion
# is supported in volume interfaces
'replication_status': {'type': ['string', 'null']}
},
'additionalProperties': False,
'required': ['status', 'description', 'created_at',
'group_type', 'volume_types', 'id', 'name']
}
},
'additionalProperties': False,
'required': ['group']
}
}
list_groups_no_detail = {
'status_code': [200],
'response_body': {
'type': 'object',
'properties': {
'groups': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'id': {'type': 'string', 'format': 'uuid'},
'name': {'type': 'string'}
},
'additionalProperties': False,
'required': ['id', 'name'],
}
}
},
'additionalProperties': False,
'required': ['groups'],
}
}
list_groups_with_detail = {
'status_code': [200],
'response_body': {
'type': 'object',
'properties': {
'groups': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'status': {'type': 'string'},
'description': {'type': ['string', 'null']},
'availability_zone': {'type': 'string'},
'created_at': parameter_types.date_time,
'group_type': {'type': 'string', 'format': 'uuid'},
'group_snapshot_id': {'type': ['string', 'null']},
'source_group_id': {'type': ['string', 'null']},
'volume_types': {
'type': 'array',
'items': {'type': 'string', 'format': 'uuid'}
},
'id': {'type': 'string', 'format': 'uuid'},
'name': {'type': 'string'},
# TODO(zhufl): volumes is added in 3.25, we should
# move it to the 3.25 schema file when microversion
# is supported in volume interfaces
'volumes': {
'type': 'array',
'items': {'type': 'string', 'format': 'uuid'}
},
# TODO(zhufl): replication_status is added in 3.38, we
# should move it to the 3.38 schema file when
# microversion is supported in volume interfaces
'replication_status': {'type': ['string', 'null']}
},
'additionalProperties': False,
'required': ['status', 'description', 'created_at',
'group_type', 'volume_types', 'id', 'name']
}
}
},
'additionalProperties': False,
'required': ['groups'],
}
}
create_group_from_source = {
'status_code': [202],
'response_body': {
'type': 'object',
'properties': {
'group': {
'type': 'object',
'properties': {
'id': {'type': 'string', 'format': 'uuid'},
'name': {'type': 'string'},
},
'additionalProperties': False,
'required': ['id', 'name']
}
},
'additionalProperties': False,
'required': ['group']
}
}
update_group = {'status_code': [202]}
reset_group_status = {'status_code': [202]}
| 38.034884 | 78 | 0.430602 | 520 | 6,542 | 5.3 | 0.251923 | 0.101597 | 0.063861 | 0.079826 | 0.758708 | 0.758708 | 0.75254 | 0.75254 | 0.747823 | 0.734398 | 0 | 0.01534 | 0.422042 | 6,542 | 171 | 79 | 38.25731 | 0.713568 | 0.176857 | 0 | 0.697842 | 0 | 0 | 0.298003 | 0 | 0 | 0 | 0 | 0.005848 | 0 | 1 | 0 | false | 0 | 0.007194 | 0 | 0.007194 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
f6e50327a0a48c113ce88e2f559408b9e726be10 | 122 | py | Python | source/performance/report_manager.py | qg0/EliteQuant_Python | f9b24280443e824e8f6841ac136a319406bba3c6 | [
"Apache-2.0"
] | 8 | 2020-07-13T02:42:13.000Z | 2022-02-18T21:46:52.000Z | source/performance/report_manager.py | qg0/EliteQuant_Python | f9b24280443e824e8f6841ac136a319406bba3c6 | [
"Apache-2.0"
] | null | null | null | source/performance/report_manager.py | qg0/EliteQuant_Python | f9b24280443e824e8f6841ac136a319406bba3c6 | [
"Apache-2.0"
] | 5 | 2020-07-13T02:42:22.000Z | 2021-12-29T15:16:53.000Z | # encoding: UTF-8
from __future__ import print_function
class ReportManager(object):
def __init__(self):
pass | 20.333333 | 37 | 0.729508 | 15 | 122 | 5.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010204 | 0.196721 | 122 | 6 | 38 | 20.333333 | 0.806122 | 0.122951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.25 | 0.25 | 0 | 0.75 | 0.25 | 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 | 1 | 0 | 0 | 5 |
100ac31144fe535de089943b09dcae372a8bc44c | 130 | py | Python | api/model/__init__.py | domenic-corso/kris-kringle-python-web-app | 57d209edfc3644b04e95f2ef4adb6d48e87142e2 | [
"MIT"
] | null | null | null | api/model/__init__.py | domenic-corso/kris-kringle-python-web-app | 57d209edfc3644b04e95f2ef4adb6d48e87142e2 | [
"MIT"
] | null | null | null | api/model/__init__.py | domenic-corso/kris-kringle-python-web-app | 57d209edfc3644b04e95f2ef4adb6d48e87142e2 | [
"MIT"
] | null | null | null | from .Participant import Participant
from .GiverReceiverLink import GiverReceiverLink
from .HintCollection import HintCollection | 43.333333 | 49 | 0.876923 | 12 | 130 | 9.5 | 0.416667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 130 | 3 | 50 | 43.333333 | 0.974359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
63f17a7b0199deb61f35962fc69dff453ff54893 | 170 | py | Python | libookapi/views/__init__.py | yangco-le/libook | 1b6e6c55b982f07d6ec0df200dc42e89ac74d1c5 | [
"Apache-2.0"
] | 8 | 2021-05-14T14:52:24.000Z | 2021-11-18T09:04:21.000Z | libookapi/views/__init__.py | yangco-le/libook | 1b6e6c55b982f07d6ec0df200dc42e89ac74d1c5 | [
"Apache-2.0"
] | 16 | 2021-04-29T07:17:54.000Z | 2021-06-01T08:39:24.000Z | libookapi/views/__init__.py | yangco-le/libook | 1b6e6c55b982f07d6ec0df200dc42e89ac74d1c5 | [
"Apache-2.0"
] | 1 | 2021-05-06T13:28:39.000Z | 2021-05-06T13:28:39.000Z | from .simple import *
from .reservations import *
from .timeslice import *
from .region_group import *
from .device import *
from .token import *
from .frontend import *
| 21.25 | 27 | 0.752941 | 22 | 170 | 5.772727 | 0.454545 | 0.472441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164706 | 170 | 7 | 28 | 24.285714 | 0.894366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
1215f2abab0a8d2d2eb65b9c52dfae822ba4c520 | 60 | py | Python | hello_word.py | crweber9874/docker_test | f70c7fe23b525765d76b82d49869e709e852bf3e | [
"Apache-2.0"
] | null | null | null | hello_word.py | crweber9874/docker_test | f70c7fe23b525765d76b82d49869e709e852bf3e | [
"Apache-2.0"
] | null | null | null | hello_word.py | crweber9874/docker_test | f70c7fe23b525765d76b82d49869e709e852bf3e | [
"Apache-2.0"
] | null | null | null | print("I suspect this worked. I don't know. Hello, World!")
| 30 | 59 | 0.7 | 11 | 60 | 3.818182 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 60 | 1 | 60 | 60 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
121d740e950e7bb055755819fb928bfa86e2de15 | 43 | py | Python | model/SubmissionError.py | MiguelCarino/maniwani | 9519b89aeedee40527ba49425964a077d74a7de4 | [
"MIT"
] | 81 | 2018-08-09T12:58:01.000Z | 2022-02-02T05:56:48.000Z | model/SubmissionError.py | MiguelCarino/maniwani | 9519b89aeedee40527ba49425964a077d74a7de4 | [
"MIT"
] | 456 | 2019-12-09T02:28:26.000Z | 2021-08-03T03:28:12.000Z | model/SubmissionError.py | MiguelCarino/maniwani | 9519b89aeedee40527ba49425964a077d74a7de4 | [
"MIT"
] | 13 | 2018-08-11T10:12:01.000Z | 2022-03-10T04:32:05.000Z | class SubmissionError(Exception):
pass
| 14.333333 | 33 | 0.767442 | 4 | 43 | 8.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162791 | 43 | 2 | 34 | 21.5 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
1250944ca72f1f4cd9fe1f68c33ae359ace61451 | 88 | py | Python | URI/1 - INICIANTE/Python/1143 - QuadradoEAoCubo.py | william-james-pj/LogicaProgramacao | 629f746e34da2e829dc7ea2e489ac36bb1b1fb13 | [
"MIT"
] | 1 | 2020-04-14T16:48:16.000Z | 2020-04-14T16:48:16.000Z | URI/1 - INICIANTE/Python/1143 - QuadradoEAoCubo.py | william-james-pj/LogicaProgramacao | 629f746e34da2e829dc7ea2e489ac36bb1b1fb13 | [
"MIT"
] | null | null | null | URI/1 - INICIANTE/Python/1143 - QuadradoEAoCubo.py | william-james-pj/LogicaProgramacao | 629f746e34da2e829dc7ea2e489ac36bb1b1fb13 | [
"MIT"
] | null | null | null | num = int(input())
for y in range(1, num+1):
print('{} {} {}'.format(y, y*y, y*y*y)) | 29.333333 | 43 | 0.5 | 18 | 88 | 2.444444 | 0.555556 | 0.227273 | 0.272727 | 0.272727 | 0.136364 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027778 | 0.181818 | 88 | 3 | 43 | 29.333333 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0.089888 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
d62df3eb452a122915d47a762a0594feb02c41d2 | 48 | py | Python | research_jupyter_templates/__init__.py | martinlarsalbert/research_jupyter_templates | 834c61753923239480cd2a18b01ba46aaa3a37ad | [
"MIT"
] | null | null | null | research_jupyter_templates/__init__.py | martinlarsalbert/research_jupyter_templates | 834c61753923239480cd2a18b01ba46aaa3a37ad | [
"MIT"
] | null | null | null | research_jupyter_templates/__init__.py | martinlarsalbert/research_jupyter_templates | 834c61753923239480cd2a18b01ba46aaa3a37ad | [
"MIT"
] | null | null | null | import os.path
path = os.path.dirname(__file__) | 16 | 32 | 0.770833 | 8 | 48 | 4.125 | 0.625 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104167 | 48 | 3 | 32 | 16 | 0.767442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 1 | 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 | 5 |
c3a51e7b5cd4abc20c1f18c6ed36b21699929cb9 | 50 | py | Python | pettingzoo/sisl/multiwalker_v0.py | MarioJayakumar/PettingZoo | 0673d44c33ae1843a773babf5e6595baf8214664 | [
"MIT"
] | 1 | 2020-08-13T00:09:48.000Z | 2020-08-13T00:09:48.000Z | pettingzoo/sisl/multiwalker_v0.py | KonstantinKlepikov/PettingZoo | 34c4d38e8fbc1cd6ecbebe58176e6d39ba1645de | [
"MIT"
] | null | null | null | pettingzoo/sisl/multiwalker_v0.py | KonstantinKlepikov/PettingZoo | 34c4d38e8fbc1cd6ecbebe58176e6d39ba1645de | [
"MIT"
] | 1 | 2021-01-25T22:57:41.000Z | 2021-01-25T22:57:41.000Z | from .multiwalker.multiwalker import env, raw_env
| 25 | 49 | 0.84 | 7 | 50 | 5.857143 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 50 | 1 | 50 | 50 | 0.911111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
c3c1cf77090bb6d6558b3e3fb310a6546d465d13 | 222 | py | Python | x_3_1.py | ofl/kuku | 76eefc0d3d859051473ee0d5f48b5d42d17d05a6 | [
"MIT"
] | null | null | null | x_3_1.py | ofl/kuku | 76eefc0d3d859051473ee0d5f48b5d42d17d05a6 | [
"MIT"
] | 4 | 2021-09-23T03:19:52.000Z | 2021-11-13T10:38:21.000Z | x_3_1.py | ofl/kuku | 76eefc0d3d859051473ee0d5f48b5d42d17d05a6 | [
"MIT"
] | null | null | null | # x_3_1
#
# γγ³γγεθγ«γaγγbγγcγγdγγγγγγγ©γγͺε€γ¨γͺγγγδΊζ³γγ¦γγ γγ
# γγ³γ
print(100 > 90)
print(90 == 90)
print(90 != 90)
print(90 <= 90)
a = 100 < 70
b = 60 == 60
c = 75 < 75
d = 60 >= 55
# print(a)
# print(b)
# print(c)
# print(d)
| 11.1 | 43 | 0.554054 | 42 | 222 | 2.880952 | 0.404762 | 0.173554 | 0.223141 | 0.272727 | 0.239669 | 0.239669 | 0.239669 | 0 | 0 | 0 | 0 | 0.209302 | 0.225225 | 222 | 19 | 44 | 11.684211 | 0.494186 | 0.391892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
c3d24a07d23fc48ee729b841238d56e329435ced | 200 | gyp | Python | binding.gyp | aalexand/sampling-heap-profiler | 3931dc8686e1c59b61061c493d565de56fea70e9 | [
"Apache-2.0"
] | null | null | null | binding.gyp | aalexand/sampling-heap-profiler | 3931dc8686e1c59b61061c493d565de56fea70e9 | [
"Apache-2.0"
] | null | null | null | binding.gyp | aalexand/sampling-heap-profiler | 3931dc8686e1c59b61061c493d565de56fea70e9 | [
"Apache-2.0"
] | null | null | null | {
"targets": [
{
"target_name": "sampling_heap_profiler",
"sources": [ "bindings/sampling-heap-profiler.cc" ],
"include_dirs": [ "<!(node -e \"require('nan')\")" ]
},
]
} | 22.222222 | 58 | 0.52 | 18 | 200 | 5.555556 | 0.833333 | 0.24 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.24 | 200 | 9 | 59 | 22.222222 | 0.657895 | 0 | 0 | 0 | 0 | 0 | 0.542289 | 0.278607 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.