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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d6a64cd5ff6e72f9718ab3e43ed2ff874fe3c18a | 6,407 | py | Python | loldib/getratings/models/NA/na_nasus/na_nasus_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_nasus/na_nasus_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_nasus/na_nasus_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from getratings.models.ratings import Ratings
class NA_Nasus_Bot_Aatrox(Ratings):
pass
class NA_Nasus_Bot_Ahri(Ratings):
pass
class NA_Nasus_Bot_Akali(Ratings):
pass
class NA_Nasus_Bot_Alistar(Ratings):
pass
class NA_Nasus_Bot_Amumu(Ratings):
pass
class NA_Nasus_Bot_Anivia(Ratings):
pass
class NA_Nasus_Bot_Annie(Ratings):
pass
class NA_Nasus_Bot_Ashe(Ratings):
pass
class NA_Nasus_Bot_AurelionSol(Ratings):
pass
class NA_Nasus_Bot_Azir(Ratings):
pass
class NA_Nasus_Bot_Bard(Ratings):
pass
class NA_Nasus_Bot_Blitzcrank(Ratings):
pass
class NA_Nasus_Bot_Brand(Ratings):
pass
class NA_Nasus_Bot_Braum(Ratings):
pass
class NA_Nasus_Bot_Caitlyn(Ratings):
pass
class NA_Nasus_Bot_Camille(Ratings):
pass
class NA_Nasus_Bot_Cassiopeia(Ratings):
pass
class NA_Nasus_Bot_Chogath(Ratings):
pass
class NA_Nasus_Bot_Corki(Ratings):
pass
class NA_Nasus_Bot_Darius(Ratings):
pass
class NA_Nasus_Bot_Diana(Ratings):
pass
class NA_Nasus_Bot_Draven(Ratings):
pass
class NA_Nasus_Bot_DrMundo(Ratings):
pass
class NA_Nasus_Bot_Ekko(Ratings):
pass
class NA_Nasus_Bot_Elise(Ratings):
pass
class NA_Nasus_Bot_Evelynn(Ratings):
pass
class NA_Nasus_Bot_Ezreal(Ratings):
pass
class NA_Nasus_Bot_Fiddlesticks(Ratings):
pass
class NA_Nasus_Bot_Fiora(Ratings):
pass
class NA_Nasus_Bot_Fizz(Ratings):
pass
class NA_Nasus_Bot_Galio(Ratings):
pass
class NA_Nasus_Bot_Gangplank(Ratings):
pass
class NA_Nasus_Bot_Garen(Ratings):
pass
class NA_Nasus_Bot_Gnar(Ratings):
pass
class NA_Nasus_Bot_Gragas(Ratings):
pass
class NA_Nasus_Bot_Graves(Ratings):
pass
class NA_Nasus_Bot_Hecarim(Ratings):
pass
class NA_Nasus_Bot_Heimerdinger(Ratings):
pass
class NA_Nasus_Bot_Illaoi(Ratings):
pass
class NA_Nasus_Bot_Irelia(Ratings):
pass
class NA_Nasus_Bot_Ivern(Ratings):
pass
class NA_Nasus_Bot_Janna(Ratings):
pass
class NA_Nasus_Bot_JarvanIV(Ratings):
pass
class NA_Nasus_Bot_Jax(Ratings):
pass
class NA_Nasus_Bot_Jayce(Ratings):
pass
class NA_Nasus_Bot_Jhin(Ratings):
pass
class NA_Nasus_Bot_Jinx(Ratings):
pass
class NA_Nasus_Bot_Kalista(Ratings):
pass
class NA_Nasus_Bot_Karma(Ratings):
pass
class NA_Nasus_Bot_Karthus(Ratings):
pass
class NA_Nasus_Bot_Kassadin(Ratings):
pass
class NA_Nasus_Bot_Katarina(Ratings):
pass
class NA_Nasus_Bot_Kayle(Ratings):
pass
class NA_Nasus_Bot_Kayn(Ratings):
pass
class NA_Nasus_Bot_Kennen(Ratings):
pass
class NA_Nasus_Bot_Khazix(Ratings):
pass
class NA_Nasus_Bot_Kindred(Ratings):
pass
class NA_Nasus_Bot_Kled(Ratings):
pass
class NA_Nasus_Bot_KogMaw(Ratings):
pass
class NA_Nasus_Bot_Leblanc(Ratings):
pass
class NA_Nasus_Bot_LeeSin(Ratings):
pass
class NA_Nasus_Bot_Leona(Ratings):
pass
class NA_Nasus_Bot_Lissandra(Ratings):
pass
class NA_Nasus_Bot_Lucian(Ratings):
pass
class NA_Nasus_Bot_Lulu(Ratings):
pass
class NA_Nasus_Bot_Lux(Ratings):
pass
class NA_Nasus_Bot_Malphite(Ratings):
pass
class NA_Nasus_Bot_Malzahar(Ratings):
pass
class NA_Nasus_Bot_Maokai(Ratings):
pass
class NA_Nasus_Bot_MasterYi(Ratings):
pass
class NA_Nasus_Bot_MissFortune(Ratings):
pass
class NA_Nasus_Bot_MonkeyKing(Ratings):
pass
class NA_Nasus_Bot_Mordekaiser(Ratings):
pass
class NA_Nasus_Bot_Morgana(Ratings):
pass
class NA_Nasus_Bot_Nami(Ratings):
pass
class NA_Nasus_Bot_Nasus(Ratings):
pass
class NA_Nasus_Bot_Nautilus(Ratings):
pass
class NA_Nasus_Bot_Nidalee(Ratings):
pass
class NA_Nasus_Bot_Nocturne(Ratings):
pass
class NA_Nasus_Bot_Nunu(Ratings):
pass
class NA_Nasus_Bot_Olaf(Ratings):
pass
class NA_Nasus_Bot_Orianna(Ratings):
pass
class NA_Nasus_Bot_Ornn(Ratings):
pass
class NA_Nasus_Bot_Pantheon(Ratings):
pass
class NA_Nasus_Bot_Poppy(Ratings):
pass
class NA_Nasus_Bot_Quinn(Ratings):
pass
class NA_Nasus_Bot_Rakan(Ratings):
pass
class NA_Nasus_Bot_Rammus(Ratings):
pass
class NA_Nasus_Bot_RekSai(Ratings):
pass
class NA_Nasus_Bot_Renekton(Ratings):
pass
class NA_Nasus_Bot_Rengar(Ratings):
pass
class NA_Nasus_Bot_Riven(Ratings):
pass
class NA_Nasus_Bot_Rumble(Ratings):
pass
class NA_Nasus_Bot_Ryze(Ratings):
pass
class NA_Nasus_Bot_Sejuani(Ratings):
pass
class NA_Nasus_Bot_Shaco(Ratings):
pass
class NA_Nasus_Bot_Shen(Ratings):
pass
class NA_Nasus_Bot_Shyvana(Ratings):
pass
class NA_Nasus_Bot_Singed(Ratings):
pass
class NA_Nasus_Bot_Sion(Ratings):
pass
class NA_Nasus_Bot_Sivir(Ratings):
pass
class NA_Nasus_Bot_Skarner(Ratings):
pass
class NA_Nasus_Bot_Sona(Ratings):
pass
class NA_Nasus_Bot_Soraka(Ratings):
pass
class NA_Nasus_Bot_Swain(Ratings):
pass
class NA_Nasus_Bot_Syndra(Ratings):
pass
class NA_Nasus_Bot_TahmKench(Ratings):
pass
class NA_Nasus_Bot_Taliyah(Ratings):
pass
class NA_Nasus_Bot_Talon(Ratings):
pass
class NA_Nasus_Bot_Taric(Ratings):
pass
class NA_Nasus_Bot_Teemo(Ratings):
pass
class NA_Nasus_Bot_Thresh(Ratings):
pass
class NA_Nasus_Bot_Tristana(Ratings):
pass
class NA_Nasus_Bot_Trundle(Ratings):
pass
class NA_Nasus_Bot_Tryndamere(Ratings):
pass
class NA_Nasus_Bot_TwistedFate(Ratings):
pass
class NA_Nasus_Bot_Twitch(Ratings):
pass
class NA_Nasus_Bot_Udyr(Ratings):
pass
class NA_Nasus_Bot_Urgot(Ratings):
pass
class NA_Nasus_Bot_Varus(Ratings):
pass
class NA_Nasus_Bot_Vayne(Ratings):
pass
class NA_Nasus_Bot_Veigar(Ratings):
pass
class NA_Nasus_Bot_Velkoz(Ratings):
pass
class NA_Nasus_Bot_Vi(Ratings):
pass
class NA_Nasus_Bot_Viktor(Ratings):
pass
class NA_Nasus_Bot_Vladimir(Ratings):
pass
class NA_Nasus_Bot_Volibear(Ratings):
pass
class NA_Nasus_Bot_Warwick(Ratings):
pass
class NA_Nasus_Bot_Xayah(Ratings):
pass
class NA_Nasus_Bot_Xerath(Ratings):
pass
class NA_Nasus_Bot_XinZhao(Ratings):
pass
class NA_Nasus_Bot_Yasuo(Ratings):
pass
class NA_Nasus_Bot_Yorick(Ratings):
pass
class NA_Nasus_Bot_Zac(Ratings):
pass
class NA_Nasus_Bot_Zed(Ratings):
pass
class NA_Nasus_Bot_Ziggs(Ratings):
pass
class NA_Nasus_Bot_Zilean(Ratings):
pass
class NA_Nasus_Bot_Zyra(Ratings):
pass
| 15.364508 | 46 | 0.761667 | 972 | 6,407 | 4.59465 | 0.151235 | 0.216301 | 0.370802 | 0.463502 | 0.797582 | 0.797582 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173404 | 6,407 | 416 | 47 | 15.401442 | 0.843278 | 0 | 0 | 0.498195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.498195 | 0.00361 | 0 | 0.501805 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
d6e43fc251e91a12bc80bfc3f242b531f2a2fe35 | 30 | py | Python | project/server/app.py | tafodinho/transfuzol_api | f8a37e4665c746e6a123b26971ba09066f342296 | [
"MIT"
] | null | null | null | project/server/app.py | tafodinho/transfuzol_api | f8a37e4665c746e6a123b26971ba09066f342296 | [
"MIT"
] | null | null | null | project/server/app.py | tafodinho/transfuzol_api | f8a37e4665c746e6a123b26971ba09066f342296 | [
"MIT"
] | null | null | null | from project.server import app | 30 | 30 | 0.866667 | 5 | 30 | 5.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 30 | 1 | 30 | 30 | 0.962963 | 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 | 1 | 0 | 0 | 6 |
ba3dfa65b5e57e5f1a5d89b7d0da988f1f299a96 | 111 | py | Python | testproject/tests/conftest.py | Onemind-Services-LLC/django-rest-framework-rapidjson | 0810b87352f3cc61653432559cdebfdbde179d13 | [
"MIT"
] | 15 | 2017-11-01T15:30:12.000Z | 2020-11-03T00:57:37.000Z | testproject/tests/conftest.py | dmpayton/django-rest-framework-rapidjson | f13c54d1991ffa1b02e590c2bee208771747e39a | [
"MIT"
] | 3 | 2019-02-22T13:31:38.000Z | 2019-02-22T18:07:28.000Z | testproject/tests/conftest.py | dmpayton/django-rest-framework-rapidjson | f13c54d1991ffa1b02e590c2bee208771747e39a | [
"MIT"
] | 6 | 2018-10-20T16:01:31.000Z | 2021-09-24T15:45:00.000Z | import pytest
from rest_framework.test import APIClient
@pytest.fixture
def client():
return APIClient()
| 13.875 | 41 | 0.774775 | 14 | 111 | 6.071429 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153153 | 111 | 7 | 42 | 15.857143 | 0.904255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | true | 0 | 0.4 | 0.2 | 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 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
ba81db08ac679f88dc5684540c68e205ff8ac32b | 5,780 | py | Python | tests/platforms/test_arknights.py | he0119/nonebot-bison | 31f02d73dbdfcbbd4b824a9b6a1cfc9aa0fc6b09 | [
"MIT"
] | 20 | 2021-11-27T16:52:21.000Z | 2022-03-31T07:29:29.000Z | tests/platforms/test_arknights.py | he0119/nonebot-bison | 31f02d73dbdfcbbd4b824a9b6a1cfc9aa0fc6b09 | [
"MIT"
] | 24 | 2021-12-10T06:00:49.000Z | 2022-03-31T04:25:36.000Z | tests/platforms/test_arknights.py | he0119/nonebot-bison | 31f02d73dbdfcbbd4b824a9b6a1cfc9aa0fc6b09 | [
"MIT"
] | 4 | 2021-11-23T03:25:24.000Z | 2022-02-21T10:20:37.000Z | import pytest
import respx
from httpx import Response
from nonebug.app import App
from .utils import get_file, get_json
@pytest.fixture
def arknights(app: App):
from nonebot_bison.platform import platform_manager
return platform_manager["arknights"]
@pytest.fixture(scope="module")
def arknights_list_0():
return get_json("arknights_list_0.json")
@pytest.fixture(scope="module")
def arknights_list__1():
return get_json("arknights_list_-1.json")
@pytest.fixture(scope="module")
def arknights_list_1():
return get_json("arknights_list_1.json")
@pytest.fixture(scope="module")
def monster_siren_list_0():
return get_json("monster-siren_list_0.json")
@pytest.fixture(scope="module")
def monster_siren_list_1():
return get_json("monster-siren_list_1.json")
@pytest.mark.asyncio
@respx.mock
async def test_fetch_new(
arknights,
dummy_user_subinfo,
arknights_list_0,
arknights_list__1,
monster_siren_list_0,
monster_siren_list_1,
):
ak_list_router = respx.get(
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/announcement.meta.json"
)
detail_router = respx.get(
"https://ak.hycdn.cn/announce/IOS/announcement/807_1640060583.html"
)
version_router = respx.get(
"https://ak-conf.hypergryph.com/config/prod/official/IOS/version"
)
preannouncement_router = respx.get(
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/preannouncement.meta.json"
)
monster_siren_router = respx.get("https://monster-siren.hypergryph.com/api/news")
terra_list = respx.get("https://terra-historicus.hypergryph.com/api/recentUpdate")
ak_list_router.mock(return_value=Response(200, json=arknights_list__1))
detail_router.mock(
return_value=Response(200, text=get_file("arknights-detail-807"))
)
version_router.mock(
return_value=Response(200, json=get_json("arknights-version-0.json"))
)
preannouncement_router.mock(
return_value=Response(200, json=get_json("arknights-pre-0.json"))
)
monster_siren_router.mock(return_value=Response(200, json=monster_siren_list_0))
terra_list.mock(return_value=Response(200, json=get_json("terra-hist-0.json")))
target = ""
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
assert ak_list_router.called
assert len(res) == 0
assert not detail_router.called
mock_data = arknights_list_0
ak_list_router.mock(return_value=Response(200, json=mock_data))
res3 = await arknights.fetch_new_post(target, [dummy_user_subinfo])
assert len(res3[0][1]) == 1
assert detail_router.called
post = res3[0][1][0]
assert post.target_type == "arknights"
assert post.text == ""
assert post.url == ""
assert post.target_name == "明日方舟游戏内公告"
assert len(post.pics) == 1
# assert(post.pics == ['https://ak-fs.hypergryph.com/announce/images/20210623/e6f49aeb9547a2278678368a43b95b07.jpg'])
print(res3[0][1])
await post.generate_messages()
terra_list.mock(return_value=Response(200, json=get_json("terra-hist-1.json")))
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
assert len(res) == 1
post = res[0][1][0]
assert post.target_type == "terra-historicus"
assert post.text == "123罗德岛!? - 「掠风」篇"
assert post.url == "https://terra-historicus.hypergryph.com/comic/6253/episode/4938"
assert post.pics == [
"https://web.hycdn.cn/comic/pic/20220507/ab8a2ff408ec7d587775aed70b178ec0.png"
]
@pytest.mark.render
@respx.mock
async def test_send_with_render(
arknights,
dummy_user_subinfo,
arknights_list_0,
arknights_list_1,
monster_siren_list_0,
monster_siren_list_1,
):
ak_list_router = respx.get(
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/announcement.meta.json"
)
detail_router = respx.get(
"https://ak.hycdn.cn/announce/IOS/announcement/805_1640074952.html"
)
version_router = respx.get(
"https://ak-conf.hypergryph.com/config/prod/official/IOS/version"
)
preannouncement_router = respx.get(
"https://ak-conf.hypergryph.com/config/prod/announce_meta/IOS/preannouncement.meta.json"
)
monster_siren_router = respx.get("https://monster-siren.hypergryph.com/api/news")
terra_list = respx.get("https://terra-historicus.hypergryph.com/api/recentUpdate")
ak_list_router.mock(return_value=Response(200, json=arknights_list_0))
detail_router.mock(
return_value=Response(200, text=get_file("arknights-detail-805"))
)
version_router.mock(
return_value=Response(200, json=get_json("arknights-version-0.json"))
)
preannouncement_router.mock(
return_value=Response(200, json=get_json("arknights-pre-0.json"))
)
monster_siren_router.mock(return_value=Response(200, json=monster_siren_list_0))
terra_list.mock(return_value=Response(200, json=get_json("terra-hist-0.json")))
target = ""
res = await arknights.fetch_new_post(target, [dummy_user_subinfo])
assert ak_list_router.called
assert len(res) == 0
assert not detail_router.called
mock_data = arknights_list_1
ak_list_router.mock(return_value=Response(200, json=mock_data))
res3 = await arknights.fetch_new_post(target, [dummy_user_subinfo])
assert len(res3[0][1]) == 1
assert detail_router.called
post = res3[0][1][0]
assert post.target_type == "arknights"
assert post.text == ""
assert post.url == ""
assert post.target_name == "明日方舟游戏内公告"
assert len(post.pics) == 1
# assert(post.pics == ['https://ak-fs.hypergryph.com/announce/images/20210623/e6f49aeb9547a2278678368a43b95b07.jpg'])
print(res3[0][1])
r = await post.generate_messages()
| 35.460123 | 121 | 0.716955 | 791 | 5,780 | 5.006321 | 0.1378 | 0.048485 | 0.056818 | 0.087121 | 0.869444 | 0.843939 | 0.830303 | 0.814394 | 0.811869 | 0.79596 | 0 | 0.048776 | 0.152249 | 5,780 | 162 | 122 | 35.679012 | 0.759388 | 0.039965 | 0 | 0.591549 | 0 | 0.028169 | 0.240714 | 0.02921 | 0 | 0 | 0 | 0 | 0.176056 | 1 | 0.042254 | false | 0 | 0.042254 | 0.035211 | 0.126761 | 0.014085 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
ba8d45877c0b438583cbb7b9c0b9275e1b968472 | 103 | py | Python | networks/__init__.py | skeletonNN/NHFNet | aae968743db3d26aa02bb3efa13c30e433ff7bc7 | [
"MIT"
] | null | null | null | networks/__init__.py | skeletonNN/NHFNet | aae968743db3d26aa02bb3efa13c30e433ff7bc7 | [
"MIT"
] | null | null | null | networks/__init__.py | skeletonNN/NHFNet | aae968743db3d26aa02bb3efa13c30e433ff7bc7 | [
"MIT"
] | null | null | null | from .audio_lstm import *
from .text_lstm import *
from .visual_lstm import *
from .mosei_ab5 import *
| 20.6 | 26 | 0.76699 | 16 | 103 | 4.6875 | 0.5 | 0.4 | 0.56 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011494 | 0.15534 | 103 | 4 | 27 | 25.75 | 0.850575 | 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 | 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 | 6 |
baabbb5569c9e22a8a457ed05cc652f02d32e181 | 42 | py | Python | electoral_college/__init__.py | smrfeld/whats-my-vote-worth | 2cc65d69c5cb4b31b2c103bfaadae963c74f1191 | [
"MIT"
] | null | null | null | electoral_college/__init__.py | smrfeld/whats-my-vote-worth | 2cc65d69c5cb4b31b2c103bfaadae963c74f1191 | [
"MIT"
] | null | null | null | electoral_college/__init__.py | smrfeld/whats-my-vote-worth | 2cc65d69c5cb4b31b2c103bfaadae963c74f1191 | [
"MIT"
] | null | null | null | from .state import *
from .states import * | 21 | 21 | 0.738095 | 6 | 42 | 5.166667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 42 | 2 | 21 | 21 | 0.885714 | 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 | 1 | 0 | 0 | 6 |
bac33abb0013e02b89589b6d68af31368b59805c | 101 | py | Python | users/admin.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 8 | 2019-03-08T10:28:38.000Z | 2019-10-17T00:04:44.000Z | users/admin.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 124 | 2020-02-11T23:51:09.000Z | 2022-01-13T01:06:09.000Z | users/admin.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 3 | 2019-03-07T18:44:55.000Z | 2019-03-08T10:36:50.000Z | from django.contrib import admin
from .models import User_details
admin.site.register(User_details)
| 20.2 | 33 | 0.841584 | 15 | 101 | 5.533333 | 0.666667 | 0.26506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09901 | 101 | 4 | 34 | 25.25 | 0.912088 | 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 | 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 | 6 |
bad7755d41893a8e6ea82c8335e8aa9f2f144f7e | 94 | py | Python | subdir1/subsubdir1/bottom_of_subsubdir1.py | cramraj8/RamPyPackage | 6f4e046e63860a5894bdbe3b4a3059a4f835a8da | [
"Apache-2.0"
] | null | null | null | subdir1/subsubdir1/bottom_of_subsubdir1.py | cramraj8/RamPyPackage | 6f4e046e63860a5894bdbe3b4a3059a4f835a8da | [
"Apache-2.0"
] | null | null | null | subdir1/subsubdir1/bottom_of_subsubdir1.py | cramraj8/RamPyPackage | 6f4e046e63860a5894bdbe3b4a3059a4f835a8da | [
"Apache-2.0"
] | null | null | null |
import sys
class bottom_of_subsubdir1:
print('Hi, this is bottom_of_subsubdir1 FILE')
| 11.75 | 50 | 0.755319 | 14 | 94 | 4.785714 | 0.785714 | 0.238806 | 0.537313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025974 | 0.180851 | 94 | 7 | 51 | 13.428571 | 0.844156 | 0 | 0 | 0 | 0 | 0 | 0.397849 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.666667 | 0.333333 | 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 | 1 | 0 | 0 | 0 | 0 | 6 |
bafbe2c78465df1801dd7b3df4b9db3a1f4281b6 | 52 | py | Python | trpo_kvi/__init__.py | manantomar/Multi-step-Greedy-Reinforcement-Leaarning-Algorithms | f37a4502ef84b939885fe79c82d7cc6c5faa6daf | [
"MIT"
] | 2 | 2020-12-04T11:22:47.000Z | 2021-04-16T07:41:30.000Z | trpo_kvi/__init__.py | manantomar/Multi-step-Greedy-Reinforcement-Leaarning-Algorithms | f37a4502ef84b939885fe79c82d7cc6c5faa6daf | [
"MIT"
] | null | null | null | trpo_kvi/__init__.py | manantomar/Multi-step-Greedy-Reinforcement-Leaarning-Algorithms | f37a4502ef84b939885fe79c82d7cc6c5faa6daf | [
"MIT"
] | 1 | 2021-04-01T01:57:25.000Z | 2021-04-01T01:57:25.000Z | from stable_baselines.trpo_kvi.trpo_kvi import TRPO
| 26 | 51 | 0.884615 | 9 | 52 | 4.777778 | 0.666667 | 0.325581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 52 | 1 | 52 | 52 | 0.895833 | 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 | 1 | 0 | 0 | 6 |
2448cf7400508eb518cfa94d9e5b44612c74c007 | 48 | py | Python | checkov/terraform/__init__.py | mgmt1pyro/Test-Theme | d3e20b62111636ecbe4267c5fff7c2820a9a892d | [
"Apache-2.0"
] | null | null | null | checkov/terraform/__init__.py | mgmt1pyro/Test-Theme | d3e20b62111636ecbe4267c5fff7c2820a9a892d | [
"Apache-2.0"
] | null | null | null | checkov/terraform/__init__.py | mgmt1pyro/Test-Theme | d3e20b62111636ecbe4267c5fff7c2820a9a892d | [
"Apache-2.0"
] | null | null | null | from checkov.terraform.checks.resource import *
| 24 | 47 | 0.833333 | 6 | 48 | 6.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 48 | 1 | 48 | 48 | 0.909091 | 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 | 1 | 0 | 0 | 6 |
031a9028fb3ee3fe8147e65abc308025ba9126a2 | 49,689 | py | Python | venv/lib/python3.8/site-packages/spaceone/api/monitoring/v1/escalation_policy_pb2.py | choonho/plugin-prometheus-mon-webhook | afa7d65d12715fd0480fb4f92a9c62da2d6128e0 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/spaceone/api/monitoring/v1/escalation_policy_pb2.py | choonho/plugin-prometheus-mon-webhook | afa7d65d12715fd0480fb4f92a9c62da2d6128e0 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/spaceone/api/monitoring/v1/escalation_policy_pb2.py | choonho/plugin-prometheus-mon-webhook | afa7d65d12715fd0480fb4f92a9c62da2d6128e0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spaceone/api/monitoring/v1/escalation_policy.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from spaceone.api.core.v1 import query_pb2 as spaceone_dot_api_dot_core_dot_v1_dot_query__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='spaceone/api/monitoring/v1/escalation_policy.proto',
package='spaceone.api.monitoring.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n2spaceone/api/monitoring/v1/escalation_policy.proto\x12\x1aspaceone.api.monitoring.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a spaceone/api/core/v1/query.proto\"\xe5\x01\n\x14\x45scalationPolicyRule\x12^\n\x12notification_level\x18\x01 \x01(\x0e\x32\x42.spaceone.api.monitoring.v1.EscalationPolicyRule.NotificationLevel\x12\x18\n\x10\x65scalate_minutes\x18\x02 \x01(\x05\"S\n\x11NotificationLevel\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x07\n\x03LV1\x10\x02\x12\x07\n\x03LV2\x10\x03\x12\x07\n\x03LV3\x10\x04\x12\x07\n\x03LV4\x10\x05\x12\x07\n\x03LV5\x10\x06\"\x88\x03\n\x1d\x43reateEscalationPolicyRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x05rules\x18\x02 \x03(\x0b\x32\x30.spaceone.api.monitoring.v1.EscalationPolicyRule\x12\x14\n\x0crepeat_count\x18\x03 \x01(\x05\x12m\n\x10\x66inish_condition\x18\x04 \x01(\x0e\x32S.spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.EscalationFinishCondition\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12%\n\x04tags\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x11\n\tdomain_id\x18\x0b \x01(\t\"E\n\x19\x45scalationFinishCondition\x12\x08\n\x04NONE\x10\x00\x12\x10\n\x0c\x41\x43KNOWLEDGED\x10\x01\x12\x0c\n\x08RESOLVED\x10\x02\"\x92\x03\n\x1dUpdateEscalationPolicyRequest\x12\x1c\n\x14\x65scalation_policy_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12?\n\x05rules\x18\x03 \x03(\x0b\x32\x30.spaceone.api.monitoring.v1.EscalationPolicyRule\x12\x14\n\x0crepeat_count\x18\x04 \x01(\x05\x12m\n\x10\x66inish_condition\x18\x05 \x01(\x0e\x32S.spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.EscalationFinishCondition\x12%\n\x04tags\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x11\n\tdomain_id\x18\x0b \x01(\t\"E\n\x19\x45scalationFinishCondition\x12\x08\n\x04NONE\x10\x00\x12\x10\n\x0c\x41\x43KNOWLEDGED\x10\x01\x12\x0c\n\x08RESOLVED\x10\x02\"J\n\x17\x45scalationPolicyRequest\x12\x1c\n\x14\x65scalation_policy_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\"[\n\x1aGetEscalationPolicyRequest\x12\x1c\n\x14\x65scalation_policy_id\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\x12\x0c\n\x04only\x18\x03 \x03(\t\"\xf2\x03\n\x15\x45scalationPolicyQuery\x12*\n\x05query\x18\x01 \x01(\x0b\x32\x1b.spaceone.api.core.v1.Query\x12\x1c\n\x14\x65scalation_policy_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x12\n\nis_default\x18\x04 \x01(\x08\x12\x65\n\x10\x66inish_condition\x18\x05 \x01(\x0e\x32K.spaceone.api.monitoring.v1.EscalationPolicyQuery.EscalationFinishCondition\x12V\n\x05scope\x18\x06 \x01(\x0e\x32G.spaceone.api.monitoring.v1.EscalationPolicyQuery.EscalationPolicyScope\x12\x12\n\nproject_id\x18\x07 \x01(\t\x12\x11\n\tdomain_id\x18\x0b \x01(\t\"@\n\x15\x45scalationPolicyScope\x12\x0e\n\nSCOPE_NONE\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"E\n\x19\x45scalationFinishCondition\x12\x08\n\x04NONE\x10\x00\x12\x10\n\x0c\x41\x43KNOWLEDGED\x10\x01\x12\x0c\n\x08RESOLVED\x10\x02\"\xd5\x04\n\x14\x45scalationPolicyInfo\x12\x1c\n\x14\x65scalation_policy_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nis_default\x18\x03 \x01(\x08\x12?\n\x05rules\x18\x04 \x03(\x0b\x32\x30.spaceone.api.monitoring.v1.EscalationPolicyRule\x12\x14\n\x0crepeat_count\x18\x05 \x01(\x05\x12\x64\n\x10\x66inish_condition\x18\x06 \x01(\x0e\x32J.spaceone.api.monitoring.v1.EscalationPolicyInfo.EscalationFinishCondition\x12U\n\x05scope\x18\x07 \x01(\x0e\x32\x46.spaceone.api.monitoring.v1.EscalationPolicyInfo.EscalationPolicyScope\x12\x12\n\nproject_id\x18\x08 \x01(\t\x12%\n\x04tags\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x11\n\tdomain_id\x18\x0b \x01(\t\x12\x12\n\ncreated_at\x18\x15 \x01(\t\"@\n\x15\x45scalationPolicyScope\x12\x0e\n\nSCOPE_NONE\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"E\n\x19\x45scalationFinishCondition\x12\x08\n\x04NONE\x10\x00\x12\x10\n\x0c\x41\x43KNOWLEDGED\x10\x01\x12\x0c\n\x08RESOLVED\x10\x02\"p\n\x16\x45scalationPoliciesInfo\x12\x41\n\x07results\x18\x01 \x03(\x0b\x32\x30.spaceone.api.monitoring.v1.EscalationPolicyInfo\x12\x13\n\x0btotal_count\x18\x02 \x01(\x05\"d\n\x19\x45scalationPolicyStatQuery\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32%.spaceone.api.core.v1.StatisticsQuery\x12\x11\n\tdomain_id\x18\x02 \x01(\t2\xd2\t\n\x10\x45scalationPolicy\x12\xa1\x01\n\x06\x63reate\x12\x39.spaceone.api.monitoring.v1.CreateEscalationPolicyRequest\x1a\x30.spaceone.api.monitoring.v1.EscalationPolicyInfo\"*\x82\xd3\xe4\x93\x02$\"\"/monitoring/v1/escalation-policies\x12\xb6\x01\n\x06update\x12\x39.spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest\x1a\x30.spaceone.api.monitoring.v1.EscalationPolicyInfo\"?\x82\xd3\xe4\x93\x02\x39\x1a\x37/monitoring/v1/escalation-policy/{escalation_policy_id}\x12\xc1\x01\n\x0bset_default\x12\x33.spaceone.api.monitoring.v1.EscalationPolicyRequest\x1a\x30.spaceone.api.monitoring.v1.EscalationPolicyInfo\"K\x82\xd3\xe4\x93\x02\x45\x1a\x43/monitoring/v1/escalation-policy/{escalation_policy_id}/set-default\x12\x96\x01\n\x06\x64\x65lete\x12\x33.spaceone.api.monitoring.v1.EscalationPolicyRequest\x1a\x16.google.protobuf.Empty\"?\x82\xd3\xe4\x93\x02\x39*7/monitoring/v1/escalation-policy/{escalation_policy_id}\x12\xb0\x01\n\x03get\x12\x36.spaceone.api.monitoring.v1.GetEscalationPolicyRequest\x1a\x30.spaceone.api.monitoring.v1.EscalationPolicyInfo\"?\x82\xd3\xe4\x93\x02\x39\x12\x37/monitoring/v1/escalation-policy/{escalation_policy_id}\x12\xc6\x01\n\x04list\x12\x31.spaceone.api.monitoring.v1.EscalationPolicyQuery\x1a\x32.spaceone.api.monitoring.v1.EscalationPoliciesInfo\"W\x82\xd3\xe4\x93\x02Q\x12\"/monitoring/v1/escalation-policiesZ+\")/monitoring/v1/escalation-policies/search\x12\x87\x01\n\x04stat\x12\x35.spaceone.api.monitoring.v1.EscalationPolicyStatQuery\x1a\x17.google.protobuf.Struct\"/\x82\xd3\xe4\x93\x02)\"\'/monitoring/v1/escalation-policies/statb\x06proto3'
,
dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,spaceone_dot_api_dot_core_dot_v1_dot_query__pb2.DESCRIPTOR,])
_ESCALATIONPOLICYRULE_NOTIFICATIONLEVEL = _descriptor.EnumDescriptor(
name='NotificationLevel',
full_name='spaceone.api.monitoring.v1.EscalationPolicyRule.NotificationLevel',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ALL', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LV1', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LV2', index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LV3', index=4, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LV4', index=5, number=5,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LV5', index=6, number=6,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=352,
serialized_end=435,
)
_sym_db.RegisterEnumDescriptor(_ESCALATIONPOLICYRULE_NOTIFICATIONLEVEL)
_CREATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION = _descriptor.EnumDescriptor(
name='EscalationFinishCondition',
full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.EscalationFinishCondition',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ACKNOWLEDGED', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RESOLVED', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=761,
serialized_end=830,
)
_sym_db.RegisterEnumDescriptor(_CREATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION)
_UPDATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION = _descriptor.EnumDescriptor(
name='EscalationFinishCondition',
full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.EscalationFinishCondition',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ACKNOWLEDGED', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RESOLVED', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=761,
serialized_end=830,
)
_sym_db.RegisterEnumDescriptor(_UPDATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION)
_ESCALATIONPOLICYQUERY_ESCALATIONPOLICYSCOPE = _descriptor.EnumDescriptor(
name='EscalationPolicyScope',
full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.EscalationPolicyScope',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='SCOPE_NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='GLOBAL', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='PROJECT', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=1770,
serialized_end=1834,
)
_sym_db.RegisterEnumDescriptor(_ESCALATIONPOLICYQUERY_ESCALATIONPOLICYSCOPE)
_ESCALATIONPOLICYQUERY_ESCALATIONFINISHCONDITION = _descriptor.EnumDescriptor(
name='EscalationFinishCondition',
full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.EscalationFinishCondition',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ACKNOWLEDGED', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RESOLVED', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=761,
serialized_end=830,
)
_sym_db.RegisterEnumDescriptor(_ESCALATIONPOLICYQUERY_ESCALATIONFINISHCONDITION)
_ESCALATIONPOLICYINFO_ESCALATIONPOLICYSCOPE = _descriptor.EnumDescriptor(
name='EscalationPolicyScope',
full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.EscalationPolicyScope',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='SCOPE_NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='GLOBAL', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='PROJECT', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=1770,
serialized_end=1834,
)
_sym_db.RegisterEnumDescriptor(_ESCALATIONPOLICYINFO_ESCALATIONPOLICYSCOPE)
_ESCALATIONPOLICYINFO_ESCALATIONFINISHCONDITION = _descriptor.EnumDescriptor(
name='EscalationFinishCondition',
full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.EscalationFinishCondition',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='NONE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ACKNOWLEDGED', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RESOLVED', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=761,
serialized_end=830,
)
_sym_db.RegisterEnumDescriptor(_ESCALATIONPOLICYINFO_ESCALATIONFINISHCONDITION)
_ESCALATIONPOLICYRULE = _descriptor.Descriptor(
name='EscalationPolicyRule',
full_name='spaceone.api.monitoring.v1.EscalationPolicyRule',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='notification_level', full_name='spaceone.api.monitoring.v1.EscalationPolicyRule.notification_level', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalate_minutes', full_name='spaceone.api.monitoring.v1.EscalationPolicyRule.escalate_minutes', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_ESCALATIONPOLICYRULE_NOTIFICATIONLEVEL,
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=206,
serialized_end=435,
)
_CREATEESCALATIONPOLICYREQUEST = _descriptor.Descriptor(
name='CreateEscalationPolicyRequest',
full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rules', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.rules', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='repeat_count', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.repeat_count', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='finish_condition', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.finish_condition', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.project_id', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.tags', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.CreateEscalationPolicyRequest.domain_id', index=6,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_CREATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION,
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=438,
serialized_end=830,
)
_UPDATEESCALATIONPOLICYREQUEST = _descriptor.Descriptor(
name='UpdateEscalationPolicyRequest',
full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.escalation_policy_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rules', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.rules', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='repeat_count', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.repeat_count', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='finish_condition', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.finish_condition', index=4,
number=5, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.tags', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest.domain_id', index=6,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_UPDATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION,
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=833,
serialized_end=1235,
)
_ESCALATIONPOLICYREQUEST = _descriptor.Descriptor(
name='EscalationPolicyRequest',
full_name='spaceone.api.monitoring.v1.EscalationPolicyRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyRequest.escalation_policy_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1237,
serialized_end=1311,
)
_GETESCALATIONPOLICYREQUEST = _descriptor.Descriptor(
name='GetEscalationPolicyRequest',
full_name='spaceone.api.monitoring.v1.GetEscalationPolicyRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.GetEscalationPolicyRequest.escalation_policy_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.GetEscalationPolicyRequest.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='only', full_name='spaceone.api.monitoring.v1.GetEscalationPolicyRequest.only', index=2,
number=3, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1313,
serialized_end=1404,
)
_ESCALATIONPOLICYQUERY = _descriptor.Descriptor(
name='EscalationPolicyQuery',
full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.escalation_policy_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.name', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='is_default', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.is_default', index=3,
number=4, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='finish_condition', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.finish_condition', index=4,
number=5, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='scope', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.scope', index=5,
number=6, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.project_id', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyQuery.domain_id', index=7,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_ESCALATIONPOLICYQUERY_ESCALATIONPOLICYSCOPE,
_ESCALATIONPOLICYQUERY_ESCALATIONFINISHCONDITION,
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1407,
serialized_end=1905,
)
_ESCALATIONPOLICYINFO = _descriptor.Descriptor(
name='EscalationPolicyInfo',
full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='escalation_policy_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.escalation_policy_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='is_default', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.is_default', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='rules', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.rules', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='repeat_count', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.repeat_count', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='finish_condition', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.finish_condition', index=5,
number=6, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='scope', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.scope', index=6,
number=7, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='project_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.project_id', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tags', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.tags', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.domain_id', index=9,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_at', full_name='spaceone.api.monitoring.v1.EscalationPolicyInfo.created_at', index=10,
number=21, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_ESCALATIONPOLICYINFO_ESCALATIONPOLICYSCOPE,
_ESCALATIONPOLICYINFO_ESCALATIONFINISHCONDITION,
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1908,
serialized_end=2505,
)
_ESCALATIONPOLICIESINFO = _descriptor.Descriptor(
name='EscalationPoliciesInfo',
full_name='spaceone.api.monitoring.v1.EscalationPoliciesInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='results', full_name='spaceone.api.monitoring.v1.EscalationPoliciesInfo.results', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_count', full_name='spaceone.api.monitoring.v1.EscalationPoliciesInfo.total_count', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2507,
serialized_end=2619,
)
_ESCALATIONPOLICYSTATQUERY = _descriptor.Descriptor(
name='EscalationPolicyStatQuery',
full_name='spaceone.api.monitoring.v1.EscalationPolicyStatQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='query', full_name='spaceone.api.monitoring.v1.EscalationPolicyStatQuery.query', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='domain_id', full_name='spaceone.api.monitoring.v1.EscalationPolicyStatQuery.domain_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2621,
serialized_end=2721,
)
_ESCALATIONPOLICYRULE.fields_by_name['notification_level'].enum_type = _ESCALATIONPOLICYRULE_NOTIFICATIONLEVEL
_ESCALATIONPOLICYRULE_NOTIFICATIONLEVEL.containing_type = _ESCALATIONPOLICYRULE
_CREATEESCALATIONPOLICYREQUEST.fields_by_name['rules'].message_type = _ESCALATIONPOLICYRULE
_CREATEESCALATIONPOLICYREQUEST.fields_by_name['finish_condition'].enum_type = _CREATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION
_CREATEESCALATIONPOLICYREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_CREATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION.containing_type = _CREATEESCALATIONPOLICYREQUEST
_UPDATEESCALATIONPOLICYREQUEST.fields_by_name['rules'].message_type = _ESCALATIONPOLICYRULE
_UPDATEESCALATIONPOLICYREQUEST.fields_by_name['finish_condition'].enum_type = _UPDATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION
_UPDATEESCALATIONPOLICYREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_UPDATEESCALATIONPOLICYREQUEST_ESCALATIONFINISHCONDITION.containing_type = _UPDATEESCALATIONPOLICYREQUEST
_ESCALATIONPOLICYQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._QUERY
_ESCALATIONPOLICYQUERY.fields_by_name['finish_condition'].enum_type = _ESCALATIONPOLICYQUERY_ESCALATIONFINISHCONDITION
_ESCALATIONPOLICYQUERY.fields_by_name['scope'].enum_type = _ESCALATIONPOLICYQUERY_ESCALATIONPOLICYSCOPE
_ESCALATIONPOLICYQUERY_ESCALATIONPOLICYSCOPE.containing_type = _ESCALATIONPOLICYQUERY
_ESCALATIONPOLICYQUERY_ESCALATIONFINISHCONDITION.containing_type = _ESCALATIONPOLICYQUERY
_ESCALATIONPOLICYINFO.fields_by_name['rules'].message_type = _ESCALATIONPOLICYRULE
_ESCALATIONPOLICYINFO.fields_by_name['finish_condition'].enum_type = _ESCALATIONPOLICYINFO_ESCALATIONFINISHCONDITION
_ESCALATIONPOLICYINFO.fields_by_name['scope'].enum_type = _ESCALATIONPOLICYINFO_ESCALATIONPOLICYSCOPE
_ESCALATIONPOLICYINFO.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_ESCALATIONPOLICYINFO_ESCALATIONPOLICYSCOPE.containing_type = _ESCALATIONPOLICYINFO
_ESCALATIONPOLICYINFO_ESCALATIONFINISHCONDITION.containing_type = _ESCALATIONPOLICYINFO
_ESCALATIONPOLICIESINFO.fields_by_name['results'].message_type = _ESCALATIONPOLICYINFO
_ESCALATIONPOLICYSTATQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._STATISTICSQUERY
DESCRIPTOR.message_types_by_name['EscalationPolicyRule'] = _ESCALATIONPOLICYRULE
DESCRIPTOR.message_types_by_name['CreateEscalationPolicyRequest'] = _CREATEESCALATIONPOLICYREQUEST
DESCRIPTOR.message_types_by_name['UpdateEscalationPolicyRequest'] = _UPDATEESCALATIONPOLICYREQUEST
DESCRIPTOR.message_types_by_name['EscalationPolicyRequest'] = _ESCALATIONPOLICYREQUEST
DESCRIPTOR.message_types_by_name['GetEscalationPolicyRequest'] = _GETESCALATIONPOLICYREQUEST
DESCRIPTOR.message_types_by_name['EscalationPolicyQuery'] = _ESCALATIONPOLICYQUERY
DESCRIPTOR.message_types_by_name['EscalationPolicyInfo'] = _ESCALATIONPOLICYINFO
DESCRIPTOR.message_types_by_name['EscalationPoliciesInfo'] = _ESCALATIONPOLICIESINFO
DESCRIPTOR.message_types_by_name['EscalationPolicyStatQuery'] = _ESCALATIONPOLICYSTATQUERY
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
EscalationPolicyRule = _reflection.GeneratedProtocolMessageType('EscalationPolicyRule', (_message.Message,), {
'DESCRIPTOR' : _ESCALATIONPOLICYRULE,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.EscalationPolicyRule)
})
_sym_db.RegisterMessage(EscalationPolicyRule)
CreateEscalationPolicyRequest = _reflection.GeneratedProtocolMessageType('CreateEscalationPolicyRequest', (_message.Message,), {
'DESCRIPTOR' : _CREATEESCALATIONPOLICYREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.CreateEscalationPolicyRequest)
})
_sym_db.RegisterMessage(CreateEscalationPolicyRequest)
UpdateEscalationPolicyRequest = _reflection.GeneratedProtocolMessageType('UpdateEscalationPolicyRequest', (_message.Message,), {
'DESCRIPTOR' : _UPDATEESCALATIONPOLICYREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.UpdateEscalationPolicyRequest)
})
_sym_db.RegisterMessage(UpdateEscalationPolicyRequest)
EscalationPolicyRequest = _reflection.GeneratedProtocolMessageType('EscalationPolicyRequest', (_message.Message,), {
'DESCRIPTOR' : _ESCALATIONPOLICYREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.EscalationPolicyRequest)
})
_sym_db.RegisterMessage(EscalationPolicyRequest)
GetEscalationPolicyRequest = _reflection.GeneratedProtocolMessageType('GetEscalationPolicyRequest', (_message.Message,), {
'DESCRIPTOR' : _GETESCALATIONPOLICYREQUEST,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.GetEscalationPolicyRequest)
})
_sym_db.RegisterMessage(GetEscalationPolicyRequest)
EscalationPolicyQuery = _reflection.GeneratedProtocolMessageType('EscalationPolicyQuery', (_message.Message,), {
'DESCRIPTOR' : _ESCALATIONPOLICYQUERY,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.EscalationPolicyQuery)
})
_sym_db.RegisterMessage(EscalationPolicyQuery)
EscalationPolicyInfo = _reflection.GeneratedProtocolMessageType('EscalationPolicyInfo', (_message.Message,), {
'DESCRIPTOR' : _ESCALATIONPOLICYINFO,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.EscalationPolicyInfo)
})
_sym_db.RegisterMessage(EscalationPolicyInfo)
EscalationPoliciesInfo = _reflection.GeneratedProtocolMessageType('EscalationPoliciesInfo', (_message.Message,), {
'DESCRIPTOR' : _ESCALATIONPOLICIESINFO,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.EscalationPoliciesInfo)
})
_sym_db.RegisterMessage(EscalationPoliciesInfo)
EscalationPolicyStatQuery = _reflection.GeneratedProtocolMessageType('EscalationPolicyStatQuery', (_message.Message,), {
'DESCRIPTOR' : _ESCALATIONPOLICYSTATQUERY,
'__module__' : 'spaceone.api.monitoring.v1.escalation_policy_pb2'
# @@protoc_insertion_point(class_scope:spaceone.api.monitoring.v1.EscalationPolicyStatQuery)
})
_sym_db.RegisterMessage(EscalationPolicyStatQuery)
_ESCALATIONPOLICY = _descriptor.ServiceDescriptor(
name='EscalationPolicy',
full_name='spaceone.api.monitoring.v1.EscalationPolicy',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=2724,
serialized_end=3958,
methods=[
_descriptor.MethodDescriptor(
name='create',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.create',
index=0,
containing_service=None,
input_type=_CREATEESCALATIONPOLICYREQUEST,
output_type=_ESCALATIONPOLICYINFO,
serialized_options=b'\202\323\344\223\002$\"\"/monitoring/v1/escalation-policies',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='update',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.update',
index=1,
containing_service=None,
input_type=_UPDATEESCALATIONPOLICYREQUEST,
output_type=_ESCALATIONPOLICYINFO,
serialized_options=b'\202\323\344\223\0029\0327/monitoring/v1/escalation-policy/{escalation_policy_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='set_default',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.set_default',
index=2,
containing_service=None,
input_type=_ESCALATIONPOLICYREQUEST,
output_type=_ESCALATIONPOLICYINFO,
serialized_options=b'\202\323\344\223\002E\032C/monitoring/v1/escalation-policy/{escalation_policy_id}/set-default',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='delete',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.delete',
index=3,
containing_service=None,
input_type=_ESCALATIONPOLICYREQUEST,
output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
serialized_options=b'\202\323\344\223\0029*7/monitoring/v1/escalation-policy/{escalation_policy_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='get',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.get',
index=4,
containing_service=None,
input_type=_GETESCALATIONPOLICYREQUEST,
output_type=_ESCALATIONPOLICYINFO,
serialized_options=b'\202\323\344\223\0029\0227/monitoring/v1/escalation-policy/{escalation_policy_id}',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='list',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.list',
index=5,
containing_service=None,
input_type=_ESCALATIONPOLICYQUERY,
output_type=_ESCALATIONPOLICIESINFO,
serialized_options=b'\202\323\344\223\002Q\022\"/monitoring/v1/escalation-policiesZ+\")/monitoring/v1/escalation-policies/search',
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='stat',
full_name='spaceone.api.monitoring.v1.EscalationPolicy.stat',
index=6,
containing_service=None,
input_type=_ESCALATIONPOLICYSTATQUERY,
output_type=google_dot_protobuf_dot_struct__pb2._STRUCT,
serialized_options=b'\202\323\344\223\002)\"\'/monitoring/v1/escalation-policies/stat',
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_ESCALATIONPOLICY)
DESCRIPTOR.services_by_name['EscalationPolicy'] = _ESCALATIONPOLICY
# @@protoc_insertion_point(module_scope)
| 50.343465 | 5,900 | 0.782205 | 5,893 | 49,689 | 6.28152 | 0.056677 | 0.045709 | 0.078531 | 0.06959 | 0.789178 | 0.758273 | 0.731313 | 0.659859 | 0.634033 | 0.616609 | 0 | 0.041682 | 0.105315 | 49,689 | 986 | 5,901 | 50.394523 | 0.790984 | 0.021172 | 0 | 0.700216 | 1 | 0.001082 | 0.265519 | 0.238039 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.008658 | 0 | 0.008658 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
031bf2f1eb04b209d837b4d6fb36b0c663dcb3e7 | 104 | py | Python | tests/test_collection/test_flatstr.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 1 | 2020-10-23T17:11:42.000Z | 2020-10-23T17:11:42.000Z | tests/test_collection/test_flatstr.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 4 | 2019-05-09T12:53:33.000Z | 2020-12-03T13:49:26.000Z | tests/test_collection/test_flatstr.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | null | null | null | import olutils.collection as lib
def test_FlatStr():
assert repr(lib.FlatStr("Hello")) == "Hello"
| 17.333333 | 48 | 0.701923 | 14 | 104 | 5.142857 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 104 | 5 | 49 | 20.8 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0.096154 | 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 | 1 | 0 | 0 | 6 |
033b38a01a9ac953f0faf6c7c2325d82b458c0f0 | 18 | py | Python | src/compas_rpc_example/icp/__init__.py | yijiangh/compas_rpc_examples | 53dd4511e7e0810de2edc430e4c275d70697735a | [
"MIT"
] | 2 | 2020-04-22T15:34:55.000Z | 2021-03-25T16:29:26.000Z | src/compas_rpc_example/icp/__init__.py | yijiangh/compas_rpc_example | 53dd4511e7e0810de2edc430e4c275d70697735a | [
"MIT"
] | null | null | null | src/compas_rpc_example/icp/__init__.py | yijiangh/compas_rpc_example | 53dd4511e7e0810de2edc430e4c275d70697735a | [
"MIT"
] | null | null | null | from .icp import * | 18 | 18 | 0.722222 | 3 | 18 | 4.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 18 | 1 | 18 | 18 | 0.866667 | 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 | 1 | 0 | 0 | 6 |
036f59892e489aa4fdb17caa60b1aad88ac08ab4 | 160 | py | Python | bot_manager/twitch_errors.py | NikolaPanayotov/PogCount | 8c4beda7e210275fb0d1e5a4ee12feb3b460b525 | [
"MIT"
] | null | null | null | bot_manager/twitch_errors.py | NikolaPanayotov/PogCount | 8c4beda7e210275fb0d1e5a4ee12feb3b460b525 | [
"MIT"
] | null | null | null | bot_manager/twitch_errors.py | NikolaPanayotov/PogCount | 8c4beda7e210275fb0d1e5a4ee12feb3b460b525 | [
"MIT"
] | null | null | null | # Error definitions for bot manager
# TODO: Improve logging in these errors!
class OAuthError(Exception):
pass
class TwitchAPIError(Exception):
pass
| 16 | 40 | 0.75 | 19 | 160 | 6.315789 | 0.842105 | 0.216667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1875 | 160 | 9 | 41 | 17.777778 | 0.923077 | 0.45 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
03772d33a29d1f628da4032f699a490292114f66 | 126 | py | Python | bitmovin_api_sdk/encoding/encodings/muxings/progressive_ts/id3/plain_text/customdata/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/encoding/encodings/muxings/progressive_ts/id3/plain_text/customdata/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/encoding/encodings/muxings/progressive_ts/id3/plain_text/customdata/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | from bitmovin_api_sdk.encoding.encodings.muxings.progressive_ts.id3.plain_text.customdata.customdata_api import CustomdataApi
| 63 | 125 | 0.904762 | 17 | 126 | 6.411765 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008197 | 0.031746 | 126 | 1 | 126 | 126 | 0.885246 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
ceeb093b7c70acc69e1f6e95fd963fda58bb7e63 | 209 | py | Python | ex05/cachorro.py | barbaracalderon/dsoo-1 | 4f4955afdd05874ab9d6d8c6136b9dd34852a80d | [
"MIT"
] | null | null | null | ex05/cachorro.py | barbaracalderon/dsoo-1 | 4f4955afdd05874ab9d6d8c6136b9dd34852a80d | [
"MIT"
] | null | null | null | ex05/cachorro.py | barbaracalderon/dsoo-1 | 4f4955afdd05874ab9d6d8c6136b9dd34852a80d | [
"MIT"
] | null | null | null | from mamifero import Mamifero
class Cachorro(Mamifero):
def __init__(self):
super().__init__(tamanho_passo=3, volume_som=3)
def latir(self):
return super().produzir_som() + " SOM: AU" | 26.125 | 55 | 0.669856 | 27 | 209 | 4.777778 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012048 | 0.205742 | 209 | 8 | 56 | 26.125 | 0.76506 | 0 | 0 | 0 | 0 | 0 | 0.038095 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.166667 | 0.166667 | 0.166667 | 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 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 6 |
cef006ac65b6fe5eee590d31d4f5288eead2ff5a | 3,285 | py | Python | tests/api/task/test_task_view.py | fndomariano/tasks | 3723d7639894096719dba1a48b734a2f6099eb4f | [
"MIT"
] | null | null | null | tests/api/task/test_task_view.py | fndomariano/tasks | 3723d7639894096719dba1a48b734a2f6099eb4f | [
"MIT"
] | null | null | null | tests/api/task/test_task_view.py | fndomariano/tasks | 3723d7639894096719dba1a48b734a2f6099eb4f | [
"MIT"
] | null | null | null | from src import app, db
from src.api.models.task import Task
from faker import Faker
import json
import unittest
class TaskView(unittest.TestCase):
def setUp(self):
self.client = app.test_client()
self.faker = Faker()
self.base_url = 'http://localhost:5000/api/tasks'
self.task = {
'title': self.faker.sentence(),
'date_begin': self.faker.date() + ' 08:00:00',
'date_until': self.faker.date() + ' 18:00:00',
'description': self.faker.text()
}
def test_index(self):
response = self.client.get(self.base_url)
self.assertEqual(200, response.status_code)
self.assertIn('application/json', response.content_type)
def test_post(self):
response = self.client.post(self.base_url + '/add', json=self.task)
self.assertEqual(201, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual('success', response.json.get('status'))
def test_invalid_post(self):
task = self.task
del task['date_until']
response = self.client.post(self.base_url + '/add', json=task)
self.assertEqual(422, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual(True, "status" in response.json)
self.assertEqual('error', response.json.get('status'))
def test_show(self):
task = Task(self.task)
db.session.add(task)
db.session.commit()
response = self.client.get(self.base_url + '/show/' + str(task.id))
self.assertEqual(200, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual(True, 'data' in response.json)
def test_invalid_show(self):
response = self.client.get(self.base_url + '/show/0')
self.assertEqual(404, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual('error', response.json.get('status'))
def test_remove(self):
task = Task(self.task)
db.session.add(task)
db.session.commit()
response = self.client.delete(self.base_url + '/remove/' + str(task.id))
self.assertEqual(200, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual('success', response.json.get('status'))
def test_invalid_remove(self):
response = self.client.delete(self.base_url + '/remove/0')
self.assertEqual(400, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual('error', response.json.get('status'))
def test_put(self):
task = Task(self.task)
db.session.add(task)
db.session.commit()
new_data = {
'title': self.faker.sentence(),
'date_begin': self.faker.date() + ' 08:00:00',
'date_until': self.faker.date() + ' 18:00:00',
'description': self.faker.text()
}
response = self.client.put(self.base_url + '/edit/' + str(task.id), json=new_data)
self.assertEqual(201, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual('success', response.json.get('status'))
def test_invalid_put(self):
response = self.client.put(self.base_url + '/edit/0', json=self.task)
self.assertEqual(422, response.status_code)
self.assertIn('application/json', response.content_type)
self.assertEqual(True, "status" in response.json)
self.assertEqual('error', response.json.get('status'))
| 33.181818 | 84 | 0.717808 | 456 | 3,285 | 5.063596 | 0.153509 | 0.12343 | 0.04764 | 0.085751 | 0.822867 | 0.815938 | 0.815938 | 0.815938 | 0.716327 | 0.678649 | 0 | 0.020125 | 0.122679 | 3,285 | 98 | 85 | 33.520408 | 0.781055 | 0 | 0 | 0.531646 | 0 | 0 | 0.134855 | 0 | 0 | 0 | 0 | 0 | 0.35443 | 1 | 0.126582 | false | 0 | 0.063291 | 0 | 0.202532 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
cef48b201ef331962ecb5c5583c51555ad7ea0c1 | 96 | py | Python | venv/lib/python3.8/site-packages/poetry/core/packages/dependency.py | GiulianaPola/select_repeats | 17a0d053d4f874e42cf654dd142168c2ec8fbd11 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/poetry/core/packages/dependency.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/poetry/core/packages/dependency.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/2d/cb/11/ef437b090f76b5475a6527a0743585f5faaa05f1e77af6f0c535310b0d | 96 | 96 | 0.895833 | 9 | 96 | 9.555556 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.427083 | 0 | 96 | 1 | 96 | 96 | 0.46875 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
30079f13cd7c7e26496373509a6ff01402e36865 | 336 | py | Python | flextensor/configs/conv2d_bn_relu_config.py | jcf94/FlexTensor | 72501488089e7a5674243ca8f0ebb311c743d8a1 | [
"MIT"
] | null | null | null | flextensor/configs/conv2d_bn_relu_config.py | jcf94/FlexTensor | 72501488089e7a5674243ca8f0ebb311c743d8a1 | [
"MIT"
] | null | null | null | flextensor/configs/conv2d_bn_relu_config.py | jcf94/FlexTensor | 72501488089e7a5674243ca8f0ebb311c743d8a1 | [
"MIT"
] | 3 | 2020-04-14T06:11:29.000Z | 2020-04-20T12:30:22.000Z | conv2d_bn_relu_shapes = [
(1, 224, 224, 3, 64, 7, 2, 3, 1),
(1, 56, 56, 64, 128, 3, 2, 1, 1),
(1, 28, 28, 128, 256, 1, 2, 0, 1),
(1, 7, 7, 512, 512, 3, 1, 1, 1),
(16, 224, 224, 3, 64, 7, 2, 3, 1),
(16, 56, 56, 64, 128, 3, 2, 1, 1),
(16, 28, 28, 128, 256, 1, 2, 0, 1),
(16, 7, 7, 512, 512, 3, 1, 1, 1),
]
| 30.545455 | 39 | 0.407738 | 76 | 336 | 1.763158 | 0.223684 | 0.134328 | 0.067164 | 0.134328 | 0.776119 | 0.776119 | 0.776119 | 0.776119 | 0 | 0 | 0 | 0.513158 | 0.321429 | 336 | 10 | 40 | 33.6 | 0.074561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 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 | 0 | 0 | 6 |
302ecba7379d19839f30cf294c3512ce3680a6ba | 131 | py | Python | test/import_tests.py | davidbrandfonbrener/tensorcog | 3d4f7459b405cbd8e8358bf5dc21ac7124170f17 | [
"MIT"
] | null | null | null | test/import_tests.py | davidbrandfonbrener/tensorcog | 3d4f7459b405cbd8e8358bf5dc21ac7124170f17 | [
"MIT"
] | null | null | null | test/import_tests.py | davidbrandfonbrener/tensorcog | 3d4f7459b405cbd8e8358bf5dc21ac7124170f17 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from Sisyphus.backend.networks import Model
import Sisyphus.backend.visualizations as V
| 26.2 | 43 | 0.847328 | 20 | 131 | 5.55 | 0.65 | 0.27027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122137 | 131 | 4 | 44 | 32.75 | 0.965217 | 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 | 1 | 0 | 0 | 6 |
3056c7886970f946e0529d920ec1360dbe3479eb | 70 | py | Python | plugins/sqlmap/komand_sqlmap/actions/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/sqlmap/komand_sqlmap/actions/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/sqlmap/komand_sqlmap/actions/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
from .scan.action import Scan
| 23.333333 | 39 | 0.757143 | 12 | 70 | 4.416667 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185714 | 70 | 2 | 40 | 35 | 0.929825 | 0.528571 | 0 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
306db896e5f1504e2ed00e28bb3c0d2b066d87c9 | 3,489 | py | Python | pycones/proposals/migrations/0002_auto_20150626_0943.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | pycones/proposals/migrations/0002_auto_20150626_0943.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | pycones/proposals/migrations/0002_auto_20150626_0943.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('proposals', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='proposalbase',
name='_abstract_ca_rendered',
),
migrations.RemoveField(
model_name='proposalbase',
name='_abstract_eu_rendered',
),
migrations.RemoveField(
model_name='proposalbase',
name='_abstract_ga_rendered',
),
migrations.RemoveField(
model_name='proposalbase',
name='_additional_notes_ca_rendered',
),
migrations.RemoveField(
model_name='proposalbase',
name='_additional_notes_eu_rendered',
),
migrations.RemoveField(
model_name='proposalbase',
name='_additional_notes_ga_rendered',
),
migrations.RemoveField(
model_name='proposalbase',
name='abstract_ca',
),
migrations.RemoveField(
model_name='proposalbase',
name='abstract_ca_markup_type',
),
migrations.RemoveField(
model_name='proposalbase',
name='abstract_eu',
),
migrations.RemoveField(
model_name='proposalbase',
name='abstract_eu_markup_type',
),
migrations.RemoveField(
model_name='proposalbase',
name='abstract_ga',
),
migrations.RemoveField(
model_name='proposalbase',
name='abstract_ga_markup_type',
),
migrations.RemoveField(
model_name='proposalbase',
name='additional_notes_ca',
),
migrations.RemoveField(
model_name='proposalbase',
name='additional_notes_ca_markup_type',
),
migrations.RemoveField(
model_name='proposalbase',
name='additional_notes_eu',
),
migrations.RemoveField(
model_name='proposalbase',
name='additional_notes_eu_markup_type',
),
migrations.RemoveField(
model_name='proposalbase',
name='additional_notes_ga',
),
migrations.RemoveField(
model_name='proposalbase',
name='additional_notes_ga_markup_type',
),
migrations.RemoveField(
model_name='proposalbase',
name='title_ca',
),
migrations.RemoveField(
model_name='proposalbase',
name='title_eu',
),
migrations.RemoveField(
model_name='proposalbase',
name='title_ga',
),
migrations.RemoveField(
model_name='proposalkind',
name='name_ca',
),
migrations.RemoveField(
model_name='proposalkind',
name='name_eu',
),
migrations.RemoveField(
model_name='proposalkind',
name='name_ga',
),
migrations.RemoveField(
model_name='proposalkind',
name='slug_ca',
),
migrations.RemoveField(
model_name='proposalkind',
name='slug_eu',
),
migrations.RemoveField(
model_name='proposalkind',
name='slug_ga',
),
]
| 28.365854 | 51 | 0.542562 | 266 | 3,489 | 6.766917 | 0.131579 | 0.315 | 0.39 | 0.45 | 0.915556 | 0.915556 | 0.915556 | 0.680556 | 0.450556 | 0.118333 | 0 | 0.002226 | 0.356263 | 3,489 | 122 | 52 | 28.598361 | 0.799199 | 0.006019 | 0 | 0.698276 | 0 | 0 | 0.234564 | 0.090017 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.017241 | 0 | 0.043103 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
30776f9c8508d3d60b447d28680ada8dd4d1efac | 128 | py | Python | tests/test_comparison.py | linewalks/py-clue | ecea2a37d88387d909fc283fdbc145bc5a1187a8 | [
"MIT"
] | null | null | null | tests/test_comparison.py | linewalks/py-clue | ecea2a37d88387d909fc283fdbc145bc5a1187a8 | [
"MIT"
] | 11 | 2022-01-13T09:30:03.000Z | 2022-03-14T01:10:08.000Z | tests/test_comparison.py | linewalks/py-clue | ecea2a37d88387d909fc283fdbc145bc5a1187a8 | [
"MIT"
] | null | null | null | class TestComparison:
def test_comparison(self, conn, test_comparison_id):
conn.get_cohort_comparison(test_comparison_id)
| 32 | 54 | 0.828125 | 17 | 128 | 5.823529 | 0.588235 | 0.424242 | 0.323232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.101563 | 128 | 3 | 55 | 42.666667 | 0.86087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 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 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
0620ca049696abf4659c57885b8f95a3c579f697 | 41 | py | Python | catalyst/contrib/models/__init__.py | Felix-neko/catalyst | df80986f1c12ef6a3776637453a0c04aaef0068c | [
"Apache-2.0"
] | 1 | 2022-03-13T21:40:17.000Z | 2022-03-13T21:40:17.000Z | catalyst/contrib/models/__init__.py | Felix-neko/catalyst | df80986f1c12ef6a3776637453a0c04aaef0068c | [
"Apache-2.0"
] | null | null | null | catalyst/contrib/models/__init__.py | Felix-neko/catalyst | df80986f1c12ef6a3776637453a0c04aaef0068c | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
from .sequential import *
| 13.666667 | 25 | 0.731707 | 5 | 41 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.029412 | 0.170732 | 41 | 2 | 26 | 20.5 | 0.852941 | 0.292683 | 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 | 1 | 0 | 0 | 6 |
0627fcd0af0f0e764cae9f880d1e63ac79b6fb24 | 35,800 | py | Python | design_bench/datasets/discrete/chembl_dataset.py | brandontrabucco/design_bench | 824516ec59396aded3ca55ec7c1c313626ecaceb | [
"MIT"
] | 27 | 2020-06-30T00:57:12.000Z | 2022-03-25T16:24:11.000Z | design_bench/datasets/discrete/chembl_dataset.py | brandontrabucco/design_bench | 824516ec59396aded3ca55ec7c1c313626ecaceb | [
"MIT"
] | 7 | 2021-02-16T06:25:02.000Z | 2022-03-31T17:21:17.000Z | design_bench/datasets/discrete/chembl_dataset.py | brandontrabucco/design_bench | 824516ec59396aded3ca55ec7c1c313626ecaceb | [
"MIT"
] | 5 | 2021-07-19T12:16:32.000Z | 2022-03-01T16:56:16.000Z | from design_bench.datasets.discrete_dataset import DiscreteDataset
from design_bench.disk_resource import DiskResource, SERVER_URL
"""
chembl-AC50-CHEMBL1741322/chembl-x-0.npy 1190
chembl-ALB-CHEMBL3885882/chembl-x-0.npy 1096
chembl-ALP-CHEMBL3885882/chembl-x-0.npy 1096
chembl-ALT-CHEMBL3885882/chembl-x-0.npy 1096
chembl-AST-CHEMBL3885882/chembl-x-0.npy 1096
chembl-BASOLE-CHEMBL3885882/chembl-x-0.npy 1096
chembl-BILI-CHEMBL3885882/chembl-x-0.npy 1093
chembl-BUN-CHEMBL3885882/chembl-x-0.npy 1096
chembl-CHLORIDE-CHEMBL3885882/chembl-x-0.npy 1096
chembl-CHOL-CHEMBL3885882/chembl-x-0.npy 1096
chembl-CK-CHEMBL3885882/chembl-x-0.npy 1014
chembl-CREAT-CHEMBL3885882/chembl-x-0.npy 1096
chembl-EOSLE-CHEMBL3885882/chembl-x-0.npy 1096
chembl-GI50-CHEMBL1963844/chembl-x-0.npy 5049
chembl-GI50-CHEMBL1963848/chembl-x-0.npy 1900
chembl-GI50-CHEMBL1963854/chembl-x-0.npy 5503
chembl-GI50-CHEMBL1963860/chembl-x-0.npy 4757
chembl-GI50-CHEMBL1963866/chembl-x-0.npy 5068
chembl-GI50-CHEMBL1963868/chembl-x-0.npy 5344
chembl-GI50-CHEMBL1963874/chembl-x-0.npy 5419
chembl-GI50-CHEMBL1963876/chembl-x-0.npy 5377
chembl-GI50-CHEMBL1963880/chembl-x-0.npy 5340
chembl-GI50-CHEMBL1963882/chembl-x-0.npy 3596
chembl-GI50-CHEMBL1963885/chembl-x-0.npy 3578
chembl-GI50-CHEMBL1963887/chembl-x-0.npy 2020
chembl-GI50-CHEMBL1963889/chembl-x-0.npy 1859
chembl-GI50-CHEMBL1963895/chembl-x-0.npy 5167
chembl-GI50-CHEMBL1963900/chembl-x-0.npy 3311
chembl-GI50-CHEMBL1963901/chembl-x-0.npy 5282
chembl-GI50-CHEMBL1963903/chembl-x-0.npy 5344
chembl-GI50-CHEMBL1963911/chembl-x-0.npy 5004
chembl-GI50-CHEMBL1963921/chembl-x-0.npy 3570
chembl-GI50-CHEMBL1963922/chembl-x-0.npy 5438
chembl-GI50-CHEMBL1963929/chembl-x-0.npy 5404
chembl-GI50-CHEMBL1963935/chembl-x-0.npy 1541
chembl-GI50-CHEMBL1963945/chembl-x-0.npy 3327
chembl-GI50-CHEMBL1963953/chembl-x-0.npy 5249
chembl-GI50-CHEMBL1963954/chembl-x-0.npy 1925
chembl-GI50-CHEMBL1963960/chembl-x-0.npy 5379
chembl-GI50-CHEMBL1963961/chembl-x-0.npy 5187
chembl-GI50-CHEMBL1963963/chembl-x-0.npy 1988
chembl-GI50-CHEMBL1963976/chembl-x-0.npy 3484
chembl-GI50-CHEMBL1963981/chembl-x-0.npy 5430
chembl-GI50-CHEMBL1963985/chembl-x-0.npy 5458
chembl-GI50-CHEMBL1963989/chembl-x-0.npy 5332
chembl-GI50-CHEMBL1963990/chembl-x-0.npy 5364
chembl-GI50-CHEMBL1963991/chembl-x-0.npy 4645
chembl-GI50-CHEMBL1963994/chembl-x-0.npy 4968
chembl-GI50-CHEMBL1964004/chembl-x-0.npy 4985
chembl-GI50-CHEMBL1964006/chembl-x-0.npy 5460
chembl-GI50-CHEMBL1964007/chembl-x-0.npy 5377
chembl-GI50-CHEMBL1964009/chembl-x-0.npy 4883
chembl-GI50-CHEMBL1964012/chembl-x-0.npy 5351
chembl-GI50-CHEMBL1964014/chembl-x-0.npy 1561
chembl-GI50-CHEMBL1964017/chembl-x-0.npy 3558
chembl-GI50-CHEMBL1964018/chembl-x-0.npy 5020
chembl-GI50-CHEMBL1964021/chembl-x-0.npy 5356
chembl-GI50-CHEMBL1964025/chembl-x-0.npy 5053
chembl-GI50-CHEMBL1964030/chembl-x-0.npy 5379
chembl-GI50-CHEMBL1964034/chembl-x-0.npy 4679
chembl-GI50-CHEMBL1964037/chembl-x-0.npy 5222
chembl-GI50-CHEMBL1964040/chembl-x-0.npy 5354
chembl-GI50-CHEMBL1964043/chembl-x-0.npy 5271
chembl-GI50-CHEMBL1964045/chembl-x-0.npy 3639
chembl-GI50-CHEMBL1964047/chembl-x-0.npy 5487
chembl-GI50-CHEMBL1964048/chembl-x-0.npy 5460
chembl-GI50-CHEMBL1964049/chembl-x-0.npy 5266
chembl-GI50-CHEMBL1964059/chembl-x-0.npy 5396
chembl-GI50-CHEMBL1964062/chembl-x-0.npy 1905
chembl-GI50-CHEMBL1964063/chembl-x-0.npy 3494
chembl-GI50-CHEMBL1964065/chembl-x-0.npy 4421
chembl-GI50-CHEMBL1964066/chembl-x-0.npy 5309
chembl-GI50-CHEMBL1964072/chembl-x-0.npy 5503
chembl-GI50-CHEMBL1964074/chembl-x-0.npy 2025
chembl-GI50-CHEMBL1964075/chembl-x-0.npy 4893
chembl-GI50-CHEMBL1964077/chembl-x-0.npy 5423
chembl-GI50-CHEMBL1964085/chembl-x-0.npy 5306
chembl-GI50-CHEMBL1964086/chembl-x-0.npy 1659
chembl-GI50-CHEMBL1964087/chembl-x-0.npy 5325
chembl-GI50-CHEMBL1964088/chembl-x-0.npy 4984
chembl-GI50-CHEMBL1964091/chembl-x-0.npy 5150
chembl-GI50-CHEMBL1964092/chembl-x-0.npy 5080
chembl-GI50-CHEMBL1964099/chembl-x-0.npy 3056
chembl-GLUC-CHEMBL3885882/chembl-x-0.npy 1096
chembl-HCT-CHEMBL3885882/chembl-x-0.npy 1096
chembl-HGB-CHEMBL3885882/chembl-x-0.npy 1093
chembl-INHIBITION-CHEMBL4513217/chembl-x-0.npy 4807
chembl-INHIBITION-CHEMBL4513218/chembl-x-0.npy 4815
chembl-INHIBITION-CHEMBL4513219/chembl-x-0.npy 4815
chembl-INHIBITION-CHEMBL4513220/chembl-x-0.npy 4589
chembl-INHIBITION-CHEMBL4513221/chembl-x-0.npy 4815
chembl-Inhibition-CHEMBL3507681/chembl-x-0.npy 4574
chembl-Inhibition-CHEMBL3988443/chembl-x-0.npy 4574
chembl-Inhibition-CHEMBL4296187/chembl-x-0.npy 10334
chembl-Inhibition-CHEMBL4296188/chembl-x-0.npy 9777
chembl-Inhibition-CHEMBL4296802/chembl-x-0.npy 9464
chembl-Inhibition-CHEMBL4495582/chembl-x-0.npy 1433
chembl-Inhibition-CHEMBL4513082/chembl-x-0.npy 1433
chembl-LYMLE-CHEMBL3885882/chembl-x-0.npy 1096
chembl-MCH-CHEMBL3885882/chembl-x-0.npy 1093
chembl-MCHC-CHEMBL3885882/chembl-x-0.npy 1093
chembl-MCV-CHEMBL3885882/chembl-x-0.npy 1096
chembl-MONOLE-CHEMBL3885882/chembl-x-0.npy 1096
chembl-NEUTLE-CHEMBL3885882/chembl-x-0.npy 1096
chembl-PHOS-CHEMBL3885882/chembl-x-0.npy 1096
chembl-PLAT-CHEMBL3885882/chembl-x-0.npy 1096
chembl-POTASSIUM-CHEMBL3885882/chembl-x-0.npy 1096
chembl-PROT-CHEMBL3885882/chembl-x-0.npy 1096
chembl-Potency-CHEMBL1613836/chembl-x-0.npy 4118
chembl-Potency-CHEMBL1613838/chembl-x-0.npy 3004
chembl-Potency-CHEMBL1613842/chembl-x-0.npy 3090
chembl-Potency-CHEMBL1613910/chembl-x-0.npy 1107
chembl-Potency-CHEMBL1613914/chembl-x-0.npy 3668
chembl-Potency-CHEMBL1613918/chembl-x-0.npy 1278
chembl-Potency-CHEMBL1613970/chembl-x-0.npy 1009
chembl-Potency-CHEMBL1614038/chembl-x-0.npy 2568
chembl-Potency-CHEMBL1614076/chembl-x-0.npy 1239
chembl-Potency-CHEMBL1614079/chembl-x-0.npy 1402
chembl-Potency-CHEMBL1614087/chembl-x-0.npy 4682
chembl-Potency-CHEMBL1614146/chembl-x-0.npy 4118
chembl-Potency-CHEMBL1614161/chembl-x-0.npy 2131
chembl-Potency-CHEMBL1614166/chembl-x-0.npy 2027
chembl-Potency-CHEMBL1614174/chembl-x-0.npy 2482
chembl-Potency-CHEMBL1614211/chembl-x-0.npy 3493
chembl-Potency-CHEMBL1614227/chembl-x-0.npy 1200
chembl-Potency-CHEMBL1614236/chembl-x-0.npy 3023
chembl-Potency-CHEMBL1614249/chembl-x-0.npy 3282
chembl-Potency-CHEMBL1614250/chembl-x-0.npy 1111
chembl-Potency-CHEMBL1614257/chembl-x-0.npy 1739
chembl-Potency-CHEMBL1614275/chembl-x-0.npy 1887
chembl-Potency-CHEMBL1614280/chembl-x-0.npy 1240
chembl-Potency-CHEMBL1614281/chembl-x-0.npy 1155
chembl-Potency-CHEMBL1614342/chembl-x-0.npy 2517
chembl-Potency-CHEMBL1614361/chembl-x-0.npy 1531
chembl-Potency-CHEMBL1614364/chembl-x-0.npy 1195
chembl-Potency-CHEMBL1614410/chembl-x-0.npy 1093
chembl-Potency-CHEMBL1614421/chembl-x-0.npy 2639
chembl-Potency-CHEMBL1614441/chembl-x-0.npy 3371
chembl-Potency-CHEMBL1614458/chembl-x-0.npy 6304
chembl-Potency-CHEMBL1614459/chembl-x-0.npy 7096
chembl-Potency-CHEMBL1614530/chembl-x-0.npy 4849
chembl-Potency-CHEMBL1614544/chembl-x-0.npy 2218
chembl-Potency-CHEMBL1737902/chembl-x-0.npy 6480
chembl-Potency-CHEMBL1737991/chembl-x-0.npy 4048
chembl-Potency-CHEMBL1738132/chembl-x-0.npy 2610
chembl-Potency-CHEMBL1738184/chembl-x-0.npy 4994
chembl-Potency-CHEMBL1738312/chembl-x-0.npy 3919
chembl-Potency-CHEMBL1738317/chembl-x-0.npy 3331
chembl-Potency-CHEMBL1738442/chembl-x-0.npy 7331
chembl-Potency-CHEMBL1738588/chembl-x-0.npy 7848
chembl-Potency-CHEMBL1738606/chembl-x-0.npy 1208
chembl-Potency-CHEMBL1794308/chembl-x-0.npy 3654
chembl-Potency-CHEMBL1794311/chembl-x-0.npy 1799
chembl-Potency-CHEMBL1794345/chembl-x-0.npy 13702
chembl-Potency-CHEMBL1794352/chembl-x-0.npy 5877
chembl-Potency-CHEMBL1794359/chembl-x-0.npy 1537
chembl-Potency-CHEMBL1794375/chembl-x-0.npy 6607
chembl-Potency-CHEMBL1794401/chembl-x-0.npy 8322
chembl-Potency-CHEMBL1794424/chembl-x-0.npy 2448
chembl-Potency-CHEMBL1794440/chembl-x-0.npy 1002
chembl-Potency-CHEMBL1794461/chembl-x-0.npy 1596
chembl-Potency-CHEMBL1794483/chembl-x-0.npy 9530
chembl-Potency-CHEMBL1794499/chembl-x-0.npy 1290
chembl-Potency-CHEMBL1794553/chembl-x-0.npy 3546
chembl-Potency-CHEMBL1794580/chembl-x-0.npy 9915
chembl-Potency-CHEMBL1794584/chembl-x-0.npy 3014
chembl-Potency-CHEMBL1794585/chembl-x-0.npy 1200
chembl-Potency-CHEMBL2114713/chembl-x-0.npy 1250
chembl-Potency-CHEMBL2114738/chembl-x-0.npy 1580
chembl-Potency-CHEMBL2114775/chembl-x-0.npy 3350
chembl-Potency-CHEMBL2114780/chembl-x-0.npy 4186
chembl-Potency-CHEMBL2114784/chembl-x-0.npy 2479
chembl-Potency-CHEMBL2114788/chembl-x-0.npy 5101
chembl-Potency-CHEMBL2114807/chembl-x-0.npy 2307
chembl-Potency-CHEMBL2114810/chembl-x-0.npy 7269
chembl-Potency-CHEMBL2114836/chembl-x-0.npy 1881
chembl-Potency-CHEMBL2114843/chembl-x-0.npy 4050
chembl-Potency-CHEMBL2114861/chembl-x-0.npy 1798
chembl-Potency-CHEMBL2114908/chembl-x-0.npy 1139
chembl-Potency-CHEMBL2114913/chembl-x-0.npy 2068
chembl-Potency-CHEMBL2354211/chembl-x-0.npy 1594
chembl-Potency-CHEMBL2354221/chembl-x-0.npy 6549
chembl-Potency-CHEMBL2354254/chembl-x-0.npy 5683
chembl-Potency-CHEMBL2354287/chembl-x-0.npy 3305
chembl-Potency-CHEMBL2354311/chembl-x-0.npy 1538
chembl-Potency-CHEMBL3214953/chembl-x-0.npy 1102
chembl-Potency-CHEMBL3215017/chembl-x-0.npy 1197
chembl-Potency-CHEMBL3215106/chembl-x-0.npy 2289
chembl-Potency-CHEMBL3215181/chembl-x-0.npy 3089
chembl-Potency-CHEMBL3215278/chembl-x-0.npy 2233
chembl-Potency-CHEMBL3562077/chembl-x-0.npy 5146
chembl-RBC-CHEMBL3885882/chembl-x-0.npy 1096
chembl-SODIUM-CHEMBL3885882/chembl-x-0.npy 1096
chembl-WBC-CHEMBL3885882/chembl-x-0.npy 1095
chembl-WEIGHT-CHEMBL3885862/chembl-x-0.npy 3196
chembl-WEIGHT-CHEMBL3885863/chembl-x-0.npy 3360
"""
CHEMBL_FILES = ['chembl-AC50-CHEMBL1741322/chembl-x-0.npy',
'chembl-ALB-CHEMBL3885882/chembl-x-0.npy',
'chembl-ALP-CHEMBL3885882/chembl-x-0.npy',
'chembl-ALT-CHEMBL3885882/chembl-x-0.npy',
'chembl-AST-CHEMBL3885882/chembl-x-0.npy',
'chembl-BASOLE-CHEMBL3885882/chembl-x-0.npy',
'chembl-BILI-CHEMBL3885882/chembl-x-0.npy',
'chembl-BUN-CHEMBL3885882/chembl-x-0.npy',
'chembl-CHLORIDE-CHEMBL3885882/chembl-x-0.npy',
'chembl-CHOL-CHEMBL3885882/chembl-x-0.npy',
'chembl-CK-CHEMBL3885882/chembl-x-0.npy',
'chembl-CREAT-CHEMBL3885882/chembl-x-0.npy',
'chembl-EOSLE-CHEMBL3885882/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963844/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963848/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963854/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963860/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963866/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963868/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963874/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963876/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963880/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963882/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963885/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963887/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963889/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963895/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963900/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963901/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963903/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963911/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963921/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963922/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963929/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963935/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963945/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963953/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963954/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963960/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963961/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963963/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963976/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963981/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963985/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963989/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963990/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963991/chembl-x-0.npy',
'chembl-GI50-CHEMBL1963994/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964004/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964006/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964007/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964009/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964012/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964014/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964017/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964018/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964021/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964025/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964030/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964034/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964037/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964040/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964043/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964045/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964047/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964048/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964049/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964059/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964062/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964063/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964065/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964066/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964072/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964074/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964075/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964077/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964085/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964086/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964087/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964088/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964091/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964092/chembl-x-0.npy',
'chembl-GI50-CHEMBL1964099/chembl-x-0.npy',
'chembl-GLUC-CHEMBL3885882/chembl-x-0.npy',
'chembl-HCT-CHEMBL3885882/chembl-x-0.npy',
'chembl-HGB-CHEMBL3885882/chembl-x-0.npy',
'chembl-INHIBITION-CHEMBL4513217/chembl-x-0.npy',
'chembl-INHIBITION-CHEMBL4513218/chembl-x-0.npy',
'chembl-INHIBITION-CHEMBL4513219/chembl-x-0.npy',
'chembl-INHIBITION-CHEMBL4513220/chembl-x-0.npy',
'chembl-INHIBITION-CHEMBL4513221/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL3507681/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL3988443/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL4296187/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL4296188/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL4296802/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL4495582/chembl-x-0.npy',
'chembl-Inhibition-CHEMBL4513082/chembl-x-0.npy',
'chembl-LYMLE-CHEMBL3885882/chembl-x-0.npy',
'chembl-MCH-CHEMBL3885882/chembl-x-0.npy',
'chembl-MCHC-CHEMBL3885882/chembl-x-0.npy',
'chembl-MCV-CHEMBL3885882/chembl-x-0.npy',
'chembl-MONOLE-CHEMBL3885882/chembl-x-0.npy',
'chembl-NEUTLE-CHEMBL3885882/chembl-x-0.npy',
'chembl-PHOS-CHEMBL3885882/chembl-x-0.npy',
'chembl-PLAT-CHEMBL3885882/chembl-x-0.npy',
'chembl-POTASSIUM-CHEMBL3885882/chembl-x-0.npy',
'chembl-PROT-CHEMBL3885882/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613836/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613838/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613842/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613910/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613914/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613918/chembl-x-0.npy',
'chembl-Potency-CHEMBL1613970/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614038/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614076/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614079/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614087/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614146/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614161/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614166/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614174/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614211/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614227/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614236/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614249/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614250/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614257/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614275/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614280/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614281/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614342/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614361/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614364/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614410/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614421/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614441/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614458/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614459/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614530/chembl-x-0.npy',
'chembl-Potency-CHEMBL1614544/chembl-x-0.npy',
'chembl-Potency-CHEMBL1737902/chembl-x-0.npy',
'chembl-Potency-CHEMBL1737991/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738132/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738184/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738312/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738317/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738442/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738588/chembl-x-0.npy',
'chembl-Potency-CHEMBL1738606/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794308/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794311/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794345/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794352/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794359/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794375/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794401/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794424/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794440/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794461/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794483/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794499/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794553/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794580/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794584/chembl-x-0.npy',
'chembl-Potency-CHEMBL1794585/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114713/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114738/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114775/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114780/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114784/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114788/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114807/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114810/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114836/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114843/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114861/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114908/chembl-x-0.npy',
'chembl-Potency-CHEMBL2114913/chembl-x-0.npy',
'chembl-Potency-CHEMBL2354211/chembl-x-0.npy',
'chembl-Potency-CHEMBL2354221/chembl-x-0.npy',
'chembl-Potency-CHEMBL2354254/chembl-x-0.npy',
'chembl-Potency-CHEMBL2354287/chembl-x-0.npy',
'chembl-Potency-CHEMBL2354311/chembl-x-0.npy',
'chembl-Potency-CHEMBL3214953/chembl-x-0.npy',
'chembl-Potency-CHEMBL3215017/chembl-x-0.npy',
'chembl-Potency-CHEMBL3215106/chembl-x-0.npy',
'chembl-Potency-CHEMBL3215181/chembl-x-0.npy',
'chembl-Potency-CHEMBL3215278/chembl-x-0.npy',
'chembl-Potency-CHEMBL3562077/chembl-x-0.npy',
'chembl-RBC-CHEMBL3885882/chembl-x-0.npy',
'chembl-SODIUM-CHEMBL3885882/chembl-x-0.npy',
'chembl-WBC-CHEMBL3885882/chembl-x-0.npy',
'chembl-WEIGHT-CHEMBL3885862/chembl-x-0.npy',
'chembl-WEIGHT-CHEMBL3885863/chembl-x-0.npy']
class ChEMBLDataset(DiscreteDataset):
"""A molecule design dataset that defines a common set of functions
and attributes for a model-based optimization dataset, where the
goal is to find a design 'x' that maximizes a prediction 'y':
max_x { y = f(x) }
Public Attributes:
name: str
An attribute that specifies the name of a model-based optimization
dataset, which might be used when labelling plots in a diagram of
performance in a research paper using design-bench
x_name: str
An attribute that specifies the name of designs in a model-based
optimization dataset, which might be used when labelling plots
in a visualization of performance in a research paper
y_name: str
An attribute that specifies the name of predictions in a model-based
optimization dataset, which might be used when labelling plots
in a visualization of performance in a research paper
x: np.ndarray
the design values 'x' for a model-based optimization problem
represented as a numpy array of arbitrary type
input_shape: Tuple[int]
the shape of a single design values 'x', represented as a list of
integers similar to calling np.ndarray.shape
input_size: int
the total number of components in the design values 'x', represented
as a single integer, the product of its shape entries
input_dtype: np.dtype
the data type of the design values 'x', which is typically either
floating point or integer (np.float32 or np.int32)
y: np.ndarray
the prediction values 'y' for a model-based optimization problem
represented by a scalar floating point value per 'x'
output_shape: Tuple[int]
the shape of a single prediction value 'y', represented as a list of
integers similar to calling np.ndarray.shape
output_size: int
the total number of components in the prediction values 'y',
represented as a single integer, the product of its shape entries
output_dtype: np.dtype
the data type of the prediction values 'y', which is typically a
type of floating point (np.float32 or np.float16)
dataset_size: int
the total number of paired design values 'x' and prediction values
'y' in the dataset, represented as a single integer
dataset_distribution: Callable[np.ndarray, np.ndarray]
the target distribution of the model-based optimization dataset
marginal p(y) used for controlling the sampling distribution
dataset_max_percentile: float
the percentile between 0 and 100 of prediction values 'y' above
which are hidden from access by members outside the class
dataset_min_percentile: float
the percentile between 0 and 100 of prediction values 'y' below
which are hidden from access by members outside the class
dataset_max_output: float
the specific cutoff threshold for prediction values 'y' above
which are hidden from access by members outside the class
dataset_min_output: float
the specific cutoff threshold for prediction values 'y' below
which are hidden from access by members outside the class
internal_batch_size: int
the integer number of samples per batch that is used internally
when processing the dataset and generating samples
freeze_statistics: bool
a boolean indicator that when set to true prevents methods from
changing the normalization and sub sampling statistics
is_normalized_x: bool
a boolean indicator that specifies whether the design values
in the dataset are being normalized
x_mean: np.ndarray
a numpy array that is automatically calculated to be the mean
of visible design values in the dataset
x_standard_dev: np.ndarray
a numpy array that is automatically calculated to be the standard
deviation of visible design values in the dataset
is_normalized_y: bool
a boolean indicator that specifies whether the prediction values
in the dataset are being normalized
y_mean: np.ndarray
a numpy array that is automatically calculated to be the mean
of visible prediction values in the dataset
y_standard_dev: np.ndarray
a numpy array that is automatically calculated to be the standard
deviation of visible prediction values in the dataset
is_logits: bool (only supported for a DiscreteDataset)
a value that indicates whether the design values contained in the
model-based optimization dataset have already been converted to
logits and need not be converted again
Public Methods:
iterate_batches(batch_size: int, return_x: bool,
return_y: bool, drop_remainder: bool)
-> Iterable[Tuple[np.ndarray, np.ndarray]]:
Returns an object that supports iterations, which yields tuples of
design values 'x' and prediction values 'y' from a model-based
optimization data set for training a model
iterate_samples(return_x: bool, return_y: bool):
-> Iterable[Tuple[np.ndarray, np.ndarray]]:
Returns an object that supports iterations, which yields tuples of
design values 'x' and prediction values 'y' from a model-based
optimization data set for training a model
subsample(max_samples: int,
max_percentile: float,
min_percentile: float):
a function that exposes a subsampled version of a much larger
model-based optimization dataset containing design values 'x'
whose prediction values 'y' are skewed
relabel(relabel_function:
Callable[[np.ndarray, np.ndarray], np.ndarray]):
a function that accepts a function that maps from a dataset of
design values 'x' and prediction values y to a new set of
prediction values 'y' and relabels the model-based optimization dataset
clone(subset: set, shard_size: int,
to_disk: bool, disk_target: str, is_absolute: bool):
Generate a cloned copy of a model-based optimization dataset
using the provided name and shard generation settings; useful
when relabelling a dataset buffer from the dis
split(fraction: float, subset: set, shard_size: int,
to_disk: bool, disk_target: str, is_absolute: bool):
split a model-based optimization data set into a training set and
a validation set allocating 'fraction' of the data set to the
validation set and the rest to the training set
normalize_x(new_x: np.ndarray) -> np.ndarray:
a helper function that accepts floating point design values 'x'
as input and standardizes them so that they have zero
empirical mean and unit empirical variance
denormalize_x(new_x: np.ndarray) -> np.ndarray:
a helper function that accepts floating point design values 'x'
as input and undoes standardization so that they have their
original empirical mean and variance
normalize_y(new_x: np.ndarray) -> np.ndarray:
a helper function that accepts floating point prediction values 'y'
as input and standardizes them so that they have zero
empirical mean and unit empirical variance
denormalize_y(new_x: np.ndarray) -> np.ndarray:
a helper function that accepts floating point prediction values 'y'
as input and undoes standardization so that they have their
original empirical mean and variance
map_normalize_x():
a destructive function that standardizes the design values 'x'
in the class dataset in-place so that they have zero empirical
mean and unit variance
map_denormalize_x():
a destructive function that undoes standardization of the
design values 'x' in the class dataset in-place which are expected
to have zero empirical mean and unit variance
map_normalize_y():
a destructive function that standardizes the prediction values 'y'
in the class dataset in-place so that they have zero empirical
mean and unit variance
map_denormalize_y():
a destructive function that undoes standardization of the
prediction values 'y' in the class dataset in-place which are
expected to have zero empirical mean and unit variance
--- for discrete tasks only
to_logits(np.ndarray) > np.ndarray:
A helper function that accepts design values represented as a numpy
array of integers as input and converts them to floating point
logits of a certain probability distribution
to_integers(np.ndarray) > np.ndarray:
A helper function that accepts design values represented as a numpy
array of floating point logits as input and converts them to integer
representing the max of the distribution
map_to_logits():
a function that processes the dataset corresponding to this
model-based optimization problem, and converts integers to a
floating point representation as logits
map_to_integers():
a function that processes the dataset corresponding to this
model-based optimization problem, and converts a floating point
representation as logits to integers
"""
name = "chembl/chembl"
y_name = "standard_value"
x_name = "smiles"
@staticmethod
def register_x_shards(assay_chembl_id="CHEMBL1794345",
standard_type="Potency"): # max percentile 53 works well
"""Registers a remote file for download that contains design values
in a format compatible with the dataset builder class;
these files are downloaded all at once in the dataset initialization
Arguments:
assay_chembl_id: str
a string identifier that specifies which assay to use for
model-based optimization, where the goal is to find a design
value 'x' that maximizes a certain property
standard_type: str
a string identifier that specifies which property of the assay
is being measured for model-based optimization, where the goal is
to maximize that property
Returns:
resources: list of RemoteResource
a list of RemoteResource objects specific to this dataset, which
will be automatically downloaded while the dataset is built
and may serve as shards if the dataset is large
"""
return [DiskResource(
file, is_absolute=False,
download_target=f"{SERVER_URL}/{file}",
download_method="direct") for file in CHEMBL_FILES
if f"{standard_type}-{assay_chembl_id}" in file]
@staticmethod
def register_y_shards(assay_chembl_id="CHEMBL1794345",
standard_type="Potency"):
"""Registers a remote file for download that contains prediction
values in a format compatible with the dataset builder class;
these files are downloaded all at once in the dataset initialization
Arguments:
assay_chembl_id: str
a string identifier that specifies which assay to use for
model-based optimization, where the goal is to find a design
value 'x' that maximizes a certain property
standard_type: str
a string identifier that specifies which property of the assay
is being measured for model-based optimization, where the goal is
to maximize that property
Returns:
resources: list of RemoteResource
a list of RemoteResource objects specific to this dataset, which
will be automatically downloaded while the dataset is built
and may serve as shards if the dataset is large
"""
return [DiskResource(
file.replace("-x-", "-y-"), is_absolute=False,
download_target=f"{SERVER_URL}/{file.replace('-x-', '-y-')}",
download_method="direct") for file in CHEMBL_FILES
if f"{standard_type}-{assay_chembl_id}" in file]
def __init__(self, assay_chembl_id="CHEMBL1794345",
standard_type="Potency",
soft_interpolation=0.6, **kwargs):
"""Initialize a model-based optimization dataset and prepare
that dataset by loading that dataset from disk and modifying
its distribution
Arguments:
assay_chembl_id: str
a string identifier that specifies which assay to use for
model-based optimization, where the goal is to find a design
value 'x' that maximizes a certain property
standard_type: str
a string identifier that specifies which property of the assay
is being measured for model-based optimization, where the goal is
to maximize that property
soft_interpolation: float
a floating point hyper parameter used when converting design values
from integers to a floating point representation as logits, which
interpolates between a uniform and dirac distribution
1.0 = dirac, 0.0 -> uniform
**kwargs: dict
additional keyword arguments which are used to parameterize the
data set generation process, including which shard files are used
if multiple sets of data set shard files can be loaded
"""
# set the names the describe the dataset
self.name = f"chembl-{standard_type}-{assay_chembl_id}/chembl"
self.y_name = standard_type
# initialize the dataset using the method in the base class
super(ChEMBLDataset, self).__init__(
self.register_x_shards(assay_chembl_id=assay_chembl_id,
standard_type=standard_type),
self.register_y_shards(assay_chembl_id=assay_chembl_id,
standard_type=standard_type),
is_logits=False, num_classes=591,
soft_interpolation=soft_interpolation, **kwargs)
| 50.564972 | 83 | 0.689078 | 4,873 | 35,800 | 5.030166 | 0.141391 | 0.111945 | 0.127937 | 0.175914 | 0.863332 | 0.848768 | 0.83249 | 0.240372 | 0.21414 | 0.202635 | 0 | 0.150926 | 0.212682 | 35,800 | 707 | 84 | 50.636492 | 0.718726 | 0.319106 | 0 | 0.052174 | 0 | 0 | 0.609661 | 0.599712 | 0 | 0 | 0 | 0 | 0 | 1 | 0.013043 | false | 0 | 0.008696 | 0 | 0.047826 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
064128bb04919d608b2ee77ea7025c176c91ce26 | 31 | py | Python | weather_tool/__init__.py | freyaacar/weather_tool | 1482d112644d0e3a8d03771645a45957449a4533 | [
"MIT"
] | null | null | null | weather_tool/__init__.py | freyaacar/weather_tool | 1482d112644d0e3a8d03771645a45957449a4533 | [
"MIT"
] | null | null | null | weather_tool/__init__.py | freyaacar/weather_tool | 1482d112644d0e3a8d03771645a45957449a4533 | [
"MIT"
] | null | null | null | from .nikiti import activities
| 15.5 | 30 | 0.83871 | 4 | 31 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.962963 | 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 | 1 | 0 | 0 | 6 |
06796855ede663789af1b0ef28227e8f5f14fbf2 | 122 | py | Python | wrappers/scripts/reg_account.py | button-tech/ton-grams-testnet | e4d83fef72e24f8ba977bc0dfab9d4f57c1f27ec | [
"MIT"
] | null | null | null | wrappers/scripts/reg_account.py | button-tech/ton-grams-testnet | e4d83fef72e24f8ba977bc0dfab9d4f57c1f27ec | [
"MIT"
] | null | null | null | wrappers/scripts/reg_account.py | button-tech/ton-grams-testnet | e4d83fef72e24f8ba977bc0dfab9d4f57c1f27ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.7
import uuid
from ton import reg_account
import sys
print(reg_account(sys.argv[1], sys.argv[2]))
| 17.428571 | 44 | 0.754098 | 23 | 122 | 3.913043 | 0.695652 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036697 | 0.106557 | 122 | 6 | 45 | 20.333333 | 0.788991 | 0.188525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.75 | 0 | 0.75 | 0.25 | 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 | 1 | 0 | 0 | 6 |
23488c90dd6aecf77166800db2ce82add894543f | 78 | py | Python | py_entitymatching/tests/__init__.py | kvpradap/py_entitymatching | 4ff803df1a03cf4d77ef935357355e6de5dd9438 | [
"BSD-3-Clause"
] | 165 | 2016-08-28T14:30:01.000Z | 2022-03-29T17:24:03.000Z | py_entitymatching/tests/__init__.py | mvahit/py_entitymatching | 6724081d7d95c547e5a51625b4a8207c6c1737f8 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 70 | 2016-11-22T00:35:22.000Z | 2022-03-11T22:26:26.000Z | py_entitymatching/tests/__init__.py | mvahit/py_entitymatching | 6724081d7d95c547e5a51625b4a8207c6c1737f8 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 53 | 2016-09-22T02:07:34.000Z | 2022-03-19T18:57:06.000Z | import sys
#sys.path.append('/scratch/pradap/python-work/py_entitymatching')
| 19.5 | 65 | 0.794872 | 11 | 78 | 5.545455 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.051282 | 78 | 3 | 66 | 26 | 0.824324 | 0.820513 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
236102f6dc8ca00f773c92cc89122c9121122200 | 7,028 | py | Python | project/iotd/workish/migrations/0002_auto_20180529_1945.py | balangheorghe/CloudComputing | b4ca2209e1a2292abffcb559dc942430a2862296 | [
"Apache-2.0"
] | null | null | null | project/iotd/workish/migrations/0002_auto_20180529_1945.py | balangheorghe/CloudComputing | b4ca2209e1a2292abffcb559dc942430a2862296 | [
"Apache-2.0"
] | null | null | null | project/iotd/workish/migrations/0002_auto_20180529_1945.py | balangheorghe/CloudComputing | b4ca2209e1a2292abffcb559dc942430a2862296 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2018-05-29 16:45
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('workish', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Employee_Roles',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('assignment_date', models.DateField()),
('score', models.FloatField()),
],
),
migrations.CreateModel(
name='Employee_Skills',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('experience', models.FloatField()),
('observation', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Employees',
fields=[
('employee_id', models.AutoField(primary_key=True, serialize=False)),
('first_name', models.CharField(max_length=50)),
('last_name', models.CharField(max_length=50)),
('cnp', models.CharField(max_length=50)),
('address', models.CharField(max_length=500)),
('cellphone', models.CharField(max_length=50)),
('enrollment_Date', models.DateField()),
('rating', models.FloatField()),
('cache_professional_score', models.FloatField()),
('line_manager', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Employees')),
],
),
migrations.CreateModel(
name='Roles',
fields=[
('role_id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=50)),
('description', models.CharField(max_length=500)),
('type', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Skills',
fields=[
('skill_id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=50)),
('description', models.CharField(max_length=500)),
('score', models.FloatField()),
],
),
migrations.CreateModel(
name='Tasks',
fields=[
('task_id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=50)),
('description', models.CharField(max_length=500)),
('location', models.CharField(max_length=50)),
('parent_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Tasks')),
],
),
migrations.CreateModel(
name='Tasks_Required_Skills',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('observations', models.CharField(max_length=500)),
('min_score', models.FloatField()),
('number_of_persons', models.IntegerField()),
('skill_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Skills')),
('task_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Tasks')),
],
),
migrations.CreateModel(
name='Tasks_Team_Assignments',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('observations', models.CharField(max_length=500)),
('status', models.IntegerField()),
('task_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Tasks')),
],
),
migrations.CreateModel(
name='Team_Assignments',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('observation', models.CharField(max_length=500)),
('employee_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Employees')),
],
),
migrations.CreateModel(
name='Team_Skill',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('experience', models.FloatField()),
('observations', models.CharField(max_length=500)),
('skill_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Skills')),
],
),
migrations.CreateModel(
name='Teams',
fields=[
('team_id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=50)),
('specific', models.CharField(max_length=50)),
('base_location', models.CharField(max_length=50)),
('leader_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Employees')),
],
),
migrations.AddField(
model_name='team_skill',
name='team_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Teams'),
),
migrations.AddField(
model_name='team_assignments',
name='team_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Teams'),
),
migrations.AddField(
model_name='tasks_team_assignments',
name='team_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Teams'),
),
migrations.AddField(
model_name='employee_skills',
name='employee_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Employees'),
),
migrations.AddField(
model_name='employee_skills',
name='skill_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Skills'),
),
migrations.AddField(
model_name='employee_roles',
name='employee_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Employees'),
),
migrations.AddField(
model_name='employee_roles',
name='skill_id',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workish.Skills'),
),
]
| 44.481013 | 121 | 0.568156 | 668 | 7,028 | 5.800898 | 0.149701 | 0.08129 | 0.097548 | 0.130065 | 0.830452 | 0.789677 | 0.722839 | 0.708645 | 0.67071 | 0.67071 | 0 | 0.014053 | 0.291264 | 7,028 | 157 | 122 | 44.764331 | 0.763903 | 0.009533 | 0 | 0.666667 | 1 | 0 | 0.138833 | 0.012791 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.02 | 0 | 0.04 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
88c9b4bf23df059c61479aa13fd3deeb9356f0e8 | 25,837 | py | Python | Aula_18_04/runtests_lms_v2.py | ViniciusMottag/Aula_app_distri | 2b62cf1d25bbcff575eb1a9c5d1e0801316b3fe8 | [
"Apache-2.0"
] | null | null | null | Aula_18_04/runtests_lms_v2.py | ViniciusMottag/Aula_app_distri | 2b62cf1d25bbcff575eb1a9c5d1e0801316b3fe8 | [
"Apache-2.0"
] | null | null | null | Aula_18_04/runtests_lms_v2.py | ViniciusMottag/Aula_app_distri | 2b62cf1d25bbcff575eb1a9c5d1e0801316b3fe8 | [
"Apache-2.0"
] | null | null | null | import requests
import unittest
class TestStringMethods(unittest.TestCase):
'''
def test_000_alunos_retorna_lista(self):
r = requests.get('http://localhost:5002/alunos')
self.assertEqual(type(r.json()),type([]))
def test_001_adiciona_alunos(self):
r = requests.post('http://localhost:5002/alunos',json={'nome':'fernando','id':1})
r = requests.post('http://localhost:5002/alunos',json={'nome':'roberto','id':2})
r_lista = requests.get('http://localhost:5002/alunos')
achei_fernando = False
achei_roberto = False
for aluno in r_lista.json():
if aluno['nome'] == 'fernando':
achei_fernando = True
if aluno['nome'] == 'roberto':
achei_roberto = True
if not achei_fernando:
self.fail('aluno fernando nao apareceu na lista de alunos')
if not achei_roberto:
self.fail('aluno roberto nao apareceu na lista de alunos')
def test_002_aluno_por_id(self):
r = requests.post('http://localhost:5002/alunos',json={'nome':'mario','id':20})
r_id = requests.get('http://localhost:5002/alunos/20')
self.assertEqual(r_id.json()['nome'],'mario')
def test_003_adiciona_e_reseta(self):
r = requests.post('http://localhost:5002/alunos',json={'nome':'cicero','id':29})
r_lista = requests.get('http://localhost:5002/alunos')
self.assertTrue(len(r_lista.json()) > 0)
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r_lista_depois = requests.get('http://localhost:5002/alunos')
self.assertEqual(len(r_lista_depois.json()),0)
def test_004_adiciona_e_deleta(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
requests.post('http://localhost:5002/alunos',json={'nome':'cicero','id':29})
requests.post('http://localhost:5002/alunos',json={'nome':'lucas','id':28})
r_lista = requests.get('http://localhost:5002/alunos')
self.assertEqual(len(r_lista.json()),2)
requests.delete('http://localhost:5002/alunos/28')
r_lista = requests.get('http://localhost:5002/alunos')
self.assertEqual(len(r_lista.json()),1)
def test_005_edita(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
requests.post('http://localhost:5002/alunos',json={'nome':'lucas','id':28})
r_antes = requests.get('http://localhost:5002/alunos/28')
self.assertEqual(r_antes.json()['nome'],'lucas')
requests.put('http://localhost:5002/alunos/28', json={'nome':'lucas mendes'})
r_depois = requests.get('http://localhost:5002/alunos/28')
self.assertEqual(r_depois.json()['nome'],'lucas mendes')
def test_006_id_inexistente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.put('http://localhost:5002/alunos/15',json={'nome':'bowser','id':15})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'aluno nao encontrado')
r = requests.get('http://localhost:5002/alunos/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'aluno nao encontrado')
r = requests.delete('http://localhost:5002/alunos/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'aluno nao encontrado')
def test_007_criar_com_id_ja_existente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/alunos',json={'nome':'bond','id':7})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/alunos',json={'nome':'james','id':7})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'id ja utilizada')
def test_008_post_ou_put_sem_nome(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/alunos',json={'id':8})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'aluno sem nome')
r = requests.post('http://localhost:5002/alunos',json={'nome':'maximus','id':7})
self.assertEqual(r.status_code,200)
r = requests.put('http://localhost:5002/alunos/7',json={'id':7})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'aluno sem nome')
def test_100_professores_retorna_lista(self):
r = requests.get('http://localhost:5002/professores')
self.assertEqual(type(r.json()),type([]))
def test_100b_nao_confundir_professor_e_aluno(self):
r_reset = requests.post('http://localhost:5002/reseta')
r = requests.post('http://localhost:5002/alunos',json={'nome':'fernando','id':1})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/alunos',json={'nome':'roberto','id':2})
self.assertEqual(r.status_code,200)
r_lista = requests.get('http://localhost:5002/professores')
self.assertEqual(len(r_lista.json()),0)
r_lista_alunos = requests.get('http://localhost:5002/alunos')
self.assertEqual(len(r_lista_alunos.json()),2)
def test_101_adiciona_professores(self):
r = requests.post('http://localhost:5002/professores',json={'nome':'fernando','id':1})
r = requests.post('http://localhost:5002/professores',json={'nome':'roberto','id':2})
r_lista = requests.get('http://localhost:5002/professores')
achei_fernando = False
achei_roberto = False
for professor in r_lista.json():
if professor['nome'] == 'fernando':
achei_fernando = True
if professor['nome'] == 'roberto':
achei_roberto = True
if not achei_fernando:
self.fail('professor fernando nao apareceu na lista de professores')
if not achei_roberto:
self.fail('professor roberto nao apareceu na lista de professores')
def test_102_professores_por_id(self):
r = requests.post('http://localhost:5002/professores',json={'nome':'mario','id':20})
r_lista = requests.get('http://localhost:5002/professores/20')
self.assertEqual(r_lista.json()['nome'],'mario')
def test_103_adiciona_e_reseta(self):
r = requests.post('http://localhost:5002/professores',json={'nome':'cicero','id':29})
r_lista = requests.get('http://localhost:5002/professores')
self.assertTrue(len(r_lista.json()) > 0)
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r_lista_depois = requests.get('http://localhost:5002/professores')
self.assertEqual(len(r_lista_depois.json()),0)
def test_104_adiciona_e_deleta(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
requests.post('http://localhost:5002/professores',json={'nome':'cicero','id':29})
requests.post('http://localhost:5002/professores',json={'nome':'lucas','id':28})
r_lista = requests.get('http://localhost:5002/professores')
self.assertEqual(len(r_lista.json()),2)
requests.delete('http://localhost:5002/professores/28')
r_lista = requests.get('http://localhost:5002/professores')
self.assertEqual(len(r_lista.json()),1)
def test_105_edita(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
requests.post('http://localhost:5002/professores',json={'nome':'lucas','id':28})
r_antes = requests.get('http://localhost:5002/professores/28')
self.assertEqual(r_antes.json()['nome'],'lucas')
requests.put('http://localhost:5002/professores/28', json={'nome':'lucas mendes'})
r_depois = requests.get('http://localhost:5002/professores/28')
self.assertEqual(r_depois.json()['nome'],'lucas mendes')
def test_106_id_inexistente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.put('http://localhost:5002/professores/15',json={'nome':'bowser','id':15})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'professor nao encontrado')
r = requests.get('http://localhost:5002/professores/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'professor nao encontrado')
r = requests.delete('http://localhost:5002/professores/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'professor nao encontrado')
def test_107_criar_com_id_ja_existente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/professores',json={'nome':'bond','id':7})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/professores',json={'nome':'james','id':7})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'id ja utilizada')
def test_108_post_ou_put_sem_nome(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/professores',json={'id':8})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'professor sem nome')
r = requests.post('http://localhost:5002/professores',json={'nome':'maximus','id':7})
self.assertEqual(r.status_code,200)
r = requests.put('http://localhost:5002/professores/7',json={'id':7})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'professor sem nome')
def test_109_nao_confundir_professor_e_aluno(self):
r_reset = requests.post('http://localhost:5002/reseta')
r = requests.post('http://localhost:5002/professores',json={'nome':'fernando','id':1})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/professores',json={'nome':'roberto','id':2})
self.assertEqual(r.status_code,200)
r_lista = requests.get('http://localhost:5002/professores')
self.assertEqual(len(r_lista.json()),2)
r_lista_alunos = requests.get('http://localhost:5002/alunos')
self.assertEqual(len(r_lista_alunos.json()),0)
def test_200_disciplinas_retorna_lista(self):
r_reset = requests.post('http://localhost:5002/reseta')
r = requests.get('http://localhost:5002/disciplinas')
self.assertEqual(type(r.json()),type([]))
self.assertEqual(len(r.json()),0)
def test_200b_nao_confundir_disciplina_e_pessoas(self):
r_reset = requests.post('http://localhost:5002/reseta')
r = requests.post('http://localhost:5002/alunos',json={'nome':'fernando','id':1})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/professores',json={'nome':'roberto','id':2})
self.assertEqual(r.status_code,200)
r_lista = requests.get('http://localhost:5002/disciplinas')
self.assertEqual(len(r_lista.json()),0)
def test_201_adiciona_disciplinas(self):
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
r = requests.post('http://localhost:5002/disciplinas',json={'id':101,'nome':'distribuidos','status':12,'plano_ensino':'clientes e servidores','carga_horaria':10})
r_lista = requests.get('http://localhost:5002/disciplinas')
achei_dados = False
achei_distribuidos = False
for disciplina in r_lista.json():
if 'dados' in disciplina['nome']:
achei_dados = True
if 'distri' in disciplina['nome']:
achei_distribuidos = True
if not achei_dados:
self.fail('disciplina estrutura de dados nao apareceu na lista de disciplinas')
if not achei_distribuidos:
self.fail('disciplina distribuidos nao apareceu na lista de disciplinas')
def test_202_disciplinas_por_id(self):
r = requests.post('http://localhost:5002/disciplinas',json={'id':103,'nome':'matematica','status':12,'plano_ensino':'funcoes e calculo','carga_horaria':15})
r_lista = requests.get('http://localhost:5002/disciplinas/103')
self.assertEqual(r_lista.json()['nome'],'matematica')
self.assertEqual(r_lista.json()['plano_ensino'],'funcoes e calculo')
self.assertEqual(r_lista.json()['carga_horaria'],15)
self.assertEqual(r_lista.json()['status'],12)
def test_203_adiciona_e_reseta(self):
r = requests.post('http://localhost:5002/disciplinas',json={'id':104,'nome':'lp2','status':12,'plano_ensino':'dicionarios e classes','carga_horaria':15})
r_lista = requests.get('http://localhost:5002/disciplinas')
self.assertTrue(len(r_lista.json()) > 0)
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r_lista_depois = requests.get('http://localhost:5002/disciplinas')
self.assertEqual(len(r_lista_depois.json()),0)
def test_204_adiciona_e_deleta(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
r = requests.post('http://localhost:5002/disciplinas',json={'id':101,'nome':'distribuidos','status':12,'plano_ensino':'clientes e servidores','carga_horaria':10})
r_lista = requests.get('http://localhost:5002/disciplinas')
self.assertEqual(len(r_lista.json()),2)
requests.delete('http://localhost:5002/disciplinas/100')
r_lista = requests.get('http://localhost:5002/disciplinas')
self.assertEqual(len(r_lista.json()),1)
def test_205_edita(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
r_antes = requests.get('http://localhost:5002/disciplinas/100')
self.assertEqual(r_antes.json()['nome'],'estruturas de dados')
requests.put('http://localhost:5002/disciplinas/100', json={'nome':'algoritmos'})
r_depois = requests.get('http://localhost:5002/disciplinas/100')
self.assertEqual(r_depois.json()['nome'],'algoritmos')
def test_206_id_inexistente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.put('http://localhost:5002/disciplinas/15',json={'nome':'bowser','id':15})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'disciplina nao encontrada')
r = requests.get('http://localhost:5002/disciplinas/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'disciplina nao encontrada')
r = requests.delete('http://localhost:5002/disciplinas/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'disciplina nao encontrada')
def test_207_criar_com_id_ja_existente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'distribuidos','status':12,'plano_ensino':'clientes e servidores','carga_horaria':10})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'id ja utilizada')
'''
def test_208_post_com_campos_faltando(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/disciplinas',json={ 'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
r = requests.post('http://localhost:5002/disciplinas',json={'id':101, 'status':12,'plano_ensino':'dados','carga_horaria':15})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
r = requests.post('http://localhost:5002/disciplinas',json={'id':102,'nome':'estruturas de dados','status':12, 'carga_horaria':15})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
r = requests.post('http://localhost:5002/disciplinas',json={'id':103,'nome':'estruturas de dados','status':12,'plano_ensino':'dados'})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
def test_300_ofertadas_retorna_lista(self):
r_reset = requests.post('http://localhost:5002/reseta')
r = requests.get('http://localhost:5002/ofertadas')
self.assertEqual(type(r.json()),type([]))
self.assertEqual(len(r.json()),0)
def test_300b_nao_confundir_ofertada_e_outras_entidades(self):
r_reset = requests.post('http://localhost:5002/reseta')
r = requests.post('http://localhost:5002/alunos',json={'nome':'fernando','id':1})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/professores',json={'nome':'roberto','id':2})
r = requests.post('http://localhost:5002/disciplinas',json={'id':100,'nome':'estruturas de dados','status':12,'plano_ensino':'dados','carga_horaria':15})
self.assertEqual(r.status_code,200)
r_lista = requests.get('http://localhost:5002/ofertadas')
self.assertEqual(len(r_lista.json()),0)
def test_301_adiciona_ofertadas(self):
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13'})
r = requests.post('http://localhost:5002/ofertadas',json={'id':101,'ano':2019,'semestre':1,'turma':'ADS3','data':'2019-04-13'})
r_lista = requests.get('http://localhost:5002/ofertadas')
achei_ads = False
achei_si = False
for ofertada in r_lista.json():
if 'SI' in ofertada['turma']:
achei_si = True
if 'ADS' in ofertada['turma']:
achei_ads = True
if not achei_ads:
self.fail('ofertada de ads nao apareceu na lista de ofertadas')
if not achei_si:
self.fail('ofertada de si nao apareceu na lista de ofertadas')
def test_302_disciplinas_por_id(self):
r = requests.post('http://localhost:5002/ofertadas',json={'id':110,'ano':2010,'semestre':1,'turma':'ADS2','data':'2010-04-20'})
r_lista = requests.get('http://localhost:5002/ofertadas/110')
self.assertEqual(r_lista.json()['turma'],'ADS2')
self.assertEqual(r_lista.json()['data'],'2010-04-20')
self.assertEqual(r_lista.json()['ano'],2010)
self.assertEqual(r_lista.json()['semestre'],1)
def test_303_adiciona_e_reseta(self):
r = requests.post('http://localhost:5002/ofertadas',json={'id':110,'ano':2010,'semestre':2,'turma':'GTI2','data':'2010-04-20'})
r_lista = requests.get('http://localhost:5002/ofertadas')
self.assertTrue(len(r_lista.json()) > 0)
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r_lista_depois = requests.get('http://localhost:5002/ofertadas')
self.assertEqual(len(r_lista_depois.json()),0)
def test_304_adiciona_e_deleta(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13'})
r = requests.post('http://localhost:5002/ofertadas',json={'id':1,'ano':2019,'semestre':1,'turma':'ADS3','data':'2019-11-13'})
r_lista = requests.get('http://localhost:5002/ofertadas')
self.assertEqual(len(r_lista.json()),2)
requests.delete('http://localhost:5002/ofertadas/100')
r_lista = requests.get('http://localhost:5002/ofertadas')
self.assertEqual(len(r_lista.json()),1)
def test_305_edita(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={'id':1,'ano':2019,'semestre':1,'turma':'ADS3','data':'2019-11-13'})
r_antes = requests.get('http://localhost:5002/ofertadas/1')
self.assertEqual(r_antes.json()['turma'],'ADS3')
requests.put('http://localhost:5002/ofertadas/1', json={'turma':'ADS2'})
r_depois = requests.get('http://localhost:5002/ofertadas/1')
self.assertEqual(r_depois.json()['turma'],'ADS2')
def test_306_id_inexistente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.put('http://localhost:5002/ofertadas/10',json={'ano':2019,'data':'2019-11-13'})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'ofertada nao encontrada')
r = requests.get('http://localhost:5002/ofertadas/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'ofertada nao encontrada')
r = requests.delete('http://localhost:5002/ofertadas/15')
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'ofertada nao encontrada')
def test_307_criar_com_id_ja_existente(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13'})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2011,'semestre':1,'turma':'ADS3','data':'2011-11-23'})
self.assertEqual(r.status_code,400)
self.assertEqual(r.json()['erro'],'id ja utilizada')
def test_308_post_com_campos_faltando(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13'})
self.assertEqual(r.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={ 'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13'})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
r = requests.post('http://localhost:5002/ofertadas',json={'id':101, 'semestre':1,'turma':'SI3','data':'2019-04-13'})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
r = requests.post('http://localhost:5002/ofertadas',json={'id':102,'ano':2019, 'turma':'SI3','data':'2019-04-13'})
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
r = requests.post('http://localhost:5002/ofertadas',json={'id':103,'ano':2019,'semestre':1,'turma':'SI3' })
self.assertEqual(r.status_code,400)
self.assertTrue('erro' in r.json())
self.assertEqual(r.json()['erro'],'data faltando')
def test_309_professor_deve_ser_valido_ao_criar_ofertada(self):
r_reset = requests.post('http://localhost:5002/reseta')
self.assertEqual(r_reset.status_code,200)
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13','id_professor':500})
self.assertEqual(r.status_code,400)
r_lista = requests.get('http://localhost:5002/ofertadas')
self.assertTrue(len(r_lista.json()) == 0)
requests.post('http://localhost:5002/professores',json={'nome':'lucas','id':500})
r = requests.post('http://localhost:5002/ofertadas',json={'id':100,'ano':2019,'semestre':1,'turma':'SI3','data':'2019-04-13','id_professor':500})
self.assertEqual(r.status_code,200)
r_lista = requests.get('http://localhost:5002/ofertadas')
self.assertTrue(len(r_lista.json()) == 1)
def runTests():
suite = unittest.defaultTestLoader.loadTestsFromTestCase(TestStringMethods)
unittest.TextTestRunner(verbosity=2,failfast=True).run(suite)
if __name__ == '__main__':
runTests()
| 54.393684 | 170 | 0.650733 | 3,381 | 25,837 | 4.835256 | 0.055605 | 0.126437 | 0.165341 | 0.142219 | 0.911121 | 0.888977 | 0.841204 | 0.835026 | 0.819856 | 0.799792 | 0 | 0.070582 | 0.170879 | 25,837 | 474 | 171 | 54.508439 | 0.692559 | 0.59527 | 0 | 0.471014 | 0 | 0 | 0.307816 | 0 | 0 | 0 | 0 | 0 | 0.398551 | 1 | 0.094203 | false | 0 | 0.014493 | 0 | 0.115942 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
88ee4e62e90dca4d637e4bbcd197e88ec2a2dcb9 | 116 | py | Python | src/textacy/text_stats/__init__.py | austinjp/textacy | dddfdbf0e0ab3bf756bc4eda042eab1001aac709 | [
"Apache-2.0"
] | 1,929 | 2016-02-14T08:30:38.000Z | 2022-03-31T03:00:35.000Z | src/textacy/text_stats/__init__.py | austinjp/textacy | dddfdbf0e0ab3bf756bc4eda042eab1001aac709 | [
"Apache-2.0"
] | 304 | 2016-02-18T15:52:22.000Z | 2022-03-31T18:06:54.000Z | src/textacy/text_stats/__init__.py | austinjp/textacy | dddfdbf0e0ab3bf756bc4eda042eab1001aac709 | [
"Apache-2.0"
] | 285 | 2016-03-20T04:25:08.000Z | 2022-03-24T11:31:17.000Z | from .api import TextStats, load_hyphenator
from . import basics
from . import components
from . import readability
| 23.2 | 43 | 0.810345 | 15 | 116 | 6.2 | 0.6 | 0.322581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146552 | 116 | 4 | 44 | 29 | 0.939394 | 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 | 1 | 0 | 0 | 6 |
0024b225caba95b1cff2de721a2f706066be8ef7 | 131 | py | Python | microbit_showImage.py | A2Zntu/InternWorks | 69131a08347fa0ad4b5198e2c1e34667291ee416 | [
"MIT"
] | null | null | null | microbit_showImage.py | A2Zntu/InternWorks | 69131a08347fa0ad4b5198e2c1e34667291ee416 | [
"MIT"
] | null | null | null | microbit_showImage.py | A2Zntu/InternWorks | 69131a08347fa0ad4b5198e2c1e34667291ee416 | [
"MIT"
] | null | null | null | from microbit import *
display.show(Image.SQUARE)
display.set_pixel(2, 2, 9)
display.show(Image("00900:09090:90009:99999:90009")) | 21.833333 | 52 | 0.763359 | 21 | 131 | 4.714286 | 0.714286 | 0.222222 | 0.323232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.231405 | 0.076336 | 131 | 6 | 52 | 21.833333 | 0.586777 | 0 | 0 | 0 | 0 | 0 | 0.219697 | 0.219697 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 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 | 6 |
cc4261fcab2e67c75d62ec61d9e2cc20349beb69 | 27 | py | Python | apps/network/src/app/workers/__init__.py | next-fernandocerezal/PyGrid | b82793b0beecd26338c102573a9891c2e86707c8 | [
"Apache-2.0"
] | 9 | 2020-04-23T14:22:48.000Z | 2022-02-25T21:35:05.000Z | apps/network/src/app/workers/__init__.py | next-fernandocerezal/PyGrid | b82793b0beecd26338c102573a9891c2e86707c8 | [
"Apache-2.0"
] | 42 | 2020-04-24T17:59:33.000Z | 2022-02-16T01:09:23.000Z | apps/network/src/app/workers/__init__.py | next-fernandocerezal/PyGrid | b82793b0beecd26338c102573a9891c2e86707c8 | [
"Apache-2.0"
] | 2 | 2020-08-17T11:19:44.000Z | 2021-04-30T08:32:05.000Z | from .worker import Worker
| 13.5 | 26 | 0.814815 | 4 | 27 | 5.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 27 | 1 | 27 | 27 | 0.956522 | 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 | 1 | 0 | 0 | 6 |
cc6612cf16f65a98e54cc9401bd024cae56719d1 | 1,841 | py | Python | test/convert.py | MartinBorcin/jsonl-to-conll | 47e861515e0ff3439f4b387ca025094e6d503554 | [
"Apache-2.0"
] | 5 | 2020-05-31T22:30:59.000Z | 2020-10-01T13:10:45.000Z | test/convert.py | MartinBorcin/jsonl-to-conll | 47e861515e0ff3439f4b387ca025094e6d503554 | [
"Apache-2.0"
] | 2 | 2020-06-21T08:05:02.000Z | 2020-06-23T22:29:30.000Z | test/convert.py | MartinBorcin/jsonl-to-conll | 47e861515e0ff3439f4b387ca025094e6d503554 | [
"Apache-2.0"
] | 4 | 2020-06-22T16:43:12.000Z | 2021-09-08T12:19:27.000Z | import unittest
from snapshottest import TestCase
from jsonl_to_conll import convert
class TestConvert(TestCase):
def setUp(self):
self.input_data = {"id": 1, "text": "Ms. Elliott joined Cisco in April 2018. Ms. Elliott is a former Executive Vice President of Juniper Networks, Inc., where she served as EVP and Chief Customer Officer from March 2013 to February 2014, EVP and Chief Sales Officer from July 2011 to March 2013 and EVP, Strategic Alliances from June 2009 to July 2011. Before joining Juniper, Ms. Elliott held a series of senior executive positions with Microsoft Corporation from 2001-2008 including Corporate Vice President of Microsoft’s Industry Solutions Group, Worldwide Public Sector and North American Enterprise Sales organizations. Prior to joining Microsoft Corporation, Ms. Elliott spent 22 years at IBM Corporation, where she held several senior executive positions both in the U.S. and internationally. Since 2014 Ms. Elliott has served as a director on several public company boards including Whirlpool Corporation (since 2014), Bed Bath & Beyond, Inc. (2014-17), Imperva, Inc. (2015-18), Marvell Technology Group Ltd. (2017-18) and Mimecast Ltd. (2017-18), and during this period she also founded and led the development of Broadrooms.com, an informational resource for executive women who serve or want to serve on corporate boards in the U.S.", "meta": {}, "annotation_approver": None, "labels": [[0, 11, "PER"], [19, 24, "ORG"], [40, 51, "PER"], [92, 114, "ORG"], [267, 286, "ORG"], [331, 338, "ORG"], [606, 627, "ORG"], [855, 876, "ORG"], [891, 914, "ORG"], [926, 939, "ORG"], [951, 980, "ORG"], [995, 1008, "ORG"], [1087, 1101, "ORG"], [1203, 1206, "LOC"], [659, 674, "ORG"], [401, 422, "ORG"]]}
def test_convert_successful(self):
self.assertMatchSnapshot(convert.flatten(self.input_data))
| 153.416667 | 1,604 | 0.738729 | 281 | 1,841 | 4.814947 | 0.6121 | 0.033259 | 0.019217 | 0.010347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104659 | 0.148832 | 1,841 | 11 | 1,605 | 167.363636 | 0.758775 | 0 | 0 | 0 | 0 | 0.125 | 0.700706 | 0 | 0 | 0 | 0 | 0 | 0.125 | 1 | 0.25 | false | 0 | 0.375 | 0 | 0.75 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
9da90bbb6e2724b87a8f527a66fdf5351c284db5 | 70 | py | Python | packtets/graph/__init__.py | maxhutch/packtets | eba7d3d354da9bef50bfdbc48e6934c4e17f165c | [
"MIT"
] | 1 | 2017-12-13T18:24:14.000Z | 2017-12-13T18:24:14.000Z | packtets/graph/__init__.py | maxhutch/packtets | eba7d3d354da9bef50bfdbc48e6934c4e17f165c | [
"MIT"
] | 4 | 2016-05-19T14:48:57.000Z | 2016-05-19T19:30:54.000Z | packtets/graph/__init__.py | maxhutch/packtets | eba7d3d354da9bef50bfdbc48e6934c4e17f165c | [
"MIT"
] | null | null | null |
from .approx import *
from .exact import *
from .generator import *
| 11.666667 | 24 | 0.714286 | 9 | 70 | 5.555556 | 0.555556 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 70 | 5 | 25 | 14 | 0.892857 | 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 | 1 | 0 | 0 | 6 |
9dba5a28aa375c669fb9139f4f53a3c739fa9d3f | 162 | py | Python | synth_tools/commands/__init__.py | kentik/synth_tools | 6551e9caf049e4592da4c28e23341d99fac08d58 | [
"Apache-2.0"
] | 2 | 2021-10-20T01:01:21.000Z | 2022-02-21T22:02:26.000Z | synth_tools/commands/__init__.py | kentik/synth_tools | 6551e9caf049e4592da4c28e23341d99fac08d58 | [
"Apache-2.0"
] | null | null | null | synth_tools/commands/__init__.py | kentik/synth_tools | 6551e9caf049e4592da4c28e23341d99fac08d58 | [
"Apache-2.0"
] | 1 | 2021-11-02T01:46:41.000Z | 2021-11-02T01:46:41.000Z | from synth_tools.commands.agents import agents_app
from synth_tools.commands.tests import tests_app
commands_registry = {"test": tests_app, "agent": agents_app}
| 32.4 | 60 | 0.820988 | 24 | 162 | 5.25 | 0.458333 | 0.142857 | 0.222222 | 0.349206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.092593 | 162 | 4 | 61 | 40.5 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0.055556 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 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 | 1 | 0 | 0 | 6 |
9dda30ccc78af111da95639119bcc609b4945c28 | 23,222 | py | Python | tests/test_tests.py | appukuttan-shailesh/hbp-validation-client | 893ae3ecb7dc74420408abcd79610c7499ef9e84 | [
"BSD-3-Clause"
] | 3 | 2020-12-20T16:14:09.000Z | 2021-05-07T15:33:35.000Z | tests/test_tests.py | appukuttan-shailesh/hbp-validation-client | 893ae3ecb7dc74420408abcd79610c7499ef9e84 | [
"BSD-3-Clause"
] | 42 | 2018-01-18T12:29:11.000Z | 2021-02-01T14:07:42.000Z | tests/test_tests.py | appukuttan-shailesh/hbp-validation-client | 893ae3ecb7dc74420408abcd79610c7499ef9e84 | [
"BSD-3-Clause"
] | 6 | 2018-04-18T14:33:42.000Z | 2020-07-23T10:22:42.000Z | import platform
import uuid
from datetime import datetime
from time import sleep
import sciunit
import pytest
"""
1] Retrieve a test definition by its test_id or alias.
"""
#1.1) Without test_id or alias
def test_getTest_none(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.get_test_definition()
assert str(excinfo.value) == "test_path or test_id or alias needs to be provided for finding a test."
#1.2) Using test_id
def test_getTest_id(testLibrary, myTestID):
test_library = testLibrary
test_id = myTestID
test = test_library.get_test_definition(test_id=test_id)
assert test["id"] == test_id
#1.3) Using alias
def test_getTest_alias(testLibrary, myTestID):
test_library = testLibrary
test_id = myTestID
sleep(20)
test = test_library.get_test_definition(test_id=test_id)
test = test_library.get_test_definition(alias=test["alias"])
assert test["id"] == test_id
#1.4) Using test_id and alias
def test_getTest_both(testLibrary, myTestID):
test_library = testLibrary
test_id = myTestID
test = test_library.get_test_definition(test_id=test_id)
test = test_library.get_test_definition(test_id=test_id, alias=test["alias"])
assert test["id"] == test_id
#1.5) Using invalid test_id format
def test_getTest_invalid_id_format(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.get_test_definition(test_id="abcde")
assert "Error in retrieving test." in str(excinfo.value)
#1.6) Using invalid test_id value
def test_getTest_invalid_id_value(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.get_test_definition(test_id=str(uuid.uuid4()))
assert "Error in retrieving test" in str(excinfo.value)
#1.7) Using invalid alias
def test_getTest_invalid_alias(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.get_test_definition(alias="<>(@#%^)")
assert "Error in retrieving test" in str(excinfo.value)
#1.8) Using empty test_id
def test_getTest_empty_id(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.get_test_definition(test_id="")
assert str(excinfo.value) == "test_path or test_id or alias needs to be provided for finding a test."
#1.9) Using empty alias
def test_getTest_empty_alias(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.get_test_definition(alias="")
assert str(excinfo.value) == "test_path or test_id or alias needs to be provided for finding a test."
"""
2] List tests satisfying all specified filters
"""
#2.1) No filters
# because it takes too long to get all tests, fetch first 10 and test 'size' parameter
def test_getList_no_filter(testLibrary):
test_library = testLibrary
tests = test_library.list_tests(size=10)
assert isinstance(tests, list)
assert len(tests) == 10
#2.2) Single filter
def test_getList_one_filter(testLibrary, myTestID):
test_library = testLibrary
tests = test_library.list_tests(cell_type="granule cell")
assert isinstance(tests, list)
assert len(tests) > 0
#2.3) Multiple filters
def test_getList_many_filters(testLibrary, myTestID):
test_library = testLibrary
tests = test_library.list_tests(cell_type="granule cell",
brain_region="basal ganglia",
species="Mus musculus")
assert isinstance(tests, list)
assert len(tests) > 0
#2.4) Invalid filter
def test_getList_invalid_filter(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
tests = test_library.list_tests(abcde="12345")
assert "The specified filter 'abcde' is an invalid filter!" in str(excinfo.value)
#2.5) Filter with no matches
def test_getList_nomatch(testLibrary):
test_library = testLibrary
tests = test_library.list_tests(data_type="ABCDE")
assert isinstance(tests, list)
assert len(tests) == 0
#2.6) Check if 'from_index' parameter works as expected
def test_getList_no_filter_check_index(testLibrary):
test_library = testLibrary
tests1 = test_library.list_tests(size=5, from_index=0)
tests2 = test_library.list_tests(size=5, from_index=4)
assert isinstance(tests1, list)
assert len(tests1) == 5
assert isinstance(tests2, list)
assert len(tests2) == 5
assert tests1[-1]["id"] == tests2[0]["id"]
"""
3] Display list of valid values for fields
"""
#3.1) No parameters (all)
def test_getTestValid_none(testLibrary):
test_library = testLibrary
data = test_library.get_attribute_options()
assert isinstance(data, dict)
assert len(data.keys()) > 0
#3.2) One parameter
def test_getTestValid_one(testLibrary):
test_library = testLibrary
data = test_library.get_attribute_options("cell_type")
assert isinstance(data, list)
assert len(data) > 0
#3.3) Multiple parameters
def test_getTestValid_many(testLibrary):
test_library = testLibrary
with pytest.raises(TypeError) as excinfo:
data = test_library.get_attribute_options("cell_type", "brain_region")
assert "takes at most 2 arguments" in str(excinfo.value) or "takes from 1 to 2 positional arguments" in str(excinfo.value)
#3.4) Invalid parameter
def test_getTestValid_invalid(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
data = test_library.get_attribute_options("abcde")
assert "Specified attribute 'abcde' is invalid." in str(excinfo.value)
"""
4] Register a new test on the test catalog
"""
#4.1) No parameters
def test_addtest_none(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test = test_library.add_test()
#4.2) Missing mandatory parameter (author)
def test_addtest_missingParam(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test_name = "Test_{}_{}_py{}_add2".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name,
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
assert "field required" in str(excinfo.value)
#4.3) Invalid value for parameter (brain_region)
def test_addtest_invalidParam(testLibrary):
test_library = testLibrary
with pytest.raises(Exception) as excinfo:
test_name = "Test_{}_{}_py{}_add3".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="ABCDE", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
assert "brain_region = 'ABCDE' is invalid." in str(excinfo.value)
#4.4) Valid test without alias
def test_addtest_valid_noalias_nodetails(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_add4".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
#4.5) Valid test with alias
def test_addtest_valid_withalias_nodetails(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_add5".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
assert isinstance(uuid.UUID(test["id"], version=4), uuid.UUID)
#4.6) Invalid test with repeated alias; without instances and images
def test_addtest_repeat_alias_nodetails(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_add6".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
sleep(20)
with pytest.raises(Exception) as excinfo:
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
assert "already exists" in str(excinfo.value)
#4.7) Invalid test with no instances
def test_addtest_valid_withalias_withdetails(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_add7".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
with pytest.raises(Exception) as excinfo:
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019")
assert "Error in adding test." in str(excinfo.value)
"""
5] Edit an existing test on the test catalog
"""
#5.1) Invalid change - no test_id
def test_editTest_invalid_noID(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_edit1".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
with pytest.raises(Exception) as excinfo:
test = test_library.edit_test(name="IGNORE - Test Test - " + test_name, alias=test["alias"] + "_changed", author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019")
assert str(excinfo.value) == "Test ID needs to be provided for editing a test."
#5.2) Valid change - test_id
def test_editTest_valid(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_edit2".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
test = test_library.edit_test(test_id=test["id"], name="IGNORE - Test Test - " + test_name, alias=test["alias"] + "_changed", author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019")
assert isinstance(uuid.UUID(test["id"], version=4), uuid.UUID)
#5.3) Invalid change - duplicate alias
def test_editTest_invalid_duplicate_alias(testLibrary):
test_library = testLibrary
test_name1 = "Test_{}_{}_py{}_edit3.1".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name1, alias=test_name1, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
test_name2 = "Test_{}_{}_py{}_edit3.2".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name2, alias=test_name2, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
sleep(20)
test = test_library.get_test_definition(test_id=test["id"])
with pytest.raises(Exception) as excinfo:
test = test_library.edit_test(test_id=test["id"], name=test["name"] + "_changed", alias=test_name1, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019")
assert "already exists" in str(excinfo.value)
#5.4) Invalid change - version info
def test_editTest_invalid_version_info(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_edit4".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
test = test_library.get_test_definition(test_id=test["id"])
with pytest.raises(Exception) as excinfo:
test["id"] = test_library.edit_test(test_id=test["id"], name="IGNORE - Test Test - " + test_name, alias=test["alias"] + "_changed", author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
assert "got an unexpected keyword argument" in str(excinfo.value)
"""
6. Get 'sciunit' validation test instance
"""
#6.1) With valid details - test_id
def test_getValidationTest_testID(testLibrary):
test_library = testLibrary
test_name = "Test_{}_{}_py{}_getValTest_1".format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S"), test_library.environment, platform.python_version())
test = test_library.add_test(name="IGNORE - Test Test - " + test_name, alias=test_name, author={"family_name": "Tester", "given_name": "Validation"},
species="Mus musculus", age="", brain_region="basal ganglia", cell_type="granule cell",
recording_modality="electron microscopy", test_type="network structure", score_type="Other", description="Later",
data_location="https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/sp6_validation_data/test.txt",
data_type="Mean, SD", publication="Testing et al., 2019",
instances=[{"version":"1.0", "repository":"https://github.com/HumanBrainProject/hbp-validation-client.git", "path":"hbp_validation_framework.sample.SampleTest"}])
sleep(30)
test = test_library.get_validation_test(test_id=test["id"])
assert isinstance(test, sciunit.Test)
assert "test.txt" in test.observation[0]
| 63.621918 | 201 | 0.690337 | 2,886 | 23,222 | 5.335412 | 0.082814 | 0.061437 | 0.044291 | 0.055722 | 0.851604 | 0.816989 | 0.815755 | 0.806144 | 0.772698 | 0.741979 | 0 | 0.027962 | 0.174533 | 23,222 | 364 | 202 | 63.796703 | 0.775314 | 0.042158 | 0 | 0.611111 | 0 | 0 | 0.334064 | 0.031196 | 0 | 0 | 0 | 0 | 0.148148 | 1 | 0.114815 | false | 0 | 0.022222 | 0 | 0.137037 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
ae4fe6ab81799d632a7d5f6907404fd7dcac2f0e | 157 | py | Python | src/authors/admin.py | kostinbrodorg/open-library | bbceb953b2d78d7eb0f2c64b81c6deac13d73531 | [
"MIT"
] | null | null | null | src/authors/admin.py | kostinbrodorg/open-library | bbceb953b2d78d7eb0f2c64b81c6deac13d73531 | [
"MIT"
] | null | null | null | src/authors/admin.py | kostinbrodorg/open-library | bbceb953b2d78d7eb0f2c64b81c6deac13d73531 | [
"MIT"
] | null | null | null | from django.contrib import admin
from authors.models import Author
class AdminAuthor(admin.ModelAdmin):
pass
admin.site.register(Author, AdminAuthor)
| 17.444444 | 40 | 0.802548 | 20 | 157 | 6.3 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.127389 | 157 | 8 | 41 | 19.625 | 0.919708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.2 | 0.4 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
ae8bd7eca54b031d385228f6f8e0354592cbfa61 | 2,466 | py | Python | vizier/service/pyvizier/__init__.py | google/vizier | 12b64ce191410e1c3a79a98472a1b17811290ed3 | [
"Apache-2.0"
] | 15 | 2022-03-03T21:05:47.000Z | 2022-03-30T17:17:51.000Z | vizier/service/pyvizier/__init__.py | google/vizier | 12b64ce191410e1c3a79a98472a1b17811290ed3 | [
"Apache-2.0"
] | null | null | null | vizier/service/pyvizier/__init__.py | google/vizier | 12b64ce191410e1c3a79a98472a1b17811290ed3 | [
"Apache-2.0"
] | null | null | null | """Import target for oss."""
# TODO: Re-evalaute what to expose to users, once closed.
# TODO: Alternatively, remove this import.
from vizier._src.pyvizier.oss import metadata_util
from vizier._src.pyvizier.oss.automated_stopping import AutomatedStoppingConfig
from vizier._src.pyvizier.oss.automated_stopping import AutomatedStoppingConfigProto
from vizier._src.pyvizier.oss.proto_converters import MeasurementConverter
from vizier._src.pyvizier.oss.proto_converters import MonotypeParameterSequence
from vizier._src.pyvizier.oss.proto_converters import ParameterConfigConverter
from vizier._src.pyvizier.oss.proto_converters import ParameterType
from vizier._src.pyvizier.oss.proto_converters import ParameterValueConverter
from vizier._src.pyvizier.oss.proto_converters import ScaleType
from vizier._src.pyvizier.oss.proto_converters import TrialConverter
from vizier._src.pyvizier.oss.study_config import Algorithm
from vizier._src.pyvizier.oss.study_config import ExternalType
from vizier._src.pyvizier.oss.study_config import ObjectiveMetricGoal
from vizier._src.pyvizier.oss.study_config import ObservationNoise
from vizier._src.pyvizier.oss.study_config import ParameterValueSequence
from vizier._src.pyvizier.oss.study_config import SearchSpaceSelector
from vizier._src.pyvizier.oss.study_config import StudyConfig
from vizier._src.pyvizier.shared.base_study_config import MetricInformation
from vizier._src.pyvizier.shared.base_study_config import MetricsConfig
from vizier._src.pyvizier.shared.base_study_config import SearchSpace
from vizier._src.pyvizier.shared.common import Metadata
from vizier._src.pyvizier.shared.common import MetadataValue
from vizier._src.pyvizier.shared.parameter_config import ParameterConfig
from vizier._src.pyvizier.shared.trial import CompletedTrial
from vizier._src.pyvizier.shared.trial import CompletedTrialWithMeasurements
from vizier._src.pyvizier.shared.trial import Measurement
from vizier._src.pyvizier.shared.trial import Metric
from vizier._src.pyvizier.shared.trial import NaNMetric
from vizier._src.pyvizier.shared.trial import ParameterDict
from vizier._src.pyvizier.shared.trial import ParameterValue
from vizier._src.pyvizier.shared.trial import PendingTrial
from vizier._src.pyvizier.shared.trial import PendingTrialWithMeasurements
from vizier._src.pyvizier.shared.trial import Trial
from vizier._src.pyvizier.shared.trial import TrialStatus
from vizier._src.pyvizier.shared.trial import TrialSuggestion
| 60.146341 | 84 | 0.871452 | 322 | 2,466 | 6.490683 | 0.201863 | 0.167464 | 0.217703 | 0.351675 | 0.681818 | 0.657416 | 0.657416 | 0.401914 | 0.0689 | 0 | 0 | 0 | 0.065693 | 2,466 | 40 | 85 | 61.65 | 0.907118 | 0.048662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
ae8e36488dfb9fc0d6c85089f1b60e5336a411a0 | 22 | py | Python | dtw/__init__.py | syhw/DTW_Cython | c8a6e0c69d5b17230ddfc97fdc37806ca735124b | [
"MIT"
] | 2 | 2016-11-29T13:08:58.000Z | 2017-02-20T11:22:38.000Z | dtw/__init__.py | syhw/DTW_Cython | c8a6e0c69d5b17230ddfc97fdc37806ca735124b | [
"MIT"
] | null | null | null | dtw/__init__.py | syhw/DTW_Cython | c8a6e0c69d5b17230ddfc97fdc37806ca735124b | [
"MIT"
] | 4 | 2017-02-20T11:22:44.000Z | 2020-02-29T03:17:35.000Z | from _dtw import DTW
| 11 | 21 | 0.772727 | 4 | 22 | 4 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.227273 | 22 | 1 | 22 | 22 | 0.941176 | 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 | 1 | 0 | 0 | 6 |
881ff2fa1135309bb0d9c60aa5bde74377d8c21c | 113 | py | Python | build/lib/Kronos_heureka_code/Zeit/ZeitException.py | heureka-code/Kronos-heureka-code | 0ddbc93ec69f0bc50075071e6a3e406c9cc97737 | [
"MIT"
] | null | null | null | build/lib/Kronos_heureka_code/Zeit/ZeitException.py | heureka-code/Kronos-heureka-code | 0ddbc93ec69f0bc50075071e6a3e406c9cc97737 | [
"MIT"
] | null | null | null | build/lib/Kronos_heureka_code/Zeit/ZeitException.py | heureka-code/Kronos-heureka-code | 0ddbc93ec69f0bc50075071e6a3e406c9cc97737 | [
"MIT"
] | null | null | null | from Kronos_heureka_code.KronosException import KronosException
class ZeitException(KronosException):
pass
| 18.833333 | 63 | 0.849558 | 11 | 113 | 8.545455 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115044 | 113 | 5 | 64 | 22.6 | 0.94 | 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 | 1 | 0 | 0 | 6 |
8839449b24aaeeca61ffacc396dd0a0cabda46d8 | 24,334 | py | Python | sdk/python/pulumi_oci/database/backup.py | EladGabay/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2021-08-17T11:14:46.000Z | 2021-12-31T02:07:03.000Z | sdk/python/pulumi_oci/database/backup.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-06T11:21:29.000Z | 2021-09-06T11:21:29.000Z | sdk/python/pulumi_oci/database/backup.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-08-24T23:31:30.000Z | 2022-01-02T19:26:54.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['BackupArgs', 'Backup']
@pulumi.input_type
class BackupArgs:
def __init__(__self__, *,
database_id: pulumi.Input[str],
display_name: pulumi.Input[str]):
"""
The set of arguments for constructing a Backup resource.
:param pulumi.Input[str] database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
:param pulumi.Input[str] display_name: The user-friendly name for the backup. The name does not have to be unique.
"""
pulumi.set(__self__, "database_id", database_id)
pulumi.set(__self__, "display_name", display_name)
@property
@pulumi.getter(name="databaseId")
def database_id(self) -> pulumi.Input[str]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
"""
return pulumi.get(self, "database_id")
@database_id.setter
def database_id(self, value: pulumi.Input[str]):
pulumi.set(self, "database_id", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> pulumi.Input[str]:
"""
The user-friendly name for the backup. The name does not have to be unique.
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: pulumi.Input[str]):
pulumi.set(self, "display_name", value)
@pulumi.input_type
class _BackupState:
def __init__(__self__, *,
availability_domain: Optional[pulumi.Input[str]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
database_edition: Optional[pulumi.Input[str]] = None,
database_id: Optional[pulumi.Input[str]] = None,
database_size_in_gbs: Optional[pulumi.Input[float]] = None,
display_name: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
lifecycle_details: Optional[pulumi.Input[str]] = None,
shape: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
time_ended: Optional[pulumi.Input[str]] = None,
time_started: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Backup resources.
:param pulumi.Input[str] availability_domain: The name of the availability domain where the database backup is stored.
:param pulumi.Input[str] compartment_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
:param pulumi.Input[str] database_edition: The Oracle Database edition of the DB system from which the database backup was taken.
:param pulumi.Input[str] database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
:param pulumi.Input[float] database_size_in_gbs: The size of the database in gigabytes at the time the backup was taken.
:param pulumi.Input[str] display_name: The user-friendly name for the backup. The name does not have to be unique.
:param pulumi.Input[str] kms_key_id: The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
:param pulumi.Input[str] lifecycle_details: Additional information about the current lifecycle state.
:param pulumi.Input[str] shape: Shape of the backup's source database.
:param pulumi.Input[str] state: The current state of the backup.
:param pulumi.Input[str] time_ended: The date and time the backup was completed.
:param pulumi.Input[str] time_started: The date and time the backup started.
:param pulumi.Input[str] type: The type of backup.
:param pulumi.Input[str] version: Version of the backup's source database
"""
if availability_domain is not None:
pulumi.set(__self__, "availability_domain", availability_domain)
if compartment_id is not None:
pulumi.set(__self__, "compartment_id", compartment_id)
if database_edition is not None:
pulumi.set(__self__, "database_edition", database_edition)
if database_id is not None:
pulumi.set(__self__, "database_id", database_id)
if database_size_in_gbs is not None:
pulumi.set(__self__, "database_size_in_gbs", database_size_in_gbs)
if display_name is not None:
pulumi.set(__self__, "display_name", display_name)
if kms_key_id is not None:
pulumi.set(__self__, "kms_key_id", kms_key_id)
if lifecycle_details is not None:
pulumi.set(__self__, "lifecycle_details", lifecycle_details)
if shape is not None:
pulumi.set(__self__, "shape", shape)
if state is not None:
pulumi.set(__self__, "state", state)
if time_ended is not None:
pulumi.set(__self__, "time_ended", time_ended)
if time_started is not None:
pulumi.set(__self__, "time_started", time_started)
if type is not None:
pulumi.set(__self__, "type", type)
if version is not None:
pulumi.set(__self__, "version", version)
@property
@pulumi.getter(name="availabilityDomain")
def availability_domain(self) -> Optional[pulumi.Input[str]]:
"""
The name of the availability domain where the database backup is stored.
"""
return pulumi.get(self, "availability_domain")
@availability_domain.setter
def availability_domain(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "availability_domain", value)
@property
@pulumi.getter(name="compartmentId")
def compartment_id(self) -> Optional[pulumi.Input[str]]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
"""
return pulumi.get(self, "compartment_id")
@compartment_id.setter
def compartment_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "compartment_id", value)
@property
@pulumi.getter(name="databaseEdition")
def database_edition(self) -> Optional[pulumi.Input[str]]:
"""
The Oracle Database edition of the DB system from which the database backup was taken.
"""
return pulumi.get(self, "database_edition")
@database_edition.setter
def database_edition(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "database_edition", value)
@property
@pulumi.getter(name="databaseId")
def database_id(self) -> Optional[pulumi.Input[str]]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
"""
return pulumi.get(self, "database_id")
@database_id.setter
def database_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "database_id", value)
@property
@pulumi.getter(name="databaseSizeInGbs")
def database_size_in_gbs(self) -> Optional[pulumi.Input[float]]:
"""
The size of the database in gigabytes at the time the backup was taken.
"""
return pulumi.get(self, "database_size_in_gbs")
@database_size_in_gbs.setter
def database_size_in_gbs(self, value: Optional[pulumi.Input[float]]):
pulumi.set(self, "database_size_in_gbs", value)
@property
@pulumi.getter(name="displayName")
def display_name(self) -> Optional[pulumi.Input[str]]:
"""
The user-friendly name for the backup. The name does not have to be unique.
"""
return pulumi.get(self, "display_name")
@display_name.setter
def display_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "display_name", value)
@property
@pulumi.getter(name="kmsKeyId")
def kms_key_id(self) -> Optional[pulumi.Input[str]]:
"""
The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
"""
return pulumi.get(self, "kms_key_id")
@kms_key_id.setter
def kms_key_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "kms_key_id", value)
@property
@pulumi.getter(name="lifecycleDetails")
def lifecycle_details(self) -> Optional[pulumi.Input[str]]:
"""
Additional information about the current lifecycle state.
"""
return pulumi.get(self, "lifecycle_details")
@lifecycle_details.setter
def lifecycle_details(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "lifecycle_details", value)
@property
@pulumi.getter
def shape(self) -> Optional[pulumi.Input[str]]:
"""
Shape of the backup's source database.
"""
return pulumi.get(self, "shape")
@shape.setter
def shape(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "shape", value)
@property
@pulumi.getter
def state(self) -> Optional[pulumi.Input[str]]:
"""
The current state of the backup.
"""
return pulumi.get(self, "state")
@state.setter
def state(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "state", value)
@property
@pulumi.getter(name="timeEnded")
def time_ended(self) -> Optional[pulumi.Input[str]]:
"""
The date and time the backup was completed.
"""
return pulumi.get(self, "time_ended")
@time_ended.setter
def time_ended(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "time_ended", value)
@property
@pulumi.getter(name="timeStarted")
def time_started(self) -> Optional[pulumi.Input[str]]:
"""
The date and time the backup started.
"""
return pulumi.get(self, "time_started")
@time_started.setter
def time_started(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "time_started", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[str]]:
"""
The type of backup.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "type", value)
@property
@pulumi.getter
def version(self) -> Optional[pulumi.Input[str]]:
"""
Version of the backup's source database
"""
return pulumi.get(self, "version")
@version.setter
def version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version", value)
class Backup(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
database_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
This resource provides the Backup resource in Oracle Cloud Infrastructure Database service.
Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
## Example Usage
```python
import pulumi
import pulumi_oci as oci
test_backup = oci.database.Backup("testBackup",
database_id=oci_database_database["test_database"]["id"],
display_name=var["backup_display_name"])
```
## Import
Backups can be imported using the `id`, e.g.
```sh
$ pulumi import oci:database/backup:Backup test_backup "id"
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
:param pulumi.Input[str] display_name: The user-friendly name for the backup. The name does not have to be unique.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: BackupArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
This resource provides the Backup resource in Oracle Cloud Infrastructure Database service.
Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
## Example Usage
```python
import pulumi
import pulumi_oci as oci
test_backup = oci.database.Backup("testBackup",
database_id=oci_database_database["test_database"]["id"],
display_name=var["backup_display_name"])
```
## Import
Backups can be imported using the `id`, e.g.
```sh
$ pulumi import oci:database/backup:Backup test_backup "id"
```
:param str resource_name: The name of the resource.
:param BackupArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(BackupArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
database_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = BackupArgs.__new__(BackupArgs)
if database_id is None and not opts.urn:
raise TypeError("Missing required property 'database_id'")
__props__.__dict__["database_id"] = database_id
if display_name is None and not opts.urn:
raise TypeError("Missing required property 'display_name'")
__props__.__dict__["display_name"] = display_name
__props__.__dict__["availability_domain"] = None
__props__.__dict__["compartment_id"] = None
__props__.__dict__["database_edition"] = None
__props__.__dict__["database_size_in_gbs"] = None
__props__.__dict__["kms_key_id"] = None
__props__.__dict__["lifecycle_details"] = None
__props__.__dict__["shape"] = None
__props__.__dict__["state"] = None
__props__.__dict__["time_ended"] = None
__props__.__dict__["time_started"] = None
__props__.__dict__["type"] = None
__props__.__dict__["version"] = None
super(Backup, __self__).__init__(
'oci:database/backup:Backup',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
availability_domain: Optional[pulumi.Input[str]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
database_edition: Optional[pulumi.Input[str]] = None,
database_id: Optional[pulumi.Input[str]] = None,
database_size_in_gbs: Optional[pulumi.Input[float]] = None,
display_name: Optional[pulumi.Input[str]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
lifecycle_details: Optional[pulumi.Input[str]] = None,
shape: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
time_ended: Optional[pulumi.Input[str]] = None,
time_started: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None) -> 'Backup':
"""
Get an existing Backup resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] availability_domain: The name of the availability domain where the database backup is stored.
:param pulumi.Input[str] compartment_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
:param pulumi.Input[str] database_edition: The Oracle Database edition of the DB system from which the database backup was taken.
:param pulumi.Input[str] database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
:param pulumi.Input[float] database_size_in_gbs: The size of the database in gigabytes at the time the backup was taken.
:param pulumi.Input[str] display_name: The user-friendly name for the backup. The name does not have to be unique.
:param pulumi.Input[str] kms_key_id: The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
:param pulumi.Input[str] lifecycle_details: Additional information about the current lifecycle state.
:param pulumi.Input[str] shape: Shape of the backup's source database.
:param pulumi.Input[str] state: The current state of the backup.
:param pulumi.Input[str] time_ended: The date and time the backup was completed.
:param pulumi.Input[str] time_started: The date and time the backup started.
:param pulumi.Input[str] type: The type of backup.
:param pulumi.Input[str] version: Version of the backup's source database
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _BackupState.__new__(_BackupState)
__props__.__dict__["availability_domain"] = availability_domain
__props__.__dict__["compartment_id"] = compartment_id
__props__.__dict__["database_edition"] = database_edition
__props__.__dict__["database_id"] = database_id
__props__.__dict__["database_size_in_gbs"] = database_size_in_gbs
__props__.__dict__["display_name"] = display_name
__props__.__dict__["kms_key_id"] = kms_key_id
__props__.__dict__["lifecycle_details"] = lifecycle_details
__props__.__dict__["shape"] = shape
__props__.__dict__["state"] = state
__props__.__dict__["time_ended"] = time_ended
__props__.__dict__["time_started"] = time_started
__props__.__dict__["type"] = type
__props__.__dict__["version"] = version
return Backup(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="availabilityDomain")
def availability_domain(self) -> pulumi.Output[str]:
"""
The name of the availability domain where the database backup is stored.
"""
return pulumi.get(self, "availability_domain")
@property
@pulumi.getter(name="compartmentId")
def compartment_id(self) -> pulumi.Output[str]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
"""
return pulumi.get(self, "compartment_id")
@property
@pulumi.getter(name="databaseEdition")
def database_edition(self) -> pulumi.Output[str]:
"""
The Oracle Database edition of the DB system from which the database backup was taken.
"""
return pulumi.get(self, "database_edition")
@property
@pulumi.getter(name="databaseId")
def database_id(self) -> pulumi.Output[str]:
"""
The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
"""
return pulumi.get(self, "database_id")
@property
@pulumi.getter(name="databaseSizeInGbs")
def database_size_in_gbs(self) -> pulumi.Output[float]:
"""
The size of the database in gigabytes at the time the backup was taken.
"""
return pulumi.get(self, "database_size_in_gbs")
@property
@pulumi.getter(name="displayName")
def display_name(self) -> pulumi.Output[str]:
"""
The user-friendly name for the backup. The name does not have to be unique.
"""
return pulumi.get(self, "display_name")
@property
@pulumi.getter(name="kmsKeyId")
def kms_key_id(self) -> pulumi.Output[str]:
"""
The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
"""
return pulumi.get(self, "kms_key_id")
@property
@pulumi.getter(name="lifecycleDetails")
def lifecycle_details(self) -> pulumi.Output[str]:
"""
Additional information about the current lifecycle state.
"""
return pulumi.get(self, "lifecycle_details")
@property
@pulumi.getter
def shape(self) -> pulumi.Output[str]:
"""
Shape of the backup's source database.
"""
return pulumi.get(self, "shape")
@property
@pulumi.getter
def state(self) -> pulumi.Output[str]:
"""
The current state of the backup.
"""
return pulumi.get(self, "state")
@property
@pulumi.getter(name="timeEnded")
def time_ended(self) -> pulumi.Output[str]:
"""
The date and time the backup was completed.
"""
return pulumi.get(self, "time_ended")
@property
@pulumi.getter(name="timeStarted")
def time_started(self) -> pulumi.Output[str]:
"""
The date and time the backup started.
"""
return pulumi.get(self, "time_started")
@property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
"""
The type of backup.
"""
return pulumi.get(self, "type")
@property
@pulumi.getter
def version(self) -> pulumi.Output[str]:
"""
Version of the backup's source database
"""
return pulumi.get(self, "version")
| 42.32 | 391 | 0.649297 | 2,978 | 24,334 | 5.069174 | 0.07824 | 0.074324 | 0.087175 | 0.081611 | 0.829094 | 0.784512 | 0.739732 | 0.710586 | 0.698397 | 0.623543 | 0 | 0.000055 | 0.246404 | 24,334 | 574 | 392 | 42.393728 | 0.823154 | 0.332621 | 0 | 0.479751 | 1 | 0 | 0.107669 | 0.001747 | 0 | 0 | 0 | 0 | 0 | 1 | 0.165109 | false | 0.003115 | 0.015576 | 0 | 0.286604 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8864a65f0edd390269abe3078b96e84df59edd81 | 7,975 | py | Python | tests/MultiPathRequestsTests.py | alexandros44/UServer | 48fea5de4aa1eff7abf29641f11c675cf047999b | [
"MIT"
] | 1 | 2021-04-17T12:14:40.000Z | 2021-04-17T12:14:40.000Z | tests/MultiPathRequestsTests.py | alexandros44/UServer | 48fea5de4aa1eff7abf29641f11c675cf047999b | [
"MIT"
] | null | null | null | tests/MultiPathRequestsTests.py | alexandros44/UServer | 48fea5de4aa1eff7abf29641f11c675cf047999b | [
"MIT"
] | null | null | null | import unittest2
import requests
import json
import os
import sys
import re
sys.path.insert(1, os.path.abspath('./src/'))
from UServer import UServer
class RequestsTest(unittest2.TestCase):
host = '127.0.0.1'
port = 3000
app = UServer(port=port, host=host)
@classmethod
def setUpClass(cls):
@cls.app.router.get('/*/*')
def get(req, res):
res.send('OK_TWO')
@cls.app.router.post('/*/*')
def get(req, res):
res.send('OK_TWO')
@cls.app.router.put('/*/*')
def get(req, res):
res.send('OK_TWO')
@cls.app.router.patch('/*/*')
def get(req, res):
res.send('OK_TWO')
@cls.app.router.delete('/*/*')
def get(req, res):
res.send('OK_TWO')
@cls.app.router.head('/*/*')
def get(req, res):
res.send('OK_TWO')
@cls.app.router.get('/*/*/*/*')
def get(req, res):
res.send('OK_FOUR')
@cls.app.router.post('/*/*/*/*')
def get(req, res):
res.send('OK_FOUR')
@cls.app.router.patch('/*/*/*/*')
def get(req, res):
res.send('OK_FOUR')
@cls.app.router.put('/*/*/*/*')
def get(req, res):
res.send('OK_FOUR')
@cls.app.router.delete('/*/*/*/*')
def get(req, res):
res.send('OK_FOUR')
@cls.app.router.head('/*/*/*/*')
def get(req, res):
res.send('OK_FOUR')
cls.app.start()
def test_multi_path_redirection_depth_two(self):
get = requests.get(f'http://{self.host}:{self.port}/1/2')
post = requests.post(f'http://{self.host}:{self.port}/1/2')
patch = requests.patch(f'http://{self.host}:{self.port}/1/2')
put = requests.put(f'http://{self.host}:{self.port}/1/2')
delete = requests.delete(f'http://{self.host}:{self.port}/1/2')
head = requests.head(f'http://{self.host}:{self.port}/1/2')
self.assertEqual(get.status_code, 200)
self.assertEqual(post.status_code, 200)
self.assertEqual(patch.status_code, 200)
self.assertEqual(put.status_code, 200)
self.assertEqual(delete.status_code, 200)
self.assertEqual(head.status_code, 200)
self.assertEqual(get.text, 'OK_TWO')
self.assertEqual(post.text, 'OK_TWO')
self.assertEqual(patch.text, 'OK_TWO')
self.assertEqual(put.text, 'OK_TWO')
self.assertEqual(delete.text, 'OK_TWO')
self.assertEqual(head.text, '')
def test_multi_path_redirection_depth_three(self):
get = requests.get(f'http://{self.host}:{self.port}/1/2/3', headers={ 'Accept': None })
post = requests.post(f'http://{self.host}:{self.port}/1/2/3', headers={ 'Accept': None })
patch = requests.patch(f'http://{self.host}:{self.port}/1/2/3', headers={ 'Accept': None })
put = requests.put(f'http://{self.host}:{self.port}/1/2/3', headers={ 'Accept': None })
delete = requests.delete(f'http://{self.host}:{self.port}/1/2/3', headers={ 'Accept': None })
head = requests.head(f'http://{self.host}:{self.port}/1/2/3', headers={ 'Accept': None })
self.assertEqual(get.status_code, 500)
self.assertEqual(post.status_code, 500)
self.assertEqual(patch.status_code, 500)
self.assertEqual(put.status_code, 500)
self.assertEqual(delete.status_code, 500)
self.assertEqual(head.status_code, 500)
self.assertEqual(get.text, '')
self.assertEqual(post.text, '')
self.assertEqual(patch.text, '')
self.assertEqual(put.text, '')
self.assertEqual(delete.text, '')
self.assertEqual(head.text, '')
def test_multi_path_redirection_depth_four(self):
get = requests.get(f'http://{self.host}:{self.port}/1/2/3/4')
post = requests.post(f'http://{self.host}:{self.port}/1/2/3/4')
patch = requests.patch(f'http://{self.host}:{self.port}/1/2/3/4')
put = requests.put(f'http://{self.host}:{self.port}/1/2/3/4')
delete = requests.delete(f'http://{self.host}:{self.port}/1/2/3/4')
head = requests.head(f'http://{self.host}:{self.port}/1/2/3/4')
self.assertEqual(get.status_code, 200)
self.assertEqual(post.status_code, 200)
self.assertEqual(patch.status_code, 200)
self.assertEqual(put.status_code, 200)
self.assertEqual(delete.status_code, 200)
self.assertEqual(head.status_code, 200)
self.assertEqual(get.text, 'OK_FOUR')
self.assertEqual(post.text, 'OK_FOUR')
self.assertEqual(patch.text, 'OK_FOUR')
self.assertEqual(put.text, 'OK_FOUR')
self.assertEqual(delete.text, 'OK_FOUR')
self.assertEqual(head.text, '')
def test_multi_path_redirection_depth_five(self):
get = requests.get(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
post = requests.post(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
patch = requests.patch(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
put = requests.put(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
delete = requests.delete(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
head = requests.head(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
self.assertEqual(get.status_code, 500)
self.assertEqual(post.status_code, 500)
self.assertEqual(patch.status_code, 500)
self.assertEqual(put.status_code, 500)
self.assertEqual(delete.status_code, 500)
self.assertEqual(head.status_code, 500)
self.assertEqual(get.text, '')
self.assertEqual(post.text, '')
self.assertEqual(patch.text, '')
self.assertEqual(put.text, '')
self.assertEqual(delete.text, '')
self.assertEqual(head.text, '')
def test_z_index_all_paths_star(self):
@self.app.router.get('*')
def get(req, res):
res.send('OK_EVERYTHING')
@self.app.router.post('*')
def get(req, res):
res.send('OK_EVERYTHING')
@self.app.router.put('*')
def get(req, res):
res.send('OK_EVERYTHING')
@self.app.router.patch('*')
def get(req, res):
res.send('OK_EVERYTHING')
@self.app.router.delete('*')
def get(req, res):
res.send('OK_EVERYTHING')
@self.app.router.head('*')
def get(req, res):
res.send('OK_EVERYTHING')
get = requests.get(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
post = requests.post(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
patch = requests.patch(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
put = requests.put(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
delete = requests.delete(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
head = requests.head(f'http://{self.host}:{self.port}/1/2/3/4/5', headers={ 'Accept': None })
self.assertEqual(get.status_code, 200)
self.assertEqual(post.status_code, 200)
self.assertEqual(patch.status_code, 200)
self.assertEqual(put.status_code, 200)
self.assertEqual(delete.status_code, 200)
self.assertEqual(head.status_code, 200)
self.assertEqual(get.text, 'OK_EVERYTHING')
self.assertEqual(post.text, 'OK_EVERYTHING')
self.assertEqual(patch.text, 'OK_EVERYTHING')
self.assertEqual(put.text, 'OK_EVERYTHING')
self.assertEqual(delete.text, 'OK_EVERYTHING')
self.assertEqual(head.text, '')
if(__name__ == '__main__'):
unittest2.main() | 39.093137 | 105 | 0.581066 | 1,077 | 7,975 | 4.213556 | 0.066852 | 0.198325 | 0.059498 | 0.085941 | 0.933671 | 0.844205 | 0.837153 | 0.837153 | 0.834949 | 0.834949 | 0 | 0.035378 | 0.227335 | 7,975 | 204 | 106 | 39.093137 | 0.701071 | 0 | 0 | 0.560241 | 0 | 0 | 0.203485 | 0 | 0 | 0 | 0 | 0 | 0.361446 | 1 | 0.144578 | false | 0 | 0.042169 | 0 | 0.210843 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
88a3671135fdab62cc6b1d87c8fa131b0e847c35 | 96 | py | Python | venv/lib/python3.8/site-packages/charset_normalizer/assets/__init__.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/charset_normalizer/assets/__init__.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/charset_normalizer/assets/__init__.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/14/f9/df/93c96299945bf1921441c4ef3c471bb8cd5ea8e7561b0d2f6d61b2703b | 96 | 96 | 0.895833 | 9 | 96 | 9.555556 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.427083 | 0 | 96 | 1 | 96 | 96 | 0.46875 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
ee183d79196c269c41c826eb7d3ad80c35c65875 | 86 | py | Python | config/__init__.py | TeckZy/python-mass-mailer | 2d26625fe6dafaef0fcd6059ea9cda1c8b48c1b0 | [
"MIT"
] | null | null | null | config/__init__.py | TeckZy/python-mass-mailer | 2d26625fe6dafaef0fcd6059ea9cda1c8b48c1b0 | [
"MIT"
] | 4 | 2019-12-05T16:45:43.000Z | 2019-12-06T10:54:21.000Z | config/__init__.py | TeckZy/python-mass-mailer | 2d26625fe6dafaef0fcd6059ea9cda1c8b48c1b0 | [
"MIT"
] | null | null | null | from .cfg_handler import *;
from .constant import *;
from .config_initilizer import *; | 28.666667 | 33 | 0.767442 | 11 | 86 | 5.818182 | 0.636364 | 0.3125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.127907 | 86 | 3 | 33 | 28.666667 | 0.853333 | 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 | 1 | 0 | 0 | 6 |
ee268b6e32b02d662fa19eeb606386e2df5313b5 | 78 | py | Python | apps/infrastructure/api/providers/aws/__init__.py | next-fernandocerezal/PyGrid | b82793b0beecd26338c102573a9891c2e86707c8 | [
"Apache-2.0"
] | null | null | null | apps/infrastructure/api/providers/aws/__init__.py | next-fernandocerezal/PyGrid | b82793b0beecd26338c102573a9891c2e86707c8 | [
"Apache-2.0"
] | null | null | null | apps/infrastructure/api/providers/aws/__init__.py | next-fernandocerezal/PyGrid | b82793b0beecd26338c102573a9891c2e86707c8 | [
"Apache-2.0"
] | null | null | null | from .serverfull import AWS_Serverfull
from .serverless import AWS_Serverless
| 26 | 38 | 0.871795 | 10 | 78 | 6.6 | 0.5 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.102564 | 78 | 2 | 39 | 39 | 0.942857 | 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 | 1 | 0 | 0 | 6 |
ee4a4f4975c7700b2813aff5badd2255ab9972b8 | 43 | py | Python | clean_deploy/db_starter.py | vinicvaz/ML-Recomendation | 24458c1a4e966c7c6768773d6e445231b30959b6 | [
"MIT"
] | 1 | 2020-03-08T21:10:20.000Z | 2020-03-08T21:10:20.000Z | clean_deploy/db_starter.py | vinicvaz/ML-Recomendation | 24458c1a4e966c7c6768773d6e445231b30959b6 | [
"MIT"
] | null | null | null | clean_deploy/db_starter.py | vinicvaz/ML-Recomendation | 24458c1a4e966c7c6768773d6e445231b30959b6 | [
"MIT"
] | null | null | null | import run_backend
run_backend.update_db() | 14.333333 | 23 | 0.860465 | 7 | 43 | 4.857143 | 0.714286 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069767 | 43 | 3 | 23 | 14.333333 | 0.85 | 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 | 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 | 6 |
c9d9f70b91c0d8480d2a720766744aa5782bf424 | 3,405 | py | Python | preprocessing.py | Jay9z/GAN-pp | d1f96b6efd547cb2c9f741bf0c619bc7adb76eef | [
"Apache-2.0"
] | null | null | null | preprocessing.py | Jay9z/GAN-pp | d1f96b6efd547cb2c9f741bf0c619bc7adb76eef | [
"Apache-2.0"
] | null | null | null | preprocessing.py | Jay9z/GAN-pp | d1f96b6efd547cb2c9f741bf0c619bc7adb76eef | [
"Apache-2.0"
] | null | null | null | from transform.transforms import *
class TrainAugmentation():
def __init__(self, image_size, mean_val=0, std_val=1):
#TODO: add self.augment, which contains
# random scale, pad, random crop, random flip, convert data type, and normalize ops
self.augment = Compose(
[
RandomScale(),
Pad(image_size,mean_val=mean_val),
RandomCrop(image_size),
RandomFlip(),
ConvertDataType(),
Normalize(mean_val,std_val)
]
)
def __call__(self, image, label=None):
return self.augment(image,label)
class Normalize2():
def __init__(self, mean_val=0, std_val=1.0):
#TODO: add self.augment, which contains
# random scale, pad, random crop, random flip, convert data type, and normalize ops
self.augment = Compose(
[
#ConvertDataType(),
Normalize(mean_val,std_val)
]
)
def __call__(self, image, label=None):
return self.augment(image,label)
class Augmentation1():
def __init__(self, mean_val=0, std_val=1.0):
#TODO: add self.augment, which contains
# random scale, pad, random crop, random flip, convert data type, and normalize ops
self.augment = Compose(
[
ConvertDataType(),
Normalize(mean_val,std_val)
]
)
def __call__(self, image, label=None):
return self.augment(image,label)
class Augmentation2():
def __init__(self, mean_val=0, std_val=1.0):
#TODO: add self.augment, which contains
# random scale, pad, random crop, random flip, convert data type, and normalize ops
self.augment = Compose(
[
ConvertDataType(),
Normalize(mean_val,std_val)
]
)
def __call__(self, image, label=None):
return self.augment(image,label)
class Augmentation3():
def __init__(self, mean_val=0, std_val=1.0):
#TODO: add self.augment, which contains
# random scale, pad, random crop, random flip, convert data type, and normalize ops
self.augment = Compose(
[
RandomFlip(),
ConvertDataType(),
Normalize(mean_val,std_val)
]
)
def __call__(self, image, label=None):
return self.augment(image,label)
class Augmentation4():
def __init__(self, mean_val=0, std_val=1.0):
#TODO: add self.augment, which contains
# random scale, pad, random crop, random flip, convert data type, and normalize ops
self.augment = Compose(
[
RandomScale(),
ConvertDataType(),
Normalize(mean_val,std_val)
]
)
def __call__(self, image, label=None):
return self.augment(image,label)
def reconstruct(x,GE_x):
x_mean = np.mean(x)
x_std = np.std(x)
gex_mean = np.mean(GE_x)
gex_std = np.std(GE_x)
xx = x_mean + (GE_x-gex_mean)*gex_std/x_std
xx = (xx - np.min(xx))/(np.max(xx)-np.min(xx))*255
return xx | 33.058252 | 91 | 0.537151 | 377 | 3,405 | 4.615385 | 0.145889 | 0.113793 | 0.037931 | 0.037931 | 0.821264 | 0.821264 | 0.812644 | 0.812644 | 0.812644 | 0.812644 | 0 | 0.011601 | 0.367107 | 3,405 | 103 | 92 | 33.058252 | 0.795824 | 0.21674 | 0 | 0.513514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009709 | 0 | 1 | 0.175676 | false | 0 | 0.013514 | 0.081081 | 0.364865 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
a006f6f456d25c531a6cc86e7461bdae2abd522b | 59 | py | Python | drforest/kernel_regression/__init__.py | joshloyal/drforest | ab1e3f01cab36f15f1c37b82f71421cd025c901e | [
"MIT"
] | 2 | 2021-09-22T12:15:43.000Z | 2022-01-04T12:59:50.000Z | drforest/kernel_regression/__init__.py | joshloyal/drforest | ab1e3f01cab36f15f1c37b82f71421cd025c901e | [
"MIT"
] | null | null | null | drforest/kernel_regression/__init__.py | joshloyal/drforest | ab1e3f01cab36f15f1c37b82f71421cd025c901e | [
"MIT"
] | null | null | null | from drforest.kernel_regression.kernel_regression import *
| 29.5 | 58 | 0.881356 | 7 | 59 | 7.142857 | 0.714286 | 0.64 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.067797 | 59 | 1 | 59 | 59 | 0.909091 | 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 | 1 | 0 | 0 | 6 |
a00968719ee28e78a4ca197afc124bcba19684bb | 64,907 | py | Python | tests/trader/indicator/ema_crossover_indicator_test.py | yerlandinata/Win-Win-Trade | 2d9dd0c46731131239f46dd58ad8a6a95546f0b5 | [
"MIT"
] | null | null | null | tests/trader/indicator/ema_crossover_indicator_test.py | yerlandinata/Win-Win-Trade | 2d9dd0c46731131239f46dd58ad8a6a95546f0b5 | [
"MIT"
] | 1 | 2021-06-01T21:50:44.000Z | 2021-06-01T21:50:44.000Z | tests/trader/indicator/ema_crossover_indicator_test.py | yerlandinata/Win-Win-Trade | 2d9dd0c46731131239f46dd58ad8a6a95546f0b5 | [
"MIT"
] | null | null | null | import pytest
import pandas
from src.trader.indicator import EMACrossoverIndicator
@pytest.fixture()
def sample_data():
price_dec_1_2_2017_json = '{"close":{"[1515595500]":221203000,"[1515596400]":221700000,"[1515597300]":225099000,"[1515598200]":223800000,"[1515599100]":225000000,"[1515600000]":224000000,"[1515600900]":226489000,"[1515601800]":226147000,"[1515602700]":225352000,"[1515603600]":224604000,"[1515604500]":225338000,"[1515605400]":225376000,"[1515606300]":225367000,"[1515607200]":225225000,"[1515608100]":225003000,"[1515609000]":225178000,"[1515609900]":225477000,"[1515610800]":225428000,"[1515611700]":225495000,"[1515612600]":226206000,"[1515613500]":226988000,"[1515614400]":226557000,"[1515615300]":225490000,"[1515616200]":226890000,"[1515617100]":228337000,"[1515618000]":226990000,"[1515618900]":226998000,"[1515619800]":226580000,"[1515620700]":225450000,"[1515621600]":225586000,"[1515622500]":225589000,"[1515623400]":226516000,"[1515624300]":225499000,"[1515625200]":226408000,"[1515626100]":224993000,"[1515627000]":223299000,"[1515627900]":226740000,"[1515628800]":226507000,"[1515629700]":226489000,"[1515630600]":226994000,"[1515631500]":226832000,"[1515632400]":226993000,"[1515633300]":227001000,"[1515634200]":227101000,"[1515635100]":228077000,"[1515636000]":228240000,"[1515636900]":227798000,"[1515637800]":227699000,"[1515638700]":226392000,"[1515639600]":221897000,"[1515640500]":223201000,"[1515641400]":223997000,"[1515642300]":221101000,"[1515643200]":219994000,"[1515644100]":215889000,"[1515645000]":212601000,"[1515645900]":217601000,"[1515646800]":220099000,"[1515647700]":220700000,"[1515648600]":217875000,"[1515649500]":213034000,"[1515650400]":216570000,"[1515651300]":217394000,"[1515652200]":216298000,"[1515653100]":215450000,"[1515654000]":215000000,"[1515654900]":216499000,"[1515655800]":217052000,"[1515656700]":217188000,"[1515657600]":219680000,"[1515658500]":218003000,"[1515659400]":219279000,"[1515660300]":221259000,"[1515661200]":218105000,"[1515662100]":219102000,"[1515663000]":218144000,"[1515663900]":217899000,"[1515664800]":216002000,"[1515665700]":215499000,"[1515666600]":217498000,"[1515667500]":216395000,"[1515668400]":215998000,"[1515669300]":216500000,"[1515670200]":215799000,"[1515671100]":216990000,"[1515672000]":219999000,"[1515672900]":218998000,"[1515673800]":219182000,"[1515674700]":219497000,"[1515675600]":219900000,"[1515676500]":218594000,"[1515677400]":218993000,"[1515678300]":219447000,"[1515679200]":219999000,"[1515680100]":220000000,"[1515681000]":219206000,"[1515681900]":219208000,"[1515682800]":218666000,"[1515683700]":218100000,"[1515684600]":216993000,"[1515685500]":216898000,"[1515686400]":216311000,"[1515687300]":215607000,"[1515688200]":216900000,"[1515689100]":215000000,"[1515690000]":215026000,"[1515690900]":215488000,"[1515691800]":215489000,"[1515692700]":215664000,"[1515693600]":215486000,"[1515694500]":215870000,"[1515695400]":216796000,"[1515696300]":216216000,"[1515697200]":216401000,"[1515698100]":216900000,"[1515699000]":215502000,"[1515699900]":215008000,"[1515700800]":215108000,"[1515701700]":214691000,"[1515702600]":214002000,"[1515703500]":214688000,"[1515704400]":214002000,"[1515705300]":213701000,"[1515706200]":214497000,"[1515707100]":214600000,"[1515708000]":215000000,"[1515708900]":214992000,"[1515709800]":214998000,"[1515710700]":213521000,"[1515711600]":213484000,"[1515712500]":214704000,"[1515713400]":214500000,"[1515714300]":214555000,"[1515715200]":214891000,"[1515716100]":214200000,"[1515717000]":212562000,"[1515717900]":212800000,"[1515718800]":212900000,"[1515719700]":212841000,"[1515720600]":213496000,"[1515721500]":213500000,"[1515722400]":212981000,"[1515723300]":214572000,"[1515724200]":212751000,"[1515725100]":213015000,"[1515726000]":212793000,"[1515726900]":213991000,"[1515727800]":214000000,"[1515728700]":214499000,"[1515729600]":215000000,"[1515730500]":214903000,"[1515731400]":214902000,"[1515732300]":216000000,"[1515733200]":217493000,"[1515734100]":215151000,"[1515735000]":217204000,"[1515735900]":218168000,"[1515736800]":219349000,"[1515737700]":219297000,"[1515738600]":219880000,"[1515739500]":219999000,"[1515740400]":221002000,"[1515741300]":221150000,"[1515742200]":218097000,"[1515743100]":216500000,"[1515744000]":216502000,"[1515744900]":216196000,"[1515745800]":216879000,"[1515746700]":216882000,"[1515747600]":216901000,"[1515748500]":216300000,"[1515749400]":217180000,"[1515750300]":218099000,"[1515751200]":217500000,"[1515752100]":217899000,"[1515753000]":216948000,"[1515753900]":217049000,"[1515754800]":216000000,"[1515755700]":216507000,"[1515756600]":217885000,"[1515757500]":216777000,"[1515758400]":216984000,"[1515759300]":216441000,"[1515760200]":216998000,"[1515761100]":217831000,"[1515762000]":216711000,"[1515762900]":216093000,"[1515763800]":216414000,"[1515764700]":215704000,"[1515765600]":214701000,"[1515766500]":215744000,"[1515767400]":215558000,"[1515768300]":215800000,"[1515769200]":215806000,"[1515770100]":215002000,"[1515771000]":214030000,"[1515771900]":214098000,"[1515772800]":214097000,"[1515773700]":213734000,"[1515774600]":213509000,"[1515775500]":214800000,"[1515776400]":214196000,"[1515777300]":214250000,"[1515778200]":214599000,"[1515779100]":214598000,"[1515780000]":214003000,"[1515780900]":214311000,"[1515781800]":213503000,"[1515782700]":214646000,"[1515783600]":214200000,"[1515784500]":214850000,"[1515785400]":216000000,"[1515786300]":216002000,"[1515787200]":216801000,"[1515788100]":216803000,"[1515789000]":216804000,"[1515789900]":216803000,"[1515790800]":216803000,"[1515791700]":215519000,"[1515792600]":215261000,"[1515793500]":216199000,"[1515794400]":216014000,"[1515795300]":216702000,"[1515796200]":215306000,"[1515797100]":215599000,"[1515798000]":215111000,"[1515798900]":214977000,"[1515799800]":215271000,"[1515800700]":215940000,"[1515801600]":215495000,"[1515802500]":215131000,"[1515803400]":215152000,"[1515804300]":216507000,"[1515805200]":217228000,"[1515806100]":217200000,"[1515807000]":217599000,"[1515807900]":217235000,"[1515808800]":216503000,"[1515809700]":216571000,"[1515810600]":216985000,"[1515811500]":217007000,"[1515812400]":216760000,"[1515813300]":216505000,"[1515814200]":216700000,"[1515815100]":216270000,"[1515816000]":216597000,"[1515816900]":216492000,"[1515817800]":217000000,"[1515818700]":217550000,"[1515819600]":217901000,"[1515820500]":217800000,"[1515821400]":217522000,"[1515822300]":217676000,"[1515823200]":216028000,"[1515824100]":216502000,"[1515825000]":216176000,"[1515825900]":216204000,"[1515826800]":216305000,"[1515827700]":217480000,"[1515828600]":216903000,"[1515829500]":216825000,"[1515830400]":216005000,"[1515831300]":216898000,"[1515832200]":216623000,"[1515833100]":216684000,"[1515834000]":216282000,"[1515834900]":216008000,"[1515835800]":215900000,"[1515836700]":215683000,"[1515837600]":215670000,"[1515838500]":215552000,"[1515839400]":215202000,"[1515840300]":215190000,"[1515841200]":215098000,"[1515842100]":215072000,"[1515843000]":214351000,"[1515843900]":214064000,"[1515844800]":213467000,"[1515845700]":212300000,"[1515846600]":213311000,"[1515847500]":212100000,"[1515848400]":211599000,"[1515849300]":212210000,"[1515850200]":213140000,"[1515851100]":213300000,"[1515852000]":212896000,"[1515852900]":211604000,"[1515853800]":210601000,"[1515854700]":210511000,"[1515855600]":210012000,"[1515856500]":210006000,"[1515857400]":210808000,"[1515858300]":210216000,"[1515859200]":210227000,"[1515860100]":210113000,"[1515861000]":210303000,"[1515861900]":209176000,"[1515862800]":209681000,"[1515863700]":208501000,"[1515864600]":208699000,"[1515865500]":209858000,"[1515866400]":209541000,"[1515867300]":208751000,"[1515868200]":207781000,"[1515869100]":205899000,"[1515870000]":206975000,"[1515870900]":205501000,"[1515871800]":206434000,"[1515872700]":206798000,"[1515873600]":209000000,"[1515874500]":207552000,"[1515875400]":209443000,"[1515876300]":208515000,"[1515877200]":207096000,"[1515878100]":207279000,"[1515879000]":207000000,"[1515879900]":206900000,"[1515880800]":206445000,"[1515881700]":207900000,"[1515882600]":207300000,"[1515883500]":207616000,"[1515884400]":208900000,"[1515885300]":208006000,"[1515886200]":209497000,"[1515887100]":209969000,"[1515888000]":207000000,"[1515888900]":207172000,"[1515889800]":206500000,"[1515890700]":208785000,"[1515891600]":208400000,"[1515892500]":206700000,"[1515893400]":207796000,"[1515894300]":207198000,"[1515895200]":207701000,"[1515896100]":207696000,"[1515897000]":206944000,"[1515897900]":207682000,"[1515898800]":207205000,"[1515899700]":206099000,"[1515900600]":206001000,"[1515901500]":205102000,"[1515902400]":203104000,"[1515903300]":200187000,"[1515904200]":200187000,"[1515905100]":200003000,"[1515906000]":196100000,"[1515906900]":191521000,"[1515907800]":195500000,"[1515908700]":196002000,"[1515909600]":196035000,"[1515910500]":196007000,"[1515911400]":195004000,"[1515912300]":194499000,"[1515913200]":191779000,"[1515914100]":191616000,"[1515915000]":192000000,"[1515915900]":195154000,"[1515916800]":194499000,"[1515917700]":195098000,"[1515918600]":194552000,"[1515919500]":192609000,"[1515920400]":192644000,"[1515921300]":191797000,"[1515922200]":191497000,"[1515923100]":189000000,"[1515924000]":189501000,"[1515924900]":185999000,"[1515925800]":183307000,"[1515926700]":182050000,"[1515927600]":180677000,"[1515928500]":184808000,"[1515929400]":181211000,"[1515930300]":183500000,"[1515931200]":183900000,"[1515932100]":182299000,"[1515933000]":181300000,"[1515933900]":181996000,"[1515934800]":182301000,"[1515935700]":185003000,"[1515936600]":187998000,"[1515937500]":192500000,"[1515938400]":188648000,"[1515939300]":189994000,"[1515940200]":190998000,"[1515941100]":193552000,"[1515942000]":190799000,"[1515942900]":188996000,"[1515943800]":187310000,"[1515944700]":186832000,"[1515945600]":185999000,"[1515946500]":188198000,"[1515947400]":186899000,"[1515948300]":187488000,"[1515949200]":187998000,"[1515950100]":187000000,"[1515951000]":186771000,"[1515951900]":188466000,"[1515952800]":188510000,"[1515953700]":193640000,"[1515954600]":192574000,"[1515955500]":192000000,"[1515956400]":192001000,"[1515957300]":191995000,"[1515958200]":192001000,"[1515959100]":190998000,"[1515960000]":191897000,"[1515960900]":191204000,"[1515961800]":191181000,"[1515962700]":191981000,"[1515963600]":192248000,"[1515964500]":192250000,"[1515965400]":192003000,"[1515966300]":192247000,"[1515967200]":191999000,"[1515968100]":190505000,"[1515969000]":191990000,"[1515969900]":192809000,"[1515970800]":192977000,"[1515971700]":195998000,"[1515972600]":195174000,"[1515973500]":195599000,"[1515974400]":194769000,"[1515975300]":193950000,"[1515976200]":194851000,"[1515977100]":194986000,"[1515978000]":195000000,"[1515978900]":195600000,"[1515979800]":196502000,"[1515980700]":196504000,"[1515981600]":193998000,"[1515982500]":194998000,"[1515983400]":194400000,"[1515984300]":195693000,"[1515985200]":194492000,"[1515986100]":197000000,"[1515987000]":198000000,"[1515987900]":199464000,"[1515988800]":199012000,"[1515989700]":199011000,"[1515990600]":199440000,"[1515991500]":199878000,"[1515992400]":201206000,"[1515993300]":201651000,"[1515994200]":204799000,"[1515995100]":203330000,"[1515996000]":206000000,"[1515996900]":204100000,"[1515997800]":202501000,"[1515998700]":203700000,"[1515999600]":203010000,"[1516000500]":202597000,"[1516001400]":203698000,"[1516002300]":203674000,"[1516003200]":204397000,"[1516004100]":205999000,"[1516005000]":205200000,"[1516005900]":205098000,"[1516006800]":204997000,"[1516007700]":204999000,"[1516008600]":205000000,"[1516009500]":204099000,"[1516010400]":203310000,"[1516011300]":201805000,"[1516012200]":202900000,"[1516013100]":202671000,"[1516014000]":203350000,"[1516014900]":202300000,"[1516015800]":201251000,"[1516016700]":200675000,"[1516017600]":200300000,"[1516018500]":198601000,"[1516019400]":201052000,"[1516020300]":204318000,"[1516021200]":204449000,"[1516022100]":202880000,"[1516023000]":203998000,"[1516023900]":204400000,"[1516024800]":206202000,"[1516025700]":204576000,"[1516026600]":203006000,"[1516027500]":204002000,"[1516028400]":202730000,"[1516029300]":202311000,"[1516030200]":202296000,"[1516031100]":202000000,"[1516032000]":202740000,"[1516032900]":202200000,"[1516033800]":202745000,"[1516034700]":204000000,"[1516035600]":203999000,"[1516036500]":203501000,"[1516037400]":202896000,"[1516038300]":202300000,"[1516039200]":202121000,"[1516040100]":202121000,"[1516041000]":202014000,"[1516041900]":202251000,"[1516042800]":202395000,"[1516043700]":202100000,"[1516044600]":201993000},"high":{"[1515595500]":221775000,"[1515596400]":221770000,"[1515597300]":225150000,"[1515598200]":225149000,"[1515599100]":227000000,"[1515600000]":227000000,"[1515600900]":226490000,"[1515601800]":226489000,"[1515602700]":226147000,"[1515603600]":225586000,"[1515604500]":225499000,"[1515605400]":225485000,"[1515606300]":225377000,"[1515607200]":225379000,"[1515608100]":225355000,"[1515609000]":225478000,"[1515609900]":225478000,"[1515610800]":225478000,"[1515611700]":225498000,"[1515612600]":227630000,"[1515613500]":226999000,"[1515614400]":226998000,"[1515615300]":226995000,"[1515616200]":226992000,"[1515617100]":228339000,"[1515618000]":228337000,"[1515618900]":227630000,"[1515619800]":226999000,"[1515620700]":226849000,"[1515621600]":226936000,"[1515622500]":227999000,"[1515623400]":227996000,"[1515624300]":226516000,"[1515625200]":228000000,"[1515626100]":226409000,"[1515627000]":224993000,"[1515627900]":226744000,"[1515628800]":227001000,"[1515629700]":227000000,"[1515630600]":226999000,"[1515631500]":226996000,"[1515632400]":226994000,"[1515633300]":227003000,"[1515634200]":227500000,"[1515635100]":228339000,"[1515636000]":228335000,"[1515636900]":228300000,"[1515637800]":227798000,"[1515638700]":228000000,"[1515639600]":226392000,"[1515640500]":225000000,"[1515641400]":223998000,"[1515642300]":223997000,"[1515643200]":223000000,"[1515644100]":220000000,"[1515645000]":215980000,"[1515645900]":219900000,"[1515646800]":223500000,"[1515647700]":221700000,"[1515648600]":220703000,"[1515649500]":217875000,"[1515650400]":220000000,"[1515651300]":218000000,"[1515652200]":217701000,"[1515653100]":216800000,"[1515654000]":215500000,"[1515654900]":217505000,"[1515655800]":219178000,"[1515656700]":219903000,"[1515657600]":225000000,"[1515658500]":220882000,"[1515659400]":220999000,"[1515660300]":221700000,"[1515661200]":221510000,"[1515662100]":219899000,"[1515663000]":219898000,"[1515663900]":219889000,"[1515664800]":217899000,"[1515665700]":216286000,"[1515666600]":217499000,"[1515667500]":217881000,"[1515668400]":216395000,"[1515669300]":217283000,"[1515670200]":216500000,"[1515671100]":217000000,"[1515672000]":220000000,"[1515672900]":220894000,"[1515673800]":219498000,"[1515674700]":219898000,"[1515675600]":219900000,"[1515676500]":219900000,"[1515677400]":218998000,"[1515678300]":219486000,"[1515679200]":220000000,"[1515680100]":220000000,"[1515681000]":220946000,"[1515681900]":219950000,"[1515682800]":219800000,"[1515683700]":218885000,"[1515684600]":218109000,"[1515685500]":217099000,"[1515686400]":216898000,"[1515687300]":216312000,"[1515688200]":217101000,"[1515689100]":216900000,"[1515690000]":215400000,"[1515690900]":215488000,"[1515691800]":215490000,"[1515692700]":215998000,"[1515693600]":216899000,"[1515694500]":215870000,"[1515695400]":216998000,"[1515696300]":216983000,"[1515697200]":216994000,"[1515698100]":216994000,"[1515699000]":216998000,"[1515699900]":215550000,"[1515700800]":215499000,"[1515701700]":215108000,"[1515702600]":215007000,"[1515703500]":215449000,"[1515704400]":214950000,"[1515705300]":214003000,"[1515706200]":214500000,"[1515707100]":214600000,"[1515708000]":215000000,"[1515708900]":215000000,"[1515709800]":215000000,"[1515710700]":215000000,"[1515711600]":214998000,"[1515712500]":214995000,"[1515713400]":215000000,"[1515714300]":214584000,"[1515715200]":214967000,"[1515716100]":214900000,"[1515717000]":214200000,"[1515717900]":212901000,"[1515718800]":213499000,"[1515719700]":212900000,"[1515720600]":213951000,"[1515721500]":213997000,"[1515722400]":213504000,"[1515723300]":214879000,"[1515724200]":214572000,"[1515725100]":213792000,"[1515726000]":214501000,"[1515726900]":214489000,"[1515727800]":214000000,"[1515728700]":214500000,"[1515729600]":215499000,"[1515730500]":215444000,"[1515731400]":214996000,"[1515732300]":216000000,"[1515733200]":217896000,"[1515734100]":217493000,"[1515735000]":217399000,"[1515735900]":218168000,"[1515736800]":220000000,"[1515737700]":219450000,"[1515738600]":222000000,"[1515739500]":220000000,"[1515740400]":221998000,"[1515741300]":222003000,"[1515742200]":221990000,"[1515743100]":219520000,"[1515744000]":216999000,"[1515744900]":216999000,"[1515745800]":216999000,"[1515746700]":216999000,"[1515747600]":217000000,"[1515748500]":216995000,"[1515749400]":218000000,"[1515750300]":218100000,"[1515751200]":219136000,"[1515752100]":218970000,"[1515753000]":217899000,"[1515753900]":217185000,"[1515754800]":217049000,"[1515755700]":216809000,"[1515756600]":217902000,"[1515757500]":217886000,"[1515758400]":217850000,"[1515759300]":217000000,"[1515760200]":217718000,"[1515761100]":217838000,"[1515762000]":218500000,"[1515762900]":216990000,"[1515763800]":216562000,"[1515764700]":216414000,"[1515765600]":216407000,"[1515766500]":215751000,"[1515767400]":216000000,"[1515768300]":216200000,"[1515769200]":216202000,"[1515770100]":216000000,"[1515771000]":215200000,"[1515771900]":214400000,"[1515772800]":214100000,"[1515773700]":214100000,"[1515774600]":214199000,"[1515775500]":214800000,"[1515776400]":214850000,"[1515777300]":214850000,"[1515778200]":214749000,"[1515779100]":214600000,"[1515780000]":214599000,"[1515780900]":214346000,"[1515781800]":214790000,"[1515782700]":214769000,"[1515783600]":214647000,"[1515784500]":214850000,"[1515785400]":216000000,"[1515786300]":216002000,"[1515787200]":217700000,"[1515788100]":216804000,"[1515789000]":216804000,"[1515789900]":216804000,"[1515790800]":216804000,"[1515791700]":216803000,"[1515792600]":216372000,"[1515793500]":216200000,"[1515794400]":216199000,"[1515795300]":216702000,"[1515796200]":216804000,"[1515797100]":216500000,"[1515798000]":215599000,"[1515798900]":215296000,"[1515799800]":215688000,"[1515800700]":216001000,"[1515801600]":216436000,"[1515802500]":216436000,"[1515803400]":215421000,"[1515804300]":216750000,"[1515805200]":217249000,"[1515806100]":217249000,"[1515807000]":217697000,"[1515807900]":217599000,"[1515808800]":217236000,"[1515809700]":217000000,"[1515810600]":217000000,"[1515811500]":217499000,"[1515812400]":217288000,"[1515813300]":216761000,"[1515814200]":216754000,"[1515815100]":216745000,"[1515816000]":216601000,"[1515816900]":216597000,"[1515817800]":217000000,"[1515818700]":217550000,"[1515819600]":217901000,"[1515820500]":218201000,"[1515821400]":217801000,"[1515822300]":217676000,"[1515823200]":217676000,"[1515824100]":216937000,"[1515825000]":216607000,"[1515825900]":216320000,"[1515826800]":216900000,"[1515827700]":217790000,"[1515828600]":217480000,"[1515829500]":217099000,"[1515830400]":217012000,"[1515831300]":217000000,"[1515832200]":217000000,"[1515833100]":217000000,"[1515834000]":216684000,"[1515834900]":216283000,"[1515835800]":216191000,"[1515836700]":215987000,"[1515837600]":215700000,"[1515838500]":215705000,"[1515839400]":216284000,"[1515840300]":215280000,"[1515841200]":215191000,"[1515842100]":215099000,"[1515843000]":215075000,"[1515843900]":214472000,"[1515844800]":214196000,"[1515845700]":213664000,"[1515846600]":214479000,"[1515847500]":214500000,"[1515848400]":213066000,"[1515849300]":213000000,"[1515850200]":213199000,"[1515851100]":213300000,"[1515852000]":213900000,"[1515852900]":212896000,"[1515853800]":211805000,"[1515854700]":210900000,"[1515855600]":211564000,"[1515856500]":210015000,"[1515857400]":211450000,"[1515858300]":210950000,"[1515859200]":210499000,"[1515860100]":210632000,"[1515861000]":210700000,"[1515861900]":210304000,"[1515862800]":209884000,"[1515863700]":209879000,"[1515864600]":209500000,"[1515865500]":209884000,"[1515866400]":210101000,"[1515867300]":210100000,"[1515868200]":209055000,"[1515869100]":207781000,"[1515870000]":207333000,"[1515870900]":209950000,"[1515871800]":208992000,"[1515872700]":206949000,"[1515873600]":209999000,"[1515874500]":209010000,"[1515875400]":209949000,"[1515876300]":209443000,"[1515877200]":208700000,"[1515878100]":209000000,"[1515879000]":209000000,"[1515879900]":207000000,"[1515880800]":206900000,"[1515881700]":207999000,"[1515882600]":207970000,"[1515883500]":207900000,"[1515884400]":208900000,"[1515885300]":209697000,"[1515886200]":210000000,"[1515887100]":210000000,"[1515888000]":209969000,"[1515888900]":207791000,"[1515889800]":207172000,"[1515890700]":209000000,"[1515891600]":208785000,"[1515892500]":208409000,"[1515893400]":208000000,"[1515894300]":207798000,"[1515895200]":207790000,"[1515896100]":207788000,"[1515897000]":208000000,"[1515897900]":207687000,"[1515898800]":207980000,"[1515899700]":207207000,"[1515900600]":206299000,"[1515901500]":206001000,"[1515902400]":205103000,"[1515903300]":203700000,"[1515904200]":203500000,"[1515905100]":200188000,"[1515906000]":200003000,"[1515906900]":196100000,"[1515907800]":198000000,"[1515908700]":197993000,"[1515909600]":197000000,"[1515910500]":196209000,"[1515911400]":196985000,"[1515912300]":195004000,"[1515913200]":194500000,"[1515914100]":192000000,"[1515915000]":192399000,"[1515915900]":195157000,"[1515916800]":195200000,"[1515917700]":195200000,"[1515918600]":195100000,"[1515919500]":194909000,"[1515920400]":193900000,"[1515921300]":192648000,"[1515922200]":191849000,"[1515923100]":191500000,"[1515924000]":190004000,"[1515924900]":190004000,"[1515925800]":185999000,"[1515926700]":184406000,"[1515927600]":182299000,"[1515928500]":185000000,"[1515929400]":184899000,"[1515930300]":186181000,"[1515931200]":192645000,"[1515932100]":183900000,"[1515933000]":182299000,"[1515933900]":182300000,"[1515934800]":182302000,"[1515935700]":185003000,"[1515936600]":187999000,"[1515937500]":196986000,"[1515938400]":193000000,"[1515939300]":190000000,"[1515940200]":194884000,"[1515941100]":193806000,"[1515942000]":193694000,"[1515942900]":191799000,"[1515943800]":188996000,"[1515944700]":187310000,"[1515945600]":187000000,"[1515946500]":189000000,"[1515947400]":188199000,"[1515948300]":187500000,"[1515949200]":188000000,"[1515950100]":187999000,"[1515951000]":187008000,"[1515951900]":188466000,"[1515952800]":190200000,"[1515953700]":195701000,"[1515954600]":195172000,"[1515955500]":193973000,"[1515956400]":192796000,"[1515957300]":192141000,"[1515958200]":192700000,"[1515959100]":192001000,"[1515960000]":191899000,"[1515960900]":191897000,"[1515961800]":191498000,"[1515962700]":191981000,"[1515963600]":192249000,"[1515964500]":192250000,"[1515965400]":192250000,"[1515966300]":192457000,"[1515967200]":192247000,"[1515968100]":192003000,"[1515969000]":191997000,"[1515969900]":192809000,"[1515970800]":192977000,"[1515971700]":195999000,"[1515972600]":196010000,"[1515973500]":195675000,"[1515974400]":195599000,"[1515975300]":194989000,"[1515976200]":194978000,"[1515977100]":194989000,"[1515978000]":195000000,"[1515978900]":196400000,"[1515979800]":196502000,"[1515980700]":198463000,"[1515981600]":196999000,"[1515982500]":196000000,"[1515983400]":194998000,"[1515984300]":195699000,"[1515985200]":195693000,"[1515986100]":198200000,"[1515987000]":198197000,"[1515987900]":199993000,"[1515988800]":199489000,"[1515989700]":199013000,"[1515990600]":199450000,"[1515991500]":201560000,"[1515992400]":201251000,"[1515993300]":202983000,"[1515994200]":204980000,"[1515995100]":208000000,"[1515996000]":207489000,"[1515996900]":206500000,"[1515997800]":204509000,"[1515998700]":205100000,"[1515999600]":204900000,"[1516000500]":203718000,"[1516001400]":203718000,"[1516002300]":203718000,"[1516003200]":204500000,"[1516004100]":207575000,"[1516005000]":207746000,"[1516005900]":207204000,"[1516006800]":205099000,"[1516007700]":205099000,"[1516008600]":205100000,"[1516009500]":205500000,"[1516010400]":204100000,"[1516011300]":203448000,"[1516012200]":202999000,"[1516013100]":202900000,"[1516014000]":203635000,"[1516014900]":203350000,"[1516015800]":202839000,"[1516016700]":201701000,"[1516017600]":201052000,"[1516018500]":200300000,"[1516019400]":201884000,"[1516020300]":204393000,"[1516021200]":204450000,"[1516022100]":204500000,"[1516023000]":203999000,"[1516023900]":204949000,"[1516024800]":206495000,"[1516025700]":206202000,"[1516026600]":204912000,"[1516027500]":204899000,"[1516028400]":204002000,"[1516029300]":202740000,"[1516030200]":202555000,"[1516031100]":202740000,"[1516032000]":202741000,"[1516032900]":202740000,"[1516033800]":202745000,"[1516034700]":205797000,"[1516035600]":204500000,"[1516036500]":204398000,"[1516037400]":203991000,"[1516038300]":202896000,"[1516039200]":202490000,"[1516040100]":202122000,"[1516041000]":202590000,"[1516041900]":202500000,"[1516042800]":202587000,"[1516043700]":202395000,"[1516044600]":203499000},"low":{"[1515595500]":219999000,"[1515596400]":220001000,"[1515597300]":221699000,"[1515598200]":222650000,"[1515599100]":223450000,"[1515600000]":223998000,"[1515600900]":223998000,"[1515601800]":224399000,"[1515602700]":225179000,"[1515603600]":224599000,"[1515604500]":224599000,"[1515605400]":224600000,"[1515606300]":224623000,"[1515607200]":224999000,"[1515608100]":225000000,"[1515609000]":224900000,"[1515609900]":225178000,"[1515610800]":224501000,"[1515611700]":225425000,"[1515612600]":225424000,"[1515613500]":226206000,"[1515614400]":225424000,"[1515615300]":225456000,"[1515616200]":225490000,"[1515617100]":226506000,"[1515618000]":226302000,"[1515618900]":226990000,"[1515619800]":226580000,"[1515620700]":225425000,"[1515621600]":225425000,"[1515622500]":225586000,"[1515623400]":225589000,"[1515624300]":225425000,"[1515625200]":225498000,"[1515626100]":222700000,"[1515627000]":222753000,"[1515627900]":223013000,"[1515628800]":225539000,"[1515629700]":225400000,"[1515630600]":226488000,"[1515631500]":226593000,"[1515632400]":226601000,"[1515633300]":226904000,"[1515634200]":227000000,"[1515635100]":227101000,"[1515636000]":227998000,"[1515636900]":225187000,"[1515637800]":226030000,"[1515638700]":226002000,"[1515639600]":220999000,"[1515640500]":221889000,"[1515641400]":223000000,"[1515642300]":220000000,"[1515643200]":219507000,"[1515644100]":215051000,"[1515645000]":212500000,"[1515645900]":212601000,"[1515646800]":216778000,"[1515647700]":220000000,"[1515648600]":217002000,"[1515649500]":213034000,"[1515650400]":213033000,"[1515651300]":215297000,"[1515652200]":216095000,"[1515653100]":215001000,"[1515654000]":214500000,"[1515654900]":214560000,"[1515655800]":216499000,"[1515656700]":217000000,"[1515657600]":217006000,"[1515658500]":218003000,"[1515659400]":218003000,"[1515660300]":219001000,"[1515661200]":218075000,"[1515662100]":218105000,"[1515663000]":218025000,"[1515663900]":217199000,"[1515664800]":216000000,"[1515665700]":215426000,"[1515666600]":215300000,"[1515667500]":215605000,"[1515668400]":215605000,"[1515669300]":215998000,"[1515670200]":215799000,"[1515671100]":215799000,"[1515672000]":216990000,"[1515672900]":218050000,"[1515673800]":218050000,"[1515674700]":218592000,"[1515675600]":219099000,"[1515676500]":218120000,"[1515677400]":218123000,"[1515678300]":218634000,"[1515679200]":219301000,"[1515680100]":219003000,"[1515681000]":219050000,"[1515681900]":218000000,"[1515682800]":216500000,"[1515683700]":217008000,"[1515684600]":215658000,"[1515685500]":216200000,"[1515686400]":216283000,"[1515687300]":215606000,"[1515688200]":215606000,"[1515689100]":215000000,"[1515690000]":215000000,"[1515690900]":215025000,"[1515691800]":215400000,"[1515692700]":215103000,"[1515693600]":215152000,"[1515694500]":215084000,"[1515695400]":215500000,"[1515696300]":215630000,"[1515697200]":216005000,"[1515698100]":216401000,"[1515699000]":215500000,"[1515699900]":215008000,"[1515700800]":215000000,"[1515701700]":214000000,"[1515702600]":214000000,"[1515703500]":214002000,"[1515704400]":214002000,"[1515705300]":213551000,"[1515706200]":213193000,"[1515707100]":213800000,"[1515708000]":214599000,"[1515708900]":214599000,"[1515709800]":214775000,"[1515710700]":213005000,"[1515711600]":213009000,"[1515712500]":213040000,"[1515713400]":213501000,"[1515714300]":213500000,"[1515715200]":214501000,"[1515716100]":214199000,"[1515717000]":212562000,"[1515717900]":212562000,"[1515718800]":212757000,"[1515719700]":212800000,"[1515720600]":212800000,"[1515721500]":213000000,"[1515722400]":212760000,"[1515723300]":212757000,"[1515724200]":212750000,"[1515725100]":212600000,"[1515726000]":212615000,"[1515726900]":212614000,"[1515727800]":212661000,"[1515728700]":213500000,"[1515729600]":214207000,"[1515730500]":214403000,"[1515731400]":214800000,"[1515732300]":214901000,"[1515733200]":216000000,"[1515734100]":215151000,"[1515735000]":215000000,"[1515735900]":216050000,"[1515736800]":218167000,"[1515737700]":219000000,"[1515738600]":219297000,"[1515739500]":219681000,"[1515740400]":219998000,"[1515741300]":221001000,"[1515742200]":218097000,"[1515743100]":215000000,"[1515744000]":215211000,"[1515744900]":215125000,"[1515745800]":216000000,"[1515746700]":216199000,"[1515747600]":216881000,"[1515748500]":216300000,"[1515749400]":216300000,"[1515750300]":217179000,"[1515751200]":215126000,"[1515752100]":216005000,"[1515753000]":216000000,"[1515753900]":216805000,"[1515754800]":216000000,"[1515755700]":215809000,"[1515756600]":216300000,"[1515757500]":216007000,"[1515758400]":216150000,"[1515759300]":216335000,"[1515760200]":216169000,"[1515761100]":216660000,"[1515762000]":215100000,"[1515762900]":215010000,"[1515763800]":215001000,"[1515764700]":215160000,"[1515765600]":214700000,"[1515766500]":214701000,"[1515767400]":214000000,"[1515768300]":215558000,"[1515769200]":215799000,"[1515770100]":215000000,"[1515771000]":214012000,"[1515771900]":213998000,"[1515772800]":214050000,"[1515773700]":213701000,"[1515774600]":213500000,"[1515775500]":213509000,"[1515776400]":214195000,"[1515777300]":214000000,"[1515778200]":214249000,"[1515779100]":214501000,"[1515780000]":214000000,"[1515780900]":214000000,"[1515781800]":213502000,"[1515782700]":213503000,"[1515783600]":214200000,"[1515784500]":214200000,"[1515785400]":214849000,"[1515786300]":215335000,"[1515787200]":216002000,"[1515788100]":216801000,"[1515789000]":216803000,"[1515789900]":216803000,"[1515790800]":216803000,"[1515791700]":215519000,"[1515792600]":215132000,"[1515793500]":215261000,"[1515794400]":215111000,"[1515795300]":215002000,"[1515796200]":215002000,"[1515797100]":215000000,"[1515798000]":215100000,"[1515798900]":214300000,"[1515799800]":214976000,"[1515800700]":215000000,"[1515801600]":215113000,"[1515802500]":215001000,"[1515803400]":215002000,"[1515804300]":215152000,"[1515805200]":216507000,"[1515806100]":217107000,"[1515807000]":217199000,"[1515807900]":217198000,"[1515808800]":216503000,"[1515809700]":216500000,"[1515810600]":216562000,"[1515811500]":216981000,"[1515812400]":216752000,"[1515813300]":216443000,"[1515814200]":216050000,"[1515815100]":216001000,"[1515816000]":216003000,"[1515816900]":216214000,"[1515817800]":216490000,"[1515818700]":216487000,"[1515819600]":217000000,"[1515820500]":217120000,"[1515821400]":217281000,"[1515822300]":217000000,"[1515823200]":216028000,"[1515824100]":216003000,"[1515825000]":216110000,"[1515825900]":216004000,"[1515826800]":216101000,"[1515827700]":216305000,"[1515828600]":216850000,"[1515829500]":216612000,"[1515830400]":216004000,"[1515831300]":216000000,"[1515832200]":216102000,"[1515833100]":216501000,"[1515834000]":216134000,"[1515834900]":216000000,"[1515835800]":215900000,"[1515836700]":215600000,"[1515837600]":215606000,"[1515838500]":215307000,"[1515839400]":215188000,"[1515840300]":215188000,"[1515841200]":215070000,"[1515842100]":215071000,"[1515843000]":213600000,"[1515843900]":213503000,"[1515844800]":213000000,"[1515845700]":212300000,"[1515846600]":212001000,"[1515847500]":212100000,"[1515848400]":211400000,"[1515849300]":211599000,"[1515850200]":211009000,"[1515851100]":212502000,"[1515852000]":212003000,"[1515852900]":211596000,"[1515853800]":210600000,"[1515854700]":210500000,"[1515855600]":210001000,"[1515856500]":210000000,"[1515857400]":210001000,"[1515858300]":210211000,"[1515859200]":210210000,"[1515860100]":210001000,"[1515861000]":210113000,"[1515861900]":209128000,"[1515862800]":208698000,"[1515863700]":208110000,"[1515864600]":208360000,"[1515865500]":208699000,"[1515866400]":209100000,"[1515867300]":208000000,"[1515868200]":207781000,"[1515869100]":205800000,"[1515870000]":205098000,"[1515870900]":205501000,"[1515871800]":205501000,"[1515872700]":206214000,"[1515873600]":206448000,"[1515874500]":207000000,"[1515875400]":207005000,"[1515876300]":207005000,"[1515877200]":207001000,"[1515878100]":207003000,"[1515879000]":207000000,"[1515879900]":206445000,"[1515880800]":206445000,"[1515881700]":205950000,"[1515882600]":206117000,"[1515883500]":206200000,"[1515884400]":207616000,"[1515885300]":207500000,"[1515886200]":208006000,"[1515887100]":208040000,"[1515888000]":206500000,"[1515888900]":206501000,"[1515889800]":206500000,"[1515890700]":206500000,"[1515891600]":207803000,"[1515892500]":206600000,"[1515893400]":206700000,"[1515894300]":206666000,"[1515895200]":206667000,"[1515896100]":207207000,"[1515897000]":206699000,"[1515897900]":206944000,"[1515898800]":206502000,"[1515899700]":206099000,"[1515900600]":206000000,"[1515901500]":205102000,"[1515902400]":203103000,"[1515903300]":200187000,"[1515904200]":200187000,"[1515905100]":200003000,"[1515906000]":195499000,"[1515906900]":191031000,"[1515907800]":191521000,"[1515908700]":195499000,"[1515909600]":195998000,"[1515910500]":195000000,"[1515911400]":194700000,"[1515912300]":194000000,"[1515913200]":191779000,"[1515914100]":190000000,"[1515915000]":191137000,"[1515915900]":191650000,"[1515916800]":194001000,"[1515917700]":194448000,"[1515918600]":194551000,"[1515919500]":192504000,"[1515920400]":192504000,"[1515921300]":191601000,"[1515922200]":191300000,"[1515923100]":187496000,"[1515924000]":185000000,"[1515924900]":185600000,"[1515925800]":183008000,"[1515926700]":182004000,"[1515927600]":180018000,"[1515928500]":180578000,"[1515929400]":180800000,"[1515930300]":181000000,"[1515931200]":183000000,"[1515932100]":182053000,"[1515933000]":181000000,"[1515933900]":181008000,"[1515934800]":181299000,"[1515935700]":182300000,"[1515936600]":184550000,"[1515937500]":187998000,"[1515938400]":187000000,"[1515939300]":188098000,"[1515940200]":189100000,"[1515941100]":190007000,"[1515942000]":190200000,"[1515942900]":188000000,"[1515943800]":183307000,"[1515944700]":185050000,"[1515945600]":185000000,"[1515946500]":185600000,"[1515947400]":186899000,"[1515948300]":185051000,"[1515949200]":187000000,"[1515950100]":185680000,"[1515951000]":185479000,"[1515951900]":185205000,"[1515952800]":185222000,"[1515953700]":185206000,"[1515954600]":191001000,"[1515955500]":192000000,"[1515956400]":192000000,"[1515957300]":190876000,"[1515958200]":191995000,"[1515959100]":190100000,"[1515960000]":190998000,"[1515960900]":191107000,"[1515961800]":191001000,"[1515962700]":191180000,"[1515963600]":191980000,"[1515964500]":192000000,"[1515965400]":192002000,"[1515966300]":191973000,"[1515967200]":191010000,"[1515968100]":190505000,"[1515969000]":190505000,"[1515969900]":191002000,"[1515970800]":191996000,"[1515971700]":192900000,"[1515972600]":195002000,"[1515973500]":194666000,"[1515974400]":193500000,"[1515975300]":193100000,"[1515976200]":193100000,"[1515977100]":194409000,"[1515978000]":194527000,"[1515978900]":194999000,"[1515979800]":195411000,"[1515980700]":196500000,"[1515981600]":193000000,"[1515982500]":193993000,"[1515983400]":194300000,"[1515984300]":194400000,"[1515985200]":193996000,"[1515986100]":193996000,"[1515987000]":196000000,"[1515987900]":197855000,"[1515988800]":198509000,"[1515989700]":199000000,"[1515990600]":199011000,"[1515991500]":199008000,"[1515992400]":199500000,"[1515993300]":200730000,"[1515994200]":201651000,"[1515995100]":203000000,"[1515996000]":203007000,"[1515996900]":204000000,"[1515997800]":202499000,"[1515998700]":202500000,"[1515999600]":202000000,"[1516000500]":202000000,"[1516001400]":202006000,"[1516002300]":202515000,"[1516003200]":203498000,"[1516004100]":203452000,"[1516005000]":204500000,"[1516005900]":203500000,"[1516006800]":204000000,"[1516007700]":203448000,"[1516008600]":203591000,"[1516009500]":203448000,"[1516010400]":203310000,"[1516011300]":201800000,"[1516012200]":201805000,"[1516013100]":202526000,"[1516014000]":202671000,"[1516014900]":202008000,"[1516015800]":201001000,"[1516016700]":200014000,"[1516017600]":200300000,"[1516018500]":198440000,"[1516019400]":198600000,"[1516020300]":201052000,"[1516021200]":202500000,"[1516022100]":201969000,"[1516023000]":202015000,"[1516023900]":203998000,"[1516024800]":204400000,"[1516025700]":201796000,"[1516026600]":203006000,"[1516027500]":202533000,"[1516028400]":202300000,"[1516029300]":201600000,"[1516030200]":201053000,"[1516031100]":201000000,"[1516032000]":201999000,"[1516032900]":202054000,"[1516033800]":202200000,"[1516034700]":202610000,"[1516035600]":203900000,"[1516036500]":203501000,"[1516037400]":202110000,"[1516038300]":202031000,"[1516039200]":202031000,"[1516040100]":202031000,"[1516041000]":202014000,"[1516041900]":202000000,"[1516042800]":201750000,"[1516043700]":201000000,"[1516044600]":201000000},"open":{"[1515595500]":219999000,"[1515596400]":221203000,"[1515597300]":221700000,"[1515598200]":225099000,"[1515599100]":223800000,"[1515600000]":225000000,"[1515600900]":224000000,"[1515601800]":226489000,"[1515602700]":226147000,"[1515603600]":225352000,"[1515604500]":224604000,"[1515605400]":225338000,"[1515606300]":225376000,"[1515607200]":225367000,"[1515608100]":225225000,"[1515609000]":225003000,"[1515609900]":225178000,"[1515610800]":225477000,"[1515611700]":225428000,"[1515612600]":225495000,"[1515613500]":226206000,"[1515614400]":226988000,"[1515615300]":226557000,"[1515616200]":225490000,"[1515617100]":226890000,"[1515618000]":228337000,"[1515618900]":226990000,"[1515619800]":226998000,"[1515620700]":226580000,"[1515621600]":225450000,"[1515622500]":225586000,"[1515623400]":225589000,"[1515624300]":226516000,"[1515625200]":225499000,"[1515626100]":226408000,"[1515627000]":224993000,"[1515627900]":223299000,"[1515628800]":226740000,"[1515629700]":226507000,"[1515630600]":226489000,"[1515631500]":226994000,"[1515632400]":226832000,"[1515633300]":226993000,"[1515634200]":227001000,"[1515635100]":227101000,"[1515636000]":228077000,"[1515636900]":228240000,"[1515637800]":227798000,"[1515638700]":227699000,"[1515639600]":226392000,"[1515640500]":221897000,"[1515641400]":223201000,"[1515642300]":223997000,"[1515643200]":221101000,"[1515644100]":219994000,"[1515645000]":215889000,"[1515645900]":212601000,"[1515646800]":217601000,"[1515647700]":220099000,"[1515648600]":220700000,"[1515649500]":217875000,"[1515650400]":213034000,"[1515651300]":216570000,"[1515652200]":217394000,"[1515653100]":216298000,"[1515654000]":215450000,"[1515654900]":215000000,"[1515655800]":216499000,"[1515656700]":217052000,"[1515657600]":217188000,"[1515658500]":219680000,"[1515659400]":218003000,"[1515660300]":219279000,"[1515661200]":221259000,"[1515662100]":218105000,"[1515663000]":219102000,"[1515663900]":218144000,"[1515664800]":217899000,"[1515665700]":216002000,"[1515666600]":215499000,"[1515667500]":217498000,"[1515668400]":216395000,"[1515669300]":215998000,"[1515670200]":216500000,"[1515671100]":215799000,"[1515672000]":216990000,"[1515672900]":219999000,"[1515673800]":218998000,"[1515674700]":219182000,"[1515675600]":219497000,"[1515676500]":219900000,"[1515677400]":218594000,"[1515678300]":218993000,"[1515679200]":219447000,"[1515680100]":219999000,"[1515681000]":220000000,"[1515681900]":219206000,"[1515682800]":219208000,"[1515683700]":218666000,"[1515684600]":218100000,"[1515685500]":216993000,"[1515686400]":216898000,"[1515687300]":216311000,"[1515688200]":215607000,"[1515689100]":216900000,"[1515690000]":215000000,"[1515690900]":215026000,"[1515691800]":215488000,"[1515692700]":215489000,"[1515693600]":215664000,"[1515694500]":215486000,"[1515695400]":215870000,"[1515696300]":216796000,"[1515697200]":216216000,"[1515698100]":216401000,"[1515699000]":216900000,"[1515699900]":215502000,"[1515700800]":215008000,"[1515701700]":215108000,"[1515702600]":214691000,"[1515703500]":214002000,"[1515704400]":214688000,"[1515705300]":214002000,"[1515706200]":213701000,"[1515707100]":214497000,"[1515708000]":214600000,"[1515708900]":215000000,"[1515709800]":214992000,"[1515710700]":214998000,"[1515711600]":213521000,"[1515712500]":213484000,"[1515713400]":214704000,"[1515714300]":214500000,"[1515715200]":214555000,"[1515716100]":214891000,"[1515717000]":214200000,"[1515717900]":212562000,"[1515718800]":212800000,"[1515719700]":212900000,"[1515720600]":212841000,"[1515721500]":213496000,"[1515722400]":213500000,"[1515723300]":212981000,"[1515724200]":214572000,"[1515725100]":212751000,"[1515726000]":213015000,"[1515726900]":212793000,"[1515727800]":213991000,"[1515728700]":214000000,"[1515729600]":214499000,"[1515730500]":215000000,"[1515731400]":214903000,"[1515732300]":214902000,"[1515733200]":216000000,"[1515734100]":217493000,"[1515735000]":215151000,"[1515735900]":217204000,"[1515736800]":218168000,"[1515737700]":219349000,"[1515738600]":219297000,"[1515739500]":219880000,"[1515740400]":219999000,"[1515741300]":221002000,"[1515742200]":221150000,"[1515743100]":218097000,"[1515744000]":216500000,"[1515744900]":216502000,"[1515745800]":216196000,"[1515746700]":216879000,"[1515747600]":216882000,"[1515748500]":216901000,"[1515749400]":216300000,"[1515750300]":217180000,"[1515751200]":218099000,"[1515752100]":217500000,"[1515753000]":217899000,"[1515753900]":216948000,"[1515754800]":217049000,"[1515755700]":216000000,"[1515756600]":216507000,"[1515757500]":217885000,"[1515758400]":216777000,"[1515759300]":216984000,"[1515760200]":216441000,"[1515761100]":216998000,"[1515762000]":217831000,"[1515762900]":216711000,"[1515763800]":216093000,"[1515764700]":216414000,"[1515765600]":215704000,"[1515766500]":214701000,"[1515767400]":215744000,"[1515768300]":215558000,"[1515769200]":215800000,"[1515770100]":215806000,"[1515771000]":215002000,"[1515771900]":214030000,"[1515772800]":214098000,"[1515773700]":214097000,"[1515774600]":213734000,"[1515775500]":213509000,"[1515776400]":214800000,"[1515777300]":214196000,"[1515778200]":214250000,"[1515779100]":214599000,"[1515780000]":214598000,"[1515780900]":214003000,"[1515781800]":214311000,"[1515782700]":213503000,"[1515783600]":214646000,"[1515784500]":214200000,"[1515785400]":214850000,"[1515786300]":216000000,"[1515787200]":216002000,"[1515788100]":216801000,"[1515789000]":216803000,"[1515789900]":216804000,"[1515790800]":216803000,"[1515791700]":216803000,"[1515792600]":215519000,"[1515793500]":215261000,"[1515794400]":216199000,"[1515795300]":216014000,"[1515796200]":216702000,"[1515797100]":215306000,"[1515798000]":215599000,"[1515798900]":215111000,"[1515799800]":214977000,"[1515800700]":215271000,"[1515801600]":215940000,"[1515802500]":215495000,"[1515803400]":215131000,"[1515804300]":215152000,"[1515805200]":216507000,"[1515806100]":217228000,"[1515807000]":217200000,"[1515807900]":217599000,"[1515808800]":217235000,"[1515809700]":216503000,"[1515810600]":216571000,"[1515811500]":216985000,"[1515812400]":217007000,"[1515813300]":216760000,"[1515814200]":216505000,"[1515815100]":216700000,"[1515816000]":216270000,"[1515816900]":216597000,"[1515817800]":216492000,"[1515818700]":217000000,"[1515819600]":217550000,"[1515820500]":217901000,"[1515821400]":217800000,"[1515822300]":217522000,"[1515823200]":217676000,"[1515824100]":216028000,"[1515825000]":216502000,"[1515825900]":216176000,"[1515826800]":216204000,"[1515827700]":216305000,"[1515828600]":217480000,"[1515829500]":216903000,"[1515830400]":216825000,"[1515831300]":216005000,"[1515832200]":216898000,"[1515833100]":216623000,"[1515834000]":216684000,"[1515834900]":216282000,"[1515835800]":216008000,"[1515836700]":215900000,"[1515837600]":215683000,"[1515838500]":215670000,"[1515839400]":215552000,"[1515840300]":215202000,"[1515841200]":215190000,"[1515842100]":215098000,"[1515843000]":215072000,"[1515843900]":214351000,"[1515844800]":214064000,"[1515845700]":213467000,"[1515846600]":212300000,"[1515847500]":213311000,"[1515848400]":212100000,"[1515849300]":211599000,"[1515850200]":212210000,"[1515851100]":213140000,"[1515852000]":213300000,"[1515852900]":212896000,"[1515853800]":211604000,"[1515854700]":210601000,"[1515855600]":210511000,"[1515856500]":210012000,"[1515857400]":210006000,"[1515858300]":210808000,"[1515859200]":210216000,"[1515860100]":210227000,"[1515861000]":210113000,"[1515861900]":210303000,"[1515862800]":209176000,"[1515863700]":209681000,"[1515864600]":208501000,"[1515865500]":208699000,"[1515866400]":209858000,"[1515867300]":209541000,"[1515868200]":208751000,"[1515869100]":207781000,"[1515870000]":205899000,"[1515870900]":206975000,"[1515871800]":205501000,"[1515872700]":206434000,"[1515873600]":206798000,"[1515874500]":209000000,"[1515875400]":207552000,"[1515876300]":209443000,"[1515877200]":208515000,"[1515878100]":207096000,"[1515879000]":207279000,"[1515879900]":207000000,"[1515880800]":206900000,"[1515881700]":206445000,"[1515882600]":207900000,"[1515883500]":207300000,"[1515884400]":207616000,"[1515885300]":208900000,"[1515886200]":208006000,"[1515887100]":209497000,"[1515888000]":209969000,"[1515888900]":207000000,"[1515889800]":207172000,"[1515890700]":206500000,"[1515891600]":208785000,"[1515892500]":208400000,"[1515893400]":206700000,"[1515894300]":207796000,"[1515895200]":207198000,"[1515896100]":207701000,"[1515897000]":207696000,"[1515897900]":206944000,"[1515898800]":207682000,"[1515899700]":207205000,"[1515900600]":206099000,"[1515901500]":206001000,"[1515902400]":205102000,"[1515903300]":203104000,"[1515904200]":200187000,"[1515905100]":200187000,"[1515906000]":200003000,"[1515906900]":196100000,"[1515907800]":191521000,"[1515908700]":195500000,"[1515909600]":196002000,"[1515910500]":196035000,"[1515911400]":196007000,"[1515912300]":195004000,"[1515913200]":194499000,"[1515914100]":191779000,"[1515915000]":191616000,"[1515915900]":192000000,"[1515916800]":195154000,"[1515917700]":194499000,"[1515918600]":195098000,"[1515919500]":194552000,"[1515920400]":192609000,"[1515921300]":192644000,"[1515922200]":191797000,"[1515923100]":191497000,"[1515924000]":189000000,"[1515924900]":189501000,"[1515925800]":185999000,"[1515926700]":183307000,"[1515927600]":182050000,"[1515928500]":180677000,"[1515929400]":184808000,"[1515930300]":181211000,"[1515931200]":183500000,"[1515932100]":183900000,"[1515933000]":182299000,"[1515933900]":181300000,"[1515934800]":181996000,"[1515935700]":182301000,"[1515936600]":185003000,"[1515937500]":187998000,"[1515938400]":192500000,"[1515939300]":188648000,"[1515940200]":189994000,"[1515941100]":190998000,"[1515942000]":193552000,"[1515942900]":190799000,"[1515943800]":188996000,"[1515944700]":187310000,"[1515945600]":186832000,"[1515946500]":185999000,"[1515947400]":188198000,"[1515948300]":186899000,"[1515949200]":187488000,"[1515950100]":187998000,"[1515951000]":187000000,"[1515951900]":186771000,"[1515952800]":188466000,"[1515953700]":188510000,"[1515954600]":193640000,"[1515955500]":192574000,"[1515956400]":192000000,"[1515957300]":192001000,"[1515958200]":191995000,"[1515959100]":192001000,"[1515960000]":190998000,"[1515960900]":191897000,"[1515961800]":191204000,"[1515962700]":191181000,"[1515963600]":191981000,"[1515964500]":192248000,"[1515965400]":192250000,"[1515966300]":192003000,"[1515967200]":192247000,"[1515968100]":191999000,"[1515969000]":190505000,"[1515969900]":191990000,"[1515970800]":192809000,"[1515971700]":192977000,"[1515972600]":195998000,"[1515973500]":195174000,"[1515974400]":195599000,"[1515975300]":194769000,"[1515976200]":193950000,"[1515977100]":194851000,"[1515978000]":194986000,"[1515978900]":195000000,"[1515979800]":195600000,"[1515980700]":196502000,"[1515981600]":196504000,"[1515982500]":193998000,"[1515983400]":194998000,"[1515984300]":194400000,"[1515985200]":195693000,"[1515986100]":194492000,"[1515987000]":197000000,"[1515987900]":198000000,"[1515988800]":199464000,"[1515989700]":199012000,"[1515990600]":199011000,"[1515991500]":199440000,"[1515992400]":199878000,"[1515993300]":201206000,"[1515994200]":201651000,"[1515995100]":204799000,"[1515996000]":203330000,"[1515996900]":206000000,"[1515997800]":204100000,"[1515998700]":202501000,"[1515999600]":203700000,"[1516000500]":203010000,"[1516001400]":202597000,"[1516002300]":203698000,"[1516003200]":203674000,"[1516004100]":204397000,"[1516005000]":205999000,"[1516005900]":205200000,"[1516006800]":205098000,"[1516007700]":204997000,"[1516008600]":204999000,"[1516009500]":205000000,"[1516010400]":204099000,"[1516011300]":203310000,"[1516012200]":201805000,"[1516013100]":202900000,"[1516014000]":202671000,"[1516014900]":203350000,"[1516015800]":202300000,"[1516016700]":201251000,"[1516017600]":200675000,"[1516018500]":200300000,"[1516019400]":198601000,"[1516020300]":201052000,"[1516021200]":204318000,"[1516022100]":204449000,"[1516023000]":202880000,"[1516023900]":203998000,"[1516024800]":204400000,"[1516025700]":206202000,"[1516026600]":204576000,"[1516027500]":203006000,"[1516028400]":204002000,"[1516029300]":202730000,"[1516030200]":202311000,"[1516031100]":202296000,"[1516032000]":202000000,"[1516032900]":202740000,"[1516033800]":202200000,"[1516034700]":202745000,"[1516035600]":204000000,"[1516036500]":203999000,"[1516037400]":203501000,"[1516038300]":202896000,"[1516039200]":202300000,"[1516040100]":202121000,"[1516041000]":202121000,"[1516041900]":202014000,"[1516042800]":202251000,"[1516043700]":202395000,"[1516044600]":202100000},"volume":{"[1515595500]":8.79020975,"[1515596400]":15.69338156,"[1515597300]":18.52170633,"[1515598200]":8.64610167,"[1515599100]":12.22812471,"[1515600000]":8.9653832,"[1515600900]":5.07291798,"[1515601800]":8.65029287,"[1515602700]":2.81964056,"[1515603600]":3.72751321,"[1515604500]":3.25837735,"[1515605400]":2.14602319,"[1515606300]":2.35146766,"[1515607200]":6.39456228,"[1515608100]":2.26879872,"[1515609000]":5.54111141,"[1515609900]":2.53538862,"[1515610800]":3.48494877,"[1515611700]":1.2275408,"[1515612600]":5.21074597,"[1515613500]":1.10467287,"[1515614400]":1.9065797,"[1515615300]":1.14025842,"[1515616200]":0.29346228,"[1515617100]":1.46016723,"[1515618000]":0.17069403,"[1515618900]":1.37774752,"[1515619800]":0.57678365,"[1515620700]":0.8283181,"[1515621600]":2.79945854,"[1515622500]":3.26562427,"[1515623400]":2.16894013,"[1515624300]":3.00932072,"[1515625200]":4.58774304,"[1515626100]":8.82247915,"[1515627000]":4.47572804,"[1515627900]":4.59315608,"[1515628800]":6.49289553,"[1515629700]":3.40146987,"[1515630600]":4.72088339,"[1515631500]":2.81860427,"[1515632400]":3.69217287,"[1515633300]":3.75588691,"[1515634200]":4.02786839,"[1515635100]":4.07760881,"[1515636000]":6.0129931,"[1515636900]":9.54418075,"[1515637800]":2.15203463,"[1515638700]":7.56412242,"[1515639600]":26.47786742,"[1515640500]":16.72161752,"[1515641400]":7.55409972,"[1515642300]":33.66992845,"[1515643200]":15.09800418,"[1515644100]":20.05997479,"[1515645000]":33.64113783,"[1515645900]":25.35896444,"[1515646800]":17.95910395,"[1515647700]":5.35275165,"[1515648600]":12.00522022,"[1515649500]":14.65924845,"[1515650400]":26.50552794,"[1515651300]":12.1207884,"[1515652200]":9.60536852,"[1515653100]":11.83225337,"[1515654000]":13.39803406,"[1515654900]":8.9905235,"[1515655800]":13.42616911,"[1515656700]":7.39857982,"[1515657600]":28.46484969,"[1515658500]":7.33072544,"[1515659400]":9.17157412,"[1515660300]":6.56761727,"[1515661200]":5.22387957,"[1515662100]":4.03109296,"[1515663000]":7.24559794,"[1515663900]":8.41799197,"[1515664800]":8.14410954,"[1515665700]":7.15095028,"[1515666600]":6.18187863,"[1515667500]":2.82357567,"[1515668400]":2.44367659,"[1515669300]":2.95055105,"[1515670200]":4.7950043,"[1515671100]":3.4744055,"[1515672000]":8.98545033,"[1515672900]":5.42207723,"[1515673800]":2.85667965,"[1515674700]":4.77950198,"[1515675600]":2.14478878,"[1515676500]":7.11651637,"[1515677400]":5.98263323,"[1515678300]":3.1972508,"[1515679200]":4.32259638,"[1515680100]":6.62091166,"[1515681000]":9.7930791,"[1515681900]":17.64070383,"[1515682800]":22.39557016,"[1515683700]":12.74299624,"[1515684600]":11.90261754,"[1515685500]":6.16842805,"[1515686400]":6.74372178,"[1515687300]":6.7313199,"[1515688200]":9.68783356,"[1515689100]":11.11944541,"[1515690000]":6.42113589,"[1515690900]":3.43895974,"[1515691800]":2.06440213,"[1515692700]":4.73915756,"[1515693600]":2.74630804,"[1515694500]":3.48665749,"[1515695400]":3.08117239,"[1515696300]":1.23229456,"[1515697200]":0.69595585,"[1515698100]":1.25762368,"[1515699000]":4.35436865,"[1515699900]":7.41923555,"[1515700800]":5.96820883,"[1515701700]":8.19117064,"[1515702600]":1.59706717,"[1515703500]":0.64673562,"[1515704400]":0.98638295,"[1515705300]":2.6912601,"[1515706200]":3.20988253,"[1515707100]":0.73553762,"[1515708000]":1.33655759,"[1515708900]":2.64177692,"[1515709800]":2.01705942,"[1515710700]":7.58017991,"[1515711600]":3.13476836,"[1515712500]":5.49782624,"[1515713400]":3.77849958,"[1515714300]":2.54899001,"[1515715200]":2.68840293,"[1515716100]":2.80261074,"[1515717000]":13.4266824,"[1515717900]":6.64691789,"[1515718800]":4.94888247,"[1515719700]":2.33768693,"[1515720600]":5.48245081,"[1515721500]":5.52939673,"[1515722400]":4.23309272,"[1515723300]":7.5259771,"[1515724200]":4.19447083,"[1515725100]":6.67794729,"[1515726000]":8.48025411,"[1515726900]":8.63026359,"[1515727800]":10.65095105,"[1515728700]":7.58876369,"[1515729600]":8.56765116,"[1515730500]":10.3441367,"[1515731400]":4.98013166,"[1515732300]":8.38703242,"[1515733200]":11.9337786,"[1515734100]":8.41273084,"[1515735000]":4.84590007,"[1515735900]":15.07416997,"[1515736800]":14.58400993,"[1515737700]":5.14049959,"[1515738600]":13.12018195,"[1515739500]":5.28167352,"[1515740400]":9.16203807,"[1515741300]":14.37583538,"[1515742200]":11.5680897,"[1515743100]":14.82782311,"[1515744000]":11.43785126,"[1515744900]":8.14775211,"[1515745800]":3.97805975,"[1515746700]":8.26453229,"[1515747600]":5.20931923,"[1515748500]":4.54844352,"[1515749400]":3.00181645,"[1515750300]":2.15370891,"[1515751200]":14.20517262,"[1515752100]":12.46625,"[1515753000]":8.87108858,"[1515753900]":2.42371214,"[1515754800]":8.99528723,"[1515755700]":8.33976259,"[1515756600]":5.896538,"[1515757500]":5.10780732,"[1515758400]":7.87183385,"[1515759300]":7.10970697,"[1515760200]":6.23175972,"[1515761100]":1.81384913,"[1515762000]":10.70408668,"[1515762900]":7.83128154,"[1515763800]":12.95418646,"[1515764700]":7.55101089,"[1515765600]":12.75305694,"[1515766500]":2.90406816,"[1515767400]":12.07876572,"[1515768300]":3.17900742,"[1515769200]":3.59580127,"[1515770100]":4.97903973,"[1515771000]":10.83909067,"[1515771900]":7.8126834,"[1515772800]":2.08172089,"[1515773700]":3.81240997,"[1515774600]":6.54458513,"[1515775500]":2.47940233,"[1515776400]":1.63743256,"[1515777300]":2.66911638,"[1515778200]":1.39999855,"[1515779100]":2.57527975,"[1515780000]":1.60987542,"[1515780900]":1.26503981,"[1515781800]":3.73638073,"[1515782700]":0.90727285,"[1515783600]":1.03501044,"[1515784500]":0.53375563,"[1515785400]":2.21534131,"[1515786300]":0.86620827,"[1515787200]":6.55304205,"[1515788100]":2.29235121,"[1515789000]":0.43309291,"[1515789900]":0.82975564,"[1515790800]":0.74078285,"[1515791700]":0.49854192,"[1515792600]":1.01168547,"[1515793500]":0.59634883,"[1515794400]":0.49930864,"[1515795300]":2.6046295,"[1515796200]":1.39880032,"[1515797100]":1.19248467,"[1515798000]":1.11654235,"[1515798900]":2.65100014,"[1515799800]":2.70911826,"[1515800700]":3.07943378,"[1515801600]":4.84846288,"[1515802500]":3.64181185,"[1515803400]":2.44392789,"[1515804300]":3.52603824,"[1515805200]":5.00407263,"[1515806100]":3.33501442,"[1515807000]":4.40915647,"[1515807900]":5.28163861,"[1515808800]":4.25987404,"[1515809700]":3.82814806,"[1515810600]":2.47092289,"[1515811500]":5.86008019,"[1515812400]":8.18961682,"[1515813300]":5.04468643,"[1515814200]":3.35704543,"[1515815100]":3.77912727,"[1515816000]":1.74371795,"[1515816900]":2.57663206,"[1515817800]":3.25909381,"[1515818700]":9.7197842,"[1515819600]":9.45509902,"[1515820500]":10.68393874,"[1515821400]":4.83442837,"[1515822300]":8.77938396,"[1515823200]":5.94000468,"[1515824100]":2.75563907,"[1515825000]":1.16682015,"[1515825900]":4.60230257,"[1515826800]":4.67769742,"[1515827700]":9.97507559,"[1515828600]":2.64931819,"[1515829500]":5.63804911,"[1515830400]":6.62497765,"[1515831300]":6.93017398,"[1515832200]":4.95834009,"[1515833100]":4.18352416,"[1515834000]":3.08852927,"[1515834900]":6.08886725,"[1515835800]":4.91400199,"[1515836700]":2.39072929,"[1515837600]":3.30692288,"[1515838500]":5.1194549,"[1515839400]":7.12562485,"[1515840300]":6.80744167,"[1515841200]":3.69386777,"[1515842100]":3.61578589,"[1515843000]":27.46612093,"[1515843900]":13.2419068,"[1515844800]":15.65245892,"[1515845700]":23.97380127,"[1515846600]":12.82278306,"[1515847500]":14.71693817,"[1515848400]":26.10342251,"[1515849300]":11.49329338,"[1515850200]":17.1839909,"[1515851100]":8.91872201,"[1515852000]":6.8347493,"[1515852900]":6.29026124,"[1515853800]":11.27168333,"[1515854700]":6.47678122,"[1515855600]":15.81784454,"[1515856500]":16.05175843,"[1515857400]":7.45286361,"[1515858300]":5.5934456,"[1515859200]":6.06326487,"[1515860100]":8.27184458,"[1515861000]":4.61256967,"[1515861900]":12.88034676,"[1515862800]":10.08040057,"[1515863700]":6.95955243,"[1515864600]":2.08652899,"[1515865500]":1.80682954,"[1515866400]":4.22864761,"[1515867300]":4.63499051,"[1515868200]":3.58055912,"[1515869100]":4.62638725,"[1515870000]":4.28801873,"[1515870900]":3.96208328,"[1515871800]":3.74694731,"[1515872700]":0.60548937,"[1515873600]":10.42017001,"[1515874500]":0.87207087,"[1515875400]":1.51435124,"[1515876300]":0.5579863,"[1515877200]":1.61451492,"[1515878100]":0.54048956,"[1515879000]":1.63304651,"[1515879900]":0.73361977,"[1515880800]":1.71992081,"[1515881700]":3.14467541,"[1515882600]":1.15069077,"[1515883500]":2.33692633,"[1515884400]":2.15701974,"[1515885300]":8.13664146,"[1515886200]":10.4916689,"[1515887100]":4.38827833,"[1515888000]":5.93471868,"[1515888900]":6.48252742,"[1515889800]":6.66317784,"[1515890700]":5.9138938,"[1515891600]":3.2798387,"[1515892500]":5.22187278,"[1515893400]":3.05465555,"[1515894300]":2.90543248,"[1515895200]":2.95348293,"[1515896100]":1.98052234,"[1515897000]":5.44383956,"[1515897900]":2.74507712,"[1515898800]":4.99573312,"[1515899700]":4.61510618,"[1515900600]":9.75729465,"[1515901500]":10.69020638,"[1515902400]":16.32404045,"[1515903300]":18.30394149,"[1515904200]":20.29005338,"[1515905100]":20.22632394,"[1515906000]":35.97399593,"[1515906900]":35.67326117,"[1515907800]":22.83115317,"[1515908700]":7.21190949,"[1515909600]":10.60539899,"[1515910500]":15.8734081,"[1515911400]":11.98877284,"[1515912300]":6.79671547,"[1515913200]":10.00219668,"[1515914100]":14.84003357,"[1515915000]":6.87946051,"[1515915900]":8.23832097,"[1515916800]":6.08203131,"[1515917700]":5.09030293,"[1515918600]":4.44091431,"[1515919500]":4.78817248,"[1515920400]":2.42135907,"[1515921300]":5.6963204,"[1515922200]":5.23710852,"[1515923100]":23.25099793,"[1515924000]":32.46129394,"[1515924900]":10.47363229,"[1515925800]":13.06100392,"[1515926700]":25.93639461,"[1515927600]":33.74659927,"[1515928500]":21.36617759,"[1515929400]":16.12783337,"[1515930300]":13.57853123,"[1515931200]":32.84960677,"[1515932100]":10.61296584,"[1515933000]":11.36752524,"[1515933900]":6.78950321,"[1515934800]":5.60519376,"[1515935700]":8.05533679,"[1515936600]":19.25846102,"[1515937500]":37.44436032,"[1515938400]":16.86123462,"[1515939300]":5.46872329,"[1515940200]":19.94652351,"[1515941100]":7.49744703,"[1515942000]":9.97108403,"[1515942900]":15.74152339,"[1515943800]":17.93066676,"[1515944700]":4.90759826,"[1515945600]":4.91905024,"[1515946500]":3.59042749,"[1515947400]":3.59127462,"[1515948300]":7.39153012,"[1515949200]":2.47342966,"[1515950100]":5.175166,"[1515951000]":3.32083607,"[1515951900]":1.9645159,"[1515952800]":2.30681541,"[1515953700]":12.41877044,"[1515954600]":8.06698476,"[1515955500]":1.11187791,"[1515956400]":1.50061707,"[1515957300]":0.50273452,"[1515958200]":0.48753644,"[1515959100]":0.5369423,"[1515960000]":0.39228557,"[1515960900]":0.13769105,"[1515961800]":0.40516111,"[1515962700]":1.1143108,"[1515963600]":0.52907819,"[1515964500]":0.51545464,"[1515965400]":0.98777561,"[1515966300]":2.46057515,"[1515967200]":0.7123256,"[1515968100]":2.21623785,"[1515969000]":0.61390475,"[1515969900]":3.58390859,"[1515970800]":3.85396987,"[1515971700]":4.15621026,"[1515972600]":5.13507694,"[1515973500]":3.40954514,"[1515974400]":3.69158735,"[1515975300]":3.49390217,"[1515976200]":4.38398445,"[1515977100]":3.12458811,"[1515978000]":4.13166823,"[1515978900]":6.64581755,"[1515979800]":3.46310572,"[1515980700]":7.53424724,"[1515981600]":7.75741645,"[1515982500]":4.18337634,"[1515983400]":4.38429834,"[1515984300]":5.62509211,"[1515985200]":9.32095914,"[1515986100]":18.9420168,"[1515987000]":20.02929141,"[1515987900]":13.90012671,"[1515988800]":9.01745346,"[1515989700]":3.31623389,"[1515990600]":5.37945255,"[1515991500]":21.40607805,"[1515992400]":13.50688937,"[1515993300]":8.84228199,"[1515994200]":13.84342738,"[1515995100]":18.17722409,"[1515996000]":20.65791535,"[1515996900]":17.47546415,"[1515997800]":9.95833881,"[1515998700]":7.90060338,"[1515999600]":7.2474753,"[1516000500]":5.20978216,"[1516001400]":5.46995488,"[1516002300]":4.15426132,"[1516003200]":8.52604424,"[1516004100]":17.90752452,"[1516005000]":8.61546118,"[1516005900]":7.98512542,"[1516006800]":7.26143444,"[1516007700]":13.44709164,"[1516008600]":9.59575551,"[1516009500]":9.62429781,"[1516010400]":5.87094211,"[1516011300]":6.7926037,"[1516012200]":4.85417248,"[1516013100]":2.46094972,"[1516014000]":4.27588486,"[1516014900]":4.42927654,"[1516015800]":13.81043006,"[1516016700]":7.72086104,"[1516017600]":4.95155756,"[1516018500]":16.19299076,"[1516019400]":15.75193135,"[1516020300]":16.93740735,"[1516021200]":10.71216577,"[1516022100]":5.1916967,"[1516023000]":9.64818939,"[1516023900]":2.5240264,"[1516024800]":8.98630216,"[1516025700]":14.59083579,"[1516026600]":5.33013613,"[1516027500]":5.06309283,"[1516028400]":11.24961919,"[1516029300]":4.53629514,"[1516030200]":4.27585319,"[1516031100]":3.24125831,"[1516032000]":1.1197595,"[1516032900]":1.65030021,"[1516033800]":4.09737719,"[1516034700]":7.41749758,"[1516035600]":2.33002562,"[1516036500]":2.79983246,"[1516037400]":2.32423275,"[1516038300]":2.79461435,"[1516039200]":2.9537831,"[1516040100]":0.84662426,"[1516041000]":2.19055662,"[1516041900]":0.46114926,"[1516042800]":2.05101479,"[1516043700]":2.06522912,"[1516044600]":10.83113207}}'
price = pandas.read_json(price_dec_1_2_2017_json)
price.index = [idx.replace('[', '').replace(']', '') for idx in price.index]
return price
def test_constructor_accept_correct_data_size(sample_data):
test_short = [20, 25, 30, 35]
test_long = [45, 50, 60, 75]
test_hold = [0, 10, 20, 30]
for short_p, long_p, hold in zip(test_short, test_long, test_hold):
size = (long_p + hold) * 3
indicator = EMACrossoverIndicator(sample_data.tail(size), short_p, long_p, confirm_period=hold)
assert indicator.size == size
def test_constructor_reject_incorrect_data_size(sample_data):
test_short = [20, 25, 30, 35]
test_long = [45, 50, 60, 75]
test_hold = [0, 10, 20, 30]
wrong_size = [20, 50, 90, 110]
for short_p, long_p, hold, size in zip(test_short, test_long, test_hold, wrong_size):
with pytest.raises(RuntimeError) as excinfo:
EMACrossoverIndicator(sample_data.tail(size), short_p, long_p, confirm_period=hold)
assert 'Inconsistent data size with configuration' in str(excinfo)
assert str(size) in str(excinfo)
def test_detect_sell_signal(sample_data):
indicator = EMACrossoverIndicator(sample_data.head(210), 35, 50, confirm_period=20)
assert indicator.is_sell_signal()
def test_detect_buy_signal(sample_data):
indicator = EMACrossoverIndicator(sample_data.tail(210), 35, 50, confirm_period=20)
assert indicator.is_buy_signal()
# def test_not_getting_false_buy_signal(sample_data):
# indicator = EMACrossoverIndicator(sample_data.head(85).tail(70), 35, 50, confirm_period=20)
# assert not indicator.is_buy_signal()
| 1,509.465116 | 63,140 | 0.753077 | 5,768 | 64,907 | 8.460992 | 0.371879 | 0.002254 | 0.003176 | 0.000902 | 0.049669 | 0.027765 | 0.025777 | 0.012253 | 0.007295 | 0.005696 | 0 | 0.737686 | 0.004699 | 64,907 | 42 | 63,141 | 1,545.404762 | 0.017755 | 0.002896 | 0 | 0.181818 | 0 | 0.030303 | 0.975833 | 0.975168 | 0 | 0 | 0 | 0 | 0.151515 | 1 | 0.151515 | false | 0 | 0.090909 | 0 | 0.272727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
4e5f47c56a4e552d983cb34cc344cc0c80fc409d | 122 | py | Python | python programs/bitwiseoperator.py | saddam-gif/Python-crushcourse | 63e1e1ff1eeb9a5d34bb0354cc86566c4de60260 | [
"MIT"
] | null | null | null | python programs/bitwiseoperator.py | saddam-gif/Python-crushcourse | 63e1e1ff1eeb9a5d34bb0354cc86566c4de60260 | [
"MIT"
] | null | null | null | python programs/bitwiseoperator.py | saddam-gif/Python-crushcourse | 63e1e1ff1eeb9a5d34bb0354cc86566c4de60260 | [
"MIT"
] | null | null | null | print(12 & 13) #and
print(12 | 13) #or
print(12 ^ 13) #odd number of 1 hole 1(xor)
print(10 << 2) #leftshift
print(10>>2) | 24.4 | 44 | 0.631148 | 25 | 122 | 3.08 | 0.56 | 0.272727 | 0.350649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0.180328 | 122 | 5 | 45 | 24.4 | 0.57 | 0.336066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 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 | 1 | 0 | 6 |
4ebabe348b38f65c51cdb8547db1c82e7146ff7c | 119 | py | Python | display/__init__.py | selym3/qtbooth | 9cbdfe724bfd314dada7e8b6d6f2763ee508455a | [
"MIT"
] | null | null | null | display/__init__.py | selym3/qtbooth | 9cbdfe724bfd314dada7e8b6d6f2763ee508455a | [
"MIT"
] | null | null | null | display/__init__.py | selym3/qtbooth | 9cbdfe724bfd314dada7e8b6d6f2763ee508455a | [
"MIT"
] | null | null | null | """
these probably need to be organized
"""
from .display_thread import DisplayThread
from .display import ImageDisplay | 23.8 | 41 | 0.806723 | 15 | 119 | 6.333333 | 0.8 | 0.231579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12605 | 119 | 5 | 42 | 23.8 | 0.913462 | 0.294118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 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 | 6 |
4ebca612cab6794e4a198fb47747576cd04d3369 | 181 | py | Python | week5/test_funcMaximo.py | jotavev/usp-computer-science-python | 82aaa410f245e339c25e4a2b1a61e410259d0f8c | [
"MIT"
] | 1 | 2020-06-10T03:39:07.000Z | 2020-06-10T03:39:07.000Z | week5/test_funcMaximo.py | jotavev/usp-computer-science-python | 82aaa410f245e339c25e4a2b1a61e410259d0f8c | [
"MIT"
] | null | null | null | week5/test_funcMaximo.py | jotavev/usp-computer-science-python | 82aaa410f245e339c25e4a2b1a61e410259d0f8c | [
"MIT"
] | null | null | null | from funcMaximo import maximo
def teste_0_1():
assert maximo(0, 1) == 1
def test_10_0():
assert maximo(10, 0) == 10
def test_negative():
assert maximo(-10, 10) == 10
| 16.454545 | 32 | 0.640884 | 30 | 181 | 3.7 | 0.4 | 0.324324 | 0.252252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134752 | 0.220994 | 181 | 10 | 33 | 18.1 | 0.652482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.428571 | 1 | 0.428571 | true | 0 | 0.142857 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
4ed2b22e8b87dc385754c0c7e2f40750677926bf | 22 | py | Python | rafa/__init__.py | mjirv/jules-demo | ee43fbcc762f7b8f6d17e0e4b6649a414bcf44ca | [
"Apache-2.0"
] | 1 | 2022-03-08T20:44:09.000Z | 2022-03-08T20:44:09.000Z | rafa/__init__.py | mjirv/jules-demo | ee43fbcc762f7b8f6d17e0e4b6649a414bcf44ca | [
"Apache-2.0"
] | 15 | 2022-02-17T02:48:39.000Z | 2022-03-12T03:00:04.000Z | rafa/__init__.py | mjirv/rafa | ee43fbcc762f7b8f6d17e0e4b6649a414bcf44ca | [
"Apache-2.0"
] | null | null | null | from .Rafa import Rafa | 22 | 22 | 0.818182 | 4 | 22 | 4.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.947368 | 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 | 1 | 0 | 0 | 6 |
092b392f7089165803e287e4c34019f72a95d951 | 35 | py | Python | zgulde/gitlog/__init__.py | zgulde/zgulde-python | 0dd89962b4ca2141ebe4335ef0200b0595d06d4d | [
"MIT"
] | 10 | 2019-04-22T00:10:58.000Z | 2021-05-16T01:00:16.000Z | zgulde/gitlog/__init__.py | zgulde/zgulde-python | 0dd89962b4ca2141ebe4335ef0200b0595d06d4d | [
"MIT"
] | null | null | null | zgulde/gitlog/__init__.py | zgulde/zgulde-python | 0dd89962b4ca2141ebe4335ef0200b0595d06d4d | [
"MIT"
] | null | null | null | from zgulde.gitlog.gitlog import *
| 17.5 | 34 | 0.8 | 5 | 35 | 5.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114286 | 35 | 1 | 35 | 35 | 0.903226 | 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 | 1 | 0 | 0 | 6 |
094502d4d9eb684c83a6f54003b4094b2644f9fb | 2,107 | py | Python | 6/solution.py | studiosi/AoC2015 | 371c0ca7a48cb1e53c487f35bc3b3533cc9d8a7e | [
"MIT",
"Unlicense"
] | null | null | null | 6/solution.py | studiosi/AoC2015 | 371c0ca7a48cb1e53c487f35bc3b3533cc9d8a7e | [
"MIT",
"Unlicense"
] | null | null | null | 6/solution.py | studiosi/AoC2015 | 371c0ca7a48cb1e53c487f35bc3b3533cc9d8a7e | [
"MIT",
"Unlicense"
] | null | null | null |
inp = open('input.txt').readlines()
SIZE = 1000
def turn_on(lights, x1, y1, x2, y2):
for x in range(x1, x2 + 1):
for y in range(y1, y2 + 1):
lights[x][y] = 1
def turn_off(lights, x1, y1, x2, y2):
for x in range(x1, x2 + 1):
for y in range(y1, y2 + 1):
lights[x][y] = 0
def toggle(lights, x1, y1, x2, y2):
for x in range(x1, x2 + 1):
for y in range(y1, y2 + 1):
if lights[x][y] == 1:
lights[x][y] = 0
elif lights[x][y] == 0:
lights[x][y] = 1
def count(lights):
i = 0
for x in range(SIZE):
for y in range(SIZE):
i += lights[x][y]
return i
def turn_on_2(lights, x1, y1, x2, y2):
for x in range(x1, x2 + 1):
for y in range(y1, y2 + 1):
lights[x][y] += 1
def turn_off_2(lights, x1, y1, x2, y2):
for x in range(x1, x2 + 1):
for y in range(y1, y2 + 1):
lights[x][y] -= 1
if lights[x][y] < 0:
lights[x][y] = 0
def toggle_2(lights, x1, y1, x2, y2):
for x in range(x1, x2 + 1):
for y in range(y1, y2 + 1):
lights[x][y] += 2
# Part 1
lights = [[0 for x in range(SIZE)] for y in range(SIZE)]
for instr in inp:
x = instr.split()
if instr.startswith('turn on'):
p1, p2 = x[2].split(','), x[4].split(',')
turn_on(lights, int(p1[0]), int(p1[1]), int(p2[0]), int(p2[1]))
elif instr.startswith('turn off'):
p1, p2 = x[2].split(','), x[4].split(',')
turn_off(lights, int(p1[0]), int(p1[1]), int(p2[0]), int(p2[1]))
elif instr.startswith('toggle'):
p1, p2 = x[1].split(','), x[3].split(',')
toggle(lights, int(p1[0]), int(p1[1]), int(p2[0]), int(p2[1]))
print(count(lights))
# Part 2
lights = [[0 for x in range(SIZE)] for y in range(SIZE)]
for instr in inp:
x = instr.split()
if instr.startswith('turn on'):
p1, p2 = x[2].split(','), x[4].split(',')
turn_on_2(lights, int(p1[0]), int(p1[1]), int(p2[0]), int(p2[1]))
elif instr.startswith('turn off'):
p1, p2 = x[2].split(','), x[4].split(',')
turn_off_2(lights, int(p1[0]), int(p1[1]), int(p2[0]), int(p2[1]))
elif instr.startswith('toggle'):
p1, p2 = x[1].split(','), x[3].split(',')
toggle_2(lights, int(p1[0]), int(p1[1]), int(p2[0]), int(p2[1]))
print(count(lights)) | 27.363636 | 68 | 0.565259 | 423 | 2,107 | 2.782506 | 0.094563 | 0.107052 | 0.081563 | 0.084112 | 0.920986 | 0.898896 | 0.881903 | 0.853016 | 0.853016 | 0.853016 | 0 | 0.092832 | 0.192216 | 2,107 | 77 | 69 | 27.363636 | 0.598707 | 0.00617 | 0 | 0.587302 | 0 | 0 | 0.030129 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0 | 0 | 0.126984 | 0.031746 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
118e198a7bdd4d0254e887f045608f9bbf440dd3 | 71 | py | Python | privatekube/privatekube/experiments/__init__.py | DelphianCalamity/PrivateKube | 14f575e77021ab7baca30f4061140ec83bdc96a7 | [
"Apache-2.0"
] | 9 | 2021-06-16T00:22:45.000Z | 2021-11-25T07:19:11.000Z | privatekube/privatekube/experiments/__init__.py | DelphianCalamity/PrivateKube | 14f575e77021ab7baca30f4061140ec83bdc96a7 | [
"Apache-2.0"
] | 2 | 2021-11-14T10:42:43.000Z | 2022-03-16T03:43:22.000Z | privatekube/privatekube/experiments/__init__.py | DelphianCalamity/PrivateKube | 14f575e77021ab7baca30f4061140ec83bdc96a7 | [
"Apache-2.0"
] | 3 | 2021-04-08T08:08:48.000Z | 2021-12-24T01:42:20.000Z | import privatekube.experiments.utils, privatekube.experiments.datasets
| 35.5 | 70 | 0.887324 | 7 | 71 | 9 | 0.714286 | 0.698413 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042254 | 71 | 1 | 71 | 71 | 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 | 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 | 6 |
11a711f6c5eb4ed38770259c754644ce0955ed34 | 26 | py | Python | pyvision/face_detection/facenet/__init__.py | indiradutta/PyVision | cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf | [
"BSD-3-Clause"
] | 31 | 2020-05-03T07:03:01.000Z | 2022-01-29T15:29:22.000Z | pyvision/face_detection/facenet/__init__.py | indiradutta/PyVision | cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf | [
"BSD-3-Clause"
] | 13 | 2020-05-25T14:23:46.000Z | 2021-08-04T10:38:02.000Z | pyvision/face_detection/facenet/__init__.py | indiradutta/PyVision | cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf | [
"BSD-3-Clause"
] | 12 | 2020-05-24T22:26:59.000Z | 2021-08-03T18:30:51.000Z | from .model import Facenet | 26 | 26 | 0.846154 | 4 | 26 | 5.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 26 | 1 | 26 | 26 | 0.956522 | 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 | 1 | 0 | 0 | 6 |
11e83e0ec337050c86e95e1842f54192237c8531 | 38 | py | Python | czsc/data/__init__.py | mylovage/czsc | 21c68c8451e951fd8f3c242c4c4f52dac5cb6283 | [
"MIT"
] | 1 | 2021-09-25T15:19:32.000Z | 2021-09-25T15:19:32.000Z | czsc/data/__init__.py | mylovage/czsc | 21c68c8451e951fd8f3c242c4c4f52dac5cb6283 | [
"MIT"
] | 1 | 2021-09-25T02:32:39.000Z | 2021-09-25T02:32:39.000Z | czsc/data/__init__.py | mylovage/czsc | 21c68c8451e951fd8f3c242c4c4f52dac5cb6283 | [
"MIT"
] | 1 | 2021-03-23T08:03:58.000Z | 2021-03-23T08:03:58.000Z |
from .base import freq_map, freq_inv
| 12.666667 | 36 | 0.789474 | 7 | 38 | 4 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 38 | 2 | 37 | 19 | 0.875 | 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 | 1 | 0 | 0 | 6 |
11e99ad47ae7dd945fbe347733dbca54d3801041 | 188 | py | Python | things/snippets/__init__.py | jmoswalt/django-things | e9889490efa4da3ff7abb6fa192bb66596d5a240 | [
"Apache-2.0"
] | 2 | 2017-05-17T16:40:52.000Z | 2019-10-27T02:52:17.000Z | things/snippets/__init__.py | jmoswalt/django-things | e9889490efa4da3ff7abb6fa192bb66596d5a240 | [
"Apache-2.0"
] | 7 | 2020-02-11T21:18:40.000Z | 2022-03-11T23:11:29.000Z | things/snippets/__init__.py | jmoswalt/django-things | e9889490efa4da3ff7abb6fa192bb66596d5a240 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from things.settings import THINGS_ROOT
from .utils import load_theme_snippets
load_theme_snippets(settings.THEME_PATH)
load_theme_snippets(THINGS_ROOT)
| 23.5 | 40 | 0.87234 | 28 | 188 | 5.535714 | 0.428571 | 0.174194 | 0.329032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085106 | 188 | 7 | 41 | 26.857143 | 0.901163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 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 | 1 | 0 | 0 | 6 |
11ee12dc2662345f0bbf20e98eef79e97751208e | 117 | py | Python | catkin_ws/src/spring2016/atacchet/virtual_mirror_atacchet/include/virtual_mirror_atacchet/util.py | DiegoOrtegoP/Software | 4a07dd2dab29db910ca2e26848fa6b53b7ab00cd | [
"CC-BY-2.0"
] | 12 | 2016-04-14T12:21:46.000Z | 2021-06-18T07:51:40.000Z | catkin_ws/src/spring2016/atacchet/virtual_mirror_atacchet/include/virtual_mirror_atacchet/util.py | DiegoOrtegoP/Software | 4a07dd2dab29db910ca2e26848fa6b53b7ab00cd | [
"CC-BY-2.0"
] | 14 | 2017-03-03T23:33:05.000Z | 2018-04-03T18:07:53.000Z | catkin_ws/src/spring2016/atacchet/virtual_mirror_atacchet/include/virtual_mirror_atacchet/util.py | DiegoOrtegoP/Software | 4a07dd2dab29db910ca2e26848fa6b53b7ab00cd | [
"CC-BY-2.0"
] | 113 | 2016-05-03T06:11:42.000Z | 2019-06-01T14:37:38.000Z | import random
def getName():
return "Andrea Tacchetti"
def getStatus():
return random.choice(["happy", "awesome"])
| 19.5 | 43 | 0.726496 | 14 | 117 | 6.071429 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119658 | 117 | 5 | 44 | 23.4 | 0.825243 | 0 | 0 | 0 | 0 | 0 | 0.239316 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | true | 0 | 0.2 | 0.4 | 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 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
11f09079e151e17a963c75d42d4a85b5f403abe7 | 35 | py | Python | dags/property/__init__.py | jsmithdataanalytics/house_price_tracker | a4795db21c25c014f45ff6742c5bb30ad26ded75 | [
"MIT"
] | 1 | 2020-04-23T00:48:52.000Z | 2020-04-23T00:48:52.000Z | dags/property/__init__.py | jsmithdataanalytics/house_price_tracker | a4795db21c25c014f45ff6742c5bb30ad26ded75 | [
"MIT"
] | null | null | null | dags/property/__init__.py | jsmithdataanalytics/house_price_tracker | a4795db21c25c014f45ff6742c5bb30ad26ded75 | [
"MIT"
] | null | null | null | from .lister import PropertyLister
| 17.5 | 34 | 0.857143 | 4 | 35 | 7.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114286 | 35 | 1 | 35 | 35 | 0.967742 | 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 | 1 | 0 | 0 | 6 |
eeb44e3714eff75028e15214e0e65bf2afebd86c | 42 | py | Python | timm/data/parsers/__init__.py | xuritian317/pytorch-image-models | 034139e4871cddd0f6c24931b6ac380ba9f28711 | [
"Apache-2.0"
] | 17,769 | 2019-05-02T08:08:25.000Z | 2022-03-31T22:14:44.000Z | timm/data/parsers/__init__.py | xuritian317/pytorch-image-models | 034139e4871cddd0f6c24931b6ac380ba9f28711 | [
"Apache-2.0"
] | 556 | 2019-05-26T16:31:37.000Z | 2022-03-30T04:21:07.000Z | timm/data/parsers/__init__.py | xuritian317/pytorch-image-models | 034139e4871cddd0f6c24931b6ac380ba9f28711 | [
"Apache-2.0"
] | 3,029 | 2019-05-14T01:18:28.000Z | 2022-03-31T20:09:50.000Z | from .parser_factory import create_parser
| 21 | 41 | 0.880952 | 6 | 42 | 5.833333 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095238 | 42 | 1 | 42 | 42 | 0.921053 | 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 | 1 | 0 | 0 | 6 |
eebdc3e5fd091ccec8d4151decf5bf0a0d1aa818 | 109 | py | Python | jupyter/ipython-sql-startup.py | joe-taylor/postgres-jupyter-environment | 7896e6e6379522c57be32f4d365f683112789626 | [
"MIT"
] | null | null | null | jupyter/ipython-sql-startup.py | joe-taylor/postgres-jupyter-environment | 7896e6e6379522c57be32f4d365f683112789626 | [
"MIT"
] | null | null | null | jupyter/ipython-sql-startup.py | joe-taylor/postgres-jupyter-environment | 7896e6e6379522c57be32f4d365f683112789626 | [
"MIT"
] | null | null | null | get_ipython().magic(u"%load_ext sql")
get_ipython().magic(u"%sql postgresql://postgres:notsosecret@postgres") | 54.5 | 71 | 0.779817 | 16 | 109 | 5.125 | 0.625 | 0.243902 | 0.365854 | 0.390244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027523 | 109 | 2 | 71 | 54.5 | 0.773585 | 0 | 0 | 0 | 0 | 0 | 0.545455 | 0.381818 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e1083ffba5becfa59e9880eb78d053e3c0ec36bd | 87 | py | Python | eda_report/__main__.py | Tim-Abwao/eda-report | f1a884dfc62f13d433c06015173616fa7a30ba31 | [
"MIT"
] | null | null | null | eda_report/__main__.py | Tim-Abwao/eda-report | f1a884dfc62f13d433c06015173616fa7a30ba31 | [
"MIT"
] | 5 | 2021-09-08T02:54:27.000Z | 2022-01-22T07:08:06.000Z | eda_report/__main__.py | Tim-Abwao/eda-report | f1a884dfc62f13d433c06015173616fa7a30ba31 | [
"MIT"
] | 1 | 2021-06-17T13:33:13.000Z | 2021-06-17T13:33:13.000Z | from eda_report.cli import run_from_cli
if __name__ == "__main__":
run_from_cli()
| 17.4 | 39 | 0.747126 | 14 | 87 | 3.714286 | 0.642857 | 0.269231 | 0.384615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16092 | 87 | 4 | 40 | 21.75 | 0.712329 | 0 | 0 | 0 | 0 | 0 | 0.091954 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 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 | 1 | 0 | 0 | 0 | 0 | 6 |
0138d8789c6eac33447db2db16dcad7014616fc5 | 264 | py | Python | lib/operators/Operator.py | bjelicaluka/custom-deep-learning-lib | 797e4b6bc7f3fdb031fcec69ef61bdebf2d00f03 | [
"MIT"
] | 6 | 2020-03-04T09:23:05.000Z | 2020-03-31T10:26:26.000Z | lib/operators/Operator.py | bjelicaluka/EduNN | 797e4b6bc7f3fdb031fcec69ef61bdebf2d00f03 | [
"MIT"
] | null | null | null | lib/operators/Operator.py | bjelicaluka/EduNN | 797e4b6bc7f3fdb031fcec69ef61bdebf2d00f03 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class Operator(ABC):
@abstractmethod
def __init__(self):
pass
@staticmethod
@abstractmethod
def function(x):
pass
@staticmethod
@abstractmethod
def derivative(x):
pass
| 14.666667 | 35 | 0.625 | 25 | 264 | 6.44 | 0.56 | 0.31677 | 0.372671 | 0.409938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.306818 | 264 | 17 | 36 | 15.529412 | 0.879781 | 0 | 0 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0.230769 | 0.076923 | 0 | 0.384615 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
014c1684f4b28988db287ae5a22f6d957900aff5 | 32 | py | Python | run_app.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | 5 | 2018-03-19T19:04:53.000Z | 2021-02-19T16:44:04.000Z | run_app.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | 6 | 2020-04-18T16:14:22.000Z | 2021-08-14T09:23:16.000Z | run_app.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | 1 | 2021-01-10T18:47:38.000Z | 2021-01-10T18:47:38.000Z | import app.main
app.main.main() | 16 | 16 | 0.75 | 6 | 32 | 4 | 0.5 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.09375 | 32 | 2 | 17 | 16 | 0.827586 | 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 | 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 | 6 |
016c6508f4bea3d6f4ad8522e1ca18235b76e40f | 283 | py | Python | days/day_12/day_12_part_2.py | sharkbound/adventofcode2021 | b4f4721ffad91e4df73a831d5322d17ede06f9b3 | [
"MIT"
] | null | null | null | days/day_12/day_12_part_2.py | sharkbound/adventofcode2021 | b4f4721ffad91e4df73a831d5322d17ede06f9b3 | [
"MIT"
] | null | null | null | days/day_12/day_12_part_2.py | sharkbound/adventofcode2021 | b4f4721ffad91e4df73a831d5322d17ede06f9b3 | [
"MIT"
] | null | null | null |
from day import Day
import re
import numpy as np
import utils
class Day12Part2(Day):
day = 12
part = 2
def get_sample_input(self):
return ''
def parse_input(self):
return ''
def solve(self):
data = self.parse_input()
| 14.15 | 33 | 0.572438 | 37 | 283 | 4.27027 | 0.594595 | 0.113924 | 0.189873 | 0.227848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032609 | 0.349823 | 283 | 19 | 34 | 14.894737 | 0.826087 | 0 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.307692 | 0.153846 | 0.923077 | 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 | 1 | 1 | 1 | 0 | 0 | 6 |
6d767d677a422ff54acab6bce15088092558e3ac | 69 | py | Python | tests/files/first_spider.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 2,266 | 2015-01-01T08:47:33.000Z | 2022-03-21T05:02:55.000Z | tests/files/first_spider.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 221 | 2015-01-13T01:55:57.000Z | 2022-02-25T23:23:35.000Z | tests/files/first_spider.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 315 | 2015-01-23T06:38:55.000Z | 2022-03-27T08:33:33.000Z | from grab.spider import Spider
class FirstSpider(Spider):
pass
| 11.5 | 30 | 0.753623 | 9 | 69 | 5.777778 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.188406 | 69 | 5 | 31 | 13.8 | 0.928571 | 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 | 1 | 0 | 0 | 6 |
6d90d53c8401713b9b7fe7c46d3f328b1c43c9dc | 12,547 | py | Python | tests/test_blackjack.py | ahmedmrad/blackjack | fd218b09d6e3228b91a17cfccf44da466e0e8f58 | [
"MIT"
] | null | null | null | tests/test_blackjack.py | ahmedmrad/blackjack | fd218b09d6e3228b91a17cfccf44da466e0e8f58 | [
"MIT"
] | 6 | 2021-04-06T18:21:05.000Z | 2022-03-12T00:52:09.000Z | tests/test_blackjack.py | ahmedmrad/blackjack | fd218b09d6e3228b91a17cfccf44da466e0e8f58 | [
"MIT"
] | null | null | null | import unittest
from blackjack import Dealer, Game
from card import Card
class TestDealer(unittest.TestCase):
def setUp(self):
self.dealer = Dealer(cash_balance=100)
def tearDown(self):
del self.dealer
def test_dealer_match_bet_negative_value(self):
self.assertEqual(
self.dealer.match_bet(-50), 50,
'Match bet methods accepts negative value. Check if absolute value implemented or if try catch statement present.'
)
def test_dealer_match_bet_ten_dollar(self):
self.assertEqual(
self.dealer.match_bet(10), 10,
'Match bet is not matching bets correctly.'
)
def test_dealer_match_bet_bigger_than_cash_balance_value(self):
self.assertRaises(SystemExit, self.dealer.match_bet, 110)
def test_dealer_match_bet_bigger_than_cash_balance_in_absolute_value(self):
self.assertRaises(SystemExit, self.dealer.match_bet, -110)
def test_dealer_match_bet_cash_balance_negative_value(self):
self.dealer.match_bet(-10)
self.assertEqual(
self.dealer.cash_balance, 90,
'Cash balance not being substracted while allocating bets.'
)
def test_dealer_match_bet_cash_balance_positive_value(self):
self.dealer.match_bet(10)
self.assertEqual(
self.dealer.cash_balance, 90,
'Cash balance not being substracted while allocating bets.'
)
def test_dealer_match_bet_cash_balance_equivalent_value(self):
self.dealer.match_bet(100)
self.assertEqual(
self.dealer.cash_balance, 0,
'Match bet is not set to to accept bet equal to the cash balance. Check method implementation.'
)
def test_dealer_is_soft_17_true_card_values_less_than_seventeen_and_two_cards(
self
):
self.dealer.hand.add_card(
[Card('Spades', 'Jack'),
Card('Diamonds', 'Five')]
)
self.assertTrue(
self.dealer.is_soft_17(), 'Is soft 17 no detecting soft 17.'
)
def test_dealer_is_soft_17_true_card_values_less_than_seventeen_and_three_cards(
self
):
self.dealer.hand.add_card(
[
Card('Spades', 'Four'),
Card('Diamonds', 'Five'),
Card('Hearts', 'Two')
]
)
self.assertTrue(
self.dealer.is_soft_17(), 'Is soft 17 no detecting soft 17.'
)
def test_dealer_is_soft_17_false_card_values_less_than_seventeen_and_four_cards(
self
):
self.dealer.hand.add_card(
[
Card('Spades', 'Four'),
Card('Diamonds', 'Five'),
Card('Hearts', 'Two'),
Card('Clubs', 'Three')
]
)
self.assertFalse(
self.dealer.is_soft_17(), 'Is soft 17 no detecting soft 17.'
)
def test_dealer_is_soft_17_false_seventeen_exactly(self):
self.dealer.hand.add_card(
[Card('Spades', 'Jack'),
Card('Diamonds', 'Seven')]
)
self.assertFalse(
self.dealer.is_soft_17(), 'Is soft 17 no detecting soft 17.'
)
def test_dealer_is_soft_17_false_superior_to_seventeen(self):
self.dealer.hand.add_card(
[Card('Spades', 'Jack'),
Card('Diamonds', 'Queen')]
)
self.assertFalse(
self.dealer.is_soft_17(), 'Is soft 17 no detecting soft 17.'
)
def test_dealer_return_card_to_deck_multiple_cards(self):
self.dealer.hand.add_card(self.dealer.deck.deal_two_cards())
self.dealer.return_cards_to_deck(self.dealer.hand.hand)
self.assertEqual(
len(self.dealer.deck), 52, 'Return card to deck not working.'
)
def test_dealer_return_card_to_deck_one_card(self):
self.dealer.hand.add_card(self.dealer.deck.deal_one_card())
self.dealer.return_cards_to_deck(self.dealer.hand.hand)
self.assertEqual(
len(self.dealer.deck), 52, 'Return card to deck not working.'
)
def test_dealer_add_cash_to_balance_negative(self):
self.dealer.add_to_cash_balance(-10)
self.assertEqual(
self.dealer.cash_balance, 110,
'Add cash to balance not working properly.'
)
def test_dealer_add_cash_to_balance_positive(self):
self.dealer.add_to_cash_balance(10)
self.assertEqual(
self.dealer.cash_balance, 110,
'Add cash to balance not working properly.'
)
def test_dealer_add_cash_to_balance_zero(self):
self.dealer.add_to_cash_balance(0)
self.assertEqual(
self.dealer.cash_balance, 100,
'Add cash to balance not working properly.'
)
class TestGame(unittest.TestCase):
def setUp(self):
self.game = Game()
self.game_10_decks = Game(number_of_decks=10)
def tearDown(self):
del self.game
del self.game_10_decks
def test_game_blackjack_check_numbers_of_decks(self):
self.assertEqual(
len(self.game_10_decks.dealer.deck), 520,
'Number of decks is not correct.'
)
def test_game_blackjack_payout_dealer_bet_float(self):
self.assertEqual(
type(self.game.blackjack_payout(10.00)), int,
'Blackjack payout not returning int.'
)
def test_game_blackjack_payout_dealer_bet_int(self):
self.assertEqual(
type(self.game.blackjack_payout(10)), int,
'Blackjack payout not returning int.'
)
def test_game_blackjack_payout_dealer_bet_negative(self):
self.assertGreaterEqual(
self.game.blackjack_payout(-10), 15,
'Blackjack payout not returning positive 3:2 blackjack payout.'
)
def test_game_blackjack_payout_dealer_bet_zero(self):
self.assertEqual(
self.game.blackjack_payout(0), 0,
'Blackjack payout not returning zero whe zero inputed.'
)
def test_game_blackjack_payout_dealer_bet_positive(self):
self.assertGreaterEqual(
self.game.blackjack_payout(10), 15,
'Blackjack payout not returning 3:2 blackjack payout.'
)
def test_game_blackjack_result_blackjack_player_wins_dealer_hand_value_less_than_21(
self
):
self.game.player.hand.add_card(
[Card('Hearts', 'Ace'),
Card('Spades', 'King')]
)
self.game.dealer.hand.add_card(
[
Card('Hearts', 'Three'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.player.cash_balance, 125,
'Blackjack result is not working for player balckjack.'
)
def test_game_blackjack_result_blackjack_player_wins_dealer_hand_value_more_than_21(
self
):
self.game.player.hand.add_card(
[Card('Hearts', 'Ace'),
Card('Spades', 'King')]
)
self.game.dealer.hand.add_card(
[
Card('Hearts', 'Three'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.player.cash_balance, 125,
'Blackjack result is not working for player blackjack.'
)
def test_game_blackjack_result_player_bust_dealer_less_than_21(self):
self.game.player.hand.add_card(
[
Card('Hearts', 'Queen'),
Card('Spades', 'King'),
Card('Diamonds', 'Four')
]
)
self.game.dealer.hand.add_card(
[Card('Hearts', 'Two'),
Card('Spades', 'Queen')]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.dealer.cash_balance, 120,
'Blackjack result not working when player busts and dealer has low card values'
)
def test_game_blackjack_result_player_bust_dealer_more_than_21_equal_to_hand_player(
self
):
self.game.player.hand.add_card(
[
Card('Hearts', 'Two'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.dealer.hand.add_card(
[
Card('Hearts', 'Two'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.dealer.cash_balance, 120,
'Blackjack result not working when player busts and dealer has equal card values'
)
def test_game_blackjack_result_player_bust_dealer_more_than_21_superior_to_hand_player(
self
):
self.game.player.hand.add_card(
[
Card('Hearts', 'Two'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.dealer.hand.add_card(
[
Card('Hearts', 'Four'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.dealer.cash_balance, 120,
'Blackjack result not working when player busts and dealer has higher card values'
)
def test_game_blackjack_result_player_wins_dealer_bust_higher_than_21(
self
):
self.game.player.hand.add_card(
[Card('Hearts', 'King'),
Card('Spades', 'Eight')]
)
self.game.dealer.hand.add_card(
[
Card('Hearts', 'Four'),
Card('Spades', 'King'),
Card('Diamonds', 'Queen')
]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.player.cash_balance, 120,
'Blackjack result not working when player wins, dealer busts with card values superior to 21.'
)
def test_game_blackjack_result_player_wins_dealer_bust_21(self):
self.game.player.hand.add_card(
[Card('Hearts', 'King'),
Card('Spades', 'Eight')]
)
self.game.dealer.hand.add_card(
[Card('Hearts', 'Ace'),
Card('Spades', 'King')]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.player.cash_balance, 120,
'Blackjack result not working when player wins, dealer busts with card values equal to 21.'
)
def test_game_blackjack_result_dealer(self):
self.game.player.hand.add_card(
[Card('Hearts', 'King'),
Card('Spades', 'Eight')]
)
self.game.dealer.hand.add_card(
[Card('Hearts', 'King'),
Card('Spades', 'Nine')]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.dealer.cash_balance, 120,
'Blackjack result not working when dealer wins and player card values less than 21.'
)
def test_game_blackjack_result_tie_blackjack(self): # == > tie not working
self.game.player.hand.add_card(
[Card('Hearts', 'Ace'),
Card('Spades', 'King')]
)
self.game.dealer.hand.add_card(
[Card('Diamonds', 'Ten'),
Card('Clubs', 'Ace')]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.player.cash_balance, self.game.dealer.cash_balance,
'Blackjack result not working when dealer and player tie at 21.'
)
def test_game_blackjack_result_tie_less_than_blackjack(self):
self.game.player.hand.add_card(
[Card('Hearts', 'Seven'),
Card('Spades', 'King')]
)
self.game.dealer.hand.add_card(
[Card('Diamonds', 'Ten'),
Card('Clubs', 'Seven')]
)
self.game.blackjack_result(10, 10)
self.assertEqual(
self.game.player.cash_balance, self.game.dealer.cash_balance,
'Blackjack result not working when dealer and player tie at value less than 21.'
)
if __name__ == '__main__':
unittest.main()
| 33.018421 | 126 | 0.582131 | 1,451 | 12,547 | 4.773949 | 0.10062 | 0.060055 | 0.042876 | 0.054136 | 0.850296 | 0.833839 | 0.80511 | 0.74982 | 0.732496 | 0.689909 | 0 | 0.023959 | 0.314737 | 12,547 | 379 | 127 | 33.105541 | 0.781693 | 0.001594 | 0 | 0.488095 | 0 | 0 | 0.189222 | 0 | 0 | 0 | 0 | 0 | 0.098214 | 1 | 0.110119 | false | 0 | 0.008929 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
6dac4b95e8171a260a6ebeed574dbe540eb53178 | 48 | py | Python | gamepy/control/__init__.py | jasonrobwebster/gamepy | 11e62695142b6c7a10c63be0b30467e52fe89085 | [
"MIT"
] | 2 | 2019-02-07T11:10:28.000Z | 2019-06-12T12:42:22.000Z | gamepy/control/__init__.py | jasonrobwebster/gamepy | 11e62695142b6c7a10c63be0b30467e52fe89085 | [
"MIT"
] | null | null | null | gamepy/control/__init__.py | jasonrobwebster/gamepy | 11e62695142b6c7a10c63be0b30467e52fe89085 | [
"MIT"
] | null | null | null | """Init Control"""
from .keycontroller import * | 16 | 28 | 0.708333 | 5 | 48 | 6.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 48 | 3 | 28 | 16 | 0.809524 | 0.25 | 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 | 1 | 0 | 0 | 6 |
6db8a5c76d813846e0c01e42e3d96bd9cecf533b | 9,842 | py | Python | benchmarks/benchmark.py | edoddridge/aronnax | 7c33836fe8d6c8ea4283f2357325d12ff655bc10 | [
"MIT"
] | 17 | 2017-05-03T17:21:16.000Z | 2022-02-17T21:01:06.000Z | benchmarks/benchmark.py | edoddridge/aronnax | 7c33836fe8d6c8ea4283f2357325d12ff655bc10 | [
"MIT"
] | 172 | 2017-03-26T16:00:03.000Z | 2021-08-18T23:34:08.000Z | benchmarks/benchmark.py | edoddridge/aronnax | 7c33836fe8d6c8ea4283f2357325d12ff655bc10 | [
"MIT"
] | 6 | 2017-08-19T12:41:16.000Z | 2021-11-18T08:32:48.000Z | import pickle as pkl
import os.path as p
import sys
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from aronnax.utils import working_directory
import aronnax.driver as aro
self_path = p.dirname(p.abspath(__file__))
root_path = p.dirname(self_path)
n_time_steps = 502.0
scale_factor = 1000 / n_time_steps # Show times in ms
def benchmark_gaussian_bump_red_grav_save(grid_points):
run_time_O1 = np.zeros(len(grid_points))
run_time_Ofast = np.zeros(len(grid_points))
def bump(X, Y):
return 500. + 20*np.exp(-((6e5-X)**2 + (5e5-Y)**2)/(2*1e5**2))
with working_directory(p.join(self_path, "beta_plane_bump_red_grav")):
aro_exec = "aronnax_test"
for counter, nx in enumerate(grid_points):
run_time_O1[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump], nx=nx, ny=nx)
aro_exec = "aronnax_core"
for counter, nx in enumerate(grid_points):
run_time_Ofast[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump], nx=nx, ny=nx)
with open("times.pkl", "wb") as f:
pkl.dump((grid_points, run_time_O1, run_time_Ofast), f)
def benchmark_gaussian_bump_red_grav_plot():
with working_directory(p.join(self_path, "beta_plane_bump_red_grav")):
with open("times.pkl", "rb") as f:
(grid_points, run_time_O1, run_time_Ofast) = pkl.load(f)
plt.figure()
plt.loglog(grid_points, run_time_O1*scale_factor,
'-*', label='aronnax_test')
plt.loglog(grid_points, run_time_Ofast*scale_factor,
'-*', label='aronnax_core')
scale = scale_factor * run_time_O1[-7]/(grid_points[-7]**2)
plt.loglog(grid_points, scale*grid_points**2,
':', label='O(nx**2)', color='black', linewidth=0.5)
plt.legend()
plt.xlabel('Resolution (grid cells on one side)')
plt.ylabel('Avg time per integration step (ms)')
plt.title('Runtime scaling of a 1.5-layer Aronnax simulation on a square grid')
plt.savefig('beta_plane_bump_red_grav_scaling.png', dpi=150)
def benchmark_gaussian_bump_red_grav(grid_points):
benchmark_gaussian_bump_red_grav_save(grid_points)
benchmark_gaussian_bump_red_grav_plot()
def benchmark_gaussian_bump_save(grid_points):
run_time_O1 = np.zeros(len(grid_points))
run_time_Ofast = np.zeros(len(grid_points))
run_time_hypre_test = np.zeros(len(grid_points))
run_time_hypre = np.zeros(len(grid_points))
def bump(X, Y):
return 500. + 20*np.exp(-((6e5-X)**2 + (5e5-Y)**2)/(2*1e5**2))
with working_directory(p.join(self_path, "beta_plane_bump")):
aro_exec = "aronnax_test"
for counter, nx in enumerate(grid_points):
run_time_O1[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump, lambda X, Y: 2000. - bump(X, Y)], nx=nx, ny=nx)
aro_exec = "aronnax_core"
for counter, nx in enumerate(grid_points):
run_time_Ofast[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump, lambda X, Y: 2000. - bump(X, Y)], nx=nx, ny=nx)
aro_exec = "aronnax_external_solver_test"
for counter, nx in enumerate(grid_points[:9]):
run_time_hypre_test[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump, lambda X, Y: 2000. - bump(X, Y)], nx=nx, ny=nx)
aro_exec = "aronnax_external_solver"
for counter, nx in enumerate(grid_points[:9]):
run_time_hypre[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump, lambda X, Y: 2000. - bump(X, Y)], nx=nx, ny=nx)
with open("times.pkl", "wb") as f:
pkl.dump((grid_points, run_time_O1, run_time_Ofast,
run_time_hypre_test, run_time_hypre
), f)
def benchmark_gaussian_bump_plot():
with working_directory(p.join(self_path, "beta_plane_bump")):
with open("times.pkl", "rb") as f:
(grid_points, run_time_O1, run_time_Ofast,
run_time_hypre_test, run_time_hypre
) = pkl.load(f)
plt.figure()
plt.loglog(grid_points, run_time_O1*scale_factor,
'-*', label='aronnax_test')
plt.loglog(grid_points, run_time_Ofast*scale_factor,
'-*', label='aronnax_core')
plt.loglog(grid_points, run_time_hypre_test*scale_factor,
'-o', label='aronnax_external_solver_test')
plt.loglog(grid_points, run_time_hypre*scale_factor,
'-o', label='aronnax_external_solver')
scale = scale_factor * run_time_O1[3]/(grid_points[3]**3)
plt.loglog(grid_points, scale*grid_points**3,
':', label='O(nx**3)', color='black', linewidth=0.5)
scale = scale_factor * run_time_hypre[3]/(grid_points[3]**2)
plt.loglog(grid_points, scale*grid_points**2,
':', label='O(nx**2)', color='blue', linewidth=0.5)
plt.legend()
plt.xlabel('Resolution (grid cells on one side)')
plt.ylabel('Avg time per integration step (ms)')
plt.title('Runtime scaling of a 2-layer Aronnax simulation\nwith bathymetry on a square grid')
plt.savefig('beta_plane_bump_scaling.png', dpi=150)
def benchmark_gaussian_bump(grid_points):
benchmark_gaussian_bump_save(grid_points)
benchmark_gaussian_bump_plot()
def benchmark_parallel_gaussian_bump_red_grav_save(n_procs):
run_time = np.zeros(len(n_procs))
nx = 480
def bump(X, Y):
return 500. + 20*np.exp(-((6e5-X)**2 + (5e5-Y)**2)/(2*1e5**2))
with working_directory(p.join(self_path, "beta_plane_bump_red_grav")):
aro_exec = "aronnax_core"
for counter, nProcX in enumerate(n_procs):
if nProcX == 1:
run_time[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump], nx=nx, ny=nx)
else:
run_time[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump],
nx=nx, ny=nx, nProcX=nProcX)
with open("mpi_times.pkl", "wb") as f:
pkl.dump((n_procs, run_time), f)
def benchmark_parallel_gaussian_bump_red_grav_plot():
with working_directory(p.join(self_path, "beta_plane_bump_red_grav")):
with open("mpi_times.pkl", "rb") as f:
(n_procs, run_time) = pkl.load(f)
plt.figure()
plt.loglog(n_procs, run_time*scale_factor,
'-*', label='aronnax_core')
scale = scale_factor * run_time[0]
plt.loglog(n_procs, scale/n_procs,
':', label='O(1/n)', color='black', linewidth=0.5)
plt.legend()
plt.xlabel('Number of processors')
plt.ylabel('Avg time per integration step (ms)')
plt.title('Runtime scaling of a 1.5-layer Aronnax simulation\n on a square grid')
plt.savefig('beta_plane_bump_mpi_scaling.png', dpi=150, bbox_inches='tight')
def benchmark_parallel_gaussian_bump_red_grav(n_procs):
benchmark_parallel_gaussian_bump_red_grav_save(n_procs)
benchmark_parallel_gaussian_bump_red_grav_plot()
def benchmark_parallel_gaussian_bump_save(n_procs):
run_time = np.zeros(len(n_procs))
nx = 120
def bump(X, Y):
return 500. + 20*np.exp(-((6e5-X)**2 + (5e5-Y)**2)/(2*1e5**2))
with working_directory(p.join(self_path, "beta_plane_bump")):
aro_exec = "aronnax_external_solver"
for counter, nProcX in enumerate(n_procs):
if nProcX == 1:
run_time[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump, lambda X, Y: 2000. - bump(X, Y)],
nx=nx, ny=nx)
else:
run_time[counter] = aro.simulate(
exe=aro_exec, initHfile=[bump, lambda X, Y: 2000. - bump(X, Y)],
nx=nx, ny=nx, nProcX=nProcX)
with open("mpi_times.pkl", "wb") as f:
pkl.dump((n_procs, run_time), f)
def benchmark_parallel_gaussian_bump_plot():
with working_directory(p.join(self_path, "beta_plane_bump")):
with open("mpi_times.pkl", "rb") as f:
(n_procs, run_time) = pkl.load(f)
plt.figure()
plt.loglog(n_procs, run_time*scale_factor,
'-*', label='aronnax_external_solver')
scale = scale_factor * run_time[0]
plt.loglog(n_procs, scale/n_procs,
':', label='O(1/n)', color='black', linewidth=0.5)
plt.legend()
plt.xlabel('Number of processors')
plt.ylabel('Avg time per integration step (ms)')
plt.title('Runtime scaling of a 2-layer Aronnax simulation\n on a square grid')
plt.savefig('beta_plane_bump_mpi_scaling.png', dpi=150, bbox_inches='tight')
def benchmark_parallel_gaussian_bump(n_procs):
benchmark_parallel_gaussian_bump_save(n_procs)
benchmark_parallel_gaussian_bump_plot()
if __name__ == '__main__':
if len(sys.argv) > 1:
if sys.argv[1] == "save":
benchmark_gaussian_bump_red_grav_save(np.array([10, 20, 40, 60, 80, 100, 150, 200, 300, 400, 500]))
benchmark_gaussian_bump_save(np.array([10, 20, 40, 60, 80, 100, 120]))
benchmark_parallel_gaussian_bump_red_grav_save([1,2,3,4])
benchmark_parallel_gaussian_bump_save([1,2,3,4])
else:
benchmark_gaussian_bump_red_grav_plot()
benchmark_gaussian_bump_plot()
benchmark_parallel_gaussian_bump_red_grav_plot()
benchmark_parallel_gaussian_bump_plot()
else:
benchmark_gaussian_bump_red_grav(np.array([10, 20, 40, 60, 80, 100, 150, 200, 300, 400, 500]))
benchmark_gaussian_bump(np.array([10, 20, 40, 60, 80, 100, 120]))
benchmark_parallel_gaussian_bump_red_grav([1,2,3,4])
benchmark_parallel_gaussian_bump([1,2,3,4])
| 41.352941 | 111 | 0.633713 | 1,422 | 9,842 | 4.09353 | 0.109001 | 0.05652 | 0.039684 | 0.058409 | 0.928706 | 0.90895 | 0.869438 | 0.804845 | 0.752276 | 0.712764 | 0 | 0.035591 | 0.237757 | 9,842 | 237 | 112 | 41.527426 | 0.740336 | 0.001626 | 0 | 0.623711 | 0 | 0 | 0.130904 | 0.037561 | 0 | 0 | 0 | 0 | 0 | 1 | 0.082474 | false | 0 | 0.041237 | 0.020619 | 0.14433 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
6df197774e989a9bac0ece0708fb1ce09a89b0ea | 22 | py | Python | SingleIRsource/tests/__init__.py | biqute/QTLab2122 | 4d53d4c660bb5931615d8652e698f6d689a4dead | [
"MIT"
] | 3 | 2021-11-30T18:41:11.000Z | 2021-12-12T12:27:14.000Z | SingleIRsource/tests/__init__.py | biqute/QTLab2122 | 4d53d4c660bb5931615d8652e698f6d689a4dead | [
"MIT"
] | null | null | null | SingleIRsource/tests/__init__.py | biqute/QTLab2122 | 4d53d4c660bb5931615d8652e698f6d689a4dead | [
"MIT"
] | null | null | null | from .trigger import * | 22 | 22 | 0.772727 | 3 | 22 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.894737 | 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 | 1 | 0 | 0 | 6 |
61dd9a74ab498075ea82b936458bb77b24c9f593 | 6,968 | py | Python | app/tests/test_path_validation.py | broadinstitute/import-service | 9f30ebc40bc81febad4eb7247a80165ba0c450c1 | [
"BSD-3-Clause"
] | 2 | 2020-01-27T19:05:37.000Z | 2021-10-19T14:58:37.000Z | app/tests/test_path_validation.py | broadinstitute/import-service | 9f30ebc40bc81febad4eb7247a80165ba0c450c1 | [
"BSD-3-Clause"
] | 14 | 2020-02-07T19:49:39.000Z | 2022-03-30T19:16:35.000Z | app/tests/test_path_validation.py | broadinstitute/import-service | 9f30ebc40bc81febad4eb7247a80165ba0c450c1 | [
"BSD-3-Clause"
] | 1 | 2021-09-04T17:22:00.000Z | 2021-09-04T17:22:00.000Z | import flask.testing
import pytest
import os
from app.tests import testutils
from app import translate
from app.auth import userinfo
from app.db.model import *
good_headers = {"Authorization": "Bearer ya29.blahblah"}
os.environ.setdefault("BATCH_UPSERT_BUCKET", "unittest-allowed-bucket")
def assert_response_code_and_logs(resp, caplog, import_url):
assert resp.status_code == 400
# if the "sam_valid_user" fixture changes, this assertion will also need to change
auditlog = filter(lambda rec: rec.message == f"User 123456 hello@bees.com attempted to import from path {import_url}", caplog.records)
assert list(auditlog), "Expected audit log message to exist if user specified illegal domain; did not find such message in log."
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_netlocs_simple(client, netloc):
payload = {"path": f"https://{netloc}/some/valid/path", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert resp.status_code == 201
# NB we don't test anything deeper than the 201 response; other tests check to see if the
# db is updated, etc.
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_illegal_netloc_simple(client: flask.testing.FlaskClient, caplog):
payload = {"path": f"https://haxxor.evil.bad/some/valid/path", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_unparsable_path(client: flask.testing.FlaskClient, caplog):
payload = {"path": f"https://[:-999/~~~~~~~~~~~", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_subdomain_of_legal_netlocs(client, netloc, caplog):
payload = {"path": f"https://subdomain.{netloc}/some/valid/path", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert resp.status_code == 201
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_netloc_as_subdomain_of_bad_tld(client, netloc, caplog):
payload = {"path": f"https://{netloc}.evil/some/valid/path", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_netloc_in_fragment(client, netloc, caplog):
payload = {"path": f"https://evil.bad/some/valid/path#{netloc}", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_netloc_in_query(client, netloc, caplog):
payload = {"path": f"https://evil.bad/some/valid/path?q={netloc}", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_netloc_in_path(client, netloc, caplog):
payload = {"path": f"https://evil.bad/hide/{netloc}/in/path", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_audit_logging(client: flask.testing.FlaskClient, caplog):
payload = {"path": "https://illegal.domains/should/be/logged", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_bucket_for_rawlsjson(client: flask.testing.FlaskClient, caplog):
payload = {"path": "gs://unittest-allowed-bucket/some/valid/path.json", "filetype": "rawlsjson"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert resp.status_code == 201
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_bucket_for_rawlsjson_in_path(client: flask.testing.FlaskClient, caplog):
payload = {"path": "gs://unittest-DISallowed-bucket/some/unittest-allowed-bucket/path.json", "filetype": "rawlsjson"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_illegal_bucket_for_rawlsjson(client: flask.testing.FlaskClient, caplog):
payload = {"path": "gs://unittest-DISallowed-bucket/some/valid/path.json", "filetype": "rawlsjson"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.parametrize("netloc", translate.VALID_NETLOCS)
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_netlocs_but_rawlsjson(client, netloc, caplog):
payload = {"path": f"https://{netloc}/some/valid/path", "filetype": "rawlsjson"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
@pytest.mark.usefixtures("sam_valid_user", "user_has_ws_access", "pubsub_publish", "pubsub_fake_env")
def test_legal_bucket_but_pfb(client: flask.testing.FlaskClient, caplog):
payload = {"path": "gs://unittest-allowed-bucket/some/valid/path.json", "filetype": "pfb"}
resp = client.post('/namespace/name/imports', json=payload, headers=good_headers)
assert_response_code_and_logs(resp, caplog, payload["path"])
| 61.663717 | 138 | 0.757319 | 957 | 6,968 | 5.256008 | 0.14838 | 0.054672 | 0.081113 | 0.066799 | 0.8334 | 0.832008 | 0.832008 | 0.808946 | 0.795626 | 0.756064 | 0 | 0.004111 | 0.092423 | 6,968 | 112 | 139 | 62.214286 | 0.791271 | 0.02698 | 0 | 0.544444 | 0 | 0 | 0.344303 | 0.083383 | 0 | 0 | 0 | 0 | 0.188889 | 1 | 0.166667 | false | 0 | 0.255556 | 0 | 0.422222 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
110cdeffff7e8a5e9c63e03a8f0e28688737da8c | 1,087 | py | Python | crack/dataStruct/StackQueue.py | ernestyalumni/CompPhys | 1f5d7559146a14a21182653b77fd35e6d6829855 | [
"Apache-2.0"
] | 70 | 2017-07-24T04:09:27.000Z | 2021-12-24T16:00:41.000Z | crack/dataStruct/StackQueue.py | ernestyalumni/CompPhys | 1f5d7559146a14a21182653b77fd35e6d6829855 | [
"Apache-2.0"
] | 3 | 2018-01-16T22:34:47.000Z | 2019-01-29T22:37:10.000Z | crack/dataStruct/StackQueue.py | ernestyalumni/CompPhys | 1f5d7559146a14a21182653b77fd35e6d6829855 | [
"Apache-2.0"
] | 40 | 2017-01-24T19:18:42.000Z | 2021-03-01T07:13:35.000Z | class Stack:
""" @class Stack
@details Stack follows LIFO. Last in (append), First Out (pop), like stack of plates
"""
def __init__(self):
self.items = []
def isEmpty(self):
return self.items == []
def push(self,item):
self.items.append(item)
def pop(self):
return self.items.pop()
def peek(self):
L = len(self.items)
return self.items[L-1] # 0-based Python counting
def size(self):
L = len(self.items)
return L
class Queue:
""" @class Queue
@details Stack follows FIFO. First in (insert), First Out (pop); elements removed in same order they came in
"""
def __init__(self):
self.items = []
def isEmpty(self):
return self.items == []
def push(self,item):
self.items.append(item)
def pop(self):
return self.remove( self.items[0])
def peek(self):
L = len(self.items)
return self.items[L-1] # 0-based Python counting
def size(self):
L = len(self.items)
return L
| 21.74 | 118 | 0.559338 | 144 | 1,087 | 4.166667 | 0.284722 | 0.21 | 0.125 | 0.08 | 0.65 | 0.65 | 0.65 | 0.65 | 0.65 | 0.65 | 0 | 0.006739 | 0.317387 | 1,087 | 49 | 119 | 22.183673 | 0.801887 | 0.25299 | 0 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.133333 | 0.733333 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
1114ca4d7d6c67ad73e5c82f70fcd74e7a01f063 | 121 | py | Python | fastapi_mail/email_utils/errors.py | DmitriySolodkiy/fastapi-mail | d46968ab0efb009606f90b9f60651254857c13c7 | [
"MIT"
] | 3 | 2021-06-26T17:27:21.000Z | 2021-07-11T15:02:15.000Z | fastapi_mail/email_utils/errors.py | DmitriySolodkiy/fastapi-mail | d46968ab0efb009606f90b9f60651254857c13c7 | [
"MIT"
] | null | null | null | fastapi_mail/email_utils/errors.py | DmitriySolodkiy/fastapi-mail | d46968ab0efb009606f90b9f60651254857c13c7 | [
"MIT"
] | null | null | null | class InvalidEmail(Exception):
pass
class ApiError(Exception):
pass
class DBProvaiderError(Exception):
pass | 15.125 | 34 | 0.743802 | 12 | 121 | 7.5 | 0.5 | 0.433333 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 121 | 8 | 35 | 15.125 | 0.909091 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
114c6df5f423be6f59d698d772dc208baa98636f | 9,860 | py | Python | Brevet_us_4_124_463_water_electrolyzer_2/assembly.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | Brevet_us_4_124_463_water_electrolyzer_2/assembly.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | Brevet_us_4_124_463_water_electrolyzer_2/assembly.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | import FreeCAD, Part, Mesh, math
DOC = FreeCAD.activeDocument()
DOC_NAME = "assembly"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeCAD.Gui.activeDocument().activeView().viewAxometric()
if DOC is None:
FreeCAD.newDocument(DOC_NAME)
FreeCAD.setActiveDocument(DOC_NAME)
DOC = FreeCAD.activeDocument()
else:
clear_doc()
# EPS= tolerance to use to cut the parts
EPS = 0.10
EPS_C = EPS * -0.5
# Diametre maximal
diametre_maximal = 250
cylinder_1 = Part.makeCylinder(diametre_maximal/2, 6)
cylinder_2 = Part.makeCylinder(diametre_maximal/2 - 3 - 5 - 3 - 2 - 3, 3)
# cylinder_1 cut by cylinder_2
cylinder_2_vector = FreeCAD.Vector(0, 0, 3)
cylinder_2.translate(cylinder_2_vector)
cylinder_1 = cylinder_1.cut(cylinder_2)
cylinder_3 = Part.makeCylinder(diametre_maximal/2, 3)
cylinder_4 = Part.makeCylinder(diametre_maximal/2 - 3 - 5 - 3 - 2, 3)
# cylinder_3 cut by cylinder_4
cylinder_3 = cylinder_3.cut(cylinder_4)
# cylinder_1 cut by cylinder_3
cylinder_3_vector = FreeCAD.Vector(0, 0, 3)
cylinder_3.translate(cylinder_3_vector)
cylinder_1 = cylinder_1.cut(cylinder_3)
# holes for fixing the tank
degre = 10
for i in range(int(360/degre)):
radius = diametre_maximal/2 - 3 - 2.5
alpha=(i*degre*math.pi)/180
hole_vector = FreeCAD.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 0)
hole = Part.makeCylinder(2.5, 3)
hole.translate(hole_vector)
cylinder_1 = cylinder_1.cut(hole)
# holes for fixing the anodes and the cathodes
degre = 60
for i in range(int(360/degre)):
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(i*degre*math.pi)/180
hole_vector = FreeCAD.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 0)
hole = Part.makeCylinder(5, 3)
hole.translate(hole_vector)
cylinder_1 = cylinder_1.cut(hole)
Part.show(cylinder_1)
DOC.recompute()
# insertion part_rondelle_m10_17d - 0
degre = 60
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(degre*math.pi)/180
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), -1)
Mesh.insert(u"part_rondelle_m10_17d.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_rondelle_m10_17d").Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_rondelle_m10_17d").ShapeColor = (1.00,1.00,0.00)
# For placing the part_rondelle_m10_17d
i1 = 1
degres = [120, 180, 240, 300, 360]
for degre in degres:
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(degre*math.pi)/180
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), -1)
Mesh.insert(u"part_rondelle_m10_17d.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_rondelle_m10_17d00" + str(i1)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_rondelle_m10_17d00" + str(i1)).ShapeColor = (1.00,1.00,0.00)
i1 += 1
# For placing the part_rondelle_m10_17d
for i in range(7, 14):
Mesh.insert(u"part_rondelle_m10_17d.stl", "assembly")
for i in range(7, 13):
alpha=(i*60*math.pi)/180
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 3)
if i < 10:
FreeCAD.getDocument("assembly").getObject("part_rondelle_m10_17d00" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_rondelle_m10_17d00" + str(i)).ShapeColor = (1.00,1.00,0.00)
else:
FreeCAD.getDocument("assembly").getObject("part_rondelle_m10_17d0" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_rondelle_m10_17d0" + str(i)).ShapeColor = (1.00,1.00,0.00)
# insertion part_vis_metal_m10_200l - 0
degre = 60
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(degre*math.pi)/180
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), -3)
Mesh.insert(u"part_vis_metal_m10_200l.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_vis_metal_m10_200l").Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_vis_metal_m10_200l").ShapeColor = (0.00,1.00,1.00)
# For placing the part_vis_metal_m10_200l
i1 = 1
degres = [120, 180, 240, 300, 360]
for degre in degres:
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(degre*math.pi)/180
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), -3)
Mesh.insert(u"part_vis_metal_m10_200l.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_vis_metal_m10_200l00" + str(i1)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_vis_metal_m10_200l00" + str(i1)).ShapeColor = (0.00,1.00,1.00)
i1 += 1
# insertion part_ecrou_10m - 0
degre = 60
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(degre*math.pi)/180
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 4)
Mesh.insert(u"part_ecrou_10m.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_ecrou_10m").Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_ecrou_10m").ShapeColor = (0.00,0.00,1.00)
# For placing the part_ecrou_10m
i1 = 1
degres = [120, 180, 240, 300, 360]
for degre in degres:
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
alpha=(degre*math.pi)/180
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 4)
Mesh.insert(u"part_ecrou_10m.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_ecrou_10m00" + str(i1)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_ecrou_10m00" + str(i1)).ShapeColor = (0.00,0.00,1.00)
i1 += 1
# For placing the part_rondelle_m10_17d
for i in range(15, 21):
Mesh.insert(u"part_rondelle_m10_17d.stl", "assembly")
for i in range(13, 19):
alpha=(i*60*math.pi)/180
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 8)
FreeCAD.getDocument("assembly").getObject("part_rondelle_m10_17d0" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_rondelle_m10_17d0" + str(i)).ShapeColor = (1.00,1.00,0.00)
# insertion part_capacitor_plate - 0
vector = App.Vector(0, 0, 9)
Mesh.insert(u"part_capacitor_plate.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_capacitor_plate").Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_capacitor_plate").ShapeColor = (0.00,0.50,0.50)
# For placing the part_rondelle_m10_17d
for i in range(22, 28):
Mesh.insert(u"part_rondelle_m10_17d.stl", "assembly")
for i in range(19, 25):
alpha=(i*60*math.pi)/180
radius = diametre_maximal/2 - 3 - 5 - 3 - 2 - 3 - 2 - 2 - 4 - 5
vector = App.Vector(radius*math.cos(alpha), radius*math.sin(alpha), 10)
FreeCAD.getDocument("assembly").getObject("part_rondelle_m10_17d0" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_rondelle_m10_17d0" + str(i)).ShapeColor = (1.00,1.00,0.00)
# insertion part_capacitor_plate - 1
vector = App.Vector(0, 0, 11)
Mesh.insert(u"part_capacitor_plate.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_capacitor_plate001").Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 60))
FreeCADGui.getDocument("assembly").getObject("part_capacitor_plate001").ShapeColor = (0.00,0.50,0.50)
# For placing all the part_capacitor_plate
for i in range(2, 10):
if i % 2 == 0:
vector = App.Vector(0, 0, i*2 + 9)
Mesh.insert(u"part_capacitor_plate.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_capacitor_plate00" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_capacitor_plate00" + str(i)).ShapeColor = (0.00,0.50,0.50)
else:
vector = App.Vector(0, 0, i*2 + 9)
Mesh.insert(u"part_capacitor_plate.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_capacitor_plate00" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 60))
FreeCADGui.getDocument("assembly").getObject("part_capacitor_plate00" + str(i)).ShapeColor = (0.00,0.50,0.50)
# For placing all the part_capacitor_plate
for i in range(10, 90):
if i % 2 == 0:
vector = App.Vector(0, 0, i*2 + 9)
Mesh.insert(u"part_capacitor_plate.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_capacitor_plate0" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 0))
FreeCADGui.getDocument("assembly").getObject("part_capacitor_plate0" + str(i)).ShapeColor = (0.00,0.50,0.50)
else:
vector = App.Vector(0, 0, i*2 + 9)
Mesh.insert(u"part_capacitor_plate.stl", "assembly")
FreeCAD.getDocument("assembly").getObject("part_capacitor_plate0" + str(i)).Placement = App.Placement(vector, App.Rotation(App.Vector(0,0,1), 60))
FreeCADGui.getDocument("assembly").getObject("part_capacitor_plate0" + str(i)).ShapeColor = (0.00,0.50,0.50)
setview()
| 45.022831 | 155 | 0.701318 | 1,550 | 9,860 | 4.320645 | 0.083226 | 0.090787 | 0.133791 | 0.152904 | 0.880544 | 0.86143 | 0.849037 | 0.802598 | 0.798567 | 0.783485 | 0 | 0.089324 | 0.139351 | 9,860 | 219 | 156 | 45.022831 | 0.699859 | 0.076775 | 0 | 0.56051 | 0 | 0 | 0.157472 | 0.099438 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012739 | false | 0 | 0.006369 | 0 | 0.019108 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
3a55140724354cb3e63116227760249fe9c5e393 | 45 | py | Python | src/app/training/forms/__init__.py | serious-notreally/cappa | 993a8df35ca6c3b22f3ca811937fd29c07fc71aa | [
"MIT"
] | 9 | 2020-04-05T07:35:55.000Z | 2021-08-03T05:50:05.000Z | src/app/training/forms/__init__.py | serious-notreally/cappa | 993a8df35ca6c3b22f3ca811937fd29c07fc71aa | [
"MIT"
] | 89 | 2020-01-26T11:50:06.000Z | 2022-03-31T07:14:18.000Z | src/app/training/forms/__init__.py | serious-notreally/cappa | 993a8df35ca6c3b22f3ca811937fd29c07fc71aa | [
"MIT"
] | 13 | 2020-03-10T14:45:07.000Z | 2021-07-31T02:43:40.000Z | from .taskitem import *
from .topic import *
| 15 | 23 | 0.733333 | 6 | 45 | 5.5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177778 | 45 | 2 | 24 | 22.5 | 0.891892 | 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 | 1 | 0 | 0 | 6 |
3aa6ae78e69784e3291b01f6286a341cb8fd5525 | 175 | py | Python | scphylo/logging/__init__.py | faridrashidi/scphylo-tools | 4574e2c015da58e59caa38e3b3e49b398c1379c1 | [
"BSD-3-Clause"
] | null | null | null | scphylo/logging/__init__.py | faridrashidi/scphylo-tools | 4574e2c015da58e59caa38e3b3e49b398c1379c1 | [
"BSD-3-Clause"
] | null | null | null | scphylo/logging/__init__.py | faridrashidi/scphylo-tools | 4574e2c015da58e59caa38e3b3e49b398c1379c1 | [
"BSD-3-Clause"
] | null | null | null | """Logging Module."""
from scphylo.logging._logging import debug, error, hint, info, msg, print_version, warn
__all__ = (debug, error, hint, info, msg, print_version, warn)
| 29.166667 | 87 | 0.731429 | 24 | 175 | 5.041667 | 0.583333 | 0.165289 | 0.231405 | 0.297521 | 0.61157 | 0.61157 | 0.61157 | 0.61157 | 0 | 0 | 0 | 0 | 0.131429 | 175 | 5 | 88 | 35 | 0.796053 | 0.085714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 1 | 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 | 1 | 0 | 6 |
3abd921e2cfbb3f53da0afa58156554c73fd9c36 | 122 | py | Python | libotp/__init__.py | open-toontown/libotp-movement | 806f966dba11b4a71efb3987935ad33562c4df05 | [
"BSD-3-Clause"
] | 4 | 2019-11-02T03:54:27.000Z | 2021-03-03T05:49:54.000Z | libotp/__init__.py | open-toontown/libotp-movement | 806f966dba11b4a71efb3987935ad33562c4df05 | [
"BSD-3-Clause"
] | null | null | null | libotp/__init__.py | open-toontown/libotp-movement | 806f966dba11b4a71efb3987935ad33562c4df05 | [
"BSD-3-Clause"
] | 1 | 2021-03-03T05:49:57.000Z | 2021-03-03T05:49:57.000Z | from .movement.CImpulse import CImpulse
from .movement.CMover import CMover
from .movement.CMoverGroup import CMoverGroup
| 30.5 | 45 | 0.852459 | 15 | 122 | 6.933333 | 0.4 | 0.346154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.098361 | 122 | 3 | 46 | 40.666667 | 0.945455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
3ac8ddc71ca02db611b601717ec47d154530d77d | 7,279 | py | Python | Banking/Qonto/unit_tests.py | Jay4C/API | 64b691bcf929ceb142145c6bbe27a049a76d7649 | [
"MIT"
] | 1 | 2022-02-28T05:05:35.000Z | 2022-02-28T05:05:35.000Z | Banking/Qonto/unit_tests.py | Jay4C/API | 64b691bcf929ceb142145c6bbe27a049a76d7649 | [
"MIT"
] | null | null | null | Banking/Qonto/unit_tests.py | Jay4C/API | 64b691bcf929ceb142145c6bbe27a049a76d7649 | [
"MIT"
] | null | null | null | import json
import unittest
import requests
class Unit_Tests_Qonto_API(unittest.TestCase):
def test_get_token_endpoint(self):
print("test_get_token_endpoint")
url = "https://oauth.qonto.com/oauth2/token"
payload = 'code=code&client_id=client_id&client_secret=client_secret' \
'&redirect_uri=redirect_uri&grant_type=grant_type'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
def test_get_show_organization_v1(self):
print("test_get_show_organization_v1")
url = "https://thirdparty.qonto.com/v1/organizations/{id}"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_list_transactions_v1(self):
print("test_get_list_transactions_v1")
url = "https://thirdparty.qonto.com/v1/transactions?slug=slug"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_list_transaction_v2(self):
print("test_get_list_transaction_v2")
url = "https://thirdparty.qonto.com/v2/transactions?iban=iban"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_show_transaction_v2(self):
print("test_get_show_transaction_v2")
url = "https://thirdparty.qonto.com/v2/transactions/{id}"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_show_organisation_v2(self):
print("test_get_show_organisation_v2")
url = "https://thirdparty.qonto.com/v2/organizations/{id}"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_list_organizations_v2(self):
print("test_get_list_organizations")
url = "https://thirdparty.qonto.com/v2/organization"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_list_labels_v2(self):
print("test_get_list_labels_v2")
url = "https://thirdparty.qonto.com/v2/labels"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_show_label_v2(self):
print("test_get_show_label_v2")
url = "https://thirdparty.qonto.com/v2/labels/{id}"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_list_memberships_v2(self):
print("test_get_list_memberships_v2")
url = "https://thirdparty.qonto.com/v2/memberships"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_show_attachment_v2(self):
print("test_get_show_attachment_v2")
url = "https://thirdparty.qonto.com/v2/attachments/{id}"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_get_list_of_attachments_within_a_transaction_v2(self):
print("test_get_list_of_attachments_within_a_transaction_v2")
url = "https://thirdparty.qonto.com/v2/transactions/{transaction_id}/attachments"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
def test_delete_list_of_attachments_within_a_transaction_v2(self):
print("test_delete_list_of_attachments_within_a_transaction_v2")
url = "https://thirdparty.qonto.com/v2/transactions/{transaction_id}/attachments"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
def test_delete_remove_an_attachment_from_a_transaction_v2(self):
print("test_delete_remove_an_attachment_from_a_transaction_v2")
url = "https://thirdparty.qonto.com/v2/transactions/{transaction_id}/attachments/{id}"
payload = {}
headers = {
'Authorization': '{organization-slug}:{secret-key}'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
def test_post_upload_an_attachment_to_a_transaction_v2(self):
print("test_post_upload_an_attachment_to_a_transaction_v2")
url = "https://thirdparty.qonto.com/v2/transactions/{transaction_id}/attachments"
payload = json.dumps({
"file": "string"
})
headers = {
'Authorization': '{organization-slug}:{secret-key}',
'X-Qonto-Idempotency-Key': 'X-Qonto-Idempotency-Key',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
def test_post_transfers_between_accounts_of_the_same_organization_v2(self):
print("test_post_transfers_between_accounts_of_the_same_organization_v2")
url = "https://thirdparty.qonto.com/v2/internal_transfers"
payload = json.dumps({
"internal_transfer": {
"debit_iban": "string",
"credit_iban": "string",
"reference": "string",
"amount": "string",
"currency": "string"
}
})
headers = {
'Authorization': '{organization-slug}:{secret-key}',
'X-Qonto-Idempotency-Key': 'X-Qonto-Idempotency-Key',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
if __name__ == '__main__':
unittest.main()
| 29.116 | 94 | 0.620964 | 768 | 7,279 | 5.632813 | 0.117188 | 0.038835 | 0.048081 | 0.07767 | 0.877716 | 0.834027 | 0.787332 | 0.736477 | 0.719834 | 0.663199 | 0 | 0.008258 | 0.251408 | 7,279 | 249 | 95 | 29.232932 | 0.785649 | 0 | 0 | 0.527273 | 0 | 0 | 0.352109 | 0.175574 | 0 | 0 | 0 | 0 | 0 | 1 | 0.09697 | false | 0 | 0.018182 | 0 | 0.121212 | 0.193939 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
3acc5a61fcb31c5a3b41b0c473f8203c799f549c | 193 | py | Python | apps/v1api/views/__init__.py | ekivemark/BlueButtonFHIR_API | 9b5d9ca92b1e5ff0e9de046c87596ff3d5e66eef | [
"Apache-2.0"
] | 5 | 2016-03-02T23:25:39.000Z | 2020-10-29T07:28:42.000Z | apps/v1api/views/__init__.py | HowardEdidin/BlueButtonFHIR_API | b8433055507bcc334f70bc864eacd379a04f69db | [
"Apache-2.0"
] | 13 | 2020-02-11T22:50:32.000Z | 2022-03-11T23:12:48.000Z | apps/v1api/views/__init__.py | HowardEdidin/BlueButtonFHIR_API | b8433055507bcc334f70bc864eacd379a04f69db | [
"Apache-2.0"
] | 4 | 2016-02-02T19:17:24.000Z | 2020-10-10T16:10:31.000Z | """
bbofuser: apps.v1api
FILE: __init__.py
Created: 8/16/15 11:20 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
from apps.v1api.views.patient import *
from apps.v1api.views.home import *
| 16.083333 | 41 | 0.73057 | 29 | 193 | 4.586207 | 0.758621 | 0.203008 | 0.195489 | 0.270677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 0.129534 | 193 | 11 | 42 | 17.545455 | 0.720238 | 0.331606 | 0 | 0 | 0 | 0 | 0.218487 | 0.176471 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
aaf5b097349511b8ab9acdc1942dd007e82e5305 | 3,008 | py | Python | imgflip/models.py | SYCKGit/imgflip-py | 6e79c14d2e6d8713e12e7a14b7e4a6a353c0e8e6 | [
"MIT"
] | 2 | 2021-07-03T08:45:04.000Z | 2022-01-28T23:38:23.000Z | imgflip/models.py | SYCKGit/imgflip-py | 6e79c14d2e6d8713e12e7a14b7e4a6a353c0e8e6 | [
"MIT"
] | 1 | 2022-01-28T16:03:14.000Z | 2022-02-01T19:26:04.000Z | imgflip/models.py | SYCKGit/imgflip.py | 6e79c14d2e6d8713e12e7a14b7e4a6a353c0e8e6 | [
"MIT"
] | null | null | null | from .objects import *
from .errors import ImgflipError
BASE_URL = "https://api.imgflip.com"
class SyncModel():
def __init__(self, session):
self.session = session
def get_memes(self, limit, dictionary):
resp = self.session.get(f"{BASE_URL}/get_memes")
memes = resp.json()["data"]["memes"][:limit]
if dictionary is False:
return [Template(**meme) for meme in memes]
return {meme["name"]: Template(**meme) for meme in memes}
def caption_image(self, **kwargs):
kwargs["template_id"] = int(kwargs["template_id"])
data = kwargs.copy()
for k, v in kwargs.items():
if v is None:
del data[k]
if data.get("boxes") is not None:
boxes = dict()
for index, box in enumerate(data.get("boxes")):
for k, v in box._raw.items():
boxes[f"boxes[{index}][{k}]"] = v
del data["boxes"]
data.update(boxes)
data["max_font_size"] = f"{data['max_font_size']}px"
resp = self.session.post(f"{BASE_URL}/caption_image", params=data)
resp_json = resp.json()
if resp_json["success"] is False:
raise ImgflipError(resp_json["error_message"])
meme = SyncMeme(
template_id=kwargs["template_id"],
session=self.session,
**(resp_json["data"])
)
return meme
class AsyncModel():
def __init__(self, session):
self.session = session
async def get_memes(self, limit, dictionary):
async with self.session.get(f"{BASE_URL}/get_memes") as resp:
memes = (await resp.json())["data"]["memes"][:limit]
if dictionary is False:
return [Template(**meme) for meme in memes]
return {meme["name"]: Template(**meme) for meme in memes}
async def caption_image(self, **kwargs):
kwargs["template_id"] = int(kwargs["template_id"])
data = kwargs.copy()
for k, v in kwargs.items():
if v is None:
del data[k]
if data.get("boxes") is not None:
boxes = dict()
for index, box in enumerate(data.get("boxes")):
for k, v in box._raw.items():
boxes[f"boxes[{index}][{k}]"] = v
del data["boxes"]
data.update(boxes)
data["max_font_size"] = f"{data['max_font_size']}px"
async with self.session.post(
f"{BASE_URL}/caption_image", params=data
) as resp:
resp_json = await resp.json()
if resp_json["success"] is False:
raise ImgflipError(resp_json["error_message"])
meme = AsyncMeme(
template_id=kwargs["template_id"],
session=self.session,
**(resp_json["data"])
)
return meme | 30.383838 | 75 | 0.524269 | 355 | 3,008 | 4.304225 | 0.197183 | 0.062827 | 0.062827 | 0.049738 | 0.86911 | 0.86911 | 0.829843 | 0.782723 | 0.743456 | 0.743456 | 0 | 0 | 0.34508 | 3,008 | 99 | 76 | 30.383838 | 0.775635 | 0 | 0 | 0.676056 | 0 | 0 | 0.135692 | 0.033665 | 0 | 0 | 0 | 0 | 0 | 1 | 0.056338 | false | 0 | 0.028169 | 0 | 0.197183 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
aaf6091e661d50dd3686e2e74c8ba0bbbb5c9a89 | 334 | py | Python | openhab_creator/output/content/__init__.py | DerOetzi/openhab_creator | 197876df5aae84192c34418f6b9a7cfcee23b195 | [
"MIT"
] | 1 | 2021-11-16T22:48:26.000Z | 2021-11-16T22:48:26.000Z | openhab_creator/output/content/__init__.py | DerOetzi/openhab_creator | 197876df5aae84192c34418f6b9a7cfcee23b195 | [
"MIT"
] | null | null | null | openhab_creator/output/content/__init__.py | DerOetzi/openhab_creator | 197876df5aae84192c34418f6b9a7cfcee23b195 | [
"MIT"
] | null | null | null | from openhab_creator.output.content.automationcreator import AutomationCreator
from openhab_creator.output.content.basicconfigcreator import \
BasicConfigCreator
from openhab_creator.output.content.iconscreator import IconsCreator
from openhab_creator.output.content.maptransformationcreator import \
MapTransformationCreator
| 47.714286 | 78 | 0.88024 | 32 | 334 | 9.0625 | 0.3125 | 0.151724 | 0.248276 | 0.331034 | 0.427586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077844 | 334 | 6 | 79 | 55.666667 | 0.941558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 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 | 1 | 0 | 0 | 6 |
c97288cc5d3e7e5a3665c87f47ee2f0262f7d5d3 | 163 | py | Python | src/data/savings.py | PranavPusarla/watersmrt | 3c8e8fd25f185b2b746feca8d109c7d208703d04 | [
"MIT"
] | 1 | 2019-11-28T04:38:56.000Z | 2019-11-28T04:38:56.000Z | src/data/savings.py | PranavPusarla/watersmrt | 3c8e8fd25f185b2b746feca8d109c7d208703d04 | [
"MIT"
] | null | null | null | src/data/savings.py | PranavPusarla/watersmrt | 3c8e8fd25f185b2b746feca8d109c7d208703d04 | [
"MIT"
] | 2 | 2019-11-26T19:41:08.000Z | 2019-11-28T04:36:57.000Z | #!/usr/bin/python3
# savings.py
def savings(last_week, this_week):
water_price = (0.7039 + 0.7469 + 0.7098)/3
return water_price * (last_week-this_week)
| 20.375 | 46 | 0.687117 | 27 | 163 | 3.925926 | 0.62963 | 0.150943 | 0.226415 | 0.301887 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 0.165644 | 163 | 7 | 47 | 23.285714 | 0.654412 | 0.171779 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 6 |
a34aebbe3b7529c49e2849e1be70710f2c3bdf4e | 111 | py | Python | jinja2schema/visitors/__init__.py | yourapi/jinja2schema | b629c4d1fdc54c6948b69c91f9929ec8a01538a4 | [
"BSD-3-Clause"
] | 1 | 2021-04-10T14:16:15.000Z | 2021-04-10T14:16:15.000Z | jinja2schema/visitors/__init__.py | yourapi/jinja2schema | b629c4d1fdc54c6948b69c91f9929ec8a01538a4 | [
"BSD-3-Clause"
] | 5 | 2020-11-18T14:40:07.000Z | 2021-04-10T14:37:12.000Z | jinja2schema/visitors/__init__.py | yourapi/jinja2schema | b629c4d1fdc54c6948b69c91f9929ec8a01538a4 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from .util import visit, visit_many
from .expr import visit_expr
from .stmt import visit_stmt
| 18.5 | 35 | 0.783784 | 19 | 111 | 4.421053 | 0.526316 | 0.392857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010638 | 0.153153 | 111 | 5 | 36 | 22.2 | 0.882979 | 0.117117 | 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 | 1 | 0 | 0 | 6 |
a3847395b0a2edb5f3920dba73091a970557b5ee | 143 | py | Python | backend/core/views/__init__.py | block-id/wallet | b5479df7df0e5b5733f0ae262ffc17f9b923347d | [
"Apache-2.0"
] | null | null | null | backend/core/views/__init__.py | block-id/wallet | b5479df7df0e5b5733f0ae262ffc17f9b923347d | [
"Apache-2.0"
] | null | null | null | backend/core/views/__init__.py | block-id/wallet | b5479df7df0e5b5733f0ae262ffc17f9b923347d | [
"Apache-2.0"
] | 1 | 2021-12-31T17:27:44.000Z | 2021-12-31T17:27:44.000Z | from . import register
from . import login
from . import react
from . import errors
from . import user
from . import logout
from . import sign
| 17.875 | 22 | 0.755245 | 21 | 143 | 5.142857 | 0.428571 | 0.648148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.195804 | 143 | 7 | 23 | 20.428571 | 0.93913 | 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 | 1 | 0 | 0 | 6 |
6e5994c393d10253e1086ef2f440b5ae668a2f6b | 43 | py | Python | sigiTest/docs/__init__.py | sinagilassi/vidstream | 1b9d5a06045728981c66c4145e3fe2d63b299569 | [
"MIT"
] | null | null | null | sigiTest/docs/__init__.py | sinagilassi/vidstream | 1b9d5a06045728981c66c4145e3fe2d63b299569 | [
"MIT"
] | null | null | null | sigiTest/docs/__init__.py | sinagilassi/vidstream | 1b9d5a06045728981c66c4145e3fe2d63b299569 | [
"MIT"
] | null | null | null | from sigiTest.docs.doc_fun1 import dFun1_1
| 21.5 | 42 | 0.860465 | 8 | 43 | 4.375 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0.093023 | 43 | 1 | 43 | 43 | 0.820513 | 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 | 1 | 0 | 0 | 6 |
6e70a32fc56afea164f0caa6423d9ae22272264d | 194 | py | Python | mockProject/garden/views.py | melissa-24/intro-Django-Mock | 1327f7891e9ab91c16f8867dd6d123221e195d9f | [
"MIT"
] | null | null | null | mockProject/garden/views.py | melissa-24/intro-Django-Mock | 1327f7891e9ab91c16f8867dd6d123221e195d9f | [
"MIT"
] | null | null | null | mockProject/garden/views.py | melissa-24/intro-Django-Mock | 1327f7891e9ab91c16f8867dd6d123221e195d9f | [
"MIT"
] | null | null | null | from django.http import HttpResponse
def index(request):
return HttpResponse("Hello World! Welcome to my Gardening Website")
def about(request):
return HttpResponse("About my Gardens") | 27.714286 | 71 | 0.768041 | 25 | 194 | 5.96 | 0.72 | 0.174497 | 0.33557 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.149485 | 194 | 7 | 72 | 27.714286 | 0.90303 | 0 | 0 | 0 | 0 | 0 | 0.307692 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.2 | 0.4 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
6e786fe6c30b82a2f720b59ea5a1d7e98b6169c3 | 122 | py | Python | libforget/version.py | RobbiNespu/forget | b54a26cf8fc1561662dd231609db2962bebee53e | [
"0BSD"
] | 157 | 2017-08-07T20:05:24.000Z | 2022-03-14T00:37:15.000Z | libforget/version.py | RobbiNespu/forget | b54a26cf8fc1561662dd231609db2962bebee53e | [
"0BSD"
] | 470 | 2017-08-08T07:42:38.000Z | 2022-03-04T21:32:07.000Z | libforget/version.py | RobbiNespu/forget | b54a26cf8fc1561662dd231609db2962bebee53e | [
"0BSD"
] | 13 | 2017-08-29T16:46:53.000Z | 2021-11-09T08:25:11.000Z | from app import app
def url_for_version(ver):
return app.config['CHANGELOG_URL'].format(hash=ver['full-revisionid'])
| 24.4 | 74 | 0.754098 | 19 | 122 | 4.684211 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106557 | 122 | 4 | 75 | 30.5 | 0.816514 | 0 | 0 | 0 | 0 | 0 | 0.229508 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 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 | 1 | 1 | 1 | 0 | 0 | 6 |
42e13aa78157f8a6498039265be24e0e6249608d | 41 | py | Python | 01.Complete Python Bootcamp - JP/mymodule.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 3 | 2020-06-01T04:17:18.000Z | 2020-12-18T03:05:55.000Z | 01.Complete Python Bootcamp - JP/mymodule.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 1 | 2020-04-25T08:01:59.000Z | 2020-04-25T08:01:59.000Z | 01.Complete Python Bootcamp - JP/mymodule.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 7 | 2020-04-26T10:02:36.000Z | 2021-06-08T05:12:46.000Z | def myfunc():
print("just my function.") | 20.5 | 27 | 0.682927 | 6 | 41 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121951 | 41 | 2 | 27 | 20.5 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0.404762 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
42f7ec640238b7460bb5ddb0d8914f227f5deffb | 161 | py | Python | src/cv_datalib/transform.py | kubic71/cv-datalib | a598d4a3e617640a41fb0fac446ac9af5b2b014b | [
"MIT"
] | null | null | null | src/cv_datalib/transform.py | kubic71/cv-datalib | a598d4a3e617640a41fb0fac446ac9af5b2b014b | [
"MIT"
] | null | null | null | src/cv_datalib/transform.py | kubic71/cv-datalib | a598d4a3e617640a41fb0fac446ac9af5b2b014b | [
"MIT"
] | null | null | null | from cv_datalib.dataset import Split
class Transform:
def __init__(self):
pass
def transform(self, split: Split) -> Split:
return split | 20.125 | 47 | 0.664596 | 20 | 161 | 5.1 | 0.65 | 0.196078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.26087 | 161 | 8 | 48 | 20.125 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.166667 | 0.166667 | 0.166667 | 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 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 6 |
6e4e973de0830013e618e74565fa4d963da4f0ad | 236 | py | Python | uiautomator/json_rpc_error.py | anuraagbaishya/uiautomator | e74de3bb579f623c66c47e5b3cbc1efd69180122 | [
"MIT"
] | null | null | null | uiautomator/json_rpc_error.py | anuraagbaishya/uiautomator | e74de3bb579f623c66c47e5b3cbc1efd69180122 | [
"MIT"
] | null | null | null | uiautomator/json_rpc_error.py | anuraagbaishya/uiautomator | e74de3bb579f623c66c47e5b3cbc1efd69180122 | [
"MIT"
] | null | null | null | class JsonRPCError(Exception):
def __init__(self, code, message):
self.code = int(code)
self.message = message
def __str__(self):
return "JsonRPC Error code: %d, Message: %s" % (self.code, self.message) | 29.5 | 80 | 0.631356 | 29 | 236 | 4.862069 | 0.517241 | 0.170213 | 0.212766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.241525 | 236 | 8 | 80 | 29.5 | 0.78771 | 0 | 0 | 0 | 0 | 0 | 0.147679 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0.166667 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
28300023f0e988c9904ad06d8449bc96f3f2b4d7 | 69 | py | Python | datasnap/__init__.py | obviousneil/datasnap | e9b1090cd3ae5591bd5027efcc1ffcd382f88906 | [
"MIT"
] | null | null | null | datasnap/__init__.py | obviousneil/datasnap | e9b1090cd3ae5591bd5027efcc1ffcd382f88906 | [
"MIT"
] | null | null | null | datasnap/__init__.py | obviousneil/datasnap | e9b1090cd3ae5591bd5027efcc1ffcd382f88906 | [
"MIT"
] | null | null | null | from .datasnap import datasnap
from .shallow_walk import shallow_walk | 34.5 | 38 | 0.869565 | 10 | 69 | 5.8 | 0.5 | 0.37931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.101449 | 69 | 2 | 38 | 34.5 | 0.935484 | 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 | 1 | 0 | 0 | 6 |
95530a4f189597119300d664418b8a50fec46560 | 1,983 | py | Python | tests/test_pdf.py | akhmerov/jupyter-book | 06b8134af1266655717df474438bed2569b14efe | [
"BSD-3-Clause"
] | 1 | 2021-04-26T03:21:49.000Z | 2021-04-26T03:21:49.000Z | tests/test_pdf.py | akhmerov/jupyter-book | 06b8134af1266655717df474438bed2569b14efe | [
"BSD-3-Clause"
] | 1 | 2020-08-26T08:27:27.000Z | 2020-08-27T18:00:42.000Z | tests/test_pdf.py | phaustin/jupyter-book | 674b222d44cc1acb858804782cee4549eef03fb1 | [
"BSD-3-Clause"
] | null | null | null | """Testing PDF functionality of the CLI."""
from pathlib import Path
from subprocess import run
path_tests = Path(__file__).parent
def test_pdfhtml(tmpdir):
path_output = Path(tmpdir).absolute()
# test for build
path_template = path_tests.parent.joinpath("jupyter_book", "book_template")
cmd = f"jb build {path_template} --path-output {path_output} --builder pdfhtml"
run(cmd.split(), check=True)
path_html = path_output.joinpath("_build", "html")
path_pdf = path_output.joinpath("_build", "pdf")
assert path_html.joinpath("index.html").exists()
assert path_pdf.joinpath("book.pdf").exists()
# test for page
path_page = path_tests.parent.joinpath("jupyter_book", "book_template").joinpath(
"markdown.md"
)
cmd = f"jb build {path_page} --path-output {path_output} --builder pdfhtml"
run(cmd.split(), check=True)
path_html = path_output.joinpath("_build", "_page", "markdown", "html")
path_pdf = path_output.joinpath("_build", "_page", "markdown", "pdf")
assert path_html.joinpath("markdown.html").exists()
assert path_pdf.joinpath("markdown.pdf").exists()
# TODO: Update to include more detailed tests for pdflatex build chain
def test_pdflatex(tmpdir):
path_output = Path(tmpdir).absolute()
# test for build
path_template = path_tests.parent.joinpath("jupyter_book", "book_template")
cmd = f"jb build {path_template} --path-output {path_output} --builder pdflatex"
run(cmd.split(), check=True)
path_pdf = path_output.joinpath("_build", "latex")
assert path_pdf.joinpath("book.pdf").exists()
# test for page
path_page = path_tests.parent.joinpath("jupyter_book", "book_template").joinpath(
"markdown.md"
)
cmd = f"jb build {path_page} --path-output {path_output} --builder pdflatex"
run(cmd.split(), check=True)
path_pdf = path_output.joinpath("_build", "_page", "markdown", "latex")
assert path_pdf.joinpath("book.pdf").exists()
| 38.134615 | 85 | 0.695411 | 264 | 1,983 | 4.996212 | 0.189394 | 0.121304 | 0.063685 | 0.104625 | 0.837756 | 0.799848 | 0.759666 | 0.730857 | 0.656558 | 0.656558 | 0 | 0 | 0.15885 | 1,983 | 51 | 86 | 38.882353 | 0.790767 | 0.083207 | 0 | 0.428571 | 0 | 0 | 0.306416 | 0 | 0 | 0 | 0 | 0.019608 | 0.171429 | 1 | 0.057143 | false | 0 | 0.057143 | 0 | 0.114286 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
957613837c97fefceb8645aa04b022a69d1bccc5 | 3,078 | py | Python | tests/brands/conftest.py | oso1248/budAPI | 87c5b1d41249273e30f6b590d9218afe195047e6 | [
"MIT"
] | null | null | null | tests/brands/conftest.py | oso1248/budAPI | 87c5b1d41249273e30f6b590d9218afe195047e6 | [
"MIT"
] | null | null | null | tests/brands/conftest.py | oso1248/budAPI | 87c5b1d41249273e30f6b590d9218afe195047e6 | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def test_brewing_data(admin_authorized_client):
data = [
{
"name": "brw1",
"is_organic": False,
"is_hop_kettle": True,
"is_hop_dry": False,
"is_addition": False,
"note": "string",
"is_active": True
},
{
"name": "brw2",
"is_organic": False,
"is_hop_kettle": True,
"is_hop_dry": False,
"is_addition": False,
"note": "string",
"is_active": True
}
]
for brand in data:
res = admin_authorized_client.post('/brands/brewing', json=brand)
assert res.status_code == 201
return data
@pytest.fixture
def test_finishing_data(admin_authorized_client, test_brewing_data):
data = [
{
"name": "fin1",
"is_pre_injection": False,
"is_post_injection": False,
"is_bypass": False,
"is_organic": False,
"note": "string",
"is_active": True,
"id_brewing": 1
},
{
"name": "fin2",
"is_pre_injection": False,
"is_post_injection": False,
"is_bypass": False,
"is_organic": False,
"note": "string",
"is_active": True,
"id_brewing": 1
},
{
"name": "fin3",
"is_pre_injection": False,
"is_post_injection": False,
"is_bypass": False,
"is_organic": False,
"note": "string",
"is_active": True,
"id_brewing": 2
},
{
"name": "fin4",
"is_pre_injection": False,
"is_post_injection": False,
"is_bypass": False,
"is_organic": False,
"note": "string",
"is_active": True,
"id_brewing": 2
}
]
for brand in data:
res = admin_authorized_client.post('/brands/finishing', json=brand)
assert res.status_code == 201
return data
@pytest.fixture
def test_packaging_data(admin_authorized_client, test_finishing_data):
data = [
{
"name": "pck1",
"is_organic": False,
"note": "string",
"is_active": True,
"id_finishing": 1
},
{
"name": "pck2",
"is_organic": False,
"note": "string",
"is_active": True,
"id_finishing": 2
},
{
"name": "pck3",
"is_organic": False,
"note": "string",
"is_active": True,
"id_finishing": 3
},
{
"name": "pck4",
"is_organic": False,
"note": "string",
"is_active": True,
"id_finishing": 4
}
]
for brand in data:
res = admin_authorized_client.post('/brands/packaging', json=brand)
assert res.status_code == 201
return data
| 25.438017 | 75 | 0.459064 | 288 | 3,078 | 4.618056 | 0.1875 | 0.084211 | 0.105263 | 0.12782 | 0.835338 | 0.791729 | 0.791729 | 0.791729 | 0.791729 | 0.760902 | 0 | 0.014983 | 0.414555 | 3,078 | 120 | 76 | 25.65 | 0.723085 | 0 | 0 | 0.603604 | 0 | 0 | 0.241391 | 0 | 0 | 0 | 0 | 0 | 0.027027 | 1 | 0.027027 | false | 0.036036 | 0.009009 | 0 | 0.063063 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
95d0a87619fc66184b69905954e6ad3090d44633 | 24 | py | Python | tests/__init__.py | cooperbrandon1/oddsjam-api | 1d1170ba74fa1705cc786a96ab12a8cf5fa19dff | [
"MIT"
] | 3 | 2021-11-02T14:07:31.000Z | 2021-12-03T01:15:53.000Z | tests/__init__.py | cooperbrandon1/oddsjam-api | 1d1170ba74fa1705cc786a96ab12a8cf5fa19dff | [
"MIT"
] | null | null | null | tests/__init__.py | cooperbrandon1/oddsjam-api | 1d1170ba74fa1705cc786a96ab12a8cf5fa19dff | [
"MIT"
] | 2 | 2022-02-17T09:31:04.000Z | 2022-02-23T04:16:51.000Z | from . import UnitTests; | 24 | 24 | 0.791667 | 3 | 24 | 6.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 24 | 1 | 24 | 24 | 0.904762 | 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 | 1 | 0 | 0 | 6 |
95e9ed273cee31a4c521937b44c069625725d0dc | 37,761 | py | Python | climate/tests/plugins/test_physical_host_plugin.py | frossigneux/blazar | f50a73b9ae6fc2243446084150f968cc712147bf | [
"Apache-2.0"
] | 3 | 2015-01-16T18:15:14.000Z | 2015-08-26T09:48:10.000Z | climate/tests/plugins/test_physical_host_plugin.py | frossigneux/blazar | f50a73b9ae6fc2243446084150f968cc712147bf | [
"Apache-2.0"
] | null | null | null | climate/tests/plugins/test_physical_host_plugin.py | frossigneux/blazar | f50a73b9ae6fc2243446084150f968cc712147bf | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Bull.
#
# 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.
import datetime
import uuid
import mock
from novaclient import client as nova_client
import testtools
from climate import context
from climate.db import api as db_api
from climate.db import exceptions as db_exceptions
from climate.db import utils as db_utils
from climate.manager import exceptions as manager_exceptions
from climate.manager import service
from climate.plugins import oshosts as plugin
from climate.plugins.oshosts import host_plugin
from climate.plugins.oshosts import nova_inventory
from climate.plugins.oshosts import reservation_pool as rp
from climate import tests
from climate.utils.openstack import base
from climate.utils import trusts
class AggregateFake(object):
def __init__(self, i, name, hosts):
self.id = i
self.name = name
self.hosts = hosts
class PhysicalHostPlugingSetupOnlyTestCase(tests.TestCase):
def setUp(self):
super(PhysicalHostPlugingSetupOnlyTestCase, self).setUp()
self.context = context
self.patch(self.context, 'ClimateContext')
self.patch(base, 'url_for').return_value = 'http://foo.bar'
self.host_plugin = host_plugin
self.fake_phys_plugin = self.host_plugin.PhysicalHostPlugin()
self.rp = rp
self.nova_inventory = nova_inventory
self.rp_create = self.patch(self.rp.ReservationPool, 'create')
self.db_api = db_api
self.db_host_extra_capability_get_all_per_host = (
self.patch(self.db_api, 'host_extra_capability_get_all_per_host'))
def test_setup(self):
pool = self.patch(self.rp.ReservationPool, '__init__')
pool.return_value = None
inventory = self.patch(self.nova_inventory.NovaInventory, '__init__')
inventory.return_value = None
freepool_exist = self.patch(self.fake_phys_plugin, '_freepool_exists')
freepool_exist.return_value = False
self.fake_phys_plugin.setup(None)
pool.assert_called_once_with()
inventory.assert_called_once_with()
def test__get_extra_capabilities_with_values(self):
self.db_host_extra_capability_get_all_per_host.return_value = [
{'id': 1,
'capability_name': 'foo',
'capability_value': 'bar',
'other': 'value',
'computehost_id': 1
},
{'id': 2,
'capability_name': 'buzz',
'capability_value': 'word',
'computehost_id': 1
}]
res = self.fake_phys_plugin._get_extra_capabilities(1)
self.assertEqual({'foo': 'bar', 'buzz': 'word'}, res)
def test__get_extra_capabilities_with_no_capabilities(self):
self.db_host_extra_capability_get_all_per_host.return_value = []
res = self.fake_phys_plugin._get_extra_capabilities(1)
self.assertEqual({}, res)
class PhysicalHostPluginTestCase(tests.TestCase):
def setUp(self):
super(PhysicalHostPluginTestCase, self).setUp()
self.context = context
self.patch(self.context, 'ClimateContext')
self.nova_client = nova_client
self.nova = self.patch(self.nova_client, 'Client').return_value
self.service = service
self.manager = self.service.ManagerService()
self.fake_host_id = '1'
self.fake_host = {
'id': self.fake_host_id,
'hypervisor_hostname': 'foo',
'service_name': 'foo',
'vcpus': 4,
'cpu_info': 'foo',
'hypervisor_type': 'xen',
'hypervisor_version': 1,
'memory_mb': 8192,
'local_gb': 10,
'trust_id': 'exxee111qwwwwe',
}
self.patch(base, 'url_for').return_value = 'http://foo.bar'
self.host_plugin = host_plugin
self.fake_phys_plugin = self.host_plugin.PhysicalHostPlugin()
self.db_api = db_api
self.db_utils = db_utils
self.db_host_get = self.patch(self.db_api, 'host_get')
self.db_host_get.return_value = self.fake_host
self.db_host_list = self.patch(self.db_api, 'host_list')
self.db_host_create = self.patch(self.db_api, 'host_create')
self.db_host_update = self.patch(self.db_api, 'host_update')
self.db_host_destroy = self.patch(self.db_api, 'host_destroy')
self.db_host_extra_capability_get_all_per_host = self.patch(
self.db_api, 'host_extra_capability_get_all_per_host')
self.db_host_extra_capability_get_all_per_name = self.patch(
self.db_api, 'host_extra_capability_get_all_per_name')
self.db_host_extra_capability_create = self.patch(
self.db_api, 'host_extra_capability_create')
self.db_host_extra_capability_update = self.patch(
self.db_api, 'host_extra_capability_update')
self.rp = rp
self.nova_inventory = nova_inventory
self.rp_create = self.patch(self.rp.ReservationPool, 'create')
self.patch(self.rp.ReservationPool, 'get_aggregate_from_name_or_id')
self.add_compute_host = self.patch(self.rp.ReservationPool,
'add_computehost')
self.remove_compute_host = self.patch(self.rp.ReservationPool,
'remove_computehost')
self.get_host_details = self.patch(self.nova_inventory.NovaInventory,
'get_host_details')
self.get_host_details.return_value = self.fake_host
self.get_servers_per_host = self.patch(
self.nova_inventory.NovaInventory, 'get_servers_per_host')
self.get_servers_per_host.return_value = None
self.get_extra_capabilities = self.patch(
self.fake_phys_plugin, '_get_extra_capabilities')
self.get_extra_capabilities.return_value = {
'foo': 'bar',
'buzz': 'word',
}
self.fake_phys_plugin.setup(None)
self.trusts = trusts
self.trust_ctx = self.patch(self.trusts, 'create_ctx_from_trust')
self.trust_create = self.patch(self.trusts, 'create_trust')
def test_get_host(self):
host = self.fake_phys_plugin.get_computehost(self.fake_host_id)
self.db_host_get.assert_called_once_with('1')
expected = self.fake_host.copy()
expected.update({'foo': 'bar', 'buzz': 'word'})
self.assertEqual(host, expected)
def test_get_host_without_extracapabilities(self):
self.get_extra_capabilities.return_value = {}
host = self.fake_phys_plugin.get_computehost(self.fake_host_id)
self.db_host_get.assert_called_once_with('1')
self.assertEqual(host, self.fake_host)
@testtools.skip('incorrect decorator')
def test_list_hosts(self):
self.fake_phys_plugin.list_computehosts()
self.db_host_list.assert_called_once_with()
del self.service_utils
def test_create_host_without_extra_capabilities(self):
self.get_extra_capabilities.return_value = {}
host = self.fake_phys_plugin.create_computehost(self.fake_host)
self.db_host_create.assert_called_once_with(self.fake_host)
self.assertEqual(host, self.fake_host)
def test_create_host_with_extra_capabilities(self):
fake_host = self.fake_host.copy()
fake_host.update({'foo': 'bar'})
# NOTE(sbauza): 'id' will be pop'd, we need to keep track of it
fake_request = fake_host.copy()
fake_capa = {'computehost_id': '1',
'capability_name': 'foo',
'capability_value': 'bar',
}
self.get_extra_capabilities.return_value = {'foo': 'bar'}
self.db_host_create.return_value = self.fake_host
host = self.fake_phys_plugin.create_computehost(fake_request)
self.db_host_create.assert_called_once_with(self.fake_host)
self.db_host_extra_capability_create.assert_called_once_with(fake_capa)
self.assertEqual(host, fake_host)
def test_create_host_without_trust_id(self):
self.assertRaises(manager_exceptions.MissingTrustId,
self.fake_phys_plugin.create_computehost, {})
def test_create_host_without_host_id(self):
self.assertRaises(manager_exceptions.InvalidHost,
self.fake_phys_plugin.create_computehost,
{'trust_id': 'exxee111qwwwwe'})
def test_create_host_with_existing_vms(self):
self.get_servers_per_host.return_value = ['server1', 'server2']
self.assertRaises(manager_exceptions.HostHavingServers,
self.fake_phys_plugin.create_computehost,
self.fake_host)
def test_create_host_issuing_rollback(self):
def fake_db_host_create(*args, **kwargs):
raise db_exceptions.ClimateDBException
self.db_host_create.side_effect = fake_db_host_create
host = self.fake_phys_plugin.create_computehost(self.fake_host)
self.assertEqual(None, host)
def test_create_host_having_issue_when_storing_extra_capability(self):
def fake_db_host_extra_capability_create(*args, **kwargs):
raise db_exceptions.ClimateDBException
fake_host = self.fake_host.copy()
fake_host.update({'foo': 'bar'})
fake_request = fake_host.copy()
self.get_extra_capabilities.return_value = {'foo': 'bar'}
self.db_host_create.return_value = self.fake_host
fake = self.db_host_extra_capability_create
fake.side_effect = fake_db_host_extra_capability_create
self.assertRaises(manager_exceptions.CantAddExtraCapability,
self.fake_phys_plugin.create_computehost,
fake_request)
def test_update_host(self):
host_values = {'foo': 'baz'}
self.db_host_extra_capability_get_all_per_name.return_value = [
{'id': '1',
'capability_name': 'foo',
'capability_value': 'bar'
},
]
self.fake_phys_plugin.update_computehost(self.fake_host_id,
host_values)
self.db_host_extra_capability_update.assert_called_once_with(
'1', {'capability_name': 'foo', 'capability_value': 'baz'})
def test_update_host_having_issue_when_storing_extra_capability(self):
def fake_db_host_extra_capability_update(*args, **kwargs):
raise RuntimeError
host_values = {'foo': 'baz'}
self.db_host_extra_capability_get_all_per_name.return_value = [
{'id': '1',
'capability_name': 'foo',
'capability_value': 'bar'
},
]
fake = self.db_host_extra_capability_update
fake.side_effect = fake_db_host_extra_capability_update
self.assertRaises(manager_exceptions.CantAddExtraCapability,
self.fake_phys_plugin.update_computehost,
self.fake_host_id, host_values)
def test_delete_host(self):
self.fake_phys_plugin.delete_computehost(self.fake_host_id)
self.db_host_destroy.assert_called_once_with(self.fake_host_id)
self.get_servers_per_host.assert_called_once_with(
self.fake_host["hypervisor_hostname"])
def test_delete_host_having_vms(self):
self.get_servers_per_host.return_value = ['server1', 'server2']
self.assertRaises(manager_exceptions.HostHavingServers,
self.fake_phys_plugin.delete_computehost,
self.fake_host_id)
self.get_servers_per_host.assert_called_once_with(
self.fake_host["hypervisor_hostname"])
def test_delete_host_not_existing_in_db(self):
self.db_host_get.return_value = None
self.assertRaises(manager_exceptions.HostNotFound,
self.fake_phys_plugin.delete_computehost,
self.fake_host_id)
def test_delete_host_issuing_rollback(self):
def fake_db_host_destroy(*args, **kwargs):
raise db_exceptions.ClimateDBException
self.db_host_destroy.side_effect = fake_db_host_destroy
self.assertRaises(manager_exceptions.CantRemoveHost,
self.fake_phys_plugin.delete_computehost,
self.fake_host_id)
def test_create_reservation_no_hosts_available(self):
values = {
'lease_id': u'018c1b43-e69e-4aef-a543-09681539cf4c',
'min': u'1',
'max': u'1',
'hypervisor_properties': '["=", "$memory_mb", "256"]',
'resource_properties': '',
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00),
'resource_type': plugin.RESOURCE_TYPE,
}
reservation_values = {
'id': u'441c1476-9f8f-4700-9f30-cd9b6fef3509',
'lease_id': u'018c1b43-e69e-4aef-a543-09681539cf4c',
'resource_id': '1',
'resource_type': plugin.RESOURCE_TYPE,
'status': 'pending',
}
uuid4 = self.patch(uuid, 'uuid4')
uuid4.return_value = uuid.UUID('441c1476-9f8f-4700-9f30-cd9b6fef3509')
self.rp_create.return_value = mock.MagicMock(id='1')
reservation_create = self.patch(self.db_api, 'reservation_create')
reservation_create.return_value = {
'id': u'f9894fcf-e2ed-41e9-8a4c-92fac332608e',
}
host_reservation_create = self.patch(self.db_api,
'host_reservation_create')
matching_hosts = self.patch(self.fake_phys_plugin, '_matching_hosts')
matching_hosts.return_value = []
self.assertRaises(manager_exceptions.NotEnoughHostsAvailable,
self.fake_phys_plugin.create_reservation, values)
reservation_create.assert_called_once_with(reservation_values)
host_values = {
'reservation_id': u'f9894fcf-e2ed-41e9-8a4c-92fac332608e',
'resource_properties': '',
'hypervisor_properties': '["=", "$memory_mb", "256"]',
'count_range': '1-1',
'status': 'pending'
}
host_reservation_create.assert_called_once_with(host_values)
def test_create_reservation_hosts_available(self):
values = {
'lease_id': u'018c1b43-e69e-4aef-a543-09681539cf4c',
'min': u'1',
'max': u'1',
'hypervisor_properties': '["=", "$memory_mb", "256"]',
'resource_properties': '',
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00),
'resource_type': plugin.RESOURCE_TYPE,
}
reservation_values = {
'id': u'441c1476-9f8f-4700-9f30-cd9b6fef3509',
'lease_id': u'018c1b43-e69e-4aef-a543-09681539cf4c',
'resource_id': '1',
'resource_type': plugin.RESOURCE_TYPE,
'status': 'pending',
}
uuid4 = self.patch(uuid, 'uuid4')
uuid4.return_value = uuid.UUID('441c1476-9f8f-4700-9f30-cd9b6fef3509')
self.rp_create.return_value = mock.MagicMock(id='1')
reservation_create = self.patch(self.db_api, 'reservation_create')
reservation_create.return_value = {
'id': u'f9894fcf-e2ed-41e9-8a4c-92fac332608e',
}
host_reservation_create = self.patch(self.db_api,
'host_reservation_create')
matching_hosts = self.patch(self.fake_phys_plugin, '_matching_hosts')
matching_hosts.return_value = ['host1', 'host2']
host_allocation_create = self.patch(
self.db_api,
'host_allocation_create')
self.fake_phys_plugin.create_reservation(values)
reservation_create.assert_called_once_with(reservation_values)
host_values = {
'reservation_id': u'f9894fcf-e2ed-41e9-8a4c-92fac332608e',
'resource_properties': '',
'hypervisor_properties': '["=", "$memory_mb", "256"]',
'count_range': '1-1',
'status': 'pending',
}
host_reservation_create.assert_called_once_with(host_values)
calls = [
mock.call(
{'compute_host_id': 'host1',
'reservation_id': u'f9894fcf-e2ed-41e9-8a4c-92fac332608e',
}),
mock.call(
{'compute_host_id': 'host2',
'reservation_id': u'f9894fcf-e2ed-41e9-8a4c-92fac332608e',
}),
]
host_allocation_create.assert_has_calls(calls)
def test_update_reservation_shorten(self):
values = {
'start_date': datetime.datetime(2013, 12, 19, 20, 30),
'end_date': datetime.datetime(2013, 12, 19, 21, 00)
}
reservation_get = self.patch(self.db_api, 'reservation_get')
reservation_get.return_value = {
'lease_id': u'10870923-6d56-45c9-b592-f788053f5baa',
'resource_id': u'91253650-cc34-4c4f-bbe8-c943aa7d0c9b'
}
lease_get = self.patch(self.db_api, 'lease_get')
lease_get.return_value = {
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00)
}
host_allocation_get_all = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
get_computehosts = self.patch(self.rp.ReservationPool,
'get_computehosts')
get_computehosts.return_value = ['host1']
self.fake_phys_plugin.update_reservation(
'706eb3bc-07ed-4383-be93-b32845ece672',
values)
host_allocation_get_all.assert_not_called()
def test_update_reservation_extend(self):
values = {
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 30)
}
reservation_get = self.patch(self.db_api, 'reservation_get')
reservation_get.return_value = {
'lease_id': u'10870923-6d56-45c9-b592-f788053f5baa',
'resource_id': u'91253650-cc34-4c4f-bbe8-c943aa7d0c9b'
}
lease_get = self.patch(self.db_api, 'lease_get')
lease_get.return_value = {
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00)
}
host_reservation_get_by_reservation_id = self.patch(
self.db_api,
'host_reservation_get_by_reservation_id')
host_allocation_get_all = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_allocation_get_all.return_value = [
{
'id': u'dd305477-4df8-4547-87f6-69069ee546a6',
'compute_host_id': 'host1'
}
]
get_full_periods = self.patch(self.db_utils, 'get_full_periods')
get_full_periods.return_value = [
(datetime.datetime(2013, 12, 19, 20, 00),
datetime.datetime(2013, 12, 19, 21, 00))
]
get_computehosts = self.patch(self.rp.ReservationPool,
'get_computehosts')
get_computehosts.return_value = ['host1']
self.fake_phys_plugin.update_reservation(
'706eb3bc-07ed-4383-be93-b32845ece672',
values)
host_reservation_get_by_reservation_id.assert_not_called()
def test_update_reservation_move_failure(self):
values = {
'start_date': datetime.datetime(2013, 12, 20, 20, 00),
'end_date': datetime.datetime(2013, 12, 20, 21, 30)
}
reservation_get = self.patch(self.db_api, 'reservation_get')
reservation_get.return_value = {
'lease_id': u'10870923-6d56-45c9-b592-f788053f5baa',
'resource_id': u'91253650-cc34-4c4f-bbe8-c943aa7d0c9b'
}
lease_get = self.patch(self.db_api, 'lease_get')
lease_get.return_value = {
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00)
}
host_reservation_get_by_reservation_id = self.patch(
self.db_api,
'host_reservation_get_by_reservation_id')
host_allocation_get_all = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_allocation_get_all.return_value = [
{
'id': u'dd305477-4df8-4547-87f6-69069ee546a6',
'compute_host_id': 'host1'
}
]
get_full_periods = self.patch(self.db_utils, 'get_full_periods')
get_full_periods.return_value = [
(datetime.datetime(2013, 12, 20, 20, 30),
datetime.datetime(2013, 12, 20, 21, 00))
]
get_computehosts = self.patch(self.rp.ReservationPool,
'get_computehosts')
get_computehosts.return_value = ['host1']
self.patch(self.fake_phys_plugin, '_get_hypervisor_from_name_or_id')
get_hypervisors = self.patch(self.nova.hypervisors, 'get')
get_hypervisors.return_value = mock.MagicMock(running_vms=1)
self.assertRaises(
manager_exceptions.NotEnoughHostsAvailable,
self.fake_phys_plugin.update_reservation,
'706eb3bc-07ed-4383-be93-b32845ece672',
values)
host_reservation_get_by_reservation_id.assert_not_called()
def test_update_reservation_move_overlap(self):
values = {
'start_date': datetime.datetime(2013, 12, 19, 20, 30),
'end_date': datetime.datetime(2013, 12, 19, 21, 30)
}
reservation_get = self.patch(self.db_api, 'reservation_get')
reservation_get.return_value = {
'lease_id': u'10870923-6d56-45c9-b592-f788053f5baa',
'resource_id': u'91253650-cc34-4c4f-bbe8-c943aa7d0c9b'
}
lease_get = self.patch(self.db_api, 'lease_get')
lease_get.return_value = {
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00)
}
host_reservation_get_by_reservation_id = self.patch(
self.db_api,
'host_reservation_get_by_reservation_id')
host_allocation_get_all = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_allocation_get_all.return_value = [
{
'id': u'dd305477-4df8-4547-87f6-69069ee546a6',
'compute_host_id': 'host1'
}
]
get_full_periods = self.patch(self.db_utils, 'get_full_periods')
get_full_periods.return_value = [
(datetime.datetime(2013, 12, 19, 20, 30),
datetime.datetime(2013, 12, 19, 21, 00))
]
get_computehosts = self.patch(self.rp.ReservationPool,
'get_computehosts')
get_computehosts.return_value = []
self.fake_phys_plugin.update_reservation(
'706eb3bc-07ed-4383-be93-b32845ece672',
values)
host_reservation_get_by_reservation_id.assert_not_called()
def test_update_reservation_move_realloc(self):
values = {
'start_date': datetime.datetime(2013, 12, 20, 20, 00),
'end_date': datetime.datetime(2013, 12, 20, 21, 30)
}
reservation_get = self.patch(self.db_api, 'reservation_get')
reservation_get.return_value = {
'lease_id': u'10870923-6d56-45c9-b592-f788053f5baa',
'resource_id': u'91253650-cc34-4c4f-bbe8-c943aa7d0c9b'
}
lease_get = self.patch(self.db_api, 'lease_get')
lease_get.return_value = {
'start_date': datetime.datetime(2013, 12, 19, 20, 00),
'end_date': datetime.datetime(2013, 12, 19, 21, 00)
}
host_get = self.patch(self.db_api, 'host_get')
host_get.return_value = {'service_name': 'host2'}
host_reservation_get_by_reservation_id = self.patch(
self.db_api,
'host_reservation_get_by_reservation_id')
host_allocation_get_all = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_allocation_get_all.return_value = [
{
'id': u'dd305477-4df8-4547-87f6-69069ee546a6',
'compute_host_id': 'host1'
}
]
host_allocation_create = self.patch(
self.db_api,
'host_allocation_create')
host_allocation_destroy = self.patch(
self.db_api,
'host_allocation_destroy')
get_full_periods = self.patch(self.db_utils, 'get_full_periods')
get_full_periods.return_value = [
(datetime.datetime(2013, 12, 20, 20, 30),
datetime.datetime(2013, 12, 20, 21, 00))
]
get_computehosts = self.patch(self.rp.ReservationPool,
'get_computehosts')
get_computehosts.return_value = ['host1']
self.patch(self.fake_phys_plugin, '_get_hypervisor_from_name_or_id')
get_hypervisors = self.patch(self.nova.hypervisors, 'get')
get_hypervisors.return_value = mock.MagicMock(running_vms=0)
matching_hosts = self.patch(self.fake_phys_plugin, '_matching_hosts')
matching_hosts.return_value = ['host2']
self.fake_phys_plugin.update_reservation(
'706eb3bc-07ed-4383-be93-b32845ece672',
values)
host_reservation_get_by_reservation_id.assert_called_with(
'706eb3bc-07ed-4383-be93-b32845ece672')
host_allocation_destroy.assert_called_with(
'dd305477-4df8-4547-87f6-69069ee546a6')
host_allocation_create.assert_called_with(
{
'compute_host_id': 'host2',
'reservation_id': '706eb3bc-07ed-4383-be93-b32845ece672'
}
)
self.remove_compute_host.assert_called_with(
'91253650-cc34-4c4f-bbe8-c943aa7d0c9b',
['host1']
)
self.add_compute_host.assert_called_with(
'91253650-cc34-4c4f-bbe8-c943aa7d0c9b',
'host2'
)
def test_on_start(self):
reservation_get_all_by_values = self.patch(
self.db_api, 'reservation_get_all_by_values')
reservation_get_all_by_values.return_value = [
{
'id': u'593e7028-c0d1-4d76-8642-2ffd890b324c',
'resource_id': u'04de74e8-193a-49d2-9ab8-cba7b49e45e8',
}
]
host_allocation_get_all_by_values = self.patch(
self.db_api, 'host_allocation_get_all_by_values')
host_allocation_get_all_by_values.return_value = [
{'compute_host_id': 'host1'},
]
self.patch(self.fake_phys_plugin, '_set_power_state')
host_get = self.patch(self.db_api, 'host_get')
host_get.return_value = {'service_name': 'host1_hostname'}
add_computehost = self.patch(
self.rp.ReservationPool, 'add_computehost')
self.fake_phys_plugin.on_start(u'04de74e8-193a-49d2-9ab8-cba7b49e45e8')
add_computehost.assert_called_with(
u'04de74e8-193a-49d2-9ab8-cba7b49e45e8', 'host1_hostname')
def test_on_end_with_instances(self):
reservation_get_all_by_values = self.patch(
self.db_api,
'reservation_get_all_by_values')
reservation_get_all_by_values.return_value = [
{
'id': u'593e7028-c0d1-4d76-8642-2ffd890b324c',
'lease_id': u'99bced7a-54f0-46e3-9b9f-9ea25d28ebbb',
'resource_id': u'04de74e8-193a-49d2-9ab8-cba7b49e45e8',
}
]
reservation_update = self.patch(self.db_api, 'reservation_update')
host_reservation_get_by_reservation_id = self.patch(
self.db_api,
'host_reservation_get_by_reservation_id')
host_reservation_get_by_reservation_id.return_value = {
'id': u'35fc4e6a-ba57-4a36-be30-6012377a0387',
}
host_reservation_update = self.patch(
self.db_api,
'host_reservation_update')
host_allocation_get_all_by_values = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_allocation_get_all_by_values.return_value = [
{'id': u'bfa9aa0b-8042-43eb-a4e6-4555838bf64f',
'compute_host_id': u'cdae2a65-236f-475a-977d-f6ad82f828b7',
},
]
host_allocation_destroy = self.patch(
self.db_api,
'host_allocation_destroy')
delete = self.patch(self.rp.ReservationPool, 'delete')
self.patch(self.fake_phys_plugin, '_get_hypervisor_from_name_or_id')
get_hypervisors = self.patch(self.nova.hypervisors, 'get')
get_hypervisors.return_value = mock.MagicMock(running_vms=1)
lease_get = self.patch(
self.db_api,
'lease_get')
lease_get.return_value = {
'end_date': datetime.datetime(2013, 12, 19, 20, 00)
}
sleep = self.patch(self.fake_phys_plugin, '_has_time_to_sleep')
sleep.return_value = False
self.fake_phys_plugin.on_end(u'04de74e8-193a-49d2-9ab8-cba7b49e45e8')
reservation_update.assert_called_with(
u'593e7028-c0d1-4d76-8642-2ffd890b324c', {'status': 'completed'})
host_reservation_update.assert_called_with(
u'35fc4e6a-ba57-4a36-be30-6012377a0387', {'status': 'completed'})
host_allocation_destroy.assert_called_with(
u'bfa9aa0b-8042-43eb-a4e6-4555838bf64f')
assert not delete.called
def test_on_end_without_instances(self):
reservation_get_all_by_values = self.patch(
self.db_api,
'reservation_get_all_by_values')
reservation_get_all_by_values.return_value = [
{
'id': u'593e7028-c0d1-4d76-8642-2ffd890b324c',
'lease_id': u'99bced7a-54f0-46e3-9b9f-9ea25d28ebbb',
'resource_id': u'04de74e8-193a-49d2-9ab8-cba7b49e45e8',
},
]
reservation_update = self.patch(self.db_api, 'reservation_update')
host_reservation_get_by_reservation_id = self.patch(
self.db_api,
'host_reservation_get_by_reservation_id')
host_reservation_get_by_reservation_id.return_value = {
'id': u'35fc4e6a-ba57-4a36-be30-6012377a0387',
}
host_reservation_update = self.patch(
self.db_api,
'host_reservation_update')
host_allocation_get_all_by_values = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_allocation_get_all_by_values.return_value = [
{'id': u'bfa9aa0b-8042-43eb-a4e6-4555838bf64f',
'compute_host_id': u'cdae2a65-236f-475a-977d-f6ad82f828b7',
},
]
host_allocation_destroy = self.patch(
self.db_api,
'host_allocation_destroy')
delete = self.patch(self.rp.ReservationPool, 'delete')
self.patch(self.fake_phys_plugin, '_get_hypervisor_from_name_or_id')
get_hypervisors = self.patch(self.nova.hypervisors, 'get')
get_hypervisors.return_value = mock.MagicMock(running_vms=0)
lease_get = self.patch(
self.db_api,
'lease_get')
lease_get.return_value = {
'end_date': datetime.datetime(2013, 12, 19, 20, 00)
}
sleep = self.patch(self.fake_phys_plugin, '_has_time_to_sleep')
sleep.return_value = False
self.fake_phys_plugin.on_end(u'04de74e8-193a-49d2-9ab8-cba7b49e45e8')
reservation_update.assert_called_with(
u'593e7028-c0d1-4d76-8642-2ffd890b324c', {'status': 'completed'})
host_reservation_update.assert_called_with(
u'35fc4e6a-ba57-4a36-be30-6012377a0387', {'status': 'completed'})
host_allocation_destroy.assert_called_with(
u'bfa9aa0b-8042-43eb-a4e6-4555838bf64f')
delete.assert_called_with(u'04de74e8-193a-49d2-9ab8-cba7b49e45e8')
def test_matching_hosts_not_allocated_hosts(self):
def host_allocation_get_all_by_values(**kwargs):
if kwargs['compute_host_id'] == 'host1':
return True
host_get = self.patch(
self.db_api,
'host_get_all_by_queries')
host_get.return_value = [
{'id': 'host1'},
{'id': 'host2'},
{'id': 'host3'},
]
host_get = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_get.side_effect = host_allocation_get_all_by_values
host_get = self.patch(
self.db_utils,
'get_free_periods')
host_get.return_value = [
(datetime.datetime(2013, 12, 19, 20, 00),
datetime.datetime(2013, 12, 19, 21, 00)),
]
result = self.fake_phys_plugin._matching_hosts(
'[]', '[]', '1-3',
datetime.datetime(2013, 12, 19, 20, 00),
datetime.datetime(2013, 12, 19, 21, 00))
self.assertEqual(['host2', 'host3'], result)
def test_matching_hosts_allocated_hosts(self):
def host_allocation_get_all_by_values(**kwargs):
if kwargs['compute_host_id'] == 'host1':
return True
host_get = self.patch(
self.db_api,
'host_get_all_by_queries')
host_get.return_value = [
{'id': 'host1'},
{'id': 'host2'},
{'id': 'host3'},
]
host_get = self.patch(
self.db_api,
'host_allocation_get_all_by_values')
host_get.side_effect = host_allocation_get_all_by_values
host_get = self.patch(
self.db_utils,
'get_free_periods')
host_get.return_value = [
(datetime.datetime(2013, 12, 19, 20, 00),
datetime.datetime(2013, 12, 19, 21, 00)),
]
result = self.fake_phys_plugin._matching_hosts(
'[]', '[]', '3-3',
datetime.datetime(2013, 12, 19, 20, 00),
datetime.datetime(2013, 12, 19, 21, 00))
self.assertEqual(['host1', 'host2', 'host3'], result)
def test_matching_hosts_not_matching(self):
host_get = self.patch(
self.db_api,
'host_get_all_by_queries')
host_get.return_value = []
result = self.fake_phys_plugin._matching_hosts(
'["=", "$memory_mb", "2048"]', '[]', '1-1',
datetime.datetime(2013, 12, 19, 20, 00),
datetime.datetime(2013, 12, 19, 21, 00))
self.assertEqual([], result)
def test_convert_requirements_empty(self):
request = '[]'
result = self.fake_phys_plugin._convert_requirements(request)
self.assertEqual([], result)
def test_convert_requirements_small(self):
request = '["=", "$memory", "4096"]'
result = self.fake_phys_plugin._convert_requirements(request)
self.assertEqual(['memory == 4096'], result)
def test_convert_requirements_with_incorrect_syntax_1(self):
self.assertRaises(
manager_exceptions.MalformedRequirements,
self.fake_phys_plugin._convert_requirements,
'["a", "$memory", "4096"]')
def test_convert_requirements_with_incorrect_syntax_2(self):
self.assertRaises(
manager_exceptions.MalformedRequirements,
self.fake_phys_plugin._convert_requirements,
'["=", "memory", "4096"]')
def test_convert_requirements_with_incorrect_syntax_3(self):
self.assertRaises(
manager_exceptions.MalformedRequirements,
self.fake_phys_plugin._convert_requirements,
'["=", "$memory", 4096]')
def test_convert_requirements_complex(self):
request = '["and", [">", "$memory", "4096"], [">", "$disk", "40"]]'
result = self.fake_phys_plugin._convert_requirements(request)
self.assertEqual(['memory > 4096', 'disk > 40'], result)
def test_convert_requirements_complex_with_incorrect_syntax_1(self):
self.assertRaises(
manager_exceptions.MalformedRequirements,
self.fake_phys_plugin._convert_requirements,
'["and", [">", "memory", "4096"], [">", "$disk", "40"]]')
def test_convert_requirements_complex_with_incorrect_syntax_2(self):
self.assertRaises(
manager_exceptions.MalformedRequirements,
self.fake_phys_plugin._convert_requirements,
'["fail", [">", "$memory", "4096"], [">", "$disk", "40"]]')
def test_convert_requirements_complex_with_not_json_value(self):
self.assertRaises(
manager_exceptions.MalformedRequirements,
self.fake_phys_plugin._convert_requirements,
'something')
| 42.910227 | 79 | 0.627129 | 4,351 | 37,761 | 5.080211 | 0.080901 | 0.043567 | 0.060577 | 0.04411 | 0.859075 | 0.8289 | 0.782302 | 0.747602 | 0.719508 | 0.690463 | 0 | 0.071863 | 0.267763 | 37,761 | 879 | 80 | 42.959044 | 0.727559 | 0.016075 | 0 | 0.609355 | 0 | 0 | 0.180839 | 0.097959 | 0 | 0 | 0 | 0 | 0.08091 | 1 | 0.063211 | false | 0 | 0.022756 | 0 | 0.092288 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 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 | 6 |
25114d9f3fd53f04842ab534b435a76a02178af7 | 27 | py | Python | scripts/core/labels/__init__.py | mohitt533/medialytics | 2a89fc3028eb814179cd51c25a8dd7aa9c6a81bf | [
"MIT"
] | 1 | 2019-02-28T16:01:29.000Z | 2019-02-28T16:01:29.000Z | scripts/core/labels/__init__.py | mohitt533/medialytics | 2a89fc3028eb814179cd51c25a8dd7aa9c6a81bf | [
"MIT"
] | null | null | null | scripts/core/labels/__init__.py | mohitt533/medialytics | 2a89fc3028eb814179cd51c25a8dd7aa9c6a81bf | [
"MIT"
] | null | null | null | from .Vision import Vision
| 13.5 | 26 | 0.814815 | 4 | 27 | 5.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 27 | 1 | 27 | 27 | 0.956522 | 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 | 1 | 0 | 0 | 6 |
25289f42d3b163279ef38d6dbc04c616752f9ea3 | 464 | py | Python | projects/midcurvenn/misc/main_denoiser_encoderdecoder.py | futureseadev/hgwxx7 | 282b370afc7d9c277e6c1f5b31282f14f9236f7b | [
"MIT"
] | 6 | 2018-06-21T09:44:36.000Z | 2021-10-01T18:37:41.000Z | projects/midcurvenn/misc/main_denoiser_encoderdecoder.py | futureseadev/hgwxx7 | 282b370afc7d9c277e6c1f5b31282f14f9236f7b | [
"MIT"
] | 15 | 2020-01-28T22:56:15.000Z | 2022-03-11T23:55:52.000Z | projects/midcurvenn/misc/main_denoiser_encoderdecoder.py | praveentn/hgwxx7 | 282b370afc7d9c277e6c1f5b31282f14f9236f7b | [
"MIT"
] | 2 | 2018-06-25T16:40:20.000Z | 2021-10-01T18:37:42.000Z | from prepare_data import get_training_data
from prepare_plots import plot_results
from build_simple_encoderdecoder_w_denoiser_model import simple_encoderdecoder_w_denoiser
if __name__ == "__main__":
profile_pngs_objs, midcurve_pngs_objs = get_training_data()
endec = simple_encoderdecoder_w_denoiser()
original_imgs,decoded_imgs = endec.simple_encoderdecoder_w_denoiser(profile_pngs_objs, midcurve_pngs_objs)
plot_results(original_imgs,decoded_imgs)
| 46.4 | 110 | 0.864224 | 63 | 464 | 5.698413 | 0.412698 | 0.222841 | 0.233983 | 0.32312 | 0.362117 | 0.172702 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090517 | 464 | 9 | 111 | 51.555556 | 0.850711 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.375 | null | null | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.