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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7afbf9c19372f0c39f8ed04297c51c948405848 | 163 | py | Python | functions/multiplication.py | MateusLinharesDeAelencarLima/Calculator | 44e836aa92fd76d21b4c5f0edfcb5419886f1df6 | [
"CC0-1.0"
] | null | null | null | functions/multiplication.py | MateusLinharesDeAelencarLima/Calculator | 44e836aa92fd76d21b4c5f0edfcb5419886f1df6 | [
"CC0-1.0"
] | 1 | 2021-09-10T21:13:16.000Z | 2021-09-23T16:13:08.000Z | functions/multiplication.py | MateusLinharesDeAelencarLima/Calculator | 44e836aa92fd76d21b4c5f0edfcb5419886f1df6 | [
"CC0-1.0"
] | null | null | null | def multiplication(factor, multiplier):
product = factor * multiplier
if (product % 1) == 0:
return int(product)
else:
return product
| 20.375 | 39 | 0.613497 | 17 | 163 | 5.882353 | 0.647059 | 0.32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017391 | 0.294479 | 163 | 7 | 40 | 23.285714 | 0.852174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b7bd9afb3be055bcf6a4ce3ab3a13ba062bd6314 | 727 | py | Python | picstore/migrations/0005_auto_20210912_1005.py | kraupn3r/heximage | 0b1be7649b2b3c9d6e8201bea36f26ce50e435c6 | [
"MIT"
] | null | null | null | picstore/migrations/0005_auto_20210912_1005.py | kraupn3r/heximage | 0b1be7649b2b3c9d6e8201bea36f26ce50e435c6 | [
"MIT"
] | null | null | null | picstore/migrations/0005_auto_20210912_1005.py | kraupn3r/heximage | 0b1be7649b2b3c9d6e8201bea36f26ce50e435c6 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-12 08:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('picstore', '0004_remove_imageset_filename'),
]
operations = [
migrations.AlterModelOptions(
name='imageset',
options={'ordering': ['id'], 'verbose_name_plural': 'Image Sets'},
),
migrations.AlterModelOptions(
name='timedimagelink',
options={'ordering': ['-id'], 'verbose_name_plural': 'Time Restricted Links'},
),
migrations.AlterModelOptions(
name='uploadedimage',
options={'ordering': ['id'], 'verbose_name_plural': 'User Images'},
),
]
| 27.961538 | 90 | 0.588721 | 65 | 727 | 6.446154 | 0.630769 | 0.193317 | 0.221957 | 0.171838 | 0.243437 | 0.243437 | 0 | 0 | 0 | 0 | 0 | 0.035917 | 0.272352 | 727 | 25 | 91 | 29.08 | 0.756144 | 0.061898 | 0 | 0.315789 | 1 | 0 | 0.297059 | 0.042647 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.052632 | 0 | 0.210526 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b7c987ca6807835a5eba90991deb4d62931e4ef5 | 371 | py | Python | laa_court_data_api_app/models/hearing/internal/organisation.py | ministryofjustice/laa-court-data-api | 2e79faac7469f0b31ecca0539906d281db08f86c | [
"MIT"
] | 1 | 2022-01-27T14:28:40.000Z | 2022-01-27T14:28:40.000Z | laa_court_data_api_app/models/hearing/internal/organisation.py | ministryofjustice/laa-court-data-api | 2e79faac7469f0b31ecca0539906d281db08f86c | [
"MIT"
] | 16 | 2022-01-28T11:01:27.000Z | 2022-03-30T14:01:11.000Z | laa_court_data_api_app/models/hearing/internal/organisation.py | ministryofjustice/laa-court-data-api | 2e79faac7469f0b31ecca0539906d281db08f86c | [
"MIT"
] | null | null | null | from pydantic import BaseModel
from laa_court_data_api_app.models.hearing.internal.address import Address
from laa_court_data_api_app.models.hearing.internal.contact import Contact
class Organisation(BaseModel):
name: str | None
incorporation_number: str | None
registered_charity_number: str | None
address: Address | None
contact: Contact | None
| 28.538462 | 74 | 0.789757 | 49 | 371 | 5.755102 | 0.469388 | 0.074468 | 0.085106 | 0.113475 | 0.304965 | 0.304965 | 0.304965 | 0.304965 | 0.304965 | 0 | 0 | 0 | 0.153639 | 371 | 12 | 75 | 30.916667 | 0.898089 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
b7d04d6b220d09cabfa3755d9cc687b5c68b32ab | 720 | py | Python | tests/test_instant_answer/test_ia_normalization.py | QwantResearch/idunn | 88b6862f1036187855b5541bbb6758ddd4df33c1 | [
"Apache-2.0"
] | 26 | 2018-11-30T09:17:17.000Z | 2020-11-07T01:53:07.000Z | tests/test_instant_answer/test_ia_normalization.py | QwantResearch/idunn | 88b6862f1036187855b5541bbb6758ddd4df33c1 | [
"Apache-2.0"
] | 38 | 2018-06-08T09:41:04.000Z | 2020-12-07T17:39:12.000Z | tests/test_instant_answer/test_ia_normalization.py | Qwant/idunn | 65582dfed732093778bf7c2998db1e2cd78255b8 | [
"Apache-2.0"
] | 9 | 2018-05-18T13:07:00.000Z | 2020-08-01T16:42:40.000Z | from idunn.instant_answer import normalize
def test_normalization():
assert normalize("Strasbourg") == "strasbourg"
assert normalize("map Strasbourg") == "strasbourg"
assert normalize("strasbourg maps") == "strasbourg"
assert normalize("horaires musée picasso") == "musée picasso"
assert normalize("mapabcd") == "mapabcd"
assert normalize("prendre rdv dentiste rennes") == "dentiste rennes"
assert normalize("où se situe Limoges") == "limoges"
assert normalize("ou se trouve la tour Eiffel") == "tour eiffel"
assert normalize("qwantmaps") == ""
assert normalize("Restaurants lille avis") == "restaurants lille"
assert normalize("hotel bordeaux booking") == "hotel bordeaux"
| 45 | 72 | 0.705556 | 76 | 720 | 6.657895 | 0.486842 | 0.326087 | 0.148221 | 0.13834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 720 | 15 | 73 | 48 | 0.843333 | 0 | 0 | 0 | 0 | 0 | 0.427778 | 0 | 0 | 0 | 0 | 0 | 0.846154 | 1 | 0.076923 | true | 0 | 0.076923 | 0 | 0.153846 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b7e794419b771691893e5b5384a38c4e7c41ddbf | 161 | py | Python | 1.10.1/solution.py | luxnlex/stepic-python | 92a4b25391f76935c3c2a70fb8552e7f93928d9b | [
"MIT"
] | 1 | 2021-05-07T18:20:51.000Z | 2021-05-07T18:20:51.000Z | 1.10.1/solution.py | luxnlex/stepic-python | 92a4b25391f76935c3c2a70fb8552e7f93928d9b | [
"MIT"
] | null | null | null | 1.10.1/solution.py | luxnlex/stepic-python | 92a4b25391f76935c3c2a70fb8552e7f93928d9b | [
"MIT"
] | 2 | 2017-12-27T07:51:57.000Z | 2020-08-03T22:10:55.000Z | A = int(input())
B = int(input())
H = int(input())
if ((H>=A) and (B>=H)):
print("Это нормально")
elif (A>H):
print("Недосып")
else:
print("Пересып") | 17.888889 | 26 | 0.540373 | 26 | 161 | 3.346154 | 0.538462 | 0.275862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.192547 | 161 | 9 | 27 | 17.888889 | 0.669231 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b7fade26e8de488328925f5bd0572e8844c03025 | 148 | py | Python | arduino_001.py | relsi/exemplos-arduino-day-puc-2019 | 31174cf5873438e97fa723469de929b762da49f6 | [
"MIT"
] | 1 | 2019-12-03T22:25:23.000Z | 2019-12-03T22:25:23.000Z | arduino_001.py | relsi/exemplos-arduino-day-puc-2019 | 31174cf5873438e97fa723469de929b762da49f6 | [
"MIT"
] | null | null | null | arduino_001.py | relsi/exemplos-arduino-day-puc-2019 | 31174cf5873438e97fa723469de929b762da49f6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import serial
import time
conexao = serial.Serial('/dev/ttyACM0', 9600)
time.sleep(1.8)
conexao.write(b'D')
conexao.close()
| 18.5 | 45 | 0.689189 | 23 | 148 | 4.434783 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.060606 | 0.108108 | 148 | 7 | 46 | 21.142857 | 0.712121 | 0.141892 | 0 | 0 | 0 | 0 | 0.104 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
4d01b282269cdc6ac4be4887d37096a64de35693 | 269 | py | Python | mysite/lti/tasks.py | cjlee112/socraticqs2 | 2e7dd9d2ec687f68ca8ca341cf5f1b3b8809c820 | [
"Apache-2.0"
] | 8 | 2015-06-02T15:34:44.000Z | 2019-03-21T12:27:30.000Z | mysite/lti/tasks.py | cjlee112/socraticqs2 | 2e7dd9d2ec687f68ca8ca341cf5f1b3b8809c820 | [
"Apache-2.0"
] | 761 | 2015-01-07T05:13:08.000Z | 2022-02-10T10:23:37.000Z | mysite/lti/tasks.py | cjlee112/socraticqs2 | 2e7dd9d2ec687f68ca8ca341cf5f1b3b8809c820 | [
"Apache-2.0"
] | 12 | 2015-01-28T20:09:36.000Z | 2018-03-20T13:32:11.000Z | from mysite import celery_app
from lti.models import GradedLaunch
from lti.outcomes import send_score_update
@celery_app.task
def send_outcome(score, assignment_id):
assignment = GradedLaunch.objects.get(id=assignment_id)
send_score_update(assignment, score)
| 26.9 | 59 | 0.821561 | 38 | 269 | 5.578947 | 0.5 | 0.084906 | 0.141509 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115242 | 269 | 9 | 60 | 29.888889 | 0.890756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.428571 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
4d0ba7771e08744f3f06980cd55d96f46bfed9f2 | 40,246 | py | Python | test/speed.py | tlocke/zish_python | 2f54c44514c2ad412ee4f408d25058387cac9352 | [
"MIT"
] | 2 | 2017-12-15T17:41:47.000Z | 2017-12-15T21:57:39.000Z | test/speed.py | tlocke/zish_python | 2f54c44514c2ad412ee4f408d25058387cac9352 | [
"MIT"
] | 2 | 2018-01-01T19:40:21.000Z | 2018-10-23T13:44:40.000Z | test/speed.py | tlocke/zish_python | 2f54c44514c2ad412ee4f408d25058387cac9352 | [
"MIT"
] | null | null | null | from zish import loads
from datetime import datetime as Datetime
zish_str = """
{
"rates_gbp_per_mwh": {
"01 00:00 Z": 0.90265,
"01 00:30 Z": 0.89207,
"01 01:00 Z": 0.92321,
"01 01:30 Z": 0.84712,
"01 02:00 Z": 0.84552,
"01 02:30 Z": 0.95593,
"01 03:00 Z": 0.99462,
"01 03:30 Z": 0.96276,
"01 04:00 Z": 0.89514,
"01 04:30 Z": 0.80838,
"01 05:00 Z": 1.02465,
"01 05:30 Z": 0.90757,
"01 06:00 Z": 1.48116,
"01 06:30 Z": 1.13516,
"01 07:00 Z": 1.61172,
"01 07:30 Z": 1.628,
"01 08:00 Z": 1.56336,
"01 08:30 Z": 2.02314,
"01 09:00 Z": 3.03213,
"01 09:30 Z": 3.10758,
"01 10:00 Z": 2.18008,
"01 10:30 Z": 1.12899,
"01 11:00 Z": 0.85991,
"01 11:30 Z": 0.97842,
"01 12:00 Z": 0.90279,
"01 12:30 Z": 0.78619,
"01 13:00 Z": 0.86664,
"01 13:30 Z": 0.52629,
"01 14:00 Z": 0.585,
"01 14:30 Z": 0.46413,
"01 15:00 Z": 0.29099,
"01 15:30 Z": 0.32976,
"01 16:00 Z": 0.37761,
"01 16:30 Z": 0.64919,
"01 17:00 Z": 0.53616,
"01 17:30 Z": 0.78017,
"01 18:00 Z": 1.6765,
"01 18:30 Z": 1.38352,
"01 19:00 Z": 1.2974,
"01 19:30 Z": 1.65125,
"01 20:00 Z": 1.00188,
"01 20:30 Z": 1.05806,
"01 21:00 Z": 0.95058,
"01 21:30 Z": 0.55515,
"01 22:00 Z": 0.66332,
"01 22:30 Z": 0.54901,
"01 23:00 Z": 0.68792,
"01 23:30 Z": 0.362,
"02 00:00 Z": 0.58596,
"02 00:30 Z": 0.59995,
"02 01:00 Z": 0.58916,
"02 01:30 Z": 0.52061,
"02 02:00 Z": 0.62806,
"02 02:30 Z": 0.69108,
"02 03:00 Z": 0.67635,
"02 03:30 Z": 0.59098,
"02 04:00 Z": 0.53795,
"02 04:30 Z": 0.743,
"02 05:00 Z": 0.7232,
"02 05:30 Z": 0.88754,
"02 06:00 Z": 1.80059,
"02 06:30 Z": 1.85164,
"02 07:00 Z": 0.87896,
"02 07:30 Z": 0.95002,
"02 08:00 Z": 0.90658,
"02 08:30 Z": 0.92531,
"02 09:00 Z": 0.98237,
"02 09:30 Z": 0.96162,
"02 10:00 Z": 0.92355,
"02 10:30 Z": 1.04329,
"02 11:00 Z": 0.85421,
"02 11:30 Z": 0.69396,
"02 12:00 Z": 0.58441,
"02 12:30 Z": 0.56837,
"02 13:00 Z": 0.72799,
"02 13:30 Z": 0.37631,
"02 14:00 Z": 0.38595,
"02 14:30 Z": 0.2343,
"02 15:00 Z": 0.02799,
"02 15:30 Z": 0.17839,
"02 16:00 Z": 0.11585,
"02 16:30 Z": 0.54151,
"02 17:00 Z": 0.47986,
"02 17:30 Z": 0.9767,
"02 18:00 Z": 1.96627,
"02 18:30 Z": 1.77164,
"02 19:00 Z": 1.44826,
"02 19:30 Z": 1.433,
"02 20:00 Z": 0.97022,
"02 20:30 Z": 0.8978,
"02 21:00 Z": 0.80687,
"02 21:30 Z": 0.52383,
"02 22:00 Z": 0.70752,
"02 22:30 Z": 0.58836,
"02 23:00 Z": 0.44798,
"02 23:30 Z": 0.3382,
"03 00:00 Z": 0.52495,
"03 00:30 Z": 0.51844,
"03 01:00 Z": 0.71319,
"03 01:30 Z": 0.67344,
"03 02:00 Z": 0.52364,
"03 02:30 Z": 0.50315,
"03 03:00 Z": 0.51618,
"03 03:30 Z": 0.50007,
"03 04:00 Z": 0.50933,
"03 04:30 Z": 0.42528,
"03 05:00 Z": 0.39765,
"03 05:30 Z": 0.43004,
"03 06:00 Z": 0.62988,
"03 06:30 Z": 0.81139,
"03 07:00 Z": 0.97637,
"03 07:30 Z": 0.90702,
"03 08:00 Z": 0.81218,
"03 08:30 Z": 0.77267,
"03 09:00 Z": 0.80951,
"03 09:30 Z": 0.94379,
"03 10:00 Z": 0.86858,
"03 10:30 Z": 0.97941,
"03 11:00 Z": 0.94154,
"03 11:30 Z": 0.8626,
"03 12:00 Z": 0.87299,
"03 12:30 Z": 0.68243,
"03 13:00 Z": 0.84979,
"03 13:30 Z": 0.45989,
"03 14:00 Z": 0.41621,
"03 14:30 Z": 0.4209,
"03 15:00 Z": 0.21543,
"03 15:30 Z": 0.3252,
"03 16:00 Z": 0.40775,
"03 16:30 Z": 0.68935,
"03 17:00 Z": 0.49069,
"03 17:30 Z": 0.66976,
"03 18:00 Z": 0.89247,
"03 18:30 Z": 0.77677,
"03 19:00 Z": 0.85806,
"03 19:30 Z": 1.50018,
"03 20:00 Z": 1.65914,
"03 20:30 Z": 0.95419,
"03 21:00 Z": 0.88716,
"03 21:30 Z": 0.68309,
"03 22:00 Z": 0.98837,
"03 22:30 Z": 0.53037,
"03 23:00 Z": 0.73898,
"03 23:30 Z": 0.57162,
"04 00:00 Z": 0.50527,
"04 00:30 Z": 0.49822,
"04 01:00 Z": 0.39865,
"04 01:30 Z": 0.44559,
"04 02:00 Z": 0.44647,
"04 02:30 Z": 0.30547,
"04 03:00 Z": 0.41261,
"04 03:30 Z": 0.43873,
"04 04:00 Z": 0.3865,
"04 04:30 Z": 0.36396,
"04 05:00 Z": 0.31967,
"04 05:30 Z": 0.35203,
"04 06:00 Z": 0.48325,
"04 06:30 Z": 0.89675,
"04 07:00 Z": 0.99276,
"04 07:30 Z": 1.04391,
"04 08:00 Z": 1.07929,
"04 08:30 Z": 0.85885,
"04 09:00 Z": 0.81763,
"04 09:30 Z": 0.68949,
"04 10:00 Z": 0.57627,
"04 10:30 Z": 0.55137,
"04 11:00 Z": 0.44581,
"04 11:30 Z": 0.47491,
"04 12:00 Z": 0.46553,
"04 12:30 Z": 0.4067,
"04 13:00 Z": 0.49023,
"04 13:30 Z": 0.23908,
"04 14:00 Z": 0.19215,
"04 14:30 Z": -0.02083,
"04 15:00 Z": -0.19948,
"04 15:30 Z": -0.0251,
"04 16:00 Z": 0.04404,
"04 16:30 Z": 0.27881,
"04 17:00 Z": 0.22958,
"04 17:30 Z": 0.59521,
"04 18:00 Z": 1.36252,
"04 18:30 Z": 1.79782,
"04 19:00 Z": 1.44319,
"04 19:30 Z": 0.69397,
"04 20:00 Z": 0.47484,
"04 20:30 Z": 0.47519,
"04 21:00 Z": 0.57522,
"04 21:30 Z": 0.51069,
"04 22:00 Z": 0.88666,
"04 22:30 Z": 0.29754,
"04 23:00 Z": 0.60737,
"04 23:30 Z": 0.49974,
"05 00:00 Z": 0.68833,
"05 00:30 Z": 0.69057,
"05 01:00 Z": 0.68418,
"05 01:30 Z": 0.67042,
"05 02:00 Z": 0.53184,
"05 02:30 Z": 0.4102,
"05 03:00 Z": 0.21503,
"05 03:30 Z": 0.15998,
"05 04:00 Z": 0.11353,
"05 04:30 Z": -0.00636,
"05 05:00 Z": -0.01052,
"05 05:30 Z": 0.09488,
"05 06:00 Z": 0.46542,
"05 06:30 Z": 0.65538,
"05 07:00 Z": 0.83603,
"05 07:30 Z": 1.01164,
"05 08:00 Z": 1.47566,
"05 08:30 Z": 1.9733,
"05 09:00 Z": 1.72615,
"05 09:30 Z": 2.14131,
"05 10:00 Z": 1.35507,
"05 10:30 Z": 1.1242,
"05 11:00 Z": 1.05994,
"05 11:30 Z": 0.99174,
"05 12:00 Z": 0.72933,
"05 12:30 Z": 0.56997,
"05 13:00 Z": 0.64885,
"05 13:30 Z": 0.35117,
"05 14:00 Z": 0.18289,
"05 14:30 Z": -0.02715,
"05 15:00 Z": 0.28215,
"05 15:30 Z": 0.3142,
"05 16:00 Z": 0.31066,
"05 16:30 Z": 0.58639,
"05 17:00 Z": 0.44905,
"05 17:30 Z": 0.82865,
"05 18:00 Z": 1.18373,
"05 18:30 Z": 1.16481,
"05 19:00 Z": 0.96865,
"05 19:30 Z": 0.94939,
"05 20:00 Z": 0.87706,
"05 20:30 Z": 0.79235,
"05 21:00 Z": 0.89973,
"05 21:30 Z": 0.50854,
"05 22:00 Z": 0.54565,
"05 22:30 Z": 0.40912,
"05 23:00 Z": 0.35939,
"05 23:30 Z": 0.19252,
"06 00:00 Z": 0.5138,
"06 00:30 Z": 0.39473,
"06 01:00 Z": 0.30116,
"06 01:30 Z": 0.23612,
"06 02:00 Z": 0.08737,
"06 02:30 Z": 0.31307,
"06 03:00 Z": 0.49782,
"06 03:30 Z": 0.38444,
"06 04:00 Z": 0.29809,
"06 04:30 Z": 0.29776,
"06 05:00 Z": 0.42831,
"06 05:30 Z": 0.39221,
"06 06:00 Z": 0.5993,
"06 06:30 Z": 0.36041,
"06 07:00 Z": 0.5505,
"06 07:30 Z": 0.91123,
"06 08:00 Z": 2.37141,
"06 08:30 Z": 1.39166,
"06 09:00 Z": 0.88366,
"06 09:30 Z": 0.79023,
"06 10:00 Z": 0.58386,
"06 10:30 Z": 0.54336,
"06 11:00 Z": 0.60217,
"06 11:30 Z": 0.52539,
"06 12:00 Z": 0.48051,
"06 12:30 Z": 0.50957,
"06 13:00 Z": 0.49826,
"06 13:30 Z": 0.43236,
"06 14:00 Z": 0.37438,
"06 14:30 Z": 0.32509,
"06 15:00 Z": 0.37673,
"06 15:30 Z": 0.46196,
"06 16:00 Z": 0.48698,
"06 16:30 Z": 0.76567,
"06 17:00 Z": 0.65528,
"06 17:30 Z": 0.60534,
"06 18:00 Z": 1.3339,
"06 18:30 Z": 1.32302,
"06 19:00 Z": 1.28302,
"06 19:30 Z": 1.42072,
"06 20:00 Z": 1.06627,
"06 20:30 Z": 1.04816,
"06 21:00 Z": 0.93545,
"06 21:30 Z": 0.94532,
"06 22:00 Z": 1.2144,
"06 22:30 Z": 1.18701,
"06 23:00 Z": 0.97932,
"06 23:30 Z": 0.64157,
"07 00:00 Z": 1.02843,
"07 00:30 Z": 0.85685,
"07 01:00 Z": 0.7311,
"07 01:30 Z": 0.54834,
"07 02:00 Z": 0.59514,
"07 02:30 Z": 0.60647,
"07 03:00 Z": 0.76067,
"07 03:30 Z": 0.86629,
"07 04:00 Z": 0.74897,
"07 04:30 Z": 0.65968,
"07 05:00 Z": 0.69309,
"07 05:30 Z": 0.67715,
"07 06:00 Z": 0.85453,
"07 06:30 Z": 0.78807,
"07 07:00 Z": 0.75113,
"07 07:30 Z": 0.8995,
"07 08:00 Z": 1.51449,
"07 08:30 Z": 1.94883,
"07 09:00 Z": 1.49507,
"07 09:30 Z": 1.13026,
"07 10:00 Z": 0.72231,
"07 10:30 Z": 0.95797,
"07 11:00 Z": 1.05932,
"07 11:30 Z": 1.19354,
"07 12:00 Z": 1.42948,
"07 12:30 Z": 1.0493,
"07 13:00 Z": 1.0509,
"07 13:30 Z": 0.63011,
"07 14:00 Z": 0.48409,
"07 14:30 Z": 0.40714,
"07 15:00 Z": 0.50504,
"07 15:30 Z": 0.39618,
"07 16:00 Z": 0.33577,
"07 16:30 Z": 0.59511,
"07 17:00 Z": 0.68796,
"07 17:30 Z": 0.98978,
"07 18:00 Z": 1.68859,
"07 18:30 Z": 4.51376,
"07 19:00 Z": 4.78925,
"07 19:30 Z": 3.90633,
"07 20:00 Z": 2.16072,
"07 20:30 Z": 1.42442,
"07 21:00 Z": 1.06951,
"07 21:30 Z": 0.70603,
"07 22:00 Z": 0.52336,
"07 22:30 Z": 0.69194,
"07 23:00 Z": 0.59498,
"07 23:30 Z": 0.36371,
"08 00:00 Z": 0.66724,
"08 00:30 Z": 0.56901,
"08 01:00 Z": 0.5352,
"08 01:30 Z": 0.51666,
"08 02:00 Z": 0.5302,
"08 02:30 Z": 0.6335,
"08 03:00 Z": 0.74129,
"08 03:30 Z": 0.65671,
"08 04:00 Z": 0.64076,
"08 04:30 Z": 0.62208,
"08 05:00 Z": 0.54249,
"08 05:30 Z": 0.68023,
"08 06:00 Z": 1.12439,
"08 06:30 Z": 1.53165,
"08 07:00 Z": 2.50301,
"08 07:30 Z": 2.05242,
"08 08:00 Z": 2.17356,
"08 08:30 Z": 2.11774,
"08 09:00 Z": 2.02479,
"08 09:30 Z": 1.95643,
"08 10:00 Z": 1.87895,
"08 10:30 Z": 1.34322,
"08 11:00 Z": 1.27821,
"08 11:30 Z": 1.22402,
"08 12:00 Z": 1.04815,
"08 12:30 Z": 0.93149,
"08 13:00 Z": 0.91403,
"08 13:30 Z": 0.73308,
"08 14:00 Z": 0.76106,
"08 14:30 Z": 0.54227,
"08 15:00 Z": 0.47103,
"08 15:30 Z": 0.61311,
"08 16:00 Z": 0.78268,
"08 16:30 Z": 1.18533,
"08 17:00 Z": 1.84987,
"08 17:30 Z": 1.43894,
"08 18:00 Z": 1.5245,
"08 18:30 Z": 2.01532,
"08 19:00 Z": 2.94422,
"08 19:30 Z": 2.5513,
"08 20:00 Z": 2.13589,
"08 20:30 Z": 1.38288,
"08 21:00 Z": 0.97793,
"08 21:30 Z": 0.54029,
"08 22:00 Z": 0.37622,
"08 22:30 Z": 0.33721,
"08 23:00 Z": 0.33844,
"08 23:30 Z": 0.33657,
"09 00:00 Z": 0.4182,
"09 00:30 Z": 0.25346,
"09 01:00 Z": 0.19846,
"09 01:30 Z": 0.11634,
"09 02:00 Z": 0.08745,
"09 02:30 Z": 0.16517,
"09 03:00 Z": 0.20712,
"09 03:30 Z": 0.12485,
"09 04:00 Z": 0.12246,
"09 04:30 Z": 0.01371,
"09 05:00 Z": -0.04005,
"09 05:30 Z": 0.15936,
"09 06:00 Z": 0.49704,
"09 06:30 Z": 0.38786,
"09 07:00 Z": 0.40524,
"09 07:30 Z": 0.33329,
"09 08:00 Z": 0.37085,
"09 08:30 Z": 0.47453,
"09 09:00 Z": 1.09159,
"09 09:30 Z": 1.11761,
"09 10:00 Z": 0.82385,
"09 10:30 Z": 0.55092,
"09 11:00 Z": 0.48316,
"09 11:30 Z": 0.43767,
"09 12:00 Z": 0.47209,
"09 12:30 Z": 0.45787,
"09 13:00 Z": 0.60306,
"09 13:30 Z": 0.45082,
"09 14:00 Z": 0.50724,
"09 14:30 Z": 0.44202,
"09 15:00 Z": 0.49968,
"09 15:30 Z": 0.77256,
"09 16:00 Z": 1.08045,
"09 16:30 Z": 1.6317,
"09 17:00 Z": 2.43417,
"09 17:30 Z": 3.04576,
"09 18:00 Z": 3.32555,
"09 18:30 Z": 3.72929,
"09 19:00 Z": 4.16647,
"09 19:30 Z": 3.54228,
"09 20:00 Z": 1.90728,
"09 20:30 Z": 1.70371,
"09 21:00 Z": 1.47247,
"09 21:30 Z": 0.77496,
"09 22:00 Z": 0.87644,
"09 22:30 Z": 0.67607,
"09 23:00 Z": 0.31416,
"09 23:30 Z": 0.10547,
"10 00:00 Z": 0.29571,
"10 00:30 Z": 0.42256,
"10 01:00 Z": 0.42169,
"10 01:30 Z": 0.36536,
"10 02:00 Z": 0.33064,
"10 02:30 Z": 0.3608,
"10 03:00 Z": 0.40623,
"10 03:30 Z": 0.40341,
"10 04:00 Z": 0.37492,
"10 04:30 Z": 0.32738,
"10 05:00 Z": 0.30338,
"10 05:30 Z": 0.35596,
"10 06:00 Z": 0.51916,
"10 06:30 Z": 0.51882,
"10 07:00 Z": 0.76987,
"10 07:30 Z": 0.89287,
"10 08:00 Z": 0.81061,
"10 08:30 Z": 0.65437,
"10 09:00 Z": 1.35701,
"10 09:30 Z": 1.83076,
"10 10:00 Z": 1.53021,
"10 10:30 Z": 1.07223,
"10 11:00 Z": 0.78999,
"10 11:30 Z": 0.63668,
"10 12:00 Z": 0.59699,
"10 12:30 Z": 0.565,
"10 13:00 Z": 0.56067,
"10 13:30 Z": 0.36776,
"10 14:00 Z": 0.50979,
"10 14:30 Z": 0.362,
"10 15:00 Z": 0.33959,
"10 15:30 Z": 0.41171,
"10 16:00 Z": 1.2046,
"10 16:30 Z": 2.27997,
"10 17:00 Z": 2.54705,
"10 17:30 Z": 3.64878,
"10 18:00 Z": 4.76623,
"10 18:30 Z": 4.9051,
"10 19:00 Z": 4.79505,
"10 19:30 Z": 4.01775,
"10 20:00 Z": 1.94675,
"10 20:30 Z": 1.07131,
"10 21:00 Z": 0.81373,
"10 21:30 Z": 0.78209,
"10 22:00 Z": 0.49034,
"10 22:30 Z": 0.2625,
"10 23:00 Z": 0.17979,
"10 23:30 Z": 0.19766,
"11 00:00 Z": 0.48412,
"11 00:30 Z": 0.54272,
"11 01:00 Z": 0.57411,
"11 01:30 Z": 0.514,
"11 02:00 Z": 0.6487,
"11 02:30 Z": 0.71789,
"11 03:00 Z": 0.86049,
"11 03:30 Z": 0.85568,
"11 04:00 Z": 0.82757,
"11 04:30 Z": 0.94523,
"11 05:00 Z": 1.03416,
"11 05:30 Z": 1.12333,
"11 06:00 Z": 0.69188,
"11 06:30 Z": 0.37662,
"11 07:00 Z": 0.70298,
"11 07:30 Z": 0.89835,
"11 08:00 Z": 1.09838,
"11 08:30 Z": 1.16147,
"11 09:00 Z": 1.33775,
"11 09:30 Z": 1.28982,
"11 10:00 Z": 1.25221,
"11 10:30 Z": 1.20389,
"11 11:00 Z": 1.24919,
"11 11:30 Z": 1.21482,
"11 12:00 Z": 1.23624,
"11 12:30 Z": 1.30392,
"11 13:00 Z": 1.36567,
"11 13:30 Z": 1.05581,
"11 14:00 Z": 1.01713,
"11 14:30 Z": 0.86961,
"11 15:00 Z": 0.7322,
"11 15:30 Z": 0.74188,
"11 16:00 Z": 1.25439,
"11 16:30 Z": 1.51698,
"11 17:00 Z": 2.01897,
"11 17:30 Z": 1.98128,
"11 18:00 Z": 2.2825,
"11 18:30 Z": 2.44762,
"11 19:00 Z": 2.08217,
"11 19:30 Z": 2.04903,
"11 20:00 Z": 1.95943,
"11 20:30 Z": 1.78075,
"11 21:00 Z": 1.03855,
"11 21:30 Z": 0.72442,
"11 22:00 Z": 0.55675,
"11 22:30 Z": 0.25314,
"11 23:00 Z": 0.427,
"11 23:30 Z": 0.48008,
"12 00:00 Z": 0.88157,
"12 00:30 Z": 0.71341,
"12 01:00 Z": 0.67004,
"12 01:30 Z": 0.61936,
"12 02:00 Z": 0.53641,
"12 02:30 Z": 0.51409,
"12 03:00 Z": 0.62107,
"12 03:30 Z": 0.53985,
"12 04:00 Z": 0.51966,
"12 04:30 Z": 0.52852,
"12 05:00 Z": 0.56208,
"12 05:30 Z": 0.60591,
"12 06:00 Z": 0.74688,
"12 06:30 Z": 0.55067,
"12 07:00 Z": 0.85156,
"12 07:30 Z": 0.8217,
"12 08:00 Z": 0.93157,
"12 08:30 Z": 0.99641,
"12 09:00 Z": 1.25742,
"12 09:30 Z": 1.41518,
"12 10:00 Z": 1.4028,
"12 10:30 Z": 1.43544,
"12 11:00 Z": 1.40957,
"12 11:30 Z": 1.28649,
"12 12:00 Z": 1.41299,
"12 12:30 Z": 1.30832,
"12 13:00 Z": 1.49009,
"12 13:30 Z": 1.21947,
"12 14:00 Z": 1.62843,
"12 14:30 Z": 1.32693,
"12 15:00 Z": 1.34871,
"12 15:30 Z": 1.17693,
"12 16:00 Z": 1.48501,
"12 16:30 Z": 1.60671,
"12 17:00 Z": 1.7534,
"12 17:30 Z": 1.77373,
"12 18:00 Z": 2.17057,
"12 18:30 Z": 2.12133,
"12 19:00 Z": 2.03249,
"12 19:30 Z": 1.94846,
"12 20:00 Z": 1.62007,
"12 20:30 Z": 1.79141,
"12 21:00 Z": 1.47205,
"12 21:30 Z": 1.17523,
"12 22:00 Z": 1.37114,
"12 22:30 Z": 0.89317,
"12 23:00 Z": 0.80442,
"12 23:30 Z": 0.93808,
"13 00:00 Z": 1.62425,
"13 00:30 Z": 1.54824,
"13 01:00 Z": 1.45837,
"13 01:30 Z": 1.25528,
"13 02:00 Z": 1.10336,
"13 02:30 Z": 1.20153,
"13 03:00 Z": 1.2077,
"13 03:30 Z": 0.79327,
"13 04:00 Z": 0.68294,
"13 04:30 Z": 0.56349,
"13 05:00 Z": 0.69325,
"13 05:30 Z": 0.80027,
"13 06:00 Z": 0.89303,
"13 06:30 Z": 0.75119,
"13 07:00 Z": 1.11674,
"13 07:30 Z": 1.61897,
"13 08:00 Z": 1.86791,
"13 08:30 Z": 1.88038,
"13 09:00 Z": 2.23046,
"13 09:30 Z": 2.03698,
"13 10:00 Z": 1.95492,
"13 10:30 Z": 1.86354,
"13 11:00 Z": 1.96417,
"13 11:30 Z": 1.83023,
"13 12:00 Z": 1.62521,
"13 12:30 Z": 1.46696,
"13 13:00 Z": 1.38827,
"13 13:30 Z": 1.27845,
"13 14:00 Z": 1.43308,
"13 14:30 Z": 1.31648,
"13 15:00 Z": 1.34716,
"13 15:30 Z": 1.41443,
"13 16:00 Z": 1.56515,
"13 16:30 Z": 1.96346,
"13 17:00 Z": 2.26796,
"13 17:30 Z": 2.36464,
"13 18:00 Z": 2.61811,
"13 18:30 Z": 2.97467,
"13 19:00 Z": 2.64807,
"13 19:30 Z": 2.53343,
"13 20:00 Z": 2.22809,
"13 20:30 Z": 2.14181,
"13 21:00 Z": 1.75548,
"13 21:30 Z": 1.38333,
"13 22:00 Z": 0.95548,
"13 22:30 Z": 0.69378,
"13 23:00 Z": 0.72256,
"13 23:30 Z": 0.79344,
"14 00:00 Z": 0.69118,
"14 00:30 Z": 0.54931,
"14 01:00 Z": 0.46099,
"14 01:30 Z": 0.38249,
"14 02:00 Z": 0.46996,
"14 02:30 Z": 0.44269,
"14 03:00 Z": 0.41577,
"14 03:30 Z": 0.32083,
"14 04:00 Z": 0.31026,
"14 04:30 Z": 0.3216,
"14 05:00 Z": 0.30915,
"14 05:30 Z": 0.36231,
"14 06:00 Z": 0.37964,
"14 06:30 Z": 0.36663,
"14 07:00 Z": 0.26722,
"14 07:30 Z": 0.37099,
"14 08:00 Z": 1.07279,
"14 08:30 Z": 1.53284,
"14 09:00 Z": 1.2839,
"14 09:30 Z": 1.39137,
"14 10:00 Z": 1.31521,
"14 10:30 Z": 1.4468,
"14 11:00 Z": 1.40428,
"14 11:30 Z": 1.36201,
"14 12:00 Z": 1.64918,
"14 12:30 Z": 1.31861,
"14 13:00 Z": 1.29301,
"14 13:30 Z": 0.89339,
"14 14:00 Z": 0.94188,
"14 14:30 Z": 0.88511,
"14 15:00 Z": 0.58969,
"14 15:30 Z": 0.66111,
"14 16:00 Z": 0.72539,
"14 16:30 Z": 0.92051,
"14 17:00 Z": 0.73408,
"14 17:30 Z": 0.72724,
"14 18:00 Z": 1.33453,
"14 18:30 Z": 1.83017,
"14 19:00 Z": 1.86001,
"14 19:30 Z": 1.70454,
"14 20:00 Z": 1.9869,
"14 20:30 Z": 1.92648,
"14 21:00 Z": 1.71046,
"14 21:30 Z": 1.1887,
"14 22:00 Z": 0.49769,
"14 22:30 Z": 0.1487,
"14 23:00 Z": 0.20332,
"14 23:30 Z": 0.1708,
"15 00:00 Z": 0.4265,
"15 00:30 Z": 0.42909,
"15 01:00 Z": 0.43339,
"15 01:30 Z": 0.29964,
"15 02:00 Z": 0.34503,
"15 02:30 Z": 0.34415,
"15 03:00 Z": 0.41224,
"15 03:30 Z": 0.3772,
"15 04:00 Z": 0.25076,
"15 04:30 Z": 0.19841,
"15 05:00 Z": 0.29198,
"15 05:30 Z": 0.42445,
"15 06:00 Z": 0.64396,
"15 06:30 Z": 0.73995,
"15 07:00 Z": 1.19662,
"15 07:30 Z": 0.9751,
"15 08:00 Z": 1.07634,
"15 08:30 Z": 1.06666,
"15 09:00 Z": 1.06103,
"15 09:30 Z": 1.15311,
"15 10:00 Z": 0.97685,
"15 10:30 Z": 0.92587,
"15 11:00 Z": 0.9413,
"15 11:30 Z": 1.0644,
"15 12:00 Z": 1.21928,
"15 12:30 Z": 1.17055,
"15 13:00 Z": 1.02703,
"15 13:30 Z": 0.6154,
"15 14:00 Z": 0.49596,
"15 14:30 Z": 0.55622,
"15 15:00 Z": 0.60299,
"15 15:30 Z": 0.71318,
"15 16:00 Z": 0.96912,
"15 16:30 Z": 1.31154,
"15 17:00 Z": 1.2742,
"15 17:30 Z": 1.26244,
"15 18:00 Z": 1.71436,
"15 18:30 Z": 2.48204,
"15 19:00 Z": 2.11189,
"15 19:30 Z": 1.85689,
"15 20:00 Z": 1.51419,
"15 20:30 Z": 1.2674,
"15 21:00 Z": 1.25207,
"15 21:30 Z": 0.5693,
"15 22:00 Z": 0.35625,
"15 22:30 Z": 0.13718,
"15 23:00 Z": 0.60993,
"15 23:30 Z": 0.6282,
"16 00:00 Z": 0.88637,
"16 00:30 Z": 0.63503,
"16 01:00 Z": 0.62803,
"16 01:30 Z": 0.44234,
"16 02:00 Z": 0.45418,
"16 02:30 Z": 0.55041,
"16 03:00 Z": 0.6964,
"16 03:30 Z": 0.65798,
"16 04:00 Z": 0.56455,
"16 04:30 Z": 0.49212,
"16 05:00 Z": 0.46972,
"16 05:30 Z": 0.59701,
"16 06:00 Z": 0.86927,
"16 06:30 Z": 0.96615,
"16 07:00 Z": 1.15442,
"16 07:30 Z": 1.31171,
"16 08:00 Z": 1.46637,
"16 08:30 Z": 1.49993,
"16 09:00 Z": 1.479,
"16 09:30 Z": 1.42555,
"16 10:00 Z": 1.35559,
"16 10:30 Z": 1.33182,
"16 11:00 Z": 1.22485,
"16 11:30 Z": 1.12273,
"16 12:00 Z": 1.09691,
"16 12:30 Z": 1.09286,
"16 13:00 Z": 0.84446,
"16 13:30 Z": 0.55617,
"16 14:00 Z": 0.54764,
"16 14:30 Z": 0.4292,
"16 15:00 Z": 0.4645,
"16 15:30 Z": 0.46342,
"16 16:00 Z": 0.68965,
"16 16:30 Z": 0.89231,
"16 17:00 Z": 1.11391,
"16 17:30 Z": 0.9915,
"16 18:00 Z": 1.7654,
"16 18:30 Z": 2.3318,
"16 19:00 Z": 1.82558,
"16 19:30 Z": 1.7728,
"16 20:00 Z": 1.35881,
"16 20:30 Z": 1.0437,
"16 21:00 Z": 0.83373,
"16 21:30 Z": 0.25833,
"16 22:00 Z": 0.21972,
"16 22:30 Z": 0.15099,
"16 23:00 Z": 0.41179,
"16 23:30 Z": 0.28606,
"17 00:00 Z": 0.27043,
"17 00:30 Z": 0.28777,
"17 01:00 Z": 0.31243,
"17 01:30 Z": 0.15991,
"17 02:00 Z": 0.10187,
"17 02:30 Z": 0.19024,
"17 03:00 Z": 0.17969,
"17 03:30 Z": -0.04984,
"17 04:00 Z": -0.14297,
"17 04:30 Z": -0.0492,
"17 05:00 Z": 0.21869,
"17 05:30 Z": 0.37641,
"17 06:00 Z": 0.77258,
"17 06:30 Z": 0.88968,
"17 07:00 Z": 1.07367,
"17 07:30 Z": 1.03685,
"17 08:00 Z": 0.87914,
"17 08:30 Z": 0.64937,
"17 09:00 Z": 0.52555,
"17 09:30 Z": 0.59884,
"17 10:00 Z": 0.62224,
"17 10:30 Z": 0.56296,
"17 11:00 Z": 0.59763,
"17 11:30 Z": 0.79395,
"17 12:00 Z": 0.7304,
"17 12:30 Z": 0.69255,
"17 13:00 Z": 0.73528,
"17 13:30 Z": 0.51542,
"17 14:00 Z": 0.68046,
"17 14:30 Z": 0.51274,
"17 15:00 Z": 0.09307,
"17 15:30 Z": 0.11053,
"17 16:00 Z": 0.18042,
"17 16:30 Z": 0.55781,
"17 17:00 Z": 0.61469,
"17 17:30 Z": 0.8005,
"17 18:00 Z": 1.40683,
"17 18:30 Z": 1.75645,
"17 19:00 Z": 1.5465,
"17 19:30 Z": 1.4938,
"17 20:00 Z": 0.98878,
"17 20:30 Z": 0.87213,
"17 21:00 Z": 0.66865,
"17 21:30 Z": 0.37169,
"17 22:00 Z": 0.01644,
"17 22:30 Z": 0.0612,
"17 23:00 Z": 0.20329,
"17 23:30 Z": 0.07454,
"18 00:00 Z": 0.27701,
"18 00:30 Z": 0.2517,
"18 01:00 Z": 0.24552,
"18 01:30 Z": 0.2139,
"18 02:00 Z": 0.17231,
"18 02:30 Z": 0.24659,
"18 03:00 Z": 0.34075,
"18 03:30 Z": 0.25184,
"18 04:00 Z": 0.30052,
"18 04:30 Z": 0.26062,
"18 05:00 Z": 0.49504,
"18 05:30 Z": 0.50554,
"18 06:00 Z": 0.68379,
"18 06:30 Z": 0.77664,
"18 07:00 Z": 1.05206,
"18 07:30 Z": 0.92146,
"18 08:00 Z": 0.90947,
"18 08:30 Z": 0.8067,
"18 09:00 Z": 0.80273,
"18 09:30 Z": 0.76821,
"18 10:00 Z": 0.69628,
"18 10:30 Z": 0.65618,
"18 11:00 Z": 0.71443,
"18 11:30 Z": 0.74739,
"18 12:00 Z": 0.76107,
"18 12:30 Z": 0.68817,
"18 13:00 Z": 0.80607,
"18 13:30 Z": 0.44813,
"18 14:00 Z": 0.48613,
"18 14:30 Z": 0.51196,
"18 15:00 Z": 0.37972,
"18 15:30 Z": 0.46043,
"18 16:00 Z": 0.60337,
"18 16:30 Z": 1.68322,
"18 17:00 Z": 1.36206,
"18 17:30 Z": 1.4248,
"18 18:00 Z": 1.57174,
"18 18:30 Z": 1.67148,
"18 19:00 Z": 1.30431,
"18 19:30 Z": 1.27601,
"18 20:00 Z": 1.43434,
"18 20:30 Z": 0.62705,
"18 21:00 Z": 0.2835,
"18 21:30 Z": -0.01607,
"18 22:00 Z": -0.32991,
"18 22:30 Z": -0.23485,
"18 23:00 Z": 0.1378,
"18 23:30 Z": 0.11389,
"19 00:00 Z": 0.33452,
"19 00:30 Z": 0.39141,
"19 01:00 Z": 0.3583,
"19 01:30 Z": 0.35405,
"19 02:00 Z": 0.2664,
"19 02:30 Z": 0.21133,
"19 03:00 Z": 0.20261,
"19 03:30 Z": 0.0872,
"19 04:00 Z": 0.16305,
"19 04:30 Z": 0.13991,
"19 05:00 Z": 0.29582,
"19 05:30 Z": 0.2739,
"19 06:00 Z": 0.38596,
"19 06:30 Z": 0.43383,
"19 07:00 Z": 0.86966,
"19 07:30 Z": 0.83351,
"19 08:00 Z": 0.97049,
"19 08:30 Z": 0.98157,
"19 09:00 Z": 0.82133,
"19 09:30 Z": 0.77287,
"19 10:00 Z": 0.9733,
"19 10:30 Z": 0.72138,
"19 11:00 Z": 0.63146,
"19 11:30 Z": 0.93709,
"19 12:00 Z": 1.37624,
"19 12:30 Z": 1.3545,
"19 13:00 Z": 0.71627,
"19 13:30 Z": 0.40392,
"19 14:00 Z": 0.60505,
"19 14:30 Z": 0.5343,
"19 15:00 Z": 0.50647,
"19 15:30 Z": 1.04746,
"19 16:00 Z": 1.75396,
"19 16:30 Z": 2.69372,
"19 17:00 Z": 2.00549,
"19 17:30 Z": 1.75578,
"19 18:00 Z": 2.00958,
"19 18:30 Z": 1.6279,
"19 19:00 Z": 1.38534,
"19 19:30 Z": 1.06072,
"19 20:00 Z": 1.18181,
"19 20:30 Z": 0.94312,
"19 21:00 Z": 0.98573,
"19 21:30 Z": 0.71411,
"19 22:00 Z": 1.29541,
"19 22:30 Z": 0.52486,
"19 23:00 Z": 0.96166,
"19 23:30 Z": 0.62316,
"20 00:00 Z": 0.88745,
"20 00:30 Z": 0.63745,
"20 01:00 Z": 0.49148,
"20 01:30 Z": 0.49991,
"20 02:00 Z": 0.39277,
"20 02:30 Z": 0.35069,
"20 03:00 Z": 0.25744,
"20 03:30 Z": 0.19992,
"20 04:00 Z": 0.13187,
"20 04:30 Z": 0.11486,
"20 05:00 Z": 0.10719,
"20 05:30 Z": 0.24525,
"20 06:00 Z": 0.25304,
"20 06:30 Z": 0.09319,
"20 07:00 Z": 0.58948,
"20 07:30 Z": 0.6304,
"20 08:00 Z": 0.77972,
"20 08:30 Z": 1.19828,
"20 09:00 Z": 1.98417,
"20 09:30 Z": 2.09597,
"20 10:00 Z": 2.23986,
"20 10:30 Z": 1.84699,
"20 11:00 Z": 1.79254,
"20 11:30 Z": 1.74756,
"20 12:00 Z": 1.9288,
"20 12:30 Z": 1.75752,
"20 13:00 Z": 1.34373,
"20 13:30 Z": 0.73817,
"20 14:00 Z": 0.82083,
"20 14:30 Z": 0.4787,
"20 15:00 Z": 0.47557,
"20 15:30 Z": 0.44237,
"20 16:00 Z": 0.43104,
"20 16:30 Z": 1.08898,
"20 17:00 Z": 1.4679,
"20 17:30 Z": 1.47616,
"20 18:00 Z": 1.57675,
"20 18:30 Z": 2.29526,
"20 19:00 Z": 1.80741,
"20 19:30 Z": 1.30724,
"20 20:00 Z": 1.30933,
"20 20:30 Z": 0.89315,
"20 21:00 Z": 1.1252,
"20 21:30 Z": 0.92994,
"20 22:00 Z": 0.7761,
"20 22:30 Z": 0.56451,
"20 23:00 Z": 0.95581,
"20 23:30 Z": 0.69589,
"21 00:00 Z": 0.69126,
"21 00:30 Z": 0.44006,
"21 01:00 Z": 0.50563,
"21 01:30 Z": 0.46911,
"21 02:00 Z": 0.45301,
"21 02:30 Z": 0.42055,
"21 03:00 Z": 0.36839,
"21 03:30 Z": 0.26731,
"21 04:00 Z": 0.38124,
"21 04:30 Z": 0.42444,
"21 05:00 Z": 0.43513,
"21 05:30 Z": 0.40624,
"21 06:00 Z": 0.30996,
"21 06:30 Z": 0.37495,
"21 07:00 Z": 0.40512,
"21 07:30 Z": 0.64094,
"21 08:00 Z": 0.82315,
"21 08:30 Z": 0.76015,
"21 09:00 Z": 0.56104,
"21 09:30 Z": 0.48564,
"21 10:00 Z": 0.57018,
"21 10:30 Z": 0.72385,
"21 11:00 Z": 0.60911,
"21 11:30 Z": 0.64478,
"21 12:00 Z": 0.6545,
"21 12:30 Z": 0.65029,
"21 13:00 Z": 0.65378,
"21 13:30 Z": 0.30658,
"21 14:00 Z": 0.37104,
"21 14:30 Z": 0.5958,
"21 15:00 Z": 0.57406,
"21 15:30 Z": 0.57288,
"21 16:00 Z": 0.51545,
"21 16:30 Z": 1.09942,
"21 17:00 Z": 1.34655,
"21 17:30 Z": 1.49687,
"21 18:00 Z": 1.75412,
"21 18:30 Z": 2.02585,
"21 19:00 Z": 2.01553,
"21 19:30 Z": 1.51227,
"21 20:00 Z": 1.34698,
"21 20:30 Z": 0.87699,
"21 21:00 Z": 0.96456,
"21 21:30 Z": 0.42729,
"21 22:00 Z": 0.26279,
"21 22:30 Z": 0.10206,
"21 23:00 Z": 0.12865,
"21 23:30 Z": 0.06409,
"22 00:00 Z": 0.18074,
"22 00:30 Z": 0.09163,
"22 01:00 Z": 0.14019,
"22 01:30 Z": 0.04664,
"22 02:00 Z": 0.0603,
"22 02:30 Z": 0.14436,
"22 03:00 Z": 0.21636,
"22 03:30 Z": 0.21946,
"22 04:00 Z": 0.21618,
"22 04:30 Z": 0.18203,
"22 05:00 Z": 0.18529,
"22 05:30 Z": 0.32595,
"22 06:00 Z": 0.42161,
"22 06:30 Z": 0.48358,
"22 07:00 Z": 1.04851,
"22 07:30 Z": 0.89519,
"22 08:00 Z": 1.09899,
"22 08:30 Z": 0.73635,
"22 09:00 Z": 0.88818,
"22 09:30 Z": 0.67328,
"22 10:00 Z": 0.72674,
"22 10:30 Z": 0.77363,
"22 11:00 Z": 0.87616,
"22 11:30 Z": 0.97572,
"22 12:00 Z": 1.07544,
"22 12:30 Z": 1.06729,
"22 13:00 Z": 0.91621,
"22 13:30 Z": 0.71168,
"22 14:00 Z": 0.70371,
"22 14:30 Z": 0.69791,
"22 15:00 Z": 0.93285,
"22 15:30 Z": 1.15366,
"22 16:00 Z": 1.16451,
"22 16:30 Z": 1.47655,
"22 17:00 Z": 1.82151,
"22 17:30 Z": 1.77049,
"22 18:00 Z": 2.39125,
"22 18:30 Z": 2.4838,
"22 19:00 Z": 2.1312,
"22 19:30 Z": 1.71909,
"22 20:00 Z": 0.76162,
"22 20:30 Z": 0.71536,
"22 21:00 Z": 0.66328,
"22 21:30 Z": 0.21623,
"22 22:00 Z": 0.14804,
"22 22:30 Z": 0.08672,
"22 23:00 Z": 0.49396,
"22 23:30 Z": 0.48611,
"23 00:00 Z": 0.59584,
"23 00:30 Z": 0.67094,
"23 01:00 Z": 0.61334,
"23 01:30 Z": 0.6249,
"23 02:00 Z": 0.55399,
"23 02:30 Z": 0.44676,
"23 03:00 Z": 0.59636,
"23 03:30 Z": 0.50167,
"23 04:00 Z": 0.52005,
"23 04:30 Z": 0.46446,
"23 05:00 Z": 0.54602,
"23 05:30 Z": 0.92357,
"23 06:00 Z": 1.36163,
"23 06:30 Z": 1.18954,
"23 07:00 Z": 1.21581,
"23 07:30 Z": 1.27194,
"23 08:00 Z": 1.43363,
"23 08:30 Z": 1.33334,
"23 09:00 Z": 1.4238,
"23 09:30 Z": 1.72779,
"23 10:00 Z": 1.53913,
"23 10:30 Z": 1.68603,
"23 11:00 Z": 1.51737,
"23 11:30 Z": 1.55956,
"23 12:00 Z": 1.43799,
"23 12:30 Z": 1.73189,
"23 13:00 Z": 1.99099,
"23 13:30 Z": 1.70663,
"23 14:00 Z": 1.82442,
"23 14:30 Z": 1.75523,
"23 15:00 Z": 1.59107,
"23 15:30 Z": 1.77438,
"23 16:00 Z": 2.51192,
"23 16:30 Z": 3.67822,
"23 17:00 Z": 3.30124,
"23 17:30 Z": 2.86229,
"23 18:00 Z": 3.66439,
"23 18:30 Z": 2.83964,
"23 19:00 Z": 3.16143,
"23 19:30 Z": 2.62883,
"23 20:00 Z": 2.2371,
"23 20:30 Z": 1.53805,
"23 21:00 Z": 1.27313,
"23 21:30 Z": 1.05284,
"23 22:00 Z": 1.21011,
"23 22:30 Z": 1.12803,
"23 23:00 Z": 0.66772,
"23 23:30 Z": 0.54166,
"24 00:00 Z": 0.59786,
"24 00:30 Z": 0.59348,
"24 01:00 Z": 0.73075,
"24 01:30 Z": 0.72454,
"24 02:00 Z": 0.67445,
"24 02:30 Z": 0.70582,
"24 03:00 Z": 0.54832,
"24 03:30 Z": 0.39933,
"24 04:00 Z": 0.40217,
"24 04:30 Z": 0.37156,
"24 05:00 Z": 0.38931,
"24 05:30 Z": 0.45016,
"24 06:00 Z": 0.67755,
"24 06:30 Z": 1.03397,
"24 07:00 Z": 1.24248,
"24 07:30 Z": 1.25456,
"24 08:00 Z": 1.25142,
"24 08:30 Z": 1.05148,
"24 09:00 Z": 1.02917,
"24 09:30 Z": 1.06994,
"24 10:00 Z": 0.88926,
"24 10:30 Z": 0.87715,
"24 11:00 Z": 1.04619,
"24 11:30 Z": 1.02378,
"24 12:00 Z": 1.10465,
"24 12:30 Z": 1.17266,
"24 13:00 Z": 1.10041,
"24 13:30 Z": 0.98113,
"24 14:00 Z": 0.99793,
"24 14:30 Z": 1.0303,
"24 15:00 Z": 1.00757,
"24 15:30 Z": 1.11721,
"24 16:00 Z": 1.04077,
"24 16:30 Z": 1.36018,
"24 17:00 Z": 1.3241,
"24 17:30 Z": 1.44128,
"24 18:00 Z": 1.58165,
"24 18:30 Z": 1.85971,
"24 19:00 Z": 1.50691,
"24 19:30 Z": 1.58945,
"24 20:00 Z": 1.31835,
"24 20:30 Z": 1.02388,
"24 21:00 Z": 1.11738,
"24 21:30 Z": 0.94147,
"24 22:00 Z": 0.60886,
"24 22:30 Z": 0.42465,
"24 23:00 Z": 0.60091,
"24 23:30 Z": 0.53301,
"25 00:00 Z": 0.69603,
"25 00:30 Z": 0.72908,
"25 01:00 Z": 0.73427,
"25 01:30 Z": 0.68117,
"25 02:00 Z": 0.60523,
"25 02:30 Z": 0.69748,
"25 03:00 Z": 0.71239,
"25 03:30 Z": 0.50117,
"25 04:00 Z": 0.54057,
"25 04:30 Z": 0.37826,
"25 05:00 Z": 0.3722,
"25 05:30 Z": 0.41769,
"25 06:00 Z": 0.61471,
"25 06:30 Z": 0.71235,
"25 07:00 Z": 1.01711,
"25 07:30 Z": 1.04855,
"25 08:00 Z": 1.69694,
"25 08:30 Z": 1.11999,
"25 09:00 Z": 1.22191,
"25 09:30 Z": 1.30948,
"25 10:00 Z": 1.1372,
"25 10:30 Z": 1.02318,
"25 11:00 Z": 1.06508,
"25 11:30 Z": 1.15599,
"25 12:00 Z": 1.37569,
"25 12:30 Z": 1.22273,
"25 13:00 Z": 1.1755,
"25 13:30 Z": 1.10752,
"25 14:00 Z": 1.35659,
"25 14:30 Z": 1.22209,
"25 15:00 Z": 1.14463,
"25 15:30 Z": 1.31601,
"25 16:00 Z": 1.48803,
"25 16:30 Z": 1.82514,
"25 17:00 Z": 1.73296,
"25 17:30 Z": 1.87105,
"25 18:00 Z": 1.99045,
"25 18:30 Z": 1.77012,
"25 19:00 Z": 1.52063,
"25 19:30 Z": 1.30638,
"25 20:00 Z": 1.21577,
"25 20:30 Z": 1.0957,
"25 21:00 Z": 0.89883,
"25 21:30 Z": 0.95881,
"25 22:00 Z": 0.75757,
"25 22:30 Z": 0.42702,
"25 23:00 Z": 0.3649,
"25 23:30 Z": 0.49088,
"26 00:00 Z": 0.82783,
"26 00:30 Z": 0.53132,
"26 01:00 Z": 0.62718,
"26 01:30 Z": 0.61013,
"26 02:00 Z": 0.41747,
"26 02:30 Z": 0.49076,
"26 03:00 Z": 0.50262,
"26 03:30 Z": 0.5004,
"26 04:00 Z": 0.41897,
"26 04:30 Z": 0.28568,
"26 05:00 Z": 0.42799,
"26 05:30 Z": 0.39869,
"26 06:00 Z": 0.48172,
"26 06:30 Z": 0.41567,
"26 07:00 Z": 1.10487,
"26 07:30 Z": 1.25545,
"26 08:00 Z": 1.26147,
"26 08:30 Z": 1.08053,
"26 09:00 Z": 1.15565,
"26 09:30 Z": 1.08714,
"26 10:00 Z": 0.91379,
"26 10:30 Z": 0.77605,
"26 11:00 Z": 1.03679,
"26 11:30 Z": 1.02645,
"26 12:00 Z": 0.99214,
"26 12:30 Z": 0.80525,
"26 13:00 Z": 0.83532,
"26 13:30 Z": 0.52712,
"26 14:00 Z": 0.56078,
"26 14:30 Z": 0.65332,
"26 15:00 Z": 0.36104,
"26 15:30 Z": 0.45491,
"26 16:00 Z": 0.41359,
"26 16:30 Z": 0.69696,
"26 17:00 Z": 0.85033,
"26 17:30 Z": 0.90186,
"26 18:00 Z": 1.19689,
"26 18:30 Z": 1.03141,
"26 19:00 Z": 1.0355,
"26 19:30 Z": 1.29463,
"26 20:00 Z": 1.29308,
"26 20:30 Z": 1.10228,
"26 21:00 Z": 0.91516,
"26 21:30 Z": 0.73837,
"26 22:00 Z": 0.77018,
"26 22:30 Z": 0.66772,
"26 23:00 Z": 0.34183,
"26 23:30 Z": 0.58755,
"27 00:00 Z": 1.22508,
"27 00:30 Z": 0.86718,
"27 01:00 Z": 0.82403,
"27 01:30 Z": 0.39794,
"27 02:00 Z": 0.34789,
"27 02:30 Z": 0.40609,
"27 03:00 Z": 0.50087,
"27 03:30 Z": 0.43019,
"27 04:00 Z": 0.45225,
"27 04:30 Z": 0.46675,
"27 05:00 Z": 0.48937,
"27 05:30 Z": 0.46597,
"27 06:00 Z": 0.40811,
"27 06:30 Z": 0.53808,
"27 07:00 Z": 0.89632,
"27 07:30 Z": 0.84302,
"27 08:00 Z": 1.26328,
"27 08:30 Z": 1.14921,
"27 09:00 Z": 0.88884,
"27 09:30 Z": 0.91347,
"27 10:00 Z": 0.81913,
"27 10:30 Z": 0.71324,
"27 11:00 Z": 0.67931,
"27 11:30 Z": 0.72585,
"27 12:00 Z": 0.68516,
"27 12:30 Z": 0.64825,
"27 13:00 Z": 0.5573,
"27 13:30 Z": 0.25773,
"27 14:00 Z": 0.24654,
"27 14:30 Z": 0.09314,
"27 15:00 Z": 0.0787,
"27 15:30 Z": -0.00088,
"27 16:00 Z": 0.17564,
"27 16:30 Z": 0.66862,
"27 17:00 Z": 0.6782,
"27 17:30 Z": 0.85389,
"27 18:00 Z": 0.92553,
"27 18:30 Z": 1.36792,
"27 19:00 Z": 1.45407,
"27 19:30 Z": 1.29141,
"27 20:00 Z": 1.3573,
"27 20:30 Z": 1.34896,
"27 21:00 Z": 0.86883,
"27 21:30 Z": 0.34881,
"27 22:00 Z": 0.31026,
"27 22:30 Z": 0.17705,
"27 23:00 Z": 0.23044,
"27 23:30 Z": 0.02667,
"28 00:00 Z": 0.00974,
"28 00:30 Z": 0.00555,
"28 01:00 Z": 0.38195,
"28 01:30 Z": 0.33737,
"28 02:00 Z": 0.25924,
"28 02:30 Z": 0.25588,
"28 03:00 Z": 0.47988,
"28 03:30 Z": 0.59013,
"28 04:00 Z": 0.56002,
"28 04:30 Z": 0.42607,
"28 05:00 Z": 0.54394,
"28 05:30 Z": 0.46783,
"28 06:00 Z": 0.44924,
"28 06:30 Z": 0.42884,
"28 07:00 Z": 0.5516,
"28 07:30 Z": 0.55429,
"28 08:00 Z": 0.38146,
"28 08:30 Z": 0.24805,
"28 09:00 Z": 0.4569,
"28 09:30 Z": 0.72006,
"28 10:00 Z": 0.81733,
"28 10:30 Z": 0.88653,
"28 11:00 Z": 1.06218,
"28 11:30 Z": 1.06327,
"28 12:00 Z": 1.31563,
"28 12:30 Z": 1.01337,
"28 13:00 Z": 0.88896,
"28 13:30 Z": 0.56022,
"28 14:00 Z": 0.57237,
"28 14:30 Z": 0.61354,
"28 15:00 Z": 0.77689,
"28 15:30 Z": 1.1442,
"28 16:00 Z": 1.31989,
"28 16:30 Z": 1.52103,
"28 17:00 Z": 1.99336,
"28 17:30 Z": 1.97167,
"28 18:00 Z": 1.79584,
"28 18:30 Z": 1.96886,
"28 19:00 Z": 2.00853,
"28 19:30 Z": 1.72807,
"28 20:00 Z": 1.48324,
"28 20:30 Z": 1.11773,
"28 21:00 Z": 0.77477,
"28 21:30 Z": 0.4181,
"28 22:00 Z": 0.29343,
"28 22:30 Z": 0.29104,
"28 23:00 Z": 0.3233,
"28 23:30 Z": 0.39211,
"29 00:00 Z": 0.36174,
"29 00:30 Z": 0.42563,
"29 01:00 Z": 0.30937,
"29 01:30 Z": 0.21416,
"29 02:00 Z": 0.28196,
"29 02:30 Z": 0.2825,
"29 03:00 Z": 0.24559,
"29 03:30 Z": 0.16015,
"29 04:00 Z": 0.22507,
"29 04:30 Z": 0.13315,
"29 05:00 Z": 0.52215,
"29 05:30 Z": 0.39038,
"29 06:00 Z": 0.94821,
"29 06:30 Z": 1.34329,
"29 07:00 Z": 1.5581,
"29 07:30 Z": 0.90338,
"29 08:00 Z": 0.79753,
"29 08:30 Z": 0.84068,
"29 09:00 Z": 1.07121,
"29 09:30 Z": 0.98553,
"29 10:00 Z": 1.1717,
"29 10:30 Z": 1.07501,
"29 11:00 Z": 1.10692,
"29 11:30 Z": 1.05648,
"29 12:00 Z": 1.08794,
"29 12:30 Z": 1.00283,
"29 13:00 Z": 1.01894,
"29 13:30 Z": 1.0234,
"29 14:00 Z": 0.71823,
"29 14:30 Z": 0.94136,
"29 15:00 Z": 1.08833,
"29 15:30 Z": 1.44523,
"29 16:00 Z": 1.36049,
"29 16:30 Z": 1.44759,
"29 17:00 Z": 1.38695,
"29 17:30 Z": 1.12092,
"29 18:00 Z": 0.90363,
"29 18:30 Z": 1.31566,
"29 19:00 Z": 0.72135,
"29 19:30 Z": 0.49015,
"29 20:00 Z": 0.7323,
"29 20:30 Z": 0.60919,
"29 21:00 Z": 0.73258,
"29 21:30 Z": 0.71289,
"29 22:00 Z": 0.41323,
"29 22:30 Z": 0.55791,
"29 23:00 Z": 0.63184,
"29 23:30 Z": 0.51051,
"30 00:00 Z": 0.54828,
"30 00:30 Z": 0.63117,
"30 01:00 Z": 0.61916,
"30 01:30 Z": 0.53708,
"30 02:00 Z": 0.50634,
"30 02:30 Z": 0.49432,
"30 03:00 Z": 0.48099,
"30 03:30 Z": 0.44775,
"30 04:00 Z": 0.20403,
"30 04:30 Z": 0.57443,
"30 05:00 Z": 0.84441,
"30 05:30 Z": 1.07925,
"30 06:00 Z": 1.39301,
"30 06:30 Z": 1.2731,
"30 07:00 Z": 1.17579,
"30 07:30 Z": 1.14686,
"30 08:00 Z": 0.9208,
"30 08:30 Z": 0.96383,
"30 09:00 Z": 0.89884,
"30 09:30 Z": 1.06932,
"30 10:00 Z": 1.18459,
"30 10:30 Z": 1.16859,
"30 11:00 Z": 1.23852,
"30 11:30 Z": 1.0538,
"30 12:00 Z": 1.09316,
"30 12:30 Z": 0.68954,
"30 13:00 Z": 0.80776,
"30 13:30 Z": 0.80648,
"30 14:00 Z": 0.75742,
"30 14:30 Z": 0.90071,
"30 15:00 Z": 0.97215,
"30 15:30 Z": 1.42885,
"30 16:00 Z": 1.4642,
"30 16:30 Z": 1.37221,
"30 17:00 Z": 1.1612,
"30 17:30 Z": 1.07885,
"30 18:00 Z": 1.31898,
"30 18:30 Z": 1.42981,
"30 19:00 Z": 1.63274,
"30 19:30 Z": 1.77496,
"30 20:00 Z": 1.01033,
"30 20:30 Z": 1.07744,
"30 21:00 Z": 0.66633,
"30 21:30 Z": 0.56909,
"30 22:00 Z": 0.67377,
"30 22:30 Z": 0.67036,
"30 23:00 Z": 0.71549,
"30 23:30 Z": 0.46516,
"31 00:00 Z": 0.63461,
"31 00:30 Z": 0.70522,
"31 01:00 Z": 0.56524,
"31 01:30 Z": 0.59123,
"31 02:00 Z": 0.54621,
"31 02:30 Z": 0.65095,
"31 03:00 Z": 0.58043,
"31 03:30 Z": 0.7466,
"31 04:00 Z": 0.55338,
"31 04:30 Z": 0.4982,
"31 05:00 Z": 0.72106,
"31 05:30 Z": 0.63327,
"31 06:00 Z": 1.37418,
"31 06:30 Z": 1.49205,
"31 07:00 Z": 1.70139,
"31 07:30 Z": 1.19903,
"31 08:00 Z": 1.63252,
"31 08:30 Z": 1.54294,
"31 09:00 Z": 1.79961,
"31 09:30 Z": 1.19312,
"31 10:00 Z": 1.33947,
"31 10:30 Z": 1.57357,
"31 11:00 Z": 1.70352,
"31 11:30 Z": 1.9534,
"31 12:00 Z": 1.5956,
"31 12:30 Z": 1.39091,
"31 13:00 Z": 1.44701,
"31 13:30 Z": 1.2089,
"31 14:00 Z": 1.27027,
"31 14:30 Z": 1.34489,
"31 15:00 Z": 1.58025,
"31 15:30 Z": 1.65583,
"31 16:00 Z": 1.78512,
"31 16:30 Z": 1.49603,
"31 17:00 Z": 1.34294,
"31 17:30 Z": 1.21177,
"31 18:00 Z": 1.31763,
"31 18:30 Z": 1.51553,
"31 19:00 Z": 1.6921,
"31 19:30 Z": 1.2893,
"31 20:00 Z": 0.93044,
"31 20:30 Z": 1.15762,
"31 21:00 Z": 0.96351,
"31 21:30 Z": 1.06892,
"31 22:00 Z": 0.90227,
"31 22:30 Z": 0.86559,
"31 23:00 Z": 0.80602,
"31 23:30 Z": 0.57789}}"""
start = Datetime.utcnow()
for i in range(20):
loads(zish_str)
print(Datetime.utcnow() - start)
| 26.79494 | 41 | 0.48042 | 8,959 | 40,246 | 2.157607 | 0.171559 | 0.099431 | 0.100569 | 0.009622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.625331 | 0.2967 | 40,246 | 1,501 | 42 | 26.812791 | 0.057587 | 0 | 0 | 0 | 0 | 0 | 0.995378 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.001336 | 0 | 0.001336 | 0.000668 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4d21db277726f00ec5f1037c7db74739868ef123 | 4,456 | py | Python | tests/tests.py | harwee/django-rest-framework-docs | b424403eb7788843bcc821c84e1d413795142e05 | [
"BSD-2-Clause"
] | 2 | 2018-02-25T13:47:56.000Z | 2019-02-08T08:27:13.000Z | tests/tests.py | harwee/django-rest-framework-docs | b424403eb7788843bcc821c84e1d413795142e05 | [
"BSD-2-Clause"
] | 3 | 2020-02-12T02:56:06.000Z | 2021-06-10T21:40:02.000Z | tests/tests.py | harwee/django-rest-framework-docs | b424403eb7788843bcc821c84e1d413795142e05 | [
"BSD-2-Clause"
] | 12 | 2018-02-14T08:26:28.000Z | 2020-04-14T22:25:38.000Z | try:
from django.urls import reverse_lazy
except ImportError:
# Will be removed in Django 2.0
from django.core.urlresolvers import reverse_lazy
from django.test import TestCase, override_settings
from rest_framework_docs.settings import DRFSettings
class DRFDocsViewTests(TestCase):
SETTINGS_HIDE_DOCS = {
'HIDE_DOCS': True # Default: False
}
def setUp(self):
super(DRFDocsViewTests, self).setUp()
def test_settings_module(self):
settings = DRFSettings()
self.assertEqual(settings.get_setting("HIDE_DOCS"), False)
self.assertEqual(settings.get_setting("TEST"), None)
def test_index_view_with_endpoints(self):
"""
Should load the drf docs view with all the endpoints.
NOTE: Views that do **not** inherit from DRF's "APIView" are not included.
"""
response = self.client.get(reverse_lazy('drfdocs'))
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.context["endpoints"]), 15)
# Test the login view
self.assertEqual(response.context["endpoints"][0].name_parent, "accounts")
self.assertEqual(set(response.context["endpoints"][0].allowed_methods), set(['OPTIONS', 'POST']))
self.assertEqual(response.context["endpoints"][0].path, "/accounts/login/")
self.assertEqual(response.context["endpoints"][0].docstring, "A view that allows users to login providing their username and password.")
self.assertEqual(len(response.context["endpoints"][0].fields), 2)
self.assertEqual(response.context["endpoints"][0].fields[0]["type"], "CharField")
self.assertTrue(response.context["endpoints"][0].fields[0]["required"])
self.assertEqual(response.context["endpoints"][1].name_parent, "accounts")
self.assertEqual(set(response.context["endpoints"][1].allowed_methods), set(['POST', 'OPTIONS']))
self.assertEqual(response.context["endpoints"][1].path, "/accounts/login2/")
self.assertEqual(response.context["endpoints"][1].docstring, "A view that allows users to login providing their username and password. Without serializer_class")
self.assertEqual(len(response.context["endpoints"][1].fields), 2)
self.assertEqual(response.context["endpoints"][1].fields[0]["type"], "CharField")
self.assertTrue(response.context["endpoints"][1].fields[0]["required"])
# The view "OrganisationErroredView" (organisations/(?P<slug>[\w-]+)/errored/) should contain an error.
self.assertEqual(str(response.context["endpoints"][9].errors), "'test_value'")
def test_index_search_with_endpoints(self):
response = self.client.get("%s?search=reset-password" % reverse_lazy("drfdocs"))
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.context["endpoints"]), 2)
self.assertEqual(response.context["endpoints"][1].path, "/accounts/reset-password/confirm/")
self.assertEqual(len(response.context["endpoints"][1].fields), 3)
@override_settings(REST_FRAMEWORK_DOCS=SETTINGS_HIDE_DOCS)
def test_index_view_docs_hidden(self):
"""
Should prevent the docs from loading the "HIDE_DOCS" is set
to "True" or undefined under settings
"""
response = self.client.get(reverse_lazy('drfdocs'))
self.assertEqual(response.status_code, 404)
self.assertEqual(response.reason_phrase.upper(), "NOT FOUND")
def test_model_viewset(self):
response = self.client.get(reverse_lazy('drfdocs'))
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context["endpoints"][10].path, '/organisations/<slug>/')
self.assertEqual(response.context['endpoints'][6].fields[2]['to_many_relation'], True)
self.assertEqual(response.context["endpoints"][11].path, '/organisation-model-viewsets/')
self.assertEqual(response.context["endpoints"][12].path, '/organisation-model-viewsets/<pk>/')
self.assertEqual(set(response.context["endpoints"][11].allowed_methods), set(['GET', 'POST', 'OPTIONS']))
self.assertEqual(set(response.context["endpoints"][12].allowed_methods), set(['GET', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']))
self.assertEqual(set(response.context["endpoints"][13].allowed_methods), set(['POST', 'OPTIONS']))
self.assertEqual(response.context["endpoints"][13].docstring, 'This is a test.')
| 50.067416 | 169 | 0.690305 | 525 | 4,456 | 5.758095 | 0.270476 | 0.158783 | 0.214357 | 0.138935 | 0.585511 | 0.507112 | 0.407542 | 0.346014 | 0.292094 | 0.214026 | 0 | 0.015467 | 0.158438 | 4,456 | 88 | 170 | 50.636364 | 0.790667 | 0.08842 | 0 | 0.105263 | 0 | 0 | 0.204705 | 0.035536 | 0 | 0 | 0 | 0 | 0.596491 | 1 | 0.105263 | false | 0.070175 | 0.087719 | 0 | 0.22807 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
4d2486022622f6c55bd5af8ccf8646da44c909ed | 105 | py | Python | Part I. Foundations/Chapter 5 Probabilistic Analysis and Randomized Algorithms/test.py | akniyev/clrs_solutions | 691acb8b0dfcc4375b89ae597dfdd6ae342ce7fa | [
"MIT"
] | null | null | null | Part I. Foundations/Chapter 5 Probabilistic Analysis and Randomized Algorithms/test.py | akniyev/clrs_solutions | 691acb8b0dfcc4375b89ae597dfdd6ae342ce7fa | [
"MIT"
] | null | null | null | Part I. Foundations/Chapter 5 Probabilistic Analysis and Randomized Algorithms/test.py | akniyev/clrs_solutions | 691acb8b0dfcc4375b89ae597dfdd6ae342ce7fa | [
"MIT"
] | null | null | null | product = 1
i = 1
while product > 0.5:
product *= (365.0 - i) / 365.0
i += 1
print(product, i)
| 11.666667 | 34 | 0.52381 | 19 | 105 | 2.894737 | 0.421053 | 0.072727 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.178082 | 0.304762 | 105 | 8 | 35 | 13.125 | 0.575342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4d4a6105430d5bf845c98ca9172ec550f5baf74c | 130 | py | Python | backend/users/urls.py | TeamE9uana/DeepMush | 4bfc41cb45e80ab15d050f3a939f63d8fd31cdae | [
"MIT"
] | 5 | 2022-01-03T09:32:00.000Z | 2022-01-26T12:02:32.000Z | backend/users/urls.py | TeamE9uana/DeepMush | 4bfc41cb45e80ab15d050f3a939f63d8fd31cdae | [
"MIT"
] | 25 | 2022-01-03T05:53:26.000Z | 2022-01-20T15:01:13.000Z | backend/users/urls.py | TeamE9uana/DeepMush | 4bfc41cb45e80ab15d050f3a939f63d8fd31cdae | [
"MIT"
] | 4 | 2022-01-03T10:38:09.000Z | 2022-02-23T11:40:41.000Z | from django.urls import path
from .views import *
urlpatterns = [
path('me/', MyProfileView.as_view(), name='my_profile'),
]
| 18.571429 | 60 | 0.692308 | 17 | 130 | 5.176471 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 130 | 6 | 61 | 21.666667 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0.1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
4d651487281b238e2fb9788b6825bc8f1eb02e41 | 401 | py | Python | formulas/index.py | anthonyk1225/robinhood-to-xlsx | 55150fbf2c1c34fbed7251ad93630fe82c3862f1 | [
"MIT"
] | 12 | 2019-08-06T15:22:07.000Z | 2022-01-02T15:56:01.000Z | formulas/index.py | anthonyk1225/robinhood-to-xlsx | 55150fbf2c1c34fbed7251ad93630fe82c3862f1 | [
"MIT"
] | 13 | 2019-08-12T20:09:48.000Z | 2021-08-07T02:11:15.000Z | formulas/index.py | anthonyk1225/robinhood-to-xlsx | 55150fbf2c1c34fbed7251ad93630fe82c3862f1 | [
"MIT"
] | 3 | 2020-01-21T23:29:20.000Z | 2020-08-18T16:39:12.000Z | from formulas.dividends import handle_formulas as dividend_formulas
from formulas.events import handle_formulas as event_formulas
from formulas.options import handle_formulas as option_formulas
from formulas.orders import handle_formulas as order_formulas
formula_pipelines = {
"dividends": dividend_formulas,
"events": event_formulas,
"options": option_formulas,
"orders": order_formulas,
}
| 33.416667 | 67 | 0.830424 | 50 | 401 | 6.4 | 0.3 | 0.15 | 0.25 | 0.275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.112219 | 401 | 11 | 68 | 36.454545 | 0.898876 | 0 | 0 | 0 | 0 | 0 | 0.069825 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
4d6e4aa22250e7ccee293006e2480443fb9ae340 | 288 | py | Python | dp/unique_path.py | lockeCucumber/DataStructure | a6c22a339deb75b2280e10664964cf1d8588732e | [
"MIT"
] | null | null | null | dp/unique_path.py | lockeCucumber/DataStructure | a6c22a339deb75b2280e10664964cf1d8588732e | [
"MIT"
] | null | null | null | dp/unique_path.py | lockeCucumber/DataStructure | a6c22a339deb75b2280e10664964cf1d8588732e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'长方形矩阵,左上到右下的方式数量'
def get_unique_path_count(m, n):
res_list = [[1]*n]*m
for i in xrange(1, m):
for j in xrange(1, n):
res_list[i][j] = res_list[i -1][j] + res_list[i][j-1]
return res_list[-1][-1]
print get_unique_path_count(3,3)
| 24 | 65 | 0.576389 | 55 | 288 | 2.818182 | 0.418182 | 0.225806 | 0.154839 | 0.232258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.045045 | 0.229167 | 288 | 11 | 66 | 26.181818 | 0.653153 | 0.072917 | 0 | 0 | 0 | 0 | 0.060377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.125 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4d75d6f4711cbe7ca3a787e10e5f56fbac0dfffa | 219 | py | Python | Journal/core.py | prabhanshu11/journal | f25bef15ddc8f81a7fb3f8fa73e79294460680cb | [
"Apache-2.0"
] | 1 | 2020-08-18T06:14:47.000Z | 2020-08-18T06:14:47.000Z | Journal/core.py | prabhanshu11/journal | f25bef15ddc8f81a7fb3f8fa73e79294460680cb | [
"Apache-2.0"
] | 2 | 2021-09-28T03:10:50.000Z | 2022-02-26T08:07:39.000Z | Journal/core.py | prabhanshu11/journal | f25bef15ddc8f81a7fb3f8fa73e79294460680cb | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = []
# Cell
from datetime import datetime, date, time, timedelta
import re
from .tasks import *
from .questions import * | 21.9 | 87 | 0.748858 | 30 | 219 | 5.3 | 0.766667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010929 | 0.164384 | 219 | 10 | 88 | 21.9 | 0.857924 | 0.410959 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
4d79da3aee8e4659a11a7a09ca0fb84fd26678b1 | 9,087 | py | Python | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeScalingRulesRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeScalingRulesRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/DescribeScalingRulesRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from aliyunsdkcore.request import RpcRequest
from aliyunsdkess.endpoint import endpoint_data
class DescribeScalingRulesRequest(RpcRequest):
def __init__(self):
RpcRequest.__init__(self, 'Ess', '2014-08-28', 'DescribeScalingRules','ess')
if hasattr(self, "endpoint_map"):
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
if hasattr(self, "endpoint_regional"):
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
def get_ResourceOwnerId(self):
return self.get_query_params().get('ResourceOwnerId')
def set_ResourceOwnerId(self,ResourceOwnerId):
self.add_query_param('ResourceOwnerId',ResourceOwnerId)
def get_ScalingRuleId10(self):
return self.get_query_params().get('ScalingRuleId.10')
def set_ScalingRuleId10(self,ScalingRuleId10):
self.add_query_param('ScalingRuleId.10',ScalingRuleId10)
def get_OwnerId(self):
return self.get_query_params().get('OwnerId')
def set_OwnerId(self,OwnerId):
self.add_query_param('OwnerId',OwnerId)
def get_ScalingRuleAri1(self):
return self.get_query_params().get('ScalingRuleAri.1')
def set_ScalingRuleAri1(self,ScalingRuleAri1):
self.add_query_param('ScalingRuleAri.1',ScalingRuleAri1)
def get_ScalingRuleAri2(self):
return self.get_query_params().get('ScalingRuleAri.2')
def set_ScalingRuleAri2(self,ScalingRuleAri2):
self.add_query_param('ScalingRuleAri.2',ScalingRuleAri2)
def get_ScalingRuleAri3(self):
return self.get_query_params().get('ScalingRuleAri.3')
def set_ScalingRuleAri3(self,ScalingRuleAri3):
self.add_query_param('ScalingRuleAri.3',ScalingRuleAri3)
def get_ScalingRuleAri4(self):
return self.get_query_params().get('ScalingRuleAri.4')
def set_ScalingRuleAri4(self,ScalingRuleAri4):
self.add_query_param('ScalingRuleAri.4',ScalingRuleAri4)
def get_ScalingRuleAri5(self):
return self.get_query_params().get('ScalingRuleAri.5')
def set_ScalingRuleAri5(self,ScalingRuleAri5):
self.add_query_param('ScalingRuleAri.5',ScalingRuleAri5)
def get_ScalingRuleAri6(self):
return self.get_query_params().get('ScalingRuleAri.6')
def set_ScalingRuleAri6(self,ScalingRuleAri6):
self.add_query_param('ScalingRuleAri.6',ScalingRuleAri6)
def get_ScalingRuleAri7(self):
return self.get_query_params().get('ScalingRuleAri.7')
def set_ScalingRuleAri7(self,ScalingRuleAri7):
self.add_query_param('ScalingRuleAri.7',ScalingRuleAri7)
def get_ScalingRuleAri8(self):
return self.get_query_params().get('ScalingRuleAri.8')
def set_ScalingRuleAri8(self,ScalingRuleAri8):
self.add_query_param('ScalingRuleAri.8',ScalingRuleAri8)
def get_ShowAlarmRules(self):
return self.get_query_params().get('ShowAlarmRules')
def set_ShowAlarmRules(self,ShowAlarmRules):
self.add_query_param('ShowAlarmRules',ShowAlarmRules)
def get_ScalingRuleName1(self):
return self.get_query_params().get('ScalingRuleName.1')
def set_ScalingRuleName1(self,ScalingRuleName1):
self.add_query_param('ScalingRuleName.1',ScalingRuleName1)
def get_ScalingRuleName2(self):
return self.get_query_params().get('ScalingRuleName.2')
def set_ScalingRuleName2(self,ScalingRuleName2):
self.add_query_param('ScalingRuleName.2',ScalingRuleName2)
def get_ScalingRuleName3(self):
return self.get_query_params().get('ScalingRuleName.3')
def set_ScalingRuleName3(self,ScalingRuleName3):
self.add_query_param('ScalingRuleName.3',ScalingRuleName3)
def get_ScalingRuleName4(self):
return self.get_query_params().get('ScalingRuleName.4')
def set_ScalingRuleName4(self,ScalingRuleName4):
self.add_query_param('ScalingRuleName.4',ScalingRuleName4)
def get_ScalingRuleName5(self):
return self.get_query_params().get('ScalingRuleName.5')
def set_ScalingRuleName5(self,ScalingRuleName5):
self.add_query_param('ScalingRuleName.5',ScalingRuleName5)
def get_ScalingGroupId(self):
return self.get_query_params().get('ScalingGroupId')
def set_ScalingGroupId(self,ScalingGroupId):
self.add_query_param('ScalingGroupId',ScalingGroupId)
def get_ScalingRuleName6(self):
return self.get_query_params().get('ScalingRuleName.6')
def set_ScalingRuleName6(self,ScalingRuleName6):
self.add_query_param('ScalingRuleName.6',ScalingRuleName6)
def get_ScalingRuleName7(self):
return self.get_query_params().get('ScalingRuleName.7')
def set_ScalingRuleName7(self,ScalingRuleName7):
self.add_query_param('ScalingRuleName.7',ScalingRuleName7)
def get_ScalingRuleName8(self):
return self.get_query_params().get('ScalingRuleName.8')
def set_ScalingRuleName8(self,ScalingRuleName8):
self.add_query_param('ScalingRuleName.8',ScalingRuleName8)
def get_ScalingRuleAri9(self):
return self.get_query_params().get('ScalingRuleAri.9')
def set_ScalingRuleAri9(self,ScalingRuleAri9):
self.add_query_param('ScalingRuleAri.9',ScalingRuleAri9)
def get_ScalingRuleName9(self):
return self.get_query_params().get('ScalingRuleName.9')
def set_ScalingRuleName9(self,ScalingRuleName9):
self.add_query_param('ScalingRuleName.9',ScalingRuleName9)
def get_PageNumber(self):
return self.get_query_params().get('PageNumber')
def set_PageNumber(self,PageNumber):
self.add_query_param('PageNumber',PageNumber)
def get_PageSize(self):
return self.get_query_params().get('PageSize')
def set_PageSize(self,PageSize):
self.add_query_param('PageSize',PageSize)
def get_ScalingRuleType(self):
return self.get_query_params().get('ScalingRuleType')
def set_ScalingRuleType(self,ScalingRuleType):
self.add_query_param('ScalingRuleType',ScalingRuleType)
def get_ResourceOwnerAccount(self):
return self.get_query_params().get('ResourceOwnerAccount')
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
def get_OwnerAccount(self):
return self.get_query_params().get('OwnerAccount')
def set_OwnerAccount(self,OwnerAccount):
self.add_query_param('OwnerAccount',OwnerAccount)
def get_ScalingRuleName10(self):
return self.get_query_params().get('ScalingRuleName.10')
def set_ScalingRuleName10(self,ScalingRuleName10):
self.add_query_param('ScalingRuleName.10',ScalingRuleName10)
def get_ScalingRuleId8(self):
return self.get_query_params().get('ScalingRuleId.8')
def set_ScalingRuleId8(self,ScalingRuleId8):
self.add_query_param('ScalingRuleId.8',ScalingRuleId8)
def get_ScalingRuleId9(self):
return self.get_query_params().get('ScalingRuleId.9')
def set_ScalingRuleId9(self,ScalingRuleId9):
self.add_query_param('ScalingRuleId.9',ScalingRuleId9)
def get_ScalingRuleAri10(self):
return self.get_query_params().get('ScalingRuleAri.10')
def set_ScalingRuleAri10(self,ScalingRuleAri10):
self.add_query_param('ScalingRuleAri.10',ScalingRuleAri10)
def get_ScalingRuleId4(self):
return self.get_query_params().get('ScalingRuleId.4')
def set_ScalingRuleId4(self,ScalingRuleId4):
self.add_query_param('ScalingRuleId.4',ScalingRuleId4)
def get_ScalingRuleId5(self):
return self.get_query_params().get('ScalingRuleId.5')
def set_ScalingRuleId5(self,ScalingRuleId5):
self.add_query_param('ScalingRuleId.5',ScalingRuleId5)
def get_ScalingRuleId6(self):
return self.get_query_params().get('ScalingRuleId.6')
def set_ScalingRuleId6(self,ScalingRuleId6):
self.add_query_param('ScalingRuleId.6',ScalingRuleId6)
def get_ScalingRuleId7(self):
return self.get_query_params().get('ScalingRuleId.7')
def set_ScalingRuleId7(self,ScalingRuleId7):
self.add_query_param('ScalingRuleId.7',ScalingRuleId7)
def get_ScalingRuleId1(self):
return self.get_query_params().get('ScalingRuleId.1')
def set_ScalingRuleId1(self,ScalingRuleId1):
self.add_query_param('ScalingRuleId.1',ScalingRuleId1)
def get_ScalingRuleId2(self):
return self.get_query_params().get('ScalingRuleId.2')
def set_ScalingRuleId2(self,ScalingRuleId2):
self.add_query_param('ScalingRuleId.2',ScalingRuleId2)
def get_ScalingRuleId3(self):
return self.get_query_params().get('ScalingRuleId.3')
def set_ScalingRuleId3(self,ScalingRuleId3):
self.add_query_param('ScalingRuleId.3',ScalingRuleId3) | 34.290566 | 78 | 0.781996 | 1,088 | 9,087 | 6.30239 | 0.142463 | 0.034126 | 0.079627 | 0.09669 | 0.373195 | 0.237567 | 0.237567 | 0.196879 | 0 | 0 | 0 | 0.025971 | 0.110157 | 9,087 | 265 | 79 | 34.290566 | 0.822038 | 0.082976 | 0 | 0 | 0 | 0 | 0.159634 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.478788 | false | 0 | 0.012121 | 0.236364 | 0.733333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
4d98405d7742ef6a625135be89c0b41f863b35b7 | 19,741 | py | Python | website/lol.py | qureshinomaan/PumpMonitoringSystem | d55bd8f6ea6643071ae41a8dbe72e487e6330109 | [
"MIT"
] | 2 | 2019-11-25T09:46:10.000Z | 2021-08-23T17:25:34.000Z | website/lol.py | qureshinomaan/PumpMonitoringSystem | d55bd8f6ea6643071ae41a8dbe72e487e6330109 | [
"MIT"
] | 3 | 2019-11-25T12:57:02.000Z | 2019-12-07T00:00:54.000Z | website/lol.py | qureshinomaan/PumpMonitoringSystem | d55bd8f6ea6643071ae41a8dbe72e487e6330109 | [
"MIT"
] | 1 | 2020-02-23T12:43:01.000Z | 2020-02-23T12:43:01.000Z | import requests
import json
from onem2m import *
from datetime import datetime
from datetime import timedelta
from basics import db,data
# from_zone = tz.gettz('UTC')
# to_zone = tz.gettz('America/New_York')
final_reading = []
oe_temp = []
time = []
def get_data_grp(group_name):
headers = {
'X-M2M-Origin': 'admin:admin',
'Content-type': 'application/json'
}
group_uri = group_name
print(group_uri)
response = requests.get(group_uri, headers=headers)
# print('Return code : {}'.format(response.status-code))
#print('Return Content : {}'.format(response.text))
_resp = json.loads(response.text)
print("Get " + group_name)
oe_temp.append([_resp['m2m:cin']['ct'], _resp['m2m:cin']['con']])
# spliced-string = output-string.split()
# for con in spliced-string:
# if spliced-string.index(con) == 2:
# data.append(con)
# if spliced-string.index(con) == 7:
# meow.append(con)
# data.append(loli)
# print(oe_temp)
# print("==========================")
return response.status_code, _resp
def convert_to_time(ctime):
date = ctime[0:8]
time = ctime[9:15]
datetime_object = datetime.strptime(ctime, '%Y%m%dT%H%M%S')
return datetime_object + timedelta(hours=5,minutes=30)
# print(datetime_object)
# return datetime_object
def lolzzmax():
# server = "http://onem2m.iiit.ac.in:443/~/in-cse/in-name/Team22-Water-Level-Monitoring-in-Overhead-Tanks/node-1/"
# lolmax = ["cin-163911679","cin-197346638","cin-987210096","cin-291250657","cin-748523646","cin-625205997","cin-516244186","cin-531719764","cin-134070750","cin-825901307","cin-960594054","cin-128714720","cin-481087682","cin-765029315","cin-688584719","cin-979314682","cin-799679709","cin-3719358443","cin-970322429","cin-942204590","cin-760193537","cin-591504543","cin-2826443047","cin-715253669","cin-584736631","cin-357765366","cin-3024436456","cin-214535893","cin-328126435","cin-719444815","cin-225181935","cin-743724136","cin-147662591","cin-271083887","cin-184955853","cin-114790997","cin-553697373","cin-112211627","cin-357445205","cin-944999561","cin-642945514","cin-246003016","cin-94887859","cin-25588155","cin-887429428","cin-563196453","cin-511906753"]
# lolmax = ["cin-8443500811","cin-559332468","cin-451625473","cin-924096586","cin-419182737","cin-976264976","cin-701505002","cin-950958302","cin-785982523","cin-712282471","cin-576987439","cin-99663505","cin-231573221","cin-139472512","cin-226824741","cin-2202235","cin-235004777","cin-27278935","cin-378338633","cin-948773834","cin-707992410","cin-832666415","cin-991440174","cin-960411457","cin-213678277","cin-21025465","cin-51525791","cin-584569768","cin-155638142","cin-204204015","cin-74448822","cin-328903900","cin-274490665","cin-597965266","cin-533066112","cin-938246272","cin-7443574015","cin-852491422","cin-653373576","cin-469601388","cin-575531233","cin-972001868","cin-856071318","cin-263300926","cin-311169209","cin-58519092","cin-98923012","cin-756096018","cin-9219443810","cin-3059079","cin-848382239","cin-488170862","cin-398353475","cin-757990562","cin-620281799","cin-64443214443","cin-739388528","cin-19309734","cin-633415267","cin-761736979","cin-151487245","cin-474602985","cin-19135785","cin-874017155","cin-55473917","cin-511294825","cin-262145679","cin-185298152","cin-3914852","cin-1954443793","cin-182119203","cin-787531143","cin-1378204443","cin-869143900","cin-673282482","cin-451843957","cin-748188389","cin-96443444432","cin-6443292158","cin-166873433","cin-260481836","cin-599604664","cin-524152584","cin-400468493","cin-308365841","cin-624017342","cin-6370674","cin-4433693093","cin-672831683","cin-875097695","cin-607669203","cin-104077975","cin-691437861","cin-573848587","cin-819163145","cin-197826104","cin-781786223","cin-544048589","cin-661610623","cin-251236410","cin-259443584","cin-1064434116","cin-952148454","cin-613466608","cin-756873367","cin-946241913","cin-819121785","cin-846799933","cin-116797003","cin-7427564438","cin-761438758","cin-731658303","cin-504187390","cin-344664197","cin-79286266","cin-402049434","cin-687231459","cin-899751189","cin-656499089","cin-951059216","cin-778355233","cin-482674008","cin-261565714","cin-721046359","cin-369414899","cin-366267278","cin-467030120","cin-5705137443","cin-755026897","cin-3244355916","cin-61556456","cin-301462849","cin-771778118","cin-953175604","cin-197076724","cin-63381225","cin-554494382","cin-460956724","cin-458877414","cin-702010219","cin-748502676","cin-977670735","cin-743971849","cin-941415425","cin-320428255","cin-790582705","cin-556931210","cin-397203097","cin-899971219","cin-704322859","cin-261486592","cin-424631532","cin-576203003","cin-930443042","cin-372486178","cin-178846611","cin-688812849","cin-596311543","cin-291667587","cin-38423893","cin-248935342","cin-9855443242","cin-488625360","cin-478122844","cin-169681521","cin-647388950","cin-394916758","cin-507332577","cin-106960824","cin-899629715","cin-835816046","cin-356075872","cin-702496403","cin-688620110","cin-974785297","cin-81268866","cin-635693907","cin-565378362","cin-9161104434","cin-532398353","cin-4463443345","cin-38737865","cin-858234081","cin-190210362","cin-441931510","cin-957530055","cin-406369398","cin-790717962","cin-66997429","cin-435954531","cin-869517","cin-395574551","cin-610845572","cin-279021899","cin-50689429","cin-94233536","cin-440713186","cin-52151685","cin-100327074","cin-448289778","cin-874177993","cin-273182267","cin-936154554","cin-183760392","cin-379012264","cin-455504234","cin-512552844","cin-188459791","cin-369305606","cin-919857254","cin-87670525","cin-389069097","cin-562378256","cin-209768104","cin-392189107","cin-953030633","cin-614346057","cin-285274787","cin-408868559","cin-960047694","cin-308237409","cin-923971724","cin-551632498","cin-452531583","cin-752470486","cin-750070638","cin-73286010","cin-188955320","cin-919306055","cin-129087458","cin-107001313","cin-553530259","cin-87449892","cin-882418732","cin-398866763","cin-129006564","cin-327351194","cin-711288185","cin-224830177","cin-824974730","cin-724938593","cin-886075036","cin-957024002","cin-862117851","cin-9836234431","cin-933329622","cin-7304443117","cin-132440085","cin-328700785","cin-966415892","cin-253289249","cin-376128322","cin-536125716","cin-696650884","cin-831620197","cin-494575144","cin-535084698","cin-118586915","cin-234087084","cin-573995359","cin-748553825","cin-461255722","cin-342239742","cin-156161115","cin-343343738","cin-652003032","cin-830004822","cin-766331312","cin-485769183","cin-749438277","cin-15057310","cin-896456774","cin-838603219","cin-359578455","cin-281771922","cin-349475736","cin-85708374","cin-529543078","cin-570461864","cin-969621571","cin-970381411","cin-677272092","cin-610751682","cin-305177328","cin-382047665","cin-120072185","cin-260101799","cin-377335020","cin-45370497","cin-945878740","cin-415171773","cin-675638220","cin-530614133","cin-873872209","cin-4914430206","cin-628906866","cin-537768191","cin-97752753","cin-209020177","cin-848843149","cin-637735265","cin-57820201","cin-1557114443","cin-914482552","cin-220053513","cin-220849293","cin-66741188","cin-159300747","cin-554892928","cin-503075384","cin-940746872","cin-579961426","cin-575303704","cin-83584209","cin-589892269","cin-576655159","cin-4433143662","cin-687484443","cin-4430452552","cin-685171783"]
# lolmax = ["cin-229194911","cin-579827981","cin-673596909","cin-908656360","cin-135702940","cin-194036731","cin-224337796","cin-663036154","cin-607168659","cin-300626290","cin-43744384437","cin-206555887","cin-694033785","cin-9294437794","cin-523436562","cin-326722888","cin-926523147","cin-893147305","cin-743052870","cin-619630128","cin-845549682","cin-352092827","cin-573000","cin-760647355","cin-496254588","cin-985865973","cin-596239741","cin-3876744341","cin-9662464436","cin-68365922","cin-139873022","cin-58893555","cin-82604358","cin-890319430","cin-663204530","cin-308935905","cin-52948287","cin-621225097","cin-36919482","cin-652596662","cin-702325456","cin-526532606","cin-533182969","cin-836927878","cin-468499223","cin-713411091","cin-296203462","cin-116994105","cin-376560133","cin-424255739","cin-369943044","cin-872613922","cin-532464376","cin-442864255","cin-298542321","cin-168510522","cin-987148555","cin-578906895","cin-567258119","cin-658633709","cin-262093831","cin-419570667","cin-49467491","cin-894716859","cin-975363990"]
# lolmax = ["cin-7846594","cin-129428309","cin-425308612","cin-681769326","cin-1443660987","cin-615797706","cin-711011732","cin-646448748","cin-446046008","cin-489916439","cin-662253036","cin-356438620","cin-8734431687","cin-350570148","cin-753283241","cin-943057276","cin-149311142","cin-682385221","cin-874355247","cin-122089710","cin-404395344","cin-458940845","cin-499597201","cin-821282516","cin-891362873","cin-783263396","cin-370064075","cin-664600770","cin-403818736","cin-120098323","cin-172371465","cin-242244400","cin-777043774","cin-907862434","cin-125062589","cin-753121620","cin-651243518","cin-782216644","cin-672998652","cin-544628971","cin-912457708","cin-471067406","cin-708312563","cin-268132789","cin-210285581","cin-848628726","cin-100228340","cin-393098626","cin-501916894","cin-6812277","cin-109677905","cin-376582043","cin-339498506","cin-973825337","cin-162685921","cin-556008366","cin-216795330","cin-392115296","cin-278665838","cin-533526866","cin-693916787","cin-216349643","cin-362985247","cin-8525244317","cin-411531797","cin-7891544354","cin-724781856","cin-6784430763","cin-570048874","cin-4437290482","cin-833636051","cin-341975138","cin-594302398","cin-301252346","cin-905489472","cin-7404044327","cin-329085972","cin-6767294431","cin-270336081","cin-5443827857","cin-536470090","cin-339782867","cin-541116498","cin-960955003","cin-835317130","cin-157220454","cin-643591395","cin-847277511","cin-810198326","cin-8716144","cin-828833460","cin-386594874","cin-636888493","cin-542120208","cin-274252450","cin-706406075","cin-892787621","cin-327979604","cin-961004342","cin-937522115","cin-950698852","cin-673528713","cin-93339823","cin-756251912","cin-753846001","cin-77443443234","cin-764687624","cin-981455337","cin-193675857","cin-461176171","cin-815482094","cin-894731128","cin-842921332","cin-286676178","cin-550670942","cin-786604726","cin-693213549","cin-671788416","cin-378647313","cin-101932338","cin-160241095","cin-912426100","cin-3130823","cin-677866876","cin-419978766","cin-320449493","cin-759178445","cin-992638337","cin-362827981","cin-531315598","cin-503231473","cin-222144426","cin-939216524","cin-500387365","cin-7095544302","cin-148511070","cin-334114225","cin-557599737","cin-402731526","cin-322532190","cin-186488967","cin-495413370","cin-659144118","cin-423069182","cin-515474368","cin-4432840475","cin-284983724","cin-735346993","cin-244069092","cin-227605452","cin-832083756","cin-7443819235","cin-793459664","cin-224203376","cin-9443378523","cin-31597220","cin-18623306","cin-967271447","cin-524273991","cin-560960694","cin-366619623","cin-675142309","cin-192533461","cin-68749410","cin-773266655","cin-582333064","cin-885998238","cin-896397976","cin-849429575","cin-225189643","cin-555972400","cin-553084390","cin-238427402","cin-740364486","cin-574025349","cin-472425225","cin-228518176","cin-621018206","cin-297150207","cin-616577770","cin-687997570","cin-208182441","cin-2443718578","cin-560482817","cin-365396872","cin-682314099","cin-851970256","cin-147423642","cin-216396384","cin-6944301593","cin-654913552","cin-893485681","cin-31319317","cin-377182187","cin-38601012","cin-997670546","cin-556685297","cin-359854133","cin-606592439","cin-850029068","cin-455393036","cin-772174183","cin-115981435","cin-952224939","cin-474631836","cin-45771226","cin-243202128","cin-294595522","cin-1069443226","cin-765154199","cin-988123221","cin-365270953","cin-109774151","cin-940288691","cin-1744357492","cin-244351785","cin-44481287","cin-127162385","cin-185239155","cin-852479870","cin-724079613","cin-733389947","cin-864439956","cin-790743356","cin-269501231","cin-906007833","cin-6344396102","cin-621814833","cin-604781869","cin-390647148","cin-748771238","cin-721063273","cin-907851984","cin-831501139","cin-122200944","cin-115939922","cin-196004215","cin-461287690","cin-435999260","cin-768939520","cin-535166338","cin-184102624","cin-307986578","cin-839143760","cin-668777701","cin-162069367","cin-273306831","cin-215866201","cin-2502674430","cin-9744344356","cin-26737090","cin-162947604","cin-913233290","cin-7443440585","cin-560714597","cin-173230197","cin-336237621","cin-588658898","cin-69013817","cin-928269366","cin-407516848","cin-122768831","cin-885159787","cin-6713474434","cin-870116702","cin-404054567","cin-336138618","cin-995657692","cin-654063549","cin-914944395","cin-177662818","cin-265726649","cin-826601935","cin-555941948","cin-938289429","cin-1844331081","cin-616429282","cin-512795237","cin-474890266"]
# lolmax = ["cin-775866088","cin-8136454436","cin-575428497","cin-719890287","cin-233643401","cin-181453534","cin-532599151","cin-698614347","cin-324710110","cin-536671261","cin-576974178","cin-81974221","cin-3576614437","cin-43488307","cin-452428200","cin-538279862","cin-766448777","cin-125584409","cin-830134968","cin-548951553","cin-465630767","cin-21097377","cin-352674984","cin-181864393","cin-2730864430","cin-298338695","cin-982547861","cin-612272763","cin-836728257","cin-271232259","cin-291190729","cin-645295783","cin-282950043","cin-350156771","cin-310864093","cin-4691554443","cin-102695825","cin-405262614","cin-250364351","cin-484848336","cin-386443603","cin-862927234","cin-944138208","cin-502582245","cin-1116510","cin-69579727","cin-775229322","cin-731499018","cin-448174662","cin-657672226","cin-125301650","cin-934677843","cin-267685555","cin-209537677","cin-483127342","cin-195963938","cin-860602924","cin-52664787","cin-378122457","cin-511930532","cin-693552","cin-947746164","cin-15768630","cin-926146342","cin-417775217","cin-311638922","cin-427627501","cin-947429009","cin-306463493","cin-77528767","cin-33476018","cin-646273973","cin-344845106","cin-515413316","cin-735587647","cin-332088197","cin-209901157","cin-304376078","cin-165713827","cin-822110547","cin-5443397266","cin-425876984","cin-426262204","cin-3094433320","cin-358378326","cin-465691002","cin-4443884221","cin-393886586","cin-983503602","cin-519708442","cin-857437283","cin-667191628","cin-844747233","cin-825030290","cin-850599472","cin-994518901","cin-36820721","cin-655133777","cin-9420084437","cin-738388514","cin-324449345","cin-90428489","cin-229068674","cin-124099474","cin-587250735","cin-109151975","cin-298837682","cin-364152838","cin-766422689","cin-209299720","cin-221947657","cin-536563087","cin-722064681","cin-564059949","cin-1443993672","cin-705769812","cin-604400045","cin-624062513","cin-663754228","cin-197861389","cin-629385182","cin-336296702","cin-955295676","cin-4436339865","cin-501513679","cin-244588207","cin-368115882","cin-771098485","cin-276664658","cin-639453623","cin-48492299","cin-384214897"]
lolmax = discovery("http://onem2m.iiit.ac.in:443/~/in-cse/cnt-902636175")[1];
# get-data-group("cin-511906753")
# get_data_group("http://onem2m.iiit.ac.in:443/~/in-cse/cin-775866088");
for i in lolmax:
print(i)
if(i[8:11] == "cnt"):
continue
get_data_grp("http://onem2m.iiit.ac.in:443/~" + i)
# for j in
comp = convert_to_time("20191106T000000")
oe_temp.sort()
oe_temp1 = []
for j in oe_temp:
if convert_to_time(j[0]) > comp:
oe_temp1.append([convert_to_time(j[0]), j[1]])
oe_temp.clear()
lolmax = discovery("http://onem2m.iiit.ac.in:443/~/in-cse/cnt-256133761")[1];
# get-data-group("cin-511906753")
# get_data_group("http://onem2m.iiit.ac.in:443/~/in-cse/cin-775866088");
for i in lolmax:
print(i)
if(i[8:11] == "cnt"):
continue
get_data_grp("http://onem2m.iiit.ac.in:443/~" + i)
# for j in
comp = convert_to_time("20191106T000000")
oe_temp.sort()
oe_temp2 = []
for j in oe_temp:
if convert_to_time(j[0]) > comp:
oe_temp2.append(j[1])
oe_temp.clear()
lolmax = discovery("http://onem2m.iiit.ac.in:443/~/in-cse/cnt-331059742")[1];
# get-data-group("cin-511906753")
# get_data_group("http://onem2m.iiit.ac.in:443/~/in-cse/cin-775866088");
for i in lolmax:
print(i)
if(i[8:11] == "cnt"):
continue
get_data_grp("http://onem2m.iiit.ac.in:443/~" + i)
# for j in
comp = convert_to_time("20191106T000000")
oe_temp.sort()
oe_temp3 = []
for j in oe_temp:
if convert_to_time(j[0]) > comp:
oe_temp3.append(j[1])
oe_temp.clear()
lolmax = discovery("http://onem2m.iiit.ac.in:443/~/in-cse/cnt-244479154")[1];
# get-data-group("cin-511906753")
# get_data_group("http://onem2m.iiit.ac.in:443/~/in-cse/cin-775866088");
for i in lolmax:
print(i)
if(i[8:11] == "cnt"):
continue
get_data_grp("http://onem2m.iiit.ac.in:443/~" + i)
# for j in
comp = convert_to_time("20191106T000000")
oe_temp.sort()
oe_temp4 = []
for j in oe_temp:
if convert_to_time(j[0]) > comp:
oe_temp4.append(j[1])
oe_temp.clear()
lolmax = discovery("http://onem2m.iiit.ac.in:443/~/in-cse/cnt-236279470")[1];
# get-data-group("cin-511906753")
# get_data_group("http://onem2m.iiit.ac.in:443/~/in-cse/cin-775866088");
for i in lolmax:
print(i)
if(i[8:11] == "cnt"):
continue
get_data_grp("http://onem2m.iiit.ac.in:443/~" + i)
# for j in
comp = convert_to_time("20191106T000000")
oe_temp.sort()
oe_temp5 = []
for j in oe_temp:
if convert_to_time(j[0]) > comp:
oe_temp5.append(j[1])
oe_temp.clear()
lolmax = discovery("http://onem2m.iiit.ac.in:443/~/in-cse/cnt-305446869")[1];
# get-data-group("cin-511906753")
# get_data_group("http://onem2m.iiit.ac.in:443/~/in-cse/cin-775866088");
for i in lolmax:
print(i)
if(i[8:11] == "cnt"):
continue
get_data_grp("http://onem2m.iiit.ac.in:443/~" + i)
# for j in
comp = convert_to_time("20191106T000000")
oe_temp.sort()
oe_temp6 = []
for j in oe_temp:
if convert_to_time(j[0]) > comp:
oe_temp6.append(j[1])
final_reading = []
i = 0
while i < min(len(oe_temp1), len(oe_temp2), len(oe_temp3), len(oe_temp4), len(oe_temp5), len(oe_temp6)):
loli = []
loli.append(oe_temp1[i][0])
loli.append(oe_temp1[i][1])
loli.append(oe_temp2[i])
loli.append(oe_temp3[i])
if not oe_temp3[i].isdigit():
i = i+1
continue
if oe_temp4[i] == "" or oe_temp4[i] == "NULL-Value":
oe_temp4[i] = oe_temp4[i-1]
loli.append(oe_temp4[i])
loli.append(oe_temp5[i])
loli.append(oe_temp6[i])
if oe_temp5[i] == "" or oe_temp5[i] == "NULL-Value":
i = i + 1
continue
if oe_temp6[i] == "" or oe_temp6[i] == "NULL-Value":
i = i + 1
continue
final_reading.append(loli)
i = i + 1
return final_reading
final = lolzzmax()
# 0 is date time
for i in final:
efficiency = 0
if float(i[6]) >0.5:
efficiency = (float(i[3])*20*60)/(367*float(i[6]))
data1 = data(temperature = i[1], humidity = i[2], flow = i[3], voltage = i[4], current = i[5], power=i[6], efficiency = efficiency, Time = i[0])
db.session.add(data1)
db.session.commit()
# except:
# print("justin bieber chutiya hai!")
| 91.818605 | 5,119 | 0.694038 | 2,603 | 19,741 | 5.2136 | 0.381483 | 0.008842 | 0.019601 | 0.022401 | 0.14192 | 0.132783 | 0.131383 | 0.128288 | 0.126372 | 0.126372 | 0 | 0.44083 | 0.079682 | 19,741 | 214 | 5,120 | 92.247664 | 0.306143 | 0.751279 | 0 | 0.49635 | 0 | 0 | 0.146387 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.021898 | false | 0 | 0.043796 | 0 | 0.087591 | 0.058394 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4da55a7b6a1e2948337cffc688322918d1c7a193 | 23 | py | Python | zmon_worker_monitor/builtins/plugins/__init__.py | heroldus/zmon-worker | 458f8bacb5a00f7fd93d59db406a2c80870519d1 | [
"Apache-2.0"
] | 17 | 2016-06-03T14:59:21.000Z | 2020-11-06T13:12:18.000Z | zmon_worker_monitor/builtins/plugins/__init__.py | heroldus/zmon-worker | 458f8bacb5a00f7fd93d59db406a2c80870519d1 | [
"Apache-2.0"
] | 394 | 2016-06-03T14:47:37.000Z | 2020-04-21T09:31:23.000Z | zmon_worker_monitor/builtins/plugins/__init__.py | heroldus/zmon-worker | 458f8bacb5a00f7fd93d59db406a2c80870519d1 | [
"Apache-2.0"
] | 55 | 2016-08-15T12:42:28.000Z | 2021-04-06T10:49:35.000Z | __author__ = 'avalles'
| 11.5 | 22 | 0.73913 | 2 | 23 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 23 | 1 | 23 | 23 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0.304348 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4db0140ffee78ca34197a5462ed372c798b2ec34 | 2,744 | py | Python | omni_reports/client/models.py | paretogroup/omni-reports | 563febd7044cdf988d704019ae5fd114cfd824d3 | [
"MIT"
] | 24 | 2020-09-09T20:57:36.000Z | 2022-03-13T17:32:41.000Z | omni_reports/client/models.py | paretogroup/omni-reports | 563febd7044cdf988d704019ae5fd114cfd824d3 | [
"MIT"
] | 13 | 2020-09-01T19:34:24.000Z | 2021-03-31T19:58:53.000Z | omni_reports/client/models.py | paretogroup/omni-reports | 563febd7044cdf988d704019ae5fd114cfd824d3 | [
"MIT"
] | null | null | null | from datetime import date
from typing import Dict, List
from omni_reports.client.fields import ReportField
class ReportPredicate:
def __init__(self, field: ReportField = None, operator: str = None, values: List[str] = None):
self.field = field
self.operator = operator
self.values = values
def __str__(self):
return f"<ReportPredicate field={self.field} operator={self.operator} values={self.values}>"
def __repr__(self):
return self.__str__()
class ReportDefinitionPredicate:
def __init__(self, field: str = None, operator: str = None, values: List[str] = None):
self.field = field
self.operator = operator
self.values = values
def __str__(self):
return f"<ReportDefinitionPredicate field={self.field} operator={self.operator} values={self.values}>"
def __repr__(self):
return self.__str__()
class ReportDefinitionDateRange:
def __init__(self, start: date = None, end: date = None, time_increment: int = 1):
self.start = start
self.end = end
self.time_increment = time_increment or 1
def __str__(self):
return f"<ReportDefinitionDateRange start={self.start} end={self.end}>"
def __repr__(self):
return self.__str__()
def __bool__(self):
return bool(self.start and self.end and self.time_increment)
class ReportDefinitionSelector:
def __init__(self,
fields: List[str] = None,
predicates: List[ReportDefinitionPredicate] = None,
date_range: ReportDefinitionDateRange = None):
self.fields = fields
self.predicates = predicates or list()
self.date_range = date_range
def __str__(self):
return f"<ReportDefinitionSelector fields={self.fields}>"
def __repr__(self):
return self.__str__()
class ReportDefinition:
def __init__(self, report_type: str = None, report_name: str = None, selector: ReportDefinitionSelector = None):
self.report_type = report_type
self.report_name = report_name
self.selector = selector
def __str__(self):
return f"<ReportDefinition report_type={self.report_type} report_name={self.report_name}>"
def __repr__(self):
return self.__str__()
class Report:
def __init__(self, report_definition: ReportDefinition = None, records: List[Dict] = None):
self.report_definition = report_definition
self.records = records
def __str__(self):
return f"<Report " \
f"report_type={self.report_definition.report_type} " \
f"report_name={self.report_definition.report_name}>"
def __repr__(self):
return self.__str__()
| 30.488889 | 116 | 0.662536 | 311 | 2,744 | 5.437299 | 0.14791 | 0.076878 | 0.03903 | 0.056771 | 0.329982 | 0.289769 | 0.275577 | 0.25547 | 0.215257 | 0.215257 | 0 | 0.000958 | 0.239067 | 2,744 | 89 | 117 | 30.831461 | 0.808908 | 0 | 0 | 0.380952 | 0 | 0 | 0.170554 | 0.126093 | 0 | 0 | 0 | 0 | 0 | 1 | 0.301587 | false | 0 | 0.047619 | 0.206349 | 0.650794 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
4db1f601b88321eebed6b0807eec1f77489342e0 | 177 | py | Python | imgHandler.py | grug7/BtmTxt | dae1bf857b6eb2ff28e36e34f1c58fbb4138aab5 | [
"MIT"
] | null | null | null | imgHandler.py | grug7/BtmTxt | dae1bf857b6eb2ff28e36e34f1c58fbb4138aab5 | [
"MIT"
] | 2 | 2021-09-08T01:23:49.000Z | 2022-01-13T01:45:35.000Z | imgHandler.py | grug7/BtmTxt | dae1bf857b6eb2ff28e36e34f1c58fbb4138aab5 | [
"MIT"
] | 1 | 2019-10-04T20:47:12.000Z | 2019-10-04T20:47:12.000Z | from PIL import Image
class ImgHandler():
def __init__(self, image_path):
self.image = self.open("/img/test.jpg")
self.width, self.height = self.image.size
| 25.285714 | 49 | 0.661017 | 25 | 177 | 4.48 | 0.68 | 0.241071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.20904 | 177 | 6 | 50 | 29.5 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0.073446 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4dc23d949a237f5148bbc73df395e84ba51cdffd | 810 | py | Python | scripts/quest/q21303s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/quest/q21303s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/quest/q21303s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | # 21303 - [Job Adv] (Lv.60) Aran
sm.setSpeakerID(1203001)
sm.sendNext("*Sob sob* #p1203001# is sad. #p1203001# is mad. #p1203001# cries. *Sob sob*")
sm.setPlayerAsSpeaker()
sm.sendNext("Wh...What's wrong?")
sm.setSpeakerID(1203001)
sm.sendNext("#p1203001# made gem. #bGem as red as apple#k. But #rthief#k stole gem. #p1203001# no longer has gem. #p1203001# is sad...")
sm.setPlayerAsSpeaker()
sm.sendNext("A thief stole your red gem?")
sm.setSpeakerID(1203001)
if sm.sendAskYesNo("yes, #p1203001# wants gem back. #p1203001# reward you if you find gem. Catch thief and you get reward."):
sm.startQuest(parentID)
sm.sendNext("The thief wen that way! Which way? Hold on...eat with right hand, not left hand... #bLeft#k! He went left! Go left and you find thief.")
sm.dispose()
else:
sm.dispose() | 50.625 | 153 | 0.706173 | 129 | 810 | 4.434109 | 0.534884 | 0.087413 | 0.11014 | 0.08042 | 0.108392 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 0.144444 | 810 | 16 | 154 | 50.625 | 0.704185 | 0.039506 | 0 | 0.466667 | 0 | 0.266667 | 0.6139 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
150dd2077fa706ab88bb93f564898abcdd1b3791 | 1,540 | py | Python | spirit/utils/user/tokens.py | benmurden/Spirit | 168f6a603c24fe9e547b7c077677fea9518c0f28 | [
"MIT"
] | null | null | null | spirit/utils/user/tokens.py | benmurden/Spirit | 168f6a603c24fe9e547b7c077677fea9518c0f28 | [
"MIT"
] | null | null | null | spirit/utils/user/tokens.py | benmurden/Spirit | 168f6a603c24fe9e547b7c077677fea9518c0f28 | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
from django.core import signing
from django.utils.encoding import smart_text
class TokenGenerator(object):
def _uid(self, user):
raise NotImplementedError
def generate(self, user, data=None):
"""
Django signer uses colon (:) for components separation
JSON_object:hash_first_component:hash_secret, all base64 encoded
that aint so url-safe, so Im replacing them by dots (.)
base64 encode characters ref: 0-9, A-Z, a-z, _, -
"""
data = data or {}
data.update({'uid': self._uid(user), })
return signing.dumps(data, salt=__name__).replace(":", ".")
def is_valid(self, user, signed_value):
try:
self.data = signing.loads(signed_value.replace(".", ":"), salt=__name__)
except signing.BadSignature:
return False
if self.data['uid'] != self._uid(user):
return False
return True
class UserActivationTokenGenerator(TokenGenerator):
def _uid(self, user):
# Older mysql won't store ms.
return u";".join((smart_text(user.pk), smart_text(user.last_login.replace(microsecond=0))))
class UserEmailChangeTokenGenerator(TokenGenerator):
def _uid(self, user):
return u";".join((smart_text(user.pk), smart_text(user.email)))
def generate(self, user, new_email):
return super(UserEmailChangeTokenGenerator, self).generate(user, {'new_email': new_email, })
def get_email(self):
return self.data['new_email'] | 29.615385 | 100 | 0.640909 | 188 | 1,540 | 5.079787 | 0.484043 | 0.050262 | 0.05445 | 0.043979 | 0.182199 | 0.081675 | 0.081675 | 0.081675 | 0.081675 | 0.081675 | 0 | 0.006774 | 0.233117 | 1,540 | 52 | 101 | 29.615385 | 0.801863 | 0.179221 | 0 | 0.185185 | 0 | 0 | 0.024671 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.259259 | false | 0 | 0.074074 | 0.148148 | 0.740741 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
127583bfe935fd456a0c397dd31b960fec0843fa | 345 | py | Python | src/config/api-server/vnc_cfg_api_server/resources/policy_management.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | 37 | 2020-09-21T10:42:26.000Z | 2022-01-09T10:16:40.000Z | src/config/api-server/vnc_cfg_api_server/resources/policy_management.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | null | null | null | src/config/api-server/vnc_cfg_api_server/resources/policy_management.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | 21 | 2020-08-25T12:48:42.000Z | 2022-03-22T04:32:18.000Z | #
# Copyright (c) 2018 Juniper Networks, Inc. All rights reserved.
#
from vnc_api.gen.resource_common import PolicyManagement
from vnc_cfg_api_server.resources._resource_base import ResourceMixin
# Just decelared here to heritate 'locate' method of ResourceMixin class
class PolicyManagementServer(ResourceMixin, PolicyManagement):
pass
| 26.538462 | 72 | 0.82029 | 42 | 345 | 6.571429 | 0.785714 | 0.050725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013245 | 0.124638 | 345 | 12 | 73 | 28.75 | 0.900662 | 0.385507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.25 | 0.5 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 3 |
128292f1ff0ac50418ec65f3745c984f51653d2b | 332 | py | Python | sample/tests/test_basic.py | cybergrind/pybind_example | 6f492a0b4506e53436076d58205d5897f0a59d72 | [
"MIT"
] | null | null | null | sample/tests/test_basic.py | cybergrind/pybind_example | 6f492a0b4506e53436076d58205d5897f0a59d72 | [
"MIT"
] | null | null | null | sample/tests/test_basic.py | cybergrind/pybind_example | 6f492a0b4506e53436076d58205d5897f0a59d72 | [
"MIT"
] | null | null | null | import pytest
from fan_tools.python import rel_path
from fan_tools.unix import succ, cd
@pytest.fixture(scope='session', autouse=True)
def cpp_module():
with cd(rel_path('../..')):
succ('make example.so')
def test_cpp_module():
import example
assert example.add(1, 2) == 3
assert example.add(8, 2) == 10
| 20.75 | 46 | 0.674699 | 51 | 332 | 4.254902 | 0.607843 | 0.064516 | 0.110599 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02583 | 0.183735 | 332 | 15 | 47 | 22.133333 | 0.774908 | 0 | 0 | 0 | 0 | 0 | 0.081325 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 1 | 0.181818 | true | 0 | 0.363636 | 0 | 0.545455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
1293756fd741fedb64ccdbda4c006e0da7e1fb78 | 24 | py | Python | _ipynbs_profile/__init__.py | DaMacho/DaMacho.github.io | e8ec6deb76a5917c47db5f6795662e707848c98b | [
"MIT"
] | null | null | null | _ipynbs_profile/__init__.py | DaMacho/DaMacho.github.io | e8ec6deb76a5917c47db5f6795662e707848c98b | [
"MIT"
] | null | null | null | _ipynbs_profile/__init__.py | DaMacho/DaMacho.github.io | e8ec6deb76a5917c47db5f6795662e707848c98b | [
"MIT"
] | null | null | null | __author__ = 'alankang'
| 12 | 23 | 0.75 | 2 | 24 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 24 | 1 | 24 | 24 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1295e6eba813b16404d11d7e5c835d9857eec0c5 | 149 | py | Python | python_homework/16.py | olzlgur/Like_lion | ac55cd5a0dd81863cb9481b1c7635d629d409660 | [
"MIT"
] | null | null | null | python_homework/16.py | olzlgur/Like_lion | ac55cd5a0dd81863cb9481b1c7635d629d409660 | [
"MIT"
] | null | null | null | python_homework/16.py | olzlgur/Like_lion | ac55cd5a0dd81863cb9481b1c7635d629d409660 | [
"MIT"
] | null | null | null | product_list = ["풀", "가위", "크래파스"]
price_list = [800, 2500, 5000]
product_dict = {x:y for x, y in zip(product_list,price_list)}
print(product_dict) | 24.833333 | 61 | 0.691275 | 26 | 149 | 3.730769 | 0.615385 | 0.226804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085271 | 0.134228 | 149 | 6 | 62 | 24.833333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0.046667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1296849e233287e4dd8c36f3cdc1874aca6c8965 | 181 | py | Python | produtos/admin.py | Ed-Junior/ges-cli | af69e80dffc2cd486b72cc081af50f8e157655b9 | [
"BSD-2-Clause"
] | null | null | null | produtos/admin.py | Ed-Junior/ges-cli | af69e80dffc2cd486b72cc081af50f8e157655b9 | [
"BSD-2-Clause"
] | null | null | null | produtos/admin.py | Ed-Junior/ges-cli | af69e80dffc2cd486b72cc081af50f8e157655b9 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib import admin
from .models import Produtos
class ProdutoAdmin(admin.ModelAdmin):
search_fields = ['nome']
admin.site.register(Produtos, ProdutoAdmin)
| 12.928571 | 43 | 0.762431 | 21 | 181 | 6.52381 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.149171 | 181 | 13 | 44 | 13.923077 | 0.88961 | 0 | 0 | 0 | 0 | 0 | 0.022099 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
129cdfd4c9978d22258ae65c04e677d5ebad19db | 412 | py | Python | robocode-python-ls-core/tests/robocode_ls_core_tests/_resources/plugins/some_plugin.py | emanlove/robotframework-lsp | b0d8862d24e3bc1b72d8ce9412a671571520e7d9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | robocode-python-ls-core/tests/robocode_ls_core_tests/_resources/plugins/some_plugin.py | emanlove/robotframework-lsp | b0d8862d24e3bc1b72d8ce9412a671571520e7d9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-30T15:40:29.000Z | 2021-09-30T15:40:29.000Z | robocode-python-ls-core/tests/robocode_ls_core_tests/_resources/plugins/some_plugin.py | emanlove/robotframework-lsp | b0d8862d24e3bc1b72d8ce9412a671571520e7d9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from robocode_ls_core.pluginmanager import PluginManager
from robocode_ls_core_tests.test_pluginmanager import EPFoo
class FooExt(object):
def Foo(self):
return "from_plugin"
def __typecheckself__(self) -> None:
from robocode_ls_core.protocols import check_implements
_: EPFoo = check_implements(self)
def register_plugins(pm: PluginManager):
pm.register(EPFoo, FooExt)
| 24.235294 | 63 | 0.754854 | 50 | 412 | 5.88 | 0.5 | 0.122449 | 0.142857 | 0.183673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177184 | 412 | 16 | 64 | 25.75 | 0.867257 | 0 | 0 | 0 | 0 | 0 | 0.026699 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0.3 | 0.1 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
12a447ac3ec0799372a95ee74efe6c5976f706dd | 2,599 | py | Python | illallangi/k8sapi/apikind.py | illallangi/K8SAPI | a9492efce51764e443536da4e492344c8381ed92 | [
"MIT"
] | null | null | null | illallangi/k8sapi/apikind.py | illallangi/K8SAPI | a9492efce51764e443536da4e492344c8381ed92 | [
"MIT"
] | null | null | null | illallangi/k8sapi/apikind.py | illallangi/K8SAPI | a9492efce51764e443536da4e492344c8381ed92 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from loguru import logger
from requests import request
class APIKind(object):
def __init__(self, api_group, dictionary, *args, **kwargs):
super().__init__(*args, **kwargs)
self.api_group = api_group
self._dictionary = dictionary
for key in self._dictionary.keys():
if key not in self._keys:
logger.error(
f'Unhandled key in {self.__class__}: {key}: {type(self._dictionary[key])}"{self._dictionary[key]}"'
)
continue
logger.trace(
f'{key}: {type(self._dictionary[key])}"{self._dictionary[key]}"'
)
@property
def _keys(self):
return [
"name",
"namespaced",
"singularName",
"kind",
"verbs",
"shortNames",
"storageVersionHash",
"categories",
"group",
"version",
]
def __repr__(self):
return f"{self.__class__}{self.kind} ({self.rest_path})"
def __str__(self):
return f"{self.kind} ({self.item_count} item(s))"
@cached_property
def name(self):
return self._dictionary["name"]
@cached_property
def namespaced(self):
return self._dictionary["namespaced"]
@cached_property
def singular_name(self):
return self._dictionary["singularName"]
@cached_property
def kind(self):
return self._dictionary["kind"]
@cached_property
def verbs(self):
return self._dictionary["verbs"]
@cached_property
def short_names(self):
return self._dictionary["shortNames"]
@cached_property
def storage_version_hash(self):
return self._dictionary["storageVersionHash"]
@cached_property
def categories(self):
return self._dictionary["categories"]
@cached_property
def group(self):
return self._dictionary["group"]
@cached_property
def version(self):
return self._dictionary["version"]
@cached_property
def rest_path(self):
return self.api_group.rest_path / self.name
@cached_property
def item_count(self):
with request("get", self.rest_path) as r:
return len(r.json().get("items", []))
def calculate_url(self, namespace, name):
if self.namespaced:
return (
self.api_group.rest_path / "namespaces" / namespace / self.name / name
)
return self.api_group.rest_path / self.name / name
| 25.99 | 119 | 0.587918 | 273 | 2,599 | 5.322344 | 0.238095 | 0.154164 | 0.140399 | 0.165176 | 0.15967 | 0.121129 | 0.103235 | 0.103235 | 0 | 0 | 0 | 0 | 0.299346 | 2,599 | 99 | 120 | 26.252525 | 0.797913 | 0 | 0 | 0.153846 | 0 | 0.012821 | 0.165448 | 0.051943 | 0 | 0 | 0 | 0 | 0 | 1 | 0.217949 | false | 0 | 0.038462 | 0.179487 | 0.487179 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
12a6f28c9f7f480be3111637e7c88fd3f59c1305 | 10,386 | py | Python | tests/test_resource_tracker/test_resource_group_resource_views.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | null | null | null | tests/test_resource_tracker/test_resource_group_resource_views.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | null | null | null | tests/test_resource_tracker/test_resource_group_resource_views.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | 1 | 2022-03-24T03:37:12.000Z | 2022-03-24T03:37:12.000Z | from copy import copy
from django.urls import reverse
from resource_tracker.models import Resource, ResourceAttribute, ResourceTextAttribute, ResourceGroupAttributeDefinition
from tests.test_resource_tracker.base_test_resource_tracker import BaseTestResourceTracker
class TestResourceGroupResourceViews(BaseTestResourceTracker):
def setUp(self):
super(TestResourceGroupResourceViews, self).setUp()
def test_resource_group_resource_list(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
}
columns = ['selection', 'name', 'CPU', 'Memory', 'Description', 'Another text', 'operations']
url = reverse('resource_tracker:resource_group_resource_list', kwargs=arg)
response = self.client.get(url)
self.assertEqual(200, response.status_code)
self.assertTrue("resource_group_id" in response.context)
for column in columns:
self.assertTrue(column in response.context['table'].columns.columns)
self.assertTrue(column in response.context['table'].base_columns)
self.assertTrue(column in response.context['table'].sequence)
self.assertTrue(column in response.context['table'].Meta.fields)
def test_cannot_get_resource_group_resource_list_when_logout(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
}
url = reverse('resource_tracker:resource_group_resource_list', kwargs=arg)
self.client.logout()
response = self.client.get(url)
self.assertEqual(302, response.status_code)
def test_resource_group_resource_delete(self):
server_to_delete = Resource.objects.get(name="server-1")
arg = {
"resource_group_id": self.rg_physical_servers.id,
"resource_id": server_to_delete.id
}
# test GET
url = reverse('resource_tracker:resource_group_resource_delete', kwargs=arg)
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# test POST
attribute_id = copy(server_to_delete.id)
self.assertTrue(Resource.objects.filter(id=attribute_id).exists())
response = self.client.post(url)
self.assertEqual(302, response.status_code)
self.assertFalse(Resource.objects.filter(id=attribute_id).exists())
def test_cannot_delete_resource_group_resource_when_logout(self):
server_to_delete = Resource.objects.get(name="server-1")
arg = {
"resource_group_id": self.rg_physical_servers.id,
"resource_id": server_to_delete.id
}
# test GET
url = reverse('resource_tracker:resource_group_resource_delete', kwargs=arg)
self.client.logout()
response = self.client.get(url)
self.assertEqual(302, response.status_code)
def test_resource_group_resource_create_empty(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
}
url = reverse('resource_tracker:resource_group_resource_create', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# test POST
data = {
"name": "new_resource",
"CPU": "",
"Memory": 12,
"is_deleted_on_instance_deletion": True
}
response = self.client.post(url, data=data)
self.assertEqual(302, response.status_code)
self.assertTrue(Resource.objects.filter(name="new_resource",
resource_group=self.rg_physical_servers).exists())
target_resource = Resource.objects.get(name="new_resource",
resource_group=self.rg_physical_servers)
self.assertEqual(2, len(target_resource.attributes.all()))
def test_cannot_create_resource_group_resource_when_logout(self):
self.client.logout()
arg = {
"resource_group_id": self.rg_physical_servers.id
}
url = reverse('resource_tracker:resource_group_resource_create', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(302, response.status_code)
def test_resource_group_resource_create_non_integer_value(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
}
url = reverse('resource_tracker:resource_group_resource_create', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# test POST
data = {
"name": "new_resource",
"CPU": "eee",
"Memory": "ee"
}
response = self.client.post(url, data=data)
self.assertEqual(200, response.status_code)
self.assertEqual(0, self.rg_physical_servers.resources.filter(name='new_resource').count())
def test_resource_group_resource_create_negative_value(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
}
url = reverse('resource_tracker:resource_group_resource_create', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# test POST
data = {
"name": "new_resource",
"CPU": "0",
"Memory": "-12"
}
response = self.client.post(url, data=data)
self.assertEqual(200, response.status_code)
self.assertEqual(0, self.rg_physical_servers.resources.filter(name='new_resource').count())
def test_resource_group_resource_create(self):
arg = {
"resource_group_id": self.rg_physical_servers.id
}
url = reverse('resource_tracker:resource_group_resource_create', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# test POST
data = {
"name": "new_resource",
"CPU": 12,
"Memory": 12,
"Description": "text",
"is_deleted_on_instance_deletion": True
}
response = self.client.post(url, data=data)
self.assertEqual(302, response.status_code)
self.assertTrue(Resource.objects.filter(name="new_resource",
resource_group=self.rg_physical_servers).exists())
target_resource = Resource.objects.get(name="new_resource",
resource_group=self.rg_physical_servers)
self.assertEqual(2, len(target_resource.attributes.all()))
def test_resource_group_resource_edit(self):
resource_to_edit = Resource.objects.get(name="server-1",
resource_group=self.rg_physical_servers)
arg = {
"resource_group_id": self.rg_physical_servers.id,
"resource_id": resource_to_edit.id
}
url = reverse('resource_tracker:resource_group_resource_edit', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# test POST
data = {
"name": "updated_name",
"CPU": 1,
"Memory": 2,
"Description": "text modified",
"is_deleted_on_instance_deletion": True
}
response = self.client.post(url, data=data)
self.assertEqual(302, response.status_code)
resource_to_edit.refresh_from_db()
self.assertEqual(resource_to_edit.name, "updated_name")
resource_attribute_cpu = ResourceAttribute.objects.get(
resource=resource_to_edit,
attribute_type=self.rg_physical_servers_cpu_attribute
)
self.assertEqual(resource_attribute_cpu.value, 1)
resource_attribute_memory = ResourceAttribute.objects.get(
resource=resource_to_edit,
attribute_type=self.rg_physical_servers_memory_attribute
)
self.assertEqual(resource_attribute_memory.value, 2)
resource_text_attribute_description = ResourceTextAttribute.objects.get(
resource=resource_to_edit,
text_attribute_type=self.rg_physical_servers_description
)
self.assertEqual(resource_text_attribute_description.value, "text modified")
def test_cannot_edit_resource_group_resource_when_logout(self):
self.client.logout()
resource_to_edit = Resource.objects.get(name="server-1",
resource_group=self.rg_physical_servers)
arg = {
"resource_group_id": self.rg_physical_servers.id,
"resource_id": resource_to_edit.id
}
url = reverse('resource_tracker:resource_group_resource_edit', kwargs=arg)
# test GET
response = self.client.get(url)
self.assertEqual(302, response.status_code)
def test_delete_attribute_definition_from_resource_group(self):
# create a resource in a resource group with an attribute
worker_node_test = self.rg_ocp_workers.create_resource(name=f"worker-test")
worker_node_test.set_attribute(self.rg_ocp_workers_vcpu_attribute, 16)
worker_node_test.set_attribute(self.rg_ocp_workers_memory_attribute, 50)
self.assertTrue(worker_node_test.attributes.filter(attribute_type__name="vCPU").exists())
# we can reach the list of resource page
arg = {
"resource_group_id": self.rg_ocp_workers.id
}
url = reverse('resource_tracker:resource_group_resource_list', kwargs=arg)
response = self.client.get(url)
self.assertEqual(200, response.status_code)
# delete the attribute from the resource group definition
the_id = self.rg_ocp_workers_vcpu_attribute.id
self.rg_ocp_workers_vcpu_attribute.delete()
self.assertTrue(ResourceGroupAttributeDefinition.objects.get(id=self.rg_ocp_workers_memory_attribute.id))
self.assertEqual(0, ResourceAttribute.objects.filter(attribute_type_id=the_id).count())
response = self.client.get(url)
self.assertEqual(200, response.status_code)
self.assertFalse(worker_node_test.attributes.filter(attribute_type__name="vCPU").exists())
| 40.889764 | 120 | 0.65338 | 1,168 | 10,386 | 5.506849 | 0.10274 | 0.090951 | 0.075093 | 0.071828 | 0.781716 | 0.750466 | 0.719683 | 0.684391 | 0.661536 | 0.632618 | 0 | 0.010682 | 0.251878 | 10,386 | 253 | 121 | 41.051383 | 0.817117 | 0.028018 | 0 | 0.583756 | 0 | 0 | 0.129813 | 0.064212 | 0 | 0 | 0 | 0 | 0.203046 | 1 | 0.06599 | false | 0 | 0.020305 | 0 | 0.091371 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
12ac0458ec30ff302617310d05110ce4b3298f86 | 3,425 | py | Python | dropbox/exceptions.py | ParikhKadam/dropbox-sdk-python | 005a750c0fefc4781cea0850f311b0fca9019da8 | [
"MIT"
] | 910 | 2015-07-10T02:18:38.000Z | 2022-03-30T10:12:48.000Z | dropbox/exceptions.py | ParikhKadam/dropbox-sdk-python | 005a750c0fefc4781cea0850f311b0fca9019da8 | [
"MIT"
] | 371 | 2015-07-01T03:44:16.000Z | 2022-03-30T22:29:32.000Z | dropbox/exceptions.py | oneflower/dropbox-sdk-python | d5179c31345f413d067b33de9206fe7e8017388f | [
"MIT"
] | 402 | 2015-07-31T01:40:52.000Z | 2022-03-29T16:38:25.000Z | class DropboxException(Exception):
"""All errors related to making an API request extend this."""
def __init__(self, request_id, *args, **kwargs):
# A request_id can be shared with Dropbox Support to pinpoint the exact
# request that returns an error.
super(DropboxException, self).__init__(request_id, *args, **kwargs)
self.request_id = request_id
def __str__(self):
return repr(self)
class ApiError(DropboxException):
"""Errors produced by the Dropbox API."""
def __init__(self, request_id, error, user_message_text, user_message_locale):
"""
:param (str) request_id: A request_id can be shared with Dropbox
Support to pinpoint the exact request that returns an error.
:param error: An instance of the error data type for the route.
:param (str) user_message_text: A human-readable message that can be
displayed to the end user. Is None, if unavailable.
:param (str) user_message_locale: The locale of ``user_message_text``,
if present.
"""
super(ApiError, self).__init__(request_id, error)
self.error = error
self.user_message_text = user_message_text
self.user_message_locale = user_message_locale
def __repr__(self):
return 'ApiError({!r}, {})'.format(self.request_id, self.error)
class HttpError(DropboxException):
"""Errors produced at the HTTP layer."""
def __init__(self, request_id, status_code, body):
super(HttpError, self).__init__(request_id, status_code, body)
self.status_code = status_code
self.body = body
def __repr__(self):
return 'HttpError({!r}, {}, {!r})'.format(self.request_id,
self.status_code, self.body)
class PathRootError(HttpError):
"""Error caused by an invalid path root."""
def __init__(self, request_id, error=None):
super(PathRootError, self).__init__(request_id, 422, None)
self.error = error
def __repr__(self):
return 'PathRootError({!r}, {!r})'.format(self.request_id, self.error)
class BadInputError(HttpError):
"""Errors due to bad input parameters to an API Operation."""
def __init__(self, request_id, message):
super(BadInputError, self).__init__(request_id, 400, message)
self.message = message
def __repr__(self):
return 'BadInputError({!r}, {!r})'.format(self.request_id, self.message)
class AuthError(HttpError):
"""Errors due to invalid authentication credentials."""
def __init__(self, request_id, error):
super(AuthError, self).__init__(request_id, 401, None)
self.error = error
def __repr__(self):
return 'AuthError({!r}, {!r})'.format(self.request_id, self.error)
class RateLimitError(HttpError):
"""Error caused by rate limiting."""
def __init__(self, request_id, error=None, backoff=None):
super(RateLimitError, self).__init__(request_id, 429, None)
self.error = error
self.backoff = backoff
def __repr__(self):
return 'RateLimitError({!r}, {!r}, {!r})'.format(
self.request_id, self.error, self.backoff)
class InternalServerError(HttpError):
"""Errors due to a problem on Dropbox."""
def __repr__(self):
return 'InternalServerError({!r}, {}, {!r})'.format(
self.request_id, self.status_code, self.body)
| 33.910891 | 82 | 0.659562 | 428 | 3,425 | 4.955607 | 0.21729 | 0.110325 | 0.091938 | 0.059406 | 0.347006 | 0.276756 | 0.253182 | 0.21405 | 0.150872 | 0.117869 | 0 | 0.004511 | 0.223358 | 3,425 | 100 | 83 | 34.25 | 0.792857 | 0.247007 | 0 | 0.211538 | 0 | 0 | 0.073398 | 0.010138 | 0 | 0 | 0 | 0 | 0 | 1 | 0.288462 | false | 0 | 0 | 0.153846 | 0.596154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
12b57f62feafc40b8d159c15af6280daa76bb619 | 593 | py | Python | tests/test_adiff.py | PaulHoward77/itmlogic | 4b19cbadb20478b8a13d47e3e945dbc40293255f | [
"MIT"
] | null | null | null | tests/test_adiff.py | PaulHoward77/itmlogic | 4b19cbadb20478b8a13d47e3e945dbc40293255f | [
"MIT"
] | null | null | null | tests/test_adiff.py | PaulHoward77/itmlogic | 4b19cbadb20478b8a13d47e3e945dbc40293255f | [
"MIT"
] | null | null | null | import pytest
from itmlogic.adiff import adiff
def test_adiff(
setup_prop_to_test_adiff,
setup_expected_answer_for_adiff):
q, actual_answer = adiff(0, setup_prop_to_test_adiff)
expected_answer = setup_expected_answer_for_adiff
assert actual_answer['wd1'] == expected_answer['wd1']
assert actual_answer['xd1'] == expected_answer['xd1']
assert actual_answer['afo'] == expected_answer['afo']
assert actual_answer['qk'] == expected_answer['qk']
assert actual_answer['aht'] == expected_answer['aht']
assert actual_answer['xht'] == expected_answer['xht']
| 32.944444 | 57 | 0.735245 | 79 | 593 | 5.126582 | 0.291139 | 0.311111 | 0.266667 | 0.074074 | 0.232099 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009862 | 0.145025 | 593 | 17 | 58 | 34.882353 | 0.788955 | 0 | 0 | 0 | 0 | 0 | 0.057336 | 0 | 0 | 0 | 0 | 0 | 0.461538 | 1 | 0.076923 | false | 0 | 0.153846 | 0 | 0.230769 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
12d076634f71e9b6ceb964252c498b0e91c2e510 | 159 | py | Python | clarisse/var/lib/linux/menus/main_menu/edit/rename.py | GuillaumeVFX/pipel | a1bd726239e6887745396723c3aad5d61e88ce44 | [
"MIT"
] | 2 | 2020-05-12T11:38:44.000Z | 2022-03-07T04:13:50.000Z | clarisse/var/lib/linux/menus/main_menu/edit/rename.py | GuillaumeVFX/pipel | a1bd726239e6887745396723c3aad5d61e88ce44 | [
"MIT"
] | null | null | null | clarisse/var/lib/linux/menus/main_menu/edit/rename.py | GuillaumeVFX/pipel | a1bd726239e6887745396723c3aad5d61e88ce44 | [
"MIT"
] | null | null | null | ix.enable_command_history()
app = ix.application
clarisse_win = app.get_event_window()
app.open_rename_item_window(clarisse_win)
ix.disable_command_history() | 22.714286 | 41 | 0.842767 | 24 | 159 | 5.125 | 0.625 | 0.227642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.062893 | 159 | 7 | 42 | 22.714286 | 0.825503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
12d51975c47a34a29649da42dec154e5739d161b | 163 | py | Python | backend/atlas/root_schema.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 18 | 2019-09-24T23:49:41.000Z | 2020-11-14T17:30:27.000Z | backend/atlas/root_schema.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 53 | 2019-09-24T18:50:25.000Z | 2022-02-27T11:44:55.000Z | backend/atlas/root_schema.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 2 | 2020-02-03T08:22:36.000Z | 2021-02-28T12:55:48.000Z | import graphene
import atlas.mutations
import atlas.queries
schema = graphene.Schema(
query=atlas.queries.RootQuery, mutation=atlas.mutations.RootMutation
)
| 18.111111 | 72 | 0.809816 | 19 | 163 | 6.947368 | 0.526316 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.110429 | 163 | 8 | 73 | 20.375 | 0.910345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
4200167cd19937c1b5f4386e745fc440b99a9ef9 | 948 | py | Python | main/PleiadesTracker.py | driftingawaynow/Pleiades | c0912e9ab73014a798c394d66ea486f9de6a3f49 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | main/PleiadesTracker.py | driftingawaynow/Pleiades | c0912e9ab73014a798c394d66ea486f9de6a3f49 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | main/PleiadesTracker.py | driftingawaynow/Pleiades | c0912e9ab73014a798c394d66ea486f9de6a3f49 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | from skyfield.api import Topos, Loader, EarthSatellite
from skyfield.positionlib import position_of_radec
from skyfield.api import load, wgs84
import math
ts = load.timescale()
t = ts.now()
earth = 399 # NAIF code for the Earth center of mass
ra_hours = 3.79
dec_degrees = 24.1167
# returns the subpoint
def get_pleiades_pos(cent, hours, degrees):
pleiades = position_of_radec(hours, degrees, t=t, center=cent)
subpoint = wgs84.subpoint(pleiades)
return subpoint
# returns latitude
def get_pleiades_lat(subpoint):
return subpoint.latitude
# returns longitude
def get_pleiades_long(subpoint):
return subpoint.longitude
def point_to_str(subpoint):
return str(subpoint)
def point_arr(s):
l = s.split(" ")
f = []
f.append(abs(math.cos(float(l[2]))))
f.append(abs(math.cos(float(l[5]))))
return f
def final_val(a):
return a[0] * a[1]
point = get_pleiades_pos(earth, ra_hours, dec_degrees)
| 20.170213 | 66 | 0.7173 | 144 | 948 | 4.583333 | 0.451389 | 0.066667 | 0.063636 | 0.063636 | 0.069697 | 0.069697 | 0.069697 | 0 | 0 | 0 | 0 | 0.025575 | 0.175105 | 948 | 46 | 67 | 20.608696 | 0.818414 | 0.099156 | 0 | 0 | 0 | 0 | 0.001178 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0 | 0.142857 | 0.142857 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
4200b2085cdfa06fa1cc423e8036b1d83b7b10f4 | 450 | py | Python | utils/checks.py | ephreal/rollbot | 8e345f97a30e2788daf1ef7f6615e0b489eda57c | [
"MIT"
] | 2 | 2021-03-27T21:43:19.000Z | 2022-01-22T17:54:15.000Z | utils/checks.py | ephreal/rollbot | 8e345f97a30e2788daf1ef7f6615e0b489eda57c | [
"MIT"
] | null | null | null | utils/checks.py | ephreal/rollbot | 8e345f97a30e2788daf1ef7f6615e0b489eda57c | [
"MIT"
] | 1 | 2019-03-15T16:52:19.000Z | 2019-03-15T16:52:19.000Z | # -*- coding: utf-8 -*-
"""
This software is licensed under the License (MIT) located at
https://github.com/ephreal/rollbot/Licence
Please see the license for any restrictions or rights granted to you by the
License.
"""
def check_author(author):
"""
Checks to see if the author of a message is the same as the author
passed in.
"""
def check_message(message):
return message.author == author
return check_message
| 22.5 | 75 | 0.691111 | 66 | 450 | 4.666667 | 0.651515 | 0.097403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002841 | 0.217778 | 450 | 19 | 76 | 23.684211 | 0.872159 | 0.644444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
4209a188e33aff89ea1e1f8f352fde0109e73239 | 194 | py | Python | pypy/lib/_ctypes/dll.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | 1 | 2019-05-27T00:58:46.000Z | 2019-05-27T00:58:46.000Z | pypy/lib/_ctypes/dll.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | pypy/lib/_ctypes/dll.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | import _rawffi
def dlopen(name, mode):
# XXX mode is ignored
if name is None:
return None # XXX this should return *all* loaded libs, dlopen(NULL)
return _rawffi.CDLL(name)
| 24.25 | 76 | 0.675258 | 29 | 194 | 4.448276 | 0.655172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.247423 | 194 | 7 | 77 | 27.714286 | 0.883562 | 0.381443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
42112bf4e48ad0921e000b3171d6aa0b66234da1 | 448 | py | Python | mods/mcpython/Item/purpur.py | uuk0/mcpython-a-minecraft-clone-in-python | c16cd66f319efdeec4130e1a43f5a857caf1ea13 | [
"MIT"
] | 2 | 2020-04-23T16:25:51.000Z | 2020-08-27T17:56:16.000Z | mods/mcpython/Item/purpur.py | uuk0/mcpython-a-minecraft-clone-in-python | c16cd66f319efdeec4130e1a43f5a857caf1ea13 | [
"MIT"
] | null | null | null | mods/mcpython/Item/purpur.py | uuk0/mcpython-a-minecraft-clone-in-python | c16cd66f319efdeec4130e1a43f5a857caf1ea13 | [
"MIT"
] | null | null | null | from .Item import *
class purpur_block(Item):
def getName(self):
return "minecraft:purpur_block"
def getTexturFile(self):
return "./assets/textures/items/purpur_block.png"
handler.register(purpur_block)
class purpur_pillar(Item):
def getName(self):
return "minecraft:purpur_pillar"
def getTexturFile(self):
return "./assets/textures/items/purpur_pillar.png"
handler.register(purpur_pillar)
| 18.666667 | 58 | 0.705357 | 53 | 448 | 5.811321 | 0.358491 | 0.142857 | 0.090909 | 0.116883 | 0.584416 | 0.584416 | 0.584416 | 0.331169 | 0 | 0 | 0 | 0 | 0.1875 | 448 | 23 | 59 | 19.478261 | 0.846154 | 0 | 0 | 0.307692 | 0 | 0 | 0.28125 | 0.28125 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0 | 0.076923 | 0.307692 | 0.846154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
42168beee3bda6d3e85cb3500d7c14867b6c7c4f | 562 | py | Python | unittest/functions_test.py | mokpolar/devops-eng-training | 2cf327a37e4575991f2846f42cad03f3cbab770d | [
"MIT"
] | null | null | null | unittest/functions_test.py | mokpolar/devops-eng-training | 2cf327a37e4575991f2846f42cad03f3cbab770d | [
"MIT"
] | null | null | null | unittest/functions_test.py | mokpolar/devops-eng-training | 2cf327a37e4575991f2846f42cad03f3cbab770d | [
"MIT"
] | 9 | 2021-05-06T06:00:18.000Z | 2021-05-15T08:30:47.000Z | # TODO(everyone): 더하기, 빼기, 곱하기, 나누기 함수 테스트 케이스 작성
import pytest
import os.path
import sys
sys.path.append(
os.path.dirname(os.path.dirname(__file__))
)
import functions
def test_add():
prediction = functions.add_function(6, 2)
assert prediction == 8
def test_subtract():
predict = functions.subtract_function(6, 2)
assert predict == 4
def test_multiply():
prediction = functions.multiply_function(6, 2)
assert prediction == 12
def test_division():
prediction = functions.division_function(6, 2)
assert prediction == 3
| 19.37931 | 50 | 0.706406 | 77 | 562 | 5 | 0.454545 | 0.072727 | 0.103896 | 0.166234 | 0.202597 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028446 | 0.186833 | 562 | 28 | 51 | 20.071429 | 0.814004 | 0.08363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035714 | 0.210526 | 1 | 0.210526 | false | 0 | 0.210526 | 0 | 0.421053 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
422268b2182d0ff2d3437b5c09cd3c5c9fdd38bb | 10,932 | py | Python | pylabnet/network/client_server/external_gui.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 10 | 2020-01-07T23:28:49.000Z | 2022-02-02T19:09:17.000Z | pylabnet/network/client_server/external_gui.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 249 | 2019-12-28T19:38:49.000Z | 2022-03-28T16:45:32.000Z | pylabnet/network/client_server/external_gui.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 5 | 2020-11-17T19:45:10.000Z | 2022-01-04T18:07:04.000Z | import pickle
import os
import json
from pylabnet.network.core.service_base import ServiceBase
from pylabnet.network.core.client_base import ClientBase
from pylabnet.utils.helper_methods import load_config, get_config_filepath
class Service(ServiceBase):
def exposed_assign_plot(self, plot_widget, plot_label, legend_widget):
return self._module.assign_plot(
plot_widget=plot_widget,
plot_label=plot_label,
legend_widget=legend_widget
)
def exposed_clear_plot(self, plot_widget):
return self._module.clear_plot(
plot_widget=plot_widget
)
def exposed_assign_curve(self, plot_label, curve_label, error=False):
return self._module.assign_curve(
plot_label=plot_label,
curve_label=curve_label,
error=error
)
def exposed_remove_curve(self, plot_label, curve_label):
self._module.remove_curve(
plot_label=plot_label,
curve_label=curve_label
)
def exposed_assign_scalar(self, scalar_widget, scalar_label):
return self._module.assign_scalar(
scalar_widget=scalar_widget,
scalar_label=scalar_label
)
def exposed_assign_label(self, label_widget, label_label):
return self._module.assign_label(
label_widget=label_widget,
label_label=label_label
)
def exposed_assign_event_button(self, event_widget, event_label):
return self._module.assign_event_button(
event_widget=event_widget,
event_label=event_label,
)
def exposed_assign_container(self, container_widget, container_label):
return self._module.assign_container(container_widget, container_label)
def exposed_set_curve_data(self, data_pickle, plot_label, curve_label, error_pickle=None):
data = pickle.loads(data_pickle)
error = pickle.loads(error_pickle)
return self._module.set_curve_data(
data=data,
plot_label=plot_label,
curve_label=curve_label,
error=error
)
def exposed_set_scalar(self, value_pickle, scalar_label):
value = pickle.loads(value_pickle)
return self._module.set_scalar(
value=value,
scalar_label=scalar_label
)
def exposed_get_scalar(self, scalar_label):
return pickle.dumps(self._module.get_scalar(scalar_label))
def exposed_activate_scalar(self, scalar_label):
return self._module.activate_scalar(scalar_label)
def exposed_deactivate_scalar(self, scalar_label):
return self._module.deactivate_scalar(scalar_label)
def exposed_set_label(self, text, label_label):
return self._module.set_label(
text=text,
label_label=label_label
)
def exposed_get_text(self, label_label):
return pickle.dumps(self._module.get_text(label_label))
def exposed_set_button_text(self, event_label, text):
return self._module.set_button_text(event_label, text)
def exposed_was_button_pressed(self, event_label):
return self._module.was_button_pressed(event_label)
def exposed_was_button_released(self, event_label):
return self._module.was_button_released(event_label)
def exposed_reset_button(self, event_label):
return self._module.reset_button(event_label)
def exposed_is_pressed(self, event_label):
return self._module.is_pressed(event_label)
def exposed_change_button_background_color(self, event_label, color):
return self._module.change_button_background_color(event_label, color)
def exposed_get_container_info(self, container_label):
return pickle.dumps(self._module.get_container_info(container_label))
def exposed_get_item_text(self, container_label):
return self._module.get_item_text(container_label)
def exposed_get_item_index(self, container_label):
return self._module.get_item_index(container_label)
def exposed_set_item_index(self, container_label, index):
return self._module.set_item_index(container_label, index)
def exposed_remove_client_list_entry(self, client_to_stop):
return self._module.remove_client_list_entry(client_to_stop)
class Client(ClientBase):
def assign_plot(self, plot_widget, plot_label, legend_widget):
return self._service.exposed_assign_plot(
plot_widget=plot_widget,
plot_label=plot_label,
legend_widget=legend_widget
)
def clear_plot(self, plot_widget):
return self._service.exposed_clear_plot(
plot_widget=plot_widget
)
def assign_curve(self, plot_label, curve_label, error=False):
return self._service.exposed_assign_curve(
plot_label=plot_label,
curve_label=curve_label,
error=error
)
def remove_curve(self, plot_label, curve_label):
return self._service.exposed_remove_curve(
plot_label=plot_label,
curve_label=curve_label
)
def assign_scalar(self, scalar_widget, scalar_label):
self._service.exposed_assign_scalar(
scalar_widget=scalar_widget,
scalar_label=scalar_label
)
def assign_label(self, label_widget, label_label):
return self._service.exposed_assign_label(
label_widget=label_widget,
label_label=label_label
)
def assign_event_button(self, event_widget, event_label):
return self._service.exposed_assign_event_button(
event_widget=event_widget,
event_label=event_label,
)
def assign_container(self, container_widget, container_label):
return self._service.exposed_assign_container(container_widget, container_label)
def set_curve_data(self, data, plot_label, curve_label, error=None):
data_pickle = pickle.dumps(data)
error_pickle = pickle.dumps(error)
return self._service.exposed_set_curve_data(
data_pickle=data_pickle,
plot_label=plot_label,
curve_label=curve_label,
error_pickle=error_pickle
)
def set_scalar(self, value, scalar_label):
value_pickle = pickle.dumps(value)
return self._service.exposed_set_scalar(
value_pickle=value_pickle,
scalar_label=scalar_label
)
def get_scalar(self, scalar_label):
return pickle.loads(self._service.exposed_get_scalar(scalar_label))
def activate_scalar(self, scalar_label):
return self._service.exposed_activate_scalar(scalar_label)
def deactivate_scalar(self, scalar_label):
return self._service.exposed_deactivate_scalar(scalar_label)
def set_label(self, text, label_label):
return self._service.exposed_set_label(
text=text,
label_label=label_label
)
def get_text(self, label_label):
return pickle.loads(self._service.exposed_get_text(label_label))
def was_button_pressed(self, event_label):
return self._service.exposed_was_button_pressed(event_label)
def was_button_released(self, event_label):
return self._service.exposed_was_button_released(event_label)
def is_pressed(self, event_label):
return self._service.exposed_is_pressed(event_label)
def reset_button(self, event_label):
return self._service.exposed_reset_button(event_label)
def change_button_background_color(self, event_label, color):
return self._service.exposed_change_button_background_color(event_label, color)
def get_container_info(self, container_label):
return pickle.loads(self._service.exposed_get_container_info(container_label))
def get_item_text(self, container_label):
return self._service.exposed_get_item_text(container_label)
def get_item_index(self, container_label):
return self._service.exposed_get_item_index(container_label)
def set_item_index(self, container_label, index):
return self._service.exposed_set_item_index(container_label, index)
def set_button_text(self, event_label, text):
return self._service.exposed_set_button_text(event_label, text)
def remove_client_list_entry(self, client_to_stop):
return self._service.exposed_remove_client_list_entry(client_to_stop)
def save_gui(self, config_filename, folder_root=None, logger=None, scalars=[], labels=[]):
""" Saves the current GUI state into a config file as a dictionary
:param config_filename: (str) name of configuration file to save.
Can be an existing config file with other configuration parameters
:folder_root: (str) Name of folder where the config files are stored. If None,
use pylabnet/config
:logger: (LogClient) instance of LogClient (or LogHandler)
:param scalars: [str] list of scalar labels to save
:param labels: [str] list of label labels to save
"""
# Generate GUI dictionary
gui_scalars, gui_labels = dict(), dict()
for scalar in scalars:
gui_scalars[scalar] = self.get_scalar(scalar)
for label in labels:
gui_labels[label] = self.get_text(label)
data = dict(gui_scalars=gui_scalars, gui_labels=gui_labels)
# Append to the configuration file if it exists, otherwise create a new one
filepath = get_config_filepath(config_filename, folder_root)
if os.path.exists(filepath):
old_data = load_config(config_filename, folder_root, logger)
else:
old_data = dict()
data = dict(**old_data, **data)
with open(filepath, 'w') as outfile:
json.dump(data, outfile, indent=4)
logger.info(f'Saved GUI data to {filepath}')
def load_gui(self, config_filename, folder_root=None, logger=None):
""" Loads and applies GUI settings from a config file
:param config_filename: (str) name of configuration file to save.
Can be an existing config file with other configuration parameters
:folder_root: (str) Name of folder where the config files are stored. If None,
use pylabnet/config
:logger: (LogClient) instance of LogClient (or LogHandler)
"""
data = load_config(config_filename, folder_root, logger)
if 'gui_scalars' in data:
for scalar, value in data['gui_scalars'].items():
self.activate_scalar(scalar)
self.set_scalar(value, scalar)
self.deactivate_scalar(scalar)
if 'gui_labels' in data:
for label, text in data['gui_labels'].items():
self.set_label(text, label)
logger.info(f'Loaded GUI values from {get_config_filepath(config_filename, folder_root)}')
| 37.057627 | 98 | 0.69539 | 1,384 | 10,932 | 5.127168 | 0.094653 | 0.062007 | 0.054961 | 0.074408 | 0.782272 | 0.680524 | 0.630214 | 0.483794 | 0.362458 | 0.252114 | 0 | 0.000119 | 0.231339 | 10,932 | 294 | 99 | 37.183673 | 0.844341 | 0.082784 | 0 | 0.194313 | 0 | 0 | 0.014648 | 0.003738 | 0 | 0 | 0 | 0 | 0 | 1 | 0.255924 | false | 0 | 0.028436 | 0.218009 | 0.530806 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
42245f3078fb676ef972d6e21f7b02e9cb4aafa2 | 205 | py | Python | tests/urls.py | bushig/OEAdmin | 5464d3e63b658219bd4fe31cddbd8682b15ed3b3 | [
"MIT"
] | null | null | null | tests/urls.py | bushig/OEAdmin | 5464d3e63b658219bd4fe31cddbd8682b15ed3b3 | [
"MIT"
] | 5 | 2019-11-25T21:29:22.000Z | 2019-11-27T23:34:15.000Z | tests/urls.py | bushig/django-vadmin | 5464d3e63b658219bd4fe31cddbd8682b15ed3b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.urls import path, include
urlpatterns = [
path('', include('django_vadmin.urls', namespace='vadmin')),
]
| 20.5 | 64 | 0.712195 | 24 | 205 | 5.791667 | 0.666667 | 0.158273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005682 | 0.141463 | 205 | 9 | 65 | 22.777778 | 0.784091 | 0.102439 | 0 | 0 | 0 | 0 | 0.131868 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
42667a9154db0ce5f470410a70bed046750b9a56 | 33,026 | py | Python | jz-submissions/scripts/train_eval_poly_200_click.py | tobias-liaudat/wf-psf | 0ff1a12d06c46bd8599061d227785393fb528d76 | [
"MIT"
] | 7 | 2022-03-10T10:49:01.000Z | 2022-03-17T16:06:12.000Z | jz-submissions/scripts/train_eval_poly_200_click.py | tobias-liaudat/wf-psf | 0ff1a12d06c46bd8599061d227785393fb528d76 | [
"MIT"
] | null | null | null | jz-submissions/scripts/train_eval_poly_200_click.py | tobias-liaudat/wf-psf | 0ff1a12d06c46bd8599061d227785393fb528d76 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# PSF modelling and evaluation
# Import packages
import sys
import numpy as np
import time
import wf_psf as wf
import tensorflow as tf
import tensorflow_addons as tfa
import click
# from absl import app
# from absl import flags
@click.command()
@click.command()
## Training options
# Model definition
@click.option(
"--model",
default="poly",
type=str,
help="Model type. Options are: 'mccd', 'poly, 'param'.")
@click.option(
"--id_name",
default="-coherent_euclid_200stars",
type=str,
help="Model saving id.")
# Saving paths
@click.option(
"--base_path",
default="/gpfswork/rech/xdy/ulx23va/wf-outputs/",
type=str,
help="Base path for saving files.")
@click.option(
"--log_folder",
default="log-files/",
type=str,
help="Folder name to save log files.")
@click.option(
"--model_folder",
default="chkp/",
type=str,
help="Folder name to save trained models.")
@click.option(
"--optim_hist_folder",
default="optim-hist/",
type=str,
help="Folder name to save optimisation history files.")
@click.option(
"--chkp_save_path",
default="/gpfsscratch/rech/xdy/ulx23va/wf-outputs/chkp/",
type=str,
help="Path to save model checkpoints during training.")
# Input dataset paths
@click.option(
"--dataset_folder",
default="/gpfswork/rech/xdy/ulx23va/repo/wf-psf/data/coherent_euclid_dataset/",
type=str,
help="Folder path of datasets.")
@click.option(
"--train_dataset_file",
default="train_Euclid_res_200_TrainStars_id_001.npy",
type=str,
help="Train dataset file name.")
@click.option(
"--test_dataset_file",
default="test_Euclid_res_id_001.npy",
type=str,
help="Test dataset file name.")
# Model parameters
@click.option(
"--n_zernikes",
default=15,
type=int,
help="Zernike polynomial modes to use on the parametric part.")
@click.option(
"--pupil_diameter",
default=256,
type=int,
help="Dimension of the OPD/Wavefront space.")
@click.option(
"--n_bins_lda",
default=20,
type=int,
help="Number of wavelength bins to use to reconstruct polychromatic objects.")
@click.option(
"--output_q",
default=3.,
type=float,
help="Downsampling rate to match the specified telescope's sampling from the oversampling rate used in the model.")
@click.option(
"--oversampling_rate",
default=3.,
type=float,
help="Oversampling rate used for the OPD/WFE PSF model.")
@click.option(
"--output_dim",
default=32,
type=int,
help="Dimension of the pixel PSF postage stamp.")
@click.option(
"--d_max",
default=2,
type=int,
help="Max polynomial degree of the parametric part.")
@click.option(
"--d_max_nonparam",
default=3,
type=int,
help="Max polynomial degree of the non-parametric part.")
@click.option(
"--x_lims",
nargs=2,
default=[0, 1e3],
type=float,
help="Limits of the PSF field coordinates for the x axis.")
@click.option(
"--y_lims",
nargs=2,
default=[0, 1e3],
type=float,
help="Limits of the PSF field coordinates for the y axis.")
@click.option(
"--graph_features",
default=10,
type=int,
help="Number of graph-constrained features of the non-parametric part.")
@click.option(
"--l1_rate",
default=1e-8,
type=float,
help="L1 regularisation parameter for the non-parametric part.")
# Training parameters
@click.option(
"--batch_size",
default=32,
type=int,
help="Batch size used for the trainingin the stochastic gradient descend type of algorithm.")
@click.option(
"--l_rate_param",
nargs=2,
default=[1e-2, 1e-2],
type=float,
help="Learning rates for the parametric parts.")
@click.option(
"--l_rate_non_param",
nargs=2,
default=[1e-1, 1e-1],
type=float,
help="Learning rates for the non-parametric parts.")
@click.option(
"--n_epochs_param",
nargs=2,
default=[20, 20],
type=int,
help="Number of training epochs of the parametric parts.")
@click.option(
"--n_epochs_non_param",
nargs=2,
default=[100, 120],
type=int,
help="Number of training epochs of the non-parametric parts.")
@click.option(
"--total_cycles",
default=2,
type=int,
help="Total amount of cycles to perform. For the moment the only available options are '1' or '2'.")
## Evaluation flags
# Saving paths
@click.option(
"--metric_base_path",
default="/gpfswork/rech/xdy/ulx23va/wf-outputs/metrics/",
type=str,
help="Base path for saving metric files.")
@click.option(
"--saved_model_type",
default="final",
type=str,
help="Type of saved model to use for the evaluation. Can be 'final' or 'checkpoint'.")
@click.option(
"--saved_cycle",
default="cycle2",
type=str,
help="Saved cycle to use for the evaluation. Can be 'cycle1' or 'cycle2'.")
# Evaluation parameters
@click.option(
"--gt_n_zernikes",
default=45,
type=int,
help="Zernike polynomial modes to use on the ground truth model parametric part.")
@click.option(
"--eval_batch_size",
default=16,
type=int,
help="Batch size to use for the evaluation.")
def main(**args):
train_model(**args)
evaluate_model(**args)
def train_model(**args):
""" Train the model defined in the """
# Start measuring elapsed time
starting_time = time.time()
# Define model run id
run_id_name = args['model'] + args['id_name']
# Define paths
log_save_file = args['base_path'] + args['log_folder']
model_save_file= args['base_path'] + args['model_folder']
optim_hist_file = args['base_path'] + args['optim_hist_folder']
saving_optim_hist = dict()
# Save output prints to logfile
old_stdout = sys.stdout
log_file = open(log_save_file + run_id_name + '_output.log','w')
sys.stdout = log_file
print('Starting the log file.')
# Print GPU and tensorflow info
device_name = tf.test.gpu_device_name()
print('Found GPU at: {}'.format(device_name))
print('tf_version: ' + str(tf.__version__))
## Prepare the inputs
# Generate Zernike maps
zernikes = wf.utils.zernike_generator(n_zernikes=args['n_zernikes'], wfe_dim=args['pupil_diameter'])
# Now as cubes
np_zernike_cube = np.zeros((len(zernikes), zernikes[0].shape[0], zernikes[0].shape[1]))
for it in range(len(zernikes)):
np_zernike_cube[it,:,:] = zernikes[it]
np_zernike_cube[np.isnan(np_zernike_cube)] = 0
tf_zernike_cube = tf.convert_to_tensor(np_zernike_cube, dtype=tf.float32)
print('Zernike cube:')
print(tf_zernike_cube.shape)
## Load the dictionaries
train_dataset = np.load(args['dataset_folder'] + args['train_dataset_file'], allow_pickle=True)[()]
# train_stars = train_dataset['stars']
# noisy_train_stars = train_dataset['noisy_stars']
# train_pos = train_dataset['positions']
train_SEDs = train_dataset['SEDs']
# train_zernike_coef = train_dataset['zernike_coef']
train_C_poly = train_dataset['C_poly']
train_parameters = train_dataset['parameters']
test_dataset = np.load(args['dataset_folder'] + args['test_dataset_file'], allow_pickle=True)[()]
# test_stars = test_dataset['stars']
# test_pos = test_dataset['positions']
test_SEDs = test_dataset['SEDs']
# test_zernike_coef = test_dataset['zernike_coef']
# Convert to tensor
tf_noisy_train_stars = tf.convert_to_tensor(train_dataset['noisy_stars'], dtype=tf.float32)
tf_train_stars = tf.convert_to_tensor(train_dataset['stars'], dtype=tf.float32)
tf_train_pos = tf.convert_to_tensor(train_dataset['positions'], dtype=tf.float32)
tf_test_stars = tf.convert_to_tensor(test_dataset['stars'], dtype=tf.float32)
tf_test_pos = tf.convert_to_tensor(test_dataset['positions'], dtype=tf.float32)
print('Dataset parameters:')
print(train_parameters)
## Generate initializations
# Prepare np input
simPSF_np = wf.SimPSFToolkit(zernikes, max_order=args['n_zernikes'],
pupil_diameter=args['pupil_diameter'], output_dim=args['output_dim'],
oversampling_rate=args['oversampling_rate'], output_Q=args['output_q'])
simPSF_np.gen_random_Z_coeffs(max_order=args['n_zernikes'])
z_coeffs = simPSF_np.normalize_zernikes(simPSF_np.get_z_coeffs(), simPSF_np.max_wfe_rms)
simPSF_np.set_z_coeffs(z_coeffs)
simPSF_np.generate_mono_PSF(lambda_obs=0.7, regen_sample=False)
# Obscurations
obscurations = simPSF_np.generate_pupil_obscurations(N_pix=args['pupil_diameter'], N_filter=2)
tf_obscurations = tf.convert_to_tensor(obscurations, dtype=tf.complex64)
# Initialize the SED data list
packed_SED_data = [wf.utils.generate_packed_elems(_sed, simPSF_np, n_bins=args['n_bins_lda'])
for _sed in train_SEDs]
# Prepare the inputs for the training
tf_packed_SED_data = tf.convert_to_tensor(packed_SED_data, dtype=tf.float32)
tf_packed_SED_data = tf.transpose(tf_packed_SED_data, perm=[0, 2, 1])
inputs = [tf_train_pos, tf_packed_SED_data]
# Select the observed stars (noisy or noiseless)
outputs = tf_noisy_train_stars
# outputs = tf_train_stars
## Prepare validation data inputs
val_SEDs = test_SEDs
tf_val_pos = tf_test_pos
tf_val_stars = tf_test_stars
# Initialize the SED data list
val_packed_SED_data = [wf.utils.generate_packed_elems(_sed, simPSF_np, n_bins=args['n_bins_lda'])
for _sed in val_SEDs]
# Prepare the inputs for the validation
tf_val_packed_SED_data = tf.convert_to_tensor(val_packed_SED_data, dtype=tf.float32)
tf_val_packed_SED_data = tf.transpose(tf_val_packed_SED_data, perm=[0, 2, 1])
# Prepare input validation tuple
val_x_inputs = [tf_val_pos, tf_val_packed_SED_data]
val_y_inputs = tf_val_stars
val_data = (val_x_inputs, val_y_inputs)
## Select the model
if args['model'] == 'mccd':
poly_dic, graph_dic = wf.tf_mccd_psf_field.build_mccd_spatial_dic_v2(obs_stars=outputs.numpy(),
obs_pos=tf_train_pos.numpy(),
x_lims=args['x_lims'],
y_lims=args['y_lims'],
d_max=args['d_max_nonparam'],
graph_features=args['graph_features'])
spatial_dic = [poly_dic, graph_dic]
# Initialize the model
tf_semiparam_field = wf.tf_mccd_psf_field.TF_SP_MCCD_field(zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
obs_pos=tf_train_pos,
spatial_dic=spatial_dic,
output_Q=args['output_q'],
d_max_nonparam=args['d_max_nonparam'],
graph_features=args['graph_features'],
l1_rate=args['l1_rate'],
output_dim=args['output_dim'],
n_zernikes=args['n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
elif args['model'] == 'poly':
# # Initialize the model
tf_semiparam_field = wf.tf_psf_field.TF_SemiParam_field(zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
output_Q=args['output_q'],
d_max_nonparam=args['d_max_nonparam'],
output_dim=args['output_dim'],
n_zernikes=args['n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
elif args['model'] == 'param':
# Initialize the model
tf_semiparam_field = wf.tf_psf_field.TF_PSF_field_model(zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
output_Q=args['output_q'],
output_dim=args['output_dim'],
n_zernikes=args['n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
# # Model Training
# Prepare the saving callback
# Prepare to save the model as a callback
filepath_chkp_callback = args['chkp_save_path'] + 'chkp_callback_' + run_id_name + '_cycle1'
model_chkp_callback = tf.keras.callbacks.ModelCheckpoint(
filepath_chkp_callback,
monitor='mean_squared_error', verbose=1, save_best_only=True,
save_weights_only=False, mode='min', save_freq='epoch',
options=None)
# Prepare the optimisers
param_optim = tfa.optimizers.RectifiedAdam(lr=args['l_rate_param'][0])
non_param_optim = tfa.optimizers.RectifiedAdam(lr=args['l_rate_non_param'][0])
print('Starting cycle 1..')
start_cycle1 = time.time()
if args['model'] == 'param':
tf_semiparam_field, hist_param = wf.train_utils.param_train_cycle(
tf_semiparam_field,
inputs=inputs,
outputs=outputs,
val_data=val_data,
batch_size=args['batch_size'],
l_rate=args['l_rate_param'][0],
n_epochs=args['n_epochs_param'][0],
param_optim=param_optim,
param_loss=None,
param_metrics=None,
param_callback=None,
general_callback=[model_chkp_callback],
verbose=2)
else:
tf_semiparam_field, hist_param, hist_non_param = wf.train_utils.general_train_cycle(
tf_semiparam_field,
inputs=inputs,
outputs=outputs,
val_data=val_data,
batch_size=args['batch_size'],
l_rate_param=args['l_rate_param'][0],
l_rate_non_param=args['l_rate_non_param'][0],
n_epochs_param=args['n_epochs_param'][0],
n_epochs_non_param=args['n_epochs_non_param'][0],
param_optim=param_optim,
non_param_optim=non_param_optim,
param_loss=None, non_param_loss=None,
param_metrics=None, non_param_metrics=None,
param_callback=None, non_param_callback=None,
general_callback=[model_chkp_callback],
first_run=True,
verbose=2)
# Save weights
tf_semiparam_field.save_weights(model_save_file + 'chkp_' + run_id_name + '_cycle1')
end_cycle1 = time.time()
print('Cycle1 elapsed time: %f'%(end_cycle1-start_cycle1))
# Save optimisation history in the saving dict
saving_optim_hist['param_cycle1'] = hist_param.history
if args['model'] != 'param':
saving_optim_hist['nonparam_cycle1'] = hist_non_param.history
if args['total_cycles'] >= 2:
# Prepare to save the model as a callback
filepath_chkp_callback = args['chkp_save_path'] + 'chkp_callback_' + run_id_name + '_cycle2'
model_chkp_callback = tf.keras.callbacks.ModelCheckpoint(
filepath_chkp_callback,
monitor='mean_squared_error', verbose=1, save_best_only=True,
save_weights_only=False, mode='min', save_freq='epoch',
options=None)
# Prepare the optimisers
param_optim = tfa.optimizers.RectifiedAdam(lr=args['l_rate_param'][1])
non_param_optim = tfa.optimizers.RectifiedAdam(lr=args['l_rate_non_param'][1])
print('Starting cycle 2..')
start_cycle2 = time.time()
# Compute the next cycle
if args['model'] == 'param':
tf_semiparam_field, hist_param_2 = wf.train_utils.param_train_cycle(
tf_semiparam_field,
inputs=inputs,
outputs=outputs,
val_data=val_data,
batch_size=args['batch_size'],
l_rate=args['l_rate_param'][1],
n_epochs=args['n_epochs_param'][1],
param_optim=param_optim,
param_loss=None,
param_metrics=None,
param_callback=None,
general_callback=[model_chkp_callback],
verbose=2)
else:
# Compute the next cycle
tf_semiparam_field, hist_param_2, hist_non_param_2 = wf.train_utils.general_train_cycle(
tf_semiparam_field,
inputs=inputs,
outputs=outputs,
val_data=val_data,
batch_size=args['batch_size'],
l_rate_param=args['l_rate_param'][1],
l_rate_non_param=args['l_rate_non_param'][1],
n_epochs_param=args['n_epochs_param'][1],
n_epochs_non_param=args['n_epochs_non_param'][1],
param_optim=param_optim,
non_param_optim=non_param_optim,
param_loss=None, non_param_loss=None,
param_metrics=None, non_param_metrics=None,
param_callback=None, non_param_callback=None,
general_callback=[model_chkp_callback],
first_run=False,
verbose=2)
# Save the weights at the end of the second cycle
tf_semiparam_field.save_weights(model_save_file + 'chkp_' + run_id_name + '_cycle2')
end_cycle2 = time.time()
print('Cycle2 elapsed time: %f'%(end_cycle2 - start_cycle2))
# Save optimisation history in the saving dict
saving_optim_hist['param_cycle2'] = hist_param_2.history
if args['model'] != 'param':
saving_optim_hist['nonparam_cycle2'] = hist_non_param_2.history
# Save optimisation history dictionary
np.save(optim_hist_file + 'optim_hist_' + run_id_name + '.npy', saving_optim_hist)
## Print final time
final_time = time.time()
print('\nTotal elapsed time: %f'%(final_time - starting_time))
## Close log file
print('\n Good bye..')
sys.stdout = old_stdout
log_file.close()
def evaluate_model(**args):
""" Evaluate the trained model."""
# Start measuring elapsed time
starting_time = time.time()
# Define model run id
run_id_name = args['model'] + args['id_name']
# Define paths
log_save_file = args['base_path'] + args['log_folder']
# Define saved model to use
if args['saved_model_type'] == 'checkpoint':
weights_paths = args['chkp_save_path'] + 'chkp_callback_' + run_id_name + '_' + args['saved_cycle']
elif args['saved_model_type'] == 'final':
model_save_file= args['base_path'] + args['model_folder']
weights_paths = model_save_file + 'chkp_' + run_id_name + '_' + args['saved_cycle']
## Save output prints to logfile
old_stdout = sys.stdout
log_file = open(log_save_file + run_id_name + '-metrics_output.log', 'w')
sys.stdout = log_file
print('Starting the log file.')
## Check GPU and tensorflow version
device_name = tf.test.gpu_device_name()
print('Found GPU at: {}'.format(device_name))
print('tf_version: ' + str(tf.__version__))
## Load datasets
train_dataset = np.load(args['dataset_folder'] + args['train_dataset_file'], allow_pickle=True)[()]
# train_stars = train_dataset['stars']
# noisy_train_stars = train_dataset['noisy_stars']
# train_pos = train_dataset['positions']
train_SEDs = train_dataset['SEDs']
# train_zernike_coef = train_dataset['zernike_coef']
train_C_poly = train_dataset['C_poly']
train_parameters = train_dataset['parameters']
test_dataset = np.load(args['dataset_folder'] + args['test_dataset_file'], allow_pickle=True)[()]
# test_stars = test_dataset['stars']
# test_pos = test_dataset['positions']
test_SEDs = test_dataset['SEDs']
# test_zernike_coef = test_dataset['zernike_coef']
# Convert to tensor
tf_noisy_train_stars = tf.convert_to_tensor(train_dataset['noisy_stars'], dtype=tf.float32)
tf_train_pos = tf.convert_to_tensor(train_dataset['positions'], dtype=tf.float32)
tf_test_pos = tf.convert_to_tensor(test_dataset['positions'], dtype=tf.float32)
print('Dataset parameters:')
print(train_parameters)
## Prepare models
# Generate Zernike maps
zernikes = wf.utils.zernike_generator(n_zernikes=args['n_zernikes'], wfe_dim=args['pupil_diameter'])
# Now as cubes
np_zernike_cube = np.zeros((len(zernikes), zernikes[0].shape[0], zernikes[0].shape[1]))
for it in range(len(zernikes)):
np_zernike_cube[it,:,:] = zernikes[it]
np_zernike_cube[np.isnan(np_zernike_cube)] = 0
tf_zernike_cube = tf.convert_to_tensor(np_zernike_cube, dtype=tf.float32)
# Prepare np input
simPSF_np = wf.SimPSFToolkit(zernikes, max_order=args['n_zernikes'],
pupil_diameter=args['pupil_diameter'], output_dim=args['output_dim'],
oversampling_rate=args['oversampling_rate'], output_Q=args['output_q'])
simPSF_np.gen_random_Z_coeffs(max_order=args['n_zernikes'])
z_coeffs = simPSF_np.normalize_zernikes(simPSF_np.get_z_coeffs(), simPSF_np.max_wfe_rms)
simPSF_np.set_z_coeffs(z_coeffs)
simPSF_np.generate_mono_PSF(lambda_obs=0.7, regen_sample=False)
# Obscurations
obscurations = simPSF_np.generate_pupil_obscurations(N_pix=args['pupil_diameter'], N_filter=2)
tf_obscurations = tf.convert_to_tensor(obscurations, dtype=tf.complex64)
# Outputs (needed for the MCCD model)
outputs = tf_noisy_train_stars
## Create the model
## Select the model
if args['model'] == 'mccd':
poly_dic, graph_dic = wf.tf_mccd_psf_field.build_mccd_spatial_dic_v2(obs_stars=outputs.numpy(),
obs_pos=tf_train_pos.numpy(),
x_lims=args['x_lims'],
y_lims=args['y_lims'],
d_max=args['d_max_nonparam'],
graph_features=args['graph_features'])
spatial_dic = [poly_dic, graph_dic]
# Initialize the model
tf_semiparam_field = wf.tf_mccd_psf_field.TF_SP_MCCD_field(zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
obs_pos=tf_train_pos,
spatial_dic=spatial_dic,
output_Q=args['output_q'],
d_max_nonparam=args['d_max_nonparam'],
graph_features=args['graph_features'],
l1_rate=args['l1_rate'],
output_dim=args['output_dim'],
n_zernikes=args['n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
elif args['model'] == 'poly':
# # Initialize the model
tf_semiparam_field = wf.tf_psf_field.TF_SemiParam_field(zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
output_Q=args['output_q'],
d_max_nonparam=args['d_max_nonparam'],
output_dim=args['output_dim'],
n_zernikes=args['n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
elif args['model'] == 'param':
# Initialize the model
tf_semiparam_field = wf.tf_psf_field.TF_PSF_field_model(zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
output_Q=args['output_q'],
output_dim=args['output_dim'],
n_zernikes=args['n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
## Load the model's weights
tf_semiparam_field.load_weights(weights_paths)
## Prepare ground truth model
# Generate Zernike maps
zernikes = wf.utils.zernike_generator(n_zernikes=args['gt_n_zernikes'], wfe_dim=args['pupil_diameter'])
# Now as cubes
np_zernike_cube = np.zeros((len(zernikes), zernikes[0].shape[0], zernikes[0].shape[1]))
for it in range(len(zernikes)):
np_zernike_cube[it,:,:] = zernikes[it]
np_zernike_cube[np.isnan(np_zernike_cube)] = 0
tf_zernike_cube = tf.convert_to_tensor(np_zernike_cube, dtype=tf.float32)
# Initialize the model
GT_tf_semiparam_field = wf.tf_psf_field.TF_SemiParam_field(
zernike_maps=tf_zernike_cube,
obscurations=tf_obscurations,
batch_size=args['batch_size'],
output_Q=args['output_q'],
d_max_nonparam=args['d_max_nonparam'],
output_dim=args['output_dim'],
n_zernikes=args['gt_n_zernikes'],
d_max=args['d_max'],
x_lims=args['x_lims'],
y_lims=args['y_lims'])
# For the Ground truth model
GT_tf_semiparam_field.tf_poly_Z_field.assign_coeff_matrix(train_C_poly)
_ = GT_tf_semiparam_field.tf_np_poly_opd.alpha_mat.assign(
np.zeros_like(GT_tf_semiparam_field.tf_np_poly_opd.alpha_mat))
## Metric evaluation on the test dataset
print('\n***\nMetric evaluation on the test dataset\n***\n')
# Polychromatic star reconstructions
rmse, rel_rmse, std_rmse, std_rel_rmse = wf.metrics.compute_poly_metric(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
simPSF_np=simPSF_np,
tf_pos=tf_test_pos,
tf_SEDs=test_SEDs,
n_bins_lda=args['n_bins_lda'],
batch_size=args['eval_batch_size'])
poly_metric = {'rmse': rmse,
'rel_rmse': rel_rmse,
'std_rmse': std_rmse,
'std_rel_rmse': std_rel_rmse
}
# Monochromatic star reconstructions
lambda_list = np.arange(0.55, 0.9, 0.01) # 10nm separation
rmse_lda, rel_rmse_lda, std_rmse_lda, std_rel_rmse_lda = wf.metrics.compute_mono_metric(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
simPSF_np=simPSF_np,
tf_pos=tf_test_pos,
lambda_list=lambda_list)
mono_metric = {'rmse_lda': rmse_lda,
'rel_rmse_lda': rel_rmse_lda,
'std_rmse_lda': std_rmse_lda,
'std_rel_rmse_lda': std_rel_rmse_lda
}
# OPD metrics
rmse_opd, rel_rmse_opd, rmse_std_opd, rel_rmse_std_opd = wf.metrics.compute_opd_metrics(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
pos=tf_test_pos,
batch_size=args['eval_batch_size'])
opd_metric = { 'rmse_opd': rmse_opd,
'rel_rmse_opd': rel_rmse_opd,
'rmse_std_opd': rmse_std_opd,
'rel_rmse_std_opd': rel_rmse_std_opd
}
# Shape metrics
shape_results_dict = wf.metrics.compute_shape_metrics(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
simPSF_np=simPSF_np,
SEDs=test_SEDs,
tf_pos=tf_test_pos,
n_bins_lda=args['n_bins_lda'],
output_Q=1,
output_dim=64,
batch_size=args['eval_batch_size'])
# Save metrics
test_metrics = {'poly_metric': poly_metric,
'mono_metric': mono_metric,
'opd_metric': opd_metric,
'shape_results_dict': shape_results_dict
}
## Metric evaluation on the train dataset
print('\n***\nMetric evaluation on the train dataset\n***\n')
# Polychromatic star reconstructions
rmse, rel_rmse, std_rmse, std_rel_rmse = wf.metrics.compute_poly_metric(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
simPSF_np=simPSF_np,
tf_pos=tf_train_pos,
tf_SEDs=train_SEDs,
n_bins_lda=args['n_bins_lda'],
batch_size=args['eval_batch_size'])
train_poly_metric = {'rmse': rmse,
'rel_rmse': rel_rmse,
'std_rmse': std_rmse,
'std_rel_rmse': std_rel_rmse
}
# Monochromatic star reconstructions
lambda_list = np.arange(0.55, 0.9, 0.01) # 10nm separation
rmse_lda, rel_rmse_lda, std_rmse_lda, std_rel_rmse_lda = wf.metrics.compute_mono_metric(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
simPSF_np=simPSF_np,
tf_pos=tf_train_pos,
lambda_list=lambda_list)
train_mono_metric = {'rmse_lda': rmse_lda,
'rel_rmse_lda': rel_rmse_lda,
'std_rmse_lda': std_rmse_lda,
'std_rel_rmse_lda': std_rel_rmse_lda
}
# OPD metrics
rmse_opd, rel_rmse_opd, rmse_std_opd, rel_rmse_std_opd = wf.metrics.compute_opd_metrics(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
pos=tf_train_pos,
batch_size=args['eval_batch_size'])
train_opd_metric = { 'rmse_opd': rmse_opd,
'rel_rmse_opd': rel_rmse_opd,
'rmse_std_opd': rmse_std_opd,
'rel_rmse_std_opd': rel_rmse_std_opd
}
# Shape metrics
train_shape_results_dict = wf.metrics.compute_shape_metrics(
tf_semiparam_field=tf_semiparam_field,
GT_tf_semiparam_field=GT_tf_semiparam_field,
simPSF_np=simPSF_np,
SEDs=train_SEDs,
tf_pos=tf_train_pos,
n_bins_lda=args['n_bins_lda'],
output_Q=1,
output_dim=64,
batch_size=args['eval_batch_size'])
# Save metrics into dictionary
train_metrics = {'poly_metric': train_poly_metric,
'mono_metric': train_mono_metric,
'opd_metric': train_opd_metric,
'shape_results_dict': train_shape_results_dict
}
## Save results
metrics = {'test_metrics': test_metrics,
'train_metrics': train_metrics
}
output_path = args['metric_base_path'] + 'metrics-' + run_id_name
np.save(output_path, metrics, allow_pickle=True)
## Print final time
final_time = time.time()
print('\nTotal elapsed time: %f'%(final_time - starting_time))
## Close log file
print('\n Good bye..')
sys.stdout = old_stdout
log_file.close()
if __name__ == "__main__":
main()
| 39.130332 | 119 | 0.593653 | 4,048 | 33,026 | 4.483696 | 0.088686 | 0.033939 | 0.049366 | 0.019835 | 0.780055 | 0.738678 | 0.712948 | 0.674821 | 0.669091 | 0.636749 | 0 | 0.009525 | 0.303791 | 33,026 | 843 | 120 | 39.17675 | 0.779846 | 0.088052 | 0 | 0.64658 | 0 | 0.001629 | 0.178151 | 0.00971 | 0 | 0 | 0 | 0 | 0 | 1 | 0.004886 | false | 0 | 0.011401 | 0 | 0.016287 | 0.035831 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
42750e322eaee4270f33100b42e7ccfe36415d95 | 58,717 | py | Python | FEV_KEGG/Experiments/49.py | ryhaberecht/FEV-KEGG | f55f294aae07b76954ed823f0c2e6d189fb2b1bb | [
"MIT"
] | null | null | null | FEV_KEGG/Experiments/49.py | ryhaberecht/FEV-KEGG | f55f294aae07b76954ed823f0c2e6d189fb2b1bb | [
"MIT"
] | 2 | 2019-05-30T06:42:08.000Z | 2021-05-06T10:37:40.000Z | FEV_KEGG/Experiments/49.py | ryhaberecht/FEV-KEGG | f55f294aae07b76954ed823f0c2e6d189fb2b1bb | [
"MIT"
] | null | null | null | """
Question
--------
Which neofunctionalised enzymes cause the core metabolism of Deltaproteobacteria to have increased redundancy? How much do they contribute?
Method
------
- get clade
- get core metabolism
- calculate "neofunctionalised" ECs
- calculate redundancy
- REPEAT for each "neofunctionalised" EC contributing to redundancy
- report enzyme pairs of neofunctionalisations, which caused the EC to be considered "neofunctionalised", and are in return contributing to redundancy
Result
------
::
core metabolism majority: 80%
neofunctionalisation majority: 0% (this means that gene duplication within a single organism is enough)
Deltaproteobacteria:
core metabolism ECs: 228
"neofunctionalised" ECs: 36 (16%)
Neofunctionalisations contributing to robustness: 84
(afw:Anae109_3317 [2.2.1.1], afw:Anae109_1136 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(ccx:COCOR_06741 [2.2.1.1], ccx:COCOR_04847 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(daf:Desaf_0090 [2.2.1.1], daf:Desaf_2970 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(daf:Desaf_0304 [2.2.1.1], daf:Desaf_2970 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dal:Dalk_1064 [2.2.1.1], dal:Dalk_0836 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(das:Daes_0077 [2.2.1.1], das:Daes_0911 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(das:Daes_1972 [2.2.1.1], das:Daes_0911 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dav:DESACE_00060 [2.2.1.1], dav:DESACE_03180 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(des:DSOUD_0657 [2.2.1.1], des:DSOUD_2394 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(deu:DBW_3054 [2.2.1.1], deu:DBW_2425 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dfi:AXF13_13965 [2.2.1.1], dfi:AXF13_05800 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dgg:DGI_1348 [2.2.1.1], dgg:DGI_2795 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dhy:DESAM_21173 [2.2.1.1], dhy:DESAM_20160 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dol:Dole_1130 [2.2.1.1], dol:Dole_1662 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dsa:Desal_0558 [2.2.1.1], dsa:Desal_0740 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dsa:Desal_0574 [2.2.1.1], dsa:Desal_0740 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dsf:UWK_02797 [2.2.1.1], dsf:UWK_02514 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dti:Desti_0148 [2.2.1.1], dti:Desti_1492 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dvu:DVU2530 [2.2.1.1], dvu:DVU1350 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gao:A2G06_13760 [2.2.1.1], gao:A2G06_03585 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gao:A2G06_13760 [2.2.1.1], gao:A2G06_08130 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gbm:Gbem_0280 [2.2.1.1], gbm:Gbem_1258 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gbm:Gbem_0280 [2.2.1.1], gbm:Gbem_3362 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geb:GM18_0317 [2.2.1.1], geb:GM18_1116 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geb:GM18_0317 [2.2.1.1], geb:GM18_3441 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gem:GM21_0265 [2.2.1.1], gem:GM21_0883 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gem:GM21_0265 [2.2.1.1], gem:GM21_3025 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gem:GM21_3397 [2.2.1.1], gem:GM21_0883 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gem:GM21_3397 [2.2.1.1], gem:GM21_3025 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geo:Geob_0666 [2.2.1.1], geo:Geob_2629 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geo:Geob_0666 [2.2.1.1], geo:Geob_3664 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geo:Geob_1002 [2.2.1.1], geo:Geob_3664 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geo:Geob_1368 [2.2.1.1], geo:Geob_2629 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(geo:Geob_1368 [2.2.1.1], geo:Geob_3664 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(glo:Glov_0796 [2.2.1.1], glo:Glov_2182 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(glo:Glov_0796 [2.2.1.1], glo:Glov_2235 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gme:Gmet_0552 [2.2.1.1], gme:Gmet_1934 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gme:Gmet_0552 [2.2.1.1], gme:Gmet_2822 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gpi:GPICK_02900 [2.2.1.1], gpi:GPICK_04075 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gpi:GPICK_02900 [2.2.1.1], gpi:GPICK_07275 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gsb:GSUB_02815 [2.2.1.1], gsb:GSUB_06155 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gsu:GSU2918 [2.2.1.1], gsu:GSU0686 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gsu:GSU2918 [2.2.1.1], gsu:GSU1764 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gur:Gura_0492 [2.2.1.1], gur:Gura_1018 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(gur:Gura_0492 [2.2.1.1], gur:Gura_2175 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(hmr:Hipma_0012 [2.2.1.1], hmr:Hipma_0985 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(msd:MYSTI_06833 [2.2.1.1], msd:MYSTI_05093 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(mym:A176_003863 [2.2.1.1], mym:A176_002255 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(pace:A6070_13365 [2.2.1.1], pace:A6070_06815 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(pca:Pcar_2719 [2.2.1.1], pca:Pcar_1667 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(pef:A7E78_11150 [2.2.1.1], pef:A7E78_02750 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(sfu:Sfum_1302 [2.2.1.1], sfu:Sfum_1418 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(sur:STAUR_0056 [2.2.1.1], sur:STAUR_5425 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(vin:AKJ08_0731 [2.2.1.1], vin:AKJ08_1262 [2.2.1.7]) => [1.2.1.12, 2.2.1.2, 2.7.9.2, 5.1.3.1]
(dao:Desac_2517 [4.1.3.-], dao:Desac_2262 [5.3.1.16]) => [2.4.2.-]
(des:DSOUD_3191 [4.1.3.-], des:DSOUD_3192 [5.3.1.16]) => [2.4.2.-]
(deu:DBW_3264 [4.1.3.-], deu:DBW_3265 [5.3.1.16]) => [2.4.2.-]
(dml:Dmul_22810 [4.1.3.-], dml:Dmul_24040 [5.3.1.16]) => [2.4.2.-]
(gao:A2G06_12745 [4.1.3.-], gao:A2G06_14565 [5.3.1.16]) => [2.4.2.-]
(gao:A2G06_14560 [4.1.3.-], gao:A2G06_14565 [5.3.1.16]) => [2.4.2.-]
(gbm:Gbem_3700 [4.1.3.-], gbm:Gbem_3701 [5.3.1.16]) => [2.4.2.-]
(geb:GM18_4149 [4.1.3.-], geb:GM18_4150 [5.3.1.16]) => [2.4.2.-]
(gem:GM21_3795 [4.1.3.-], gem:GM21_3796 [5.3.1.16]) => [2.4.2.-]
(geo:Geob_0693 [4.1.3.-], geo:Geob_0692 [5.3.1.16]) => [2.4.2.-]
(glo:Glov_1018 [4.1.3.-], glo:Glov_1019 [5.3.1.16]) => [2.4.2.-]
(gme:Gmet_0389 [4.1.3.-], gme:Gmet_0388 [5.3.1.16]) => [2.4.2.-]
(gpi:GPICK_02240 [4.1.3.-], gpi:GPICK_02235 [5.3.1.16]) => [2.4.2.-]
(gsb:GSUB_02545 [4.1.3.-], gsb:GSUB_02540 [5.3.1.16]) => [2.4.2.-]
(gsb:GSUB_08845 [4.1.3.-], gsb:GSUB_02540 [5.3.1.16]) => [2.4.2.-]
(gsu:GSU3095 [4.1.3.-], gsu:GSU3096 [5.3.1.16]) => [2.4.2.-]
(gur:Gura_4053 [4.1.3.-], gur:Gura_4054 [5.3.1.16]) => [2.4.2.-]
(hmr:Hipma_0215 [4.1.3.-], hmr:Hipma_1516 [5.3.1.16]) => [2.4.2.-]
(hoh:Hoch_6609 [4.1.3.-], hoh:Hoch_0379 [5.3.1.16]) => [2.4.2.-]
(llu:AKJ09_08130 [4.1.3.-], llu:AKJ09_08203 [5.3.1.16]) => [2.4.2.-]
(pace:A6070_12850 [4.1.3.-], pace:A6070_13200 [5.3.1.16]) => [2.4.2.-]
(pace:A6070_13195 [4.1.3.-], pace:A6070_13200 [5.3.1.16]) => [2.4.2.-]
(pca:Pcar_2684 [4.1.3.-], pca:Pcar_2685 [5.3.1.16]) => [2.4.2.-]
(pef:A7E78_08220 [4.1.3.-], pef:A7E78_08225 [5.3.1.16]) => [2.4.2.-]
(ppd:Ppro_3055 [4.1.3.-], ppd:Ppro_3056 [5.3.1.16]) => [2.4.2.-]
(samy:DB32_003842 [4.1.3.-], samy:DB32_003841 [5.3.1.16]) => [2.4.2.-]
(sat:SYN_01451 [4.1.3.-], sat:SYN_00761 [5.3.1.16]) => [2.4.2.-]
(scl:sce5886 [4.1.3.-], scl:sce2813 [5.3.1.16]) => [2.4.2.-]
(sfu:Sfum_0483 [4.1.3.-], sfu:Sfum_1215 [5.3.1.16]) => [2.4.2.-]
(sfu:Sfum_3692 [4.1.3.-], sfu:Sfum_1215 [5.3.1.16]) => [2.4.2.-]
Neofunctionalisations contributing to target-flexibility: 637
(dbr:Deba_2503, dbr:Deba_2748) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gpi:GPICK_07650, gpi:GPICK_10380) => {1.1.1.22, 2.7.7.9}
(dps:DP0045, dps:DP2716) => {1.1.1.22}
(geb:GM18_4171, geb:GM18_0750) => {1.1.1.22, 2.7.7.9}
(dti:Desti_2341, dti:Desti_2003) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_22470, dhy:DESAM_20338) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(glo:Glov_3365, glo:Glov_0479) => {1.1.1.22, 2.7.7.9}
(gao:A2G06_13760, gao:A2G06_03585) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(mxa:MXAN_4684, mxa:MXAN_4731) => {2.1.3.2}
(dbr:Deba_2140, dbr:Deba_2773) => {1.1.1.22, 2.7.7.9}
(dti:Desti_0219, dti:Desti_1457) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpi:BN4_12584, dpi:BN4_12643) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(deu:DBW_3264, deu:DBW_3265) => {2.4.2.-}
(pca:Pcar_1804, pca:Pcar_1467) => {1.1.1.22, 2.7.7.9}
(dma:DMR_28600, dma:DMR_00110) => {1.1.1.22}
(gur:Gura_4053, gur:Gura_4054) => {2.4.2.-}
(gem:GM21_0265, gem:GM21_0883) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(gpi:GPICK_02900, gpi:GPICK_07275) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dal:Dalk_1693, dal:Dalk_1699) => {1.1.1.22, 2.7.7.9}
(mbd:MEBOL_004563, mbd:MEBOL_004893) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(pca:Pcar_1807, pca:Pcar_1467) => {1.1.1.22, 2.7.7.9}
(dbr:Deba_3187, dbr:Deba_0581) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(cfus:CYFUS_002855, cfus:CYFUS_004967) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dto:TOL2_C21920, dto:TOL2_C24560) => {2.1.3.2}
(gur:Gura_0492, gur:Gura_2175) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dps:DPPB37, dps:DP0555) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_20564, dhy:DESAM_20933) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(doa:AXF15_02215, doa:AXF15_03465) => {1.1.1.22}
(sur:STAUR_7055, sur:STAUR_3279) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dml:Dmul_21830, dml:Dmul_24630) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(glo:Glov_2085, glo:Glov_3149) => {2.1.3.2}
(dps:DP0106, dps:DP0437) => {2.1.3.2}
(age:AA314_04350, age:AA314_05003) => {1.1.1.22, 2.7.7.9}
(mmas:MYMAC_004501, mmas:MYMAC_003449) => {1.1.1.22, 2.7.7.9}
(cfus:CYFUS_002855, cfus:CYFUS_002381) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(llu:AKJ09_07370, llu:AKJ09_00976) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sat:SYN_02661, sat:SYN_01112) => {1.1.1.22, 2.7.7.9}
(dgg:DGI_0581, dgg:DGI_2476) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pace:A6070_07185, pace:A6070_03240) => {2.1.3.2}
(ccro:CMC5_012520, ccro:CMC5_049960) => {1.1.1.22, 2.7.7.9}
(dal:Dalk_2329, dal:Dalk_4640) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpi:BN4_11977, dpi:BN4_10196) => {2.1.3.2}
(mym:A176_002210, mym:A176_002161) => {2.1.3.2}
(mxa:MXAN_3506, mxa:MXAN_3987) => {1.1.1.22}
(pca:Pcar_2684, pca:Pcar_2685) => {2.4.2.-}
(dpr:Despr_1050, dpr:Despr_3168) => {2.1.3.2, 2.3.3.1}
(dto:TOL2_C05220, dto:TOL2_C27090) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sat:SYN_01130, sat:SYN_01125) => {1.1.1.22, 2.7.7.9}
(scl:sce7927, scl:sce8012) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pca:Pcar_2719, pca:Pcar_1667) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dbr:Deba_2288, dbr:Deba_2140) => {1.1.1.22, 2.7.7.9}
(geb:GM18_1720, geb:GM18_4095) => {2.1.3.2}
(ank:AnaeK_1925, ank:AnaeK_0232) => {1.1.1.22, 2.7.7.9}
(das:Daes_0665, das:Daes_2972) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dgg:DGI_1737, dgg:DGI_2476) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dde:Dde_3691, dde:Dde_0033) => {1.1.1.22, 2.7.7.9}
(dal:Dalk_0475, dal:Dalk_1693) => {1.1.1.22, 2.7.7.9}
(sfu:Sfum_0007, sfu:Sfum_2580) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(ank:AnaeK_4338, ank:AnaeK_4069) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(msd:MYSTI_02961, msd:MYSTI_04815) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mbd:MEBOL_006837, mbd:MEBOL_007627) => {1.1.1.22, 2.7.7.9}
(geo:Geob_3264, geo:Geob_1123) => {2.1.3.2}
(pace:A6070_10090, pace:A6070_04975) => {2.1.3.2}
(sat:SYN_01223, sat:SYN_02643) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(geb:GM18_0958, geb:GM18_1602) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2345, dti:Desti_2797) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dal:Dalk_2756, dal:Dalk_1784) => {2.1.3.2}
(dti:Desti_2348, dti:Desti_3164) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(llu:AKJ09_08130, llu:AKJ09_08203) => {2.4.2.-}
(dti:Desti_0219, dti:Desti_1808) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dao:Desac_0009, dao:Desac_2478) => {2.1.3.2}
(gur:Gura_0492, gur:Gura_1018) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dhy:DESAM_20710, dhy:DESAM_22412) => {2.1.3.2}
(dpr:Despr_0555, dpr:Despr_2467) => {1.1.1.22}
(gme:Gmet_2340, gme:Gmet_2229) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_0092, dsa:Desal_0743) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dfi:AXF13_13965, dfi:AXF13_05800) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dsf:UWK_00793, dsf:UWK_00683) => {2.1.3.2}
(das:Daes_0687, das:Daes_2857) => {2.1.3.2, 2.3.3.1}
(dpr:Despr_2776, dpr:Despr_0918) => {2.1.3.2}
(gme:Gmet_2473, gme:Gmet_2330) => {1.1.1.22}
(sur:STAUR_7055, sur:STAUR_2302) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ank:AnaeK_2705, ank:AnaeK_1224) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gem:GM21_3397, gem:GM21_3025) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(gpi:GPICK_10370, gpi:GPICK_10380) => {1.1.1.22, 2.7.7.9}
(dpi:BN4_12384, dpi:BN4_12643) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dbr:Deba_2503, dbr:Deba_1780) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dvu:DVU2969, dvu:DVU3119) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dto:TOL2_C35290, dto:TOL2_C12360) => {1.1.1.22, 2.7.7.9}
(sfu:Sfum_2264, sfu:Sfum_0179) => {1.1.1.22}
(mxa:MXAN_1103, mxa:MXAN_1386) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(msd:MYSTI_02961, msd:MYSTI_01751) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pef:A7E78_00350, pef:A7E78_03875) => {1.1.1.22}
(cfus:CYFUS_001210, cfus:CYFUS_002381) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ccx:COCOR_04815, ccx:COCOR_04535) => {1.1.1.22, 2.7.7.9}
(dsa:Desal_0558, dsa:Desal_0740) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(drt:Dret_1409, drt:Dret_1384) => {2.6.1.16}
(cfus:CYFUS_006116, cfus:CYFUS_003523) => {2.1.3.2}
(cfus:CYFUS_006014, cfus:CYFUS_005495) => {1.1.1.22}
(scl:sce5886, scl:sce2813) => {2.4.2.-}
(samy:DB32_004322, samy:DB32_006581) => {1.1.1.22, 2.7.7.9}
(dej:AWY79_00595, dej:AWY79_17820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dao:Desac_2544, dao:Desac_2541) => {1.1.1.22, 2.7.7.9}
(dbr:Deba_0585, dbr:Deba_0581) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_0219, dti:Desti_2003) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2345, dti:Desti_0901) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mmas:MYMAC_003448, mmas:MYMAC_003449) => {1.1.1.22, 2.7.7.9}
(gsu:GSU3095, gsu:GSU3096) => {2.4.2.-}
(llu:AKJ09_00381, llu:AKJ09_09399) => {1.1.1.22, 2.7.7.9}
(lip:LI1066, lip:LI0466) => {1.1.1.22, 2.7.7.9}
(llu:AKJ09_05314, llu:AKJ09_09399) => {1.1.1.22, 2.7.7.9}
(gbm:Gbem_0280, gbm:Gbem_1258) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dsf:UWK_03057, dsf:UWK_03000) => {6.3.2.6}
(dpg:DESPIGER_1297, dpg:DESPIGER_0283) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2341, dti:Desti_4907) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(hmr:Hipma_0431, hmr:Hipma_0341) => {2.1.3.2}
(dgg:DGI_1348, dgg:DGI_2795) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(mym:A176_003408, mym:A176_003407) => {1.1.1.22, 2.7.7.9}
(dde:Dde_2182, dde:Dde_0033) => {1.1.1.22}
(mym:A176_002284, mym:A176_003407) => {1.1.1.22, 2.7.7.9}
(dbr:Deba_2288, dbr:Deba_2773) => {1.1.1.22}
(geo:Geob_2661, geo:Geob_2094) => {2.1.3.2}
(msd:MYSTI_05139, msd:MYSTI_05188) => {2.1.3.2}
(gem:GM21_3795, gem:GM21_3796) => {2.4.2.-}
(afw:Anae109_1901, afw:Anae109_4196) => {1.1.1.22, 2.7.7.9}
(das:Daes_1318, das:Daes_3345) => {1.1.1.22}
(dat:HRM2_11950, dat:HRM2_47820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2345, dti:Desti_0353) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dvu:DVU1360, dvu:DVU3356) => {1.1.1.22, 2.7.7.9}
(dde:Dde_2182, dde:Dde_3691) => {1.1.1.22, 2.7.7.9}
(dgg:DGI_4014, dgg:DGI_0864) => {1.1.1.22, 2.7.7.9}
(mfu:LILAB_31010, mfu:LILAB_28080) => {1.1.1.22}
(vin:AKJ08_0051, vin:AKJ08_2528) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(pca:Pcar_1615, pca:Pcar_2415) => {2.1.3.2}
(gbm:Gbem_3700, gbm:Gbem_3701) => {2.4.2.-}
(dgg:DGI_0026, dgg:DGI_0864) => {1.1.1.22, 2.7.7.9}
(afw:Anae109_3170, afw:Anae109_1212) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mrm:A7982_09160, mrm:A7982_02481) => {1.1.1.22, 2.7.7.9}
(dhy:DESAM_21837, dhy:DESAM_20726) => {1.1.1.22, 2.7.7.9}
(pprf:DPRO_2174, pprf:DPRO_1432) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dol:Dole_1010, dol:Dole_2324) => {1.1.1.22}
(gbm:Gbem_2903, gbm:Gbem_0836) => {2.1.3.2}
(pace:A6070_13365, pace:A6070_06815) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(ank:AnaeK_4425, ank:AnaeK_1925) => {1.1.1.22, 2.7.7.9}
(mxa:MXAN_1103, mxa:MXAN_0501) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(lip:LI0466, lip:LI0580) => {1.1.1.22, 2.7.7.9}
(age:AA314_05002, age:AA314_05840) => {1.1.1.22}
(ppd:Ppro_2098, ppd:Ppro_2973) => {1.1.1.22, 2.7.7.9}
(dto:TOL2_C05220, dto:TOL2_C37120) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(afw:Anae109_4443, afw:Anae109_1901) => {1.1.1.22, 2.7.7.9}
(mbd:MEBOL_004362, mbd:MEBOL_008059) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2345, dti:Desti_1457) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sur:STAUR_3549, sur:STAUR_4028) => {1.1.1.22, 2.7.7.9}
(des:DSOUD_1879, des:DSOUD_0923) => {2.1.3.2}
(drt:Dret_0014, drt:Dret_2234) => {2.1.3.2}
(ade:Adeh_4288, ade:Adeh_1954) => {1.1.1.22, 2.7.7.9}
(deu:DBW_3054, deu:DBW_2425) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dpg:DESPIGER_0323, dpg:DESPIGER_1250) => {1.1.1.22, 2.7.7.9}
(dti:Desti_4164, dti:Desti_1808) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gsu:GSU2918, gsu:GSU1764) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dti:Desti_4164, dti:Desti_4907) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(das:Daes_0235, das:Daes_1396) => {2.1.3.2}
(pace:A6070_13195, pace:A6070_13200) => {2.4.2.-}
(ade:Adeh_1955, ade:Adeh_0221) => {1.1.1.22}
(dol:Dole_1130, dol:Dole_1662) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(geb:GM18_3424, geb:GM18_4171) => {1.1.1.22, 2.7.7.9}
(dao:Desac_2541, dao:Desac_0239) => {1.1.1.22, 2.7.7.9}
(dat:HRM2_47210, dat:HRM2_47820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_20574, dhy:DESAM_10054) => {2.1.3.2}
(dml:Dmul_07490, dml:Dmul_09580) => {1.1.1.22}
(sat:SYN_01451, sat:SYN_00761) => {2.4.2.-}
(mrm:A7982_09160, mrm:A7982_05402) => {1.1.1.22, 2.7.7.9}
(ppd:Ppro_2329, ppd:Ppro_3014) => {2.1.3.2}
(llu:AKJ09_07370, llu:AKJ09_05466) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dto:TOL2_C05220, dto:TOL2_C27260) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gur:Gura_1685, gur:Gura_2598) => {1.1.1.22, 2.7.7.9}
(msd:MYSTI_00991, msd:MYSTI_04815) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(msd:MYSTI_00991, msd:MYSTI_01655) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(samy:DB32_004322, samy:DB32_004135) => {1.1.1.22}
(gme:Gmet_0389, gme:Gmet_0388) => {2.4.2.-}
(gpi:GPICK_11740, gpi:GPICK_10370) => {1.1.1.22, 2.7.7.9}
(glo:Glov_1658, glo:Glov_3365) => {1.1.1.22, 2.7.7.9}
(ccx:COCOR_04536, ccx:COCOR_04535) => {1.1.1.22, 2.7.7.9}
(lip:LI0379, lip:LI0580) => {1.1.1.22, 2.7.7.9}
(dti:Desti_2740, dti:Desti_2739) => {1.1.1.22, 2.7.7.9}
(dav:DESACE_00060, dav:DESACE_03180) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(doa:AXF15_00335, doa:AXF15_04820) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(llu:AKJ09_01495, llu:AKJ09_05314) => {1.1.1.22, 2.7.7.9}
(sfu:Sfum_2090, sfu:Sfum_0062) => {2.1.3.2}
(des:DSOUD_0657, des:DSOUD_2394) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(mrm:A7982_08337, mrm:A7982_02766) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sfu:Sfum_0745, sfu:Sfum_0108) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dml:Dmul_24260, dml:Dmul_09580) => {1.1.1.22, 2.7.7.9}
(dml:Dmul_23280, dml:Dmul_09580) => {1.1.1.22, 2.7.7.9}
(dto:TOL2_C05220, dto:TOL2_C27460) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ccx:COCOR_04536, ccx:COCOR_03939) => {1.1.1.22}
(msd:MYSTI_04467, msd:MYSTI_04466) => {1.1.1.22, 2.7.7.9}
(dml:Dmul_07490, dml:Dmul_23280) => {1.1.1.22, 2.7.7.9}
(hoh:Hoch_6383, hoh:Hoch_2693) => {1.1.1.22, 2.7.7.9}
(dbr:Deba_0585, dbr:Deba_1780) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mfu:LILAB_31010, mfu:LILAB_25510) => {1.1.1.22, 2.7.7.9}
(mrm:A7982_09539, mrm:A7982_07443) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sat:SYN_01130, sat:SYN_01112) => {1.1.1.22}
(gsu:GSU2366, gsu:GSU2241) => {1.1.1.22}
(mbd:MEBOL_000749, mbd:MEBOL_005080) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(das:Daes_1972, das:Daes_0911) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dal:Dalk_2329, dal:Dalk_0853) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_2170, dsa:Desal_3566) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(glo:Glov_1658, glo:Glov_0479) => {1.1.1.22}
(dbr:Deba_0146, dbr:Deba_2773) => {1.1.1.22, 2.7.7.9}
(mbd:MEBOL_006840, mbd:MEBOL_007700) => {2.1.3.2}
(afw:Anae109_1900, afw:Anae109_1901) => {1.1.1.22, 2.7.7.9}
(glo:Glov_1018, glo:Glov_1019) => {2.4.2.-}
(dbr:Deba_2654, dbr:Deba_1882) => {2.1.3.2}
(dti:Desti_0219, dti:Desti_0901) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pca:Pcar_1326, pca:Pcar_1805) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(mbd:MEBOL_007979, mbd:MEBOL_007627) => {1.1.1.22}
(dsa:Desal_1645, dsa:Desal_3834) => {1.1.1.22}
(dat:HRM2_11950, dat:HRM2_47830) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dvu:DVU0748, dvu:DVU1453) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(cfus:CYFUS_006014, cfus:CYFUS_001311) => {1.1.1.22, 2.7.7.9}
(cfus:CYFUS_001311, cfus:CYFUS_005495) => {1.1.1.22, 2.7.7.9}
(dak:DaAHT2_1636, dak:DaAHT2_2371) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(geo:Geob_1002, geo:Geob_3664) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dbr:Deba_0419, dbr:Deba_2773) => {1.1.1.22, 2.7.7.9}
(dvu:DVU1364, dvu:DVU3356) => {1.1.1.22}
(age:AA314_05003, age:AA314_05840) => {1.1.1.22, 2.7.7.9}
(dgg:DGI_1737, dgg:DGI_3014) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ccx:COCOR_06741, ccx:COCOR_04847) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(mrm:A7982_02519, mrm:A7982_07443) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(glo:Glov_0584, glo:Glov_2128) => {2.6.1.16}
(ccx:COCOR_01049, ccx:COCOR_01272) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(hoh:Hoch_6609, hoh:Hoch_0379) => {2.4.2.-}
(age:AA314_01912, age:AA314_03054) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dde:Dde_3207, dde:Dde_1725) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mym:A176_002284, mym:A176_002926) => {1.1.1.22}
(hoh:Hoch_5556, hoh:Hoch_4463) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(hmr:Hipma_0012, hmr:Hipma_0985) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(hoh:Hoch_3186, hoh:Hoch_3975) => {2.1.3.2}
(pprf:DPRO_0163, pprf:DPRO_1945) => {1.1.1.22}
(mmas:MYMAC_003448, mmas:MYMAC_003905) => {1.1.1.22}
(dps:DP2220, dps:DP2716) => {1.1.1.22}
(dti:Desti_2348, dti:Desti_2797) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dgg:DGI_1438, dgg:DGI_3014) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dej:AWY79_10850, dej:AWY79_02820) => {1.1.1.22}
(deu:DBW_1746, deu:DBW_0616) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(msd:MYSTI_01146, msd:MYSTI_01404) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dvu:DVU1364, dvu:DVU1360) => {1.1.1.22, 2.7.7.9}
(afw:Anae109_3317, afw:Anae109_1136) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(gme:Gmet_2473, gme:Gmet_2329) => {1.1.1.22, 2.7.7.9}
(gem:GM21_1322, gem:GM21_3424) => {2.1.3.2}
(hoh:Hoch_6383, hoh:Hoch_1849) => {1.1.1.22, 2.7.7.9}
(daf:Desaf_0304, daf:Desaf_2970) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(geo:Geob_1870, geo:Geob_2923) => {1.1.1.22}
(dml:Dmul_23620, dml:Dmul_08540) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mfu:LILAB_25505, mfu:LILAB_28080) => {1.1.1.22}
(pace:A6070_06120, pace:A6070_06075) => {1.1.1.22, 2.7.7.9}
(dti:Desti_4164, dti:Desti_2003) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_1700, dti:Desti_4705) => {1.4.1.1}
(gsb:GSUB_02815, gsb:GSUB_06155) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(gme:Gmet_1769, gme:Gmet_0205) => {2.1.3.2}
(daf:Desaf_1013, daf:Desaf_2305) => {1.1.1.22, 2.7.7.9}
(ccx:COCOR_00905, ccx:COCOR_01538) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ppd:Ppro_2098, ppd:Ppro_3406) => {1.1.1.22}
(geb:GM18_3424, geb:GM18_3257) => {1.1.1.22, 2.7.7.9}
(dti:Desti_2348, dti:Desti_4907) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sfu:Sfum_3365, sfu:Sfum_3742) => {2.1.3.2}
(dti:Desti_2348, dti:Desti_0901) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_0143, dsa:Desal_2527) => {2.1.3.2}
(dti:Desti_0219, dti:Desti_4337) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sat:SYN_02635, sat:SYN_02640) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(cfus:CYFUS_001210, cfus:CYFUS_007908) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2348, dti:Desti_1808) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(scl:sce4320, scl:sce7407) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dal:Dalk_2329, dal:Dalk_1587) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ade:Adeh_2619, ade:Adeh_1165) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pca:Pcar_2593, pca:Pcar_1467) => {1.1.1.22}
(gao:A2G06_13760, gao:A2G06_08130) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dpi:BN4_10127, dpi:BN4_12214) => {1.1.1.22}
(dti:Desti_1700, dti:Desti_4704) => {1.4.1.1}
(dml:Dmul_21830, dml:Dmul_08540) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(geo:Geob_0666, geo:Geob_3664) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(geo:Geob_1368, geo:Geob_3664) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dti:Desti_1259, dti:Desti_3121) => {2.1.3.2}
(llu:AKJ09_03567, llu:AKJ09_04767) => {2.1.3.2}
(dti:Desti_2348, dti:Desti_0353) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(das:Daes_0202, das:Daes_2972) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mrm:A7982_02519, mrm:A7982_02766) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dba:Dbac_3212, dba:Dbac_2833) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(gur:Gura_3273, gur:Gura_1685) => {1.1.1.22, 2.7.7.9}
(daf:Desaf_2132, daf:Desaf_2305) => {1.1.1.22, 2.7.7.9}
(dhy:DESAM_22057, dhy:DESAM_20726) => {1.1.1.22}
(drt:Dret_2481, drt:Dret_1756) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dbr:Deba_2288, dbr:Deba_0419) => {1.1.1.22, 2.7.7.9}
(mxa:MXAN_4613, mxa:MXAN_3507) => {1.1.1.22, 2.7.7.9}
(llu:AKJ09_01495, llu:AKJ09_09399) => {1.1.1.22}
(ade:Adeh_4288, ade:Adeh_0221) => {1.1.1.22}
(dsf:UWK_03421, dsf:UWK_02513) => {1.1.1.22}
(mbd:MEBOL_007979, mbd:MEBOL_006837) => {1.1.1.22, 2.7.7.9}
(msd:MYSTI_00991, msd:MYSTI_01751) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(llu:AKJ09_10333, llu:AKJ09_04269) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dba:Dbac_0109, dba:Dbac_1611) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(glo:Glov_0796, glo:Glov_2235) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dol:Dole_0514, dol:Dole_2492) => {2.1.3.2}
(dti:Desti_0148, dti:Desti_1492) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dak:DaAHT2_1831, dak:DaAHT2_1792) => {1.1.1.22}
(daf:Desaf_0322, daf:Desaf_2909) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(des:DSOUD_3191, des:DSOUD_3192) => {2.4.2.-}
(cfus:CYFUS_006014, cfus:CYFUS_004500) => {1.1.1.22, 2.7.7.9}
(gem:GM21_0899, gem:GM21_3403) => {1.1.1.22}
(dti:Desti_0219, dti:Desti_4907) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(daf:Desaf_1013, daf:Desaf_2415) => {1.1.1.22}
(dti:Desti_2345, dti:Desti_1808) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(afw:Anae109_2586, afw:Anae109_1212) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dbr:Deba_3187, dbr:Deba_2748) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dgg:DGI_0069, dgg:DGI_0864) => {1.1.1.22}
(dti:Desti_0219, dti:Desti_2797) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pprf:DPRO_1802, pprf:DPRO_1432) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_0473, dti:Desti_2739) => {1.1.1.22}
(dol:Dole_1973, dol:Dole_0337) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpr:Despr_3156, dpr:Despr_0517) => {2.1.3.2}
(cfus:CYFUS_001210, cfus:CYFUS_002221) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(geo:Geob_0284, geo:Geob_2923) => {1.1.1.22, 2.7.7.9}
(das:Daes_0077, das:Daes_0911) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(sur:STAUR_3296, sur:STAUR_3279) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(doa:AXF15_09390, doa:AXF15_11375) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dat:HRM2_23040, dat:HRM2_29750) => {1.1.1.22}
(glo:Glov_1622, glo:Glov_0757) => {2.1.3.2}
(dat:HRM2_47210, dat:HRM2_13680) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpg:DESPIGER_1250, dpg:DESPIGER_1949) => {1.1.1.22, 2.7.7.9}
(geb:GM18_0317, geb:GM18_1116) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dbr:Deba_0585, dbr:Deba_2748) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mfu:LILAB_25505, mfu:LILAB_25510) => {1.1.1.22, 2.7.7.9}
(pprf:DPRO_1333, pprf:DPRO_1945) => {1.1.1.22, 2.7.7.9}
(dbr:Deba_2288, dbr:Deba_0146) => {1.1.1.22, 2.7.7.9}
(hmr:Hipma_0501, hmr:Hipma_0121) => {2.1.3.2}
(mym:A176_003407, mym:A176_002926) => {1.1.1.22, 2.7.7.9}
(dml:Dmul_23620, dml:Dmul_36880) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gem:GM21_3397, gem:GM21_0883) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dto:TOL2_C35290, dto:TOL2_C08210) => {1.1.1.22, 2.7.7.9}
(msd:MYSTI_02961, msd:MYSTI_01655) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dal:Dalk_1064, dal:Dalk_0836) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dat:HRM2_08850, dat:HRM2_47820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_4164, dti:Desti_0353) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(daf:Desaf_0111, daf:Desaf_1564) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(daf:Desaf_2132, daf:Desaf_2415) => {1.1.1.22}
(gao:A2G06_05670, gao:A2G06_06115) => {1.1.1.22}
(dti:Desti_0219, dti:Desti_2479) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ank:AnaeK_1924, ank:AnaeK_1925) => {1.1.1.22, 2.7.7.9}
(gsb:GSUB_09375, gsb:GSUB_02190) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(sat:SYN_01223, sat:SYN_02640) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gsu:GSU2918, gsu:GSU0686) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(ade:Adeh_4206, ade:Adeh_3959) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dhy:DESAM_21612, dhy:DESAM_20933) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dak:DaAHT2_1794, dak:DaAHT2_1792) => {1.1.1.22, 2.7.7.9}
(sat:SYN_02866, sat:SYN_02661) => {1.1.1.22, 2.7.7.9}
(des:DSOUD_1686, des:DSOUD_2288) => {1.1.1.22}
(ank:AnaeK_1316, ank:AnaeK_1137) => {2.1.3.2}
(mxa:MXAN_3506, mxa:MXAN_3507) => {1.1.1.22, 2.7.7.9}
(daf:Desaf_0090, daf:Desaf_2970) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(sur:STAUR_5486, sur:STAUR_5581) => {2.1.3.2}
(dvu:DVU2969, dvu:DVU1453) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dvu:DVU2530, dvu:DVU1350) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dti:Desti_2341, dti:Desti_3164) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(doa:AXF15_03265, doa:AXF15_11375) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_4164, dti:Desti_0901) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpg:DESPIGER_0323, dpg:DESPIGER_1949) => {1.1.1.22}
(mfu:LILAB_25510, mfu:LILAB_28080) => {1.1.1.22, 2.7.7.9}
(dde:Dde_2823, dde:Dde_1725) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ade:Adeh_1618, ade:Adeh_2691) => {2.1.3.2}
(dsa:Desal_2829, dsa:Desal_0743) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mym:A176_003408, mym:A176_002926) => {1.1.1.22}
(llu:AKJ09_01495, llu:AKJ09_00381) => {1.1.1.22, 2.7.7.9}
(gao:A2G06_12745, gao:A2G06_14565) => {2.4.2.-}
(samy:DB32_006581, samy:DB32_004135) => {1.1.1.22, 2.7.7.9}
(daf:Desaf_1251, daf:Desaf_2909) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mrm:A7982_08337, mrm:A7982_07443) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ank:AnaeK_4425, ank:AnaeK_0232) => {1.1.1.22}
(dsa:Desal_1645, dsa:Desal_2033) => {1.1.1.22, 2.7.7.9}
(dol:Dole_1848, dol:Dole_2324) => {1.1.1.22, 2.7.7.9}
(doa:AXF15_09785, doa:AXF15_11375) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gme:Gmet_1357, gme:Gmet_2360) => {2.1.3.2}
(msd:MYSTI_05067, msd:MYSTI_04466) => {1.1.1.22, 2.7.7.9}
(gsb:GSUB_04800, gsb:GSUB_10480) => {2.1.3.2}
(gur:Gura_2196, gur:Gura_3240) => {2.1.3.2}
(dba:Dbac_3166, dba:Dbac_1611) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ade:Adeh_2533, ade:Adeh_1078) => {2.1.3.2}
(dml:Dmul_19320, dml:Dmul_08540) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mym:A176_005864, mym:A176_005616) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(mfu:LILAB_03115, mfu:LILAB_01860) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(sur:STAUR_1671, sur:STAUR_2146) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(mbd:MEBOL_000749, mbd:MEBOL_008059) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mrm:A7982_09539, mrm:A7982_02766) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dal:Dalk_4104, dal:Dalk_1699) => {1.1.1.22, 2.7.7.9}
(dde:Dde_2182, dde:Dde_2187) => {1.1.1.22, 2.7.7.9}
(drt:Dret_0307, drt:Dret_2499) => {1.1.1.22}
(dti:Desti_0219, dti:Desti_0353) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mmas:MYMAC_004575, mmas:MYMAC_004629) => {2.1.3.2}
(sat:SYN_01532, sat:SYN_02156) => {2.1.3.2}
(dml:Dmul_22850, dml:Dmul_18930) => {2.1.3.2}
(sfu:Sfum_1302, sfu:Sfum_1418) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(vin:AKJ08_1417, vin:AKJ08_2627) => {1.1.1.22, 2.7.7.9}
(dto:TOL2_C05220, dto:TOL2_C27650) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(cfus:CYFUS_004500, cfus:CYFUS_005495) => {1.1.1.22, 2.7.7.9}
(gme:Gmet_0552, gme:Gmet_1934) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dml:Dmul_23620, dml:Dmul_24630) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(afw:Anae109_4354, afw:Anae109_0462) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(age:AA314_04350, age:AA314_05840) => {1.1.1.22}
(dds:Ddes_1748, dds:Ddes_1253) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_4164, dti:Desti_2797) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(des:DSOUD_1782, des:DSOUD_0047) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dbr:Deba_3187, dbr:Deba_1780) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dat:HRM2_08850, dat:HRM2_47830) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ank:AnaeK_1924, ank:AnaeK_0232) => {1.1.1.22}
(gpi:GPICK_08380, gpi:GPICK_15365) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dml:Dmul_21830, dml:Dmul_28300) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_3407, dsa:Desal_0178) => {2.1.3.2, 2.3.3.1}
(dhy:DESAM_20863, dhy:DESAM_20155) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(das:Daes_0542, das:Daes_2972) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gme:Gmet_0552, gme:Gmet_2822) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(geo:Geob_0666, geo:Geob_2629) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dto:TOL2_C35290, dto:TOL2_C23400) => {1.1.1.22}
(dej:AWY79_03870, dej:AWY79_13255) => {2.1.3.2}
(dej:AWY79_00980, dej:AWY79_17820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(msd:MYSTI_06833, msd:MYSTI_05093) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(sat:SYN_02635, sat:SYN_03128) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gpi:GPICK_02900, gpi:GPICK_04075) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(mmas:MYMAC_003449, mmas:MYMAC_003905) => {1.1.1.22, 2.7.7.9}
(ccx:COCOR_04535, ccx:COCOR_03939) => {1.1.1.22, 2.7.7.9}
(dao:Desac_0519, dao:Desac_2462) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(ccx:COCOR_05520, ccx:COCOR_02172) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gpi:GPICK_11740, gpi:GPICK_10380) => {1.1.1.22}
(dsa:Desal_2682, dsa:Desal_3834) => {1.1.1.22, 2.7.7.9}
(dgg:DGI_0581, dgg:DGI_3014) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mfu:LILAB_24705, mfu:LILAB_28305) => {2.1.3.2, 2.3.3.1}
(age:AA314_05002, age:AA314_05003) => {1.1.1.22, 2.7.7.9}
(ank:AnaeK_2242, ank:AnaeK_2784) => {2.1.3.2}
(daf:Desaf_1391, daf:Desaf_2909) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2345, dti:Desti_4907) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gpi:GPICK_08745, gpi:GPICK_10520) => {2.1.3.2}
(ccx:COCOR_02713, ccx:COCOR_02664) => {2.1.3.2}
(dsf:UWK_01260, dsf:UWK_03510) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dto:TOL2_C12360, dto:TOL2_C23400) => {1.1.1.22, 2.7.7.9}
(mbd:MEBOL_006836, mbd:MEBOL_006837) => {1.1.1.22, 2.7.7.9}
(dml:Dmul_22810, dml:Dmul_24040) => {2.4.2.-}
(age:AA314_05007, age:AA314_05880) => {2.1.3.2}
(hmr:Hipma_1703, hmr:Hipma_1401) => {1.1.1.22}
(sat:SYN_01223, sat:SYN_03128) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_0574, dsa:Desal_0740) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(cfus:CYFUS_001459, cfus:CYFUS_002029) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dat:HRM2_08850, dat:HRM2_13680) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gpi:GPICK_02240, gpi:GPICK_02235) => {2.4.2.-}
(def:CNY67_14075, def:CNY67_08465) => {2.6.1.16}
(geo:Geob_1368, geo:Geob_2629) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dak:DaAHT2_2315, dak:DaAHT2_2211) => {2.1.3.2}
(dds:Ddes_1950, dds:Ddes_0025) => {1.1.1.22, 2.7.7.9}
(deu:DBW_1942, deu:DBW_0911) => {2.1.3.2}
(dsf:UWK_02797, dsf:UWK_02514) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dat:HRM2_28720, dat:HRM2_13680) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2341, dti:Desti_1457) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(geb:GM18_2790, geb:GM18_0730) => {2.1.3.2}
(dti:Desti_0225, dti:Desti_2739) => {1.1.1.22, 2.7.7.9}
(dat:HRM2_28720, dat:HRM2_47820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_20633, dhy:DESAM_20155) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(samy:DB32_003842, samy:DB32_003841) => {2.4.2.-}
(mfu:LILAB_31365, mfu:LILAB_31605) => {2.1.3.2}
(mxa:MXAN_4613, mxa:MXAN_3987) => {1.1.1.22}
(cfus:CYFUS_004499, cfus:CYFUS_004500) => {1.1.1.22, 2.7.7.9}
(dhy:DESAM_22057, dhy:DESAM_20916) => {1.1.1.22, 2.7.7.9}
(dml:Dmul_19320, dml:Dmul_36880) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpg:DESPIGER_1297, dpg:DESPIGER_1913) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ppd:Ppro_2529, ppd:Ppro_3172) => {2.1.3.2}
(dol:Dole_1010, dol:Dole_1848) => {1.1.1.22, 2.7.7.9}
(dfi:AXF13_10380, dfi:AXF13_05975) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(glo:Glov_0796, glo:Glov_2182) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(cfus:CYFUS_004504, cfus:CYFUS_005533) => {2.1.3.2}
(geb:GM18_4149, geb:GM18_4150) => {2.4.2.-}
(llu:AKJ09_01495, llu:AKJ09_02991) => {1.1.1.22, 2.7.7.9}
(age:AA314_04258, age:AA314_04205) => {2.1.3.2}
(dti:Desti_0219, dti:Desti_3164) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gao:A2G06_14560, gao:A2G06_14565) => {2.4.2.-}
(llu:AKJ09_06149, llu:AKJ09_05466) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2348, dti:Desti_2003) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_20916, dhy:DESAM_20726) => {1.1.1.22, 2.7.7.9}
(dba:Dbac_1478, dba:Dbac_1611) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_0219, dti:Desti_1366) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mym:A176_006029, mym:A176_005454) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pprf:DPRO_1502, pprf:DPRO_1432) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mym:A176_003863, mym:A176_002255) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(gpi:GPICK_09850, gpi:GPICK_01450) => {2.1.3.2}
(age:AA314_02310, age:AA314_02714) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dde:Dde_2648, dde:Dde_0626) => {2.6.1.16}
(gur:Gura_3273, gur:Gura_2598) => {1.1.1.22}
(ade:Adeh_2533, ade:Adeh_2728) => {2.1.3.2}
(gpi:GPICK_06970, gpi:GPICK_00285) => {2.6.1.16}
(gsb:GSUB_08845, gsb:GSUB_02540) => {2.4.2.-}
(dhy:DESAM_20633, dhy:DESAM_20933) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gsu:GSU1463, gsu:GSU2271) => {2.1.3.2}
(msd:MYSTI_06468, msd:MYSTI_01751) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mxa:MXAN_0949, mxa:MXAN_1528) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dat:HRM2_11950, dat:HRM2_13680) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_4164, dti:Desti_2479) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dps:DP2097, dps:DP0555) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_4164, dti:Desti_1457) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dao:Desac_2544, dao:Desac_0239) => {1.1.1.22}
(sur:STAUR_0056, sur:STAUR_5425) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dat:HRM2_47210, dat:HRM2_47830) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dol:Dole_0670, dol:Dole_2847) => {2.1.3.2}
(dml:Dmul_19320, dml:Dmul_24630) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ppd:Ppro_3484, ppd:Ppro_1725) => {2.6.1.16}
(mbd:MEBOL_008079, mbd:MEBOL_006001) => {2.1.3.2}
(lip:LI1066, lip:LI0580) => {1.1.1.22}
(mym:A176_006029, mym:A176_007563) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dba:Dbac_2884, dba:Dbac_3039) => {1.1.1.22}
(ade:Adeh_1954, ade:Adeh_0221) => {1.1.1.22, 2.7.7.9}
(sfu:Sfum_3692, sfu:Sfum_1215) => {2.4.2.-}
(dto:TOL2_C08210, dto:TOL2_C23400) => {1.1.1.22, 2.7.7.9}
(sat:SYN_01130, sat:SYN_02661) => {1.1.1.22, 2.7.7.9}
(pef:A7E78_05895, pef:A7E78_01330) => {2.1.3.2}
(dma:DMR_39860, dma:DMR_44510) => {2.6.1.16}
(dti:Desti_2345, dti:Desti_2003) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dal:Dalk_3370, dal:Dalk_0935) => {2.1.3.2, 2.3.3.1}
(dsf:UWK_01152, dsf:UWK_03535) => {2.1.3.2}
(dml:Dmul_19320, dml:Dmul_28300) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pca:Pcar_1326, pca:Pcar_2933) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dbr:Deba_0994, dbr:Deba_2773) => {1.1.1.22, 2.7.7.9}
(dsa:Desal_2033, dsa:Desal_3834) => {1.1.1.22, 2.7.7.9}
(hmr:Hipma_1025, hmr:Hipma_1045) => {2.1.3.2, 2.3.3.1}
(afw:Anae109_1900, afw:Anae109_4196) => {1.1.1.22}
(mmas:MYMAC_004501, mmas:MYMAC_003905) => {1.1.1.22}
(dti:Desti_2341, dti:Desti_2479) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(vin:AKJ08_1411, vin:AKJ08_0163) => {2.1.3.2}
(dto:TOL2_C35290, dto:TOL2_C35200) => {1.1.1.22, 2.7.7.9}
(drt:Dret_0818, drt:Dret_1756) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dol:Dole_1975, dol:Dole_0337) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gem:GM21_0265, gem:GM21_3025) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dat:HRM2_27780, dat:HRM2_27560) => {2.1.3.2}
(dal:Dalk_2329, dal:Dalk_3333) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_0219, dti:Desti_3693) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dpb:BABL1_gene_330, dpb:BABL1_gene_705) => {2.1.3.2}
(sur:STAUR_3296, sur:STAUR_2302) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pef:A7E78_11150, pef:A7E78_02750) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(sur:STAUR_4027, sur:STAUR_4028) => {1.1.1.22, 2.7.7.9}
(gao:A2G06_09675, gao:A2G06_05980) => {2.1.3.2}
(drt:Dret_2132, drt:Dret_1756) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(daf:Desaf_1251, daf:Desaf_1333) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_20564, dhy:DESAM_20155) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ccro:CMC5_012520, ccro:CMC5_019230) => {1.1.1.22, 2.7.7.9}
(sfu:Sfum_0483, sfu:Sfum_1215) => {2.4.2.-}
(sat:SYN_02866, sat:SYN_01112) => {1.1.1.22}
(dhy:DESAM_20863, dhy:DESAM_20933) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pca:Pcar_1040, pca:Pcar_1248) => {2.1.3.2}
(afw:Anae109_1329, afw:Anae109_1117) => {2.1.3.2}
(des:DSOUD_1475, des:DSOUD_1660) => {2.1.3.2}
(dvu:DVU2250, dvu:DVU1453) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dto:TOL2_C05220, dto:TOL2_C26900) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2345, dti:Desti_3164) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dgg:DGI_1438, dgg:DGI_2476) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(vin:AKJ08_0731, vin:AKJ08_1262) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(afw:Anae109_4443, afw:Anae109_4196) => {1.1.1.22}
(gem:GM21_2312, gem:GM21_3742) => {2.1.3.2}
(dml:Dmul_23620, dml:Dmul_28300) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dbr:Deba_2122, dbr:Deba_0581) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gao:A2G06_10540, gao:A2G06_15675) => {2.1.3.2}
(def:CNY67_03710, def:CNY67_08360) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(cfus:CYFUS_001210, cfus:CYFUS_004967) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dao:Desac_2517, dao:Desac_2262) => {2.4.2.-}
(pca:Pcar_2593, pca:Pcar_1807) => {1.1.1.22, 2.7.7.9}
(dml:Dmul_07490, dml:Dmul_24260) => {1.1.1.22, 2.7.7.9}
(dti:Desti_4164, dti:Desti_3164) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pef:A7E78_01045, pef:A7E78_03875) => {1.1.1.22, 2.7.7.9}
(doa:AXF15_05040, doa:AXF15_02145) => {2.1.3.2}
(dti:Desti_2341, dti:Desti_0901) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(mxa:MXAN_3507, mxa:MXAN_3987) => {1.1.1.22, 2.7.7.9}
(gsu:GSU1271, gsu:GSU0152) => {2.1.3.2}
(ccx:COCOR_04815, ccx:COCOR_03939) => {1.1.1.22}
(dpi:BN4_12054, dpi:BN4_12643) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dbr:Deba_2122, dbr:Deba_2748) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2348, dti:Desti_1457) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pef:A7E78_02600, pef:A7E78_11715) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dbr:Deba_2503, dbr:Deba_0581) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dti:Desti_2348, dti:Desti_2479) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(hmr:Hipma_0215, hmr:Hipma_1516) => {2.4.2.-}
(dhy:DESAM_21173, dhy:DESAM_20160) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(dto:TOL2_C31520, dto:TOL2_C37120) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_0017, dsa:Desal_1784) => {2.1.3.2}
(gbm:Gbem_3346, gbm:Gbem_0861) => {1.1.1.22}
(gsb:GSUB_02545, gsb:GSUB_02540) => {2.4.2.-}
(gur:Gura_1856, gur:Gura_0227) => {2.1.3.2}
(geb:GM18_0317, geb:GM18_3441) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
(hoh:Hoch_5324, hoh:Hoch_0394) => {2.1.3.2}
(dbr:Deba_3125, dbr:Deba_0292) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(msd:MYSTI_04466, msd:MYSTI_03928) => {1.1.1.22, 2.7.7.9}
(lip:LIC023, lip:LI0580) => {1.1.1.22, 2.7.7.9}
(dhy:DESAM_22216, dhy:DESAM_20726) => {1.1.1.22, 2.7.7.9}
(ppd:Ppro_3055, ppd:Ppro_3056) => {2.4.2.-}
(dto:TOL2_C35200, dto:TOL2_C23400) => {1.1.1.22, 2.7.7.9}
(mmas:MYMAC_003338, mmas:MYMAC_003947) => {2.1.3.2, 2.3.3.1}
(msd:MYSTI_05067, msd:MYSTI_03928) => {1.1.1.22}
(deu:DBW_2313, deu:DBW_2132) => {1.1.1.22, 2.7.7.9}
(pef:A7E78_02985, pef:A7E78_13795) => {2.1.3.2}
(drt:Dret_0321, drt:Dret_0143) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dhy:DESAM_21612, dhy:DESAM_20155) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(doa:AXF15_02215, doa:AXF15_08610) => {1.1.1.22, 2.7.7.9}
(dak:DaAHT2_1791, dak:DaAHT2_1792) => {1.1.1.22}
(age:AA314_04350, age:AA314_04970) => {1.1.1.22, 2.7.7.9}
(dti:Desti_2341, dti:Desti_2797) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dat:HRM2_28720, dat:HRM2_47830) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(sfu:Sfum_3454, sfu:Sfum_0108) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pef:A7E78_08220, pef:A7E78_08225) => {2.4.2.-}
(gme:Gmet_2340, gme:Gmet_1613) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dal:Dalk_0475, dal:Dalk_4104) => {1.1.1.22, 2.7.7.9}
(pace:A6070_05385, pace:A6070_01880) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(sat:SYN_02635, sat:SYN_02643) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ade:Adeh_1955, ade:Adeh_1954) => {1.1.1.22, 2.7.7.9}
(mmas:MYMAC_001135, mmas:MYMAC_001379) => {2.7.6.1, 2.6.1.16, 2.2.1.2, 2.2.1.1}
(dti:Desti_2345, dti:Desti_2479) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(geb:GM18_3424, geb:GM18_0750) => {1.1.1.22}
(llu:AKJ09_02991, llu:AKJ09_09399) => {1.1.1.22, 2.7.7.9}
(gsb:GSUB_08195, gsb:GSUB_15430) => {1.1.1.22}
(geo:Geob_0693, geo:Geob_0692) => {2.4.2.-}
(gsb:GSUB_09180, gsb:GSUB_03040) => {2.1.3.2}
(afw:Anae109_2193, afw:Anae109_2685) => {2.1.3.2}
(mrm:A7982_02519, mrm:A7982_09042) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gbm:Gbem_1896, gbm:Gbem_3637) => {2.1.3.2}
(dej:AWY79_01195, dej:AWY79_17820) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dhy:DESAM_22057, dhy:DESAM_22216) => {1.1.1.22, 2.7.7.9}
(dbr:Deba_2122, dbr:Deba_1780) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(samy:DB32_007268, samy:DB32_002852) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(ccx:COCOR_00905, ccx:COCOR_02172) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pace:A6070_12850, pace:A6070_13200) => {2.4.2.-}
(samy:DB32_001023, samy:DB32_005406) => {2.1.3.2}
(dde:Dde_2317, dde:Dde_1725) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(dsa:Desal_0152, dsa:Desal_0743) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(pef:A7E78_01430, pef:A7E78_03875) => {1.1.1.22}
(mbd:MEBOL_004362, mbd:MEBOL_005080) => {2.3.1.180, 6.4.1.2, 2.3.3.1}
(gbm:Gbem_0280, gbm:Gbem_3362) => {2.2.1.2, 5.1.3.1, 2.7.1.40, 2.7.6.1, 2.2.1.1, 5.3.1.1, 2.6.1.16, 1.2.1.12, 2.7.9.2, 1.4.1.1}
Conclusion
----------
Many neofunctionalisation events contribute to the redundancy of their function changes' EC numbers. There are more contributing neofunctionalisations than contributing "neofunctionalised" ECs, which is to be expected,
because usually several neofunctionalisations are responsible for the same function change.
Also, many more neofunctionalisations contribute to flexibility than robustness, which is to be expected, too, because flexibility is by far the weaker (i.e. more common) type of redundancy.
"""
from FEV_KEGG.KEGG.File import cache
from FEV_KEGG.Evolution.Clade import Clade
from FEV_KEGG.Statistics import Percent
from FEV_KEGG.Robustness.Topology.Redundancy import RedundancyType, Redundancy, RedundancyContribution
@cache(folder_path='experiments', file_name='deltaproteobacteria_clade')
def getCladeA():
clade = Clade('Deltaproteobacteria')
# pre-fetch collective metabolism into memory
clade.collectiveMetabolism(excludeMultifunctionalEnzymes=True)
# pre-fetch collective enzyme metabolism into memory
clade.collectiveMetabolismEnzymes(excludeMultifunctionalEnzymes=True)
return clade
if __name__ == '__main__':
output = ['']
#- get clade
cladeA = getCladeA()
majorityPercentageCoreMetabolism = 80
majorityPercentageNeofunctionalisation = 0
output.append( 'core metabolism majority: ' + str(majorityPercentageCoreMetabolism) + '%' )
output.append( 'neofunctionalisation majority: ' + str(majorityPercentageNeofunctionalisation) + '% (this means that gene duplication within a single organism is enough)' )
output.append('')
output.append(', '.join(cladeA.ncbiNames) + ':')
output.append('')
#- get core metabolism
cladeAEcGraph = cladeA.coreMetabolism(majorityPercentageCoreMetabolism)
cladeAEcCount = len(cladeAEcGraph.getECs())
output.append( 'core metabolism ECs: ' + str(cladeAEcCount) )
output.append('')
#- calculate "neofunctionalised" ECs
cladeANeofunctionalisedMetabolismSet = cladeA.neofunctionalisedECs(majorityPercentageCoreMetabolism, majorityPercentageNeofunctionalisation).getECs()
cladeANeofunctionalisationsForFunctionChange = cladeA.neofunctionalisationsForFunctionChange(majorityPercentageCoreMetabolism, majorityPercentageNeofunctionalisation)
#- calculate redundancy
cladeARedundancy = Redundancy(cladeAEcGraph)
cladeARedundancyContribution = RedundancyContribution(cladeARedundancy, cladeANeofunctionalisedMetabolismSet)
cladeARobustnessContributedECsForContributingNeofunctionalisedEC = cladeARedundancyContribution.getContributedKeysForSpecial(RedundancyType.ROBUSTNESS)
cladeARobustnessContributingNeofunctionalisedECs = set(cladeARobustnessContributedECsForContributingNeofunctionalisedEC.keys())
cladeAFlexibilityContributedECsForContributingNeofunctionalisedEC = cladeARedundancyContribution.getContributedKeysForSpecial(RedundancyType.TARGET_FLEXIBILITY)
cladeAFlexibilityContributingNeofunctionalisedECs = set(cladeAFlexibilityContributedECsForContributingNeofunctionalisedEC.keys())
#- REPEAT for each function change consisting of "neofunctionalised" ECs, which also contribute to redundancy
output.append( '"neofunctionalised" ECs: ' + str(len(cladeANeofunctionalisedMetabolismSet)) + ' (' + str(Percent.getPercentStringShort(len(cladeANeofunctionalisedMetabolismSet), cladeAEcCount, 0)) + '%)' )
robustnessContributingNeofunctionalisations = dict()
flexibilityContributingNeofunctionalisations = dict()
for functionChange, neofunctionalisations in cladeANeofunctionalisationsForFunctionChange.items():
#- report enzyme pairs of neofunctionalisations, which caused the EC to be considered "neofunctionalised", and are in return contributing to redundancy
if functionChange.ecA in cladeARobustnessContributingNeofunctionalisedECs or functionChange.ecB in cladeARobustnessContributingNeofunctionalisedECs: # function change contributes to robustness
for neofunctionalisation in neofunctionalisations:
currentSetOfContributedECs = robustnessContributingNeofunctionalisations.get(neofunctionalisation, None)
if currentSetOfContributedECs is None:
currentSetOfContributedECs = set()
robustnessContributingNeofunctionalisations[neofunctionalisation] = currentSetOfContributedECs
for ec in functionChange.ecPair:
contributedECs = cladeARobustnessContributedECsForContributingNeofunctionalisedEC.get(ec, None)
if contributedECs is not None:
currentSetOfContributedECs.update(contributedECs)
if functionChange.ecA in cladeAFlexibilityContributingNeofunctionalisedECs or functionChange.ecB in cladeAFlexibilityContributingNeofunctionalisedECs: # function change contributes to flexibility
for neofunctionalisation in neofunctionalisations:
currentSetOfContributedECs = flexibilityContributingNeofunctionalisations.get(neofunctionalisation, None)
if currentSetOfContributedECs is None:
currentSetOfContributedECs = set()
flexibilityContributingNeofunctionalisations[neofunctionalisation] = currentSetOfContributedECs
for ec in functionChange.ecPair:
contributedECs = cladeAFlexibilityContributedECsForContributingNeofunctionalisedEC.get(ec, None)
if contributedECs is not None:
currentSetOfContributedECs.update(contributedECs)
output.append('')
output.append( 'Neofunctionalisations contributing to robustness: ' + str(len(robustnessContributingNeofunctionalisations)) )
for neofunctionalisation, contributedECs in robustnessContributingNeofunctionalisations.items():
output.append( str(neofunctionalisation) + ' => ' + str(contributedECs))
output.append('')
output.append( 'Neofunctionalisations contributing to target-flexibility: ' + str(len(flexibilityContributingNeofunctionalisations)) )
for neofunctionalisation, contributedECs in flexibilityContributingNeofunctionalisations.items():
output.append( str(neofunctionalisation) + ' => ' + str(contributedECs))
for line in output:
print( line )
| 67.724337 | 219 | 0.576664 | 13,517 | 58,717 | 2.401716 | 0.083081 | 0.041092 | 0.032344 | 0.026121 | 0.691843 | 0.629744 | 0.563979 | 0.519899 | 0.506962 | 0.484598 | 0 | 0.344352 | 0.163275 | 58,717 | 866 | 220 | 67.80254 | 0.316426 | 0.906637 | 0 | 0.287879 | 0 | 0 | 0.066057 | 0.01226 | 0 | 0 | 0 | 0 | 0 | 1 | 0.015152 | false | 0 | 0.060606 | 0 | 0.090909 | 0.015152 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
428df1faa747bc342e48b83fb8c6f44d6757dcf5 | 713 | py | Python | service/app/models/message.py | xuannanxan/maitul-manage | 35ddd2946bf4c97806bb38057a7dc9d6fa97c118 | [
"Apache-2.0"
] | null | null | null | service/app/models/message.py | xuannanxan/maitul-manage | 35ddd2946bf4c97806bb38057a7dc9d6fa97c118 | [
"Apache-2.0"
] | 14 | 2021-03-10T01:16:29.000Z | 2022-02-18T16:53:36.000Z | service/app/models/message.py | xuannanxan/maitul-manage | 35ddd2946bf4c97806bb38057a7dc9d6fa97c118 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Created by xuannan on 2019-01-26.
__author__ = 'Allen xu'
from app.models.base import db, BaseModel
# 留言
class Message(BaseModel):
__tablename__ = "message"
contact = db.Column(db.String(100)) # 联系方式
email = db.Column(db.String(100)) # 邮箱
name = db.Column(db.String(100)) # 联系人
info = db.Column(db.Text) # 留言内容
ip = db.Column(db.String(100)) # IP地址
uid = db.Column(db.String(255)) # 留言用户
reply = db.Column(db.Text) # 回复内容
show = db.Column(db.SmallInteger, default=0) # 是否展示,1为展示,0为不展示
site = db.Column(db.String(20)) # 所属站点
url = db.Column(db.String(200)) # 所在页面
def __repr__(self):
return '<Message %r>' % self.id
| 29.708333 | 67 | 0.619916 | 105 | 713 | 4.095238 | 0.590476 | 0.186047 | 0.232558 | 0.260465 | 0.176744 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057554 | 0.220196 | 713 | 23 | 68 | 31 | 0.715827 | 0.164095 | 0 | 0 | 0 | 0 | 0.046472 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.0625 | 0.0625 | 0.9375 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
35f09379befd5ddf6b604bb0360a4a26bfd8a00d | 4,952 | py | Python | langeer/langeer.py | kancyframework/python-plugins | 430d0f781b5669d8e6ad83f7af0782b672c43db5 | [
"MIT"
] | 1 | 2021-12-11T12:44:12.000Z | 2021-12-11T12:44:12.000Z | langeer/langeer.py | kancyframework/python-plugins | 430d0f781b5669d8e6ad83f7af0782b672c43db5 | [
"MIT"
] | null | null | null | langeer/langeer.py | kancyframework/python-plugins | 430d0f781b5669d8e6ad83f7af0782b672c43db5 | [
"MIT"
] | null | null | null | def isString(value) -> bool:
return isinstance(value, str)
def isBool(value) -> bool:
return isinstance(value, bool)
def isInt(value) -> bool:
return isinstance(value, int)
def isFloat(value) -> bool:
return isinstance(value, float)
def isNumber(value) -> bool:
return isInt(value) or isFloat(value)
def isList(value) -> bool:
return isinstance(value, list)
def isSet(value) -> bool:
return isinstance(value, set)
def isTuple(value) -> bool:
return isinstance(value, tuple)
def isArray(value) -> bool:
return isTuple(value)
def isByteArray(value) -> bool:
return isinstance(value, (bytes, bytearray))
def isCollection(value) -> bool:
return isinstance(value, (list, set, tuple))
def isDict(value) -> bool:
return isinstance(value, dict)
def isMap(value) -> bool:
return isDict(value)
def isClass(value) -> bool:
return type(value).__name__ == 'type' and str(value).startswith("<class '")
def isBaseType(value) -> bool:
return isinstance(value, (int, float, bool, str, dict, tuple, list, set, bytes, bytearray, complex))
def getClassName(value) -> str:
if isClass(value):
return value.__name__
else:
return type(value).__name__
def findClass(className):
return forClass(className)
def forClass(className):
import sys
cls = None
stop = False
f = sys._getframe()
while not stop:
if f.f_globals.__contains__(className):
c = f.f_globals[className]
if isClass(c):
cls = c
break
if f.f_globals['__name__'] == '__main__':
stop = True
f = f.f_back
return cls
def isNull(obj) -> bool:
return obj is None
def notNull(obj) -> bool:
return not isNull(obj)
def isEmpty(obj) -> bool:
if isNull(obj):
return True
if isinstance(obj, str):
return obj == ""
elif isinstance(obj, (list, set, tuple, dict)):
return len(obj) < 1
else:
return False
def isNotEmpty(obj) -> bool:
return not isEmpty(obj)
def notEmpty(obj) -> bool:
return not isEmpty(obj)
def isAllEmpty(*args) -> bool:
"""
所有元素都是空的
:param args: 元素列表
:return: True/False
"""
if args:
for arg in args:
if isNotEmpty(arg):
return False
return True
return True
def isNotAllEmpty(*args) -> bool:
"""
所有元素都不是空的
:param args: 元素列表
:return: True/False
"""
return not isAllEmpty(args)
def isBlank(obj) -> bool:
if isNull(obj):
return True
if isinstance(obj, str):
return obj.strip() == ""
elif isinstance(obj, (list, set, tuple, dict)):
return len(obj) < 1
else:
return False
def isNotBlank(obj) -> bool:
return not isBlank(obj)
def notBlank(obj) -> bool:
return isNotBlank(obj)
def assertTrue(obj, message=None):
if not obj:
raise AssertionError(message or "assert is true, but value is False")
def assertFalse(obj, message=None):
if obj:
raise AssertionError(message or f"assert is false, but value[{obj}] is True")
def assertEmpty(obj, message=None):
if isNotEmpty(obj):
raise AssertionError(message or f"assert is empty, but value[{obj}] is not empty")
def assertNotEmpty(obj, message=None):
if isEmpty(obj):
raise AssertionError(message or "assert not empty, but value is empty")
def assertBlank(obj, message=None):
if isNotBlank(obj):
raise AssertionError(message or f"assert is blank, but value[{obj}] is not blank")
def assertNotBlank(obj, message=None):
if isBlank(obj):
raise AssertionError(message or "assert not blank, but value is blank")
def obj2dict(obj, recursive=True):
"""把Object对象转换成Dict对象"""
try:
obj_dict = obj.__dict__
except:
return obj
ret_obj_dict = {}
ret_obj_dict.update(obj_dict)
if recursive:
for field in obj_dict:
fieldValue = obj_dict[field]
if not isBaseType(fieldValue):
ret_obj_dict[field] = obj2dict(fieldValue)
return ret_obj_dict
def dict2obj(mapping: dict, obj):
"""
将字段的属性赋值给对象
:param mapping: 字典
:param obj: 对象实例、类型、类名
:return:
"""
if isClass(obj):
obj = obj()
elif isinstance(obj, str):
objClass = forClass(obj)
if objClass:
obj = objClass()
else:
raise RuntimeError(f"Not Found class : {obj}")
try:
obj.__dict__.update(mapping)
except:
pass
return obj
def async_call(fn):
"""
异步调用
加在需要异步执行的方法上
:param fn:
:return:
"""
import threading
def wrapper(*args, **kwargs):
threading.Thread(target=fn, args=args, kwargs=kwargs).start()
return wrapper
def sleep(secs: int):
"""
睡眠
:param secs: 秒数
:return:
"""
import time
time.sleep(secs)
| 19.88755 | 104 | 0.610864 | 610 | 4,952 | 4.877049 | 0.216393 | 0.070588 | 0.07563 | 0.092437 | 0.32437 | 0.243025 | 0.166723 | 0.120336 | 0.08 | 0.08 | 0 | 0.001393 | 0.27504 | 4,952 | 248 | 105 | 19.967742 | 0.827298 | 0.048869 | 0 | 0.1875 | 0 | 0 | 0.063305 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 1 | 0.270833 | false | 0.006944 | 0.020833 | 0.152778 | 0.576389 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
35f84e79df1c871246f4cb7f485e21df1a78147f | 178 | py | Python | Week 8: Functional programming/8 (05).py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | Week 8: Functional programming/8 (05).py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | Week 8: Functional programming/8 (05).py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | from functools import reduce
print(
reduce(
lambda x, y: x * y ** 5,
map(
int,
('1 ' + input()).split()
)
)
)
| 14.833333 | 37 | 0.359551 | 17 | 178 | 3.764706 | 0.823529 | 0.0625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022989 | 0.511236 | 178 | 11 | 38 | 16.181818 | 0.712644 | 0 | 0 | 0 | 0 | 0 | 0.011976 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.1 | 0 | 0.1 | 0.1 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
35fcf5f0695912e9a5b0eba398a412ffcb54d320 | 92 | py | Python | code/tenka1_2019_b_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/tenka1_2019_b_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/tenka1_2019_b_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | n=int(input())
S=input()
k=int(input())
i=S[k-1]
for s in S:print(s if s==i else "*",end="") | 18.4 | 43 | 0.565217 | 23 | 92 | 2.26087 | 0.565217 | 0.307692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012346 | 0.119565 | 92 | 5 | 43 | 18.4 | 0.62963 | 0 | 0 | 0 | 0 | 0 | 0.010753 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c43b7062281f1e9e2b1210df8df4e0ed97f774f9 | 203 | py | Python | tests/examples/example3.py | the-one-ninja/pytest-contexts | 4ced6a2d4e2e2df260e3cea093a9555e4bdf4cbc | [
"Unlicense"
] | 4 | 2018-06-29T14:58:11.000Z | 2019-09-18T07:04:58.000Z | tests/examples/example3.py | the-one-ninja/pytest-contexts | 4ced6a2d4e2e2df260e3cea093a9555e4bdf4cbc | [
"Unlicense"
] | 1 | 2021-07-04T08:02:53.000Z | 2021-07-04T08:02:53.000Z | tests/examples/example3.py | the-one-ninja/pytest-contexts | 4ced6a2d4e2e2df260e3cea093a9555e4bdf4cbc | [
"Unlicense"
] | 2 | 2019-05-19T18:09:40.000Z | 2021-05-18T15:17:56.000Z | class When_we_have_a_test:
def when_things_happen(self):
pass
def it_should_do_this_test(self):
assert 1 == 1
def test_we_still_run_regular_pytest_scripts():
assert 2 == 2
| 18.454545 | 47 | 0.694581 | 33 | 203 | 3.787879 | 0.69697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025806 | 0.236453 | 203 | 10 | 48 | 20.3 | 0.780645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.428571 | false | 0.142857 | 0 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
c44a2062c168cbe16a4005131c0a60de0f5ca7e0 | 13,786 | py | Python | test/test_damage.py | bwspenc/neml | 2fe283cb14ab309d95627590408670dab877c5a5 | [
"MIT"
] | null | null | null | test/test_damage.py | bwspenc/neml | 2fe283cb14ab309d95627590408670dab877c5a5 | [
"MIT"
] | null | null | null | test/test_damage.py | bwspenc/neml | 2fe283cb14ab309d95627590408670dab877c5a5 | [
"MIT"
] | null | null | null | import sys
sys.path.append('..')
from neml import interpolate, solvers, models, elasticity, ri_flow, hardening, surfaces, visco_flow, general_flow, creep, damage
from common import *
import unittest
import numpy as np
import numpy.linalg as la
class CommonStandardDamageModel(object):
"""
Tests that apply to any standard damage model
"""
def effective(self, s):
sdev = make_dev(s)
return np.sqrt(3.0/2.0 * np.dot(sdev, sdev))
def test_damage(self):
d_model = self.model.damage(self.d_np1, self.d_n, self.e_np1, self.e_n,
self.s_np1, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
S = self.elastic.S(self.T_np1)
dS = self.s_np1 - self.s_n
dee = np.dot(S, dS)
de = self.e_np1 - self.e_n
dp = np.sqrt(2.0/3.0 * (np.dot(de, de) + np.dot(dee, dee) -
2.0 * np.dot(dee, de)))
f = self.model.f(self.s_np1, self.d_np1, self.T_np1)
d_calcd = self.d_n + f * dp
self.assertTrue(np.isclose(d_model, d_calcd))
def test_function_derivative_s(self):
d_model = self.model.df_ds(self.stress, self.d_np1, self.T)
d_calcd = differentiate(lambda x: self.model.f(x, self.d_np1, self.T),
self.stress)
self.assertTrue(np.allclose(d_model, d_calcd))
def test_function_derivative_d(self):
d_model = self.model.df_dd(self.stress, self.d, self.T)
d_calcd = differentiate(lambda x: self.model.f(self.s_np1, x, self.T),
self.d)
self.assertTrue(np.isclose(d_model, d_calcd))
class CommonScalarDamageModel(object):
def test_ndamage(self):
self.assertEqual(self.model.ndamage, 1)
def test_init_damage(self):
self.assertTrue(np.allclose(self.model.init_damage(), np.zeros((1,))))
def test_ddamage_ddamage(self):
dd_model = self.model.ddamage_dd(self.d_np1, self.d_n, self.e_np1, self.e_n,
self.s_np1, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
dfn = lambda d: self.model.damage(d, self.d_n, self.e_np1, self.e_n,
self.s_np1, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
dd_calcd = differentiate(dfn, self.d_np1)
self.assertTrue(np.isclose(dd_model, dd_calcd))
def test_ddamage_dstrain(self):
dd_model = self.model.ddamage_de(self.d_np1, self.d_n, self.e_np1, self.e_n,
self.s_np1, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
dfn = lambda e: self.model.damage(self.d_np1, self.d_n, e, self.e_n,
self.s_np1, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
dd_calcd = differentiate(dfn, self.e_np1)[0]
self.assertTrue(np.allclose(dd_model, dd_calcd, rtol = 1.0e-3))
def test_ddamage_dstress(self):
dd_model = self.model.ddamage_ds(self.d_np1, self.d_n, self.e_np1, self.e_n,
self.s_np1, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
dfn = lambda s: self.model.damage(self.d_np1, self.d_n, self.e_np1, self.e_n,
s, self.s_n, self.T_np1, self.T_n, self.t_np1, self.t_n)
dd_calcd = differentiate(dfn, self.s_np1)[0]
self.assertTrue(np.allclose(dd_model, dd_calcd, rtol = 1.0e-3))
def test_nparams(self):
self.assertEqual(self.model.nparams, 7)
def test_init_x(self):
trial_state = self.model.make_trial_state(
self.e_np1, self.e_n,
self.T_np1, self.T_n, self.t_np1, self.t_n,
self.s_n, self.hist_n, self.u_n, self.p_n)
me = np.array(list(self.s_n) + [self.d_n])
them = self.model.init_x(trial_state)
self.assertTrue(np.allclose(me, them))
def test_R(self):
trial_state = self.model.make_trial_state(
self.e_np1, self.e_n,
self.T_np1, self.T_n, self.t_np1, self.t_n,
self.s_n, self.hist_n, self.u_n, self.p_n)
R, J = self.model.RJ(self.x_trial, trial_state)
s_trial = self.x_trial[:6]
w_trial = self.x_trial[6]
R_calc = np.zeros((7,))
s_p_np1, h_p, A_p, u_p, p_p =self.bmodel.update_sd(self.e_np1, self.e_n,
self.T_np1, self.T_n,
self.t_np1, self.t_n, self.s_n / (1-self.d_n), self.hist_n[1:],
self.u_n, self.p_n)
R_calc[:6] = s_trial - (1-w_trial) * s_p_np1
d_np1 = self.model.damage(w_trial, self.d_n, self.e_np1, self.e_n,
s_trial / (1 - w_trial), self.s_n / (1-self.d_n), self.T_np1,
self.T_n, self.t_np1, self.t_n)
R_calc[6] = w_trial - d_np1
self.assertTrue(np.allclose(R_calc, R))
def test_jacobian(self):
trial_state = self.model.make_trial_state(
self.e_np1, self.e_n,
self.T_np1, self.T_n, self.t_np1, self.t_n,
self.s_n, self.hist_n, self.u_n, self.p_n)
R, J = self.model.RJ(self.x_trial, trial_state)
Jnum = differentiate(lambda x: self.model.RJ(x, trial_state)[0],
self.x_trial)
self.assertTrue(np.allclose(J, Jnum, rtol = 1.0e-3))
class CommonDamagedModel(object):
def test_nstore(self):
self.assertEqual(self.model.nstore, self.bmodel.nstore + self.model.ndamage)
def test_store(self):
base = self.bmodel.init_store()
damg = self.model.init_damage()
comp = list(damg) + list(base)
fromm = self.model.init_store()
self.assertTrue(np.allclose(fromm, comp))
def test_tangent_proportional_strain(self):
t_n = 0.0
e_n = np.zeros((6,))
s_n = np.zeros((6,))
hist_n = self.model.init_store()
u_n = 0.0
p_n = 0.0
for m in np.linspace(0,1,self.nsteps+1)[1:]:
t_np1 = m * self.ttarget
e_np1 = m * self.etarget
trial_state = self.model.make_trial_state(
e_np1, e_n,
self.T, self.T, t_np1, t_n,
s_n, hist_n, u_n, p_n)
s_np1, hist_np1, A_np1, u_np1, p_np1 = self.model.update_sd(
e_np1, e_n, self.T, self.T, t_np1, t_n, s_n, hist_n,
u_n, p_n)
A_num = differentiate(lambda e: self.model.update_sd(e, e_n,
self.T, self.T, t_np1, t_n, s_n, hist_n, u_n, p_n)[0], e_np1)
self.assertTrue(np.allclose(A_num, A_np1, rtol = 1.0e-3, atol = 1.0e-1))
e_n = np.copy(e_np1)
s_n = np.copy(s_np1)
hist_n = np.copy(hist_np1)
u_n = u_np1
p_n = p_np1
t_n = t_np1
class TestClassicalDamage(unittest.TestCase, CommonScalarDamageModel,
CommonDamagedModel):
def setUp(self):
self.E = 92000.0
self.nu = 0.3
self.s0 = 180.0
self.Kp = 1000.0
self.H = 1000.0
self.elastic = elasticity.IsotropicLinearElasticModel(self.E, "youngs",
self.nu, "poissons")
surface = surfaces.IsoKinJ2()
iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
kin = hardening.LinearKinematicHardeningRule(self.H)
hrule = hardening.CombinedHardeningRule(iso, kin)
flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)
self.bmodel = models.SmallStrainRateIndependentPlasticity(self.elastic,
flow)
self.xi = 0.478
self.phi = 1.914
self.A = 10000000.0
self.model = damage.ClassicalCreepDamageModel_sd(
self.elastic,
self.A, self.xi, self.phi, self.bmodel)
self.stress = np.array([100,-50.0,300.0,-99,50.0,125.0])
self.T = 100.0
self.s_np1 = self.stress
self.s_n = np.array([-25,150,250,-25,-100,25])
self.d_np1 = 0.5
self.d_n = 0.4
self.e_np1 = np.array([0.1,-0.01,0.15,-0.05,-0.1,0.15])
self.e_n = np.array([-0.05,0.025,-0.1,0.2,0.11,0.13])
self.T_np1 = self.T
self.T_n = 90.0
self.t_np1 = 1.0
self.t_n = 0.0
self.u_n = 0.0
self.p_n = 0.0
# This is a rather boring baseline history state to probe, but I can't
# think of a better way to get a "generic" history from a generic model
self.hist_n = np.array([self.d_n] + list(self.bmodel.init_store()))
self.x_trial = np.array([50,-25,150,-150,190,100.0] + [0.41])
self.nsteps = 10
self.etarget = np.array([0.1,-0.025,0.02,0.015,-0.02,-0.05])
self.ttarget = 10.0
class TestPowerLawDamage(unittest.TestCase, CommonStandardDamageModel,
CommonScalarDamageModel, CommonDamagedModel):
def setUp(self):
self.E = 92000.0
self.nu = 0.3
self.s0 = 180.0
self.Kp = 1000.0
self.H = 1000.0
self.elastic = elasticity.IsotropicLinearElasticModel(self.E, "youngs",
self.nu, "poissons")
surface = surfaces.IsoKinJ2()
iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
kin = hardening.LinearKinematicHardeningRule(self.H)
hrule = hardening.CombinedHardeningRule(iso, kin)
flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)
self.bmodel = models.SmallStrainRateIndependentPlasticity(self.elastic,
flow)
self.A = 8.0e-6
self.a = 2.2
self.model = damage.NEMLPowerLawDamagedModel_sd(self.elastic, self.A, self.a,
self.bmodel)
self.stress = np.array([100,-50.0,300.0,-99,50.0,125.0])
self.T = 100.0
self.d = 0.45
self.s_np1 = self.stress
self.s_n = np.array([-25,150,250,-25,-100,25])
self.d_np1 = 0.5
self.d_n = 0.4
self.e_np1 = np.array([0.1,-0.01,0.15,-0.05,-0.1,0.15])
self.e_n = np.array([-0.05,0.025,-0.1,0.2,0.11,0.13])
self.T_np1 = self.T
self.T_n = 90.0
self.t_np1 = 1.0
self.t_n = 0.0
self.u_n = 0.0
self.p_n = 0.0
# This is a rather boring baseline history state to probe, but I can't
# think of a better way to get a "generic" history from a generic model
self.hist_n = np.array([self.d_n] + list(self.bmodel.init_store()))
self.x_trial = np.array([50,-25,150,-150,190,100.0] + [0.41])
self.nsteps = 10
self.etarget = np.array([0.1,-0.025,0.02,0.015,-0.02,-0.05])
self.ttarget = 10.0
def test_function(self):
f_model = self.model.f(self.stress, self.d_np1, self.T)
f_calcd = self.A * self.effective(self.stress) ** self.a
self.assertTrue(np.isclose(f_model, f_calcd))
class TestExponentialDamage(unittest.TestCase, CommonStandardDamageModel,
CommonScalarDamageModel, CommonDamagedModel):
def setUp(self):
self.E = 92000.0
self.nu = 0.3
self.s0 = 180.0
self.Kp = 1000.0
self.H = 1000.0
self.elastic = elasticity.IsotropicLinearElasticModel(self.E,
"youngs", self.nu, "poissons")
surface = surfaces.IsoKinJ2()
iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
kin = hardening.LinearKinematicHardeningRule(self.H)
hrule = hardening.CombinedHardeningRule(iso, kin)
flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)
self.bmodel = models.SmallStrainRateIndependentPlasticity(self.elastic,
flow)
self.W0 = 10.0
self.k0 = 0.0001
self.a = 2.0
self.model = damage.NEMLExponentialWorkDamagedModel_sd(
self.elastic, self.W0, self.k0,
self.a, self.bmodel)
self.stress = np.array([100,-50.0,300.0,-99,50.0,125.0])
self.T = 100.0
self.d = 0.45
self.s_np1 = self.stress
self.s_n = np.array([-25,150,250,-25,-100,25])
self.d_np1 = 0.5
self.d_n = 0.4
self.e_np1 = np.array([0.1,-0.01,0.15,-0.05,-0.1,0.15])
self.e_n = np.array([-0.05,0.025,-0.1,0.2,0.11,0.13])
self.T_np1 = self.T
self.T_n = 90.0
self.t_np1 = 1.0
self.t_n = 0.0
self.u_n = 0.0
self.p_n = 0.0
# This is a rather boring baseline history state to probe, but I can't
# think of a better way to get a "generic" history from a generic model
self.hist_n = np.array([self.d_n] + list(self.bmodel.init_store()))
self.x_trial = np.array([50,-25,150,-150,190,100.0] + [0.41])
self.nsteps = 10
self.etarget = np.array([0.1,-0.025,0.02,0.015,-0.02,-0.05])
self.ttarget = 10.0
def test_function(self):
f_model = self.model.f(self.stress, self.d_np1, self.T)
f_calcd = (self.d_np1 + self.k0) ** self.a * self.effective(self.stress) / self.W0
self.assertTrue(np.isclose(f_model, f_calcd))
class TestCombinedDamage(unittest.TestCase, CommonScalarDamageModel,
CommonDamagedModel):
def setUp(self):
self.E = 92000.0
self.nu = 0.3
self.s0 = 180.0
self.Kp = 1000.0
self.H = 1000.0
self.elastic = elasticity.IsotropicLinearElasticModel(self.E,
"youngs", self.nu, "poissons")
surface = surfaces.IsoKinJ2()
iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
kin = hardening.LinearKinematicHardeningRule(self.H)
hrule = hardening.CombinedHardeningRule(iso, kin)
flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)
self.bmodel = models.SmallStrainRateIndependentPlasticity(self.elastic,
flow)
self.W0 = 10.0
self.k0 = 0.0001
self.a0 = 2.0
self.model1 = damage.NEMLExponentialWorkDamagedModel_sd(
self.elastic, self.W0, self.k0,
self.a0, self.bmodel)
self.W02 = 10.0
self.k02 = 0.001
self.a02 = 1.5
self.model2 = damage.NEMLExponentialWorkDamagedModel_sd(
self.elastic, self.W02, self.k02,
self.a02, self.bmodel)
self.model = damage.CombinedDamageModel_sd(self.elastic,
[self.model1, self.model2], self.bmodel)
self.stress = np.array([100,-50.0,300.0,-99,50.0,125.0])
self.T = 100.0
self.d = 0.45
self.s_np1 = self.stress
self.s_n = np.array([-25,150,250,-25,-100,25])
self.d_np1 = 0.5
self.d_n = 0.4
self.e_np1 = np.array([0.1,-0.01,0.15,-0.05,-0.1,0.15])
self.e_n = np.array([-0.05,0.025,-0.1,0.2,0.11,0.13])
self.T_np1 = self.T
self.T_n = 90.0
self.t_np1 = 1.0
self.t_n = 0.0
self.u_n = 0.0
self.p_n = 0.0
# This is a rather boring baseline history state to probe, but I can't
# think of a better way to get a "generic" history from a generic model
self.hist_n = np.array([self.d_n] + list(self.bmodel.init_store()))
self.x_trial = np.array([50,-25,150,-150,190,100.0] + [0.41])
self.nsteps = 10
self.etarget = np.array([0.1,-0.025,0.02,0.015,-0.02,-0.05])
self.ttarget = 10.0
| 31.260771 | 128 | 0.646598 | 2,410 | 13,786 | 3.539419 | 0.087967 | 0.050996 | 0.031887 | 0.03939 | 0.773857 | 0.73517 | 0.7034 | 0.688863 | 0.670692 | 0.657913 | 0 | 0.079212 | 0.205136 | 13,786 | 440 | 129 | 31.331818 | 0.699215 | 0.043667 | 0 | 0.567823 | 0 | 0 | 0.004406 | 0 | 0 | 0 | 0 | 0 | 0.053628 | 1 | 0.069401 | false | 0 | 0.018927 | 0 | 0.113565 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c45cfcaae81ab0c319f27e21c584aaf391f23264 | 279 | py | Python | src/thug/meme/__init__.py | rmoutie/thug-memes | 925b1282f7bf60bf0e70f4f0387dd90a8ce91fce | [
"MIT"
] | 234 | 2018-03-17T02:32:55.000Z | 2022-03-09T20:50:24.000Z | src/thug/meme/__init__.py | rmoutie/thug-memes | 925b1282f7bf60bf0e70f4f0387dd90a8ce91fce | [
"MIT"
] | 9 | 2018-03-17T01:27:37.000Z | 2020-05-10T18:37:25.000Z | src/thug/meme/__init__.py | rmoutie/thug-memes | 925b1282f7bf60bf0e70f4f0387dd90a8ce91fce | [
"MIT"
] | 15 | 2018-03-17T08:04:35.000Z | 2020-09-17T16:46:41.000Z | from os import path as osp
# from .basic import Meme
# from .thug import ThugMeme
DATA_FOLDER = osp.join(osp.dirname(__file__), 'data')
GLASSES_FILE = osp.join(DATA_FOLDER, 'glasses.png')
CIGAR_FILE = osp.join(DATA_FOLDER, 'cigar.png')
FONT = osp.join(DATA_FOLDER, 'font.ttf')
| 27.9 | 53 | 0.741935 | 45 | 279 | 4.377778 | 0.444444 | 0.203046 | 0.167513 | 0.258883 | 0.213198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121864 | 279 | 9 | 54 | 31 | 0.804082 | 0.179211 | 0 | 0 | 0 | 0 | 0.141593 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c48355a523a8d9ff38ba08be90b4c2393c8cb2f9 | 563 | py | Python | host/greatfet/glitchkit/uart.py | wchill/greatfet | a76e0ccc2794686407840b11093d460a0ba29825 | [
"BSD-3-Clause"
] | null | null | null | host/greatfet/glitchkit/uart.py | wchill/greatfet | a76e0ccc2794686407840b11093d460a0ba29825 | [
"BSD-3-Clause"
] | null | null | null | host/greatfet/glitchkit/uart.py | wchill/greatfet | a76e0ccc2794686407840b11093d460a0ba29825 | [
"BSD-3-Clause"
] | null | null | null | #
# This file is part of GreatFET
#
from .base import GlitchKitModule
from ..protocol import vendor_requests
class GlitchKitUART(GlitchKitModule):
"""
"""
# TODO: Dominic, implement me. :)
SHORT_NAME = 'uart'
def __init__(self, board):
"""
Create a new GlitchKit module allowing triggering on UART events.
Args:
board -- A representation of the GreatFET that will perform the actual
triggering.
"""
# Store a reference to the parent board.
self.board = board
| 20.107143 | 82 | 0.614565 | 62 | 563 | 5.483871 | 0.741935 | 0.052941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.309059 | 563 | 27 | 83 | 20.851852 | 0.874036 | 0.477798 | 0 | 0 | 0 | 0 | 0.017316 | 0 | 0 | 0 | 0 | 0.037037 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
670404cf9fdd51cd6127194e26a3105adf12cb1d | 223 | py | Python | setup.py | n0whereRuoxi/gym-multigrid | 98809bd40b3d4a0bfa1ab909b1a748fe82d71b60 | [
"Apache-2.0"
] | 95 | 2020-04-01T15:59:31.000Z | 2022-03-27T05:17:22.000Z | setup.py | n0whereRuoxi/gym-multigrid | 98809bd40b3d4a0bfa1ab909b1a748fe82d71b60 | [
"Apache-2.0"
] | 2 | 2020-07-28T13:56:00.000Z | 2021-03-25T23:35:48.000Z | setup.py | n0whereRuoxi/gym-multigrid | 98809bd40b3d4a0bfa1ab909b1a748fe82d71b60 | [
"Apache-2.0"
] | 30 | 2020-04-17T15:15:07.000Z | 2022-03-17T14:49:19.000Z | from setuptools import setup
setup(name='gym_multigrid',
version='0.0.1',
packages=['gym_multigrid', 'gym_multigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy>=1.15.0'
]
) | 22.3 | 57 | 0.565022 | 28 | 223 | 4.357143 | 0.642857 | 0.295082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.060976 | 0.264574 | 223 | 10 | 58 | 22.3 | 0.682927 | 0 | 0 | 0 | 0 | 0 | 0.321429 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.111111 | 0 | 0.111111 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
67048f510a7fa0df370003158c7b138728e45421 | 333 | py | Python | test/test_socket.py | alexmv/python-binary-memcached | 41ed6136a029eda65271055c88f1bbbb4e4f1aba | [
"MIT"
] | 103 | 2015-01-30T15:38:37.000Z | 2022-02-17T02:03:59.000Z | test/test_socket.py | alexmv/python-binary-memcached | 41ed6136a029eda65271055c88f1bbbb4e4f1aba | [
"MIT"
] | 135 | 2015-01-26T11:16:27.000Z | 2021-12-28T14:58:07.000Z | test/test_socket.py | alexmv/python-binary-memcached | 41ed6136a029eda65271055c88f1bbbb4e4f1aba | [
"MIT"
] | 45 | 2015-02-04T16:32:29.000Z | 2021-12-27T22:29:18.000Z | import bmemcached
import test_simple_functions
class SocketMemcachedTests(test_simple_functions.MemcachedTests):
"""
Same tests as above, just make sure it works with sockets.
"""
def setUp(self):
self.server = '/tmp/memcached.sock'
self.client = bmemcached.Client(self.server, 'user', 'password')
| 25.615385 | 72 | 0.705706 | 39 | 333 | 5.923077 | 0.74359 | 0.08658 | 0.164502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.192192 | 333 | 12 | 73 | 27.75 | 0.858736 | 0.174174 | 0 | 0 | 0 | 0 | 0.119691 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.166667 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
671d6d8effaf12a58f74ffdc93457f793bbf73f2 | 396 | py | Python | src/courses/tests/records/tests_record_str.py | iNerV/education-backend | 787c0d090eb6e4a9338812941b0246a6e1b8e7ad | [
"MIT"
] | null | null | null | src/courses/tests/records/tests_record_str.py | iNerV/education-backend | 787c0d090eb6e4a9338812941b0246a6e1b8e7ad | [
"MIT"
] | 1 | 2022-02-10T12:08:02.000Z | 2022-02-10T12:08:02.000Z | src/courses/tests/records/tests_record_str.py | iNerV/education-backend | 787c0d090eb6e4a9338812941b0246a6e1b8e7ad | [
"MIT"
] | null | null | null | import pytest
pytestmark = [pytest.mark.django_db]
@pytest.fixture
def course(mixer):
return mixer.blend('courses.Course', name='Упячивание бутявок', name_genitive='Упячивания бутявок')
@pytest.fixture
def record(course, mixer):
return mixer.blend('courses.Record', course=course)
def test(record):
assert 'Запись' in str(record)
assert 'Упячивания бутявок' in str(record)
| 20.842105 | 103 | 0.737374 | 51 | 396 | 5.686275 | 0.470588 | 0.089655 | 0.110345 | 0.151724 | 0.234483 | 0.234483 | 0 | 0 | 0 | 0 | 0 | 0 | 0.138889 | 396 | 18 | 104 | 22 | 0.85044 | 0 | 0 | 0.181818 | 0 | 0 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 1 | 0.272727 | false | 0 | 0.090909 | 0.181818 | 0.545455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
671f7f77471a377d7ef1fbe2f04c554ba3dcb1d0 | 180 | py | Python | deport_upao/apps/productos/models.py | andree1320z/deport-upao-web | b838b58224bb182243a91c79b7cfe61026798fce | [
"MIT"
] | 1 | 2017-09-26T11:50:27.000Z | 2017-09-26T11:50:27.000Z | deport_upao/apps/productos/models.py | andree1320z/deport-upao-web | b838b58224bb182243a91c79b7cfe61026798fce | [
"MIT"
] | null | null | null | deport_upao/apps/productos/models.py | andree1320z/deport-upao-web | b838b58224bb182243a91c79b7cfe61026798fce | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Product(models.Model):
name = models.CharField(max_length=100)
unidad = models.FloatField(max_length=1000)
| 20 | 47 | 0.75 | 25 | 180 | 5.32 | 0.76 | 0.135338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.046053 | 0.155556 | 180 | 8 | 48 | 22.5 | 0.828947 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
67474bfe404ab34c4c2617665143d3ba014784ba | 1,454 | py | Python | privpack-app/priv_bmi.py | maxxiefjv/privpack | b6bff78588362e57bc3f1268ab864026db4a1afa | [
"MIT"
] | null | null | null | privpack-app/priv_bmi.py | maxxiefjv/privpack | b6bff78588362e57bc3f1268ab864026db4a1afa | [
"MIT"
] | 1 | 2020-11-06T16:02:51.000Z | 2020-11-06T16:02:51.000Z | privpack-app/priv_bmi.py | maxxiefjv/privpack | b6bff78588362e57bc3f1268ab864026db4a1afa | [
"MIT"
] | null | null | null | from experiments import ExperimentRunner
class BMIExperiment(ExperimentRunner):
def __init__(self):
pass
def run(self, args):
pass
## Figure out the input dimensions: W = (Y, X)
# Width * Height * Color = 224 * 224 * 3 + ID
# Output:
# Width * Height * Color = 224 * 224 * 3
# Adversary Input:
# Privatizer out = Width * Height * Color = 224 * 224 * 3
# Adversary output:
# Log Likelihood = scalar: likelihood: correct identity.
# (privacy_size, public_size, hidden_layers_width, release_size) = (5, 5, 20, 5)
# (epochs, batch_size, lambd, delta, k) = (args.epochs, args.batchsize, args.lambd, args.delta, args.sample)
# (train_data, test_data) = get_gaussian_data(privacy_size, public_size, print_metrics=True)
# results = {}
# if len(lambd) == 1 and len(delta) == 1 and len(k) == 1:
# runner = GaussianNetworkRunner(privacy_size, public_size, hidden_layers_width, release_size, lambd[0], delta[0])
# results = runner.run(train_data, test_data, epochs, batch_size, k[0])
# else:
# runner = GaussianExperiment()
# runner.run(train_data, epochs, batch_size, lambd, delta, k)
# print(json.dumps(results, sort_keys=True, indent=4))
# if (args.output):
# json.dump( results, open( args.output + '.json', 'w' ), indent=4 )
| 40.388889 | 126 | 0.595598 | 174 | 1,454 | 4.816092 | 0.431034 | 0.039379 | 0.057279 | 0.068019 | 0.282816 | 0.282816 | 0.193317 | 0.116945 | 0.116945 | 0 | 0 | 0.032567 | 0.281981 | 1,454 | 35 | 127 | 41.542857 | 0.770115 | 0.736589 | 0 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.333333 | 0.166667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
676164933ccea67f3393c4eac5d26a3878e26e8f | 1,371 | py | Python | jasperserverlib/core/PatchDescriptor.py | saguas/jasperserverlib | c65efc939faff1cf94e6f35855fc16e4fff627b0 | [
"MIT"
] | null | null | null | jasperserverlib/core/PatchDescriptor.py | saguas/jasperserverlib | c65efc939faff1cf94e6f35855fc16e4fff627b0 | [
"MIT"
] | null | null | null | jasperserverlib/core/PatchDescriptor.py | saguas/jasperserverlib | c65efc939faff1cf94e6f35855fc16e4fff627b0 | [
"MIT"
] | null | null | null | import json
from PatchItem import PatchItem
class PatchDescriptor(object):
def __init__(self):
self.items = []
self.version = 2
def getVersion(self):
return self.version
def setVersion(self, version=0):
self.version = version
return self
def getItems(self):
return self.items
def setItems(self, items):
self.items = items
return self
def field(self, name, value):
item = PatchItem()
item.setField(name)
item.setValue(value)
self.items.append(item)
return self
def expression(self, expression):
item = PatchItem()
item.setExpression(expression)
self.items.append(item)
return self
def toString(self):
return self.__str__()
def __str__(self):
rd = {'version': self.getVersion(), "patch":[]}
for item in self.items:
if item.expression:
rd.get("patch").append({"expression": item.getExpression()})
elif item.field:
rd.get("patch").append({"field": item.getField(), "value":item.getValue()})
return json.dumps(rd)
def __repr__(self):
return self.__str__()
def __getattr__( self, name):
return None | 24.482143 | 91 | 0.545587 | 140 | 1,371 | 5.171429 | 0.314286 | 0.110497 | 0.077348 | 0.052486 | 0.143646 | 0.088398 | 0.088398 | 0 | 0 | 0 | 0 | 0.002235 | 0.347192 | 1,371 | 56 | 92 | 24.482143 | 0.806704 | 0 | 0 | 0.243902 | 0 | 0 | 0.030612 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.268293 | false | 0 | 0.04878 | 0.121951 | 0.585366 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
676254163fa7b82b29373fd440bd57d3e5d304ed | 22 | py | Python | knihovna-server/third_party/gflags/tests/__init__.py | gdg-garage/knihovna-db | a795e71cf2c01a2337370a18df4447632313afae | [
"MIT"
] | 4 | 2015-04-20T11:06:44.000Z | 2015-12-10T21:45:04.000Z | knihovna-server/third_party/gflags/tests/__init__.py | gdg-garage/knihovna-db | a795e71cf2c01a2337370a18df4447632313afae | [
"MIT"
] | null | null | null | knihovna-server/third_party/gflags/tests/__init__.py | gdg-garage/knihovna-db | a795e71cf2c01a2337370a18df4447632313afae | [
"MIT"
] | null | null | null | __author__ = 'filiph'
| 11 | 21 | 0.727273 | 2 | 22 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.631579 | 0 | 0 | 0 | 0 | 0 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
678d3d0e02f8f4d15e975003c2737b692355b104 | 192 | py | Python | bc/forms/templatetags/form_tags.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | 1 | 2021-02-27T07:27:17.000Z | 2021-02-27T07:27:17.000Z | bc/forms/templatetags/form_tags.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | null | null | null | bc/forms/templatetags/form_tags.py | Buckinghamshire-Digital-Service/buckinghamshire-council | bbbdb52b515bcdfc79a2bd9198dfa4828405370e | [
"BSD-3-Clause"
] | 1 | 2021-06-09T15:56:54.000Z | 2021-06-09T15:56:54.000Z | from django import template
register = template.Library()
@register.simple_tag
def get_form_additional_text(page, field):
return page.form_fields.get(label=field.label).additional_text
| 21.333333 | 66 | 0.807292 | 27 | 192 | 5.518519 | 0.666667 | 0.187919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104167 | 192 | 8 | 67 | 24 | 0.866279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0.2 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
678f4ed5c285cf4b17a7d4b0929864e99babccac | 770 | py | Python | Class_2/finalcountdown.py | travism16/Python-Course | d8c522fc31c7830c3ceabf7a35022a9e33e1d706 | [
"Apache-2.0"
] | null | null | null | Class_2/finalcountdown.py | travism16/Python-Course | d8c522fc31c7830c3ceabf7a35022a9e33e1d706 | [
"Apache-2.0"
] | null | null | null | Class_2/finalcountdown.py | travism16/Python-Course | d8c522fc31c7830c3ceabf7a35022a9e33e1d706 | [
"Apache-2.0"
] | null | null | null | import os
import time
from netmiko import ConnectHandler
from getpass import getpass
password = getpass()
device = {
"host": "cisco4.lasthop.io",
"username": "pyclass",
"password": password,
"secret": password,
"device_type": "cisco_ios",
"session_log": "my_output.txt",
}
net_connect = ConnectHandler(**device)
output = net_connect.find_prompt()
print(output)
net_connect.config_mode()
output = net_connect.find_prompt()
print(output)
net_connect.exit_config_mode()
output = net_connect.find_prompt()
print(output)
net_connect.write_channel("disable\n")
output = net_connect.find_prompt()
print(output)
time.sleep(2)
output = net_connect.read_channel()
print(output)
net_connect.enable()
output = net_connect.find_prompt()
print(output)
| 19.25 | 38 | 0.746753 | 101 | 770 | 5.445545 | 0.39604 | 0.2 | 0.290909 | 0.181818 | 0.427273 | 0.427273 | 0.427273 | 0.292727 | 0.292727 | 0.207273 | 0 | 0.002963 | 0.123377 | 770 | 39 | 39 | 19.74359 | 0.811852 | 0 | 0 | 0.354839 | 0 | 0 | 0.13394 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.129032 | 0.129032 | 0 | 0.129032 | 0.193548 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
67a36da9da29e8f53da4fa5bcd7a9ece9a2c3db9 | 51,686 | py | Python | xlib/face/FLandmarks2D.py | seanwan/DeepFaceLive | 0a076dbfdffdc5d12b7986d2ec3361eec5812382 | [
"MIT"
] | null | null | null | xlib/face/FLandmarks2D.py | seanwan/DeepFaceLive | 0a076dbfdffdc5d12b7986d2ec3361eec5812382 | [
"MIT"
] | null | null | null | xlib/face/FLandmarks2D.py | seanwan/DeepFaceLive | 0a076dbfdffdc5d12b7986d2ec3361eec5812382 | [
"MIT"
] | null | null | null | from typing import Tuple
import cv2
import numpy as np
import numpy.linalg as npla
from ..math import Affine2DMat, Affine2DUniMat
from .ELandmarks2D import ELandmarks2D
from .FRect import FRect
from .IState import IState
class FLandmarks2D(IState):
def __init__(self):
"""
Describes 2D face landmarks in uniform float coordinates
"""
self._type : ELandmarks2D = None
self._ulmrks : np.ndarray = None
def restore_state(self, state : dict):
self._type = IState._restore_enum(ELandmarks2D, state.get('_type', None))
self._ulmrks = IState._restore_np_array(state.get('_ulmrks', None))
def dump_state(self) -> dict:
return {'_type' : IState._dump_enum(self._type),
'_ulmrks' : IState._dump_np_array(self._ulmrks),
}
@staticmethod
def create( type : ELandmarks2D, ulmrks : np.ndarray):
"""
ulmrks np.ndarray (*,2|3)
"""
if not isinstance(type, ELandmarks2D):
raise ValueError('type must be ELandmarks2D')
ulmrks = np.float32(ulmrks)
if len(ulmrks.shape) != 2:
raise ValueError('ulmrks shape must have rank 2')
if ulmrks.shape[1] != 2:
raise ValueError('ulmrks dim must be == 2')
ulmrks_count = ulmrks.shape[0]
if type == ELandmarks2D.L5:
if ulmrks_count != 5:
raise ValueError('ulmrks_count must be == 5')
elif type == ELandmarks2D.L68:
if ulmrks_count != 68:
raise ValueError('ulmrks_count must be == 68')
elif type == ELandmarks2D.L106:
if ulmrks_count != 106:
raise ValueError('ulmrks_count must be == 106')
elif type == ELandmarks2D.L468:
if ulmrks_count != 468:
raise ValueError('ulmrks_count must be == 468')
face_ulmrks = FLandmarks2D()
face_ulmrks._type = type
face_ulmrks._ulmrks = ulmrks
return face_ulmrks
def get_type(self) -> ELandmarks2D: return self._type
def get_count(self) -> int: return self._ulmrks.shape[0]
def as_numpy(self, w_h = None):
"""
get landmarks as np.ndarray
w_h(None) provide (w,h) to scale uniform landmarks to exact size
"""
ulmrks = self._ulmrks.copy()
if w_h is not None:
ulmrks *= w_h
return ulmrks
def transform(self, mat, invert=False) -> 'FLandmarks2D':
"""
Tranforms FLandmarks2D using affine mat and returns new FLandmarks2D()
mat : np.ndarray
"""
if not isinstance(mat, np.ndarray):
raise ValueError('mat must be an instance of np.ndarray')
if invert:
mat = cv2.invertAffineTransform (mat)
ulmrks = self._ulmrks.copy()
ulmrks = np.expand_dims(ulmrks, axis=1)
ulmrks = cv2.transform(ulmrks, mat, ulmrks.shape).squeeze()
return FLandmarks2D.create(type=self._type, ulmrks=ulmrks)
def get_FRect(self, coverage=1.6) -> FRect:
"""
create FRect from landmarks with given coverage
"""
_, uni_mat = self.calc_cut( (1,1), coverage, 1, exclude_moving_parts=False)
xlt, xlb, xrb, xrt = uni_mat.invert().transform_points([[0,0], [0,1], [1,1], [1,0]])
l = min(xlt[0], xlb[0])
t = min(xlt[1], xrt[1])
r = max(xrt[0], xrb[0])
b = max(xlb[1], xrb[1])
return FRect.from_ltrb( (l,t,r,b) )
def calc_cut(self, h_w, coverage : float, output_size : int,
exclude_moving_parts : bool = False,
head_yaw : float = None,
x_offset : float = 0, y_offset : float = 0):
"""
Calculates affine mat for face cut.
returns
mat, matrix to transform img space to face_image space
uni_mat matrix to transform uniform img space to uniform face_image space
"""
h,w = h_w
type = self._type
lmrks = (self._ulmrks * (w,h)).astype(np.float32)
# estimate landmarks transform from global space to local aligned space with bounds [0..1]
if type == ELandmarks2D.L106:
type = ELandmarks2D.L68
lmrks = lmrks[ lmrks_106_to_68_mean_pairs ]
lmrks = lmrks.reshape( (68,2,2)).mean(1)
if type == ELandmarks2D.L68:
mat = Affine2DMat.umeyama( np.concatenate ([ lmrks[17:36], lmrks[36:37], lmrks[39:40], lmrks[42:43], lmrks[45:46], lmrks[48:49], lmrks[54:55] ]), uni_landmarks_68)
elif type == ELandmarks2D.L468:
src_lmrks = lmrks
dst_lmrks = uni_landmarks_468
if exclude_moving_parts:
src_lmrks = np.delete(src_lmrks, landmarks_468_moving_parts_indexes, 0)
dst_lmrks = np.delete(dst_lmrks, landmarks_468_moving_parts_indexes, 0)
mat = Affine2DMat.umeyama(src_lmrks, dst_lmrks)
else:
raise NotImplementedError()
# get corner points in global space
g_p = mat.invert().transform_points ( [(0,0),(1,0),(1,1),(0,1),(0.5,0.5) ] )
g_c = g_p[4]
# calc diagonal vectors between corners in global space
tb_diag_vec = (g_p[2]-g_p[0]).astype(np.float32)
tb_diag_vec /= npla.norm(tb_diag_vec)
bt_diag_vec = (g_p[1]-g_p[3]).astype(np.float32)
bt_diag_vec /= npla.norm(bt_diag_vec)
# calc modifier of diagonal vectors for coverage value
mod = npla.norm(g_p[0]-g_p[2])*(coverage*0.5)
if head_yaw is not None:
# Damp near zero
x_offset += -(head_yaw * np.abs(np.tanh(head_yaw*2)) ) * 0.5
# adjust vertical offset to cover more forehead
h_vec = (g_p[1]-g_p[0]).astype(np.float32)
v_vec = (g_p[3]-g_p[0]).astype(np.float32)
g_c += h_vec*x_offset + v_vec*y_offset
l_t = np.array( [ g_c - tb_diag_vec*mod,
g_c + bt_diag_vec*mod,
g_c + tb_diag_vec*mod ], np.float32 )
# calc affine transform from 3 global space points to 3 local space points size of 'output_size'
mat = Affine2DMat.from_3_pairs ( l_t, np.float32(( (0,0),(output_size,0),(output_size,output_size) )))
uni_mat = Affine2DUniMat.from_3_pairs ( (l_t / (w,h) ).astype(np.float32), np.float32(( (0,0),(1,0),(1,1) )) )
return mat, uni_mat
def cut(self, img : np.ndarray,
coverage : float,
output_size : int,
exclude_moving_parts : bool = False,
head_yaw : float = None,
x_offset : float = 0,
y_offset : float = 0) -> Tuple[np.ndarray, Affine2DUniMat]:
"""
Cut the face to square of output_size from img using landmarks with given parameters
arguments
img np.ndarray
coverage float
output_size int
exclude_moving_parts(False) exclude moving parts of the face, such as eyebrows and jaw
head_yaw(None) float fit the head in center using provided yaw radian value.
x_offset
y_offset float uniform x/y offset
returns face_image,
uni_mat uniform affine matrix to transform uniform img space to uniform face_image space
"""
h,w = img.shape[0:2]
mat, uni_mat = self.calc_cut( (h,w), coverage, output_size, exclude_moving_parts, head_yaw=head_yaw, x_offset=x_offset, y_offset=y_offset)
face_image = cv2.warpAffine(img, mat, (output_size, output_size), cv2.INTER_CUBIC )
return face_image, uni_mat
def draw(self, img : np.ndarray, color, radius=1):
"""
draw landmarks on the img scaled by img.wh
color tuple of values should be the same as img color channels
"""
h,w = img.shape[0:2]
pts = self.as_numpy(w_h=(w,h)).astype(np.int32)
for x, y in pts:
cv2.circle(img, (x, y), radius, color, lineType=cv2.LINE_AA)
def get_convexhull_mask(self, h_w, color=(1,), dtype=np.float32) -> np.ndarray:
"""
"""
h, w = h_w
ch = len(color)
lmrks = (self._ulmrks * h_w).astype(np.int32)
mask = np.zeros( (h,w,ch), dtype=dtype)
cv2.fillConvexPoly( mask, cv2.convexHull(lmrks), color)
return mask
lmrks_106_to_68_mean_pairs = [1,9, 10,11, 12,13, 14,15, 16,2, 3,4, 5,6, 7,8, 0,0, 24,23, 22,21, 20,19, 18,32, 31,30, 29,28, 27,26,25,17,
43,43, 48,44, 49,45, 51,47, 50,46,
102,97, 103,98, 104,99, 105,100, 101,101,
72,72, 73,73, 74,74, 86,86, 77,78, 78,79, 80,80, 85,84, 84,83,
35,35, 41,40, 40,42, 39,39, 37,33, 33,36,
89,89, 95,94, 94,96, 93,93, 91,87, 87,90,
52,52, 64,64, 63,63, 71,71, 67,67, 68,68, 61,61, 58,58, 59,59, 53,53, 56,56, 55,55, 65,65, 66,66, 62,62, 70,70, 69,69, 57,57, 60,60, 54,54]
uni_landmarks_68 = np.float32([
[ 0.000213256, 0.106454 ], #17
[ 0.0752622, 0.038915 ], #18
[ 0.18113, 0.0187482 ], #19
[ 0.29077, 0.0344891 ], #20
[ 0.393397, 0.0773906 ], #21
[ 0.586856, 0.0773906 ], #22
[ 0.689483, 0.0344891 ], #23
[ 0.799124, 0.0187482 ], #24
[ 0.904991, 0.038915 ], #25
[ 0.98004, 0.106454 ], #26
[ 0.490127, 0.203352 ], #27
[ 0.490127, 0.307009 ], #28
[ 0.490127, 0.409805 ], #29
[ 0.490127, 0.515625 ], #30
[ 0.36688, 0.587326 ], #31
[ 0.426036, 0.609345 ], #32
[ 0.490127, 0.628106 ], #33
[ 0.554217, 0.609345 ], #34
[ 0.613373, 0.587326 ], #35
[ 0.121737, 0.216423 ], #36
#[ 0.187122, 0.178758 ], #37
#[ 0.265825, 0.179852 ], #38
[ 0.334606, 0.231733 ], #39
#[ 0.260918, 0.245099 ], #40
#[ 0.182743, 0.244077 ], #41
[ 0.645647, 0.231733 ], #42
#[ 0.714428, 0.179852 ], #43
#[ 0.793132, 0.178758 ], #44
[ 0.858516, 0.216423 ], #45
#[ 0.79751, 0.244077 ], #46
#[ 0.719335, 0.245099 ], #47
[ 0.254149, 0.780233 ], #48
[ 0.726104, 0.780233 ], #54
])
uni_landmarks_468 = np.float32([
[0.499976992607117, 0.652534008026123],
[0.500025987625122, 0.547487020492554],
[0.499974012374878, 0.602371990680695],
[0.482113003730774, 0.471979022026062],
[0.500150978565216, 0.527155995368958],
[0.499909996986389, 0.498252987861633],
[0.499523013830185, 0.40106201171875],
[0.289712011814117, 0.380764007568359],
[0.499954998493195, 0.312398016452789],
[0.499987006187439, 0.269918978214264],
[0.500023007392883, 0.107050001621246],
[0.500023007392883, 0.666234016418457],
[0.5000159740448, 0.679224014282227],
[0.500023007392883, 0.692348003387451],
[0.499976992607117, 0.695277988910675],
[0.499976992607117, 0.70593398809433],
[0.499976992607117, 0.719385027885437],
[0.499976992607117, 0.737019002437592],
[0.499967992305756, 0.781370997428894],
[0.499816000461578, 0.562981009483337],
[0.473773002624512, 0.573909997940063],
[0.104906998574734, 0.254140973091125],
[0.365929991006851, 0.409575998783112],
[0.338757991790771, 0.41302502155304],
[0.311120003461838, 0.409460008144379],
[0.274657994508743, 0.389131009578705],
[0.393361985683441, 0.403706014156342],
[0.345234006643295, 0.344011008739471],
[0.370094001293182, 0.346076011657715],
[0.319321990013123, 0.347265005111694],
[0.297903001308441, 0.353591024875641],
[0.24779200553894, 0.410809993743896],
[0.396889001131058, 0.842755019664764],
[0.280097991228104, 0.375599980354309],
[0.106310002505779, 0.399955987930298],
[0.2099249958992, 0.391353011131287],
[0.355807989835739, 0.534406006336212],
[0.471751004457474, 0.65040397644043],
[0.474155008792877, 0.680191993713379],
[0.439785003662109, 0.657229006290436],
[0.414617002010345, 0.66654098033905],
[0.450374007225037, 0.680860996246338],
[0.428770989179611, 0.682690978050232],
[0.374971002340317, 0.727805018424988],
[0.486716985702515, 0.547628998756409],
[0.485300987958908, 0.527395009994507],
[0.257764995098114, 0.314490020275116],
[0.401223003864288, 0.455172002315521],
[0.429818987846375, 0.548614978790283],
[0.421351999044418, 0.533740997314453],
[0.276895999908447, 0.532056987285614],
[0.483370006084442, 0.499586999416351],
[0.33721199631691, 0.282882988452911],
[0.296391993761063, 0.293242990970612],
[0.169294998049736, 0.193813979625702],
[0.447580009698868, 0.302609980106354],
[0.392390012741089, 0.353887975215912],
[0.354490011930466, 0.696784019470215],
[0.067304998636246, 0.730105042457581],
[0.442739009857178, 0.572826027870178],
[0.457098007202148, 0.584792017936707],
[0.381974011659622, 0.694710969924927],
[0.392388999462128, 0.694203019142151],
[0.277076005935669, 0.271932005882263],
[0.422551989555359, 0.563233017921448],
[0.385919004678726, 0.281364023685455],
[0.383103013038635, 0.255840003490448],
[0.331431001424789, 0.119714021682739],
[0.229923993349075, 0.232002973556519],
[0.364500999450684, 0.189113974571228],
[0.229622006416321, 0.299540996551514],
[0.173287004232407, 0.278747975826263],
[0.472878992557526, 0.666198015213013],
[0.446828007698059, 0.668527007102966],
[0.422762006521225, 0.673889994621277],
[0.445307999849319, 0.580065965652466],
[0.388103008270264, 0.693961024284363],
[0.403039008378983, 0.706539988517761],
[0.403629004955292, 0.693953037261963],
[0.460041999816895, 0.557139039039612],
[0.431158006191254, 0.692366003990173],
[0.452181994915009, 0.692366003990173],
[0.475387006998062, 0.692366003990173],
[0.465828001499176, 0.779190003871918],
[0.472328990697861, 0.736225962638855],
[0.473087012767792, 0.717857003211975],
[0.473122000694275, 0.704625964164734],
[0.473033010959625, 0.695277988910675],
[0.427942007780075, 0.695277988910675],
[0.426479011774063, 0.703539967536926],
[0.423162013292313, 0.711845993995667],
[0.4183090031147, 0.720062971115112],
[0.390094995498657, 0.639572978019714],
[0.013953999616206, 0.560034036636353],
[0.499913990497589, 0.58014702796936],
[0.413199990987778, 0.69539999961853],
[0.409626007080078, 0.701822996139526],
[0.468080013990402, 0.601534962654114],
[0.422728985548019, 0.585985004901886],
[0.463079988956451, 0.593783974647522],
[0.37211999297142, 0.47341400384903],
[0.334562003612518, 0.496073007583618],
[0.411671012639999, 0.546965003013611],
[0.242175996303558, 0.14767599105835],
[0.290776997804642, 0.201445996761322],
[0.327338010072708, 0.256527006626129],
[0.399509996175766, 0.748921036720276],
[0.441727995872498, 0.261676013469696],
[0.429764986038208, 0.187834024429321],
[0.412198007106781, 0.108901023864746],
[0.288955003023148, 0.398952007293701],
[0.218936994671822, 0.435410976409912],
[0.41278201341629, 0.398970007896423],
[0.257135003805161, 0.355440020561218],
[0.427684992551804, 0.437960982322693],
[0.448339998722076, 0.536936044692993],
[0.178560003638268, 0.45755398273468],
[0.247308000922203, 0.457193970680237],
[0.286267012357712, 0.467674970626831],
[0.332827985286713, 0.460712015628815],
[0.368755996227264, 0.447206974029541],
[0.398963987827301, 0.432654976844788],
[0.476410001516342, 0.405806005001068],
[0.189241006970406, 0.523923993110657],
[0.228962004184723, 0.348950982093811],
[0.490725994110107, 0.562400996685028],
[0.404670000076294, 0.485132992267609],
[0.019469000399113, 0.401564002037048],
[0.426243007183075, 0.420431017875671],
[0.396993011236191, 0.548797011375427],
[0.266469985246658, 0.376977026462555],
[0.439121007919312, 0.51895797252655],
[0.032313998788595, 0.644356966018677],
[0.419054001569748, 0.387154996395111],
[0.462783008813858, 0.505746960639954],
[0.238978996872902, 0.779744982719421],
[0.198220998048782, 0.831938028335571],
[0.107550002634525, 0.540755033493042],
[0.183610007166862, 0.740257024765015],
[0.134409993886948, 0.333683013916016],
[0.385764002799988, 0.883153975009918],
[0.490967005491257, 0.579378008842468],
[0.382384985685349, 0.508572995662689],
[0.174399003386497, 0.397670984268188],
[0.318785011768341, 0.39623498916626],
[0.343364000320435, 0.400596976280212],
[0.396100014448166, 0.710216999053955],
[0.187885001301765, 0.588537991046906],
[0.430987000465393, 0.944064974784851],
[0.318993002176285, 0.898285031318665],
[0.266247987747192, 0.869701027870178],
[0.500023007392883, 0.190576016902924],
[0.499976992607117, 0.954452991485596],
[0.366169989109039, 0.398822009563446],
[0.393207013607025, 0.39553701877594],
[0.410373002290726, 0.391080021858215],
[0.194993004202843, 0.342101991176605],
[0.388664990663528, 0.362284004688263],
[0.365961998701096, 0.355970978736877],
[0.343364000320435, 0.355356991291046],
[0.318785011768341, 0.35834002494812],
[0.301414996385574, 0.363156020641327],
[0.058132998645306, 0.319076001644135],
[0.301414996385574, 0.387449026107788],
[0.499987989664078, 0.618434011936188],
[0.415838003158569, 0.624195992946625],
[0.445681989192963, 0.566076993942261],
[0.465844005346298, 0.620640993118286],
[0.49992299079895, 0.351523995399475],
[0.288718998432159, 0.819945991039276],
[0.335278987884521, 0.852819979190826],
[0.440512001514435, 0.902418971061707],
[0.128294005990028, 0.791940987110138],
[0.408771991729736, 0.373893976211548],
[0.455606997013092, 0.451801002025604],
[0.499877005815506, 0.908990025520325],
[0.375436991453171, 0.924192011356354],
[0.11421000212431, 0.615022003650665],
[0.448662012815475, 0.695277988910675],
[0.4480200111866, 0.704632043838501],
[0.447111994028091, 0.715808033943176],
[0.444831997156143, 0.730794012546539],
[0.430011987686157, 0.766808986663818],
[0.406787008047104, 0.685672998428345],
[0.400738000869751, 0.681069016456604],
[0.392399996519089, 0.677703022956848],
[0.367855995893478, 0.663918972015381],
[0.247923001646996, 0.601333022117615],
[0.452769994735718, 0.420849978923798],
[0.43639200925827, 0.359887003898621],
[0.416164010763168, 0.368713974952698],
[0.413385987281799, 0.692366003990173],
[0.228018000721931, 0.683571994304657],
[0.468268007040024, 0.352671027183533],
[0.411361992359161, 0.804327011108398],
[0.499989002943039, 0.469825029373169],
[0.479153990745544, 0.442654013633728],
[0.499974012374878, 0.439637005329132],
[0.432112008333206, 0.493588984012604],
[0.499886006116867, 0.866917014122009],
[0.49991300702095, 0.821729004383087],
[0.456548988819122, 0.819200992584229],
[0.344549000263214, 0.745438992977142],
[0.37890899181366, 0.574010014533997],
[0.374292999505997, 0.780184984207153],
[0.319687992334366, 0.570737957954407],
[0.357154995203018, 0.604269981384277],
[0.295284003019333, 0.621580958366394],
[0.447750002145767, 0.862477004528046],
[0.410986006259918, 0.508723020553589],
[0.31395098567009, 0.775308012962341],
[0.354128003120422, 0.812552988529205],
[0.324548006057739, 0.703992962837219],
[0.189096003770828, 0.646299958229065],
[0.279776990413666, 0.71465802192688],
[0.1338230073452, 0.682700991630554],
[0.336768001317978, 0.644733011722565],
[0.429883986711502, 0.466521978378296],
[0.455527991056442, 0.548622965812683],
[0.437114000320435, 0.558896005153656],
[0.467287987470627, 0.529924988746643],
[0.414712011814117, 0.335219979286194],
[0.37704598903656, 0.322777986526489],
[0.344107985496521, 0.320150971412659],
[0.312875986099243, 0.32233202457428],
[0.283526003360748, 0.333190023899078],
[0.241245999932289, 0.382785975933075],
[0.102986000478268, 0.468762993812561],
[0.267612010240555, 0.424560010433197],
[0.297879010438919, 0.433175981044769],
[0.333433985710144, 0.433878004550934],
[0.366427004337311, 0.426115989685059],
[0.396012008190155, 0.416696012020111],
[0.420121014118195, 0.41022801399231],
[0.007561000064015, 0.480777025222778],
[0.432949006557465, 0.569517970085144],
[0.458638995885849, 0.479089021682739],
[0.473466008901596, 0.545744001865387],
[0.476087987422943, 0.563830018043518],
[0.468472003936768, 0.555056989192963],
[0.433990985155106, 0.582361996173859],
[0.483518004417419, 0.562983989715576],
[0.482482999563217, 0.57784903049469],
[0.42645001411438, 0.389798998832703],
[0.438998997211456, 0.39649498462677],
[0.450067013502121, 0.400434017181396],
[0.289712011814117, 0.368252992630005],
[0.276670008897781, 0.363372981548309],
[0.517862021923065, 0.471948027610779],
[0.710287988185883, 0.380764007568359],
[0.526226997375488, 0.573909997940063],
[0.895093023777008, 0.254140973091125],
[0.634069979190826, 0.409575998783112],
[0.661242008209229, 0.41302502155304],
[0.688880026340485, 0.409460008144379],
[0.725341975688934, 0.389131009578705],
[0.606630027294159, 0.40370500087738],
[0.654766023159027, 0.344011008739471],
[0.629905998706818, 0.346076011657715],
[0.680678009986877, 0.347265005111694],
[0.702096998691559, 0.353591024875641],
[0.75221198797226, 0.410804986953735],
[0.602918028831482, 0.842862963676453],
[0.719901978969574, 0.375599980354309],
[0.893692970275879, 0.399959981441498],
[0.790081977844238, 0.391354024410248],
[0.643998026847839, 0.534487962722778],
[0.528249025344849, 0.65040397644043],
[0.525849997997284, 0.680191040039062],
[0.560214996337891, 0.657229006290436],
[0.585384011268616, 0.66654098033905],
[0.549625992774963, 0.680860996246338],
[0.57122802734375, 0.682691991329193],
[0.624852001667023, 0.72809898853302],
[0.513050019741058, 0.547281980514526],
[0.51509702205658, 0.527251958847046],
[0.742246985435486, 0.314507007598877],
[0.598631024360657, 0.454979002475739],
[0.570338010787964, 0.548575043678284],
[0.578631997108459, 0.533622980117798],
[0.723087012767792, 0.532054007053375],
[0.516445994377136, 0.499638974666595],
[0.662801027297974, 0.282917976379395],
[0.70362401008606, 0.293271005153656],
[0.830704987049103, 0.193813979625702],
[0.552385985851288, 0.302568018436432],
[0.607609987258911, 0.353887975215912],
[0.645429015159607, 0.696707010269165],
[0.932694971561432, 0.730105042457581],
[0.557260990142822, 0.572826027870178],
[0.542901992797852, 0.584792017936707],
[0.6180260181427, 0.694710969924927],
[0.607590973377228, 0.694203019142151],
[0.722943007946014, 0.271963000297546],
[0.577413976192474, 0.563166975975037],
[0.614082992076874, 0.281386971473694],
[0.616907000541687, 0.255886018276215],
[0.668509006500244, 0.119913995265961],
[0.770092010498047, 0.232020974159241],
[0.635536015033722, 0.189248979091644],
[0.77039098739624, 0.299556016921997],
[0.826722025871277, 0.278755009174347],
[0.527121007442474, 0.666198015213013],
[0.553171992301941, 0.668527007102966],
[0.577238023281097, 0.673889994621277],
[0.554691970348358, 0.580065965652466],
[0.611896991729736, 0.693961024284363],
[0.59696102142334, 0.706539988517761],
[0.596370995044708, 0.693953037261963],
[0.539958000183105, 0.557139039039612],
[0.568841993808746, 0.692366003990173],
[0.547818005084991, 0.692366003990173],
[0.52461302280426, 0.692366003990173],
[0.534089982509613, 0.779141008853912],
[0.527670979499817, 0.736225962638855],
[0.526912987232208, 0.717857003211975],
[0.526877999305725, 0.704625964164734],
[0.526966989040375, 0.695277988910675],
[0.572058022022247, 0.695277988910675],
[0.573521018028259, 0.703539967536926],
[0.57683801651001, 0.711845993995667],
[0.581691026687622, 0.720062971115112],
[0.609944999217987, 0.639909982681274],
[0.986046016216278, 0.560034036636353],
[0.5867999792099, 0.69539999961853],
[0.590372025966644, 0.701822996139526],
[0.531915009021759, 0.601536989212036],
[0.577268004417419, 0.585934996604919],
[0.536915004253387, 0.593786001205444],
[0.627542972564697, 0.473352015018463],
[0.665585994720459, 0.495950996875763],
[0.588353991508484, 0.546862006187439],
[0.757824003696442, 0.14767599105835],
[0.709249973297119, 0.201507985591888],
[0.672684013843536, 0.256581008434296],
[0.600408971309662, 0.74900496006012],
[0.55826598405838, 0.261672019958496],
[0.570303976535797, 0.187870979309082],
[0.588165998458862, 0.109044015407562],
[0.711045026779175, 0.398952007293701],
[0.781069993972778, 0.435405015945435],
[0.587247014045715, 0.398931980133057],
[0.742869973182678, 0.355445981025696],
[0.572156012058258, 0.437651991844177],
[0.55186802148819, 0.536570012569427],
[0.821442008018494, 0.457556009292603],
[0.752701997756958, 0.457181990146637],
[0.71375697851181, 0.467626988887787],
[0.66711300611496, 0.460672974586487],
[0.631101012229919, 0.447153985500336],
[0.6008620262146, 0.432473003864288],
[0.523481011390686, 0.405627012252808],
[0.810747981071472, 0.523926019668579],
[0.771045982837677, 0.348959028720856],
[0.509127020835876, 0.562718033790588],
[0.595292985439301, 0.485023975372314],
[0.980530977249146, 0.401564002037048],
[0.573499977588654, 0.420000016689301],
[0.602994978427887, 0.548687994480133],
[0.733529984951019, 0.376977026462555],
[0.560611009597778, 0.519016981124878],
[0.967685997486115, 0.644356966018677],
[0.580985009670258, 0.387160003185272],
[0.537728011608124, 0.505385041236877],
[0.760966002941132, 0.779752969741821],
[0.801778972148895, 0.831938028335571],
[0.892440974712372, 0.54076099395752],
[0.816350996494293, 0.740260004997253],
[0.865594983100891, 0.333687007427216],
[0.614073991775513, 0.883246004581451],
[0.508952975273132, 0.579437971115112],
[0.617941975593567, 0.508316040039062],
[0.825608015060425, 0.397674977779388],
[0.681214988231659, 0.39623498916626],
[0.656635999679565, 0.400596976280212],
[0.603900015354156, 0.710216999053955],
[0.81208598613739, 0.588539004325867],
[0.56801301240921, 0.944564998149872],
[0.681007981300354, 0.898285031318665],
[0.733752012252808, 0.869701027870178],
[0.633830010890961, 0.398822009563446],
[0.606792986392975, 0.39553701877594],
[0.589659988880157, 0.391062021255493],
[0.805015981197357, 0.342108011245728],
[0.611334979534149, 0.362284004688263],
[0.634037971496582, 0.355970978736877],
[0.656635999679565, 0.355356991291046],
[0.681214988231659, 0.35834002494812],
[0.698584973812103, 0.363156020641327],
[0.941866993904114, 0.319076001644135],
[0.698584973812103, 0.387449026107788],
[0.584177017211914, 0.624107003211975],
[0.554318010807037, 0.566076993942261],
[0.534153997898102, 0.62064003944397],
[0.711217999458313, 0.819975018501282],
[0.664629995822906, 0.852871000766754],
[0.559099972248077, 0.902631998062134],
[0.871706008911133, 0.791940987110138],
[0.591234028339386, 0.373893976211548],
[0.544341027736664, 0.451583981513977],
[0.624562978744507, 0.924192011356354],
[0.88577002286911, 0.615028977394104],
[0.551338016986847, 0.695277988910675],
[0.551980018615723, 0.704632043838501],
[0.552887976169586, 0.715808033943176],
[0.555167973041534, 0.730794012546539],
[0.569944024085999, 0.767035007476807],
[0.593203008174896, 0.685675978660583],
[0.599261999130249, 0.681069016456604],
[0.607599973678589, 0.677703022956848],
[0.631937980651855, 0.663500010967255],
[0.752032995223999, 0.601315021514893],
[0.547226011753082, 0.420395016670227],
[0.563543975353241, 0.359827995300293],
[0.583841025829315, 0.368713974952698],
[0.586614012718201, 0.692366003990173],
[0.771915018558502, 0.683578014373779],
[0.531597018241882, 0.352482974529266],
[0.588370978832245, 0.804440975189209],
[0.52079701423645, 0.442565023899078],
[0.567984998226166, 0.493479013442993],
[0.543282985687256, 0.819254994392395],
[0.655317008495331, 0.745514988899231],
[0.621008992195129, 0.574018001556396],
[0.625559985637665, 0.78031200170517],
[0.680198013782501, 0.570719003677368],
[0.64276397228241, 0.604337990283966],
[0.704662978649139, 0.621529996395111],
[0.552012026309967, 0.862591981887817],
[0.589071989059448, 0.508637011051178],
[0.685944974422455, 0.775357007980347],
[0.645735025405884, 0.812640011310577],
[0.675342977046967, 0.703978002071381],
[0.810858011245728, 0.646304965019226],
[0.72012197971344, 0.714666962623596],
[0.866151988506317, 0.682704985141754],
[0.663187026977539, 0.644596993923187],
[0.570082008838654, 0.466325998306274],
[0.544561982154846, 0.548375964164734],
[0.562758982181549, 0.558784961700439],
[0.531987011432648, 0.530140042304993],
[0.585271000862122, 0.335177004337311],
[0.622952997684479, 0.32277899980545],
[0.655896008014679, 0.320163011550903],
[0.687132000923157, 0.322345972061157],
[0.716481983661652, 0.333200991153717],
[0.758756995201111, 0.382786989212036],
[0.897013008594513, 0.468769013881683],
[0.732392013072968, 0.424547016620636],
[0.70211398601532, 0.433162987232208],
[0.66652500629425, 0.433866024017334],
[0.633504986763, 0.426087975502014],
[0.603875994682312, 0.416586995124817],
[0.579657971858978, 0.409945011138916],
[0.992439985275269, 0.480777025222778],
[0.567192018032074, 0.569419980049133],
[0.54136598110199, 0.478899002075195],
[0.526564002037048, 0.546118021011353],
[0.523913025856018, 0.563830018043518],
[0.531529009342194, 0.555056989192963],
[0.566035985946655, 0.582329034805298],
[0.51631098985672, 0.563053965568542],
[0.5174720287323, 0.577877044677734],
[0.573594987392426, 0.389806985855103],
[0.560697972774506, 0.395331978797913],
[0.549755990505219, 0.399751007556915],
[0.710287988185883, 0.368252992630005],
[0.723330020904541, 0.363372981548309]
])
landmarks_468_moving_parts_indexes = [0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 95, 96, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 117, 118, 124, 130, 132, 133, 135, 136, 138, 139, 140, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 168, 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 189, 190, 191, 192, 193, 194, 199, 200, 201, 202, 204, 208, 210, 211, 212, 213, 214, 215, 221, 222, 223, 224, 225, 226, 228, 229, 230, 231, 232, 233, 243, 244, 245, 246, 247, 249, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 267, 268, 269, 270, 271, 272, 273, 276, 282, 283, 284, 285, 286, 287, 288, 291, 292, 293, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 306, 307, 308, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 324, 325, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 346, 347, 353, 359, 361, 362, 364, 365, 367, 368, 369, 372, 373, 374, 375, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 394, 395, 396, 397, 398, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 413, 414, 415, 416, 417, 418, 421, 422, 424, 428, 430, 431, 432, 433, 434, 435, 441, 442, 443, 444, 445, 446, 448, 449, 450, 451, 452, 453, 463, 464, 465, 466, 467]
uni_landmarks_468 = np.array(
[[ 0.49066195, 0.7133885 ],
[ 0.49042386, 0.52723485],
[ 0.49050152, 0.6244965 ],
[ 0.45844677, 0.39348277],
[ 0.4905825 , 0.49120593],
[ 0.49006602, 0.43998772],
[ 0.48907965, 0.26775706],
[ 0.11721139, 0.23243594],
[ 0.48957095, 0.11063451],
[ 0.48949632, 0.03535742],
[ 0.48905632, -0.25326234],
[ 0.4907858 , 0.73766613],
[ 0.49081355, 0.7606857 ],
[ 0.4908666 , 0.7839426 ],
[ 0.49079415, 0.78913504],
[ 0.4908271 , 0.80801845],
[ 0.49086872, 0.831855 ],
[ 0.49092326, 0.8631041 ],
[ 0.49104446, 0.94170016],
[ 0.49009967, 0.5546924 ],
[ 0.44398275, 0.5741402 ],
[-0.2106727 , 0.00861922],
[ 0.2523662 , 0.2832579 ],
[ 0.2042254 , 0.28945392],
[ 0.1552372 , 0.28322184],
[ 0.09056008, 0.24730967],
[ 0.30096018, 0.27277085],
[ 0.21548809, 0.16713436],
[ 0.2595488 , 0.17071684],
[ 0.16957955, 0.17298089],
[ 0.13164258, 0.18425746],
[ 0.043018 , 0.28581 ],
[ 0.30856833, 1.0507976 ],
[ 0.10015843, 0.22331452],
[-0.20773543, 0.26701325],
[-0.02414621, 0.25144747],
[ 0.23481508, 0.5045001 ],
[ 0.44063616, 0.7097012 ],
[ 0.4449884 , 0.762481 ],
[ 0.3840104 , 0.7218947 ],
[ 0.33943903, 0.73847425],
[ 0.40284824, 0.76374006],
[ 0.36457124, 0.76704985],
[ 0.26937196, 0.84716266],
[ 0.46683946, 0.5275276 ],
[ 0.4642676 , 0.49167544],
[ 0.06039319, 0.11509081],
[ 0.31504983, 0.36394927],
[ 0.3660137 , 0.52945083],
[ 0.3509634 , 0.50311893],
[ 0.09496811, 0.5005815 ],
[ 0.46075967, 0.4424029 ],
[ 0.20108324, 0.05883435],
[ 0.12877828, 0.07731954],
[-0.09675749, -0.09848522],
[ 0.39672711, 0.09345116],
[ 0.29908365, 0.18449144],
[ 0.23298171, 0.7922538 ],
[-0.27583498, 0.85219014],
[ 0.38898414, 0.5723152 ],
[ 0.41446668, 0.59347576],
[ 0.28167963, 0.7884952 ],
[ 0.30013445, 0.7875627 ],
[ 0.09448256, 0.03961415],
[ 0.3531811 , 0.5553779 ],
[ 0.2873921 , 0.05599196],
[ 0.28232294, 0.01076962],
[ 0.1903341 , -0.23029903],
[ 0.0108011 , -0.03099815],
[ 0.24915197, -0.10741784],
[ 0.01047484, 0.08868673],
[-0.08942058, 0.05201372],
[ 0.44268388, 0.7376863 ],
[ 0.39652622, 0.741894 ],
[ 0.35389552, 0.7514722 ],
[ 0.393559 , 0.5851372 ],
[ 0.2925385 , 0.7871472 ],
[ 0.31904542, 0.80939215],
[ 0.32005206, 0.787085 ],
[ 0.4195982 , 0.5444628 ],
[ 0.3688312 , 0.78418756],
[ 0.40608776, 0.7841225 ],
[ 0.4472093 , 0.78405076],
[ 0.43053833, 0.9379409 ],
[ 0.44192585, 0.8617842 ],
[ 0.44321233, 0.82923037],
[ 0.4432334 , 0.80578357],
[ 0.44304678, 0.78921837],
[ 0.36314115, 0.7893578 ],
[ 0.36057413, 0.8040033 ],
[ 0.35472178, 0.8187327 ],
[ 0.34614718, 0.83330894],
[ 0.2959003 , 0.69076014],
[-0.37090415, 0.5509728 ],
[ 0.4903264 , 0.5851119 ],
[ 0.3370172 , 0.78961957],
[ 0.33070365, 0.8010128 ],
[ 0.43397966, 0.6231119 ],
[ 0.35356513, 0.59569615],
[ 0.42509514, 0.6093918 ],
[ 0.2635329 , 0.39636588],
[ 0.19704658, 0.43663597],
[ 0.33384863, 0.52658314],
[ 0.03225203, -0.18047164],
[ 0.11854403, -0.08533629],
[ 0.18350407, 0.01215954],
[ 0.31292278, 0.8845064 ],
[ 0.3862302 , 0.02093028],
[ 0.36480215, -0.1098879 ],
[ 0.33342764, -0.2497105 ],
[ 0.11592615, 0.2646692 ],
[-0.00803981, 0.3294946 ],
[ 0.33535972, 0.26431814],
[ 0.05940344, 0.18766014],
[ 0.36188984, 0.33336782],
[ 0.39879864, 0.50869733],
[-0.07952328, 0.36885905],
[ 0.04230375, 0.36800843],
[ 0.11137532, 0.3864613 ],
[ 0.19386435, 0.37397826],
[ 0.25749052, 0.34993485],
[ 0.310977 , 0.3240539 ],
[ 0.44813582, 0.2762354 ],
[-0.06039021, 0.4864401 ],
[ 0.00945808, 0.17624807],
[ 0.4739895 , 0.55369264],
[ 0.32125092, 0.4170324 ],
[-0.36162117, 0.27013144],
[ 0.3592803 , 0.3023075 ],
[ 0.30784345, 0.529875 ],
[ 0.07601253, 0.22579695],
[ 0.3824061 , 0.47686696],
[-0.33810768, 0.70034444],
[ 0.34643772, 0.24336138],
[ 0.42429656, 0.45338264],
[ 0.02854156, 0.939626 ],
[-0.04352415, 1.0322431 ],
[-0.20510256, 0.51651907],
[-0.06969981, 0.8698207 ],
[-0.1581445 , 0.14948419],
[ 0.2889787 , 1.1224228 ],
[ 0.47446907, 0.58377683],
[ 0.2818322 , 0.4586393 ],
[-0.08708218, 0.2627534 ],
[ 0.16877942, 0.25976214],
[ 0.21234928, 0.267416 ],
[ 0.30676025, 0.81592965],
[-0.06259334, 0.6009466 ],
[ 0.36930662, 1.2302231 ],
[ 0.17070079, 1.149443 ],
[ 0.07714309, 1.0989524 ],
[ 0.48931465, -0.1052461 ],
[ 0.49159575, 1.2484183 ],
[ 0.2527582 , 0.26420003],
[ 0.30066028, 0.25829503],
[ 0.3310663 , 0.25034374],
[-0.05075949, 0.16421606],
[ 0.29250854, 0.19938153],
[ 0.2522571 , 0.18826446],
[ 0.21220936, 0.18724632],
[ 0.16866222, 0.19260857],
[ 0.13789575, 0.2011967 ],
[-0.29335994, 0.12383505],
[ 0.1379709 , 0.24424627],
[ 0.49057597, 0.65296 ],
[ 0.34147182, 0.663431 ],
[ 0.3941785 , 0.5603462 ],
[ 0.43007633, 0.6569765 ],
[ 0.48963526, 0.17996965],
[ 0.11681002, 1.0107123 ],
[ 0.19942053, 1.068824 ],
[ 0.38605705, 1.1563928 ],
[-0.16756529, 0.9615808 ],
[ 0.32817602, 0.21989337],
[ 0.41141313, 0.3578073 ],
[ 0.49127796, 1.1678538 ],
[ 0.27080515, 1.195178 ],
[-0.19307071, 0.6481067 ],
[ 0.399859 , 0.7892937 ],
[ 0.39875022, 0.80587196],
[ 0.39717573, 0.8256797 ],
[ 0.3931817 , 0.85224336],
[ 0.3670306 , 0.9161113 ],
[ 0.3256227 , 0.7724022 ],
[ 0.31488904, 0.76426226],
[ 0.3001029 , 0.7583232 ],
[ 0.2565659 , 0.73397243],
[ 0.0438394 , 0.6234349 ],
[ 0.40628996, 0.30296788],
[ 0.37707803, 0.19498621],
[ 0.34125936, 0.21069102],
[ 0.33733743, 0.7842425 ],
[ 0.00882016, 0.769232 ],
[ 0.4335431 , 0.1821002 ],
[ 0.33409703, 0.9826546 ],
[ 0.49011812, 0.3896104 ],
[ 0.45311242, 0.34152514],
[ 0.4899982 , 0.33611432],
[ 0.369907 , 0.43193236],
[ 0.49116373, 1.0932964 ],
[ 0.49107185, 1.0132186 ],
[ 0.41421878, 1.008873 ],
[ 0.21551576, 0.8785059 ],
[ 0.27587482, 0.57461077],
[ 0.2683325 , 0.9399872 ],
[ 0.17091931, 0.56899554],
[ 0.23741819, 0.6283017 ],
[ 0.12783033, 0.65916985],
[ 0.39875996, 1.0855893 ],
[ 0.33251646, 0.45881665],
[ 0.16138549, 0.93153137],
[ 0.23269826, 0.99740875],
[ 0.17994387, 0.8051213 ],
[-0.06026869, 0.7033027 ],
[ 0.10063827, 0.8241594 ],
[-0.15810522, 0.7679798 ],
[ 0.2014156 , 0.7000692 ],
[ 0.365875 , 0.3839739 ],
[ 0.4115726 , 0.5293855 ],
[ 0.378973 , 0.5476473 ],
[ 0.43235463, 0.49621448],
[ 0.3385827 , 0.15134089],
[ 0.27179635, 0.12940899],
[ 0.21341887, 0.12485553],
[ 0.15807948, 0.12881717],
[ 0.10610204, 0.14814937],
[ 0.03133116, 0.236169 ],
[-0.21341309, 0.38895622],
[ 0.07818349, 0.3101151 ],
[ 0.1318462 , 0.32528982],
[ 0.19485526, 0.32642388],
[ 0.25329807, 0.31256682],
[ 0.30569646, 0.29578218],
[ 0.34839994, 0.2842457 ],
[-0.3824783 , 0.41054142],
[ 0.37162504, 0.5664833 ],
[ 0.41687053, 0.40615496],
[ 0.4433516 , 0.5242282 ],
[ 0.44805393, 0.5562703 ],
[ 0.43453053, 0.5407472 ],
[ 0.37351128, 0.58924097],
[ 0.46121803, 0.55474806],
[ 0.45942986, 0.5810936 ],
[ 0.35955238, 0.24802393],
[ 0.38181108, 0.25985107],
[ 0.40143687, 0.26679716],
[ 0.11717269, 0.2102652 ],
[ 0.0940459 , 0.2016577 ],
[ 0.5217974 , 0.39331725],
[ 0.8625129 , 0.23113514],
[ 0.5369363 , 0.57397795],
[ 1.1896138 , 0.00617525],
[ 0.7275363 , 0.28242856],
[ 0.7756985 , 0.2884565 ],
[ 0.82466465, 0.28205347],
[ 0.88921595, 0.24591576],
[ 0.6788919 , 0.27210945],
[ 0.7640089 , 0.166177 ],
[ 0.7199609 , 0.16991326],
[ 0.8099376 , 0.17186326],
[ 0.8479136 , 0.18300733],
[ 0.9368992 , 0.28424102],
[ 0.67367214, 1.0503516 ],
[ 0.8795338 , 0.22195426],
[ 1.1875838 , 0.26458502],
[ 1.0039485 , 0.24965489],
[ 0.74551606, 0.50375396],
[ 0.54075617, 0.7095265 ],
[ 0.5365969 , 0.76231945],
[ 0.59742403, 0.7215222 ],
[ 0.6420548 , 0.7379461 ],
[ 0.5787324 , 0.7634331 ],
[ 0.617019 , 0.766611 ],
[ 0.71218634, 0.8469107 ],
[ 0.513503 , 0.52683127],
[ 0.5170686 , 0.49132976],
[ 0.91894245, 0.11362247],
[ 0.66487545, 0.36299667],
[ 0.61502695, 0.52894545],
[ 0.6296784 , 0.50242335],
[ 0.88566196, 0.49919614],
[ 0.5193738 , 0.4423927 ],
[ 0.7780587 , 0.05788935],
[ 0.8504331 , 0.07610969],
[ 1.0753254 , -0.1005309 ],
[ 0.5824533 , 0.09305263],
[ 0.6804744 , 0.18382579],
[ 0.7485537 , 0.79121745],
[ 1.2577202 , 0.8495136 ],
[ 0.59192824, 0.57196105],
[ 0.5665197 , 0.59321034],
[ 0.6999867 , 0.7877651 ],
[ 0.6814933 , 0.7868972 ],
[ 0.8846023 , 0.03829005],
[ 0.62761134, 0.5547819 ],
[ 0.6917209 , 0.05532694],
[ 0.6966465 , 0.01012804],
[ 0.7876697 , -0.2309872 ],
[ 0.9680314 , -0.03263693],
[ 0.7294528 , -0.1080169 ],
[ 0.96877015, 0.08704082],
[ 1.0685298 , 0.05000517],
[ 0.538806 , 0.7375185 ],
[ 0.5849781 , 0.7415651 ],
[ 0.62764204, 0.7509944 ],
[ 0.58739805, 0.5847989 ],
[ 0.68912315, 0.78645504],
[ 0.6626941 , 0.8087924 ],
[ 0.6616096 , 0.7864889 ],
[ 0.5612171 , 0.5442156 ],
[ 0.61282057, 0.7837617 ],
[ 0.575564 , 0.7838267 ],
[ 0.5344426 , 0.7838985 ],
[ 0.551505 , 0.93764293],
[ 0.5399973 , 0.8616131 ],
[ 0.53859717, 0.8290639 ],
[ 0.5384943 , 0.8056173 ],
[ 0.53862303, 0.78905153],
[ 0.6185288 , 0.78891206],
[ 0.62114686, 0.8035485 ],
[ 0.62705064, 0.81825733],
[ 0.635676 , 0.8328036 ],
[ 0.6854969 , 0.69067734],
[ 1.3517375 , 0.54796624],
[ 0.64465326, 0.78908265],
[ 0.6510032 , 0.8004538 ],
[ 0.5471015 , 0.62291807],
[ 0.62742317, 0.59512955],
[ 0.55593795, 0.6091671 ],
[ 0.7161671 , 0.39546603],
[ 0.7836529 , 0.435396 ],
[ 0.64694774, 0.5258542 ],
[ 0.94603044, -0.1820665 ],
[ 0.86011904, -0.08652072],
[ 0.79549086, 0.01118712],
[ 0.66893554, 0.8840338 ],
[ 0.59274685, 0.02056277],
[ 0.613851 , -0.11025709],
[ 0.64526045, -0.25000137],
[ 0.8639107 , 0.26336375],
[ 0.9881146 , 0.3277454 ],
[ 0.6445285 , 0.26371115],
[ 0.92017305, 0.18616839],
[ 0.61790556, 0.3323734 ],
[ 0.58225924, 0.5077285 ],
[ 1.0597262 , 0.36687428],
[ 0.93791103, 0.36642405],
[ 0.86892897, 0.38505408],
[ 0.78624976, 0.37287512],
[ 0.7223912 , 0.34902957],
[ 0.6687594 , 0.32310694],
[ 0.5315497 , 0.2757726 ],
[ 1.0409807 , 0.48452145],
[ 0.9700836 , 0.17458573],
[ 0.5065989 , 0.55419755],
[ 0.6590531 , 0.41624966],
[ 1.3414742 , 0.26715896],
[ 0.62023264, 0.30108824],
[ 0.67289865, 0.5290446 ],
[ 0.9036883 , 0.22435239],
[ 0.59769833, 0.47659585],
[ 1.3194624 , 0.6974514 ],
[ 0.63339525, 0.24286939],
[ 0.5571053 , 0.45250946],
[ 0.9535533 , 0.9380257 ],
[ 1.0260391 , 1.0303764 ],
[ 1.1858007 , 0.51410204],
[ 1.0515786 , 0.867869 ],
[ 1.1375865 , 0.14722979],
[ 0.6935665 , 1.1218798 ],
[ 0.5063422 , 0.58382744],
[ 0.69926125, 0.45745537],
[ 1.0669235 , 0.26074636],
[ 0.8110406 , 0.25864118],
[ 0.7674977 , 0.26644707],
[ 0.67500204, 0.81528693],
[ 1.0435516 , 0.5990178 ],
[ 0.6121316 , 1.2306852 ],
[ 0.81222653, 1.1483234 ],
[ 0.9056057 , 1.0975065 ],
[ 0.7270778 , 0.26337218],
[ 0.6791554 , 0.25763443],
[ 0.6487802 , 0.24975733],
[ 1.0302606 , 0.16233999],
[ 0.68710136, 0.19869283],
[ 0.72731376, 0.18743533],
[ 0.7673578 , 0.1862774 ],
[ 0.81092334, 0.1914876 ],
[ 0.84171957, 0.1999683 ],
[ 1.2727026 , 0.12110176],
[ 0.8417947 , 0.24301787],
[ 0.63978463, 0.6627527 ],
[ 0.5866921 , 0.5600102 ],
[ 0.5511283 , 0.6567636 ],
[ 0.8655194 , 1.009457 ],
[ 0.78306264, 1.0678959 ],
[ 0.59620714, 1.1564037 ],
[ 1.149833 , 0.9592815 ],
[ 0.65151644, 0.21932903],
[ 0.56865776, 0.3571483 ],
[ 0.71228063, 1.1944076 ],
[ 1.1742088 , 0.6457327 ],
[ 0.5818109 , 0.78897613],
[ 0.5829775 , 0.80555046],
[ 0.5846211 , 0.82535255],
[ 0.5887078 , 0.8519021 ],
[ 0.6150045 , 0.916079 ],
[ 0.65597004, 0.771831 ],
[ 0.66669285, 0.7636482 ],
[ 0.6814582 , 0.7576576 ],
[ 0.7245435 , 0.73241323],
[ 0.9371713 , 0.62184393],
[ 0.5736738 , 0.30186948],
[ 0.60240346, 0.19448838],
[ 0.6383993 , 0.21017241],
[ 0.64431435, 0.7837067 ],
[ 0.9726586 , 0.7675604 ],
[ 0.54576766, 0.18157108],
[ 0.6477745 , 0.98230904],
[ 0.5269076 , 0.34123868],
[ 0.61068684, 0.43131724],
[ 0.56792 , 1.0087004 ],
[ 0.7662271 , 0.8776794 ],
[ 0.7048996 , 0.57387614],
[ 0.7136024 , 0.9394351 ],
[ 0.8097781 , 0.56784695],
[ 0.7435453 , 0.62753886],
[ 0.85328954, 0.6578133 ],
[ 0.5835228 , 1.0854707 ],
[ 0.64810187, 0.45811343],
[ 0.82059515, 0.9304676 ],
[ 0.7494546 , 0.9966611 ],
[ 0.8015866 , 0.80400985],
[ 1.0415541 , 0.70138854],
[ 0.8809724 , 0.8228132 ],
[ 1.1396528 , 0.7657218 ],
[ 0.7798614 , 0.69881856],
[ 0.6143189 , 0.383193 ],
[ 0.56934875, 0.52867246],
[ 0.60162777, 0.54706186],
[ 0.5470082 , 0.4963955 ],
[ 0.6408297 , 0.15073723],
[ 0.7075675 , 0.12865019],
[ 0.76593757, 0.12391254],
[ 0.8212976 , 0.12768434],
[ 0.87334216, 0.14682971],
[ 0.948411 , 0.23457018],
[ 1.1936799 , 0.38651106],
[ 0.90181875, 0.30865455],
[ 0.84818983, 0.3240165 ],
[ 0.7851249 , 0.32537246],
[ 0.72658616, 0.3116911 ],
[ 0.6740513 , 0.2949461 ],
[ 0.63111407, 0.28325075],
[ 1.362823 , 0.4074953 ],
[ 0.60951644, 0.5658945 ],
[ 0.5634702 , 0.4055624 ],
[ 0.5374476 , 0.5247268 ],
[ 0.53280455, 0.5561224 ],
[ 0.5462737 , 0.5405522 ],
[ 0.6075077 , 0.58877414],
[ 0.51933056, 0.55477065],
[ 0.52143395, 0.58103496],
[ 0.62030756, 0.24758299],
[ 0.59746987, 0.2574137 ],
[ 0.5780933 , 0.2652785 ],
[ 0.8624742 , 0.2089644 ],
[ 0.8855709 , 0.20027623]], dtype=np.float32)
# import numpy as np
# import cv2
# pts = uni_landmarks_468
# res = 900
# pts -= pts.min(axis=0)
# pts /= pts.max(axis=0)
# pts *= [res, res]
# pts = pts.astype(np.int)
# img = np.zeros( (res,res,3), np.uint8 )
# wnd_name = 'asd'
# selected = [False]*len(pts)
# sel = [0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 95, 96, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 117, 118, 124, 130, 132, 133, 135, 136, 138, 139, 140, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 168, 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 189, 190, 191, 192, 193, 194, 199, 200, 201, 202, 204, 208, 210, 211, 212, 213, 214, 215, 221, 222, 223, 224, 225, 226, 228, 229, 230, 231, 232, 233, 243, 244, 245, 246, 247, 249, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 267, 268, 269, 270, 271, 272, 273, 276, 282, 283, 284, 285, 286, 287, 288, 291, 292, 293, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 306, 307, 308, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 324, 325, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 346, 347, 353, 359, 361, 362, 364, 365, 367, 368, 369, 372, 373, 374, 375, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 394, 395, 396, 397, 398, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 413, 414, 415, 416, 417, 418, 421, 422, 424, 428, 430, 431, 432, 433, 434, 435, 441, 442, 443, 444, 445, 446, 448, 449, 450, 451, 452, 453, 463, 464, 465, 466, 467]
# print(len(sel))
# for i in sel:
# selected[i] = True
# select_holding = False
# unselect_holding = False
# def onMouse(event, x, y, flags, _):
# global select_holding
# global unselect_holding
# if event == cv2.EVENT_LBUTTONDOWN:
# select_holding = True
# elif event == cv2.EVENT_LBUTTONUP:
# select_holding = False
# elif event == cv2.EVENT_RBUTTONDOWN:
# unselect_holding = True
# elif event == cv2.EVENT_RBUTTONUP:
# unselect_holding = False
# elif event == cv2.EVENT_MBUTTONDOWN:
# print([ i for i, x in enumerate(selected) if x == True ])
# pt_idx = np.argsort( np.linalg.norm(pts - [x,y], axis=1) )[0]
# if select_holding:
# selected[pt_idx] = True
# if unselect_holding:
# selected[pt_idx] = False
# cv2.namedWindow(wnd_name)
# cv2.setMouseCallback(wnd_name, onMouse)
# while True:
# for pt_idx, (x,y) in enumerate(pts):
# if selected[pt_idx]:
# color = (255,0,0)
# else:
# color = (255,255,255)
# cv2.circle(img, (x,y), 1, color, 1 )
# cv2.imshow(wnd_name,img)
# cv2.waitKey(5)
# import multiprocessing
# import threading
# import time
# def proc1(ev = multiprocessing.Event()):
# while True:
# ev.wait(timeout=0.001)
# # def proc2(obj : ClassWithEvent):
# # print('before wait')
# # obj.ev.wait(timeout=0.005)
# # print('after wait')
# if __name__ == '__main__':
# multiprocessing.set_start_method('spawn', force=True)
# ev = multiprocessing.Event()
# ev.set()
# p = multiprocessing.Process(target=proc1, args=(ev,), daemon=True)
# threading.Thread(target=lambda: p.start(), daemon=True).start()
# time.sleep(1.0)
# p.terminate()
# p.join()
# del p
# # p = multiprocessing.Process(target=proc2, args=(obj,), daemon=True)
# # threading.Thread(target=lambda: p.start(), daemon=True).start()
# # time.sleep(1.0)
# import code
# code.interact(local=dict(globals(), **locals()))
| 38.716105 | 1,540 | 0.616724 | 6,151 | 51,686 | 5.140465 | 0.39522 | 0.003985 | 0.004301 | 0.003289 | 0.095101 | 0.089598 | 0.073975 | 0.071697 | 0.071223 | 0.071223 | 0 | 0.64525 | 0.229095 | 51,686 | 1,334 | 1,541 | 38.745127 | 0.1483 | 0.106586 | 0 | 0.012658 | 0 | 0 | 0.005576 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.011754 | false | 0 | 0.007233 | 0.002712 | 0.027125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
67b344ba986bff74d9148b4e8cd6484a0627e1d7 | 1,208 | py | Python | spiking/helpers.py | LeMuecke/SNNs_with_RNNs_in_Tensorflow_Toolbox | 261f94bc58df5b8add31fe721e85bd167be2ab1d | [
"Apache-2.0"
] | null | null | null | spiking/helpers.py | LeMuecke/SNNs_with_RNNs_in_Tensorflow_Toolbox | 261f94bc58df5b8add31fe721e85bd167be2ab1d | [
"Apache-2.0"
] | null | null | null | spiking/helpers.py | LeMuecke/SNNs_with_RNNs_in_Tensorflow_Toolbox | 261f94bc58df5b8add31fe721e85bd167be2ab1d | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
@tf.custom_gradient
def spike_function(v_to_threshold: tf.Tensor) -> tuple:
"""
A custom gradient for networks of spiking neurons.
@param v_to_threshold: The difference between current and threshold voltage of the neuron.
@type v_to_threshold: tf.float32
@return: Activation z and gradient grad.
@rtype: tuple
"""
z = tf.cast(tf.greater(v_to_threshold, 1.), dtype=tf.float32)
def grad(dy: tf.Tensor) -> tf.Tensor:
"""
The gradient function for calculating the derivative of the spike-function.
The return value is determined as follows:
# @negative: v_to_threshold < 0 -> dy*0
# @rest: v_to_threshold = 0 -> dy*0+
# @thresh: v_to_threshold = 1 -> dy*1
# @+thresh: v_to_threshold > 1 -> dy*1-
# @2thresh: v_to_threshold > 2 -> dy*0
#
# /\
# / \
# ______/ \______
# -1 0 1 2 3 v_to_threshold
@param dy: The previous upstream gradient.
@return: The calculated gradient of this stage of the network
"""
return [dy * tf.maximum(1 - tf.abs(v_to_threshold - 1), 0)]
return z, grad | 31.789474 | 94 | 0.59851 | 163 | 1,208 | 4.214724 | 0.374233 | 0.048035 | 0.19214 | 0.075691 | 0.110626 | 0.110626 | 0.064047 | 0 | 0 | 0 | 0 | 0.028335 | 0.298841 | 1,208 | 38 | 95 | 31.789474 | 0.782763 | 0.620033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
67b9743bff06abff103c926a2284b994a5e61b64 | 3,568 | py | Python | tests/conftest.py | MBrouns/scikit-prometheus | 530f3b3374e86380235f02e7fca9ff755fc8f24b | [
"MIT"
] | null | null | null | tests/conftest.py | MBrouns/scikit-prometheus | 530f3b3374e86380235f02e7fca9ff755fc8f24b | [
"MIT"
] | 3 | 2021-12-29T07:56:24.000Z | 2022-01-10T08:13:09.000Z | tests/conftest.py | MBrouns/scikit-prometheus | 530f3b3374e86380235f02e7fca9ff755fc8f24b | [
"MIT"
] | null | null | null | from types import SimpleNamespace
import pytest
from prometheus_client import REGISTRY
from sklearn.utils import estimator_checks
from skprometheus.metrics import MetricRegistry
@pytest.fixture(autouse=True)
def unregister_collectors():
"""
Fixture for cleaning registers before each test. Both prometheus_client.REGISTRY and
skprometheus.metrics.MetricRegistry are cleaned.
"""
collectors = list(REGISTRY._collector_to_names.keys())
for collector in collectors:
REGISTRY.unregister(collector)
# Resetting attributes of MetricRegistry to avoid state transfer between tests
# TODO: Maybe find less ugly solution in future?
MetricRegistry.metrics_initialized = False
MetricRegistry.current_labels = {}
MetricRegistry.labels = set()
MetricRegistry.metrics = SimpleNamespace()
transformer_checks = (
estimator_checks.check_transformer_data_not_an_array,
estimator_checks.check_transformer_general,
estimator_checks.check_transformers_unfitted,
)
general_checks = (
estimator_checks.check_fit2d_predict1d,
estimator_checks.check_methods_subset_invariance,
estimator_checks.check_fit2d_1sample,
estimator_checks.check_fit2d_1feature,
estimator_checks.check_fit1d,
estimator_checks.check_get_params_invariance,
estimator_checks.check_set_params,
estimator_checks.check_dict_unchanged,
estimator_checks.check_dont_overwrite_parameters,
)
nonmeta_checks = (
estimator_checks.check_estimators_dtypes,
estimator_checks.check_fit_score_takes_y,
estimator_checks.check_dtype_object,
estimator_checks.check_sample_weights_pandas_series,
estimator_checks.check_sample_weights_list,
estimator_checks.check_sample_weights_invariance,
estimator_checks.check_estimators_fit_returns_self,
estimator_checks.check_complex_data,
estimator_checks.check_estimators_empty_data_messages,
estimator_checks.check_pipeline_consistency,
estimator_checks.check_estimators_nan_inf,
estimator_checks.check_estimators_overwrite_params,
estimator_checks.check_estimator_sparse_data,
estimator_checks.check_estimators_pickle,
)
classifier_checks = (
estimator_checks.check_classifier_data_not_an_array,
estimator_checks.check_classifiers_one_label,
estimator_checks.check_classifiers_classes,
estimator_checks.check_estimators_partial_fit_n_features,
estimator_checks.check_classifiers_train,
estimator_checks.check_supervised_y_2d,
estimator_checks.check_supervised_y_no_nan,
estimator_checks.check_estimators_unfitted,
estimator_checks.check_non_transformer_estimators_n_iter,
estimator_checks.check_decision_proba_consistency,
)
regressor_checks = (
estimator_checks.check_regressors_train,
estimator_checks.check_regressor_data_not_an_array,
estimator_checks.check_estimators_partial_fit_n_features,
estimator_checks.check_regressors_no_decision_function,
estimator_checks.check_supervised_y_2d,
estimator_checks.check_supervised_y_no_nan,
estimator_checks.check_regressors_int,
estimator_checks.check_estimators_unfitted,
)
outlier_checks = (
estimator_checks.check_outliers_fit_predict,
estimator_checks.check_outliers_train,
estimator_checks.check_classifier_data_not_an_array,
estimator_checks.check_estimators_unfitted,
)
def select_tests(include, exclude=[]):
"""Return an iterable of include with all tests whose name is not in exclude"""
for test in include:
if test.__name__ not in exclude:
yield test
| 35.68 | 88 | 0.818946 | 421 | 3,568 | 6.43943 | 0.332542 | 0.271118 | 0.354113 | 0.121726 | 0.27038 | 0.185172 | 0.185172 | 0.17263 | 0.163777 | 0.163777 | 0 | 0.002901 | 0.130605 | 3,568 | 99 | 89 | 36.040404 | 0.871051 | 0.093049 | 0 | 0.141026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010101 | 0 | 1 | 0.025641 | false | 0 | 0.064103 | 0 | 0.089744 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
67c6f5038a31fae55dfad68e5063beab91202ffa | 627 | py | Python | application/operationmodes/validationmode.py | edenhoferMarco/openvas-restful-client | da676b82bbb3d145297f9e078dbd8d782e7fdf1a | [
"MIT"
] | 1 | 2019-10-23T08:38:42.000Z | 2019-10-23T08:38:42.000Z | application/operationmodes/validationmode.py | edenhoferMarco/openvas-restful-client | da676b82bbb3d145297f9e078dbd8d782e7fdf1a | [
"MIT"
] | 2 | 2021-03-31T19:15:08.000Z | 2021-06-02T00:36:26.000Z | application/operationmodes/validationmode.py | edenhoferMarco/openvas-restful-client | da676b82bbb3d145297f9e078dbd8d782e7fdf1a | [
"MIT"
] | null | null | null | from application.operationmodes import OperationModeBase, WorkerBase
from application.taskparser import TaskParserBase
class ValidationMode(OperationModeBase):
def start_execution(self):
print("START\t-\tCreation Mode")
def attach_task_parser(self, task_parser: TaskParserBase):
self.task_parser = task_parser
def create_worker_for_host(self, host) -> WorkerBase:
return ValidationWorker(host)
class ValidationWorker(WorkerBase):
def __init__(self, host: str):
self.host = host
def execute(self):
return f"Validation has nothing to execution on host {self.host}" | 33 | 73 | 0.741627 | 72 | 627 | 6.277778 | 0.5 | 0.088496 | 0.061947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.180223 | 627 | 19 | 73 | 33 | 0.879377 | 0 | 0 | 0 | 0 | 0 | 0.124204 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.357143 | false | 0 | 0.142857 | 0.142857 | 0.785714 | 0.071429 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
67ce7a5f52615ea78f8b9e3c6a447247811aa35e | 242 | py | Python | Lang/Python/py_base/05_function2.py | Orig5826/Basics | 582e74c83a2b654640fe7c47a1a385a8913cc466 | [
"MIT"
] | 5 | 2018-03-09T13:51:11.000Z | 2021-12-17T02:05:59.000Z | Lang/Python/py_base/05_function2.py | Orig5826/Basics | 582e74c83a2b654640fe7c47a1a385a8913cc466 | [
"MIT"
] | null | null | null | Lang/Python/py_base/05_function2.py | Orig5826/Basics | 582e74c83a2b654640fe7c47a1a385a8913cc466 | [
"MIT"
] | null | null | null |
"""
python 是顺序执行的
若遇到函数,则将函数添加到属性中,暂不调用。
等到实际执行的时候,才会寻找函数来调用。
其中,dir()函数的作用是:返回当前范围内的变量、方法和定义的类型列表
举例如下
"""
def test():
print('222')
fun()
print(dir())
# test() # 若在此处调用,则会在打印完222之后报错
def fun():
print('111')
print(dir())
test()
| 11.52381 | 37 | 0.657025 | 30 | 242 | 5.3 | 0.7 | 0.100629 | 0.150943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043689 | 0.14876 | 242 | 20 | 38 | 12.1 | 0.728155 | 0.533058 | 0 | 0.25 | 0 | 0 | 0.061224 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | true | 0 | 0 | 0 | 0.25 | 0.5 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
67e83fbbe118f07f95bf58704d1c509be39876e0 | 914 | py | Python | twisted/plugins/yapper_plugin.py | progrium/yapper | 310e5ecbd33d76c8630fd7b82ade3606e70015f5 | [
"MIT"
] | 2 | 2015-11-04T10:32:56.000Z | 2019-04-16T09:07:54.000Z | twisted/plugins/yapper_plugin.py | progrium/yapper | 310e5ecbd33d76c8630fd7b82ade3606e70015f5 | [
"MIT"
] | null | null | null | twisted/plugins/yapper_plugin.py | progrium/yapper | 310e5ecbd33d76c8630fd7b82ade3606e70015f5 | [
"MIT"
] | null | null | null | from zope.interface import implements
from twisted.python import usage
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.application import internet
from yapper.core import YapperFactory
class Options(usage.Options):
optParameters = [["jid", "j", None, "The JID to login with"],
["password", "p", None, "The password to login with"],
["host", "h", None, "The host to login with"]]
class YapperMaker(object):
implements(IServiceMaker, IPlugin)
tapname = "yapper"
description = "A Jabber/XMPP interface for Growl"
options = Options
def makeService(self, options):
"""
Construct a TCPServer from a factory defined in myproject.
"""
return internet.TCPClient(options['host'], 5222, YapperFactory(options['jid'], options['password']))
serviceMaker = YapperMaker()
| 31.517241 | 108 | 0.681619 | 103 | 914 | 6.048544 | 0.514563 | 0.070626 | 0.05297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005556 | 0.212254 | 914 | 28 | 109 | 32.642857 | 0.859722 | 0.063457 | 0 | 0 | 0 | 0 | 0.169471 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0.111111 | 0.333333 | 0 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
67ebed97c8032bc388be997f362c5eb161315916 | 588 | py | Python | docs/conf.py | jonashaag/karellen-kombu-ext | edabd7e17b5565d9d4c1861c35bc9d6852a0a061 | [
"Apache-2.0"
] | 6 | 2017-01-27T22:13:22.000Z | 2017-11-23T17:22:46.000Z | docs/conf.py | jonashaag/karellen-kombu-ext | edabd7e17b5565d9d4c1861c35bc9d6852a0a061 | [
"Apache-2.0"
] | 7 | 2016-12-19T03:53:22.000Z | 2018-09-24T14:29:12.000Z | docs/conf.py | jonashaag/karellen-kombu-ext | edabd7e17b5565d9d4c1861c35bc9d6852a0a061 | [
"Apache-2.0"
] | 4 | 2016-12-17T05:07:14.000Z | 2018-02-20T10:49:38.000Z | # Automatically generated by PyB
import sys
from os import path
sphinx_pyb_dir = path.abspath(path.join(path.dirname(__file__) if __file__ else ".", "../target/sphinx_pyb"))
sphinx_pyb_module = "sphinx_pyb_conf"
sphinx_pyb_module_file = path.abspath(path.join(sphinx_pyb_dir, sphinx_pyb_module + ".py"))
sys.path.insert(0, sphinx_pyb_dir)
if not path.exists(sphinx_pyb_module_file):
raise RuntimeError("No PyB-based Sphinx configuration found in " + sphinx_pyb_module_file)
from sphinx_pyb_conf import *
# Overwrite PyB-settings here statically if that's the thing that you want
| 34.588235 | 109 | 0.790816 | 93 | 588 | 4.655914 | 0.451613 | 0.228637 | 0.17321 | 0.13164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001923 | 0.115646 | 588 | 16 | 110 | 36.75 | 0.830769 | 0.17517 | 0 | 0 | 1 | 0 | 0.170124 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
67f1b574b8a7c3b975e40c25a616e502b015aa61 | 382 | py | Python | moodle/core/blog/view_entry.py | Hardikris/moodlepy | 8f5cb0cb4c2297e10f48396de681f6bb250f7751 | [
"MIT"
] | null | null | null | moodle/core/blog/view_entry.py | Hardikris/moodlepy | 8f5cb0cb4c2297e10f48396de681f6bb250f7751 | [
"MIT"
] | null | null | null | moodle/core/blog/view_entry.py | Hardikris/moodlepy | 8f5cb0cb4c2297e10f48396de681f6bb250f7751 | [
"MIT"
] | null | null | null | from typing import List
from moodle import MoodleWarning
from moodle.attr import dataclass, field
@dataclass
class ViewEntry:
"""the blog_entries_viewed event.
Constructor arguments:
params: status (bool): status: true if success
params: warnings (List[Warning]): list of warnings
"""
status: bool
warnings: List[MoodleWarning] = field(factory=list)
| 22.470588 | 55 | 0.727749 | 46 | 382 | 6 | 0.608696 | 0.072464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.191099 | 382 | 16 | 56 | 23.875 | 0.893204 | 0.395288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.428571 | 0 | 0.857143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
db23c7ee9e7e6148bc6af518f79170573258ab4f | 5,575 | py | Python | backend/api/tests/test_feed_views.py | stasfilin/rss_portal | e6e9f8d254c80c8a7a40901b3b7dab059f259d55 | [
"MIT"
] | null | null | null | backend/api/tests/test_feed_views.py | stasfilin/rss_portal | e6e9f8d254c80c8a7a40901b3b7dab059f259d55 | [
"MIT"
] | null | null | null | backend/api/tests/test_feed_views.py | stasfilin/rss_portal | e6e9f8d254c80c8a7a40901b3b7dab059f259d55 | [
"MIT"
] | null | null | null | import json
import os
from unittest import mock
import feedparser
from rest_framework import status
from utils.testcase import TestCase
class FeedTests(TestCase):
"""
Feed API Test Case
"""
url = "/api/feed/"
def test_list_view(self):
"""
Test API request for getting all feeds
"""
user = self.create_user()
token = self.create_token(user)
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.get(self.url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_post_feed_with_valid_data(self):
"""
Test for creating new feed via API with valid data
"""
user = self.create_user()
token = self.create_token(user)
data = {"url": "http://www.nu.nl/rss/Algemeen", "title": "NU.NL"}
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.post(self.url, data=data)
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
def test_post_feed_with_invalid_url(self):
"""
Test for creating new feed via API with invalid data
"""
user = self.create_user()
token = self.create_token(user)
data = {"url": "http://www.google.com", "title": "Google"}
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.post(self.url, data=data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
def test_fetch_feed(self):
"""
Test for fetch feed manually by user
"""
user = self.create_user()
token = self.create_token(user)
data = {"url": "http://www.nu.nl/rss/Algemeen", "title": "NU.NL"}
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.post(self.url, data=data)
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
feed_id = response.json().get("id")
response = self.client.get(self.url + str(feed_id) + "/fetch/")
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json().get("status"), True)
@mock.patch("feedparser.parse")
def test_fetch_feed_with_bad_request_from_feed(self, mock_feedparser):
"""
Test for fetch feed manually by user.
Feed will return invalid data
"""
assert mock_feedparser is feedparser.parse
module_dir = os.path.dirname(__file__)
feedparser_invalid_rss = os.path.join(module_dir, "data", "invalid_rss.json")
with open(feedparser_invalid_rss, "rb") as f:
mock_feedparser.return_value = json.loads(f.read())
user = self.create_user()
token = self.create_token(user)
feed = self.create_feed(user)
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.get(self.url + str(feed.pk) + "/fetch/")
self.assertEqual(response.status_code, status.HTTP_503_SERVICE_UNAVAILABLE)
self.assertEqual(response.json().get("status"), False)
self.assertEqual(
response.json().get("message"),
"nodename nor servname provided, or not known",
)
feed.refresh_from_db()
self.assertEqual(feed.attempt, 1)
class FeedItemTests(TestCase):
"""
Feed Item API Test Case
"""
url = "/api/feed-item/"
def test_list_view(self):
"""
Test API request for getting all feed items
"""
user = self.create_user()
token = self.create_token(user)
feed = self.create_feed(user)
feed_item = self.create_feed_item(feed, user)
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.get(self.url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json().get("count"), 1)
def test_feed_item_favorite(self):
"""
Test for mark feed item like favorite
"""
user = self.create_user()
token = self.create_token(user)
feed = self.create_feed(user)
feed_item = self.create_feed_item(feed, user)
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.get(self.url + str(feed_item.pk) + "/favorite/")
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json().get("is_favorite"), True)
self.assertEqual(user.favorite_items.filter(pk=feed_item.pk).exists(), True)
response = self.client.get(self.url + str(feed_item.pk) + "/favorite/")
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json().get("is_favorite"), False)
self.assertEqual(user.favorite_items.filter(pk=feed_item.pk).exists(), False)
def test_feed_item_read(self):
"""
Test for mark feed like read
"""
user = self.create_user()
token = self.create_token(user)
feed = self.create_feed(user)
feed_item = self.create_feed_item(feed, user)
self.client.credentials(HTTP_AUTHORIZATION="Bearer " + token)
response = self.client.get(self.url + str(feed_item.pk) + "/read/")
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json().get("is_read"), True)
self.assertEqual(user.read_items.filter(pk=feed_item.pk).exists(), True)
| 34.627329 | 85 | 0.643587 | 700 | 5,575 | 4.94 | 0.161429 | 0.066512 | 0.113071 | 0.083864 | 0.759109 | 0.728456 | 0.704164 | 0.686813 | 0.650665 | 0.618855 | 0 | 0.007496 | 0.23426 | 5,575 | 160 | 86 | 34.84375 | 0.80253 | 0.071928 | 0 | 0.531915 | 0 | 0 | 0.076146 | 0 | 0 | 0 | 0 | 0 | 0.234043 | 1 | 0.085106 | false | 0 | 0.06383 | 0 | 0.191489 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
db31a7cdb2e11d72713dbee401a15752c7f9ae55 | 1,593 | py | Python | setup.py | rubel75/aiida-wien2k | 255c4aa72a6d503b72b502371758605242b0a673 | [
"MIT"
] | 1 | 2022-03-19T00:08:35.000Z | 2022-03-19T00:08:35.000Z | setup.py | rubel75/aiida-wien2k | 255c4aa72a6d503b72b502371758605242b0a673 | [
"MIT"
] | null | null | null | setup.py | rubel75/aiida-wien2k | 255c4aa72a6d503b72b502371758605242b0a673 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='aiida-wien2k',
packages=['aiida_wien2k'],
entry_points={
'aiida.calculations': ["wien2k-x-sgroup = aiida_wien2k.calculations.x_sgroup:Wien2kXSgroup",
"wien2k-init_lapw = aiida_wien2k.calculations.init_lapw:Wien2kInitLapw",
"wien2k-run_lapw = aiida_wien2k.calculations.run_lapw:Wien2kRunLapw",
"wien2k-run123_lapw = aiida_wien2k.calculations.run123_lapw:Wien2kRun123Lapw",
"wien2k-x-optimize = aiida_wien2k.calculations.x_optimize:Wien2kXOptimize",
"wien2k-run_lapw_clmextrapol = aiida_wien2k.calculations.run_lapw_clmextrapol:Wien2kRunLapwClmextrapol"],
'aiida.parsers': ["wien2k-scf-parser = aiida_wien2k.parsers.scf:Wien2kScfParser",
"wien2k-scf123-parser = aiida_wien2k.parsers.scf123:Wien2kScf123Parser",
"wien2k-sgroup-parser = aiida_wien2k.parsers.sgroup:Wien2kSgroupParser",
"wien2k-init_lapw-parser = aiida_wien2k.parsers.init_lapw:Wien2kInitLapwParser",
"wien2k-optimize-parser = aiida_wien2k.parsers.optimize:Wien2kOptimizeParser"],
'aiida.workflows': ["wien2k.scf_wf = aiida_wien2k.workflows.scf_workchain:Wien2kScfWorkChain",
"wien2k.scf123_wf = aiida_wien2k.workflows.scf123_workchain:Wien2kScf123WorkChain",
"wien2k.eos_wf = aiida_wien2k.workflows.eos_workchain:Wien2kEosWorkChain"],
}
)
| 69.26087 | 133 | 0.650345 | 144 | 1,593 | 6.944444 | 0.284722 | 0.176 | 0.138 | 0.12 | 0.06 | 0 | 0 | 0 | 0 | 0 | 0 | 0.059714 | 0.25361 | 1,593 | 22 | 134 | 72.409091 | 0.781329 | 0 | 0 | 0 | 0 | 0 | 0.684871 | 0.501569 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.047619 | 0 | 0.047619 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
db3537c5cc80cb81acd6521bfc51bb7be948800a | 155 | py | Python | opencity/__init__.py | birkealine/konstanz-open-data-api | 5e7267020dd7db7592e1738d23f83990f9a92424 | [
"MIT"
] | 3 | 2021-06-14T09:02:25.000Z | 2021-07-19T18:14:12.000Z | opencity/__init__.py | birkealine/konstanz-open-data-api | 5e7267020dd7db7592e1738d23f83990f9a92424 | [
"MIT"
] | 19 | 2021-07-01T15:35:19.000Z | 2022-03-10T08:46:40.000Z | opencity/__init__.py | birkealine/konstanz-open-data-api | 5e7267020dd7db7592e1738d23f83990f9a92424 | [
"MIT"
] | 2 | 2021-07-28T19:21:33.000Z | 2022-03-06T07:56:24.000Z | import os
version_path = os.path.join(os.path.dirname(__file__), "VERSION")
with open(version_path) as f:
line = f.readline()
__version__ = line
| 19.375 | 65 | 0.703226 | 23 | 155 | 4.304348 | 0.565217 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.167742 | 155 | 7 | 66 | 22.142857 | 0.767442 | 0 | 0 | 0 | 0 | 0 | 0.045161 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
e1d5ff6226ad23bc2822cbfd030bdfb8d7358bd7 | 1,785 | py | Python | notebook/scipy_sparse_method.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/scipy_sparse_method.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/scipy_sparse_method.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | import numpy as np
from scipy.sparse import csr_matrix, lil_matrix
l = [[0, 1, 2],
[3, 0, 4],
[0, 0, 0]]
csr = csr_matrix(l)
lil = lil_matrix(l)
print(csr.sum())
# 10
print(csr.mean())
# 1.111111111111111
print(csr.max())
# 4
print(csr.min())
# 0
# print(lil.max())
# AttributeError: max not found
print(csr.sqrt().toarray())
# [[0. 1. 1.41421356]
# [1.73205081 0. 2. ]
# [0. 0. 0. ]]
print(csr.sin().toarray())
# [[ 0. 0.84147098 0.90929743]
# [ 0.14112001 0. -0.7568025 ]
# [ 0. 0. 0. ]]
print(csr.tan().toarray())
# [[ 0. 1.55740772 -2.18503986]
# [-0.14254654 0. 1.15782128]
# [ 0. 0. 0. ]]
# print(lil.sqrt())
# AttributeError: sqrt not found
csr_ = csr.copy()
print(csr_.data)
# [1 2 3 4]
print(type(csr_.data))
# <class 'numpy.ndarray'>
csr_.data = np.cos(csr_.data)
print(csr_.toarray())
# [[ 0. 0.54030231 -0.41614684]
# [-0.9899925 0. -0.65364362]
# [ 0. 0. 0. ]]
csr_ = csr.copy()
csr_.data = csr_.data ** 2
print(csr_.toarray())
# [[ 0 1 4]
# [ 9 0 16]
# [ 0 0 0]]
print(lil.data)
# [list([1, 2]) list([3, 4]) list([])]
print(csr)
# (0, 1) 1
# (0, 2) 2
# (1, 0) 3
# (1, 2) 4
r, c = csr.nonzero()
print(r, c)
# [0 0 1 1] [1 2 0 2]
print(csr.count_nonzero())
# 4
print(csr.nnz)
# 4
csr[0, 1] = 0
print(csr)
# (0, 1) 0
# (0, 2) 2
# (1, 0) 3
# (1, 2) 4
print(csr.count_nonzero())
# 3
print(csr.nnz)
# 4
r, c = csr.nonzero()
print(r, c)
# [0 1 1] [2 0 2]
print(lil)
# (0, 1) 1
# (0, 2) 2
# (1, 0) 3
# (1, 2) 4
print(lil.nnz)
# 4
lil[0, 1] = 0
print(lil)
# (0, 2) 2
# (1, 0) 3
# (1, 2) 4
print(lil.nnz)
# 3
| 14.875 | 47 | 0.47507 | 294 | 1,785 | 2.829932 | 0.197279 | 0.043269 | 0.021635 | 0.038462 | 0.230769 | 0.15625 | 0.132212 | 0.132212 | 0.132212 | 0.082933 | 0 | 0.215272 | 0.310364 | 1,785 | 119 | 48 | 15 | 0.460601 | 0.506443 | 0 | 0.461538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.051282 | 0 | 0.051282 | 0.615385 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
e1e3e6018e623714813b9d7754241a751bf3e6f8 | 142 | py | Python | project/api/urls.py | blazaid/seymour | 5f9f2b3a2804381410e2a3a43345dac401f0c50c | [
"MIT"
] | null | null | null | project/api/urls.py | blazaid/seymour | 5f9f2b3a2804381410e2a3a43345dac401f0c50c | [
"MIT"
] | null | null | null | project/api/urls.py | blazaid/seymour | 5f9f2b3a2804381410e2a3a43345dac401f0c50c | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import StatusView
urlpatterns = [
url('^status/$', StatusView.as_view(), name='status'),
]
| 17.75 | 58 | 0.697183 | 18 | 142 | 5.444444 | 0.722222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147887 | 142 | 7 | 59 | 20.285714 | 0.809917 | 0 | 0 | 0 | 0 | 0 | 0.105634 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
e1e6e00ef63858f5fc355319ed10a772f2c07274 | 4,052 | py | Python | microarchiver/ui/__init__.py | caltechlibrary/pubarchiver | 5dded0a68cef69c59a9e0b65cddbaad33434ceba | [
"BSD-3-Clause"
] | 1 | 2019-10-10T19:59:25.000Z | 2019-10-10T19:59:25.000Z | microarchiver/ui/__init__.py | caltechlibrary/microarchiver | 5dded0a68cef69c59a9e0b65cddbaad33434ceba | [
"BSD-3-Clause"
] | 6 | 2019-10-07T04:09:45.000Z | 2021-04-17T00:49:09.000Z | microarchiver/ui/__init__.py | caltechlibrary/pubarchiver | 5dded0a68cef69c59a9e0b65cddbaad33434ceba | [
"BSD-3-Clause"
] | null | null | null | '''
ui: user interface
Authors
-------
Michael Hucka <mhucka@caltech.edu> -- Caltech Library
Copyright
---------
Copyright (c) 2019-2020 by the California Institute of Technology. This code
is open-source software released under a 3-clause BSD license. Please see the
file "LICENSE" for more information.
'''
from sidetrack import log
# Exported functions
# .............................................................................
# These methods get an instance of the UI by themselves and do not require
# callers to do it. They are meant to be used largely like basic functions
# such as "print()" are used in Python.
def inform(text, *args):
'''Print an informational message to the user. The 'text' can contain
string format placeholders such as "{}", and the additional arguments in
args are values to use in those placeholders.
'''
ui = UI.instance()
ui.inform(text, *args)
def warn(text, *args):
'''Warn the user that something is not right. This should be used in
situations where the problem is not fatal nor will prevent continued
execution. (For problems that prevent continued execution, use the
alert(...) method instead.)
'''
ui = UI.instance()
ui.warn(text, *args)
def alert(text, *args):
'''Alert the user to an error. This should be used in situations where
there is a problem that will prevent normal execution.
'''
ui = UI.instance()
ui.alert(text, *args)
def alert_fatal(text, *args, **kwargs):
'''Print or display a message reporting a fatal error. The keyword
argument 'details' can be supplied to pass a longer explanation that will
be displayed (when a GUI is being used) if the user presses the 'Help'
button in the dialog.
Note that when a GUI interface is in use, this method will cause the
GUI to exit after the user clicks the OK button, so that the calling
application can regain control and exit.
'''
ui = UI.instance()
ui.alert_fatal(text, *args, **kwargs)
def file_selection(type, purpose, pattern = '*'):
'''Returns the file selected by the user. The value of 'type' should be
'open' if the reason for the request is to open a file for reading, and
'save' if the reason is to save a file. The argument 'purpose' should be
a short text string explaining to the user why they're being asked for a
file. The 'pattern' is a file pattern expression of the kind accepted by
wxPython FileDialog.
'''
ui = UI.instance()
return ui.file_selection(type, purpose, pattern)
def login_details(prompt, user, password):
'''Asks the user for a login name and password. The value of 'user' and
'password' will be used as initial values in the dialog.
'''
ui = UI.instance()
return ui.login_details(prompt, user, password)
def confirm(question):
'''Returns True if the user replies 'yes' to the 'question'.'''
ui = UI.instance()
return ui.confirm(question)
# Exported classes
# .............................................................................
# This class is essentially a wrapper that deals with selecting the real
# class that should be used for the kind of interface being used. Internally
# it implements a singleton instance, and provides a method to access that
# instance.
from .base import UIBase
from .cli import CLI
#from .gui import GUI
class UI(UIBase):
'''Wrapper class for the user interface.'''
__instance = None
def __new__(cls, name = __package__, subtitle = '', use_gui = False,
use_color = True, be_quiet = False):
'''Return an instance of the appropriate user interface handler.'''
if cls.__instance is None:
if __debug__: log('creating UI instance with name "{}"', name)
#obj = GUI if use_gui else CLI
obj = CLI
cls.__instance = obj(name, subtitle, use_gui, use_color, be_quiet)
return cls.__instance
@classmethod
def instance(cls):
return cls.__instance
| 32.943089 | 79 | 0.657206 | 573 | 4,052 | 4.586387 | 0.354276 | 0.026636 | 0.031963 | 0.021309 | 0.12519 | 0.025114 | 0.025114 | 0 | 0 | 0 | 0 | 0.002859 | 0.2231 | 4,052 | 122 | 80 | 33.213115 | 0.831957 | 0.63845 | 0 | 0.25 | 0 | 0 | 0.027735 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.055556 | 0.083333 | 0.027778 | 0.527778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
e1ea12d5f3807a26bbfae1ea7864e1e7a9e6777f | 235 | py | Python | casepro/msg_board/urls.py | rapidpro/ureport-partners | 16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd | [
"BSD-3-Clause"
] | null | null | null | casepro/msg_board/urls.py | rapidpro/ureport-partners | 16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd | [
"BSD-3-Clause"
] | null | null | null | casepro/msg_board/urls.py | rapidpro/ureport-partners | 16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd | [
"BSD-3-Clause"
] | null | null | null | from django.urls import re_path
from .views import CommentCRUDL, MessageBoardView
urlpatterns = CommentCRUDL().as_urlpatterns()
urlpatterns += [re_path(r"^messageboard/$", MessageBoardView.as_view(), name="msg_board.comment_list")]
| 29.375 | 103 | 0.791489 | 28 | 235 | 6.428571 | 0.678571 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085106 | 235 | 7 | 104 | 33.571429 | 0.837209 | 0 | 0 | 0 | 0 | 0 | 0.157447 | 0.093617 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
e1f406a8b298701ebfd6bc3e14bbed7eb1d8514c | 137 | py | Python | 06/06_P14.py | endowp/Python101 | 9c29387f4ed53d10579613ecf5153b71abf7ccd7 | [
"MIT"
] | null | null | null | 06/06_P14.py | endowp/Python101 | 9c29387f4ed53d10579613ecf5153b71abf7ccd7 | [
"MIT"
] | null | null | null | 06/06_P14.py | endowp/Python101 | 9c29387f4ed53d10579613ecf5153b71abf7ccd7 | [
"MIT"
] | null | null | null | list=input().split()
re=[int(e) for e in input().split()]
new=[]
for i in re:
new.append(list[i])
for l in new:
print(l,end=" ")
| 17.125 | 36 | 0.576642 | 27 | 137 | 2.925926 | 0.518519 | 0.253165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.189781 | 137 | 7 | 37 | 19.571429 | 0.711712 | 0 | 0 | 0 | 0 | 0 | 0.007299 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c020a0fcad6fc75fcba922ddf3fe17e44ee2e643 | 805 | py | Python | bdpy/distcomp/distcomp.py | miyosuda/bdpy | c455504d8059e911c09b602fbbb9f01452a1ee1a | [
"MIT"
] | null | null | null | bdpy/distcomp/distcomp.py | miyosuda/bdpy | c455504d8059e911c09b602fbbb9f01452a1ee1a | [
"MIT"
] | null | null | null | bdpy/distcomp/distcomp.py | miyosuda/bdpy | c455504d8059e911c09b602fbbb9f01452a1ee1a | [
"MIT"
] | null | null | null | '''Distributed computation module
This file is a part of BdPy.
'''
__all__ = ['DistComp']
import os
class DistComp(object):
'''Distributed computation class'''
def __init__(self, comp_id=None, lockdir='tmp'):
self.lockdir = lockdir
self.comp_id = comp_id
self.lockfile = self.__lockfilename(self.comp_id) if self.comp_id != None else None
def islocked(self):
if os.path.isfile(self.lockfile):
return True
else:
return False
def lock(self):
with open(self.lockfile, 'w'):
pass
def unlock(self):
os.remove(self.lockfile)
def __lockfilename(self, comp_id):
'''Return the lock file path'''
return os.path.join(self.lockdir, comp_id + '.lock')
| 18.72093 | 91 | 0.593789 | 99 | 805 | 4.636364 | 0.434343 | 0.091503 | 0.108932 | 0.061002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.29441 | 805 | 42 | 92 | 19.166667 | 0.808099 | 0.144099 | 0 | 0 | 0 | 0 | 0.025298 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0.052632 | 0.052632 | 0 | 0.526316 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
c028105076c192d7a5b86b3dcbfd0f5832e4cf06 | 5,645 | py | Python | blitzortung/geom.py | wuan/bo-python | 86c90e437ff456092bf7c9eff8c85daffdd220f0 | [
"Apache-2.0"
] | 3 | 2015-04-09T22:33:59.000Z | 2019-02-12T12:52:16.000Z | blitzortung/geom.py | wuan/bo-python | 86c90e437ff456092bf7c9eff8c85daffdd220f0 | [
"Apache-2.0"
] | 7 | 2015-05-23T13:38:14.000Z | 2019-12-13T20:43:12.000Z | blitzortung/geom.py | wuan/bo-python | 86c90e437ff456092bf7c9eff8c85daffdd220f0 | [
"Apache-2.0"
] | 4 | 2015-12-13T12:40:40.000Z | 2021-07-09T10:48:16.000Z | # -*- coding: utf8 -*-
"""
Copyright 2014-2020 Andreas Würl
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 math
from abc import ABCMeta, abstractmethod
import pyproj
import shapely.geometry
class Geometry(object):
"""
abstract base class for geometries
"""
__metaclass__ = ABCMeta
__slots__ = ['srid']
DefaultSrid = 4326
def __init__(self, srid=DefaultSrid):
self.srid = srid
def get_srid(self):
return self.srid
def set_srid(self, srid):
self.srid = srid
@property
@abstractmethod
def env(self):
pass
class Envelope(Geometry):
"""
definition of a coordinate envelope
"""
__slots__ = ['x_min', 'x_max', 'y_min', 'y_max']
def __init__(self, x_min, x_max, y_min, y_max, srid=Geometry.DefaultSrid):
super(Envelope, self).__init__(srid)
self.x_min = x_min
self.x_max = x_max
self.y_min = y_min
self.y_max = y_max
@property
def y_delta(self):
return abs(self.y_max - self.y_min)
@property
def x_delta(self):
return abs(self.x_max - self.x_min)
def contains(self, point):
return (point.x >= self.x_min) and \
(point.x <= self.x_max) and \
(point.y >= self.y_min) and \
(point.y <= self.y_max)
@property
def env(self):
return shapely.geometry.LinearRing(
[(self.x_min, self.y_min), (self.x_min, self.y_max), (self.x_max, self.y_max),
(self.x_max, self.y_min)])
def __repr__(self):
return 'Envelope(x: %.4f..%.4f, y: %.4f..%.4f)' % (
self.x_min, self.x_max, self.y_min, self.y_max)
class Grid(Envelope):
""" grid characteristics"""
__slots__ = ['x_div', 'y_div', '__x_bin_count', '__y_bin_count']
def __init__(self, x_min, x_max, y_min, y_max, x_div, y_div, srid=Geometry.DefaultSrid):
super(Grid, self).__init__(x_min, x_max, y_min, y_max, srid)
self.x_div = x_div
self.y_div = y_div
self.__x_bin_count = None
self.__y_bin_count = None
def get_x_bin(self, x_pos):
return int(math.ceil(float(x_pos - self.x_min) / self.x_div)) - 1
def get_y_bin(self, y_pos):
return int(math.ceil(float(y_pos - self.y_min) / self.y_div)) - 1
@property
def x_bin_count(self):
if not self.__x_bin_count:
self.__x_bin_count = self.get_x_bin(self.x_max) + 1
return self.__x_bin_count
@property
def y_bin_count(self):
if not self.__y_bin_count:
self.__y_bin_count = self.get_y_bin(self.y_max) + 1
return self.__y_bin_count
def get_x_center(self, cell_index):
return self.x_min + (cell_index + 0.5) * self.x_div
def get_y_center(self, row_index):
return self.y_min + (row_index + 0.5) * self.y_div
def __repr__(self):
return 'Grid(x: %.4f..%.4f (%.4f, #%d), y: %.4f..%.4f (%.4f, #%d))' % (
self.x_min, self.x_max, self.x_div, self.x_bin_count,
self.y_min, self.y_max, self.y_div, self.y_bin_count)
class GridFactory(object):
WGS84 = pyproj.Proj(init='epsg:4326')
__slots__ = ['min_lon', 'max_lon', 'max_lat', 'min_lat', 'coord_sys', 'ref_lon', 'ref_lat', 'grid_data']
def __init__(self, min_lon, max_lon, min_lat, max_lat, coord_sys, ref_lon=None, ref_lat=None):
self.min_lon = min_lon
self.max_lon = max_lon
self.min_lat = min_lat
self.max_lat = max_lat
self.coord_sys = coord_sys
self.ref_lon = ref_lon
self.ref_lat = ref_lat
self.grid_data = {}
@staticmethod
def fix_max(minimum, maximum, delta):
return minimum + math.floor((maximum - minimum) / delta) * delta
def get_for(self, base_length):
if base_length not in self.grid_data:
ref_lon = self.ref_lon if self.ref_lon else (self.min_lon + self.max_lon) / 2.0
ref_lat = self.ref_lat if self.ref_lat else (self.min_lat + self.max_lat) / 2.0
utm_x, utm_y = pyproj.transform(self.WGS84, self.coord_sys, ref_lon, ref_lat)
lon_d, lat_d = pyproj.transform(self.coord_sys, self.WGS84, utm_x + base_length, utm_y + base_length)
delta_lon = lon_d - ref_lon
delta_lat = lat_d - ref_lat
max_lon = self.fix_max(self.min_lon, self.max_lon, delta_lon)
max_lat = self.fix_max(self.min_lat, self.max_lat, delta_lat)
self.grid_data[base_length] = Grid(self.min_lon, max_lon, self.min_lat, max_lat,
delta_lon, delta_lat,
Geometry.DefaultSrid)
return self.grid_data[base_length]
class GridElement(object):
"""
raster data entry
"""
__slots__ = ['count', 'timestamp']
def __init__(self, count, timestamp):
self.count = count
self.timestamp = timestamp
def __gt__(self, other):
return self.count > other.count
def __repr__(self):
return "GridElement(%d, %s)" % (self.count, str(self.timestamp))
| 29.401042 | 113 | 0.617538 | 846 | 5,645 | 3.776596 | 0.182033 | 0.045383 | 0.027543 | 0.018779 | 0.281377 | 0.141471 | 0.053521 | 0.041002 | 0.024413 | 0.016901 | 0 | 0.011847 | 0.267316 | 5,645 | 191 | 114 | 29.554974 | 0.760638 | 0.122055 | 0 | 0.115044 | 0 | 0.00885 | 0.053032 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.212389 | false | 0.00885 | 0.035398 | 0.123894 | 0.513274 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
c0301ef5f4872699545bc97a859b2695447e10f9 | 4,316 | py | Python | books/booksdatasourcetests.py | jakemartens/cs257 | 379cdd897013f2c94f489f03522374a229dc62fa | [
"MIT"
] | null | null | null | books/booksdatasourcetests.py | jakemartens/cs257 | 379cdd897013f2c94f489f03522374a229dc62fa | [
"MIT"
] | null | null | null | books/booksdatasourcetests.py | jakemartens/cs257 | 379cdd897013f2c94f489f03522374a229dc62fa | [
"MIT"
] | null | null | null | #Chris Melville and Jake Martens
'''
booksdatasourcetest.py
Jeff Ondich, 24 September 2021
'''
import booksdatasource
import unittest
class BooksDataSourceTester(unittest.TestCase):
def setUp(self):
self.data_source_long = booksdatasource.BooksDataSource('books1.csv')
self.data_source_short = booksdatasource.BooksDataSource('books2.csv')
def tearDown(self):
pass
def test_unique_author(self):
authors = self.data_source_long.authors('Pratchett')
self.assertTrue(len(authors) == 1)
self.assertTrue(authors[0].get_author_name() == 'Terry Pratchett')
def test_authors_none(self):
authors = self.data_source_short.authors(None)
self.assertTrue(len(authors) == 3)
self.assertTrue(authors[0].get_author_name() == 'Ann Brontë')
self.assertTrue(authors[1].get_author_name() == 'Charlotte Brontë')
self.assertTrue(authors[2].get_author_name() == 'Connie Willis')
def test_author_sort(self):
authors = self.data_source_short.authors('Brontë')
self.assertTrue(len(authors) == 2)
self.assertTrue(authors[0].get_author_name() == 'Ann Brontë')
self.assertTrue(authors[1].get_author_name() == 'Charlotte Brontë')
def test_case_insensitivity(self):
authors = self.data_source_short.authors('willis')
self.assertTrue(len(authors) == 1)
self.assertTrue(authors[0].get_author_name() == 'Connie Willis')
def test_author_not_on_list(self):
authors = self.data_source_short.authors('Agatha')
self.assertTrue(len(authors) == 0)
def test_unique_book(self):
books = self.data_source_long.books('Sula')
self.assertTrue(len(books) == 1)
self.assertTrue(books[0].get_title() == 'Sula')
def test_book_not_in_file(self):
books = self.data_source_long.books('Cat')
self.assertTrue(len(books) == 0)
def test_books_none(self):
books = self.data_source_short.books(None)
self.assertTrue(len(books) == 3)
self.assertTrue(books[0].get_title() == 'All Clear')
self.assertTrue(books[1].get_title() == 'Jane Eyre')
self.assertTrue(books[2].get_title() == 'The Tenant of Wildfell Hall')
def test_year_sorting(self):
books = self.data_source_short.books('All', 'year')
self.assertTrue(len(books) == 2)
self.assertTrue(books[0].get_title() == 'The Tenant of Wildfell Hall')
self.assertTrue(books[1].get_title() == 'All Clear')
def test_title_sorting_explicit(self):
books = self.data_source_short.books('All', 'title')
self.assertTrue(len(books) == 2)
self.assertTrue(books[0].get_title() == 'All Clear')
self.assertTrue(books[1].get_title() == 'The Tenant of Wildfell Hall')
def test_title_sorting_default(self):
books = self.data_source_short.books('All')
self.assertTrue(len(books) == 2)
self.assertTrue(books[0].get_title() == 'All Clear')
self.assertTrue(books[1].get_title() == 'The Tenant of Wildfell Hall')
def test_books_between_none(self):
books = self.data_source_short.books_between_years()
self.assertTrue(len(books) == 3)
self.assertTrue(books[0].get_title() == 'Jane Eyre')
self.assertTrue(books[1].get_title() == 'The Tenant of Wildfell Hall')
self.assertTrue(books[2].get_title() == 'All Clear')
def test_books_between_tiebreaker(self):
books = self.data_source_long.books_between_years(1995,1996)
self.assertTrue(len(books) == 2)
self.assertTrue(books[0].get_title() == 'Neverwhere')
self.assertTrue(books[1].get_title() == 'Thief of Time')
def test_books_between_no_end(self):
books = self.data_source_long.books_between_years(2020, None)
self.assertTrue(len(books) == 2)
self.assertTrue(books[0].get_title() == 'Boys and Sex')
self.assertTrue(books[1].get_title() == 'The Invisible Life of Addie LaRue')
def test_books_between_no_start(self):
books = self.data_source_long.books_between_years(None,1770)
self.assertTrue(len(books) == 1)
self.assertTrue(books[0].get_title() == 'The Life and Opinions of Tristram Shandy, Gentleman')
if __name__ == '__main__':
unittest.main()
| 41.104762 | 102 | 0.666358 | 559 | 4,316 | 4.923077 | 0.182469 | 0.203488 | 0.124273 | 0.069041 | 0.68859 | 0.661337 | 0.633358 | 0.53125 | 0.442224 | 0.380451 | 0 | 0.018433 | 0.195551 | 4,316 | 104 | 103 | 41.5 | 0.774194 | 0.019694 | 0 | 0.2625 | 0 | 0 | 0.117145 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0.2125 | false | 0.0125 | 0.025 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c0428970d6ab1a6ecfd4012c15e5e342ad4c5a24 | 631 | py | Python | src/pkgcore/repository/syncable.py | mgorny/pkgcore | ab4a718aa1626f4edeb385383f5595a1e262b0dc | [
"BSD-3-Clause"
] | null | null | null | src/pkgcore/repository/syncable.py | mgorny/pkgcore | ab4a718aa1626f4edeb385383f5595a1e262b0dc | [
"BSD-3-Clause"
] | null | null | null | src/pkgcore/repository/syncable.py | mgorny/pkgcore | ab4a718aa1626f4edeb385383f5595a1e262b0dc | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2006-2011 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD
__all__ = ("tree",)
from pkgcore.operations.repo import sync_operations
class tree(object):
operations_kls = sync_operations
def __init__(self, sync=None):
object.__setattr__(self, '_syncer', sync)
@property
def operations(self):
return self.get_operations()
def get_operations(self, observer=None):
return self.operations_kls(self)
def _pre_sync(self):
"""Run any required pre-sync repo operations."""
def _post_sync(self):
"""Run any required post-sync repo operations."""
| 22.535714 | 57 | 0.679873 | 78 | 631 | 5.205128 | 0.474359 | 0.096059 | 0.054187 | 0.068966 | 0.108374 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018 | 0.207607 | 631 | 27 | 58 | 23.37037 | 0.794 | 0.255151 | 0 | 0 | 0 | 0 | 0.024017 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.384615 | false | 0 | 0.076923 | 0.153846 | 0.769231 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
c0610254b9dd12af31650f166698144b24850df1 | 179 | py | Python | math/medium/minOperations.py | linminhtoo/algorithms | 884422a7c9f531e7ccaae03ba1ccbd6966b23dd3 | [
"MIT"
] | null | null | null | math/medium/minOperations.py | linminhtoo/algorithms | 884422a7c9f531e7ccaae03ba1ccbd6966b23dd3 | [
"MIT"
] | null | null | null | math/medium/minOperations.py | linminhtoo/algorithms | 884422a7c9f531e7ccaae03ba1ccbd6966b23dd3 | [
"MIT"
] | null | null | null | class Solution:
def minOperations(self, n: int) -> int:
num_ops = 0
for i in range(0, n // 2, 1):
num_ops += n - (2 * i + 1)
return num_ops | 29.833333 | 43 | 0.486034 | 28 | 179 | 3 | 0.607143 | 0.214286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.054545 | 0.385475 | 179 | 6 | 44 | 29.833333 | 0.709091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c0683e4499d65da1c6d34e5143cbba020baca2cb | 68 | py | Python | programming-laboratory-I/3hmr/metros_km.py | MisaelAugusto/computer-science | d21335a2dc824b54ffe828370f0e6717fd0c7c27 | [
"MIT"
] | null | null | null | programming-laboratory-I/3hmr/metros_km.py | MisaelAugusto/computer-science | d21335a2dc824b54ffe828370f0e6717fd0c7c27 | [
"MIT"
] | null | null | null | programming-laboratory-I/3hmr/metros_km.py | MisaelAugusto/computer-science | d21335a2dc824b54ffe828370f0e6717fd0c7c27 | [
"MIT"
] | null | null | null | M = int(raw_input())
K = M / 1000.0
print "%i m = %.2f km" %(M, K)
| 17 | 30 | 0.485294 | 15 | 68 | 2.133333 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117647 | 0.25 | 68 | 3 | 31 | 22.666667 | 0.509804 | 0 | 0 | 0 | 0 | 0 | 0.205882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
c06a855d6873844b893d2badc936a0084d00fd8d | 3,974 | py | Python | env/lib/python3.8/site-packages/unidecode/x1d6.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 48 | 2021-11-20T08:17:53.000Z | 2022-03-19T13:57:15.000Z | venv/lib/python3.6/site-packages/unidecode/x1d6.py | mrsaicharan1/iiita-updates | a22a0157b90d29b946d0f020e5f76744f73a6bff | [
"Apache-2.0"
] | 392 | 2015-07-30T14:37:05.000Z | 2022-03-21T16:56:09.000Z | venv/lib/python3.6/site-packages/unidecode/x1d6.py | mrsaicharan1/iiita-updates | a22a0157b90d29b946d0f020e5f76744f73a6bff | [
"Apache-2.0"
] | 15 | 2015-10-01T21:31:08.000Z | 2020-05-05T00:03:27.000Z | data = (
's', # 0x00
't', # 0x01
'u', # 0x02
'v', # 0x03
'w', # 0x04
'x', # 0x05
'y', # 0x06
'z', # 0x07
'A', # 0x08
'B', # 0x09
'C', # 0x0a
'D', # 0x0b
'E', # 0x0c
'F', # 0x0d
'G', # 0x0e
'H', # 0x0f
'I', # 0x10
'J', # 0x11
'K', # 0x12
'L', # 0x13
'M', # 0x14
'N', # 0x15
'O', # 0x16
'P', # 0x17
'Q', # 0x18
'R', # 0x19
'S', # 0x1a
'T', # 0x1b
'U', # 0x1c
'V', # 0x1d
'W', # 0x1e
'X', # 0x1f
'Y', # 0x20
'Z', # 0x21
'a', # 0x22
'b', # 0x23
'c', # 0x24
'd', # 0x25
'e', # 0x26
'f', # 0x27
'g', # 0x28
'h', # 0x29
'i', # 0x2a
'j', # 0x2b
'k', # 0x2c
'l', # 0x2d
'm', # 0x2e
'n', # 0x2f
'o', # 0x30
'p', # 0x31
'q', # 0x32
'r', # 0x33
's', # 0x34
't', # 0x35
'u', # 0x36
'v', # 0x37
'w', # 0x38
'x', # 0x39
'y', # 0x3a
'z', # 0x3b
'A', # 0x3c
'B', # 0x3d
'C', # 0x3e
'D', # 0x3f
'E', # 0x40
'F', # 0x41
'G', # 0x42
'H', # 0x43
'I', # 0x44
'J', # 0x45
'K', # 0x46
'L', # 0x47
'M', # 0x48
'N', # 0x49
'O', # 0x4a
'P', # 0x4b
'Q', # 0x4c
'R', # 0x4d
'S', # 0x4e
'T', # 0x4f
'U', # 0x50
'V', # 0x51
'W', # 0x52
'X', # 0x53
'Y', # 0x54
'Z', # 0x55
'a', # 0x56
'b', # 0x57
'c', # 0x58
'd', # 0x59
'e', # 0x5a
'f', # 0x5b
'g', # 0x5c
'h', # 0x5d
'i', # 0x5e
'j', # 0x5f
'k', # 0x60
'l', # 0x61
'm', # 0x62
'n', # 0x63
'o', # 0x64
'p', # 0x65
'q', # 0x66
'r', # 0x67
's', # 0x68
't', # 0x69
'u', # 0x6a
'v', # 0x6b
'w', # 0x6c
'x', # 0x6d
'y', # 0x6e
'z', # 0x6f
'A', # 0x70
'B', # 0x71
'C', # 0x72
'D', # 0x73
'E', # 0x74
'F', # 0x75
'G', # 0x76
'H', # 0x77
'I', # 0x78
'J', # 0x79
'K', # 0x7a
'L', # 0x7b
'M', # 0x7c
'N', # 0x7d
'O', # 0x7e
'P', # 0x7f
'Q', # 0x80
'R', # 0x81
'S', # 0x82
'T', # 0x83
'U', # 0x84
'V', # 0x85
'W', # 0x86
'X', # 0x87
'Y', # 0x88
'Z', # 0x89
'a', # 0x8a
'b', # 0x8b
'c', # 0x8c
'd', # 0x8d
'e', # 0x8e
'f', # 0x8f
'g', # 0x90
'h', # 0x91
'i', # 0x92
'j', # 0x93
'k', # 0x94
'l', # 0x95
'm', # 0x96
'n', # 0x97
'o', # 0x98
'p', # 0x99
'q', # 0x9a
'r', # 0x9b
's', # 0x9c
't', # 0x9d
'u', # 0x9e
'v', # 0x9f
'w', # 0xa0
'x', # 0xa1
'y', # 0xa2
'z', # 0xa3
'i', # 0xa4
'j', # 0xa5
'', # 0xa6
'', # 0xa7
'Alpha', # 0xa8
'Beta', # 0xa9
'Gamma', # 0xaa
'Delta', # 0xab
'Epsilon', # 0xac
'Zeta', # 0xad
'Eta', # 0xae
'Theta', # 0xaf
'Iota', # 0xb0
'Kappa', # 0xb1
'Lamda', # 0xb2
'Mu', # 0xb3
'Nu', # 0xb4
'Xi', # 0xb5
'Omicron', # 0xb6
'Pi', # 0xb7
'Rho', # 0xb8
'Theta', # 0xb9
'Sigma', # 0xba
'Tau', # 0xbb
'Upsilon', # 0xbc
'Phi', # 0xbd
'Chi', # 0xbe
'Psi', # 0xbf
'Omega', # 0xc0
'nabla', # 0xc1
'alpha', # 0xc2
'beta', # 0xc3
'gamma', # 0xc4
'delta', # 0xc5
'epsilon', # 0xc6
'zeta', # 0xc7
'eta', # 0xc8
'theta', # 0xc9
'iota', # 0xca
'kappa', # 0xcb
'lamda', # 0xcc
'mu', # 0xcd
'nu', # 0xce
'xi', # 0xcf
'omicron', # 0xd0
'pi', # 0xd1
'rho', # 0xd2
'sigma', # 0xd3
'sigma', # 0xd4
'tai', # 0xd5
'upsilon', # 0xd6
'phi', # 0xd7
'chi', # 0xd8
'psi', # 0xd9
'omega', # 0xda
'', # 0xdb
'', # 0xdc
'', # 0xdd
'', # 0xde
'', # 0xdf
'', # 0xe0
'', # 0xe1
'', # 0xe2
'', # 0xe3
'', # 0xe4
'', # 0xe5
'', # 0xe6
'', # 0xe7
'', # 0xe8
'', # 0xe9
'', # 0xea
'', # 0xeb
'', # 0xec
'', # 0xed
'', # 0xee
'', # 0xef
'', # 0xf0
'', # 0xf1
'', # 0xf2
'', # 0xf3
'', # 0xf4
'', # 0xf5
'', # 0xf6
'', # 0xf7
'', # 0xf8
'', # 0xf9
'', # 0xfa
'', # 0xfb
'', # 0xfc
'', # 0xfd
'', # 0xfe
'', # 0xff
)
| 15.343629 | 20 | 0.354051 | 474 | 3,974 | 2.968354 | 0.651899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.236647 | 0.387519 | 3,974 | 258 | 21 | 15.403101 | 0.341413 | 0.321842 | 0 | 0.810078 | 0 | 0 | 0.155455 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
fbe25580b6e1353e7dd5c265d28dec97b2f2893e | 215 | py | Python | mayan/apps/folders/menus.py | nadwiabd/insight_edms | 90a09d7ca77cb111c791e307b55a603e82042dfe | [
"Apache-2.0"
] | null | null | null | mayan/apps/folders/menus.py | nadwiabd/insight_edms | 90a09d7ca77cb111c791e307b55a603e82042dfe | [
"Apache-2.0"
] | null | null | null | mayan/apps/folders/menus.py | nadwiabd/insight_edms | 90a09d7ca77cb111c791e307b55a603e82042dfe | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from navigation import Menu
menu_folders = Menu(
icon='fa fa-folder', label=_('Folders'), name='folders menu'
)
| 21.5 | 64 | 0.772093 | 29 | 215 | 5.413793 | 0.655172 | 0.140127 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.139535 | 215 | 9 | 65 | 23.888889 | 0.848649 | 0 | 0 | 0 | 0 | 0 | 0.144186 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
fbfa7d72689adf33bc0a61fd028ba64af9492be3 | 1,734 | py | Python | sahara_plugins/plugins/mapr/util/service_utils.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | sahara_plugins/plugins/mapr/util/service_utils.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | sahara_plugins/plugins/mapr/util/service_utils.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015, MapR Technologies
#
# 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 six
from sahara_plugins.i18n import _
def get_node_process_name(node_process):
# This import is placed here to avoid circular imports
from sahara_plugins.plugins.mapr.domain import node_process as np # noqa
if isinstance(node_process, np.NodeProcess):
return node_process.ui_name
if isinstance(node_process, six.string_types):
return node_process
raise TypeError(_("Invalid argument type %s") % type(node_process))
def has_node_process(instance, node_process):
node_process_name = get_node_process_name(node_process)
instance_node_processes = instance.node_group.node_processes
return node_process_name in instance_node_processes
def has_service(instance, service):
return any(has_node_process(instance, node_process)
for node_process in service.node_processes)
def filter_by_node_process(instances, node_process):
return [instance for instance in instances
if has_node_process(instance, node_process)]
def filter_by_service(instances, service):
return [instance for instance in instances
if has_service(instance, service)]
| 33.346154 | 77 | 0.760669 | 246 | 1,734 | 5.162602 | 0.418699 | 0.18189 | 0.047244 | 0.072441 | 0.185827 | 0.185827 | 0.064567 | 0.064567 | 0 | 0 | 0 | 0.007008 | 0.177047 | 1,734 | 51 | 78 | 34 | 0.882971 | 0.356978 | 0 | 0.090909 | 0 | 0 | 0.021838 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.227273 | false | 0 | 0.136364 | 0.136364 | 0.636364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
2202e4f609b530218336410c393a2d722692072e | 106 | py | Python | app/__init__.py | afrigon/fastapi-template | cb3c86353c67ef19c5abe12658e327ff37b14f90 | [
"MIT"
] | 2 | 2020-03-05T20:34:09.000Z | 2020-04-19T02:33:53.000Z | app/__init__.py | afrigon/fastapi-template | cb3c86353c67ef19c5abe12658e327ff37b14f90 | [
"MIT"
] | 2 | 2019-12-17T18:49:29.000Z | 2019-12-17T23:19:11.000Z | app/__init__.py | afrigon/fastapi-template | cb3c86353c67ef19c5abe12658e327ff37b14f90 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = "0.1.0"
from .application import ApplicationFactory # noqa: F401
| 17.666667 | 57 | 0.669811 | 13 | 106 | 5.153846 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079545 | 0.169811 | 106 | 5 | 58 | 21.2 | 0.681818 | 0.301887 | 0 | 0 | 0 | 0 | 0.070423 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
2225b19a6c87f7fd2f2456bdca99fcad68a9203d | 393 | py | Python | testSHT30.py | tim-oe/SDL_Pi_SHT30 | 54be6906897bdbe48ac50f8d58e1fbacaff2875b | [
"MIT"
] | null | null | null | testSHT30.py | tim-oe/SDL_Pi_SHT30 | 54be6906897bdbe48ac50f8d58e1fbacaff2875b | [
"MIT"
] | null | null | null | testSHT30.py | tim-oe/SDL_Pi_SHT30 | 54be6906897bdbe48ac50f8d58e1fbacaff2875b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import SHT30
thsen = SHT30.SHT30(powerpin=6)
while 1:
print("T ", thsen.read_temperature())
print("H ", thsen.read_humidity())
print("H,T ", thsen.read_humidity_temperature())
print("H,T,C ", thsen.read_humidity_temperature_crc())
h, t, cH, cT = thsen.read_humidity_temperature_crc()
print("CRCH=0x%02x" % cH)
print("CRCT=0x%02x" % cT)
| 26.2 | 58 | 0.656489 | 58 | 393 | 4.275862 | 0.431034 | 0.181452 | 0.274194 | 0.33871 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043077 | 0.173028 | 393 | 14 | 59 | 28.071429 | 0.72 | 0.050891 | 0 | 0 | 0 | 0 | 0.107527 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.1 | 0.6 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
2225dac7c2c079c3b7980bfe026af5b78ea865c3 | 1,182 | py | Python | Pro/FileSysterm/Test.py | Angold-4/Angold-4 | 14ce47b752d754bed279daacf88e586cf39222b4 | [
"MIT"
] | null | null | null | Pro/FileSysterm/Test.py | Angold-4/Angold-4 | 14ce47b752d754bed279daacf88e586cf39222b4 | [
"MIT"
] | null | null | null | Pro/FileSysterm/Test.py | Angold-4/Angold-4 | 14ce47b752d754bed279daacf88e586cf39222b4 | [
"MIT"
] | null | null | null | from FileSysterm import File
def Test():
print("Check __init__ ...")
_file = File('PCreditCard.py', '/Users/Angold4/WorkSpace/algorithms_in_python/Chapters/Chapter_2')
print("Finished")
print('')
print("Check get_filename() and get_filepath() ...")
_name = _file.get_filename()
_path = _file.get_filepath()
print("Name:", _name, "Path:", _path)
print("Finished")
print('')
print("Check get_content()...")
_content = _file.get_content()
print(_content)
print("Finished!")
print('')
print("Check get_lines()...")
_lines = _file.get_lines()
print("Lines:", _lines)
print("Finished")
print('')
print("Check count_letter()...")
_n = _file.count_letter('p')
print("Number of p:", _n)
print("Finished")
print('')
print("Check count_word()...")
_n = _file.count_word('print')
print("Number of print:", _n)
print("Finished")
print('')
print("Check count_letters()...")
print(_file.count_letters(True))
print("Finished")
print('')
print("Check count_words()...")
print(_file.count_words(True))
print("Finished")
print('')
Test()
| 22.301887 | 102 | 0.601523 | 134 | 1,182 | 4.977612 | 0.291045 | 0.11994 | 0.215892 | 0.241379 | 0.34033 | 0.34033 | 0.101949 | 0 | 0 | 0 | 0 | 0.002134 | 0.207276 | 1,182 | 52 | 103 | 22.730769 | 0.709712 | 0 | 0 | 0.365854 | 0 | 0 | 0.326565 | 0.054146 | 0 | 0 | 0 | 0 | 0 | 1 | 0.02439 | false | 0 | 0.02439 | 0 | 0.04878 | 0.780488 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
222bc40f18991f06f0ba69774807bc17db1e0d63 | 148 | py | Python | src/hurnado/app/handler/resource.py | guyuecanhui/hurnado | fc54eed8ebd70768ce6e1f1073e506d365bb5b8d | [
"Apache-2.0"
] | null | null | null | src/hurnado/app/handler/resource.py | guyuecanhui/hurnado | fc54eed8ebd70768ce6e1f1073e506d365bb5b8d | [
"Apache-2.0"
] | null | null | null | src/hurnado/app/handler/resource.py | guyuecanhui/hurnado | fc54eed8ebd70768ce6e1f1073e506d365bb5b8d | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
__author__ = 'cheng.hu'
from base import BaseHandler
class QueryUserHandler(BaseHandler):
def get(self):
print "list"
| 14.8 | 36 | 0.695946 | 18 | 148 | 5.5 | 0.944444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008475 | 0.202703 | 148 | 9 | 37 | 16.444444 | 0.830508 | 0.081081 | 0 | 0 | 0 | 0 | 0.089552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
224bc5b887ffb60eb8db906d4ed354113ef4faca | 324 | py | Python | users/models.py | MECKEM-COV-19/backend | c0686f32f98b3acd5dc028d8a054089694654a07 | [
"MIT"
] | null | null | null | users/models.py | MECKEM-COV-19/backend | c0686f32f98b3acd5dc028d8a054089694654a07 | [
"MIT"
] | 4 | 2020-03-22T12:27:45.000Z | 2021-06-10T22:44:00.000Z | users/models.py | MECKEM-COV-19/backend | c0686f32f98b3acd5dc028d8a054089694654a07 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
import uuid
class CustomUser(AbstractUser):
patientId = models.UUIDField(primary_key=True, default=uuid.uuid4,editable=False)
zipCode = models.CharField(max_length=10,null=True)
numberOfFlatmates = models.IntegerField(null=True)
| 32.4 | 85 | 0.799383 | 41 | 324 | 6.268293 | 0.682927 | 0.077821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0.111111 | 324 | 9 | 86 | 36 | 0.881944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
225492585c9e8ca899199c0a3f884d495798806c | 406 | py | Python | procedure_evaluation/angr_tests.py | unkown512/SimProceduresDB | 922e32c4ab7391f197e3ce875c223aa9953d393a | [
"BSD-2-Clause"
] | 1 | 2021-07-10T16:12:10.000Z | 2021-07-10T16:12:10.000Z | procedure_evaluation/angr_tests.py | unkown512/SimProceduresDB | 922e32c4ab7391f197e3ce875c223aa9953d393a | [
"BSD-2-Clause"
] | null | null | null | procedure_evaluation/angr_tests.py | unkown512/SimProceduresDB | 922e32c4ab7391f197e3ce875c223aa9953d393a | [
"BSD-2-Clause"
] | null | null | null | import angr
import claripy
import sys
'''
Step through default programs in tests directory based on sys.argv[1]
1) strncmp
2) strstr
3) scanf
4) toy1
'''
def strncmp():
pass
def strstr():
pass
def scanf():
pass
def toy1():
pass
if __name__ == "__main__":
if( len(sys.argv) != 2):
print("\nUsage: python3 angr_tests.py arg1\n")
pass
| 14 | 73 | 0.578818 | 55 | 406 | 4.109091 | 0.618182 | 0.09292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035587 | 0.307882 | 406 | 28 | 74 | 14.5 | 0.768683 | 0 | 0 | 0.333333 | 0 | 0 | 0.176471 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.266667 | true | 0.333333 | 0.2 | 0 | 0.466667 | 0.066667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
2270bb322d9ae601b61b371522a9939d4455cf4a | 202 | py | Python | oms_cms/backend/news/forms.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | oms_cms/backend/news/forms.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | oms_cms/backend/news/forms.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from .models import Comments
class CommentsForm(forms.ModelForm):
"""Форма добавления комментария"""
class Meta:
model = Comments
fields = ("text", )
| 18.363636 | 38 | 0.663366 | 21 | 202 | 6.380952 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242574 | 202 | 10 | 39 | 20.2 | 0.875817 | 0.138614 | 0 | 0 | 0 | 0 | 0.02381 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
227239b242d3b8105035500c48f6372b923b6346 | 258 | py | Python | ytvideo/admin.py | LSM2016/Bilibili- | 21ab048d18c790b531cddb63129ef41a0ffecb4d | [
"MIT"
] | 1 | 2021-03-18T05:55:33.000Z | 2021-03-18T05:55:33.000Z | ytvideo/admin.py | LSM2016/Bilibili- | 21ab048d18c790b531cddb63129ef41a0ffecb4d | [
"MIT"
] | null | null | null | ytvideo/admin.py | LSM2016/Bilibili- | 21ab048d18c790b531cddb63129ef41a0ffecb4d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
list_display = ('oid', 'rpid', 'mid', 'username', 'ctime', 'content')
search_fields = ('oid', 'mid')
| 25.8 | 73 | 0.693798 | 31 | 258 | 5.709677 | 0.741935 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147287 | 258 | 9 | 74 | 28.666667 | 0.804545 | 0.100775 | 0 | 0 | 0 | 0 | 0.156522 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
3f22956d369732e05266ec7e162992e6ffe1a2c3 | 2,627 | py | Python | main/train.py | driftingawaynow/Pleiades | c0912e9ab73014a798c394d66ea486f9de6a3f49 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | main/train.py | driftingawaynow/Pleiades | c0912e9ab73014a798c394d66ea486f9de6a3f49 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | main/train.py | driftingawaynow/Pleiades | c0912e9ab73014a798c394d66ea486f9de6a3f49 | [
"CC-BY-3.0",
"MIT"
] | null | null | null | import os
import tangram
import math
from skyfield.api import Topos, Loader, EarthSatellite
from skyfield.positionlib import position_of_radec
from skyfield.api import load, wgs84
from PleiadesTracker import get_pleiades_pos, final_val, point_arr, point_to_str, earth, ra_hours, dec_degrees
def main():
# Get the path to the .tangram file.
model_path = os.path.join(os.path.dirname(__file__), 'hackdata3.tangram')
# Load the model from the path.
model = tangram.Model.from_path(model_path)
# Create an example input matching the schema of the CSV file the model was trained on.
# Here the data is just hard-coded, but in your application you will probably get this
# from a database or user input.
input = {
'sex': 'female',
'degree': 'high school',
'zodiac': 'cancer',
'sexorient': 'exclusively male',
'sociability': 'neither agree nor disagree',
'acqmark': '2-5'
}
# Make the prediction!
output = model.predict(input)
classification = getattr(output, 'class_name')
confidence = getattr(output, 'probability')
if classification == 'not at all':
class_val = 0.1
elif classification == '2-3 times a month':
class_val = 0.25
elif classification == 'weekly':
class_val = 0.5
elif classification == '2-3 per week':
class_val = 0.75
point = get_pleiades_pos(earth, ra_hours, dec_degrees)
pleiades_location = final_val(point_arr(point_to_str(point)))
universe_freq = 0.432;
zodiac_symbols = 12;
pleiades_star_count = 800;
ALQ = (abs(math.sin((((math.pow(confidence, class_val)) * pleiades_location) / (universe_freq / zodiac_symbols)) * pleiades_star_count))) * 100;
def run_through_model(input):
# Get the path to the .tangram file.
model_path = os.path.join(os.path.dirname(__file__), 'hackdata3.tangram')
# Load the model from the path.
model = tangram.Model.from_path(model_path)
# Make the prediction!
output = model.predict(input)
# Print the output.
classification = getattr(output, 'class_name')
confidence = getattr(output, 'probability')
if classification == 'not at all':
class_val = 0.1
elif classification == '2-3 times a month':
class_val = 0.25
elif classification == 'weekly':
class_val = 0.5
elif classification == '2-3 per week':
class_val = 0.75
point = get_pleiades_pos(earth, ra_hours, dec_degrees)
pleiades_location = final_val(point_arr(point_to_str(point)))
universe_freq = 0.432
zodiac_symbols = 12
pleiades_star_count = 800
ALQ = (abs(math.sin((((math.pow(confidence, class_val)) * pleiades_location) / (
universe_freq / zodiac_symbols)) * pleiades_star_count))) * 100
return ALQ
if __name__ == "__main__":
main() | 29.852273 | 145 | 0.730491 | 383 | 2,627 | 4.796345 | 0.336815 | 0.043549 | 0.039194 | 0.043549 | 0.713119 | 0.701143 | 0.701143 | 0.64344 | 0.64344 | 0.64344 | 0 | 0.026126 | 0.15493 | 2,627 | 88 | 146 | 29.852273 | 0.801351 | 0.148839 | 0 | 0.508475 | 0 | 0 | 0.127583 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033898 | false | 0 | 0.118644 | 0 | 0.169492 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3f428eac084aba39b71bba92ad7b718f0409a782 | 7,425 | py | Python | onadata/apps/logger/tests/test_simple_submission.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/tests/test_simple_submission.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/tests/test_simple_submission.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
from django.contrib.auth.models import User
from django.test import TestCase, RequestFactory
from pyxform import SurveyElementBuilder
from onadata.apps.logger.xform_instance_parser import DuplicateInstance
from onadata.apps.viewer.models.data_dictionary import DataDictionary
from onadata.libs.utils.logger_tools import (
create_instance, safe_create_instance
)
class TempFileProxy(object):
"""
create_instance will be looking for a file object,
with "read" and "close" methods.
"""
def __init__(self, content):
self.content = content
def read(self):
return self.content
def close(self):
pass
class TestSimpleSubmission(TestCase):
def _get_xml_for_form(self, xform):
builder = SurveyElementBuilder()
sss = builder.create_survey_element_from_json(xform.json)
xform.xml = sss.to_xml()
xform._mark_start_time_boolean()
xform.save()
def _submit_at_hour(self, hour):
st_xml = '<?xml version=\'1.0\' ?><start_time id="start_time"><st'\
'art_time>2012-01-11T%d:00:00.000+00</start_time></start'\
'_time>' % hour
try:
create_instance(self.user.username, TempFileProxy(st_xml), [])
except DuplicateInstance:
pass
def _submit_simple_yes(self):
create_instance(self.user.username, TempFileProxy(
'<?xml version=\'1.0\' ?><yes_or_no id="yes_or_no"><yesno>Yes<'
'/yesno></yes_or_no>'), [])
def setUp(self):
self.user = User.objects.create(
username="admin", email="sample@example.com")
self.user.set_password("pass")
self.xform1 = DataDictionary()
self.xform1.user = self.user
self.xform1.json = '{"id_string": "yes_or_no", "children": [{"name": '\
'"yesno", "label": "Yes or no?", "type": "text"}],'\
' "name": "yes_or_no", "title": "yes_or_no", "type'\
'": "survey"}'.strip()
self.xform2 = DataDictionary()
self.xform2.user = self.user
self.xform2.json = '{"id_string": "start_time", "children": [{"name":'\
'"start_time", "type": "start"}], "name": "start_t'\
'ime", "title": "start_time", "type": "survey"}'\
.strip()
self._get_xml_for_form(self.xform1)
self._get_xml_for_form(self.xform2)
def test_start_time_boolean_properly_set(self):
self.assertFalse(self.xform1.has_start_time)
self.assertTrue(self.xform2.has_start_time)
def test_simple_yes_submission(self):
self.assertEquals(0, self.xform1.instances.count())
self._submit_simple_yes()
self.assertEquals(1, self.xform1.instances.count())
self._submit_simple_yes()
# a simple "yes" submission *SHOULD* increment the survey count
self.assertEquals(2, self.xform1.instances.count())
def test_start_time_submissions(self):
"""This test checks to make sure that instances
*with start_time available* are marked as duplicates when the XML is a
direct match.
"""
self.assertEquals(0, self.xform2.instances.count())
self._submit_at_hour(11)
self.assertEquals(1, self.xform2.instances.count())
self._submit_at_hour(12)
self.assertEquals(2, self.xform2.instances.count())
# an instance from 11 AM already exists in the database, so it
# *SHOULD NOT* increment the survey count.
self._submit_at_hour(11)
self.assertEquals(2, self.xform2.instances.count())
def test_corrupted_submission(self):
"""
Test xml submissions that contain unicode characters.
"""
xml = 'v\xee\xf3\xc0k\x91\x91\xae\xff\xff\xff\xff\xcf[$b\xd0\xc9\'uW\x80RP\xff\xff\xff\xff7\xd0\x03%F\xa7p\xa2\x87\xb6f\xb1\xff\xff\xff\xffg~\xf3O\xf3\x9b\xbc\xf6ej_$\xff\xff\xff\xff\x13\xe8\xa9D\xed\xfb\xe7\xa4d\x96>\xfa\xff\xff\xff\xff\xc7h"\x86\x14\\.\xdb\x8aoF\xa4\xff\xff\xff\xff\xcez\xff\x01\x0c\x9a\x94\x18\xe1\x03\x8e\xfa\xff\xff\xff\xff39P|\xf9n\x18F\xb1\xcb\xacd\xff\xff\xff\xff\xce>\x97i;1u\xcfI*\xf2\x8e\xff\xff\xff\xffFg\x9d\x0fR:\xcd*\x14\x85\xf0e\xff\xff\xff\xff\xd6\xdc\xda\x8eM\x06\xf1\xfc\xc1\xe8\xd6\xe0\xff\xff\xff\xff\xe7G\xe1\xa1l\x02T\n\xde\x1boJ\xff\xff\xff\xffz \x92\xbc\tR{#\xbb\x9f\xa6s\xff\xff\xff\xff\xa2\x8f(\xb6=\xe11\xfcV\xcf\xef\x0b\xff\xff\xff\xff\xa3\x83\x7ft\xd7\x05+)\xeb9\\*\xff\xff\xff\xff\xfe\x93\xb2\xa2\x06n;\x1b4\xaf\xa6\x93\xff\xff\xff\xff\xe7\xf7\x12Q\x83\xbb\x9a\xc8\xc8q34\xff\xff\xff\xffT2\xa5\x07\x9a\xc9\x89\xf8\x14Y\xab\x19\xff\xff\xff\xff\x16\xd0R\x1d\x06B\x95\xea\\\x1ftP\xff\xff\xff\xff\x94^\'\x01#oYV\xc5\\\xb7@\xff\xff\xff\xff !\x11\x00\x8b\xf3[\xde\xa2\x01\x9dl\xff\xff\xff\xff\xe7z\x92\xc3\x03\xd3\xb5B5 \xaa7\xff\xff\xff\xff\xff\xc3Q:\xa6\xb3\xa3\x1e\x90 \xa0\\\xff\xff\xff\xff\xff\x14<\x03Vr\xe8Z.Ql\xf5\xff\xff\xff\xffEx\xf7\x0b_\xa1\x7f\xfcG\xa4\x18\xcd\xff\xff\xff\xff1|~i\x00\xb3. ,1Q\x0e\xff\xff\xff\xff\x87a\x933Y\xd7\xe1B#\xa7a\xee\xff\xff\xff\xff\r\tJ\x18\xd0\xdb\x0b\xbe\x00\x91\x95\x9e\xff\xff\xff\xffHfW\xcd\x8f\xa9z6|\xc5\x171\xff\xff\xff\xff\xf5tP7\x93\x02Q|x\x17\xb1\xcb\xff\xff\xff\xffVb\x11\xa0*\xd9;\x0b\xf8\x1c\xd3c\xff\xff\xff\xff\x84\x82\xcer\x15\x99`5LmA\xd5\xff\xff\xff\xfft\xce\x8e\xcbw\xee\xf3\xc0w\xca\xb3\xfd\xff\xff\xff\xff\xb0\xaab\x92\xd4\x02\x84H3\x94\xa9~\xff\xff\xff\xff\xfe7\x18\xcaW=\x94\xbc|\x0f{\x84\xff\xff\xff\xff\xe8\xdf\xde?\x8b\xb7\x9dH3\xc1\xf2\xaa\xff\xff\xff\xff\xbe\x00\xba\xd7\xba6!\x95g\xb01\xf9\xff\xff\xff\xff\x93\xe3\x90YH9g\xf7\x97nhv\xff\xff\xff\xff\x82\xc7`\xaebn\x9d\x1e}\xba\x1e/\xff\xff\xff\xff\xbd\xe5\xa1\x05\x03\xf26\xa0\xe2\xc1*\x07\xff\xff\xff\xffny\x88\x9f\x19\xd2\xd0\xf7\x1de\xa7\xe0\xff\xff\xff\xff\xc4O&\x14\x8dVH\x90\x8b+\x03\xf9\xff\xff\xff\xff\xf69\xc2\xabo%\xcc/\xc9\xe4dP\xff\xff\xff\xff (\x08G\xebM\x03\x99Y\xb4\xb3\x1f\xff\xff\xff\xffzH\xd2\x19p#\xc5\xa4)\xfd\x05\x9a\xff\xff\xff\xffd\x86\xb2F\x15\x0f\xf4.\xfd\\\xd4#\xff\xff\xff\xff\xaf\xbe\xc6\x9di\xa0\xbc\xd5>cp\xe2\xff\xff\xff\xff&h\x91\xe9\xa0H\xdd\xaer\x87\x18E\xff\xff\xff\xffjg\x08E\x8f\xa4&\xab\xff\x98\x0ei\xff\xff\xff\xff\x01\xfd{"\xed\\\xa3M\x9e\xc3\xf8K\xff\xff\xff\xff\x87Y\x98T\xf0\xa6\xec\x98\xb3\xef\xa7\xaa\xff\xff\xff\xffA\xced\xfal\xd3\xd9\x06\xc6~\xee}\xff\xff\xff\xff:\x7f\xa2\x10\xc7\xadB,}PF%\xff\xff\xff\xff\xb2\xbc\n\x17%\x98\x904\x89\tF\x1f\xff\xff\xff\xff\xdc\xd8\xc6@#M\x87uf\x02\xc6g\xff\xff\xff\xffK\xaf\xb0-=l\x07\xe1Nv\xe4\xf4\xff\xff\xff\xff\xdb\x13\'Ne\xb2UT\x9a#\xb1^\xff\xff\xff\xff\xb2\rne\xd1\x9d\x88\xda\xbb!\xfa@\xff\xff\xff\xffflq\x0f\x01z]uh\'|?\xff\xff\xff\xff\xd5\'\x19\x865\xba\xf2\xe7\x8fR-\xcc\xff\xff\xff\xff\xce\xd6\xfdi\x04\x9b\xa7\tu\x05\xb7\xc8\xff\xff\xff\xff\xc3\xd0)\x11\xdd\xb1\xa5kp\xc9\xd5\xf7\xff\xff\xff\xff\xffU\x9f \xb7\xa1#3rup[\xff\xff\xff\xff\xfc=' # noqa
request = RequestFactory().post('/')
request.user = self.user
error, instance = safe_create_instance(
self.user.username, TempFileProxy(xml), None, None, request)
# No `DjangoUnicodeDecodeError` errors are raised anymore.
# An `ExpatError` is raised instead
text = 'Improperly formatted XML'
self.assertContains(error, text, status_code=400)
| 63.461538 | 3,114 | 0.673131 | 1,227 | 7,425 | 3.98207 | 0.372453 | 0.212444 | 0.20262 | 0.115432 | 0.144904 | 0.095375 | 0.077978 | 0.045641 | 0 | 0 | 0 | 0.085692 | 0.148148 | 7,425 | 116 | 3,115 | 64.008621 | 0.686798 | 0.072997 | 0 | 0.102564 | 0 | 0.064103 | 0.452969 | 0.384627 | 0 | 0 | 0 | 0 | 0.128205 | 1 | 0.141026 | false | 0.038462 | 0.089744 | 0.012821 | 0.269231 | 0.012821 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3f4ee7ae2d968e8fe6a40b398bf0be1d78d69954 | 226 | py | Python | src/sage/version.py | mrejmon/sage | 2c25f07cfd0cbb5cb4a9b57b7bc62ec997039987 | [
"BSL-1.0"
] | 1 | 2021-03-15T21:45:56.000Z | 2021-03-15T21:45:56.000Z | src/sage/version.py | mrejmon/sage | 2c25f07cfd0cbb5cb4a9b57b7bc62ec997039987 | [
"BSL-1.0"
] | null | null | null | src/sage/version.py | mrejmon/sage | 2c25f07cfd0cbb5cb4a9b57b7bc62ec997039987 | [
"BSL-1.0"
] | null | null | null | # Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
version = '9.3.rc0'
date = '2021-03-23'
banner = 'SageMath version 9.3.rc0, Release Date: 2021-03-23'
| 37.666667 | 77 | 0.738938 | 39 | 226 | 4.282051 | 0.717949 | 0.095808 | 0.107784 | 0.143713 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11399 | 0.146018 | 226 | 5 | 78 | 45.2 | 0.751295 | 0.526549 | 0 | 0 | 1 | 0 | 0.644231 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3f7341ae88070f92b60670bb4e19d50f4e5435fc | 6,504 | py | Python | experiment-fip-2019-2020/plot_data.py | Krystian95/TLGProb | 5af272e0232d11aa0d8e483adf0bcba098ed0ef0 | [
"MIT"
] | 2 | 2018-10-02T01:20:27.000Z | 2020-05-19T20:30:56.000Z | experiment-fip-2019-2020/plot_data.py | Krystian95/TLGProb | 5af272e0232d11aa0d8e483adf0bcba098ed0ef0 | [
"MIT"
] | null | null | null | experiment-fip-2019-2020/plot_data.py | Krystian95/TLGProb | 5af272e0232d11aa0d8e483adf0bcba098ed0ef0 | [
"MIT"
] | 4 | 2018-10-24T08:46:03.000Z | 2021-11-09T18:46:11.000Z | ################################################################################
# TLGProb: Two-Layer Gaussian Process Regression Model For
# Winning Probability Calculation of Two-Team Sports
# Github: https://github.com/MaxInGaussian/TLGProb
# Author: Max W. Y. Lam (maxingaussian@gmail.com)
################################################################################
import numpy as np
import matplotlib.pyplot as plt
from bisect import bisect_left
import datetime as dt
import matplotlib.dates as mdates
import matplotlib.cbook as cbook
from matplotlib.dates import MONDAY
from matplotlib.dates import MonthLocator, WeekdayLocator, DateFormatter
try:
from TLGProb import TLGProb
except:
print("TLGProb is not installed yet! Trying to call directly from source...")
from sys import path
path.append("../")
from TLGProb import TLGProb
print("done.")
def plot_unsmoothed_feature(TLGProb_NBA, fig, ax, line, feature, player=None):
mondays = WeekdayLocator(MONDAY)
months = MonthLocator(range(1, 13), bymonthday=1, interval=1)
monthsFmt = DateFormatter('%Y-%m')
feature_ind = TLGProb_NBA.key_to_player_input_id[feature]
lines = []
dates = []
for y, m, d in TLGProb_NBA.game_dict['date']:
date = dt.date(y, m, d)
if(date not in dates):
dates.append(date)
if(player is not None):
line_x, line_y = [], []
for i, date_int in enumerate(TLGProb_NBA.player_to_date[player]):
date = dt.date(int(date_int/10000.), int(date_int/100.)%100,date_int%100)
line_x.append(date)
line_y.append(TLGProb_NBA.player_to_attributes[player]["performance"][i, feature_ind])
ax.plot_date(line_x, line_y, line, label=feature.upper()+" performance")
ax.xaxis.set_major_locator(months)
ax.xaxis.set_major_formatter(monthsFmt)
ax.autoscale_view()
ax.set_ylim([np.min(line_y)-0.1*np.std(line_y), np.max(line_y)+0.6*np.std(line_y)])
else:
for player in TLGProb_NBA.all_player:
line_x, line_y = [], []
for i, date_int in enumerate(TLGProb_NBA.player_to_date[player]):
date = dt.date(int(date_int/10000.), int(date_int/100.)%100,date_int%100)
line_x.append(date)
line_y.append(TLGProb_NBA.player_to_attributes[player]["performance"][i, feature_ind])
ax.plot_date(line_x, line_y, line, label=feature.upper()+" performance")
ax.xaxis.set_major_locator(months)
ax.xaxis.set_major_formatter(monthsFmt)
ax.autoscale_view()
fig.autofmt_xdate()
def plot_smoothed_feature(TLGProb_NBA, fig, ax, line, feature, player=None):
mondays = WeekdayLocator(MONDAY)
months = MonthLocator(range(1, 13), bymonthday=1, interval=1)
monthsFmt = DateFormatter('%Y-%m')
feature_ind = TLGProb_NBA.key_to_player_input_id[feature]
lines = []
dates = []
for y, m, d in TLGProb_NBA.game_dict['date']:
date = dt.date(y, m, d)
if(date not in dates):
dates.append(date)
if(player is not None):
line_x, line_y = [], []
for i, date_int in enumerate(TLGProb_NBA.player_to_date[player]):
date = dt.date(int(date_int/10000.), int(date_int/100.)%100,date_int%100)
line_x.append(date)
line_y.append(TLGProb_NBA.player_to_attributes[player]["smoothed_performance"][i, feature_ind])
ax.plot_date(line_x, line_y, line, label=feature.upper()+" ability")
ax.xaxis.set_major_locator(months)
ax.xaxis.set_major_formatter(monthsFmt)
ax.autoscale_view()
else:
for player in TLGProb_NBA.all_player:
line_x, line_y = [], []
for i, date_int in enumerate(TLGProb_NBA.player_to_date[player]):
date = dt.date(int(date_int/10000.), int(date_int/100.)%100,date_int%100)
line_x.append(date)
line_y.append(TLGProb_NBA.player_to_attributes[player]["smoothed_performance"][i, feature_ind])
ax.plot_date(line_x, line_y, line, label=feature.upper()+" ability")
ax.xaxis.set_major_locator(months)
ax.xaxis.set_major_formatter(monthsFmt)
ax.autoscale_view()
fig.autofmt_xdate()
def plot_players_performance(TLGProb_NBA):
plt.figure(len(TLGProb_NBA.key_to_player_input_id)*2)
lines = []
dates = []
for y, m, d in TLGProb_NBA.game_dict['date']:
date = y*10000+m*100+d
if(date not in dates):
dates.append(date)
for player in TLGProb_NBA.all_player:
line_x, line_y = [], []
for i, date in enumerate(TLGProb_NBA.player_to_date[player]):
date_ind = bisect_left(dates, date)
line_x.append(date_ind)
line_y.append(TLGProb_NBA.player_to_attributes[player]["+/-"][i])
plt.plot(line_x, line_y)
plt.title("Time Series of Players' Performances")
plt.xlabel("Date Index")
plt.ylabel("Player Performance")
def plot_players_ability(TLGProb_NBA):
plt.figure(len(TLGProb_NBA.key_to_player_input_id)*2+1)
lines = []
dates = []
for y, m, d in TLGProb_NBA.game_dict['date']:
date = y*10000+m*100+d
if(date not in dates):
dates.append(date)
for player in TLGProb_NBA.all_player:
line_x, line_y = [], []
for i, date in enumerate(TLGProb_NBA.player_to_date[player]):
date_ind = bisect_left(dates, date)
line_x.append(date_ind)
line_y.append(TLGProb_NBA.player_to_attributes[player]["smoothed_plus_minus"][i])
plt.plot(line_x, line_y)
plt.title("Time Series of Players' Abilities")
plt.xlabel("Date Index")
plt.ylabel("Player Ability")
TLGProb_NBA = TLGProb()
TLGProb_NBA.load_data()
fig, ax = plt.subplots(2, 1, sharex=True, figsize=(10, 8), dpi=300)
player = "LeBron James"
feature = "3p"
plot_unsmoothed_feature(TLGProb_NBA, fig, ax[0], "b--", feature, player)
plot_smoothed_feature(TLGProb_NBA, fig, ax[0], "r-", feature, player)
ax[0].legend(loc=9, prop={'size':15})
ax[0].set_ylabel(feature.upper(), fontsize=18)
ax[0].set_title(player+" in NBA 2014/2015 Season")
feature = "fg"
plot_unsmoothed_feature(TLGProb_NBA, fig, ax[1], "b--", feature, player)
plot_smoothed_feature(TLGProb_NBA, fig, ax[1], "r-", feature, player)
ax[1].legend(loc=9, prop={'size':15})
ax[1].set_ylabel(feature.upper(), fontsize=18)
plt.tight_layout()
fig.savefig('../lebron_james_3p_fg.eps') | 43.651007 | 111 | 0.64591 | 925 | 6,504 | 4.318919 | 0.175135 | 0.085106 | 0.027034 | 0.030038 | 0.767459 | 0.767459 | 0.750939 | 0.699875 | 0.699875 | 0.699875 | 0 | 0.024301 | 0.202798 | 6,504 | 149 | 112 | 43.651007 | 0.746191 | 0.03321 | 0 | 0.676471 | 0 | 0 | 0.070227 | 0.004083 | 0 | 0 | 0 | 0 | 0 | 1 | 0.029412 | false | 0 | 0.080882 | 0 | 0.110294 | 0.014706 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
58b1d1aec9cb6fdbbfbb4e360c7e8c81656b2edf | 2,077 | py | Python | test/record/parser/test_response_whois_denic_de_property_nameservers_with_ip.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | test/record/parser/test_response_whois_denic_de_property_nameservers_with_ip.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | test/record/parser/test_response_whois_denic_de_property_nameservers_with_ip.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null |
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
# spec/fixtures/responses/whois.denic.de/property_nameservers_with_ip
#
# and regenerate the tests with the following script
#
# $ scripts/generate_tests.py
#
from nose.tools import *
from dateutil.parser import parse as time_parse
import yawhois
class TestWhoisDenicDePropertyNameserversWithIp(object):
def setUp(self):
fixture_path = "spec/fixtures/responses/whois.denic.de/property_nameservers_with_ip.txt"
host = "whois.denic.de"
part = yawhois.record.Part(open(fixture_path, "r").read(), host)
self.record = yawhois.record.Record(None, [part])
def test_nameservers(self):
eq_(self.record.nameservers.__class__.__name__, 'list')
eq_(len(self.record.nameservers), 5)
eq_(self.record.nameservers[0].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[0].name, "ns1.prodns.de")
eq_(self.record.nameservers[0].ipv4, "91.233.85.99")
eq_(self.record.nameservers[0].ipv6, None)
eq_(self.record.nameservers[1].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[1].name, "ns2.prodns.eu")
eq_(self.record.nameservers[1].ipv4, None)
eq_(self.record.nameservers[1].ipv6, None)
eq_(self.record.nameservers[2].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[2].name, "ns3.prodns.de")
eq_(self.record.nameservers[2].ipv4, "91.233.86.99")
eq_(self.record.nameservers[2].ipv6, None)
eq_(self.record.nameservers[3].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[3].name, "ns4.prodns.eu")
eq_(self.record.nameservers[3].ipv4, None)
eq_(self.record.nameservers[3].ipv6, None)
eq_(self.record.nameservers[4].__class__.__name__, 'Nameserver')
eq_(self.record.nameservers[4].name, "ns5.prodns.de")
eq_(self.record.nameservers[4].ipv4, "65.18.172.184")
eq_(self.record.nameservers[4].ipv6, None)
| 44.191489 | 96 | 0.684641 | 276 | 2,077 | 4.858696 | 0.326087 | 0.171514 | 0.344519 | 0.360179 | 0.583893 | 0.500373 | 0.243102 | 0.086503 | 0.086503 | 0.086503 | 0 | 0.037231 | 0.172364 | 2,077 | 46 | 97 | 45.152174 | 0.742874 | 0.12181 | 0 | 0 | 1 | 0 | 0.13348 | 0.039162 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.09375 | 0 | 0.1875 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
58d441328e3e9a25c53c9b919dc4086116b617b9 | 8,728 | py | Python | src/third_party/beaengine/tests/0f5a.py | CrackerCat/rp | 5fe693c26d76b514efaedb4084f6e37d820db023 | [
"MIT"
] | 1 | 2022-01-17T17:40:29.000Z | 2022-01-17T17:40:29.000Z | src/third_party/beaengine/tests/0f5a.py | CrackerCat/rp | 5fe693c26d76b514efaedb4084f6e37d820db023 | [
"MIT"
] | null | null | null | src/third_party/beaengine/tests/0f5a.py | CrackerCat/rp | 5fe693c26d76b514efaedb4084f6e37d820db023 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
# @author : beaengine@gmail.com
from headers.BeaEnginePython import *
from nose.tools import *
class TestSuite:
def test(self):
# NP 0F 5A /r
# CVTPS2PD xmm1, xmm2/m64
Buffer = bytes.fromhex('0f5a209000000000')
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x0f5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'cvtps2pd')
assert_equal(myDisasm.repr(), 'cvtps2pd xmm4, qword ptr [rax]')
# VEX.128.0F.WIG 5A /r
# VCVTPS2PD xmm1, xmm2/m64
myVEX = VEX('VEX.128.0F.WIG')
Buffer = bytes.fromhex('{}5a20'.format(myVEX.c4()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtps2pd')
assert_equal(myDisasm.repr(), 'vcvtps2pd xmm12, qword ptr [r8]')
# VEX.256.0F.WIG 5A /r
# VCVTPS2PD ymm1, xmm2/m128
myVEX = VEX('VEX.256.0F.WIG')
Buffer = bytes.fromhex('{}5a20'.format(myVEX.c4()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtps2pd')
assert_equal(myDisasm.repr(), 'vcvtps2pd ymm12, xmmword ptr [r8]')
# EVEX.128.0F.W0 5A /r
# VCVTPS2PD xmm1 {k1}{z}, xmm2/m64/m32bcst
myEVEX = EVEX('EVEX.128.0F.W0')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtps2pd')
assert_equal(myDisasm.repr(), 'vcvtps2pd xmm28, qword ptr [r8]')
# EVEX.256.0F.W0 5A /r
# VCVTPS2PD ymm1 {k1}{z}, xmm2/m128/m32bcst
myEVEX = EVEX('EVEX.256.0F.W0')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtps2pd')
assert_equal(myDisasm.repr(), 'vcvtps2pd ymm28, xmmword ptr [r8]')
# EVEX.512.0F.W0 5A /r
# VCVTPS2PD zmm1 {k1}{z}, ymm2/m256/m32bcst{sae}
myEVEX = EVEX('EVEX.512.0F.W0')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtps2pd')
assert_equal(myDisasm.repr(), 'vcvtps2pd zmm28, ymmword ptr [r8]')
# 66 0F 5A /r
# CVTPD2PS xmm1, xmm2/m128
Buffer = bytes.fromhex('660f5a209000000000')
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x0f5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'cvtpd2ps')
assert_equal(myDisasm.repr(), 'cvtpd2ps xmm4, xmmword ptr [rax]')
# VEX.128.66.0F.WIG 5A /r
# VCVTPD2PS xmm1, xmm2/m128
myVEX = VEX('VEX.128.66.0F.WIG')
Buffer = bytes.fromhex('{}5a20'.format(myVEX.c4()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtpd2ps')
assert_equal(myDisasm.repr(), 'vcvtpd2ps xmm12, xmmword ptr [r8]')
# VEX.256.66.0F.WIG 5A /r
# VCVTPD2PS xmm1, ymm2/m256
myVEX = VEX('VEX.256.66.0F.WIG')
Buffer = bytes.fromhex('{}5a20'.format(myVEX.c4()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtpd2ps')
assert_equal(myDisasm.repr(), 'vcvtpd2ps ymm12, ymmword ptr [r8]')
# EVEX.128.66.0F.W1 5A /r
# VCVTPD2PS xmm1 {k1}{z}, xmm2/m128/m64bcst
myEVEX = EVEX('EVEX.128.66.0F.W1')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtpd2ps')
assert_equal(myDisasm.repr(), 'vcvtpd2ps xmm28, xmmword ptr [r8]')
# EVEX.256.66.0F.W1 5A /r
# VCVTPD2PS xmm1 {k1}{z}, ymm2/m256/m64bcst
myEVEX = EVEX('EVEX.256.66.0F.W1')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtpd2ps')
assert_equal(myDisasm.repr(), 'vcvtpd2ps ymm28, ymmword ptr [r8]')
# EVEX.512.66.0F.W1 5A /r
# VCVTPD2PS ymm1 {k1}{z}, zmm2/m512/m64bcst{er}
myEVEX = EVEX('EVEX.512.66.0F.W1')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtpd2ps')
assert_equal(myDisasm.repr(), 'vcvtpd2ps zmm28, zmmword ptr [r8]')
# F3 0F 5A /r
# CVTSS2SD xmm1, xmm2/m32
Buffer = bytes.fromhex('f30f5a209000000000')
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x0f5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'cvtss2sd')
assert_equal(myDisasm.repr(), 'cvtss2sd xmm4, dword ptr [rax]')
# VEX.NDS.LIG.F3.0F.WIG 5A /r
# VCVTSS2SD xmm1, xmm2, xmm3/m32
myVEX = VEX('VEX.NDS.LIG.F3.0F.WIG')
Buffer = bytes.fromhex('{}5a20'.format(myVEX.c4()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtss2sd')
assert_equal(myDisasm.repr(), 'vcvtss2sd xmm12, xmm15, dword ptr [r8]')
# EVEX.NDS.LIG.F3.0F.W0 5A /r
# VCVTSS2SD xmm1 {k1}{z}, xmm2, xmm3/m32{sae}
myEVEX = EVEX('EVEX.NDS.LIG.F3.0F.W0')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtss2sd')
assert_equal(myDisasm.repr(), 'vcvtss2sd xmm28, xmm31, dword ptr [r8]')
# F2 0F 5A /r
# CVTSD2SS xmm1, xmm2/m64
Buffer = bytes.fromhex('f20f5a209000000000')
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x0f5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'cvtsd2ss')
assert_equal(myDisasm.repr(), 'cvtsd2ss xmm4, qword ptr [rax]')
# VEX.NDS.LIG.F2.0F.WIG 5A /r
# VCVTSD2SS xmm1, xmm2, xmm3/m64
myVEX = VEX('VEX.NDS.LIG.F2.0F.WIG')
Buffer = bytes.fromhex('{}5a20'.format(myVEX.c4()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtsd2ss')
assert_equal(myDisasm.repr(), 'vcvtsd2ss xmm12, xmm15, qword ptr [r8]')
# EVEX.NDS.LIG.F2.0F.W1 5A /r
# VCVTSD2SS xmm1 {k1}{z}, xmm2, xmm3/m64{er}
myEVEX = EVEX('EVEX.NDS.LIG.F2.0F.W1')
Buffer = bytes.fromhex('{}5a20'.format(myEVEX.prefix()))
myDisasm = Disasm(Buffer)
myDisasm.read()
assert_equal(myDisasm.infos.Instruction.Opcode, 0x5a)
assert_equal(myDisasm.infos.Instruction.Mnemonic, b'vcvtsd2ss')
assert_equal(myDisasm.repr(), 'vcvtsd2ss xmm28, xmm31, qword ptr [r8]')
| 40.221198 | 79 | 0.639322 | 1,079 | 8,728 | 5.121409 | 0.15848 | 0.107492 | 0.185668 | 0.156352 | 0.728194 | 0.669562 | 0.625769 | 0.617445 | 0.617445 | 0.608397 | 0 | 0.077254 | 0.227314 | 8,728 | 216 | 80 | 40.407407 | 0.742141 | 0.19489 | 0 | 0.650794 | 0 | 0 | 0.165018 | 0.012043 | 0 | 0 | 0.01147 | 0 | 0.428571 | 1 | 0.007937 | false | 0 | 0.015873 | 0 | 0.031746 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
58d4e4e81df66971936620ec51c8eafca13ae5a5 | 547 | py | Python | Arrays_and_Strings/4URLify.py | RoKu1/cracking-the-coding-interview | ce2fabba75f1edf69b81a80022eb9ebac8a09af2 | [
"Apache-2.0"
] | null | null | null | Arrays_and_Strings/4URLify.py | RoKu1/cracking-the-coding-interview | ce2fabba75f1edf69b81a80022eb9ebac8a09af2 | [
"Apache-2.0"
] | null | null | null | Arrays_and_Strings/4URLify.py | RoKu1/cracking-the-coding-interview | ce2fabba75f1edf69b81a80022eb9ebac8a09af2 | [
"Apache-2.0"
] | null | null | null | """
URLify: Write a method to replace all spaces in a string with '%20'. You may assume that the string
has sufficient space at the end to hold the additional characters, and that you are given the "true"
length of the string. (Note: If implementing in Java, please use a character array so that you can
perform this operation in place.)
EXAMPLE
Input: "Mr 3ohn Smith"
Output: "Mr%203ohn%20Smith"
"""
def urlify(usr_str):
return str(usr_str).replace(' ', '%20')
# inp_str = input("Enter String \n")
print(urlify(input("Enter String \n")))
| 30.388889 | 100 | 0.725777 | 91 | 547 | 4.32967 | 0.67033 | 0.045685 | 0.081218 | 0.086294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021978 | 0.16819 | 547 | 17 | 101 | 32.176471 | 0.843956 | 0.78245 | 0 | 0 | 0 | 0 | 0.171171 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0.333333 | 0.666667 | 0.333333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
58e8377027a76472e224fb1041b7cb456d1caf68 | 1,579 | py | Python | led_control.py | lip-realmax/Pi_LED_Control | 341ae4eae059e95295b29c33fdc4e5ca6271b70d | [
"MIT"
] | null | null | null | led_control.py | lip-realmax/Pi_LED_Control | 341ae4eae059e95295b29c33fdc4e5ca6271b70d | [
"MIT"
] | null | null | null | led_control.py | lip-realmax/Pi_LED_Control | 341ae4eae059e95295b29c33fdc4e5ca6271b70d | [
"MIT"
] | null | null | null | from gpiozero import LED
from argparse import ArgumentParser
import time
import signal
import sys
def readConfiguration(signalNumber, frame):
#print ('(SIGHUP) reading configuration')
return
def terminateProcess(signalNumber, frame):
# print ('(SIGTERM) terminating the process')
sys.exit()
def receiveSignal(signalNumber, frame):
print('Received:', signalNumber)
# register the signals to be caught
signal.signal(signal.SIGHUP, readConfiguration)
signal.signal(signal.SIGINT, receiveSignal)
signal.signal(signal.SIGQUIT, receiveSignal)
signal.signal(signal.SIGILL, receiveSignal)
signal.signal(signal.SIGTRAP, receiveSignal)
signal.signal(signal.SIGABRT, receiveSignal)
signal.signal(signal.SIGBUS, receiveSignal)
signal.signal(signal.SIGFPE, receiveSignal)
#signal.signal(signal.SIGKILL, receiveSignal)
signal.signal(signal.SIGUSR1, receiveSignal)
signal.signal(signal.SIGSEGV, receiveSignal)
signal.signal(signal.SIGUSR2, receiveSignal)
signal.signal(signal.SIGPIPE, receiveSignal)
signal.signal(signal.SIGALRM, receiveSignal)
signal.signal(signal.SIGTERM, terminateProcess)
parser = ArgumentParser()
parser.add_argument("-s", dest="state", help="State of the LED(on/off). Default: off", default="off")
args = parser.parse_args()
led = LED(14) #GPIO 14
while counter < 1 :
led.on()
time.sleep(0.1)
led.off()
time.sleep(0.1)
counter += 0.2
if "on" == args.state :
led.on()
elif "off" == args.state :
led.off()
else:
print("Invalid input: " + args.state)
# wait in an endless loop for signals
while True :
time.sleep(1);
| 26.762712 | 101 | 0.753008 | 198 | 1,579 | 5.994949 | 0.388889 | 0.303286 | 0.227464 | 0.339511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010101 | 0.122229 | 1,579 | 58 | 102 | 27.224138 | 0.84632 | 0.129829 | 0 | 0.139535 | 0 | 0 | 0.056287 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.069767 | false | 0 | 0.116279 | 0.023256 | 0.209302 | 0.046512 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.